Skip to content

Commit

Permalink
Feat(WebpackTranspiler): Add Initial version of WebpackTranspiler (#4)
Browse files Browse the repository at this point in the history
* Fix(Test): Fix casing for Hello World

* Feat(Travis): Notification settings

* Feat(sinon): Add sinon and mock producer

* Test(compile): Add test for webpack transpile

* Feat(WebpackCompiler): Basic implementation

* Test(Remove): Remove test temporarily

* Feat(resources): Add sampleProject

* Feat(Transpiler): Add initial version of WebpackTranspiler

Initial version of the WebpackCompiler implementing the Transpiler interface provided by Stryker
This implementation has a asyncTranspile function temporarily because Stryker only does synchronous compilation
This transpiler does not work untill stryker starts supporting async transpilers

* Feat(Compiler): Compiler used internally by the WebpackTranspiler

* Test(intergration): Intergration test for WebpackTranspiler

* chore(testResources): Allow js files in testResources folder

* Feat(Packages): Cleaned up dependencies

* Ffix(Deps): Temporarily add peer dependencies

Temporarily add peer dependencies to the dependencies list untill I figure out how to get the peer dependencies to load in the build process. Should fix the build.

* Chore(ignore): Ignore package-lock.json

* feat(FsWrapper): Add fsWrapper to the project

* chore(clean): Clean ignored files from the repository

* Feat(FsWrapper): Use FsWrapper instead of private functions

* Test(FsWrapper): Tests for FsWrapper

* Chore(Clean): Remove redundant files

* Feat(Transpiler): Register transpiler in index file

* test(fswrapper): Add mock interface

* Refactor(Clean): Remove package-lock.json from the project for now

* Chore(gitignore): Add package-lock.json to the gitignore file

* Feat(Stryker): Update to the latest stryker-api

* Feat(Stryker): Make use of the

The transpiler plugin should now be compatible with Stryker (yay)

* Fix(Tests): Fix intergration tests

* Feat(Clean): Remove gitkeep as it is no longer needed

* Refactor(Designs): Refactor based on designs

* Refactor(rename): Rename intergration -> integration

* Chore(Report): Add nyc report and output to ignore

* Feat(Coverage): Add nyc to measure coverage

* Refactor(errors): Make constants for error identifiers

* Fix(Identity): Identify as webpack transpiler

* Test(childProcess): Test bundle with childProcess

* Feat(Execute): Create async exec method

* Feat(producers): Producers for several enitites.

* Test(WebpackCompiler): Add tests for WebpackCompiler

* Test(WebpackTranspiler): Add tests for WebpackTranspiler

* Fix(Build): Make tests pending and fix SinonObject

* Fix(Webpack): Import all and export as default

We do this so that we can stub webpack in out tests

* Feat(MockInterfaces): Add interface for WebpackCompilerMock

* Feat(Webpack): Use default export webpack instead of official

* Feat(WebpackCompiler): Add create funciton for compiler mock

* Test(WebpackCompiler): Add additional tests for WebpackCompiler

* Test(Stat): Add case in which stat rejects with an error

* Test(Clean): Cleanup tests

* Feat(Stryker): Add stryker for testing

* Feat(Stryker): Stryker config

* Test(cache): Add test to verify if cache is set to true

* chore(logLevel): Set Stryker logLevel to info

* Feat(Config): Change provided webpack config rather than a new one

* Test(Config): Check entrypoint set by the transpiler

* Test(FsWrapper): Create tests for edge cases

* Test(WebpackCompiler): Add test to cover an edge case

* Fix(Config): Temporarily clone the config object

* Test(Transpiler): Temporarily remove test for entry point

* Feat(Test): Build before testing.

* Refactor(Review): Implemented suggested refactor
  • Loading branch information
Sander Koenders authored and nicojs committed Jan 9, 2018
1 parent 483429c commit d39a227
Show file tree
Hide file tree
Showing 26 changed files with 957 additions and 298 deletions.
8 changes: 7 additions & 1 deletion packages/stryker-webpack/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@
/node_modules
**/*.js
**/*.js.map
**/*.d.ts
**/*.d.ts

!testResources/**/*.js
!stryker.conf.js
/package-lock.json
/reports
/.nyc_output
6 changes: 0 additions & 6 deletions packages/stryker-webpack/.idea/vcs.xml

This file was deleted.

10 changes: 9 additions & 1 deletion packages/stryker-webpack/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,12 @@ node_js:
- '4'
install: npm install
before_install:
- if [[ `npm -v` = 2* ]]; then npm i -g npm@3; fi
- if [[ `npm -v` = 2* ]]; then npm i -g npm@3; fi
notifications:
slack:
secure: PaygAi3u8LIEIpsMbzr6BKgU8qW4abz9D+I5fBaxtrCycBYcj6qWSz5SY6XMAsf6cHj0U0CLl7e7tw7sR8FJlha61ej9u/p+gnHlPPQDsAfOYNifuTyCoj7s7HjF1bboKGKB66P/Np/QPyFvTHwVdA6l2JPoJO5a6eiqaUUvhWoZKGvs4HGBzGfd3g/6RZ7ugUH1C6DoUnPv1eoFoA22QH8pj30ugq/E0xZnD64nx0vBrFzfbpH9r9wDOphe9lnLygxHTzXY/smJfXqNrpdRyWnztTcI0XwTEe4lZR1l9y5UkziVvqrVoSblUp68JvB9yrfdZzWkLyXAoYaiOPIsszHnT9ovUWFLYqsbBkjqJOYPZX0koCeP2a07i5UMXbjwKcwdg+HKW3ZMq0oRX5n1dMOVBlCqlaZjW9Q0TJQiseLvrOmtpM2X3mKb+2ibyuoObpnUEBNdluQ1xiqBFsrFNpmowPUidt4TDmT4R2ggOM11O5iW5kv4gaE6N4q6hu1+tlQR6eu5LM5d8CNrJ3k362STqw11bOQbXtondVMV2kOo7+VJT8JHDK4V8aX5FRk8yhrC80FxD7Et7eJOSXOnz8HXQo064+0vjJjdzzEjfJKeqwuhLTjZvQnSjBDRa6u59h4X50RqN/MUmzSd18HqKuX2EhVMl+08u5YhRg+mi0U=
on_success: change
on_failure: change
email:
on_success: never
on_failure: change
16 changes: 16 additions & 0 deletions packages/stryker-webpack/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"files": {
"exclude": {
".git": "",
".tscache": "",
"**/*.js": {
"when": "$(basename).ts"
},
"**/*.d.ts": true,
"**/*.map": {
"when": "$(basename)"
}
}
}
}
25 changes: 25 additions & 0 deletions packages/stryker-webpack/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "build",
"problemMatcher": []
},
{
"type": "npm",
"script": "test",
"problemMatcher": []
},
{
"type": "typescript",
"tsconfig": "tsconfig.json",
"option": "watch",
"problemMatcher": [
"$tsc-watch"
]
}
]
}
266 changes: 0 additions & 266 deletions packages/stryker-webpack/package-lock.json

