Skip to content

Commit

Permalink
build: drop dist6 related targets
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
biniam committed Feb 2, 2018
1 parent 05de86c commit 6955730
Show file tree
Hide file tree
Showing 35 changed files with 84 additions and 128 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@
"clean": "lerna run clean --loglevel=silent --parallel",
"clean:lerna": "lerna clean --yes --parallel --loglevel=silent",
"build": "lerna run build --parallel --loglevel=silent",
"build:current": "lerna run build:current --parallel --loglevel=silent",
"build:full": "npm run clean:lerna && npm run bootstrap && npm run build && npm run mocha && npm run lint",
"pretest": "npm run clean && npm run build:current",
"pretest": "npm run clean && npm run build",
"test": "node packages/build/bin/run-nyc npm run mocha",
"mocha": "node packages/build/bin/run-mocha \"packages/*/DIST/test/**/*.js\" \"packages/cli/test/*.js\"",
"posttest": "npm run lint"
Expand Down
3 changes: 2 additions & 1 deletion packages/authentication/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

/* eslint-disable no-unused-vars*/
const nodeMajorVersion = +process.versions.node.split('.')[0];
module.exports = nodeMajorVersion >= 7 ? require('./dist') : require('./dist6');
module.exports = require('./dist');
10 changes: 3 additions & 7 deletions packages/authentication/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@
},
"scripts": {
"acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"",
"build": "npm run build:dist && npm run build:dist6",
"build:current": "lb-tsc",
"build:dist": "lb-tsc es2017",
"build:dist6": "lb-tsc es2015",
"build": "lb-tsc es2017",
"build:apidocs": "lb-apidocs",
"clean": "lb-clean loopback-authentication*.tgz dist dist6 package api-docs",
"clean": "lb-clean loopback-authentication*.tgz dist package api-docs",
"integration": "lb-mocha \"DIST/test/integration/**/*.js\"",
"prepublishOnly": "npm run build && npm run build:apidocs",
"pretest": "npm run build:current",
"pretest": "npm run build",
"test": "lb-mocha \"DIST/test/unit/**/*.js\" \"DIST/test/integration/**/*.js\" \"DIST/test/acceptance/**/*.js\"",
"unit": "lb-mocha \"DIST/test/unit/**/*.js\"",
"verify": "npm pack && tar xf loopback-authentication*.tgz && tree package && npm run clean"
Expand Down Expand Up @@ -48,7 +45,6 @@
"index.js",
"index.d.ts",
"dist/src",
"dist6/src",
"api-docs",
"src"
],
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/generators/app/templates/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

/* eslint-disable no-unused-vars*/
const nodeMajorVersion = +process.versions.node.split('.')[0];
const dist = nodeMajorVersion >= 7 ? './dist' : './dist6';
const dist = './dist';

const application = (module.exports = require(dist));

Expand Down
4 changes: 2 additions & 2 deletions packages/cli/generators/extension/templates/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

