diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 494f8c7f7c..3a02814896 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -27,14 +27,8 @@ jobs: - name: Install dependencies run: yarn - - name: Check formatting - run: yarn format:check - - - name: Run lint-lockfile - run: yarn lint-lockfile - - name: Build CI - run: yarn buildci + run: yarn lage buildci android: name: Android PR @@ -305,28 +299,6 @@ jobs: - name: Validate changesets run: yarn changeset:validate - publish-dry-run: - name: NPM Publish Dry Run - runs-on: ubuntu-latest - timeout-minutes: 60 - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up toolchain - uses: microsoft/react-native-test-app/.github/actions/setup-toolchain@5.0.14 - with: - node-version: 22 - - - name: Install dependencies - run: yarn - - - name: Build packages - run: yarn build - - - name: Simulate publish - run: yarn lage publish-dry-run --verbose --grouped - test-links: name: Test repo links runs-on: ubuntu-latest @@ -358,7 +330,6 @@ jobs: - windows - win32 - check-changesets - - publish-dry-run - test-links steps: - name: All required jobs passed diff --git a/apps/tester-core/package.json b/apps/tester-core/package.json index 09159e985e..14195f1bb3 100644 --- a/apps/tester-core/package.json +++ b/apps/tester-core/package.json @@ -194,6 +194,12 @@ }, "@types/react": { "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true } }, "jest": { diff --git a/apps/win32-81/package.json b/apps/win32-81/package.json index 382891b401..66b211cdf6 100644 --- a/apps/win32-81/package.json +++ b/apps/win32-81/package.json @@ -36,12 +36,26 @@ "start": "rnx-cli start" }, "dependencies": { + "@fluentui-react-native/callout": "workspace:*", + "@fluentui-react-native/experimental-appearance-additions": "workspace:*", + "@fluentui-react-native/experimental-avatar": "workspace:*", + "@fluentui-react-native/experimental-checkbox": "workspace:*", + "@fluentui-react-native/experimental-expander": "workspace:*", + "@fluentui-react-native/experimental-native-date-picker": "workspace:*", + "@fluentui-react-native/experimental-native-font-metrics": "workspace:*", + "@fluentui-react-native/experimental-shimmer": "workspace:*", + "@fluentui-react-native/focus-zone": "workspace:*", + "@fluentui-react-native/menu-button": "workspace:*", + "@fluentui-react-native/radio-group": "workspace:*", "@fluentui-react-native/tester-core": "workspace:*", + "@fluentui-react-native/tooltip": "workspace:*", + "@fluentui-react-native/vibrancy-view": "workspace:*", "@office-iss/react-native-win32": "^0.81.0", "@types/react": "~19.1.0", "react": "19.1.0", "react-native": "^0.81.0", - "react-native-svg": "^15.12.1" + "react-native-svg": "^15.12.1", + "react-native-windows": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0" }, "devDependencies": { "@babel/core": "catalog:", @@ -75,6 +89,11 @@ "react-test-renderer": "19.1.0", "rimraf": "catalog:" }, + "peerDependenciesMeta": { + "react-native-windows": { + "optional": true + } + }, "jest": { "preset": "react-native" }, diff --git a/apps/win32/package.json b/apps/win32/package.json index 72e242ac32..d3f1448962 100644 --- a/apps/win32/package.json +++ b/apps/win32/package.json @@ -36,12 +36,26 @@ "start": "rnx-cli start" }, "dependencies": { + "@fluentui-react-native/callout": "workspace:*", + "@fluentui-react-native/experimental-appearance-additions": "workspace:*", + "@fluentui-react-native/experimental-avatar": "workspace:*", + "@fluentui-react-native/experimental-checkbox": "workspace:*", + "@fluentui-react-native/experimental-expander": "workspace:*", + "@fluentui-react-native/experimental-native-date-picker": "workspace:*", + "@fluentui-react-native/experimental-native-font-metrics": "workspace:*", + "@fluentui-react-native/experimental-shimmer": "workspace:*", + "@fluentui-react-native/focus-zone": "workspace:*", + "@fluentui-react-native/menu-button": "workspace:*", + "@fluentui-react-native/radio-group": "workspace:*", "@fluentui-react-native/tester-core": "workspace:*", + "@fluentui-react-native/tooltip": "workspace:*", + "@fluentui-react-native/vibrancy-view": "workspace:*", "@office-iss/react-native-win32": "^0.74.0", "@types/react": "~18.2.0", "react": "18.2.0", "react-native": "^0.74.0", - "react-native-svg": ">=15.4.0 <15.13.0" + "react-native-svg": ">=15.4.0 <15.13.0", + "react-native-windows": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0" }, "devDependencies": { "@babel/core": "catalog:", diff --git a/lage.config.js b/lage.config.mjs similarity index 59% rename from lage.config.js rename to lage.config.mjs index 3fd5d25fa6..9c73ce9f82 100644 --- a/lage.config.js +++ b/lage.config.mjs @@ -2,6 +2,7 @@ const config = { npmClient: 'yarn', pipeline: { + // ── Per-package tasks ────────────────────────────────────────────────── 'build-cjs': { // cjs builds need to wait for the esm builds to produce the type definitions dependsOn: ['^build-core', '^build-cjs'], @@ -20,7 +21,6 @@ const config = { inputs: ['*', 'src/**/*', 'assets/**/*'], outputs: ['lib/**/*', 'lib-commonjs/**/*'], }, - buildci: ['build-all', 'test', 'lint', 'lint-package'], bundle: { inputs: ['**/*', '!node_modules/**/*', '!dist/**/*', '!lib/**/*', '!lib-commonjs/**/*'], outputs: ['dist/**/*'], @@ -36,16 +36,30 @@ const config = { inputs: ['**/*', '!node_modules/**/*', '!dist/**/*', '!lib/**/*', '!lib-commonjs/**/*'], outputs: [], }, - format: { - inputs: ['*', 'src/**/*'], - outputs: [], - }, - 'pr-check': ['buildci', 'lint-package', 'lint-lockfile', 'format:check'], test: { dependsOn: ['build-all'], inputs: [], outputs: [], }, + + // ── Root-only tasks (scripts exist only in the root package.json) ────── + // These run once for the whole repo. Sub-packages do not have these scripts, + // so lage naturally scopes them to the root workspace. + 'check-publishing': { + cache: false, + }, + 'format:check': { + cache: false, + }, + 'lint-lockfile': { + cache: false, + }, + + // ── Pipeline aliases ─────────────────────────────────────────────────── + 'repo-checks': ['lint-lockfile', 'format:check', 'check-publishing'], + buildci: ['build-all', 'test', 'lint', 'lint-package', 'repo-checks'], + + // ── Worker tasks ─────────────────────────────────────────────────────── publish: { dependsOn: ['^publish'], type: 'worker', @@ -54,7 +68,7 @@ const config = { }, cache: false, }, - 'publish-dry-run': { + 'publish:dry-run': { dependsOn: ['^publish-dry-run'], type: 'worker', options: { @@ -66,4 +80,4 @@ const config = { }, }; -module.exports = config; +export default config; diff --git a/package.json b/package.json index ddf338c898..449b87e397 100644 --- a/package.json +++ b/package.json @@ -9,30 +9,25 @@ "url": "https://github.com/microsoft/fluentui-react-native.git" }, "workspaces": [ + ".", "apps/*", "packages/**", "scripts" ], "scripts": { "build": "lage build-all", - "buildci": "lage buildci", "clean-all": "node ./scripts/src/preinstall/clean-all.js", "docs": "yarn workspace fluent-rn-website start", - "bundle": "lage bundle", - "clean": "lage clean", "change": "changeset", "changeset:version": "node .github/scripts/changeset-version-with-postbump.mts", "changeset:validate": "node .github/scripts/validate-changesets.mts", "check-publishing": "node ./scripts/src/cli.mjs check-publishing", - "lint": "lage lint", "lint-fix": "cross-env FURN_FIX_MODE=true lage lint", - "lint-package": "lage lint-package", "lint-package-fix": "cross-env FURN_FIX_MODE=true lage lint-package", - "pr-check": "lage pr-check", "preinstall": "node ./scripts/src/preinstall/use-yarn-please.js", "format": "oxfmt", "format:check": "oxfmt --check", - "test": "lage test", + "lint-lockfile": "lint-lockfile", "test-links": "markdown-link-check" }, "devDependencies": { diff --git a/packages/deprecated/theming-ramp/package.json b/packages/deprecated/theming-ramp/package.json index b0ac082372..50509590b5 100644 --- a/packages/deprecated/theming-ramp/package.json +++ b/packages/deprecated/theming-ramp/package.json @@ -54,7 +54,8 @@ }, "peerDependencies": { "@types/react": "~18.2.0 || ~19.0.0 || ~19.1.0", - "react": "18.2.0 || 19.0.0 || 19.1.0" + "react": "18.2.0 || 19.0.0 || 19.1.0", + "react-native": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0" }, "peerDependenciesMeta": { "@types/react": { diff --git a/packages/utils/test-tools/package.json b/packages/utils/test-tools/package.json index cfba87109a..23cb4fe317 100644 --- a/packages/utils/test-tools/package.json +++ b/packages/utils/test-tools/package.json @@ -49,9 +49,15 @@ "react-test-renderer": "19.1.0" }, "peerDependencies": { + "@types/react": "~18.2.0 || ~19.0.0 || ~19.1.0", "react": "18.2.0 || 19.0.0 || 19.1.0", "react-native": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0" }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "extends": "@fluentui-react-native/kit-config", diff --git a/yarn.lock b/yarn.lock index 5cab8e54e5..aa8e33a71f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5257,8 +5257,12 @@ __metadata: react-native: "npm:^0.81.0" react-test-renderer: "npm:19.1.0" peerDependencies: + "@types/react": ~18.2.0 || ~19.0.0 || ~19.1.0 react: 18.2.0 || 19.0.0 || 19.1.0 react-native: ^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0 + peerDependenciesMeta: + "@types/react": + optional: true languageName: unknown linkType: soft @@ -5411,6 +5415,10 @@ __metadata: optional: true "@types/react": optional: true + react-native-macos: + optional: true + react-native-windows: + optional: true languageName: unknown linkType: soft @@ -5421,10 +5429,23 @@ __metadata: "@babel/core": "catalog:" "@babel/runtime": "catalog:" "@fluentui-react-native/babel-config": "workspace:*" + "@fluentui-react-native/callout": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" + "@fluentui-react-native/experimental-appearance-additions": "workspace:*" + "@fluentui-react-native/experimental-avatar": "workspace:*" + "@fluentui-react-native/experimental-checkbox": "workspace:*" + "@fluentui-react-native/experimental-expander": "workspace:*" + "@fluentui-react-native/experimental-native-date-picker": "workspace:*" + "@fluentui-react-native/experimental-native-font-metrics": "workspace:*" + "@fluentui-react-native/experimental-shimmer": "workspace:*" + "@fluentui-react-native/focus-zone": "workspace:*" "@fluentui-react-native/kit-config": "workspace:*" + "@fluentui-react-native/menu-button": "workspace:*" + "@fluentui-react-native/radio-group": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/tester-core": "workspace:*" + "@fluentui-react-native/tooltip": "workspace:*" + "@fluentui-react-native/vibrancy-view": "workspace:*" "@office-iss/react-native-win32": "npm:^0.81.0" "@office-iss/rex-win32": "npm:0.81.0-preview.0" "@react-native-community/cli": "npm:^20.0.0" @@ -5452,8 +5473,12 @@ __metadata: react-native-svg: "npm:^15.12.1" react-native-svg-transformer: "npm:^1.0.0" react-native-test-app: "npm:^4.4.11" + react-native-windows: "npm:^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0" react-test-renderer: "npm:19.1.0" rimraf: "catalog:" + peerDependenciesMeta: + react-native-windows: + optional: true languageName: unknown linkType: soft @@ -5464,10 +5489,23 @@ __metadata: "@babel/core": "catalog:" "@babel/runtime": "catalog:" "@fluentui-react-native/babel-config": "workspace:*" + "@fluentui-react-native/callout": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" + "@fluentui-react-native/experimental-appearance-additions": "workspace:*" + "@fluentui-react-native/experimental-avatar": "workspace:*" + "@fluentui-react-native/experimental-checkbox": "workspace:*" + "@fluentui-react-native/experimental-expander": "workspace:*" + "@fluentui-react-native/experimental-native-date-picker": "workspace:*" + "@fluentui-react-native/experimental-native-font-metrics": "workspace:*" + "@fluentui-react-native/experimental-shimmer": "workspace:*" + "@fluentui-react-native/focus-zone": "workspace:*" "@fluentui-react-native/kit-config": "workspace:*" + "@fluentui-react-native/menu-button": "workspace:*" + "@fluentui-react-native/radio-group": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/tester-core": "workspace:*" + "@fluentui-react-native/tooltip": "workspace:*" + "@fluentui-react-native/vibrancy-view": "workspace:*" "@office-iss/react-native-win32": "npm:^0.74.0" "@office-iss/rex-win32": "npm:0.73.11-devmain.16.0.17615.15030" "@react-native-community/cli": "npm:^13.6.4" @@ -5490,8 +5528,12 @@ __metadata: react-native-svg: "npm:>=15.4.0 <15.13.0" react-native-svg-transformer: "npm:^1.0.0" react-native-test-app: "npm:^3.9.2" + react-native-windows: "npm:^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0" react-test-renderer: "npm:18.2.0" rimraf: "catalog:" + peerDependenciesMeta: + react-native-windows: + optional: true languageName: unknown linkType: soft @@ -8501,6 +8543,37 @@ __metadata: languageName: node linkType: hard +"@react-native-windows/cli@npm:0.81.2": + version: 0.81.2 + resolution: "@react-native-windows/cli@npm:0.81.2" + dependencies: + "@react-native-windows/codegen": "npm:0.81.2" + "@react-native-windows/fs": "npm:0.81.0" + "@react-native-windows/package-utils": "npm:0.81.0" + "@react-native-windows/telemetry": "npm:0.81.0" + "@xmldom/xmldom": "npm:^0.7.7" + chalk: "npm:^4.1.0" + cli-spinners: "npm:^2.2.0" + envinfo: "npm:^7.5.0" + execa: "npm:^5.0.0" + find-up: "npm:^4.1.0" + glob: "npm:^7.1.1" + lodash: "npm:^4.17.15" + mustache: "npm:^4.0.1" + ora: "npm:^3.4.0" + prompts: "npm:^2.4.1" + semver: "npm:^7.3.2" + shelljs: "npm:^0.8.4" + username: "npm:^5.1.0" + xml-formatter: "npm:^2.4.0" + xml-parser: "npm:^1.2.1" + xpath: "npm:^0.0.27" + peerDependencies: + react-native: ^0.81.0-0 + checksum: 10c0/de9a42e47447ae3a8234df121eefc6a3b4dd53c42e9c69ab868ce3a7625969eccb0fa7d1ddb73949a3671e83169e6ba64153c05c3dcb608605c703fa21cc70b7 + languageName: node + linkType: hard + "@react-native-windows/cli@npm:^0.74.0": version: 0.74.12 resolution: "@react-native-windows/cli@npm:0.74.12" @@ -8568,6 +8641,24 @@ __metadata: languageName: node linkType: hard +"@react-native-windows/codegen@npm:0.81.2": + version: 0.81.2 + resolution: "@react-native-windows/codegen@npm:0.81.2" + dependencies: + "@react-native-windows/fs": "npm:0.81.0" + chalk: "npm:^4.1.0" + globby: "npm:^11.1.0" + mustache: "npm:^4.0.1" + source-map-support: "npm:^0.5.19" + yargs: "npm:^16.2.0" + peerDependencies: + react-native: ^0.81.0-0 + bin: + react-native-windows-codegen: bin.js + checksum: 10c0/080e2673493473bad1c9201a83e92e9a9799ac5e5b59b5b7cb6ad705592caad27b9b230dd292621b21284f18df41ff92e3bc4b1ba28e6a106c470368f58f5d6c + languageName: node + linkType: hard + "@react-native-windows/find-repo-root@npm:0.74.1": version: 0.74.1 resolution: "@react-native-windows/find-repo-root@npm:0.74.1" @@ -10620,6 +10711,7 @@ __metadata: peerDependencies: "@types/react": ~18.2.0 || ~19.0.0 || ~19.1.0 react: 18.2.0 || 19.0.0 || 19.1.0 + react-native: ^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0 peerDependenciesMeta: "@types/react": optional: true @@ -21799,6 +21891,63 @@ __metadata: languageName: node linkType: hard +"react-native-windows@npm:^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0": + version: 0.81.4 + resolution: "react-native-windows@npm:0.81.4" + dependencies: + "@babel/runtime": "npm:^7.0.0" + "@jest/create-cache-key-function": "npm:^29.7.0" + "@react-native-community/cli": "npm:17.0.0" + "@react-native-community/cli-platform-android": "npm:17.0.0" + "@react-native-community/cli-platform-ios": "npm:17.0.0" + "@react-native-windows/cli": "npm:0.81.2" + "@react-native/assets": "npm:1.0.0" + "@react-native/assets-registry": "npm:0.81.5" + "@react-native/codegen": "npm:0.81.5" + "@react-native/community-cli-plugin": "npm:0.81.5" + "@react-native/gradle-plugin": "npm:0.81.5" + "@react-native/js-polyfills": "npm:0.81.5" + "@react-native/new-app-screen": "npm:0.81.5" + "@react-native/normalize-colors": "npm:0.81.5" + "@react-native/virtualized-lists": "npm:0.81.5" + abort-controller: "npm:^3.0.0" + anser: "npm:^1.4.9" + ansi-regex: "npm:^5.0.0" + babel-jest: "npm:^29.7.0" + babel-plugin-syntax-hermes-parser: "npm:0.28.1" + base64-js: "npm:^1.5.1" + chalk: "npm:^4.0.0" + commander: "npm:^12.0.0" + event-target-shim: "npm:^5.0.1" + flow-enums-runtime: "npm:^0.0.6" + glob: "npm:^7.1.1" + invariant: "npm:^2.2.4" + jest-environment-node: "npm:^29.7.0" + memoize-one: "npm:^5.0.0" + metro-runtime: "npm:^0.83.1" + metro-source-map: "npm:^0.82.2" + mkdirp: "npm:^0.5.1" + nullthrows: "npm:^1.1.1" + pretty-format: "npm:^29.7.0" + promise: "npm:^8.3.0" + react-devtools-core: "npm:^6.1.1" + react-refresh: "npm:^0.14.0" + regenerator-runtime: "npm:^0.13.2" + scheduler: "npm:0.26.0" + semver: "npm:^7.1.3" + source-map-support: "npm:^0.5.19" + stacktrace-parser: "npm:^0.1.10" + whatwg-fetch: "npm:^3.0.0" + ws: "npm:^6.2.3" + yargs: "npm:^17.6.2" + peerDependencies: + "@types/react": ^19.1.0 + react: ^19.1.0 + react-native: 0.81.5 + checksum: 10c0/9417eb333410dd289dac1e665fd80edc4a6316616a845db1c1083fdab51041d4789b4daf95a28f2d488593e6a1a6fb6f50044b759d773634bf1141ffaf12884d + languageName: node + linkType: hard + "react-native-windows@npm:^0.74.0": version: 0.74.46 resolution: "react-native-windows@npm:0.74.46"