Open
Conversation
|
No dependency changes detected. Learn more about Socket for GitHub. 👍 No dependency changes detected in pull request |
cecd222 to
2fedf47
Compare
Contributor
✨ Files requiring CODEOWNER review ✨👨🔧 @MetaMask/core-extension-ux (12 files, +68 -68)
|
2fedf47 to
dbf2339
Compare
dbf2339 to
5d18c91
Compare
5d18c91 to
d09256a
Compare
d09256a to
cd2483e
Compare
cd2483e to
dd9bd02
Compare
dd9bd02 to
fa20e9d
Compare
fa20e9d to
8ddb071
Compare
Configure all build systems to resolve ~/ui and ~/shared aliases: - tsconfig.json: paths for ~/ui/* and ~/shared/* - webpack: resolve.alias entries - browserify: pathmodify plugin in build pipeline - jest: moduleNameMapper in unit and integration configs - storybook: resolve.alias in webpack config - depcheck: ignore aliases in dependency check No existing imports are changed. Both relative and aliased imports work simultaneously, enabling gradual opt-in adoption. Co-authored-by: Francis Nepomuceno <n3ps@users.noreply.github.com>
8ddb071 to
28db9a9
Compare
28db9a9 to
3e771b3
Compare
Contributor
Builds ready [3e771b3]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
3e771b3 to
f468bef
Compare
f468bef to
bed6d2b
Compare
bed6d2b to
883d750
Compare
883d750 to
2ff6735
Compare
Contributor
Builds ready [2ff6735]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Configure all build systems to resolve ~/ui and ~/shared aliases: - tsconfig.json: paths for ~/ui/* and ~/shared/* - webpack: resolve.alias entries - browserify: custom babel plugin (development/build/transforms/import-alias.js) - jest: moduleNameMapper in unit and integration configs - storybook: resolve.alias in webpack config - depcheck: ignore alias prefix in dependency check The babel plugin rewrites ~/ui/foo and ~/shared/foo to relative paths during transpilation. No fs access needed, so LavaMoat is unaffected. No existing imports are changed. Both relative and aliased imports work simultaneously, enabling gradual opt-in adoption. Co-authored-by: Francis Nepomuceno <n3ps@users.noreply.github.com>
2ff6735 to
8f6a7c8
Compare
8f6a7c8 to
6980d20
Compare
Convert 47 deep relative imports to aliases across all 12 activity-v2 files. Sibling/parent imports remain relative. Co-authored-by: Francis Nepomuceno <n3ps@users.noreply.github.com>
6980d20 to
14be0c3
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
|
Contributor
Builds ready [14be0c3]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
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.



Description
Introduces import aliases to replace deep relative paths like
../../../some-directory/....Why
For this first phase, adding these aliases:
~/sharedand~/uiand updated the Activity components as reference example.Once migrated circular dependencies are easier to spot because the import direction is explicit.
Configuration:
pathsresolve.aliasmoduleNameMapperChangelog
CHANGELOG entry: feat: import aliases
Related issues
Fixes:
Manual testing steps
N/A
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Touches module resolution across Babel/browserify, webpack, Storybook, TypeScript, and Jest; misconfiguration could break builds or tests in non-obvious ways despite being largely a path-rewrite/refactor change.
Overview
Adds first-class import aliases
~/uiand~/sharedacross the toolchain (TypeScriptpaths, webpack + Storybookresolve.alias, JestmoduleNameMapper) and updates depcheck ignores for the~pseudo-package.Introduces a custom Babel transform (
development/build/transforms/import-alias.js+ tests) to rewrite these aliases to relative paths for browserify, and migrates the multichain Activity v2 components/tests to use the new alias imports instead of deep relative paths.Written by Cursor Bugbot for commit 14be0c3. This will update automatically on new commits. Configure here.