Repository navigation
Delete logo, update readme - #315
Merged
Merged
Conversation
Mrtenz
pushed a commit
that referenced
this pull request
Oct 16, 2025
Bumps the npm_and_yarn group with 3 updates in the / directory: [braces](https://github.com/micromatch/braces), [tar](https://github.com/isaacs/node-tar) and [ws](https://github.com/websockets/ws). Updates `braces` from 3.0.2 to 3.0.3 - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md) - [Commits](micromatch/braces@3.0.2...3.0.3) Updates `tar` from 6.1.15 to 6.2.1 - [Release notes](https://github.com/isaacs/node-tar/releases) - [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md) - [Commits](isaacs/node-tar@v6.1.15...v6.2.1) Updates `ws` from 7.5.9 to 7.5.10 - [Release notes](https://github.com/websockets/ws/releases) - [Commits](websockets/ws@7.5.9...7.5.10) --- updated-dependencies: - dependency-name: braces dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: tar dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: ws dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com>
Mrtenz
pushed a commit
to Mrtenz/core
that referenced
this pull request
Jun 17, 2026
* 8.1.0 * Update CHANGELOG.md --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Daniel <80175477+dan437@users.noreply.github.com>
Naz-Ovh
pushed a commit
to 0x-fork/metamask-core
that referenced
this pull request
Sep 13, 2026
Bottom of stack MetaMask#315. Core formats with Oxfmt, so once this package moves into `packages/` its files get reformatted anyway. Doing it here keeps that diff reviewable instead of landing as noise on top of the migrated git history. - `lint:misc` switches from Prettier to `oxfmt --ignore-path .gitignore` - Adds `.oxfmtrc.json`, copied from core - Turns off `prettier/prettier` and `import/order`, same as core - Drops `prettier-plugin-packagejson`, replaced by Oxfmt's `sortPackageJson` Prettier itself stays, and moves to core's versions, because `@metamask/eslint-config@15` peer requires all three: | Dep | From | To | | --- | --- | --- | | `prettier` | `^2.7.1` | `^3.3.3` | | `eslint-config-prettier` | `^8.8.0` | `^9.1.0` | | `eslint-plugin-prettier` | `^4.2.1` | `^5.2.1` | Reformatting touches `README.md`, `src/json.ts` and `src/__fixtures__/bytes.ts`. No content changes.
Naz-Ovh
pushed a commit
to 0x-fork/metamask-core
that referenced
this pull request
Sep 13, 2026
…k#318) Top of stack MetaMask#315, on MetaMask#317. | Dep | From | To | | --- | --- | --- | | `typedoc` | `^0.23.15` | `^0.25.13` | | `@lavamoat/preinstall-always-fail` | `^1.0.0` | `^2.1.0` | | `jest-when` | `^3.6.0` | `^3.7.0` | The typedoc bump fixes a live break. typedoc 0.23 caps at TypeScript 5.0, so once MetaMask#311 moved us to `~5.3.3`, `yarn build:docs` crashed with `Cannot read properties of undefined (reading 'name')`. Nothing caught it because PR CI never runs `build:docs`, only the docs publish workflow does. Also `.nvmrc` `v18` to `lts/*`, and `@ts-bridge/*` added to `npmPreapprovedPackages`. Both match core. Left alone on purpose: - `oxfmt` stays at `^0.44.0` even though `@metamask/auto-changelog@6.2.1` peer requests `^0.45.0`. Core pins the same pair, so bumping would diverge from it. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Dev-only dependency and Node version pin changes; no runtime library or security-sensitive application logic is modified. > > **Overview** > Aligns **dev tooling** with MetaMask core: bumps **`typedoc`** to `^0.25.13` (and lockfile transitive deps like `marked`, `shiki`, `minimatch`) so **`yarn build:docs`** works with **`typescript ~5.3.3`**—older typedoc only supported TS ≤5.0 and was failing at doc generation. > > Also updates **`@lavamoat/preinstall-always-fail`** to `^2.1.0` and **`jest-when`** to `^3.7.0`, and switches **`.nvmrc`** from `v18` to **`lts/*`** so local Node tracks current LTS like core. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 654f1e29169b87c50b78f916d2ae5cef30bca178. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Naz-Ovh
pushed a commit
to 0x-fork/metamask-core
that referenced
this pull request
Sep 13, 2026
Top of stack MetaMask#315, on MetaMask#320. Last of the PR#2 bumps. | Dep | From | To | | --- | --- | --- | | `@ethereumjs/tx` | `^4.2.0` | `^5.4.0` | ## This is not breaking, but only because of a one word change The bump compiles with **no source change at all**, which is the trap. `@ethereumjs/tx@5` reuses the name `TxData` for something entirely different: ```ts // v4 interface TxData { nonce?, gasPrice?, gasLimit?, to?, value?, data?, v?, r?, s? } // v5 interface TxData { [TransactionType.Legacy]: LegacyTxData; [TransactionType.AccessListEIP2930]: AccessListEIP2930TxData; ... } ``` v4's meaning is now called `LegacyTxData`. `keyring.ts` declares `signTransaction` as returning `Promise<TxData>`, so bumping alone would silently change that public type from "a signed legacy transaction" into "an object carrying every transaction type at once", **and still build clean**. Typechecking a v4 era consumer against the unpatched build confirms it: ``` Type '{ nonce, gasPrice, gasLimit, to, value, data, v, r, s }' is missing the following properties from type 'TxData': [TransactionType.Legacy], [TransactionType.AccessListEIP2930], ... ``` Mapping `TxData` to `LegacyTxData` restores the original contract exactly, and that same consumer typechecks again. `TypedTxData` would also accept it, but it is a union, so callers would have to narrow the result. `LegacyTxData` keeps the API identical to v4. Note `Keyring` is already deprecated in favour of `@metamask/keyring-utils`, so the blast radius is small either way. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Touches transaction typing on a deprecated but public Keyring API; the explicit LegacyTxData fix avoids a silent type break, but downstream packages must align with @ethereumjs/tx v5. > > **Overview** > Upgrades **`@ethereumjs/tx`** from `^4.2.0` to **`^5.4.0`** (with transitive bumps to `@ethereumjs/common`, `util`, `rlp`, and related crypto packages in the lockfile). > > Because v5 redefines **`TxData`** as a per–transaction-type map instead of a single legacy field bag, the deprecated **`Keyring.signTransaction`** return type is updated from **`Promise<TxData>`** to **`Promise<LegacyTxData>`**, preserving the same runtime shape and v4-era TypeScript contract for consumers. No implementation changes are required for keyring authors. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 7d78cba6bd39fe6ca5bac998677718f953aec580. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Naz-Ovh
pushed a commit
to 0x-fork/metamask-core
that referenced
this pull request
Sep 13, 2026
Top of stack MetaMask#315, on MetaMask#321. `yarn test:types` runs bare `tsd`, which finds **no test files at all**. It produces no output and exits 0 regardless, so the 460 lines of type assertions across `src/*.test-d.ts` have not been checking anything. Proof, before this change: ``` $ printf 'expectAssignable<Hex>(999);' >> src/hex.test-d.ts $ yarn test:types $ echo $? 0 ``` Pointing tsd at the files explicitly reports it properly and exits 1: ``` ✖ Argument of type 999 is not assignable to parameter of type `0x${string}`. ``` ## Cause tsd resolves test files relative to the `types` field, which has pointed at `./dist/index.d.cts` since ts-bridge was adopted in MetaMask#182 (2024-04-23). tsd 0.29 does not resolve `.d.cts`, and the `tsd.directory` setting does not compensate. **26 releases** have shipped since, all with this check silently passing. ## Fix ```diff - "test:types": "tsd" + "test:types": "tsd --files 'src/*.test-d.ts'" ``` Fixing the invocation rather than the `types` field, since the field is correct for consumers and only tsd is confused by it. All four files pass once actually executed, so none of them needed changing. `yarn test:types` now exits 1 on a bad assertion and 0 when clean. ## Relevance to the migration This was found while working out what to do with tsd in Phase B, since core has no way to run it. Worth knowing the honest baseline before deciding: these assertions have been dormant for 17 months, so whatever we do with them in core, we are not losing coverage we currently have. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Only the npm script for type testing changed; runtime package behavior and public types are unchanged. > > **Overview** > **`yarn test:types` was a no-op:** bare `tsd` never picked up the `src/*.test-d.ts` suites (because of how it resolves files vs the package `types` entry), so type assertions could fail silently while CI still exited 0. > > The script now runs **`tsd --files 'src/*.test-d.ts'`**, so those assertions actually execute and **`yarn test:types` fails when a type check is wrong**. No changes to the test files themselves were required once they were being run. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit b934063cc9e2ede2681fbc74c00c571deb68ebbe. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Naz-Ovh
pushed a commit
to 0x-fork/metamask-core
that referenced
this pull request
Sep 13, 2026
Top of stack MetaMask#315, on MetaMask#322. Core is moving to an ESM only monorepo ([MetaMask#9536](MetaMask#9536)), so this package should arrive already converted rather than landing as the only hybrid one in it. ## Breaking `require('@metamask/utils')` now fails with `ERR_REQUIRE_ESM`. `main` and `module` are gone, and both `.` and `./node` resolve through `exports` to a single `./dist/*.js` with `./dist/*.d.ts` types. Consumers already using `import` are unaffected. | | Before | After | | --- | --- | --- | | build | `ts-bridge` | `tsc` | | output | `.cjs` + `.mjs` + `.d.cts` + `.d.mts` | `.js` + `.d.ts` | | `@ts-bridge/cli` | yes | removed (`rimraf` added for cleaning) | `ts-bridge` exists to emit both formats, so it goes with the CJS half. ## Import specifiers 102 relative specifiers across 45 files gained explicit `.js` extensions, which ESM requires; directories resolve to `/index.js`. Core's sources already look like this and enforce it with `n/file-extension-in-import`, so the same three import rules are adopted here verbatim. ## Two things only the built output revealed Neither would have been caught by the test suite, because tests run against `src/`: - **`lodash`** — `import { memoize } from 'lodash'` throws at runtime under ESM: Node's lexer cannot see named exports through lodash's CJS. Switched to `lodash/memoize.js`, a default import of the single method. Core hit the same wall and solved it with `lodash-es` plus a jest `moduleNameMapper`; this approach needs neither. - **`@metamask/scure-bip39`** — the deep wordlist import needed an explicit `.js`. Every other CJS dependency survives named imports untouched. `semver`, `@metamask/superstruct`, `@scure/base`, `@noble/hashes` and `pony-cause` all have lexer friendly CJS. Verified by importing all 27 built modules individually, plus the exports map by bare specifier. ## Tooling `jest.config.js` and `.prettierrc.js` are renamed to `.cjs`, since `"type": "module"` makes bare `.js` files ESM. Tests still compile to CommonJS via a ts-jest `transform` override (matching core) with a `moduleNameMapper` stripping the `.js` specifiers back off. `constraints.pro` is rewritten for the single entrypoint shape. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **High Risk** > Dropping CommonJS and changing the public export map is a breaking integration change for any consumer still on `require()` or dual-package resolution, despite unchanged utility APIs. > > **Overview** > **Breaking:** The package is now **ESM-only** (`"type": "module"`). `main` / dual `import`/`require` exports are removed; `.` and `./node` resolve to single `./dist/*.js` + `./dist/*.d.ts`. Plain `require('@metamask/utils')` fails with `ERR_REQUIRE_ESM` unless consumers use Node 22+ `require(esm)` or dynamic import (noted in `CHANGELOG.md`). > > **Build & publish:** Output moves from `ts-bridge` dual **`.cjs`/`.mjs`** artifacts to **`tsc`-emitted `.js`** (see `tsconfig.build.json` — declarations are emitted with JS, not declaration-only). `@ts-bridge/*` is dropped; **`rimraf`** and `build:clean` handle dist cleanup. Yarn **`constraints.pro`** enforces the new export shape. > > **Sources:** Relative imports across `src/` use explicit **`.js`** specifiers (ESLint **`n/file-extension-in-import`** aligned with core). Runtime fixes for ESM: **`hex.ts`** uses `lodash/memoize.js` (default import) instead of `{ memoize } from 'lodash'`; **`mnemonic.ts`** adds `.js` on the deep `@metamask/scure-bip39` wordlist path. > > **Tooling:** Jest stays on **CommonJS** for tests via `ts-jest` override and a **`moduleNameMapper`** that strips `.js` from relative paths; config stays **`.cjs`** under `"type": "module"`. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 7c27d331053eb210347e8151885a9476ef0b2380. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Naz-Ovh
pushed a commit
to 0x-fork/metamask-core
that referenced
this pull request
Sep 13, 2026
Top of stack MetaMask#315, on MetaMask#324. Mirrors [MetaMask#9518](MetaMask#9518). | | Before | After | | --- | --- | --- | | `packageManager` | `yarn@4.16.0` | `yarn@4.17.1` | | `typescript` | `~5.3.3` | `npm:@typescript/typescript6@^6.0.2` | | `@typescript/native` | — | `npm:typescript@^7.0.2` | ## Why not just bump to TypeScript 7 I tried that first. It fails for two independent reasons: **1. Yarn.** 4.16.0 auto-applies a builtin `compat/typescript` patch targeting `lib/_tsc.js`. That file doesn't exist in TS 7, which is the native port with a different layout, so the install fails outright: ``` typescript@patch:typescript@npm%3A7.0.2#optional!builtin<compat/typescript> ENOENT: no such file or directory, lstat '.../typescript/lib/_tsc.js' ``` Yarn 4.17.1 resolves it, which is why core bumps the package manager in the same PR. **2. typescript-eslint.** With the install fixed, linting then hard-errors: ``` typescript-eslint does not support TS 7.0. Please see ... to run typescript-eslint using the TS 6 API. ``` Tracked upstream at [typescript-eslint#10940](typescript-eslint/typescript-eslint#10940). So the aliases aren't incidental overhead. Resolving `typescript` to the **TS 6 API** is what keeps `typescript-eslint`, `ts-jest` and `typedoc` working, while TS 7 sits alongside as `@typescript/native`. Compilation runs on 6.0.3; nothing in the toolchain can consume 7 yet. Same position core is in. ## Source changes Two, both from `Uint8Array` becoming generic: - **`hashing.ts`** — `crypto.subtle.digest` takes a `BufferSource`, which no longer accepts a plain `Uint8Array` because the buffer could be a `SharedArrayBuffer`. Asserted at the three call sites rather than narrowing the exported signatures, which would break callers. - **`errors.ts`** — `no-base-to-string` now sees that `String(error)` can produce `[object Object]`. That is the documented fallback of `getErrorMessage`, so it's suppressed with a reason. ## Not carried over Core's third entry, `@typescript/old`, is a patched 6.0.3 pointing at a patch file in core's own `.yarn/patches`. Nothing here needs it and its contents aren't reproducible from outside that repo. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Toolchain-wide TypeScript/Yarn changes can surface build or lint regressions; hashing changes touch crypto paths but preserve digest output via the noble fallback. > > **Overview** > Aligns the repo with MetaMask core’s **TypeScript 6 + native TS 7** setup: **`typescript`** resolves to **`@typescript/typescript6@^6.0.2`** (so **typescript-eslint**, **ts-jest**, and **typedoc** keep working), adds **`@typescript/native`** (TS 7) alongside, bumps **Yarn** to **4.17.1**, and refreshes the lockfile. > > **Jest/ts-jest** gets **`ignoreDeprecations: '6.0'`** so test compilation can keep **`moduleResolution: 'Node'`** under TS 6 without noise. > > Two small **source** fixes for stricter TS 6 types: **`hashing.ts`** only calls **`crypto.subtle.digest`** when input bytes are backed by an **`ArrayBuffer`** (otherwise **noble**), avoiding runtime errors on **`SharedArrayBuffer`** views while keeping public APIs unchanged. **`getErrorMessage`** adds a targeted **`no-base-to-string`** suppression for the intentional **`String(error)`** fallback. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit aac3fa43658ca1e6db082bd80fb06d132caf6fc6. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gaba