Skip to content

feat!: remove legacy Sass JS API support#1314

Merged
alexander-akait merged 1 commit into
mainfrom
claude/remove-legacy-api-Vx384
May 12, 2026
Merged

feat!: remove legacy Sass JS API support#1314
alexander-akait merged 1 commit into
mainfrom
claude/remove-legacy-api-Vx384

Conversation

@alexander-akait

Copy link
Copy Markdown
Member

Summary

  • Drop the api: "legacy" option; the api option now accepts "modern" and "modern-compiler" only.
  • Remove the legacy code path in the loader (getWebpackImporter, legacy sass options, legacy error / stats.includedFiles handling, render() callback path).
  • Remove legacy branches in test helpers (getCodeFromSass, getImplementationsAndAPI), drop the now-unused customImporter helper, simplify customFunctions, and drop the "legacy JS API is deprecated" filter from normalizeErrors.
  • Clean legacy branches and isModernAPI ternaries from loader.test.js, sassOptions-option.test.js, sourceMap-options.test.js, implementation-option.test.js, webpackImporter-options.test.js, and validate-options.test.js. webpackImporter-options now runs against modern APIs.
  • Update README: remove old API / new API annotations, drop LegacyOptions from sassOptions type, switch examples to style: "compressed", update the api option enum, and add a migration note.
  • Regenerate Jest snapshots.

Test plan

  • jest — full test suite passes (validate-options, implementation-option, loader, sassOptions-option, sourceMap-options, additionalData-option, webpackImporter-options, warnRuleAsWarning, cjs, resolver).
  • Manual sanity check via npm run test:manual (not run here).

Breaking change

Users on api: "legacy" must migrate to the modern Sass JS API. See the Sass JS API docs.

https://claude.ai/code/session_01FRaLy2pGK8wueLft9F2tmG


Generated by Claude Code

The legacy Sass JS API is deprecated upstream. Drop the `api: "legacy"`
option, the legacy code path in the loader, the legacy `getWebpackImporter`,
and all related tests, helpers, and documentation. The `api` option now
accepts `"modern"` and `"modern-compiler"` only.

Snapshots are updated to reflect the removal.
@linux-foundation-easycla

Copy link
Copy Markdown

CLA Not Signed

@codecov

codecov Bot commented May 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.30%. Comparing base (243d68e) to head (0d6fc3f).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/utils.js 89.28% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1314      +/-   ##
==========================================
- Coverage   94.13%   92.30%   -1.83%     
==========================================
  Files           3        3              
  Lines         409      299     -110     
  Branches      154      104      -50     
==========================================
- Hits          385      276     -109     
+ Misses         22       20       -2     
- Partials        2        3       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@alexander-akait alexander-akait merged commit 529c02f into main May 12, 2026
13 of 17 checks passed
@alexander-akait alexander-akait deleted the claude/remove-legacy-api-Vx384 branch May 12, 2026 19:04
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

Successfully merging this pull request may close these issues.

2 participants