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
b2b0e424
Commit
b2b0e424
authored
7 years ago
by
Rhys Arkins
Browse files
Options
Downloads
Patches
Plain Diff
fix: do not jump unstable majors unless configured to do so
parent
7afdfc4e
Loading
Loading
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/workers/package/versions.js
+7
-0
7 additions, 0 deletions
lib/workers/package/versions.js
test/_fixtures/npm/next.json
+1
-0
1 addition, 0 deletions
test/_fixtures/npm/next.json
test/workers/package/versions.spec.js
+7
-0
7 additions, 0 deletions
test/workers/package/versions.spec.js
with
15 additions
and
0 deletions
lib/workers/package/versions.js
+
7
−
0
View file @
b2b0e424
...
...
@@ -91,6 +91,13 @@ function determineUpgrades(npmDep, config) {
stable
.
is
(
changeLogFromVersion
)
&&
!
stable
.
is
(
version
)
)
// Do not jump to a new major unstable just because the current is unstable
.
reject
(
version
=>
config
.
ignoreUnstable
&&
!
stable
.
is
(
version
)
&&
semver
.
major
(
version
)
>
semver
.
major
(
changeLogFromVersion
)
)
// Ignore versions newer than "latest", unless current version is newer than the "latest"
.
reject
(
version
=>
...
...
This diff is collapsed.
Click to expand it.
test/_fixtures/npm/next.json
0 → 100644
+
1
−
0
View file @
b2b0e424
This diff is collapsed.
Click to expand it.
test/workers/package/versions.spec.js
+
7
−
0
View file @
b2b0e424
...
...
@@ -3,6 +3,7 @@ const qJson = require('../../_fixtures/npm/01.json');
const
helmetJson
=
require
(
'
../../_fixtures/npm/02.json
'
);
const
coffeelintJson
=
require
(
'
../../_fixtures/npm/coffeelint.json
'
);
const
webpackJson
=
require
(
'
../../_fixtures/npm/webpack.json
'
);
const
nextJson
=
require
(
'
../../_fixtures/npm/next.json
'
);
let
config
;
...
...
@@ -346,6 +347,12 @@ describe('workers/package/versions', () => {
const
res
=
versions
.
determineUpgrades
(
webpackJson
,
config
);
expect
(
res
).
toHaveLength
(
3
);
});
it
(
'
does not jump major unstable
'
,
()
=>
{
config
.
currentVersion
=
'
^4.4.0-canary.3
'
;
config
.
pinVersions
=
false
;
const
res
=
versions
.
determineUpgrades
(
nextJson
,
config
);
expect
(
res
).
toHaveLength
(
0
);
});
});
describe
(
'
.isRange(input)
'
,
()
=>
{
it
(
'
rejects simple semver
'
,
()
=>
{
...
...
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