Skip to content

fix(heft-sass-plugin): wire ignoreDeprecationsInDependencies to Sass quietDeps#5834

Draft
Copilot wants to merge 4 commits into
mainfrom
copilot/fix-ignore-deprecations-in-dependencies
Draft

fix(heft-sass-plugin): wire ignoreDeprecationsInDependencies to Sass quietDeps#5834
Copilot wants to merge 4 commits into
mainfrom
copilot/fix-ignore-deprecations-in-dependencies

Conversation

Copilot AI commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

ignoreDeprecationsInDependencies was declared in the JSON schema, ISassProcessorOptions, and README but was silently dropped — never read from config and never forwarded to the Sass compiler. Setting it to true passed validation and had no effect.

Changes

  • SassPlugin.ts: Add ignoreDeprecationsInDependencies?: boolean to ISassConfigurationJson; destructure it from the loaded config and pass it into ISassProcessorOptions
  • SassProcessor.ts: Destructure ignoreDeprecationsInDependencies from options; set quietDeps: ignoreDeprecationsInDependencies on _scssOptions alongside the existing silenceDeprecations. Also added a Sass logger to _scssOptions that forwards compiler warnings (including deprecation warnings) to the heft terminal via writeWarningLine(), making them visible to developers.

quietDeps and silenceDeprecations are independent Sass compiler options and compose correctly — quietDeps suppresses deprecation warnings from dependency stylesheets only, while silenceDeprecations globally suppresses specific deprecation codes.

// config/sass.json — now actually works
{
  "ignoreDeprecationsInDependencies": true
}

Tests

Added two new tests in SassProcessor.test.ts under a describe('ignoreDeprecationsInDependencies option') block, backed by new fixtures (_partial-with-color-deprecation.scss and use-partial-with-color-deprecation.module.scss):

  1. Verifies that deprecation warnings from a dependency partial appear in the terminal by default.
  2. Verifies that those warnings are suppressed when ignoreDeprecationsInDependencies: true is set.

Copilot AI changed the title [WIP] Fix ignoreDeprecationsInDependencies to wire to Sass quietDeps fix(heft-sass-plugin): wire ignoreDeprecationsInDependencies to Sass quietDeps Jun 15, 2026
Copilot AI requested a review from iclanton June 15, 2026 18:21
@iclanton

Copy link
Copy Markdown
Member

@copilot - this needs a changelog entry.

Copilot AI commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

@copilot - this needs a changelog entry.

Added a changelog entry in common/changes/@rushstack/heft-sass-plugin/fix-ignoreDeprecationsInDependencies_2026-06-19-18-35.json (commit chore: add changelog entry for ignoreDeprecationsInDependencies fix).

@iclanton

Copy link
Copy Markdown
Member

@copilot - It would be useful to have some tests for this.

Copilot AI commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

@copilot - It would be useful to have some tests for this.

Added tests in commit test(heft-sass-plugin): add tests for ignoreDeprecationsInDependencies option:

  • SassProcessor.ts: Added a Sass logger to _scssOptions that forwards compiler warnings (including deprecation warnings) to the terminal via writeWarningLine(). This makes Sass deprecation warnings visible to developers and testable.
  • New fixtures: _partial-with-color-deprecation.scss (uses the deprecated darken() color function) and use-partial-with-color-deprecation.module.scss (entry file that @uses the partial).
  • New describe('ignoreDeprecationsInDependencies option') block with two tests:
    1. Verifies that deprecation warnings from a dependency partial appear in the terminal by default.
    2. Verifies that those warnings are suppressed when ignoreDeprecationsInDependencies: true is set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs triage

Development

Successfully merging this pull request may close these issues.

2 participants