Skip to content

Commit 6a8ead9

Browse files
authored
Merge pull request #203 from inversify/dc/dependencies
update dependencies
2 parents 5d9a003 + d6e6b5d commit 6a8ead9

File tree

4 files changed

+74
-62
lines changed

4 files changed

+74
-62
lines changed

Diff for: .travis.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
language: node_js
22
node_js:
33
- stable
4-
- 8.8.1
4+
- 8
5+
- 9
6+
- 10
7+
- 11
8+
- 12
59
before_install:
610
- npm install -g codeclimate-test-reporter
711
after_success:

Diff for: gulpfile.js

+51-45
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ var gulp = require("gulp"),
1313
//******************************************************************************
1414
//* LINT
1515
//******************************************************************************
16-
gulp.task("lint", function() {
16+
gulp.task("lint", function () {
1717

1818
var config = {
1919
fornatter: "verbose",
2020
emitError: (process.env.CI) ? true : false
2121
};
2222

2323
return gulp.src([
24-
"src/**/**.ts",
25-
"test/**/**.test.ts"
26-
])
24+
"src/**/**.ts",
25+
"test/**/**.test.ts"
26+
])
2727
.pipe(tslint(config))
2828
.pipe(tslint.report());
2929
});
@@ -35,12 +35,12 @@ var tsLibProject = tsc.createProject("tsconfig.json", {
3535
module: "commonjs"
3636
});
3737

