{"_id":"@berryn/exceljs-compat","_rev":"3-81856986061f58ca953e405ab67eec57","name":"@berryn/exceljs-compat","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"@berryn/exceljs-compat","version":"0.1.0","author":"Berryn Core Engineering Team","license":"MIT","_id":"@berryn/exceljs-compat@0.1.0","maintainers":[{"name":"aaryan28","email":"aaryan28rwt@gmail.com"}],"homepage":"https://github.com/Grevix/berryn","bugs":{"url":"https://github.com/Grevix/berryn/issues"},"dist":{"shasum":"3297e4e2074a38acdd527285c87e0a04e23aa649","tarball":"https://registry.npmjs.org/@berryn/exceljs-compat/-/exceljs-compat-0.1.0.tgz","fileCount":52,"integrity":"sha512-nYL91OuYpCIEnxRPmX2lGzXyQSo88bOM+D27d7ODwO0BPTFJtgxb9uWPbQ45lyZHN/YM0Sds+j+yGNwCS20B4Q==","signatures":[{"sig":"MEUCIQCBDzDZIYJDA/niv1DnlYv2H9paH7lqBDrUC7C1xGbA8QIgGGaKISkMv4P6skmQ+Fv1TPCDak/i7UPctWBBzgTTT6k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":86857},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"scripts":{"build":"tsc --build","clean":"rimraf dist"},"_npmUser":{"name":"aaryan28","email":"aaryan28rwt@gmail.com"},"repository":{"url":"https://github.com/Grevix/berryn.git","type":"git"},"description":"Berryn ExcelJS Compatibility Facade — Narrow, evidence-gated import replacement for ExcelJS","directories":{},"_nodeVersion":"24.14.0","dependencies":{"@berryn/core":"0.1.0","@berryn/diagnostics":"0.1.0","@berryn/xlsx-inspect":"0.1.0"},"_hasShrinkwrap":false,"devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/exceljs-compat_0.1.0_1787000924186_0.5014442029122945","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@berryn/exceljs-compat","version":"0.2.0","author":{"name":"Berryn Core Engineering Team"},"license":"MIT","_id":"@berryn/exceljs-compat@0.2.0","maintainers":[{"name":"aaryan28","email":"aaryan28rwt@gmail.com"}],"homepage":"https://github.com/Grevix/berryn#readme","bugs":{"url":"https://github.com/Grevix/berryn/issues"},"dist":{"shasum":"4d88196200af3aeaa23e31fa3f2d62c5fba7035e","tarball":"https://registry.npmjs.org/@berryn/exceljs-compat/-/exceljs-compat-0.2.0.tgz","fileCount":42,"integrity":"sha512-7EBW5Qv0ylx6UalR1NucH/acSutWtbtTRXta5pkJzaBnLI8x6qCt4IKvqil6w0IQNLL4SXkMUxw27Av92tbA+A==","signatures":[{"sig":"MEYCIQCc42anKuLyOqJBddq9R18BpwwWElfnwlPgpZ6jROcBpgIhAMhr7kWfxVqL6isfWwcv117Y7016X5A9vrKMrQvvWF/L","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":68615},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"gitHead":"fc466500ff83c2753bb41429713719eacd7895d4","scripts":{"build":"tsc --build","clean":"rimraf dist"},"_npmUser":{"name":"aaryan28","email":"aaryan28rwt@gmail.com"},"repository":{"url":"git+https://github.com/Grevix/berryn.git","type":"git"},"_npmVersion":"11.9.0","description":"Berryn ExcelJS Compatibility Facade — Narrow, evidence-gated import replacement for ExcelJS","directories":{},"_nodeVersion":"24.14.0","dependencies":{"@berryn/core":"workspace:*","@berryn/diagnostics":"workspace:*","@berryn/xlsx-inspect":"workspace:*"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{},"peerDependencies":{"@types/node":">=22.0.0"},"peerDependenciesMeta":{"@types/node":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/exceljs-compat_0.2.0_1788160240640_0.8945726195253607","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@berryn/exceljs-compat","version":"0.2.1","description":"Berryn ExcelJS Compatibility Facade — Narrow, evidence-gated import replacement for ExcelJS","repository":{"type":"git","url":"git+https://github.com/Grevix/berryn.git"},"homepage":"https://github.com/Grevix/berryn#readme","bugs":{"url":"https://github.com/Grevix/berryn/issues"},"license":"MIT","author":{"name":"Berryn Core Engineering Team"},"engines":{"node":">=22.0.0"},"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"type":"module","scripts":{"build":"tsc --build","clean":"rimraf dist"},"dependencies":{"@berryn/core":"0.2.1","@berryn/diagnostics":"0.2.1","@berryn/xlsx-inspect":"0.2.1"},"peerDependencies":{"@types/node":">=22.0.0"},"peerDependenciesMeta":{"@types/node":{"optional":true}},"devDependencies":{},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"gitHead":"576fa2934836ad4f045966f8a86d99490cbea05b","_id":"@berryn/exceljs-compat@0.2.1","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-CviIYWGAEpLWeoGo/R4+eXqCWZfvvCZGaOH03n2pkA2TUGl3X7qe8h83lileOXicvM76lnPp+ojWZ7ZYWzKofA==","shasum":"841dffaa0d0a3b04b2be612aecab84c22bc26edd","tarball":"https://registry.npmjs.org/@berryn/exceljs-compat/-/exceljs-compat-0.2.1.tgz","fileCount":42,"unpackedSize":68597,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC40wCllVuklRh6JMIiMjsB5jClaGlUeGP7/afCfK33iQIgINP9BZqLx63F33SAGZ4/fchMpYOpYz4afT/DtsJeKSY="}]},"_npmUser":{"name":"aaryan28","email":"aaryan28rwt@gmail.com"},"directories":{},"maintainers":[{"name":"aaryan28","email":"aaryan28rwt@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/exceljs-compat_0.2.1_1788165842093_0.6400939010826758"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-17T21:08:43.851Z","modified":"2026-08-31T08:44:02.422Z","0.1.0":"2026-08-17T21:08:44.346Z","0.2.0":"2026-08-31T07:10:40.767Z","0.2.1":"2026-08-31T08:44:02.228Z"},"bugs":{"url":"https://github.com/Grevix/berryn/issues"},"author":{"name":"Berryn Core Engineering Team"},"license":"MIT","homepage":"https://github.com/Grevix/berryn#readme","repository":{"type":"git","url":"git+https://github.com/Grevix/berryn.git"},"description":"Berryn ExcelJS Compatibility Facade — Narrow, evidence-gated import replacement for ExcelJS","maintainers":[{"name":"aaryan28","email":"aaryan28rwt@gmail.com"}],"readme":"# @berryn/exceljs-compat\n\n> **Narrow compatibility facade for ExcelJS (`Workbook`, `Worksheet`, `Cell`) with explicit error boundaries.**\n\n[![npm version](https://img.shields.io/npm/v/@berryn/exceljs-compat.svg)](https://www.npmjs.com/package/@berryn/exceljs-compat)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Node.js](https://img.shields.io/badge/node-%3E%3D22.0.0-brightgreen.svg)](https://nodejs.org)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.7%2B-blue.svg)](https://www.typescriptlang.org/)\n\n---\n\n## Overview\n\n`@berryn/exceljs-compat` provides a high-fidelity, drop-in replacement facade for core `exceljs` workflows. It models standard workbook manipulation (`Workbook`, `Worksheet`, `Row`, `Column`, `Cell`, cell styling, formulas, merged cells, data validations, page setup, and tables).\n\n### The \"No Silent Corruption\" Contract\n\nUnlike conventional mock libraries or loosely compatible wrappers that silently ignore unhandled methods or corrupt formatting:\n- Supported ExcelJS APIs function with byte/semantic accuracy.\n- Unsupported methods fail **loudly and immediately** with a typed `BerrynCompatibilityError` and actionable remediation advice (`BRN-COMPAT-001`).\n- Preserved OOXML parts (charts, drawings, macros) are retained without corruption.\n\n---\n\n## Installation\n\n```bash\n# Using pnpm\npnpm add @berryn/exceljs-compat\n\n# Using npm\nnpm install @berryn/exceljs-compat\n```\n\n---\n\n## Migration Quickstart\n\nSimply point your existing `exceljs` imports to `@berryn/exceljs-compat`:\n\n```diff\n- import ExcelJS from 'exceljs';\n+ import ExcelJS from '@berryn/exceljs-compat';\n```\n\nOr use named imports:\n\n```typescript\nimport { Workbook } from '@berryn/exceljs-compat';\n\nconst workbook = new Workbook();\nconst worksheet = workbook.addWorksheet('Q3 Financials');\n\n// Cell access and values\nworksheet.getCell('A1').value = 'Revenue';\nworksheet.getCell('B1').value = 150000;\nworksheet.getCell('B1').numFmt = '$#,##0.00';\n\n// Formulas\nworksheet.getCell('C1').value = { formula: 'B1*1.15', result: 172500 };\n\n// Styling\nworksheet.getCell('A1').font = { bold: true, color: { argb: 'FF0000FF' } };\nworksheet.getCell('A1').fill = {\n  type: 'pattern',\n  pattern: 'solid',\n  fgColor: { argb: 'FFEFEFEF' }\n};\n\n// Row and column manipulation\nworksheet.getColumn(1).width = 20;\nworksheet.getRow(1).height = 25;\n\n// Merged cells\nworksheet.mergeCells('D1:F1');\n\n// Save workbook\nawait workbook.xlsx.writeFile('financials.xlsx');\n```\n\n---\n\n## Supported APIs & Capabilities\n\n| Class | Supported Methods / Properties | Status |\n|---|---|---|\n| `Workbook` | `addWorksheet`, `getWorksheet`, `worksheets`, `creator`, `created`, `views`, `xlsx.readFile`, `xlsx.writeFile`, `xlsx.load`, `xlsx.writeBuffer` | **Fully Supported** |\n| `Worksheet` | `getCell`, `getRow`, `getColumn`, `mergeCells`, `unMergeCells`, `addTable`, `addPivotTable`, `protect`, `pageSetup`, `autoFilter`, `views` | **Fully Supported** |\n| `Cell` | `value`, `text`, `type`, `font`, `fill`, `border`, `alignment`, `numFmt`, `dataValidation` | **Fully Supported** |\n| `Row` | `values`, `height`, `hidden`, `font`, `alignment`, `getCell`, `commit` | **Fully Supported** |\n| `Column` | `width`, `hidden`, `values`, `font`, `alignment`, `numFmt`, `key` | **Fully Supported** |\n| `Table` | `name`, `ref`, `headerRow`, `totalsRow`, `style`, `columns` | **Supported** |\n| `Protection` | `protect(password, options)`, `unprotect()` | **Supported** |\n\n---\n\n## Explicit Error Boundary Example\n\nWhen unmodeled or deprecated methods are invoked, an explicit `BerrynCompatibilityError` is thrown:\n\n```typescript\nimport { Workbook } from '@berryn/exceljs-compat';\nimport { BerrynCompatibilityError } from '@berryn/core';\n\nconst wb = new Workbook();\nconst ws = wb.addWorksheet('Sheet1');\n\ntry {\n  // If an unsupported legacy internal method is called\n  (ws as any).unsupportedLegacyMethod();\n} catch (err) {\n  if (err instanceof BerrynCompatibilityError) {\n    console.error(err.diagnostic.code); // BRN-COMPAT-001\n    console.error(err.diagnostic.remediation);\n  }\n}\n```\n\n---\n\n## Exported Symbols\n\n- `Workbook`: Main container class managing sheets, calculation properties, and serialization.\n- `Worksheet`: Sheet grid controller managing cell values, merging, rows, columns, and tables.\n- `Cell`: Individual cell data holder managing values, types, rich text, and styles.\n- `Row` & `Column`: Dimension and formatting controllers.\n- `WorksheetProtection`: Password hashing and permission flags.\n- `Table` & `PivotTable`: Structured table and pivot definition models.\n\n---\n\n## Links\n\n- **Repository**: [https://github.com/Grevix/berryn](https://github.com/Grevix/berryn)\n- **License**: [MIT](https://opensource.org/licenses/MIT) © 2026 Berryn Core Engineering Team\n","readmeFilename":"README.md"}