Open Aerijo opened 4 years ago
The docs have isBundledPackage as a method on the package manager. It may be better to replace the regex test entirely, and use the builtin method instead. I just don't know if using it has already been considered at some point and found to be lacking.
Requirements
Description of the Change
On Windows the snippet file paths use
\
as the delimiter. This doesn't match the/node_modules/
regex, so community snippets don't get priority.The change sets the regex depending on if the OS is Windows or not.
Root cause
package-manager
module in Atom, which creates the list using an UnderscoreJS object keys to array method, which is ultimately a call toObject.keys
.I don't have the patience to work out exactly what caused the issue, but a jump in Node means something could have happened to the
Object.keys
behaviour, the order of which is unspecified for those versions.Alternate Designs
None
Benefits
Priority test passes
Possible Drawbacks
I don't know why this issue suddenly appeared. It came up in #306, but the cause does not seem to be related to that PR. The check itself has existed (in similar form) for years. The path comes from the Atom package manager module, so perhaps it used to normalise them? Or the files just happened to be in the right order other times?
Applicable Issues
None