Skip to content

Commit 209239f

Browse files
felixtrzmeta-codesync[bot]
authored andcommitted
chore(iwer): migrate runtime to pnpm monorepo
Summary: Migrated immersive-web-emulation-runtime from a loose multi-package/npm layout into a pnpm monorepo. The root is now a private workspace with shared scripts, pnpm-workspace.yaml, pnpm-lock.yaml, tsconfig.base.json, Changesets config, Husky/lint-staged, and CI wired around pnpm. The publishable packages now live under packages/: packages/iwer, packages/devui, and packages/sem. The new private packages/e2e package contains the Playwright/Vite WebXR spec-style browser harness. Examples moved under examples/: examples/basic and examples/devui-demo. They build as standalone demo apps using local file:../../packages/... package links, while the main workspace only includes packages/*. Release/versioning was standardized with Changesets using a fixed group for iwer, iwer/devui, and iwer/sem, all synced to 2.3.0. Internal development links use workspace:*, while published peer ranges remain explicit. The verification story was expanded around pnpm verify: package builds, e2e typecheck, Jest unit tests, Playwright e2e tests, lint, formatting, Changesets status, docs build, tarball packing, and example builds. Dependencies were also updated and audited cleanly across the workspace and examples. Reviewed By: cabanier Differential Revision: D104109555 fbshipit-source-id: f1bb7b081ba50a9b566e8be3c05b444d55efc4f8
1 parent 31cf00a commit 209239f

261 files changed

Lines changed: 30782 additions & 39554 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.

.changeset/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works with multi-package repos, or single-package repos to help you version and publish your code. You can find the full documentation for it [in our repository](https://github.com/changesets/changesets).
4+
5+
We have a quick list of common questions to get you started engaging with this project in [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md).
6+
7+
## Versioning policy in this repo
8+
9+
The publishable packages in this monorepo are released **lockstep** via the `fixed` group declared in [`config.json`](./config.json):
10+
11+
- `iwer`
12+
- `@iwer/devui`
13+
- `@iwer/sem`
14+
15+
A changeset that bumps any one of them bumps all three to the same version. Use the highest semver level that any change in the changeset warrants (for example, a `minor` bump in `iwer` plus a `patch` in `@iwer/sem` results in a `minor` for the whole group).
16+
17+
## Workflow
18+
19+
```bash
20+
# Add a changeset describing a user-facing change
21+
pnpm changeset
22+
23+
# Apply pending changesets: bumps versions, updates peerDeps and CHANGELOGs
24+
pnpm run version
25+
26+
# Build all packages and publish to npm (requires npm auth)
27+
pnpm release
28+
```

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [["iwer", "@iwer/devui", "@iwer/sem"]],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.changeset/tired-chicken-take.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
---
3+
4+
Migrate to pnpm monorepo with synced package versions

.github/dependabot.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,6 @@ updates:
99
prefix: 'chore'
1010
prefix-development: 'chore'
1111
include: 'scope'
12-
- package-ecosystem: 'npm'
13-
directory: '/devui'
14-
schedule:
15-
interval: 'weekly'
16-
open-pull-requests-limit: 10
17-
commit-message:
18-
prefix: 'chore'
19-
prefix-development: 'chore'
20-
include: 'scope'
21-
- package-ecosystem: 'npm'
22-
directory: '/sem'
23-
schedule:
24-
interval: 'weekly'
25-
open-pull-requests-limit: 10
26-
commit-message:
27-
prefix: 'chore'
28-
prefix-development: 'chore'
29-
include: 'scope'
3012
- package-ecosystem: 'github-actions'
3113
directory: '/'
3214
schedule:

.github/workflows/docs.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,25 @@ jobs:
2929
steps:
3030
- uses: actions/checkout@v4
3131

32+
- name: Install pnpm
33+
uses: pnpm/action-setup@v4
34+
with:
35+
version: 10.33.4
36+
3237
- name: Use Node.js ${{ matrix.node-version }}
3338
uses: actions/setup-node@v4
3439
with:
3540
node-version: ${{ matrix.node-version }}
41+
cache: 'pnpm'
3642

3743
- name: Install dependencies
38-
run: npm ci
44+
run: pnpm install --frozen-lockfile
3945

4046
- name: Build library
41-
run: npm run build
47+
run: pnpm build:all
4248

4349
- name: Build doc site
44-
run: npm run docs:build
50+
run: pnpm docs:build
4551

4652
- name: Upload artifact
4753
uses: actions/upload-pages-artifact@v3

.github/workflows/test.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,23 @@ jobs:
1212

1313
steps:
1414
- uses: actions/checkout@v4
15+
- name: Install pnpm
16+
uses: pnpm/action-setup@v4
17+
with:
18+
version: 10.33.4
1519
- name: Use Node.js ${{ matrix.node-version }}
1620
uses: actions/setup-node@v4
1721
with:
1822
node-version: ${{ matrix.node-version }}
19-
- run: npm ci
20-
- run: npm run build
21-
- run: npm test
23+
cache: 'pnpm'
24+
- run: pnpm install --frozen-lockfile
25+
- run: pnpm --filter @iwer/e2e exec playwright install --with-deps chromium
26+
- run: pnpm build:all
27+
- run: pnpm typecheck
28+
- run: pnpm test:all
29+
- run: pnpm lint
30+
- run: pnpm format:check
31+
- run: pnpm changeset:status
32+
- run: pnpm docs:build
33+
- run: pnpm build:tgz
34+
- run: pnpm examples:build

.gitignore

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1-
/.yarn/*
2-
!/.yarn/releases
3-
!/.yarn/plugins
4-
!/.yarn/sdks
5-
6-
# Swap the comments on the following lines if you don't wish to use zero-installs
7-
# Documentation here: https://yarnpkg.com/features/zero-installs
8-
!/.yarn/cache
9-
#/.pnp.*
1+
# Dependencies
2+
node_modules/
3+
**/node_modules/
4+
**/pnpm-debug.log*
5+
**/npm-debug.log*
6+
**/yarn-debug.log*
7+
**/yarn-error.log*
108

