Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: yarnpkg/berry
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: @yarnpkg/cli/4.9.1
Choose a base ref
...
head repository: yarnpkg/berry
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: @yarnpkg/cli/4.9.2
Choose a head ref
  • 13 commits
  • 666 files changed
  • 10 contributors

Commits on Apr 14, 2025

  1. Configuration menu
    Copy the full SHA
    666aa3a View commit details
    Browse the repository at this point in the history

Commits on May 9, 2025

  1. Docusaurus: Update Docusaurus to 3.7 (#6777)

    ## What's the problem this PR addresses?
    
    The Docusaurus version we use is not the latest
    
    ## How did you fix it?
    
    Upgrades Docusuaurs to 3.7 and start using the new features:
    
    - Also upgrade `docusaurus-plugin-typedoc-api` for compatibility
    - `docusaurus-plugin-typedoc-api` is unmaintined now. Maybe we should
    make our custom solution eventually?
    - Upgrade React to v19 since Docusuaurs 3.7 supports it now
    - Also upgrades other libraries for official compatibility with React
    19, which, while maybe not strictly necessary (nothing seems to break
    without those upgrades), is nice to get out of the way
    - Upgrade `xterm` so the website can be built with Node 22
    - Bump the Netlify build to Node 22, as Node 18 will be EOL this week.
    - Add truncation of blog posts on the main blog feed (recommended by
    Docusaurus)
    - Add author social links to blog posts (@arcanis I just copied the
    socials from your website, expect replacing Twitter with BlueSky and
    adding the website itself. Please review if there are changes you'd like
    to make)
    - Remove the extraneous dependencies that [weren't
    removed](#6264 (comment))
    in #6264.
    - Now I'm pretty sure `markdown-it-br` and `marked-base-url` is actually
    usused
    - Even if we are to rebuild the sherlock playground, I feel like there
    are better libraries for that then `@codesandbox/sandpack-react`. Even
    if we use `@codesandbox/sandpack-react` again we'd probably use the
    latest version which is a semver-major bump so there will be churn
    either way.
    - Minor fixes like fixing backgrounds
    
    I have done some visual comparison testing to verify there aren't
    unexpected visual changes (on the pages I checked at least)
    
    ----
    
    Questions:
    - Docusaurus's perf logger now records memory usage. Maybe we should
    turn that on on Netlify?
    - Do we want to start migrating to `compressionLevel: 0` (the default
    since 4.0)? This PR replaces ~300 deps (out of ~2,100) so I feel like
    that's a good time to do so *if* we are to migrate
    
    ## 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.
    clemyan authored May 9, 2025
    Configuration menu
    Copy the full SHA
    e8fbb0c View commit details
    Browse the repository at this point in the history
  2. fix(extensions): @fastify/type-provider-typebox (#6780)

    ## What's the problem this PR addresses?
    
    <!-- Describe the rationale of your PR. -->
    <!-- Link all issues that it closes. (Closes/Resolves #xxxx.) -->
    
    fastify/fastify-type-provider-typebox#114
    
    ## 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. -->
    - [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.
    paulius-valiunas authored May 9, 2025
    Configuration menu
    Copy the full SHA
    f23512b View commit details
    Browse the repository at this point in the history
  3. Fix resolveExports thrown error (#6782)

    ## What's the problem this PR addresses?
    
    <!-- Describe the rationale of your PR. -->
    <!-- Link all issues that it closes. (Closes/Resolves #xxxx.) -->
    
    Closes #5958
    
    ## How did you fix it?
    
    <!-- A detailed description of your implementation. -->
    
    Correctly handle the thrown error
    
    ## 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.
    
    Co-authored-by: Maël Nison <[email protected]>
    smeng9 and arcanis authored May 9, 2025
    Configuration menu
    Copy the full SHA
    dc73e88 View commit details
    Browse the repository at this point in the history

Commits on May 10, 2025

  1. chore: upgrade workflows to ubuntu 22 images (#6776)

    ## What's the problem this PR addresses?
    
    [Ubuntu 20 images have been deprecated by
    Github.](https://github.blog/changelog/2025-01-15-github-actions-ubuntu-20-runner-image-brownout-dates-and-other-breaking-changes/)
    [Workflows are failing because of
    it.](https://github.com/yarnpkg/berry/actions/runs/14700798041/job/41249908502?pr=6734)
    
    ## How did you fix it?
    
    Changed version `20.04` to `22.04`
    
    ## 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.
    SagnikPradhan authored May 10, 2025
    Configuration menu
    Copy the full SHA
    a08e883 View commit details
    Browse the repository at this point in the history
  2. docs: replace create-react-app with create-vite in dlx example (#6792)

    ## What's the problem this PR addresses?
    
    - closes #6695
    
    The https://yarnpkg.com/cli/dlx#examples instructions fail:
    
    > Use create-react-app to create a new React app :
    
    ```shell
    corepack enable yarn
    cd $(mktemp -d)
    yarn dlx create-react-app ./my-app
    ```
    
    ```text
    $ yarn dlx create-react-app ./my-app
    ! Corepack is about to download https://repo.yarnpkg.com/4.6.0/packages/yarnpkg-cli/bin/yarn.js
    ? Do you want to continue? [Y/n]
    
    ➤ YN0000: · Yarn 4.6.0
    ➤ YN0000: ┌ Resolution step
    ➤ YN0085: │ + create-react-app@npm:5.1.0, ansi-styles@npm:4.3.0, balanced-match@npm:1.0.2, block-stream@npm:0.0.9, and 60 more.
    ➤ YN0000: └ Completed in 0s 706ms
    ➤ YN0000: ┌ Fetch step
    ➤ YN0013: │ 64 packages were added to the project (+ 2.97 MiB).
    ➤ YN0000: └ Completed in 0s 815ms
    ➤ YN0000: ┌ Link step
    ➤ YN0000: └ Completed
    ➤ YN0000: · Done in 1s 717ms
    
    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-4a58d078/dlx-14138/.pnp.cjs:5739
          throw EROFS(`open '${p}'`);
          ^
    
    Error: EROFS: read-only filesystem, open '/node_modules/create-react-app/given-deprecation-warning'
        at makeError$1 (/tmp/xfs-4a58d078/dlx-14138/.pnp.cjs:769:24)
        at EROFS (/tmp/xfs-4a58d078/dlx-14138/.pnp.cjs:796:10)
        at ZipFS.prepareWriteFile (/tmp/xfs-4a58d078/dlx-14138/.pnp.cjs:5739:13)
        at ZipFS.writeFileSync (/tmp/xfs-4a58d078/dlx-14138/.pnp.cjs:5723:55)
        at /tmp/xfs-4a58d078/dlx-14138/.pnp.cjs:3055:22
        at /tmp/xfs-4a58d078/dlx-14138/.pnp.cjs:3304:66
        at ZipOpenFS.getMountSync (/tmp/xfs-4a58d078/dlx-14138/.pnp.cjs:3412:14)
        at ZipOpenFS.makeCallSync (/tmp/xfs-4a58d078/dlx-14138/.pnp.cjs:3304:17)
        at ZipOpenFS.writeFileSync (/tmp/xfs-4a58d078/dlx-14138/.pnp.cjs:3052:17)
        at VirtualFS.writeFileSync (/tmp/xfs-4a58d078/dlx-14138/.pnp.cjs:2028:24) {
      code: 'EROFS'
    }
    
    Node.js v22.15.0
    ```
    
    ## How did you fix it?
    
    In
    [packages/plugin-dlx/sources/commands/dlx.ts](https://github.com/yarnpkg/berry/blob/master/packages/plugin-dlx/sources/commands/dlx.ts)
    replaced use of `create-react-app` in examples using instead
    [create-vite](https://www.npmjs.com/package/create-vite).
    
    To test, execute the following on Ubuntu `22.04.2` LTS, Node.js
    `22.15.0` LTS, Corepack `0.32.0`:
    
    ```shell
    corepack enable yarn
    cd $(mktemp -d)
    yarn dlx create-vite
    ```
    
    take all defaults and confirm there is no error from Yarn, then execute:
    
    ```shell
    cd vite-project
    corepack use yarn@stable
    yarn
    yarn dev
    ```
    
    Open http://localhost:5173 in web browser and confirm that Vite +
    TypeScript shows.
    
    For documentation:
    
    with `yarn/berry` and PR branch `dlx-example`
    
    ```shell
    cd packages/docusaurus
    yarn start
    ```
    
    View http://localhost:3000/cli/dlx#examples in a browser and check that
    the text changes are showing correctly.
    
    ## 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.
    MikeMcC399 authored May 10, 2025
    Configuration menu
    Copy the full SHA
    bee82ef View commit details
    Browse the repository at this point in the history

Commits on May 16, 2025

  1. feat(perf) - de-duplicate chalk dependency (#6784)

    ## What's the problem this PR addresses?
    👋 Hello! I was randomly looking at the `@yarnpkg/cli` bundle, and
    esbuild reported a few warnings (when building locally in the repo, and
    inspecting on https://esbuild.github.io/analyze/ ).
    
    One of these warnings, was that there are some duplicated external
    libraries - such as `chalk`.
    
    
    ![{1BA9255A-15DD-48DC-9A9E-D8183671F486}](https://github.com/user-attachments/assets/e1b8bf8a-db5e-4a92-b7f4-eb6b747b6c49)
    <details><summary>Full bundle graph</summary>
    <img
    src="https://github.com/user-attachments/assets/99133d9b-5bbf-4390-84ab-b608ef301501"
    />
    </details> 
    
    The savings from this PR are tiny (a few kb), but worth doing :)
    
    ## What does this PR do
    
    This PR bumps chalk to consistently be [v4.1.2
    ](https://github.com/chalk/chalk/releases/tag/v4.0.0) up from v `3.0.0`.
    The diff for 3.0.0 to 4.0.0 is
    [here](chalk/chalk@v3.0.0...v4.0.0). The only
    relevant breaking change is dropping node 8 support, which should
    suffice for yarn (current engines of yarn is set to 18).
    
    > [!NOTE]
    > I didn't opt for [v5
    ](https://github.com/chalk/chalk/releases/tag/v5.0.0)- as it's esm only,
    and may require some config tweaking. V5 **is** a smaller bundle though,
    ~half the size!
    
    /aside - It would be a larger bundle saving to remove the dependency
    entirely to something like https://www.npmjs.com/package/picocolors -
    but that's potentially a larger piece of work, as `@yarnpkg/shell` [uses
    some bespoke colors
    ](https://github.com/yarnpkg/berry/blob/master/packages/yarnpkg-shell/sources/index.ts#L815-L815).
    
    I tried to bump ink, as they've made some improvements too - but it
    seems they expect tools to bundle with an `esm` format - wheras yarn is
    currently bundling as `iife`, so would require decent patching or
    upstream changes ( I couldn't get either to work just yet).
    
    ## How did you fix it?
    
    `yarn upgrade-interactive` to specify v4 of chalk :)
    Note that yarn upgrade-interactive is difficult to use when using
    workspaces, until #3260 (or similar) are closed. Similarly reported in
    #2591 #3281.
    
    ## 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.
    spanishpear authored May 16, 2025
    Configuration menu
    Copy the full SHA
    2c69552 View commit details
    Browse the repository at this point in the history

Commits on May 18, 2025

  1. Core: Use hpagent for proxies (#6779)

    ## What's the problem this PR addresses?
    
    Proxying with the `tunnel` package is... finnicky. I did not extensively
    investigate these but as a few examples of issues I encountered when I
    used it in the past:
    
    - Does not use the specified CA certificates, even for HTTPS over HTTP
    proxy
    - Does not use proxy after redirects
    
    Fixes #6568 
    Fixes #5244 
    
    Hard to tell definitively without reproductions but these should be also
    fixed:
    
    Fixes #3215 
    Fixes #2250 
    
    ## How did you fix it?
    
    Use `hpagent` instead. This by itself fixes most HTTPS over HTTP
    proxying issues.
    
    I have also reused HTTPS network settings (e.g. CA certs) for connecting
    to HTTPS proxies.
    
    Side note: `pem` needs openssl installed to work which makes testing
    this (and running other HTTPS-related test) difficult in some cases
    (e.g. on Windows). Should we use another library for HTTPS testing?
    
    ## 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]>
    clemyan and arcanis authored May 18, 2025
    Configuration menu
    Copy the full SHA
    8661aac View commit details
    Browse the repository at this point in the history

Commits on May 28, 2025

  1. fix(plugin-nm): set binary permissions for partial installs (#6807)

    Hi! 👋 
    
    ## What's the problem this PR addresses?
    
    Resolves #5344 #6551 
    
    When using `nodeLinker: node-modules` there's an issue where bin files
    sometimes don't have the correct permissions (755) after installation.
    Some examples of scenarios where this can occur:
    1. Deleting a package directory containing a bin file in `node_modules`
    and then running `yarn install`
    2. Upgrading a package containing a bin file
    3. Using a stale `node_modules` (e.g. when using a CI cache) and then
    running `yarn install`
    
    I ran a bisect and at least scenario 1 above seems to have started in
    [3.2.1](https://github.com/yarnpkg/berry/blob/master/CHANGELOG.md#321),
    I suspect it's [this](#3467) change
    specifically although previous to this change the deleted directory was
    not reinstalled *at all*.
    
    Digging into the issue I found that the general issue stems from
    reliance on presence of symlinks inside `node_modules/.bin/`
    ([here](https://github.com/yarnpkg/berry/blob/master/packages/plugin-nm/sources/NodeModulesLinker.ts#L1361))
    to check whether permissions should be re-applied. The flaw with this
    approach is that for stale installation the old symlink is *still there*
    e.g. if a new version of a package is installed.
    
    ## How did you fix it?
    
    This changes the `prevBinSymlinks` to remove all symlinks that were
    related to added/changed packages during the installation. The
    comparison between previous and current symlinks inside
    `persistBinSymlinks` will now recreate the symlinks for these updated
    packages and also set the correct permissions.
    
    I've added two tests which were previously failing to cover this
    behavior, and a third which was already succeeding since it seemed
    sensible to explicitly test for permissions in a basic test 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.
    oskarols authored May 28, 2025
    Configuration menu
    Copy the full SHA
    7553478 View commit details
    Browse the repository at this point in the history

Commits on Jun 3, 2025

  1. Improve display of JSON values within constraints (#6812)

    ## What's the problem this PR addresses?
    
    JSON constraints are currently displayed using an arbitrary Node.js
    rendering. This PR moves that into our hands, and ensures that the
    output is at least similar to JSON.
    
    ## How did you fix it?
    
    Replaces util.inspect by a custom rendering function.
    
    ## 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.
    arcanis authored Jun 3, 2025
    Configuration menu
    Copy the full SHA
    139617c View commit details
    Browse the repository at this point in the history
  2. fix: correctly install implicit nested types dependencies (#6800)

    ## What's the problem this PR addresses?
    Closes #6442
    
    By default - yarn will automatically add `@types/foo` for a package, if
    the package
    has a peer dependency on `foo`. This happens in the `normalizePackage`
    core,
    and exists as packages often don't specify the correct peer
    dependencies.
    
    However, given a scenario where:
    ```json
    "dependencies": {
        "peer-deps-implicit-types-conflict": "1.0.0",
        "@types/no-deps": "1.0.0",
    }
    ```
    where `peer-deps-implicit-types-conflict` has a dependency on
    `@types/no-deps:2.0.0`,
    ```json
      "dependencies": {
        "@types/no-deps": "2.0.0"
      },
      "peerDependencies": {
        "no-deps": "1.0.0"
      }
    ```
    yarn will only install `@types/no-deps:1.0.0` - even though
    `@types/no-deps: 2.0.0` is specified
    as a dependency!
    
    ## How did you fix it?
    
    The fix is rather trivial and thanks to the helpful comment here -
    #6442 (comment) -
    simply don't install the automatic `@types/foo` for a package that has
    `foo` as a peer-dependency, if the package already specifies
    `@types/foo` as a **dependency**.
    
    There is already logic for this behavior when it comes to `@types/`
    already existing in `peerDependencies` or `peerDependenciesMeta` - this
    PR just extends that to `dependencies` 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.
    
    ---------
    
    Co-authored-by: Maël Nison <[email protected]>
    spanishpear and arcanis authored Jun 3, 2025
    Configuration menu
    Copy the full SHA
    73f0354 View commit details
    Browse the repository at this point in the history
  3. fix(core): fix the value check for publishConfig.provenance (#6781)

    ## What's the problem this PR addresses?
    
    This PR resolves an issue where the `publishConfig.provenance` field in
    `package.json` wasn't being read correctly.
    
    Specifically:
    - When `publishConfig.provenance: true` was set in `package.json`,
    Yarn's `npm publish` command wouldn't generate provenance statements
    - Whilst the `PublishConfig` interface had `provenance?: boolean`
    defined, the `load` method in `Manifest.ts` was missing the processing
    logic for the `provenance` field when handling `publishConfig`
    - Other fields (`access`, `main`, `module`, `browser`, `registry`,
    `bin`, `executableFiles`) were being processed correctly, but
    `provenance` was the only one being omitted
    
    ## How did you fix it?
    
    I added the following code to the `publishConfig` processing section
    within the `load` method in `packages/yarnpkg-core/sources/Manifest.ts`:
    
    ```typescript
    if (typeof data.publishConfig.provenance === `boolean`)
      this.publishConfig.provenance = data.publishConfig.provenance;
    ```
    
    This fix ensures:
    1. The `publishConfig.provenance` field in `package.json` is read
    correctly when it's a boolean value
    2. It becomes available as `workspace.manifest.publishConfig.provenance`
    3. The existing logic in `npm publish` command (`publish.ts` lines
    109-120) functions properly
    
    Additionally, to ensure the accuracy of the fix, I added test cases to
    `packages/yarnpkg-core/tests/Manifest.test.ts`:
    - Test for when `provenance: true` is set
    - Test for when `provenance: false` is set
    - Test to verify that non-boolean values are ignored
    
    With this fix, when `publishConfig.provenance` is configured in
    `package.json`, provenance statements will be generated as expected.
    
    ## 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.
    
    ---------
    
    Signed-off-by: Sora Morimoto <[email protected]>
    Co-authored-by: Maël Nison <[email protected]>
    smorimoto and arcanis authored Jun 3, 2025
    Configuration menu
    Copy the full SHA
    bc95336 View commit details
    Browse the repository at this point in the history
  4. Releasing 33 new packages

    | Package name | Version |
    | --- | --- |
    | `@yarnpkg/cli` | `4.9.2` |
    | `@yarnpkg/plugin-dlx` | `4.0.2` |
    | `@yarnpkg/core` | `4.4.2` |
    | `@yarnpkg/plugin-essentials` | `4.4.1` |
    | `@yarnpkg/plugin-git` | `3.1.2` |
    | `@yarnpkg/plugin-github` | `3.0.2` |
    | `@yarnpkg/plugin-http` | `3.0.3` |
    | `@yarnpkg/plugin-npm` | `3.1.2` |
    | `@yarnpkg/plugin-npm-cli` | `4.1.1` |
    | `@yarnpkg/plugin-typescript` | `4.1.3` |
    | `@yarnpkg/extensions` | `2.0.6` |
    | `@yarnpkg/plugin-compat` | `4.0.12` |
    | `@yarnpkg/builder` | `4.2.2` |
    | `@yarnpkg/doctor` | `4.0.4` |
    | `@yarnpkg/nm` | `4.0.7` |
    | `@yarnpkg/plugin-constraints` | `4.0.4` |
    | `@yarnpkg/plugin-exec` | `3.0.2` |
    | `@yarnpkg/plugin-file` | `3.0.2` |
    | `@yarnpkg/plugin-init` | `4.1.2` |
    | `@yarnpkg/plugin-interactive-tools` | `4.0.3` |
    | `@yarnpkg/plugin-jsr` | `1.1.1` |
    | `@yarnpkg/plugin-link` | `3.0.2` |
    | `@yarnpkg/plugin-nm` | `4.0.7` |
    | `@yarnpkg/plugin-pack` | `4.0.2` |
    | `@yarnpkg/plugin-patch` | `4.0.3` |
    | `@yarnpkg/plugin-pnp` | `4.1.1` |
    | `@yarnpkg/plugin-pnpm` | `2.1.1` |
    | `@yarnpkg/plugin-stage` | `4.0.2` |
    | `@yarnpkg/plugin-version` | `4.1.1` |
    | `@yarnpkg/plugin-workspace-tools` | `4.1.5` |
    | `@yarnpkg/pnpify` | `4.1.5` |
    | `@yarnpkg/sdks` | `3.2.2` |
    | `@yarnpkg/shell` | `4.1.3` |
    yarnbot committed Jun 3, 2025
    Configuration menu
    Copy the full SHA
    a9edb77 View commit details
    Browse the repository at this point in the history
Loading