Releases: seek-oss/sku
[email protected]
Patch Changes
- Reduce config loading log noise (#1169)
[email protected]
Patch Changes
- Fix release (#1165)
[email protected]
Major Changes
-
Migrating
sku
to ESM from commonjs (#1156)BREAKING CHANGE:
Most of
sku
s 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-plugin
is now an ES module and has to be imported as such.If you are using
require()
to importsku/webpack-plugin
you 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-plugin
must also be an ES module so further changes may be required.
sku/config/eslint
is a new entrypoint that exposessku
's flat ESLint configuration. It now only supports ESM. -
Update
eslint-config-seek
to v14 (#1156)Alongside the migration to ESLint v9,
eslint-config-seek
has been updated to v14 which supports the new flat config format.Some lint rules have been changed or renamed, so consumers should run
sku format
to automatically update their code to conform to the new rules. You may still need to manually review and adjust your code after runningsku format
as 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-import
has been replaced witheslint-plugin-import-x
. You should replace any references toeslint-plugin-import
witheslint-plugin-import-x
and anyimport/
rules withimport-x/
.See the
eslint-config-seek
release notes for more information. -
Change the CLI to commander.js. (#1156)
BREAKING CHANGE
sku
now 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, --help
flag 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, --environment
option - the
-c, --config
option - the
-d, --debug
option - new: the
-h, --help
option - new: the
-v, --version
option
Scoped options
- the
build
,build-ssr
,start
, andstart-ssr
commands have the following options-s, --stats
option
- the
serve
command now has the following options--port
option--site
option
- the
translation compile
command now has the following options-w, --watch
option
- the
translation push
command now has the following option--delete-unused-keys
option
- the
init
command now has the following options-p, --package-manager
option. This has changed from--packageManager
preferringkebab-case
overcamelCase
for option flags.--verbose
option
- 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 viadangerouslySetESLintConfig
to 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
.eslintignore
file is no longer used by ESLint. Instead, ignore patterns are now configured directly in your ESLint config file. Sincesku
controls your ESLint config, you can configure any custom ignore patterns in your sku config via the neweslintIgnore
option.For example:
import type { SkuConfig } from 'sku'; export default { eslintIgnore: ['a-large-file.js', '**/generated/'], } satisfies SkuConfig;
[!TIP]
Upon installation,sku
will automatically try to migrate any custom entries in your.eslintignore
to the neweslintIgnore
configuration.
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 viaeslintIgnore
anddangerouslySetESLintConfig
respectively will no longer be reflected directly in youreslint.config.js
file.
Thesku/config/eslint
entrypoint 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/eslint
entrypoint (#1156)This entrypoint is used by sku to configure ESLint. Most consumers will not need to use this entrypoint directly.
-
Add support for
.mjs
sku configuration files (#1156)In addition to
sku.config.ts
andsku.config.js
, sku will now also look for asku.config.mjs
file when attempting to resolve your application's configuration file. -
Update
prettier
from^2.8.8
to^3.4.1
Prettier 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)
[email protected]
Patch Changes
-
sku init
: Add apnpm.onlyBuiltDependencies
field to thepackage.json
file ifpnpm
v10 is detected (#1160)As of
pnpm
v10, dependency lifecycle scripts are no longer run by default. Instead, explicit permission must be given on a per-dependency basis.New
sku
projects will have this field added automatically ifpnpm
v10 is detected in order to ensuresku
and its dependencies can run necessary lifecycle scripts after installation.
[email protected]
Minor Changes
-
Add WebP and AVIF image format support to sku (#1119)
Support for
webp
andavif
image formats has been added. Note that browser support for these formats may vary. To ensure compatibility across browsers, consumers are advised to use the<picture>
element with fallback formats.
Patch Changes
-
Fixes a bug that caused React 19 applications to fail during
sku build
(#1143)Note: remaining on React 18 is recommended until
sku
officially supports React 19. Updating your application to React 19 may require overriding dependency versions by configuring your package manager. Additionally, there may be other incompatibilities that haven't been found yet.
[email protected]
Minor Changes
-
Update TypeScript to 5.6 (#1048)
This release includes breaking changes. See the TypeScript 5.6 announcement for more information.
-
Update and pin
browserslist-config-seek
to version3.2.0
(#1078)sku
applications and libraries now default to supporting the following browser versions:Browser Oldest supported version Chrome 84 Edge 84 Safari 14.1 Firefox 86 Samsung Internet 14
Patch Changes
-
Set
esbuild-register
target tonode18.20
(#1076) -
sku translations
: Throw an error whenlanguages
has not been configured (#1090)Previously, if
languages
was not configured, thesku translations
command would log a message and continue to run the command, which would eventually error due to the lack of a vocab config (generated from thelanguages
config).
We now throw an error sooner to make it clear that thelanguages
configuration is required to run anysku translations
commands. -
sku translations
: Suggest using thevocab
CLI whenlanguages
is not configured and a vocab config file is detected (#1090) -
sku translations
: Improve log messages and align timing of log messages with actual command execution (#1075) -
sku pre-commit
: Updatelint-staged
dependency to^15.2.10
(#1084) -
Update
env-ci
dependency to^11.1.0
(#1082) -
sku translations
: Whenlanguages
is configured in sku config and a vocab config file is found, a warning will be shown telling the user that the vocab config file will be ignored (#1090)
[email protected]
Patch Changes
-
Improve error handling and messaging when opening the user's browser during the
start
,start-ssr
andserve
scripts (#1069)This fixes a macOS error where
sku
would crash when failing to detect the user's default browser.
Instead, the user will be shown a warning message with instructions to enable the system permission required to fix the issue.
[email protected]
Minor Changes
-
Add experimental
renderToStringAsync
parameter inrenderApp
(#1050)The new
renderToStringAsync
method can be called instead of React DOM'srenderToString
. It is an asynchronous function, but once awaited should return the same result.This new function won't error when hitting suspended components during a static render, instead it'll wait for all suspended boundaries to resolve.
Note:
react-dom
is now an optional peer dependency for use in this function. All known uses of static rendering usereact-dom
and shouldn't need to make a change.The function is being provided to enable teams to trial the behaviour, but is not encouraged for production use.
-import { renderToString } from 'react-dom/server'; const skuRender: Render<RenderContext> = { - renderApp: ({ SkuProvider, environment }) => { + renderApp: async ({ SkuProvider, environment, renderToStringAsync }) => { - const appHtml = renderToString( + const appHtml = await renderToStringAsync( <SkuProvider> <App environment={environment as ClientContext['environment']} /> </SkuProvider>, ); return { appHtml, }; }, // ... };
This new feature is experimental, and is likely to change in implementation or may be removed completely.
Patch Changes
-
Disable
babel-loader
cache compression (#1060)sku
applications tend to transpile many modules and upload all cache files as a single compressed file. This makes compressing each individual cache file superfluous, so this feature has been disabled. -
Adds "Chrome" and "Edge" as fallback browser names for reusing existing tabs, improving compatibility with different Chromium browser versions which may use abbreviated browser names. (#1061)