* Initial pnp implementation
* Adds the pnp-env directory for quick checks
* Improves the "yarn node" command so that it works with pnp
Branch: yarn-node-pnp
* Adds the pnp tests to the pkg-tests testsuite
Branch: pkg-tests
* Fixes various issues with the pnp map generation
Branch: pnp-map-improvements
* Remove the scriptsPrependNodePath option
Branch: lifecycle-wrappers-remove-option
* Adds tests to ensure that the lifecycle scripts are called with the right binaries
Branch: lifecycle-wrappers-tests
* Fixes linting
Branch: lifecycle-wrappers-flowlint
* Improve the error message when an optional required dependency hasn't been installed
Branch: lifecycle-wrappers-improve-pnp-error
* Implements lifecycle wrappers
Branch: lifecycle-wrappers-main
* Adds .pnp.js files to the gitignore
* Fallbacks to the toplevel dependencies when a transitive dependency cannot be resolved
* Fixes an issue inside the pkg-tests helper
Branch: pkg-tests-helper-definition
* Improves the fixtures so that they also return info about their dev and peer dependencies
Branch: dev-peer-fixtures
* Finishes to hide plugnplay behind a yarnrc option (`plugnplay-experimental`)
Branch: option-plugnplay-experimental
* Adds failing tests for pnp peer dependencies
Branch: pnp-peer-dependencies-failing
* Prettifies the generated pnp files
* Adds the plugnplay flag to the integrity check
* Removes the pnp file at link-time if installing with pnp disabled
* Improves pnp maps compatibility
* Prevents "yarn check" from checking the node_modules existence when under pnp
* Adds a missing package to the request cache
* Fixes tests
Branch: pnp-fix-tests
* Reimplements the resolution to correctly account for peer dependencies
Branch: better-faster-stronger
* Externalizes the creation of proxy scripts
Branch: portable-proxy-scripts
* Implements support for `yarn run` within pnp-enabled installations
Branch: pnp-yarn-run
* Makes it possible for dependency binaries to require their own dependencies
Branch: pnp-yarn-run-dependencies
* Moves the pnp embed api into its own file
* Adds the test folder to Jest error messages
Branch: jest-better-message
* Improves peer dependency tests
Branch: peer-deps-tests
* Adds tests for require.resolve
Branch: require-resolve-tests
* Refactors the pnp file
Branch: pnp-file-refactoring
* Updates the build-webpack script to include a custom resolver
Branch: webpack-resolver
* Fixes tests
Branch: fix-tests
* Generates virtual when using peer dependencies
Branch: virtual-packages
* Refactors the generated pnp files to use the newly generated maps
Branch: pnp-refactor-find
* Implements Module._findPath
Branch: module-findpath
* Adds tests for workspaces
Branch: workspace-tests
* Fixes top level detection
Branch: fix-top-level-detection
* Implements workspaces support in pnp
Branch: pnp-workspaces
* Automatically adds workspaces as dependencies of the top-level
Branch: auto-workspace-dependencies
* Updates the cache path to include the 'node_modules' string
Branch: node-modules-cache
* Prevents pnp from bootstrapping when running non-pnp-installed scripts
Branch: fix-npm-run
* Installs peer dependencies symlinks inside a project folder
Branch: per-project-virtual-deps
* Adds a sample application that showcases webpack, babel, react, jest
Branch: sample-app
* Ignores the .pnp directory
Branch: ignore-pnp
* Implements a blacklist that throws nicer errors when a package is required through a realpath'd path.
Branch: location-blacklist
* Changes the order the locations are matched to package locators
Branch: location-to-locator-match-order
* Automatically adds packages as dependencies of themselves if possible
Branch: implicit-self
* Updates the node resolution
Branch: node-resolution-improvements
* Ensures that binaries are set as executable in the cache
Branch: chmod-bins
* Disables integrity checks when running under pnp
Branch: pnp-no-integrity
* Makes the .pnp.js file an actual executable that can be used as a resolution server
Branch: pnp-executable
* Removes pnp-env
* Fixes a few tests
* Fixes snapshots
* Fixes the lockfile not being written when using pnp
Branch: fix-lockfile
* Fixes the `yarn node` command being incorrectly forwarded arguments
Branch: fix-yarn-node
* Uses symlinks instead of a script for bin indirection to allow calling them directly through Node
Branch: bin-symlinks
* Adds a `yarn bin <name>` command that returns the path of the specified bin on the disk
Branch: yarn-bin-name
* Implements an --into option to yarn node/yarn run
Branch: opt-into
* Implements the `--pnp` option
Branch: pnp-option
* Adds new tests for checking that packages are correctly locked
Branch: lock-tests
* Bugfixes
This diff ships with two fixes:
- Fixes calling a pnp script from a non-pnp scripts
- Fixes relative requires from binaries
It also adds tests for all those cases
Branch: bugfixes
* Fixes workspace registration
Branch: workspace-registration-fix
* Uses --enable-pnp (alias --pnp) and --disable-pnp
Branch: instalconfig-pnp
* Adds the issuer into the error messages when requesting a package one shouldn't have access to.
Branch: via-issuer
* Implements extendedQualifiedPathResolution
Branch: extended-qualified-path-resolution
* Changes the return of the pnp daemon to return json data
* Implements custom shebangs for the pnp file
* Changes the return of the pnp-exposed functions to return null with builtins
* Various fixes & improvements
* Adds a test, prettier, fixes a test
* Don't iterate on the registries
* Renames YARN_PLUGNPLAY_EXPERIMENTAL into YARN_PLUGNPLAY_OVERRIDE
* Avoids touching the .pnp.js file when it doesn't need to change
* Reworks the cache path to contain the "node_modules/<pkg-name>" string
* Shims resolve#isCore
* Improves error messages
* Fixes the environment cast to allow passing false/0
* Implements a pnp blacklist settings
* Fixes the fallback resolution to use _resolveFilename instead of _finePath
* Fixes fallback relative path resolution
* Implements require.cache
* Prevents pnp from being enabled on Windows
* Removes absolute paths from the pnp files
* Implements a super basic offline cache integration
* feat(pnp): eject package command (#92)
* test(pnp): support ejecting packages
* feat(pnp): eject package command
* test(pnp): use fs.readdir instead of fs.readdirSync
* test(pnp): do not expect specific error message
* refactor(pnp): move eject logic to package linker
* fix(pnp): change ejected folder to .pnp/ejected/pkgName-pkgVersion/node_modules/pkgName
* fix(pnp): do not re-eject package
* test(pnp): do not rely on installConfig
* Fixes yarn bin
* Preserves the node_modules components in zip paths
* Fixes the offline cache
* Adds a VERSIONS field into the generated resolver
* Exposes the "extensions" option to "resolveRequest"
* Renames yarn eject into yarn unplug
* Tweaks yarn unplug
* Removes packageMainEntry from the package information
* Makes "unplug" print the list of unplugged packages
* Unplugs postinstall packages automatically
* Renames things
* Adds a warning on Windows to notify that PnP settings are ignored at the moment
* Fixes the default shebang
* Exports pnpapi
* Reworks the resolve shim to only affect liftoff
* Guards the pnp file against fs extensions
* Fixes the resolve shim
* Fixes a broken test
* Re-enables the focus tests
* Stops relying on bash for test scripts
* Fixes nohoist
* Revert "Fixes a broken test"
This reverts commit 84358aa507.
* Ensures that the getPackageInformation function returns an absolute path
looks like accidently checked in a few days ago, we should not keep this file in the repo since every vscode dev will most likely have their custom settings for their own dev env.
Instead of including all the raw JS files in the dist tarball, just use the single Yarn JS file that's built as part of the build, along with a few other files that are required. This significantly reduces the number of files in the tarball:
```
C:\src\yarn\dist (bundle-as-dist) (yarn@0.23.0-0)
λ find .
.
./bin
./bin/node-gyp-bin
./bin/node-gyp-bin/node-gyp
./bin/node-gyp-bin/node-gyp.cmd
./bin/yarn
./bin/yarn.cmd
./bin/yarn.js
./bin/yarnpkg
./bin/yarnpkg.cmd
./lib
./lib/v8-compile-cache.js
./lib/yarn-cli.js
./LICENSE
./package.json
```
There are three .js files in the archive:
- `lib/v8-compile-cache.js`: Speeds up instantiation time by using the V8 code cache (https://www.npmjs.com/package/v8-compile-cache). This needs to be separate as it has to load **before** the bulk of the application code is loaded, so it can **not** be bundled
- `lib/yarn-cli.js`: Contains all the bundled Yarn code
- `bin/yarn.js`: Entry point to the app, just like today. Loads `v8-compile-cache` then loads `yarn-cli`
This change means that **only** the JavaScript files that are actually used are included, resulting in a nice file size reduction for the installation packages:

Differences are due to differing compression algorithms: Debian packages use xz or LZMA, RedHat uses gzip, Windows installer uses Cabinet
They're also slightly faster to extract:

Testing was performed on my desktop computer (Intel Core i5 6500, Samsung 850 Evo 1TB SSD, Windows 10), with testing for Linux stuff (like installing the Debian package) tested in a Docker container.
Raw data: https://docs.google.com/spreadsheets/d/1d8jdf3DU_GUFdotlPl08PkYa8SkzStK2tgnQ54ivsm0/edit?usp=sharing
Performance is very slightly faster when using `v8-compile-cache` along with the bundled file, but it's not extremely significant (`yarn --version` went from 0.19s to 0.14s on my BuyVM server). The difference might be bigger on servers with slower disks (HDD) or with more overloaded servers.
I also deleted the `build-dist.ps1` file because we _should_ be able to assume that Bash is available on Windows, particularly if Git is installed (as it comes with Git Bash). I need to verify that this works on AppVeyor.
* add init command - closes#360
* list available commands and examples in cli help - fixes#345
* add outdated command - fixes#379
* rename uninstall command to remove
* add global command - fixes#227
* remove command aliases
* fix licenses not being shown due to integrity check shortcircuiting - fixes#424
* turn aliases back into js
* clean up single instance arguments - fixes#308
* ignore arguments that are included after -- - fixes#251
* add unlink command
* add lint rule against non-language keys
* clean up Config initialisation
* add link command - closes#336
* support array of string engines - fixes#447
* add missing request cache fixtures
* polish link command
* remove gulp file output
* add config command - fixes#378
* add yarn.lock and fix constants
* update aliases
* add missing i18n for CLI
* make `upgrade` command work how you'd expect
* update test metamethod
* require arguments for add command
* move dependency objects into constnats
* add init command - closes#360
* list available commands and examples in cli help - fixes#345
* add outdated command - fixes#379
* rename uninstall command to remove
* add global command - fixes#227
* remove command aliases
* fix licenses not being shown due to integrity check shortcircuiting - fixes#424
* turn aliases back into js
* clean up single instance arguments - fixes#308
* ignore arguments that are included after -- - fixes#251
* add unlink command
* add lint rule against non-language keys
* clean up Config initialisation
* add link command - closes#336
* support array of string engines - fixes#447
* polish link command
* remove gulp file output
* add config command - fixes#378
* add yarn.lock and fix constants
* fix lint, copy test fixtures to temp directory rather than mutating cwd
* fix lint
* add handler for extractor errors
* remove unused jest snapshot
* fix check-lockfile script
* fix lint
* fix check-lockfile
* try and fix test
* properly copy over lockfile scripts folder, ignore ds_store files in test directories
* remove problematic fixtures
* add back problematic fixtures
* disable test
* Script to build Debian package
* Adjustments for Debian scripts:
- Add copyright file
- Add full description to control file
- Ignore some lintian rules
- Delete clowny files that aren't needed and break lintian rules
- Update shebang in yarn.js from "node" to "nodejs" as per Debian package of Node
* Add basic Debian instructions
* Revert readme change and explicitly require Node.js 4 or above