diff --git a/.changeset/breezy-dancers-think.md b/.changeset/breezy-dancers-think.md deleted file mode 100644 index 4cd3d98a6..000000000 --- a/.changeset/breezy-dancers-think.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'skuba': patch ---- - -**init:** Restore `--silent` arg for `yarn add` diff --git a/.changeset/clean-cooks-compare.md b/.changeset/clean-cooks-compare.md deleted file mode 100644 index e8f187422..000000000 --- a/.changeset/clean-cooks-compare.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'skuba': patch ---- - -**configure, init:** Tweak ignore file patterns - -Directory names like `/lib-es2015` are ignored based on prefix now, -but certain patterns have been restricted to the root to allow for `/src/lib`. diff --git a/.changeset/clever-otters-draw.md b/.changeset/clever-otters-draw.md deleted file mode 100644 index 65e433854..000000000 --- a/.changeset/clever-otters-draw.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'skuba': patch ---- - -**configure:** Use `latest-version` to check package versions diff --git a/.changeset/cyan-walls-dance.md b/.changeset/cyan-walls-dance.md deleted file mode 100644 index 8c2d1af20..000000000 --- a/.changeset/cyan-walls-dance.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'skuba': patch ---- - -**configure, init:** Switch to oss `skuba-dive` package diff --git a/.changeset/gold-phones-sneeze.md b/.changeset/gold-phones-sneeze.md deleted file mode 100644 index 8fe3cecf4..000000000 --- a/.changeset/gold-phones-sneeze.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'skuba': patch ---- - -Switch to `seek-datadog-custom-metrics` + `seek-koala` diff --git a/.changeset/gorgeous-apples-join.md b/.changeset/gorgeous-apples-join.md deleted file mode 100644 index dbb6ef46f..000000000 --- a/.changeset/gorgeous-apples-join.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'skuba': patch ---- - -**configure:** Keep name, readme and version fields in package.json diff --git a/.changeset/heavy-kangaroos-carry.md b/.changeset/heavy-kangaroos-carry.md deleted file mode 100644 index ae143d16e..000000000 --- a/.changeset/heavy-kangaroos-carry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'skuba': patch ---- - -**configure:** Drop `--ignore-optional` from `yarn install` diff --git a/.changeset/odd-steaks-fry.md b/.changeset/odd-steaks-fry.md deleted file mode 100644 index c8430da4c..000000000 --- a/.changeset/odd-steaks-fry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'skuba': patch ---- - -**start:** Remove support for a custom port logging function diff --git a/.changeset/olive-zebras-love.md b/.changeset/olive-zebras-love.md deleted file mode 100644 index 587c775fe..000000000 --- a/.changeset/olive-zebras-love.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'skuba': patch ---- - -**init:** Drop `--ignore-optional --silent` from `yarn add` diff --git a/.changeset/pink-cobras-deny.md b/.changeset/pink-cobras-deny.md deleted file mode 100644 index 04c59f9ee..000000000 --- a/.changeset/pink-cobras-deny.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'skuba': patch ---- - -**template/koa-rest-api:** Bump Gantry plugin to v1.2.2 diff --git a/.changeset/pretty-moose-argue.md b/.changeset/pretty-moose-argue.md deleted file mode 100644 index 1230b4adc..000000000 --- a/.changeset/pretty-moose-argue.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'skuba': patch ---- - -**deps:** Declare `@types/jest` as a peer dependency diff --git a/.changeset/shiny-rules-taste.md b/.changeset/shiny-rules-taste.md deleted file mode 100644 index 5ff72303f..000000000 --- a/.changeset/shiny-rules-taste.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'skuba': patch ---- - -**format, lint:** Group `'src'` import along with `'src/**'` diff --git a/.changeset/short-lobsters-film.md b/.changeset/short-lobsters-film.md deleted file mode 100644 index a6a8f8434..000000000 --- a/.changeset/short-lobsters-film.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'skuba': patch ---- - -**configure, init:** Exclude files from templating based on .gitignore diff --git a/.changeset/strong-tables-smash.md b/.changeset/strong-tables-smash.md deleted file mode 100644 index 5cd83efa6..000000000 --- a/.changeset/strong-tables-smash.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -'skuba': minor ---- - -ESLint 7 + `typescript-eslint` 3 - -This upgrade introduces stricter rules around `any` and `object` usage for type safety. - -Consider the following alternatives: - -- Use `unknown` for a value whose type is truly unknown. This is a type-safe alternative to `any` that the TypeScript ecosystem is moving towards. - - ```diff - - const data = JSON.parse(str); - + const data = JSON.parse(str) as unknown; - ``` - -- Prove the value has a specific type using a [type guard](https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards) or runtime validation library. - - ```diff - - const safeData = inputData as any; - + const safeData = RuntimeValidator.check(inputData); - ``` - -- Use `Record` to indicate an object with unknown properties. - - ```diff - - const isObject = (data: unknown): data is object => { ... }; - + const isObject = (data: unknown): data is Record => { ... }; - ``` - -- Disable the specific ESLint rule for the problematic line. - - ```typescript - /* eslint-disable-next-line @typescript-eslint/no-unsafe-assignment */ - const takeAnyBody = ctx.request.body; - ``` diff --git a/.changeset/sweet-coats-develop.md b/.changeset/sweet-coats-develop.md deleted file mode 100644 index 772584eed..000000000 --- a/.changeset/sweet-coats-develop.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'skuba': minor ---- - -**build-package:** Add opinionated command to replace `smt build` - -See the [migration documentation](https://github.com/seek-oss/skuba/blob/master/docs/migrating-from-seek-module-toolkit.md) for more information. diff --git a/CHANGELOG.md b/CHANGELOG.md index b3b322ccd..d169e9d67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,67 @@ # skuba +## 3.5.0 + +### Minor Changes + +- 84a3262: ESLint 7 + `typescript-eslint` 3 + + This upgrade introduces stricter rules around `any` and `object` usage for type safety. + + Consider the following alternatives: + + - Use `unknown` for a value whose type is truly unknown. This is a type-safe alternative to `any` that the TypeScript ecosystem is moving towards. + + ```diff + - const data = JSON.parse(str); + + const data = JSON.parse(str) as unknown; + ``` + + - Prove the value has a specific type using a [type guard](https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards) or runtime validation library. + + ```diff + - const safeData = inputData as any; + + const safeData = RuntimeValidator.check(inputData); + ``` + + - Use `Record` to indicate an object with unknown properties. + + ```diff + - const isObject = (data: unknown): data is object => { ... }; + + const isObject = (data: unknown): data is Record => { ... }; + ``` + + - Disable the specific ESLint rule for the problematic line. + + ```typescript + /* eslint-disable-next-line @typescript-eslint/no-unsafe-assignment */ + const takeAnyBody = ctx.request.body; + ``` + +- 0d3f0ad: **build-package:** Add opinionated command to replace `smt build` + + See the [migration documentation](https://github.com/seek-oss/skuba/blob/master/docs/migrating-from-seek-module-toolkit.md) for more information. + +### Patch Changes + +- bef1b36: **init:** Restore `--silent` arg for `yarn add` +- 3f4bb58: **configure, init:** Tweak ignore file patterns + + Directory names like `/lib-es2015` are ignored based on prefix now, + but certain patterns have been restricted to the root to allow for `/src/lib`. + +- b39a0e0: **configure:** Use `latest-version` to check package versions +- 70ae29a: **configure, init:** Switch to oss `skuba-dive` package +- b44523a: Switch to `seek-datadog-custom-metrics` + `seek-koala` +- 030ebb4: **configure:** Keep name, readme and version fields in package.json +- a311624: **configure:** Drop `--ignore-optional` from `yarn install` +- b61a3ca: **start:** Remove support for a custom port logging function +- a311624: **init:** Drop `--ignore-optional --silent` from `yarn add` +- 54961a5: **template/koa-rest-api:** Bump Gantry plugin to v1.2.2 +- 54211b2: **deps:** Declare `@types/jest` as a peer dependency +- 6600c2f: **format, lint:** Group `'src'` import along with `'src/**'` +- 50a316f: **configure, init:** Exclude files from templating based on .gitignore + ## 3.4.1 ### Patch Changes diff --git a/package.json b/package.json index b1a8ddb6e..22189feaf 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "engines": { "node": ">=12" }, - "version": "3.4.1", + "version": "3.5.0", "main": "lib-commonjs", "module": "lib-es2015", "typings": "lib-types/index.d.ts",