@augustofarnese/qs-patch 6.15.0-patched.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/package.json ADDED
@@ -0,0 +1,90 @@
1
+ {
2
+ "name": "@augustofarnese/qs-patch",
3
+ "description": "A querystring parser that supports nesting and arrays, with a depth limit",
4
+ "version": "6.15.0-patched.1",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/ljharb/qs.git"
8
+ },
9
+ "funding": {
10
+ "url": "https://github.com/sponsors/ljharb"
11
+ },
12
+ "main": "lib/index.js",
13
+ "sideEffects": false,
14
+ "contributors": [
15
+ {
16
+ "name": "Jordan Harband",
17
+ "email": "ljharb@gmail.com",
18
+ "url": "http://ljharb.codes"
19
+ }
20
+ ],
21
+ "keywords": [
22
+ "querystring",
23
+ "qs",
24
+ "query",
25
+ "url",
26
+ "parse",
27
+ "stringify"
28
+ ],
29
+ "engines": {
30
+ "node": ">=0.6"
31
+ },
32
+ "dependencies": {
33
+ "side-channel": "^1.1.0"
34
+ },
35
+ "devDependencies": {
36
+ "@browserify/envify": "^6.0.0",
37
+ "@browserify/uglifyify": "^6.0.0",
38
+ "@ljharb/eslint-config": "^22.1.3",
39
+ "browserify": "^16.5.2",
40
+ "bundle-collapser": "^1.4.0",
41
+ "common-shakeify": "~1.0.0",
42
+ "eclint": "^2.8.1",
43
+ "es-value-fixtures": "^1.7.1",
44
+ "eslint": "^9.39.2",
45
+ "evalmd": "^0.0.19",
46
+ "for-each": "^0.3.5",
47
+ "glob": "=10.3.7",
48
+ "has-bigints": "^1.1.0",
49
+ "has-override-mistake": "^1.0.1",
50
+ "has-property-descriptors": "^1.0.2",
51
+ "has-proto": "^1.2.0",
52
+ "has-symbols": "^1.1.0",
53
+ "iconv-lite": "^0.5.1",
54
+ "in-publish": "^2.0.1",
55
+ "jackspeak": "=2.1.1",
56
+ "jiti": "^0.0.0",
57
+ "mkdirp": "^0.5.5",
58
+ "mock-property": "^1.1.0",
59
+ "module-deps": "^6.2.3",
60
+ "npmignore": "^0.3.5",
61
+ "nyc": "^10.3.2",
62
+ "object-inspect": "^1.13.4",
63
+ "qs-iconv": "^1.0.4",
64
+ "safe-publish-latest": "^2.0.0",
65
+ "safer-buffer": "^2.1.2",
66
+ "tape": "^5.9.0",
67
+ "unassertify": "^3.0.1"
68
+ },
69
+ "scripts": {
70
+ "pretest": "npm run --silent readme && npm run --silent lint",
71
+ "test": "npm run tests-only",
72
+ "tests-only": "nyc tape 'test/**/*.js'",
73
+ "posttest": "npx npm@'>=10.2' audit --production",
74
+ "readme": "evalmd README.md",
75
+ "postlint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)",
76
+ "lint": "eslint .",
77
+ "dist": "mkdirp dist && browserify --standalone Qs -g unassertify -g @browserify/envify -g [@browserify/uglifyify --mangle.keep_fnames --compress.keep_fnames --format.indent_level=1 --compress.arrows=false --compress.passes=4 --compress.typeofs=false] -p common-shakeify -p bundle-collapser/plugin lib/index.js > dist/qs.js"
78
+ },
79
+ "license": "BSD-3-Clause",
80
+ "publishConfig": {
81
+ "ignore": [
82
+ "!dist/*",
83
+ "bower.json",
84
+ "component.json",
85
+ ".github/workflows",
86
+ "logos",
87
+ "tea.yaml"
88
+ ]
89
+ }
90
+ }
@@ -0,0 +1,267 @@
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+ emptyTestCases: [
5
+ {
6
+ input: '&',
7
+ withEmptyKeys: {},
8
+ stringifyOutput: {
9
+ brackets: '',
10
+ indices: '',
11
+ repeat: ''
12
+ },
13
+ noEmptyKeys: {}
14
+ },
15
+ {
16
+ input: '&&',
17
+ withEmptyKeys: {},
18
+ stringifyOutput: {
19
+ brackets: '',
20
+ indices: '',
21
+ repeat: ''
22
+ },
23
+ noEmptyKeys: {}
24
+ },
25
+ {
26
+ input: '&=',
27
+ withEmptyKeys: { '': '' },
28
+ stringifyOutput: {
29
+ brackets: '=',
30
+ indices: '=',
31
+ repeat: '='
32
+ },
33
+ noEmptyKeys: {}
34
+ },
35
+ {
36
+ input: '&=&',
37
+ withEmptyKeys: { '': '' },
38
+ stringifyOutput: {
39
+ brackets: '=',
40
+ indices: '=',
41
+ repeat: '='
42
+ },
43
+ noEmptyKeys: {}
44
+ },
45
+ {
46
+ input: '&=&=',
47
+ withEmptyKeys: { '': ['', ''] },
48
+ stringifyOutput: {
49
+ brackets: '[]=&[]=',
50
+ indices: '[0]=&[1]=',
51
+ repeat: '=&='
52
+ },
53
+ noEmptyKeys: {}
54
+ },
55
+ {
56
+ input: '&=&=&',
57
+ withEmptyKeys: { '': ['', ''] },
58
+ stringifyOutput: {
59
+ brackets: '[]=&[]=',
60
+ indices: '[0]=&[1]=',
61
+ repeat: '=&='
62
+ },
63
+ noEmptyKeys: {}
64
+ },
65
+ {
66
+ input: '=',
67
+ withEmptyKeys: { '': '' },
68
+ noEmptyKeys: {},
69
+ stringifyOutput: {
70
+ brackets: '=',
71
+ indices: '=',
72
+ repeat: '='
73
+ }
74
+ },
75
+ {
76
+ input: '=&',
77
+ withEmptyKeys: { '': '' },
78
+ stringifyOutput: {
79
+ brackets: '=',
80
+ indices: '=',
81
+ repeat: '='
82
+ },
83
+ noEmptyKeys: {}
84
+ },
85
+ {
86
+ input: '=&&&',
87
+ withEmptyKeys: { '': '' },
88
+ stringifyOutput: {
89
+ brackets: '=',
90
+ indices: '=',
91
+ repeat: '='
92
+ },
93
+ noEmptyKeys: {}
94
+ },
95
+ {
96
+ input: '=&=&=&',
97
+ withEmptyKeys: { '': ['', '', ''] },
98
+ stringifyOutput: {
99
+ brackets: '[]=&[]=&[]=',
100
+ indices: '[0]=&[1]=&[2]=',
101
+ repeat: '=&=&='
102
+ },
103
+ noEmptyKeys: {}
104
+ },
105
+ {
106
+ input: '=&a[]=b&a[1]=c',
107
+ withEmptyKeys: { '': '', a: ['b', 'c'] },
108
+ stringifyOutput: {
109
+ brackets: '=&a[]=b&a[]=c',
110
+ indices: '=&a[0]=b&a[1]=c',
111
+ repeat: '=&a=b&a=c'
112
+ },
113
+ noEmptyKeys: { a: ['b', 'c'] }
114
+ },
115
+ {
116
+ input: '=a',
117
+ withEmptyKeys: { '': 'a' },
118
+ noEmptyKeys: {},
119
+ stringifyOutput: {
120
+ brackets: '=a',
121
+ indices: '=a',
122
+ repeat: '=a'
123
+ }
124
+ },
125
+ {
126
+ input: 'a==a',
127
+ withEmptyKeys: { a: '=a' },
128
+ noEmptyKeys: { a: '=a' },
129
+ stringifyOutput: {
130
+ brackets: 'a==a',
131
+ indices: 'a==a',
132
+ repeat: 'a==a'
133
+ }
134
+ },
135
+ {
136
+ input: '=&a[]=b',
137
+ withEmptyKeys: { '': '', a: ['b'] },
138
+ stringifyOutput: {
139
+ brackets: '=&a[]=b',
140
+ indices: '=&a[0]=b',
141
+ repeat: '=&a=b'
142
+ },
143
+ noEmptyKeys: { a: ['b'] }
144
+ },
145
+ {
146
+ input: '=&a[]=b&a[]=c&a[2]=d',
147
+ withEmptyKeys: { '': '', a: ['b', 'c', 'd'] },
148
+ stringifyOutput: {
149
+ brackets: '=&a[]=b&a[]=c&a[]=d',
150
+ indices: '=&a[0]=b&a[1]=c&a[2]=d',
151
+ repeat: '=&a=b&a=c&a=d'
152
+ },
153
+ noEmptyKeys: { a: ['b', 'c', 'd'] }
154
+ },
155
+ {
156
+ input: '=a&=b',
157
+ withEmptyKeys: { '': ['a', 'b'] },
158
+ stringifyOutput: {
159
+ brackets: '[]=a&[]=b',
160
+ indices: '[0]=a&[1]=b',
161
+ repeat: '=a&=b'
162
+ },
163
+ noEmptyKeys: {}
164
+ },
165
+ {
166
+ input: '=a&foo=b',
167
+ withEmptyKeys: { '': 'a', foo: 'b' },
168
+ noEmptyKeys: { foo: 'b' },
169
+ stringifyOutput: {
170
+ brackets: '=a&foo=b',
171
+ indices: '=a&foo=b',
172
+ repeat: '=a&foo=b'
173
+ }
174
+ },
175
+ {
176
+ input: 'a[]=b&a=c&=',
177
+ withEmptyKeys: { '': '', a: ['b', 'c'] },
178
+ stringifyOutput: {
179
+ brackets: '=&a[]=b&a[]=c',
180
+ indices: '=&a[0]=b&a[1]=c',
181
+ repeat: '=&a=b&a=c'
182
+ },
183
+ noEmptyKeys: { a: ['b', 'c'] }
184
+ },
185
+ {
186
+ input: 'a[]=b&a=c&=',
187
+ withEmptyKeys: { '': '', a: ['b', 'c'] },
188
+ stringifyOutput: {
189
+ brackets: '=&a[]=b&a[]=c',
190
+ indices: '=&a[0]=b&a[1]=c',
191
+ repeat: '=&a=b&a=c'
192
+ },
193
+ noEmptyKeys: { a: ['b', 'c'] }
194
+ },
195
+ {
196
+ input: 'a[0]=b&a=c&=',
197
+ withEmptyKeys: { '': '', a: ['b', 'c'] },
198
+ stringifyOutput: {
199
+ brackets: '=&a[]=b&a[]=c',
200
+ indices: '=&a[0]=b&a[1]=c',
201
+ repeat: '=&a=b&a=c'
202
+ },
203
+ noEmptyKeys: { a: ['b', 'c'] }
204
+ },
205
+ {
206
+ input: 'a=b&a[]=c&=',
207
+ withEmptyKeys: { '': '', a: ['b', 'c'] },
208
+ stringifyOutput: {
209
+ brackets: '=&a[]=b&a[]=c',
210
+ indices: '=&a[0]=b&a[1]=c',
211
+ repeat: '=&a=b&a=c'
212
+ },
213
+ noEmptyKeys: { a: ['b', 'c'] }
214
+ },
215
+ {
216
+ input: 'a=b&a[0]=c&=',
217
+ withEmptyKeys: { '': '', a: ['b', 'c'] },
218
+ stringifyOutput: {
219
+ brackets: '=&a[]=b&a[]=c',
220
+ indices: '=&a[0]=b&a[1]=c',
221
+ repeat: '=&a=b&a=c'
222
+ },
223
+ noEmptyKeys: { a: ['b', 'c'] }
224
+ },
225
+ {
226
+ input: '[]=a&[]=b& []=1',
227
+ withEmptyKeys: { '': ['a', 'b'], ' ': ['1'] },
228
+ stringifyOutput: {
229
+ brackets: '[]=a&[]=b& []=1',
230
+ indices: '[0]=a&[1]=b& [0]=1',
231
+ repeat: '=a&=b& =1'
232
+ },
233
+ noEmptyKeys: { 0: 'a', 1: 'b', ' ': ['1'] }
234
+ },
235
+ {
236
+ input: '[0]=a&[1]=b&a[0]=1&a[1]=2',
237
+ withEmptyKeys: { '': ['a', 'b'], a: ['1', '2'] },
238
+ noEmptyKeys: { 0: 'a', 1: 'b', a: ['1', '2'] },
239
+ stringifyOutput: {
240
+ brackets: '[]=a&[]=b&a[]=1&a[]=2',
241
+ indices: '[0]=a&[1]=b&a[0]=1&a[1]=2',
242
+ repeat: '=a&=b&a=1&a=2'
243
+ }
244
+ },
245
+ {
246
+ input: '[deep]=a&[deep]=2',
247
+ withEmptyKeys: { '': { deep: ['a', '2'] }
248
+ },
249
+ stringifyOutput: {
250
+ brackets: '[deep][]=a&[deep][]=2',
251
+ indices: '[deep][0]=a&[deep][1]=2',
252
+ repeat: '[deep]=a&[deep]=2'
253
+ },
254
+ noEmptyKeys: { deep: ['a', '2'] }
255
+ },
256
+ {
257
+ input: '%5B0%5D=a&%5B1%5D=b',
258
+ withEmptyKeys: { '': ['a', 'b'] },
259
+ stringifyOutput: {
260
+ brackets: '[]=a&[]=b',
261
+ indices: '[0]=a&[1]=b',
262
+ repeat: '=a&=b'
263
+ },
264
+ noEmptyKeys: { 0: 'a', 1: 'b' }
265
+ }
266
+ ]
267
+ };