Skip to content

Commit 80d3721

Browse files
committed
Merge origin/master into hoangnamle/vitest-certa-bridge
Resolved conflicts: - full-stack-tests/core/src/backend/backend.ts: keep refactored version (FullStackTestIpcHandler moved to BackendServer.ts in this branch) - common/config/rush/pnpm-lock.yaml: accept origin updates (serialize-javascript ^7.0.5, imodeljs-native 5.10.1)
2 parents a02306b + 78d45c3 commit 80d3721

406 files changed

Lines changed: 12868 additions & 4713 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/settings.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"permissions": {
3+
"deny": [
4+
"Bash(npm install *)"
5+
],
6+
"allow": [
7+
"Bash(rushx build *)",
8+
"Bash(rushx test *)",
9+
"Bash(rushx lint *)",
10+
"Bash(rushx docs *)",
11+
"Bash(rushx extract-api)",
12+
"Bash(rushx clean)",
13+
"Bash(rushx cover)",
14+
"Bash(rush build)",
15+
"Bash(rush install)",
16+
"Bash(rush extract-api)",
17+
"Bash(rush lint)",
18+
"Bash(rush change)",
19+
"Bash(rush clean)",
20+
"Bash(rush cover)",
21+
"Bash(rush test)",
22+
"Bash(rush audit)",
23+
"Bash(npm view *)",
24+
"Bash(pnpm why *)"
25+
]
26+
}
27+
}

