Issue #3109556 by finnsky, nod_, longwave, effulgentsia, Ambient.Impact: Update from Yarn 1 to Yarn 4
							parent
							
								
									1e80a22b06
								
							
						
					
					
						commit
						ad10de38dd
					
				| 
						 | 
				
			
			@ -305,7 +305,9 @@ default:
 | 
			
		|||
    paths:
 | 
			
		||||
      - core/node_modules/
 | 
			
		||||
  script:
 | 
			
		||||
    - yarn --cwd ./core install
 | 
			
		||||
    - cd core
 | 
			
		||||
    - corepack enable
 | 
			
		||||
    - yarn install
 | 
			
		||||
 | 
			
		||||
################
 | 
			
		||||
# Lint Jobs
 | 
			
		||||
| 
						 | 
				
			
			@ -370,8 +372,10 @@ default:
 | 
			
		|||
    - when: manual
 | 
			
		||||
      allow_failure: true
 | 
			
		||||
  script:
 | 
			
		||||
    - yarn --cwd=./core run -s check:ckeditor5
 | 
			
		||||
    - yarn --cwd=./core run -s lint:core-js-passing --format gitlab
 | 
			
		||||
    - cd core
 | 
			
		||||
    - corepack enable
 | 
			
		||||
    - yarn run check:ckeditor5
 | 
			
		||||
    - yarn run lint:core-js-passing --format gitlab
 | 
			
		||||
  artifacts:
 | 
			
		||||
    reports:
 | 
			
		||||
      codequality: eslint-quality-report.json
 | 
			
		||||
| 
						 | 
				
			
			@ -392,8 +396,10 @@ default:
 | 
			
		|||
    - when: manual
 | 
			
		||||
      allow_failure: true
 | 
			
		||||
  script:
 | 
			
		||||
    - yarn run --cwd=./core build:css --check
 | 
			
		||||
    - yarn run --cwd=./core lint:css --color --custom-formatter=node_modules/stylelint-formatter-gitlab
 | 
			
		||||
    - corepack enable
 | 
			
		||||
    - cd core
 | 
			
		||||
    - yarn run build:css --check
 | 
			
		||||
    - yarn run lint:css --color --custom-formatter=node_modules/stylelint-formatter-gitlab
 | 
			
		||||
  artifacts:
 | 
			
		||||
    reports:
 | 
			
		||||
      codequality: stylelint-quality-report.json
 | 
			
		||||
| 
						 | 
				
			
			@ -409,7 +415,9 @@ default:
 | 
			
		|||
      else
 | 
			
		||||
        echo "HEAD is $(git rev-parse HEAD). \$CI_MERGE_REQUEST_DIFF_BASE_SHA is ${CI_MERGE_REQUEST_DIFF_BASE_SHA}";
 | 
			
		||||
      fi;
 | 
			
		||||
    - git diff ${CI_MERGE_REQUEST_TARGET_BRANCH_SHA:-$CI_MERGE_REQUEST_DIFF_BASE_SHA} --name-only | sed "s_^_../_" | yarn --cwd=./core run -s spellcheck:core --no-must-find-files --file-list stdin
 | 
			
		||||
    - cd core
 | 
			
		||||
    - corepack enable
 | 
			
		||||
    - git diff ${CI_MERGE_REQUEST_TARGET_BRANCH_SHA:-$CI_MERGE_REQUEST_DIFF_BASE_SHA} --name-only | sed "s_^_../_" | yarn run spellcheck:core --no-must-find-files --file-list stdin
 | 
			
		||||
 | 
			
		||||
'📔 Validatable config':
 | 
			
		||||
  <<: [ *default-job-settings-lint ]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -195,7 +195,9 @@ variables:
 | 
			
		|||
    - echo "DRUPAL_NIGHTWATCH_OUTPUT='"../nightwatch_output"'" >> ./core/.env
 | 
			
		||||
    - echo "COLUMNS=1000" >> ./core/.env
 | 
			
		||||
    - chown -R www-data:www-data ./sites /var/www
 | 
			
		||||
    - sudo -u www-data yarn run --cwd=./core test:nightwatch --workers=4
 | 
			
		||||
    - cd core
 | 
			
		||||
    - corepack enable
 | 
			
		||||
    - sudo -u www-data yarn run test:nightwatch --workers=4
 | 
			
		||||
  after_script:
 | 
			
		||||
    - cp /builds/chromedriver.log ./
 | 
			
		||||
  artifacts:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,6 +37,8 @@
 | 
			
		|||
      "MAINTAINERS.txt",
 | 
			
		||||
      "package.json",
 | 
			
		||||
      "yarn.lock",
 | 
			
		||||
      ".yarnrc.yml",
 | 
			
		||||
      ".yarn/*",
 | 
			
		||||
      "misc/cspell/dictionary.txt",
 | 
			
		||||
      "phpstan*"
 | 
			
		||||
    ],
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,6 +3,10 @@
 | 
			
		|||
