Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
vankop committed Apr 11, 2024
2 parents a602d8c + 77a4398 commit 059380c
Show file tree
Hide file tree
Showing 515 changed files with 16,488 additions and 7,863 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ schemas/**/*.check.js

# Ignore some examples files
examples/**/*.js
examples/**/*.mjs
!examples/*/webpack.config.js

79 changes: 53 additions & 26 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: Test

# cspell:word eslintcache

on:
push:
branches:
Expand All @@ -23,14 +21,27 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: lts/*
cache: "yarn"
- run: yarn --frozen-lockfile
- uses: actions/cache@v3
- name: Cache prettier result
uses: actions/cache@v4
with:
path: ./node_modules/.cache/prettier/.prettier-cache
key: lint-prettier-${{ runner.os }}-node-${{ hashFiles('**/yarn.lock', '**/.prettierrc.js') }}
restore-keys: lint-prettier-
- name: Cache eslint result
uses: actions/cache@v4
with:
path: .eslintcache
key: lint-${{ env.GITHUB_SHA }}
restore-keys: lint-
key: lint-eslint-${{ runner.os }}-node-${{ hashFiles('**/yarn.lock', '**/.eslintrc.js') }}
restore-keys: lint-eslint-
- name: Cache cspell result
uses: actions/cache@v4
with:
path: .cspellcache
key: lint-cspell-${{ runner.os }}-node-${{ hashFiles('**/yarn.lock', '**/cspell.json') }}
restore-keys: lint-cspell-
- run: yarn lint
basic:
runs-on: ubuntu-latest
Expand All @@ -39,13 +50,13 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: lts/*
cache: "yarn"
- run: yarn --frozen-lockfile
- run: yarn link --frozen-lockfile || true
- run: yarn link webpack --frozen-lockfile
- run: yarn test:basic --ci
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4
with:
flags: basic
functionalities: gcov
Expand All @@ -68,18 +79,18 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: lts/*
cache: "yarn"
- run: yarn --frozen-lockfile
- run: yarn link --frozen-lockfile || true
- run: yarn link webpack --frozen-lockfile
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: .jest-cache
key: jest-unit-${{ env.GITHUB_SHA }}
restore-keys: jest-unit-
restore-keys: jest-unit-${{ hashFiles('**/yarn.lock', '**/jest.config.js') }}
- run: yarn cover:unit --ci --cacheDirectory .jest-cache
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4
with:
flags: unit
functionalities: gcov
Expand All @@ -92,9 +103,30 @@ jobs:
node-version: [10.x, 20.x]
part: [a, b]
include:
# Test with main branches of webpack dependencies
- os: ubuntu-latest
node-version: lts/*
part: a
use_main_branches: 1
- os: ubuntu-latest
node-version: lts/*
part: b
use_main_branches: 1
# Test on the latest version of Node.js
- os: ubuntu-latest
node-version: 21.x
part: a
- os: ubuntu-latest
node-version: 21.x
part: b
# Test on the old LTS version of Node.js
- os: ubuntu-latest
node-version: 18.x
part: a
- os: ubuntu-latest
node-version: 18.x
part: b
# Test on old Node.js versions
- os: ubuntu-latest
node-version: 16.x
part: a
Expand All @@ -104,15 +136,6 @@ jobs:
- os: ubuntu-latest
node-version: 12.x
part: a
# Test with main branches of webpack dependencies
- os: ubuntu-latest
node-version: 16.x
part: a
use_main_branches: 1
- os: ubuntu-latest
node-version: 16.x
part: b
use_main_branches: 1
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -123,25 +146,29 @@ jobs:
cache: "yarn"
# Install old `jest` version and deps for legacy node versions
- run: |
yarn upgrade jest@^27.5.0 jest-circus@^27.5.0 jest-cli@^27.5.0 jest-diff@^27.5.0 jest-environment-node@^27.5.0 jest-junit@^13.0.0 @types/jest@^27.4.0 pretty-format@^27.0.2 --ignore-engines
yarn upgrade jest@^27.5.0 jest-circus@^27.5.0 jest-cli@^27.5.0 jest-diff@^27.5.0 jest-environment-node@^27.5.0 jest-junit@^13.0.0 @types/jest@^27.4.0 pretty-format@^27.0.2 husky@^8.0.3 lint-staged@^13.2.1 cspell@^6.31.1 open-cli@^7.2.0 --ignore-engines
yarn --frozen-lockfile --ignore-engines
if: matrix.node-version == '10.x' || matrix.node-version == '12.x' || matrix.node-version == '14.x'
- run: |
yarn upgrade eslint-plugin-jsdoc@^47.0.0 husky@^8.0.3 lint-staged@^13.2.1 cspell@^6.31.1 open-cli@^7.2.0
yarn --frozen-lockfile
if: matrix.node-version == '16.x'
# Install main version of our deps
- run: yarn upgrade enhanced-resolve@webpack/enhanced-resolve#main loader-runner@webpack/loader-runner#main webpack-sources@webpack/webpack-sources#main watchpack@webpack/watchpack#main tapable@webpack/tapable#master
if: matrix.use_main_branches == '1'
# Install dependencies for LTS node versions
- run: yarn --frozen-lockfile
if: matrix.node-version != '10.x' && matrix.node-version != '12.x' && matrix.node-version != '14.x'
if: matrix.node-version != '10.x' && matrix.node-version != '12.x' && matrix.node-version != '14.x' && matrix.node-version != '16.x'
- run: yarn link --frozen-lockfile || true
- run: yarn link webpack --frozen-lockfile
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: .jest-cache
key: jest-integration-${{ env.GITHUB_SHA }}
restore-keys: jest-integration-
restore-keys: jest-integration-${{ hashFiles('**/yarn.lock', '**/jest.config.js') }}
- run: yarn cover:integration:${{ matrix.part }} --ci --cacheDirectory .jest-cache || yarn cover:integration:${{ matrix.part }} --ci --cacheDirectory .jest-cache -f
- run: yarn cover:merge
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4
with:
flags: integration
functionalities: gcov
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@
.vscode
.cache
.eslintcache
.cspellcache
package-lock.json
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no-install lint-staged
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ a question to [StackOverflow with the webpack tag](https://stackoverflow.com/tag

If you are twitter savvy you can tweet #webpack with your question and someone should be able to reach out and help also.

If you have discovered a 🐜 or have a feature suggestion, feel free to create an issue on Github.
If you have discovered a 🐜 or have a feature suggestion, feel free to create an issue on GitHub.

### License

Expand Down Expand Up @@ -405,7 +405,7 @@ src="https://static.monei.net/monei-logo.svg" height="30" alt="MONEI"></a>

<h2 align="center">Gold Sponsors</h2>

[Become a gold sponsor](https://opencollective.com/webpack#sponsor) and get your logo on our README on Github with a link to your site.
[Become a gold sponsor](https://opencollective.com/webpack#sponsor) and get your logo on our README on GitHub with a link to your site.

<div align="center">

Expand Down Expand Up @@ -444,7 +444,7 @@ src="https://static.monei.net/monei-logo.svg" height="30" alt="MONEI"></a>

<h2 align="center">Silver Sponsors</h2>

[Become a silver sponsor](https://opencollective.com/webpack#sponsor) and get your logo on our README on Github with a link to your site.
[Become a silver sponsor](https://opencollective.com/webpack#sponsor) and get your logo on our README on GitHub with a link to your site.

<div align="center">

Expand Down Expand Up @@ -483,7 +483,7 @@ src="https://static.monei.net/monei-logo.svg" height="30" alt="MONEI"></a>

<h2 align="center">Bronze Sponsors</h2>

[Become a bronze sponsor](https://opencollective.com/webpack#sponsor) and get your logo on our README on Github with a link to your site.
[Become a bronze sponsor](https://opencollective.com/webpack#sponsor) and get your logo on our README on GitHub with a link to your site.

<div align="center">

Expand Down Expand Up @@ -593,7 +593,7 @@ src="https://static.monei.net/monei-logo.svg" height="30" alt="MONEI"></a>

<h2 align="center">Backers</h2>

[Become a backer](https://opencollective.com/webpack#backer) and get your image on our README on Github with a link to your site.
[Become a backer](https://opencollective.com/webpack#backer) and get your image on our README on GitHub with a link to your site.

<a href="https://opencollective.com/webpack/backer/0/website?requireActive=false" target="_blank"><img src="https://opencollective.com/webpack/backer/0/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/webpack/backer/1/website?requireActive=false" target="_blank"><img src="https://opencollective.com/webpack/backer/1/avatar.svg?requireActive=false"></a>
Expand Down
58 changes: 32 additions & 26 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
steps:
- task: NodeTool@0
inputs:
versionSpec: "^16.0.0"
versionSpec: "^18.0.0"
displayName: "Install Node.js"
- script: |
curl -o- -L https://yarnpkg.com/install.sh | bash
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
steps:
- task: NodeTool@0
inputs:
versionSpec: "^16.0.0"
versionSpec: "^18.0.0"
displayName: "Install Node.js"
- script: |
curl -o- -L https://yarnpkg.com/install.sh | bash
Expand Down Expand Up @@ -113,16 +113,16 @@ jobs:
node_version: ^10.13.0
part: b
node-12-a:
node_version: ^12.4.0
node_version: ^18.0.0
part: a
node-12-b:
node_version: ^12.4.0
node_version: ^18.0.0
part: b
node-16-a:
node_version: ^16.0.0
node_version: ^20.0.0
part: a
node-16-b:
node_version: ^16.0.0
node_version: ^20.0.0
part: b
steps:
- task: NodeTool@0
Expand All @@ -143,13 +143,13 @@ jobs:
displayName: "Cache Yarn packages"
# Install old `jest` version and ignore platform problem for legacy node versions
- script: |
yarn upgrade jest@^27.5.0 jest-circus@^27.5.0 jest-cli@^27.5.0 jest-diff@^27.5.0 jest-environment-node@^27.5.0 jest-junit@^13.0.0 @types/jest@^27.4.0 pretty-format@^27.0.2 --ignore-engines
yarn upgrade jest@^27.5.0 jest-circus@^27.5.0 jest-cli@^27.5.0 jest-diff@^27.5.0 jest-environment-node@^27.5.0 jest-junit@^13.0.0 @types/jest@^27.4.0 pretty-format@^27.0.2 husky@^8.0.3 lint-staged@^13.2.1 cspell@^6.31.1 open-cli@^7.2.0 --ignore-engines
yarn --frozen-lockfile --ignore-engines
displayName: "Install dependencies (old node.js version)"
condition: or(eq(variables['node_version'], '^10.13.0'), eq(variables['node_version'], '^12.4.0'))
condition: eq(variables['node_version'], '^10.13.0')
- script: yarn --frozen-lockfile
displayName: "Install dependencies"
condition: and(not(eq(variables['node_version'], '^10.13.0')), not(eq(variables['node_version'], '^12.4.0')))
condition: not(eq(variables['node_version'], '^10.13.0'))
- script: yarn link --frozen-lockfile || true
displayName: "Link webpack"
continueOnError: true
Expand Down Expand Up @@ -184,16 +184,16 @@ jobs:
node_version: ^10.13.0
part: b
node-12-a:
node_version: ^12.4.0
part: a
node-14-a:
node_version: ^14.0.0
node_version: ^18.0.0
part: a
node-12-b:
node_version: ^18.0.0
part: b
node-16-a:
node_version: ^16.0.0
node_version: ^20.0.0
part: a
node-16-b:
node_version: ^16.0.0
node_version: ^20.0.0
part: b
steps:
- task: NodeTool@0
Expand All @@ -218,20 +218,20 @@ jobs:
- script: |
set -e
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
yarn upgrade jest@^27.5.0 jest-circus@^27.5.0 jest-cli@^27.5.0 jest-diff@^27.5.0 jest-environment-node@^27.5.0 jest-junit@^13.0.0 @types/jest@^27.4.0 pretty-format@^27.0.2 --ignore-engines
yarn upgrade jest@^27.5.0 jest-circus@^27.5.0 jest-cli@^27.5.0 jest-diff@^27.5.0 jest-environment-node@^27.5.0 jest-junit@^13.0.0 @types/jest@^27.4.0 pretty-format@^27.0.2 husky@^8.0.3 lint-staged@^13.2.1 cspell@^6.31.1 open-cli@^7.2.0 --ignore-engines
yarn --frozen-lockfile --ignore-engines
yarn link --frozen-lockfile || true
yarn link webpack --frozen-lockfile
displayName: "Install dependencies (old node.js version)"
condition: or(eq(variables['node_version'], '^10.13.0'), eq(variables['node_version'], '^12.4.0'), eq(variables['node_version'], '^14.0.0'))
condition: eq(variables['node_version'], '^10.13.0')
- script: |
set -e
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
yarn --frozen-lockfile
yarn link --frozen-lockfile || true
yarn link webpack --frozen-lockfile
displayName: "Install dependencies"
condition: and(not(eq(variables['node_version'], '^10.13.0')), not(eq(variables['node_version'], '^12.4.0')), not(eq(variables['node_version'], '^14.0.0')))
condition: not(eq(variables['node_version'], '^10.13.0'))
- script: |
set -e
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
Expand All @@ -254,19 +254,25 @@ jobs:
pool:
vmImage: macOS-latest
strategy:
maxParallel: 4
maxParallel: 6
matrix:
node-10-a:
node_version: ^10.13.0
part: a
node-10-b:
node_version: ^10.13.0
part: b
node-12-a:
node_version: ^12.4.0
node_version: ^18.0.0
part: a
node-12-b:
node_version: ^12.4.0
node_version: ^18.0.0
part: b
node-16-a:
node_version: ^16.0.0
node_version: ^20.0.0
part: a
node-16-b:
node_version: ^16.0.0
node_version: ^20.0.0
part: b
steps:
- task: NodeTool@0
Expand All @@ -290,20 +296,20 @@ jobs:
- script: |
set -e
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
yarn upgrade jest@^27.5.0 jest-circus@^27.5.0 jest-cli@^27.5.0 jest-diff@^27.5.0 jest-environment-node@^27.5.0 jest-junit@^13.0.0 @types/jest@^27.4.0 pretty-format@^27.0.2 --ignore-engines
yarn upgrade jest@^27.5.0 jest-circus@^27.5.0 jest-cli@^27.5.0 jest-diff@^27.5.0 jest-environment-node@^27.5.0 jest-junit@^13.0.0 @types/jest@^27.4.0 pretty-format@^27.0.2 husky@^8.0.3 lint-staged@^13.2.1 cspell@^6.31.1 open-cli@^7.2.0 --ignore-engines
yarn --frozen-lockfile --ignore-engines
yarn link --frozen-lockfile || true
yarn link webpack --frozen-lockfile
displayName: "Install dependencies (old node.js version)"
condition: or(eq(variables['node_version'], '^10.13.0'), eq(variables['node_version'], '^12.4.0'))
condition: eq(variables['node_version'], '^10.13.0')
- script: |
set -e
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
yarn --frozen-lockfile
yarn link --frozen-lockfile || true
yarn link webpack --frozen-lockfile
displayName: "Install dependencies"
condition: and(not(eq(variables['node_version'], '^10.13.0')), not(eq(variables['node_version'], '^12.4.0')))
condition: not(eq(variables['node_version'], '^10.13.0'))
- script: |
set -e
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
Expand Down
Loading

0 comments on commit 059380c

Please sign in to comment.