Skip to content

Commit 72ece07

Browse files
authored
ci: add root level tasks to lage (#4030)
* lint-package makes some fixes * lint-package * yarn format * lint-package-fix && format * remove root lage to stop a recursion thing * update lock * fix peer deps * remove publish dry run * upgrade yarn * finx lint * Don't enforce peer deps on app pacakages, mark tester-win32 packages as private * lint * lock update * and format...
1 parent 92a1d5d commit 72ece07

File tree

16 files changed

+1948
-1934
lines changed

16 files changed

+1948
-1934
lines changed

.github/workflows/pr.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,8 @@ jobs:
2727
- name: Install dependencies
2828
run: yarn
2929

30-
- name: Check formatting
31-
run: yarn format:check
32-
33-
- name: Run lint-lockfile
34-
run: yarn lint-lockfile
35-
3630
- name: Build CI
37-
run: yarn buildci
31+
run: yarn lage buildci
3832

3933
android:
4034
name: Android PR
@@ -367,7 +361,7 @@ jobs:
367361
path: _packed/
368362

369363
- name: Simulate publish
370-
run: yarn lage publish-dry-run --verbose --grouped
364+
run: yarn lage publish:dry-run --verbose --grouped
371365

372366
test-links:
373367
name: Test repo links

.yarn/releases/yarn-4.12.0.cjs

Lines changed: 0 additions & 942 deletions
This file was deleted.

.yarn/releases/yarn-4.13.0.cjs

Lines changed: 940 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,4 +305,4 @@ plugins:
305305
path: .yarn/plugins/@rnx-kit/yarn-plugin-dynamic-extensions.cjs
306306
spec: "https://raw.githubusercontent.com/microsoft/rnx-kit/main/incubator/yarn-plugin-dynamic-extensions/index.js"
307307

308-
yarnPath: .yarn/releases/yarn-4.12.0.cjs
308+
yarnPath: .yarn/releases/yarn-4.13.0.cjs

apps/E2E/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "@fluentui-react-native/e2e-testing",
3-
"version": "1.43.11",
3+
"version": "0.1.0",
4+
"private": true,
45
"description": "Package containing E2E testing specs",
56
"license": "MIT",
67
"repository": {

apps/tester-core/package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "@fluentui-react-native/tester-core",
3-
"version": "0.1.2",
3+
"version": "0.1.0",
4+
"private": true,
45
"description": "Core implementation of the fluent tester app",
56
"homepage": "https://github.com/microsoft/fluentui-react-native",
67
"license": "MIT",
@@ -194,6 +195,12 @@
194195
},
195196
"@types/react": {
196197
"optional": true
198+
},
199+
"react-native-macos": {
200+
"optional": true
201+
},
202+
"react-native-windows": {
203+
"optional": true
197204
}
198205
},
199206
"jest": {

apps/win32-81/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "@fluentui-react-native/tester-win32-81",
3-
"version": "0.38.70",
3+
"version": "0.1.0",
4+
"private": true,
45
"description": "Fluent UI React Native Win32 Tester App for RN 0.81",
56
"repository": {
67
"type": "git",
@@ -26,9 +27,9 @@
2627
"bundle-dev": "rnx-cli bundle",
2728
"clean": "fluentui-scripts clean",
2829
"depcheck": "fluentui-scripts depcheck",
30+
"format": "fluentui-scripts format",
2931
"lint": "fluentui-scripts eslint",
3032
"lint-package": "fluentui-scripts lint-package",
31-
"format": "fluentui-scripts format",
3233
"run-win32": "rex-win32 --bundle index.win32 --component FluentTester --basePath ./dist --useDirectDebugger --windowTitle \"FluentUI Tester\" --pluginProps --debugBundlePath index --jsEngine v8",
3334
"run-win32-dev": "rex-win32 --bundle index --component FluentTester --basePath ./dist --useDirectDebugger --windowTitle \"FluentUI Tester\" --pluginProps --debugBundlePath index --jsEngine v8 --useFastRefresh",
3435
"run-win32-devmain": "rex-win32 --bundle index.win32 --component FluentTester --basePath ./dist --useDirectDebugger --windowTitle \"FluentUI Tester\" --pluginProps --debugBundlePath index --jsEngine v8 --useDevMain ",

apps/win32/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "@fluentui-react-native/tester-win32",
3-
"version": "0.38.70",
3+
"version": "0.1.0",
4+
"private": true,
45
"description": "Fluent UI React Native Win32 Tester App",
56
"repository": {
67
"type": "git",
@@ -26,9 +27,9 @@
2627
"bundle-dev": "rnx-cli bundle",
2728
"clean": "fluentui-scripts clean",
2829
"depcheck": "fluentui-scripts depcheck",
30+
"format": "fluentui-scripts format",
2931
"lint": "fluentui-scripts eslint",
3032
"lint-package": "fluentui-scripts lint-package",
31-
"format": "fluentui-scripts format",
3233
"run-win32": "rex-win32 --bundle index.win32 --component FluentTester --basePath ./dist --useDirectDebugger --windowTitle \"FluentUI Tester\" --pluginProps --debugBundlePath index --jsEngine v8",
3334
"run-win32-dev": "rex-win32 --bundle index --component FluentTester --basePath ./dist --useDirectDebugger --windowTitle \"FluentUI Tester\" --pluginProps --debugBundlePath index --jsEngine v8 --useFastRefresh",
3435
"run-win32-devmain": "rex-win32 --bundle index.win32 --component FluentTester --basePath ./dist --useDirectDebugger --windowTitle \"FluentUI Tester\" --pluginProps --debugBundlePath index --jsEngine v8 --useDevMain ",

lage.config.js renamed to lage.config.mjs

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
const config = {
33
npmClient: 'yarn',
44
pipeline: {
5+
// ── Per-package tasks ──────────────────────────────────────────────────
56
'build-cjs': {
67
// cjs builds need to wait for the esm builds to produce the type definitions
78
dependsOn: ['^build-core', '^build-cjs'],
@@ -20,7 +21,6 @@ const config = {
2021
inputs: ['*', 'src/**/*', 'assets/**/*'],
2122
outputs: ['lib/**/*', 'lib-commonjs/**/*'],
2223
},
23-
buildci: ['build-all', 'test', 'lint', 'lint-package'],
2424
bundle: {
2525
inputs: ['**/*', '!node_modules/**/*', '!dist/**/*', '!lib/**/*', '!lib-commonjs/**/*'],
2626
outputs: ['dist/**/*'],
@@ -36,16 +36,30 @@ const config = {
3636
inputs: ['**/*', '!node_modules/**/*', '!dist/**/*', '!lib/**/*', '!lib-commonjs/**/*'],
3737
outputs: [],
3838
},
39-
format: {
40-
inputs: ['*', 'src/**/*'],
41-
outputs: [],
42-
},
43-
'pr-check': ['buildci', 'lint-package', 'lint-lockfile', 'format:check'],
4439
test: {
4540
dependsOn: ['build-all'],
4641
inputs: [],
4742
outputs: [],
4843
},
44+
45+
// ── Root-only tasks (scripts exist only in the root package.json) ──────
46+
// These run once for the whole repo. Sub-packages do not have these scripts,
47+
// so lage naturally scopes them to the root workspace.
48+
'check-publishing': {
49+
cache: false,
50+
},
51+
'format:check': {
52+
cache: false,
53+
},
54+
'lint-lockfile': {
55+
cache: false,
56+
},
57+
58+
// ── Pipeline aliases ───────────────────────────────────────────────────
59+
'repo-checks': ['lint-lockfile', 'format:check', 'check-publishing'],
60+
buildci: ['build-all', 'test', 'lint', 'lint-package', 'repo-checks'],
61+
62+
// ── Worker tasks ───────────────────────────────────────────────────────
4963
pack: {
5064
dependsOn: ['build-all', '^pack'],
5165
type: 'worker',
@@ -64,8 +78,8 @@ const config = {
6478
},
6579
cache: false,
6680
},
67-
'publish-dry-run': {
68-
dependsOn: ['^publish-dry-run'],
81+
'publish:dry-run': {
82+
dependsOn: ['^publish:dry-run'],
6983
type: 'worker',
7084
options: {
7185
worker: 'scripts/src/worker/publish.mts',
@@ -77,4 +91,4 @@ const config = {
7791
},
7892
};
7993

80-
module.exports = config;
94+
export default config;

package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
"url": "https://github.com/microsoft/fluentui-react-native.git"
1010
},
1111
"workspaces": [
12+
".",
1213
"apps/*",
1314
"packages/**",
1415
"scripts"
1516
],
1617
"scripts": {
1718
"build": "lage build-all",
18-
"buildci": "lage buildci",
1919
"clean-all": "node ./scripts/src/preinstall/clean-all.js",
2020
"docs": "yarn workspace fluent-rn-website start",
2121
"bundle": "lage bundle",
@@ -24,15 +24,12 @@
2424
"changeset:version": "node .github/scripts/changeset-version-with-postbump.mts",
2525
"change:check": "node .github/scripts/change.mts --check",
2626
"check-publishing": "node ./scripts/src/cli.mjs check-publishing",
27-
"lint": "lage lint",
2827
"lint-fix": "cross-env FURN_FIX_MODE=true lage lint",
29-
"lint-package": "lage lint-package",
3028
"lint-package-fix": "cross-env FURN_FIX_MODE=true lage lint-package",
31-
"pr-check": "lage pr-check",
3229
"preinstall": "node ./scripts/src/preinstall/use-yarn-please.js",
3330
"format": "oxfmt",
3431
"format:check": "oxfmt --check",
35-
"test": "lage test",
32+
"lint-lockfile": "lint-lockfile",
3633
"test-links": "markdown-link-check"
3734
},
3835
"devDependencies": {
@@ -64,7 +61,7 @@
6461
"engines": {
6562
"node": ">=22.12"
6663
},
67-
"packageManager": "yarn@4.12.0",
64+
"packageManager": "yarn@4.13.0",
6865
"rnx-kit": {
6966
"kitType": "library"
7067
}

0 commit comments

Comments
 (0)