Previously, @nex3 was kind enough to provide the following code to exclude certain deprecations.
const sass = require('sass');
const deprecationIds = Object.keys(sass.deprecations);
const excludedDeprecations = ['import'];
const includedDeprecations = deprecationIds.filter(id => !(new Set(excludedDeprecations)).has(id));
sass.compileString(
'@import "other"',
{ silenceDeprecations: excludedDeprecations, fatalDeprecations: includedDeprecations }
);
This worked without issue. However, I am now seeing the following unexpected warnings:
Warning: mixed-decls deprecation is obsolete, so does not need to be made fatal.
Warning: type-function deprecation is obsolete, so does not need to be made fatal.
Although it shouldn't be necessary, adding mixed-decls and type-functions to silenceDeprecations removes the previous warnings, but now causes the following:
Warning: mixed-decls deprecation is obsolete. If you were previously silencing it, your code may now behave in unexpected ways.
Warning: type-function deprecation is obsolete. If you were previously silencing it, your code may now behave in unexpected ways.
Ideally, I would expect deprecations that are obsolete not to be included by Sass.