Skip to content
This repository was archived by the owner on Oct 16, 2025. It is now read-only.

refactor!: Synchronize dev toolchain with module template and core monorepo#351

Merged
rekmarks merged 9 commits intomainfrom
rekm/sync-module-template
Oct 15, 2025
Merged

refactor!: Synchronize dev toolchain with module template and core monorepo#351
rekmarks merged 9 commits intomainfrom
rekm/sync-module-template

Conversation

@rekmarks
Copy link
Copy Markdown
Member

@rekmarks rekmarks commented Oct 15, 2025

Synchronizes package meta-files with MetaMask/metamask-module-template and MetaMask/core. Changes exclude source code and other published files with the following exceptions:

  • package.json, most notably its exports field
    • This is due to adding fields expected by our Yarn constraints and migrating to ts-bridge for builds.
  • Published files are split into .cjs and .mjs trees per ts-bridge

In detail (all changes per module template unless otherwise specified):

  • Use ts-bridge
  • Bump eslint, prettier, and related dependencies
  • Add eslint.config.mjs
    • Preserve previous lint configuration to the greatest extent possible
    • Some changes are made to test files
    • index.ts and PollingBlockTracker.ts received some non-behavioral, type-related lint modifications
  • Add and use @arethetypeswrong/cli
  • Add and use typedoc
  • Update .yarnrc.yml and add yarn.config.cjs
  • Update package.json
  • Bump typescript from 4.x to ~5.2.2
  • Downgrade jest and related dependencies from ^29 to ^27
  • Update tsconfig files per ts-bridge conventions
  • Lint all files per updated config
    • Set the following rules to warn:
      • @typescript-eslint/prefer-nullish-coalescing, to avoid behavioral changes
      • @typescript-eslint/explicit-function-return-type, because too many violations to fix right now

Work intentionally avoided in this PR:

  • Update package.json#engines
  • Migrate to vitest

Note

Migrates to ts-bridge and modern tooling, publishes split CJS/ESM with updated exports, upgrades TS, downgrades Jest to v27, and adjusts tests/types and project configs accordingly.

  • Packaging & Build (BREAKING):
    • Publish dual outputs via package.json#exports with separate ./dist/*.cjs and ./dist/*.mjs; set main, module, and split types (.d.cts/.d.mts).
    • Replace tsc build with ts-bridge; add sideEffects=false; remove pify runtime dep.
  • Tooling & Lint:
    • Adopt flat ESLint config eslint.config.mjs; remove .eslintrc.js; update rules (some warnings).
    • Add dep checks (depcheck), changelog validation, @arethetypeswrong/cli, and prettier ESM config with prettier-plugin-packagejson.
    • Add typedoc + typedoc.json; generate docs to docs/.
    • Update Yarn config/constraints (yarn.config.cjs), .yarnrc.yml, .gitattributes, .gitignore; add PR template.
  • TypeScript & Jest:
    • Bump TypeScript to ~5.2.2; extend tsconfig* excludes.
    • Downgrade Jest to ^27 and align configs/utilities; relocate test helpers from tests/ to test/.
  • Source & Types:
    • Minor type-only and refactor tweaks (e.g., interfacetype, typed index.ts exports); no functional changes intended.
  • Changelog:
    • Note breaking change for exports-based dual-module distribution.

Written by Cursor Bugbot for commit c87bf57. This will update automatically on new commits. Configure here.

@rekmarks rekmarks requested a review from a team as a code owner October 15, 2025 18:19
@rekmarks rekmarks requested a review from Mrtenz October 15, 2025 18:20
@socket-security
Copy link
Copy Markdown

