Skip to content

build path.join called in require if args are string literals #212

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

Merged
merged 5 commits into from
Jan 20, 2024

Conversation

jean-michelet
Copy link
Contributor

This PR addresses partially issue #178.

If path.join is called in require and every argument is a string literal:

const bin = require(path.join('.', 'bin.js'))

The dependency is normalized an no unsafe-import warning is triggered.

@PierreDemailly PierreDemailly linked an issue Jan 20, 2024 that may be closed by this pull request
@PierreDemailly PierreDemailly changed the title Related to issue #178 - build path.join called in require if args are string literals build path.join called in require if args are string literals Jan 20, 2024
@PierreDemailly PierreDemailly merged commit 100a2aa into NodeSecure:master Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

evaluate path.join for require?
3 participants