Repository navigation
Migrate json rpc engine - #1872
Conversation
* applied eslint rules from core monorepo and fixed the errors * added eslint-import-resolver-typescript devDependencies
|
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
|
👍 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-all |
…rocess (#100) Duplicate of #92 with updated `main` branch ## **Description** This PR follows **[PR#6] 1. Migrate the source repo's git history into the merged-packages/ temporary directory in metamask design system** as part of the [package migration process guide](https://github.com/MetaMask/metamask-design-system/blob/main/docs/package-migration-process-guide.md#pr6-1-migrate-the-source-repos-git-history-into-the-merged-packages-temporary-directory-in-metamask-design-system). This step migrates the Git history of the `design-tokens` repository into the `metamask-design-system` monorepo, placing all contents under the `merged-packages/design-tokens` directory. [Example PR](MetaMask/core#1872) in core ## **Related issues** Partly fixes: #88 ## **Manual testing steps** 1. Check the contents under `merged-packages/design-tokens` in the `metamask-design-system` repository to ensure the file structure aligns with the original `design-tokens` repository. 2. Verify that the commit history within `merged-packages/design-tokens` accurately preserves previous `design-tokens` commits. 3. Confirm successful integration within the monorepo and that no errors are introduced. ## **Pre-merge author checklist** - [x] Verified `git-filter-repo` installation and migration process. - [x] Confirmed all `design-tokens` files are correctly moved to `merged-packages/design-tokens`. - [x] Checked that the full commit history for `design-tokens` is retained. - [x] Followed MetaMask Coding Standards. - [x] Set PR status appropriately. ## **Pre-merge reviewer checklist** - [ ] Confirmed that all `design-tokens` files appear in `merged-packages/design-tokens` with the correct structure. - [ ] Verified the commit history for `design-tokens` is intact and accurately reflects the original repository. - [ ] Ensured this PR meets all acceptance criteria.
… `merged-packages/` (#9130) ## Explanation First PR of the [package migration process](https://github.com/MetaMask/core/blob/main/docs/processes/package-migration-process-guide.md#phase-b-staging-from-the-core-monorepos-merged-packages-directory) for [`@metamask/smart-transactions-controller`](https://github.com/MetaMask/smart-transactions-controller). History of the source repo was rewritten with `git filter-repo --to-subdirectory-filter merged-packages/smart-transactions-controller` and merged into core with `--allow-unrelated-histories`. Subsequent PRs (#7–#11 in the guide) will reset the CHANGELOG, strip source-repo-only files, replace configs with monorepo-extending versions, align deps and scripts, and update the README. PR #12 then moves the package out of `merged-packages/` into `packages/`. The source repo has been prepped (Phase A): migration notice in README (#589), dep alignment and ESLint v15 flat-config migration across PRs #590–#598, plus a final `v24.2.1` release (#599) so npm consumers see a clean cutoff. The package is at parity with core's tooling and dep ranges (single exception: `nock@^14.0.0-beta.7` stays — downgrading to core's `^13.3.1` breaks 22 tests; will need either an `ALLOWED_INCONSISTENT_DEPENDENCIES` entry or a core-side nock bump). > [!IMPORTANT] > Per the [migration guide](https://github.com/MetaMask/core/blob/main/docs/processes/package-migration-process-guide.md#phase-b-staging-from-the-core-monorepos-merged-packages-directory), this PR **must be merged with a merge commit (not squash)** to preserve commit history. Coordinating with a [maintainer](https://github.com/orgs/MetaMask/teams/engineering?query=role%3Amaintainer) to temporarily enable merge commits on \`main\`. > > Do **not** rebase this branch. ## References - Migration process: [`docs/processes/package-migration-process-guide.md`](https://github.com/MetaMask/core/blob/main/docs/processes/package-migration-process-guide.md) - Example precedent: #1872 - Source repo: https://github.com/MetaMask/smart-transactions-controller (final release: `v24.2.1`) ## Checklist - [ ] I've updated the test suite for new or updated code as appropriate - [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [ ] I've communicated my changes to consumers by [updating changelogs for packages I've changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md) - [ ] I've introduced [breaking changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md) in this PR and have prepared draft pull requests for clients and consumer packages to resolve them
…ckages (#1686) <!-- CURSOR_AGENT_PR_BODY_BEGIN --> <!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** Phase B step 1 (PR#6) of migrating [`@metamask/eslint-plugin-design-tokens`](https://github.com/MetaMask/eslint-plugin-design-tokens) into this monorepo. This pull request imports that repository's git history under `merged-packages/eslint-plugin-design-tokens` and does not change any other files. Process: [Package Migration Process Guide](https://github.com/MetaMask/metamask-design-system/blob/main/docs/package-migration-process-guide.md) (`docs/package-migration-process-guide.md`). Example: MetaMask/core#1872. The branch is `main` plus one merge commit (`git merge --allow-unrelated-histories`) of the source history after `git filter-repo --to-subdirectory-filter merged-packages/eslint-plugin-design-tokens`. There are no other commits or file edits on this branch. **This pull request must be merged WITHOUT squashing**, so the imported commit history is preserved. A maintainer needs to temporarily enable merge commits on `main`. **Do not rebase this branch.** Rebasing rewrites the migrated history. Next steps are separate follow-up pull requests, not part of this one: - PR#7: changelog tag diff links - Tag porting, tested on a fork first (`scripts/migrate-tags.sh` must not be run against this repository until that fork test passes) - PR#8: remove files and directories that the monorepo root replaces - PR#9: replace config files - PR#10: align dependencies and build scripts - PR#11: `constraints.pro` license exception for `(MIT OR Apache-2.0)` - PR#12: README update for non-root package status ## **Related issues** Fixes: ## **Manual testing steps** 1. Confirm the diff only adds `merged-packages/eslint-plugin-design-tokens/`. 2. Confirm the pull request is merged with a merge commit, not squash or rebase, so the imported history stays reachable. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **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 ## **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_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-9b15353b-5fb5-5b9d-8a57-2db9677b4680?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-9b15353b-5fb5-5b9d-8a57-2db9677b4680&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: witmicko <witmicko@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Brian G <162315381+BGos87@users.noreply.github.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>

Explanation
We would like to migrate most MetaMask libraries into core monorepo to make them easier to maintain.
In this PR, we are migrating json-rpc-engine into core monorepo. In the process of migration, we don't want to remove / loose the original GIT history, but to preserve the history of the library as though the entire project had been located in a merged-packages/json-rpc-engine directory all along.
We chose to place json-rpc-engine initially in the merged-packages and not packages so we can hide it from Yarn, ESLint, Prettier, and TypeScript. This allows us to clean it up and conform it to how we've configured this repo before we properly incorporate it.
References
json-rpc-enginehistory intomerged-packages#1881Changelog
@metamask/json-rpc-enginejson-rpc-engineto core monorepoChecklist