Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
150 changes: 150 additions & 0 deletions .dependency-cruiser.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
{
"forbidden": [
{
"name": "plugins-to-workflow",
"comment": "Plugins should only use workflow features. They should not use each other.",
"severity": "error",
"from": {
"path": "^src/(load|filter|replace|reporter)"
},
"to": {
"pathNot": "^src/regression|^src/exception|^src/inversify*|^node_modules|^fs$|$1"
}
},
{
"name": "model-to-anything",
"comment": "The model layer should have no dependencies at all",
"severity": "error",
"from": {
"path": "^src/model"
},
"to": {
}
},
{
"name": "not-to-test",
"comment": "Don't allow dependencies from outside the test folder to test",
"severity": "error",
"from": {
"pathNot": "^(test|spec)"
},
"to": {
"path": "^(test|spec)"
}
},
{
"name": "not-to-spec",
"comment": "Don't allow dependencies to (typescript/ javascript/ coffeescript) spec files",
"severity": "error",
"from": {},
"to": {
"path": "\\.spec\\.[js|ts|ls|coffee|litcoffee|coffee\\.md]$"
}
},
{
"name": "no-circular",
"severity": "warn",
"comment": "Warn in case there's circular dependencies",
"from": {},
"to": {
"circular": true
}
},
{
"name": "no-deprecated-core",
"comment": "Warn about dependencies on deprecated core modules.",
"severity": "warn",
"from": {},
"to": {
"dependencyTypes": [
"core"
],
"path": "^(punycode|domain|constants|sys|_linklist)$"
}
},
{
"name": "no-deprecated-npm",
"comment": "These npm modules are deprecated - find an alternative.",
"severity": "warn",
"from": {},
"to": {
"dependencyTypes": [
"deprecated"
]
}
},
{
"name": "not-to-unresolvable",
"comment": "Don't allow dependencies on modules dependency-cruiser can't resolve to files on disk (which probably means they don't exist)",
"severity": "error",
"from": {},
"to": {
"couldNotResolve": true
}
},
{
"name": "not-to-dev-dep",
"severity": "error",
"comment": "Don't allow dependencies from src/app/lib to a development only package",
"from": {
"path": "^(src|app|lib)",
"pathNot": "\\.spec\\.[js|ts|ls|coffee|litcoffee|coffee\\.md]$"
},
"to": {
"dependencyTypes": [
"npm-dev"
]
}
},
{
"name": "no-non-package-json",
"severity": "error",
"comment": "Don't allow dependencies to packages not in package.json (except from within node_modules)",
"from": {
"pathNot": "^node_modules"
},
"to": {
"dependencyTypes": [
"unknown",
"undetermined",
"npm-no-pkg",
"npm-unknown"
]
}
},
{
"name": "optional-deps-used",
"severity": "info",
"comment": "nothing serious - but just check you have some serious try/ catches around the import/ requires of these",
"from": {},
"to": {
"dependencyTypes": [
"npm-optional"
]
}
},
{
"name": "peer-deps-used",
"comment": "Warn about the use of a peer dependency (peer dependencies are deprecated with the advent of npm 3 - and probably gone with version 4).",
"severity": "warn",
"from": {},
"to": {
"dependencyTypes": [
"npm-peer"
]
}
},
{
"name": "no-duplicate-dep-types",
"comment": "Warn if a dependency you're actually using occurs in your package.json more than once (technically: has more than one dependency type)",
"severity": "warn",
"from": {},
"to": {
"moreThanOneDependencyType": true
}
}
],
"options": {
"doNotFollow": "^node_modules"
}
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"ts:watch": "tsc -w",
"ts:lint": "tslint -c tslint.json -p tsconfig.json",
"watch": "yarn run ts:watch",
"package": "yarn run build && pkg dist/src/sireg-cli.js -t node8-macos,node8-win,node8-linux -o dist/bin/sireg"
"package": "yarn run build && pkg dist/src/sireg-cli.js -t node8-macos,node8-win,node8-linux -o dist/bin/sireg",
"depcruise": "depcruise --validate .dependency-cruiser.json src"
},
"jest": {
"transform": {
Expand Down Expand Up @@ -49,6 +50,7 @@
"@types/strftime": "0.9.2",
"@types/winston": "2.3.6",
"ajv-cli": "2.1.0",
"dependency-cruiser": "2.11.0-beta-1",
"jest": "21.2.1",
"pkg": "4.2.5",
"rimraf": "2.6.2",
Expand Down
80 changes: 80 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ acorn@5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.1.1.tgz#53fe161111f912ab999ee887a90a0bc52822fd75"

acorn@5.3.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.3.0.tgz#7446d39459c54fb49a80e6ee6478149b940ec822"

acorn@^4.0.4:
version "4.0.13"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787"
Expand Down Expand Up @@ -104,6 +108,14 @@ ajv@5.2.3, ajv@^5.1.0:
json-schema-traverse "^0.3.0"
json-stable-stringify "^1.0.1"

ajv@6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.0.0.tgz#093bec4d9bac8e4505e541ae10eb6150268684c2"
dependencies:
fast-deep-equal "^1.0.0"
fast-json-stable-stringify "^2.0.0"
json-schema-traverse "^0.3.0"

ajv@^4.9.1:
version "4.11.8"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536"
Expand Down Expand Up @@ -567,6 +579,14 @@ chalk@2.1.0:
escape-string-regexp "^1.0.5"
supports-color "^4.0.0"

chalk@2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba"
dependencies:
ansi-styles "^3.1.0"
escape-string-regexp "^1.0.5"
supports-color "^4.0.0"

chalk@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
Expand Down Expand Up @@ -641,6 +661,10 @@ commander@2.11.0, commander@^2.5.0, commander@^2.9.0:
version "2.11.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563"

commander@2.13.0:
version "2.13.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c"

concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
Expand Down Expand Up @@ -757,6 +781,22 @@ delegates@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"

dependency-cruiser@2.11.0-beta-1:
version "2.11.0-beta-1"
resolved "https://registry.yarnpkg.com/dependency-cruiser/-/dependency-cruiser-2.11.0-beta-1.tgz#a03234250527df6aa56b562ea1a7523eb0e5c1e8"
dependencies:
acorn "5.3.0"
ajv "6.0.0"
chalk "2.3.0"
commander "2.13.0"
figures "2.0.0"
handlebars "4.0.11"
lodash "4.17.4"
normalize-newline "3.0.0"
resolve "1.5.0"
safe-regex "1.1.0"
semver "5.4.1"

detect-indent@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208"
Expand Down Expand Up @@ -913,6 +953,10 @@ fast-json-patch@^0.5.6:
version "0.5.7"
resolved "https://registry.yarnpkg.com/fast-json-patch/-/fast-json-patch-0.5.7.tgz#b5a8f49d259624596ef98b872f3fda895b4d8665"

fast-json-stable-stringify@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"

fast-levenshtein@~2.0.4:
version "2.0.6"
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
Expand All @@ -923,6 +967,12 @@ fb-watchman@^2.0.0:
dependencies:
bser "^2.0.0"

figures@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962"
dependencies:
escape-string-regexp "^1.0.5"

filename-regex@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26"
Expand Down Expand Up @@ -1141,6 +1191,16 @@ growly@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081"

handlebars@4.0.11:
version "4.0.11"
resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc"
dependencies:
async "^1.4.0"
optimist "^0.6.1"
source-map "^0.4.4"
optionalDependencies:
uglify-js "^2.6"

handlebars@^4.0.3, handlebars@^4.0.4:
version "4.0.10"
resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.10.tgz#3d30c718b09a3d96f23ea4cc1f403c4d3ba9ff4f"
Expand Down Expand Up @@ -2031,6 +2091,10 @@ nopt@~3.0.1:
dependencies:
abbrev "1"

normalize-newline@3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/normalize-newline/-/normalize-newline-3.0.0.tgz#1cbea804aba436001f83938ab21ec039d69ae9d3"

normalize-package-data@^2.3.2:
version "2.4.0"
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f"
Expand Down Expand Up @@ -2543,6 +2607,12 @@ resolve@1.4.0:
dependencies:
path-parse "^1.0.5"

resolve@1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36"
dependencies:
path-parse "^1.0.5"

resolve@^1.3.2:
version "1.3.3"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5"
Expand All @@ -2553,6 +2623,10 @@ resolve@~0.6.1:
version "0.6.3"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-0.6.3.tgz#dd957982e7e736debdf53b58a4dd91754575dd46"

ret@~0.1.10:
version "0.1.15"
resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"

right-align@^0.1.1:
version "0.1.3"
resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef"
Expand Down Expand Up @@ -2585,6 +2659,12 @@ safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"

safe-regex@1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e"
dependencies:
ret "~0.1.10"

sane@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/sane/-/sane-2.2.0.tgz#d6d2e2fcab00e3d283c93b912b7c3a20846f1d56"
Expand Down