-
-
Notifications
You must be signed in to change notification settings - Fork 192
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
Replace tsup
with ts-bridge
#4648
Conversation
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/[email protected] |
expectWorkspaceField( | ||
workspace, | ||
'exports["."].types', | ||
'./dist/types/index.d.ts', | ||
'exports["."].import.types', |
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.
Note that types
must be above default
. I don't think Yarn enforces this currently, but we could look into doing so.
"files": [ | ||
"dist/" | ||
], | ||
"scripts": { | ||
"build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", | ||
"build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", |
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.
ts-bridge
builds with project references if they are set in tsconfig.json
by default. To build an individual package, we have to use --no-references
here. I may reconsider this to make project references opt-in rather than opt-out, as that's what tsc
does.
## Explanation This bumps all Snaps packages used in the core repo to the latest version. This is necessary to unblock #4648. ## Checklist - [x] I've updated the test suite for new or updated code as appropriate - [x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [x] I've highlighted breaking changes using the "BREAKING" category above as appropriate
9aca11f
to
8298039
Compare
699b56a
to
e6af643
Compare
@@ -488,20 +490,35 @@ async function expectWorkspaceLicense(workspace) { | |||
function expectCorrectWorkspaceExports(workspace) { |
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.
Would there be a way to add the same rules for something like 'exports.*.import.types'
? Some core packages have additional subpaths in the exports field, and we may need to enforce that those expose dual CJS/ESM builds as well.
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.
I made the minimal modifications to the constraints to have a valid main entry point for now. This would certainly be possible, but I feel like it's out of scope for this PR. What do you think?
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.
Agreed! We can take that on in a separate ticket along with the necessary fixes to those exports subfields.
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.
Created a ticket here: #4699
25ef1b7
to
7952573
Compare
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.
LGTM! Thanks for your work on this, including all the amazing work leading up to this on ts-bridge
.
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.
LGTM
Explanation
ts-bridge
finally supports project references. In this PR, I've swapped outtsup
forts-bridge
everywhere.References
Related to MetaMask/metamask-module-template#247, MetaMask/utils#182.
Closes #4333.
Checklist