Skip to content

Remove papaparse#2

Merged
severo merged 41 commits intomainfrom
remove-papaparse
Nov 20, 2025
Merged

Remove papaparse#2
severo merged 41 commits intomainfrom
remove-papaparse

Conversation

@severo
Copy link
Contributor

@severo severo commented Nov 17, 2025

Papaparse is replaced by csv-range, a library I created for parsing remote CSV files. It allows byte-level control of the data we fetch (strings are complex, a character can have more than one byte, we take care of it).

Still some details to fix on this PR, and we should be good

@severo severo requested a review from Copilot November 20, 2025 14:36
@severo severo marked this pull request as ready for review November 20, 2025 14:36
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR replaces the papaparse CSV parsing library with csv-range, a custom library created by the author that provides byte-level control over remote CSV file fetching. The change enables more efficient parsing by controlling exactly which bytes are fetched from remote CSV files.

Key Changes

  • Complete rewrite of CSV parsing logic: Replaced papaparse with csv-range library, introducing new cache management (CSVCache, CSVRange) and dataframe implementation
  • Added comprehensive test suite: New test files for both dataframe and cache functionality using vitest
  • Code style modernization: Switched from double quotes to single quotes, removed semicolons, updated ESLint configuration with additional plugins (jsdoc, simple-import-sort, stylistic)

Reviewed Changes

Copilot reviewed 18 out of 21 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/cache.ts New file implementing CSVCache and CSVRange classes for efficient byte-range based CSV data caching
src/dataframe.ts New file implementing csvDataFrame function using csv-range library instead of papaparse
src/helpers.ts Removed formatBytes function, added checkNonNegativeInteger utility, updated JSDoc formatting
src/csv.ts Deleted - old papaparse-based implementation completely removed
src/App.tsx Removed AbortController usage, updated imports and code style
src/Page.tsx Updated DataFrame type import, changed metadata field from isPartial to isNumRowsEstimated
src/Welcome.tsx Added JSDoc comment, updated code style
src/Loading.tsx Updated JSDoc formatting, code style changes
src/Layout.tsx Updated JSDoc formatting, removed error parameter comment
src/Dropzone.tsx Updated JSDoc formatting, added inline function documentation
src/main.tsx Reorganized imports, code style changes
src/styles/hightable.css Adjusted rowheader font size and padding
vite.config.ts Reorganized imports, removed semicolons
eslint.config.js Complete rewrite with additional plugins and modern flat config format
package.json Replaced @severo_tests/papaparse with csv-range, added vitest and testing dependencies, updated hightable version
test/dataframe.test.ts New comprehensive test file for dataframe functionality
test/cache.test.ts New comprehensive test file for cache functionality
tsconfig.test.json New TypeScript configuration for test files
tsconfig.json Added reference to tsconfig.test.json
.gitignore Added coverage directory

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

severo and others added 5 commits November 20, 2025 15:45
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@severo severo merged commit a15f14e into main Nov 20, 2025
3 checks passed
@severo severo deleted the remove-papaparse branch November 20, 2025 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant