From e1e9b5f1b2b1773152e84498de07528bf2943554 Mon Sep 17 00:00:00 2001 From: Alan Delimon Date: Mon, 28 Oct 2024 11:54:29 -0400 Subject: [PATCH] Convert xlsx to xlsx-republish to allow tracking of most current xlsx package --- package.json | 2 +- src/config.ts | 2 +- src/index.ts | 2 +- src/workbook.ts | 2 +- test/specs/parse.spec.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 67ceae3..4dfba5f 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "repository": "github:mgcrea/node-xlsx", "license": "Apache-2.0", "dependencies": { - "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz" + "xlsx-republish": "^0.20.3" }, "devDependencies": { "@mgcrea/eslint-config-node": "^0.10.0", diff --git a/src/config.ts b/src/config.ts index 99f446d..8bf59ee 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,4 +1,4 @@ import * as fs from "fs"; -import { set_fs } from "xlsx"; +import { set_fs } from "xlsx-republish"; set_fs(fs); diff --git a/src/index.ts b/src/index.ts index 6ebaf68..c33964c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,7 +12,7 @@ import { utils, write, WritingOptions, -} from "xlsx"; +} from "xlsx-republish"; import "./config"; import { isString } from "./helpers"; import { WorkBook } from "./workbook"; diff --git a/src/workbook.ts b/src/workbook.ts index 243f059..904f268 100644 --- a/src/workbook.ts +++ b/src/workbook.ts @@ -1,4 +1,4 @@ -import type { WorkSheet, WorkBook as XLSXWorkBook } from "xlsx"; +import type { WorkSheet, WorkBook as XLSXWorkBook } from "xlsx-republish"; export class WorkBook implements XLSXWorkBook { Sheets: Record = {}; diff --git a/test/specs/parse.spec.ts b/test/specs/parse.spec.ts index 008e2fe..edc3efc 100644 --- a/test/specs/parse.spec.ts +++ b/test/specs/parse.spec.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from "vitest"; -import xlsx from "xlsx"; +import xlsx from "xlsx-republish"; import { parse as parseXSLX } from "../../src"; import { readBufferFixture, readFixture } from "../utils";