Skip to content

Commit 185151f

Browse files
committed
chore: merge main
2 parents 7436012 + 7fb1c23 commit 185151f

30 files changed

Lines changed: 1276 additions & 1880 deletions

File tree

.changeset/breezy-walls-burn.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
"@module-federation/bridge-react": patch
3+
"@module-federation/sdk": minor
4+
"@module-federation/runtime-core": minor
5+
---
6+
7+
Add `isBrowserEnvValue` as a tree-shakable ENV_TARGET-aware constant while
8+
preserving the `isBrowserEnv()` function. Internal runtime and bridge callers
9+
use the constant to enable bundler dead-code elimination without breaking the
10+
public API.

.codex/environments/environment.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ name = "core"
44

55
[setup]
66
script = '''
7+
export NVM_DIR="${NVM_DIR:-$HOME/.nvm}"
8+
if [ -s "$NVM_DIR/nvm.sh" ]; then
9+
. "$NVM_DIR/nvm.sh"
10+
nvm use
11+
fi
12+
713
corepack enable
8-
pnpm install
14+
pnpm install --frozen-lockfile
915
'''

.codex/skills/local-ci/SKILL.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
---
2+
name: local-ci
3+
description: Run this repository's local CI parity commands and `pnpm run ci:local` jobs. Use when validating a change against the same job shapes used in GitHub Actions, choosing the smallest local CI job for a package, workflow, E2E, Metro, devtools, bundle-size, or build-and-test change.
4+
---
5+
6+
# Local CI
7+
8+
Use the local CI runner and Turbo/package scripts as the source of truth for validation in this repo.
9+
10+
## Quick Start
11+
12+
1. Start with the smallest deterministic check that matches the change.
13+
2. Prefer `pnpm run ci:local --only=<job>` for CI-parity validation.
14+
3. Prefer direct Turbo or package scripts only when they are the smaller equivalent of the CI job.
15+
4. Report exactly which command ran, what failed first, and which expected checks were skipped.
16+
17+
## Workflow
18+
19+
### 1. Inspect available local CI jobs
20+
21+
Run:
22+
23+
```bash
24+
pnpm run ci:local --list
25+
```
26+
27+
Use this when the right job is unclear or when the repo may have added or renamed jobs.
28+
29+
For the current job map, read [references/jobs.md](./references/jobs.md).
30+
31+
### 2. Pick the smallest matching job
32+
33+
Use these defaults:
34+
35+
- Package code in `packages/*`: start with `build-and-test` only if the change is broad; otherwise prefer package build/test commands.
36+
- Metro packages or Metro workflow changes: use `build-metro`, then Metro E2E jobs only if relevant.
37+
- E2E app changes: run the matching `e2e-*` job instead of `build-and-test`.
38+
- Devtools workflow or Playwright/devtools changes: run `devtools`.
39+
- Bundle-size workflow/reporting changes: run `bundle-size`.
40+
- GitHub workflow syntax only: use `actionlint` locally only to see skip behavior; the actual action is CI-only.
41+
- Broad CI, packaging, publint, Turbo, or shared runtime changes: run `build-and-test`.
42+
43+
### 3. Run commands in CI order
44+
45+
When reproducing CI, use the same command shape as the repo:
46+
47+
```bash
48+
pnpm run ci:local --only=build-and-test
49+
pnpm run ci:local --only=devtools
50+
pnpm run ci:local --only=e2e-runtime
51+
```
52+
53+
To run more than one job:
54+
55+
```bash
56+
pnpm run ci:local --only=build-and-test,bundle-size
57+
```
58+
59+
### 4. Interpret failures correctly
60+
61+
- Treat the first failing step as the actionable failure.
62+
- Ignore known noisy warnings unless they exit non-zero.
63+
- Distinguish repo-wide drift from changed-file gates.
64+
- If `ci:local` fails in `Check code format`, inspect the changed-file formatter result before running broader builds.
65+
- If a dependency build outside the touched scope fails, note it separately as an unrelated blocker.
66+
67+
## Common Cases
68+
69+
### Broad package or runtime/plugin change
70+
71+
Run:
72+
73+
```bash
74+
pnpm run ci:local --only=build-and-test
75+
```
76+
77+
If that fails on format first, fix the changed files before rerunning the whole job.
78+
79+
### One package only
80+
81+
Prefer the smaller direct command first:
82+
83+
```bash
84+
pnpm exec turbo run build --filter=@module-federation/<pkg>
85+
pnpm exec turbo run test --filter=@module-federation/<pkg> --force
86+
```
87+
88+
Then run `build-and-test` only if the user asks for CI parity or the package change affects shared build/runtime behavior.
89+
90+
### E2E change
91+
92+
Run the matching job from [references/jobs.md](./references/jobs.md), not the whole matrix.
93+
94+
### Workflow change
95+
96+
Use the local CI job if one exists for the workflow's behavior. For workflow syntax, pair local validation with the repo's actionlint path when relevant.
97+
98+
## Notes
99+
100+
- `ci:local` sets `CI=true` and mirrors the repo workflow order.
101+
- Some jobs intentionally skip GitHub-only actions such as `actionlint` and `bundle-size-comment`.
102+
- The repo uses `pnpm`, Node 20, and Turbo as the standard execution path.
103+
- In worktrees, still use Turbo/package scripts directly as documented by the repo instructions.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
interface:
2+
display_name: 'Local CI'
3+
short_description: 'Run repo CI parity jobs locally'
4+
default_prompt: 'Use $local-ci to choose and run the smallest local CI parity command for this repo change.'
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Local CI job map
2+
3+
Use `pnpm run ci:local --list` if you need to refresh this list from the repo.
4+
5+
## Core jobs
6+
7+
- `build-and-test`
8+
- Full package-oriented CI parity job.
9+
- Includes install, Cypress install, changed-file format check, Turbo/publint verification, package build, and affected package tests.
10+
- Use for shared runtime, plugin, CI, packaging, publint, or broad package changes.
11+
12+
- `build-metro`
13+
- Metro-specific parity job.
14+
- Use for `packages/metro*` and related Metro workflow changes.
15+
16+
- `bundle-size`
17+
- Bundle-size measurement workflow parity.
18+
- Use for bundle-size collection or reporting logic.
19+
20+
- `devtools`
21+
- Devtools workflow parity job.
22+
- Use for `packages/chrome-devtools`, Playwright/devtools setup, and devtools workflow changes.
23+
24+
## E2E jobs
25+
26+
- `e2e-modern`
27+
- `e2e-runtime`
28+
- `e2e-manifest`
29+
- `e2e-node`
30+
- `e2e-next-dev`
31+
- `e2e-next-prod`
32+
- `e2e-treeshake`
33+
- `e2e-modern-ssr`
34+
- `e2e-router`
35+
- `metro-affected-check`
36+
- `metro-android-e2e`
37+
- `metro-ios-e2e`
38+
- `e2e-shared-tree-shaking`
39+
40+
Use the smallest job that matches the app/runtime surface you changed.
41+
42+
## CI-only local skips
43+
44+
- `actionlint`
45+
- Listed for parity, but skipped because the GitHub-only action does not fully execute locally.
46+
47+
- `bundle-size-comment`
48+
- Listed for parity, but skipped locally because it depends on GitHub workflow-run artifacts.
49+
50+
## Helpful commands
51+
52+
List jobs:
53+
54+
```bash
55+
pnpm run ci:local --list
56+
```
57+
58+
Run one job:
59+
60+
```bash
61+
pnpm run ci:local --only=build-and-test
62+
```
63+
64+
Run multiple jobs:
65+
66+
```bash
67+
pnpm run ci:local --only=build-and-test,bundle-size
68+
```
69+
70+
Run a smaller non-`ci:local` package check:
71+
72+
```bash
73+
pnpm exec turbo run build --filter=@module-federation/<pkg>
74+
pnpm exec turbo run test --filter=@module-federation/<pkg> --force
75+
```

