Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ec002ce
chore: migrate from TS path aliases to workspaces + project references
layershifter May 21, 2026
863599d
fix: align workspace migration with current main after rebase
layershifter May 21, 2026
4770faf
chore: add type:none changefiles for workspace migration
layershifter May 21, 2026
7bfa4a9
fix: address syncpack check-dependencies failures
layershifter May 21, 2026
2ab0fa5
fix(bundle-size): update monosize aliases to per-package dist/ layout
layershifter May 21, 2026
aa19ca4
fix(update-shorthands): import @griffel/core via package name
layershifter May 21, 2026
ea697bb
fix(webpack-plugin): copy src/virtual-loader/ into dist/ during build
layershifter May 21, 2026
74f1069
chore: replace tools/copy-pkg-assets.mjs with a beachball prepublish …
layershifter May 21, 2026
bb5404d
chore(website): re-enable composite + add to project references graph
layershifter May 21, 2026
edd6f1b
chore(website): emit to per-package dist/
layershifter May 21, 2026
a37f118
chore(e2e-eslint): pin internal deps to exact versions
layershifter May 21, 2026
e465296
chore(syncpack): enforce caret range on internal @griffel/* deps
layershifter May 21, 2026
cb361e9
chore(style-types): drop explicit build target, rely on @nx/js/typesc…
layershifter May 21, 2026
38497ce
chore: simplify project.json/exports for transform + e2e-utils
layershifter May 21, 2026
2515080
chore(babel-preset): collapse tsconfig.build.json into tsconfig.lib.json
layershifter May 22, 2026
c4dc996
chore(e2e): drop allowImportingTsExtensions where unused
layershifter May 22, 2026
73ae348
chore(spec configs): drop dead "out-tsc/**" + "dist/**" exclude
layershifter May 22, 2026
66fc192
chore(transform-shaker): drop explicit build target, rely on @nx/js/t…
layershifter May 22, 2026
b5d23f0
chore(webpack-extraction-plugin): collapse build config + reorder pac…
layershifter May 22, 2026
f48b03d
chore: simplify package configs across the board
layershifter May 22, 2026
64b209f
chore(webpack-plugin): target esnext, not pinned es2020
layershifter May 22, 2026
b1dab99
chore(webpack-plugin): move virtual-loader to package root
layershifter May 22, 2026
74a201a
chore(webpack-extraction-plugin): inline GriffelCssLoaderContextKey i…
layershifter May 22, 2026
1ff6866
chore(core/react/shadow-dom): refactor build pipeline to build + buil…
layershifter May 22, 2026
ec9f54b
chore(core/react/shadow-dom): restore main pointing at CJS entry
layershifter May 22, 2026
15e81b4
chore: rewrite tools/build-cjs.mjs in TypeScript and clean up
layershifter May 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Upload artifacts
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: './dist/apps/website'
path: './apps/website/dist'

deploy:
needs: build
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
dist
/tmp
/out-tsc
out-tsc
/packages/*/dist/bundle-size

