Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So... this is the stupidest shit ever, but let's go:
Snippets package basically have no way of knowing if a package is "core" or not. So they actually do something weird - the last package that gets activated is the one that basically gets to define the snippet, in case of conflicting snippets keys.
But that's the problem: package activation is async - meaning that the order is not guaranteed. So the way the package decides if an user-installed package will have the snippet, is to sort packages by their directory - if a package contains
node_modules
on their path, it'll be considered a "core" package and it'll be sorted lower (I wish I was making this up, but unfortunately, I am not).Which brings us to the worst problem so far: when
language-javascript
was not inside thepackages
directory, things were working just fine. Now... well, they are not - so Pulsar, on the CI, checks thatlanguage-javascript
is inside thepackages
directory, and it uses that path instead of the one that's insidenode_modules
(why? Again, no idea - it shouldn't do that, honestly).So this PR fixes this issue by patching the package to have a different directory.