ejv 2.1.1 → 2.1.3

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.
Files changed (45) hide show
  1. package/.mocharc.json +8 -8
  2. package/CHANGELOG.md +134 -135
  3. package/LICENSE +21 -21
  4. package/README-KR.md +604 -597
  5. package/README.md +608 -603
  6. package/build/cjs/constants.js +1 -0
  7. package/build/cjs/constants.js.map +1 -1
  8. package/build/cjs/ejv.js +3 -0
  9. package/build/cjs/ejv.js.map +1 -1
  10. package/build/cjs/package.json +1 -1
  11. package/build/cjs/tester.js +11 -1
  12. package/build/cjs/tester.js.map +1 -1
  13. package/build/constants.d.ts +1 -0
  14. package/build/esm/constants.js +1 -0
  15. package/build/esm/constants.js.map +1 -1
  16. package/build/esm/ejv.js +4 -1
  17. package/build/esm/ejv.js.map +1 -1
  18. package/build/esm/package.json +1 -1
  19. package/build/esm/tester.js +9 -0
  20. package/build/esm/tester.js.map +1 -1
  21. package/build/tester.d.ts +1 -0
  22. package/eslint.config.mjs +66 -59
  23. package/package.json +56 -54
  24. package/scripts/add-js-extensions.ts +59 -59
  25. package/spec/ArrayScheme.ts +1021 -1021
  26. package/spec/CommonScheme.ts +251 -251
  27. package/spec/DateScheme.ts +472 -472
  28. package/spec/NumberScheme.ts +1160 -1160
  29. package/spec/ObjectScheme.ts +499 -499
  30. package/spec/RegExpScheme.ts +112 -112
  31. package/spec/StringScheme.ts +1407 -1336
  32. package/spec/common-test-util.ts +63 -63
  33. package/spec/ejv.spec.ts +235 -235
  34. package/spec/testers.spec.ts +833 -833
  35. package/src/constants.ts +164 -162
  36. package/src/ejv.ts +1751 -1746
  37. package/src/index.ts +14 -14
  38. package/src/interfaces.ts +144 -144
  39. package/src/tester.ts +323 -312
  40. package/src/util.ts +124 -124
  41. package/tsconfig.cjs.json +8 -8
  42. package/tsconfig.esm.json +7 -7
  43. package/tsconfig.json +19 -19
  44. package/tsconfig.scripts.json +14 -14
  45. package/tsconfig.types.json +9 -9
