mirror of
https://github.com/dependabot/fetch-metadata.git
synced 2026-03-13 18:17:13 -04:00
Fix indirect update types
Co-authored-by: Philip Harrison <philip@mailharrison.com>
This commit is contained in:
committed by
Barry Gordon
parent
70438fafb6
commit
a551173326
3
dist/index.js
generated
vendored
3
dist/index.js
generated
vendored
@@ -13412,9 +13412,8 @@ var pluralize_default = /*#__PURE__*/__nccwpck_require__.n(pluralize);
|
||||
|
||||
const DEPENDENCY_TYPES_PRIORITY = [
|
||||
'direct:production',
|
||||
'indirect:production',
|
||||
'direct:development',
|
||||
'indirect:development'
|
||||
'indirect'
|
||||
];
|
||||
const UPDATE_TYPES_PRIORITY = [
|
||||
'version-update:semver-major',
|
||||
|
||||
@@ -39,17 +39,17 @@ test('when given a multiple dependencies, it uses the highest values for types',
|
||||
},
|
||||
{
|
||||
dependencyName: 'coffee-rails',
|
||||
dependencyType: 'indirect:production',
|
||||
dependencyType: 'indirect',
|
||||
updateType: 'version-update:semver-minor'
|
||||
},
|
||||
{
|
||||
dependencyName: 'coffeescript',
|
||||
dependencyType: 'indirect:production',
|
||||
dependencyType: 'indirect',
|
||||
updateType: 'version-update:semver-major'
|
||||
},
|
||||
{
|
||||
dependencyName: 'rspec-coffeescript',
|
||||
dependencyType: 'indirect:development',
|
||||
dependencyType: 'indirect',
|
||||
updateType: 'version-update:semver-patch'
|
||||
}
|
||||
]
|
||||
@@ -59,7 +59,7 @@ test('when given a multiple dependencies, it uses the highest values for types',
|
||||
expect(core.setOutput).toHaveBeenCalledWith('updated-dependencies-json', updatedDependencies)
|
||||
|
||||
expect(core.setOutput).toBeCalledWith('dependency-names', 'rspec, coffee-rails, coffeescript, rspec-coffeescript')
|
||||
expect(core.setOutput).toBeCalledWith('dependency-type', 'indirect:production')
|
||||
expect(core.setOutput).toBeCalledWith('dependency-type', 'direct:development')
|
||||
expect(core.setOutput).toBeCalledWith('update-type', 'version-update:semver-major')
|
||||
})
|
||||
|
||||
@@ -114,6 +114,6 @@ test('when given a multiple dependencies, and some do not have update types', as
|
||||
expect(core.setOutput).toHaveBeenCalledWith('updated-dependencies-json', updatedDependencies)
|
||||
|
||||
expect(core.setOutput).toBeCalledWith('dependency-names', 'rspec, coffee-rails, coffeescript, rspec-coffeescript')
|
||||
expect(core.setOutput).toBeCalledWith('dependency-type', 'indirect:production')
|
||||
expect(core.setOutput).toBeCalledWith('dependency-type', 'direct:development')
|
||||
expect(core.setOutput).toBeCalledWith('update-type', 'version-update:semver-minor')
|
||||
})
|
||||
|
||||
@@ -4,9 +4,8 @@ import { updatedDependency } from './update_metadata'
|
||||
|
||||
const DEPENDENCY_TYPES_PRIORITY = [
|
||||
'direct:production',
|
||||
'indirect:production',
|
||||
'direct:development',
|
||||
'indirect:development'
|
||||
'indirect'
|
||||
]
|
||||
const UPDATE_TYPES_PRIORITY = [
|
||||
'version-update:semver-major',
|
||||
|
||||
@@ -105,7 +105,7 @@ test('if there are multiple dependencies, it summarizes them', async () => {
|
||||
' dependency-type: direct:production\n' +
|
||||
' update-type: version-update:semver-minor\n' +
|
||||
'- dependency-name: coffeescript\n' +
|
||||
' dependency-type: indirect:production\n' +
|
||||
' dependency-type: indirect\n' +
|
||||
' update-type: version-update:semver-major\n' +
|
||||
'...\n' +
|
||||
'\n' +
|
||||
@@ -133,7 +133,7 @@ test('if there are multiple dependencies, it summarizes them', async () => {
|
||||
},
|
||||
{
|
||||
dependencyName: 'coffeescript',
|
||||
dependencyType: 'indirect:production',
|
||||
dependencyType: 'indirect',
|
||||
updateType: 'version-update:semver-major'
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user