Skip to content

9.0.0

Compare
Choose a tag to compare
@v1nc3n4 v1nc3n4 released this 20 Oct 22:30
· 23 commits to main since this release
f1bfae2

Features

  • Arguments of all task types are configurable on the command line (#239).
  • New tasks runNode, runCorepack, runNpm, runPnpm, runYarn allow to execute an instant command from a Gradle command line without registering a custom task (#242).
  • Support of Node.js distribution compatible with Windows ARM architecture (Node.js ≥ 19.9.0) (#249).

Upgrading from 8.0.0+

Breaking changes

New tasks run[Node|Corepack|Npm|Pnpm|Yarn] have a name that is conflicting with the name of implementation classes for task types Run[Node|Corepack|Npm|Pnpm|Yarn]. The script input property of these task types also suffer from a confusing name as it contains arguments to be appended after the name of the executable rather than a script identifier from the scripts section of the package.json file. To keep a consistent and comprehensive naming convention, name of classes for task types has been modified, as well as the name of the script input property.

Steps

In build scripts:

  • Rename imports and uses of class RunCorepack to RunCorepackTaskType. Rename the script input property to args.
  • Rename imports and uses of class RunNode to RunNodeTaskType. Rename the script input property to args.
  • Rename imports and uses of class RunNpm to RunNpmTaskType. Rename the script input property to args.
  • Rename imports and uses of class RunPnpm to RunPnpmTaskType. Rename the script input property to args.
  • Rename imports and uses of class RunYarn to RunYarnTaskType. Rename the script input property to args.
  • Verify and eventually rename any custom task previously named runNode, runCorepack, runNpm, runPnpm, runYarn. These names are now reserved by some plugin tasks.

Example:

// Before upgrade
import org.siouan.frontendgradleplugin.infrastructure.gradle.RunNode
tasks.register<RunNode>("runNode") {
    script.set("-v")
}

// After upgrade
import org.siouan.frontendgradleplugin.infrastructure.gradle.RunNodeTaskType
tasks.register<RunNodeTaskType>("getNodeVersion") {
    args.set("-v")
}

Contributions