Releases: seek-oss/skuba
v5.1.0
Minor Changes
-
deps: Prettier 2.8 (#1056)
See the release notes for more information.
-
deps: TypeScript 4.9 (#1046)
This major release includes breaking changes. See the TypeScript 4.9 announcement for more information.
Patch Changes
-
template/lambda-sqs-worker: Declare
dd-trace
dependency (#1051)This resolves a
Runtime.ImportModuleError
that occurs if this transitive dependency is not installed:Runtime.ImportModuleError Error: Cannot find module 'dd-trace'
Alternatively, you can configure the Datadog Serverless plugin to bundle these dependencies via Lambda layers:
serverless.yml custom: datadog: - addLayers: false + addLayers: true
package.json { "dependencies": { - "datadog-lambda-js: "x.y.z", - "dd-trace: "x.y.z" }, "devDependencies": { + "datadog-lambda-js: "x.y.z", + "dd-trace: "x.y.z" } }
-
template/lambda-sqs-worker*: Bump Node.js version to 18 (#1049)
This release contains some breaking changes to the Lambda runtime such as the removal of AWS SDK V2 in favour of AWS SDK V3. See the AWS Lambda Node.js 18.x runtime announcement for more information.
-
template: Prompt for target platform (
amd64
orarm64
) (#1041) -
template/lambda-sqs-worker*: Use single hyphen in
renovate-
branch name prefix (#1050) -
deps: esbuild ~0.16.0 (#1062)
-
template/*-rest-api: Replace
'{{.Environment}}'
with a customenvironment
Gantry value. (#1065) -
lint: Require package.json to be sorted (#1048)
v5.0.1
v5.0.0
Major Changes
-
test: Remove default
src
module alias (#987)Our Jest preset automatically registers your
tsconfig.json
paths as module aliases, but would previously fall back to thesrc
alias if the option was omitted or failed to load. This default has now been removed.This is not expected to affect most projects. If yours makes use of the
src
alias and its tests are now failing on imports like the following:import { app } from 'src/app.ts';
Ensure that you declare this path in a
tsconfig.json
located in your project root:{ "compilerOptions": { + "paths": { + "src": ["src"] + } }, "extends": "skuba/config/tsconfig.json" }
-
build, test: Default to isolated modules (#987)
Our Jest and TypeScript presets now enable
isolatedModules
by default. Your Jest tests should start quicker, consume less resources, and no longer get stuck on pesky type errors. This should not compromise the type safety of your project asskuba lint
is intended to type check all production and testing code.If your project contains files without imports and exports like
jest.setup.ts
, you can add an empty export statement to them to placate the TypeScript compiler:jest.setup.ts(1,1): error TS1208: 'jest.setup.ts' cannot be compiled under '--isolatedModules' because it is considered a global script file. Add an import, export, or an empty 'export {}' statement to make it a module.
process.env.ENVIRONMENT = 'test'; + export {};
If you previously enabled
isolatedModules
via theglobals
option in your Jest config, this is no longer functional due to syntax changes in ts-jest 29. You should be able to rely on our default going forward.skuba configure
can attempt to clean up the stale option, or you can remove it from yourjest.config.ts
manually:export default Jest.mergePreset({ - globals: { - 'ts-jest': { - // seek-oss/skuba#626 - isolatedModules: true, - }, - }, // Rest of config });
Isolated modules are incompatible with certain language features like
const enum
s. We recommend migrating away from such features as they are not supported by the broader ecosystem, including transpilers like Babel and esbuild. If your project is not yet ready for isolated modules, you can override the default in yourtsconfig.json
:{ "compilerOptions": { + "isolatedModules": false }, "extends": "skuba/config/tsconfig.json" }
Minor Changes
-
format: Sort package.json (#1016)
-
build: Add experimental esbuild support (#681)
You can now build your project with esbuild. Note that this integration is still experimental, only includes the bare minimum to supplant a basic
tsc
-based build, and is not guaranteed to matchtsc
output. See the esbuild deep dive for more information.To opt in, modify your
package.json
:{ "skuba": { + "build": "esbuild", "template": null } }
Patch Changes
-
configure: Fix
tsconfig.json#/compilerOptions/lib
clobbering (#1031) -
template: Bump greeter and API templates to Node.js 18 (#1011)
Node.js 18 is now in active LTS. The Lambda templates are stuck on Node.js 16 until the new AWS Lambda runtime is released.
-
template/lambda-sqs-worker-cdk: Replace Runtypes with Zod as default schema validator (#984)
-
template/lambda-sqs-worker: Replace Runtypes with Zod as default schema validator (#984)
-
configure: Fix package version lookups (#974)
This resolves the following error:
Error: Package "xyz" does not have a valid package.json manifest
-
configure: Fix
jest.setup.js
clobbering (#1031) -
template/lambda-sqs-worker*: Adjust Buildkite pipelines for new
renovate--
branch name prefix (#1022)See the pull request that aligns our Renovate presets for more information.
-
template: Support AMD64 Docker builds via
BUILDPLATFORM
(#1021)See the Docker documentation for more information. Note that this does not allow you to build on AMD64 hardware then deploy to ARM64 hardware and vice versa. It is provided for convenience if you need to revert to an AMD64 workflow and/or build and run an image on local AMD64 hardware.
-
template/koa-rest-api: Replace Runtypes with Zod as default schema validator (#984)
v5.0.0-beta.0
Major Changes
-
test: Remove default
src
module alias (350ea31)Our Jest preset automatically registers your
tsconfig.json
paths as module aliases, but would previously fall back to thesrc
alias if the option was omitted or failed to load. This default has now been removed.This is not expected to affect most projects. If yours makes use of the
src
alias and its tests are now failing on imports like the following:import { app } from 'src/app.ts';
Ensure that you declare this path in a
tsconfig.json
located in your project root:{ "compilerOptions": { + "paths": { + "src": ["src"] + } }, "extends": "skuba/config/tsconfig.json" }
-
build, test: Default to isolated modules (350ea31)
Our Jest and TypeScript presets now enable
isolatedModules
by default. Your Jest tests should start quicker, consume less resources, and no longer get stuck on pesky type errors. This should not compromise the type safety of your project asskuba lint
is intended to type check all production and testing code.If your project contains files without imports and exports like
jest.setup.ts
, you can add an empty export statement to them to placate the TypeScript compiler:jest.setup.ts(1,1): error TS1208: 'jest.setup.ts' cannot be compiled under '--isolatedModules' because it is considered a global script file. Add an import, export, or an empty 'export {}' statement to make it a module.
process.env.ENVIRONMENT = 'test'; + export {};
If you previously enabled
isolatedModules
via theglobals
option in your Jest config, this is no longer functional due to syntax changes in ts-jest 29. You should be able to rely on our default going forward.skuba configure
can attempt to clean up the stale option, or you can remove it from yourjest.config.ts
manually:export default Jest.mergePreset({ - globals: { - 'ts-jest': { - // seek-oss/skuba#626 - isolatedModules: true, - }, - }, // Rest of config });
Isolated modules are incompatible with certain language features like
const enum
s. We recommend migrating away from such features as they are not supported by the broader ecosystem, including transpilers like Babel and esbuild. If your project is not yet ready for isolated modules, you can override the default in yourtsconfig.json
:{ "compilerOptions": { + "isolatedModules": false }, "extends": "skuba/config/tsconfig.json" }
Minor Changes
-
build: Add experimental esbuild support (f693668)
You can now build your project with esbuild. Note that this integration is still experimental, only includes the bare minimum to supplant a basic
tsc
-based build, and is not guaranteed to matchtsc
output. See the esbuild deep dive for more information.To opt in, modify your
package.json
:{ "skuba": { + "build": "esbuild", "template": null } }
Patch Changes
-
template/lambda-sqs-worker-cdk: Replace Runtypes with Zod as default schema validator (1753391)
-
template/lambda-sqs-worker: Replace Runtypes with Zod as default schema validator (1753391)
-
configure: Fix package version lookups (680f6ec)
This resolves the following error:
Error: Package "xyz" does not have a valid package.json manifest
-
template/koa-rest-api: Replace Runtypes with Zod as default schema validator (1753391)
v4.4.1
Patch Changes
-
template/lambda-sqs-worker: Switch to modern Datadog integration (#965)
Datadog's CloudWatch integration and the associated
createCloudWatchClient
function fromseek-datadog-custom-metrics
have been deprecated. We recommend Datadog's Serverless Framework Plugin along with their first-party datadog-lambda-js and dd-trace npm packages. -
deps: Drop
package-json
(#962)This circumvents the following TypeScript compilation error on a clean install:
Error: node_modules/@types/cacheable-request/index.d.ts(0,0): error TS2709: Cannot use namespace 'ResponseLike' as a type.
If you run into this issue elsewhere in your project, you can temporarily work around it with a resolution in your
package.json
:{ "resolutions": { "@types/responselike": "1.0.0" } }
-
template/koa-rest-api: Drop
uuid
(#964)V4 UUIDs can be generated using the built-in
crypto.randomUUID()
function starting from Node.js 14.17. This is analogous to theCrypto.randomUUID()
Web API.- import { v4 as randomUUID } from 'uuid'; + import { randomUUID } from 'crypto';
v4.4.0
Minor Changes
-
deps: Jest 29 (#953)
This major release includes breaking changes. See the announcement post for more information.
The
collectCoverageOnlyFrom
configuration option has been removed, and the default snapshot format has been simplified:- Expected: \\"a\\" + Expected: "a" - Object { - Array [] - } + { + [] + }
-
deps: eslint-plugin-jest 27 (#959)
This major release includes breaking changes. See the release note for more information.
The
jest/no-alias-methods
rule is now enforced and autofixed to discourage usage of alias methods that will be removed in Jest 30.- .toBeCalled() + .toHaveBeenCalled()
-
configure, init: Format
package.json
with sort-package-json (#951) -
deps: TypeScript 4.8 (#954)
This major release includes breaking changes. See the TypeScript 4.8 announcement for more information.
Patch Changes
-
configure, template: Ignore linting on
.cdk.staging
directory (#957) -
configure, template: Ignore linting on
cdk.out
directory (#940) -
template/*-npm-package: Use SSH scheme in repository URL (#955)
We have changed the templated format of the
package.json#repository/url
field. This may resolveskuba release
errors that reference Git password authentication is shutting down on the GitHub Blog.- git+https://github.com/org/repo.git + git+ssh://[email protected]/org/repo.git
-
configure, template: Allow
.idea
and.vscode
ignore overrides (#956)You can now append lines like
!.vscode/launch.json
to your ignore files to allow specific editor files to be committed, formatted and/or linted.
v4.3.1
Patch Changes
-
deps: jest-watch-typeahead ^2.0.0 (#925)
-
template/*-rest-api: seek-jobs/gantry v2.0.0 (#935)
-
template/lambda-sqs-worker: Remove tty disable from pipeline (#918)
-
test: Prefer verbose failure message in execution error annotations (#910)
-
template/lambda-sqs-worker: Remove unnecessary IAM permission (#908)
-
template: Fix README link to ARM64 guide (#913)
-
template/*-rest-api: Fix Gantry documentation links (#931)
v4.3.0
Minor Changes
-
test: Add
jest-watch-typeahead
plugin (#893)This enables typeahead suggestions when filtering by file or test name in watch mode.
-
Git: Add fastForwardBranch function (#882)
-
deps: TypeScript 4.7 (#877)
This major release includes breaking changes. See the TypeScript 4.7 announcement for more information.
While ECMAScript Module support for Node.js is now stable in TypeScript, other aspects of our toolchain have not caught up yet; notably, Node.js still lacks stable APIs for Jest to implement its usual suite of mocking capabilities. We are holding off on recommending existing repositories to make the switch and on providing reference implementations via our templates. As it stands, migrating from CJS to ESM is still an arduous exercise in rewriting import statements and restructuring mocks and test suites at the bare minimum.
-
GitHub: Add functions to create and upload verified commits using the GitHub GraphQL API (#882)
See our GitHub API documentation for more information.
-
deps: Prettier 2.7 (#899)
See the release notes for more information.
Patch Changes
-
test: Improve file detection for GitHub annotations (#885)
-
deps: package-json ^7.0.0 (#903)
Resolves SNYK-JS-GOT-2932019.
-
template/*-rest-api: seek-jobs/gantry v1.8.1 (#887)
-
template/*: Remove
.me
files (#902)SEEK is moving away from Codex to off-the-shelf software powered by Backstage
catalog-info.yaml
files.At the moment we're only asking teams to document their systems, which typically span across multiple repositories. We may add
catalog-info.yaml
files back to the templates if there's a need for teams to document their components at a repository level. -
lint: Use GitHub GraphQL API to upload verified autofix commits (#882)
-
template: Use ARM64 architecture (#873)
We now recommend building and running projects on ARM64 hardware for greater cost efficiency. This requires a Graviton-based Buildkite cluster; see our ARM64 guide for more information.
v4.3.0-beta.0
Minor Changes
-
test: Add
jest-watch-typeahead
plugin (0b635ed)This enables typeahead suggestions when filtering by file or test name in watch mode.
-
Git: Add fastForwardBranch method. (38f3bef)
-
deps: TypeScript 4.7 (e9bba5a)
This major release includes breaking changes. See the TypeScript 4.7 announcement for more information.
While ECMAScript Module support for Node.js is now stable in TypeScript, other aspects of our toolchain have not caught up yet; notably, Node.js still lacks stable APIs for Jest to implement its usual suite of mocking capabilities. We are holding off on recommending existing repositories to make the switch and on providing reference implementations via our templates. As it stands, migrating from CJS to ESM is still an arduous exercise in rewriting import statements and restructuring mocks and test suites at the bare minimum.
-
GitHub: Add new methods to create and push verified commits using the GitHub GraphQL API. See the GitHub API documentation for more information. (38f3bef)