core/yarn.lock out-of-sync after [#3374664]

Created on 18 July 2023, about 1 year ago

Problem/Motivation

In ๐Ÿ“Œ Security update multiple JavaScript dependencies Fixed we updated a bunch of JavaScript dependencies with security issues.

It turns out the provided patches in there didn't have a fully updated core/yarn.lock (mea culpa).
That leads to every Drupal CI test run on 10.1.x and 11.x now doing a yarn run build:css --check.

That check returns no errors, but adds ~5 seconds to each test run.

$ node ./scripts/css/postcss-build.js --check
[snipped]
Done in 4.75s.

Steps to reproduce

- Checkout either 10.1.x or 11.x
- $ cd core/
- $yarn install

Notice that core/yarn.lock is updated:

5101,5104c5101,5104
< terser@^5.17.7:
<   version "5.19.0"
<   resolved "https://registry.yarnpkg.com/terser/-/terser-5.19.0.tgz#7b3137b01226bdd179978207b9c8148754a6da9c"
<   integrity sha512-JpcpGOQLOXm2jsomozdMDpd5f8ZHh1rR48OFgWUH3QsyZcfPgv2qDCYbcDEAYNd4OZRj2bWYKpwdll/udZCk/Q==
---
> terser@^5.19.0:
>   version "5.19.1"
>   resolved "https://registry.yarnpkg.com/terser/-/terser-5.19.1.tgz#dbd7231f224a9e2401d0f0959542ed74d76d340b"
>   integrity sha512-27hxBUVdV6GoNg1pKQ7Z5cbR6V9txPVyBA+FQw3BaZ1Wuzvztce5p156DaP0NVZNrMZZ+6iG9Syf7WgMNKDg2Q==

Proposed resolution

Patch yarn.lock with the above, commit and shave off these extra 5 seconds on each test run.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

๐Ÿ“Œ Task
Status

Fixed

Version

11.0 ๐Ÿ”ฅ

Component
Javascriptย  โ†’

Last updated 5 days ago

  • Maintained by
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom @justafish
  • ๐Ÿ‡ซ๐Ÿ‡ทFrance @nod_
Created by

๐Ÿ‡ณ๐Ÿ‡ฑNetherlands spokje

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @spokje
  • ๐Ÿ‡ณ๐Ÿ‡ฑNetherlands spokje
  • last update about 1 year ago
    29,815 pass
  • ๐Ÿ‡ณ๐Ÿ‡ฑNetherlands spokje

    Very unsure what's going on with 10.1.x. Doing the above doesn't give me a changed yarn.lock locally, nor does the CI log show the last line which 11.x shows, which indicates the yarn.lock is out-of-sync:

    00:02:11.080 yarn install v1.22.19
    00:02:11.147 [1/5] Validating package.json...
    00:02:11.150 [2/5] Resolving packages...
    00:02:11.460 [3/5] Fetching packages...
    00:02:19.074 [4/5] Linking dependencies...
    00:02:23.010 [5/5] Building fresh packages...
    00:02:23.073 success Saved lockfile.
    

    It _does_ however triggers a yarn run build:css --check somewhere...

  • Status changed to Needs review about 1 year ago
  • ๐Ÿ‡ณ๐Ÿ‡ฑNetherlands spokje
  • ๐Ÿ‡ณ๐Ÿ‡ฑNetherlands spokje
  • Status changed to RTBC about 1 year ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave

    Sorry didn't catch this before!

  • Status changed to Needs review about 1 year ago
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom catch

    Committed/pushed to 11.x, thanks!

    It's not clear to me what's going on with 10.1.x - the 11.x patch definitely doesn't apply at least.

    Moving to needs review but could go straight to fixed if the answer is no changes to 10.1.x

  • ๐Ÿ‡ซ๐Ÿ‡ฎFinland lauriii Finland

    Wondering why drupalci is not running yarn with โ€”frozen-lockfile ๐Ÿค”

  • ๐Ÿ‡ณ๐Ÿ‡ฑNetherlands spokje

    Wondering why drupalci is not running yarn with โ€”frozen-lockfile ๐Ÿค”

    Stumbled over this when looking into the mentioned yarn check problems.

    NOTE: The command yarn check has been historically buggy and undermaintained and, as such, has been deprecated and will be removed in Yarn 2.0. You should use yarn install --check-files instead.

    Source: https://classic.yarnpkg.com/lang/en/docs/cli/check/

    So wondering why we're using that?

    Anyway: Looking at this: https://github.com/yarnpkg/yarn/issues/4147

    yarn install โ€”frozen-lockfile would have thrown an error instead of updating the yarn.lock in this case, which is AFAICT exactly what we want (and I personally, as the person opening the above issue, would have expected to be the default behaviour of yarn install in the first place).

    Am I right in thinking we need/want a follow-up issue to use yarn install โ€”frozen-lockfile instead of yarn install in core/scripts/dev/commit-code-check.sh?

  • ๐Ÿ‡ณ๐Ÿ‡ฑNetherlands spokje

    And to add to the 10.1.x mystery: The latest commit on that branch now _doesn't_ trigger yarn run build:css --check anymore...

    So this issue is probably "fixed" now, leaving open for the yarn check and yarn install --frozen-lockfile questions/possible follow-up questions.

  • Status changed to Fixed about 1 year ago
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom catch

    OK let's move this back to fixed, I think that's definitely worth a follow-up to use --frozen-lockfile though.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024