Skip to content

build: drop vite-plugin-static-copy - #388

Merged
AndyScherzinger merged 1 commit into
mainfrom
fix/drop-vite-plugin-static-copy
Oct 17, 2026
Merged

AndyScherzinger merged 1 commit into
mainfrom
fix/drop-vite-plugin-static-copy

Conversation

@AndyScherzinger

Copy link
Copy Markdown
Member

Follow-up to #387. The 3 high-severity npm audit items left are one chain: vite-plugin-static-copy → chokidar 3 → braces, affected by GHSA-vfj7-8cjw-p6xm in every braces version. The plugin's latest release (4.1.1) still uses chokidar 3, and npm audit fix --force would downgrade it to 0.2.0.

The plugin only copied src/viewer.js (the script the editor iframe loads as is) to js/viewer.js. A small inline Vite plugin now emits that file and watches it in watch mode, and the dependency is dropped.

  • The build output is unchanged: the same 226 files in js/, and js/viewer.js is byte-identical to src/viewer.js.
  • npm audit goes from 15 vulnerabilities (3 high) to 12 (6 low, 6 moderate). The rest come from @nextcloud/vite-config (vite-plugin-dts and the Node polyfills) and have no fix available.
  • Tested in the browser on 32, 34 and 36: open, save and public share.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (N/A)

vite-plugin-static-copy only copied src/viewer.js to js/viewer.js, and
pulled in chokidar 3 with braces, which GHSA-vfj7-8cjw-p6xm affects in
every version. A small inline plugin emits the file instead and watches
it in watch mode.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@nextcloud-command nextcloud-command added the AI assisted This PR contains AI-assisted commits label Oct 17, 2026
@AndyScherzinger AndyScherzinger added this to the v0.1.4 milestone Oct 17, 2026
@AndyScherzinger
AndyScherzinger merged commit 0abe6c3 into main Oct 17, 2026
8 checks passed
@AndyScherzinger
AndyScherzinger deleted the fix/drop-vite-plugin-static-copy branch October 17, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI assisted This PR contains AI-assisted commits

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants