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/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..3d4c19640 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,97 @@ # 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 + } + } + ``` + +### 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/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. + +- **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 d5eb054e2..1c607c349 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",