Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: minimistjs/minimist
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 13077b369b092797bb176fd18131d07b0d6c2d1c
Choose a base ref
...
head repository: minimistjs/minimist
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6901ee286bc4c16da6830b48b46ce1574703cea1
Choose a head ref

Commits on Aug 11, 2014

  1. add support for handling "unknown" options not registered with the pa…

    …rser.
    caitp authored and James Halliday committed Aug 11, 2014
    Copy the full SHA
    6f3cc5d View commit details
  2. extra fn to get 100% coverage again

    James Halliday committed Aug 11, 2014
    Copy the full SHA
    a6972da View commit details
  3. reformat package.json

    James Halliday committed Aug 11, 2014
    Copy the full SHA
    02ed371 View commit details
  4. coverage script

    James Halliday committed Aug 11, 2014
    Copy the full SHA
    e5531ba View commit details
  5. 1.1.0

    James Halliday committed Aug 11, 2014
    Copy the full SHA
    e2563e4 View commit details

Commits on Mar 10, 2015

  1. Copy the full SHA
    8c444fe View commit details
  2. check that they type of a value is a boolean, not just that it is cur…

    …rently set to a boolean
    dominictarr committed Mar 10, 2015
    Copy the full SHA
    6863198 View commit details
  3. if the previous value was a boolean, without an default (or with an a…

    …lias) don't make an array either
    dominictarr committed Mar 10, 2015
    Copy the full SHA
    e5f419a View commit details

Commits on Mar 11, 2015

  1. upgrade tape, fix type issues from old tape version

    James Halliday committed Mar 11, 2015
    Copy the full SHA
    806712d View commit details
  2. 1.1.1

    James Halliday committed Mar 11, 2015
    Copy the full SHA
    bc9d1c4 View commit details

Commits on Apr 3, 2015

  1. use non-ancient npm, node 0.12 and iojs

    James Halliday committed Apr 3, 2015
    Copy the full SHA
    61ed1d0 View commit details
  2. an older npm for 0.8

    James Halliday committed Apr 3, 2015
    Copy the full SHA
    25cf778 View commit details

Commits on Jul 22, 2015

  1. Convert boolean arguments to boolean values

    When passing the boolean argument with `--boool=true` or `--boool=false`.
    SanjoSolutions committed Jul 22, 2015
    Copy the full SHA
    8f3dc27 View commit details
  2. 1.1.2

    James Halliday committed Jul 22, 2015
    Copy the full SHA
    a8e2fe1 View commit details

Commits on Aug 6, 2015

  1. add failing test - boolean alias array

    When using a boolean value that has an array of aliases
    the aliases swallow the next value
    
    ```javascript
    var regular = [ '--herp', 'derp' ];
    var opts = {
      alias: { 'h': ['herp', 'harp'] },
      boolean: 'h'
    };
    var argv = parse(regular, opts);
    assert.strictEqual(argv.herp, true); // fails with 'derp'
    assert.strictEqual(argv._[0], 'derp'); // fails undefined
    ```
    jeffbski committed Aug 6, 2015
    Copy the full SHA
    0fa3c5b View commit details
  2. fix boolean values with multiple aliases

    When using a boolean value that has an array of aliases
    the aliases show not swallow the next value but should
    be treated like other booleans
    
    ```javascript
    var regular = [ '--herp', 'derp' ];
    var alt = [ '--harp', 'derp' ];
    var opts = {
      alias: { 'h': ['herp', 'harp'] },
      boolean: 'h'
    };
    
    var argv = parse(regular, opts);
    assert.strictEqual(argv.herp, true);
    assert.strictEqual(argv.harp, true);
    assert.strictEqual(argv._[0], 'derp');
    
    var argvAlt = parse(alt, opts);
    assert.strictEqual(argv.herp, true);
    assert.strictEqual(argv.harp, true);
    assert.strictEqual(argv._[0], 'derp');
    ```
    jeffbski committed Aug 6, 2015
    Copy the full SHA
    9c0a6e7 View commit details
  3. 1.1.3

    James Halliday committed Aug 6, 2015
    Copy the full SHA
    8a5d94c View commit details

