Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
renovate
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
Renovate Bot
renovate
Commits
d7629ce6
Commit
d7629ce6
authored
6 years ago
by
Rhys Arkins
Browse files
Options
Downloads
Patches
Plain Diff
fix(datasource): remove unused normalize qualifier
parent
debc75f3
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/datasource/index.js
+0
-5
0 additions, 5 deletions
lib/datasource/index.js
test/datasource/__snapshots__/github.spec.js.snap
+0
-16
0 additions, 16 deletions
test/datasource/__snapshots__/github.spec.js.snap
test/datasource/github.spec.js
+0
-17
0 additions, 17 deletions
test/datasource/github.spec.js
with
0 additions
and
38 deletions
lib/datasource/index.js
+
0
−
5
View file @
d7629ce6
...
...
@@ -55,11 +55,6 @@ async function getPkgReleases(config) {
res
.
releases
=
res
.
releases
.
filter
(
release
=>
isVersion
(
release
.
version
))
.
sort
(
sortReleases
);
if
(
parse
(
config
.
purl
).
qualifiers
.
normalize
===
'
true
'
)
{
for
(
const
release
of
res
.
releases
)
{
release
.
version
=
isVersion
(
release
.
version
);
}
}
}
return
res
;
}
...
...
This diff is collapsed.
Click to expand it.
test/datasource/__snapshots__/github.spec.js.snap
+
0
−
16
View file @
d7629ce6
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`datasource/github getPkgReleases returns cleaned tags 1`] = `
Object {
"releases": Array [
Object {
"gitRef": "1.0.0",
"version": "1.0.0",
},
Object {
"gitRef": "v1.1.0",
"version": "1.1.0",
},
],
"sourceUrl": "https://github.com/some/dep",
}
`;
exports[`datasource/github getPkgReleases returns releases 1`] = `
Object {
"releases": Array [
...
...
This diff is collapsed.
Click to expand it.
test/datasource/github.spec.js
+
0
−
17
View file @
d7629ce6
...
...
@@ -62,23 +62,6 @@ describe('datasource/github', () => {
});
describe
(
'
getPkgReleases
'
,
()
=>
{
beforeAll
(()
=>
global
.
renovateCache
.
rmAll
());
it
(
'
returns cleaned tags
'
,
async
()
=>
{
const
body
=
[
{
name
:
'
a
'
},
{
name
:
'
v
'
},
{
name
:
'
1.0.0
'
},
{
name
:
'
v1.1.0
'
},
];
ghGot
.
mockReturnValueOnce
({
headers
:
{},
body
});
const
res
=
await
datasource
.
getPkgReleases
({
purl
:
'
pkg:github/some/dep?normalize=true
'
,
});
expect
(
res
).
toMatchSnapshot
();
expect
(
res
.
releases
).
toHaveLength
(
2
);
expect
(
res
.
releases
.
find
(
release
=>
release
.
version
===
'
1.1.0
'
)
).
toBeDefined
();
});
it
(
'
returns releases
'
,
async
()
=>
{
const
body
=
[
{
tag_name
:
'
a
'
},
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment