refactor: add .js import extensions to Assets packages#9580
Merged
Conversation
Mrtenz
force-pushed
the
mrtenz/esm-import-extensions-assets
branch
3 times, most recently
from
July 23, 2026 09:25
5df20bb to
6807c8d
Compare
Mrtenz
enabled auto-merge
July 23, 2026 09:33
salimtb
previously approved these changes
Jul 23, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Jul 23, 2026
Mrtenz
force-pushed
the
mrtenz/esm-import-extensions-assets
branch
from
July 23, 2026 09:40
6807c8d to
864eb1c
Compare
Mrtenz
enabled auto-merge
July 23, 2026 09:41
salimtb
approved these changes
Jul 23, 2026
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.
Summary
This PR adds
.jsimport extensions to all relative imports in the Assetspackages, in preparation for the ESM refactor.
The ESLint rule that enforces this (
n/file-extension-in-import+import-x/extensions) has been added for these packages ineslint.config.mjs.Packages
@metamask/assets-controller@metamask/assets-controllers@metamask/network-enablement-controllerNote
Low Risk
Mechanical import-path and tooling updates only; no auth, data, or runtime behavior changes, though the large touch surface means build/test breakage if any path was missed.
Overview
Prepares @metamask/assets-controller, @metamask/assets-controllers, and @metamask/network-enablement-controller for ESM by appending
.jsto relative import/export paths across source and tests (including barrels likeutils/index.jsanddata-sources/index.js). No controller or business logic changes.ESLint now applies
n/file-extension-in-importto those three asset-related package globs (plus the newly listed network-enablement-controller entry). Messenger action type scripts in both assetspackage.jsonfiles gain--esmso generated types use.jsspecifiers (e.g.AssetsController.js).Reviewed by Cursor Bugbot for commit 864eb1c. Bugbot is set up for automated code reviews on this repo. Configure here.