Update dependencies and fix e2e tests (#2160)

* Bump webpack from 5.83.1 to 5.94.0

Bumps [webpack](https://github.com/webpack/webpack) from 5.83.1 to 5.94.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.83.1...v5.94.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update e2e workflow so we manually install docker-compose

* Revert "Update e2e workflow so we manually install docker-compose"

This reverts commit 6660072f60.

* Update extra packages

* Update node

* Downgrade susy

* New build script

* Fix test:e2e script

* Fix e2e test

* Make sure build-js.sh and validate-build.sh are excluded from builds

* Update @wordpress/prettier-config

* Downgrade @wordpress/eslint-plugin and @wordpress/scripts

* Remove @typescript-eslint/no-this-alias rule

* Fix versions

* Update .nvmrc version

* Update package-lock.json

* Update package-lock.json (II)

* Fix missing variables in scripts

* Remove new build-js.sh script

* Remove testing attribute

* Update node and npm version

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
Albert Juhé Lluveras 2024-09-19 09:40:19 +02:00 committed by GitHub
parent 61f976e824
commit 7100254161
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 17722 additions and 10317 deletions

View file

@ -8,6 +8,7 @@ module.exports = {
'woocommerce/feature-flag': 'off',
'@wordpress/no-global-active-element': 'warn',
camelcase: 'off',
'@typescript-eslint/no-this-alias': 'off',
},
ignorePatterns: [ '**/*.min.js' ],
};

View file

@ -23,10 +23,10 @@ jobs:
${{ runner.os }}-build-
${{ runner.os }}-

- name: Use Node.js 14.x
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 20.x

- name: Npm install and build
run: |

2
.nvmrc
View file

@ -1 +1 @@
14.21.1
20.11.1

View file

@ -29,6 +29,7 @@
"renovate.json",
"node_modules",
"storefront.zip",
"validate-build.sh",
".*"
]
},

View file

@ -4,6 +4,7 @@ describe( 'Storefront', () => {
} );

it( 'should have "built with WooCommerce" footer', async () => {
await expect( page ).toMatch( 'Built with WooCommerce.' );
const footerText = await page.evaluate( () => document.querySelector( 'body' ).innerText );
expect( footerText ).toMatch( 'Built with WooCommerce.' );
} );
} );

