Skip to content

Commit a2368ce

Browse files
b-admikevirkt25
andauthored
build: drop dist6 related targets (#945)
BREAKING CHANGE: Support for Node.js version lower than 8.0 has been dropped. Please upgrade to the latest Node.js 8.x LTS version. Co-Authored-by: Taranveer Virk <taranveer@virk.cc>
1 parent de969e4 commit a2368ce

File tree

35 files changed

+67
-150
lines changed

35 files changed

+67
-150
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@
3535
"clean": "lerna run clean --loglevel=silent --parallel",
3636
"clean:lerna": "lerna clean --yes --parallel --loglevel=silent",
3737
"build": "lerna run build --parallel --loglevel=silent",
38-
"build:current": "lerna run build:current --parallel --loglevel=silent",
3938
"build:full": "npm run clean:lerna && npm run bootstrap && npm run build && npm run mocha && npm run lint",
40-
"pretest": "npm run clean && npm run build:current",
39+
"pretest": "npm run clean && npm run build",
4140
"test": "node packages/build/bin/run-nyc npm run mocha",
4241
"mocha": "node packages/build/bin/run-mocha \"packages/*/DIST/test/**/*.js\" \"packages/cli/test/*.js\"",
4342
"posttest": "npm run lint"

packages/authentication/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@
33
// This file is licensed under the MIT License.
44
// License text available at https://opensource.org/licenses/MIT
55

6-
const nodeMajorVersion = +process.versions.node.split('.')[0];
7-
module.exports = nodeMajorVersion >= 7 ? require('./dist') : require('./dist6');
6+
module.exports = require('./dist');

packages/authentication/package.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,12 @@
77
},
88
"scripts": {
99
"acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"",
10-
"build": "npm run build:dist && npm run build:dist6",
11-
"build:current": "lb-tsc",
12-
"build:dist": "lb-tsc es2017",
13-
"build:dist6": "lb-tsc es2015",
10+
"build": "lb-tsc es2017",
1411
"build:apidocs": "lb-apidocs",
15-
"clean": "lb-clean loopback-authentication*.tgz dist dist6 package api-docs",
12+
"clean": "lb-clean loopback-authentication*.tgz dist package api-docs",
1613
"integration": "lb-mocha \"DIST/test/integration/**/*.js\"",
1714
"prepublishOnly": "npm run build && npm run build:apidocs",
18-
"pretest": "npm run build:current",
15+
"pretest": "npm run build",
1916
"test": "lb-mocha \"DIST/test/unit/**/*.js\" \"DIST/test/integration/**/*.js\" \"DIST/test/acceptance/**/*.js\"",
2017
"unit": "lb-mocha \"DIST/test/unit/**/*.js\"",
2118
"verify": "npm pack && tar xf loopback-authentication*.tgz && tree package && npm run clean"
@@ -48,7 +45,6 @@
4845
"index.js",
4946
"index.d.ts",
5047
"dist/src",
51-
"dist6/src",
5248
"api-docs",
5349
"src"
5450
],

packages/cli/generators/app/templates/index.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
// This file is licensed under the MIT License.
44
// License text available at https://opensource.org/licenses/MIT
55

6-
const nodeMajorVersion = +process.versions.node.split('.')[0];
7-
const dist = nodeMajorVersion >= 7 ? './dist' : './dist6';
8-
9-
const application = (module.exports = require(dist));
6+
const application = (module.exports = require('./dist'));
107

118
if (require.main === module) {
129
// Run the application

packages/cli/generators/extension/templates/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,4 @@
33
// This file is licensed under the MIT License.
44
// License text available at https://opensource.org/licenses/MIT
55

6-
const nodeMajorVersion = +process.versions.node.split('.')[0];
7-
const dist = nodeMajorVersion >= 7 ? './dist' : './dist6';
8-
module.exports = require(dist);
6+
module.exports = require('./dist');

packages/cli/generators/project/templates/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"node": ">=8"
1212
},
1313
"scripts": {
14-
"build": "lb-tsc",
15-
"build:watch": "lb-tsc --watch",
14+
"build": "lb-tsc es2017",
15+
"build:watch": "lb-tsc es2017 --watch",
1616
"clean": "lb-clean",
1717
<% if (project.prettier && project.tslint) { -%>
1818
"lint": "npm run prettier:check && npm run tslint",
@@ -54,8 +54,7 @@
5454
"README.md",
5555
"index.js",
5656
"index.d.ts",
57-
"dist",
58-
"dist6"
57+
"dist"
5958
],
6059
"dependencies": {
6160
"@loopback/context": ">=4.0.0-alpha.18",

packages/context/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@
33
// This file is licensed under the MIT License.
44
// License text available at https://opensource.org/licenses/MIT
55

6-
const nodeMajorVersion = +process.versions.node.split('.')[0];
7-
module.exports = nodeMajorVersion >= 7 ? require('./dist') : require('./dist6');
6+
module.exports = require('./dist');

packages/context/package.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,11 @@
77
},
88
"scripts": {
99
"acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"",
10-
"build": "npm run build:dist && npm run build:dist6",
11-
"build:current": "lb-tsc",
12-
"build:dist": "lb-tsc es2017",
13-
"build:dist6": "lb-tsc es2015",
10+
"build": "lb-tsc es2017",
1411
"build:apidocs": "lb-apidocs",
15-
"clean": "lb-clean loopback-context*.tgz dist dist6 package api-docs",
12+
"clean": "lb-clean loopback-context*.tgz dist package api-docs",
1613
"prepublishOnly": "npm run build && npm run build:apidocs",
17-
"pretest": "npm run build:current",
14+
"pretest": "npm run build",
1815
"test": "lb-mocha \"DIST/test/unit/**/*.js\" \"DIST/test/acceptance/**/*.js\"",
1916
"unit": "lb-mocha \"DIST/test/unit/**/*.js\"",
2017
"verify": "npm pack && tar xf loopback-context*.tgz && tree package && npm run clean"
@@ -47,7 +44,6 @@
4744
"index.js",
4845
"index.d.ts",
4946
"dist/src",
50-
"dist6/src",
5147
"api-docs",
5248
"src"
5349
],

packages/core/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@
33
// This file is licensed under the MIT License.
44
// License text available at https://opensource.org/licenses/MIT
55

6-
const nodeMajorVersion = +process.versions.node.split('.')[0];
7-
module.exports = nodeMajorVersion >= 7 ? require('./dist') : require('./dist6');
6+
module.exports = require('./dist');

0 commit comments

Comments
 (0)