Skip to content

chore: reset the migrated @metamask/utils changelog - #10178

Merged
cryptodev-2s merged 1 commit into
mainfrom
chore/utils-reset-changelog
Sep 11, 2026
Merged

cryptodev-2s merged 1 commit into
mainfrom
chore/utils-reset-changelog

Conversation

@cryptodev-2s

@cryptodev-2s cryptodev-2s commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Explanation

Second step of migrating @metamask/utils, following the package migration process guide (PR#7 of Phase B).

The migrated package arrived with the full changelog from its old repo, covering 59 releases up to 12.0.0. Releases from here on are made from this repo, so that history no longer belongs in this file. It is reset to a fresh changelog with a single Unreleased entry recording the migration and linking to the original, which stays available in MetaMask/utils.

No code changes.

References

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
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Low Risk
Documentation-only changelog edit with no code or dependency changes.

Overview
Resets merged-packages/utils/CHANGELOG.md for post-migration releases in MetaMask/core, replacing the copied history (59 releases through 12.0.0) and version footer links with a minimal [Unreleased] section.

The new entry records the move from MetaMask/utils (#10175) and points readers to the original changelog for prior releases. The [Unreleased] compare link now targets MetaMask/core instead of the old repo.

No runtime or API changes—changelog maintenance only.

Reviewed by Cursor Bugbot for commit e103757. Bugbot is set up for automated code reviews on this repo. Configure here.

@mcmire mcmire left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@cryptodev-2s
cryptodev-2s force-pushed the chore/utils-reset-changelog branch from 82585fc to e103757 Compare September 11, 2026 06:49
@cryptodev-2s
cryptodev-2s added this pull request to the merge queue Sep 11, 2026
Merged via the queue into main with commit 2d9cb28 Sep 11, 2026
335 checks passed
@cryptodev-2s
cryptodev-2s deleted the chore/utils-reset-changelog branch September 11, 2026 07:02
pull Bot pushed a commit to Reality2byte/core that referenced this pull request Sep 11, 2026
…aMask#10179)

## Explanation

Third step of migrating `@metamask/utils` (PR#8 of Phase B in the
[migration process
guide](https://github.com/MetaMask/core/blob/main/docs/processes/package-migration-process-guide.md)).

The package arrived from its own repo carrying a full set of repo level
tooling. This monorepo owns all of it centrally, so those files are
removed: `.github/`, `.yarn/`, `.yarnrc.yml`, `yarn.lock`, `scripts/`,
`eslint.config.mjs`, `knip.config.mts`, `constraints.pro`, and the
`.editorconfig`, `.gitattributes`, `.gitignore`, `.nvmrc`,
`.oxfmtrc.json` and `.prettierrc.cjs` dotfiles.

I checked each one before removing it: the root has an equivalent for
every file except `constraints.pro`, which has no counterpart because
this repo uses `yarn.config.cjs` instead. No package under `packages/`
carries its own copy of any of them.

What remains is the guide's keep list: `src/`, `CHANGELOG.md`,
`LICENSE`, `package.json`, `README.md`, `jest.config.cjs`,
`tsconfig*.json` and `typedoc.json`. There is no `tests/` directory
because this package keeps its tests alongside the sources.

Deletions only, no code changes. This also clears the zizmor and Socket
alerts on MetaMask#10175, which came from the migrated workflow files and
lockfile.

## References

- Follows MetaMask#10175 (git history migration) and MetaMask#10178 (changelog reset)

## 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

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Deletion-only cleanup of duplicate config and CI; no application logic
changes, though contributors must use root workflows until follow-up
wiring is confirmed.
> 
> **Overview**
> Removes **standalone repository infrastructure** from
`merged-packages/utils` now that `@metamask/utils` lives in the core
monorepo. The package no longer ships its own CI (`.github/` workflows,
Dependabot, CODEOWNERS), Yarn setup (`.yarnrc.yml`, plugins, patches,
lockfile-related config), lint/format configs (`eslint.config.mjs`,
`.oxfmtrc.json`, `.prettierrc.cjs`), `knip.config.mts`,
`constraints.pro`, release/build scripts under `scripts/`, and standard
dotfiles (`.gitignore`, `.editorconfig`, etc.).
> 
> **No runtime or library code changes**—only deletions. Package sources
and the migration keep list (`src/`, tests alongside sources,
`package.json`, `tsconfig*`, `jest.config.cjs`, docs/changelog) stay in
place; build, test, lint, constraints, and publishing are expected to
run from **monorepo root** tooling instead.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
ecdf798. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
pull Bot pushed a commit to Reality2byte/core that referenced this pull request Sep 11, 2026
## Explanation

Phase C of migrating `@metamask/utils`, following [the package migration
process
guide](https://github.com/MetaMask/core/blob/main/docs/processes/package-migration-process-guide.md).
This moves the package from `merged-packages/` into `packages/` and
wires it into the monorepo.

- `merged-packages/utils` → `packages/utils`, registered as a workspace
- Reference paths added to the root `tsconfig.json`,
`tsconfig.build.json` and `tsconfig.lint.json`
- The version bump for dependents is split into a follow up (MetaMask#10192) to
keep this diff reviewable. This PR adds a temporary `@metamask/utils`
entry to `ALLOWED_INCONSISTENT_DEPENDENCIES` in `yarn.config.cjs` so
constraints pass while dependents are still on the published version;
MetaMask#10192 removes it. The two are meant to land together.
- Downstream tsconfig references added via `yarn lint:tsconfigs:fix:all`
(174 files). Without them `yarn lint:tsc` reported 536 errors; it is now
clean
- `yarn constraints --fix` applied, which split the test scripts into
`test:unit` and `test:types`
- CODEOWNERS entry added through `codeowners.ts` and `teams.json`,
assigning the package to `@MetaMask/core-platform` as with the other
foundational packages
- README package list and dependency graph regenerated with `yarn
readme-content:update`

### Type tests moved from `tsd` to `tstyche`

The package's type tests import from source (`./index.js`, `./misc.js`),
so they never needed built declarations. `tsd` requires a typings file
as a structural precondition regardless, which forced a build purely to
satisfy the tool. `tstyche` type checks source directly and is already
used by `@metamask/messenger`, so the four `*.test-d.ts` files are now
`*.tst.ts`, with all 120 assertions preserved.

That removed three workarounds: a `composite: false` override for `tsd`,
a `--typings` flag, and the `*.test-d.ts` exclusion in
`tsconfig.lint.json`. That last one existed because `tsd`'s own types
pull in `lib="esnext"`, widening built in types like `ReadonlySet` past
this package's target. With that gone the type tests are covered by
`lint:tsc` rather than excluded from it, and `tsd` leaves the lockfile
entirely.

### Root tooling now resolves the package from source

Nine files at the repository root import `@metamask/utils`, which
previously arrived prebuilt from npm. As a workspace its `dist` does not
exist until something builds it, and the lint jobs do not build, so
`constraints`, `lint:teams` and `lint:tsconfigs:all` all failed on a
fresh checkout.

Adding a `paths` entry to the root `tsconfig.json` fixes the scripts.
`yarn.config.cjs` is the exception, since Yarn loads it as plain
CommonJS where `paths` do not apply and a `.ts` file cannot be required.
It only used `hasProperty`, whose runtime body is a single expression,
so it now calls `Object.hasOwn` directly. That is available on every
supported Node version.

All of the following pass with no build artifacts present:
`constraints`, `lint:teams`, `lint:tsconfigs:all`,
`readme-content:check`, `codeowners:check`, `lint:tsc`,
`lint:misc:check`, and the package's own tests.

### Inherited lint findings

86 pre-existing findings in the package, mostly `no-explicit-any` in
tests, are recorded in `eslint-suppressions.json` rather than fixed
here, matching how this repo tracks that debt. They came from rules the
package's own ESLint config had disabled before the migration.

## References

- Follows MetaMask#10175, MetaMask#10178, MetaMask#10179, MetaMask#10180, MetaMask#10181 and MetaMask#10182
- Migration process guide:
`docs/processes/package-migration-process-guide.md`

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] 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

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Wide monorepo integration touches build graphs and resolution for a
foundational dependency; temporary dual resolution (workspace v12 vs
published v11) must land with the follow-up bump to avoid inconsistent
runtime/types.
> 
> **Overview**
> **`@metamask/utils` is now a workspace package at `packages/utils`
(v12.0.0)** instead of living under `merged-packages/` or npm-only. Repo
metadata, CODEOWNERS/`teams.json`, README list/graph, and root
`tsconfig` project references are updated so the package builds and
lints with the rest of core.
> 
> **Monorepo wiring:** Jest and root/script `tsconfig` paths resolve
`@metamask/utils` (and `/node`) to **TypeScript source** so tests and
lint work without a prior build. Package `tsconfig` references to
`../utils` were added across dependents. **`tsconfig.packages.json`
still maps `@metamask/utils` to published v11 in `node_modules`** until
a follow-up bumps dependents; `yarn.config.cjs` temporarily allows that
version skew and drops the `@metamask/utils` import in favor of
**`Object.hasOwn`**.
> 
> **Package tooling:** Type tests move from **`tsd` (`*.test-d.ts`) to
`tstyche` (`*.tst.ts`)**; build excludes `*.tst.ts`. Unused
**`@metamask/utils` dependencies are removed** from a few packages (e.g.
messenger, ai-controllers). Pre-existing ESLint issues in
`packages/utils` are **recorded in `eslint-suppressions.json`**. Stale
**`merged-packages/utils`** type-test and lint config files are removed.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
dd04556. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants