Releases: seek-oss/skuba
v4.1.1
Patch Changes
-
template: Disable type checking in tests (#787)
Newly initialised projects will skip TypeScript type checking on
skuba test
as it's already covered byskuba lint
. You can now iterate on your tests without running into annoying compilation errors like TS6133 (unused declarations).This will be defaulted for existing projects in a future major version. You can opt in early by setting the
globals
configuration option in yourjest.config.ts
:export default Jest.mergePreset({ globals: { 'ts-jest': { // seek-oss/skuba#626 isolatedModules: true, }, }, // Rest of config });
-
template: Specify default Buildkite agent (#775)
-
format, lint: Suppress
eslint-plugin-react
warning (#786)Warning: React version was set to "detect" in eslint-plugin-react settings, but the "react" package is not installed. Assuming latest React version for linting.
-
deps: Prettier 2.6 (#792)
See the release notes for more information.
-
node: Throw unhandled rejections under Node.js 14 (#777)
When a rejected promise is left unhandled in Node.js 14, it simply logs a warning. This caused
skuba node
to effectively swallow such failures and report a process exit code of 0. We now override this behaviour with--unhandled-rejections=throw
to predictably fail with a non-zero exit code across supported Node.js versions. -
template/*-rest-api: seek-jobs/gantry v1.6.2 (#778)
v4.1.0
Minor Changes
-
node, start: Load environment variables from
.env
file (#774) -
deps: ts-node ^10.5.0 (#764)
This major release includes breaking changes. If your project uses a complex
ts-node
configuration either directly or on top ofskuba node
andskuba start
, see the changelog for more information.
Patch Changes
-
template: skuba-dive ^2.0.0 (#766)
-
template/lambda-sqs-worker: Remove
variablesResolutionMode
(#768)This resolves the following deprecation warning in Serverless Framework v3:
Starting with v3.0, the "variablesResolutionMode" option is now useless. You can safely remove it from the configuration More info: https://serverless.com/framework/docs/deprecations/#VARIABLES_RESOLUTION_MODE
-
template/*-rest-api: Ignore deployment alarms and ECR scanning (#773)
-
configure: Fix
@seek/seek-module-toolkit
migration guide link (#762) -
template/lambda-sqs-worker-cdk: Add
NODE_ENV=production
to environment variables (#763) -
template/lambda-sqs-worker: Add
NODE_ENV=production
to environment variables (#763) -
deps: ts-node-dev ^2.0.0-0 (#764)
-
template/lambda-sqs-worker: Move environment variables to
provider.environment
to reduce repetition (#767)
v4.0.0
Major Changes
-
deps: Require Node.js 14.18+ (#760)
Node.js 12 will reach end of life by April 2022. The
semantic-release
package and stable--enable-source-maps
flag necessitate this new minimum version.Consider upgrading the Node.js version for your project across:
.nvmrc
package.json#/engines/node
- CI/CD configuration (
.buildkite/pipeline.yml
,Dockerfile
, etc.)
-
deps: semantic-release ^19.0.0 (#757)
Resolves SNYK-JS-MARKED-2342073 and SNYK-JS-MARKED-2342082.
This may alleviate the following
skuba release
error:[semantic-release] › ✖ EGHNOPERMISSION The GitHub token doesn't allow to push on the repository owner/repo. The user associated with the GitHub token (https://github.com/semantic-release/github/blob/master/README.md#github-authentication) configured in the GH_TOKEN or GITHUB_TOKEN environment variable must allows to push to the repository owner/repo.
-
template: Use
--enable-source-maps
(#761)Stable source map support has landed in Node.js 14.18+ via the built-in
--enable-source-maps
option.We recommend migrating off of custom source map implementations in favour of this option. Upgrading to skuba-dive v2 will remove
source-map-support
from theskuba-dive/register
hook.For a containerised application, update your Dockerfile:
- FROM gcr.io/distroless/nodejs:12 AS runtime + FROM gcr.io/distroless/nodejs:16 AS runtime + # https://nodejs.org/api/cli.html#cli_node_options_options + ENV NODE_OPTIONS=--enable-source-maps
For a Serverless Lambda application, update your
serverless.yml
:provider: - runtime: nodejs12.x + runtime: nodejs14.x functions: Worker: environment: + # https://nodejs.org/api/cli.html#cli_node_options_options + NODE_OPTIONS: --enable-source-maps
For a CDK Lambda application, update your stack:
new aws_lambda.Function(this, 'worker', { - runtime: aws_lambda.Runtime.NODEJS_12_X, + runtime: aws_lambda.Runtime.NODEJS_14_X, environment: { + // https://nodejs.org/api/cli.html#cli_node_options_options + NODE_OPTIONS: '--enable-source-maps', }, });
Patch Changes
-
template/lambda-sqs-worker: Disable
tty
on deploy step (#753)Serverless Framework v3 renders progress spinners on interactive terminals. We recommend disabling tty in CI/CD for cleaner log output.
-
template/lambda-sqs-worker: serverless ^3.0.0 (#748)
-
template/lambda-sqs-worker: Replace
custom.env
configuration withparams
(#752)You can now define environment specific variables using the new Serverless parameters feature. See https://www.serverless.com/framework/docs/guides/parameters for more details.
-
template/*-rest-api: seek-jobs/gantry v1.6.1 (#759)
-
template/lambda-sqs-worker: Remove
provider.lambdaHashingVersion
(#751)This resolves the following deprecation warning in Serverless Framework v3:
Setting "20201221" for "provider.lambdaHashingVersion" is no longer effective as new hashing algorithm is now used by default. You can safely remove this property from your configuration.
-
deps: eslint-config-skuba 1.0.14 (#758)
This disables the
tsdoc/syntax
ESLint rule in tests for compatibility with/** @jest-environment env */
directives. -
deps: isomorphic-git ^1.11.1 (#750)
Resolves SNYK-JS-SIMPLEGET-2361683.
v3.17.2
Patch Changes
-
init: Fix GitHub template cloning (#739)
This resolves the following error when cloning a project template from GitHub:
UnknownTransportError: Git remote "[email protected]:owner/repo.git" uses an unrecognized transport protocol: "ssh"
-
template/lambda-sqs-worker: Remove qualifier from smoke test invocation (#743)
Previously, this template's smoke test hook specified a
$LATEST
qualifier in itsLambda.Invoke
API call. AWS authorised the call based on the unqualified Lambda ARN in ourserverless.yml
IAM policy, but will stop doing so after April 2022.To avoid deployment failures, remove the qualifier in
src/hooks.ts
. An unqualified call is equivalent to targeting$LATEST
.- Qualifier: '$LATEST', + Qualifier: undefined,
-
node: Register
tsconfig-paths
in REPL (#745)This resolves the following error:
Error: Cannot find module '/node_modules/skuba/lib/register' Require stack: - internal/preload
v3.17.1
Patch Changes
-
deps: ts-jest ^27.1.2 (#729)
This resolves the following import issue in older 27.0.x versions of
ts-jest
:TypeError: pathsToModuleNameMapper is not a function
-
test: Restore Node.js 12 compatibility (#730)
This resolves the following error in Node.js 12 environments:
Object.entries(parsedConfig.options.paths ?? DEFAULT_PATHS).flatMap( ^ SyntaxError: Unexpected token '?'
Note that Node.js 12 will reach its end of life in May 2022.
v3.17.0
Minor Changes
-
template/koa-rest-api: Add opt-in OpenTelemetry support (#706)
-
deps: Prettier 2.5 (#701)
See the release notes for more information.
-
node, start: Register
tsconfig-paths
(#678)You can now define module aliases other than
src
for local development and scripting. Specify these through thepaths
compiler option in yourtsconfig.json
:// tsconfig.json { "compilerOptions": { "baseUrl": ".", "paths": { "src": ["src"] } } }
-
GitHub.buildNameFromEnvironment: Export helper function (#676)
-
jest: Support
tsconfig.json
paths (#698)Module aliases other than
src
are now supported inskuba test
. Our Jest preset includes a dynamicmoduleNameMapper
that reads thepaths
compiler option from yourtsconfig.json
. -
git: Export helper functions (#689)
-
test: Add GitHub check run annotations (#648)
skuba test
can now automatically annotate GitHub commits when you propagate CI environment variables and a GitHub API token. These annotations also appear inline with code under the “Files changed” tab in pull requests. -
GitHub.getPullRequestNumber: Export helper function (#690)
-
GitHub.putIssueComment: Export helper function (#690)
This enables use cases like a persistent bot comment at the top of a pull request a la Changesets that reflects the current status of a CI check.
-
GitHub.enabledFromEnvironment: Export helper function (#676)
Patch Changes
-
GitHub.createCheckRun: Support
text
parameter (#673) -
template: Retrieve GitHub token on Test & Lint (#667)
-
template: serverless-prune-plugin ^2.0.0 (#719)
-
test: Fix
ts-jest
imports (#715)This resolves the following warning:
Replace any occurrences of "ts-jest/utils" with just "ts-jest".
If you're using the
mocked
utility fromts-jest
, switch over to the built-in Jest function:import git from 'isomorphic-git'; - import { mocked } from 'ts-jest'; jest.mock('isomorphic-git'); - mocked(git.commit).mockResolvedValue(''); + jest.mocked(git.commit).mockResolvedValue('');
-
template/lambda-sqs-worker-cdk: Migrate to AWS CDK v2 (#714)
-
node, start: Deregister
source-map-support
(#679)ts-node
takes care of this for us. -
template/lambda-sqs-worker-cdk: Fix docker-compose volume mount and deploy output (#695)
-
Jest.mergePreset: Allow
displayName
andprojects
(#648)
v3.17.0-beta.5
Patch Changes
- jest: Fix undefined reference (
99eaae1
)
v3.17.0-beta.4
Patch Changes
- pkg: Include
jest
subdirectory (f38556c
)
v3.17.0-beta.3
Minor Changes
-
jest: Support
tsconfig.json
paths (fe4ed57
)Module aliases other than
src
are now supported inskuba test
. Our Jest preset includes a dynamicmoduleNameMapper
that reads thepaths
compiler option from yourtsconfig.json
.
v3.17.0-beta.0
Minor Changes
-
node, start: Register
tsconfig-paths
(#678)You can now define module aliases other than
src
for local development and scripting. Specify these through thepaths
compiler option in yourtsconfig.json
:// tsconfig.json { "compilerOptions": { "baseUrl": ".", "paths": { "src": ["src"] } } }
-
GitHub.buildNameFromEnvironment: Export helper function (#676)
-
git: Export helper functions (#689)
-
test: Add GitHub check run annotations (#648)
skuba test
can now automatically annotate GitHub commits when you propagate CI environment variables and a GitHub API token. These annotations also appear inline with code under the “Files changed” tab in pull requests. -
GitHub.getPullRequestNumber: Export helper function (#690)
-
GitHub.putIssueComment: Export helper function (#690)
This enables use cases like a persistent bot comment at the top of a pull request a la Changesets that reflects the current status of a CI check.
-
GitHub.enabledFromEnvironment: Export helper function (#676)
Patch Changes
-
GitHub.createCheckRun: Support
text
parameter (#673) -
template: Retrieve GitHub token on Test & Lint (#667)
-
deps: TypeScript 4.5 (#685)
This major release includes breaking changes. See the announcement for more information.
Note that new syntax in TypeScript 4.5 is not yet supported by ESLint and Prettier.
-
node, start: Deregister
source-map-support
(#679)ts-node
takes care of this for us. -
Jest.mergePreset: Allow
displayName
andprojects
(#648)