# TypeScript build info
Expand Down
8 changes: 8 additions & 0 deletions .syncpackrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
{
"$schema": "./node_modules/syncpack/schema.json",
"strict": true,
"semverGroups": [
{
"label": "Internal @griffel/* deps must use a caret range when semver-pinned",
"dependencies": ["@griffel/*"],
"specifierTypes": ["exact", "range-major", "range-minor", "range"],
"range": "^"
}
],
"versionGroups": [
{
"label": "Local @griffel/* cross-package deps must use the same caret range everywhere",
Expand Down
34 changes: 0 additions & 34 deletions .yarn/patches/beachball-npm-2.65.4-4bf34ce8d5.patch

This file was deleted.

1 change: 1 addition & 0 deletions apps/website/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@griffel/website",
"version": "0.0.0",
"description": "Docusaurus has update notifier that checks presence of package.json file, if it's missing it throws",
"private": true
}
22 changes: 11 additions & 11 deletions apps/website/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@
"executor": "nx:run-commands",
"options": {
"cwd": "apps/website",
"commands": [{ "command": "docusaurus build --out-dir ../../dist/apps/website" }]
"commands": [
{
"command": "docusaurus build --out-dir ./dist"
}
]
},
"outputs": ["{workspaceRoot}/dist/apps/website"]
"outputs": ["{workspaceRoot}/apps/website/dist"]
},
"serve": {
"executor": "nx:run-commands",
"options": {
"cwd": "apps/website",
"commands": [{ "command": "docusaurus start" }]
}
},
"type-check": {
"executor": "nx:run-commands",
"options": {
"cwd": "apps/website",
"commands": [{ "command": "tsc -b --pretty" }],
"outputPath": []
"commands": [
{
"command": "docusaurus start"
}
]
}
}
},
Expand Down
14 changes: 10 additions & 4 deletions apps/website/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,21 @@
"allowSyntheticDefaultImports": true,
"checkJs": true,
"jsx": "react",
"noEmit": true,
"outDir": "../../dist/out-tsc",
"outDir": "./out-tsc",
"types": [
"../../node_modules/@docusaurus/module-type-aliases",
"../../node_modules/@docusaurus/theme-classic",
"environment",
"static-assets",
"webpack-env"
]
],
"composite": true
},
"include": ["./src/**/*.ts", "./src/**/*.tsx", "./src/**/*.js"]
"include": ["./src/**/*.ts", "./src/**/*.tsx", "./src/**/*.js"],
"exclude": ["./src/components/Playground/code/templates/**"],
"references": [
{
"path": "../../packages/core"
}
]
}
3 changes: 3 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ extends:
- script: yarn install --frozen-lockfile
displayName: Install dependencies

- script: yarn nx run-many --target=build --all --parallel
displayName: Build all packages

- script: |
git config user.name "Fluent UI Build"
git config user.email "fluentui-internal@service.microsoft.com"
Expand Down
35 changes: 25 additions & 10 deletions beachball.hooks.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// @ts-check

const childProcess = require('child_process');
const fs = require('fs');
const path = require('path');

/**
* @param {String} command
Expand Down Expand Up @@ -38,21 +40,34 @@ function sh(command) {
});
}

let completedPrepublish = false;
const REPO_ROOT = __dirname;

/**
* Make sure a workspace-rooted asset is present at the package root so `npm pack`
* picks it up via the `files` field. Falls back to copying the workspace-root copy
* when the package itself doesn't ship one (the LICENSE.md is shared across the
* monorepo; some packages also rely on the root README).
*
* @param {string} packagePath
* @param {string} asset
*/
function ensurePackageAsset(packagePath, asset) {
const target = path.join(packagePath, asset);
if (fs.existsSync(target)) return;
const source = path.join(REPO_ROOT, asset);
if (!fs.existsSync(source)) return;
fs.copyFileSync(source, target);
}