node_modules
 | 
			
		||||
yarn-error.log
 | 
			
		||||
 | 
			
		||||
# Ignore yarn files
 | 
			
		||||
# @see https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
 | 
			
		||||
.yarn/*
 | 
			
		||||
 | 
			
		||||
# Ignore overrides of core's phpcs.xml.dist and phpunit.xml.dist.
 | 
			
		||||
phpcs.xml
 | 
			
		||||
phpunit.xml
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
nodeLinker: node-modules
 | 
			
		||||
| 
						 | 
				
			
			@ -1,4 +1,5 @@
 | 
			
		|||
bartik
 | 
			
		||||
corepack
 | 
			
		||||
dblog
 | 
			
		||||
dependee
 | 
			
		||||
dependee's
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,7 +4,7 @@
 | 
			
		|||
  "license": "GPL-2.0",
 | 
			
		||||
  "private": true,
 | 
			
		||||
  "engines": {
 | 
			
		||||
    "yarn": ">= 1.6",
 | 
			
		||||
    "yarn": ">= 4.1.1",
 | 
			
		||||
    "node": ">= 18.0"
 | 
			
		||||
  },
 | 
			
		||||
  "scripts": {
 | 
			
		||||
| 
						 | 
				
			
			@ -21,9 +21,9 @@
 | 
			
		|||
    "test:nightwatch": "node -r dotenv-safe/config ./node_modules/.bin/nightwatch --config ./tests/Drupal/Nightwatch/nightwatch.conf.js",
 | 
			
		||||
    "prettier": "prettier --write \"./**/*.js\"",
 | 
			
		||||
    "spellcheck": "cspell -c .cspell.json --cache",
 | 
			
		||||
    "spellcheck:make-dict": "rm -f misc/cspell/dictionary.txt && touch misc/cspell/dictionary.txt && yarn -s spellcheck:core --unique --words-only | perl -Mopen=locale -pe '$_=lc$_' | LC_ALL=en_US.UTF-8 tr -d \\\\\\\\ | LC_ALL=C sort -u -o misc/cspell/dictionary.txt",
 | 
			
		||||
    "spellcheck:make-dict": "rm -f misc/cspell/dictionary.txt && touch misc/cspell/dictionary.txt && yarn spellcheck:core --unique --words-only | perl -Mopen=locale -pe '$_=lc$_' | LC_ALL=en_US.UTF-8 tr -d \\\\\\\\ | LC_ALL=C sort -u -o misc/cspell/dictionary.txt",
 | 
			
		||||
    "spellcheck:core": "cspell -c .cspell.json --root .. --cache --cache-location core/.cspellcache \"core/**/*\" \"composer/**/*\" \"composer.json\" \".gitlab-ci/*\" \".gitlab-ci.yml\"",
 | 
			
		||||
    "spellcheck:make-drupal-dict": "rm -f misc/cspell/drupal-dictionary.txt && touch misc/cspell/drupal-dictionary.txt && yarn -s spellcheck:core --unique --words-only | perl -Mopen=locale -pe '$_=lc$_' | LC_ALL=en_US.UTF-8 tr -d \\\\\\\\ | LC_ALL=C sort -u -o misc/cspell/drupal-dictionary.txt",
 | 
			
		||||
    "spellcheck:make-drupal-dict": "rm -f misc/cspell/drupal-dictionary.txt && touch misc/cspell/drupal-dictionary.txt && yarn spellcheck:core --unique --words-only | perl -Mopen=locale -pe '$_=lc$_' | LC_ALL=en_US.UTF-8 tr -d \\\\\\\\ | LC_ALL=C sort -u -o misc/cspell/drupal-dictionary.txt",
 | 
			
		||||
    "vendor-update": "node ./scripts/js/vendor-update.js",
 | 
			
		||||
    "watch:ckeditor5": "webpack --config ./modules/ckeditor5/webpack.config.js --watch",
 | 
			
		||||
    "build:ckeditor5": "webpack --config ./modules/ckeditor5/webpack.config.js",
 | 
			
		||||
| 
						 | 
				
			
			@ -118,5 +118,5 @@
 | 
			
		|||
    "last 1 Samsung version",
 | 
			
		||||
    "Firefox ESR"
 | 
			
		||||
  ],
 | 
			
		||||
  "packageManager": "yarn@1.22.22"
 | 
			
		||||
  "packageManager": "yarn@4.1.1"
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -205,25 +205,18 @@ fi
 | 
			
		|||
