Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .tegami/2026-08-23-d5a83f.md

This file was deleted.

21 changes: 0 additions & 21 deletions .tegami/2026-08-24-4e91cb.md

This file was deleted.

56 changes: 0 additions & 56 deletions .tegami/2026-09-03-7b3e41.md

This file was deleted.

20 changes: 0 additions & 20 deletions .tegami/2026-09-03-9c1f2a.md

This file was deleted.

24 changes: 8 additions & 16 deletions .tegami/publish-lock.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,23 @@
core:changelogs:
- content: "---\npackages:\n npm:@reactunity/create:\n type: patch\n---\n\n### Refresh the scaffold's prebuilt bundle, and keep it refreshed\n\nA scaffolded project renders `Assets/Resources/react/index.js` on first open, before the user has run a build. That bundle was webpack output from April 2024 carrying React 18.2, sitting in a project whose `package.json` asked for React 19. Nothing in the repo could catch it: generated output that nothing regenerates is invisible until someone scaffolds a project and looks at it.\n\n`scripts/create/refresh-scaffold.mts` rebuilds it from the scaffold's own app, in a temp copy so the shipped template never gains a `node_modules`, and a nightly workflow opens a PR when the result moves. Because the rebuild resolves the app's dependency ranges fresh, it also catches breakage arriving from upstream rather than only from a ReactUnity release. `--check` reports drift without writing, for use as a gate.\n\nIt verifies that the build still emits exactly the asset set the scaffold has `.meta` files for. A sourcemap or a hashed chunk would otherwise land in a user's project unimported, and anything that stopped being emitted would leave an orphan `.meta` behind.\n\nThe scaffold project itself moved to Unity 6000.5.5f1, matching the sample ReactUnity is developed against. The script reports that drift but never writes it — Unity performs an Editor upgrade by opening the project and re-serializing it, so editing `ProjectVersion.txt` alone would label a project upgraded without upgrading it.\n"
filename: 2026-08-18-7c4e19.md
v: 0.0.0
- content: "---\npackages:\n npm:@reactunity/create:\n type: patch\n---\n\n### Keep the scaffold's ReactUnity pins on the released version\n\nA scaffolded project asked for `com.reactunity.core` 0.18.0, `com.reactunity.quickjs` 0.17.1 and `@reactunity/renderer` ^0.20.1 — the UPM pair untouched since April 2024. The scaffold sits outside the pnpm workspace on purpose, so nothing in the release ever bumped it.\n\nThe rot was hidden rather than harmless: the CLI repairs both at scaffold time, `openupm-cli add` for the Unity manifest and `ncu -u` for the React app. Both are best-effort network calls, and both were dead on Windows for months, which handed those users the checked-in numbers verbatim.\n\n`syncUnityVersions` in `scripts/tegami.mts` now carries the released version into both files alongside the four UPM manifests, and throws if a pin it expects has been renamed away rather than leaving it silently frozen.\n"
filename: 2026-08-18-b93d05.md
v: 0.0.0
- content: "---\npackages:\n npm:@reactunity/create:\n type: patch\n---\n\n### Fix `npx @reactunity/create` failing to find its own scaffold\n\nEvery run ended at `Copying files failed` with `ENOENT ... dist/scaffold/react`. The scaffold ships at the package root, but the CLI resolves it relative to its own file — which stopped being the package root when tsdown moved the build output into `dist/`.\n\nThe entry point moved to `src/index.ts` so that source and bundle sit at the same depth, and the scaffold is now `../scaffold` from either. `.npmignore` still whitelisted the pre-tsdown `/index.js`; `dist/index.js` was only reaching the tarball because npm force-includes `bin`, so its sourcemap was being dropped.\n\nThe same run then failed at `spawn EINVAL` on Windows. Node 20.12 stopped spawning `.cmd` files directly (CVE-2024-27980), and `npx`, `npm` and `yarn` are all `.cmd` there — so the package update step, `--install` and `--unity`'s OpenUPM call were all dead. Those now go through a shell on Windows, with arguments quoted so a project path containing a space still works.\n"
filename: 2026-08-18-e4a71c.md
- content: "---\npackages:\n npm:@reactunity/renderer:\n type: minor\n---\n\n### A Vite preset for ReactUnity apps\n\n`@reactunity/renderer/vite` configures Vite the way a ReactUnity app needs it, so a project's whole\nconfig is:\n\n```ts\nimport reactUnity from '@reactunity/renderer/vite';\nimport { defineConfig } from 'vite';\n\nexport default defineConfig({ plugins: [reactUnity()] });\n```\n\n**Output goes into the Unity project.** The preset walks up from the Vite root looking for an\n`Assets` folder beside a `ProjectSettings/ProjectVersion.txt`, testing each ancestor and one level\nbelow it, and builds into that project's `Assets/Resources/react`. Both layouts are found: the app\ninside the project, and the app beside it. `unityProject` and `assetPath` say it outright when the\nguess is wrong, and it stays out of the way entirely if the config already sets `build.outDir`.\n\n**The output folder is cleaned, and the `.meta` files survive.** Unity writes a `.meta` beside every\nasset, and the GUID in it is what scenes and prefabs reference — so emptying the folder the way Vite\nwould means every rebuild mints new GUIDs and breaks whatever pointed at the old ones. The clean\ndeletes the output and leaves the metas, and once the build has written its files it drops only the\nmetas whose asset did not come back, along with any directory the build left empty. A build that\n*fails* leaves the metas alone, so the next successful one restores the files under their original\nGUIDs. `preserve` exempts paths the build does not own, and the clean refuses outright to run on a\ndirectory that is not plausibly build output — a package, a repository, an `Assets` folder, or\nanything containing the Vite root.\n\nFor the same reason, output filenames carry no content hash by default: a hash renames the file on\nevery build, which costs it its meta. `hashFileNames: true` restores Vite's naming.\n\n**Emitted assets carry their extension twice**, so `index.css` is written as `index.css.css`. Unity\nfinds a resource by its path minus the last extension, which makes `assets/index.js` and\n`assets/index.css` the same resource -- and asking for the script could hand back the stylesheet, to\nbe run as JavaScript. Doubling puts the type back into the name the lookup uses. Content hashes did\nthis by accident before; without them it has to be deliberate.\n\n**Assets are never inlined.** Vite turns a file under 4 kB into a `data:` URI, and Unity loads an\nasset URL through its own loaders — so a small image that got inlined stopped resolving. The limit\nis 0, which is where `react-unity-scripts` had it too.\n\n**CSS is emitted for an old browser.** ReactUnity's CSS subset does not know `oklch()`, `color-mix()`\nor nesting, and a stylesheet that uses them silently loses those declarations. `build.cssTarget`\ndefaults to `chrome87`, which is what makes Lightning CSS lower them on the way out — enough that\nTailwind v4's palette arrives as hex.\n\n**Vite's devtools and the HMR error overlay are off.** Neither has anywhere to draw in Unity, and an\noverlay rendered into a page nobody is looking at only hides the console message.\n\nEverything the config sets itself wins — the preset only fills in what was left out — and\n`react: false` drops `@vitejs/plugin-react` for a project that wants to configure React itself.\n"
filename: 2026-09-03-7b3e41.md
v: 0.0.0
core:packages:
- id: npm:@reactunity/monorepo
updated: false
- changelogIds:
- 2026-08-18-7c4e19.md
- 2026-08-18-b93d05.md
- 2026-08-18-e4a71c.md
id: npm:@reactunity/create
- id: npm:@reactunity/create
updated: true
- id: npm:@reactunity/material
updated: true
- id: npm:@reactunity/scripts
- changelogIds:
- 2026-09-03-7b3e41.md
id: npm:@reactunity/renderer
updated: true
- id: npm:@reactunity/renderer
- id: npm:@reactunity/scripts
updated: true
npm:packages:
- id: npm:@reactunity/monorepo
- id: npm:@reactunity/create
- id: npm:@reactunity/material
- id: npm:@reactunity/scripts
- id: npm:@reactunity/renderer
- id: npm:@reactunity/scripts
2 changes: 1 addition & 1 deletion packages/create/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@reactunity/create",
"version": "0.23.2",
"version": "0.24.0",
"description": "Scaffold a ReactUnity app using npm init",
"license": "MIT",
"//type": "ESM, as of the chalk 6 / commander 15 upgrade: both dropped CommonJS. index.ts is emitted next to itself as ESM, so `bin` keeps pointing at index.js.",
Expand Down
4 changes: 2 additions & 2 deletions packages/create/scaffold/Packages/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"dependencies": {
"com.reactunity.core": "0.23.2",
"com.reactunity.quickjs": "0.23.2",
"com.reactunity.core": "0.24.0",
"com.reactunity.quickjs": "0.24.0",
"com.unity.ai.navigation": "2.0.14",
"com.unity.editorcoroutines": "1.1.0",
"com.unity.ide.visualstudio": "2.0.26",
Expand Down
Loading
Loading