Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8da36a5
commit 077d466
Showing
5 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** NOTE: This script is copied into a temp directory by the e2e test and dependencies are installed from the local verdaccio registry. */ | ||
import assert from 'assert' | ||
import ncu from 'npm-check-updates' | ||
|
||
const registry = process.env.REGISTRY || 'http://localhost:4873' | ||
|
||
// must exit with error code on unhandledRejection, otherwise script will exit with 0 if an assertion fails in the async block | ||
process.on('unhandledRejection', (reason, p) => { | ||
process.exit(1) | ||
}) | ||
|
||
// test | ||
;(async () => { | ||
const upgraded = await ncu.run({ | ||
// --pre 1 to ensure that an upgrade is always suggested even if npm-check-updates is on a prerelease version | ||
pre: true, | ||
packageData: JSON.stringify({ | ||
dependencies: { | ||
'npm-check-updates': '1.0.0', | ||
}, | ||
}), | ||
registry, | ||
}) | ||
|
||
console.info(upgraded) | ||
|
||
assert.notStrictEqual(upgraded['npm-check-updates'], '1.0.0', 'npm-check-updates should be upgraded') | ||
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"type": "module" | ||
} |