sindresorhus / grunt-sass

Compile Sass to CSS
MIT License
1.01k stars 209 forks source link

Dependency Update: node-sass #309

Closed mdblr closed 3 years ago

mdblr commented 3 years ago

About

The current version of node-sass is incompatible with nodejs v15+. This PR updates the dependency to ^6.0.1 as outlined by the node-sass maintainers: https://www.npmjs.com/package/node-sass. Additionally, it sets the engine's field of package.json to help enforce compatible dependencies.

@sindresorhus Please let me know if there's anything I can do to help land this!

Automation

$ npm install
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.

added 944 packages, and audited 945 packages in 29s

42 packages are looking for funding
  run `npm fund` for details

12 vulnerabilities (5 moderate, 7 high)

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

$ npm test

> grunt-sass@3.1.0 test
> xo && grunt

Running "clean:test" (clean) task
>> 0 paths cleaned.

Running "sass:compile" (sass) task

Running "sass:includePaths" (sass) task

Running "sass:ignorePartials" (sass) task

Running "sass:sourceMap" (sass) task

Running "sass:sourceMapSimple" (sass) task

Running "sass:precision" (sass) task

Running "nodeunit:tasks" (nodeunit) task
Testing test.js......OK
>> 9 assertions passed (7ms)

Running "clean:test" (clean) task
>> 9 paths cleaned.

Done.

Ran on MacOS Big Sur 11.4 using nodejs v16.6.2

sindresorhus commented 3 years ago

node-sass is only a dev dependency here. It doesn't affect npm install grunt-sass.

mdblr commented 3 years ago

That's not true for projects with a package-lock.json using the latest published version @sindresorhus . Nodejs v16 will go into LTS just around the corner in October. Updating the dev dependencies would keep this package current and solve the issue I present. Do you have any plan to support v16 that I and others may be able to keep in mind then?

sindresorhus commented 3 years ago

Dev dependencies of packages are not included in your package-lock.json.

mdblr commented 3 years ago

From the lock file entry for grunt-sass:

    "requires": {
        "each-async": "^1.0.0",
        "node-sass": "^4.7.2",
        "object-assign": "^4.0.1"
      }
mdblr commented 3 years ago

Sorry, I can see the error is mine. Thanks @sindresorhus