@karmaniverous/jsonmap 2.0.5 → 2.1.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.
@@ -0,0 +1,108 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "anyOf": [
4
+ {
5
+ "anyOf": [
6
+ {
7
+ "type": "string"
8
+ },
9
+ {
10
+ "type": "number"
11
+ },
12
+ {
13
+ "type": "boolean"
14
+ },
15
+ {
16
+ "type": "null"
17
+ }
18
+ ]
19
+ },
20
+ {
21
+ "type": "object",
22
+ "propertyNames": {
23
+ "type": "string"
24
+ },
25
+ "additionalProperties": {
26
+ "anyOf": [
27
+ {
28
+ "$ref": "#"
29
+ },
30
+ {
31
+ "type": "object",
32
+ "properties": {
33
+ "$": {
34
+ "anyOf": [
35
+ {
36
+ "type": "object",
37
+ "properties": {
38
+ "method": {
39
+ "type": "string"
40
+ },
41
+ "params": {
42
+ "anyOf": [
43
+ {
44
+ "type": "string"
45
+ },
46
+ {
47
+ "type": "array",
48
+ "items": {
49
+ "type": "string"
50
+ }
51
+ }
52
+ ]
53
+ }
54
+ },
55
+ "required": [
56
+ "method",
57
+ "params"
58
+ ],
59
+ "additionalProperties": false
60
+ },
61
+ {
62
+ "type": "array",
63
+ "items": {
64
+ "type": "object",
65
+ "properties": {
66
+ "method": {
67
+ "type": "string"
68
+ },
69
+ "params": {
70
+ "anyOf": [
71
+ {
72
+ "type": "string"
73
+ },
74
+ {
75
+ "type": "array",
76
+ "items": {
77
+ "type": "string"
78
+ }
79
+ }
80
+ ]
81
+ }
82
+ },
83
+ "required": [
84
+ "method",
85
+ "params"
86
+ ],
87
+ "additionalProperties": false
88
+ }
89
+ }
90
+ ]
91
+ }
92
+ },
93
+ "required": [
94
+ "$"
95
+ ],
96
+ "additionalProperties": false
97
+ }
98
+ ]
99
+ }
100
+ },
101
+ {
102
+ "type": "array",
103
+ "items": {
104
+ "$ref": "#"
105
+ }
106
+ }
107
+ ]
108
+ }
package/package.json CHANGED
@@ -4,52 +4,42 @@
4
4
  "url": "https://github.com/karmaniverous/jsonmap/issues"
5
5
  },
6
6
  "dependencies": {
7
- "lodash": "^4.17.21",
8
- "nanoid": "^5.0.7",
9
- "tslog": "^4.9.3",
10
- "zod": "^3.23.8"
7
+ "lodash": "^4.17.23",
8
+ "nanoid": "^5.1.6",
9
+ "zod": "^4.3.6"
11
10
  },
12
11
  "description": "A hyper-generic JSON mapping library.",