/**
* @type {import('beachball').BeachballConfig['hooks']}
*/
module.exports = {
// Executed after all package versions were bumped -> run build
// If we run build before `beachball publish`, artifacts would have
// old (without bump) versions.
async prepublish() {
// `beachball` runs this hook for every package, we want to run it only once.
if (!completedPrepublish) {
await sh('yarn nx run-many --target=build,build-cjs --all --parallel --max-parallel=3');
completedPrepublish = true;
}
// Per-package: stage the workspace-root LICENSE/README into the package root so
// `npm pack` (which beachball runs from the package root) finds them via `files`.
async prepublish(packagePath) {
ensurePackageAsset(packagePath, 'LICENSE.md');
ensurePackageAsset(packagePath, 'README.md');
},
// Runs once after all bumps, before committing — update lockfile so it stays in sync
async precommit() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: migrate from TS path aliases to yarn workspaces + TS project references",
"packageName": "@griffel/babel-preset",
"email": "olfedias@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: migrate from TS path aliases to yarn workspaces + TS project references",
"packageName": "@griffel/core",
"email": "olfedias@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: migrate from TS path aliases to yarn workspaces + TS project references",
"packageName": "@griffel/devtools",
"email": "olfedias@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: migrate from TS path aliases to yarn workspaces + TS project references",
"packageName": "@griffel/eslint-plugin",
"email": "olfedias@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: migrate from TS path aliases to yarn workspaces + TS project references",
"packageName": "@griffel/jest-serializer",
"email": "olfedias@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: migrate from TS path aliases to yarn workspaces + TS project references",
"packageName": "@griffel/postcss-syntax",
"email": "olfedias@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: migrate from TS path aliases to yarn workspaces + TS project references",
"packageName": "@griffel/react",
"email": "olfedias@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: migrate from TS path aliases to yarn workspaces + TS project references",
"packageName": "@griffel/shadow-dom",
"email": "olfedias@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: migrate from TS path aliases to yarn workspaces + TS project references",
"packageName": "@griffel/style-types",
"email": "olfedias@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: migrate from TS path aliases to yarn workspaces + TS project references",
"packageName": "@griffel/transform",
"email": "olfedias@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: migrate from TS path aliases to yarn workspaces + TS project references",
"packageName": "@griffel/transform-shaker",
"email": "olfedias@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: migrate from TS path aliases to yarn workspaces + TS project references",
"packageName": "@griffel/webpack-extraction-plugin",
"email": "olfedias@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: migrate from TS path aliases to yarn workspaces + TS project references",
"packageName": "@griffel/webpack-loader",
"email": "olfedias@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: migrate from TS path aliases to yarn workspaces + TS project references",
"packageName": "@griffel/webpack-plugin",
"email": "olfedias@microsoft.com",
"dependentChangeType": "none"
}
7 changes: 6 additions & 1 deletion e2e/eslint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,10 @@
"name": "@griffel/e2e-eslint",
"version": "0.0.0",
"private": true,
"type": "module"
"type": "module",
"devDependencies": {
"@griffel/e2e-utils": "*",
"@griffel/eslint-plugin": "^3.0.2",
"@griffel/react": "^1.7.4"
}
}
21 changes: 11 additions & 10 deletions e2e/eslint/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,21 @@
"targets": {
"test": {
"executor": "nx:run-commands",
"dependsOn": [{ "target": "build", "dependencies": true }],
"dependsOn": [
{
"target": "build",
"dependencies": true
}
],
"options": {
"cwd": "e2e/eslint",
"commands": [{ "command": "node src/test.ts" }]
"commands": [
{
"command": "node src/test.ts"
}
]
},
"outputs": []
},
"type-check": {
"executor": "nx:run-commands",
"options": {
"cwd": "e2e/eslint",
"commands": [{ "command": "tsc -b --pretty" }],
"outputPath": []
}
}
},
"tags": []
Expand Down
8 changes: 0 additions & 8 deletions e2e/eslint/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"module": "nodenext",
"moduleResolution": "nodenext",
"allowImportingTsExtensions": true,
"noEmit": true
},
"files": [],
"include": [],
"references": [
Expand Down
21 changes: 17 additions & 4 deletions e2e/eslint/tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
{
"extends": "./tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "nodenext",
"moduleResolution": "nodenext",
"emitDeclarationOnly": true,
"outDir": "./dist",
"types": ["node", "environment"]
},
"include": ["**/*.ts", "**/*.js"],
"exclude": ["src/assets"]
"include": ["src/**/*.ts", "src/**/*.tsx"],
"references": [
{
"path": "../../packages/react/tsconfig.lib.json"
},
{
"path": "../../packages/eslint-plugin/tsconfig.lib.json"
},
{
"path": "../utils/tsconfig.lib.json"
}
]
}
Loading
Loading