package/.mocharc.json CHANGED
@@ -1,8 +1,8 @@
1
- {
2
- "require": [
3
- "tsx"
4
- ],
5
- "spec": [
6
- "spec/**/*.ts"
7
- ]
8
- }
1
+ {
2
+ "require": [
3
+ "tsx"
4
+ ],
5
+ "spec": [
6
+ "spec/**/*.ts"
7
+ ]
8
+ }
package/CHANGELOG.md CHANGED
@@ -1,135 +1,134 @@
1
- # Change Log
2
-
3
- # 2.1.1
4
-
5
- - improvement
6
- - `notEnum` added
7
- - README indent optimized
8
- - dependencies version up
9
- - `typescript@5.6.2`
10
- - `eslint@9.12.0`
11
-
12
- # ~~2.1.0~~
13
-
14
- - publish failed
15
-
16
- # 2.0.5
17
-
18
- - bug fix
19
- - `min`, `max` error fix
20
-
21
- # ~~2.0.4~~
22
-
23
- - publish failed
24
-
25
- # 2.0.3
26
-
27
- - spec error fix
28
-
29
- # 2.0.2
30
-
31
- - improvement
32
- - `ejv()` does not throw error, just return `EjvError` object
33
- - `EjvError` - `isSchemeError`, `isDataError` properties added
34
- - `ErrorType`, `ErrorMsg` - `ONE_OF` renamed to `ONE_VALUE_OF`
35
- - esm build added
36
- - types : `build`
37
- - esm : `build/esm`
38
- - commonjs : `build/cjs`
39
- - dependency packages version up
40
- - `typescript@5.3.3`
41
-
42
- # 1.1.11
43
-
44
- - improvement
45
- - `eslint` added
46
- - `Scheme` interface subdivided with each type
47
- - new
48
- schemes: `BooleanScheme`, `NumberScheme`, `StringScheme`, `ObjectScheme`, `DateScheme`, `RegExpScheme`, `ArrayScheme`
49
- - specs subdivided
50
- - `not` rule added, but finally removed
51
- - `eslint` rule more added
52
-
53
- - bug fix
54
- - dependency packages version up
55
- - `mocha@9.1.3`
56
- - `typescript@4.3.5`
57
-
58
- # 1.1.10
59
-
60
- - bug fix
61
- - `numberTester()` covers `NaN`
62
-
63
- - dependency packages version up
64
- - `mocha@8.2.1`
65
- - `typescript@4.1.3`
66
-
67
- # 1.1.9
68
-
69
- - improvement
70
- - testers return type optimized
71
- - `length` rule added
72
- - bug fix
73
- - `tester.iso8601DateTester()` - `YYYYDDDD` format modified for leap year
74
- - `dateTester()` became stricter
75
- - `arrayTester()` use native function
76
-
77
- # 1.1.8
78
-
79
- - improvement
80
- - `CHANGELOG.md` file added
81
- - TypeScript `strict` flag set
82
-
83
- - dependency packages version up
84
- - `mocha@8.0.1`
85
- - `typescript@3.9.5`
86
-
87
- # 1.1.7
88
-
89
- - improvement
90
- - array error message format
91
-
92
- - bug fix
93
- - array temp key error fixed
94
-
95
- - dependency packages version up
96
- - `mocha@7.1.0`
97
- - `typeScript@3.8.3`
98
-
99
- # 1.1.6
100
-
101
- - improvement
102
- - `data` represent entire data passed to `ejv()`
103
- - `errorData` added to `EjvError`
104
- - `Function` declaration removed
105
-
106
- - bug fix
107
- - timezone error fixed
108
-
109
- # 1.1.5
110
-
111
- - improvement
112
- - `null`, `undefined` flow optimized
113
-
114
- - bug fix
115
- - `null` parsing error fixed
116
-
117
- # 1.1.4
118
-
119
- - improvement
120
- - array item `nullable` logic added
121
-
122
- # 1.1.3
123
-
124
- - improvement
125
- - array error path format
126
-
127
- # 1.1.2
128
-
129
- - bug fix
130
- - ITEMS_SCHEMES bug fixed
131
-
132
- # 1.1.1
133
-
134
- - improvement
135
- - `ErrorType.ITEMS_SCHEME` deprecated
1
+ # Change Log
2
+
3
+ # 2.1.1
4
+
5
+ - improvement
6
+ - `notEnum` added
7
+ - README indent optimized
8
+ - dependencies version up
9
+ - `typescript@5.6.2`
10
+ - `eslint@9.12.0`
11
+
12
+ # ~~2.1.0~~
13
+
14
+ - publish failed
15
+
16
+ # 2.0.5
17
+
18
+ - bug fix
19
+ - `min`, `max` error fix
20
+
21
+ # ~~2.0.4~~
22
+
23
+ - publish failed
24
+
25
+ # 2.0.3
26
+
27
+ - spec error fix
28
+
29
+ # 2.0.2
30
+
31
+ - improvement
32
+ - `ejv()` does not throw error, just return `EjvError` object
33
+ - `EjvError` - `isSchemeError`, `isDataError` properties added
34
+ - `ErrorType`, `ErrorMsg` - `ONE_OF` renamed to `ONE_VALUE_OF`
35
+ - esm build added
36
+ - types : `build`
37
+ - esm : `build/esm`
38
+ - commonjs : `build/cjs`
39
+ - dependency packages version up
40
+ - `typescript@5.3.3`
41
+
42
+ # 1.1.11
43
+
44
+ - improvement
45
+ - `eslint` added
46
+ - `Scheme` interface subdivided with each type
47
+ - new schemes: `BooleanScheme`, `NumberScheme`, `StringScheme`, `ObjectScheme`, `DateScheme`, `RegExpScheme`, `ArrayScheme`
48
+ - specs subdivided
49
+ - `not` rule added, but finally removed
50
+ - `eslint` rule more added
51
+
52
+ - bug fix
53
+ - dependency packages version up
54
+ - `mocha@9.1.3`
55
+ - `typescript@4.3.5`
56
+
57
+ # 1.1.10
58
+
59
+ - bug fix
60
+ - `numberTester()` covers `NaN`
61
+
62
+ - dependency packages version up
63
+ - `mocha@8.2.1`
64
+ - `typescript@4.1.3`
65
+
66
+ # 1.1.9
67
+
68
+ - improvement
69
+ - testers return type optimized
70
+ - `length` rule added
71
+ - bug fix
72
+ - `tester.iso8601DateTester()` - `YYYYDDDD` format modified for leap year
73
+ - `dateTester()` became stricter
74
+ - `arrayTester()` use native function
75
+
76
+ # 1.1.8
77
+
78
+ - improvement
79
+ - `CHANGELOG.md` file added
80
+ - TypeScript `strict` flag set
81
+
82
+ - dependency packages version up
83
+ - `mocha@8.0.1`
84
+ - `typescript@3.9.5`
85
+
86
+ # 1.1.7
87
+
88
+ - improvement
89
+ - array error message format
90
+
91
+ - bug fix
92
+ - array temp key error fixed
93
+
94
+ - dependency packages version up
95
+ - `mocha@7.1.0`
96
+ - `typeScript@3.8.3`
97
+
98
+ # 1.1.6
99
+
100
+ - improvement
101
+ - `data` represent entire data passed to `ejv()`
102
+ - `errorData` added to `EjvError`
103
+ - `Function` declaration removed
104
+
105
+ - bug fix
106
+ - timezone error fixed
107
+
108
+ # 1.1.5
109
+
110
+ - improvement
111
+ - `null`, `undefined` flow optimized
112
+
113
+ - bug fix
114
+ - `null` parsing error fixed
115
+
116
+ # 1.1.4
117
+
118
+ - improvement
119
+ - array item `nullable` logic added
120
+
121
+ # 1.1.3
122
+
123
+ - improvement
124
+ - array error path format
125
+
126
+ # 1.1.2
127
+
128
+ - bug fix
129
+ - ITEMS_SCHEMES bug fixed
130
+
131
+ # 1.1.1
132
+
133
+ - improvement
134
+ - `ErrorType.ITEMS_SCHEME` deprecated
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2018 Janghyun Han
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2018 Janghyun Han
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.