Skip to content

Commit

Permalink
Bump (#171)
Browse files Browse the repository at this point in the history
* chore: bump version and test snapshots

* chore: bump version and build script

* chore: bump main version

---------

Co-authored-by: Zheeeng <zheeeng@U-2Q9J2W94-2053.local>
  • Loading branch information
zheeeng and Zheeeng authored Jul 25, 2023
1 parent 859f347 commit 75da5a3
Show file tree
Hide file tree
Showing 8 changed files with 95 additions and 111 deletions.
12 changes: 6 additions & 6 deletions __tests__/__snapshots__/createCSVData.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@ exports[`createCSVData works correctly 1`] = `
"greeting,foo,bar,a,b,c,d,e,f
hello,,,,,,,,
,foo,bar,,,,,,
,,,100,\\"[1,2,3]\\",\\"{\\"\\"x\\"\\":200,\\"\\"y\\"\\":300}\\",D,null,"
,,,100,"[1,2,3]","{""x"":200,""y"":300}",D,null,"
`;

exports[`createCSVData works correctly 2`] = `
"greeting,foo,bar,a,b,c,d,e,f
\\"hel\\"\\"lo\\",,,,,,,,
,foo,\\"b\\"\\"a\\"\\"r\\",,,,,,
,,,100,\\"[1,2,3]\\",\\"{\\"\\"x\\"\\":200,\\"\\"y\\"\\":300}\\",D,null,"
"hel""lo",,,,,,,,
,foo,"b""a""r",,,,,,
,,,100,"[1,2,3]","{""x"":200,""y"":300}",D,null,"
`;

exports[`createCSVData works correctly with delimiter option 1`] = `
"greeting;foo;bar;a;b;c;d;e;f
hello;;;;;;;;
;foo;bar;;;;;;
;;;100;\\"[1,2,3]\\";\\"{\\"\\"x\\"\\":200,\\"\\"y\\"\\":300}\\";D;null;"
;;;100;"[1,2,3]";"{""x"":200,""y"":300}";D;null;"
`;

exports[`createCSVData works correctly with specifying beforeTableEncode option 1`] = `
"greeting,foo,bar,a,b,c,d,e,f
hello,0,0,0,0,0,0,0,0
0,foo,bar,0,0,0,0,0,0
0,0,0,1000,\\"[1,2,3]\\",\\"{\\"\\"x\\"\\":200,\\"\\"y\\"\\":300}\\",D,null,0"
0,0,0,1000,"[1,2,3]","{""x"":200,""y"":300}",D,null,0"
`;
2 changes: 1 addition & 1 deletion __tests__/__snapshots__/createJSONData.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`_createJSONData convert the plain object as the JSON.stringify does 1`] = `"[{\\"greeting\\":\\"hello\\"},{\\"foo\\":\\"foo\\",\\"bar\\":\\"bar\\"},{\\"a\\":100,\\"b\\":[1,2,3],\\"c\\":{\\"x\\":200,\\"y\\":300},\\"d\\":\\"D\\",\\"e\\":null}]"`;
exports[`_createJSONData convert the plain object as the JSON.stringify does 1`] = `"[{"greeting":"hello"},{"foo":"foo","bar":"bar"},{"a":100,"b":[1,2,3],"c":{"x":200,"y":300},"d":"D","e":null}]"`;
22 changes: 11 additions & 11 deletions __tests__/__snapshots__/createTableMap.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`_createTableMap works correctly 1`] = `
Object {
"a": Array [
{
"a": [
"",
"",
"100",
],
"b": Array [
"b": [
"",
"",
"[1,2,3]",
],
"bar": Array [
"bar": [
"",
"bar",
"",
],
"c": Array [
"c": [
"",
"",
"{\\"x\\":200,\\"y\\":300}",
"{"x":200,"y":300}",
],
"d": Array [
"d": [
"",
"",
"D",
],
"e": Array [
"e": [
"",
"",
"null",
],
"f": Array [
"f": [
"",
"",
"",
],
"foo": Array [
"foo": [
"",
"foo",
"",
],
"greeting": Array [
"greeting": [
"hello",
"",
"",
Expand Down
4 changes: 2 additions & 2 deletions __tests__/__snapshots__/createXLSData.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`createXLSData works correctly 1`] = `
"<html>
<head>
<meta charset=\\"UTF-8\\" />
<meta charset="UTF-8" />
</head >
<body>
Expand All @@ -14,7 +14,7 @@ exports[`createXLSData works correctly 1`] = `
<tbody>
<tr><td>hello</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td></td><td>foo</td><td>bar</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td></td><td></td><td></td><td>100</td><td>[1,2,3]</td><td>{\\"x\\":200,\\"y\\":300}</td><td>D</td><td>null</td><td></td></tr>
<tr><td></td><td></td><td></td><td>100</td><td>[1,2,3]</td><td>{"x":200,"y":300}</td><td>D</td><td>null</td><td></td></tr>
</tbody>
</table>
Expand Down
4 changes: 2 additions & 2 deletions __tests__/__snapshots__/createXMLData.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`createXMLData works correctly 1`] = `
"<?xml version=\\"1.0\\" encoding=\\"utf-8\\"?><!DOCTYPE base>
"<?xml version="1.0" encoding="utf-8"?><!DOCTYPE base>
<base>
<element>
<greeting>
Expand Down Expand Up @@ -50,7 +50,7 @@ exports[`createXMLData works correctly 1`] = `
`;

exports[`createXMLData works with empty array 1`] = `
"<?xml version=\\"1.0\\" encoding=\\"utf-8\\"?><!DOCTYPE base>
"<?xml version="1.0" encoding="utf-8"?><!DOCTYPE base>
<base>
</base>
Expand Down
19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "export-from-json",
"version": "1.7.2",
"version": "1.7.3",
"description": "Export to txt, json, csv, xls, xml format file from valid JavaScript JSON object.",
"keywords": [
"json",
Expand All @@ -23,7 +23,7 @@
"build": "npm run build:esm && npm run build:es2015 && npm run build:umd",
"build:es2015": "tsc -p ./config/tsconfig.es2015.json",
"build:esm": "tsc -p ./config/tsconfig.esm.json",
"build:umd": "rollup -c ./config/rollup.config.js",
"build:umd": "rollup -c ./config/rollup.config.js --bundleConfigAsCjs",
"test": "npm run test:lint && npm run test:spec",
"test:spec": "jest",
"test:update": "jest --updateSnapshot",
Expand All @@ -48,16 +48,17 @@
"./package.json": "./package.json"
},
"devDependencies": {
"@types/jest": "^29.0.0",
"husky": "^8.0.0",
"jest": "^29.0.0",
"rollup": "^3.0.0",
"@types/jest": "^29.5.3",
"@types/node": "^20.4.4",
"husky": "^8.0.3",
"jest": "^29.6.1",
"rollup": "^3.26.3",
"rollup-plugin-typescript2": "^0.35.0",
"rollup-plugin-uglify": "^6.0.4",
"ts-jest": "^29.0.0",
"tslib": "^2.3.1",
"ts-jest": "^29.1.1",
"tslib": "^2.6.1",
"tslint": "^6.1.3",
"typescript": "^5.0.2"
"typescript": "^5.1.6"
},
"jest": {
"extensionsToTreatAsEsm": [
Expand Down
Loading

0 comments on commit 75da5a3

Please sign in to comment.