Skip to content

Commit

Permalink
feat: add support for packageManager field (#248)
Browse files Browse the repository at this point in the history
  • Loading branch information
foray1010 authored Mar 20, 2022
1 parent c8ea138 commit 1ae2926
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions defaultRules.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ _Note: when a specific key order is used, any other keys will be sorted in the e
| extensionPack | Sort unique items |
| extensionDependencies | Sort unique items |
| flat | |
| packageManager | |
| engines | Key sort |
| engineStrict | Key sort |
| languageName | |
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ const fields = [
/* vscode */ { key: 'extensionPack', over: uniqAndSortArray },
/* vscode */ { key: 'extensionDependencies', over: uniqAndSortArray },
{ key: 'flat' },
{ key: 'packageManager' },
{ key: 'engines', over: sortObject },
{ key: 'engineStrict', over: sortObject },
{ key: 'languageName' },
Expand Down
1 change: 1 addition & 0 deletions tests/fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ for (const field of [
'browserslist',
'stylelint',
'flat',
'packageManager',
'os',
'cpu',
'icon',
Expand Down
Binary file modified tests/snapshots/cli.js.snap
Binary file not shown.
2 changes: 2 additions & 0 deletions tests/snapshots/main.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ Generated by [AVA](https://avajs.dev).
"nyc": "nyc",␊
"optionalDependencies": "optionalDependencies",␊
"os": "os",␊
"packageManager": "packageManager",␊
"peerDependencies": "peerDependencies",␊
"peerDependenciesMeta": "peerDependenciesMeta",␊
"pre-commit": "pre-commit",␊
Expand Down Expand Up @@ -197,6 +198,7 @@ Generated by [AVA](https://avajs.dev).
"extensionPack": "extensionPack",␊
"extensionDependencies": "extensionDependencies",␊
"flat": "flat",␊
"packageManager": "packageManager",␊
"engines": "engines",␊
"engineStrict": "engineStrict",␊
"languageName": "languageName",␊
Expand Down
Binary file modified tests/snapshots/main.js.snap
Binary file not shown.

0 comments on commit 1ae2926

Please sign in to comment.