Skip to content

Commit

Permalink
Rename the berry references into yarnpkg (yarnpkg#395)
Browse files Browse the repository at this point in the history
* Renames everything to the yarnpkg scope

* More renaming

* Fixes snapshots

* Updates the README

* Fixes the merge conflict resolution test

* Updates the documentation
  • Loading branch information
arcanis authored Aug 26, 2019
1 parent 65ac4a9 commit 694e037
Show file tree
Hide file tree
Showing 337 changed files with 4,923 additions and 5,053 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@typescript-eslint/indent": ["error", 2, {"SwitchCase": 1}],
"@typescript-eslint/no-unused-vars": [2, {"args": "none", "ignoreRestSiblings": true}],
"arca/curly": 2,
"arca/import-align": [2, {"collapseExtraSpaces": true}],
"arca/import-align": [2, {"collapseExtraSpaces": true}],
"arca/import-ordering": 2,
"arca/newline-after-import-section": 2,
"arca/no-default-export": 2,
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ yarn-error.log

junit.xml

# The tarballs generated by "yarn pack" are never kept either
package.tgz

# The artifacts generated by "yarn release:all" are never kept
/artifacts
/dist
Expand All @@ -19,4 +22,4 @@ junit.xml
/packages/*/lib/*

# We check-in the PnP hook because it would be heavy to regenerate it before each bundle build
!/packages/berry-pnp/lib/hook.js
!/packages/yarnpkg-pnp/lib/hook.js
6,221 changes: 3,110 additions & 3,111 deletions .pnp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# We don't use Prettier in this repository
# cf https://github.com/yarnpkg/berry/pull/94#issuecomment-486579979

**/*
**/*
4 changes: 2 additions & 2 deletions .vscode/pnpify/typescript/lib/tsserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ 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}`;
process.env.NODE_OPTIONS += ` -r ${require.resolve(`@berry/pnpify`)}`;
process.env.NODE_OPTIONS += ` -r ${require.resolve(`@yarnpkg/pnpify`)}`;

// Apply PnPify to the current process
require(`@berry/pnpify`).patchFs();
require(`@yarnpkg/pnpify`).patchFs();

// Defer to the real typescript/lib/tsserver your application uses
module.exports = require(`typescript/lib/tsserver`);
2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
initScope: berry
initScope: yarnpkg

npmPublishAccess: public

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

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

Clone this repository, then run the following commands:

```
$> yarn build:cli
```bash
yarn build:cli
```

**How it works**
Expand All @@ -68,21 +68,21 @@ Those plugins typically come bundled with Yarn. You don't need to do anything sp
- [★ plugin-constraints](packages/plugin-constraints) adds support for `yarn constraints check` and `yarn constraints fix`.
- [★ plugin-dlx](packages/plugin-dlx) adds support for the [`yarn dlx`](https://yarnpkg.github.io/berry/cli/dlx) command.
- [★ plugin-essentials](packages/plugin-essentials) adds various commands deemed necessary for a package manager (add, remove, ...).
- [★ plugin-file](packages/plugin-file) adds support for using `file:` references as dependencies.
- [★ plugin-file](packages/plugin-file) adds support for using the `file:` protocol within your dependencies.
- [★ 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)
- [★ plugin-http](packages/plugin-http) adds support for using straight URL references as dependencies (tgz archives only).
- [★ plugin-init](packages/plugin-init) adds support for the [`yarn init`](https://yarnpkg.github.io/berry/cli/init) command.
- [★ plugin-link](packages/plugin-link) adds support for using `link:` and `portal:` references as dependencies.
- [★ plugin-npm](packages/plugin-npm) adds support for using [semver ranges]() as dependencies, resolving them to an NPM-like registry.
- [★ 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), ...).
- [★ plugin-npm](packages/plugin-npm) adds support for using [semver ranges](https://semver.org) as dependencies, resolving them to an NPM-like registry.
- [★ 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), ...).
- [★ plugin-pack](packages/plugin-pack) adds support for the [`yarn pack`](https://yarnpkg.github.io/berry/cli/pack) command.
- [★ plugin-pnp](packages/plugin-pnp) adds support for installing Javascript dependencies through the [Plug'n'Play](https://yarnpkg.github.io/berry/features/pnp) specification.

### Contrib plugins

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>`.
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>`.

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

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

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

## Yarn packages

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

- [@berry/builder](packages/berry-builder) contains a CLI tool to package berry and its plugins.
- [@berry/cli](packages/berry-cli) is a CLI entry point built on top of [@berry/core](packages/berry-core).
- [@yarnpkg/builder](packages/yarnpkg-builder) contains a CLI tool to package berry and its plugins.
- [@yarnpkg/cli](packages/yarnpkg-cli) is a CLI entry point built on top of [@yarnpkg/core](packages/yarnpkg-core).
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ module.exports = {
`@babel/preset-typescript`,
],
ignore: [
`packages/berry-libzip/sources/libzip.js`,
`packages/yarnpkg-libzip/sources/libzip.js`,
],
};
2 changes: 1 addition & 1 deletion constraints.pro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ constraints_min_version(1).

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

% This rule will enforce that a workspace MUST depend on the same version of a dependency as the one used by the other workspaces
gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange2, DependencyType) :-
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
testEnvironment: require.resolve(`jest-environment-node`),
transformIgnorePatterns: [`${__dirname}/packages/berry-libzip/sources/libzip.js$`, `/.pnp.js$`],
transformIgnorePatterns: [`${__dirname}/packages/yarnpkg-libzip/sources/libzip.js$`, `/.pnp.js$`],
modulePathIgnorePatterns: [`<rootDir>/packages/acceptance-tests`],
reporters: [`default`, [require.resolve(`jest-junit`), {output: `<rootDir>/junit.xml`}]],
};
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"name": "@berry/monorepo",
"name": "@yarnpkg/monorepo",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/arcanis/berry-actions.git"
},
"workspaces": [
"packages/*"
],
Expand All @@ -18,7 +14,6 @@
"@babel/preset-env": "^7.3.1",
"@babel/preset-typescript": "^7.3.3",
"@babel/register": "^7.5.5",
"@berry/pnpify": "workspace:2.0.0-rc.1",
"@types/camelcase": "5.2.0",
"@types/chalk": "2.2.0",
"@types/cross-spawn": "6.0.0",
Expand Down Expand Up @@ -61,6 +56,7 @@
"@types/yup": "0.26.12",
"@typescript-eslint/eslint-plugin": "^1.7.0",
"@typescript-eslint/parser": "^1.6.0",
"@yarnpkg/pnpify": "workspace:2.0.0-rc.1",
"babel-jest": "^24.5.0",
"eslint": "^5.16.0",
"eslint-plugin-arca": "^0.9.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/acceptance-tests/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = Object.assign({}, require(`@berry/monorepo/jest.config.js`), {
module.exports = Object.assign({}, require(`@yarnpkg/monorepo/jest.config.js`), {
modulePathIgnorePatterns: [`pkg-tests-fixtures`],
setupFilesAfterEnv: [require.resolve(`./berry.setup.js`)],
setupFilesAfterEnv: [require.resolve(`./yarn.setup.js`)],
});
4 changes: 2 additions & 2 deletions packages/acceptance-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"pkg-tests-specs"
],
"dependencies": {
"@berry/fslib": "workspace:2.0.0-rc.1",
"@berry/monorepo": "workspace:0.0.0",
"@yarnpkg/fslib": "workspace:2.0.0-rc.1",
"@yarnpkg/monorepo": "workspace:0.0.0",
"is-wsl": "^1.1.0"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/acceptance-tests/pkg-tests-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"main": "./sources/index.js",
"dependencies": {
"@berry/fslib": "workspace:2.0.0-rc.1",
"@yarnpkg/fslib": "workspace:2.0.0-rc.1",
"invariant": "^2.2.4",
"klaw": "^2.1.1",
"minimatch": "^3.0.4",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const {NodeFS} = require(`@berry/fslib`);
const {NodeFS} = require(`@yarnpkg/fslib`);
const cp = require('child_process');

exports.execFile = function(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Gzip} from 'zlib';
import {xfs, NodeFS, PortablePath, ppath, Filename} from '@berry/fslib';
import {xfs, NodeFS, PortablePath, ppath, Filename} from '@yarnpkg/fslib';

const klaw = require('klaw');
const tarFs = require('tar-fs');
Expand Down
2 changes: 1 addition & 1 deletion packages/acceptance-tests/pkg-tests-fixtures/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const {NodeFS} = require('@berry/fslib');
const {NodeFS} = require('@yarnpkg/fslib');

module.exports = NodeFS.toPortablePath(__dirname);
2 changes: 1 addition & 1 deletion packages/acceptance-tests/pkg-tests-fixtures/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "pkg-tests-fixtures",
"private": true,
"dependencies": {
"@berry/fslib": "workspace:2.0.0-rc.1"
"@yarnpkg/fslib": "workspace:2.0.0-rc.1"
},
"scripts": {
"copy-index": "find packages -type d -mindepth 1 -maxdepth 1 | while read pkg; do cp default-index.js \"$pkg/index.js\"; done"
Expand Down
6 changes: 3 additions & 3 deletions packages/acceptance-tests/pkg-tests-specs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"private": true,
"main": "./sources/index.js",
"dependencies": {
"@berry/fslib": "workspace:2.0.0-rc.1",
"@berry/monorepo": "workspace:0.0.0",
"@berry/parsers": "workspace:2.0.0-rc.1",
"@yarnpkg/fslib": "workspace:2.0.0-rc.1",
"@yarnpkg/monorepo": "workspace:0.0.0",
"@yarnpkg/parsers": "workspace:2.0.0-rc.1",
"fs-extra": "^7.0.1",
"pkg-tests-core": "workspace:0.0.0",
"semver": "^5.6.0"
Expand Down
Loading

0 comments on commit 694e037

Please sign in to comment.