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

feat(manager/npm): extract contraints again on post-update #23131

Merged
merged 3 commits into from Jul 19, 2023

Conversation

viceice
Copy link
Member

@viceice viceice commented Jul 4, 2023

Changes

  • We now extract constraints again from package.json instead of using extractedContraints.
  • User constraints are now consistently preferred after updates.

Before this PR post-update has relyed on extractedContraints which comes from first update in PR.
So if you group different manager updates it can fail because the extractedContraints from wrong manager are used.
See linked PR and the history of it for working sample for yarn.

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 Jul 4, 2023
@viceice viceice requested a review from rarkins July 4, 2023 13:36
@viceice
Copy link
Member Author

viceice commented Jul 18, 2023

@JamieMagee @secustor any chance to review this? this is blocking lockfile maintenance on some of my repos.

Copy link
Collaborator

@secustor secustor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷

@rarkins rarkins added this pull request to the merge queue Jul 19, 2023
Merged via the queue into main with commit 2d23e16 Jul 19, 2023
36 checks passed
@rarkins rarkins deleted the feat/npm/extract-constraints branch July 19, 2023 05:41
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 36.11.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@bh
Copy link

bh commented Jul 20, 2023

Seems that this merge breaks my renovate bot integration for all new npm package update branches/PRs. The package-lock.json in packages/app/ is missing.

PR generated today:
Screenshot_2023-07-20_14-42-40
PR generated several days ago:
Screenshot_2023-07-20_14-43-10

I'm using lerna 7.x.x and there are no constraints. Node is pinned to 14.21.3 in .tools-version

 {
      "branchName": "renovate/capacitor-filesystem-5.1.x",
      "prNo": 688,
      "prTitle": "Update dependency @capacitor/filesystem to v5.1.1",
      "result": "done",
      "upgrades": [
        {
          "datasource": "npm",
          "depName": "@capacitor/filesystem",
          "displayPending": "",
          "fixedVersion": "5.1.0",
          "currentVersion": "5.1.0",
          "currentValue": "5.1.0",
          "newValue": "5.1.1",
          "newVersion": "5.1.1",
          "packageFile": "packages/app/package.json",
          "updateType": "patch",
          "packageName": "@capacitor/filesystem"
        }
      ]
    },

DEBUG: Writing packages/app/package-lock.json (branch="renovate/capacitor-filesystem-5.1.x")
{
"baseBranch": "develop"
}

@viceice
Copy link
Member Author

viceice commented Jul 20, 2023

please open a discussion

@renovatebot renovatebot locked and limited conversation to collaborators Jul 20, 2023
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.

None yet

5 participants