Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sass-true

Package Overview
Dependencies
Maintainers
3
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sass-true - npm Package Compare versions

Comparing version 7.0.0-beta.0 to 7.0.0

19

CHANGELOG.md
# True Changelog
## 7.0.0-beta.0 (09/16/22)
## 7.0.0 (12/14/22)
- FEATURE: `contains()` checks multiple block with matching selectors.
[#243](https://github.com/oddbird/true/pull/243)
- BREAKING: Upgrade to newer [Sass API](https://sass-lang.com/documentation/js-api)

@@ -9,5 +11,7 @@ - Add True `sourceType` option (`path` [default] or `string`)

path (or string), 3) optional Sass options
- BREAKING: Require `sass` as a peer-dependency, removing True `sass` option
- BREAKING: Require `sass` (`>=1.45.0`) as a peer-dependency, removing True
`sass` option
- BREAKING: Drop support for node < 14.15.0
- INTERNAL: Use both Jest and Mocha for internal testing
- INTERNAL: Remove documentation from npm package
- INTERNAL: Update dependencies

@@ -76,2 +80,13 @@

## 7.0.0-beta.0 (09/16/22)
- BREAKING: Upgrade to newer [Sass API](https://sass-lang.com/documentation/js-api)
- Add True `sourceType` option (`path` [default] or `string`)
- Reverse order of expected arguments to `runSass`: 1) True options, 2) source
path (or string), 3) optional Sass options
- BREAKING: Require `sass` as a peer-dependency, removing True `sass` option
- BREAKING: Drop support for node < 14.15.0
- INTERNAL: Use both Jest and Mocha for internal testing
- INTERNAL: Update dependencies
## 6.1.0 (03/02/22)

@@ -78,0 +93,0 @@

6

lib/index.d.ts

@@ -27,3 +27,3 @@ import * as css from 'css';

}
export declare type Context = {
export type Context = {
modules: Module[];

@@ -36,6 +36,6 @@ currentModule?: Module;

};
export declare type Rule = css.Comment | css.Rule | css.AtRule;
export declare type Parser = (rule: Rule, ctx: Context) => Parser;
export type Rule = css.Comment | css.Rule | css.AtRule;
export type Parser = (rule: Rule, ctx: Context) => Parser;
export declare const runSass: (trueOptions: TrueOptions, src: string, sassOptions?: Options<'sync'> | StringOptions<'sync'>) => void;
export declare const formatFailureMessage: (assertion: Assertion) => string;
export declare const parse: (rawCss: Readonly<string>, ctxLines?: Readonly<number>) => Module[];

@@ -164,4 +164,4 @@ "use strict";

const results = expectedBlocks.map((block) => {
const outputBlock = outputBlocks.find((element) => element.selector === block.selector);
if (outputBlock) {
const matchingOutputBlocks = outputBlocks.filter((element) => element.selector === block.selector);
if (matchingOutputBlocks.length) {
// Turns a css string into an array of property-value pairs.

@@ -171,5 +171,5 @@ const expectedProperties = block.output

.map((propertyValuePair) => propertyValuePair.trim())
.filter((innerBlock) => innerBlock !== ' {' && innerBlock !== '}');
.filter((innerBlock) => innerBlock && innerBlock !== ' {' && innerBlock !== '}');
// This is the assertion itself!
return expectedProperties.every((property) => outputBlock.output.includes(property));
return expectedProperties.every((property) => matchingOutputBlocks.some((outputBlock) => outputBlock.output.includes(property)));
}

@@ -176,0 +176,0 @@ return false;

{
"name": "sass-true",
"title": "True",
"version": "7.0.0-beta.0",
"version": "7.0.0",
"description": "Unit testing for Sass.",

@@ -38,3 +38,2 @@ "keywords": [

"_index.scss",
"docs/",
"CHANGELOG.md",

@@ -74,34 +73,34 @@ "LICENSE.txt",

"css": "^3.0.0",
"jest-diff": "^29.0.3",
"jest-diff": "^29.3.1",
"lodash": "^4.17.21"
},
"devDependencies": {
"@babel/core": "^7.19.1",
"@babel/preset-env": "^7.19.1",
"@babel/core": "^7.20.5",
"@babel/preset-env": "^7.20.2",
"@babel/preset-typescript": "^7.18.6",
"@types/lodash": "^4.14.185",
"@typescript-eslint/eslint-plugin": "^5.37.0",
"@typescript-eslint/parser": "^5.37.0",
"babel-jest": "^29.0.3",
"chai": "^4.3.6",
"eslint": "^8.23.1",
"@types/lodash": "^4.14.191",
"@typescript-eslint/eslint-plugin": "^5.46.1",
"@typescript-eslint/parser": "^5.46.1",
"babel-jest": "^29.3.1",
"chai": "^4.3.7",
"eslint": "^8.29.0",
"eslint-config-prettier": "^8.5.0",
"eslint-import-resolver-typescript": "^3.5.1",
"eslint-import-resolver-typescript": "^3.5.2",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-simple-import-sort": "^8.0.0",
"jest": "^29.0.3",
"jest": "^29.3.1",
"jest-environment-node-single-context": "^29.0.0",
"mocha": "^10.0.0",
"mocha": "^10.2.0",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.16",
"prettier": "^2.7.1",
"sass": "^1.54.9",
"postcss": "^8.4.20",
"prettier": "^2.8.1",
"sass": "^1.56.2",
"sassdoc": "^2.7.4",
"sassdoc-theme-herman": "^4.0.2",
"stylelint": "^14.11.0",
"stylelint-config-prettier": "^9.0.3",
"stylelint-config-standard-scss": "^5.0.0",
"sassdoc-theme-herman": "^5.0.0",
"stylelint": "^14.16.0",
"stylelint-config-prettier": "^9.0.4",
"stylelint-config-standard-scss": "^6.1.0",
"stylelint-prettier": "^2.0.0",
"typescript": "^4.8.3"
"typescript": "^4.9.4"
},

@@ -108,0 +107,0 @@ "eyeglass": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc