Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation Warning: Legacy JS API #870

Closed
katozaaaa opened this issue Sep 21, 2024 · 9 comments
Closed

Deprecation Warning: Legacy JS API #870

katozaaaa opened this issue Sep 21, 2024 · 9 comments

Comments

@katozaaaa
Copy link

katozaaaa commented Sep 21, 2024

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
Copy link

See #867

@xzyfer
Copy link
Collaborator

xzyfer commented Sep 25, 2024

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

@gdm-1718-indymeer
Copy link

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

It seems there already exist a PR for this: #846

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

@timint
Copy link

timint commented Nov 19, 2024

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

@beatrizsmerino
Copy link

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
Copy link

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
Copy link
Author

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
Copy link
Collaborator

xzyfer commented Nov 27, 2024

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

@xzyfer xzyfer closed this as completed Nov 27, 2024
@beatrizsmerino
Copy link

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:
#871 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants