-
-
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.9.2
head repository: yarnpkg/berry
compare: @yarnpkg/cli/4.9.3
- 20 commits
- 75 files changed
- 14 contributors
Commits on Jun 3, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 58a6787 - Browse repository at this point
Copy the full SHA 58a6787View commit details -
Configuration menu - View commit details
-
Copy full SHA for 875d3b4 - Browse repository at this point
Copy the full SHA 875d3b4View commit details
Commits on Jun 6, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 6b00c65 - Browse repository at this point
Copy the full SHA 6b00c65View commit details
Commits on Jun 13, 2025
-
feat: Add provenance to @yarnpkg/cli-dist (#6815)
## What's the problem this PR addresses? #6750 started publishing our packages with provenance via config, but `@yarnpkg/cli-dist` is published separately where the config does not take effect. ... ## How did you fix it? Add the `--provenance` flag when publishing @yarnpkg/cli-dist` ... ## 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 e65f166 - Browse repository at this point
Copy the full SHA e65f166View commit details
Commits on Jun 17, 2025
-
Adds GIT_AUTHOR_NAME to the test env (#6825)
## What's the problem this PR addresses? The test env doesn't automatically setup the git committer name / email. I noticed it when working on `yarn init`, as the test was passing but I didn't understand why until I dig deeper (turns out we don't pass the `strict` flag when calling the `git` commands; I don't remember whether it's an oversight or not). ## How did you fix it? Automatically setup the git committer name / email. Should a test want to avoid that (for example to explicitly test that a command works without), they should override it manually. ## 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 72ac00d - Browse repository at this point
Copy the full SHA 72ac00dView commit details
Commits on Jun 30, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 8598d07 - Browse repository at this point
Copy the full SHA 8598d07View commit details
Commits on Jul 17, 2025
-
Configuration menu - View commit details
-
Copy full SHA for caf8d6d - Browse repository at this point
Copy the full SHA caf8d6dView commit details
Commits on Jul 20, 2025
-
Configuration menu - View commit details
-
Copy full SHA for dec0f9c - Browse repository at this point
Copy the full SHA dec0f9cView commit details
Commits on Jul 26, 2025
-
Fix
libcdetection on various platforms (#6840)## What's the problem this PR addresses? Two problems: 1. #6170 broke `libc` detection on at least Alpine Linux and Chimera Linux (and probably on all other `musl`-based distributions as well) by looking for the generic string `libc` in `/usr/bin/ldd`. On both Chimera and Alpine, `ldd --version` prints `musl libc` among the output. 2. `getLibc()` was doing unnecessary work on OSes other than Windows, Mac, and Linux (I originally thought it would have been crashing, but that's incorrect). ~~It strongly appears to me that `getLibc()` would throw an error on any OS other than Windows, Mac, and Linux, as the other OSes supported by node have their own libc implementations that are neither `glibc` nor `musl`.~~ ... ## How did you fix it? 1. The strings `GNU libc` and `GNU C Library` are searched for instead of just `libc`. * By default, `ldd` contains the text `GNU libc` in its `--version` output, but that can be easily customized at build time using a build configuration option (see [here](https://github.com/bminor/glibc/blob/632d895f3e5d98162f77b9c3c1da4ec19968b671/elf/ldd.bash.in#L37) and [here](https://github.com/bminor/glibc/blob/632d895f3e5d98162f77b9c3c1da4ec19968b671/INSTALL#L273-L278)). As a fallback, the text `GNU C Library` is found in the header of the `ldd` script, and it will probably remain there as long as that file remains a script (as opposed to a compiled binary). 2. I made `getLibc()` immediately return `null` on all non-Linux platforms (not just Windows and macOS). ... ## 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 c60a57c - Browse repository at this point
Copy the full SHA c60a57cView commit details -
fix(core): increase hash length (#6829)
## What's the problem this PR addresses? <!-- Describe the rationale of your PR. --> <!-- Link all issues that it closes. (Closes/Resolves #xxxx.) --> I would like to resolve the hash collision issue reported here. (#6827) ## How did you fix it? <!-- A detailed description of your implementation. --> It won't be the perfect solution, but by lengthening the hash, the likelihood of peerHash redundancy will be significantly reduced. ## 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 6887b28 - Browse repository at this point
Copy the full SHA 6887b28View commit details -
chore: replace lodash with es-toolkit (#6502)
## What's the problem this PR addresses? es-toolkit is a modern lodash alternative that claims to be much faster and lighter, potentially improving Yarn overall performance: https://es-toolkit.slash.page/intro.html ## How did you fix it? The lazy way, frankly: using es-toolkit/compat to provide practically drop-in lodash replacement with minimal effort. ## 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: Kristoffer K. <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6f8114f - Browse repository at this point
Copy the full SHA 6f8114fView commit details -
fix(plugin-npm): mark fetchFromNetwork private to fix TypeScript issue (
#6764) ## What's the problem this PR addresses? As part of developing a Yarn plugin for our project, we introduced `@yarnpkg/plugin-npm` as a dependency. However when running typescript, the package raises the following error: ```bash node_modules/@yarnpkg/plugin-npm/lib/NpmHttpFetcher.d.ts:12:76 - error TS2307: Cannot find module '/home/runner/work/berry/berry/.yarn/__virtual__/@yarnpkg-libzip-virtual-4957b34c08/1/packages/yarnpkg-libzip' or its corresponding type declarations. 12 fetchFromNetwork(locator: Locator, opts: FetchOptions): Promise<import("/home/runner/work/berry/berry/.yarn/__virtual__/@yarnpkg-libzip-virtual-4957b34c08/1/packages/yarnpkg-libzip").ZipFS>; ``` I've looked at the generated `lib/NpmHttpFetcher.d.ts` file https://www.npmjs.com/package/@yarnpkg/plugin-npm?activeTab=code, I found that the issue was in the `fetchFromNetwork` signature which includes a path generated during CI (`/home/runner/work/berry/berry/...`), which cannot be resolved locally. ```ts export declare class NpmHttpFetcher implements Fetcher { supports(locator: Locator, opts: MinimalFetchOptions): boolean; getLocalPath(locator: Locator, opts: FetchOptions): null; fetch(locator: Locator, opts: FetchOptions): Promise<{ packageFs: import("@yarnpkg/fslib").FakeFS<import("@yarnpkg/fslib").PortablePath>; releaseFs: () => void; prefixPath: import("@yarnpkg/fslib").PortablePath; checksum: string | null; }>; fetchFromNetwork(locator: Locator, opts: FetchOptions): Promise<import("/home/runner/work/berry/berry/.yarn/__virtual__/@yarnpkg-libzip-virtual-4957b34c08/1/packages/yarnpkg-libzip").ZipFS>; ``` ## How did you fix it? As the `fetchFromNetwork` method seems to be intended for local use only, I've marked it as private so that TypeScript skips inferring the return type, marking the change as minor. But please let me know if you would prefer to keep the method public and explicitly define the return type. I've spotted a similar error in: - https://github.com/yarnpkg/berry/blob/1908ee79fdf80fc8397d8ff928f3bfe25f30e715/packages/plugin-github/sources/GithubFetcher.ts#L39 - https://github.com/yarnpkg/berry/blob/1908ee79fdf80fc8397d8ff928f3bfe25f30e715/packages/plugin-http/sources/TarballHttpFetcher.ts#L34 happy to fix those as well. ## 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. --------- Signed-off-by: Vincenzo Scamporlino <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 10fdde7 - Browse repository at this point
Copy the full SHA 10fdde7View commit details -
fix(pnpm): allow EBUSY when deleting node_modules (#6826)
## What's the problem this PR addresses? EBUSY should be allowed, if `node_modules` is an active docker mountpoint where rmdir attempts to unmount it which fails because there are open files. Closes #4373 #4974 #4259 #1184 #4172 ## How did you fix it? Allow EBUSY to not block "clearing" node_modules. ## Checklist - [x] I have read the [Contributing Guide](https://yarnpkg.com/advanced/contributing). - [ ] I have set the packages that need to be released for my changes to be effective. - [ ] 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 3321522 - Browse repository at this point
Copy the full SHA 3321522View commit details
Commits on Jul 30, 2025
-
ci: use react with vite in storybook E2E (#6864)
## What's the problem this PR addresses? - closes #6696 The workflow [.github/workflows/e2e-storybook-workflow.yml](https://github.com/yarnpkg/berry/blob/master/.github/workflows/e2e-storybook-workflow.yml) fails with ```text create-react-app is deprecated. You can find a list of up-to-date React frameworks on react.dev For more info see:https://react.dev/link/cra This error message will only be shown once per install. /tmp/xfs-1a340a15/dlx-2010/.pnp.cjs:5738 throw EROFS(`open '${p}'`); ``` It was last successful on Dec 28, 2024. ## How did you fix it? In the workflow [.github/workflows/e2e-storybook-workflow.yml](https://github.com/yarnpkg/berry/blob/master/.github/workflows/e2e-storybook-workflow.yml) replace ```yaml yarn create react-app my-cra && cd my-cra ``` using ```yaml yarn create vite react --template react && cd react ``` ## 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.
Configuration menu - View commit details
-
Copy full SHA for f3b6af5 - Browse repository at this point
Copy the full SHA f3b6af5View commit details
Commits on Jul 31, 2025
-
feat(publish): Add
--dry-runand--jsonflag toyarn npm publish(#6850) ## What's the problem this PR addresses? Addresses #6849 ## How did you fix it? Full disclosure, used Github Copilot Agent Mode to generate most of this PR here --> Saadnajmi#2 Since then, lots more manual edits on my side. I took some spirit from #3404 and `pack.ts` to determine how to print paths and when to call `report.reportInfo` vs `report.reportJson`. This adds a couple of flags to `yarn npm publish`, so that it matches other package managers like `pnpm` and `bun`, and is thus easier for tools like `nx release` to use (see nrwl/nx#29242 ). We add - `--dry-run` (Bails out right before the final publish to NPM) - `--json` (This takes advantage of StreamReports JSON config) Using both flags together looks something like this: ```shell sanajmi@Mac foo % yarn npm publish --dry-run β€ YN0000: README.md β€ YN0000: bar.js β€ YN0000: package.json β€ YN0000: xyz.js β€ YN0000: [DRY RUN] Package would be published to https://registry.yarnpkg.com with tag latest β€ YN0000: Done in 0s 13ms sanajmi@Mac foo % yarn npm publish --dry-run --json {"file":"README.md"} {"file":"bar.js"} {"file":"package.json"} {"file":"xyz.js"} {"name":"foo","version":"1.0.0","registry":"https://registry.yarnpkg.com","tag":"latest","files":["README.md","bar.js","package.json","xyz.js"],"access":null,"dryRun":true,"published":false,"message":"[DRY RUN] Package would be published to https://registry.yarnpkg.com with tag latest","provenance":false,"gitHead":"d4f82af6fdb7f2f81c5910535900c5ad8a70a019"} ``` ## Checklist - [x] I have read the [Contributing Guide](https://yarnpkg.com/advanced/contributing). (TODO) <!-- 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. --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: Saadnajmi <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2677251 - Browse repository at this point
Copy the full SHA 2677251View commit details
Commits on Aug 7, 2025
-
Configuration menu - View commit details
-
Copy full SHA for b8be0bd - Browse repository at this point
Copy the full SHA b8be0bdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2212c9f - Browse repository at this point
Copy the full SHA 2212c9fView commit details
Commits on Aug 20, 2025
-
test: Fix test failures by specifying initial branch name in git init (β¦
β¦#6872) ## What's the problem this PR addresses? This PR adds --initial-branch=master option to ensure consistent test behavior across different development environments. Git has used main as the default branch for quite some time now, while our tests expect master. When I ran the integration tests with my default configuration (using main), they failed due to this mismatch. This change ensures tests pass reliably regardless of local git configuration and lowers the barrier to entry for new contributors! Example error: ```bash FAIL pkg-tests-specs/sources/commands/version/check.test.js (13.598 s) β Commands βΊ version check βΊ it shouldn't detect a change when pulling master Temporary fixture folder: /private/var/folders/y2/dwrgd4rx32n7phb939mny5p00000gn/T/xfs-46e897df/test Command failed: git checkout master error: pathspec 'master' did not match any file(s) known to git ===== stdout: ``` ``` ===== stderr: ``` error: pathspec 'master' did not match any file(s) known to git ``` ``` <!-- Describe the rationale of your PR. --> <!-- Link all issues that it closes. (Closes/Resolves #xxxx.) --> ... ## How did you fix it? Explicitly set initial branch to master to ensure consistent test behavior. <!-- 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. --> - [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 cfa99b0 - Browse repository at this point
Copy the full SHA cfa99b0View commit details -
Remove references to deprecated
-vflag foryarn config(#6878)## What's the problem this PR addresses? The `-v` flag for `yarn config` has been deprecated since #5713, but two error messages still reference it. ... ## How did you fix it? I edited the error message text. ... ## 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 5aad466 - Browse repository at this point
Copy the full SHA 5aad466View commit details -
| Package name | Version | | --- | --- | | `@yarnpkg/core` | `4.4.3` | | `@yarnpkg/cli` | `4.9.3` | | `@yarnpkg/plugin-npm` | `3.2.0` | | `@yarnpkg/plugin-constraints` | `4.0.5` | | `@yarnpkg/plugin-essentials` | `4.4.2` | | `@yarnpkg/plugin-git` | `3.1.3` | | `@yarnpkg/plugin-version` | `4.1.2` | | `@yarnpkg/plugin-workspace-tools` | `4.1.6` | | `@yarnpkg/sdks` | `3.2.3` | | `@yarnpkg/plugin-npm-cli` | `4.2.0` | | `@yarnpkg/plugin-pnpm` | `2.1.2` |
Configuration menu - View commit details
-
Copy full SHA for ce83c49 - Browse repository at this point
Copy the full SHA ce83c49View 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.9.2...@yarnpkg/cli/4.9.3