-
-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[core] Remove tsconfig.json.tsbuildinfo from npm #1245
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,14 +63,14 @@ | |
}, | ||
"type": "commonjs", | ||
"scripts": { | ||
"prebuild": "rimraf --glob build build-tests \"*.tsbuildinfo\"", | ||
"build": "pnpm build:node && pnpm build:stable && pnpm build:types && pnpm build:copy-files && pnpm build:manifest", | ||
"build:node": "node ../../scripts/build.mjs node", | ||
"build:stable": "node ../../scripts/build.mjs stable", | ||
"build:types": "tsx ../../scripts/buildTypes.mts --project tsconfig.build.json --copy build/cjs", | ||
"build:copy-files": "node ../../scripts/copyFiles.mjs", | ||
"build:types": "tsx ../../scripts/buildTypes.mjs --project tsconfig.build.json --copy build/cjs", | ||
"build:manifest": "tsx ./scripts/createPackageManifest.mts", | ||
"test:package": "publint ./build && attw --pack ./build", | ||
"prebuild": "rimraf --glob build build-tests \"*.tsbuildinfo\"", | ||
Comment on lines
+66
to
-73
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Logical order |
||
"release": "pnpm build && pnpm publish", | ||
"test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/react/**/*.test.{js,ts,tsx}'", | ||
"typescript": "tsc -b tsconfig.json" | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -6,19 +6,15 @@ | |||||
|
||||||
### Prerequisites | ||||||
|
||||||
1. You must be a member of the `@mui` org in npm to publish the release | ||||||
2. Set up your npm authToken by logging into npm (`npm login`) . This will save a token to `~/.npmrc` as a line that looks | ||||||
1. You must be a member of the `@base-ui-components` org in npm to publish the release. | ||||||
2. Set up your npm authToken by logging into npm (`npm login`). This will save a token to `~/.npmrc` as a line that looks | ||||||
Check warning on line 10 in scripts/README.md GitHub Actions / runner / vale
|
||||||
like this: | ||||||
```text | ||||||
//registry.npmjs.org/:_authToken=npm_000000000000000000000000000000000000 | ||||||
``` | ||||||
3. Make sure you have added the `material-ui-docs` remote to deploy the documentation: | ||||||
```bash | ||||||
git remote add material-ui-docs https://github.com/mui/material-ui-docs.git | ||||||
``` | ||||||
4. Generate a GitHub Token at https://github.com/settings/personal-access-tokens/new and add it to your shell rc script (either `.bashrc` or `.zshrc`) as `GITHUB_TOKEN`. | ||||||
3. Generate a GitHub Token at https://github.com/settings/personal-access-tokens/new and add it to your shell rc script (either `.bashrc` or `.zshrc`) as `GITHUB_TOKEN`. | ||||||
|
||||||
### Prepare | ||||||
### Prepare the release of the packages | ||||||
|
||||||
The following steps must be proposed as a pull request. | ||||||
|
||||||
|
@@ -28,33 +24,35 @@ | |||||
|
||||||
2. Clean the generated changelog: | ||||||
1. Match the format of https://github.com/mui/material-ui/releases. | ||||||
2. Change the packages names casing to be lowercase if applicable, for example change `Material` to `material` | ||||||
3. Update the root `/package.json`'s version | ||||||
2. Change the packages names casing to be lowercase if applicable | ||||||
3. Update the root `/package.json`'s version. | ||||||
4. Run `pnpm release:version`. Keep the package versions of stable public packages the same as the root `package.json` version. | ||||||
5. Open PR with changes and wait for review and green CI | ||||||
6. Merge PR once CI is green and it has been approved | ||||||
5. Open PR with changes and wait for review and green CI. | ||||||
6. Merge PR once CI is green and it has been approved. | ||||||
|
||||||
### Release the packages | ||||||
|
||||||
### Release | ||||||
1. Checkout the last version of the release branch. | ||||||
2. `pnpm install && pnpm release:build` (make sure you have the latest dependencies installed, and build the packages). | ||||||
3. `pnpm release:publish` (release the versions on npm, you need your 2FA device). | ||||||
4. `pnpm release:tag` (push the newly created tag). | ||||||
|
||||||
1. Checkout the last version of the release branch | ||||||
2. `pnpm install && pnpm release:build` (make sure you have the latest dependencies installed, and build the packages) | ||||||
3. `pnpm release:publish` (release the versions on npm, you need your 2FA device) | ||||||
4. `pnpm release:tag` (push the newly created tag) | ||||||
> Tip: You can use `release:publish:dry-run` to test the release process without actually publishing the packages. | ||||||
> Be sure install [verdaccio](https://verdaccio.org/) (local npm registry) before doing it. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
### Publish the documentation | ||||||
|
||||||
The documentation must be updated on the `docs-vX` branch (`docs-v1` for `v1.X` releases, `docs-v2` for `v2.X` releases, etc.) | ||||||
|
||||||
Push the working branch to the documentation release branch to deploy the documentation with the latest changes. | ||||||
Push the working branch to the documentation release branch to deploy the documentation with the latest changes: | ||||||
|
||||||
<!-- #default-branch-switch --> | ||||||
|
||||||
```bash | ||||||
git push -f upstream master:docs-v1 | ||||||
pnpm docs:deploy | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Makes this resilient to docs versioning. We struggled a bit with this on X. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's no need for the |
||||||
``` | ||||||
|
||||||
You can follow the deployment process [on the Netlify Dashboard](https://app.netlify.com/sites/material-ui-x/deploys?filter=docs-next) | ||||||
Once deployed, it will be accessible at https://material-ui-x.netlify.app/ for the `docs-next` deployment. | ||||||
You can follow the deployment process [on the Netlify Dashboard](https://app.netlify.com/sites/base-ui/deploys). | ||||||
|
||||||
### Announce | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,8 +1,11 @@ | ||||||
/* eslint-disable no-console */ | ||||||
import path from 'path'; | ||||||
import fse from 'fs-extra'; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No reason to use |
||||||
import fs from 'fs/promises'; | ||||||
import { $ } from 'execa'; | ||||||
import { includeFileInBuild, prepend, typescriptCopy } from './copyFilesUtils.mjs'; | ||||||
|
||||||
const $$ = $({ stdio: 'inherit' }); | ||||||
|
||||||
const packagePath = process.cwd(); | ||||||
const buildPath = path.join(packagePath, './build'); | ||||||
const srcPath = path.join(packagePath, './src'); | ||||||
|
@@ -31,6 +34,10 @@ async function addLicense(packageData) { | |||||
); | ||||||
} | ||||||
|
||||||
async function removeBuildArtefacts() { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
We tend to use American spelling throughout the codebase (https://grammarist.com/spelling/artefact-artifact/) |
||||||
await $$`rimraf --glob ${buildPath}/*.tsbuildinfo`; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not use |
||||||
} | ||||||
|
||||||
async function run() { | ||||||
const extraFiles = process.argv.slice(2); | ||||||
try { | ||||||
|
@@ -44,9 +51,12 @@ async function run() { | |||||
}), | ||||||
); | ||||||
|
||||||
const packageFile = await fse.readFile(path.resolve(packagePath, './package.json'), 'utf8'); | ||||||
const packageFile = await fs.readFile(path.resolve(packagePath, './package.json'), { | ||||||
encoding: 'utf-8', | ||||||
}); | ||||||
const packageData = JSON.parse(packageFile); | ||||||
await addLicense(packageData); | ||||||
await removeBuildArtefacts(); | ||||||
} catch (err) { | ||||||
console.error(err); | ||||||
process.exit(1); | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file extension was wrong
buildTypes.mjs
->buildTypes.mts
. I'm amazed it still worked.