Skip to content

v11.1.0

Choose a tag to compare

@benjamindehli benjamindehli released this 05 Jun 14:58
· 20 commits to master since this release

Overhaul of build, testing, and deployment workflows for the project and Storybook.

This extensive set of changes introduces GitHub Actions for package publishing to npm and GitHub Packages, and for deploying Storybook to GitHub Pages. It also refines the library's module exports and type declarations, removes the CodeQL workflow and Vercel deployment, and consolidates Vitest Storybook browser testing.

Changes

  • Build & Packaging:
    • Removed Universal Module Definition (UMD) build target from Vite configuration.
    • Adjusted CommonJS (CJS) bundle extension to .cjs in vite.config.ts and package.json exports.
    • Added explicit CJS type declarations (index.d.cts) by copying index.d.ts for require() consumers.
    • Refactored package.json exports field for improved compatibility with modern module resolvers.
    • Added repository URL to package.json.
    • Removed sass, typed-scss-modules, and vite-tsconfig-paths from production dependencies; sass moved to dev dependencies.
    • Upgraded typescript to version 6.0.3.
  • CI/CD Workflows:
    • Introduced new GitHub Actions workflows:
      • deploy-storybook.yml: Deploys Storybook to GitHub Pages on push to master or manual trigger.
      • publish-package.yml: Publishes the package to npm (using OIDC trusted publishing) and GitHub Packages on release publication.
    • Removed existing GitHub Actions CodeQL workflow (codeql.yml and codeql-config.yml).
    • Removed Vercel deployment configuration (vercel.json).
  • Storybook Configuration:
    • Updated .storybook/main.ts to filter out vite-plugin-dts from Storybook builds for improved reliability.
    • Refined TypeScript reactDocgenTypescriptOptions to exclude Storybook-specific files from doc generation.
    • Removed unnecessary React import from .storybook/preview.tsx.
    • Removed @ts-expect-error for SVG URL imports in .storybook/dibkTheme.ts.
  • Testing:
    • Consolidated Vitest configuration for Storybook browser testing into a new vitest.config.ts file, replacing vitest.workspace.ts and vitest.shims.d.ts.
    • Configured Vitest to use @storybook/addon-vitest/vitest-plugin and @vitest/browser-playwright for Chromium-based browser tests.
    • Updated tsconfig.node.json and tsconfig.app.json to include new Vitest configuration files.

Impact

  • Behavioral Changes:
    • The library will no longer provide a UMD build, affecting consumers who specifically relied on that format.
    • Package publishing and Storybook deployment are now automated via GitHub Actions, replacing previous manual or Vercel-based processes.
    • The project no longer performs automated static analysis using CodeQL.
    • Storybook builds are more robust by explicitly excluding incompatible plugins.
  • Dependencies Affected:
    • New development dependency playwright for browser testing.
    • Removed external gh-pages dependency (replaced by GitHub Pages Action).
    • npm updated to latest version within the publish workflow for trusted publishing.
  • Breaking Changes:
    • Consumers relying on the UMD build target will need to adjust.
    • Changes to package exports and file extensions (.cjs, .d.cts) might require adjustments in specific build tools or older module resolvers that do not fully support modern Node.js module resolution.
  • Performance Implications:
    • Build times for the library might be slightly reduced due to the removal of the UMD format.
    • CI/CD pipelines are completely re-architected, potentially leading to faster or more reliable deployments/publications depending on previous setup.

Full Changelog: v11.0.1...v11.1.0