27950
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -7,16 +7,6 @@
"type": "git",
"url": "https://github.com/woothemes/storefront.git"
},
"assets": {
"js": {
"min": "assets/js/**/**/*.min.js assets/js/**/*.min.js assets/js/*.min.js",
"src": "assets/js/*.js assets/js/**/*.js assets/js/**/**/*.js"
},
"css": {
"min": "assets/css/**/*.css assets/css/**/**/*.css *.css",
"src": "assets/css/**/*.scss assets/css/**/**/*.scss *.scss"
}
},
"rtlcssConfig": {
"options": {
"autoRename": false,
@ -36,13 +26,13 @@
"postbuild": "npm run validate-build && npm run -s archive",
"archive": "rm -rf $npm_package_name && composer archive --file=$npm_package_name --format=zip",
"postarchive": "rm -rf $npm_package_name && unzip $npm_package_name.zip -d $npm_package_name && rm $npm_package_name.zip && zip -r $npm_package_name.zip $npm_package_name && rm -rf $npm_package_name",
"prebuild:js": "rm -f $npm_package_assets_js_min",
"build:js": "echo \"$(tput setaf \"3\")Building JS Files$(tput sgr0)\"; for f in $npm_package_assets_js_src; do file=${f%.js}; echo \"$(tput setaf \"3\")Building $f$(tput sgr0)\"; node_modules/.bin/uglifyjs $f -c -m > $file.min.js; done",
"prebuild:css": "rm -f $npm_package_assets_css_min",
"prebuild:js": "rm -f $npm_package_config_assets_js_min",
"build:js": "echo \"$(tput setaf \"3\")Building JS Files$(tput sgr0)\"; for f in $npm_package_config_assets_js_src; do file=${f%.js}; echo \"$(tput setaf \"3\")Building $f$(tput sgr0)\"; node_modules/.bin/uglifyjs $f -c -m > $file.min.js; done",
"prebuild:css": "rm -f $npm_package_config_assets_css_min",
"build:css": "echo \"$(tput setaf \"3\")Building CSS Files$(tput sgr0)\"; sass -I node_modules/bourbon/core -I node_modules/susy/sass assets/css:assets/css --style compressed --no-source-map && sass -I node_modules/bourbon/core -I node_modules/susy/sass style.scss:style.css --style compressed --no-source-map",
"postbuild:css": "npm run autoprefixer && npm run rtlcss",
"autoprefixer": "echo \"$(tput setaf \"3\")Running Autoprefixer$(tput sgr0)\"; for f in $npm_package_assets_css_min; do file=${f%.css}; postcss $f --use autoprefixer -r --verbose --no-map; done",
"rtlcss": "echo \"$(tput setaf \"3\")Building RTL CSS$(tput sgr0)\"; for f in $npm_package_assets_css_min; do file=${f%.css}; rtlcss $f $file-rtl.css; done",
"autoprefixer": "echo \"$(tput setaf \"3\")Running Autoprefixer$(tput sgr0)\"; for f in $npm_package_config_assets_css_min; do file=${f%.css}; postcss $f --use autoprefixer -r --verbose --no-map; done",
"rtlcss": "echo \"$(tput setaf \"3\")Building RTL CSS$(tput sgr0)\"; for f in $npm_package_config_assets_css_min; do file=${f%.css}; rtlcss $f $file-rtl.css; done",
"makepot": "echo \"$(tput setaf \"3\")Updating POT file$(tput sgr0)\"; wpi18n addtextdomain storefront; wpi18n makepot --domain-path languages --pot-file storefront.pot --type theme --exclude node_modules",
"watchsass": "sass -I node_modules/bourbon/core -I node_modules/susy/sass assets/css:assets/css --style compressed --watch --no-source-map",
"watchjs": "onchange \"assets/js/**/*.js\" -d 1000 -k -e \"assets/js/**/*.min.js\" -- npm run build:js",
@ -58,7 +48,7 @@
"lint:js-fix": "eslint assets/js --ext=js,jsx,ts,tsx --fix",
"lint:php": "composer run-script phpcs ./inc",
"wp-env": "wp-env",
"test:e2e": "npm run wp-env run tests-cli 'wp theme activate storefront' && cross-env wp-scripts test-e2e",
"test:e2e": "npm run wp-env run tests-cli wp theme activate storefront && cross-env wp-scripts test-e2e",
"validate-build": "./validate-build.sh"
},
"jest": {
@ -72,37 +62,47 @@
},
"config": {
"wp_org_slug": "storefront",
"translate": true
"translate": true,
"assets": {
"js": {
"min": "assets/js/**/**/*.min.js assets/js/**/*.min.js assets/js/*.min.js",
"src": "assets/js/*.js assets/js/**/*.js assets/js/**/**/*.js"
},
"css": {
"min": "assets/css/**/*.css assets/css/**/**/*.css *.css",
"src": "assets/css/**/*.scss assets/css/**/**/*.scss *.scss"
}
}
},
"license": "GPL-3.0+",
"devDependencies": {
"@woocommerce/eslint-plugin": "2.2.0",
"@wordpress/browserslist-config": "4.1.3",
"@wordpress/env": "5.14.0",
"@wordpress/eslint-plugin": "14.6.0",
"@wordpress/prettier-config": "2.16.0",
"@wordpress/scripts": "22.3.0",
"autoprefixer": "10.4.13",
"bourbon": "7.2.0",
"browserslist": "4.21.4",
"concurrently": "7.6.0",
"cross-env": "^7.0.3",
"eslint-plugin-import": "2.27.5",
"github-label-sync": "2.2.0",
"jest-puppeteer": "6.1.1",
"@woocommerce/eslint-plugin": "2.3.0",
"@wordpress/browserslist-config": "6.6.0",
"@wordpress/env": "10.6.0",
"@wordpress/eslint-plugin": "15.1.0",
"@wordpress/prettier-config": "2.25.13",
"@wordpress/scripts": "27.2.6",
"autoprefixer": "10.4.20",
"bourbon": "7.3.0",
"browserslist": "4.23.3",
"concurrently": "8.2.2",
"cross-env": "7.0.3",
"eslint-plugin-import": "2.29.1",
"github-label-sync": "2.3.1",
"jest-puppeteer": "10.1.0",
"lodash": "4.17.21",
"node-wp-i18n": "1.2.7",
"onchange": "7.1.0",
"postcss-cli": "9.1.0",
"prettier": "npm:wp-prettier@2.6.2",
"puppeteer": "14.4.1",
"rtlcss": "4.0.0",
"postcss-cli": "11.0.0",
"prettier": "npm:wp-prettier@2.8.5",
"puppeteer": "23.2.1",
"rtlcss": "4.3.0",
"susy": "2.2.14",
"typescript": "5.0.4",
"uglify-js": "3.17.4"
"typescript": "5.5.4",
"uglify-js": "3.19.3"
},
"engines": {
"node": "14.21.1",
"npm": "9.1.3"
"node": "20.17.0",
"npm": "10.8.2"
}
}