Skip to content

Commit e90966f

Browse files
committed
docs: prepare readme for v4 release
1 parent 314ae61 commit e90966f

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

README.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
Publish packages to npm automatically in GitHub Actions by updating the version number.
1010

1111
- [Change log][releases]
12-
- [v2 to v3 migration guide](#v2-to-v3)
13-
- [v1 to v3 migration guide](#v1-to-v3)
12+
- [v3 to v4 migration guide](#v3-to-v4)
13+
- [v2 to v4 migration guide](#v2-to-v4)
14+
- [v1 to v4 migration guide](#v1-to-v4)
1415

1516
[releases]: https://github.com/JS-DevTools/npm-publish/releases
1617

@@ -285,17 +286,29 @@ Examples:
285286
Major releases of the action and libraries may contain breaking changes, documented here.
286287
For more detailed change logs, see [releases][].
287288

288-
### v2 to v3
289+
### v3 to v4
289290

290-
The v3 release does not require any changes to how you use `npm-publish` from `v2`. The version of Node.js used by the action was updated to v20 due to GitHub Action's [deprecation of Node.js v16][node16-deprecation]. The minimum required version of Node.js for the library and CLI remains v16.
291+
The `v4` release does not require any changes to how you use the `npm-publish` action from `v3`. The action was updated to Node 24 / npm 11.
292+
293+
In the library and CLI, support for Node 16 and Node 18 was dropped in `v4`, and the library API was switched to ESM-only. Library users should switch to ESM or update Node to a version with support for [loading ES modules using `require`][esm-require].
294+
295+
[esm-require]: https://nodejs.org/api/modules.html#loading-ecmascript-modules-using-require
296+
297+
### v2 to v4
298+
299+
The `v4` release does not require any changes to how you use the `npm-publish` action from `v2`. The action was updated to Node 20 in `v3` due to GitHub Action's [deprecation of Node 16][node16-deprecation], and then updated to Node 24 in `v4`.
300+
301+
In the library and CLI, support for Node 16 and Node 18 was dropped in `v4`, and the library API was switched to ESM-only. Library users should switch to ESM or update Node to a version with support for [loading ES modules using `require`][esm-require].
291302

292303
[node16-deprecation]: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/
293304

294-
### v1 to v3
305+
### v1 to v4
295306

296307
The v2 release made several breaking changes to inputs, outputs, and behaviors that were present in `v1`. The examples below focus on the action, but the same changes are applicable to the library and CLI, too.
297308

298-
#### v2 option changes
309+
In the library and CLI, support for Node 16 and Node 18 was dropped in `v4`, and the library API was switched to ESM-only. Library users should switch to ESM or update Node to a version with support for [loading ES modules using `require`][esm-require].
310+
311+
#### option changes
299312

300313
The `check-version` and `greater-version-only` boolean options were replaced with the `strategy` option:
301314

@@ -335,7 +348,7 @@ The `check-version` and `greater-version-only` boolean options were replaced wit
335348

336349
[publishing-nodejs-packages]: https://docs.github.com/actions/publishing-packages/publishing-nodejs-packages
337350

338-
#### v2 output changes
351+
#### output changes
339352

340353
The `type` output is now an empty string instead of `'none'` when no release occurs
341354

@@ -345,7 +358,7 @@ The `type` output is now an empty string instead of `'none'` when no release occ
345358
+ if: ${{ steps.publish.outputs.type }}
346359
```
347360

348-
#### v2 behavior changes
361+
#### behavior changes
349362

350363
The `--ignore-scripts` option is now passed to `npm publish` as a security precaution. If you define any publish lifecycle scripts - `prepublishOnly`, `prepack`, `prepare`, `postpack`, `publish`, `postpublish` - we recommend you run that logic as a separate explicit build step.
351364

0 commit comments

Comments
 (0)