packages/assemble-release-plan/babel.config.js

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

packages/assemble-release-plan/package.json

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,23 @@
33
"version": "6.0.4",
44
"private": true,
55
"description": "Reads changesets and adds information on dependents that need bumping",
6-
"main": "dist/changesets-assemble-release-plan.cjs.js",
7-
"module": "dist/changesets-assemble-release-plan.esm.js",
6+
"main": "./dist/index.cjs",
7+
"module": "./dist/index.mjs",
8+
"types": "./dist/index.d.ts",
89
"exports": {
910
".": {
10-
"types": {
11-
"import": "./dist/changesets-assemble-release-plan.cjs.mjs",
12-
"default": "./dist/changesets-assemble-release-plan.cjs.js"
13-
},
14-
"module": "./dist/changesets-assemble-release-plan.esm.js",
15-
"import": "./dist/changesets-assemble-release-plan.cjs.mjs",
16-
"default": "./dist/changesets-assemble-release-plan.cjs.js"
11+
"types": "./dist/index.d.ts",
12+
"import": "./dist/index.mjs",
13+
"require": "./dist/index.cjs",
14+
"default": "./dist/index.cjs"
1715
},
1816
"./package.json": "./package.json"
1917
},
2018
"scripts": {
2119
"test": "echo 'skip'",
22-
"build": "preconstruct build",
23-
"watch": "preconstruct watch",
24-
"postinstall": "preconstruct dev",
20+
"build": "pnpm exec tsdown --config tsdown.config.mts",
21+
"watch": "pnpm exec tsdown --config tsdown.config.mts --watch",
22+
"postinstall": "pnpm run build",
2523
"lint": "echo 'noop'",
2624
"types:check": "tsc",
2725
"changeset": "packages/cli/bin.js",
@@ -44,20 +42,6 @@
4442
"semver": "^7.5.3"
4543
},
4644
"devDependencies": {
47-
"@babel/preset-env": "^7.28.0",
48-
"@babel/preset-typescript": "^7.27.1",
49-
"@changesets/config": "*",
50-
"@preconstruct/cli": "^2.8.1"
51-
},
52-
"preconstruct": {
53-
"packages": [
54-
"."
55-
],
56-
"exports": {
57-
"importConditionDefaultExport": "default"
58-
},
59-
"___experimentalFlags_WILL_CHANGE_IN_PATCH": {
60-
"importsConditions": true
61-
}
45+
"@changesets/config": "*"
6246
}
6347
}

packages/assemble-release-plan/src/determine-dependents.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ function shouldBumpMajor({
230230
preInfo: PreInfo | undefined;
231231
onlyUpdatePeerDependentsWhenOutOfRange: boolean;
232232
}) {
233-
//disable major bump due to peer dep
233+
// This fork intentionally never escalates peer dependency changes into
234+
// major dependent releases. Preserve that lock even when refactoring.
234235
if (depType === 'peerDependencies') {
235236
return false;
236237
}

0 commit comments

Comments
 (0)