Skip to content

Commit 7efa65e

Browse files
authored
Rename the berry references into yarnpkg (#395)
* Renames everything to the yarnpkg scope * More renaming * Fixes snapshots * Updates the README * Fixes the merge conflict resolution test * Updates the documentation
1 parent a9fbe4c commit 7efa65e

File tree

337 files changed

+4923
-5053
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

337 files changed

+4923
-5053
lines changed

.eslintrc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"@typescript-eslint/indent": ["error", 2, {"SwitchCase": 1}],
1818
"@typescript-eslint/no-unused-vars": [2, {"args": "none", "ignoreRestSiblings": true}],
1919
"arca/curly": 2,
20-
"arca/import-align": [2, {"collapseExtraSpaces": true}],
20+
"arca/import-align": [2, {"collapseExtraSpaces": true}],
2121
"arca/import-ordering": 2,
2222
"arca/newline-after-import-section": 2,
2323
"arca/no-default-export": 2,

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ yarn-error.log
55

66
junit.xml
77

8+
# The tarballs generated by "yarn pack" are never kept either
9+
package.tgz
10+
811
# The artifacts generated by "yarn release:all" are never kept
912
/artifacts
1013
/dist
@@ -19,4 +22,4 @@ junit.xml
1922
/packages/*/lib/*
2023

2124
# We check-in the PnP hook because it would be heavy to regenerate it before each bundle build
22-
!/packages/berry-pnp/lib/hook.js
25+
!/packages/yarnpkg-pnp/lib/hook.js

.pnp.js

+3,110-3,111
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.prettierignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# We don't use Prettier in this repository
22
# cf https://github.com/yarnpkg/berry/pull/94#issuecomment-486579979
33

4-
**/*
4+
**/*

.vscode/pnpify/typescript/lib/tsserver.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ require(absPnpApiPath).setup();
77
// Prepare the environment (to be ready in case of child_process.spawn etc)
88
process.env.NODE_OPTIONS = process.env.NODE_OPTIONS || ``;
99
process.env.NODE_OPTIONS += ` -r ${absPnpApiPath}`;
10-
process.env.NODE_OPTIONS += ` -r ${require.resolve(`@berry/pnpify`)}`;
10+
process.env.NODE_OPTIONS += ` -r ${require.resolve(`@yarnpkg/pnpify`)}`;
1111

1212
// Apply PnPify to the current process
13-
require(`@berry/pnpify`).patchFs();
13+
require(`@yarnpkg/pnpify`).patchFs();
1414

1515
// Defer to the real typescript/lib/tsserver your application uses
1616
module.exports = require(`typescript/lib/tsserver`);

.yarnrc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
initScope: berry
1+
initScope: yarnpkg
22

33
npmPublishAccess: public
44

README.md

+18-18
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Yarn is a modern package manager split into various packages. Its novel architec
2323
- Yarn supports Node by default but isn't limited to it - plugins can add support for other languages
2424
- Yarn supports [workspaces](https://yarnpkg.github.io/berry/features/workspaces) natively, and its CLI takes advantage of that
2525
- Yarn uses a portable shell to execute package scripts, guaranteeing they work the same way on Windows and Linux
26-
- Yarn is first and foremost a Node API that can be used programmatically (via [@berry/core](packages/berry-core))
26+
- Yarn is first and foremost a Node API that can be used programmatically (via [@yarnpkg/core](packages/yarnpkg-core))
2727
- Yarn is written in TypeScript, and fully typechecked
2828

2929
## Install
@@ -47,8 +47,8 @@ On top of our classic integration tests, we also run Yarn every day against the
4747

4848
Clone this repository, then run the following commands:
4949

50-
```
51-
$> yarn build:cli
50+
```bash
51+
yarn build:cli
5252
```
5353

5454
**How it works**
@@ -68,21 +68,21 @@ Those plugins typically come bundled with Yarn. You don't need to do anything sp
6868
- [★ plugin-constraints](packages/plugin-constraints) adds support for `yarn constraints check` and `yarn constraints fix`.
6969
- [★ plugin-dlx](packages/plugin-dlx) adds support for the [`yarn dlx`](https://yarnpkg.github.io/berry/cli/dlx) command.
7070
- [★ plugin-essentials](packages/plugin-essentials) adds various commands deemed necessary for a package manager (add, remove, ...).
71-
- [★ plugin-file](packages/plugin-file) adds support for using `file:` references as dependencies.
71+
- [★ plugin-file](packages/plugin-file) adds support for using the `file:` protocol within your dependencies.
7272
- [★ plugin-github](packages/plugin-github) adds support for using Github references as dependencies. [This plugin doesn't use git.](https://stackoverflow.com/a/13636954/880703)
7373
- [★ plugin-http](packages/plugin-http) adds support for using straight URL references as dependencies (tgz archives only).
7474
- [★ plugin-init](packages/plugin-init) adds support for the [`yarn init`](https://yarnpkg.github.io/berry/cli/init) command.
7575
- [★ plugin-link](packages/plugin-link) adds support for using `link:` and `portal:` references as dependencies.
76-
- [★ plugin-npm](packages/plugin-npm) adds support for using [semver ranges]() as dependencies, resolving them to an NPM-like registry.
77-
- [★ plugin-npm-cli](packages/plugin-npm-cli) adds support for the NPM-specific commands (`yarn npm login`, [`yarn npm publish`](https://yarnpkg.github.io/berry/cli/npm/publish), ...).
76+
- [★ plugin-npm](packages/plugin-npm) adds support for using [semver ranges](https://semver.org) as dependencies, resolving them to an NPM-like registry.
77+
- [★ plugin-npm-cli](packages/plugin-npm-cli) adds support for the NPM-specific commands ([`yarn npm login`](https://yarnpkg.github.io/berry/cli/npm/login), [`yarn npm publish`](https://yarnpkg.github.io/berry/cli/npm/publish), ...).
7878
- [★ plugin-pack](packages/plugin-pack) adds support for the [`yarn pack`](https://yarnpkg.github.io/berry/cli/pack) command.
7979
- [★ plugin-pnp](packages/plugin-pnp) adds support for installing Javascript dependencies through the [Plug'n'Play](https://yarnpkg.github.io/berry/features/pnp) specification.
8080

8181
### Contrib plugins
8282

83-
Although developed on the same repository as Yarn itself, those plugins are optionals and need to be explicitly installed through `yarn plugin import @berry/<plugin-name>`.
83+
Although developed on the same repository as Yarn itself, those plugins are optionals and need to be explicitly installed through `yarn plugin import @yarnpkg/<plugin-name>`.
8484

85-
- [☆ plugin-exec](packages/plugin-exec) adds support for using `exec:` references as dependencies.
85+
- [☆ plugin-exec](packages/plugin-exec) adds support for using the `exec:` protocol within your dependencies.
8686
- [☆ plugin-stage](packages/plugin-pack) adds support for the [`yarn stage`](https://yarnpkg.github.io/berry/cli/stage) command.
8787
- [☆ plugin-typescript](packages/plugin-typescript) improves the user experience when working with TypeScript.
8888
- [☆ plugin-workspace-tools](packages/plugin-workspace-tools) adds support for the [`yarn workspaces foreach`](https://yarnpkg.github.io/berry/cli/workspaces/foreach) command.
@@ -99,18 +99,18 @@ To create your own plugin, please refer to the [documentation](https://yarnpkg.g
9999

100100
The following packages are generic and can be used in a variety of purposes (including to implement other package managers, but not only):
101101

102-
- [@berry/core](packages/berry-core) allows any application to manipulate a project programmatically.
103-
- [@berry/fslib](packages/berry-fslib) is a set of tools to efficiently abstract filesystem accesses.
104-
- [@berry/json-proxy](packages/berry-json-proxy) allows to temporarily convert any POD object to an immutable object.
105-
- [@berry/libzip](packages/berry-libzip) contains zlib+libzip bindings compiled to WebAssembly.
106-
- [@berry/parsers](packages/berry-parsers) can be used to parse [Syml]() and the language used by [berry-shell](packages/berry-shell).
107-
- [@berry/pnp](packages/berry-pnp) can be used to generate [Plug'n'Play](https://yarnpkg.github.io/berry/features/pnp)-compatible hooks.
108-
- [@berry/pnpify](packages/berry-pnpify) is a CLI tool to transparently add PnP support to various tools.
109-
- [@berry/shell](packages/berry-shell) is a portable bash-like shell interpreter.
102+
- [@yarnpkg/core](packages/yarnpkg-core) allows any application to manipulate a project programmatically.
103+
- [@yarnpkg/fslib](packages/yarnpkg-fslib) is a set of tools to abstract the filesystem through type-safe primitives.
104+
- [@yarnpkg/json-proxy](packages/yarnpkg-json-proxy) allows to temporarily convert any POD object to an immutable object.
105+
- [@yarnpkg/libzip](packages/yarnpkg-libzip) contains zlib+libzip bindings compiled to WebAssembly.
106+
- [@yarnpkg/parsers](packages/yarnpkg-parsers) can be used to parse the language used by [@yarnpkg/shell](packages/yarnpkg-shell).
107+
- [@yarnpkg/pnp](packages/yarnpkg-pnp) can be used to generate [Plug'n'Play](https://yarnpkg.github.io/berry/features/pnp)-compatible hooks.
108+
- [@yarnpkg/pnpify](packages/yarnpkg-pnpify) is a CLI tool to transparently add PnP support to various tools.
109+
- [@yarnpkg/shell](packages/yarnpkg-shell) is a portable bash-like shell interpreter.
110110

111111
## Yarn packages
112112

113113
The following packages are meant to be used by Yarn itself, and probably won't be useful to other applications:
114114

115-
- [@berry/builder](packages/berry-builder) contains a CLI tool to package berry and its plugins.
116-
- [@berry/cli](packages/berry-cli) is a CLI entry point built on top of [@berry/core](packages/berry-core).
115+
- [@yarnpkg/builder](packages/yarnpkg-builder) contains a CLI tool to package berry and its plugins.
116+
- [@yarnpkg/cli](packages/yarnpkg-cli) is a CLI entry point built on top of [@yarnpkg/core](packages/yarnpkg-core).

babel.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ module.exports = {
88
`@babel/preset-typescript`,
99
],
1010
ignore: [
11-
`packages/berry-libzip/sources/libzip.js`,
11+
`packages/yarnpkg-libzip/sources/libzip.js`,
1212
],
1313
};

constraints.pro

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ constraints_min_version(1).
22

33
% This file is written in Prolog
44
% It contains rules that the project must respect.
5-
% In order to see them in action, run `berry constraints detail`
5+
% In order to see them in action, run `yarn constraints detail`
66

77
% This rule will enforce that a workspace MUST depend on the same version of a dependency as the one used by the other workspaces
88
gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange2, DependencyType) :-

jest.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
22
testEnvironment: require.resolve(`jest-environment-node`),
3-
transformIgnorePatterns: [`${__dirname}/packages/berry-libzip/sources/libzip.js$`, `/.pnp.js$`],
3+
transformIgnorePatterns: [`${__dirname}/packages/yarnpkg-libzip/sources/libzip.js$`, `/.pnp.js$`],
44
modulePathIgnorePatterns: [`<rootDir>/packages/acceptance-tests`],
55
reporters: [`default`, [require.resolve(`jest-junit`), {output: `<rootDir>/junit.xml`}]],
66
};

package.json

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
{
2-
"name": "@berry/monorepo",
2+
"name": "@yarnpkg/monorepo",
33
"private": true,
4-
"repository": {
5-
"type": "git",
6-
"url": "https://github.com/arcanis/berry-actions.git"
7-
},
84
"workspaces": [
95
"packages/*"
106
],
@@ -18,7 +14,6 @@
1814
"@babel/preset-env": "^7.3.1",
1915
"@babel/preset-typescript": "^7.3.3",
2016
"@babel/register": "^7.5.5",
21-
"@berry/pnpify": "workspace:2.0.0-rc.1",
2217
"@types/camelcase": "5.2.0",
2318
"@types/chalk": "2.2.0",
2419
"@types/cross-spawn": "6.0.0",
@@ -61,6 +56,7 @@
6156
"@types/yup": "0.26.12",
6257
"@typescript-eslint/eslint-plugin": "^1.7.0",
6358
"@typescript-eslint/parser": "^1.6.0",
59+
"@yarnpkg/pnpify": "workspace:2.0.0-rc.1",
6460
"babel-jest": "^24.5.0",
6561
"eslint": "^5.16.0",
6662
"eslint-plugin-arca": "^0.9.0",
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = Object.assign({}, require(`@berry/monorepo/jest.config.js`), {
1+
module.exports = Object.assign({}, require(`@yarnpkg/monorepo/jest.config.js`), {
22
modulePathIgnorePatterns: [`pkg-tests-fixtures`],
3-
setupFilesAfterEnv: [require.resolve(`./berry.setup.js`)],
3+
setupFilesAfterEnv: [require.resolve(`./yarn.setup.js`)],
44
});

packages/acceptance-tests/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"pkg-tests-specs"
88
],
99
"dependencies": {
10-
"@berry/fslib": "workspace:2.0.0-rc.1",
11-
"@berry/monorepo": "workspace:0.0.0",
10+
"@yarnpkg/fslib": "workspace:2.0.0-rc.1",
11+
"@yarnpkg/monorepo": "workspace:0.0.0",
1212
"is-wsl": "^1.1.0"
1313
},
1414
"scripts": {

packages/acceptance-tests/pkg-tests-core/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"private": true,
44
"main": "./sources/index.js",
55
"dependencies": {
6-
"@berry/fslib": "workspace:2.0.0-rc.1",
6+
"@yarnpkg/fslib": "workspace:2.0.0-rc.1",
77
"invariant": "^2.2.4",
88
"klaw": "^2.1.1",
99
"minimatch": "^3.0.4",

packages/acceptance-tests/pkg-tests-core/sources/utils/exec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const {NodeFS} = require(`@berry/fslib`);
1+
const {NodeFS} = require(`@yarnpkg/fslib`);
22
const cp = require('child_process');
33

44
exports.execFile = function(

packages/acceptance-tests/pkg-tests-core/sources/utils/fs.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {Gzip} from 'zlib';
2-
import {xfs, NodeFS, PortablePath, ppath, Filename} from '@berry/fslib';
2+
import {xfs, NodeFS, PortablePath, ppath, Filename} from '@yarnpkg/fslib';
33

44
const klaw = require('klaw');
55
const tarFs = require('tar-fs');
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
const {NodeFS} = require('@berry/fslib');
1+
const {NodeFS} = require('@yarnpkg/fslib');
22

33
module.exports = NodeFS.toPortablePath(__dirname);

packages/acceptance-tests/pkg-tests-fixtures/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "pkg-tests-fixtures",
33
"private": true,
44
"dependencies": {
5-
"@berry/fslib": "workspace:2.0.0-rc.1"
5+
"@yarnpkg/fslib": "workspace:2.0.0-rc.1"
66
},
77
"scripts": {
88
"copy-index": "find packages -type d -mindepth 1 -maxdepth 1 | while read pkg; do cp default-index.js \"$pkg/index.js\"; done"

packages/acceptance-tests/pkg-tests-specs/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"private": true,
44
"main": "./sources/index.js",
55
"dependencies": {
6-
"@berry/fslib": "workspace:2.0.0-rc.1",
7-
"@berry/monorepo": "workspace:0.0.0",
8-
"@berry/parsers": "workspace:2.0.0-rc.1",
6+
"@yarnpkg/fslib": "workspace:2.0.0-rc.1",
7+
"@yarnpkg/monorepo": "workspace:0.0.0",
8+
"@yarnpkg/parsers": "workspace:2.0.0-rc.1",
99
"fs-extra": "^7.0.1",
1010
"pkg-tests-core": "workspace:0.0.0",
1111
"semver": "^5.6.0"

0 commit comments

Comments
 (0)