Releases: seek-oss/skuba
skuba@15.3.0
Minor Changes
-
deps: Require Node.js 22.18.0+ (#2261)
This change should only impact projects using
skuba build-package -
lint: Migrate tsdown configs to support 0.21 (#2261)
This patch attempts to migrate the
external,noExternal,inlineOnlyandskipNodeModulesBundlefields to their new equivalents and setsfailOnWarntotrue.Read the tsdown release notes for more information.
Patch Changes
skuba@15.2.0
Minor Changes
-
build: Add experimental rolldown build support (#2275)
skuba now supports rolldown as a build mode. You can opt in by setting
"build": "rolldown"in yourskubaconfig inpackage.json, which will invoke rolldown using a config file:{ "skuba": { - "build": "esbuild", + "build": "rolldown", "template": "koa-rest-api", "type": "application" } }See the rolldown documentation for details on configuring rolldown via a config file.
Example config file (
rolldown.config.mjs):import { defineConfig } from 'rolldown'; export default defineConfig({ input: 'src/listen.ts', platform: 'node', external: [/^dd-trace/], resolve: { conditionNames: ['@seek/my-repo/source'], }, output: { format: 'esm', sourcemap: true, }, });
Patch Changes
-
lint: Disable
trustPolicyandstrictDepBuilds(#2276)Due to issues with how
pnpmparses thetrustPolicyandstrictDepBuildsoptions, we are disabling them temporarilyThese will be re-enabled in a future release once the underlying issues have been resolved.
pnpm-plugin-skuba@2.1.1
Patch Changes
-
lint: Disable
trustPolicyandstrictDepBuilds(#2276)Due to issues with how
pnpmparses thetrustPolicyandstrictDepBuildsoptions, we are disabling them temporarilyThese will be re-enabled in a future release once the underlying issues have been resolved.
skuba@15.1.0
Minor Changes
-
lint: Restore managed
pnpm-workspace.yamlsections (#2265)This patch restores sections of
pnpm-workspace.yamlthat were removed in the previous release because Renovate is not fully compatible with pnpm config dependencies.These new managed sections should allow for greater flexibility than the previous configurations. Please reach out if you run into any issues.
Patch Changes
- deps: ejs ^5.0.0 (#2270)
pnpm-plugin-skuba@2.1.0
Minor Changes
- Allow @ast-grep/lang-yaml build (#2265)
skuba@15.0.1
Patch Changes
- init: Fix pnpm config dependency installation (#2258)
skuba@15.0.0
Major Changes
-
build-package: Migrate to tsdown (#2194)
As part of our migration to ESM, 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 for package builds.
-
lint: Enable
allowBuilds,blockExoticSubdeps,ignorePatchFailuresandtrustPolicyinpnpm-plugin-skuba(#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.yamlconfiguration to add any additional packages you use that are not included in the default allowlist.Example:
allowBuilds: some-package: true some-other-package@1.0.0: true trustPolicyExclude: - some-package@1.2.3
If you notice Renovate's failing with ERR_PNPM_TRUST_DOWNGRADE High-risk trust downgrade for "some-package@1.0.0" (possible package takeover), you can debug this locally with
pnpm dedupe -
lint: Migrate
pnpm-workspace.yamlskuba configuration topnpm-plugin-skuba(#2188)This change replaces the managed skuba section in
pnpm-workspace.yamlwith a pnpm configuration plugin.The migration includes removing the
minimumReleaseAgeExcludeOverloadsettings frompackage.jsonand migrating them topnpm-workspace.yamlThis simplifies the managed configuration
skubaprovides, allowing you to override and extend previously un-configurable settings such asminimumReleaseAgefrom yourpnpm-workspace.yamlfile.Example:
minimumReleaseAge: 1440 # 1 day minimumReleaseAgeExclude: - some-package
-
lint: Migrate
skuba build-packageusage to use tsdown for building packages (#2194)This patch will attempt to do a best effort migration of your
skuba build-packageusage to use tsdown for building packages. It is highly recommended that you manually review and test the changes. This includes:- Adding a
tsdown.config.mtsfile to your package directories with a basic configuration - Adding a
customConditionsentry to your roottsconfig.jsonfile - Adding
skipLibCheckto your packagetsconfig.jsonfiles to work around issues with type checking againsttsdown. - Updating your package
package.jsonfiles to point to the new build outputs - Migrating package.json
assetsusage to usetsdowncopyconfiguration - Removing redundant
tsconfig.build.jsonfiles
File changes
The output between what
skuba build-packagegenerates 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.tsfile produces the following outputs:-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: trueoption fromtsdown.config.mts, tsdown may emit bundled/chunked outputs and internallib/...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
tsdownselects what ECMAScript target version to build for based on theengines.nodefield in yourpackage.json.This means that for consumers previously relying on the
lib-es2015output may need to update their runtime to match your package'sengines.nodefield.An example changeset you may want to include for a package:
--- '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:
import { SomeFunction } from '@seek/my-package/subpath';
You will need to add them as additional entry points in your
tsdown.config.mtsfile, for example: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-packagewhich will update yourpackage.jsonexports field.attw (Are the types wrong?)
If you run into the following error:
❌ No resolution (node10) at @seek/my-package/subpath
You have a couple different options to resolve this:
-
Update your
tsdown.config.mtsand update theattwconfiguration to use anode16profile. This tells the attw tool to ignore thenode/node10module resolution. Projects using skuba 13 or above will be compatible with this by default.import { defineConfig } from 'tsdown/config'; export default defineConfig({ entries: ['src/index.ts', 'src/subpath/index.ts'], - attw: true, + attw: { + profile: 'node16', + }, }); -
Create an additional
package.jsonfileFor an entrypoint such as
@seek/my-package/foo, create a folder calledfoowith an additionalpackage.jsonfile with the following content.{ "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
filesarray in your rootpackage.jsonfile.{ "files": ["lib", "foo"] }
Jest
If your project utilises a
mainfield which points to a.tsfile within a monorepo setup, eg."main": "src/index.ts",
You may need to create a
moduleNameMapperentry in your Jest config files to point to the source file, eg.{ "moduleNameMapper": { "^@seek/my-package": "<rootDir>/packages/my-package/src/index.ts" } }This will work natively with custom conditions when we migrate to
vitestin the future, but is required for Jest to continue working with the new build outputs.import { defineConfig } from 'vitest/config'; export default defineConfig({ ssr: { resolve: { conditions: ['@seek/my-repo/source'], }, }, });
- Adding a
Minor Changes
-
init: Add support for private SEEK templates (#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
tsdownfor bundling (#2193) -
lint: Ignore
coverage,dist,libandtmpfolders at any depth (#2256)
Patch Changes
pnpm-plugin-skuba@2.0.0
Major Changes
- Release stable version (#2188)
eslint-plugin-skuba@2.0.1
Patch Changes
- build: Export type declarations (#2194)
eslint-config-skuba@8.1.0
Minor Changes
- lint: Ignore
coverage,dist,libandtmpfolders at any depth (#2256)