Skip to content

Commit

Permalink
switch from builtin protocol nodejs: to node: on >=12.20.0, <13
Browse files Browse the repository at this point in the history
  • Loading branch information
cspotcode committed May 23, 2021
1 parent eb1a524 commit 11ab0bf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dist-raw/node-esm-resolve-implementation.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@
'use strict';

const [nodeMajor, nodeMinor, nodePatch] = process.versions.node.split('.').map(s => parseInt(s, 10))
// Test for 14.13.1 or higher
// Test for node >14.13.1 || (>=12.20.0 && <13)
const builtinModuleProtocol = nodeMajor > 14 || (
nodeMajor === 14 && (
nodeMinor > 13 || (
nodeMinor === 13 && nodePatch > 0
)
)
) || (
nodeMajor === 12 && (
nodeMinor > 20 || (
nodeMinor === 20
)
)
)
? 'node:'
: 'nodejs:';
Expand Down

0 comments on commit 11ab0bf

Please sign in to comment.