Releases: seek-oss/skuba
[email protected]
Minor Changes
-
deps: Drop
strip-ansi
dependency in favour ofutil.stripVTControlCharacters
(#1713) -
lint, format, template: Use pinned
pnpm
version in Dockerfiles (#1714)This fixes an issue where
pnpm
commands in Dockerfiles incorrectly use the latest pnpm version instead of the pinned version.
Patch Changes
[email protected]
Patch Changes
-
lint, format: Put back logic which skips autofixing Renovate branches when there is no open pull request. (#1699)
Previously, this was put in place to prevent an issue where a Renovate branch can get stuck in the
Edited/Blocked
state without a pull request being raised. This was subsequently removed because Skuba's default autofix commits were ignored by skuba's recommended renovate configuration.However, this has resulted in some build-rebase-build-rebase-... loops, and so the Renovate config change has been reverted, and requires investigation before reinstating.
[email protected]
skuba 9 is a reasonably large release but it shouldn't be too much trouble to upgrade.
The main changes are:
- ESLint 9 and flat config migration (where
skuba format
should handle most of the work) - Swapping out
ts-node
fortsx
- Some fixes in Buildkite & Docker files
Read the full changelog:
Major Changes
-
deps: ESLint 9 +
typescript-eslint
8 (#1537)This major upgrade bundles the following changes:
-
Migration to flat config format
skuba format
will attempt to migrate your existing.eslintignore
and.eslintrc.js
files to a flateslint.config.js
file.See the migration guide for more information.
-
Some lint rules have been changed or renamed
You will likely need to manually review and adjust your code after running
skuba lint
. -
eslint-plugin-import
has been replaced witheslint-plugin-import-x
To migrate, replace references to
eslint-plugin-import
witheslint-plugin-import-x
, andimport/
rules withimport-x/
.
Wider changes may be necessary if your project has a custom ESLint configuration. Refer to the following resources to get started:
-
-
node, start: Replace
ts-node
withtsx
(#1623)skuba node
andskuba start
now usetsx
instead ofts-node
to execute TypeScript files.tsx
improves support for ESM features like dynamicimport()
s. However, if you use its REPL by runningskuba node
without any arguments, there are a couple regressions to note:- Static
import
declarations are no longer supported. Userequire
andawait import()
instead. - Pasting code into the editor may be more finicky by default. Consider using
.editor
mode.
skuba node <file>
andskuba start
should continue to work as expected, but we have marked this as a major upgrade as it is difficult to comprehensively test every scenario. We strongly recommend to manually verify usage ofskuba node
andskuba start
when you upgrade. - Static
Minor Changes
-
format, lint: Point Docker base images to AWS ECR Public and remove constant
--platform
arguments (#1684)This updates references to
node:
orpython:
Docker images in your Dockerfiles anddocker-compose.yml
files to point to AWS ECR Public to avoid Docker Hub rate limiting. It also removes constant--platform
arguments from Dockerfiles.- FROM --platform=arm64 node:20-alpine AS dev-deps + FROM public.ecr.aws/docker/library/node:20-alpine AS dev-deps
Your Dockerfiles may not be set up to build multi-platform images, so keep in mind that building them locally on an Intel x86 laptop may not yield images that can execute on AWS Graviton instances.
-
format, lint: Remove obsolete
version
field fromdocker-compose.yml
files (#1638) -
format, lint, template: Mount Buildkite
.npmrc
in/tmp/
rather than<workdir>/tmp/
(#1693)This avoids accidental inclusion in Git commits or published artifacts, as per the original intent of this handling.
- secrets: id=npm,src=tmp/.npmrc + secrets: id=npm,src=/tmp/.npmrc - output-path: tmp/ + output-path: /tmp/
-
deps: TypeScript 5.6 (#1655)
This major release includes breaking changes. See the TypeScript 5.6 announcement for more information.
-
format, lint: Fix duplicated YAML merge keys in
.buildkite/
pipelines (#1537)- - <<: *deploy - <<: *docker + - <<: [*deploy, *docker] label: stuff
This change supports standardised YAML parsing across tools such as ESLint; it should not functionally alter the behaviour of your build pipeline.
The bundled patch is fairly conservative and will not attempt to migrate more complex scenarios, such as where there are other keys between the merge keys. Take care with preserving the order of merge keys when manually updating other occurrences.
- - <<: *deploy + - <<: [*deploy, *docker] label: stuff - <<: *docker
-
format, lint: Remove logic to skip autofixing Renovate branches when there is no open pull request (#1687)
Previously, this was put in place to prevent an issue where a Renovate branch could get stuck in an
Edited/Blocked
state without a pull request being raised.skuba's default autofix commits are now ignored in our recommended Renovate configuration.
Patch Changes
-
template/koa-rest-api: Switch from
koa-bodyparser
to@koa/bodyparser
(#1605) -
template/koa-rest-api: Enable secure headers middleware by default (#1601)
See the Koala documentation for more information.
-
template/lambda-sqs-worker-cdk: Comply with AWS tagging guidance (#1643)
-
api: Truncate Buildkite annotations over 1 MiB to resolve
buildkite-agent
crash (#1645) -
deps: validate-npm-package-name ^6.0.0 (#1682)
-
deps: normalize-package-data ^7.0.0 (#1681)
-
deps: esbuild ~0.24.0 (#1671)
-
deps: concurrently ^9.0.0 (#1666)
-
template/lambda-sqs-worker-cdk: Replace custom hooks with
@seek/aws-codedeploy-infra
(#1644) -
template: Point Docker base images to AWS ECR Public and remove constant
--platform
arguments (#1684)
[email protected]
Major Changes
-
ESLint 9 +
typescript-eslint
8 +eslint-config-seek
14 (#1537)This major upgrade bundles the following changes:
-
Migration to flat config format
See the migration guide for more information.
-
Some lint rules have been changed or renamed
You will likely need to manually review and adjust your code after running ESLint.
-
eslint-plugin-import
has been replaced witheslint-plugin-import-x
To migrate, replace references to
eslint-plugin-import
witheslint-plugin-import-x
, andimport/
rules withimport-x/
.
Wider changes may be necessary if your project has a custom ESLint configuration. Refer to the following resources to get started:
-
Minor Changes
- Disable
@typescript-eslint/only-throw-error
in test files (#1689)
[email protected]
[email protected]
Minor Changes
- format, lint: Set
package-manager-strict-version=true
for pnpm projects (#1572)
Patch Changes
[email protected]
Minor Changes
-
lint: Skip generation of config files when present in
.gitignore
(#1554)skuba lint
andskuba format
now skip the generation of config files, like.dockerignore
and.npmrc
, if they are ignored by.gitignore
files. -
deps: esbuild 0.21 (#1569)
-
deps: TypeScript 5.5 (#1596)
This major release includes breaking changes. See the TypeScript 5.5 announcement for more information.
-
api: Add Git.isFileGitIgnored (#1554)
-
lint: Add coverage to .prettierignore (#1552)
-
configure: Accept template data from stdin to allow for integration testing (#1558)
-
lint: Swap out
detect-package-manager
for manual lockfile detection (#1552)detect-package-manager
has been removed, in lieu of usingfind-up
to detect the closest
pnpm-lock.yaml
oryarn.lock
to infer the package manager. -
lint: Patch installing specific pnpm version via Corepack (#1534)
-
deps: prettier 3.3 (#1580)
Patch Changes
-
template: Add extension recommendations to
.vscode/extensions.json
(#1556) -
Git: Explicitly declare return types to enable compatibility with the
Node16
module (#1589) -
template/oss-npm-package: Skip excessive action runs (#1586)
-
template/lambda-sqs-worker-cdk: Add worker config file (#1548)
-
lint: Exclude
.vscode/extensions.json
from being ignored by.gitignore
(#1556) -
template: Make all configuration values explicit (#1560)
Previously,
src/config.ts
included optional configuration values and inheritance between environments in the spirit of DRY. While the templated file was wired up in a "safe" way—the production environment never inherited from other environments and explicitly specified all its configuration values—its pattern was misappropriated elsewhere and led to local configuration values affecting production environments.Instead, we now list all configuration values explicitly against each environment.
-
template: Remove deprecated
docker-compose.yml
version (#1570)Docker has ignored this for a while, and now generates a warning on every build:
https://github.com/compose-spec/compose-spec/blob/master/04-version-and-name.md -
template/*-rest-api: Clean up templated environment variables (#1562)
-
AWS_NODEJS_CONNECTION_REUSE_ENABLED
is no longer required with AWS SDK V3. -
The
env
boilerplate in Gantry values files was largely unnecessary and confusing.Our templates prefer to declare configuration values directly in
src/config.ts
.
-
[email protected]
[email protected]
Patch Changes
-
deps: eslint 8.56.0 (#1521)
This upgrade is required for eslint-config-seek 13.
-
template: Install specific pnpm version via Corepack (#1515)
Previously, our Dockerfiles ran
corepack enable pnpm
without installing a specific version. This does not guarantee installation of the pnpm version specified inpackage.json
, which could cause a subsequentpnpm install --offline
to run Corepack online or otherwise hang on stdin:FROM --platform=arm64 node:20-alpine RUN corepack enable pnpm
{ "packageManager": "[email protected]", "engines": { "node": ">=20" } }
Corepack is about to download https://registry.npmjs.org/pnpm/-/pnpm-8.15.4.tgz. Do you want to continue? [Y/n]
To avoid this issue, modify (1) Buildkite pipelines to cache on the
packageManager
property inpackage.json
, and (2) Dockerfiles to mountpackage.json
and runcorepack install
:- seek-oss/docker-ecr-cache#v2.1.0: + seek-oss/docker-ecr-cache#v2.2.0: cache-on: - .npmrc + - package.json#.packageManager - pnpm-lock.yaml
FROM --platform=arm64 node:20-alpine - RUN corepack enable pnpm + RUN --mount=type=bind,source=package.json,target=package.json \ + corepack enable pnpm && corepack install
-
template/*-rest-api: Fix lint failure (#1514)
This resolves the following failure on a newly-initialised project due to a regression in the
@types/express
dependency chain:error TS2688: Cannot find type definition file for 'mime'. The file is in the program because: Entry point for implicit type library 'mime'
A temporary workaround is to install
mime
as a dev dependency. -
deps: @octokit/types ^13.0.0 (#1536)
-
template/lambda-sqs-worker-cdk: Align dead letter queue naming with Serverless template (#1542)
-
Jest.mergePreset: Fudge
Bundler
module resolution (#1513)This extends #1481 to work around a
ts-jest
issue where test cases fail to run. -
template/oss-npm-package: Set timeout to 20 minutes for GitHub Actions (#1501)
-
template/lambda-sqs-worker-cdk: Replace CDK context based config with TypeScript config (#1541)
[email protected]
This version of skuba looks more scary than it is. The major change is that our dependencies have bumped their minimum Node.js requirement from 18.12 to 18.18. Most SEEK projects do not pin minor Node.js versions and are unlikely to be affected by this change.
In the spirit of upgrades, we recently refreshed our ARM64 migration guide and also have one for pnpm. A previous release landed a skuba migrate
command to simplify upgrades to Node.js 20 (active LTS) before Node.js 18 reaches EOL in April 2025.
Major Changes
-
deps: eslint-config-seek 13 + eslint-config-skuba 4 + typescript-eslint ^7.2.0 (#1487)
These major upgrades bump our minimum requirement from Node.js 18.12 to 18.18.
See the typescript-eslint v7 announcement for more information, and consider upgrading your project to the active LTS release with
skuba migrate
before Node.js 18 reaches EOL in April 2025.
Minor Changes
-
deps: semantic-release 22 (#1492)
-
deps: TypeScript 5.4 (#1491)
This major release includes breaking changes. See the TypeScript 5.4 announcement for more information.
Patch Changes
-
template: Remove
BUILDPLATFORM
from Dockerfiles (#1350)Previously, the built-in templates made use of
BUILDPLATFORM
and a fallback value:FROM --platform=${BUILDPLATFORM:-arm64} gcr.io/distroless/nodejs20-debian11
- Choose the platform of the host machine running the Docker build. An AWS Graviton Buildkite agent or Apple Silicon laptop will build under
arm64
, while an Intel laptop will build underamd64
. - Fall back to
arm64
if the build platform is not available. This maintains compatibility with toolchains like Gantry that lack support for theBUILDPLATFORM
argument.
This approach allowed you to quickly build images and run containers in a local environment without emulation. For example, you could
docker build
anarm64
image on an Apple Silicon laptop for local troubleshooting, while your CI/CD solution employedamd64
hardware across its build and runtime environments. The catch is that your localarm64
image may exhibit different behaviour, and is unsuitable for use in youramd64
runtime environment without cross-compilation.The built-in templates now hardcode
--platform
as we have largely converged onarm64
across local, build and runtime environments:FROM --platform=arm64 gcr.io/distroless/nodejs20-debian11
This approach is more explicit and predictable, reducing surprises when working across different environments and toolchains. Building an image on a different platform will be slower and rely on emulation.
- Choose the platform of the host machine running the Docker build. An AWS Graviton Buildkite agent or Apple Silicon laptop will build under
-
Jest.mergePreset: Fudge
Node16
andNodeNext
module resolutions (#1481)This works around a
ts-jest
issue where test cases fail to run if yourmoduleResolution
is set to a modern mode:{ "compilerOptions": { "moduleResolution": "Node16 | NodeNext" } }
error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'.
-
pkg: Exclude
jest/*.test.ts
files (#1481) -
template: Remove account-level tags from resources (#1494)
This partially reverts #1459 and #1461 to avoid unnecessary duplication of account-level tags in our templates.