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

fix: handle non node: prefixed Node.js builtins when no npm specifiers were found #5785

Merged

Conversation

pieh
Copy link
Contributor

@pieh pieh commented Jul 29, 2024

🎉 Thanks for submitting a pull request! 🎉

Summary

We are creating x -> node:x import map entries to support node builtins in Deno, but we only do that when we found at least one "npm" specifier. This is looking to always create node builtins entries regardless of npm specifiers state.

Suggest reviewing with "hide whitespace" mode ( https://github.com/netlify/build/pull/5785/files?w=1 ) as the fix largely just replace early bail with moving some a bit of code under condition instead which just changed indentation on a lot of lines


For us to review and ship your PR efficiently, please perform the following steps:

  • Open a bug/issue before writing your code 🧑‍💻. This ensures
    we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or
    something that`s on fire 🔥 (e.g. incident related), you can skip this step.
  • Read the contribution guidelines 📖. This ensures
    your code follows our style guide and passes our tests.
  • Update or add tests (if any source code was changed or added) 🧪
  • Update or add documentation (if features were changed or added) 📝
  • Make sure the status checks below are successful ✅

A picture of a cute animal (not mandatory, but encouraged)

Sorry, something went wrong.

pieh added 2 commits July 29, 2024 11:32

Verified

This commit was signed with the committer’s verified signature.
xrmx Riccardo Magliocchetti

Verified

This commit was signed with the committer’s verified signature.
xrmx Riccardo Magliocchetti
…s were found
@pieh pieh force-pushed the fix/handle-non-prefixed-node-builtin-without-npm-specifiers branch from 22ace7f to 9779bf1 Compare July 29, 2024 09:51
@pieh pieh marked this pull request as ready for review July 29, 2024 09:54
@pieh pieh requested review from a team as code owners July 29, 2024 09:54
@pieh pieh force-pushed the fix/handle-non-prefixed-node-builtin-without-npm-specifiers branch from ae98286 to 49fa267 Compare July 29, 2024 11:11
Copy link
Contributor

This pull request adds or modifies JavaScript (.js, .cjs, .mjs) files.
Consider converting them to TypeScript.

Verified

This commit was signed with the committer’s verified signature.
xrmx Riccardo Magliocchetti
@pieh pieh force-pushed the fix/handle-non-prefixed-node-builtin-without-npm-specifiers branch from 49fa267 to 9b85230 Compare July 29, 2024 11:14
@pieh pieh merged commit afdb4ac into main Jul 29, 2024
37 checks passed
@pieh pieh deleted the fix/handle-non-prefixed-node-builtin-without-npm-specifiers branch July 29, 2024 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants