Skip to content

Commit

Permalink
Version Packages
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jul 14, 2023
1 parent f9860b1 commit 6da938e
Show file tree
Hide file tree
Showing 8 changed files with 93 additions and 103 deletions.
7 changes: 0 additions & 7 deletions .changeset/cold-stingrays-smile.md

This file was deleted.

13 changes: 0 additions & 13 deletions .changeset/cyan-knives-drop.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/forty-hornets-argue.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/gorgeous-eagles-mix.md

This file was deleted.

61 changes: 0 additions & 61 deletions .changeset/healthy-mirrors-look.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/tall-laws-arrive.md

This file was deleted.

92 changes: 92 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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 <https://github.blog/2023-04-19-introducing-npm-package-provenance/> 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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 6da938e

Please sign in to comment.