-
-
Notifications
You must be signed in to change notification settings - Fork 7
chore: replace ts-node with tsx to resolve yarn lint hanging issue #845
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
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning MetaMask internal reviewing guidelines:
|
📖 Storybook Preview |
|
@SocketSecurity ignore npm/[email protected] I reviewed the warnings and alerts they're specified as low risk. I don't think this is an issue. It's also been verified by @mcmire |
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.
Pull Request Overview
This PR replaces ts-node with tsx across the monorepo to resolve a hanging issue with yarn lint and improve TypeScript execution performance. The change mirrors a successful optimization from MetaMask/core#6481.
Key Changes:
- Replaced
ts-nodewithtsxin all package.json scripts - Updated script shebang lines from
#!yarn ts-nodeto#!yarn tsx - Updated LavaMoat and depcheck configurations to reference
tsxinstead ofts-node
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/update-readme-content.ts | Updated shebang to use tsx |
| scripts/generate-preview-build-message.ts | Updated shebang to use tsx |
| packages/design-system-react/package.json | Replaced ts-node with tsx in scripts and dependencies |
| packages/design-system-react-native/scripts/build.js | Updated execSync call to use tsx |
| packages/design-system-react-native/package.json | Replaced ts-node with tsx in scripts and dependencies |
| package.json | Updated root-level scripts, dependencies, and LavaMoat config |
| .depcheckrc.yml | Updated ignore list to reference tsx |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This was missed in #845 when migrating from ts-node to tsx. The workflow was still calling `yarn ts-node` to generate the preview build message. This change aligns with the same fix made in MetaMask/core#6889. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
) ## **Description** This PR fixes a missed instance in #845 where we migrated from ts-node to tsx. The publish-preview workflow was still using `yarn ts-node` to execute the `generate-preview-build-message.ts` script, which would cause the preview build process to fail. <img width="922" height="186" alt="Screenshot 2025-12-04 at 8 14 35 PM" src="https://github.com/user-attachments/assets/dafc8a2b-097f-46ad-a2a0-2ad5548f80ce" /> The fix updates line 52 in `.github/workflows/publish-preview.yml` to use `yarn tsx` instead. This change aligns with the same fix made in the MetaMask/core repository: https://github.com/MetaMask/core/pull/6889/files ## **Related issues** Fixes: N/A (follow-up to #845) ## **Manual testing steps** 1. The change can be verified by reviewing the workflow file 2. The preview build workflow will be tested when the next preview build is triggered via `@metamaskbot publish-preview` comment ## **Screenshots/Recordings** N/A - workflow configuration change only ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable (N/A for workflow changes) - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable (N/A) - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Switches the publish-preview workflow to run `scripts/generate-preview-build-message.ts` with `yarn tsx` instead of `yarn ts-node`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 41f1e79. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Claude <[email protected]>
## **Description** This PR releases version 17.0.0 of the MetaMask Design System, featuring important fixes for mobile font compatibility, the addition of the ButtonHero component to React, export fixes for React Native, and various dependency updates including ESLint configuration upgrades. ## **Included PRs** #836, #837, #838, #840, #843, #845, #846, #847, #848, #850, #851, #852, #853, #854, #855, #856, #857, #858, #859, #861, #862, #863, #864 ## **Manual testing steps** 1. Check package.json version bumps align with included changes 2. Check changelog accurately reflects the release ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Release 17.0.0 introducing React `ButtonHero`, RN font naming changes and TWRNC preset font family rename (both breaking), plus RN export fix and dependency updates. > > - **Release 17.0.0** > - Bump root `package.json` to `17.0.0`. > - **React (`@metamask/[email protected]`)** > - Add `ButtonHero` component for prominent CTAs. > - Update `@metamask/utils` peer to `^11.8.1`. > - **React Native (`@metamask/[email protected]`)** > - BREAKING: Rename font files to hyphenated PostScript format for iOS Metro compatibility. > - Export missing `TextButtonSize` enum. > - Peer: require `@metamask/design-system-twrnc-preset@^0.3.0`; update `@metamask/utils` peer. > - **TWRNC preset (`@metamask/[email protected]`)** > - BREAKING: Rename font family names to hyphenated PostScript format for iOS/expo-font. > - **Changelogs** > - Update `CHANGELOG.md` links and entries for all packages. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 9a90311. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Description
This change mirrors the successful optimization implemented in MetaMask/core#6481 and provides significant performance improvements for TypeScript script execution in large monorepos.
Related issues
Fixes: N/A
Manual testing steps
yarn lintand verify it completes successfully without hangingyarn lint:eslintindividually to confirm ESLint processing worksyarn create-component:reactto ensure component generation still worksyarn update-readme-contentto verify documentation scripts workScreenshots/Recordings
Not applicable - this is a build/tooling performance optimization without visual changes.
Pre-merge author checklist
tsxinstead ofts-nodetsx>esbuildinstead ofts-node>@swc/coretsxinstead ofts-nodePre-merge reviewer checklist
Technical Details
Files Changed:
create-package,lint:eslint,update-readme-content)ts-nodewithtsxin devDependenciestsx>esbuildinstead ofts-node>@swc/coretsxtsxinstead ofts-nodePerformance Impact:
yarn lintwould hang indefinitelyyarn lintcompletes successfully in reasonable timeReferences:
tsxdocumentation: https://github.com/esbuild-kit/tsxNote
Replace ts-node with tsx for TypeScript scripts, updating scripts, configs, shebangs, and dependencies.
ts-nodetotsxacross repo.package.json(create-package,lint:eslint,update-readme-content).packages/design-system-reactandpackages/design-system-react-native(create-component,generate-icons,generate-icons:index).packages/design-system-react-native/scripts/build.jsto calltsx.scripts/generate-preview-build-message.tsandscripts/update-readme-content.tsto#!yarn tsx.allowScriptsfromts-node>@swc/coretotsx>esbuild..depcheckrc.ymlignores totsx.ts-node; addtsxand relatedesbuildentries; refreshyarn.lock.Written by Cursor Bugbot for commit d403f8d. This will update automatically on new commits. Configure here.