Merge branch 'bump-deps' into fix-babel

This commit is contained in:
IanDelMar 2023-10-09 15:56:45 +02:00
commit a0e0e19fe6
11 changed files with 1281 additions and 866 deletions

View File

@ -5,10 +5,17 @@ on:
branches: [ develop ]
paths:
- '**.php'
- 'phpcs.xml.dist'
- 'phpmd.xml'
- 'phpstan.neon.dist'
pull_request:
branches: [ develop ]
paths:
- '**.php'
- 'phpcs.xml.dist'
- 'phpmd.xml'
- 'phpstan.neon.dist'
pull_request_target:
workflow_dispatch:
env:
@ -25,40 +32,40 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.php-version }}
tools: composer, cs2pr
tools: cs2pr
coverage: none
env:
fail-fast: true
- name: Get Composer cache directory
id: composer-cache
- name: Cache PHPCS cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
path: .phpcs-cache.json
key: ${{ runner.os }}-phpcs-cache-${{ hashFiles('**/composer.lock', 'phpcs.xml.dist') }}
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress
- name: Install Composer dependencies
uses: "ramsey/composer-install@v2"
- name: Auto fix coding standards
run: composer phpcs-fix
continue-on-error: true
- name: Commit coding standards fixes
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Fix coding standards with phpcbf
branch: ${{ github.head_ref }}
- name: Check coding standards
run: composer phpcs-ga | cs2pr
run: composer phpcs -- -q -n --report=checkstyle | cs2pr
php-lint:
@ -68,30 +75,19 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.php-version }}
tools: composer, cs2pr
tools: cs2pr, parallel-lint
coverage: none
- name: Get Composer cache directory
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress
env:
fail-fast: true
- name: Check syntax
run: composer php-lint
run: parallel-lint --checkstyle . | cs2pr
phpstan:
@ -101,29 +97,29 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.php-version }}
tools: composer, cs2pr
coverage: none
env:
fail-fast: true
- name: Get Composer cache directory
id: composer-cache
- name: Cache PHPStan cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
path: .phpstan-cache
key: ${{ runner.os }}-phpstan-cache-${{ hashFiles('**/composer.lock', 'phpstan.neon.dist') }}
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress
- name: Install Composer dependencies
uses: "ramsey/composer-install@v2"
- name: Static Analysis
- name: Analyse
id: phpstan
run: composer phpstan -- --error-format=github
@ -131,10 +127,9 @@ jobs:
run: composer phpstan-baseline
- name: Commit updated basefile
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Update PHPStan basefile
branch: ${{ github.head_ref }}
phpmd:
@ -144,36 +139,27 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.php-version }}
tools: composer, cs2pr
tools: phpmd
coverage: none
- name: Get Composer cache directory
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress
env:
fail-fast: true
- name: Detect mess
run: composer phpmd-ga
run: phpmd . github phpmd.xml
- name: Update basefile
run: composer phpmd-baseline
run: phpmd . ansi phpmd.xml --generate-baseline
- name: Commit updated basefile
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Update PHPMD basefile
branch: ${{ github.head_ref }}

View File

@ -20,10 +20,11 @@
"php": "^7.4 || ^8.0"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
"php-parallel-lint/php-parallel-lint": "^1.3.2",
"phpcompatibility/phpcompatibility-wp": "^2.1.4",
"phpmd/phpmd": "^2.13.0",
"phpstan/phpstan": "^1.10.25",
"phpmd/phpmd": "^2.14.1",
"phpstan/phpstan": "^1.10.38",
"roave/security-advisories": "dev-latest",
"squizlabs/php_codesniffer": "^3.7.2",
"szepeviktor/phpstan-wordpress": "^1.3.0",
@ -31,21 +32,27 @@
"wptrt/wpthemereview": "^0.2.1"
},
"scripts": {
"php-lint": "@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint --exclude vendor --exclude node_modules --exclude dist --exclude .git --exclude .phpstan-cache .",
"phpcs": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs -p",
"phpcs-ga": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs -n --report=checkstyle",
"phpcs-fix": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf",
"phpcs-config-set" : "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --config-set installed_paths ../../phpcompatibility/php-compatibility,../../phpcompatibility/phpcompatibility-paragonie,../../phpcompatibility/phpcompatibility-wp,../../wp-coding-standards/wpcs,../../wptrt/wpthemereview",
"phpmd": "@php ./vendor/phpmd/phpmd/src/bin/phpmd . ansi phpmd.xml",
"phpmd-baseline": "@phpmd -- --generate-baseline",
"phpmd-ga": "@php ./vendor/phpmd/phpmd/src/bin/phpmd . github phpmd.xml",
"phpstan": "@php ./vendor/phpstan/phpstan/phpstan analyse -a src/phpstan/autoload.php",
"phpstan-baseline": "@php ./vendor/phpstan/phpstan/phpstan analyse -a src/phpstan/autoload.php --generate-baseline",
"post-install-cmd": "@phpcs-config-set",
"post-update-cmd": "@phpcs-config-set"
"php-lint": "parallel-lint --exclude vendor --exclude node_modules --exclude dist --exclude .git --exclude .phpstan-cache .",
"phpcs": "phpcs -p",
"phpcs-fix": "phpcbf",
"phpmd": "phpmd . ansi phpmd.xml",
"phpmd-baseline": "@phpmd --generate-baseline",
"phpstan": "phpstan analyse",
"phpstan-baseline": "@phpstan --generate-baseline --allow-empty-baseline"
},
"support": {
"issues": "https://github.com/understrap/understrap/issues",
"source": "https://github.com/understrap/understrap"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
},
"sort-packages": true
},
"autoload": {
"psr-4": {
"Understrap\\PHPStan\\": "src/phpstan"
}
}
}