9+
# Build outputs
1110
lib/
1211
build/
1312
dist/
14-
node_modules/
13+
*.tgz
14+
**/*.tsbuildinfo
15+
.eslintcache
1516

1617
/.vscode/
18+
.idea/
1719

1820
# blender backups
1921
*.blend?
@@ -23,8 +25,15 @@ node_modules/
2325
docs/.vitepress/dist/
2426
docs/.vitepress/cache/
2527

28+
# Generated source files (created by package prebuild scripts)
2629
**/src/version.ts
30+
packages/sem/src/registry.ts
2731

28-
*.tgz
32+
/coverage/
33+
packages/e2e/test-results/
34+
playwright-report/
35+
test-results/
36+
examples/**/pnpm-lock.yaml
2937

30-
/coverage/
38+
# Husky internal runtime (we track .husky/pre-commit but not its scaffolding)
39+
.husky/_

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm exec lint-staged

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
strict-peer-dependencies=false
2+
only-built-dependencies[]=esbuild

.prettierignore

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,21 @@
1-
/src/assets/*
2-
/src/style/*
1+
node_modules
2+
dist
3+
lib
4+
build
5+
coverage
6+
docs/.vitepress/cache
7+
docs/.vitepress/dist
8+
pnpm-lock.yaml
9+
pnpm-workspace.yaml
10+
*.tgz
11+
examples/**/node_modules
12+
examples/**/pnpm-lock.yaml
13+
examples/basic/cap.min.js
14+
packages/**/node_modules
15+
packages/sem/captures
16+
packages/sem/src/generated
17+
packages/sem/src/registry.ts
18+
**/version.ts
19+
playwright-report
20+
test-results
21+
.husky/_

0 commit comments

Comments
 (0)