38-
gulp.task("build-lib", function() {
38+
gulp.task("build-lib", function () {
3939
return gulp.src([
40-
"src/**/*.ts"
41-
])
40+
"src/**/*.ts"
41+
])
4242
.pipe(tsLibProject())
43-
.on("error", function(err) {
43+
.on("error", function (err) {
4444
process.exit(1);
4545
})
4646
.js.pipe(gulp.dest("lib/"));
@@ -50,12 +50,12 @@ var tsEsProject = tsc.createProject("tsconfig.json", {
5050
module: "es2015"
5151
});
5252

53-
gulp.task("build-es", function() {
53+
gulp.task("build-es", function () {
5454
return gulp.src([
55-
"src/**/*.ts"
56-
])
55+
"src/**/*.ts"
56+
])
5757
.pipe(tsEsProject())
58-
.on("error", function(err) {
58+
.on("error", function (err) {
5959
process.exit(1);
6060
})
6161
.js.pipe(gulp.dest("es/"));
@@ -66,12 +66,12 @@ var tsDtsProject = tsc.createProject("tsconfig.json", {
6666
noResolve: false
6767
});
6868

69-
gulp.task("build-dts", function() {
69+
gulp.task("build-dts", function () {
7070
return gulp.src([
71-
"src/**/*.ts"
72-
])
71+
"src/**/*.ts"
72+
])
7373
.pipe(tsDtsProject())
74-
.on("error", function(err) {
74+
.on("error", function (err) {
7575
process.exit(1);
7676
})
7777
.dts.pipe(gulp.dest("dts"));
@@ -83,35 +83,35 @@ gulp.task("build-dts", function() {
8383
//******************************************************************************
8484
var tstProject = tsc.createProject("tsconfig.json");
8585

86-
gulp.task("build-src", function() {
86+
gulp.task("build-src", function () {
8787
return gulp.src([
88-
"src/**/*.ts"
89-
])
88+
"src/**/*.ts"
89+
])
9090
.pipe(tstProject())
91-
.on("error", function(err) {
91+
.on("error", function (err) {
9292
process.exit(1);
9393
})
9494
.js.pipe(gulp.dest("src/"));
9595
});
9696

9797
var tsTestProject = tsc.createProject("tsconfig.json", { rootDir: "./" });
9898

99-
gulp.task("build-test", function() {
99+
gulp.task("build-test", function () {
100100
return gulp.src([
101-
"test/**/*.ts"
102-
])
101+
"test/**/*.ts"
102+
])
103103
.pipe(tsTestProject())
104-
.on("error", function(err) {
104+
.on("error", function (err) {
105105
process.exit(1);
106106
})
107107
.js.pipe(gulp.dest("./test/"));
108108
});
109109

110-
gulp.task("mocha", function() {
110+
gulp.task("mocha", function () {
111111
return gulp.src([
112-
"node_modules/reflect-metadata/Reflect.js",
113-
"test/**/*.test.js"
114-
])
112+
"node_modules/reflect-metadata/Reflect.js",
113+
"test/**/*.test.js"
114+
])
115115
.pipe(mocha({
116116
ui: "bdd"
117117
}))
@@ -123,31 +123,37 @@ gulp.task("mocha", function() {
123123
));
124124
});
125125

126-
gulp.task("istanbul:hook", function() {
126+
gulp.task("istanbul:hook", function () {
127127
return gulp.src(["src/**/*.js"])
128128
// Covering files
129129
.pipe(istanbul())
130130
// Force `require` to return covered files
131131
.pipe(istanbul.hookRequire());
132132
});
133133

134-
gulp.task("test", function(cb) {
135-
runSequence("istanbul:hook", "mocha", cb);
136-
});
137-
138-
gulp.task("build", function(cb) {
139-
runSequence(
140-
"lint", ["build-src", "build-es", "build-lib", "build-dts"], // tests + build es and lib
141-
"build-test",
142-
cb);
143-
});
134+
gulp.task("test", gulp.series(
135+
"istanbul:hook",
136+
"mocha",
137+
));
138+
139+
gulp.task("build",
140+
gulp.series(
141+
"lint",
142+
gulp.parallel(
143+
"build-src"
144+
, "build-test"
145+
, "build-es"
146+
, "build-lib"
147+
, "build-dts"
148+
),
149+
150+
)
151+
);
144152

145153
//******************************************************************************
146154
//* DEFAULT
147155
//******************************************************************************
148-
gulp.task("default", function(cb) {
149-
runSequence(
150-
"build",
151-
"test",
152-
cb);
153-
});
156+
gulp.task("default", gulp.series(
157+
"build",
158+
"test",
159+
));

Diff for: package.json

+16-14
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
"scripts": {
88
"test": "gulp",
99
"prepublish": "publish-please guard",
10-
"publish-please": "publish-please"
10+
"publish-please": "publish-please",
11+
"update": "updates --update --minor && npm install",
12+
"postupdate": "git diff-files --quiet package-lock.json || npm test"
1113
},
1214
"repository": {
1315
"type": "git",
@@ -32,24 +34,24 @@
3234
"chalk": "2.4.2"
3335
},
3436
"devDependencies": {
35-
"@types/chai": "4.1.4",
37+
"@types/chai": "4.2.0",
3638
"@types/chalk": "2.2.0",
37-
"@types/mocha": "5.2.6",
38-
"@types/sinon": "7.0.5",
39-
"chai": "4.1.2",
40-
"gulp": "3.9.1",
39+
"@types/mocha": "5.2.7",
40+
"@types/sinon": "7.0.13",
41+
"chai": "4.2.0",
42+
"gulp": "4.0.2",
4143
"gulp-istanbul": "1.1.3",
42-
"gulp-mocha": "6.0.0",
43-
"gulp-tslint": "8.1.3",
44+
"gulp-mocha": "7.0.1",
45+
"gulp-tslint": "8.1.4",
4446
"gulp-typescript": "5.0.1",
4547
"harmonize": "2.0.0",
4648
"inversify": "5.0.1",
47-
"mocha": "5.2.0",
48-
"publish-please": "5.4.3",
49+
"mocha": "6.2.0",
50+
"publish-please": "5.5.1",
4951
"reflect-metadata": "0.1.13",
5052
"run-sequence": "2.2.1",
51-
"sinon": "7.2.3",
52-
"tslint": "5.9.1",
53-
"typescript": "2.9.1"
53+
"sinon": "7.4.1",
54+
"tslint": "5.19.0",
55+
"typescript": "3.5.3"
5456
}
55-
}
57+
}

Diff for: src/utils/utils.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
let _global = this;
1+
let _global: any = this;
22

33
function getTimeFactory(_window: any, _process: any, _date: any) {
44
return () => {
@@ -23,7 +23,7 @@ function getTimeFactory(_window: any, _process: any, _date: any) {
2323
};
2424
}
2525

26-
let getTime = getTimeFactory(_global.window, _global.process, Date);
26+
let getTime = getTimeFactory(_global.window, _global.process , Date);
2727

2828
function guid() {
2929
function s4() {

0 commit comments

Comments
 (0)