Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for Node.js 6 #948

Merged
merged 4 commits into from
Feb 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .nycrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"packages/example-codehub/src/**",
"packages/*/dist*/*"
],
"exclude": [
"packages/core/*/promisify.*"
],
"extension": [
".js",
".ts"
Expand Down
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
sudo: false
language: node_js
node_js:
- "6"
- "8"

os:
Expand Down
1 change: 0 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
environment:
matrix:
- nodejs_version: "6"
- nodejs_version: "8"

install:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"version": "4.0.0-alpha.1",
"engines": {
"node": ">=6"
"node": ">=8"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

},
"license": "MIT",
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/authentication/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "4.0.0-alpha.30",
"description": "A LoopBack component for authentication support.",
"engines": {
"node": ">=6"
"node": ">=8"
},
"scripts": {
"acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"",
Expand Down
2 changes: 1 addition & 1 deletion packages/build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"version": "4.0.0-alpha.12",
"engines": {
"node": ">=6"
"node": ">=8"
},
"main": "index.js",
"copyright.owner": "IBM Corp.",
Expand Down
1 change: 0 additions & 1 deletion packages/cli/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"lib/base-generator.js",
"lib/debug.js",
"lib/project-generator.js",
"lib/promisify.js",
"lib/utils.js"
],
"codeSectionDepth": 4
Expand Down
2 changes: 0 additions & 2 deletions packages/cli/generators/example/clone-example.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

'use strict';

const promisify = require('../../lib/utils').promisify;

const gunzip = require('gunzip-maybe');
const path = require('path');
const request = require('request');
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const util = require('util');
const regenerate = require('regenerate');
const _ = require('lodash');
const pascalCase = require('change-case').pascalCase;
const promisify = util.promisify || require('util.promisify/implementation');
const promisify = require('util').promisify;
const camelCase = require('change-case').camelCase;
const validate = require('validate-npm-package-name');
const Conflicter = require('yeoman-generator/lib/util/conflicter');
Expand Down
3 changes: 1 addition & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"name": "IBM"
},
"engines": {
"node": ">=6"
"node": ">=8"
},
"files": [
"bin",
Expand Down Expand Up @@ -49,7 +49,6 @@
"request": "^2.83.0",
"tar-fs": "^1.16.0",
"unicode-10.0.0": "^0.7.4",
"util.promisify": "^1.0.0",
"validate-npm-package-name": "^3.0.0",
"yeoman-generator": "^2.0.1"
},
Expand Down
4 changes: 1 addition & 3 deletions packages/cli/test/clone-example.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@

('use strict');

const promisify = require('../lib/utils').promisify;
const promisify = require('util').promisify;

const cloneExampleFromGitHub = require('../generators/example/clone-example');
const expect = require('@loopback/testlab').expect;
const TestSandbox = require('@loopback/testlab').TestSandbox;
const fs = require('fs');
const glob = promisify(require('glob'));
const path = require('path');
const rimraf = promisify(require('rimraf'));

