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: keithamus/sort-package-json
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.30.0
Choose a base ref
...
head repository: keithamus/sort-package-json
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.31.0
Choose a head ref
  • 5 commits
  • 5 files changed
  • 1 contributor

Commits on Dec 6, 2019

  1. ci: run sort-package-json on ci (#93)

    fisker authored and keithamus committed Dec 6, 2019
    Copy the full SHA
    152f567 View commit details
  2. test: fix Custom sort order test (#92)

    fisker authored and keithamus committed Dec 6, 2019
    Copy the full SHA
    b69b194 View commit details
  3. test: add more field test (#91)

    fisker authored and keithamus committed Dec 6, 2019

    Partially verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
    Copy the full SHA
    bade964 View commit details

Commits on Dec 8, 2019

  1. refactor: major code refactor (#90)

    * refactor: sortSubKey logic
    
    * refactor: sortOrder
    
    * chore: add comment
    
    * fix: restore key
    
    * fix: add sortList
    
    * build: install prettier, eslint
    
    * style: eslint --fix
    
    * refactor: hoise arrayUnique out of main function
    
    * refactor: hoist parseJSON logic
    
    * refactor: hoist compareScriptKeys
    
    * refactor: omit sortSubKey when falsey
    
    * refactor: skip calling sortSubKey when not needed
    
    * refactor: hoist sortSubKey
    
    * refactor: hoist sortKeys/uniqueKeys
    
    * refactor: make sort/uniq pure
    
    * refactor: hoist custom sortScripts function
    
    * refactor: provide sortScripts as custom comparator
    
    * refactor: hoist stringifyJSON
    
    * refactor: pass sortSubKey as function to options
    
    * refactor: curry options into sortSubKey
    
    * refactor: remove useless if
    
    * refactor: rename sortSubKey option as over
    
    * refactor: make over pure
    
    * refactor: only pass field to over, not whole object
    
    * refactor: split sortSubKey into sortArray/sortObject
    
    * refactor: only call over if key is present
    
    * fix(keywords): do not sort, only uniq. Fixes #83
    
    * refactor: collapse sortArray
    
    * refactor: never mutate original json
    
    * refactor: curry & reverse args for sortObjectKeys
    
    * refactor: hoist onObject
    
    * refactor: separate sortScripts
    
    * refactor: shrink sortObject
    
    * refactor: split sortObject/sortObjectBy
    
    * refactor: hoist reused over functions
    
    * refactor: hoist defaultNpmScripts
    
    * test: remove private from sort test
    
    * test: homepage should not be sorted
    
    * test: do not attempt to sort objects like arrays
    
    * test: sort betterscripts properly
    
    * ci: run lint on ci
    
    * feat: uniq `files` field
    
    * fix: add `onArray` to avoid crash on wrong type of `keywords` and `files`
    
    * fix: add `isPlainObject` type check to avoid sort array accidentally
    
    * refactor: simplify JSON parse/stringify step
    
    * fix: add missing return
    
    * fix: lint errors
    
    * style: simplify `editStringJSON` function
    
    * fix: make prexiableScripts copy defaultNpmScripts
    
    Co-Authored-By: fisker <lionkay@gmail.com>
    fisker authored and keithamus committed Dec 8, 2019
    1

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    a91a766 View commit details

Commits on Dec 10, 2019

  1. feat: new eol detection (#96)

    fisker authored and keithamus committed Dec 10, 2019
    Copy the full SHA
    425352e View commit details
Showing with 1,884 additions and 346 deletions.
  1. +4 −0 .travis.yml
  2. +178 −210 index.js
  3. +1,231 −4 package-lock.json
  4. +24 −0 package.json
  5. +447 −132 test.js
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -7,6 +7,10 @@ node_js:
- v8
- v10
- stable
script:
- npm run sort-package-json
- npm run lint
- npm run test
after_success:
- npm run semantic-release
env:
Loading