-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Comparing changes
Open a pull request
base repository: yarnpkg/berry
base: @yarnpkg/cli/4.10.3
head repository: yarnpkg/berry
compare: @yarnpkg/cli/4.11.0
- 14 commits
- 40 files changed
- 10 contributors
Commits on Sep 23, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 8ff18d7 - Browse repository at this point
Copy the full SHA 8ff18d7View commit details
Commits on Oct 3, 2025
-
Improves 'yarn workspaces focus' tests (#6932)
## What's the problem this PR addresses? Our tests were relying on the presence of `.gitignore`, which isn't relevant for the feature being tested. ## How did you fix it? Removed the dependency on `.gitignore`. Also added some extra checks to make sure that not only are the packages correctly installed, but they can also be properly required at runtime. ## 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.
Configuration menu - View commit details
-
Copy full SHA for 193fdbb - Browse repository at this point
Copy the full SHA 193fdbbView commit details
Commits on Oct 11, 2025
-
Configuration menu - View commit details
-
Copy full SHA for a592371 - Browse repository at this point
Copy the full SHA a592371View commit details
Commits on Nov 7, 2025
-
PnP: Allow
FileHandle#readintoTypedArrays andDataViews (#6950)## What's the problem this PR addresses? Fixes #6890 Fixes #6145 Node's [implementation](https://github.com/nodejs/node/blob/94cbb7758282bf5db837412f7cb3698f17ac1af3/lib/internal/fs/promises.js#L648) of `FileHandle#read` allows reading into `TypedArray`s and `DataView`s (collectively known as `ArrayBufferView`s, and checks for them using `ArrayBuffer.isView()`. On the other hand, our implementation checks using `Buffer.isBuffer()` and thus only allows `Buffer`. If an `ArrayBufferView` is given, it treats them as an options bag and pass its `.buffer` (which is an `ArrayBuffer`) as the sink to the backing fs. If the backing fs is Node's native `fs` then it would throw. ## How did you fix it? Allow `ArrayBufferView`s by checking with `ArrayBuffer.isView()` as in Node's implementation. Because the underlying `FakeFS` interface only allows `Buffer` (and changing that would be a breaking change), a `Buffer` backed by the `ArrayBufferView` is used. (Q: Should we make that change next major?) Also un-vendored the TypeScript types if the exact same type is available from `@types/node` along the way. AFAICT those were vendored because those types wasn't available at first? \cc @merceyz This fix should be orthogonal to #6919 ## 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]>
Configuration menu - View commit details
-
Copy full SHA for 11085b9 - Browse repository at this point
Copy the full SHA 11085b9View commit details -
Adds support for _resolveFilename's option 'conditions' (#6966)
## What's the problem this PR addresses? Node.js added support for a `conditions` flag in [`_resolveFilename`](https://github.com/nodejs/node/blob/525c4fb316a8074bea4e4aad358c3b376e99826c/lib/internal/modules/cjs/loader.js#L1340) (and thus indirectly [`require.resolve`](https://github.com/nodejs/node/blob/e72761fe5e855747012ba485df77c0e3da189b83/lib/internal/modules/helpers.js#L161-L166)), but they forgot to [document](https://nodejs.org/api/modules.html#requireresolverequest-options) this new option. As a result our hook rightfully refuses to perform the resolution since it doesn't know what to do with this flag. This is more an issue when using the new `registerHook` API because it then stops going into [this codepath](https://github.com/nodejs/node/blame/a7999c602cf7d70095dab3e5201d8c2f4b6a1867/lib/internal/modules/cjs/loader.js#L1051-L1055), causing a `conditions` option to always be injected. Vite recently [started](vitejs/vite#20980) using this API as of 7.2.0, so it now crashes. ## How did you fix it? Adds support for the `conditions` option (we already supported it, it's just that we weren't forwarding it, since Node.js didn't support it). ## 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.
Configuration menu - View commit details
-
Copy full SHA for 7f63e07 - Browse repository at this point
Copy the full SHA 7f63e07View commit details -
fix(publish): use correct workspace name in --json output (#6949)
## What's the problem this PR addresses? Fixes #6946. ## How did you fix it? Use the `structutils.stringifyIdent` function to get the workspace name like other commands do. ## 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: Florian Loechle <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 19c59f2 - Browse repository at this point
Copy the full SHA 19c59f2View commit details -
Update README.md badge link (#6947)
## What's the problem this PR addresses? <!-- Describe the rationale of your PR. --> <!-- Link all issues that it closes. (Closes/Resolves #xxxx.) --> ... ## How did you fix it? <!-- A detailed description of your implementation. --> ... ## 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. --> - [ ] 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` --> - [ ] 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. --> - [ ] I will check that all automated PR checks pass before the PR gets reviewed.
Configuration menu - View commit details
-
Copy full SHA for eda7540 - Browse repository at this point
Copy the full SHA eda7540View commit details -
fix: use correct env var to detect gitlab CI for OIDC (#6938)
## What's the problem this PR addresses? When #6898 added support for OIDC publishing, it copied the getOidcToken function from npm's implementation. However, `ciInfo` was directly replaced with `process.env`, which coincidentally worked fine for GitHub Actions (both the `ciInfo` constant and the environment variable are named `GITHUB_ACTIONS`), but not for GitLab (the `ciInfo` constant is `GITLAB`, but the actual env var is `GITLAB_CI`). ## How did you fix it? Replaced `process.env.GITLAB` with `process.env.GITLAB_CI` ## 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.
Configuration menu - View commit details
-
Copy full SHA for bafbef5 - Browse repository at this point
Copy the full SHA bafbef5View commit details -
Core: Create DURATION settings type (#6942)
## What's the problem this PR addresses? There are a number of configurations that represent a duration of time (e.g. `httpTimeout`). Currently those use the `NUMBER` settings type with a predefined unit (e.g. milliseconds for `httpTimeout`). But: 1. Each setting uses a different unit so users need to context switch to the docs to read/write those config 2. Because YAML doesn't support arithmetic expressions, unit conversions need to be done beforehand in order to properly set those settings. ## How did you fix it? Create a new `DURATION` settings type that allows specifying the duration as a string in the following format: 1. An integer or decimal value 2. Optionally a unit among `ms`, `s`, `m`, `h`, `d`, `w` For backward compatibility, a `DURATION` is parsed to a number using the existing predefined unit for that setting. That unit is also used if one is not specified. I have only implemented units that the exactly convertible to each other* to avoid something like having to convert 1 month to an exact number of days. <sub>_(* not entirely true since 1 day is not always 24 hours)_</sub> In the future, maybe we can use a proper duration data structure to do proper date calculations. (So that, for example, setting a DURATION to 1 month actually means "1 calendar month" instead of an approximate number of seconds) ## 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.
Configuration menu - View commit details
-
Copy full SHA for b9ccd93 - Browse repository at this point
Copy the full SHA b9ccd93View commit details -
Support escaping template variables in environment values (#6935)
## What's the problem this PR addresses? <!-- Describe the rationale of your PR. --> <!-- Link all issues that it closes. (Closes/Resolves #xxxx.) --> Resolves #6491 ```sh $ yarn init -2 $ echo 'CYPRESS_DOWNLOAD_PATH_TEMPLATE="\${endpoint}/\${platform}-\${arch}/cypress.zip"' > .env.yarn $ yarn node -p 'process.env.CYPRESS_DOWNLOAD_PATH_TEMPLATE' # AS-IS Usage Error: Environment variable not found (endpoint) # TO-BE ${endpoint}/${platform}-${arch}/cypress.zip ``` ## How did you fix it? <!-- A detailed description of your implementation. --> Support escaping template variables in environment variable values. When a template variable is escaped with a backslash (e.g., `\${VAR}`), it is now preserved as a literal string `${VAR}` instead of being replaced with an actual environment variable value. I updated the regex to match values starting with a backslash. When a match starts with a backslash, it is treated as an escaped template and returns the value with only the backslash removed (`match.slice(1)`). ## 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]>
Configuration menu - View commit details
-
Copy full SHA for 4e36aa5 - Browse repository at this point
Copy the full SHA 4e36aa5View commit details -
Migrates the "typescript" dependencies to a catalog (#6969)
## What's the problem this PR addresses? We don't currently use / dogfood the `catalog:` specifier. As a result we didn't notice that the compat plugin was incorrectly ordered; we want to apply it before performing the compat changes, but the current code was going the other way around. Fixes #6920 ## How did you fix it? - Make the monorepo use `catalog:` for the `typescript` package. - Fixes the local development setup to load plugins in the same order as the CLI bundle. - Reorders the plugins so that `catalog:` is resolved before the compatibility patches are applied. ## 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.
Configuration menu - View commit details
-
Copy full SHA for 62d57ff - Browse repository at this point
Copy the full SHA 62d57ffView commit details -
docs: Clarify additional use-case of npmMinimalAgeGate (#6945)
## What's the problem this PR addresses? Updated the description for npmMinimalAgeGate to clarify its purpose and provide additional context regarding unpublishable packages. Provided an example value, to make it clearer that the value is in minutes not days. (Took me a bit to realise that π ## How did you fix it? π ## 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: bienzaaron <[email protected]> Co-authored-by: MaΓ«l Nison <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for aa71c69 - Browse repository at this point
Copy the full SHA aa71c69View commit details -
Allow catalogs to work with descriptors without resolvers (#6930)
## What's the problem this PR addresses? <!-- Describe the rationale of your PR. --> <!-- Link all issues that it closes. (Closes/Resolves #xxxx.) --> Resolves #6928 ## How did you fix it? <!-- A detailed description of your implementation. --> I modified the catalog plugin to skip binding a descriptor when the descriptor referenced by the catalog protocol is not supported by any resolver. Since an error occurs when binding a descriptor that has no supporting resolver, I added a check before calling `resolver.bindDescriptor`. Even if the catalog plugin doesn't resolve the descriptor, an error will still be properly raised during the final resolution step if no resolver can handle the descriptor. ## 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.
Configuration menu - View commit details
-
Copy full SHA for afe40b1 - Browse repository at this point
Copy the full SHA afe40b1View commit details -
| Package name | Version | | --- | --- | | `@yarnpkg/cli` | `4.11.0` | | `@yarnpkg/core` | `4.5.0` | | `@yarnpkg/plugin-npm` | `3.4.0` | | `@yarnpkg/fslib` | `3.1.4` | | `@yarnpkg/pnp` | `4.1.3` | | `@yarnpkg/plugin-npm-cli` | `4.3.2` | | `@yarnpkg/plugin-pnp` | `4.1.3` | | `@yarnpkg/plugin-catalog` | `1.0.2` |
1Configuration menu - View commit details
-
Copy full SHA for 9a2729d - Browse repository at this point
Copy the full SHA 9a2729dView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we canβt render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff @yarnpkg/cli/4.10.3...@yarnpkg/cli/4.11.0