Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^2.0.0->^3.0.0Release Notes
seek-oss/skuba (skuba-dive)
v3.0.0Compare Source
This major release includes patches and configuration changes to migrate TypeScript projects onto modern module patterns. It partially automates Step 2 of our transition to ECMAScript modules.
Changing the module patterns of your project may result in Jest and/or TypeScript errors that require manual triage. Refer to the below troubleshooting sections to begin with, and reach out in
#skuba-supportif you're stuck.If your project is not configured for GitHub autofixes in CI,
skuba lintwill not be able to push the patch commit.You can either set up GitHub autofixes in CI, or run
skuba formatthen commit and push locally.Major Changes
build, lint, test: Replace
srcaliases with#srcsubpath imports (#1958)This patch rewrites
srcmodule aliases dependent on CommonJS monkeypatching viaskuba-dive/register. The new, ESM-compatible#srcapproach is enabled by Node.js subpath imports and TypeScript custom conditions.The following files will be updated to support the new subpath pattern:
tsconfig*.jsonpackage.jsonjest.config*.tsserverless*.ymlDockerfile*Troubleshooting
Jest configuration
If your Jest configuration differs from the standard
skubaconfiguration, you may need to manually update yourmoduleNameMapper:Standard projects:
Monorepo projects:
TypeScript errors with
pure-parsetypesIf you encounter TypeScript errors related to
pure-parsetypes:Upgrade
@seek/loggerto version 11.2.1 or later:Custom conditions error
If you see the error:
Packages should not publish with
node16module resolution until their consumers have migrated themselves. We recommend the following workaround in the interim:Create a separate
tsconfig.base.jsonthattsconfig.jsonextends. This allows you to applycustomConditionsselectively:tsconfig.base.json:{ "extends": "skuba/config/tsconfig.json", "compilerOptions": { "baseUrl": ".", "target": "ES2024", "lib": ["ES2024"] } }tsconfig.json:{ "extends": "./tsconfig.base.json", "compilerOptions": { "customConditions": ["@​seek/YOUR_REPO/source"] } }tsconfig.build.json:{ "extends": "./tsconfig.base.json", "compilerOptions": { "outDir": "lib", "rootDir": "src" }, "include": ["src"] }build, lint: Update default module and module resolution (#1958)
Our base TypeScript configuration file in
skuba/config/tsconfig.jsonhas been updated with modern options for module output format and resolution:{ "compilerOptions": { - "module": "commonjs", - "moduleResolution": "node", + "module": "node20", + "moduleResolution": "node16", // ... } }Troubleshooting
Your project may depend on third-party packages with TypeScript types that are not strictly compatible with CommonJS. This may cause
skuba buildandskuba lintto fail type checking:To work around such errors, you can either:
Add a
// @​ts-ignorecomment above the import statement. (These can be removed once we have fully migrated to ESM).+ // @​ts-ignore - date-fns does not support Node16 module resolution, remove this when we move to ESM. import { addDays } from 'date-fns';Add
skipLibCheck: trueto yourtsconfig.jsoncompiler options.{ "compilerOptions": { + "skipLibCheck": true, // ... } }Minor Changes
lint: Update file extension detection logic (#2099)
This resolves an issue where file extensions were not being appended to imports with multiple dots in their path, such as
.vocabfiles.build: Forward custom conditions to esbuild (#2092)
Note: This only affects projects that have manually set
package.json#/skuba/buildto"esbuild". There are less than 10 of these at time of writing.When using esbuild as the bundler, any custom conditions specified in
tsconfig.jsonwill now be forwarded to esbuild via theconditionsoption.Patch Changes
Configuration
📅 Schedule: Branch creation - "after 3:00 am and before 6:00 am on Monday and Friday" in timezone Australia/Melbourne, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.