safe-publish-latest
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -0,1 +1,10 @@ | ||
1.1.0 / 2016-09-19 | ||
================== | ||
* [Fix] ensure that the npm loglevel is known for `npm info` | ||
* [Fix] ensure publishing can work the first time (#4) | ||
* [New] add `—force-in-publish` to skip the “in publish” check | ||
* [Deps] update `semver`, `yargs` | ||
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `nsp` | ||
* [Tests] fix tests since package x suddenly got updated | ||
1.0.1 / 2016-07-30 | ||
@@ -2,0 +11,0 @@ ================== |
@@ -23,4 +23,7 @@ 'use strict'; | ||
return exec('npm info ' + name + ' versions --json', function (err, json) { | ||
return exec('npm info ' + name + ' versions --json --loglevel=info', function (err, json) { | ||
if (err) { | ||
if (/Registry returned 404/.test(err)) { | ||
return callback(null, 'v' + version + ' is the first version published.'); | ||
} | ||
return callback([ | ||
@@ -27,0 +30,0 @@ 'Error fetching package versions:', |
{ | ||
"name": "safe-publish-latest", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"author": "Jordan Harband", | ||
@@ -44,10 +44,10 @@ "contributors": [ | ||
"in-publish": "^2.0.0", | ||
"semver": "^5.2.0", | ||
"yargs": "^4.7.1" | ||
"semver": "^5.3.0", | ||
"yargs": "^5.0.0" | ||
}, | ||
"devDependencies": { | ||
"@ljharb/eslint-config": "^6.0.0", | ||
"eslint": "^3.0.1", | ||
"@ljharb/eslint-config": "^8.0.0", | ||
"eslint": "^3.5.0", | ||
"mock-env": "^0.1.3", | ||
"nsp": "^2.6.0", | ||
"nsp": "^2.6.1", | ||
"tape": "^4.6.0" | ||
@@ -54,0 +54,0 @@ }, |
@@ -44,5 +44,5 @@ 'use strict'; | ||
s2t.plan(2); | ||
getLatestError('x', '9999.0.0', {}, function (err, result) { | ||
getLatestError('def', '9999.0.0', {}, function (err, result) { | ||
s2t.error(err, 'there should be no error'); | ||
s2t.equal(result, 'v9999.0.0 is later than v0.0.5.'); | ||
s2t.equal(result, 'v9999.0.0 is later than v0.0.8.'); | ||
}); | ||
@@ -53,6 +53,6 @@ }); | ||
s2t.plan(2); | ||
getLatestError('x', '0.0.4', {}, function (err, result) { | ||
getLatestError('def', '0.0.5', {}, function (err, result) { | ||
s2t.notOk(result, 'no result'); | ||
s2t.deepEqual(err, [ | ||
'Attempting to publish v0.0.4 as "latest", but it is not later than v0.0.5.', | ||
'Attempting to publish v0.0.5 as "latest", but it is not later than v0.0.8.', | ||
'\nPossible Solutions:', | ||
@@ -67,6 +67,6 @@ '\t1) Provide a dist-tag: `npm publish --tag=backport`, for example', | ||
s2t.plan(2); | ||
getLatestError('x', '0.0.5', {}, function (err, result) { | ||
getLatestError('def', '0.0.8', {}, function (err, result) { | ||
s2t.notOk(result, 'no result'); | ||
s2t.deepEqual(err, [ | ||
'Attempting to publish already-published version v0.0.5.' | ||
'Attempting to publish already-published version v0.0.8.' | ||
]); | ||
@@ -78,3 +78,3 @@ }); | ||
s2t.plan(2); | ||
getLatestError('x', '9999.0.0-prerelease.0', {}, function (err, result) { | ||
getLatestError('def', '9999.0.0-prerelease.0', {}, function (err, result) { | ||
s2t.notOk(result, 'no result'); | ||
@@ -92,3 +92,3 @@ s2t.deepEqual(err, [ | ||
s2t.plan(2); | ||
getLatestError('x', '0.0.4-prerelease.0', {}, function (err, result) { | ||
getLatestError('def', '0.0.4-prerelease.0', {}, function (err, result) { | ||
s2t.notOk(result, 'no result'); | ||
@@ -108,3 +108,12 @@ s2t.deepEqual(err, [ | ||
t.test('nonexistent but valid package name', function (st) { | ||
st.plan(2); | ||
getLatestError('abcdef123', '1.0.0', {}, function (err, result) { | ||
st.error(err, 'there should be no error'); | ||
st.equal(result, 'v1.0.0 is the first version published.'); | ||
st.end(); | ||
}); | ||
}); | ||
t.end(); | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15260
191
+ Addedyargs@5.0.0(transitive)
+ Addedyargs-parser@3.2.0(transitive)
- Removedyargs@4.8.1(transitive)
- Removedyargs-parser@2.4.1(transitive)
Updatedsemver@^5.3.0
Updatedyargs@^5.0.0