Skip to content

v7.0.0-beta.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@jgerigmeyer jgerigmeyer released this 16 Sep 16:33
· 109 commits to main since this release
2d049b3
  • 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
  • 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

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' },
  // True options [required]
  { describe, it, sass },
);

const sassString = `
h1 {
  font-size: 40px;
}`;
sassTrue.runSass(
  // Sass options [required]
  { data: sassString, outputStyle: 'compressed' },
  // 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' },
);

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' },
);

Full Changelog: v6.1.0...v7.0.0-beta.0