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:
 | 
					    paths:
 | 
				
			||||||
      - core/node_modules/
 | 
					      - core/node_modules/
 | 
				
			||||||
  script:
 | 
					  script:
 | 
				
			||||||
    - yarn --cwd ./core install
 | 
					    - cd core
 | 
				
			||||||
 | 
					    - corepack enable
 | 
				
			||||||
 | 
					    - yarn install
 | 
				
			||||||
 | 
					
 | 
				
			||||||
################
 | 
					################
 | 
				
			||||||
# Lint Jobs
 | 
					# Lint Jobs
 | 
				
			||||||
| 
						 | 
					@ -370,8 +372,10 @@ default:
 | 
				
			||||||
    - when: manual
 | 
					    - when: manual
 | 
				
			||||||
      allow_failure: true
 | 
					      allow_failure: true
 | 
				
			||||||
  script:
 | 
					  script:
 | 
				
			||||||
    - yarn --cwd=./core run -s check:ckeditor5
 | 
					    - cd core
 | 
				
			||||||
    - yarn --cwd=./core run -s lint:core-js-passing --format gitlab
 | 
					    - corepack enable
 | 
				
			||||||
 | 
					    - yarn run check:ckeditor5
 | 
				
			||||||
 | 
					    - yarn run lint:core-js-passing --format gitlab
 | 
				
			||||||
  artifacts:
 | 
					  artifacts:
 | 
				
			||||||
    reports:
 | 
					    reports:
 | 
				
			||||||
      codequality: eslint-quality-report.json
 | 
					      codequality: eslint-quality-report.json
 | 
				
			||||||
| 
						 | 
					@ -392,8 +396,10 @@ default:
 | 
				
			||||||
    - when: manual
 | 
					    - when: manual
 | 
				
			||||||
      allow_failure: true
 | 
					      allow_failure: true
 | 
				
			||||||
  script:
 | 
					  script:
 | 
				
			||||||
    - yarn run --cwd=./core build:css --check
 | 
					    - corepack enable
 | 
				
			||||||
    - yarn run --cwd=./core lint:css --color --custom-formatter=node_modules/stylelint-formatter-gitlab
 | 
					    - cd core
 | 
				
			||||||
 | 
					    - yarn run build:css --check
 | 
				
			||||||
 | 
					    - yarn run lint:css --color --custom-formatter=node_modules/stylelint-formatter-gitlab
 | 
				
			||||||
  artifacts:
 | 
					  artifacts:
 | 
				
			||||||
    reports:
 | 
					    reports:
 | 
				
			||||||
      codequality: stylelint-quality-report.json
 | 
					      codequality: stylelint-quality-report.json
 | 
				
			||||||
| 
						 | 
					@ -409,7 +415,9 @@ default:
 | 
				
			||||||
      else
 | 
					      else
 | 
				
			||||||
        echo "HEAD is $(git rev-parse HEAD). \$CI_MERGE_REQUEST_DIFF_BASE_SHA is ${CI_MERGE_REQUEST_DIFF_BASE_SHA}";
 | 
					        echo "HEAD is $(git rev-parse HEAD). \$CI_MERGE_REQUEST_DIFF_BASE_SHA is ${CI_MERGE_REQUEST_DIFF_BASE_SHA}";
 | 
				
			||||||
      fi;
 | 
					      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':
 | 
					'📔 Validatable config':
 | 
				
			||||||
  <<: [ *default-job-settings-lint ]
 | 
					  <<: [ *default-job-settings-lint ]
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -195,7 +195,9 @@ variables:
 | 
				
			||||||
    - echo "DRUPAL_NIGHTWATCH_OUTPUT='"../nightwatch_output"'" >> ./core/.env
 | 
					    - echo "DRUPAL_NIGHTWATCH_OUTPUT='"../nightwatch_output"'" >> ./core/.env
 | 
				
			||||||
    - echo "COLUMNS=1000" >> ./core/.env
 | 
					    - echo "COLUMNS=1000" >> ./core/.env
 | 
				
			||||||
    - chown -R www-data:www-data ./sites /var/www
 | 
					    - 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:
 | 
					  after_script:
 | 
				
			||||||
    - cp /builds/chromedriver.log ./
 | 
					    - cp /builds/chromedriver.log ./
 | 
				
			||||||
  artifacts:
 | 
					  artifacts:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -37,6 +37,8 @@
 | 
				
			||||||
      "MAINTAINERS.txt",
 | 
					      "MAINTAINERS.txt",
 | 
				
			||||||
      "package.json",
 | 
					      "package.json",
 | 
				
			||||||
      "yarn.lock",
 | 
					      "yarn.lock",
 | 
				
			||||||
 | 
					      ".yarnrc.yml",
 | 
				
			||||||
 | 
					      ".yarn/*",
 | 
				
			||||||
      "misc/cspell/dictionary.txt",
 | 
					      "misc/cspell/dictionary.txt",
 | 
				
			||||||
      "phpstan*"
 | 
					      "phpstan*"
 | 
				
			||||||
    ],
 | 
					    ],
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,6 +3,10 @@
 | 
				
			||||||
