This repository has been archived by the owner on Jun 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
Conversation
This file contains 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
rekmarks
commented
Dec 24, 2021
Comment on lines
+9
to
11
// Remove anonymous arrow function wrapper injected by mm-snap | ||
bundleString = bundleString.replace(/\(\) => \(\n/u, ''); | ||
bundleString = bundleString.slice(0, bundleString.lastIndexOf('\n)')); |
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.
I don't think we do this anymore, worth looking at.
@rekmarks Here is the fix for stripping comments https://github.com/MetaMask/snaps-skunkworks/pull/187/files |
rekmarks
added a commit
to MetaMask/snaps
that referenced
this pull request
Jan 7, 2022
### Description Based on the discussion ChainSafe/filsnap#88 and some further investigation, I realized that the problem origin is inside the library used for stripping comments. The problem occurs if there are double quotes inside the comment, and this issue has been created inside `strip-comments` lib (jonschlinkert/strip-comments#49). Unfortunately, this PR with the fix is stale for some time now, so inside our fork of snaps-cli we used a forked version of `strip-comments` library. ### Changes In this PR I replaced `strip-comments` with our [fork](https://github.com/NodeFactoryIo/strip-comments) that: - fixes a bug with double quotes inside the comment - already contains types, so no need for importing them Co-authored-by: Mak Muftic <mak@chainsafe.io>
mpetrunic
approved these changes
Jan 10, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR updates
filsnap
for compatibility with the MetaMask Flask prerelease build. One usage ofnf-snap
remains during build time, as builds fail with the latest version of@metamas/snaps-cli
due to what appears to be a comment stripping issue. The nature of this issue should be identified and a fix PR'd against thesnaps-cli
package in this monorepo. Otherwise, we should be good to go!