chore: migrate from TS path aliases to workspaces + project references#774
Draft
layershifter wants to merge 23 commits intomicrosoft:mainfrom
Draft
chore: migrate from TS path aliases to workspaces + project references#774layershifter wants to merge 23 commits intomicrosoft:mainfrom
layershifter wants to merge 23 commits intomicrosoft:mainfrom
Conversation
0e4468d to
953c290
Compare
📊 Bundle size report✅ No changes found |
6c3e83b to
9bd737f
Compare
4 tasks
- Remove module/moduleResolution overrides (inherit bundler from base) - Change outDir to local ./out-tsc/spec - Add project references to tsconfig.lib.json - Widen __fixtures__ include patterns Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Enable Yarn workspaces in root package.json - Add exports field with @griffel/source condition to all packages - Add top-level types field pointing to source for moduleResolution node compat - Create package.json for e2e/ and tools/ projects Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace 36 TypeScript path aliases in tsconfig.base.json with Yarn workspaces and TypeScript project references for proper module resolution. Key changes: - Enable Yarn workspaces for packages/*, apps/*, e2e/*, tools/* - Add package exports with @griffel/source custom condition for source resolution - Switch moduleResolution to "bundler" with customConditions: ["@griffel/source"] - Enable composite builds and add cross-project references - Register @nx/js/typescript plugin for inferred type-check targets - Remove all custom type-check targets from project.json files - Standardize tsconfig extends patterns and remove redundant options - Add workspace:* dependencies for internal @griffel/* packages - Fix Vitest SSR environment resolve conditions for Vite 7 - Fix devtools webpack build (disable ForkTsCheckerWebpackPlugin) - Add tag-processor CJS build config for wyw-in-js runtime evaluation - Update e2e paths and ts-node config for new output structure - Exclude out-tsc from ESLint and add bundle-size to lint overrides Type-check (22), build (13), test (17 non-e2e), lint (17) all pass. E2e tests need follow-up for npm pack compatibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Restore noEmit, fix outDir path, remove leftover strict options (now inherited from base). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Nx infers the build target from rollup.config.cjs, matching how core already works. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Same pattern as core and react — Nx infers the build target from the rollup config file. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The package has a tsc build step (inferred by Nx). The exports map should point to dist/index.js and dist/index.d.ts, not source .ts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…nge files Webpack resolves @griffel/* via package.json exports now. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The patch redirected publish to dist/<pkg> which no longer applies. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…-syntax Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add rollup.config.cjs to style-types (consistent with core/react/shadow-dom) - Update style-types exports to use index.esm.js/index.cjs.js pattern - Fix packLocalPackage to copy package.json into dist with rewritten paths Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…nfig - Update exports for 7 packages (babel-preset, postcss-syntax, jest-serializer, webpack-loader, webpack-extraction-plugin, next-extraction-plugin, eslint-plugin) to point to ./dist/ files, enabling @nx/js/typescript build target inference - Add cleanDeclarations rollup plugin to remove .d.ts files and .tsbuildinfo generated by rollup's TypeScript plugin, preventing conflicts with tsc --build - Remove duplicate compilerOptions entries in tsconfig.base.json (from merge) - Simplify packLocalPackage to pack from package root directory Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add "files": ["dist/"] to all publishable packages for correct npm pack - Fix top-level "types" fields to point to dist instead of source - Add module: "node16" + moduleResolution: "node16" in tsconfig.lib.json for CJS-only packages (babel-preset, webpack-loader, webpack-extraction-plugin, next-extraction-plugin, tag-processor, postcss-syntax, jest-serializer, eslint-plugin) - Fix virtual-loader to require from dist instead of src Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9bd737f to
e92975d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tsconfig.base.jsonwith Yarn workspaces + TypeScript project referencesmoduleResolutionto"bundler"withcustomConditions: ["@griffel/source"]for source-level resolutioncompositebuilds with cross-projectreferencesin tsconfig files@nx/js/typescriptplugin to infertype-checktargets automaticallyextends,rootDir, remove redundant options)workspace:*dependencies for internal@griffel/*packagestag-processor/tsconfig.build.jsonfor CJS output (wyw-in-js runtime evaluation)CI status: type-check (22), build (13), test (17 non-e2e), lint (17) all pass.
E2e tests need follow-up for
npm packcompatibility with new output paths.Test plan
nx run-many -t type-check— all 22 projects passnx run-many -t build— all 13 projects passnx run-many -t test(excluding e2e) — all 17 projects passnx run-many -t lint— all 17 projects passpackage.jsonindist/fornpm pack🤖 Generated with Claude Code