-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: when packages are filter due to engine not matching, we need to…
… print it out, just like we do in peer checks #1422
- Loading branch information
Showing
7 changed files
with
79 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { chalkInit } from '../src/lib/chalk' | ||
import getEnginesNodeFromRegistry from '../src/lib/getEnginesNodeFromRegistry' | ||
import chaiSetup from './helpers/chaiSetup' | ||
|
||
chaiSetup() | ||
|
||
describe('getEnginesNodeFromRegistry', function () { | ||
it('single package', async () => { | ||
await chalkInit() | ||
const data = await getEnginesNodeFromRegistry({ del: '2.0.0' }, {}) | ||
data.should.deep.equal({ | ||
del: '>=0.10.0', | ||
}) | ||
}) | ||
|
||
it('single package empty', async () => { | ||
await chalkInit() | ||
const data = await getEnginesNodeFromRegistry({ 'ncu-test-return-version': '1.0' }, {}) | ||
data.should.deep.equal({ 'ncu-test-return-version': undefined }) | ||
}) | ||
|
||
it('multiple packages', async () => { | ||
await chalkInit() | ||
const data = await getEnginesNodeFromRegistry( | ||
{ | ||
'ncu-test-return-version': '1.0.0', | ||
'ncu-test-peer': '1.0.0', | ||
del: '2.0.0', | ||
}, | ||
{}, | ||
) | ||
data.should.deep.equal({ | ||
'ncu-test-return-version': undefined, | ||
'ncu-test-peer': undefined, | ||
del: '>=0.10.0', | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import getIgnoredUpgradesDueToEnginesNode from '../src/lib/getIgnoredUpgradesDueToEnginesNode' | ||
import chaiSetup from './helpers/chaiSetup' | ||
|
||
chaiSetup() | ||
|
||
describe('getIgnoredUpgradesDueToEnginesNode', function () { | ||
it('ncu-test-peer-update', async () => { | ||
const data = await getIgnoredUpgradesDueToEnginesNode( | ||
{ | ||
'ncu-test-return-version': '1.0.0', | ||
'ncu-test-peer': '1.0.0', | ||
del: '2.2.2', | ||
}, | ||
{ | ||
'ncu-test-return-version': '2.0.0', | ||
'ncu-test-peer': '1.1.0', | ||
del: '2.2.2', | ||
}, | ||
{ | ||
enginesNode: true, | ||
nodeEngineVersion: `^0.10.0`, | ||
}, | ||
) | ||
data.should.deep.equal({ | ||
del: { | ||
enginesNode: '>=14.16', | ||
from: '2.2.2', | ||
to: '7.1.0', | ||
}, | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters