Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
sass-deprecate
Advanced tools
deprecate()
is a Sass mixin that helps managing code deprecation.
How? Sass Deprecate warns about the pieces of your codebase that are deprecated, instructing developers where to clean up. It helps provide a clear upgrade path for framework and library users.
Typical workflow:
$app-version: '1.0.0';
@import 'path/to/deprecate/index.scss';
.button { background: red; }
We're introducing a new type of button, but we want to keep the old one in for backwards compatibility.
$app-version: '1.0.0';
@import 'path/to/deprecate/index.scss';
@include deprecate('2.0.0', 'Use .button-new instead') {
.button { background: red; }
}
.button-new { background: red; border: 3px solid blue; }
/* Compiled CSS */
.button { background: red; }
.button-new { background: red; border: 3px solid blue; }
Major update: we don't want to ship deprecated code, and this is where Sass Deprecate comes into play:
$app-version: '2.0.0';
@import 'path/to/deprecate/index.scss';
...
The compiler will start throwing warnings, such as:
WARNING: Deprecated code was found, it should be removed before its release.
REASON: Use .button-new instead
on line 145 of index.scss
from line 5 of button.scss
And the compiled CSS won't include .button
:
/* Compiled CSS */
.button-new { background: red; border: 3px solid blue; }
$ npm install
$ npm test
Sass Deprecate's API is documented using SassDoc.
npm run generate-doc
Generate & deploy the documentation to http://sass-mq.github.io/sass-mq/:
npm run deploy-doc
Source code is licensed under BSD License Clause 2.
Thanks to Hugo Giraudel for his to-number
Sass function.
FAQs
Sass Deprecate: deprecate with confidence
The npm package sass-deprecate receives a total of 79 weekly downloads. As such, sass-deprecate popularity was classified as not popular.
We found that sass-deprecate demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.