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: .github/copilot-instructions.md
+26-3Lines changed: 26 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,30 @@ Not all data is generated. Some data (like protocol schemas) is manually curated
57
57
58
58
### Protocol data
59
59
60
-
We use a special yaml-like DSL to generate protocol.json files. Refer to doc/protocol.md for info.
61
-
These files are stored inside proto.yml files in the latest/ folder (like bedrock/latest/proto.yml) for the latest version, otherwise in the versioned folder (like pc/1.20/proto.yml).
60
+
We use a special YAML-like DSL to generate protocol.json files. Refer to doc/protocol.md for info.
61
+
These files are stored inside proto.yml (and an imported types.yml support file on bedrock) files in the latest/ folder (like bedrock/latest/proto.yml) for the latest version, otherwise in the versioned folder (like pc/1.20/proto.yml).
62
+
63
+
👉 Run `npm run build` in tools/js to regenerate protocol.json files after making changes to the protocol yaml files.
64
+
65
+
❌ Don't make changes to protocol.json files directly. Instead, update the relevant proto.yml file in latest/ and regenerate protocol.json by running `npm run build` in tools/js.
66
+
67
+
If you need to edit many files at once, consider writing a simple Node.js script to replace. E.g., from `cd tools/js && npm i && node __replace_something.js`):
Notably, run `npm run build` in tools/js to regenerate protocol.json files after making changes to the protocol yaml files. So, don't make changes to protocol.json files directly. Instead, update the relevant proto.yml file in latest/ and regenerate protocol.json by running `npm run build` in tools/js.
81
+
**Always** go into `tools/js` and run tests after data changes to ensure local tests are passing:
0 commit comments