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
031d94d7
Commit
031d94d7
authored
6 years ago
by
Rhys Arkins
Browse files
Options
Downloads
Patches
Plain Diff
Revert "fix(docker): null is not a valid version"
This reverts commit
8f0279ec
.
parent
27e30f13
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/versioning/docker/index.js
+0
-3
0 additions, 3 deletions
lib/versioning/docker/index.js
test/versioning/docker.spec.js
+1
-2
1 addition, 2 deletions
test/versioning/docker.spec.js
with
1 addition
and
5 deletions
lib/versioning/docker/index.js
+
0
−
3
View file @
031d94d7
...
@@ -52,9 +52,6 @@ function isLessThanRange(version, range) {
...
@@ -52,9 +52,6 @@ function isLessThanRange(version, range) {
return
compare
(
version
,
range
)
<
0
;
return
compare
(
version
,
range
)
<
0
;
}
}
function
isValid
(
version
)
{
function
isValid
(
version
)
{
if
(
!
version
)
{
return
null
;
}
const
parsed
=
parse
(
version
);
const
parsed
=
parse
(
version
);
return
parsed
?
version
:
null
;
return
parsed
?
version
:
null
;
}
}
...
...
This diff is collapsed.
Click to expand it.
test/versioning/docker.spec.js
+
1
−
2
View file @
031d94d7
...
@@ -4,7 +4,6 @@ const semver = require('../../lib/versioning')('semver');
...
@@ -4,7 +4,6 @@ const semver = require('../../lib/versioning')('semver');
describe
(
'
docker.isValid(input)
'
,
()
=>
{
describe
(
'
docker.isValid(input)
'
,
()
=>
{
describe
(
'
isValid(version)
'
,
()
=>
{
describe
(
'
isValid(version)
'
,
()
=>
{
it
(
'
should support all versions length
'
,
()
=>
{
it
(
'
should support all versions length
'
,
()
=>
{
expect
(
docker
.
isValid
(
null
)).
toBe
(
null
);
expect
(
docker
.
isValid
(
'
1.2.3
'
)).
toBe
(
'
1.2.3
'
);
expect
(
docker
.
isValid
(
'
1.2.3
'
)).
toBe
(
'
1.2.3
'
);
expect
(
docker
.
isValid
(
'
18.04
'
)).
toBe
(
'
18.04
'
);
expect
(
docker
.
isValid
(
'
18.04
'
)).
toBe
(
'
18.04
'
);
expect
(
docker
.
isValid
(
'
10.1
'
)).
toBe
(
'
10.1
'
);
expect
(
docker
.
isValid
(
'
10.1
'
)).
toBe
(
'
10.1
'
);
...
@@ -12,7 +11,7 @@ describe('docker.isValid(input)', () => {
...
@@ -12,7 +11,7 @@ describe('docker.isValid(input)', () => {
expect
(
docker
.
isValid
(
'
foo
'
)).
toBe
(
null
);
expect
(
docker
.
isValid
(
'
foo
'
)).
toBe
(
null
);
});
});
});
});
describe
(
'
getMajor
(version)
'
,
()
=>
{
describe
(
'
isValid
(version)
'
,
()
=>
{
it
(
'
should support all versions length
'
,
()
=>
{
it
(
'
should support all versions length
'
,
()
=>
{
expect
(
docker
.
getMajor
(
'
1.2.3
'
)).
toBe
(
1
);
expect
(
docker
.
getMajor
(
'
1.2.3
'
)).
toBe
(
1
);
expect
(
docker
.
getMajor
(
'
18.04
'
)).
toBe
(
18
);
expect
(
docker
.
getMajor
(
'
18.04
'
)).
toBe
(
18
);
...
...
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