-
Notifications
You must be signed in to change notification settings - Fork 990
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
chore: Relocated tsbuildinfo out of dist folder #9390
Conversation
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.
Thanks @Josh-Walker-GM! Yeah the code in the release command never worked because lerna would build all the packages before publishing them and add the files back. One question on studio but otherwise excited to release this.
@Josh-Walker-GM looking at the docs here: https://www.typescriptlang.org/tsconfig#tsBuildInfoFile. It says for
But with your PR, I do indeed see it in |
Sorry should've read those docs more carefully before asking, we specify both rootDir and outDir which leads to different behavior:
|
Exactly, I think it's because of the root and dist dir combo behaviour. |
**Problem** The current tsconfig entry for the tsbuildinfo file puts the file into the dist folder. This ultimately results in it being included in the shipped packages on npm. These files are large and in some cases are the bulk of the content in the package. For example in the `@redwoodjs/project-config` package it makes up 75% of the package size. From what I can read online, and my own understanding of the functionality of that file, there is no need for this content to be shipped with the built code on npm. I quickly checked on my local machine and this change does not appear to have impacted the build time. **Change** 1. Delete the explicit entry which will place it in a default location which is fine. The file is already ignored by the existing .gitignore. 2. Remove the code in the release tooling that removes these files. I don't think it was fully functional right now. **Notes** I marked this as a chore because it doesn't influence the code just the build step. It does change the bytes that are shipped to users so maybe it's not a chore but I am not that concerned with the label right now.
Wow... 🤯 Nice to have a substantial, easy win every one in awhile. Nice work Josh! 🚀 |
…nto fix/stream-wait-allready * 'fix/stream-wait-allready' of github.com:dac09/redwood: chore: Relocated tsbuildinfo out of dist folder (redwoodjs#9390) chore(deps): update dependency lerna to v7.4.2 (redwoodjs#9380)
Thanks but it was definitely @jtoar that spotted this. I just deleted the lines haha! |
Follow up to #9390. Previously, framework sync would remove all of a package's dist, then rebuild it. This meant the `tsconfig.tsbuildinfo` was removed too. #9390 moved the `tsconfig.tsbuildinfo`, saving megabytes of space for user's projects, but didn't update `yarn build:clean` or `yarn rwfw project:sync`. This PR restores their behavior. Paired with @Josh-Walker-GM on this one.
Follow up to #9390. Previously, framework sync would remove all of a package's dist, then rebuild it. This meant the `tsconfig.tsbuildinfo` was removed too. #9390 moved the `tsconfig.tsbuildinfo`, saving megabytes of space for user's projects, but didn't update `yarn build:clean` or `yarn rwfw project:sync`. This PR restores their behavior. Paired with @Josh-Walker-GM on this one.
Problem
The current tsconfig entry for the tsbuildinfo file puts the file into the dist folder. This ultimately results in it being included in the shipped packages on npm. These files are large and in some cases are the bulk of the content in the package. For example in the
@redwoodjs/project-config
package it makes up 75% of the package size.From what I can read online, and my own understanding of the functionality of that file, there is no need for this content to be shipped with the built code on npm.
I quickly checked on my local machine and this change does not appear to have impacted the build time.
Change
Notes
I marked this as a chore because it doesn't influence the code just the build step. It does change the bytes that are shipped to users so maybe it's not a chore but I am not that concerned with the label right now.