Showing with 3,384 additions and 589 deletions.
  1. +14 −1 .editorconfig
  2. +0 −1 .eslintignore
  3. +24 −5 .eslintrc
  4. +12 −0 .github/FUNDING.yml
  5. +18 −0 .github/workflows/node-aught.yml
  6. +7 −0 .github/workflows/node-pretest.yml
  7. +18 −0 .github/workflows/node-tens.yml
  8. +15 −0 .github/workflows/rebase.yml
  9. +12 −0 .github/workflows/require-allow-edits.yml
  10. +6 −0 .gitignore
  11. +0 −4 .npmignore
  12. +13 −0 .nycrc
  13. +0 −167 .travis.yml
  14. +320 −0 CHANGELOG.md
  15. +0 −28 LICENSE
  16. +29 −0 LICENSE.md
  17. +172 −22 README.md
  18. +2 −2 component.json
  19. +1,562 −146 dist/qs.js
  20. +9 −4 lib/formats.js
  21. +122 −33 lib/parse.js
  22. +201 −85 lib/stringify.js
  23. +61 −22 lib/utils.js
  24. +45 −20 package.json
  25. +0 −15 test/.eslintrc
  26. +0 −7 test/index.js
  27. +285 −4 test/parse.js
  28. +335 −23 test/stringify.js
  29. +102 −0 test/utils.js
15 changes: 14 additions & 1 deletion .editorconfig
Expand Up @@ -7,11 +7,15 @@ end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 140
max_line_length = 160
quote_type = single

[test/*]
max_line_length = off

[LICENSE.md]
indent_size = off

[*.md]
max_line_length = off

Expand All @@ -28,3 +32,12 @@ indent_size = 2
[LICENSE]
indent_size = 2
max_line_length = off

[coverage/**/*]
indent_size = off
indent_style = off
indent = off
max_line_length = off

[.nycrc]
indent_style = tab
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

29 changes: 24 additions & 5 deletions .eslintrc
Expand Up @@ -3,17 +3,36 @@

"extends": "@ljharb",

"ignorePatterns": [
"dist/",
],

"rules": {
"complexity": 0,
"consistent-return": 1,
"func-name-matching": 0,
"func-name-matching": 0,
"id-length": [2, { "min": 1, "max": 25, "properties": "never" }],
"indent": [2, 4],
"max-params": [2, 12],
"max-statements": [2, 45],
"max-lines-per-function": [2, { "max": 150 }],
"max-params": [2, 16],
"max-statements": [2, 53],
"multiline-comment-style": 0,
"no-continue": 1,
"no-magic-numbers": 0,
"no-restricted-syntax": [2, "BreakStatement", "DebuggerStatement", "ForInStatement", "LabeledStatement", "WithStatement"],
"operator-linebreak": [2, "before"],
}
},

"overrides": [
{
"files": "test/**",
"rules": {
"function-paren-newline": 0,
"max-lines-per-function": 0,
"max-statements": 0,
"no-buffer-constructor": 0,
"no-extend-native": 0,
"no-throw-literal": 0,
},
},
],
}
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: [ljharb]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: npm/qs
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with a single custom sponsorship URL
18 changes: 18 additions & 0 deletions .github/workflows/node-aught.yml
@@ -0,0 +1,18 @@
name: 'Tests: node.js < 10'

on: [pull_request, push]

jobs:
tests:
uses: ljharb/actions/.github/workflows/node.yml@main
with:
range: '< 10'
type: minors
command: npm run tests-only

node:
name: 'node < 10'
needs: [tests]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'
7 changes: 7 additions & 0 deletions .github/workflows/node-pretest.yml
@@ -0,0 +1,7 @@
name: 'Tests: pretest/posttest'

on: [pull_request, push]

jobs:
tests:
uses: ljharb/actions/.github/workflows/pretest.yml@main
18 changes: 18 additions & 0 deletions .github/workflows/node-tens.yml
@@ -0,0 +1,18 @@
name: 'Tests: node.js >= 10'

on: [pull_request, push]

jobs:
tests:
uses: ljharb/actions/.github/workflows/node.yml@main
with:
range: '>= 10'
type: minors
command: npm run tests-only

node:
name: 'node >= 10'
needs: [tests]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'
15 changes: 15 additions & 0 deletions .github/workflows/rebase.yml
@@ -0,0 +1,15 @@
name: Automatic Rebase

on: [pull_request_target]

jobs:
_:
name: "Automatic Rebase"

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: ljharb/rebase@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12 changes: 12 additions & 0 deletions .github/workflows/require-allow-edits.yml
@@ -0,0 +1,12 @@
name: Require “Allow Edits”

on: [pull_request_target]

jobs:
_:
name: "Require “Allow Edits”"

runs-on: ubuntu-latest

steps:
- uses: ljharb/require-allow-edits@main
6 changes: 6 additions & 0 deletions .gitignore
Expand Up @@ -10,3 +10,9 @@ dist/*
yarn.lock
package-lock.json
npm-shrinkwrap.json

# coverage output
coverage/
.nyc_output/

.npmignore
4 changes: 0 additions & 4 deletions .npmignore

This file was deleted.

13 changes: 13 additions & 0 deletions .nycrc
@@ -0,0 +1,13 @@
{
"all": true,
"check-coverage": false,
"reporter": ["text-summary", "text", "html", "json"],
"lines": 86,
"statements": 85.93,
"functions": 82.43,
"branches": 76.06,
"exclude": [
"coverage",
"dist"
]
}
167 changes: 0 additions & 167 deletions .travis.yml

This file was deleted.