.github/mergify.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pull_request_rules:
3838
actions:
3939
backport:
4040
branches:
41-
- &current_minor "release/5.8.x"
42-
- &previous_minor "release/5.7.x"
41+
- &current_minor "release/5.9.x"
42+
- &previous_minor "release/5.8.x"
4343
- &previous_major "release/4.11.x"
4444

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ common/autoinstallers/*/.npmrc
5454
.env.local
5555
.env.*.local
5656

57+
# Claude Code - personal/local overrides (do not commit)
58+
CLAUDE.local.md
59+
**/CLAUDE.local.md
60+
.claude/settings.local.json
61+
.claude/*.local.md
62+
5763
common/api/summary/summary.exports.csv
5864

5965
*.log

.vscode/launch.json

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@
627627
]
628628
},
629629
{
630-
"name": "[perftests] Changeset PerfTests (Offline)",
630+
"name": "[perftests] Sqlite Changeset Reader and ChangesetECAdaptor PerfTests (Offline)",
631631
"presentation": {
632632
"group": "Perftests"
633633
},
@@ -637,7 +637,24 @@
637637
"runtimeExecutable": "npm",
638638
"runtimeArgs": [
639639
"run",
640-
"perftest:changesetPerformance"
640+
"perftest:sqliteChangesetReaderAndChangesetECAdaptorPerformance"
641+
],
642+
"outFiles": [
643+
"${workspaceFolder}/full-stack-tests/*/lib/**/*.js"
644+
]
645+
},
646+
{
647+
"name": "[perftests] ChangesetReader PerfTests (Offline)",
648+
"presentation": {
649+
"group": "Perftests"
650+
},
651+
"cwd": "${workspaceFolder}/full-stack-tests/backend",
652+
"type": "node",
653+
"request": "launch",
654+
"runtimeExecutable": "npm",
655+
"runtimeArgs": [
656+
"run",
657+
"perftest:changesetReaderPerformance"
641658
],
642659
"outFiles": [
643660
"${workspaceFolder}/full-stack-tests/*/lib/**/*.js"

CLAUDE.md

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Monorepo Tooling
6+
7+
This is a **Rush + pnpm monorepo** with 50+ TypeScript packages. Always use `rush`/`rushx`, never `npm` or `pnpm` directly.
8+
9+
```bash
10+
rush install # Install all deps (after git pull)
11+
rush build # Incremental build
12+
rush rebuild # Full rebuild
13+
rush test # Run all tests
14+
rush cover # Tests with coverage
15+
rush lint # ESLint all packages
16+
rush clean # Clean build outputs
17+
rush extract-api # Update common/api/*.api.md (required before committing API changes)
18+
rush change # Generate changelog entry (required before pushing)
19+
20+
# Single package (faster for local dev)
21+
cd core/backend
22+
rushx build / rushx test / rushx lint
23+
```
24+
25+
Build output: dual CJS (`lib/cjs/`) and ESM (`lib/esm/`) per package.
26+
27+
## Running a Single Test
28+
29+
Packages use either **Mocha** (older) or **Vitest** (newer) — check `devDependencies` to identify which.
30+
31+
- **Mocha**: `rushx build && mocha lib/cjs/**/YourFile.test.js`; filter with `.only` on `describe`/`it`
32+
- **Vitest**: `rushx build && rushx test`; filter with `.only` or edit `vitest.config.mts` `include` array
33+
- VS Code: Use the debug configurations in `.vscode/launch.json`; Vitest extension works for Vitest packages
34+
35+
**Always `rushx build` before running Mocha tests** — it tests compiled output, not source.
36+
37+
Never commit `.only` — CI enforces `forbidOnly`.
38+
39+
## Three-Tier Architecture
40+
41+
```
42+
core/common ← shared types, interfaces, RpcInterface (no platform deps)
43+
core/frontend ← browser visualization; RPC clients; IModelConnection facade
44+
core/backend ← Node.js services; native bindings (@bentley/imodeljs-native); RPC/IPC host
45+
```
46+
47+
Cross-boundary communication:
48+
- **RPC**: Web apps; extend `RpcInterface` from `@itwin/core-common`; frontend/backend deploy independently — **never change RPC signatures**
49+
- **IPC**: Electron/mobile; stateful connections via `IpcHost`/`IpcSession`
50+
51+
`IModelConnection` in `core/frontend` is the main facade for iModel data access (sub-managers: `.models`, `.elements`, `.views`, `.tiles`, etc.). Do not call RPC interfaces directly — use wrapper classes.
52+
53+
## API Stability — Critical Rules
54+
55+
Every exported symbol **must** have a TSDoc release tag:
56+
57+
| Tag | Constraint |
58+
|---|---|
59+
| `@public` | Backward-compatible only; breaking changes require major release + team approval |
60+
| `@beta` | May change; requires changelog + migration docs |
61+
| `@alpha` | Experimental; may change freely |
62+
| `@internal` | Not in API surface; never import from internal barrels outside `cross-package.ts` |
63+
64+
**Before any public API change**: run `rush extract-api`, review `common/api/*.api.md` diffs. Additions are non-breaking; removals/renames/signature changes are breaking.
65+
66+
Deprecation format (pipeline auto-adds date, **do not add it manually**):
67+
```typescript
68+
/** @deprecated Use NewClass instead. */
69+
/** @deprecated in 4.5.0. Use NewClass instead. */
70+
```
71+
72+
## Version Policy
73+
74+
All published packages use **lockstep versioning** — versions sync automatically. **Never manually edit internal dependency versions in `package.json`.**
75+
76+
When running `rush change` non-interactively, always use bump type `"none"` in the generated JSON.
77+
78+
## Code Organization
79+
80+
- `src/internal/` — non-public implementation; inter-package internal APIs go in `src/internal/cross-package.ts` with comments naming consuming packages
81+
- ESLint rule `@itwin/no-internal-barrel-imports` enforces internal boundaries (tests may disable it)
82+
- Use relative imports within a package, never `@itwin/package-name` self-imports
83+
- Do not import from barrel files (`index.ts`) in Vitest tests — breaks mocking
84+
85+
Shared ESLint config: `common/config/eslint/` (flat config format). Custom rules from `@itwin/eslint-plugin`.
86+
87+
## PR / Commit Checklist
88+
89+
1. `rush build && rush cover && rush lint`
90+
2. `rush clean && rush build && rush extract-api` — commit `common/api/*.api.md` changes
91+
3. `rush change` — commit generated JSON in `common/changes/@itwin/`
92+
4. For breaking changes or significant features: update `docs/changehistory/NextVersion.md` with migration examples using `[ClassName]($package)` link syntax
93+
5. Branch naming: `<gh_username>/<descriptive-name>` (lowercase, dashes)
94+
6. PR descriptions must include a `## Validation` section (targeted verification + known baseline issues)
95+
7. Backports: title `[release/X.X.x] Description` + `@Mergifyio backport release/X.X.x`
96+
97+
## Dependency Management
98+
99+
- **External deps**: edit `package.json` version range → `rush check` (verify consistency) → `rush update`
100+
- **Internal dep versions**: never manually edit — CI auto-updates them
101+
- **Broken node_modules**: `rush update --purge` (re-installs everything cleanly)
102+
103+
## Documentation Code Snippets
104+
105+
Snippets are extracted from live, tested code in `src/test/example-code/` and referenced in markdown via `[[include:SnippetName]]`:
106+
107+
```typescript
108+
// __PUBLISH_EXTRACT_START__ SnippetName
109+
// code to extract
110+
// __PUBLISH_EXTRACT_END__
111+
```
112+
113+
Run `rushx docs` in a package to build TypeDoc; `rush docs` for all packages.
114+
115+
## Key Reference Files
116+
117+
- `rush.json` — full package list and paths
118+
- `common/config/rush/version-policies.json` — lockstep config
119+
- `common/api/*.api.md` — generated API signatures
120+
- `CONTRIBUTING.md` — contribution workflow and FAQ
121+
- `.github/copilot-instructions.md` — extended development guide

0 commit comments

Comments
 (0)