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.35.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.35.1
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Jan 3, 2020

  1. fix: correct type of man os cpu field (#114)

    fisker authored and keithamus committed Jan 3, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    bbbed6a View commit details
  2. fix: order of dependencies (#115)

    fisker authored and keithamus committed Jan 3, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c01cbc7 View commit details
Showing with 10 additions and 10 deletions.
  1. +5 −5 index.js
  2. +5 −5 test.js
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -105,7 +105,7 @@ const fields = [
{ key: 'examplestyle' },
{ key: 'assets' },
{ key: 'bin', over: sortObject },
{ key: 'man', over: sortObject },
{ key: 'man' },
{ key: 'directories', over: sortDirectories },
{ key: 'workspaces' },
// node-pre-gyp https://www.npmjs.com/package/node-pre-gyp#1-add-new-entries-to-your-packagejson
@@ -139,18 +139,18 @@ const fields = [
{ key: 'jest', over: sortObject },
{ key: 'mocha', over: sortObject },
{ key: 'nyc', over: sortObject },
{ key: 'resolutions', over: sortObject },
{ key: 'dependencies', over: sortObject },
{ key: 'devDependencies', over: sortObject },
{ key: 'peerDependencies', over: sortObject },
{ key: 'optionalDependencies', over: sortObject },
{ key: 'bundledDependencies', over: sortArray },
{ key: 'bundleDependencies', over: sortArray },
{ key: 'optionalDependencies', over: sortObject },
{ key: 'flat' },
{ key: 'resolutions', over: sortObject },
{ key: 'engines', over: sortObject },
{ key: 'engineStrict', over: sortObject },
{ key: 'os', over: sortObject },
{ key: 'cpu', over: sortObject },
{ key: 'os' },
{ key: 'cpu' },
{ key: 'preferGlobal', over: sortObject },
{ key: 'publishConfig', over: sortObject },
]
10 changes: 5 additions & 5 deletions test.js
Original file line number Diff line number Diff line change
@@ -189,7 +189,6 @@ assert.deepStrictEqual(
for (const field of [
'exports',
'bin',
'man',
'commitlint',
'lint-staged',
'config',
@@ -203,11 +202,8 @@ for (const field of [
'jest',
'mocha',
'nyc',
'resolutions',
'engines',
'engineStrict',
'os',
'cpu',
'preferGlobal',
'publishConfig',
]) {
@@ -251,12 +247,15 @@ for (const field of [
'example',
'examplestyle',
'assets',
'man',
'workspaces',
'pre-commit',
'browserslist',
'eslintIgnore',
'stylelint',
'flat',
'os',
'cpu',
]) {
testField(field, [
{
@@ -499,8 +498,9 @@ testField('betterScripts', [
},
])

// dependencies
// `resolutions` and `dependencies`
for (const field of [
'resolutions',
'dependencies',
'devDependencies',
'peerDependencies',