cd "$TOP_LEVEL/core"
 | 
			
		||||
 | 
			
		||||
# Ensure JavaScript development dependencies are installed.
 | 
			
		||||
yarn check -s 2>/dev/null
 | 
			
		||||
if [ "$?" -ne "0" ]; then
 | 
			
		||||
  printf "Drupal's JavaScript development dependencies are not installed or cannot be resolved. Run 'yarn install' inside the core directory, or 'yarn check -s' to list other errors.\n"
 | 
			
		||||
  DEPENDENCIES_NEED_INSTALLING=1;
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [ $DEPENDENCIES_NEED_INSTALLING -ne 0 ]; then
 | 
			
		||||
  exit 1;
 | 
			
		||||
fi
 | 
			
		||||
yarn --version
 | 
			
		||||
yarn >/dev/null
 | 
			
		||||
 | 
			
		||||
# Check all files for spelling in one go for better performance.
 | 
			
		||||
if [[ $CSPELL_DICTIONARY_FILE_CHANGED == "1" ]] ; then
 | 
			
		||||
  printf "\nRunning spellcheck on *all* files.\n"
 | 
			
		||||
  yarn run -s spellcheck:core --no-must-find-files --no-progress
 | 
			
		||||
  yarn run spellcheck:core --no-must-find-files --no-progress
 | 
			
		||||
else
 | 
			
		||||
  # Check all files for spelling in one go for better performance. We pipe the
 | 
			
		||||
  # list files in so we obey the globs set on the spellcheck:core command in
 | 
			
		||||
  # core/package.json.
 | 
			
		||||
  echo "${ABS_FILES}" | tr ' ' '\n' | yarn run -s spellcheck:core --no-must-find-files --file-list stdin
 | 
			
		||||
    echo "${ABS_FILES}" | tr ' ' '\n' | yarn run spellcheck:core --no-must-find-files --root --file-list $TOP_LEVEL $ABS_FILES >/dev/null stdin
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [ "$?" -ne "0" ]; then
 | 
			
		||||
| 
						 | 
				
			
			@ -285,7 +278,7 @@ fi
 | 
			
		|||
# When the eslint config has been changed, then eslint must check all files.
 | 
			
		||||
if [[ $ESLINT_CONFIG_PASSING_FILE_CHANGED == "1" ]]; then
 | 
			
		||||
  cd "$TOP_LEVEL/core"
 | 
			
		||||
  yarn run -s lint:core-js-passing "$TOP_LEVEL/core"
 | 
			
		||||
  yarn run lint:core-js-passing "$TOP_LEVEL/core"
 | 
			
		||||
  CORRECTJS=$?
 | 
			
		||||
  if [ "$CORRECTJS" -ne "0" ]; then
 | 
			
		||||
    # If there are failures set the status to a number other than 0.
 | 
			
		||||
| 
						 | 
				
			
			@ -304,7 +297,7 @@ fi
 | 
			
		|||
# When the stylelint config has been changed, then stylelint must check all files.
 | 
			
		||||
if [[ $STYLELINT_CONFIG_FILE_CHANGED == "1" ]]; then
 | 
			
		||||
  cd "$TOP_LEVEL/core"
 | 
			
		||||
  yarn run -s lint:css
 | 
			
		||||
  yarn run lint:css
 | 
			
		||||
  if [ "$?" -ne "0" ]; then
 | 
			
		||||
    # If there are failures set the status to a number other than 0.
 | 
			
		||||
    FINAL_STATUS=1
 | 
			
		||||
| 
						 | 
				
			
			@ -325,7 +318,7 @@ fi
 | 
			
		|||
# is in sync and conform to expectations.
 | 
			
		||||
if [[ "$DRUPALCI" == "1" ]] && [[ $CKEDITOR5_PLUGINS_CHANGED == "1" ]]; then
 | 
			
		||||
  cd "$TOP_LEVEL/core"
 | 
			
		||||
  yarn run -s check:ckeditor5
 | 
			
		||||
  yarn run check:ckeditor5
 | 
			
		||||
  if [ "$?" -ne "0" ]; then
 | 
			
		||||
    # If there are failures set the status to a number other than 0.
 | 
			
		||||
    FINAL_STATUS=1
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										14634
									
								
								core/yarn.lock
								
								
								
								
							
							
						
						
									
										14634
									
								
								core/yarn.lock
								
								
								
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Loading…
	
		Reference in New Issue