node_modules
 | 
					node_modules
 | 
				
			||||||
yarn-error.log
 | 
					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.
 | 
					# Ignore overrides of core's phpcs.xml.dist and phpunit.xml.dist.
 | 
				
			||||||
phpcs.xml
 | 
					phpcs.xml
 | 
				
			||||||
phpunit.xml
 | 
					phpunit.xml
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1 @@
 | 
				
			||||||
 | 
					nodeLinker: node-modules
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,5 @@
 | 
				
			||||||
bartik
 | 
					bartik
 | 
				
			||||||
 | 
					corepack
 | 
				
			||||||
dblog
 | 
					dblog
 | 
				
			||||||
dependee
 | 
					dependee
 | 
				
			||||||
dependee's
 | 
					dependee's
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,7 +4,7 @@
 | 
				
			||||||
  "license": "GPL-2.0",
 | 
					  "license": "GPL-2.0",
 | 
				
			||||||
  "private": true,
 | 
					  "private": true,
 | 
				
			||||||
  "engines": {
 | 
					  "engines": {
 | 
				
			||||||
    "yarn": ">= 1.6",
 | 
					    "yarn": ">= 4.1.1",
 | 
				
			||||||
    "node": ">= 18.0"
 | 
					    "node": ">= 18.0"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "scripts": {
 | 
					  "scripts": {
 | 
				
			||||||
| 
						 | 
					@ -21,9 +21,9 @@
 | 
				
			||||||
    "test:nightwatch": "node -r dotenv-safe/config ./node_modules/.bin/nightwatch --config ./tests/Drupal/Nightwatch/nightwatch.conf.js",
 | 
					    "test:nightwatch": "node -r dotenv-safe/config ./node_modules/.bin/nightwatch --config ./tests/Drupal/Nightwatch/nightwatch.conf.js",
 | 
				
			||||||
    "prettier": "prettier --write \"./**/*.js\"",
 | 
					    "prettier": "prettier --write \"./**/*.js\"",
 | 
				
			||||||
    "spellcheck": "cspell -c .cspell.json --cache",
 | 
					    "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: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",
 | 
					    "vendor-update": "node ./scripts/js/vendor-update.js",
 | 
				
			||||||
    "watch:ckeditor5": "webpack --config ./modules/ckeditor5/webpack.config.js --watch",
 | 
					    "watch:ckeditor5": "webpack --config ./modules/ckeditor5/webpack.config.js --watch",
 | 
				
			||||||
    "build:ckeditor5": "webpack --config ./modules/ckeditor5/webpack.config.js",
 | 
					    "build:ckeditor5": "webpack --config ./modules/ckeditor5/webpack.config.js",
 | 
				
			||||||
| 
						 | 
					@ -118,5 +118,5 @@
 | 
				
			||||||
    "last 1 Samsung version",
 | 
					    "last 1 Samsung version",
 | 
				
			||||||
    "Firefox ESR"
 | 
					    "Firefox ESR"
 | 
				
			||||||
  ],
 | 
					  ],
 | 
				
			||||||
  "packageManager": "yarn@1.22.22"
 | 
					  "packageManager": "yarn@4.1.1"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -205,25 +205,18 @@ fi
 | 
				
			||||||
cd "$TOP_LEVEL/core"
 | 
					cd "$TOP_LEVEL/core"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Ensure JavaScript development dependencies are installed.
 | 
					# Ensure JavaScript development dependencies are installed.
 | 
				
			||||||
yarn check -s 2>/dev/null
 | 
					yarn --version
 | 
				
			||||||
if [ "$?" -ne "0" ]; then
 | 
					yarn >/dev/null
 | 
				
			||||||
  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
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Check all files for spelling in one go for better performance.
 | 
					# Check all files for spelling in one go for better performance.
 | 
				
			||||||
if [[ $CSPELL_DICTIONARY_FILE_CHANGED == "1" ]] ; then
 | 
					if [[ $CSPELL_DICTIONARY_FILE_CHANGED == "1" ]] ; then
 | 
				
			||||||
  printf "\nRunning spellcheck on *all* files.\n"
 | 
					  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
 | 
					else
 | 
				
			||||||
  # Check all files for spelling in one go for better performance. We pipe the
 | 
					  # 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
 | 
					  # list files in so we obey the globs set on the spellcheck:core command in
 | 
				
			||||||
  # core/package.json.
 | 
					  # 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
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ "$?" -ne "0" ]; then
 | 
					if [ "$?" -ne "0" ]; then
 | 
				
			||||||
| 
						 | 
					@ -285,7 +278,7 @@ fi
 | 
				
			||||||
# When the eslint config has been changed, then eslint must check all files.
 | 
					# When the eslint config has been changed, then eslint must check all files.
 | 
				
			||||||
if [[ $ESLINT_CONFIG_PASSING_FILE_CHANGED == "1" ]]; then
 | 
					if [[ $ESLINT_CONFIG_PASSING_FILE_CHANGED == "1" ]]; then
 | 
				
			||||||
  cd "$TOP_LEVEL/core"
 | 
					  cd "$TOP_LEVEL/core"
 | 
				
			||||||
  yarn run -s lint:core-js-passing "$TOP_LEVEL/core"
 | 
					  yarn run lint:core-js-passing "$TOP_LEVEL/core"
 | 
				
			||||||
  CORRECTJS=$?
 | 
					  CORRECTJS=$?
 | 
				
			||||||
  if [ "$CORRECTJS" -ne "0" ]; then
 | 
					  if [ "$CORRECTJS" -ne "0" ]; then
 | 
				
			||||||
    # If there are failures set the status to a number other than 0.
 | 
					    # 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.
 | 
					# When the stylelint config has been changed, then stylelint must check all files.
 | 
				
			||||||
if [[ $STYLELINT_CONFIG_FILE_CHANGED == "1" ]]; then
 | 
					if [[ $STYLELINT_CONFIG_FILE_CHANGED == "1" ]]; then
 | 
				
			||||||
  cd "$TOP_LEVEL/core"
 | 
					  cd "$TOP_LEVEL/core"
 | 
				
			||||||
  yarn run -s lint:css
 | 
					  yarn run lint:css
 | 
				
			||||||
  if [ "$?" -ne "0" ]; then
 | 
					  if [ "$?" -ne "0" ]; then
 | 
				
			||||||
    # If there are failures set the status to a number other than 0.
 | 
					    # If there are failures set the status to a number other than 0.
 | 
				
			||||||
    FINAL_STATUS=1
 | 
					    FINAL_STATUS=1
 | 
				
			||||||
| 
						 | 
					@ -325,7 +318,7 @@ fi
 | 
				
			||||||
# is in sync and conform to expectations.
 | 
					# is in sync and conform to expectations.
 | 
				
			||||||
if [[ "$DRUPALCI" == "1" ]] && [[ $CKEDITOR5_PLUGINS_CHANGED == "1" ]]; then
 | 
					if [[ "$DRUPALCI" == "1" ]] && [[ $CKEDITOR5_PLUGINS_CHANGED == "1" ]]; then
 | 
				
			||||||
  cd "$TOP_LEVEL/core"
 | 
					  cd "$TOP_LEVEL/core"
 | 
				
			||||||
  yarn run -s check:ckeditor5
 | 
					  yarn run check:ckeditor5
 | 
				
			||||||
  if [ "$?" -ne "0" ]; then
 | 
					  if [ "$?" -ne "0" ]; then
 | 
				
			||||||
    # If there are failures set the status to a number other than 0.
 | 
					    # If there are failures set the status to a number other than 0.
 | 
				
			||||||
    FINAL_STATUS=1
 | 
					    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