@isdk/json-repair 0.1.1
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/.prettierignore +4 -0
- package/.prettierrc +8 -0
- package/.versionrc +36 -0
- package/CHANGELOG.md +11 -0
- package/LICENSE-MIT +22 -0
- package/README.cn.md +101 -0
- package/README.md +103 -0
- package/TODO +0 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +181 -0
- package/dist/index.d.ts +181 -0
- package/dist/index.js +1 -0
- package/docs/README.md +107 -0
- package/docs/_media/README.cn.md +101 -0
- package/docs/classes/RepairParser.md +64 -0
- package/docs/classes/SchemaWalker.md +121 -0
- package/docs/functions/jsonRepair.md +48 -0
- package/docs/globals.md +24 -0
- package/docs/interfaces/RepairOptions.md +63 -0
- package/docs/type-aliases/JSONPath.md +14 -0
- package/eslint.config.mjs +31 -0
- package/package.json +69 -0
- package/setupVitest.mjs +15 -0
- package/tsconfig.json +19 -0
- package/tsconfig.spec.json +19 -0
- package/tsup.config.ts +34 -0
- package/typedoc.config.cjs +7 -0
- package/vite.config.mjs +16 -0
package/tsconfig.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "NodeNext",
|
|
5
|
+
"moduleResolution": "NodeNext",
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"outDir": "./dist",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"forceConsistentCasingInFileNames": true
|
|
12
|
+
},
|
|
13
|
+
"exclude": [
|
|
14
|
+
"node_modules",
|
|
15
|
+
"**/*.spec.ts",
|
|
16
|
+
"**/*.test.ts"
|
|
17
|
+
],
|
|
18
|
+
"include": ["src/**/*"]
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"types": ["jest", "node"],
|
|
4
|
+
"target": "es2020",
|
|
5
|
+
"module": "esnext",
|
|
6
|
+
"moduleResolution": "node",
|
|
7
|
+
"strict": true,
|
|
8
|
+
"typeRoots": ["./node_modules/@types", "./types"],
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"noUnusedLocals": true,
|
|
12
|
+
"noImplicitAny": true,
|
|
13
|
+
"resolveJsonModule": true
|
|
14
|
+
},
|
|
15
|
+
"exclude": [
|
|
16
|
+
"node_modules",
|
|
17
|
+
"**/*.spec.ts"
|
|
18
|
+
]
|
|
19
|
+
}
|
package/tsup.config.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineConfig } from 'tsup'
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
entry: ['src/index.ts'],
|
|
5
|
+
format: ['cjs', 'esm'],
|
|
6
|
+
// Inject cjs and esm shims:https://tsup.egoist.dev/#inject-cjs-and-esm-shims
|
|
7
|
+
shims: true,
|
|
8
|
+
// splitting: true,
|
|
9
|
+
// sourcemap: true,
|
|
10
|
+
// clean: true,
|
|
11
|
+
minify: 'terser',
|
|
12
|
+
terserOptions: {
|
|
13
|
+
// compress: {
|
|
14
|
+
// drop_console: true,
|
|
15
|
+
// drop_debugger: true,
|
|
16
|
+
// },
|
|
17
|
+
// https://terser.org/docs/options/#mangle-options
|
|
18
|
+
"mangle": {
|
|
19
|
+
"properties": {
|
|
20
|
+
"regex": /^_[$]/,
|
|
21
|
+
// "undeclared": true, // Mangle those names when they are accessed as properties of known top level variables but their declarations are never found in input code.
|
|
22
|
+
},
|
|
23
|
+
"toplevel": true,
|
|
24
|
+
"reserved": [
|
|
25
|
+
// # expected names in web-extension content
|
|
26
|
+
"WeakSet", "Set",
|
|
27
|
+
// # expected names in 3rd-party extensions' contents
|
|
28
|
+
"requestIdleCallback",
|
|
29
|
+
// # content global names:
|
|
30
|
+
"browser",
|
|
31
|
+
],
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
})
|
package/vite.config.mjs
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { defineConfig } from 'vite'
|
|
2
|
+
import tsconfigPaths from 'vite-tsconfig-paths';
|
|
3
|
+
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
plugins: [tsconfigPaths({
|
|
6
|
+
projects: ['./tsconfig.spec.json'],
|
|
7
|
+
})],
|
|
8
|
+
test: {
|
|
9
|
+
include: ['src/**/*.spec.ts', 'src/**/*.test.ts', 'test/*.spec.ts', 'test/*.test.ts'],
|
|
10
|
+
testTimeout: 80000,
|
|
11
|
+
globals: true,
|
|
12
|
+
"setupFiles": [
|
|
13
|
+
"./setupVitest.mjs"
|
|
14
|
+
],
|
|
15
|
+
},
|
|
16
|
+
})
|