Skip to content
Snippets Groups Projects
Unverified Commit b4665d35 authored by Rhys Arkins's avatar Rhys Arkins Committed by GitHub
Browse files

fix(npm): skip Node 17 unless allowing unstable (#12306)

parent b3676ac8
No related branches found
No related tags found
No related merge requests found
...@@ -36,7 +36,7 @@ describe('manager/npm/post-update/node-version', () => { ...@@ -36,7 +36,7 @@ describe('manager/npm/post-update/node-version', () => {
...config, ...config,
constraints: { node: '>= 12.16.0' }, constraints: { node: '>= 12.16.0' },
}); });
const isAugmentedRange = res === '>=15'; const isAugmentedRange = res === '>=15 <17';
const node16IsStable = isStable('16.100.0'); const node16IsStable = isStable('16.100.0');
expect(isAugmentedRange || node16IsStable).toBe(true); expect(isAugmentedRange || node16IsStable).toBe(true);
}); });
......
...@@ -57,8 +57,8 @@ export async function getNodeConstraint( ...@@ -57,8 +57,8 @@ export async function getNodeConstraint(
!isStable('16.100.0') !isStable('16.100.0')
) { ) {
if (lockfileVersion === 2) { if (lockfileVersion === 2) {
logger.debug('Forcing node 15 to ensure lockfileVersion=2 is used'); logger.debug('Forcing node 15+ to ensure lockfileVersion=2 is used');
constraint = '>=15'; constraint = '>=15 <17';
} else if (validRange(`${constraint} <15`)) { } else if (validRange(`${constraint} <15`)) {
logger.debug('Augmenting constraint to avoid node 15'); logger.debug('Augmenting constraint to avoid node 15');
constraint = `${constraint} <15`; constraint = `${constraint} <15`;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment