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

WIP: Dependency manager #63

Merged
merged 31 commits into from
Apr 5, 2018
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
99f758e
See #58. Add Dependency Manager, related classes, and tests
Glavin001 Mar 22, 2018
8e9452f
Merge branch 'master' of github.com:Unibeautify/unibeautify into depe…
Glavin001 Mar 22, 2018
0f7d577
See #58. Add more tests for Dependency Manager
Glavin001 Mar 22, 2018
bbc3817
See #58. Remove commented out code
Glavin001 Mar 22, 2018
b6d0b84
Merge branch 'master' of github.com:Unibeautify/unibeautify into depe…
Glavin001 Mar 24, 2018
5cfee72
See #58. More progress on dependency manager
Glavin001 Mar 27, 2018
68c8818
See #58. Improve tests for dependency manager
Glavin001 Mar 27, 2018
f04258f
See #58. Fix code format issues
Glavin001 Mar 27, 2018
c698f62
Attempt to fix slow Travis CI builds
Glavin001 Mar 27, 2018
17ed034
See #58. Exclude __mocks__ directory from code coverage
Glavin001 Mar 27, 2018
be32450
See #58. Improve global Node dependency, add tests
Glavin001 Mar 28, 2018
759c9dd
See #58. Implement Executable dependency, add tests
Glavin001 Mar 29, 2018
92719bb
See #58. Fix formatting
Glavin001 Mar 29, 2018
1e8fa73
Update README with Code Climate badges [skip ci]
Glavin001 Mar 29, 2018
6873ffa
Remove duplicate badge from README
Glavin001 Mar 29, 2018
ea1349d
Exclude test files from Code Climate ratings
Glavin001 Mar 29, 2018
ab28e43
See #58. Improve Dependency parseVersion options
Glavin001 Mar 30, 2018
7ad3e7c
See #58. Improve Dependency Manager and Version helper, add tests
Glavin001 Mar 30, 2018
b163082
See #58. Change interface for run method of ExecutableDependency
Glavin001 Mar 31, 2018
0cfd42d
:art: Fix formatting of 8 files for commit b163082
Mar 31, 2018
def2542
Merge pull request #68 from Unibeautify/unibeautify/dependency-manage…
Glavin001 Mar 31, 2018
43612fe
Fix failing tests
Glavin001 Mar 31, 2018
a98f6ef
:art: Fix formatting of 4 files for commit 43612fe
Mar 31, 2018
9957da5
Merge pull request #69 from Unibeautify/unibeautify/dependency-manage…
Glavin001 Mar 31, 2018
098d445
Fix #70. Fix TypeScript compilation error
Glavin001 Apr 4, 2018
53dd4df
See #58. Add Executable Dependency unit tests, increase code coverage
Glavin001 Apr 4, 2018
d266884
See #58. Add test for passing stdin to Executable Dependency run method
Glavin001 Apr 5, 2018
45ed883
See #58. Fix debugging for VSCode + Jest
Glavin001 Apr 5, 2018
770e218
Remove PrettyDiff
stevenzeck Apr 5, 2018
267f1ca
:art: Fix formatting of 2 files for commit 770e218
Apr 5, 2018
2480ff1
Merge pull request #71 from Unibeautify/unibeautify/dependency-manage…
Glavin001 Apr 5, 2018
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
2 changes: 2 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ exclude_patterns:
- "**/node_modules/"
- "/test/"
- "**/*.d.ts"
- "__mocks__/"
- "jest.*.js"
plugins:
fixme:
enabled: true
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ before_script:
- ./cc-test-reporter before-build
script:
- npm run lint
- npm test
- npm run build-test
- jest --maxWorkers=4
notifications:
email:
on_success: never
Expand Down
29 changes: 25 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,38 @@
{
"type": "node",
"request": "launch",
"name": "Jest Tests",
"runtimeVersion": "7.10.0", // Fix breakpoints & debugger
"protocol": "legacy",
"name": "Debug Tests",
"program": "${workspaceRoot}/node_modules/jest/bin/jest.js",
"args": ["--config", "jest.config.js", "--runInBand"],
"cwd": "${workspaceFolder}",
"args": ["--runInBand", "--config", "jest.vscode-config.js"],
"runtimeArgs": ["--nolazy"],
"console": "internalConsole",
"env": {
"NODE_ENV": "test"
},
"protocol": "inspector",
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/dist/"]
"outFiles": ["${workspaceRoot}/dist/**/*.js"],
"preLaunchTask": "build-test"
},
{
"type": "node",
"request": "launch",
"runtimeVersion": "7.10.0", // Fix breakpoints & debugger
"protocol": "legacy",
"name": "Debug Test File",
"program": "${workspaceRoot}/node_modules/jest/bin/jest.js",
"cwd": "${workspaceFolder}",
"args": ["--config", "jest.vscode-config.js", "--runInBand", "${fileBasenameNoExtension}"],
"runtimeArgs": ["--nolazy"],
"console": "internalConsole",
"env": {
"NODE_ENV": "test"
},
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/dist/**/*.js"],
"preLaunchTask": "build-test"
}
]
}
10 changes: 9 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{
"editor.insertSpaces": true,
"editor.tabSize": 4
"editor.tabSize": 2,
"jest.autoEnable": true,
"jest.rootPath": ".",
"jest.pathToConfig": "jest.config.js",
"jest.showCoverageOnLoad": true,
"prettier.semi": true,
"prettier.singleQuote": false,
"prettier.trailingComma": "es5",
"prettier.printWidth": 80
}
13 changes: 13 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@
"kind": "test",
"isDefault": true
}
},
{
"type": "npm",
"script": "build",
"problemMatcher": []
},
{
"identifier": "build-test",
"type": "npm",
"script": "build-test",
"problemMatcher": [
"$tsc"
]
}
]
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Unibeautify

[![Greenkeeper badge](https://badges.greenkeeper.io/Unibeautify/unibeautify.svg)](https://greenkeeper.io/)
[![Maintainability](https://api.codeclimate.com/v1/badges/b472e3d8388e14a6d9ea/maintainability)](https://codeclimate.com/github/Unibeautify/unibeautify/maintainability)

> One Beautifier to rule them all, One Beautifier to clean them, One Beautifier to bring them all and in the darkness sheen them

Expand Down
1 change: 1 addition & 0 deletions __mocks__/fakedep/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = function() {};
12 changes: 12 additions & 0 deletions __mocks__/fakedep/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "fakedep",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
1 change: 1 addition & 0 deletions __mocks__/requireg-global-fakedep/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = function() {};
12 changes: 12 additions & 0 deletions __mocks__/requireg-global-fakedep/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "requireg-global-fakedep",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
25 changes: 23 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,33 @@
"use strict";

module.exports = {
rootDir: ".",
testEnvironment: "node",
setupFiles: [
"./test/setupTests.js"
],
transform: {
"^.+\\.tsx?$": "ts-jest"
"^.+\\.tsx?$": "ts-jest",
},
testRegex: "test/.+\\.(test|spec)\\.ts$",
testPathIgnorePatterns: [
"<rootDir>/__mocks__/",
"<rootDir>/dist/",
"<rootDir>/node_modules/",
],
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
collectCoverage: true,
coverageReporters: ["json", "lcov", "text", "html"],
mapCoverage: true
coveragePathIgnorePatterns: [
"<rootDir>/__mocks__/",
"<rootDir>/dist/",
"<rootDir>/test/",
"<rootDir>/node_modules/",
],
globals: {
"ts-jest": {
tsConfigFile: "tsconfig.json",
enableTsDiagnostics: true,
},
},
};
7 changes: 7 additions & 0 deletions jest.vscode-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"use strict";

module.exports = Object.assign({}, require("./jest.config.js"), {
testRegex: "dist/test/.+\\.(test|spec)\\.js$",
testPathIgnorePatterns: ["<rootDir>/node_modules/"],
collectCoverage: false,
});
Loading