From c77c964373a27540c084413f9e38fb91f5dffe31 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 4 Mar 2026 23:40:45 +0000 Subject: [PATCH 1/2] Version Packages --- .changeset/bright-camels-live.md | 7 - .changeset/busy-sides-drive.md | 7 - .changeset/dry-lines-jam.md | 20 -- .changeset/good-taxis-listen.md | 5 - .changeset/lovely-snails-live.md | 19 -- .changeset/renovate-8d9933a.md | 5 - .changeset/slow-days-draw.md | 5 - .changeset/smart-lamps-deny.md | 161 ---------------- .changeset/social-pigs-search.md | 5 - .changeset/swift-symbols-pay.md | 6 - .changeset/twelve-chairs-cheer.md | 5 - .changeset/two-olives-serve.md | 5 - CHANGELOG.md | 213 +++++++++++++++++++++ package.json | 2 +- packages/eslint-config-skuba/CHANGELOG.md | 6 + packages/eslint-config-skuba/package.json | 2 +- packages/eslint-plugin-skuba/CHANGELOG.md | 6 + packages/eslint-plugin-skuba/package.json | 4 +- packages/eslint-plugin-skuba/tsconfig.json | 1 + packages/pnpm-plugin-skuba/CHANGELOG.md | 7 + packages/pnpm-plugin-skuba/package.json | 2 +- packages/skuba-dive/package.json | 28 ++- packages/skuba-dive/tsconfig.build.json | 8 - packages/skuba-dive/tsconfig.json | 2 + packages/skuba-dive/tsdown.config.mts | 15 ++ packages/vitest-koa-mocks/CHANGELOG.md | 6 + packages/vitest-koa-mocks/package.json | 4 +- 27 files changed, 286 insertions(+), 270 deletions(-) delete mode 100644 .changeset/bright-camels-live.md delete mode 100644 .changeset/busy-sides-drive.md delete mode 100644 .changeset/dry-lines-jam.md delete mode 100644 .changeset/good-taxis-listen.md delete mode 100644 .changeset/lovely-snails-live.md delete mode 100644 .changeset/renovate-8d9933a.md delete mode 100644 .changeset/slow-days-draw.md delete mode 100644 .changeset/smart-lamps-deny.md delete mode 100644 .changeset/social-pigs-search.md delete mode 100644 .changeset/swift-symbols-pay.md delete mode 100644 .changeset/twelve-chairs-cheer.md delete mode 100644 .changeset/two-olives-serve.md create mode 100644 packages/pnpm-plugin-skuba/CHANGELOG.md delete mode 100644 packages/skuba-dive/tsconfig.build.json create mode 100644 packages/skuba-dive/tsdown.config.mts diff --git a/.changeset/bright-camels-live.md b/.changeset/bright-camels-live.md deleted file mode 100644 index 2bb7e1e41..000000000 --- a/.changeset/bright-camels-live.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'skuba': major ---- - -build-package: Migrate to tsdown - -As part of our [migration to ESM](https://seek-oss.github.io/skuba/docs/deep-dives/esm.html), we are updating our package build process to support generating both CJS and ESM outputs, regardless of whether projects use CJS or ESM. Since our current tsc-based build does not support this, we are switching to [tsdown](https://tsdown.dev/) for package builds. diff --git a/.changeset/busy-sides-drive.md b/.changeset/busy-sides-drive.md deleted file mode 100644 index 7358e68c0..000000000 --- a/.changeset/busy-sides-drive.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'skuba': minor ---- - -init: Add support for private SEEK templates - -Adds support for downloading templates from the private SEEK-Jobs/skuba-templates repository. Users can now select "seek →" from the template list and specify a private template name, which will be downloaded using sparse checkout via SSH. diff --git a/.changeset/dry-lines-jam.md b/.changeset/dry-lines-jam.md deleted file mode 100644 index cd443c23f..000000000 --- a/.changeset/dry-lines-jam.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -'skuba': major ---- - -lint: Enable [`allowBuilds`](https://pnpm.io/settings#allowbuilds), [`trustPolicy`](https://pnpm.io/settings#trustpolicy), [`blockExoticSubdeps`](https://pnpm.io/settings#blockexoticsubdeps) and [`ignorePatchFailures`](https://pnpm.io/cli/patch#ignorepatchfailures) in `pnpm-plugin-skuba` - -In light of recent security vulnerabilities plaguing the JavaScript ecosystem, we are enabling some additional pnpm features to help mitigate the risk of supply chain attacks. - -We have allowlisted a set of known packages as our default but you may need to update your `pnpm-workspace.yaml` configuration to add any additional packages you use that are not included in the default allowlist. - -Example: - -```yaml -allowBuilds: - some-package: true - some-other-package@1.0.0: true - -trustPolicyExclude: - - some-package@1.2.3 -``` diff --git a/.changeset/good-taxis-listen.md b/.changeset/good-taxis-listen.md deleted file mode 100644 index e2e79d064..000000000 --- a/.changeset/good-taxis-listen.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@skuba-lib/vitest-koa-mocks': patch ---- - -build: Update npm package build outputs diff --git a/.changeset/lovely-snails-live.md b/.changeset/lovely-snails-live.md deleted file mode 100644 index ca1780ffc..000000000 --- a/.changeset/lovely-snails-live.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -'skuba': major ---- - -lint: Migrate `pnpm-workspace.yaml` skuba configuration to `pnpm-plugin-skuba` - -This change replaces the managed skuba section in `pnpm-workspace.yaml` with a [pnpm configuration plugin](https://pnpm.io/config-dependencies). - -The migration includes removing the `minimumReleaseAgeExcludeOverload` settings from `package.json` and migrating them to `pnpm-workspace.yaml` - -This simplifies the managed configuration `skuba` provides, allowing you to override and extend previously un-configurable settings such as `minimumReleaseAge` from your `pnpm-workspace.yaml` file. - -Example: - -```yaml -minimumReleaseAge: 1440 # 1 day -minimumReleaseAgeExclude: - - some-package -``` diff --git a/.changeset/renovate-8d9933a.md b/.changeset/renovate-8d9933a.md deleted file mode 100644 index e4d5aecf0..000000000 --- a/.changeset/renovate-8d9933a.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'skuba': patch ---- - -deps: @ast-grep/napi ^0.41.0 diff --git a/.changeset/slow-days-draw.md b/.changeset/slow-days-draw.md deleted file mode 100644 index 87ff52e75..000000000 --- a/.changeset/slow-days-draw.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'skuba': minor ---- - -template/\*-npm-package: Migrate to `tsdown` for bundling diff --git a/.changeset/smart-lamps-deny.md b/.changeset/smart-lamps-deny.md deleted file mode 100644 index 5568099ea..000000000 --- a/.changeset/smart-lamps-deny.md +++ /dev/null @@ -1,161 +0,0 @@ ---- -'skuba': major ---- - -lint: Migrate `skuba build-package` usage to use [tsdown](https://tsdown.dev/) for building packages - -This patch will attempt to do a best effort migration of your `skuba build-package` usage to use [tsdown](https://tsdown.dev/) for building packages. It is highly recommended that you manually review and test the changes. This includes: - -1. Adding a `tsdown.config.mts` file to your package directories with a basic configuration -2. Adding a `customConditions` entry to your root `tsconfig.json` file -3. Adding `skipLibCheck` to your package `tsconfig.json` files to work around issues with type checking against `tsdown`. -4. Updating your package `package.json` files to point to the new build outputs -5. Migrating package.json `assets` usage to use `tsdown` `copy` configuration -6. Removing redundant `tsconfig.build.json` files - -#### File changes - -The output between what `skuba build-package` generates before and after this change will be different, so you may need to update any references to the output files in your project. - -For example the output for a simple `src/index.ts` file produces the following outputs: - -```diff --lib-commonjs/index.js --lib-es2015/index.js --lib-types/index.d.ts -+lib/index.cjs -+lib/index.mjs -+lib/index.d.cts -+lib/index.d.mts -``` - -This change may break consumers who directly access these output paths. - -To check if your consumers are affected, search GitHub with: `org:SEEK-Jobs content:"@seek/MY_PACKAGE/"` - -If needed, export those references from your package entry point to help consumers migrate to the new build outputs. - -Note: if you choose to remove the `unbundle: true` option from `tsdown.config.mts`, tsdown may emit bundled/chunked outputs and internal `lib/...` file paths can change between builds. Consumers should avoid importing from build output files directly, and instead import from the package entry point (or explicitly exported sub paths) - -#### Format changes - -`tsdown` selects what ECMAScript target version to build for based on the `engines.node` field in your `package.json`. - -This means that for consumers previously relying on the `lib-es2015` output may need to update their runtime to match your package's `engines.node` field. - -An example changeset you may want to include for a package: - -````md ---- -'my-package': major ---- - -Update npm package build outputs - -This release changes published build output paths. If you were previously importing from nested paths within the build output you will need to update imports to use the package entry point (for example, `@seek/my-package`). - -Please note that this usage is generally not recommended as it can lead to breakages when build outputs change. - -```diff --import type { SomeType } from '@seek/my-package/lib-types/...'; -+import type { SomeType } from '@seek/my-package'; -``` -```` - -#### Debugging - -##### Additional Entrypoints - -If your package has additional entry points, for example: - -```ts -import { SomeFunction } from '@seek/my-package/subpath'; -``` - -You will need to add them as additional entry points in your `tsdown.config.mts` file, for example: - -```ts -import { defineConfig } from 'tsdown/config'; - -export default defineConfig({ - entries: ['src/index.ts', 'src/subpath/index.ts'], -}); -``` - -This must be followed by a run of `skuba build-package` which will update your `package.json` exports field. - -##### attw (Are the types wrong?) - -If you run into the following error: - -```bash -❌ No resolution (node10) at @seek/my-package/subpath -``` - -You have a couple different options to resolve this: - -1. Update your `tsdown.config.mts` and update the `attw` configuration to use a `node16` profile. This tells the attw tool to ignore the `node`/`node10` module resolution. Projects using skuba 13 or above will be compatible with this by default. - -```diff -import { defineConfig } from 'tsdown/config'; - -export default defineConfig({ - entries: ['src/index.ts', 'src/subpath/index.ts'], -- attw: true, -+ attw: { -+ profile: 'node16', -+ }, -}); -``` - -1. Create an additional `package.json` file - -For an entrypoint such as `@seek/my-package/foo`, create a folder called `foo` with an additional `package.json` file with the following content. - -```json -{ - "main": "../lib/foo/index.cjs", - "module": "../lib/foo/index.mjs", - "types": "../lib/foo/index.d.cts" -} -``` - -and ensure that the folder is exported in your `files` array in your root `package.json` file. - -```json -{ - "files": ["lib", "foo"] -} -``` - -##### Jest - -If your project utilises a `main` field which points to a `.ts` file within a monorepo setup, eg. - -```json - "main": "src/index.ts", -``` - -You may need to create a `moduleNameMapper` entry in your Jest config files to point to the source file, eg. - -```json -{ - "moduleNameMapper": { - "^@seek/my-package": "/packages/my-package/src/index.ts" - } -} -``` - -This will work natively with custom conditions when we migrate to `vitest` in the future, but is required for Jest to continue working with the new build outputs. - -```ts -import { defineConfig } from 'vitest/config'; - -export default defineConfig({ - ssr: { - resolve: { - conditions: ['@seek/my-repo/source'], - }, - }, -}); -``` diff --git a/.changeset/social-pigs-search.md b/.changeset/social-pigs-search.md deleted file mode 100644 index e97d6eab2..000000000 --- a/.changeset/social-pigs-search.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'eslint-plugin-skuba': patch ---- - -build: Export type declarations diff --git a/.changeset/swift-symbols-pay.md b/.changeset/swift-symbols-pay.md deleted file mode 100644 index 29fd94ff3..000000000 --- a/.changeset/swift-symbols-pay.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'eslint-config-skuba': minor -'skuba': minor ---- - -lint: Ignore `coverage`, `dist`, `lib` and `tmp` folders at any depth diff --git a/.changeset/twelve-chairs-cheer.md b/.changeset/twelve-chairs-cheer.md deleted file mode 100644 index f86264fd8..000000000 --- a/.changeset/twelve-chairs-cheer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'pnpm-plugin-skuba': major ---- - -Release stable version diff --git a/.changeset/two-olives-serve.md b/.changeset/two-olives-serve.md deleted file mode 100644 index 90c008a2a..000000000 --- a/.changeset/two-olives-serve.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'skuba': patch ---- - -template/lambda-sqs-worker-cdk: Update Datadog secret configuration to support custom KMS keys diff --git a/CHANGELOG.md b/CHANGELOG.md index b614f7c95..aadf07749 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,218 @@ # skuba +## 15.0.0 + +### Major Changes + +- **build-package:** Migrate to tsdown ([#2194](https://github.com/seek-oss/skuba/pull/2194)) + + As part of our [migration to ESM](https://seek-oss.github.io/skuba/docs/deep-dives/esm.html), we are updating our package build process to support generating both CJS and ESM outputs, regardless of whether projects use CJS or ESM. Since our current tsc-based build does not support this, we are switching to [tsdown](https://tsdown.dev/) for package builds. + +- **lint:** Enable [`allowBuilds`](https://pnpm.io/settings#allowbuilds), [`trustPolicy`](https://pnpm.io/settings#trustpolicy), [`blockExoticSubdeps`](https://pnpm.io/settings#blockexoticsubdeps) and [`ignorePatchFailures`](https://pnpm.io/cli/patch#ignorepatchfailures) in `pnpm-plugin-skuba` ([#2188](https://github.com/seek-oss/skuba/pull/2188)) + + In light of recent security vulnerabilities plaguing the JavaScript ecosystem, we are enabling some additional pnpm features to help mitigate the risk of supply chain attacks. + + We have allowlisted a set of known packages as our default but you may need to update your `pnpm-workspace.yaml` configuration to add any additional packages you use that are not included in the default allowlist. + + Example: + + ```yaml + allowBuilds: + some-package: true + some-other-package@1.0.0: true + + trustPolicyExclude: + - some-package@1.2.3 + ``` + +- **lint:** Migrate `pnpm-workspace.yaml` skuba configuration to `pnpm-plugin-skuba` ([#2188](https://github.com/seek-oss/skuba/pull/2188)) + + This change replaces the managed skuba section in `pnpm-workspace.yaml` with a [pnpm configuration plugin](https://pnpm.io/config-dependencies). + + The migration includes removing the `minimumReleaseAgeExcludeOverload` settings from `package.json` and migrating them to `pnpm-workspace.yaml` + + This simplifies the managed configuration `skuba` provides, allowing you to override and extend previously un-configurable settings such as `minimumReleaseAge` from your `pnpm-workspace.yaml` file. + + Example: + + ```yaml + minimumReleaseAge: 1440 # 1 day + minimumReleaseAgeExclude: + - some-package + ``` + +- **lint:** Migrate `skuba build-package` usage to use [tsdown](https://tsdown.dev/) for building packages ([#2194](https://github.com/seek-oss/skuba/pull/2194)) + + This patch will attempt to do a best effort migration of your `skuba build-package` usage to use [tsdown](https://tsdown.dev/) for building packages. It is highly recommended that you manually review and test the changes. This includes: + 1. Adding a `tsdown.config.mts` file to your package directories with a basic configuration + 2. Adding a `customConditions` entry to your root `tsconfig.json` file + 3. Adding `skipLibCheck` to your package `tsconfig.json` files to work around issues with type checking against `tsdown`. + 4. Updating your package `package.json` files to point to the new build outputs + 5. Migrating package.json `assets` usage to use `tsdown` `copy` configuration + 6. Removing redundant `tsconfig.build.json` files + + #### File changes + + The output between what `skuba build-package` generates before and after this change will be different, so you may need to update any references to the output files in your project. + + For example the output for a simple `src/index.ts` file produces the following outputs: + + ```diff + -lib-commonjs/index.js + -lib-es2015/index.js + -lib-types/index.d.ts + +lib/index.cjs + +lib/index.mjs + +lib/index.d.cts + +lib/index.d.mts + ``` + + This change may break consumers who directly access these output paths. + + To check if your consumers are affected, search GitHub with: `org:SEEK-Jobs content:"@seek/MY_PACKAGE/"` + + If needed, export those references from your package entry point to help consumers migrate to the new build outputs. + + Note: if you choose to remove the `unbundle: true` option from `tsdown.config.mts`, tsdown may emit bundled/chunked outputs and internal `lib/...` file paths can change between builds. Consumers should avoid importing from build output files directly, and instead import from the package entry point (or explicitly exported sub paths) + + #### Format changes + + `tsdown` selects what ECMAScript target version to build for based on the `engines.node` field in your `package.json`. + + This means that for consumers previously relying on the `lib-es2015` output may need to update their runtime to match your package's `engines.node` field. + + An example changeset you may want to include for a package: + + ````md + --- + 'my-package': major + --- + + Update npm package build outputs + + This release changes published build output paths. If you were previously importing from nested paths within the build output you will need to update imports to use the package entry point (for example, `@seek/my-package`). + + Please note that this usage is generally not recommended as it can lead to breakages when build outputs change. + + ```diff + -import type { SomeType } from '@seek/my-package/lib-types/...'; + +import type { SomeType } from '@seek/my-package'; + ``` + ```` + + #### Debugging + + ##### Additional Entrypoints + + If your package has additional entry points, for example: + + ```ts + import { SomeFunction } from '@seek/my-package/subpath'; + ``` + + You will need to add them as additional entry points in your `tsdown.config.mts` file, for example: + + ```ts + import { defineConfig } from 'tsdown/config'; + + export default defineConfig({ + entries: ['src/index.ts', 'src/subpath/index.ts'], + }); + ``` + + This must be followed by a run of `skuba build-package` which will update your `package.json` exports field. + + ##### attw (Are the types wrong?) + + If you run into the following error: + + ```bash + ❌ No resolution (node10) at @seek/my-package/subpath + ``` + + You have a couple different options to resolve this: + 1. Update your `tsdown.config.mts` and update the `attw` configuration to use a `node16` profile. This tells the attw tool to ignore the `node`/`node10` module resolution. Projects using skuba 13 or above will be compatible with this by default. + + ```diff + import { defineConfig } from 'tsdown/config'; + + export default defineConfig({ + entries: ['src/index.ts', 'src/subpath/index.ts'], + - attw: true, + + attw: { + + profile: 'node16', + + }, + }); + ``` + + 1. Create an additional `package.json` file + + For an entrypoint such as `@seek/my-package/foo`, create a folder called `foo` with an additional `package.json` file with the following content. + + ```json + { + "main": "../lib/foo/index.cjs", + "module": "../lib/foo/index.mjs", + "types": "../lib/foo/index.d.cts" + } + ``` + + and ensure that the folder is exported in your `files` array in your root `package.json` file. + + ```json + { + "files": ["lib", "foo"] + } + ``` + + ##### Jest + + If your project utilises a `main` field which points to a `.ts` file within a monorepo setup, eg. + + ```json + "main": "src/index.ts", + ``` + + You may need to create a `moduleNameMapper` entry in your Jest config files to point to the source file, eg. + + ```json + { + "moduleNameMapper": { + "^@seek/my-package": "/packages/my-package/src/index.ts" + } + } + ``` + + This will work natively with custom conditions when we migrate to `vitest` in the future, but is required for Jest to continue working with the new build outputs. + + ```ts + import { defineConfig } from 'vitest/config'; + + export default defineConfig({ + ssr: { + resolve: { + conditions: ['@seek/my-repo/source'], + }, + }, + }); + ``` + +### Minor Changes + +- **init:** Add support for private SEEK templates ([#2198](https://github.com/seek-oss/skuba/pull/2198)) + + Adds support for downloading templates from the private SEEK-Jobs/skuba-templates repository. Users can now select "seek →" from the template list and specify a private template name, which will be downloaded using sparse checkout via SSH. + +- **template/\*-npm-package:** Migrate to `tsdown` for bundling ([#2193](https://github.com/seek-oss/skuba/pull/2193)) + +- **lint:** Ignore `coverage`, `dist`, `lib` and `tmp` folders at any depth ([#2256](https://github.com/seek-oss/skuba/pull/2256)) + +### Patch Changes + +- **deps:** @ast-grep/napi ^0.41.0 ([#2245](https://github.com/seek-oss/skuba/pull/2245)) + +- **template/lambda-sqs-worker-cdk:** Update Datadog secret configuration to support custom KMS keys ([#2239](https://github.com/seek-oss/skuba/pull/2239)) + ## 14.1.1 ### Patch Changes diff --git a/package.json b/package.json index bfd5ab689..f503be8a3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "skuba", - "version": "14.1.1", + "version": "15.0.0", "private": false, "description": "SEEK development toolkit for backend applications and packages", "homepage": "https://github.com/seek-oss/skuba#readme", diff --git a/packages/eslint-config-skuba/CHANGELOG.md b/packages/eslint-config-skuba/CHANGELOG.md index 65a393eb6..d2f80bcc3 100644 --- a/packages/eslint-config-skuba/CHANGELOG.md +++ b/packages/eslint-config-skuba/CHANGELOG.md @@ -1,5 +1,11 @@ # eslint-config-skuba +## 8.1.0 + +### Minor Changes + +- **lint:** Ignore `coverage`, `dist`, `lib` and `tmp` folders at any depth ([#2256](https://github.com/seek-oss/skuba/pull/2256)) + ## 8.0.0 ### Major Changes diff --git a/packages/eslint-config-skuba/package.json b/packages/eslint-config-skuba/package.json index 95aa91314..bed6f886f 100644 --- a/packages/eslint-config-skuba/package.json +++ b/packages/eslint-config-skuba/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-skuba", - "version": "8.0.0", + "version": "8.1.0", "private": false, "description": "ESLint config for skuba", "homepage": "https://github.com/seek-oss/skuba/tree/main/packages/eslint-config-skuba#readme", diff --git a/packages/eslint-plugin-skuba/CHANGELOG.md b/packages/eslint-plugin-skuba/CHANGELOG.md index 9099f6f6e..875062a17 100644 --- a/packages/eslint-plugin-skuba/CHANGELOG.md +++ b/packages/eslint-plugin-skuba/CHANGELOG.md @@ -1,5 +1,11 @@ # eslint-plugin-skuba +## 2.0.1 + +### Patch Changes + +- **build:** Export type declarations ([#2194](https://github.com/seek-oss/skuba/pull/2194)) + ## 2.0.0 ### Major Changes diff --git a/packages/eslint-plugin-skuba/package.json b/packages/eslint-plugin-skuba/package.json index 4ecfc84a1..724d91aa6 100644 --- a/packages/eslint-plugin-skuba/package.json +++ b/packages/eslint-plugin-skuba/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-skuba", - "version": "2.0.0", + "version": "2.0.1", "private": false, "description": "ESLint plugin for skuba", "homepage": "https://github.com/seek-oss/skuba/tree/main/packages/eslint-plugin-skuba#readme", @@ -69,6 +69,6 @@ "entryPoint": "src/index.ts", "template": "oss-npm-package", "type": "package", - "version": "14.1.1" + "version": "15.0.0" } } diff --git a/packages/eslint-plugin-skuba/tsconfig.json b/packages/eslint-plugin-skuba/tsconfig.json index 3556e4abd..d5608b9ad 100644 --- a/packages/eslint-plugin-skuba/tsconfig.json +++ b/packages/eslint-plugin-skuba/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "customConditions": ["@seek/skuba/source"], "rootDir": ".", "declaration": true, "lib": ["ES2023"], diff --git a/packages/pnpm-plugin-skuba/CHANGELOG.md b/packages/pnpm-plugin-skuba/CHANGELOG.md new file mode 100644 index 000000000..ae43ced2d --- /dev/null +++ b/packages/pnpm-plugin-skuba/CHANGELOG.md @@ -0,0 +1,7 @@ +# pnpm-plugin-skuba + +## 2.0.0 + +### Major Changes + +- Release stable version ([#2188](https://github.com/seek-oss/skuba/pull/2188)) diff --git a/packages/pnpm-plugin-skuba/package.json b/packages/pnpm-plugin-skuba/package.json index 30105a9a3..8393ef7b2 100644 --- a/packages/pnpm-plugin-skuba/package.json +++ b/packages/pnpm-plugin-skuba/package.json @@ -1,6 +1,6 @@ { "name": "pnpm-plugin-skuba", - "version": "1.0.0", + "version": "2.0.0", "private": false, "description": "Pnpm plugin for skuba", "homepage": "https://github.com/seek-oss/skuba/tree/main/packages/pnpm-plugin-skuba#readme", diff --git a/packages/skuba-dive/package.json b/packages/skuba-dive/package.json index af949d5ba..559dbff76 100644 --- a/packages/skuba-dive/package.json +++ b/packages/skuba-dive/package.json @@ -14,13 +14,22 @@ }, "license": "MIT", "sideEffects": false, - "main": "./lib/index.js", - "module": "./lib/index.js", - "types": "./lib/index.d.ts", + "exports": { + ".": { + "@seek/skuba/source": "./src/index.ts", + "import": "./lib/index.mjs", + "require": "./lib/index.cjs" + }, + "./package.json": "./package.json" + }, + "main": "./lib/index.cjs", + "module": "./lib/index.mjs", + "types": "./lib/index.d.cts", "files": [ "lib/**/*.d.ts", "lib/**/*.js", - "lib/**/*.js.map" + "lib/**/*.js.map", + "lib" ], "scripts": { "build": "pnpm skuba build", @@ -34,10 +43,19 @@ "engines": { "node": ">=22.14.0" }, + "publishConfig": { + "exports": { + ".": { + "import": "./lib/index.mjs", + "require": "./lib/index.cjs" + }, + "./package.json": "./package.json" + } + }, "skuba": { "entryPoint": "src/index.ts", "template": "oss-npm-package", "type": "package", - "version": "14.1.1" + "version": "15.0.0" } } diff --git a/packages/skuba-dive/tsconfig.build.json b/packages/skuba-dive/tsconfig.build.json deleted file mode 100644 index 8335c9875..000000000 --- a/packages/skuba-dive/tsconfig.build.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "./tsconfig.json", - "exclude": ["**/*.test.ts"], - "include": ["src/**/*"], - "compilerOptions": { - "rootDir": "src" - } -} diff --git a/packages/skuba-dive/tsconfig.json b/packages/skuba-dive/tsconfig.json index 3339c5fb7..74a27269b 100644 --- a/packages/skuba-dive/tsconfig.json +++ b/packages/skuba-dive/tsconfig.json @@ -1,5 +1,7 @@ { "compilerOptions": { + "skipLibCheck": true, // tsdown has optional peer deps + "customConditions": ["@seek/skuba/source"], "rootDir": ".", "declaration": true, "lib": ["ES2023"], diff --git a/packages/skuba-dive/tsdown.config.mts b/packages/skuba-dive/tsdown.config.mts new file mode 100644 index 000000000..f13f42074 --- /dev/null +++ b/packages/skuba-dive/tsdown.config.mts @@ -0,0 +1,15 @@ +import { defineConfig } from 'tsdown'; + +export default defineConfig({ + entry: ['src/index.ts'], + format: ['cjs', 'esm'], + outDir: 'lib', + dts: true, + checks: { + legacyCjs: false, + }, + publint: true, + attw: true, + unbundle: true, // TODO: determine if your project can be bundled + exports: { devExports: '@seek/skuba/source' }, +}); diff --git a/packages/vitest-koa-mocks/CHANGELOG.md b/packages/vitest-koa-mocks/CHANGELOG.md index cc4112ec4..914300ac1 100644 --- a/packages/vitest-koa-mocks/CHANGELOG.md +++ b/packages/vitest-koa-mocks/CHANGELOG.md @@ -1,5 +1,11 @@ # @skuba-lib/vitest-koa-mocks +## 1.0.1 + +### Patch Changes + +- **build:** Update npm package build outputs ([#2252](https://github.com/seek-oss/skuba/pull/2252)) + ## 1.0.0 ### Major Changes diff --git a/packages/vitest-koa-mocks/package.json b/packages/vitest-koa-mocks/package.json index 191bb5628..60c499564 100644 --- a/packages/vitest-koa-mocks/package.json +++ b/packages/vitest-koa-mocks/package.json @@ -1,6 +1,6 @@ { "name": "@skuba-lib/vitest-koa-mocks", - "version": "1.0.0", + "version": "1.0.1", "private": false, "description": "Vitest mocks for Koa", "homepage": "https://github.com/seek-oss/skuba/tree/main/packages/vitest-koa-mocks#readme", @@ -62,6 +62,6 @@ "entryPoint": "src/index.ts", "template": "oss-npm-package", "type": "package", - "version": "14.1.1" + "version": "15.0.0" } } From bd5066c0b206b74e4dbb61fd186fa8407cba6d14 Mon Sep 17 00:00:00 2001 From: samchungy Date: Thu, 5 Mar 2026 13:31:35 +1100 Subject: [PATCH 2/2] update package --- packages/skuba-dive/package.json | 5 +---- .../upgrade/patches/14.1.1/patchPackageBuilds.ts | 15 +++++---------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/packages/skuba-dive/package.json b/packages/skuba-dive/package.json index 559dbff76..ee9105faa 100644 --- a/packages/skuba-dive/package.json +++ b/packages/skuba-dive/package.json @@ -26,13 +26,10 @@ "module": "./lib/index.mjs", "types": "./lib/index.d.cts", "files": [ - "lib/**/*.d.ts", - "lib/**/*.js", - "lib/**/*.js.map", "lib" ], "scripts": { - "build": "pnpm skuba build", + "build": "pnpm skuba build-package", "format": "pnpm skuba format", "lint": "pnpm skuba lint", "prepack": "pnpm skuba build", diff --git a/src/cli/lint/internalLints/upgrade/patches/14.1.1/patchPackageBuilds.ts b/src/cli/lint/internalLints/upgrade/patches/14.1.1/patchPackageBuilds.ts index 556914e9b..7a239df52 100644 --- a/src/cli/lint/internalLints/upgrade/patches/14.1.1/patchPackageBuilds.ts +++ b/src/cli/lint/internalLints/upgrade/patches/14.1.1/patchPackageBuilds.ts @@ -118,16 +118,11 @@ const editFilesField = (ast: SgNode): Edit[] => { const newFiles = existingFiles.filter( (file: string) => - ![ - 'lib-commonjs', - 'lib-es2015', - 'lib-types', - 'lib-types/**/*.d.ts', - 'lib*/**/*.d.ts', - 'lib*/**/*.js', - 'lib*/**/*.js.map', - 'lib*/**/*.json', - ].includes(file), + !( + file.startsWith('lib*') || + file.startsWith('lib/') || + file.startsWith('lib-') + ), ); newFiles.push('lib');