Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20
22
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 6.2.4 (2025-11-03)

- fix: STRF-13766 Update node sass version with minor fix ([152](https://github.com/bigcommerce/stencil-styles/pull/152))

### 6.2.3 (2025-10-31)

- fix: use npm registry for node-sass ([150](https://github.com/bigcommerce/stencil-styles/pull/150))
Expand Down
2 changes: 1 addition & 1 deletion lib/ScssCompiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class ScssCompiler {
};
const result = await this._render(engineOptions);
this.files = {};
return result.css;
return result.css.toString();
}

/**
Expand Down
133 changes: 65 additions & 68 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bigcommerce/stencil-styles",
"version": "6.2.3",
"version": "6.2.4",
"description": "Compiles SCSS for the Stencil Framework",
"main": "lib/index.js",
"scripts": {
Expand Down Expand Up @@ -28,11 +28,11 @@
"lib/"
],
"dependencies": {
"@bigcommerce/node-sass": "10.0.1",
"async": "^3.2.6",
"autoprefixer": "^10.4.20",
"cheerio": "^1.0.0-rc.12",
"lodash": "^4.17.21",
"@bigcommerce/node-sass": "10.0.0",
"postcss": "^8.4.45",
"recursive-readdir": "^2.2.3",
"sass": "^1.58.0",
Expand Down
19 changes: 15 additions & 4 deletions test/ScssCompiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,22 @@ describe('ScssCompiler', () => {
});

it('should return the compiled css from the primary engine when it finishes successfully', async () => {
const scssCompiler = createScssCompiler()

const result = await scssCompiler.compile(getOptionsMock());
const scssCompiler = new ScssCompiler(console);
scssCompiler.activateNodeSassEngine();
const files = {
'theme.scss': '@import "tools/tools";\n@import "tools/onemore";\n\nh1 {\n color: #0000AA;\n}\n\n$font: "Arial";',
'tools/tools.scss': '.tools {\n color: red;\n}',
'tools/onemore.scss': '.underscore {\n color: green;\n}',
};
const result = await scssCompiler.compile({
data: files['theme.scss'],
files,
dest: `/assets/css/theme.scss`,
themeSettings: { ...themeSettingsMock },
autoprefixerOptions: {},
});

expect(result).to.equal(getRenderResultMock().css);
expect(result).to.equal(".tools {\n color: red; }\n\n.underscore {\n color: green; }\n\nh1 {\n color: #0000AA; }\n");
});
});

Expand Down