diff --git a/index.js b/index.js index c873cd50..4d3679eb 100644 --- a/index.js +++ b/index.js @@ -180,7 +180,6 @@ const fields = [ over: onArray(contributors => contributors.map(sortPeopleObject)), }, /* vscode */ { key: 'publisher' }, - { key: 'files', over: uniq }, { key: 'sideEffects' }, { key: 'type' }, { key: 'exports', over: sortObject }, @@ -201,6 +200,7 @@ const fields = [ { key: 'bin', over: sortObject }, { key: 'man' }, { key: 'directories', over: sortDirectories }, + { key: 'files', over: uniq }, { key: 'workspaces' }, // node-pre-gyp https://www.npmjs.com/package/node-pre-gyp#1-add-new-entries-to-your-packagejson { diff --git a/package.json b/package.json index 7a5448e7..ef4ced92 100644 --- a/package.json +++ b/package.json @@ -17,20 +17,21 @@ }, "license": "MIT", "author": "Keith Cirkel (http://keithcirkel.co.uk/)", + "main": "index.js", + "types": "index.d.ts", + "bin": "cli.js", "files": [ "index.js", "index.d.ts", "cli.js" ], - "main": "index.js", - "types": "index.d.ts", - "bin": "cli.js", "scripts": { "lint": "eslint .", "semantic-release": "semantic-release", "sort-package-json": "node cli.js package.json --check", "test": "ava", - "test-coverage": "nyc ava" + "test-coverage": "nyc ava", + "update-snapshot": "ava -u && node cli.js package.json" }, "husky": { "hooks": { diff --git a/tests/snapshots/cli.js.snap b/tests/snapshots/cli.js.snap index 08c5222b..9badae48 100644 Binary files a/tests/snapshots/cli.js.snap and b/tests/snapshots/cli.js.snap differ diff --git a/tests/snapshots/main.js.md b/tests/snapshots/main.js.md index 4eb06c46..ed1c1121 100644 --- a/tests/snapshots/main.js.md +++ b/tests/snapshots/main.js.md @@ -112,7 +112,6 @@ Generated by [AVA](https://ava.li). "author": "author",␊ "contributors": "contributors",␊ "publisher": "publisher",␊ - "files": "files",␊ "sideEffects": "sideEffects",␊ "type": "type",␊ "exports": "exports",␊ @@ -133,6 +132,7 @@ Generated by [AVA](https://ava.li). "bin": "bin",␊ "man": "man",␊ "directories": "directories",␊ + "files": "files",␊ "workspaces": "workspaces",␊ "binary": "binary",␊ "scripts": "scripts",␊ diff --git a/tests/snapshots/main.js.snap b/tests/snapshots/main.js.snap index e1b80bfc..b8c4a8c3 100644 Binary files a/tests/snapshots/main.js.snap and b/tests/snapshots/main.js.snap differ