Skip to content

Commit 0f3149b

Browse files
committed
feat!: ESM only, Node 20+\n\n- Migrate package to ESM-only (type: module, exports map)\n- Update engines to >=20.19.0 and .nvmrc to 20.19.0\n- TypeScript: NodeNext module with ES2022 target, verbatimModuleSyntax\n- Update internal imports to .js extensions for ESM\n- Switch tests from Ava to Vitest (TypeScript) with ava-compat shim\n- Add vitest.config.ts with .snapshots dir; port tests and skip flaky watch-mode\n- Remove Ava/NYC/Codecov and coverage tooling\n- Update CI workflows to Node 20.19.0 and use vitest run\n- Update README for new requirements and ESM usage\n- Rename config files to .cjs for ESM-compat (eslint/prettier/commitlint)\n
1 parent b87cabc commit 0f3149b

48 files changed

Lines changed: 1690 additions & 2360 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
File renamed without changes.

.github/workflows/node-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
strategy:
1818
matrix:
19-
node: ['18']
19+
node: ['20.19.0']
2020

2121
name: Node v${{ matrix.node }}
2222
steps:

.github/workflows/validate.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
strategy:
1818
matrix:
19-
node: ['20', '18', '16']
19+
node: ['20.19.0']
2020

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

@@ -54,4 +54,4 @@ jobs:
5454
run: pnpm lint:js
5555

5656
- name: Run Tests
57-
run: pnpm ci:coverage
57+
run: pnpm ci:test

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18
1+
20.19.0

.prettierrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('eslint-config-shellscape/prettier');

.prettierrc.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

README.md

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
[tests]: https://img.shields.io/circleci/project/github/shellscape/webpack-manifest-plugin.svg
2-
[tests-url]: https://circleci.com/gh/shellscape/webpack-manifest-plugin
3-
[cover]: https://codecov.io/gh/shellscape/webpack-manifest-plugin/branch/master/graph/badge.svg
4-
[cover-url]: https://codecov.io/gh/shellscape/webpack-manifest-plugin
51
[size]: https://packagephobia.now.sh/badge?p=webpack-manifest-plugin
62
[size-url]: https://packagephobia.now.sh/result?p=webpack-manifest-plugin
73

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

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

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

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

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

2924
## Contributing
3025

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

4944
## Usage
5045

51-
Create a `webpack.config.js` file:
46+
Create a `webpack.config.js` or `webpack.config.mjs` file (ESM):
5247

5348
```js
54-
const { WebpackManifestPlugin } = require('webpack-manifest-plugin');
55-
const options = { ... };
56-
57-
module.exports = {
58-
// an example entry definition
59-
entry: [ 'app.js' ],
60-
...
61-
plugins: [
62-
new WebpackManifestPlugin(options)
63-
]
49+
import { WebpackManifestPlugin } from 'webpack-manifest-plugin';
50+
51+
export default {
52+
// an example entry definition
53+
entry: ['app.js'],
54+
// ...
55+
plugins: [new WebpackManifestPlugin(/* options */)]
6456
};
6557
```
6658

codecov.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

commitlint.config.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = { extends: ['@commitlint/config-conventional'] };

commitlint.config.js

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)