Commits on Aug 24, 2015

  1. Copy the full SHA
    86b321a View commit details
  2. failing -k=v short test

    James Halliday committed Aug 24, 2015
    Copy the full SHA
    63416b8 View commit details
  3. kv short fix

    James Halliday committed Aug 24, 2015
    Copy the full SHA
    6bbe145 View commit details
  4. failing kv short test

    James Halliday committed Aug 24, 2015
    Copy the full SHA
    f72ab7f View commit details
  5. fixed kv test

    James Halliday committed Aug 24, 2015
    Copy the full SHA
    f5a48c3 View commit details
  6. 1.2.0

    James Halliday committed Aug 24, 2015
    Copy the full SHA
    dc62448 View commit details

Commits on Aug 29, 2015

  1. move the opts['--'] example back where it belongs

    It was accidentally separated from the `opts['--']` bullet point be the new
    option added in commit 6f3cc5d.
    lydell committed Aug 29, 2015
    Copy the full SHA
    5fa440e View commit details
  2. Merge pull request #63 from lydell/dash-dash-docs-fix

    move the `opts['--']` example back where it belongs
    James Halliday committed Aug 29, 2015
    Copy the full SHA
    4cf45a2 View commit details

Commits on Mar 10, 2020

  1. fix bad boolean regexp

    joaomoreno authored and substack committed Mar 10, 2020
    Copy the full SHA
    ac3fc79 View commit details
  2. add test

    joaomoreno authored and substack committed Mar 10, 2020
    Copy the full SHA
    6be5dae View commit details
  3. 1.2.1

    substack committed Mar 10, 2020
    Copy the full SHA
    29783cd View commit details
  4. failing test for protocol pollution

    substack committed Mar 10, 2020
    Copy the full SHA
    0efed03 View commit details
  5. console.dir -> console.log

    substack committed Mar 10, 2020
    Copy the full SHA
    47acf72 View commit details
  6. don't assign onto __proto__

    substack committed Mar 10, 2020
    Copy the full SHA
    63e7ed0 View commit details
  7. cleanup

    substack committed Mar 10, 2020
    Copy the full SHA
    67d3722 View commit details
  8. 1.2.2

    substack committed Mar 10, 2020
    Copy the full SHA
    f34df07 View commit details
  9. more failing proto pollution tests

    substack committed Mar 10, 2020
    Copy the full SHA
    13c01a5 View commit details
  10. even more aggressive checks for protocol pollution

    substack committed Mar 10, 2020
    Copy the full SHA
    38a4d1c View commit details
  11. 1.2.3

    substack committed Mar 10, 2020
    Copy the full SHA
    6457d74 View commit details

Commits on Mar 11, 2020

  1. additional test for constructor prototype pollution

    substack committed Mar 11, 2020
    Copy the full SHA
    1043d21 View commit details
  2. security notice

    substack committed Mar 11, 2020
    Copy the full SHA
    4cf1354 View commit details
  3. 1.2.4

    substack committed Mar 11, 2020
    Copy the full SHA
    278677b View commit details

Commits on Mar 12, 2020

  1. v0.2.1

    This is an attempt to recreate the git history for v0.2.1.
    ljharb committed Mar 12, 2020
    Copy the full SHA
    10bd4cd View commit details
  2. 1.2.5

    substack committed Mar 12, 2020
    Copy the full SHA
    aeb3e27 View commit details

Commits on Mar 22, 2022

  1. test from prototype pollution PR

    substack committed Mar 22, 2022
    Copy the full SHA
    bc8ecee View commit details
  2. isConstructorOrProto adapted from PR

    substack committed Mar 22, 2022
    Copy the full SHA
    c2b9819 View commit details
  3. isConstructorOrProto adapted from PR

    substack authored and ljharb committed Mar 22, 2022
    Copy the full SHA
    ef9153f View commit details
  4. Copy the full SHA
    ef88b93 View commit details
  5. 1.2.6

    substack committed Mar 22, 2022
    Copy the full SHA
    7efb22a View commit details

