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 }} diff --git a/.npmrc b/.npmrc index 43c97e71..fc227f38 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,2 @@ package-lock=false +audit-level=moderate 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; diff --git a/package.json b/package.json index 682462b9..81c989c4 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": [ { @@ -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' );