Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Dec 30, 2024

We publish this file https://unpkg.com/browse/@base-ui-components/[email protected]/

SCR-20241230-chko

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.

@oliviertassinari oliviertassinari added core Infrastructure work going on behind the scenes performance labels Dec 30, 2024
@oliviertassinari oliviertassinari changed the title [core] Improve release [core] Remove tsconfig.json.tsbuildinfo from npm Dec 30, 2024

<!-- #default-branch-switch -->

```bash
git push -f upstream master:docs-v1
pnpm docs:deploy
Copy link
Member Author

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.

Copy link
Member

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

@mui-bot
Copy link

mui-bot commented Dec 30, 2024

Netlify deploy preview

https://deploy-preview-1245--base-ui.netlify.app/

Generated by 🚫 dangerJS against 17a5636

@@ -1,8 +1,11 @@
/* eslint-disable no-console */
import path from 'path';
import fse from 'fs-extra';
Copy link
Member Author

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.

Comment on lines +66 to -73
"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\"",
Copy link
Member Author

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",
Copy link
Member Author

@oliviertassinari oliviertassinari Dec 30, 2024

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.

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Jan 2, 2025
@michaldudak
Copy link
Member

The tsbuildinfo was removed from the built package in #1152

@@ -31,6 +34,10 @@ async function addLicense(packageData) {
);
}

async function removeBuildArtefacts() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> 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
Copy link
Member

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`;
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes performance PR: out-of-date The pull request has merge conflicts and can't be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants