Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug?]: The default compression level is not 'mixed' #5843

Closed
1 task
trivikr opened this issue Oct 24, 2023 · 1 comment · Fixed by #5844
Closed
1 task

[Bug?]: The default compression level is not 'mixed' #5843

trivikr opened this issue Oct 24, 2023 · 1 comment · Fixed by #5844
Labels
bug Something isn't working

Comments

@trivikr
Copy link
Contributor

trivikr commented Oct 24, 2023

Self-service

  • I'd be willing to implement a fix

Describe the bug

As per the documentation, the default value for compressionLevel is mixed.

But my testing shows that it's 0 by default in 4.0.0.
It was mixed in yarn 3.6.4.

Is this a breaking change in [email protected]?

To reproduce

$ corepack enable

$ yarn --version
4.0.0

$ yarn init -2

$ yarn config compressionLevel
└─ compressionLevel
   ├─ Description: Zip files compression level, from 0 to 9 or mixed (a variant of 9, which stores some files uncompressed, when compression doesn't yield good results)
   ├─ Source: <default>
   └─ Value: 0

$ yarn set version 3.6.4

$ yarn --version
3.6.4

$ yarn config | grep compressionLevel
➤ YN0000: compressionLevel              'mixed'

Environment

System:
    OS: macOS 14.0
    CPU: (8) arm64 Apple M1 Pro
  Binaries:
    Node: 18.18.0 - /private/var/folders/42/54jl1_3x4hz06cf7bc_kzd4h0000gn/T/xfs-bf3e2b66/node
    Yarn: 4.0.0 - /private/var/folders/42/54jl1_3x4hz06cf7bc_kzd4h0000gn/T/xfs-bf3e2b66/yarn
    npm: 9.8.1 - ~/Library/Caches/fnm_multishells/36083_1698158145925/bin/npm

Additional context

No response

@trivikr trivikr added the bug Something isn't working label Oct 24, 2023
@trivikr
Copy link
Contributor Author

trivikr commented Oct 24, 2023

This does not appear to be a bug, and the documentation needs to be updated.

The default compressionLevel was explicitly set to 0 in #5526

arcanis added a commit that referenced this issue Oct 24, 2023
**What's the problem this PR addresses?**

Closes: #5843
Refs: #5526

**How did you fix it?**

Updated the default compressionLevel to '0' in documentation.

**Checklist**
<!--- Don't worry if you miss something, chores are automatically
tested. -->
<!--- This checklist exists to help you remember doing the chores when
you submit a PR. -->
<!--- Put an `x` in all the boxes that apply. -->
- [x] I have read the [Contributing
Guide](https://yarnpkg.com/advanced/contributing).

<!-- See
https://yarnpkg.com/advanced/contributing#preparing-your-pr-to-be-released
for more details. -->
<!-- Check with `yarn version check` and fix with `yarn version check
-i` -->
- [x] I have set the packages that need to be released for my changes to
be effective.

<!-- The "Testing chores" workflow validates that your PR follows our
guidelines. -->
<!-- If it doesn't pass, click on it to see details as to what your PR
might be missing. -->
- [x] I will check that all automated PR checks pass before the PR gets
reviewed.

---------

Co-authored-by: Maël Nison <[email protected]>
arcanis pushed a commit that referenced this issue Oct 24, 2023
)

**What's the problem this PR addresses?**

Refs: #5843

**How did you fix it?**

Moves compressionLevel `mixed` enum value to the end as:
* `mixed` is no longer the default in [email protected]
* `mixed` is a variant of 9. Visually keeping it closer to 9 is more
intuitive.

**Checklist**
- [x] I have read the [Contributing
Guide](https://yarnpkg.com/advanced/contributing).
- [x] I have set the packages that need to be released for my changes to
be effective.
- [x] I will check that all automated PR checks pass before the PR gets
reviewed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant