v11.1.0
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
.cjsinvite.config.tsandpackage.jsonexports. - Added explicit CJS type declarations (
index.d.cts) by copyingindex.d.tsforrequire()consumers. - Refactored
package.jsonexportsfield for improved compatibility with modern module resolvers. - Added
repositoryURL topackage.json. - Removed
sass,typed-scss-modules, andvite-tsconfig-pathsfrom production dependencies;sassmoved to dev dependencies. - Upgraded
typescriptto version6.0.3.
- CI/CD Workflows:
- Introduced new GitHub Actions workflows:
deploy-storybook.yml: Deploys Storybook to GitHub Pages on push tomasteror manual trigger.publish-package.yml: Publishes the package to npm (using OIDC trusted publishing) and GitHub Packages onreleasepublication.
- Removed existing GitHub Actions CodeQL workflow (
codeql.ymlandcodeql-config.yml). - Removed Vercel deployment configuration (
vercel.json).
- Introduced new GitHub Actions workflows:
- Storybook Configuration:
- Updated
.storybook/main.tsto filter outvite-plugin-dtsfrom Storybook builds for improved reliability. - Refined TypeScript
reactDocgenTypescriptOptionsto exclude Storybook-specific files from doc generation. - Removed unnecessary
Reactimport from.storybook/preview.tsx. - Removed
@ts-expect-errorfor SVG URL imports in.storybook/dibkTheme.ts.
- Updated
- Testing:
- Consolidated Vitest configuration for Storybook browser testing into a new
vitest.config.tsfile, replacingvitest.workspace.tsandvitest.shims.d.ts. - Configured Vitest to use
@storybook/addon-vitest/vitest-pluginand@vitest/browser-playwrightfor Chromium-based browser tests. - Updated
tsconfig.node.jsonandtsconfig.app.jsonto include new Vitest configuration files.
- Consolidated Vitest configuration for Storybook browser testing into a new
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
playwrightfor browser testing. - Removed external
gh-pagesdependency (replaced by GitHub Pages Action). npmupdated to latest version within the publish workflow for trusted publishing.
- New development dependency
- Breaking Changes:
- Consumers relying on the UMD build target will need to adjust.
- Changes to package
exportsand 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