renovatebot / renovate

Home of the Renovate CLI: Cross-platform Dependency Automation by Mend.io
https://mend.io/renovate
GNU Affero General Public License v3.0
17.26k stars 2.26k forks source link

fix(circleci): Allow for quotes around dependencies #29902

Closed AugPro closed 2 months ago

AugPro commented 3 months ago

Changes

This PR firstly demonstrates a bug when using quotes around circleci dependencies, the version is incorrectly parsed, even though the yaml is valid. 329b342f51951dbbe10b67c09c0a42a6c92331b1

Looking at the CI run, you'll see that the dependency version is parsed as volatile" instead of volatile.

Summary of all failing tests
FAIL lib/modules/manager/circleci/extract.spec.ts (888 MB heap size)
  ● modules/manager/circleci/extract › extractPackageFile() › extracts orbs too

    expect(received).toMatchObject(expected)

    - Expected  - 1
    + Received  + 1

    @@ -10,11 +10,11 @@
          "datasource": "orb",
          "depName": "no-version",
          "depType": "orb",
        },
        Object {
    -     "currentValue": "volatile",
    +     "currentValue": "volatile\"",
          "datasource": "orb",
          "depName": "volatile",
          "depType": "orb",
        },
        Object {},

      20 |     it('extracts orbs too', () => {
      21 |       const res = extractPackageFile(file2);
    > 22 |       expect(res?.deps).toMatchObject([
         |                         ^
      23 |         {
      24 |           depName: 'release-workflows',
      25 |           currentValue: '4.1.0',

      at Object.<anonymous> (lib/modules/manager/circleci/extract.spec.ts:22:25)

The goal is to agree on a way to fix this issue, and then fix it.

Context

I did not find any open issue or discussion referencing this bug. I wanted to open one and figured it was simpler to show the bug via the CI and a simple fixture change.

Documentation (please check one with an [x])

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

I have verified these changes via:

secustor commented 2 months ago

Closing as the linked PR is going to solve this.