Skip to content

fix(web): make sync-assets script cross-platform (#25760)#25790

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-65abd7c4
May 14, 2026
Merged

fix(web): make sync-assets script cross-platform (#25760)#25790
teknium1 merged 1 commit into
mainfrom
hermes/hermes-65abd7c4

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

The web/package.json sync-assets script used Unix rm -rf and cp -r, which fail on native Windows. Replaces with Node.js fs API calls (Node ≥16.7) — same behavior on POSIX, works on Windows, no new deps.

Salvage of #25760 by @HxT9.

The prebuild step used `rm -rf` and `cp -r`, which fail on Windows
(`'rm' is not recognized`). Replace with an inline Node one-liner
using fs.rmSync / fs.cpSync so the build works on Windows, macOS,
and Linux without adding a dependency.
@teknium1 teknium1 requested a review from a team May 14, 2026 15:04
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-65abd7c4 vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 8339 on HEAD, 8339 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 4387 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have javascript Pull requests that update javascript code labels May 14, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Competes with #13368 (broader fix: also surfaces build errors + fixes Unicode crash on cp1252) and #25090. Salvage of #25760.

@OutThisLife OutThisLife left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ur the man

@austinpickett

Copy link
Copy Markdown
Collaborator

This works, but we might want to look at adding vite-plugin-static-copy which will let us define this in the config, and apart of the vite startup.

// vite.config.ts
import { viteStaticCopy } from 'vite-plugin-static-copy'

export default defineConfig({
  plugins: [
    viteStaticCopy({
      targets: [
        { src: 'node_modules/@nous-research/ui/dist/fonts', dest: 'fonts' },
        { src: 'node_modules/@nous-research/ui/dist/assets', dest: 'ds-assets' }
      ]
    })
  ]
})

@teknium1 teknium1 merged commit ed84637 into main May 14, 2026
11 of 12 checks passed
@teknium1 teknium1 deleted the hermes/hermes-65abd7c4 branch May 14, 2026 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update javascript code P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants