@yarnpkg/plugin-git
Advanced tools
+4
-4
| { | ||
| "name": "@yarnpkg/plugin-git", | ||
| "version": "2.6.0-rc.13", | ||
| "version": "2.6.0-rc.14", | ||
| "license": "BSD-2-Clause", | ||
@@ -8,3 +8,3 @@ "main": "./lib/index.js", | ||
| "@types/semver": "^7.1.0", | ||
| "@yarnpkg/fslib": "^2.6.1-rc.8", | ||
| "@yarnpkg/fslib": "^2.6.1-rc.9", | ||
| "clipanion": "^3.2.0-rc.4", | ||
@@ -17,3 +17,3 @@ "git-url-parse": "11.1.2", | ||
| "peerDependencies": { | ||
| "@yarnpkg/core": "^3.2.0-rc.13" | ||
| "@yarnpkg/core": "^3.2.0-rc.14" | ||
| }, | ||
@@ -23,3 +23,3 @@ "devDependencies": { | ||
| "@types/lodash": "^4.14.136", | ||
| "@yarnpkg/core": "^3.2.0-rc.13" | ||
| "@yarnpkg/core": "^3.2.0-rc.14" | ||
| }, | ||
@@ -26,0 +26,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
| import * as gitUtils from './gitUtils'; | ||
| const VALID_PATTERNS = [ | ||
| `GitHubOrg/foo-bar.js`, | ||
| `GitHubOrg/foo2bar.js`, | ||
| `GitHubOrg/foo-bar.js#hash`, | ||
| `GitHubOrg/foo-bar.js#commit:hash`, | ||
| `GitHubOrg/foo-bar.js#commit=hash`, | ||
| `GitHubOrg/foo-bar.js#commit=hash&workspace=foo`, | ||
| `GitHubOrg/foo-bar.js#tag=hello`, | ||
| `GitHubOrg/foo-bar.js#workspace=foo`, | ||
| `github:GitHubOrg/foo-bar.js`, | ||
| `github:GitHubOrg/foo-bar.js#hash`, | ||
| `https://github.com/TooTallNate/util-deprecate.git#v1.0.0`, | ||
| `https://github.com/TooTallNate/util-deprecate.git#semver:v1.0.0`, | ||
| `https://github.com/TooTallNate/util-deprecate.git#master`, | ||
| `https://github.com/TooTallNate/util-deprecate.git#b3562c2798507869edb767da869cd7b85487726d`, | ||
| `https://github.com/TooTallNate/util-deprecate/tarball/b3562c2798507869edb767da869cd7b85487726d`, | ||
| `git://github.com/TooTallNate/util-deprecate.git#v1.0.1`, | ||
| `git+ssh://git@github.com/TooTallNate/util-deprecate.git#v1.0.1`, | ||
| `ssh://git@github.com/TooTallNate/util-deprecate.git#v1.0.1`, | ||
| `git+ssh://git@github.com:yarnpkg/berry.git#v2.1.1`, | ||
| `ssh://git@github.com:yarnpkg/berry.git#v2.1.1`, | ||
| `git+https://github.com/TooTallNate/util-deprecate#v1.0.1`, | ||
| `git+https://github.com/TooTallNate/util-deprecate.git#v1.0.1`, | ||
| ]; | ||
| const INVALID_PATTERNS = [ | ||
| `./.`, | ||
| `../..`, | ||
| ]; | ||
| describe(`gitUtils`, () => { | ||
| for (const pattern of VALID_PATTERNS) { | ||
| it(`should detect ${pattern} as a valid Git url`, () => { | ||
| expect(gitUtils.isGitUrl(pattern)).toEqual(true); | ||
| }); | ||
| } | ||
| for (const pattern of INVALID_PATTERNS) { | ||
| it(`shouldn't detect ${pattern} as a valid Git url`, () => { | ||
| expect(gitUtils.isGitUrl(pattern)).toEqual(false); | ||
| }); | ||
| } | ||
| for (const pattern of VALID_PATTERNS) { | ||
| it(`should properly normalize ${pattern} ({ git: false })`, () => { | ||
| expect(gitUtils.normalizeRepoUrl(pattern)).toMatchSnapshot(); | ||
| }); | ||
| it(`should properly normalize ${pattern} ({ git: true })`, () => { | ||
| expect(gitUtils.normalizeRepoUrl(pattern, {git: true})).toMatchSnapshot(); | ||
| }); | ||
| } | ||
| for (const pattern of VALID_PATTERNS) { | ||
| it(`should properly split ${pattern}`, () => { | ||
| expect(gitUtils.splitRepoUrl(pattern)).toMatchSnapshot(); | ||
| }); | ||
| } | ||
| }); |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
30653
-34.42%10
-16.67%639
-7.79%Updated