socket-security bot commented Oct 15, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedts-expose-internals-conditionally@​1.0.0-empty.0991003778100
Added@​unrs/​resolver-binding-android-arm-eabi@​1.11.11001004182100
Added@​unrs/​resolver-binding-android-arm64@​1.11.11001004182100
Added@​unrs/​resolver-binding-darwin-arm64@​1.11.11001004187100
Added@​unrs/​resolver-binding-darwin-x64@​1.11.11001004187100
Added@​unrs/​resolver-binding-freebsd-x64@​1.11.11001004187100
Added@​unrs/​resolver-binding-linux-arm-gnueabihf@​1.11.11001004187100
Added@​unrs/​resolver-binding-linux-arm-musleabihf@​1.11.11001004187100
Added@​unrs/​resolver-binding-linux-arm64-gnu@​1.11.11001004187100
Added@​unrs/​resolver-binding-linux-arm64-musl@​1.11.11001004187100
Added@​unrs/​resolver-binding-linux-ppc64-gnu@​1.11.11001004187100
Added@​unrs/​resolver-binding-linux-riscv64-gnu@​1.11.11001004187100
Added@​unrs/​resolver-binding-linux-riscv64-musl@​1.11.11001004186100
Added@​unrs/​resolver-binding-linux-s390x-gnu@​1.11.11001004187100
Added@​unrs/​resolver-binding-linux-x64-gnu@​1.11.11001004187100
Added@​unrs/​resolver-binding-linux-x64-musl@​1.11.11001004187100
Added@​unrs/​resolver-binding-win32-arm64-msvc@​1.11.11001004187100
Added@​unrs/​resolver-binding-win32-ia32-msvc@​1.11.11001004187100
Added@​unrs/​resolver-binding-win32-x64-msvc@​1.11.11001004187100
Added@​nolyfill/​is-core-module@​1.0.391001004277100
Updatednode-releases@​2.0.13 ⏵ 2.0.23100 +11004487100
Addedhasown@​2.0.2671007253100
Updatedhas-tostringtag@​1.0.0 ⏵ 1.0.26710082 +152100
Addedabab@​2.0.6671008452100
Addedes-define-property@​1.0.1671008252100
Addedgopd@​1.2.0671007853100
Addedes-set-tostringtag@​2.1.0671008452100
Updatedis-core-module@​2.13.0 ⏵ 2.16.167 +110082 +153100
Updatedfunction-bind@​1.1.1 ⏵ 1.1.26710083 -153100
Addedobject-assign@​4.1.1671008654100
Addedquerystringify@​2.2.0671008755100
Added@​types/​parse-json@​4.0.21001005678100
Updated@​jest/​globals@​29.6.1 ⏵ 27.5.1100 +110060 -295100
See 312 more rows in the dashboard

View full report

@socket-security
Copy link
Copy Markdown

