Conversation
|
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/tsup@8.2.4 |
| workspace, | ||
| 'exports["."].types', | ||
| './dist/types/index.d.ts', | ||
| 'exports["."].import.types', |
There was a problem hiding this comment.
Note that types must be above default. I don't think Yarn enforces this currently, but we could look into doing so.
| ], | ||
| "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.
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.
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.
e.g. https://github.com/MetaMask/core/blob/main/packages/notification-services-controller/package.json
There was a problem hiding this comment.
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.
Agreed! We can take that on in a separate ticket along with the necessary fixes to those exports subfields.
25ef1b7 to
7952573
Compare
MajorLift
left a comment
There was a problem hiding this comment.
LGTM! Thanks for your work on this, including all the amazing work leading up to this on ts-bridge.
## Explanation Update the template used by the `create-package` script. The previous template was no longer compatible with our Yarn constraints. ## References Here are the PRs related to these specific changes: * #4648 * #3645 * #1390 * #3668 ## Changelog N/A ## 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 communicated my changes to consumers by [updating changelogs for packages I've changed](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs), highlighting breaking changes as necessary - [x] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes
Explanation
ts-bridgefinally supports project references. In this PR, I've swapped outtsupforts-bridgeeverywhere.References
Related to MetaMask/metamask-module-template#247, MetaMask/utils#182.
Closes #4333.
Checklist