fix: resolve security vulnerabilities, CSV parsing, and TypeScript compatibility#5
Open
2refocus wants to merge 8 commits intoacheronfail:masterfrom
Open
fix: resolve security vulnerabilities, CSV parsing, and TypeScript compatibility#52refocus wants to merge 8 commits intoacheronfail:masterfrom
2refocus wants to merge 8 commits intoacheronfail:masterfrom
Conversation
- Run npm audit fix to resolve 5 vulnerabilities (lodash, form-data, minimatch, brace-expansion, rollup, glob, picomatch, babel/runtime, yaml) - Upgrade vite from ^5.4.1 to ^6.4.2 (esbuild ^0.25.0 fixes CVE) - Upgrade @sveltejs/vite-plugin-svelte from ^4.0.0-next.7 to ^5.0.0 - Upgrade vitest from ^2.1.0 to ^3.2.4 - Upgrade svelte from ^5.0.0-next.243 to ^5.0.0 (stable) - Upgrade svelte-check from ^3.8.6 to ^4.0.0 Resolves 2 critical, 5 high, and 6 moderate severity vulnerabilities. npm audit now reports 0 vulnerabilities. Co-Authored-By: Oz <oz-agent@warp.dev>
Float Control CSVs can export the State column as numeric codes (e.g. 1, 3, 9) rather than string names. Use the existing stateCodeMap to translate these codes to their corresponding State enum values, eliminating 'Unknown state' warnings and downstream errors (invalid chart rotations, Leaflet bounds errors). Co-Authored-By: Oz <oz-agent@warp.dev>
The peer dependency conflict between @sveltejs/vite-plugin-svelte v5 and its inspector sub-package requires --legacy-peer-deps. Update npm ci calls in both workflows to match. Co-Authored-By: Oz <oz-agent@warp.dev>
…inaries npm ci fails on Linux when the lockfile was generated on macOS because platform-specific optional binaries (@rollup/rollup-linux-x64-gnu) are missing from the lockfile. Use npm install to resolve this. Co-Authored-By: Oz <oz-agent@warp.dev>
When the lockfile is generated on macOS, the Linux-specific rollup binary (@rollup/rollup-linux-x64-gnu) is absent from the lockfile. npm install --force ensures all optional platform binaries are installed correctly on the CI runner. Co-Authored-By: Oz <oz-agent@warp.dev>
Per the npm bug (npm/cli#4828), the lockfile generated on macOS prevents npm from installing the Linux-specific rollup binary. Deleting it before install forces npm to resolve the correct platform binary on the CI runner. Co-Authored-By: Oz <oz-agent@warp.dev>
Control.extend() return type is no longer assignable to typeof Control in newer TypeScript. Remove the annotation and let TypeScript infer it. Co-Authored-By: Oz <oz-agent@warp.dev>
Filter out rows with undefined/null time values before segmenting to prevent TypeError on toFixed calls. Add guard clause in segment logging as a safety net. Add tests covering missing time data scenarios. Co-Authored-By: Oz <oz-agent@warp.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses security vulnerabilities, a CSV parsing bug, and TypeScript/CI compatibility issues.
Changes
Security (13 vulnerabilities → 0)
Ran
npm audit fixand upgraded core tooling:vite:^5.4.1→^6.4.2(fixes esbuild dev-server CVE)@sveltejs/vite-plugin-svelte:^4.0.0-next.7→^5.0.0vitest:^2.1.0→^3.2.4svelte:^5.0.0-next.243→^5.0.0(stable)svelte-check:^3.8.6→^4.0.0lodash,form-data,rollup,minimatch,brace-expansion,picomatch,@babel/runtime,yaml,globBug fix: numeric state codes in CSV parser (
src/lib/parse/float-control.ts)Float Control CSVs can export the
Statecolumn as numeric codes (e.g.1,3,9) rather than string names. The parser now uses the existingstateCodeMapto translate these, eliminatingUnknown stateconsole warnings and downstream errors (invalid SVG rotations, Leaflet bounds errors).TypeScript fix:
Map.tsRemoved explicit
typeof Leaflet.Controlreturn type annotation fromcreateMapButton—Control.extend()is no longer assignable to that type in newer TypeScript. TypeScript correctly infers the return type.CI: workflows (
.github/workflows/)Updated
ci.ymlandpages.ymlto deletepackage-lock.jsonbefore install. This works around a known npm bug where macOS-generated lockfiles prevent Linux CI runners from installing platform-specific rollup binaries.Validation
npm audit— 0 vulnerabilities ✓npm run build— passes ✓npm run checks(types + svelte-check + tests) — all pass ✓Warp conversation
Co-Authored-By: Oz oz-agent@warp.dev