Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Commit

Permalink
chore: require file for Node >= 14.18
Browse files Browse the repository at this point in the history
  • Loading branch information
netlify-team-account-1 committed Nov 12, 2021
1 parent 9440f6f commit 633e05f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2283,7 +2283,9 @@ testMany(
'Handles built-in modules imported with the `node:` prefix',
['bundler_default', 'bundler_default_nft', 'bundler_nft', 'bundler_esbuild', 'bundler_esbuild_zisi'],
async (options, t, bundler) => {
const zip = bundler.includes('esbuild') ? zipNode : zipFixture
const nodePrefixIsUnderstood = semver.gte(nodeVersion, '>=14.18')
const nodePrefixIsCompiledAway = bundler.includes('esbuild')
const zip = nodePrefixIsCompiledAway || nodePrefixIsUnderstood ? zipNode : zipFixture
await zip(t, 'node-force-builtin-esm', {
opts: options,
})
Expand Down

0 comments on commit 633e05f

Please sign in to comment.