Skip to content

Commit

Permalink
fix: imports and exports sorted together (#203)
Browse files Browse the repository at this point in the history
* Removed `exports` sort, added `imports`

* fix: removed "exports" from sort assertion in tests; rebuilt snapshots
  • Loading branch information
Xunnamius authored Oct 22, 2020
1 parent 482c40b commit 89be2c9
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ const fields = [
/* vscode */ { key: 'publisher' },
{ key: 'sideEffects' },
{ key: 'type' },
{ key: 'exports', over: sortObject },
{ key: 'imports' },
{ key: 'exports' },
{ key: 'main' },
{ key: 'umd:main' },
{ key: 'jsdelivr' },
Expand Down
1 change: 0 additions & 1 deletion tests/fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ for (const field of [

// fields sort alphabetically
for (const field of [
'exports',
'bin',
'contributes',
'commitlint',
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 @@ -53,6 +53,7 @@ Generated by [AVA](https://avajs.dev).
"homepage": "homepage",␊
"husky": "husky",␊
"icon": "icon",␊
"imports": "imports",␊
"jest": "jest",␊
"jsdelivr": "jsdelivr",␊
"jsnext:main": "jsnext:main",␊
Expand Down Expand Up @@ -121,6 +122,7 @@ Generated by [AVA](https://avajs.dev).
"publisher": "publisher",␊
"sideEffects": "sideEffects",␊
"type": "type",␊
"imports": "imports",␊
"exports": "exports",␊
"main": "main",␊
"umd:main": "umd:main",␊
Expand Down
Binary file modified tests/snapshots/main.js.snap
Binary file not shown.

0 comments on commit 89be2c9

Please sign in to comment.