@bigcommerce/stencil-cli 6.0.0 → 7.0.0-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -7,9 +7,8 @@ The BigCommerce server emulator for local theme development.
7
7
 
8
8
  ## Install
9
9
 
10
- _Note: Stencil requires the Node.js runtime environment,
11
- version 14.x is supported.
12
- We do not yet have support for versions greater than Node 14._
10
+ Note: Stencil requires the Node.js runtime environment,
11
+ versions 16.x, 18.x are supported.
13
12
 
14
13
  Run `npm install -g @bigcommerce/stencil-cli`.
15
14
 
@@ -13,14 +13,6 @@ class StencilCLISettings {
13
13
  isVerbose() {
14
14
  return this.versboseNetworkLogging;
15
15
  }
16
-
17
- useOldNodeSassFork(flag) {
18
- this.oldNodeSassFork = flag;
19
- }
20
-
21
- isOldNodeSassForkEnabled() {
22
- return this.oldNodeSassFork;
23
- }
24
16
  }
25
17
 
26
18
  const settings = new StencilCLISettings();
@@ -15,7 +15,6 @@ const privateThemeConfigValidationSchema = require('./schemas/privateThemeConfig
15
15
  const themeConfigValidationSchema = require('./schemas/themeConfig.json');
16
16
  const themeValidationSchema = require('./schemas/themeSchema.json');
17
17
  const cssCompiler = require('./css/compile');
18
- const stencilCLISettings = require('./StencilCLISettings');
19
18
 
20
19
  const VALID_IMAGE_TYPES = ['.jpg', '.jpeg', '.png', '.gif'];
21
20
  const WIDTH_COMPOSED = 600;
@@ -415,26 +414,16 @@ class BundleValidator {
415
414
 
416
415
  for (const file of cssFiles) {
417
416
  try {
418
- const engine = stencilCLISettings.isOldNodeSassForkEnabled()
419
- ? cssCompiler.FALLBACK_SASS_ENGINE_NAME
420
- : cssCompiler.SASS_ENGINE_NAME;
421
417
  /* eslint-disable-next-line no-await-in-loop */
422
- await cssCompiler.compile(rawConfig, assetsPath, file, engine);
418
+ const r = await cssCompiler.compile(
419
+ rawConfig,
420
+ assetsPath,
421
+ file,
422
+ cssCompiler.SASS_ENGINE_NAME,
423
+ );
424
+ console.log(r);
423
425
  } catch (e) {
424
426
  const message = this.parseStencilStylesError(e);
425
- if (!stencilCLISettings.isOldNodeSassForkEnabled()) {
426
- throw new Error(
427
- `${message}\n`.red +
428
- `\n` +
429
- `---------WARNING---------\n`.red +
430
- `We are currently in the process of deprecating node-sass fork https://github.com/bigcommerce-labs/node-sass\n` +
431
- `Your scss files were compiled using latest node-sass version https://github.com/sass/node-sass\n` +
432
- `This error might indicate that your scss file is not compatible with it.\n` +
433
- `There is still an option to compile scss file old fork by using --use-old-node-sass-fork.\n` +
434
- `But note, that this will lead to 500 error in production in near future.\n` +
435
- `---------WARNING---------\n`.red,
436
- );
437
- }
438
427
  throw new Error(
439
428
  `${message} while compiling css files from "${stylesPath}/${file}".`.red,
440
429
  );
package/lib/cliCommon.js CHANGED
@@ -98,7 +98,6 @@ function applyCommonOptions(program) {
98
98
 
99
99
  function setupCLI(options) {
100
100
  stencilCLISettings.setVerbose(options.verbose);
101
- stencilCLISettings.useOldNodeSassFork(options.useOldNodeSassFork);
102
101
  }
103
102
 
104
103
  function prepareCommand(program) {
@@ -4,7 +4,6 @@ const { promisify } = require('util');
4
4
 
5
5
  const cssAssembler = require('../css-assembler');
6
6
 
7
- const FALLBACK_SASS_ENGINE_NAME = 'node-sass-fork';
8
7
  const SASS_ENGINE_NAME = 'node-sass';
9
8
 
10
9
  const compile = async (configuration, themeAssetsPath, fileName, engineName = SASS_ENGINE_NAME) => {
@@ -29,7 +28,7 @@ const compile = async (configuration, themeAssetsPath, fileName, engineName = SA
29
28
  sourceMap: true,
30
29
  autoprefixerOptions: {
31
30
  cascade: configuration.autoprefixer_cascade,
32
- browsers: configuration.autoprefixer_browsers,
31
+ overrideBrowserslist: configuration.autoprefixer_browsers,
33
32
  },
34
33
  };
35
34
  const stencilStyles = new StencilStyles(console);
@@ -41,5 +40,4 @@ const compile = async (configuration, themeAssetsPath, fileName, engineName = SA
41
40
  module.exports = {
42
41
  compile,
43
42
  SASS_ENGINE_NAME,
44
- FALLBACK_SASS_ENGINE_NAME,
45
43
  };
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@bigcommerce/stencil-cli",
3
- "version": "6.0.0",
3
+ "version": "7.0.0-beta",
4
4
  "description": "CLI tool to run BigCommerce Stores locally for theme development.",
5
5
  "main": "index.js",
6
6
  "engines": {
7
- "node": ">=14.0.0 <15.0.0",
8
- "npm": ">=v6.11.3 <9.0.0"
7
+ "node": ">=16.0.0 <19.0.0",
8
+ "npm": ">=8.0.0 <10.0.0"
9
9
  },
10
10
  "scripts": {
11
11
  "lint": "eslint . && prettier --check . --ignore-unknown",
@@ -48,7 +48,7 @@
48
48
  ],
49
49
  "dependencies": {
50
50
  "@bigcommerce/stencil-paper": "4.2.1",
51
- "@bigcommerce/stencil-styles": "4.0.0",
51
+ "@bigcommerce/stencil-styles": "5.1.0",
52
52
  "@hapi/boom": "^10.0.0",
53
53
  "@hapi/glue": "^8.0.0",
54
54
  "@hapi/h2o2": "^9.1.0",