This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3k
Sorting arrays in package.json #10063
Comments
This field has been documented as part of |
I can confirm this bug. Here's how to reproduce it:
output:
|
ghost
mentioned this issue
Oct 30, 2015
This was referenced Feb 5, 2016
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm sure this will be a duplicate but I couldn't find the issue. I use browserify transforms in a 3rd party module. They are defined in the package.json like this:
The problem i'm having is when the module is installed with
npm install
the array gets sorted and the transforms are then in an invalid order. It looks like its on line 6 of npm/lib/utils/deep-sort-object.js https://github.com/npm/npm/blob/master/lib/utils/deep-sort-object.js#L6 and its called from here https://github.com/npm/npm/blob/master/lib/install/update-package-json.js#L14. I removed this sort and tested and I get the array in the order I expect (the order it was defined).The text was updated successfully, but these errors were encountered: