Skip to content

Conversation

@GeorgeTaveras1231
Copy link
Contributor

Subset of #336

Sorts path objects in imports and exports alphabetically, pushing wildcards to bottom.

GeorgeTaveras1231 and others added 17 commits February 27, 2025 14:46
Force relative position of certain conditions, sort paths in
alphabetically with exception of paths with wildcards.
Co-authored-by: Keith Cirkel <[email protected]>
1. types before target environments
2. environments first
3. support module-sync
Additionally fix order of `module-sync` which goes after `require` and `import`
Adds known edge conditions and addition compilation targets from the
WinterCG standard (Called out in the Node.js community conditions documentation.

- https://nodejs.org/api/packages.html#community-conditions-definitions
Apply some alphabetical order
- move types to top
- move browser under deno and bun since those can be used to bundle app for browsers
@GeorgeTaveras1231
Copy link
Contributor Author

@fisker this only handles the path keys - I'll let you handle the conditions.

fisker added a commit to fisker/sort-package-json that referenced this pull request Mar 4, 2025
@fisker
Copy link
Collaborator

fisker commented Apr 29, 2025

@keithamus
Copy link
Owner

@GeorgeTaveras1231 would you kindly rebase this, and we can look to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants