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

fix(manager/npm): support modern pnpm overrides syntax #31829

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

viceice
Copy link
Member

@viceice viceice commented Oct 7, 2024

Changes

Support modern pnpm overrides:

{
  "pnpm": {
    "overrides": {
      "express>cookie": "0.7.0"
    }   
  }
}

Context

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@viceice viceice added the manager:npm package.json files (npm/yarn/pnpm) label Oct 7, 2024
@viceice
Copy link
Member Author

viceice commented Oct 7, 2024

If i replace the depName then replace won't work anymore here:

} else if (depType === 'pnpm.overrides') {
parsedContents.pnpm!.overrides![depName] = newValue;
} else if (depName === oldValue) {

} else if (depType === 'pnpm.overrides') {
oldVersion = parsedContents.pnpm?.overrides?.[depName];
} else {

@viceice viceice added this pull request to the merge queue Oct 7, 2024
Merged via the queue into main with commit 03a8531 Oct 7, 2024
39 checks passed
@viceice viceice deleted the fix/pnpm-nested-overrides branch October 7, 2024 15:01
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 38.110.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

zemnmez-renovate-bot added a commit to zemn-me/monorepo that referenced this pull request Oct 7, 2024
##### [`v38.110.3](https://github.com/renovatebot/renovate/releases/tag/38.110.3)

##### Bug Fixes

-   **manager/npm:** support modern pnpm overrides syntax ([#31829](renovatebot/renovate#31829)) ([03a8531](renovatebot/renovate@03a8531))

##### Documentation

-   mention respectLatest in ignoreUnstable description ([#31802](renovatebot/renovate#31802)) ([6b5af27](renovatebot/renovate@6b5af27))
-   update references to renovate/renovate ([#31813](renovatebot/renovate#31813)) ([fc73e6f](renovatebot/renovate@fc73e6f))

##### Miscellaneous Chores

-   correct label actions discussion close reason ([#31819](renovatebot/renovate#31819)) ([53e6622](renovatebot/renovate@53e6622))
-   **deps:** lock file maintenance ([#31814](renovatebot/renovate#31814)) ([1562b30](renovatebot/renovate@1562b30))
-   **deps:** update actions/checkout action to v4.2.1 ([#31838](renovatebot/renovate#31838)) ([c665553](renovatebot/renovate@c665553))
-   **deps:** update actions/upload-artifact action to v4.4.1 ([#31839](renovatebot/renovate#31839)) ([ed747af](renovatebot/renovate@ed747af))
-   **deps:** update containerbase/internal-tools action to v3.4.24 ([#31806](renovatebot/renovate#31806)) ([e500902](renovatebot/renovate@e500902))
-   **deps:** update containerbase/internal-tools action to v3.4.26 ([#31812](renovatebot/renovate#31812)) ([e9a882e](renovatebot/renovate@e9a882e))
-   **deps:** update jaegertracing/all-in-one docker tag to v1.62.0 ([#31827](renovatebot/renovate#31827)) ([6d20f4f](renovatebot/renovate@6d20f4f))
-   **git:** trace log branch commits ([#31805](renovatebot/renovate#31805)) ([3a6465e](renovatebot/renovate@3a6465e))

##### Code Refactoring

-   **packageRules:** allow async matchers ([#31828](renovatebot/renovate#31828)) ([b6cff31](renovatebot/renovate@b6cff31))
github-merge-queue bot pushed a commit to zemn-me/monorepo that referenced this pull request Oct 7, 2024
##### [`v38.110.3](https://github.com/renovatebot/renovate/releases/tag/38.110.3)

##### Bug Fixes

-   **manager/npm:** support modern pnpm overrides syntax ([#31829](renovatebot/renovate#31829)) ([03a8531](renovatebot/renovate@03a8531))

##### Documentation

-   mention respectLatest in ignoreUnstable description ([#31802](renovatebot/renovate#31802)) ([6b5af27](renovatebot/renovate@6b5af27))
-   update references to renovate/renovate ([#31813](renovatebot/renovate#31813)) ([fc73e6f](renovatebot/renovate@fc73e6f))

##### Miscellaneous Chores

-   correct label actions discussion close reason ([#31819](renovatebot/renovate#31819)) ([53e6622](renovatebot/renovate@53e6622))
-   **deps:** lock file maintenance ([#31814](renovatebot/renovate#31814)) ([1562b30](renovatebot/renovate@1562b30))
-   **deps:** update actions/checkout action to v4.2.1 ([#31838](renovatebot/renovate#31838)) ([c665553](renovatebot/renovate@c665553))
-   **deps:** update actions/upload-artifact action to v4.4.1 ([#31839](renovatebot/renovate#31839)) ([ed747af](renovatebot/renovate@ed747af))
-   **deps:** update containerbase/internal-tools action to v3.4.24 ([#31806](renovatebot/renovate#31806)) ([e500902](renovatebot/renovate@e500902))
-   **deps:** update containerbase/internal-tools action to v3.4.26 ([#31812](renovatebot/renovate#31812)) ([e9a882e](renovatebot/renovate@e9a882e))
-   **deps:** update jaegertracing/all-in-one docker tag to v1.62.0 ([#31827](renovatebot/renovate#31827)) ([6d20f4f](renovatebot/renovate@6d20f4f))
-   **git:** trace log branch commits ([#31805](renovatebot/renovate#31805)) ([3a6465e](renovatebot/renovate@3a6465e))

##### Code Refactoring

-   **packageRules:** allow async matchers ([#31828](renovatebot/renovate#31828)) ([b6cff31](renovatebot/renovate@b6cff31))
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
manager:npm package.json files (npm/yarn/pnpm)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants