From ee1d3b0544297df68784b501f350af796167105c Mon Sep 17 00:00:00 2001 From: fisker Date: Tue, 31 Dec 2019 09:31:17 +0800 Subject: [PATCH] fix: correct type of `man` `os` `cpu` field --- index.js | 6 +++--- test.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/index.js b/index.js index 234746e3..dea32ad7 100755 --- a/index.js +++ b/index.js @@ -93,7 +93,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 @@ -137,8 +137,8 @@ const fields = [ { 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 }, ] diff --git a/test.js b/test.js index a5fcb22a..67ff693e 100644 --- a/test.js +++ b/test.js @@ -155,7 +155,6 @@ fs.readFile('./package.json', 'utf8', (error, contents) => { for (const field of [ 'exports', 'bin', - 'man', 'commitlint', 'lint-staged', 'config', @@ -172,8 +171,6 @@ for (const field of [ 'resolutions', 'engines', 'engineStrict', - 'os', - 'cpu', 'preferGlobal', 'publishConfig', ]) { @@ -217,6 +214,7 @@ for (const field of [ 'example', 'examplestyle', 'assets', + 'man', 'workspaces', 'husky', 'pre-commit', @@ -224,6 +222,8 @@ for (const field of [ 'eslintIgnore', 'stylelint', 'flat', + 'os', + 'cpu', ]) { testField(field, [ {