From 97fe52ee184c4e96b03d089aa034b07c940f4f3b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 14 Jul 2023 03:45:25 +0000 Subject: [PATCH] Version Packages --- .changeset/breezy-bananas-agree.md | 5 -- .changeset/cold-stingrays-smile.md | 7 -- .changeset/cyan-knives-drop.md | 13 ---- .changeset/forty-hornets-argue.md | 7 -- .changeset/gorgeous-eagles-mix.md | 7 -- .changeset/healthy-mirrors-look.md | 61 ---------------- .changeset/light-ears-fold.md | 5 -- .changeset/perfect-lamps-wink.md | 5 -- .changeset/sharp-chairs-report.md | 14 ---- .changeset/tall-laws-arrive.md | 7 -- CHANGELOG.md | 109 +++++++++++++++++++++++++++++ package.json | 2 +- 12 files changed, 110 insertions(+), 132 deletions(-) delete mode 100644 .changeset/breezy-bananas-agree.md delete mode 100644 .changeset/cold-stingrays-smile.md delete mode 100644 .changeset/cyan-knives-drop.md delete mode 100644 .changeset/forty-hornets-argue.md delete mode 100644 .changeset/gorgeous-eagles-mix.md delete mode 100644 .changeset/healthy-mirrors-look.md delete mode 100644 .changeset/light-ears-fold.md delete mode 100644 .changeset/perfect-lamps-wink.md delete mode 100644 .changeset/sharp-chairs-report.md delete mode 100644 .changeset/tall-laws-arrive.md diff --git a/.changeset/breezy-bananas-agree.md b/.changeset/breezy-bananas-agree.md deleted file mode 100644 index 59ae8f00c..000000000 --- a/.changeset/breezy-bananas-agree.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'skuba': patch ---- - -template: Require Node.js 18.12+ diff --git a/.changeset/cold-stingrays-smile.md b/.changeset/cold-stingrays-smile.md deleted file mode 100644 index eae26cda1..000000000 --- a/.changeset/cold-stingrays-smile.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'skuba': patch ---- - -template/oss-npm-package: Set `publishConfig.provenance` to `true` - -See for more information. diff --git a/.changeset/cyan-knives-drop.md b/.changeset/cyan-knives-drop.md deleted file mode 100644 index 3d094b2a5..000000000 --- a/.changeset/cyan-knives-drop.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -'skuba': patch ---- - -template: Change some lambda worker info logs to debug - -The "Function succeeded" log message was changed from `info` to `debug` -to reduce the amount of unnecessary logs in production. -The message will still be logged in dev environments but at a `debug` -level. - -The "Function succeeded" log message was retained as it is part of unit-testing -the handler. diff --git a/.changeset/forty-hornets-argue.md b/.changeset/forty-hornets-argue.md deleted file mode 100644 index 341851934..000000000 --- a/.changeset/forty-hornets-argue.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'skuba': patch ---- - -tsconfig: Turn off [`noUnusedLocals`](https://www.typescriptlang.org/tsconfig#noUnusedLocals) and [`noUnusedParameters`](https://www.typescriptlang.org/tsconfig#noUnusedParameters) - -[SEEK's ESLint config](https://github.com/seek-oss/eslint-config-seek) has a [rule](https://eslint.org/docs/latest/rules/no-unused-vars) which works for both function and types. We do not need both tools to do the same thing and ESLint has better support for ignoring files if needed. diff --git a/.changeset/gorgeous-eagles-mix.md b/.changeset/gorgeous-eagles-mix.md deleted file mode 100644 index 529243438..000000000 --- a/.changeset/gorgeous-eagles-mix.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'skuba': minor ---- - -deps: TypeScript 5.1 - -This major release includes breaking changes. See the [TypeScript 5.1](https://devblogs.microsoft.com/typescript/announcing-typescript-5-1/) announcement for more information. diff --git a/.changeset/healthy-mirrors-look.md b/.changeset/healthy-mirrors-look.md deleted file mode 100644 index 28fe3af05..000000000 --- a/.changeset/healthy-mirrors-look.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -'skuba': major ---- - -deps: tsconfig-seek 2 - -This change sets the [`noUncheckedIndexedAccess`](https://www.typescriptlang.org/tsconfig#noUncheckedIndexedAccess) compiler option to `true` by default. - -This will flag possible issues with indexed access of arrays and records. - -Before: - -```ts -const a: string[] = []; -const b = a[0]; -// ^? const b: string -``` - -After: - -```ts -const a: string[] = []; -const b = a[0]; -// ^? const b: string | undefined -``` - -Unfortunately, this change is a double edged sword as your previous code which may look like this may now be invalid. - -```ts -if (list.length === 3) { - const b = list[1]; - // ^? const b: string | undefined -} -``` - -To address this you will need to also explicitly check the index you are accessing. - -```ts -if (list.length === 3 && list[1]) { - const b = list[1]; - // ^? const b: string -} -``` - -This may seem like overkill, however, when you consider that Javascript will also allow this it may make sense - -```ts -const a: string[] = []; -a[1000] = 'foo'; -console.log(a.length); // 1001 -``` - -You can override this setting in your project's `tsconfig.json` by setting it to false. - -```json -{ - "compilerOptions": { - "noUncheckedIndexedAccess": false - } -} -``` diff --git a/.changeset/light-ears-fold.md b/.changeset/light-ears-fold.md deleted file mode 100644 index d6710a9e4..000000000 --- a/.changeset/light-ears-fold.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'skuba': patch ---- - -lint: Resolve Git root before attempting to autofix diff --git a/.changeset/perfect-lamps-wink.md b/.changeset/perfect-lamps-wink.md deleted file mode 100644 index 46d23a250..000000000 --- a/.changeset/perfect-lamps-wink.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'skuba': patch ---- - -configure: Resolve Git root before attempting to patch Renovate config diff --git a/.changeset/sharp-chairs-report.md b/.changeset/sharp-chairs-report.md deleted file mode 100644 index 0b5bb5da4..000000000 --- a/.changeset/sharp-chairs-report.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -'skuba': major ---- - -deps: Require Node.js 18.12+ - -Node.js 16 will reach end of life by September 2023. We have aligned our version support with [sku 18](https://github.com/seek-oss/sku/releases/tag/sku%4012.0.0). - -Consider upgrading the Node.js version for your project across: - -- `.nvmrc` -- `package.json#/engines/node` -- `@types/node` package version -- CI/CD configuration (`.buildkite/pipeline.yml`, `Dockerfile`, etc.) diff --git a/.changeset/tall-laws-arrive.md b/.changeset/tall-laws-arrive.md deleted file mode 100644 index 5bf73c2f6..000000000 --- a/.changeset/tall-laws-arrive.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'skuba': patch ---- - -template/lambda-sqs-worker: Bump aws-sdk-client-mock to 3.0.0 - -AWS SDK v3.363.0 shipped with breaking type changes. diff --git a/CHANGELOG.md b/CHANGELOG.md index 619836bcc..affd0a2bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,114 @@ # skuba +## 7.0.0 + +### Major Changes + +- **deps:** tsconfig-seek 2 ([#1175](https://github.com/seek-oss/skuba/pull/1175)) + + This change sets the [`noUncheckedIndexedAccess`](https://www.typescriptlang.org/tsconfig#noUncheckedIndexedAccess) compiler option to `true` by default. + + This will flag possible issues with indexed access of arrays and records. + + Before: + + ```ts + const a: string[] = []; + const b = a[0]; + // ^? const b: string + ``` + + After: + + ```ts + const a: string[] = []; + const b = a[0]; + // ^? const b: string | undefined + ``` + + Unfortunately, this change is a double edged sword as your previous code which may look like this may now be invalid. + + ```ts + if (list.length === 3) { + const b = list[1]; + // ^? const b: string | undefined + } + ``` + + To address this you will need to also explicitly check the index you are accessing. + + ```ts + if (list.length === 3 && list[1]) { + const b = list[1]; + // ^? const b: string + } + ``` + + This may seem like overkill, however, when you consider that Javascript will also allow this it may make sense + + ```ts + const a: string[] = []; + a[1000] = 'foo'; + console.log(a.length); // 1001 + ``` + + You can override this setting in your project's `tsconfig.json` by setting it to false. + + ```json + { + "compilerOptions": { + "noUncheckedIndexedAccess": false + } + } + ``` + +- **deps:** Require Node.js 18.12+ ([#1206](https://github.com/seek-oss/skuba/pull/1206)) + + Node.js 16 will reach end of life by September 2023. We have aligned our version support with [sku 18](https://github.com/seek-oss/sku/releases/tag/sku%4012.0.0). + + Consider upgrading the Node.js version for your project across: + + - `.nvmrc` + - `package.json#/engines/node` + - `@types/node` package version + - CI/CD configuration (`.buildkite/pipeline.yml`, `Dockerfile`, etc.) + +### Minor Changes + +- **deps:** TypeScript 5.1 ([#1183](https://github.com/seek-oss/skuba/pull/1183)) + + This major release includes breaking changes. See the [TypeScript 5.1](https://devblogs.microsoft.com/typescript/announcing-typescript-5-1/) announcement for more information. + +### Patch Changes + +- **template:** Require Node.js 18.12+ ([#1206](https://github.com/seek-oss/skuba/pull/1206)) + +- **template/oss-npm-package:** Set `publishConfig.provenance` to `true` ([#1182](https://github.com/seek-oss/skuba/pull/1182)) + + See for more information. + +- **template:** Change some lambda worker info logs to debug ([#1178](https://github.com/seek-oss/skuba/pull/1178)) + + The "Function succeeded" log message was changed from `info` to `debug` + to reduce the amount of unnecessary logs in production. + The message will still be logged in dev environments but at a `debug` + level. + + The "Function succeeded" log message was retained as it is part of unit-testing + the handler. + +- **tsconfig:** Turn off [`noUnusedLocals`](https://www.typescriptlang.org/tsconfig#noUnusedLocals) and [`noUnusedParameters`](https://www.typescriptlang.org/tsconfig#noUnusedParameters) ([#1181](https://github.com/seek-oss/skuba/pull/1181)) + + [SEEK's ESLint config](https://github.com/seek-oss/eslint-config-seek) has a [rule](https://eslint.org/docs/latest/rules/no-unused-vars) which works for both function and types. We do not need both tools to do the same thing and ESLint has better support for ignoring files if needed. + +- **lint:** Resolve Git root before attempting to autofix ([#1215](https://github.com/seek-oss/skuba/pull/1215)) + +- **configure:** Resolve Git root before attempting to patch Renovate config ([#1215](https://github.com/seek-oss/skuba/pull/1215)) + +- **template/lambda-sqs-worker:** Bump aws-sdk-client-mock to 3.0.0 ([#1197](https://github.com/seek-oss/skuba/pull/1197)) + + AWS SDK v3.363.0 shipped with breaking type changes. + ## 6.2.0 ### Minor Changes diff --git a/package.json b/package.json index e55084ca5..e3eb714fc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "skuba", - "version": "6.2.0", + "version": "7.0.0", "private": false, "description": "SEEK development toolkit for backend applications and packages", "homepage": "https://github.com/seek-oss/skuba#readme",