Skip to content

Commit

Permalink
[not verified] Remove deps on node-sass, use sass instead.
Browse files Browse the repository at this point in the history
`node-sass` is deprecated and sort-of depends on being able to download
precompiled binaries that match the version of node in use. `sass` is
the replacement.

The update to calypso-build 9.0.0 in #20789 took care of most of the
dependencies on `node-sass` in the monorepo. This cleans up the rest.
  • Loading branch information
anomiex committed Aug 24, 2021
1 parent 87a7520 commit 8466958
Show file tree
Hide file tree
Showing 9 changed files with 198 additions and 553 deletions.
714 changes: 169 additions & 545 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions projects/packages/identity-crisis/changelog/remove-node-sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Update `gulp-sass` to 5.0.0, and use `sass` with it rather than `node-sass`.


5 changes: 4 additions & 1 deletion projects/packages/identity-crisis/gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@
import gulp from 'gulp';
import webpack from 'webpack';
import log from 'fancy-log';
import sass from 'gulp-sass';
import gulpSass from 'gulp-sass';
import dartSass from 'sass';
import prepend from 'gulp-append-prepend';
import autoprefixer from 'gulp-autoprefixer';
import sourcemaps from 'gulp-sourcemaps';
import rename from 'gulp-rename';
import cleanCSS from 'gulp-clean-css';
import rtlcss from 'gulp-rtlcss';

const sass = gulpSass( dartSass );

/**
* Get the Webpack config.
*
Expand Down
5 changes: 3 additions & 2 deletions projects/packages/identity-crisis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@
"gulp-clean-css": "4.3.0",
"gulp-rename": "2.0.0",
"gulp-rtlcss": "1.4.1",
"gulp-sass": "4.1.0",
"gulp-sourcemaps": "3.0.0"
"gulp-sass": "5.0.0",
"gulp-sourcemaps": "3.0.0",
"sass": "1.38.1"
},
"engines": {
"node": "^14.16.1",
Expand Down
5 changes: 5 additions & 0 deletions projects/plugins/boost/changelog/remove-node-sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: removed
Comment: Remove `node-sass` dep, use `sass` instead. And update the dep to the latest version for good measure.


3 changes: 1 addition & 2 deletions projects/plugins/boost/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"expect-puppeteer": "^5.0.4",
"jest": "27.0.6",
"jest-puppeteer": "^5.0.4",
"node-sass": "^6.0.0",
"node-wp-i18n": "^1.2.5",
"npm-run-all": "^4.1.5",
"prettier": "npm:wp-prettier@2.2.1-beta-1",
Expand All @@ -43,7 +42,7 @@
"rollup-plugin-svelte": "^7.1.0",
"rollup-plugin-svelte-svg": "^0.2.3",
"rollup-plugin-terser": "^7.0.2",
"sass": "^1.34.1",
"sass": "^1.38.1",
"sass-loader": "^12.0.0",
"svelte": "^3.38.2",
"svelte-check": "^2.1.0",
Expand Down
5 changes: 5 additions & 0 deletions projects/plugins/jetpack/changelog/remove-node-sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: other
Comment: Replace `node-sass` with `sass`. Update `gulp-sass` to 5.0.0 to do so.


4 changes: 2 additions & 2 deletions projects/plugins/jetpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,12 @@
"gulp-modify-css-urls": "2.0.0",
"gulp-rename": "2.0.0",
"gulp-rtlcss": "1.4.1",
"gulp-sass": "4.1.0",
"gulp-sass": "5.0.0",
"gulp-sourcemaps": "3.0.0",
"jsdom": "16.4.0",
"jsdom-global": "3.0.2",
"mapbox-gl": "1.13.0",
"markdown-it": "12.0.4",
"node-sass": "4.14.1",
"page": "1.7.1",
"photon": "4.0.0",
"plugin-error": "1.0.1",
Expand All @@ -136,6 +135,7 @@
"refx": "3.1.1",
"rememo": "3.0.0",
"resize-observer-polyfill": "1.5.1",
"sass": "1.38.1",
"semver": "7.3.5",
"social-logos": "2.3.0",
"static-site-generator-webpack-plugin": "3.4.2",
Expand Down
5 changes: 4 additions & 1 deletion projects/plugins/jetpack/tools/builder/sass.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@
*/
import autoprefixer from 'gulp-autoprefixer';
import cleanCSS from 'gulp-clean-css';
import dartSass from 'sass';
import gulp from 'gulp';
import gulpSass from 'gulp-sass';
import log from 'fancy-log';
import prepend from 'gulp-append-prepend';
import rename from 'gulp-rename';
import rtlcss from 'gulp-rtlcss';
import sass from 'gulp-sass';
import sourcemaps from 'gulp-sourcemaps';

const sass = gulpSass( dartSass );

/**
* Internal dependencies
*/
Expand Down

0 comments on commit 8466958

Please sign in to comment.