Skip to content

Commit 17992a7

Browse files
merceyzarcanis
andauthored
fix(pack): sort files to produce identical output on Windows and Unix (#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]>
1 parent a75dbe3 commit 17992a7

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
# Changelog
2-
2+
<!-- -->
33
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!
44

5+
## 1.22.2
6+
7+
- Sorts files when running `yarn pack` to produce identical layout on Windows and Unix systems
8+
9+
[#8142](https://github.com/yarnpkg/yarn/pull/8142) - [**Merceyz**](https://github.com/merceyz)
10+
11+
- Ignores `.yarnrc.yml` by default when running `yarn pack`
12+
13+
[#8142](https://github.com/yarnpkg/yarn/pull/8142) - [**Merceyz**](https://github.com/merceyz)
14+
515
## 1.22.1
616

717
- Prevents `yarn-path` from exiting before its child exited

src/cli/commands/pack.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const DEFAULT_IGNORE = ignoreLinesToRegex([
3636
'yarn-error.log',
3737
'.npmrc',
3838
'.yarnrc',
39+
'.yarnrc.yml',
3940
'.npmignore',
4041
'.gitignore',
4142
'.DS_Store',
@@ -146,6 +147,7 @@ export function packWithIgnoreAndHeaders(
146147
): Promise<stream$Duplex> {
147148
return tar.pack(cwd, {
148149
ignore: ignoreFunction,
150+
sort: true,
149151
map: header => {
150152
const suffix = header.name === '.' ? '' : `/${header.name}`;
151153
header.name = `package${suffix}`;

0 commit comments

Comments
 (0)