Skip to content

Releases: seek-oss/skuba

v5.1.0

28 Dec 02:54
46d1c06
Compare
Choose a tag to compare

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 or arm64) (#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 custom environment Gantry value. (#1065)

  • lint: Require package.json to be sorted (#1048)

v5.0.1

10 Nov 02:07
776b77d
Compare
Choose a tag to compare

Patch Changes

  • jest: Fix isolatedModules transform config (#1036)

  • deps: eslint-config-skuba 1.2.0 (#1035)

    This introduces an autofix for the TS1205 compiler error.

v5.0.0

09 Nov 05:18
c38e09b
Compare
Choose a tag to compare

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 the src 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 as skuba 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 the globals 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 your jest.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 enums. 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 your tsconfig.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 match tsc 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

27 Oct 21:38
0f2dc4c
Compare
Choose a tag to compare
v5.0.0-beta.0 Pre-release
Pre-release

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 the src 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 as skuba 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 the globals 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 your jest.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 enums. 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 your tsconfig.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 match tsc 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

08 Sep 03:47
cf93008
Compare
Choose a tag to compare

Patch Changes

v4.4.0

31 Aug 02:41
3f57b5d
Compare
Choose a tag to compare

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 resolve skuba 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

03 Aug 02:18
a0b5e9d
Compare
Choose a tag to compare

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

22 Jun 10:36
caed51b
Compare
Choose a tag to compare

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

07 Jun 11:42
Compare
Choose a tag to compare
v4.3.0-beta.0 Pre-release
Pre-release

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)

Patch Changes

  • test: Improve file detection for GitHub annotations (8923dfc)

  • template/*-rest-api: seek-jobs/gantry v1.8.1 (c88bf14)

v4.2.2

27 May 02:08
fdfd677
Compare
Choose a tag to compare

Patch Changes

  • template/lambda-sqs-worker: Avoid mutation of logger context (#879)

    We now perform a shallow copy when retrieving the logger context from AsyncLocalStorage.

    - mixin: () => loggerContext.getStore() ?? {},
    + mixin: () => ({ ...loggerContext.getStore() }),