Commits on Oct 10, 2022

  1. Copy the full SHA
    56cad44 View commit details
  2. Copy the full SHA
    282b570 View commit details

Commits on Oct 16, 2022

  1. Copy the full SHA
    e5f5067 View commit details
  2. [eslint] more cleanup

    ljharb committed Oct 16, 2022
    Copy the full SHA
    36ac5d0 View commit details
Showing with 1,678 additions and 777 deletions.
  1. +29 −0 .eslintrc
  2. +12 −0 .github/FUNDING.yml
  3. +21 −0 .github/workflows/node-aught.yml
  4. +10 −0 .github/workflows/node-pretest.yml
  5. +21 −0 .github/workflows/node-tens.yml
  6. +22 −0 .github/workflows/rebase.yml
  7. +18 −0 .github/workflows/require-allow-edits.yml
  8. +13 −0 .gitignore
  9. +3 −0 .npmrc
  10. +14 −0 .nycrc
  11. +0 −4 .travis.yml
  12. +298 −0 CHANGELOG.md
  13. +121 −0 README.md
  14. +3 −1 example/parse.js
  15. +255 −196 index.js
  16. +73 −38 package.json
  17. +0 −88 readme.markdown
  18. +26 −24 test/all_bool.js
  19. +157 −99 test/bool.js
  20. +33 −21 test/dash.js
  21. +29 −12 test/default_bool.js
  22. +13 −11 test/dotted.js
  23. +32 −0 test/kv_short.js
  24. +28 −26 test/long.js
  25. +30 −28 test/num.js
  26. +169 −157 test/parse.js
  27. +7 −5 test/parse_modified.js
  28. +64 −0 test/proto.js
  29. +57 −55 test/short.js
  30. +10 −8 test/stop_early.js
  31. +104 −0 test/unknown.js
  32. +6 −4 test/whitespace.js
29 changes: 29 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"root": true,

"extends": "@ljharb/eslint-config/node/0.4",

"rules": {
"array-element-newline": 0,
"complexity": 0,
"func-style": [2, "declaration"],
"max-lines-per-function": 0,
"max-nested-callbacks": 1,
"max-statements-per-line": 1,
"max-statements": 0,
"multiline-comment-style": 0,
"no-continue": 1,
"no-param-reassign": 1,
"no-restricted-syntax": 1,
"object-curly-newline": 0,
},

"overrides": [
{
"files": "test/**",
"rules": {
"camelcase": 0,
},
},
]
}
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -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/minimist
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 up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
21 changes: 21 additions & 0 deletions .github/workflows/node-aught.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 'Tests: node.js < 10'

on: [pull_request, push]

permissions:
contents: read

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

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

on: [pull_request, push]

permissions:
contents: read

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

on: [pull_request, push]

permissions:
contents: read

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'
22 changes: 22 additions & 0 deletions .github/workflows/rebase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Automatic Rebase

on: [pull_request_target]

permissions:
contents: read

jobs:
_:
permissions:
contents: write # for ljharb/rebase to push code to rebase
pull-requests: read # for ljharb/rebase to get info about PR

name: "Automatic Rebase"

runs-on: ubuntu-latest

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

on: [pull_request_target]

permissions:
contents: read

jobs:
_:
permissions:
pull-requests: read # for ljharb/require-allow-edits to check 'allow edits' on PR

name: "Require “Allow Edits”"

runs-on: ubuntu-latest

steps:
- uses: ljharb/require-allow-edits@main
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# gitignore

node_modules

coverage/
.nyc_output/

# Only apps should have lockfiles
npm-shrinkwrap.json
package-lock.json
yarn.lock

.npmignore
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package-lock=false
allow-same-version=true
message=v%s
14 changes: 14 additions & 0 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"all": true,
"check-coverage": false,
"reporter": ["text-summary", "text", "html", "json"],
"lines": 86,
"statements": 85.93,
"functions": 82.43,
"branches": 76.06,
"exclude": [
"coverage",
"example",
"test"
]
}
4 changes: 0 additions & 4 deletions .travis.yml

This file was deleted.

Loading