q-koa 13.8.26 → 13.8.27

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.
Files changed (2) hide show
  1. package/index.js +9 -0
  2. package/package.json +4 -1
package/index.js CHANGED
@@ -1 +1,10 @@
1
+ var MIN_NODE_MAJOR = 14;
2
+ var major = parseInt(process.versions.node.split('.')[0], 10);
3
+ if (major < MIN_NODE_MAJOR) {
4
+ throw new Error(
5
+ 'q-koa requires Node.js v' + MIN_NODE_MAJOR + '+ (current: ' + process.versions.node + '). ' +
6
+ '代码使用了空值合并运算符(??)等 ES2020 语法,低版本 Node 会在加载阶段抛出 SyntaxError。'
7
+ );
8
+ }
9
+
1
10
  module.exports = require('./core/app');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q-koa",
3
- "version": "13.8.26",
3
+ "version": "13.8.27",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -15,6 +15,9 @@
15
15
  "keywords": [],
16
16
  "author": "",
17
17
  "license": "ISC",
18
+ "engines": {
19
+ "node": ">=14.0.0"
20
+ },
18
21
  "dependencies": {
19
22
  "alipay-sdk": "^3.2.0",
20
23
  "@alicloud/pop-core": "^1.7.9",