Skip to content
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

Feature: Glob patterns for values in trace.dynamic.resolutions #116

Open
ryan-roemer opened this issue May 1, 2020 · 4 comments
Open

Feature: Glob patterns for values in trace.dynamic.resolutions #116

ryan-roemer opened this issue May 1, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@ryan-roemer
Copy link
Member

Could glob resolution values after have misses because then could match @heroku/socksv5/index.js to ../node_modules/@heroku/socksv5/index.js but would need to do a second pass traceFiles.

So, instead of:

resolutions:
  "@heroku/socksv5/index.js":
    - "./lib/constants.js"
    - "./lib/client.js"
    - "./lib/server.parser.js"
    - "./lib/Agents.js"
    - "./lib/auth/UserPassword.js"
    - "./lib/auth/None.js"
    - "./lib/server.js"
    - "./lib/utils.js"

Allow this:

resolutions:
  "@heroku/socksv5/index.js":
    - "./lib/**/*.js"
@ryan-roemer ryan-roemer added the enhancement New feature or request label May 1, 2020
@dominics
Copy link

dominics commented Aug 17, 2020

@ryan-roemer Glob patterns for allowMissing would also be appreciated; would potentially allow me a different workaround at https://github.com/dominics/issue-jp-sh/blob/main/serverless.yml#L36 (for issue explained in that repo's README)

@ryan-roemer
Copy link
Member Author

ryan-roemer commented Aug 17, 2020

UPDATE -- Apologies, I reviewed this incorrectly. trace.dynamic.resolutions won't help because you're not having an issue with dynamic import misses, but seemingly "real" ones that are false positives because of browserify.

I'm going to take this more to #139 and figure things out in more detail...

For the meantime, I think workaround1 that you have is sufficient, and just watch out in case the library moves from node_modules/sanitize-html location when yarn/npm installed. I would just check on disk to see if there are any other installed instances of sanitize-html deeper in node_modules.

@ryan-roemer
Copy link
Member Author

I've separately filed #139 to consider this problem of Browserify using it's own require() function which conflicts with the Node.js one and produces false missing import reports in Jetpack.

@ryan-roemer
Copy link
Member Author

Also added specific feature ticket as originally requested at #140

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants