Skip to content

Releases: seek-oss/sku

[email protected]

07 Feb 01:01
c3d21eb
Compare
Choose a tag to compare

Patch Changes

  • Reduce config loading log noise (#1169)

[email protected]

06 Feb 22:48
b4e8c67
Compare
Choose a tag to compare

Patch Changes

[email protected]

06 Feb 04:36
58d7435
Compare
Choose a tag to compare

Major Changes

  • Migrating sku to 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-plugin is now an ES module and has to be imported as such.

    If you are using require() to import sku/webpack-plugin you will have to change it to import.

    - const SkuWebpackPlugin = require('sku/webpack-plugin');
    + import SkuWebpackPlugin from 'sku/webpack-plugin';

    [!NOTE]
    The file that is importing sku/webpack-plugin must also be an ES module so further changes may be required.


    sku/config/eslint is a new entrypoint that exposes sku'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 running sku format as not all issues are auto-fixable.

    [!NOTE]
    You may need to migrate your ESLint configuration before running sku format.
    Please read the release notes for more information on how to migrate your ESLint configuration.

    Additionally, eslint-plugin-import has been replaced with eslint-plugin-import-x. You should replace any references to eslint-plugin-import with eslint-plugin-import-x and any import/ rules with import-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, and start-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 preferring kebab-case over camelCase for option flags.
      • --verbose option
  • 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 via dangerouslySetESLintConfig 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. Since sku controls your ESLint config, you can configure any custom ignore patterns in your sku config via the new eslintIgnore 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 new eslintIgnore 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 via eslintIgnore and dangerouslySetESLintConfig respectively will no longer be reflected directly in your eslint.config.js file.
    The sku/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 under sku/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 and sku.config.js, sku will now also look for a sku.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]

06 Feb 04:08
6d10b31
Compare
Choose a tag to compare

Patch Changes

  • sku init: Add a pnpm.onlyBuiltDependencies field to the package.json file if pnpm 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 if pnpm v10 is detected in order to ensure sku and its dependencies can run necessary lifecycle scripts after installation.

[email protected]

17 Jan 01:03
d503589
Compare
Choose a tag to compare

Minor Changes

  • Add WebP and AVIF image format support to sku (#1119)

    Support for webp and avif 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]

21 Nov 00:33
d0a3b10
Compare
Choose a tag to compare

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 version 3.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 to node18.20 (#1076)

  • sku translations: Throw an error when languages has not been configured (#1090)

    Previously, if languages was not configured, the sku 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 the languages config).
    We now throw an error sooner to make it clear that the languages configuration is required to run any sku translations commands.

  • sku translations: Suggest using the vocab CLI when languages 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: Update lint-staged dependency to ^15.2.10 (#1084)

  • Update env-ci dependency to ^11.1.0 (#1082)

  • sku translations: When languages 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]

27 Oct 23:13
26878cd
Compare
Choose a tag to compare

Patch Changes

  • Improve error handling and messaging when opening the user's browser during the start, start-ssr and serve 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]

03 Oct 01:34
39da8a5
Compare
Choose a tag to compare

Minor Changes

  • Add experimental renderToStringAsync parameter in renderApp (#1050)

    The new renderToStringAsync method can be called instead of React DOM's renderToString. 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 use react-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)

[email protected]

16 Sep 07:41
d4b0246
Compare
Choose a tag to compare

Patch Changes

  • Reverts #1039 (#1053)

    This change was causing a dependency to be cloned via git which may not be available in all CI envrionments.

[email protected]

16 Sep 01:20
6c2049b
Compare
Choose a tag to compare

Patch Changes

  • Replace ejs dependency with eta (#1044)

  • Update didyoumean2 dependency to fix issue when running npx sku init (#1051)