Skip to content

Commit

Permalink
Merge pull request #88 from LuisEnMarroquin/develop
Browse files Browse the repository at this point in the history
Develop to main version 2.5.5
  • Loading branch information
LuisEnMarroquin authored Oct 22, 2023
2 parents c00c1c9 + e65b059 commit 60904b5
Show file tree
Hide file tree
Showing 7 changed files with 13,701 additions and 2,573 deletions.
3 changes: 1 addition & 2 deletions packages/demo-express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
},
"dependencies": {
"@types/express": "^4.17.14",
"@types/node": "^18.11.11",
"express": "^4.18.2",
"json-as-xlsx": "file:../main-library",
"nodemon": "^2.0.20",
"nodemon": "^3.0.1",
"ts-node": "^10.9.1",
"typescript": "^4.9.4"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/demo-reactjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"private": true,
"type": "commonjs",
"dependencies": {
"@types/node": "^18.11.11",
"@types/node": "^20.8.7",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.9",
"json-as-xlsx": "file:../main-library",
Expand Down
10 changes: 5 additions & 5 deletions packages/main-library/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "json-as-xlsx",
"version": "2.5.4",
"version": "2.5.5",
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand All @@ -16,13 +16,13 @@
"test": "jest --coverage"
},
"dependencies": {
"xlsx": "https://cdn.sheetjs.com/xlsx-0.19.3/xlsx-0.19.3.tgz"
"@e965/xlsx": "^0.20.0"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/jest-dom": "^6.1.4",
"@types/jest": "^29.2.4",
"@types/node": "^18.11.11",
"@types/testing-library__jest-dom": "^5.14.5",
"@types/node": "^20.8.7",
"@types/testing-library__jest-dom": "^6.0.0",
"jest": "^29.3.1",
"jest-cli": "^29.3.1",
"jest-environment-jsdom": "^29.3.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { utils } from "xlsx"
import { utils } from "@e965/xlsx"
import { getJsonSheetRow, getWorksheetColumnWidths } from "../index"

test("Should return only one column width", () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/main-library/src/__tests__/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { read as readBufferWorkBook } from "xlsx"
import { read as readBufferWorkBook } from "@e965/xlsx"
import jsonxlsx, { IContent, IJsonSheet, ISettings } from "../index"

describe("json-as-xlsx", () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/main-library/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { utils, WorkBook, WorkSheet, write, writeFile, WritingOptions } from "xlsx"
import { utils, WorkBook, WorkSheet, write, writeFile, WritingOptions } from "@e965/xlsx"

export interface IColumn {
label: string
Expand Down Expand Up @@ -105,7 +105,7 @@ const getWorksheetColumnIds = (worksheet: WorkSheet): string[] => {

const getObjectLength = (object: unknown): number => {
if (typeof object === "string") {
return object.length
return Math.max(...object.split("\n").map((string) => string.length))
}
if (typeof object === "number") {
return object.toString().length
Expand Down
16,251 changes: 13,690 additions & 2,561 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit 60904b5

Please sign in to comment.