socket-security bot commented Oct 15, 2025

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring alerts on:

  • iconv-lite@0.4.24
  • terminal-link@2.1.1
  • abab@2.0.6
  • cssom@0.4.4
  • cssstyle@2.3.0
  • symbol-tree@3.2.4
  • w3c-hr-time@1.0.2
  • whatwg-encoding@1.0.5
  • whatwg-mimetype@2.3.0
  • xml-name-validator@3.0.0
  • cssom@0.3.8
  • validate-npm-package-license@3.0.4
  • combined-stream@1.0.8
  • is-typedarray@1.0.0
  • mime-types@2.1.35
  • delayed-stream@1.0.0
  • asynckit@0.4.0
  • mime-db@1.52.0
  • is-windows@1.0.2
  • xmlchars@2.2.0
  • object-assign@4.1.1
  • @sindresorhus/is@4.6.0
  • json-buffer@3.0.1
  • arrify@2.0.1
  • marked@4.3.0
  • ini@1.3.8
  • readdirp@3.6.0
  • @colors/colors@1.5.0
  • supports-hyperlinks@2.3.0
  • spdx-correct@3.2.0
  • browser-process-hrtime@1.0.0
  • typedarray-to-buffer@3.1.5
  • keyv@4.5.4
  • commander@10.0.1
  • acorn-walk@7.2.0
  • any-promise@1.3.0
  • entities@4.5.0
  • cosmiconfig@7.1.0
  • is-potential-custom-element-name@1.0.1
  • jest-serializer@27.5.1
  • mz@2.7.0
  • querystringify@2.2.0
  • requires-port@1.0.0
  • thenify@3.3.1
  • thenify-all@1.6.0
  • universalify@0.2.0
  • url-parse@1.5.10
  • yaml@1.10.2
  • throat@6.0.2
  • jest-environment-jsdom@27.5.1
  • jest-jasmine2@27.5.1
  • jsdom@16.7.0
  • acorn-globals@6.0.0
  • data-urls@2.0.0
  • domexception@2.0.1
  • html-encoding-sniffer@2.0.1
  • parse5@6.0.1
  • saxes@5.0.1
  • w3c-xmlserializer@2.0.0
  • webidl-conversions@6.1.0
  • whatwg-url@8.7.0
  • webidl-conversions@5.0.0
  • please-upgrade-node@3.2.0
  • semver-compare@1.0.0
  • tr46@2.1.0
  • estree-walker@2.0.2
  • array-differ@3.0.0
  • multimatch@5.0.0
  • resolve-pkg-maps@1.0.0
  • escodegen@2.1.0
  • highlight.js@10.7.3
  • parse5@5.1.1
  • detect-file@1.0.0
  • resolve-dir@1.0.1
  • expand-tilde@2.0.2
  • homedir-polyfill@1.0.3
  • parse-passwd@1.0.0
  • global-modules@1.0.0
  • global-prefix@1.0.2
  • callsite@1.0.0
  • cli-highlight@2.1.11
  • parse5-htmlparser2-tree-adapter@6.0.1
  • npm-install-checks@6.3.0
  • detect-newline@4.0.1
  • vscode-oniguruma@1.7.0
  • vscode-textmate@8.0.0
  • require-package-name@2.0.1
  • typedoc@0.24.8
  • findup-sync@5.0.0
  • lunr@2.3.9
  • globrex@0.1.2
  • emojilib@2.4.0
  • skin-tone@2.0.0
  • unicode-emoji-modifier-base@1.0.0
  • @andrewbranch/untar.js@1.0.3
  • depcheck@1.4.7
  • deps-regex@0.2.0
  • @types/parse-json@4.0.2
  • marked@9.1.6
  • spdx-expression-parse@4.0.0
  • shiki@0.14.7
  • ts-expose-internals-conditionally@1.0.0-empty.0
  • es-errors@1.3.0
  • fflate@0.8.2
  • @arethetypeswrong/core@0.15.1
  • hasown@2.0.2
  • tough-cookie@4.1.4
  • hosted-git-info@7.0.2
  • validate-npm-package-name@5.0.1
  • cli-table3@0.6.5
  • environment@1.1.0
  • ini@4.1.3
  • eslint-compat-utils@0.5.1
  • ws@7.5.10
  • jsonc-parser@3.3.1
  • normalize-package-data@6.0.2
  • eslint-plugin-es-x@7.8.0
  • @npmcli/git@5.0.8
  • npm-pick-manifest@9.1.0
  • @nolyfill/is-core-module@1.0.39
  • npm-package-arg@11.0.3
  • @arethetypeswrong/cli@0.15.4
  • source-map-js@1.2.1
  • @npmcli/package-json@5.2.1
  • @ts-bridge/resolver@0.2.0
  • @humanfs/core@0.19.1
  • psl@1.15.0
  • node-emoji@2.2.0
  • gopd@1.2.0
  • es-define-property@1.0.1
  • dunder-proto@1.0.1
  • math-intrinsics@1.1.0
  • es-set-tostringtag@2.1.0
  • get-proto@1.0.1
  • es-object-atoms@1.1.1
  • @ts-bridge/cli@0.6.3
  • async-function@1.0.0
  • marked-terminal@7.3.0
  • @eslint/object-schema@2.1.6
  • supports-hyperlinks@3.2.0
  • ansi-sequence-parser@1.1.3
  • call-bind-apply-helpers@1.0.2
  • async-generator-function@1.0.0
  • parse-statements@1.0.11
  • parse-imports-exports@0.2.4
  • stable-hash@0.0.5
  • nanoid@3.3.11
  • ts-api-utils@2.1.0
  • ts-declaration-location@1.0.7
  • is-bun-module@2.0.0
  • @humanwhocodes/retry@0.4.3
  • @types/estree@1.0.8
  • postcss@8.5.6
  • stable-hash-x@0.2.0
  • eslint-import-context@0.1.9
  • @eslint/config-array@0.21.0
  • eslint-plugin-import-x@4.16.1
  • @babel/helper-globals@7.28.0
  • decimal.js@10.6.0
  • @unrs/resolver-binding-android-arm-eabi@1.11.1
  • @unrs/resolver-binding-android-arm64@1.11.1
  • @unrs/resolver-binding-darwin-arm64@1.11.1
  • @unrs/resolver-binding-darwin-x64@1.11.1
  • @unrs/resolver-binding-freebsd-x64@1.11.1
  • @unrs/resolver-binding-linux-arm-gnueabihf@1.11.1
  • @unrs/resolver-binding-linux-arm-musleabihf@1.11.1
  • @unrs/resolver-binding-linux-arm64-gnu@1.11.1
  • @unrs/resolver-binding-linux-arm64-musl@1.11.1
  • @unrs/resolver-binding-linux-ppc64-gnu@1.11.1
  • @unrs/resolver-binding-linux-riscv64-gnu@1.11.1
  • @unrs/resolver-binding-linux-riscv64-musl@1.11.1
  • @unrs/resolver-binding-linux-s390x-gnu@1.11.1
  • @unrs/resolver-binding-linux-x64-gnu@1.11.1
  • @unrs/resolver-binding-linux-x64-musl@1.11.1
  • @unrs/resolver-binding-wasm32-wasi@1.11.1
  • @unrs/resolver-binding-win32-arm64-msvc@1.11.1
  • @unrs/resolver-binding-win32-ia32-msvc@1.11.1
  • @unrs/resolver-binding-win32-x64-msvc@1.11.1
  • unrs-resolver@1.11.1
  • @napi-rs/wasm-runtime@0.2.12
  • picomatch@4.0.3
  • form-data@3.0.4
  • @pkgr/core@0.2.9
  • synckit@0.11.11
  • source-map@0.7.6
  • enhanced-resolve@5.18.3
  • @jridgewell/remapping@2.3.5
  • fdir@6.5.0
  • @emnapi/wasi-threads@1.1.0
  • @emnapi/runtime@1.5.0
  • @emnapi/core@1.5.0
  • @humanfs/node@0.16.7
  • nwsapi@2.2.22
  • tinyglobby@0.2.15
  • magic-string@0.30.19
  • @tybys/wasm-util@0.10.1
  • @eslint/plugin-kit@0.4.0
  • @eslint/core@0.16.0
  • @eslint/config-helpers@0.4.0
  • ansi-escapes@7.1.1
  • @vue/compiler-core@3.5.22
  • @vue/compiler-dom@3.5.22
  • @vue/compiler-sfc@3.5.22
  • @vue/compiler-ssr@3.5.22
  • @vue/shared@3.5.22
  • generator-function@2.0.1
  • tapable@2.3.0
  • napi-postinstall@0.3.4
  • get-tsconfig@4.12.0
  • baseline-browser-mapping@2.8.16
  • @typescript-eslint/tsconfig-utils@8.46.1
  • @typescript-eslint/project-service@8.46.1
  • typescript-eslint@8.46.1
  • ms@2.1.3
  • write-file-atomic@3.0.3
  • @sinonjs/commons@1.8.6
  • source-map-support@0.5.21
  • jest-regex-util@27.5.1
  • react-is@17.0.2
  • babel-preset-jest@27.5.1
  • babel-plugin-jest-hoist@27.5.1
  • emittery@0.8.1
  • jest-changed-files@27.5.1
  • v8-to-istanbul@8.1.1
  • jest-get-type@27.5.1
  • diff-sequences@27.5.1
  • resolve.exports@1.1.1
  • jest-docblock@27.5.1
  • http-proxy-agent@4.0.1
  • @tootallnate/once@1.1.2
  • @jest/types@27.5.1
  • jest-watcher@27.5.1
  • @jest/test-result@27.5.1
  • jest-util@27.5.1
  • @jest/console@27.5.1
  • is-plain-obj@4.1.0
  • @sinonjs/fake-timers@8.1.0
  • glob@7.2.3
  • convert-source-map@1.9.0
  • function-bind@1.1.2
  • expect@27.5.1
  • jest-matcher-utils@27.5.1
  • jest-message-util@27.5.1
  • pretty-format@27.5.1
  • ts-jest@27.1.5
  • minimatch@7.4.6
  • @types/jest@27.5.2
  • @jest/core@27.5.1
  • @jest/globals@27.5.1
  • @jest/reporters@27.5.1
  • @jest/source-map@27.5.1
  • @jest/test-sequencer@27.5.1
  • @jest/transform@27.5.1
  • jest-circus@27.5.1
  • jest-config@27.5.1
  • jest-diff@27.5.1
  • jest-each@27.5.1
  • jest-environment-node@27.5.1
  • jest-haste-map@27.5.1
  • jest-leak-detector@27.5.1
  • jest-resolve-dependencies@27.5.1
  • jest-resolve@27.5.1
  • jest-runner@27.5.1
  • jest-runtime@27.5.1
  • jest-snapshot@27.5.1
  • jest-validate@27.5.1
  • jest-worker@27.5.1
  • babel-jest@27.5.1
  • jest@27.5.1
  • jest-cli@27.5.1
  • @jest/environment@27.5.1
  • @jest/fake-timers@27.5.1
  • jest-mock@27.5.1
  • @cspotcode/source-map-support@0.8.1
  • v8-compile-cache-lib@3.0.1
  • npm-normalize-package-bin@3.0.1
  • which@1.3.1
  • comment-parser@1.4.1
  • punycode@2.3.1
  • @types/json-schema@7.0.15
  • @types/graceful-fs@4.1.9
  • @types/babel__core@7.20.5
  • @types/yargs@16.0.9
  • typescript@5.3.3
  • ts-node@10.9.2
  • file-entry-cache@8.0.0
  • has-tostringtag@1.0.2
  • @jridgewell/resolve-uri@3.1.2
  • flat-cache@4.0.1
  • @npmcli/run-script@8.1.0
  • @npmcli/promise-spawn@7.0.2
  • bin-links@4.0.4
  • jsdoc-type-pratt-parser@4.1.0
  • escalade@3.2.0
  • @metamask/eslint-config@14.0.0
  • @metamask/eslint-config-nodejs@14.0.0
  • @metamask/eslint-config-typescript@14.0.0
  • @metamask/eslint-config-jest@14.0.0
  • picocolors@1.1.1
  • @eslint-community/regexpp@4.12.1
  • eslint-plugin-promise@7.2.1
  • has-symbols@1.1.0
  • jsesc@3.1.0
  • resolve@1.22.10
  • is-core-module@2.16.1
  • fast-glob@3.3.3
  • cjs-module-lexer@1.4.3
  • globals@15.15.0
  • globals@14.0.0
  • flatted@3.3.3
  • update-browserslist-db@1.1.3
  • @yarnpkg/types@4.0.1
  • git-hooks-list@4.1.1
  • @eslint/eslintrc@3.3.1
  • eslint-import-resolver-typescript@3.10.1
  • @babel/helper-string-parser@7.27.1
  • @babel/helper-validator-identifier@7.27.1
  • @babel/code-frame@7.27.1
  • @babel/helper-validator-option@7.27.1
  • @babel/helper-module-imports@7.27.1
  • type-fest@4.41.0
  • @babel/helper-compilation-targets@7.27.2
  • @babel/template@7.27.2
  • @es-joy/jsdoccomment@0.50.2
  • ignore@5.3.2
  • ignore@7.0.5
  • acorn@8.15.0
  • acorn@7.4.1
  • eslint-visitor-keys@4.2.1
  • eslint-visitor-keys@3.4.3
  • eslint-scope@8.4.0
  • espree@10.4.0
  • eslint-plugin-jsdoc@50.8.0
  • eslint-plugin-jest@28.14.0
  • sort-package-json@3.4.0
  • eslint-config-prettier@9.1.2
  • prettier-plugin-packagejson@2.5.19
  • @types/babel__traverse@7.28.0
  • eslint-plugin-prettier@5.5.4
  • @jridgewell/gen-mapping@0.3.13
  • @jridgewell/sourcemap-codec@1.5.5
  • @babel/generator@7.28.3
  • @babel/helper-module-transforms@7.28.3
  • @lavamoat/aa@4.3.4
  • @babel/compat-data@7.28.4
  • @babel/core@7.28.4
  • @babel/traverse@7.28.4
  • @babel/types@7.28.4
  • @babel/parser@7.28.4
  • @babel/helpers@7.28.4
  • @eslint-community/eslint-utils@4.9.0
  • chalk@5.6.2
  • ansi-regex@6.2.2
  • @jridgewell/trace-mapping@0.3.31
  • @jridgewell/trace-mapping@0.3.9
  • debug@4.4.3
  • detect-indent@7.0.2
  • eslint-plugin-n@17.23.1
  • @lavamoat/allow-scripts@3.4.0
  • get-intrinsic@1.3.1
  • browserslist@4.26.3
  • @eslint/js@9.37.0
  • eslint@9.37.0
  • node-releases@2.0.23
  • semver@7.7.3
  • @types/node@18.19.130
  • caniuse-lite@1.0.30001750
  • @typescript-eslint/parser@8.46.1
  • @typescript-eslint/scope-manager@8.46.1
  • @typescript-eslint/types@8.46.1
  • @typescript-eslint/typescript-estree@8.46.1
  • @typescript-eslint/visitor-keys@8.46.1
  • @typescript-eslint/eslint-plugin@8.46.1
  • @typescript-eslint/type-utils@8.46.1
  • @typescript-eslint/utils@8.46.1
  • electron-to-chromium@1.5.237

View full report

Mrtenz
Mrtenz previously approved these changes Oct 15, 2025
@rekmarks
Copy link
Copy Markdown
Member Author

@SocketSecurity ignore-all

It's all core monorepo / module template dependencies.

@rekmarks rekmarks enabled auto-merge (squash) October 15, 2025 18:26
@rekmarks rekmarks merged commit fde4083 into main Oct 15, 2025
15 checks passed
@rekmarks rekmarks deleted the rekm/sync-module-template branch October 15, 2025 18:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linting configuration is out of date with the module template ESM-compatible builds are not being generated

2 participants