Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
extends: ["shellscape/typescript"],
parserOptions: {
project: ["./tsconfig.eslint.json"],
tsconfigRootDir: __dirname,
},
settings: {
'import/resolver': {
typescript: {
// Use the ESLint tsconfig which includes tests
project: './tsconfig.eslint.json',
alwaysTryTypes: true
},
node: {
extensions: ['.js', '.mjs', '.cjs', '.ts', '.mts', '.cts', '.d.ts']
}
}
}
};
7 changes: 0 additions & 7 deletions .eslintrc.js

This file was deleted.

22 changes: 16 additions & 6 deletions .github/workflows/node-windows.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,46 @@
name: Windows

on:
# Run on all PRs (regardless of base branch)
pull_request:
types:
- edited
- opened
- synchronize
- reopened
- ready_for_review
# Run on direct pushes to the default branch only (avoid duplicate runs for PR branches)
push:
branches:
- '*'
- master

jobs:
build:
runs-on: windows-2019
runs-on: windows-2022

# Ensure only one run per PR/branch is active; cancel superseded runs on new pushes
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.head_ref || github.ref_name }}
cancel-in-progress: true

strategy:
matrix:
node: ['18']
node: ['20.19.0']

name: Node v${{ matrix.node }}
steps:
- name: Configure git line-breaks
run: git config --global core.autocrlf false

- name: Checkout Commit
uses: actions/checkout@v1
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Checkout Master
run: git branch -f master origin/master

- name: Setup Node
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

Expand Down
22 changes: 16 additions & 6 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,41 @@
name: Validate

on:
# Run on all PRs (regardless of base branch)
pull_request:
types:
- edited
- opened
- synchronize
- reopened
- ready_for_review
# Run on direct pushes to the default branch only (avoid duplicate runs for PR branches)
push:
branches:
- '*'
- master

jobs:
build:
runs-on: ubuntu-latest

# Ensure only one run per PR/branch is active; cancel superseded runs on new pushes
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.head_ref || github.ref_name }}
cancel-in-progress: true

strategy:
matrix:
node: ['20', '18', '16']
node: ['20.19.0']

name: Node v${{ matrix.node }}

steps:
- name: Checkout Commit
uses: actions/checkout@v1
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

Expand Down Expand Up @@ -54,4 +64,4 @@ jobs:
run: pnpm lint:js

- name: Run Tests
run: pnpm ci:coverage
run: pnpm ci:test
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
20.19.0
1 change: 1 addition & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('eslint-config-shellscape/prettier');
3 changes: 0 additions & 3 deletions .prettierrc.js

This file was deleted.

28 changes: 10 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
[tests]: https://img.shields.io/circleci/project/github/shellscape/webpack-manifest-plugin.svg
[tests-url]: https://circleci.com/gh/shellscape/webpack-manifest-plugin
[cover]: https://codecov.io/gh/shellscape/webpack-manifest-plugin/branch/master/graph/badge.svg
[cover-url]: https://codecov.io/gh/shellscape/webpack-manifest-plugin
[size]: https://packagephobia.now.sh/badge?p=webpack-manifest-plugin
[size-url]: https://packagephobia.now.sh/result?p=webpack-manifest-plugin

<div align="center">
<img width="256" src="https://raw.githubusercontent.com/shellscape/webpack-manifest-plugin/master/assets/manifest.svg?sanitize=true" alt="webpack-manfiest-plugin"><br/><br/>
</div>

