-
-
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?
Conversation
|
||
<!-- #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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
There's no need for the default-branch-switch
comment anymore after this change
Netlify deploy preview |
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
No reason to use fs-extra
anymore, we should remove it from the codebase.
"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\"", |
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.
Logical order
"build:copy-files": "node ../../scripts/copyFiles.mjs", | ||
"build:types": "tsx ../../scripts/buildTypes.mjs --project tsconfig.build.json --copy build/cjs", |
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.
The tsbuildinfo was removed from the built package in #1152 |
@@ -31,6 +34,10 @@ async function addLicense(packageData) { | |||
); | |||
} | |||
|
|||
async function removeBuildArtefacts() { |
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.
async function removeBuildArtefacts() { | |
async function removeBuildArtifacts() { |
We tend to use American spelling throughout the codebase (https://grammarist.com/spelling/artefact-artifact/)
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 comment
The reason will be displayed to describe this comment to others. Learn more.
> Be sure install [verdaccio](https://verdaccio.org/) (local npm registry) before doing it. | |
> Make sure to have [verdaccio](https://verdaccio.org/) (local npm registry) installed before doing it. |
|
||
<!-- #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 comment
The reason will be displayed to describe this comment to others. Learn more.
There's no need for the default-branch-switch
comment anymore after this change
@@ -31,6 +34,10 @@ async function addLicense(packageData) { | |||
); | |||
} | |||
|
|||
async function removeBuildArtefacts() { | |||
await $$`rimraf --glob ${buildPath}/*.tsbuildinfo`; |
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.
Why not use rimraf
directly from the script?
We publish this file https://unpkg.com/browse/@base-ui-components/[email protected]/
but it takes a lot of space. I started this PR with the objective of removing it. A possible solution like in react-dnd/react-dnd#2510 is to use an .npmignore file, but I didn't like this because it's a lot of file duplication, making it hard to scale fixes in our codebase that has many npm packages.
At the same time, I tried to clean-up a bit the release steps.