/* eslint-disable no-unused-vars*/
const nodeMajorVersion = +process.versions.node.split('.')[0];
const dist = nodeMajorVersion >= 7 ? './dist' : './dist6';
module.exports = require(dist);
module.exports = require('./dist');
7 changes: 3 additions & 4 deletions packages/cli/generators/project/templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"node": ">=8"
},
"scripts": {
"build": "lb-tsc",
"build:watch": "lb-tsc --watch",
"build": "lb-tsc es2017",
"build:watch": "lb-tsc es2017 --watch",
"clean": "lb-clean",
<% if (project.prettier && project.tslint) { -%>
"lint": "npm run prettier:check && npm run tslint",
Expand Down Expand Up @@ -54,8 +54,7 @@
"README.md",
"index.js",
"index.d.ts",
"dist",
"dist6"
"dist"
],
"dependencies": {
"@loopback/context": ">=4.0.0-alpha.18",
Expand Down
3 changes: 2 additions & 1 deletion packages/context/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

/* eslint-disable no-unused-vars*/
const nodeMajorVersion = +process.versions.node.split('.')[0];
module.exports = nodeMajorVersion >= 7 ? require('./dist') : require('./dist6');
module.exports = require('./dist');
10 changes: 3 additions & 7 deletions packages/context/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@
},
"scripts": {
"acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"",
"build": "npm run build:dist && npm run build:dist6",
"build:current": "lb-tsc",
"build:dist": "lb-tsc es2017",
"build:dist6": "lb-tsc es2015",
"build": "lb-tsc es2017",
"build:apidocs": "lb-apidocs",
"clean": "lb-clean loopback-context*.tgz dist dist6 package api-docs",
"clean": "lb-clean loopback-context*.tgz dist package api-docs",
"prepublishOnly": "npm run build && npm run build:apidocs",
"pretest": "npm run build:current",
"pretest": "npm run build",
"test": "lb-mocha \"DIST/test/unit/**/*.js\" \"DIST/test/acceptance/**/*.js\"",
"unit": "lb-mocha \"DIST/test/unit/**/*.js\"",
"verify": "npm pack && tar xf loopback-context*.tgz && tree package && npm run clean"
Expand Down Expand Up @@ -47,7 +44,6 @@
"index.js",
"index.d.ts",
"dist/src",
"dist6/src",
"api-docs",
"src"
],
Expand Down
3 changes: 2 additions & 1 deletion packages/core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

/* eslint-disable no-unused-vars*/
const nodeMajorVersion = +process.versions.node.split('.')[0];
module.exports = nodeMajorVersion >= 7 ? require('./dist') : require('./dist6');
module.exports = require('./dist');
13 changes: 6 additions & 7 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@
},
"scripts": {
"acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"",
"build": "npm run build:dist && npm run build:dist6",
"build:current": "lb-tsc",
"build:dist": "lb-tsc es2017",
"build:dist6": "lb-tsc es2015",
"build": "lb-tsc es2017",
"build:apidocs": "lb-apidocs",
"clean": "lb-clean loopback-core*.tgz dist dist6 package api-docs",
"clean": "lb-clean loopback-core*.tgz dist package api-docs",
"prepublishOnly": "npm run build && npm run build:apidocs",
"pretest": "npm run build:current",
"pretest": "npm run build",
"integration": "lb-mocha \"DIST/test/integration/**/*.js\"",
"test": "lb-mocha \"DIST/test/unit/**/*.js\" \"DIST/test/integration/**/*.js\" \"DIST/test/acceptance/**/*.js\"",
"unit": "lb-mocha \"DIST/test/unit/**/*.js\"",
Expand All @@ -36,8 +33,10 @@
"README.md",
"index.js",
"index.d.ts",
"dist/index.js",
"dist/src",
"dist6/src",
"dist/index.d.ts",
"dist/index.js.map",
"api-docs",
"src"
],
Expand Down
4 changes: 2 additions & 2 deletions packages/example-getting-started/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

/* eslint-disable no-unused-vars*/
const nodeMajorVersion = +process.versions.node.split('.')[0];
const dist = nodeMajorVersion >= 7 ? './dist' : './dist6';

const application = (module.exports = require(dist));
const application = (module.exports = require('./dist'));

