dlmanning / gulp-sass

SASS plugin for gulp
MIT License
1.57k stars 381 forks source link

Deprecation Warning: Legacy JS API #870

Closed katozaaaa closed 3 days ago

katozaaaa commented 2 months ago

Good day, a few days ago, the terminal began to issue a message: "Deprecation Warning: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0."

SASS is moving to a new API according to this article

steffenweber commented 2 months ago

See https://github.com/dlmanning/gulp-sass/issues/867

xzyfer commented 2 months ago

Thanks. I'm not across the changes but welcome any PRs.

gdm-1718-indymeer commented 2 weeks ago

Thanks. I'm not across the changes but welcome any PRs.

It seems there already exist a PR for this: https://github.com/dlmanning/gulp-sass/pull/846

Any idea when this gets merged since i have barely an idea how to upgrade to the new api

timint commented 1 week ago

Is this repo abandoned? That pull request was 2½ years ago.

beatrizsmerino commented 1 week ago

Is this repo abandoned? That pull request was 2½ years ago.

I don't think it is abandoned, or I don't expect it to be, I have several old projects that use it and I keep updating them. This PR is dated September 22, 2024. What is true is that it has been open for a long time and we don't know if they are working on it.

beatrizsmerino commented 5 days ago

I've updated every part of the outdated code but I kept seeing this message:

Deprecation Warning: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
More info: https://sass-lang.com/d/legacy-js-api

I have found a solution here: https://stackoverflow.com/a/79180897/10855837

You can add a silenceDeprecations option to temporarily hide these warnings:

const gulp = require("gulp");
const sass = require("gulp-sass")(require("sass"));

gulp.task("sass", function(){
  return gulp
    .src("./src/sass/*.scss")
    .pipe(sass({
      silenceDeprecations: ['legacy-js-api'],
    }))
    .pipe(gulp.dest("./dist/css"));
});
katozaaaa commented 5 days ago

You can add a silenceDeprecations option to temporarily hide these warnings:

Thanks, because the messages are really annoying, while there is no way to move on new API)

xzyfer commented 3 days ago

We've released v6.0.0 which should resolves this issue.

beatrizsmerino commented 3 days ago

You can add a silenceDeprecations option to temporarily hide these warnings:

Thanks, because the messages are really annoying, while there is no way to move on new API)

@katozaaaa here, I describe the upgrades that I made before use silenceDeprecations: https://github.com/dlmanning/gulp-sass/issues/871#issuecomment-2504438766