sku@14.0.0
Major Changes
-
Migrating
skuto ESM from commonjs (#1156)BREAKING CHANGE:
Most of
skus API entrypoints are now ESM. Consumers that use the following API entrypoints may need to convert some of their configuration files to ESM:
sku/webpack-pluginis now an ES module and has to be imported as such.If you are using
require()to importsku/webpack-pluginyou will have to change it toimport.- const SkuWebpackPlugin = require('sku/webpack-plugin'); + import SkuWebpackPlugin from 'sku/webpack-plugin';
[!NOTE]
The file that is importingsku/webpack-pluginmust also be an ES module so further changes may be required.
sku/config/eslintis a new entrypoint that exposessku's flat ESLint configuration. It now only supports ESM. -
Update
eslint-config-seekto v14 (#1156)Alongside the migration to ESLint v9,
eslint-config-seekhas been updated to v14 which supports the new flat config format.Some lint rules have been changed or renamed, so consumers should run
sku formatto automatically update their code to conform to the new rules. You may still need to manually review and adjust your code after runningsku formatas not all issues are auto-fixable.[!NOTE]
You may need to migrate your ESLint configuration before runningsku format.
Please read the release notes for more information on how to migrate your ESLint configuration.Additionally,
eslint-plugin-importhas been replaced witheslint-plugin-import-x. You should replace any references toeslint-plugin-importwitheslint-plugin-import-xand anyimport/rules withimport-x/.See the
eslint-config-seekrelease notes for more information. -
Change the CLI to commander.js. (#1156)
BREAKING CHANGE
skunow uses commander.js for its CLI. The CLI options and commands are now more narrowly defined and scoped. Some combinations of options that were previously possible may no longer work.The new
-h, --helpflag now shows the help output generated by commander.js and shows the available commands and options.The following option flags are now available in their respective scope
Global options
- the
-e, --environmentoption - the
-c, --configoption - the
-d, --debugoption - new: the
-h, --helpoption - new: the
-v, --versionoption
Scoped options
- the
build,build-ssr,start, andstart-ssrcommands have the following options-s, --statsoption
- the
servecommand now has the following options--portoption--siteoption
- the
translation compilecommand now has the following options-w, --watchoption
- the
translation pushcommand now has the following option--delete-unused-keysoption
- the
initcommand now has the following options-p, --package-manageroption. This has changed from--packageManagerpreferringkebab-caseovercamelCasefor option flags.--verboseoption
- the
-
Update to ESLint v9 (#1156)
ESLint v9 defaults to the new flat config format. As such,
sku's ESLint config has been migrated to this new format, and consumers will need to migrate any custom overrides set viadangerouslySetESLintConfigto the new format as well.For example, if you are overriding an ESLint rule, you can migrate to the new config format like so:
dangerouslySetESLintConfig: (config) => { - return { - ...config, - rules: { - ...config.rules, - 'no-console': 'off' - } - }; + return [ + ...config, + { + rules: { + 'no-console': 'off' + } + } + ]; }More complicated overrides such as the use of plugins or modification of parser options may require a more involved migration. Please refer to the migration guide for more information.
Additionally, the
.eslintignorefile is no longer used by ESLint. Instead, ignore patterns are now configured directly in your ESLint config file. Sinceskucontrols your ESLint config, you can configure any custom ignore patterns in your sku config via the neweslintIgnoreoption.For example:
import type { SkuConfig } from 'sku'; export default { eslintIgnore: ['a-large-file.js', '**/generated/'], } satisfies SkuConfig;
[!TIP]
Upon installation,skuwill automatically try to migrate any custom entries in your.eslintignoreto the neweslintIgnoreconfiguration.
This migration must be done locally, it will not be committed to your repository from CI.
If this migration fails, you will need to manually migrate any custom ignore entries.[!IMPORTANT]
Changes to ignore patterns or other ESLint configuration viaeslintIgnoreanddangerouslySetESLintConfigrespectively will no longer be reflected directly in youreslint.config.jsfile.
Thesku/config/eslintentrypoint handles the composition of these configurations.
The best way to visualize your final ESLint configuration is use the official ESLint config inspector. -
Drop support for Node.js versions below 20.18.2 (#1156)
BREAKING CHANGE:
The minimum supported Node.js version is now 20.18.2. Consumers must upgrade to Node.js v20.18.2 or later.
-
Drop support for React 17.x (#1156)
BREAKING CHANGE
React 17 is no longer supported. Consumers will need to upgrade to React 18. Consumers still on v17 should follow the How to Upgrade to React 18 guide. Additionally, ensure any dependencies that rely on React are compatible with React 18.
Minor Changes
-
Expose
sku's ESLint config undersku/config/eslintentrypoint (#1156)This entrypoint is used by sku to configure ESLint. Most consumers will not need to use this entrypoint directly.
-
Add support for
.mjssku configuration files (#1156)In addition to
sku.config.tsandsku.config.js, sku will now also look for asku.config.mjsfile when attempting to resolve your application's configuration file. -
Update
prettierfrom^2.8.8to^3.4.1Prettier V3 brings various code formatting changes than can be automatically fixed by running
sku format.
Patch Changes
sku init: Ensure latest React 18 version is installed in new projects as React 19 is not yet supported (#1156)