Migration Guide
v1.x -> v2.1
version 2Lage has many changes from 1.x to 2.x. This migration guide will go over major changes and breaking changes since 1.x.
New Features
- Revamped Website! You're reading it now!
- New non-npmlog-based default logger
- The reporter adoLoghas been renamed toazureDevops(old name is still useable, just deprecating in the next major version!)
- WorkerRunnerto help make tools like lint or TypeScript run super fast by reusing context (e.g. ESLint instance, TypeScript program) in a dedicated worker. This must be configured per tool; see examples for TypeScript, ESLint, and Jest.
Breaking Changes
- lagerequires Node 16, or using the- --experimental-abortcontrollerflag in Node 14
- lagenow will automatically write remote cache if the typical environment variable is set (e.g.- CIor- TF_BUILD)
- infocommand is not implemented yet
- graphcommand is not implemented yet
Using lage v2 with Node 14
If you're still on Node 14, you can use Lage v2 by wrapping it with a script which passes the --experimental-abortcontroller flag, and using that wrapper in your other scripts.
Relevant parts of package.json (omit the comments):
package.json
{
  "scripts": {
    // cross-env sets environment variables on any platform
    "lage": "cross-env NODE_OPTIONS=\"--experimental-abortcontroller\" lage",
    // Be sure to use `yarn lage` rather than only `lage` in your other scripts!
    "build": "yarn lage build"
  },
  "devDependencies": {
    "cross-env": "^7.0.0",
    "lage": "^2.0.0"
  }
}
v0.x -> v1.x
version 1Lage is graduating to 1.0.0! We have a breaking change. Namely, the remote cache mechanism is changing. See this PR #172 for details. The behavior is described here. The behavior is changed for remote cache:
- lageonly write to a remote cache if the environment variable- LAGE_WRITE_REMOTE_CACHEis set to true
- remote cache now works as a fallback; always reading & writing to the local cache first