-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Replace local code fence transform with @metamask/build-utils
#7972
Conversation
E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/57586e03-9b32-40a9-83e3-33878c35cd48 |
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7972 +/- ##
==========================================
- Coverage 36.60% 36.46% -0.15%
==========================================
Files 1092 1091 -1
Lines 29178 29076 -102
Branches 2677 2677
==========================================
- Hits 10681 10602 -79
+ Misses 17885 17862 -23
Partials 612 612 ☔ View full report in Codecov by Sentry. |
@metamask/build-utils
@metamask/build-utils
- Migrate code fence removal from local to package implementation - Delete local code fence implementation, tests, and mocks
@SocketSecurity ignore source-map@0.7.3 |
b951658
to
36a0278
Compare
E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/6e8aeea0-8863-4c52-ae64-92cc5b413304 |
## **Description** In MetaMask/metamask-mobile#7734, code fence support was added to MetaMask Mobile by essentially copypasting the implementation from the extension. This PR replaces the local code fence implementation with a version that was extracted into its own package. The external package implements code fence parsing and removal, as well as linting transformed files. The consumer is responsible for integrating the fence parser into the given build system, and configuring the ESLint instance used for linting. Consequently, the following remains in this repository after extracting the fence parsers: - `RemoveFencedCodeTransform`, a transform stream compatible with Browserify - A utility for configuring and initializing a singleton ESLint instance The PR is deceptively large; most changes are due to renaming existing fences. For reviewers, the relevant files are: - `development/build/transforms/*` - `lavamoat/build-system/policy.json` ## **Related issues** - MetaMask/core#3577 - MetaMask/metamask-mobile#7972 ## **Manual testing steps** 1. Create different builds of the extension and verify that they are working and include the correct features --------- Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Great job decoupling this feature from clients.
Description
In #7734, code fence support was added to MetaMask Mobile by essentially copypasting the implementation from the extension. This PR replaces the local code fence implementation with a version that was extracted into its own package.
The external package implements code fence parsing and removal, as well as linting transformed files. The consumer is responsible for integrating the fence parser into the given build system, and configuring the ESLint instance used for linting. Consequently, only the Metro transform and the ESLint instance initialization remain in this repository.
Related issues
@metamask/build-utils
package core#3577@metamask/build-utils
metamask-extension#22033Manual testing steps
Pre-merge reviewer checklist