Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adds js-yaml * Optimizes a bit the lockfile parsing * Supports more cases * Supports more cases * Branches the parsing depending on the v1 tag * Updates the npm tests * Fixes more tests * More tests fixed * Other tests + documentation
- Loading branch information
Showing
20 changed files
with
541 additions
and
447 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,12 +1,16 @@ | ||
## General settings | ||
|
||
init-scope: berry | ||
|
||
npm-publish-access: public | ||
|
||
yarn-path: scripts/run-yarn.js | ||
|
||
## List of plugins enabled in the current repository | ||
|
||
plugins: | ||
- scripts/plugin-exec.js | ||
- scripts/plugin-stage.js | ||
- scripts/plugin-typescript.js | ||
- scripts/plugin-version.js | ||
- scripts/plugin-workspace-tools.js | ||
|
||
yarn-path: ./scripts/run-yarn.js |
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
71 changes: 71 additions & 0 deletions
71
...es/acceptance-tests/pkg-tests-specs/sources/commands/npm/__snapshots__/login.test.js.snap
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,71 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Commands npm login it should login a user with OTP setup 1`] = ` | ||
"npmAuthToken: 686159dc-64b3-413e-a244-2de2b8d1c36f | ||
" | ||
`; | ||
|
||
exports[`Commands npm login it should login a user with OTP setup 2`] = ` | ||
Object { | ||
"code": 0, | ||
"stderr": "", | ||
"stdout": "➤ YN0000: Successfully logged in | ||
➤ YN0000: Done | ||
", | ||
} | ||
`; | ||
|
||
exports[`Commands npm login it should login a user with OTP to a specific scope 1`] = ` | ||
"init-scope: berry-test | ||
npmScopes: | ||
testScope: | ||
npmAuthToken: 686159dc-64b3-413e-a244-2de2b8d1c36f | ||
npmRegistryServer: \\"http://yarn.test.registry\\" | ||
" | ||
`; | ||
|
||
exports[`Commands npm login it should login a user with OTP to a specific scope 2`] = ` | ||
Object { | ||
"code": 0, | ||
"stderr": "", | ||
"stdout": "➤ YN0000: Successfully logged in | ||
➤ YN0000: Done | ||
", | ||
} | ||
`; | ||
|
||
exports[`Commands npm login it should login a user with no OTP setup 1`] = ` | ||
"npmAuthToken: 316158de-64b3-413e-a244-2de2b8d1c80f | ||
" | ||
`; | ||
|
||
exports[`Commands npm login it should login a user with no OTP setup 2`] = ` | ||
Object { | ||
"code": 0, | ||
"stderr": "", | ||
"stdout": "➤ YN0000: Successfully logged in | ||
➤ YN0000: Done | ||
", | ||
} | ||
`; | ||
|
||
exports[`Commands npm login it should login a user with no OTP setup to a specific scope 1`] = ` | ||
"init-scope: berry-test | ||
npmScopes: | ||
testScope: | ||
npmAuthToken: 316158de-64b3-413e-a244-2de2b8d1c80f | ||
npmRegistryServer: \\"http://yarn.test.registry\\" | ||
" | ||
`; | ||
|
||
exports[`Commands npm login it should login a user with no OTP setup to a specific scope 2`] = ` | ||
Object { | ||
"code": 0, | ||
"stderr": "", | ||
"stdout": "➤ YN0000: Successfully logged in | ||
➤ YN0000: Done | ||
", | ||
} | ||
`; |
31 changes: 31 additions & 0 deletions
31
...s/acceptance-tests/pkg-tests-specs/sources/commands/npm/__snapshots__/whoami.test.js.snap
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,31 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Commands npm whoami it should print the npm registry username for a given scope 1`] = ` | ||
Object { | ||
"code": 0, | ||
"stderr": "", | ||
"stdout": "➤ YN0000: username | ||
➤ YN0000: Done | ||
", | ||
} | ||
`; | ||
|
||
exports[`Commands npm whoami it should print the npm registry username when config has a valid npmAuthIdent 1`] = ` | ||
Object { | ||
"code": 0, | ||
"stderr": "", | ||
"stdout": "➤ YN0000: username | ||
➤ YN0000: Done | ||
", | ||
} | ||
`; | ||
|
||
exports[`Commands npm whoami it should print the npm registry username when config has a valid npmAuthToken 1`] = ` | ||
Object { | ||
"code": 0, | ||
"stderr": "", | ||
"stdout": "➤ YN0000: username | ||
➤ YN0000: Done | ||
", | ||
} | ||
`; |
Oops, something went wrong.