Skip to content
Merged
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
31 changes: 1 addition & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
node-version: [18, 20, 22]
node-version: [20, 22]

steps:
- name: Checkout repository
Expand Down Expand Up @@ -126,32 +126,3 @@ jobs:

- name: Run tests with WASM
run: npm test

# # Publish to npm on release (manual trigger or tag)
# publish:
# name: Publish to npm
# runs-on: ubuntu-latest
# needs: [test, build]
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')

# steps:
# - name: Checkout repository
# uses: actions/checkout@v4

# - name: Setup Node.js
# uses: actions/setup-node@v4
# with:
# node-version: 20
# cache: 'npm'
# registry-url: 'https://registry.npmjs.org'

# - name: Install dependencies
# run: npm ci

# - name: Build package
# run: npm run build

# - name: Publish to npm
# run: npm publish --access public
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
57 changes: 57 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Publish to npm

on:
push:
tags:
- 'v*'

jobs:
publish:
name: Publish to npm
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm test

- name: Build package
run: npm run build

- name: Verify build output
run: |
test -f dist/esm/index.js
test -f dist/cjs/index.js
test -f dist/types/index.d.ts

- name: Publish to npm
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
body: |
## Installation

```bash
npm install cellify@${{ github.ref_name }}
```

See [CHANGELOG.md](https://github.com/abdullahmujahidali/Cellify/blob/main/CHANGELOG.md) for details.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
118 changes: 118 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Changelog

All notable changes to Cellify will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- **Event System**
- `sheet.on()` and `sheet.off()` for subscribing to sheet events
- `cellChange` event for value/formula changes
- `cellStyleChange` event for style changes
- `cellAdded` event when new cells are created
- `cellDeleted` event when cells are deleted
- Wildcard `'*'` listener for all events
- `sheet.setEventsEnabled()` to disable events during bulk operations

- **Change Tracking**
- `sheet.getChanges()` returns all changes since last commit
- `sheet.commitChanges()` clears the change buffer
- `sheet.changeCount` property for pending change count
- Each change has unique ID, type, address, old/new values, and timestamp

- **Undo/Redo**
- `sheet.undo()` and `sheet.redo()` for reversing changes
- `sheet.canUndo` and `sheet.canRedo` to check availability
- `sheet.undoCount` and `sheet.redoCount` for history size
- `sheet.batch(() => {...})` to group changes as single undo step
- `sheet.clearHistory()` to clear undo/redo stacks
- `sheet.setMaxUndoHistory(n)` to limit history size (default: 100)

- **Sorting**
- `sheet.sort(column, options)` for single column sorting
- `sheet.sortBy(columns, options)` for multi-column sorting
- Ascending/descending order support
- Header row preservation with `hasHeader` option
- Numeric sorting for string numbers with `numeric` option
- Case-insensitive sorting by default
- Date values sorted correctly
- Null values sorted to end
- Preserves cell styles, formulas, and comments when sorting
- Range-specific sorting with `range` option

- **Filtering**
- `sheet.filter(column, criteria)` for single column filtering
- `sheet.filterBy(filters)` for multi-column filtering
- `sheet.clearFilter()` to remove all filters
- `sheet.clearColumnFilter(column)` to remove filter on specific column
- Criteria options: `equals`, `notEquals`, `contains`, `startsWith`, `endsWith`
- Numeric criteria: `greaterThan`, `lessThan`, `between`, `notBetween`
- Value list criteria: `in`, `notIn`
- Empty checks: `isEmpty`, `isNotEmpty`
- Custom filter function support
- Case-insensitive string matching
- `sheet.isRowFiltered(row)` to check if row is hidden by filter
- `sheet.activeFilters` to get current filter configuration
- `sheet.filteredRows` to get set of filtered row indices

## [0.1.0] - 2025-12-21

### Added

- **Core Features**
- `Workbook` class for managing spreadsheet documents
- `Sheet` class with cell management, row/column configuration
- `Cell` class with values, formulas, styles, comments, hyperlinks, and validation

- **Excel Support**
- XLSX import with `xlsxToWorkbook()` and `xlsxBlobToWorkbook()`
- XLSX export with `workbookToXlsx()` and `workbookToXlsxBlob()`
- Shared strings and style registry for optimized file size
- Optional WASM acceleration for large files

- **CSV Support**
- CSV import with `csvToWorkbook()`, `csvToSheet()`, `csvBufferToWorkbook()`
- CSV export with `sheetToCsv()`, `sheetToCsvBuffer()`, `sheetsToCsv()`
- Automatic delimiter detection (comma, semicolon, tab, pipe)
- Smart type detection (numbers, dates, booleans, percentages, currency)
- RFC 4180 compliant parsing and writing

- **Styling**
- Font styling (bold, italic, underline, color, size, family)
- Fill patterns and colors
- Border styles (thin, medium, thick, double, dashed, dotted)
- Cell alignment (horizontal, vertical, text wrap, rotation)
- Number formats

- **Cell Features**
- Formula support (storage and cached results)
- Cell comments with author
- Hyperlinks with tooltips
- Data validation (whole, decimal, list, date, time, textLength, custom)
- Merged cells

- **Sheet Features**
- Row height and column width configuration
- Hidden rows and columns
- Frozen panes
- Auto-filter
- Sheet protection
- Named ranges

- **Accessibility**
- ARIA attribute helpers
- Screen reader announcements
- Keyboard navigation support

- **Developer Experience**
- Full TypeScript support with comprehensive types
- ESM and CommonJS builds
- Zero dependencies for core (only fflate for compression)
- Works in Node.js, Bun, Deno, and browsers

[Unreleased]: https://github.com/abdullahmujahidali/Cellify/compare/v0.1.0...HEAD
[0.1.0]: https://github.com/abdullahmujahidali/Cellify/releases/tag/v0.1.0
Loading