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 Oct 24, 2022
1 parent 1da8465 commit 7dbc793
Show file tree
Hide file tree
Showing 9 changed files with 102 additions and 115 deletions.
5 changes: 0 additions & 5 deletions .changeset/neat-parents-jump.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/pink-gorillas-repair.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/poor-bottles-hide.md

This file was deleted.

26 changes: 0 additions & 26 deletions .changeset/rare-cows-attend.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/thin-kings-teach.md

This file was deleted.

18 changes: 0 additions & 18 deletions .changeset/unlucky-cobras-tan.md

This file was deleted.

44 changes: 0 additions & 44 deletions .changeset/witty-fireants-look.md

This file was deleted.

101 changes: 101 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,106 @@
# skuba

## 5.0.0

### Major Changes

- **test:** Remove default `src` module alias ([#987](https://github.com/seek-oss/skuba/pull/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:

```typescript
import { app } from 'src/app.ts';
```

Ensure that you declare this path in a `tsconfig.json` located in your project root:

```diff
{
"compilerOptions": {
+ "paths": {
+ "src": ["src"]
+ }
},
"extends": "skuba/config/tsconfig.json"
}
```

- **build, test:** Default to isolated modules ([#987](https://github.com/seek-oss/skuba/pull/987))

Our Jest and TypeScript presets now enable [`isolatedModules`](https://www.typescriptlang.org/tsconfig#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:

```console
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.
```

```diff
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:

```diff
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 enum`s. 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`:

```diff
{
"compilerOptions": {
+ "isolatedModules": false
},
"extends": "skuba/config/tsconfig.json"
}
```

### Minor Changes

- **build:** Add experimental esbuild support ([#681](https://github.com/seek-oss/skuba/pull/681))

You can now build your project with [esbuild](https://esbuild.github.io/). 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](https://github.com/seek-oss/skuba/tree/master/docs/deep-dives/esbuild.md) for more information.

To opt in, modify your `package.json`:

```diff
{
"skuba": {
+ "build": "esbuild",
"template": null
}
}
```

### Patch Changes

- **template/lambda-sqs-worker-cdk:** Replace Runtypes with Zod as default schema validator ([#984](https://github.com/seek-oss/skuba/pull/984))

- **template/lambda-sqs-worker:** Replace Runtypes with Zod as default schema validator ([#984](https://github.com/seek-oss/skuba/pull/984))

- **configure:** Fix package version lookups ([#974](https://github.com/seek-oss/skuba/pull/974))

This resolves the following error:

```console
Error: Package "xyz" does not have a valid package.json manifest
```

- **template/koa-rest-api:** Replace Runtypes with Zod as default schema validator ([#984](https://github.com/seek-oss/skuba/pull/984))

## 4.4.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,5 +161,5 @@
"version": "4.0.0"
},
"types": "./lib/index.d.ts",
"version": "4.4.1"
"version": "5.0.0"
}

0 comments on commit 7dbc793

Please sign in to comment.