Skip to content

Commit

Permalink
Merge pull request #203 from inversify/dc/dependencies
Browse files Browse the repository at this point in the history
update dependencies
  • Loading branch information
dcavanagh authored Aug 24, 2019
2 parents 5d9a003 + d6e6b5d commit 6a8ead9
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 62 deletions.
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
language: node_js
node_js:
- stable
- 8.8.1
- 8
- 9
- 10
- 11
- 12
before_install:
- npm install -g codeclimate-test-reporter
after_success:
Expand Down
96 changes: 51 additions & 45 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ var gulp = require("gulp"),
//******************************************************************************
//* LINT
//******************************************************************************
gulp.task("lint", function() {
gulp.task("lint", function () {

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

return gulp.src([
"src/**/**.ts",
"test/**/**.test.ts"
])
"src/**/**.ts",
"test/**/**.test.ts"
])
.pipe(tslint(config))
.pipe(tslint.report());
});
Expand All @@ -35,12 +35,12 @@ var tsLibProject = tsc.createProject("tsconfig.json", {
module: "commonjs"
});

gulp.task("build-lib", function() {
gulp.task("build-lib", function () {
return gulp.src([
"src/**/*.ts"
])
"src/**/*.ts"
])
.pipe(tsLibProject())
.on("error", function(err) {
.on("error", function (err) {
process.exit(1);
})
.js.pipe(gulp.dest("lib/"));
Expand All @@ -50,12 +50,12 @@ var tsEsProject = tsc.createProject("tsconfig.json", {
module: "es2015"
});

gulp.task("build-es", function() {
gulp.task("build-es", function () {
return gulp.src([
"src/**/*.ts"
])
"src/**/*.ts"
])
.pipe(tsEsProject())
.on("error", function(err) {
.on("error", function (err) {
process.exit(1);
})
.js.pipe(gulp.dest("es/"));
Expand All @@ -66,12 +66,12 @@ var tsDtsProject = tsc.createProject("tsconfig.json", {
noResolve: false
});

gulp.task("build-dts", function() {
gulp.task("build-dts", function () {
return gulp.src([
"src/**/*.ts"
])
"src/**/*.ts"
])
.pipe(tsDtsProject())
.on("error", function(err) {
.on("error", function (err) {
process.exit(1);
})
.dts.pipe(gulp.dest("dts"));
Expand All @@ -83,35 +83,35 @@ gulp.task("build-dts", function() {
//******************************************************************************
var tstProject = tsc.createProject("tsconfig.json");

gulp.task("build-src", function() {
gulp.task("build-src", function () {
return gulp.src([
"src/**/*.ts"
])
"src/**/*.ts"
])
.pipe(tstProject())
.on("error", function(err) {
.on("error", function (err) {
process.exit(1);
})
.js.pipe(gulp.dest("src/"));
});

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

gulp.task("build-test", function() {
gulp.task("build-test", function () {
return gulp.src([
"test/**/*.ts"
])
"test/**/*.ts"
])
.pipe(tsTestProject())
.on("error", function(err) {
.on("error", function (err) {
process.exit(1);
})
.js.pipe(gulp.dest("./test/"));
});

gulp.task("mocha", function() {
gulp.task("mocha", function () {
return gulp.src([
"node_modules/reflect-metadata/Reflect.js",
"test/**/*.test.js"
])
"node_modules/reflect-metadata/Reflect.js",
"test/**/*.test.js"
])
.pipe(mocha({
ui: "bdd"
}))
Expand All @@ -123,31 +123,37 @@ gulp.task("mocha", function() {
));
});

gulp.task("istanbul:hook", function() {
gulp.task("istanbul:hook", function () {
return gulp.src(["src/**/*.js"])
// Covering files
.pipe(istanbul())
// Force `require` to return covered files
.pipe(istanbul.hookRequire());
});

gulp.task("test", function(cb) {
runSequence("istanbul:hook", "mocha", cb);
});

gulp.task("build", function(cb) {
runSequence(
"lint", ["build-src", "build-es", "build-lib", "build-dts"], // tests + build es and lib
"build-test",
cb);
});
gulp.task("test", gulp.series(
"istanbul:hook",
"mocha",
));

gulp.task("build",
gulp.series(
"lint",
gulp.parallel(
"build-src"
, "build-test"
, "build-es"
, "build-lib"
, "build-dts"
),

)
);

//******************************************************************************
//* DEFAULT
//******************************************************************************
gulp.task("default", function(cb) {
runSequence(
"build",
"test",
cb);
});
gulp.task("default", gulp.series(
"build",
"test",
));
30 changes: 16 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"scripts": {
"test": "gulp",
"prepublish": "publish-please guard",
"publish-please": "publish-please"
"publish-please": "publish-please",
"update": "updates --update --minor && npm install",
"postupdate": "git diff-files --quiet package-lock.json || npm test"
},
"repository": {
"type": "git",
Expand All @@ -32,24 +34,24 @@
"chalk": "2.4.2"
},
"devDependencies": {
"@types/chai": "4.1.4",
"@types/chai": "4.2.0",
"@types/chalk": "2.2.0",
"@types/mocha": "5.2.6",
"@types/sinon": "7.0.5",
"chai": "4.1.2",
"gulp": "3.9.1",
"@types/mocha": "5.2.7",
"@types/sinon": "7.0.13",
"chai": "4.2.0",
"gulp": "4.0.2",
"gulp-istanbul": "1.1.3",
"gulp-mocha": "6.0.0",
"gulp-tslint": "8.1.3",
"gulp-mocha": "7.0.1",
"gulp-tslint": "8.1.4",
"gulp-typescript": "5.0.1",
"harmonize": "2.0.0",
"inversify": "5.0.1",
"mocha": "5.2.0",
"publish-please": "5.4.3",
"mocha": "6.2.0",
"publish-please": "5.5.1",
"reflect-metadata": "0.1.13",
"run-sequence": "2.2.1",
"sinon": "7.2.3",
"tslint": "5.9.1",
"typescript": "2.9.1"
"sinon": "7.4.1",
"tslint": "5.19.0",
"typescript": "3.5.3"
}
}
}
4 changes: 2 additions & 2 deletions src/utils/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
let _global = this;
let _global: any = this;

function getTimeFactory(_window: any, _process: any, _date: any) {
return () => {
Expand All @@ -23,7 +23,7 @@ function getTimeFactory(_window: any, _process: any, _date: any) {
};
}

let getTime = getTimeFactory(_global.window, _global.process, Date);
let getTime = getTimeFactory(_global.window, _global.process , Date);

function guid() {
function s4() {
Expand Down

0 comments on commit 6a8ead9

Please sign in to comment.