diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 79c02e2f1..f7e983d9b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,26 +6,33 @@ jobs: tests: strategy: # We support Node Current, LTS, and Maintenance. See - # https://nodejs.org/en/about/releases/ for release schedule. + # https://github.com/nodejs/release#release-schedule for release schedule # # We test all supported Node versions on Linux, and the oldest and newest - # on macOS/Windows. + # on macOS/Windows. See + # https://github.com/actions/runner-images?tab=readme-ov-file#available-images + # for the latest available images. matrix: include: + # Maintenance - node: 18 os: ubuntu-22.04 - node: 18 os: macos-13 - node: 18 os: windows-2022 + + # LTS - node: 20 os: ubuntu-22.04 - - node: 20 + + # Current + - node: 22 + os: ubuntu-22.04 + - node: 22 os: macos-13 - - node: 20 + - node: 22 os: windows-2022 - - node: 21 - os: ubuntu-22.04 # Allow all matrix configurations to complete, instead of cancelling as # soon as one fails. Useful because we often have different kinds of diff --git a/CHANGELOG.md b/CHANGELOG.md index e0903da50..9d4621d79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Added + +- Added support for `node --run`, available in Node 22 and above (see + https://nodejs.org/en/blog/announcements/v22-release-announce#running-packagejson-scripts). + ## [0.14.7] - 2024-08-05 - When GitHub caching fails to initialize, more information is now shown about diff --git a/README.md b/README.md index 6eea67cc9..ff4489927 100644 --- a/README.md +++ b/README.md @@ -104,9 +104,7 @@ and replace the original script with the `wireit` command. Now when you run `npm run build`, Wireit upgrades the script to be smarter and -more efficient. Wireit works with [yarn](https://yarnpkg.com/) -(both 1.X "[Classic](https://classic.yarnpkg.com/)" and its successor "Berry") -and [pnpm](https://pnpm.io/), too. +more efficient. Wireit also works with [`node --run`](https://nodejs.org/en/blog/announcements/v22-release-announce#running-packagejson-scripts), [yarn](https://yarnpkg.com/), and [pnpm](https://pnpm.io/). You should also add `.wireit` to your `.gitignore` file. Wireit uses the `.wireit` directory to store caches and other data for your scripts. @@ -238,6 +236,19 @@ npm or Wireit: npm run build -- --verbose ``` +Or in general: + +```sh +npm run {script} {npm args} {wireit args} -- {script args} +``` + +An additional `--` is required when using `node --run` in order to distinguish +between arguments intended for `node`, `wireit`, and the script itself: + +```sh +node --run {script} {node args} -- {wireit args} -- {script args} +``` + ## Input and output files The `files` and `output` properties of `wireit.