Skip to content

Commit 542a5c7

Browse files
committed
Merge changelogs from v6.10.3, v6.9.7, v6.8.3, v6.7.3, v6.6.1, v6.5.3, v6.4.1, v6.3.3, v6.2.4
9 parents f92ddb5 + 4cd0032 + 0db5538 + 834389a + 4cc653c + 298bfa5 + 486aa46 + ff235b4 + 90d9f2b commit 542a5c7

File tree

8 files changed

+169
-23
lines changed

8 files changed

+169
-23
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,6 @@ indent_size = off
3838
indent_style = off
3939
indent = off
4040
max_line_length = off
41+
42+
[.nycrc]
43+
indent_style = tab

.eslintrc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"no-buffer-constructor": 0,
3333
"no-extend-native": 0,
3434
"no-throw-literal": 0,
35-
}
36-
}
37-
]
35+
},
36+
},
37+
],
3838
}

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ coverage/
1515
bower.json
1616
component.json
1717
.npmignore
18+
1819
.github/workflows

CHANGELOG.md

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,18 @@
2727
- [Tests] use `ljharb/actions/node/install` instead of `ljharb/actions/node/run`
2828
- [Tests] Revert "[meta] ignore eclint transitive audit warning"
2929

30+
## **6.9.7**
31+
- [Fix] `parse`: ignore `__proto__` keys (#428)
32+
- [Fix] `stringify`: avoid encoding arrayformat comma when `encodeValuesOnly = true` (#424)
33+
- [Robustness] `stringify`: avoid relying on a global `undefined` (#427)
34+
- [readme] remove travis badge; add github actions/codecov badges; update URLs
35+
- [Docs] add note and links for coercing primitive values (#408)
36+
- [Tests] clean up stringify tests slightly
37+
- [meta] fix README.md (#399)
38+
- Revert "[meta] ignore eclint transitive audit warning"
39+
- [actions] backport actions from main
40+
- [Dev Deps] backport updates from main
41+
3042
## **6.9.6**
3143
- [Fix] restore `dist` dir; mistakenly removed in d4f6c32
3244

@@ -75,6 +87,19 @@
7587
- [Tests] up to `node` `v12.10`, `v11.15`, `v10.16`, `v8.16`
7688
- [Tests] `Buffer.from` in node v5.0-v5.9 and v4.0-v4.4 requires a TypedArray
7789

90+
## **6.8.3**
91+
- [Fix] `parse`: ignore `__proto__` keys (#428)
92+
- [Robustness] `stringify`: avoid relying on a global `undefined` (#427)
93+
- [Fix] `stringify`: avoid encoding arrayformat comma when `encodeValuesOnly = true` (#424)
94+
- [readme] remove travis badge; add github actions/codecov badges; update URLs
95+
- [Tests] clean up stringify tests slightly
96+
- [Docs] add note and links for coercing primitive values (#408)
97+
- [meta] fix README.md (#399)
98+
- [actions] backport actions from main
99+
- [Dev Deps] backport updates from main
100+
- [Refactor] `stringify`: reduce branching
101+
- [meta] do not publish workflow files
102+
78103
## **6.8.2**
79104
- [Fix] proper comma parsing of URL-encoded commas (#361)
80105
- [Fix] parses comma delimited array while having percent-encoded comma treated as normal text (#336)
@@ -106,6 +131,19 @@
106131
- [meta] add FUNDING.yml
107132
- [meta] Clean up license text so it’s properly detected as BSD-3-Clause
108133

134+
## **6.7.3**
135+
- [Fix] `parse`: ignore `__proto__` keys (#428)
136+
- [Fix] `stringify`: avoid encoding arrayformat comma when `encodeValuesOnly = true` (#424)
137+
- [Robustness] `stringify`: avoid relying on a global `undefined` (#427)
138+
- [readme] remove travis badge; add github actions/codecov badges; update URLs
139+
- [Docs] add note and links for coercing primitive values (#408)
140+
- [meta] fix README.md (#399)
141+
- [meta] do not publish workflow files
142+
- [actions] backport actions from main
143+
- [Dev Deps] backport updates from main
144+
- [Tests] use `nyc` for coverage
145+
- [Tests] clean up stringify tests slightly
146+
109147
## **6.7.2**
110148
- [Fix] proper comma parsing of URL-encoded commas (#361)
111149
- [Fix] parses comma delimited array while having percent-encoded comma treated as normal text (#336)
@@ -144,6 +182,32 @@
144182
- [Tests] fix Buffer tests to work in node < 4.5 and node < 5.10
145183
- [Tests] temporarily allow coverage to fail
146184

185+
## **6.6.1**
186+
- [Fix] `parse`: ignore `__proto__` keys (#428)
187+
- [Fix] fix for an impossible situation: when the formatter is called with a non-string value
188+
- [Fix] `utils.merge`: avoid a crash with a null target and an array source
189+
- [Fix] `utils.merge`: avoid a crash with a null target and a truthy non-array source
190+
- [Fix] correctly parse nested arrays
191+
- [Robustness] `stringify`: avoid relying on a global `undefined` (#427)
192+
- [Robustness] `stringify`: cache `Object.prototype.hasOwnProperty`
193+
- [Refactor] `formats`: tiny bit of cleanup.
194+
- [Refactor] `utils`: `isBuffer`: small tweak; add tests
195+
- [Refactor]: `stringify`/`utils`: cache `Array.isArray`
196+
- [Refactor] `utils`: reduce observable [[Get]]s
197+
- [Refactor] use cached `Array.isArray`
198+
- [Refactor] `parse`/`stringify`: make a function to normalize the options
199+
- [readme] remove travis badge; add github actions/codecov badges; update URLs
200+
- [Docs] Clarify the need for "arrayLimit" option
201+
- [meta] fix README.md (#399)
202+
- [meta] do not publish workflow files
203+
- [meta] Clean up license text so it’s properly detected as BSD-3-Clause
204+
- [meta] add FUNDING.yml
205+
- [meta] Fixes typo in CHANGELOG.md
206+
- [actions] backport actions from main
207+
- [Tests] fix Buffer tests to work in node < 4.5 and node < 5.10
208+
- [Tests] always use `String(x)` over `x.toString()`
209+
- [Dev Deps] backport from main
210+
147211
## **6.6.0**
148212
- [New] Add support for iso-8859-1, utf8 "sentinel" and numeric entities (#268)
149213
- [New] move two-value combine to a `utils` function (#189)
@@ -160,6 +224,30 @@
160224
- [Dev Deps] update `browserify`, `eslint`, `@ljharb/eslint-config`, `iconv-lite`, `safe-publish-latest`, `tape`
161225
- [Tests] up to `node` `v10.10`, `v9.11`, `v8.12`, `v6.14`, `v4.9`; pin included builds to LTS
162226

227+
## **6.5.3**
228+
- [Fix] `parse`: ignore `__proto__` keys (#428)
229+
- [Fix]` `utils.merge`: avoid a crash with a null target and a truthy non-array source
230+
- [Fix] correctly parse nested arrays
231+
- [Fix] `stringify`: fix a crash with `strictNullHandling` and a custom `filter`/`serializeDate` (#279)
232+
- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided
233+
- [Fix] when `parseArrays` is false, properly handle keys ending in `[]`
234+
- [Fix] fix for an impossible situation: when the formatter is called with a non-string value
235+
- [Fix] `utils.merge`: avoid a crash with a null target and an array source
236+
- [Refactor] `utils`: reduce observable [[Get]]s
237+
- [Refactor] use cached `Array.isArray`
238+
- [Refactor] `stringify`: Avoid arr = arr.concat(...), push to the existing instance (#269)
239+
- [Refactor] `parse`: only need to reassign the var once
240+
- [Robustness] `stringify`: avoid relying on a global `undefined` (#427)
241+
- [readme] remove travis badge; add github actions/codecov badges; update URLs
242+
- [Docs] Clean up license text so it’s properly detected as BSD-3-Clause
243+
- [Docs] Clarify the need for "arrayLimit" option
244+
- [meta] fix README.md (#399)
245+
- [meta] add FUNDING.yml
246+
- [actions] backport actions from main
247+
- [Tests] always use `String(x)` over `x.toString()`
248+
- [Tests] remove nonexistent tape option
249+
- [Dev Deps] backport from main
250+
163251
## **6.5.2**
164252
- [Fix] use `safer-buffer` instead of `Buffer` constructor
165253
- [Refactor] utils: `module.exports` one thing, instead of mutating `exports` (#230)
@@ -186,6 +274,27 @@
186274
- [Tests] up to `node` `v8.1`, `v7.10`, `v6.11`; npm v4.6 breaks on node < v1; npm v5+ breaks on node < v4
187275
- [Tests] add `editorconfig-tools`
188276

277+
## **6.4.1**
278+
- [Fix] `parse`: ignore `__proto__` keys (#428)
279+
- [Fix] fix for an impossible situation: when the formatter is called with a non-string value
280+
- [Fix] use `safer-buffer` instead of `Buffer` constructor
281+
- [Fix] `utils.merge`: avoid a crash with a null target and an array source
282+
- [Fix]` `utils.merge`: avoid a crash with a null target and a truthy non-array source
283+
- [Fix] `stringify`: fix a crash with `strictNullHandling` and a custom `filter`/`serializeDate` (#279)
284+
- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided
285+
- [Fix] when `parseArrays` is false, properly handle keys ending in `[]`
286+
- [Robustness] `stringify`: avoid relying on a global `undefined` (#427)
287+
- [Refactor] use cached `Array.isArray`
288+
- [Refactor] `stringify`: Avoid arr = arr.concat(...), push to the existing instance (#269)
289+
- [readme] remove travis badge; add github actions/codecov badges; update URLs
290+
- [Docs] Clarify the need for "arrayLimit" option
291+
- [meta] fix README.md (#399)
292+
- [meta] Clean up license text so it’s properly detected as BSD-3-Clause
293+
- [meta] add FUNDING.yml
294+
- [actions] backport actions from main
295+
- [Tests] remove nonexistent tape option
296+
- [Dev Deps] backport from main
297+
189298
## **6.4.0**
190299
- [New] `qs.stringify`: add `encodeValuesOnly` option
191300
- [Fix] follow `allowPrototypes` option during merge (#201, #201)
@@ -195,6 +304,26 @@
195304
- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds
196305
- [eslint] reduce warnings
197306

307+
## **6.3.3**
308+
- [Fix] `parse`: ignore `__proto__` keys (#428)
309+
- [Fix] fix for an impossible situation: when the formatter is called with a non-string value
310+
- [Fix] `utils.merge`: avoid a crash with a null target and an array source
311+
- [Fix]` `utils.merge`: avoid a crash with a null target and a truthy non-array source
312+
- [Fix] `stringify`: fix a crash with `strictNullHandling` and a custom `filter`/`serializeDate` (#279)
313+
- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided
314+
- [Fix] when `parseArrays` is false, properly handle keys ending in `[]`
315+
- [Robustness] `stringify`: avoid relying on a global `undefined` (#427)
316+
- [Refactor] use cached `Array.isArray`
317+
- [Refactor] `stringify`: Avoid arr = arr.concat(...), push to the existing instance (#269)
318+
- [Docs] Clarify the need for "arrayLimit" option
319+
- [meta] fix README.md (#399)
320+
- [meta] Clean up license text so it’s properly detected as BSD-3-Clause
321+
- [meta] add FUNDING.yml
322+
- [actions] backport actions from main
323+
- [Tests] use `safer-buffer` instead of `Buffer` constructor
324+
- [Tests] remove nonexistent tape option
325+
- [Dev Deps] backport from main
326+
198327
## **6.3.2**
199328
- [Fix] follow `allowPrototypes` option during merge (#201, #200)
200329
- [Dev Deps] update `eslint`
@@ -228,6 +357,23 @@
228357
- [Tests] skip Object.create tests when null objects are not available
229358
- [Tests] Turn on eslint for test files (#175)
230359

360+
## **6.2.4**
361+
- [Fix] `parse`: ignore `__proto__` keys (#428)
362+
- [Fix] `utils.merge`: avoid a crash with a null target and an array source
363+
- [Fix] `utils.merge`: avoid a crash with a null target and a truthy non-array source
364+
- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided
365+
- [Fix] when `parseArrays` is false, properly handle keys ending in `[]`
366+
- [Robustness] `stringify`: avoid relying on a global `undefined` (#427)
367+
- [Refactor] use cached `Array.isArray`
368+
- [Docs] Clarify the need for "arrayLimit" option
369+
- [meta] fix README.md (#399)
370+
- [meta] Clean up license text so it’s properly detected as BSD-3-Clause
371+
- [meta] add FUNDING.yml
372+
- [actions] backport actions from main
373+
- [Tests] use `safer-buffer` instead of `Buffer` constructor
374+
- [Tests] remove nonexistent tape option
375+
- [Dev Deps] backport from main
376+
231377
## **6.2.3**
232378
- [Fix] follow `allowPrototypes` option during merge (#201, #200)
233379
- [Fix] chmod a-x

component.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "qs",
3-
"repository": "hapijs/qs",
3+
"repository": "ljharb/qs",
44
"description": "query-string parser / stringifier with nesting support",
55
"version": "6.10.3",
66
"keywords": ["querystring", "query", "parser"],

package.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,9 @@
5959
"tests-only": "nyc tape 'test/**/*.js'",
6060
"posttest": "aud --production",
6161
"readme": "evalmd README.md",
62-
"postlint": "eclint check * lib/* test/* !dist/*",
63-
"lint": "eslint .",
62+
"postlint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)",
63+
"lint": "eslint --ext=js,mjs .",
6464
"dist": "mkdirp dist && browserify --standalone Qs lib/index.js > dist/qs.js"
6565
},
66-
"license": "BSD-3-Clause",
67-
"greenkeeper": {
68-
"ignore": [
69-
"iconv-lite",
70-
"mkdirp"
71-
]
72-
}
66+
"license": "BSD-3-Clause"
7367
}

test/parse.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ test('parse()', function (t) {
140140
t.test('limits specific array indices to arrayLimit', function (st) {
141141
st.deepEqual(qs.parse('a[20]=a', { arrayLimit: 20 }), { a: ['a'] });
142142
st.deepEqual(qs.parse('a[21]=a', { arrayLimit: 20 }), { a: { 21: 'a' } });
143+
144+
st.deepEqual(qs.parse('a[20]=a'), { a: ['a'] });
145+
st.deepEqual(qs.parse('a[21]=a'), { a: { 21: 'a' } });
143146
st.end();
144147
});
145148

@@ -378,6 +381,7 @@ test('parse()', function (t) {
378381
st.deepEqual(qs.parse('?foo=bar', { ignoreQueryPrefix: true }), { foo: 'bar' });
379382
st.deepEqual(qs.parse('foo=bar', { ignoreQueryPrefix: true }), { foo: 'bar' });
380383
st.deepEqual(qs.parse('?foo=bar', { ignoreQueryPrefix: false }), { '?foo': 'bar' });
384+
381385
st.end();
382386
});
383387

test/stringify.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -714,16 +714,14 @@ test('stringify()', function (t) {
714714
});
715715

716716
t.test('Edge cases and unknown formats', function (st) {
717-
['UFO1234', false, 1234, null, {}, []].forEach(
718-
function (format) {
719-
st['throws'](
720-
function () {
721-
qs.stringify({ a: 'b c' }, { format: format });
722-
},
723-
new TypeError('Unknown format option provided.')
724-
);
725-
}
726-
);
717+
['UFO1234', false, 1234, null, {}, []].forEach(function (format) {
718+
st['throws'](
719+
function () {
720+
qs.stringify({ a: 'b c' }, { format: format });
721+
},
722+
new TypeError('Unknown format option provided.')
723+
);
724+
});
727725
st.end();
728726
});
729727

0 commit comments

Comments
 (0)