forked from semrel-extra/zx-bulk-release
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use npm pkg registry for meta fallback
- Loading branch information
1 parent
869e3d3
commit ee771cb
Showing
6 changed files
with
57 additions
and
15 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
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,22 @@ | ||
import {suite} from 'uvu' | ||
import * as assert from 'uvu/assert' | ||
import {fetchManifest} from '../../main/js/npm.js' | ||
|
||
const test = suite('npm') | ||
|
||
test('fetchManifest()', async () => { | ||
const env = {NPM_REGISTRY: 'https://registry.npmjs.org'} | ||
const manifest = await fetchManifest({ | ||
name: 'ggcp', | ||
version: '1.5.0' | ||
}, {env}) | ||
assert.ok(manifest.name === 'ggcp') | ||
|
||
const notfound = await fetchManifest({ | ||
name: '@qiwi/sf2332f-32ds2213-dfs23', | ||
version: '999.15.0' | ||
}, {nothrow: true, env}) | ||
assert.is(notfound, null) | ||
}) | ||
|
||
test.run() |
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