
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
@thezebra/sass-affected
Advanced tools
Map SASS file changes to the root file(s) that are affected, helping create more efficient regression tests.
Map Sass file changes to the root file(s) that are affected, helping create more efficient regression tests.
One can use sass-graph as a CLI tool to find the ancestors of a Sass file. This will list every intermediary file as well as the root(s). sass-affected aims to show the root Sass file so that developers or QA teams can identify which templates are affected by changing any ol' Sass file in a project.
The CLI tool is built to support Node 6.x runtimes. The Node library is exposed in CommonJS format for Node 6.x and in ES2015 format if you need to bundle it for other runtimes.
With npm:
$ npm install @thezebra/sass-affected --save-dev
With yarn:
$ yarn add @thezebra/sass-affected --dev
This tool only finds root Sass files. It is not wired up to version control, CI, or any sort of build process out of the box. You will have to integrate it into your teams processes to get any benefit.
sass-affected --dir src/scss --changed src/scss/helpers/_utils.scss
Let the tool diff against a branch:
sass-affected --dir src/scss --branch origin/master
import sassAffected from "sass-affected";
// This returns a Promise
sassAffected("mocks", ["mocks/rootA.scss"]).then(obj => {
// The output will be an array of roots with their corresponding message:
// [{ file, message }]
console.log(obj);
});
Add the following magic comment to the top of your root Sass files to customize the regression check message:
// sass-affected /homepage.html should be checked for regressions!
sass-affected is meant to be used as a helpful library in a team's development and QA process. The most helpful contributions are separate modules, scripts, etc that allow development and QA teams to integrate the helpful regression messages without extra work. That said, if you have suggestions and improvements to this library, please feel welcome!
See our contributing guide for details.
FAQs
Map SASS file changes to the root file(s) that are affected, helping create more efficient regression tests.
We found that @thezebra/sass-affected demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.