13
12
  "devDependencies": {
14
- "@eslint/js": "^9.7.0",
15
- "@rollup/plugin-alias": "^5.1.0",
16
- "@rollup/plugin-commonjs": "^26.0.1",
13
+ "@dotenvx/dotenvx": "^1.52.0",
14
+ "@eslint/js": "^9.22.0",
15
+ "@rollup/plugin-alias": "^6.0.0",
16
+ "@rollup/plugin-commonjs": "^29.0.0",
17
17
  "@rollup/plugin-json": "^6.1.0",
18
- "@rollup/plugin-node-resolve": "^15.2.3",
19
- "@rollup/plugin-terser": "^0.4.4",
20
- "@rollup/plugin-typescript": "^11.1.6",
21
- "@types/chai": "^4.3.16",
22
- "@types/eslint__js": "^8.42.3",
23
- "@types/eslint-config-prettier": "^6.11.3",
24
- "@types/eslint-plugin-mocha": "^10.4.0",
25
- "@types/lodash": "^4.17.7",
26
- "@types/mocha": "^10.0.7",
18
+ "@rollup/plugin-node-resolve": "^16.0.3",
19
+ "@rollup/plugin-typescript": "^12.3.0",
20
+ "@types/lodash": "^4.17.23",
27
21
  "@types/numeral": "^2.0.5",
28
- "auto-changelog": "^2.4.0",
29
- "chai": "^5.1.1",
30
- "cross-env": "^7.0.3",
31
- "eslint": "^8.57.0",
32
- "eslint-config-prettier": "^9.1.0",
33
- "eslint-plugin-mocha": "^10.4.3",
22
+ "@vitest/eslint-plugin": "^1.6.9",
23
+ "cross-env": "^10.1.0",
24
+ "eslint": "^9.22.0",
25
+ "eslint-config-prettier": "^10.1.8",
26
+ "eslint-plugin-prettier": "^5.5.5",
34
27
  "eslint-plugin-simple-import-sort": "^12.1.1",
35
- "eslint-plugin-tsdoc": "^0.2.17",
36
- "fs-extra": "^11.2.0",
37
- "jsdom-global": "^3.0.2",
38
- "knip": "^5.26.0",
39
- "lefthook": "^1.7.2",
40
- "mocha": "^10.6.0",
28
+ "eslint-plugin-tsdoc": "^0.5.0",
29
+ "jiti": "^2.6.1",
30
+ "knip": "^5.84.1",
31
+ "lefthook": "^2.1.1",
41
32
  "numeral": "^2.0.6",
42
- "nyc": "^17.0.0",
43
- "prettier": "^3.3.3",
44
- "release-it": "^17.6.0",
45
- "rimraf": "^5.0.9",
46
- "rollup": "^4.18.1",
47
- "rollup-plugin-dts": "^6.1.1",
48
- "source-map-support": "^0.5.21",
49
- "ts-node": "^10.9.2",
50
- "tslib": "^2.6.3",
51
- "typescript": "^5.5.3",
52
- "typescript-eslint": "^7.16.1"
33
+ "prettier": "^3.8.1",
34
+ "release-it": "^19.2.4",
35
+ "rimraf": "^6.1.3",
36
+ "rollup": "^4.58.0",
37
+ "rollup-plugin-dts": "^6.3.0",
38
+ "tslib": "^2.8.1",
39
+ "tsx": "^4.21.0",
40
+ "typescript": "^5.9.3",
41
+ "typescript-eslint": "^8.56.0",
42
+ "vitest": "^4.0.18"
53
43
  },
54
44
  "exports": {
55
45
  ".": {
@@ -64,7 +54,8 @@
64
54
  }
65
55
  },
66
56
  "files": [
67
- "dist"
57
+ "dist",
58
+ "jsonmap.schema.json"
68
59
  ],
69
60
  "homepage": "https://github.com/karmaniverous/jsonmap#readme",
70
61
  "keywords": [
@@ -109,15 +100,17 @@
109
100
  "url": "https://github.com/karmaniverous/jsonmap"
110
101
  },
111
102
  "scripts": {
112
- "build": "rimraf dist && rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",
103
+ "build": "rimraf dist && cross-env NO_COLOR=1 rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript && npm run generate:schema",
104
+ "generate:schema": "tsx scripts/generate-json-schema.ts",
113
105
  "knip": "knip",
114
- "lint": "eslint src/** && prettier -c src",
115
- "lint:fix": "eslint --fix src/** && prettier --write src",
116
- "release": "release-it",
117
- "release:pre": "release-it --no-git.requireBranch --github.prerelease --preRelease",
118
- "test": "cross-env LOG_LEVEL=debug nyc mocha"
106
+ "lint": "eslint .",
107
+ "lint:fix": "eslint --fix .",
108
+ "release": "dotenvx run -f .env.local -- release-it",
109
+ "release:pre": "dotenvx run -f .env.local -- release-it --no-git.requireBranch --github.prerelease --preRelease",
110
+ "test": "vitest run",
111
+ "typecheck": "tsc"
119
112
  },
120
113
  "type": "module",
121
114
  "types": "dist/index.d.ts",
122
- "version": "2.0.5"
115
+ "version": "2.1.0"
123
116
  }