v4.2.0
Minor Changes
-
deps: TypeScript 4.6 (#811)
This major release includes breaking changes. See the TypeScript 4.5 and TypeScript 4.6 announcements for more information.
-
lint: Autofix in CI (#800)
skuba lint
can now automatically push ESLint and Prettier autofixes. This eases adoption of linting rule changes and automatically resolves issues arising from a forgottenskuba format
.You'll need to configure your CI environment to support this feature. See our GitHub autofixes documentation to learn more.
-
deps: ESLint 8 + eslint-config-seek 9 (#806)
These major upgrades bundle new parser and plugin versions. See the ESLint 8 guide and eslint-config-seek 9 release for more details on the underlying changes.
We've introduced new linting rules like @typescript-eslint/no-unsafe-argument, and resolved the following installation warning:
babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
If you wish to relax some of the new rules, extend your
.eslintrc.js
config:module.exports = { extends: ['skuba'], rules: { // Demote new TypeScript ESLint rule from 'error' to 'warn'. '@typescript-eslint/no-unsafe-argument': 'warn', }, };
Patch Changes
-
template/lambda-sqs-worker-cdk: Fix progress configuration in
cdk.json
(#797) -
Jest.mergePreset: Allow additional props via type parameter (#806)
-
Git.currentBranch: Add helper function (#804)
-
test: Strip ANSI escape codes from error messages for GitHub annotations (#825)
-
Git.commitAllChanges: Skip commit and return
undefined
when there are no changes (#804) -
template/oss-npm-package: Lock down GitHub workflow permissions (#807)
This aligns with OpenSSF guidance.
-
template: Propagate Buildkite environment variables for lint autofixing (#800)
-
template: Exclude DOM type definitions by default (#822)
TypeScript will now raise compiler errors when DOM globals like
document
andwindow
are referenced in new projects. This catches unsafe usage of Web APIs that will throw exceptions in a Node.js context.If you are developing a new npm package for browser use or require specific Node.js-compatible Web APIs like the Encoding API, you can opt in to DOM type definitions in your
tsconfig.json
:{ "compilerOptions": { - "lib": ["ES2020"] + "lib": ["DOM", "ES2020"] } }
If you have an existing backend project, you can opt out of DOM type definitions in your
tsconfig.json
.For Node.js 14:
{ "compilerOptions": { + "lib": ["ES2020"], "target": "ES2020" } }
For Node.js 16:
{ "compilerOptions": { + "lib": ["ES2021"], "target": "ES2021" } }
-
Git.getOwnerAndRepo: Support reading from CI environment variables (#804)
-
Git.getHeadCommitMessage: Add helper function (#804)
-
template/*-rest-api: Avoid alternative syntax for ENV instructions (#823)
Omitting the
=
symbol in ENV instructions is discouraged and may be disallowed in future.- ENV NODE_ENV production + ENV NODE_ENV=production
-
template/oss-npm-package: Pin GitHub action versions (#805)
-
template/*-rest-api: seek-jobs/gantry v1.7.0 (#824)