This file was deleted.

29 changes: 25 additions & 4 deletions packages/stryker-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
"main": "src/index.js",
"scripts": {
"build": "tsc",
"pretest": "tsc",
"test": "mocha --recursive test/**/*.spec.js"
"premocha": "npm run build",
"test": "npm run mocha && npm run stryker",
"mocha": "nyc --reporter=html --report-dir=reports/coverage --check-coverage --lines 85 --functions 90 --branches 65 mocha \"test/unit/**/*.js\" \"test/integration/**/*.js\"",
"stryker": "stryker run"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -35,12 +37,31 @@
"homepage": "https://github.com/Archcry/stryker-webpack#readme",
"devDependencies": {
"@types/chai": "^4.0.4",
"@types/memory-fs": "^0.3.0",
"@types/mocha": "^2.2.43",
"@types/mz": "0.0.32",
"@types/sinon": "^2.3.6",
"@types/webpack": "^3.0.13",
"chai": "^4.1.2",
"mocha": "^4.0.1",
"typescript": "^2.2.2"
"mocha": "^3.5.3",
"mz": "^2.7.0",
"nyc": "^11.2.1",
"sinon": "^4.0.1",
"stryker": "^0.13.0",
"stryker-cli": "^0.1.3",
"stryker-html-reporter": "^0.11.0",
"stryker-mocha-framework": "^0.6.1",
"stryker-mocha-runner": "^0.9.1",
"stryker-typescript": "^0.3.0",
"typescript": "^2.5.0"
},
"peerDependencies": {
"webpack": "^3.7.1",
"stryker-api": "^0.11.0"
},
"dependencies": {
"memory-fs": "^0.4.1",
"stryker-api": "^0.11.0",
"webpack": "^3.7.1"
}
}
Empty file.
Loading

0 comments on commit d39a227

Please sign in to comment.