From 98c3c40e4bc75508fd943cafa3fc5a32f6723ca5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 15 Jun 2026 18:17:38 +0000 Subject: [PATCH 1/4] Initial plan From dbc6b474432807756cb71a4e0e7aa8da873cecba Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 15 Jun 2026 18:20:50 +0000 Subject: [PATCH 2/4] fix(heft-sass-plugin): wire ignoreDeprecationsInDependencies to Sass quietDeps option --- heft-plugins/heft-sass-plugin/src/SassPlugin.ts | 3 +++ heft-plugins/heft-sass-plugin/src/SassProcessor.ts | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/heft-plugins/heft-sass-plugin/src/SassPlugin.ts b/heft-plugins/heft-sass-plugin/src/SassPlugin.ts index 32d1ef5a74..24f2760e1d 100644 --- a/heft-plugins/heft-sass-plugin/src/SassPlugin.ts +++ b/heft-plugins/heft-sass-plugin/src/SassPlugin.ts @@ -27,6 +27,7 @@ export interface ISassConfigurationJson { exportAsDefault?: boolean; fileExtensions?: string[]; nonModuleFileExtensions?: string[]; + ignoreDeprecationsInDependencies?: boolean; silenceDeprecations?: string[]; excludeFiles?: string[]; doNotTrimOriginalFileExtension?: boolean; @@ -98,6 +99,7 @@ export default class SassPlugin implements IHeftPlugin { exportAsDefault = true, fileExtensions, nonModuleFileExtensions, + ignoreDeprecationsInDependencies, silenceDeprecations, excludeFiles, doNotTrimOriginalFileExtension, @@ -129,6 +131,7 @@ export default class SassPlugin implements IHeftPlugin { }; }), silenceDeprecations, + ignoreDeprecationsInDependencies, doNotTrimOriginalFileExtension, preserveIcssExports, sourceMap, diff --git a/heft-plugins/heft-sass-plugin/src/SassProcessor.ts b/heft-plugins/heft-sass-plugin/src/SassProcessor.ts index 76a22befe6..9b0c3b03b0 100644 --- a/heft-plugins/heft-sass-plugin/src/SassProcessor.ts +++ b/heft-plugins/heft-sass-plugin/src/SassProcessor.ts @@ -211,7 +211,7 @@ export class SassProcessor { private _configFilePath: string | undefined; public constructor(options: ISassProcessorOptions) { - const { silenceDeprecations, excludeFiles } = options; + const { silenceDeprecations, excludeFiles, ignoreDeprecationsInDependencies } = options; const { isFileModule, allFileExtensions } = buildExtensionClassifier(options); @@ -271,6 +271,7 @@ export class SassProcessor { } ], silenceDeprecations: deprecationsToSilence, + quietDeps: ignoreDeprecationsInDependencies, ...(options.sourceMap && { sourceMap: true, sourceMapIncludeSources: true }) }; } From 53c70ecc6b206d258c3fb1dc53937e91a2e9a3d4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 19 Jun 2026 18:35:22 +0000 Subject: [PATCH 3/4] chore: add changelog entry for ignoreDeprecationsInDependencies fix --- ...reDeprecationsInDependencies_2026-06-19-18-35.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 common/changes/@rushstack/heft-sass-plugin/fix-ignoreDeprecationsInDependencies_2026-06-19-18-35.json diff --git a/common/changes/@rushstack/heft-sass-plugin/fix-ignoreDeprecationsInDependencies_2026-06-19-18-35.json b/common/changes/@rushstack/heft-sass-plugin/fix-ignoreDeprecationsInDependencies_2026-06-19-18-35.json new file mode 100644 index 0000000000..91d8ddc462 --- /dev/null +++ b/common/changes/@rushstack/heft-sass-plugin/fix-ignoreDeprecationsInDependencies_2026-06-19-18-35.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "Fix `ignoreDeprecationsInDependencies` option being silently ignored; it is now correctly forwarded to the Sass compiler's `quietDeps` flag.", + "type": "patch", + "packageName": "@rushstack/heft-sass-plugin" + } + ], + "packageName": "@rushstack/heft-sass-plugin", + "email": "copilot@users.noreply.github.com" +} From 92ecc72527a07765e4f42460a1f8e0db244b8f28 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 19 Jun 2026 18:47:02 +0000 Subject: [PATCH 4/4] test(heft-sass-plugin): add tests for ignoreDeprecationsInDependencies option --- .../heft-sass-plugin/src/SassProcessor.ts | 10 ++++++++++ .../src/test/SassProcessor.test.ts | 19 +++++++++++++++++++ .../_partial-with-color-deprecation.scss | 5 +++++ ...partial-with-color-deprecation.module.scss | 7 +++++++ 4 files changed, 41 insertions(+) create mode 100644 heft-plugins/heft-sass-plugin/src/test/fixtures/_partial-with-color-deprecation.scss create mode 100644 heft-plugins/heft-sass-plugin/src/test/fixtures/use-partial-with-color-deprecation.module.scss diff --git a/heft-plugins/heft-sass-plugin/src/SassProcessor.ts b/heft-plugins/heft-sass-plugin/src/SassProcessor.ts index 9b0c3b03b0..0b7c4872be 100644 --- a/heft-plugins/heft-sass-plugin/src/SassProcessor.ts +++ b/heft-plugins/heft-sass-plugin/src/SassProcessor.ts @@ -261,6 +261,7 @@ export class SassProcessor { this._resolutions = new Map(); this._options = options; this._realpathSync = new RealNodeModulePathResolver().realNodeModulePath; + const { terminal } = options.logger; this._scssOptions = { style: 'expanded', // leave minification to clean-css importers: [ @@ -270,6 +271,15 @@ export class SassProcessor { load: loadAsync } ], + logger: { + warn: (message, { deprecation }) => { + if (deprecation) { + terminal.writeWarningLine(`Deprecation Warning: ${message}`); + } else { + terminal.writeWarningLine(`Warning: ${message}`); + } + } + }, silenceDeprecations: deprecationsToSilence, quietDeps: ignoreDeprecationsInDependencies, ...(options.sourceMap && { sourceMap: true, sourceMapIncludeSources: true }) diff --git a/heft-plugins/heft-sass-plugin/src/test/SassProcessor.test.ts b/heft-plugins/heft-sass-plugin/src/test/SassProcessor.test.ts index 4faa802770..d878b95a9d 100644 --- a/heft-plugins/heft-sass-plugin/src/test/SassProcessor.test.ts +++ b/heft-plugins/heft-sass-plugin/src/test/SassProcessor.test.ts @@ -29,6 +29,7 @@ type ICreateProcessorOptions = Partial< | 'dtsOutputFolders' | 'exportAsDefault' | 'fileExtensions' + | 'ignoreDeprecationsInDependencies' | 'nonModuleFileExtensions' | 'postProcessCssAsync' | 'preserveIcssExports' @@ -596,6 +597,24 @@ describe(SassProcessor.name, () => { }); }); + describe('ignoreDeprecationsInDependencies option', () => { + it('emits deprecation warnings from a dependency partial by default', async () => { + const { processor, logger } = createProcessor(terminalProvider); + await compileFixtureAsync(processor, 'use-partial-with-color-deprecation.module.scss'); + expect(logger.errors).toHaveLength(0); + expect(terminalProvider.getWarningOutput()).toContain('Deprecation Warning:'); + }); + + it('suppresses deprecation warnings from a dependency partial when ignoreDeprecationsInDependencies is true', async () => { + const { processor, logger } = createProcessor(terminalProvider, { + ignoreDeprecationsInDependencies: true + }); + await compileFixtureAsync(processor, 'use-partial-with-color-deprecation.module.scss'); + expect(logger.errors).toHaveLength(0); + expect(terminalProvider.getWarningOutput()).not.toContain('Deprecation Warning:'); + }); + }); + describe('non-module (global) files', () => { it('emits plain compiled CSS for a .global.scss file', async () => { const { processor } = createProcessor(terminalProvider, { diff --git a/heft-plugins/heft-sass-plugin/src/test/fixtures/_partial-with-color-deprecation.scss b/heft-plugins/heft-sass-plugin/src/test/fixtures/_partial-with-color-deprecation.scss new file mode 100644 index 0000000000..468ec49fd4 --- /dev/null +++ b/heft-plugins/heft-sass-plugin/src/test/fixtures/_partial-with-color-deprecation.scss @@ -0,0 +1,5 @@ +// This partial intentionally uses darken(), a deprecated Sass global color function. +// It exists only to test the ignoreDeprecationsInDependencies option. +.dep-style { + color: darken(#0078d4, 10%); +} diff --git a/heft-plugins/heft-sass-plugin/src/test/fixtures/use-partial-with-color-deprecation.module.scss b/heft-plugins/heft-sass-plugin/src/test/fixtures/use-partial-with-color-deprecation.module.scss new file mode 100644 index 0000000000..701289d879 --- /dev/null +++ b/heft-plugins/heft-sass-plugin/src/test/fixtures/use-partial-with-color-deprecation.module.scss @@ -0,0 +1,7 @@ +// This file @use's a partial that contains a deprecated Sass function. +// It exists only to test the ignoreDeprecationsInDependencies option. +@use 'partial-with-color-deprecation'; + +.container { + color: red; +}