forked from yarnpkg/berry
-
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.
* Implements fixes * Adds the missing plugins * Adds version file * Fixes linting * Improves authentication errors * Updates the test messages * Fixes whoami tests * Fixes snapshots
- Loading branch information
Showing
36 changed files
with
475 additions
and
123 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env node | ||
|
||
const {createRequire, createRequireFromPath} = require(`module`); | ||
const {dirname, resolve} = require(`path`); | ||
|
||
const relPnpApiPath = "../../../../.pnp.js"; | ||
|
||
const absPnpApiPath = resolve(__dirname, relPnpApiPath); | ||
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath); | ||
|
||
// Setup the environment to be able to require eslint/bin/eslint.js | ||
require(absPnpApiPath).setup(); | ||
|
||
// Prepare the environment (to be ready in case of child_process.spawn etc) | ||
process.env.NODE_OPTIONS = process.env.NODE_OPTIONS || ``; | ||
process.env.NODE_OPTIONS += ` -r ${absPnpApiPath}`; | ||
|
||
// Defer to the real eslint/bin/eslint.js your application uses | ||
module.exports = absRequire(`eslint/bin/eslint.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "eslint", | ||
"version": "5.16.0-pnpify", | ||
"main": "lib/api.js" | ||
"main": "./lib/api.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env node | ||
|
||
const {createRequire, createRequireFromPath} = require(`module`); | ||
const {dirname, resolve} = require(`path`); | ||
|
||
const relPnpApiPath = "../../../../.pnp.js"; | ||
|
||
const absPnpApiPath = resolve(__dirname, relPnpApiPath); | ||
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath); | ||
|
||
// Setup the environment to be able to require typescript/bin/tsc | ||
require(absPnpApiPath).setup(); | ||
|
||
// Prepare the environment (to be ready in case of child_process.spawn etc) | ||
process.env.NODE_OPTIONS = process.env.NODE_OPTIONS || ``; | ||
process.env.NODE_OPTIONS += ` -r ${absPnpApiPath}`; | ||
|
||
// Defer to the real typescript/bin/tsc your application uses | ||
module.exports = absRequire(`typescript/bin/tsc`); |
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,19 @@ | ||
#!/usr/bin/env node | ||
|
||
const {createRequire, createRequireFromPath} = require(`module`); | ||
const {dirname, resolve} = require(`path`); | ||
|
||
const relPnpApiPath = "../../../../.pnp.js"; | ||
|
||
const absPnpApiPath = resolve(__dirname, relPnpApiPath); | ||
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath); | ||
|
||
// Setup the environment to be able to require typescript/bin/tsserver | ||
require(absPnpApiPath).setup(); | ||
|
||
// Prepare the environment (to be ready in case of child_process.spawn etc) | ||
process.env.NODE_OPTIONS = process.env.NODE_OPTIONS || ``; | ||
process.env.NODE_OPTIONS += ` -r ${absPnpApiPath}`; | ||
|
||
// Defer to the real typescript/bin/tsserver your application uses | ||
module.exports = absRequire(`typescript/bin/tsserver`); |
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,19 @@ | ||
#!/usr/bin/env node | ||
|
||
const {createRequire, createRequireFromPath} = require(`module`); | ||
const {dirname, resolve} = require(`path`); | ||
|
||
const relPnpApiPath = "../../../../.pnp.js"; | ||
|
||
const absPnpApiPath = resolve(__dirname, relPnpApiPath); | ||
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath); | ||
|
||
// Setup the environment to be able to require typescript/lib/tsc.js | ||
require(absPnpApiPath).setup(); | ||
|
||
// Prepare the environment (to be ready in case of child_process.spawn etc) | ||
process.env.NODE_OPTIONS = process.env.NODE_OPTIONS || ``; | ||
process.env.NODE_OPTIONS += ` -r ${absPnpApiPath}`; | ||
|
||
// Defer to the real typescript/lib/tsc.js your application uses | ||
module.exports = absRequire(`typescript/lib/tsc.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"name": "typescript", | ||
"version": "3.7.4-pnpify" | ||
"version": "3.7.4-pnpify", | ||
"main": "./lib/typescript.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
releases: | ||
"@yarnpkg/cli": prerelease | ||
"@yarnpkg/core": prerelease | ||
"@yarnpkg/plugin-essentials": prerelease | ||
"@yarnpkg/plugin-git": prerelease | ||
"@yarnpkg/plugin-github": prerelease | ||
"@yarnpkg/plugin-npm": prerelease | ||
"@yarnpkg/plugin-npm-cli": prerelease | ||
"@yarnpkg/plugin-pnp": prerelease | ||
"@yarnpkg/pnpify": prerelease | ||
"@yarnpkg/shell": prerelease | ||
|
||
declined: | ||
- "@yarnpkg/plugin-compat" | ||
- "@yarnpkg/plugin-constraints" | ||
- "@yarnpkg/plugin-dlx" | ||
- "@yarnpkg/plugin-exec" | ||
- "@yarnpkg/plugin-file" | ||
- "@yarnpkg/plugin-http" | ||
- "@yarnpkg/plugin-init" | ||
- "@yarnpkg/plugin-interactive-tools" | ||
- "@yarnpkg/plugin-link" | ||
- "@yarnpkg/plugin-node-modules" | ||
- "@yarnpkg/plugin-pack" | ||
- "@yarnpkg/plugin-patch" | ||
- "@yarnpkg/plugin-stage" | ||
- "@yarnpkg/plugin-typescript" | ||
- "@yarnpkg/plugin-version" | ||
- "@yarnpkg/plugin-workspace-tools" | ||
- vscode-zipfs | ||
- "@yarnpkg/builder" | ||
- "@yarnpkg/doctor" | ||
- "@yarnpkg/pnp" |
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 |
---|---|---|
|
@@ -61,20 +61,16 @@ | |
"build:plugin-commands": "node ./scripts/gen-plugin-commands.js > packages/plugin-essentials/sources/pluginCommands.ts", | ||
"build:compile": "rm -rf \"$0\"/lib && mkdir -p \"$0\"/lib && rsync -a --exclude '*.ts' --exclude '*.tsx' --include '*.d.ts' \"$0\"/sources/ \"$0\"/lib/ && node scripts/compile \"$@\"", | ||
"build:compile-inline": "find \"$0\"/sources -name '*.js' && babel \"$0\"/sources --out-dir \"$0\"/sources --extensions .ts,.tsx", | ||
"gen-tssdk": "pnpify --sdk scripts", | ||
"release:all": "./scripts/release.sh", | ||
"test:lint": "eslint \"packages/**/@(sources|tests)/**/!(libzip).@(tsx|ts|js)\"", | ||
"test:unit": "jest", | ||
"sleep": "sleep 10", | ||
"typecheck:all": "tsc --noEmit" | ||
}, | ||
"sherlock": { | ||
"requireList": [ | ||
"scripts/actions/sherlock-prepare.js" | ||
] | ||
}, | ||
"nextVersion": { | ||
"nonce": "6668117343518271" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "ssh://[email protected]/yarnpkg/berry.git" | ||
|
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
2 changes: 1 addition & 1 deletion
2
packages/acceptance-tests/pkg-tests-specs/sources/protocols/links.test.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
19 changes: 19 additions & 0 deletions
19
packages/plugin-git/sources/__snapshots__/gitUtils.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,19 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`gitUtils should properly normalize GitHubOrg/foo-bar.js 1`] = `"https://github.com/GitHubOrg/foo-bar.js.git"`; | ||
|
||
exports[`gitUtils should properly normalize GitHubOrg/foo-bar.js#hash 1`] = `"https://github.com/GitHubOrg/foo-bar.js.git#hash"`; | ||
|
||
exports[`gitUtils should properly normalize git+ssh://[email protected]/TooTallNate/util-deprecate.git#v1.0.1 1`] = `"git+ssh://[email protected]/TooTallNate/util-deprecate.git#v1.0.1"`; | ||
|
||
exports[`gitUtils should properly normalize git://github.com/TooTallNate/util-deprecate.git#v1.0.1 1`] = `"git://github.com/TooTallNate/util-deprecate.git#v1.0.1"`; | ||
|
||
exports[`gitUtils should properly normalize github:GitHubOrg/foo-bar.js 1`] = `"https://github.com/GitHubOrg/foo-bar.js.git"`; | ||
|
||
exports[`gitUtils should properly normalize github:GitHubOrg/foo-bar.js#hash 1`] = `"https://github.com/GitHubOrg/foo-bar.js.git#hash"`; | ||
|
||
exports[`gitUtils should properly normalize https://github.com/TooTallNate/util-deprecate.git#b3562c2798507869edb767da869cd7b85487726d 1`] = `"https://github.com/TooTallNate/util-deprecate.git#b3562c2798507869edb767da869cd7b85487726d"`; | ||
|
||
exports[`gitUtils should properly normalize https://github.com/TooTallNate/util-deprecate.git#master 1`] = `"https://github.com/TooTallNate/util-deprecate.git#master"`; | ||
|
||
exports[`gitUtils should properly normalize https://github.com/TooTallNate/util-deprecate.git#v1.0.0 1`] = `"https://github.com/TooTallNate/util-deprecate.git#v1.0.0"`; |
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,38 @@ | ||
import * as gitUtils from './gitUtils'; | ||
|
||
const VALID_PATTERNS = [ | ||
`GitHubOrg/foo-bar.js`, | ||
`GitHubOrg/foo-bar.js#hash`, | ||
`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#master`, | ||
`https://github.com/TooTallNate/util-deprecate.git#b3562c2798507869edb767da869cd7b85487726d`, | ||
`git://github.com/TooTallNate/util-deprecate.git#v1.0.1`, | ||
`git+ssh://[email protected]/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}`, () => { | ||
expect(gitUtils.normalizeRepoUrl(pattern)).toMatchSnapshot(); | ||
}); | ||
} | ||
}); |
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,18 @@ | ||
import {gitUtils} from '@yarnpkg/plugin-git'; | ||
|
||
import * as githubUtils from './githubUtils'; | ||
|
||
const VALID_PATTERNS = [ | ||
`GitHubOrg/foo-bar.js`, | ||
`GitHubOrg/foo-bar.js#hash`, | ||
`github:GitHubOrg/foo-bar.js`, | ||
`github:GitHubOrg/foo-bar.js#hash`, | ||
]; | ||
|
||
describe(`gitUtils`, () => { | ||
for (const pattern of VALID_PATTERNS) { | ||
it(`should detect ${pattern} as a valid Git url`, () => { | ||
expect(githubUtils.isGithubUrl(gitUtils.normalizeRepoUrl(pattern))).toEqual(true); | ||
}); | ||
} | ||
}); |
Oops, something went wrong.