const VALID_EXAMPLE = 'getting-started';
const SANDBOX_PATH = path.resolve(__dirname, 'sandbox');
Expand Down
2 changes: 1 addition & 1 deletion packages/context/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "4.0.0-alpha.29",
"description": "LoopBack's container for Inversion of Control",
"engines": {
"node": ">=6"
"node": ">=8"
},
"scripts": {
"acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"",
Expand Down
1 change: 0 additions & 1 deletion packages/core/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"src/component.ts",
"src/index.ts",
"src/keys.ts",
"src/promisify.ts",
"src/server.ts"
],
"codeSectionDepth": 4
Expand Down
5 changes: 2 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "4.0.0-alpha.31",
"description": "",
"engines": {
"node": ">=6"
"node": ">=8"
},
"scripts": {
"acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"",
Expand All @@ -26,8 +26,7 @@
"dependencies": {
"@loopback/context": "^4.0.0-alpha.29",
"lodash": "^4.17.4",
"topo": "^3.0.0",
"util.promisify": "^1.0.0"
"topo": "^3.0.0"
},
"devDependencies": {
"@loopback/build": "^4.0.0-alpha.12",
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ export {Component, ProviderMap} from './component';
export {inject, Context} from '@loopback/context';
export {Server} from './server';
export * from './application';
export * from './promisify';
export * from './component';
export * from './keys';
40 changes: 0 additions & 40 deletions packages/core/src/promisify.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/example-hello-world/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"private": true,
"main": "index.js",
"engines": {
"node": ">=6"
"node": ">=8"
},
"scripts": {
"acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"",
Expand Down
2 changes: 1 addition & 1 deletion packages/example-log-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"private": true,
"main": "index.js",
"engines": {
"node": ">=6"
"node": ">=8"
},
"scripts": {
"build": "npm run build:dist && npm run build:dist6",
Expand Down
2 changes: 1 addition & 1 deletion packages/example-rpc-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"loopback"
],
"engines": {
"node": ">=6"
"node": ">=8"
},
"scripts": {
"build": "npm run build:dist && npm run build:dist6",
Expand Down
2 changes: 1 addition & 1 deletion packages/metadata/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "4.0.0-alpha.8",
"description": "LoopBack's metadata utilities for reflection and decoration",
"engines": {
"node": ">=6"
"node": ">=8"
},
"scripts": {
"acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"",
Expand Down
2 changes: 1 addition & 1 deletion packages/openapi-spec-builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "4.0.0-alpha.20",
"description": "Make it easy to create OpenAPI (Swagger) specification documents in your tests using the builder pattern.",
"engines": {
"node": ">=6"
"node": ">=8"
},
"scripts": {
"build": "npm run build:dist && npm run build:dist6",
Expand Down
2 changes: 1 addition & 1 deletion packages/openapi-spec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "4.0.0-alpha.23",
"description": "TypeScript type definitions for OpenAPI Spec/Swagger documents.",
"engines": {
"node": ">=6"
"node": ">=8"
},
"devDependencies": {
"@loopback/build": "^4.0.0-alpha.12"
Expand Down
2 changes: 1 addition & 1 deletion packages/repository-json-schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "4.0.0-alpha.5",
"description": "Converts TS classes into JSON Schemas using TypeScript's reflection API",
"engines": {
"node": ">=6"
"node": ">=8"
},
"scripts": {
"build": "npm run build:dist && npm run build:dist6",
Expand Down
2 changes: 1 addition & 1 deletion packages/repository/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "4.0.0-alpha.27",
"description": "Repository based persistence for LoopBack 4",
"engines": {
"node": ">=6"
"node": ">=8"
},
"main": "index",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "4.0.0-alpha.23",
"description": "",
"engines": {
"node": ">=6"
"node": ">=8"
},
"scripts": {
"acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"",
Expand Down
13 changes: 3 additions & 10 deletions packages/rest/src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import {ServerRequest} from 'http';
import * as HttpErrors from 'http-errors';
import {OperationObject, ParameterObject} from '@loopback/openapi-spec';
import {promisify} from '@loopback/core';
import {promisify} from 'util';
import {
OperationArgs,
ParsedRequest,
Expand All @@ -15,18 +15,11 @@ import {
import {ResolvedRoute} from './router/routing-table';
type HttpError = HttpErrors.HttpError;

type jsonBodyFn = (
req: ServerRequest,
cb: (err?: Error, body?: {}) => void,
) => void;
const jsonBody: jsonBodyFn = require('body/json');

// tslint:disable:no-any
// tslint:disable-next-line:no-any
type MaybeBody = any | undefined;
// tslint:enable:no-any

const parseJsonBody: (req: ServerRequest) => Promise<MaybeBody> = promisify(
jsonBody,
require('body/json'),
);

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/testlab/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "4.0.0-alpha.22",
"description": "A collection of test utilities we use to write LoopBack tests.",
"engines": {
"node": ">=6"
"node": ">=8"
},
"scripts": {
"build": "npm run build:dist && npm run build:dist6",
Expand Down