Skip to content

v7.0.0

Compare
Choose a tag to compare
@jgerigmeyer jgerigmeyer released this 14 Dec 20:01
· 90 commits to main since this release
e6340fc
  • FEATURE: contains() checks multiple block with matching selectors. #243
  • BREAKING: Upgrade to newer Sass 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
    • Note that some of the Sass options have changed. For example, includePaths is now loadPaths, outputStyle is now style, importer is now importers, etc. See the Dart Sass documentation for more details.
  • 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

Migrating from v6

  • runSass arguments have changed:

v6:

const path = require('path');
const sass = require('node-sass');
const sassTrue = require('sass-true');

const sassFile = path.join(__dirname, 'test.scss');
sassTrue.runSass(
  // Sass options [required]
  { file: sassFile, outputStyle: 'compressed', includePaths: ['node_modules'] },
  // True options [required]
  { describe, it, sass },
);

const sassString = `
h1 {
  font-size: 40px;
}`;
sassTrue.runSass(
  // Sass options [required]
  {
    data: sassString,
    outputStyle: 'compressed',
    includePaths: ['node_modules'],
  },
  // True options [required]
  { describe, it, sass },
);

v7:

const path = require('path');
const sassTrue = require('sass-true');

const sassFile = path.join(__dirname, 'test.scss');
sassTrue.runSass(
  // True options [required]
  { describe, it },
  // Sass source (path) [required]
  sassFile,
  // Sass options [optional]
  { style: 'compressed', loadPaths: ['node_modules'] },
);

const sassString = `
h1 {
  font-size: 40px;
}`;
sassTrue.runSass(
  // True options [required]
  { describe, it, sourceType: 'string' },
  // Sass source (string) [required]
  sassString,
  // Sass options [optional]
  { style: 'compressed', loadPaths: ['node_modules'] },
);

New Contributors

  • @codr made their first contribution in #243

Full Changelog: v6.1.0...v7.0.0