[![tests][tests]][tests-url]
[![cover][cover]][cover-url]
[![size][size]][size-url]
[![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)

Expand All @@ -24,7 +18,8 @@ A Webpack plugin for generating an asset manifest.

`webpack-manifest-plugin` is an [evergreen 🌲](./.github/FAQ.md#what-does-evergreen-mean) module.

This module requires an [Active LTS](https://github.com/nodejs/Release) Node version (v12.0.0+) and Webpack v5.0.0.
This module now requires Node.js v20.19.0 or newer and Webpack v5.0.0.
The package is ESM-only. If your project uses CommonJS, migrate to ESM or load this plugin from a dynamic `import()`.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CharlieHelps As of Node 20.19.0 this is not a correct statement. Remove this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the incorrect sentence from README per your note.

What changed
  • In README.md, dropped the line: “The package is ESM-only. If your project uses CommonJS, migrate to ESM or load this plugin from a dynamic import().”
  • The Requirements section now simply states: “This module now requires Node.js v20.19.0 or newer and Webpack v5.0.0.”

Re-requested review from @CharlieHelps and @shellscape.


## Contributing

Expand All @@ -48,19 +43,16 @@ _Note: We recommend using [webpack-nano](https://github.com/shellscape/webpack-n

## Usage

Create a `webpack.config.js` file:
Create a `webpack.config.js` or `webpack.config.mjs` file (ESM):

```js
const { WebpackManifestPlugin } = require('webpack-manifest-plugin');
const options = { ... };

module.exports = {
// an example entry definition
entry: [ 'app.js' ],
...
plugins: [
new WebpackManifestPlugin(options)
]
import { WebpackManifestPlugin } from 'webpack-manifest-plugin';

export default {
// an example entry definition
entry: ['app.js'],
// ...
plugins: [new WebpackManifestPlugin(/* options */)]
};
```

Expand Down
10 changes: 0 additions & 10 deletions codecov.yml

This file was deleted.

1 change: 1 addition & 0 deletions commitlint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ['@commitlint/config-conventional'] };
32 changes: 0 additions & 32 deletions commitlint.config.js

This file was deleted.

50 changes: 17 additions & 33 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,31 @@
"author": "Dane Thurber <dane.thurber@gmail.com>",
"homepage": "https://github.com/shellscape/webpack-manifest-plugin",
"bugs": "https://github.com/shellscape/webpack-manifest-plugin/issues",
"type": "module",
"main": "dist/index.js",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"default": "./dist/index.js"
}
},
"engines": {
"node": ">=14"
"node": ">=20.19.0"
},
"scripts": {
"build": "tsc --project tsconfig.json",
"ci:coverage": "nyc pnpm ci:test && nyc report --reporter=text-lcov > coverage.lcov",
"ci:lint": "pnpm lint && pnpm security",
"ci:test": "pnpm test -- --verbose",
"ci:test": "vitest run",
"lint": "pnpm lint:docs && pnpm lint:json && pnpm lint:js",
"lint-staged": "lint-staged",
"lint:docs": "prettier --write README.md",
"lint:js": "eslint --cache --fix --cache src test",
"lint:json": "prettier --write codecov.yml package.json",
"lint:json": "prettier --write package.json",
"prepare": "husky install",
"prepublishOnly": "pnpm lint && pnpm build",
"pretest": "pnpm install && pnpm build",
"security": "pnpm audit --audit-level=high --prod",
"test": "ava --timeout=2m"
"test": "vitest"
},
"files": [
"dist",
Expand All @@ -40,52 +46,38 @@
"webpack-sources": "^2.2.0"
},
"devDependencies": {
"@ava/babel": "^1.0.1",
"@commitlint/cli": "^13.1.0",
"@commitlint/config-conventional": "^13.1.0",
"@svgr/webpack": "^5.4.0",
"@types/node": "^16.4.3",
"@types/node": "^20.11.30",
"@types/webpack": "^5.28.0",
"@types/webpack-sources": "^2.1.1",
"@wordpress/dependency-extraction-webpack-plugin": "^3.1.0",
"ava": "^5.1.0",
"codecov": "^3.1.0",
"copy-webpack-plugin": "^6.2.1",
"del": "^6.0.0",
"eslint": "8.57.0",
"eslint-config-shellscape": "^6.0.0",
"eslint-import-resolver-typescript": "^4.4.4",
"file-loader": "^6.2.0",
"husky": "8.0.2",
"lint-staged": "11.1.1",
"memory-fs": "^0.4.1",
"nyc": "^15.1.0",
"pre-commit": "^1.2.2",
"prettier": "^2.1.2",
"prettier-plugin-package": "^1.2.0",
"react": "^16.3.2",
"style-loader": "^0.23.0",
"ts-node": "^10.1.0",
"tslib": "^2.3.0",
"typescript": "^4.9.4",
"typescript": "^5.6.3",
"vitest": "^1.6.0",
"webpack": "^5.75.0",
"webpack-merge": "^5.8.0"
},
"ava": {
"files": [
"!**/fixtures/**",
"!**/helpers/**",
"!**/output/**"
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"jest": {
"testEnvironment": "node",
"coverageDirectory": "./coverage/",
"collectCoverage": true
},
"lint-staged": {
"*.js": [
"eslint --fix"
Expand All @@ -94,13 +86,5 @@
"maintainers": [
"Andrew Powell <andrew@shellscape.org>"
],
"nyc": {
"include": [
"src/*.ts"
],
"exclude": [
"test/"
]
},
"pre-commit": "lint-staged"
}
Loading