Skip to content

Commit 5788fcc

Browse files
committed
feat: Manually throw error for Node 6 in Analyzer.
1 parent 7079a53 commit 5788fcc

File tree

10 files changed

+15
-9
lines changed

10 files changed

+15
-9
lines changed

packages/@css-blocks/code-style/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"@opticss/code-style": "^0.3.0"
3535
},
3636
"engines": {
37-
"node": ">=8"
37+
"node": "6.* || 8.* || >= 10.*"
3838
},
3939
"files": [
4040
"configs",

packages/@css-blocks/core/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"watch": "^1.0.2"
6161
},
6262
"engines": {
63-
"node": ">=8"
63+
"node": "6.* || 8.* || >= 10.*"
6464
},
6565
"engineStrict": true
6666
}

packages/@css-blocks/core/src/Analyzer/Analyzer.ts

+6
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ export abstract class Analyzer<K extends keyof TemplateTypes> {
4242
options?: Options,
4343
analysisOpts?: AnalysisOptions,
4444
) {
45+
46+
// TODO: Remove April 2019 when Node.js 6 is EOL'd
47+
if (parseInt(process.versions.node) <= 6) {
48+
throw new Error("CSS Blocks does not support Node.js <= 6");
49+
}
50+
4551
this.cssBlocksOptions = resolveConfiguration(options);
4652
this.validatorOptions = analysisOpts && analysisOpts.validations || {};
4753
this.blockFactory = new BlockFactory(this.cssBlocksOptions);

packages/@css-blocks/core/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @module @css-blocks/core
33
*
4-
* This comment will be used to document the "thing2" module.
4+
* Core data models for CSS Blocks.
55
*/
66
export * from "./BlockTree";
77
export * from "./errors";

packages/@css-blocks/ember-cli/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"loader.js": "^4.7.0"
5858
},
5959
"engines": {
60-
"node": "6.* || >= 8.*"
60+
"node": "6.* || 8.* || >= 10.*"
6161
},
6262
"ember-addon": {
6363
"configPath": "tests/dummy/config",

packages/@css-blocks/glimmer/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"url": "https://github.com/linkedin/css-blocks/issues"
4545
},
4646
"engines": {
47-
"node": "6.* || >= 8.*"
47+
"node": "6.* || 8.* || >= 10.*"
4848
},
4949
"homepage": "https://github.com/linkedin/css-blocks/tree/master/packages/@css-blocks/glimmer#readme",
5050
"publishConfig": {

packages/@css-blocks/jsx/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"url": "https://github.com/linkedin/css-blocks/issues"
3737
},
3838
"engines": {
39-
"node": ">=8"
39+
"node": "6.* || 8.* || >= 10.*"
4040
},
4141
"homepage": "https://github.com/linkedin/css-blocks/tree/master/packages/jsx#readme",
4242
"publishConfig": {

packages/@css-blocks/playground/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"typescript": "~2.8.0"
3232
},
3333
"engines": {
34-
"node": ">= 4.0"
34+
"node": "6.* || 8.* || >= 10.*"
3535
},
3636
"private": true
3737
}

packages/@css-blocks/runtime/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"@css-blocks/core"
2626
],
2727
"engines": {
28-
"node": ">=8"
28+
"node": "6.* || 8.* || >= 10.*"
2929
},
3030
"author": "Chris Eppstein <[email protected]>",
3131
"license": "BSD-2-Clause",

packages/@css-blocks/webpack/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"test/mocha.opts"
3636
],
3737
"engines": {
38-
"node": ">=8"
38+
"node": "6.* || 8.* || >= 10.*"
3939
},
4040
"homepage": "https://github.com/linkedin/css-blocks/tree/master/packages/@css-blocks/webpack#readme",
4141
"publishConfig": {

0 commit comments

Comments
 (0)