Skip to content

Commit

Permalink
🔧 Add main and types to package.json sort
Browse files Browse the repository at this point in the history
Adds `main` and `types` to `package.json` sort order. Changes
`engineStrict` location. Run `--fix` when upgrading.

+semver:minor
  • Loading branch information
connorjs committed Aug 3, 2024
1 parent f471ac0 commit 81a6201
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/json.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,14 @@ export function json(options = {}) {

`type`,
`engines`, // Often used for ESM, so relates to `type`
`engineStrict`,

// Export fields
`bin`,
`directories`,
`files`,
`main`,
`types`,
`exports`,
// End export fields

Expand All @@ -72,7 +75,6 @@ export function json(options = {}) {
// End tool-specific

// Dependency related, specific order
`engineStrict`,
`overrides`, // Overrides before dependencies to emphasize their existence
`optionalDependencies`,
`peerDependencies`,
Expand Down

0 comments on commit 81a6201

Please sign in to comment.