chore(style-types): migrate to per-package dist/ build pipeline#963
chore(style-types): migrate to per-package dist/ build pipeline#963layershifter wants to merge 2 commits into
Conversation
First slice of the larger workspaces + project-references migration. This one only touches private packages — the published @griffel/* packages keep their path aliases in tsconfig.base.json untouched. - e2e/eslint, e2e/typescript: add @griffel/e2e-utils as devDependency (workspace:*). Both already import from @griffel/e2e-utils; the resolution was implicit via the path alias. - e2e/rspack: tighten the existing "*" e2e-utils dep to workspace:* for consistency. - Drop @griffel/e2e-utils and @griffel/update-shorthands aliases from tsconfig.base.json — no consumer needs them now that the deps are declared explicitly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Second slice of the workspaces migration. Now picks up the smallest leaf package and replaces the workspace-rooted @nx/js:tsc build with per-package tsc + asset copy. - Build output: packages/style-types/dist/ (was dist/packages/style-types). - New tools/copy-pkg-assets.mjs copies package.json (stripped of scripts + devDependencies), README, and LICENSE into the per-package dist/. - package.json gets a published-style exports map: @griffel/source (no-op today but forward-compat with the customConditions in later phases), types pointing at src/index.ts so consumers can resolve types without first building, default at dist/index.js for runtime, and a files: ["dist/", README, LICENSE, CHANGELOG] field. - Drop @griffel/style-types from tsconfig.base.json paths — consumers now resolve via the yarn workspace symlink + the package.json above. - .gitignore: drop the leading slash from "dist" so per-package dist/ directories are also ignored. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
📊 Bundle size report✅ No changes found |
Code reviewFound 1 issue:
griffel/packages/style-types/package.json Lines 10 to 27 in 4314a61 Fix options: point Other things considered but not flagged: the dead 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
|
Slicing the migration into phases doesn't pan out — closing in favor of the single migration in #774. |
Summary
Phase 2 of the workspaces + project-references migration (stacks on top of #962). Picks the smallest leaf package and replaces the workspace-rooted
@nx/js:tscbuild with a per-packagetsc+ asset-copy pipeline.packages/style-types/dist/(wasdist/packages/style-types).tools/copy-pkg-assets.mjscopiespackage.json(stripped ofscripts+devDependencies),README.md, andLICENSE.mdinto the per-packagedist/.package.jsongets a published-styleexportsmap:@griffel/source(no-op today, forward-compat with thecustomConditionsin later phases),typespointing atsrc/index.tsso consumers can resolve types without first building,defaultatdist/index.jsfor runtime, and afiles: ["dist/", README, LICENSE, CHANGELOG]field.@griffel/style-typesfromtsconfig.base.jsonpaths — consumers resolve via the yarn workspace symlink + the package.json above..gitignore: drop the leading slash fromdistso per-packagedist/directories are also ignored.Test plan
yarn nx run-many --target=type-check --all— 20/20 passyarn nx run-many --target=build --all— 15/15 passyarn nx run-many --target=test --all— 16/16 pass (excluding the pre-existing e2e/rspack flake)yarn check-dependencies— cleanStack
This PR builds on #962 — the diff above #962 is the style-types-only delta. Don't merge until #962 lands.
🤖 Generated with Claude Code