Skip to content

Commit ce14151

Browse files
authored
fix: STRF-13766 Update node sass version with minor fix (#152)
1 parent b4b9726 commit ce14151

6 files changed

Lines changed: 88 additions & 76 deletions

File tree

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20
1+
22

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### 6.2.4 (2025-11-03)
2+
3+
- fix: STRF-13766 Update node sass version with minor fix ([152](https://github.com/bigcommerce/stencil-styles/pull/152))
4+
15
### 6.2.3 (2025-10-31)
26

37
- fix: use npm registry for node-sass ([150](https://github.com/bigcommerce/stencil-styles/pull/150))

lib/ScssCompiler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class ScssCompiler {
7676
};
7777
const result = await this._render(engineOptions);
7878
this.files = {};
79-
return result.css;
79+
return result.css.toString();
8080
}
8181

8282
/**

package-lock.json

Lines changed: 65 additions & 68 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@bigcommerce/stencil-styles",
3-
"version": "6.2.3",
3+
"version": "6.2.4",
44
"description": "Compiles SCSS for the Stencil Framework",
55
"main": "lib/index.js",
66
"scripts": {
@@ -28,11 +28,11 @@
2828
"lib/"
2929
],
3030
"dependencies": {
31+
"@bigcommerce/node-sass": "10.0.1",
3132
"async": "^3.2.6",
3233
"autoprefixer": "^10.4.20",
3334
"cheerio": "^1.0.0-rc.12",
3435
"lodash": "^4.17.21",
35-
"@bigcommerce/node-sass": "10.0.0",
3636
"postcss": "^8.4.45",
3737
"recursive-readdir": "^2.2.3",
3838
"sass": "^1.58.0",

test/ScssCompiler.js

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,22 @@ describe('ScssCompiler', () => {
116116
});
117117

118118
it('should return the compiled css from the primary engine when it finishes successfully', async () => {
119-
const scssCompiler = createScssCompiler()
120-
121-
const result = await scssCompiler.compile(getOptionsMock());
119+
const scssCompiler = new ScssCompiler(console);
120+
scssCompiler.activateNodeSassEngine();
121+
const files = {
122+
'theme.scss': '@import "tools/tools";\n@import "tools/onemore";\n\nh1 {\n color: #0000AA;\n}\n\n$font: "Arial";',
123+
'tools/tools.scss': '.tools {\n color: red;\n}',
124+
'tools/onemore.scss': '.underscore {\n color: green;\n}',
125+
};
126+
const result = await scssCompiler.compile({
127+
data: files['theme.scss'],
128+
files,
129+
dest: `/assets/css/theme.scss`,
130+
themeSettings: { ...themeSettingsMock },
131+
autoprefixerOptions: {},
132+
});
122133

123-
expect(result).to.equal(getRenderResultMock().css);
134+
expect(result).to.equal(".tools {\n color: red; }\n\n.underscore {\n color: green; }\n\nh1 {\n color: #0000AA; }\n");
124135
});
125136
});
126137

0 commit comments

Comments
 (0)