Skip to content

Commit

Permalink
fix: Is there a way to not upgrade a package if it's peer depndencies…
Browse files Browse the repository at this point in the history
… are not currently met #1418
  • Loading branch information
rbnayax committed Jun 2, 2024
1 parent 0203128 commit cb1fe97
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions test/getIgnoredUpgrades.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,54 @@ describe('getIgnoredUpgrades', function () {
},
})
})
it('ignored peer after upgrade', async () => {
const data = await getIgnoredUpgrades(
{
'@vitest/ui': '1.3.1',
vitest: '1.3.1',
eslint: '8.57.0',
'eslint-plugin-import': '2.29.1',
'eslint-plugin-unused-imports': '^3',
},
{
'@vitest/ui': '1.6.0',
vitest: '1.6.0',
},
{
'@vitest/ui': {
vitest: '1.6.0',
},
vitest: {
jsdom: '*',
'happy-dom': '*',
'@vitest/ui': '1.6.0',
'@types/node': '^18.0.0 || >=20.0.0',
'@vitest/browser': '1.6.0',
'@edge-runtime/vm': '*',
},
eslint: {},
'eslint-plugin-import': {
eslint: '^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8',
},
'eslint-plugin-unused-imports': {
'@typescript-eslint/eslint-plugin': '^6.0.0',
eslint: '^8.0.0',
},
},
{
target: packageName => {
return packageName === 'eslint-plugin-unused-imports' ? 'latest' : 'minor'
},
},
)
data.should.deep.equal({
'eslint-plugin-unused-imports': {
from: '^3',
reason: {
'eslint-plugin-unused-imports': 'eslint 9',
},
to: '^4',
},
})
})
})

0 comments on commit cb1fe97

Please sign in to comment.