-
-
Notifications
You must be signed in to change notification settings - Fork 6
Use ts-bridge instead of tsc; restrict imports #226
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
Conversation
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. Ignoring: Next stepsTake a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with |
@SocketSecurity ignore npm/[email protected]
New author for |
- Use `ts-bridge` instead of `tsc` to generate a JavaScript build. - This now produces two variants to cater to CommonJS-only and ESM-compatible bundlers. - Define exports in `package.json` - Custom, on-demand subpath imports are no longer supported.
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!
`bin` was pointing to `dist/cli.js` which no longer exists after #226, causing the CLI to break: ``` $ yarn changelog:validate node:internal/modules/cjs/loader:1228 throw err; ^ Error: Cannot find module './node_modules/@metamask/auto-changelog/dist/cli.js' at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15) at Module._load (node:internal/modules/cjs/loader:1051:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:173:12) at node:internal/main/run_main_module:28:49 { code: 'MODULE_NOT_FOUND', requireStack: [] } ```
ts-bridge
instead oftsc
to generate a JavaScript build.package.json
Manual testing steps
yarn build
and inspectdist
. You should see.cjs
,.mjs
,.d.cts
, and.d.mts
files for each TypeScript file insrc/
.yarn test
. This now runs a second command,attw --pack
, which verifies that the built files are correct. This should pass.