node-sass: Breaking changes for next major
Current WIP: https://github.com/sass/node-sass/pull/2312
We have been planning to release node-sass@v5 with LibSass 3.5.0 stable when it’s ready. With a 5.0 milestone on the horizon we want to take note of the breaking changes we’re planning to make.
This is living, and incomplete. Please subscribe for updates.
Node versions support
Moving forward we’ll only be actively supporting active LTS and current Node versions. In practical terms this means Node ~6~10+.
- supporting old versions of Node and npm is a significant maintenance burden
- older versions of npm are notoriously troublesome when it comes to native modules - it’s becoming impractical, and sometimes even unsafe, to continue using old packages.
See #2290 See #2286 See #2257 See #2170 See #2256 See #2205 See #2288 …the list goes on
Switch watcher to node-chokidar
Why? Because Gaze in docker and various virtual machines uses a lot of resources whereas chokidar does not. Read about the advantages of chokidar
[…] in docker for mac you will get really high CPU usage with com.docker.hyperkit and com.docker.osxfs (I’ve seen reports of up to 300%).
See #2208
Compile on watch by default
When using the watch flag we should do a compilation before watching. This becoming the expected behaviour in JS (see webpack).
See https://github.com/sass/node-sass/issues/2300 See https://github.com/sass/node-sass/issues/1973 See https://github.com/sass/node-sass/issues/1369 See https://github.com/sass/node-sass/issues/1742
Stop watching .css files
A LibSass has a feature/bug that allows it to @import .css files.
This means our watcher must also watch for .css files.
This can cause infinite loops if the input and out directories are the same.
LibSass is deprecating this behaviour.
See https://github.com/sass/libsass/issues/2611 See #2184 See #2006 See #1933 See #1925 See #1867 See #1845
Don’t fail installation on unsupported environments
In order to reduce issues about installation issues we failed the installation if we detected an environment we didn’t provide binaries for.
This had the intended affect, but also had some unfortunate side-effects
- difficult or impossible to install on environments that could fallback to local compilation i.e. arm, electron
- required a version bump when new version of node landed
- couldn’t back port support for new Node versions
In v5 we should still produce an informative error, but allow the installation to continue.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 15
- Comments: 39 (25 by maintainers)
when will V5 be released?
Is there a release date/roadmap? How can we as a community help to release v5 and with that help to remove the outdated (and vulnerable) dependencies?
Is there a release date for version 5?
Stats for version 4.12.0 (available since April 2018, using @realityking’s gist, updated)
I crunched the numbers for one release (4.7.2 to be exact) really quick. This might warrant digging a bit more (e.g. more release), so here’s the code: https://gist.github.com/realityking/5f29d001ed96f1e9e6a318bb71122508
The result I got is this:
I’ll leave the decision-making to others 😄
The EOL for 8 is in December https://github.com/nodejs/release
are there any plans to drop node-gyp for cmake-js (or other) eliminating the requirement of python 2.7 to be installed?
I’m growing concerned that the Active LTS and Current support target may be
Looking at our release binary download stats, Node 4 (46) is getting a significant number of downloads.
We’re forced to drop Node < 4 due to our dependencies. And we agree that using Node < 4 is unsafe and should be discouraged.
There are some Node milestones coming up in April
Given that we want to get a final 4.x release out with a LibSass bump. We should take this opportunity to add the Node 10 binaries, and monitor the release binary download numbers.
With any luck there will be a significant drop off in Node 4 installs. If not I would be more comfortable aiming for Node >= 4 support.
Reference
You can see the download stats with the following query in GitHub’s GraphQL API explorer.
Just fyi, this repo supports node-pre-gyp for node-sass and publishes to github: https://github.com/bruce-one/node-sass (the binaries can be seen on the releases page). Eg
npm i bruce-one/node-sasswith node 8 installs using the binaries off github for me.Just if of interest (never quite got round to making a PR :-s it’s not very complicated though 😃 also, fyi, the commit history is a mess because of trying to force travis builds. The diff isn’t all that much.)
No changes in the API here.
We’re likely to only support node >= 10. This will allow us to seriously consider n-api again.
On Mon, 21 Oct 2019, 8:03 pm Marcin Cieślak, notifications@github.com wrote:
No
On Tue., 15 Jan. 2019, 10:15 pm Victoria French <notifications@github.com wrote:
@nschonni – that would help. Even though
node-pre-gypstill usesrequest 2.81.0it eliminates the current package vulnerability.Even though tunnel-agent is only used for internal build per this closed issue, it would be helpful if request were upgraded >2.83.0 in node-sass@v5.
Package vulnerability scanners don’t differentiate between packages used only for install vs. runtime… which means we have to mentally keep track of ‘this one is okay’ for tunnel-agent under node-sass / requests.
Would be great if this dependency upgrade could be included.
@bruce-one thanks! looks good, think we’d clean out a bunch of our custom SASS_BINARY stuff if we implement that. Also could rename the
binding.nodeto the more standardnode_sass.bindingtoo. I won’t do my own PR for now, but I’ll ping you when we’re ready for this 😄Maybe take a look at
node-pre-gypagain as it looks like someone setup a GH releases piece https://github.com/bchr02/node-pre-gyp-github