Skip to content

Commit

Permalink
fix(pack): sort files to produce identical output on Windows and Unix (
Browse files Browse the repository at this point in the history
…#8142)

* fix(pack): always ignore yarnrc.yml file

* fix(pack): sort files before packing

* docs: changelog

* chore: ping ci

* Update CHANGELOG.md

Co-authored-by: Maël Nison <[email protected]>
  • Loading branch information
merceyz and arcanis authored May 21, 2020
1 parent a75dbe3 commit 17992a7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
# Changelog

<!-- -->
Please add one entry in this file for each change in Yarn's behavior. Use the same format for all entries, including the third-person verb. Make sure you don't add more than one line of text to keep it clean. Thanks!

## 1.22.2

- Sorts files when running `yarn pack` to produce identical layout on Windows and Unix systems

[#8142](https://github.com/yarnpkg/yarn/pull/8142) - [**Merceyz**](https://github.com/merceyz)

- Ignores `.yarnrc.yml` by default when running `yarn pack`

[#8142](https://github.com/yarnpkg/yarn/pull/8142) - [**Merceyz**](https://github.com/merceyz)

## 1.22.1

- Prevents `yarn-path` from exiting before its child exited
Expand Down
2 changes: 2 additions & 0 deletions src/cli/commands/pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const DEFAULT_IGNORE = ignoreLinesToRegex([
'yarn-error.log',
'.npmrc',
'.yarnrc',
'.yarnrc.yml',
'.npmignore',
'.gitignore',
'.DS_Store',
Expand Down Expand Up @@ -146,6 +147,7 @@ export function packWithIgnoreAndHeaders(
): Promise<stream$Duplex> {
return tar.pack(cwd, {
ignore: ignoreFunction,
sort: true,
map: header => {
const suffix = header.name === '.' ? '' : `/${header.name}`;
header.name = `package${suffix}`;
Expand Down

0 comments on commit 17992a7

Please sign in to comment.