You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+22-5Lines changed: 22 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ For deeper context on a specific subsystem (component serialization, CRDT suppre
14
14
15
15
## Packages
16
16
17
-
Six packages under `packages/@dcl/` (npm workspaces):
17
+
Six packages under `packages/@dcl/` (a monorepo layout, but **not**npm workspaces):
18
18
19
19
| Package | Purpose |
20
20
| --- | --- |
@@ -27,6 +27,8 @@ Six packages under `packages/@dcl/` (npm workspaces):
27
27
28
28
Internal references use `file:../` paths during development; published versions get pinned semver ranges (managed via syncpack — see `make sync-deps`).
29
29
30
+
The root `package.json` has no `workspaces` field — root `make install` only installs root-level tooling deps. Each package keeps its own standalone `package-lock.json`, and per-package `node_modules/` are populated by `make build`, which runs `npm i` inside each package (`scripts/build.spec.ts`). Don't expect package deps to be hoisted to the root `node_modules/`.
31
+
30
32
## Development commands
31
33
32
34
The repo is orchestrated via **`make`** (the Makefile is the source of truth — `package.json` only carries `postinstall`). All commands run from the repo root:
@@ -47,10 +49,10 @@ The repo is orchestrated via **`make`** (the Makefile is the source of truth —
47
49
The full Jest suite is slow. For faster iteration, scope to a path pattern:
@@ -73,6 +75,21 @@ An `ERR!` line means the QuickJS eval threw mid-execution (commonly a missing mo
73
75
74
76
**Anti-pattern:** committing snapshots containing `ERR! Error: Unknown module ...`, `ERR! TypeError: ... is not a function`, or any other `ERR!` trace. Treat them as broken artifacts — fix the mock (or the underlying scene-load failure), regenerate, and re-verify before committing.
75
77
78
+
### Bumping `@dcl/inspector` (the vehicle for `@dcl/asset-packs`)
79
+
80
+
`@dcl/asset-packs` is not a direct dependency of this repo — it ships nested inside `@dcl/inspector`, and `packages/@dcl/sdk-commands/src/logic/bundle.ts` resolves it from the inspector's `node_modules`. To bump (prior art: commits `04270ca5`, `8b6bd63d`):
81
+
82
+
1.`cd packages/@dcl/sdk-commands && npm i --save-exact @dcl/inspector@<x.y.z>` — updates the pin, the package's standalone lockfile, and its `node_modules/` in one step (same pattern as the Makefile's `update-protocol` target).
83
+
2.`make build` from the repo root.
84
+
3. Regenerate snapshots with a `UPDATE_SNAPSHOTS=true` scoped Jest run — `test/snapshots/package-lock.json` updates itself during this run. Verify no `ERR!` lines (see above).
85
+
86
+
Asset-packs injection is gated behind `isEditorScene` (requires `assets/scene/main.composite` — see `packages/@dcl/sdk-commands/src/logic/project-validations.ts`), so inspector bumps no longer change `.crdt` snapshots. An empty snapshot diff is expected, not a stale artifact.
87
+
88
+
## Committing hygiene gotchas
89
+
90
+
- A newer local npm rewrites committed lockfiles with `"peer": true` / `"dev": true` metadata churn during installs (root and per-package lockfiles). Revert lockfile changes unrelated to your dependency change before committing.
91
+
-`make format` runs prettier over the whole repo, including paths CI's `make lint` does not check (`test/`, `scripts/`, dot-files), where HEAD may carry drift — a blind `make format` can dirty dozens of unrelated files. Check your own files, revert the rest.
|`--realm <name>`| Realm name shown in Explorer (default: `Localhost`) |
113
-
|`--web3`|Enable Web3 wallet integration in the preview|
113
+
|`--web3`|(deprecated) No effect; kept for backwards compatibility|
114
114
|`--skip-build`| Serve pre-built files without rebuilding |
115
115
|`--no-watch`| Disable file watching / hot reload |
116
116
|`--no-browser`| Don't auto-open Explorer |
117
117
|`--ci`| CI mode: disable browser and debug panel |
118
118
|`--debug`| Enable scene debug panel (on by default with `--explorer-alpha`) |
119
119
|`--explorer-alpha`| Use the new Alpha Explorer deeplink (default) |
120
-
|`--web-explorer`|Use legacy web-based Explorer |
120
+
|`--web, --bevy-web`|Open the preview in Bevy Web (`https://decentraland.org/bevy-web/`) instead of the desktop Explorer. Chrome 142+ requires the Local Network Access permission ("Apps on device" in 145+) for the page to reach the localhost preview server; the CLI prints instructions|
121
121
|`--mobile`| Print ASCII QR code for mobile preview |
122
122
|`--position <x,y>`| Initial spawn position (default: from `scene.json`) |
0 commit comments