if (require.main === module) {
// Run the application
Expand Down
9 changes: 3 additions & 6 deletions packages/example-getting-started/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@
},
"scripts": {
"acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"",
"build": "npm run build:dist && npm run build:dist6",
"build:current": "lb-tsc",
"build:dist": "lb-tsc es2017",
"build:dist6": "lb-tsc es2015",
"build": "lb-tsc es2017",
"build:apidocs": "lb-apidocs",
"clean": "lb-clean *example-getting-started*.tgz dist dist6 package api-docs",
"clean": "lb-clean *example-getting-started*.tgz dist package api-docs",
"prepublishOnly": "npm run build && npm run build:apidocs",
"pretest": "npm run build:current",
"pretest": "npm run build",
"test": "lb-mocha \"DIST/test/unit/**/*.js\" \"DIST/test/acceptance/**/*.js\"",
"unit": "lb-mocha \"DIST/test/unit/**/*.js\"",
"verify": "npm pack && tar xf loopback-getting-started*.tgz && tree package && npm run clean",
Expand Down
4 changes: 2 additions & 2 deletions packages/example-hello-world/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

/* eslint-disable no-unused-vars*/
const nodeMajorVersion = +process.versions.node.split('.')[0];
const dist = nodeMajorVersion >= 7 ? './dist' : './dist6';

const application = (module.exports = require(dist));
const application = (module.exports = require('./dist'));

if (require.main === module) {
// Run the application
Expand Down
7 changes: 2 additions & 5 deletions packages/example-hello-world/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@
},
"scripts": {
"acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"",
"build": "npm run build:dist && npm run build:dist6",
"build:current": "lb-tsc",
"build:dist": "lb-tsc es2017",
"build:dist6": "lb-tsc es2015",
"build": "lb-tsc es2017",
"build:apidocs": "lb-apidocs",
"clean": "lb-clean *example-hello-world*.tgz dist dist6 package api-docs",
"clean": "lb-clean *example-hello-world*.tgz dist package api-docs",
"prepublishOnly": "npm run build && npm run build:apidocs",
"verify": "npm pack && tar xf *example-hello-world*.tgz && tree package && npm run clean",
"start": "npm run build && node ."
Expand Down
4 changes: 2 additions & 2 deletions packages/example-log-extension/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

/* eslint-disable no-unused-vars*/
const nodeMajorVersion = +process.versions.node.split('.')[0];
const dist = nodeMajorVersion >= 7 ? './dist' : './dist6';
module.exports = require(dist);
module.exports = require('./dist');
11 changes: 4 additions & 7 deletions packages/example-log-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@
"node": ">=8"
},
"scripts": {
"build": "npm run build:dist && npm run build:dist6",
"build:current": "lb-tsc",
"build:dist": "lb-tsc es2017",
"build:dist6": "lb-tsc es2015",
"build": "lb-tsc es2017",
"build:apidocs": "lb-apidocs",
"build:watch": "lb-tsc --watch",
"clean": "lb-clean *example-log-extension-*.tgz dist dist6 package api-docs",
"build:watch": "lb-tsc es2017 --watch",
"clean": "lb-clean *example-log-extension-*.tgz dist package api-docs",
"lint": "npm run prettier:check && npm run tslint",
"lint:fix": "npm run prettier:fix && npm run tslint",
"prettier:cli": "lb-prettier \"**/*.ts\" \"**/*.js\"",
Expand All @@ -23,7 +20,7 @@
"tslint": "lb-tslint",
"tslint:fix": "npm run tslint -- --fix",
"prepublishOnly": "npm run build",
"pretest": "npm run clean && npm run build:current",
"pretest": "npm run clean && npm run build",
"test": "lb-mocha \"DIST/test/unit/**/*.js\" \"DIST/test/acceptance/**/*.js\"",
"posttest": "npm run lint",
"verify": "npm pack && tar xf *example-log-extension*.tgz && tree package && npm run clean"
Expand Down
4 changes: 2 additions & 2 deletions packages/example-rpc-server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

/* eslint-disable no-unused-vars*/
const nodeMajorVersion = +process.versions.node.split('.')[0];
const dist = nodeMajorVersion >= 7 ? './dist' : './dist6';

const application = (module.exports = require(dist));
const application = (module.exports = require('./dist'));

if (require.main === module) {
// Run the application
Expand Down
12 changes: 4 additions & 8 deletions packages/example-rpc-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@
"node": ">=8"
},
"scripts": {
"build": "npm run build:dist && npm run build:dist6",
"build:current": "lb-tsc",
"build:dist": "lb-tsc es2017",
"build:dist6": "lb-tsc es2015",
"build:watch": "lb-tsc --watch",
"build": "lb-tsc es2017",
"build:watch": "lb-tsc es2017 --watch",
"clean": "lb-clean",
"lint": "npm run prettier:check && npm run tslint",
"lint:fix": "npm run prettier:fix && npm run tslint:fix",
Expand All @@ -24,7 +21,7 @@
"prettier:fix": "npm run prettier:cli -- --write",
"tslint": "lb-tslint",
"tslint:fix": "npm run tslint -- --fix",
"pretest": "npm run clean && npm run build:current",
"pretest": "npm run clean && npm run build",
"test": "lb-dist mocha --opts node_modules/@loopback/build/mocha.opts DIST/test",
"posttest": "npm run lint",
"start": "npm run build && node .",
Expand All @@ -40,8 +37,7 @@
"README.md",
"index.js",
"index.d.ts",
"dist",
"dist6"
"dist"
],
"dependencies": {
"@loopback/context": "^4.0.0-alpha.29",
Expand Down
3 changes: 2 additions & 1 deletion packages/metadata/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

/* eslint-disable no-unused-vars*/
const nodeMajorVersion = +process.versions.node.split('.')[0];
module.exports = nodeMajorVersion >= 7 ? require('./dist') : require('./dist6');
module.exports = require('./dist');
10 changes: 3 additions & 7 deletions packages/metadata/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@
},
"scripts": {
"acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"",
"build": "npm run build:dist && npm run build:dist6",
"build:current": "lb-tsc",
"build:dist": "lb-tsc es2017",
"build:dist6": "lb-tsc es2015",
"build": "lb-tsc es2017",
"build:apidocs": "lb-apidocs",
"clean": "lb-clean loopback-metadata*.tgz dist dist6 package api-docs",
"clean": "lb-clean loopback-metadata*.tgz dist package api-docs",
"prepublishOnly": "npm run build && npm run build:apidocs",
"pretest": "npm run build:current",
"pretest": "npm run build",
"test": "lb-mocha \"DIST/test/unit/**/*.js\" \"DIST/test/acceptance/**/*.js\"",
"unit": "lb-mocha \"DIST/test/unit/**/*.js\"",
"verify": "npm pack && tar xf loopback-metadata*.tgz && tree package && npm run clean"
Expand Down Expand Up @@ -43,7 +40,6 @@
"index.js",
"index.d.ts",
"dist/src",
"dist6/src",
"api-docs",
"src"
],
Expand Down
3 changes: 2 additions & 1 deletion packages/openapi-spec-builder/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

/* eslint-disable no-unused-vars*/
const nodeMajorVersion = +process.versions.node.split('.')[0];
module.exports = nodeMajorVersion >= 7 ? require('./dist') : require('./dist6');
module.exports = require('./dist');
8 changes: 2 additions & 6 deletions packages/openapi-spec-builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@
"node": ">=8"
},
"scripts": {
"build": "npm run build:dist && npm run build:dist6",
"build:current": "lb-tsc",
"build:dist": "lb-tsc es2017",
"build:dist6": "lb-tsc es2015",
"build": "lb-tsc es2017",
"build:apidocs": "lb-apidocs",
"clean": "lb-clean loopback-openapi-spec*.tgz dist dist6 package api-docs",
"clean": "lb-clean loopback-openapi-spec*.tgz dist package api-docs",
"prepublishOnly": "npm run build && npm run build:apidocs",
"verify": "npm pack && tar xf loopback-openapi-spec*.tgz && tree package && npm run clean"
},
Expand All @@ -36,7 +33,6 @@
"index.js",
"index.d.ts",
"dist/src",
"dist6/src",
"api-docs",
"src"
],
Expand Down
3 changes: 2 additions & 1 deletion packages/openapi-spec/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

/* eslint-disable no-unused-vars*/
const nodeMajorVersion = +process.versions.node.split('.')[0];
module.exports = nodeMajorVersion >= 7 ? require('./dist') : require('./dist6');
module.exports = require('./dist');
8 changes: 2 additions & 6 deletions packages/openapi-spec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@
"@loopback/build": "^4.0.0-alpha.12"
},
"scripts": {
"build": "npm run build:dist && npm run build:dist6",
"build:current": "lb-tsc",
"build:dist": "lb-tsc es2017",
"build:dist6": "lb-tsc es2015",
"build": "lb-tsc es2017",
"build:apidocs": "lb-apidocs",
"clean": "lb-clean loopback-openapi-spec*.tgz dist dist6 package api-docs",
"clean": "lb-clean loopback-openapi-spec*.tgz dist package api-docs",
"prepublishOnly": "npm run build && npm run build:apidocs",
"verify": "npm pack && tar xf loopback-openapi-spec*.tgz && tree package && npm run clean"
},
Expand All @@ -32,7 +29,6 @@
"index.js",
"index.d.ts",
"dist/src",
"dist6/src",
"api-docs",
"src"
],
Expand Down
Loading

0 comments on commit 6955730

Please sign in to comment.