v1.0.0
yarnpkg/yarnv1.0.0Sep 5, 2017by DanBuild
AI Summary
The first stable major release of Yarn, introducing Workspaces by default, improved command behavior, and lockfile parsing capabilities, alongside several breaking changes to command syntax and dependency protocols.
Key Highlights
- Workspaces enabled by default
- Added `--cwd` flag to run Yarn in a specific directory
- Lockfile parser extracted to `@yarnpkg/lockfile` package
Breaking Changes
- Renamed `yarn clean` to `yarn autoclean`
- Removed `yarn ... ls` and `yarn ... rm` commands
- Deprecates implicit `file:` protocol, requiring package dirs
- Prevents `yarn add` from being run from workspace root without `--dev`
- Commands run via `yarn run` now forward trailing options automatically
New Features
- Top-level package.json can override nested dependency versions
- Added `yarn-path` rc config parameter
- Implements `-v` command to show version
- Detects and merges lockfile conflicts without user input
- Adds preliminary support for `//` comments in package.json dependencies
- Supports `git+***://` dependencies
Full Release Notes
## Features
* __Feature: Allows the top-level package.json to override nested dependencies versions__
[kaylieEB](mailto:kaylie@eventbrite.com) - (#4105)
* __Feature: Adds a `yarn-path` rc config parameter__
[Maël Nison](mailto:nison.mael@gmail.com) - (#4204)
* __Feature: Enables Workspaces by default__
[Burak Yiğit Kaya](mailto:ben@byk.im) - (#4262)
* __Feature: Commands are now ran from the cwd package root if possible__
[Maël Nison](mailto:nison.mael@gmail.com) - (#4246)
* __Feature: Exposes the lockfile parser into its own npm package (`@yarnpkg/lockfile`)__
[William Hilton](mailto:wmhilton@gmail.com) - (#4114)
* __Feature: Implements a `--cwd` flag to run Yarn in a specific directory__
[Sebastian McKenzie](mailto:kittens@users.noreply.github.com) - (#4174)
* __Feature: Implements the `-v` command to show Yarn's version when specified without other commands__
[kaylieEB](mailto:kaylie@eventbrite.com) - (#3913)
* __Feature: Detects and merges lockfile conflicts without user input__
[Sebastian McKenzie](mailto:kittens@users.noreply.github.com) - (#3544)
* __Feature: Adds a preliminary support for `//` comments in package.json dependencies__
[Joachim Seminck](mailto:joachim.seminck@gmail.com) - (#3829)
## Breaking changes
* __Breaking: Commands run via `yarn run` are now automatically forwarded trailing options__
[Maël Nison](mailto:nison.mael@gmail.com) - (#4152)
* __Breaking: Renames `yarn clean` to `yarn autoclean`__
[Jeff Valore](mailto:rally25rs@yahoo.com) - (#4252)
* __Breaking: Deprecates the implicit `file:` protocol, and only allow package dirs__
[Burak Yiğit Kaya](mailto:ben@byk.im) - (#4257)
* __Breaking: Prevents `yarn add` from being run from a workspace root directory without `--dev`__
[Maël Nison](mailto:nison.mael@gmail.com) - (#4166)
* __Breaking: Removes support for the `yarn ... ls` commands (use `list` instead of `ls`)__
[Tiago Pina](mailto:tiagoaspina@gmail.com) - (#4045)
* __Breaking: Removes support for the `yarn ... rm` commands (use `remove` instead of `rm`)__
[Tiago Pina](mailto:tiagoaspina@gmail.com) - (#3989)
* __Breaking: Validates the top-level `package.json` engines__
[Adam Crabtree](mailto:dude@noderiety.com) - (#3675)
## Improvements
* __Improvement: Adds support for `git+***://` dependencies__
[Jeremy Judeaux](mailto:Volune@users.noreply.github.com) - (#3735)
* __Improvement: Reimplements part of the integrity check to be faster and stronger__
[Maël Nison](mailto:nison.mael@gmail.com) - (#4122)
* __Improvement: Warns when there's a missing bundledDependencies__
[Jeff Valore](mailto:rally25rs@yahoo.com) - (#4046)
* __Improvement: Implements a `/tmp` fallback if the preferred cache folders aren't writable__
[Maël Nison](mailto:nison.mael@gmail.com) - (#4143)
* __Improvement: Optimizes the hoisting process on large dependency trees__
[Kenneth Chau](mailto:kenotron@users.noreply.github.com) - (#4222)
* __Improvement: Improves the error message when the tarball fetcher detects a bad hash__
[kaylieEB](mailto:kaylie@eventbrite.com) - (#4240)
* __Improvement: Adds a `--private` flag on the `yarn init` command__
[Pierre Neter](mailto:pierreneter@gmail.com) - (#4165)
* __Improvement: Adds support for Github URL shorthands to `yarn init`__
[Frederick Morlock](mailto:FrederickGeek8@gmail.com) - (#4012)
* __Improvement: Improves the way packages referenced via the `file:` protocol are dedupped__
[Jack Aldridge](mailto:jack@aldridge.io) - (#3945)
* __Improvement: Yarn is now distributed on NPM as a single file__
[Daniel Lo Nigro](mailto:daniel@dan.cx) - (#3866)
* __Improvement: Adds retry on 5xx errors__
[Rifat Nabi](mailto:to.rifat@gmail.com) - (#3686)
* __Improvement: Prevents creating a lockfile when there's no dependencies__
[Pig Fang](mailto:g-plane@hotmail.com) - (#3395)
## Bugfixes
* __Fix: Prevents linking transitive dependencies on global installs__
[Maël Nison](mailto:nison.mael@gmail.com) - (#4265)
* __Fix: Avoids creating the global and link folders unless necessary__
[Burak Yiğit Kaya](mailto:ben@byk.im) - (#4264)
* __Fix: Exposes the `$NODE` variable when running scripts__
[Burak Yiğit Kaya](mailto:ben@byk.im) - (#4260)
* __Fix: Makes `upgrade-interactive` exit with a success exit code when no upgrades are needed__
[Jeff Valore](mailto:rally25rs@yahoo.com) - (#4261)
* __Fix: Ensures the bin folder exists before trying to use it__
[Burak Yiğit Kaya](mailto:ben@byk.im) - (#4241)
* __Fix: Fixes the `yarn workspace` command to run in the right directories__
[James Kyle](mailto:me@thejameskyle.com) - (#4080)
* __Fix: Adds the missing `--link-folder` flag (#4235)__
[Maël Nison](mailto:nison.mael@gmail.com)
* __Fix: Excludes dev dependencies from the `yarn list` output when the environment is production__
[Nick Olinger](mailto:olingern@gmail.com) - (#4092)
* __Fix: Adds the missing pre/post hooks for the `pack` script__
[João Lucas Lucchetta](mailto:joao.lucas.lucchetta@gmail.com) - (#4193)
* __Fix: Solves artifacts disappearing when the integrity file was missing__
[Jamie](mailto:jamsinclair@users.noreply.github.com) - (#4185)
* __Fix: Tarballs created via `yarn pack` now contain a versioned folder name instead of `dist`__
[Burak Yiğit Kaya](mailto:ben@byk.im) - (#4094)
* __Fix: Prevents the hoisting when it would break peer dependency requirements__
[Maël Nison](mailto:nison.mael@gmail.com) - (#4086)
* __Fix: Prevents numeric versions from being resolved to local files__
[Burak Yiğit Kaya](mailto:ben@byk.im) - (#4088)
* __Fix: Correctly handles scripts failing with exit signals__
[Onur Temizkan](mailto:onurtemizkan@gmail.com) - (#3995)
* __Fix: Forces workspaces to always be installed from their root__
[Maël Nison](mailto:nison.mael@gmail.com) - (#4030)
* __Fix: Prevents running pre/post hooks if they are not scripts__
[Burak Yiğit Kaya](mailto:ben@byk.im) - (#4068)
* __Fix: Checks for npmrc in home directory for linux root users__
[kaylieEB](mailto:kaylie@eventbrite.com) - (#4047)
* __Fix: Prevents scoped package installs to crash with a 403 when the cache is empty__
[Chappo](mailto:lukeggchapman@gmail.com) - (#4027)
* __Fix: Prevents optional subdependencies from being installed when using `--ignore-optional`__
[Maël Nison](mailto:nison.mael@gmail.com) - (#3976)
* __Fix: Fixes missing path expansions__
[Burak Yiğit Kaya](mailto:ben@byk.im) - (#4014)
* __Fix: Avoids using `process.exit()` when possible__
[Burak Yiğit Kaya](mailto:ben@byk.im) - (#3955)
* __Fix: Global config is now also looked up in `${PREFIX}/etc/`__
[Parakleta](mailto:parakleta@darkreality.org) - (#3958)
* __Fix: Stops assuming that all string rc parameters are paths__
[Burak Yiğit Kaya](mailto:ben@byk.im) - (#3941)
* __Fix: Fixes yarn global prefix directory__
[Kishan Bagaria](mailto:KishanBagaria@users.noreply.github.com) - (#3721)
* __Fix: Fixes the authentication when using `yarn publish`__
[John Ferlito](mailto:johnf@inodes.org) - (#3862)
* __Fix: Prevents `--check-files` from crossing symlink boundaries__
[Maël Nison](mailto:nison.mael@gmail.com) - (#3931)
* __Fix: Removes the manifest check for global commands__
[kaylieEB](mailto:kaylie@eventbrite.com) - (#3921)
* __Fix: Correctly prioritizes git environment variables coming from the parent process__
[Aleksejs Sinicins](mailto:monder@monder.cc) - (#3885)
* __Fix: Prioritizes bin links at the root level__
[kaylieEB](mailto:kaylie@eventbrite.com) - (#3877)
* __Fix: Fixes package linking when a filename case changes__
[Maël Nison](mailto:nison.mael@gmail.com) - (#3843)
* __Fix: Forwards SIGTERM to spawned child processes__
[Gabriel Aumala](mailto:gaumala@espol.edu.ec) - (#3789)
* __Fix: Emoji should now default to true on darwin platforms__
[Burak Yiğit Kaya](mailto:ben@byk.im) - (#3766)
* __Fix: Inherits env variables from the process when calling Git__
[Burak Yiğit Kaya](mailto:ben@byk.im) - (#3743)
* __Fix: Prevents unwanted optimizations kicking in when installing a lockfile__
[Maël Nison](mailto:nison.mael@gmail.com) - (#3729)
* __Fix: Transitive `file:` dependencies should now work properly__
[Konstantin Raev](mailto:bestander@gmail.com) - (#3709)
And a lot of various other fixes, chores, documentation, minor text fixes ..., all thanks to the community! 🐬