strict-qs 7.0.2 → 8.0.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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # [8.0.0](https://github.com/nfroidure/strict-qs/compare/v7.0.2...v8.0.0) (2023-08-12)
2
+
3
+
4
+
1
5
  ## [7.0.2](https://github.com/nfroidure/strict-qs/compare/v7.0.1...v7.0.2) (2023-01-05)
2
6
 
3
7
 
package/README.md CHANGED
@@ -7,8 +7,8 @@
7
7
  # strict-qs
8
8
  > A stricter Query String parser
9
9
 
10
- [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/nfroidure/strict-qs/blob/master/LICENSE)
11
- [![Coverage Status](https://coveralls.io/repos/github/nfroidure/strict-qs/badge.svg?branch=master)](https://coveralls.io/github/nfroidure/strict-qs?branch=master)
10
+ [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/nfroidure/strict-qs/blob/main/LICENSE)
11
+ [![Coverage Status](https://coveralls.io/repos/github/nfroidure/strict-qs/badge.svg?branch=main)](https://coveralls.io/github/nfroidure/strict-qs?branch=main)
12
12
 
13
13
 
14
14
  [//]: # (::contents:start)
@@ -139,4 +139,4 @@ qs(qsOptions, qsDefinition, '?pages=0&pages=1&pages=2');
139
139
  - [Nicolas Froidure](http://insertafter.com/en/index.html)
140
140
 
141
141
  # License
142
- [MIT](https://github.com/nfroidure/strict-qs/blob/master/LICENSE)
142
+ [MIT](https://github.com/nfroidure/strict-qs/blob/main/LICENSE)
package/dist/index.d.ts CHANGED
@@ -1,15 +1,15 @@
1
1
  export declare const SEARCH_FLAG = "?";
2
2
  export declare const BASE_10 = 10;
3
- export declare type QSOptions = {
3
+ export type QSOptions = {
4
4
  allowEmptySearch?: boolean;
5
5
  allowUnknownParams?: boolean;
6
6
  allowDefault?: boolean;
7
7
  allowUnorderedParams?: boolean;
8
8
  };
9
- export declare type QSValue = string | number | boolean;
10
- export declare type QSParamValue = QSValue;
11
- export declare type QSParamType = 'string' | 'number' | 'boolean';
12
- export declare type QSUniqueParameter = {
9
+ export type QSValue = string | number | boolean;
10
+ export type QSParamValue = QSValue;
11
+ export type QSParamType = 'string' | 'number' | 'boolean';
12
+ export type QSUniqueParameter = {
13
13
  name: string;
14
14
  description?: string;
15
15
  in: 'query';
@@ -19,7 +19,7 @@ export declare type QSUniqueParameter = {
19
19
  type: QSParamType;
20
20
  default?: QSParamValue;
21
21
  };
22
- export declare type QSArrayParameter = {
22
+ export type QSArrayParameter = {
23
23
  name: string;
24
24
  description?: string;
25
25
  in: 'query';
@@ -33,8 +33,8 @@ export declare type QSArrayParameter = {
33
33
  type: QSParamType;
34
34
  };
35
35
  };
36
- export declare type QSParameter = QSUniqueParameter | QSArrayParameter;
37
- export declare type QSParameterValues = {
36
+ export type QSParameter = QSUniqueParameter | QSArrayParameter;
37
+ export type QSParameterValues = {
38
38
  [name: string]: QSValue | QSValue[];
39
39
  };
40
40
  /**
package/package.json CHANGED
@@ -1,10 +1,4 @@
1
1
  {
2
- "name": "strict-qs",
3
- "version": "7.0.2",
4
- "description": "A stricter Query String parser",
5
- "type": "module",
6
- "main": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
2
  "metapak": {
9
3
  "configs": [
10
4
  "main",
@@ -30,8 +24,14 @@
30
24
  ]
31
25
  }
32
26
  },
27
+ "name": "strict-qs",
28
+ "version": "8.0.0",
29
+ "description": "A stricter Query String parser",
30
+ "type": "module",
31
+ "main": "dist/index.js",
32
+ "types": "dist/index.d.ts",
33
33
  "scripts": {
34
- "build": "rimraf -f 'dist' && tsc --outDir dist",
34
+ "build": "rimraf 'dist' && tsc --outDir dist",
35
35
  "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md",
36
36
  "cli": "env NODE_ENV=${NODE_ENV:-cli}",
37
37
  "cover": "npm run jest -- --coverage",
@@ -44,7 +44,9 @@
44
44
  "precz": "npm t && npm run lint && npm run build && npm run doc && npm run metapak -- -s",
45
45
  "prettier": "prettier --write src/*.ts",
46
46
  "preversion": "npm t && npm run lint && npm run build && npm run doc && npm run metapak -- -s",
47
+ "rebuild": "swc ./src -s -d dist -C jsc.target=es2022",
47
48
  "test": "npm run jest",
49
+ "type-check": "tsc --pretty --noEmit",
48
50
  "version": "npm run changelog"
49
51
  },
50
52
  "repository": {
@@ -68,31 +70,33 @@
68
70
  },
69
71
  "homepage": "https://github.com/nfroidure/strict-qs#readme",
70
72
  "devDependencies": {
71
- "@typescript-eslint/eslint-plugin": "^5.36.0",
72
- "@typescript-eslint/parser": "^5.36.0",
73
- "commitizen": "^4.2.5",
74
- "conventional-changelog-cli": "^2.2.2",
73
+ "@swc/cli": "^0.1.62",
74
+ "@swc/core": "^1.3.76",
75
+ "@swc/helpers": "^0.5.1",
76
+ "@swc/jest": "^0.2.28",
77
+ "@typescript-eslint/eslint-plugin": "^6.3.0",
78
+ "@typescript-eslint/parser": "^6.3.0",
79
+ "commitizen": "^4.3.0",
80
+ "conventional-changelog-cli": "^3.0.0",
75
81
  "coveralls": "^3.1.1",
76
82
  "cz-conventional-changelog": "^3.3.0",
77
- "esbuild": "^0.15.6",
78
- "esbuild-jest": "^0.5.0",
79
- "eslint": "^8.23.0",
80
- "eslint-config-prettier": "^8.5.0",
81
- "eslint-plugin-prettier": "^4.2.1",
82
- "jest": "^29.0.1",
83
- "jsdoc-to-markdown": "^7.1.1",
84
- "metapak": "^4.0.6",
85
- "metapak-nfroidure": "13.0.0",
86
- "prettier": "^2.7.1",
87
- "rimraf": "^3.0.2",
88
- "typescript": "^4.8.2"
83
+ "eslint": "^8.46.0",
84
+ "eslint-config-prettier": "^9.0.0",
85
+ "eslint-plugin-prettier": "^5.0.0",
86
+ "jest": "^29.6.2",
87
+ "jsdoc-to-markdown": "^8.0.0",
88
+ "metapak": "^5.1.3",
89
+ "metapak-nfroidure": "15.0.0",
90
+ "prettier": "^3.0.1",
91
+ "rimraf": "^5.0.1",
92
+ "typescript": "^5.1.6"
89
93
  },
90
94
  "dependencies": {
91
95
  "debug": "^4.3.4",
92
- "yerror": "^6.2.1"
96
+ "yerror": "^7.0.0"
93
97
  },
94
98
  "engines": {
95
- "node": ">=16.15.0"
99
+ "node": ">=18.16.0"
96
100
  },
97
101
  "config": {
98
102
  "commitizen": {
@@ -106,15 +110,19 @@
106
110
  "conventional-changelog-cli",
107
111
  "typescript",
108
112
  "rimraf",
113
+ "@swc/cli",
114
+ "@swc/core",
115
+ "@swc/helpers",
109
116
  "eslint",
117
+ "prettier",
110
118
  "eslint-config-prettier",
111
119
  "eslint-plugin-prettier",
112
- "prettier",
113
120
  "@typescript-eslint/eslint-plugin",
114
121
  "@typescript-eslint/parser",
115
122
  "jsdoc-to-markdown",
116
123
  "jest",
117
- "coveralls"
124
+ "coveralls",
125
+ "@swc/jest"
118
126
  ]
119
127
  },
120
128
  "contributors": [],
@@ -173,11 +181,8 @@
173
181
  ],
174
182
  "transform": {
175
183
  "^.+\\.tsx?$": [
176
- "esbuild-jest",
177
- {
178
- "sourcemap": true,
179
- "format": "esm"
180
- }
184
+ "@swc/jest",
185
+ {}
181
186
  ]
182
187
  },
183
188
  "testEnvironment": "node",
@@ -186,6 +191,7 @@
186
191
  },
187
192
  "extensionsToTreatAsEsm": [
188
193
  ".ts"
189
- ]
194
+ ],
195
+ "prettierPath": null
190
196
  }
191
197
  }