485
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/*!
* Understrap v1.2.2 (https://understrap.com)
* Copyright 2013-2023 The UnderStrap Authors (https://github.com/understrap/understrap/graphs/contributors)
* Copyright 2013-2023 The Understrap Authors (https://github.com/understrap/understrap/graphs/contributors)
* Licensed under GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
*/
(function (global, factory) {

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
/*!
* Understrap v1.2.2 (https://understrap.com)
* Copyright 2013-2023 The UnderStrap Authors (https://github.com/understrap/understrap/graphs/contributors)
* Copyright 2013-2023 The Understrap Authors (https://github.com/understrap/understrap/graphs/contributors)
* Licensed under GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
*/
(function (global, factory) {

2
js/theme.min.js vendored

File diff suppressed because one or more lines are too long

1463
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -32,8 +32,8 @@
"extends": "./src/build/babel.config.js"
},
"engines": {
"node": ">=16",
"npm": ">=7.1.0"
"node": ">=18",
"npm": ">=8.6.0"
},
"repository": {
"type": "git",
@ -46,7 +46,7 @@
"bootstrap",
"underscores"
],
"author": "The UnderStrap Authors (https://github.com/understrap/understrap/graphs/contributors)",
"author": "The Understrap Authors (https://github.com/understrap/understrap/graphs/contributors)",
"license": "GPL-3.0",
"licenseUrl": "https://www.gnu.org/licenses/gpl-3.0.html",
"bugs": {
@ -54,30 +54,30 @@
},
"homepage": "https://understrap.com",
"devDependencies": {
"@babel/core": "^7.22.8",
"@babel/preset-env": "^7.22.7",
"@babel/core": "^7.23.0",
"@babel/preset-env": "^7.22.20",
"@popperjs/core": "^2.11.8",
"@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-commonjs": "^25.0.2",
"@rollup/plugin-multi-entry": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.1.0",
"@rollup/plugin-replace": "^5.0.2",
"autoprefixer": "^10.4.14",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^25.0.5",
"@rollup/plugin-multi-entry": "^6.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-replace": "^5.0.3",
"autoprefixer": "^10.4.16",
"bootstrap": "~5.2.3",
"bootstrap4": "npm:bootstrap@^4.6.2",
"browser-sync": "^2.29.3",
"browserslist": "^4.21.9",
"caniuse-lite": "^1.0.30001515",
"browserslist": "^4.22.1",
"caniuse-lite": "^1.0.30001546",
"clean-css-cli": "^5.6.2",
"font-awesome": "^4.7.0",
"nodemon": "^3.0.1",
"npm-run-all": "^4.1.5",
"popper.js": "^1.16.1",
"postcss": "^8.4.25",
"postcss": "^8.4.31",
"postcss-cli": "^10.1.0",
"postcss-understrap-palette-generator": "git+https://github.com/understrap/postcss-understrap-palette-generator.git",
"rollup": "^3.26.2",
"sass": "^1.63.6",
"terser": "^5.19.0"
"rollup": "^4.0.2",
"sass": "^1.69.0",
"terser": "^5.21.0"
}
}

View File

@ -4,7 +4,7 @@
<description>Apply WordPress Coding Standards to Understrap</description>
<!-- Whenever possible, cache the scan results and re-use those for unchanged files on the next scan. -->
<arg name="cache" value=".phpcs-cache"/>
<arg name="cache" value=".phpcs-cache.json"/>
<!-- Strip the filepaths down to the relevant bit. -->
<arg name="basepath" value="./"/>

View File

@ -1,8 +0,0 @@
<?php
/**
* Load PHPStan extensions
*
* @package Understrap
*/
require_once __DIR__ . '/GetThemeModReturnType.php';