convert-csv-to-json 4.2.0 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +3 -0
- package/.eslintrc.json +48 -0
- package/.github/workflows/ci-cd.yml +28 -2
- package/docs/api/BrowserApi.html +2435 -0
- package/docs/api/BrowserApiError.html +522 -0
- package/docs/api/ConfigurationError.html +594 -0
- package/docs/api/CsvFormatError.html +530 -0
- package/docs/api/CsvParsingError.html +384 -0
- package/docs/api/CsvToJson.html +3136 -0
- package/docs/api/CsvToJsonAsync.html +2672 -0
- package/docs/api/FileOperationError.html +270 -0
- package/docs/api/FileUtils.html +1012 -0
- package/docs/api/InputValidationError.html +293 -0
- package/docs/api/JsonUtil.html +340 -0
- package/docs/api/JsonValidationError.html +247 -0
- package/docs/api/fonts/OpenSans-Bold-webfont.eot +0 -0
- package/docs/api/fonts/OpenSans-Bold-webfont.svg +1830 -0
- package/docs/api/fonts/OpenSans-Bold-webfont.woff +0 -0
- package/docs/api/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
- package/docs/api/fonts/OpenSans-BoldItalic-webfont.svg +1830 -0
- package/docs/api/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
- package/docs/api/fonts/OpenSans-Italic-webfont.eot +0 -0
- package/docs/api/fonts/OpenSans-Italic-webfont.svg +1830 -0
- package/docs/api/fonts/OpenSans-Italic-webfont.woff +0 -0
- package/docs/api/fonts/OpenSans-Light-webfont.eot +0 -0
- package/docs/api/fonts/OpenSans-Light-webfont.svg +1831 -0
- package/docs/api/fonts/OpenSans-Light-webfont.woff +0 -0
- package/docs/api/fonts/OpenSans-LightItalic-webfont.eot +0 -0
- package/docs/api/fonts/OpenSans-LightItalic-webfont.svg +1835 -0
- package/docs/api/fonts/OpenSans-LightItalic-webfont.woff +0 -0
- package/docs/api/fonts/OpenSans-Regular-webfont.eot +0 -0
- package/docs/api/fonts/OpenSans-Regular-webfont.svg +1831 -0
- package/docs/api/fonts/OpenSans-Regular-webfont.woff +0 -0
- package/docs/api/global.html +3315 -0
- package/docs/api/index.html +326 -0
- package/docs/api/index.js.html +341 -0
- package/docs/api/scripts/linenumber.js +25 -0
- package/docs/api/scripts/prettify/Apache-License-2.0.txt +202 -0
- package/docs/api/scripts/prettify/lang-css.js +2 -0
- package/docs/api/scripts/prettify/prettify.js +28 -0
- package/docs/api/src_browserApi.js.html +271 -0
- package/docs/api/src_csvToJson.js.html +605 -0
- package/docs/api/src_csvToJsonAsync.js.html +244 -0
- package/docs/api/src_util_errors.js.html +374 -0
- package/docs/api/src_util_fileUtils.js.html +147 -0
- package/docs/api/src_util_jsonUtils.js.html +75 -0
- package/docs/api/src_util_stringUtils.js.html +212 -0
- package/docs/api/styles/jsdoc-default.css +358 -0
- package/docs/api/styles/prettify-jsdoc.css +111 -0
- package/docs/api/styles/prettify-tomorrow.css +132 -0
- package/index.js +109 -32
- package/jsdoc.json +17 -0
- package/package.json +10 -3
- package/src/browserApi.js +96 -4
- package/src/csvToJson.js +163 -2
- package/src/csvToJsonAsync.js +74 -14
- package/src/util/errors.js +96 -0
- package/src/util/fileUtils.js +34 -0
- package/src/util/jsonUtils.js +8 -0
- package/src/util/stringUtils.js +51 -0
package/.eslintignore
ADDED
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"root": true,
|
|
3
|
+
"env": {
|
|
4
|
+
"node": true,
|
|
5
|
+
"browser": true,
|
|
6
|
+
"es2024": true,
|
|
7
|
+
"jest": true
|
|
8
|
+
},
|
|
9
|
+
"extends": [
|
|
10
|
+
"eslint:recommended",
|
|
11
|
+
"plugin:jsdoc/recommended"
|
|
12
|
+
],
|
|
13
|
+
"plugins": ["jsdoc"],
|
|
14
|
+
"overrides": [
|
|
15
|
+
{
|
|
16
|
+
"files": ["test/**/*.js", "test/**/*.spec.js"],
|
|
17
|
+
"rules": {
|
|
18
|
+
"jsdoc/require-jsdoc": "off",
|
|
19
|
+
"no-unused-vars": "off"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"rules": {
|
|
24
|
+
"no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
|
|
25
|
+
"jsdoc/check-alignment": "error",
|
|
26
|
+
"jsdoc/check-param-names": "error",
|
|
27
|
+
"jsdoc/check-tag-names": "error",
|
|
28
|
+
"jsdoc/check-types": "warn",
|
|
29
|
+
"jsdoc/no-undefined-types": "warn",
|
|
30
|
+
"jsdoc/require-description": "warn",
|
|
31
|
+
"jsdoc/require-param": "error",
|
|
32
|
+
"jsdoc/require-returns": "error",
|
|
33
|
+
"jsdoc/require-jsdoc": [
|
|
34
|
+
"warn",
|
|
35
|
+
{
|
|
36
|
+
"require": {
|
|
37
|
+
"FunctionDeclaration": true,
|
|
38
|
+
"MethodDefinition": true,
|
|
39
|
+
"ClassDeclaration": false,
|
|
40
|
+
"ArrowFunctionExpression": false,
|
|
41
|
+
"FunctionExpression": false
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"no-mixed-spaces-and-tabs": "off",
|
|
46
|
+
"no-prototype-builtins": "off"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -19,11 +19,12 @@ jobs:
|
|
|
19
19
|
uses: actions/setup-node@v6
|
|
20
20
|
with:
|
|
21
21
|
node-version: ${{ matrix.node-version }}
|
|
22
|
-
- name: npm install, build, and
|
|
22
|
+
- name: npm install, lint, build, test, and docs
|
|
23
23
|
run: |
|
|
24
|
-
npm install
|
|
25
24
|
npm ci
|
|
25
|
+
npm run lint
|
|
26
26
|
npm test
|
|
27
|
+
npm run docs:api
|
|
27
28
|
env:
|
|
28
29
|
CI: true
|
|
29
30
|
|
|
@@ -47,5 +48,30 @@ jobs:
|
|
|
47
48
|
registry-url: 'https://registry.npmjs.org'
|
|
48
49
|
- name: npm-semver-publish
|
|
49
50
|
run: |
|
|
51
|
+
npm ci
|
|
50
52
|
npm run release
|
|
53
|
+
|
|
54
|
+
pages:
|
|
55
|
+
needs: release
|
|
56
|
+
if: github.ref == 'refs/heads/master'
|
|
57
|
+
name: deploy docs to GitHub Pages
|
|
58
|
+
runs-on: ubuntu-latest
|
|
59
|
+
steps:
|
|
60
|
+
- uses: actions/checkout@v6
|
|
61
|
+
- name: Use Node.js 24.x
|
|
62
|
+
uses: actions/setup-node@v6
|
|
63
|
+
with:
|
|
64
|
+
node-version: 24.x
|
|
65
|
+
- name: Install dependencies
|
|
66
|
+
run: npm ci
|
|
67
|
+
- name: Generate API docs
|
|
68
|
+
run: npm run docs:api
|
|
69
|
+
- name: Configure GitHub Pages
|
|
70
|
+
uses: actions/configure-pages@v4
|
|
71
|
+
- name: Upload pages artifact
|
|
72
|
+
uses: actions/upload-pages-artifact@v13
|
|
73
|
+
with:
|
|
74
|
+
path: docs/api
|
|
75
|
+
- name: Deploy to GitHub Pages
|
|
76
|
+
uses: actions/deploy-pages@v2
|
|
51
77
|
|