Breaking changes for next major #2111
Description
Current WIP: #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 610+.
- 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 #2300
See #1973
See #1369
See #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 sass/libsass#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.