From 76e45701df6d2a768dca22ed3777e6693a83ed88 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Mon, 13 Jan 2020 21:57:54 -0800 Subject: [PATCH 1/5] [actions] add automatic rebasing / merge commit blocking See https://github.com/ljharb/es-abstract/pull/74 --- .github/workflows/rebase.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/rebase.yml diff --git a/.github/workflows/rebase.yml b/.github/workflows/rebase.yml new file mode 100644 index 00000000..436cb79d --- /dev/null +++ b/.github/workflows/rebase.yml @@ -0,0 +1,15 @@ +name: Automatic Rebase + +on: [pull_request] + +jobs: + _: + name: "Automatic Rebase" + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: ljharb/rebase@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 72dc89f3ce4bc9e89ef4cfc57b62951c90e1d7ff Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Mon, 13 Jan 2020 21:37:05 -0800 Subject: [PATCH 2/5] [meta] fix indentation in package.json --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 682462b9..67d3cc3d 100644 --- a/package.json +++ b/package.json @@ -7,9 +7,9 @@ "type": "git", "url": "https://github.com/ljharb/qs.git" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, "main": "lib/index.js", "contributors": [ { From 5af2bf8553e90217a51cbae9ae69053fa214e600 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Mon, 13 Jan 2020 22:00:36 -0800 Subject: [PATCH 3/5] [meta] ignore eclint transitive audit warning --- .npmrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.npmrc b/.npmrc index 43c97e71..fc227f38 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,2 @@ package-lock=false +audit-level=moderate From eac5616d3086b263740bd3af08964438f529b5e5 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Mon, 13 Jan 2020 21:40:08 -0800 Subject: [PATCH 4/5] [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `has-symbols`, `tape` --- package.json | 12 ++++++------ test/parse.js | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 67d3cc3d..81c989c4 100644 --- a/package.json +++ b/package.json @@ -31,21 +31,21 @@ }, "dependencies": {}, "devDependencies": { - "@ljharb/eslint-config": "^15.0.0", + "@ljharb/eslint-config": "^15.1.0", "browserify": "^16.5.0", "covert": "^1.1.1", "eclint": "^2.8.1", - "eslint": "^6.6.0", + "eslint": "^6.8.0", "evalmd": "^0.0.19", "for-each": "^0.3.3", - "has-symbols": "^1.0.0", + "has-symbols": "^1.0.1", "iconv-lite": "^0.4.24", "mkdirp": "^0.5.1", - "object-inspect": "^1.6.0", + "object-inspect": "^1.7.0", "qs-iconv": "^1.0.4", - "safe-publish-latest": "^1.1.3", + "safe-publish-latest": "^1.1.4", "safer-buffer": "^2.1.2", - "tape": "^4.11.0" + "tape": "^5.0.0-next.3" }, "scripts": { "prepublish": "safe-publish-latest && npm run dist", diff --git a/test/parse.js b/test/parse.js index be10400b..fcfd86ac 100644 --- a/test/parse.js +++ b/test/parse.js @@ -599,7 +599,7 @@ test('parse()', function (t) { st.deepEqual( qs.parse('a[b]=c&a=toString', { plainObjects: true }), - { a: { b: 'c', toString: true } }, + { __proto__: null, a: { __proto__: null, b: 'c', toString: true } }, 'can overwrite prototype with plainObjects true' ); From fe6384c848a336640219815c06bcd9a2f0f3e20f Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Mon, 13 Jan 2020 21:50:38 -0800 Subject: [PATCH 5/5] [Fix] `parse`: throw a TypeError instead of an Error for bad charset --- lib/parse.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/parse.js b/lib/parse.js index 7cca8842..8db3a5f8 100644 --- a/lib/parse.js +++ b/lib/parse.js @@ -201,7 +201,7 @@ var normalizeParseOptions = function normalizeParseOptions(opts) { } if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { - throw new Error('The charset option must be either utf-8, iso-8859-1, or undefined'); + throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); } var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;