Skip to content

Commit

Permalink
feat(node version): drop node 4 support (#724)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Node 4 is no longer supported.
  • Loading branch information
nicojs authored and simondel committed Apr 30, 2018
1 parent 01be41e commit a038931
Show file tree
Hide file tree
Showing 20 changed files with 41 additions and 47 deletions.
8 changes: 1 addition & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,10 @@ language: node_js
node_js:
- node
- '6'
- '4'
install: npm install
before_install:
- if [[ `npm -v` = 2* ]]; then npm i -g npm@3; fi
sudo: required
addons:
chrome: stable
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- npm ls
after_success: ".travis/ci-release.jsh"
env:
global:
Expand Down
4 changes: 2 additions & 2 deletions .travis/ci-release.jsh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const exec = (command) => execSync(command, { stdio: [0, 1, 2] });
const releaseRequirements = {
pullRequest: 'false',
branch: 'release',
nodeVersion: '6'
nodeVersion: '10'
};

console.log(`Running on branch ${process.env.TRAVIS_BRANCH}, version ${process.env.TRAVIS_NODE_VERSION}, pull request: ${process.env.TRAVIS_PULL_REQUEST}`);
Expand All @@ -25,4 +25,4 @@ if (process.env.TRAVIS_PULL_REQUEST === releaseRequirements.pullRequest
exec('npm run lerna-publish');
} else {
console.log('That means no release for you buddy');
}
}
1 change: 0 additions & 1 deletion integrationTest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"grunt": "^1.0.1",
"grunt-contrib-clean": "^1.0.0",
"grunt-contrib-jshint": "^1.0.0",
"if-node-version": "^1.1.1",
"install-local": "^0.5.0",
"jasmine-core": "^2.4.1",
"karma": "^2.0.0",
Expand Down
4 changes: 2 additions & 2 deletions integrationTest/test/angular-project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"ng": "ng",
"start": "ng serve",
"build": "ng build --prod",
"test": "if-node-version \">=6\" stryker run",
"posttest": "if-node-version \">=6\" mocha --require ts-node/register verify/*.ts",
"test": "stryker run",
"posttest": "mocha --require ts-node/register verify/*.ts",
"lint": "ng lint",
"e2e": "ng e2e",
"postinstall": "install-local"
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,31 @@
"@types/glob": "^5.0.29",
"@types/istanbul": "^0.4.29",
"@types/karma": "^1.7.2",
"@types/lodash": "^4.14.34",
"@types/lodash": "^4.14.108",
"@types/log4js": "0.0.32",
"@types/mkdirp": "^0.5.2",
"@types/mocha": "^2.2.44",
"@types/mz": "0.0.32",
"@types/node": "^8.10.10",
"@types/rimraf": "2.0.2",
"@types/sinon": "^4.0.0",
"@types/sinon-chai": "^2.7.29",
"browserify": "^16.1.0",
"browserify": "^16.2.0",
"chai": "^4.1.1",
"chai-as-promised": "^7.1.1",
"concurrently": "^3.4.0",
"execa": "^0.10.0",
"glob": "^7.1.1",
"if-node-version": "^1.1.1",
"jasmine": "^2.8.0",
"lerna": "^2.0.0",
"lerna": "^2.11.0",
"link-parent-bin": "^0.2.0",
"mocha": "^5.0.0",
"nyc": "^11.3.0",
"mocha": "^5.1.1",
"nyc": "^11.7.1",
"protractor": "^5.1.2",
"rimraf": "^2.6.1",
"sinon": "^4.0.0",
"sinon-chai": "^3.0.0",
"source-map-support": "^0.5.1",
"source-map-support": "^0.5.5",
"tslint": "^5.9.1",
"typescript": "~2.8.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/grunt-stryker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
],
"license": "Apache-2.0",
"engines": {
"node": ">= 4"
"node": ">= 6"
},
"main": "Gruntfile.js",
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/stryker-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
"homepage": "https://github.com/stryker-mutator/stryker/tree/master/packages/stryker-api#readme",
"engines": {
"node": ">=4"
"node": ">=6"
},
"dependencies": {
"tslib": "^1.6.0"
Expand Down
12 changes: 9 additions & 3 deletions packages/stryker-babel-transpiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,18 @@
"postbuild": "tslint -p tsconfig.json",
"test": "nyc --reporter=html --report-dir=reports/coverage --check-coverage --lines 85 --functions 90 --branches 80 mocha \"test/helpers/**/*.js\" \"test/unit/**/*.js\" \"test/integration/**/*.js\""
},
"nyc": {
"exclude": [
"test",
"testResources"
]
},
"repository": {
"type": "git",
"url": "https://github.com/stryker-mutator/stryker"
},
"engines": {
"node": ">=4"
"node": ">=6"
},
"keywords": [
"stryker",
Expand All @@ -38,7 +44,7 @@
"homepage": "https://github.com/stryker-mutator/stryker/tree/master/packages/stryker-babel-transpiler#readme",
"license": "Apache-2.0",
"dependencies": {
"babel-core": "^6.26.0",
"babel-core": "6.26.0",
"log4js": "^1.1.1",
"minimatch": "^3.0.4"
},
Expand All @@ -60,4 +66,4 @@
"babelrcFile": ".babelrc",
"coverageAnalysis": "off"
}
}
}
12 changes: 1 addition & 11 deletions packages/stryker-babel-transpiler/test/helpers/projectLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,7 @@ export class ProjectLoader {

private static normalize(content: Buffer) {
// Remove carriage returns from the content buffer
if (process.version.startsWith('v4')) {
const newContent: number[] = [];
for (const byte of (content as any)) {
if (byte !== CARRIAGE_RETURN) {
newContent.push(byte);
}
}
return Buffer.from(newContent);
} else {
return Buffer.from(content.filter(byte => byte !== CARRIAGE_RETURN));
}
return Buffer.from(content.filter(byte => byte !== CARRIAGE_RETURN) as any);
}

private static glob(basePath: string): Promise<string[]> {
Expand Down
3 changes: 2 additions & 1 deletion packages/stryker-html-reporter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"url": "https://github.com/stryker-mutator/stryker.git"
},
"engines": {
"node": ">=4"
"node": ">=6"
},
"keywords": [
"stryker",
Expand Down Expand Up @@ -50,6 +50,7 @@
"devDependencies": {
"@types/file-url": "^2.0.0",
"@types/jsdom": "^11.0.2",
"@types/node": "^8.10.10",
"bootstrap": "4.1.0",
"highlight.js": "^9.4.0",
"jquery": "^3.2.1",
Expand Down
4 changes: 3 additions & 1 deletion packages/stryker-html-reporter/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"dom",
"es5",
"es2015.promise",
"es2015.core"
"es2015.core",
"es2015.symbol",
"es2015.symbol.wellknown"
],
"declaration": false,
"noImplicitReturns": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/stryker-javascript-mutator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"url": "https://github.com/stryker-mutator/stryker"
},
"engines": {
"node": ">=4"
"node": ">=6"
},
"keywords": [
"stryker",
Expand Down
2 changes: 1 addition & 1 deletion packages/stryker-karma-runner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"url": "https://github.io/stryker-mutator/stryker"
},
"engines": {
"node": ">=4"
"node": ">=6"
},
"keywords": [
"stryker",
Expand Down
2 changes: 1 addition & 1 deletion packages/stryker-mocha-framework/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"url": "https://github.com/stryker-mutator/stryker"
},
"engines": {
"node": ">=4"
"node": ">=6"
},
"keywords": [
"stryker",
Expand Down
2 changes: 1 addition & 1 deletion packages/stryker-mocha-runner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"url": "https://github.com/stryker-mutator/stryker"
},
"engines": {
"node": ">=4"
"node": ">=6"
},
"keywords": [
"stryker",
Expand Down
2 changes: 1 addition & 1 deletion packages/stryker-mutator-specification/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"url": "https://github.com/stryker-mutator/stryker"
},
"engines": {
"node": ">=4"
"node": ">=6"
},
"homepage": "https://github.com/stryker-mutator/stryker/tree/master/packages/stryker-javascript-mutator#readme",
"license": "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/stryker-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"url": "https://github.com/stryker-mutator/stryker"
},
"engines": {
"node": ">=4"
"node": ">=6"
},
"keywords": [
"stryker",
Expand Down
4 changes: 2 additions & 2 deletions packages/stryker-webpack-transpiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"build": "tsc",
"start": "tsc -w",
"postbuild": "tslint -p tsconfig.json",
"test": "if-node-version \">4\" nyc --reporter=html --report-dir=reports/coverage --check-coverage --lines 85 --functions 84 --branches 65 mocha \"test/helpers/**/*.js\" \"test/unit/**/*.js\" \"test/integration/**/*.js\"",
"posttest": "if-node-version \">4\" npm run stryker",
"test": "nyc --reporter=html --report-dir=reports/coverage --check-coverage --lines 85 --functions 84 --branches 65 mocha \"test/helpers/**/*.js\" \"test/unit/**/*.js\" \"test/integration/**/*.js\"",
"posttest": "npm run stryker",
"stryker": "node ../stryker/bin/stryker run"
},
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/stryker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"url": "https://github.com/stryker-mutator/stryker"
},
"engines": {
"node": ">=4"
"node": ">=6"
},
"keywords": [
"mutation testing",
Expand Down
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
"lib": [
"es5",
"es2015.promise",
"es2015.core"
"es2015.core",
"es2015.symbol",
"es2015.symbol.wellknown"
]
}
}

0 comments on commit a038931

Please sign in to comment.