@voiceflow/dependency-cruiser-config 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/config.d.ts +2 -1
- package/build/config.js +16 -16
- package/build/config.js.map +1 -1
- package/build/index.d.ts +2 -2
- package/build/index.js +2 -1
- package/build/index.js.map +1 -1
- package/build/rules/noOrphans.d.ts +4 -1
- package/build/rules/noOrphans.js +3 -2
- package/build/rules/noOrphans.js.map +1 -1
- package/build/types.d.ts +5 -0
- package/build/types.js +3 -0
- package/build/types.js.map +1 -0
- package/package.json +16 -16
package/build/config.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { IConfiguration } from 'dependency-cruiser';
|
|
2
|
-
|
|
2
|
+
import { Options } from './types';
|
|
3
|
+
declare const createConfig: ({ tsconfig, sourceDir, allowTypeCycles }?: Options) => IConfiguration;
|
|
3
4
|
export default createConfig;
|
package/build/config.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const rules_1 = require("./rules");
|
|
4
|
-
const createConfig = () => ({
|
|
4
|
+
const createConfig = ({ tsconfig = 'tsconfig.json', sourceDir = 'src', allowTypeCycles = false } = {}) => ({
|
|
5
5
|
forbidden: [
|
|
6
6
|
/* rules from the 'recommended' preset: */
|
|
7
|
-
rules_1.noCircularRule(),
|
|
8
|
-
rules_1.noOrphansRule(),
|
|
9
|
-
rules_1.noDeprecatedCoreRule(),
|
|
10
|
-
rules_1.notToDeprecatedRule(),
|
|
11
|
-
rules_1.noNonPackageRule(),
|
|
12
|
-
rules_1.notToUnresolvableRule(),
|
|
13
|
-
rules_1.noDuplicateDepTypesRule(),
|
|
7
|
+
(0, rules_1.noCircularRule)(),
|
|
8
|
+
(0, rules_1.noOrphansRule)({ ignoreTypes: allowTypeCycles }),
|
|
9
|
+
(0, rules_1.noDeprecatedCoreRule)(),
|
|
10
|
+
(0, rules_1.notToDeprecatedRule)(),
|
|
11
|
+
(0, rules_1.noNonPackageRule)(),
|
|
12
|
+
(0, rules_1.notToUnresolvableRule)(),
|
|
13
|
+
(0, rules_1.noDuplicateDepTypesRule)(),
|
|
14
14
|
/* rules you might want to tweak for your specific situation: */
|
|
15
|
-
rules_1.notToTestRule(),
|
|
16
|
-
rules_1.notToSpecRule(),
|
|
17
|
-
rules_1.notToDevDepRule(),
|
|
18
|
-
rules_1.warnOptionalDepsRule(),
|
|
19
|
-
rules_1.warnPeerDepsRule(),
|
|
15
|
+
(0, rules_1.notToTestRule)(),
|
|
16
|
+
(0, rules_1.notToSpecRule)(),
|
|
17
|
+
(0, rules_1.notToDevDepRule)(),
|
|
18
|
+
(0, rules_1.warnOptionalDepsRule)(),
|
|
19
|
+
(0, rules_1.warnPeerDepsRule)(),
|
|
20
20
|
],
|
|
21
21
|
options: {
|
|
22
22
|
/* conditions specifying which files not to follow further when encountered:
|
|
@@ -40,7 +40,7 @@ const createConfig = () => ({
|
|
|
40
40
|
/* pattern specifying which files to include (regular expression)
|
|
41
41
|
dependency-cruiser will skip everything not matching this pattern
|
|
42
42
|
*/
|
|
43
|
-
|
|
43
|
+
includeOnly: `^${sourceDir}/`,
|
|
44
44
|
/* dependency-cruiser will include modules matching against the focus
|
|
45
45
|
regular expression in its output, as well as their neighbours (direct
|
|
46
46
|
dependencies and dependents)
|
|
@@ -57,7 +57,7 @@ const createConfig = () => ({
|
|
|
57
57
|
true: also detect dependencies that only exist before typescript-to-javascript compilation
|
|
58
58
|
"specify": for each dependency identify whether it only exists before compilation or also after
|
|
59
59
|
*/
|
|
60
|
-
tsPreCompilationDeps:
|
|
60
|
+
tsPreCompilationDeps: !allowTypeCycles,
|
|
61
61
|
/* list of extensions (typically non-parseable) to scan. Empty by default. */
|
|
62
62
|
// extraExtensionsToScan: [".json", ".jpg", ".png", ".svg", ".webp"],
|
|
63
63
|
/* if true combines the package.jsons found from the module up to the base
|
|
@@ -76,7 +76,7 @@ const createConfig = () => ({
|
|
|
76
76
|
defaults to './tsconfig.json'.
|
|
77
77
|
*/
|
|
78
78
|
tsConfig: {
|
|
79
|
-
fileName:
|
|
79
|
+
fileName: tsconfig,
|
|
80
80
|
},
|
|
81
81
|
/* Webpack configuration to use to get resolve options from.
|
|
82
82
|
|
package/build/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;AAEA,mCAaiB;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;AAEA,mCAaiB;AAGjB,MAAM,YAAY,GAAG,CAAC,EAAE,QAAQ,GAAG,eAAe,EAAE,SAAS,GAAG,KAAK,EAAE,eAAe,GAAG,KAAK,KAAc,EAAE,EAAkB,EAAE,CAAC,CAAC;IAClI,SAAS,EAAE;QACT,0CAA0C;QAC1C,IAAA,sBAAc,GAAE;QAChB,IAAA,qBAAa,EAAC,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC;QAC/C,IAAA,4BAAoB,GAAE;QACtB,IAAA,2BAAmB,GAAE;QACrB,IAAA,wBAAgB,GAAE;QAClB,IAAA,6BAAqB,GAAE;QACvB,IAAA,+BAAuB,GAAE;QAEzB,gEAAgE;QAChE,IAAA,qBAAa,GAAE;QACf,IAAA,qBAAa,GAAE;QACf,IAAA,uBAAe,GAAE;QACjB,IAAA,4BAAoB,GAAE;QACtB,IAAA,wBAAgB,GAAE;KACnB;IACD,OAAO,EAAE;QACP;;;;UAIE;QACF,WAAW,EAAE;YACX,IAAI,EAAE,cAAc;YACpB,eAAe,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,CAAC;SAC7F;QAED;;;;UAIE;QACF,cAAc;QACd,cAAc;QACd,kBAAkB;QAClB,KAAK;QAEL;;UAEE;QACF,WAAW,E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gBAC9C,2CAA2C;gBAC3C,SAAS;gBACT,QAAQ;gBACR,6CAA6C;gBAC7C,2CAA2C;gBAC3C,QAAQ;gBACR,MAAM;gBACN,IAAI;aACL;YACD,KAAK,EAAE;gBACL;;;;kBAIE;gBACF,eAAe,EAAE,wEAAwE;gBAEzF;;;;;mBAKG;gBACH,WAAW;gBACX,KAAK;aACN;SACF;KACF;CACF,CAAC,CAAC;AAEH,kBAAe,YAAY,CAAC"}
|
package/build/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import createConfig from './config';
|
|
2
2
|
export { createConfig };
|
|
3
3
|
export * from './rules';
|
|
4
|
-
declare const
|
|
5
|
-
export default
|
|
4
|
+
declare const defaultConfig: import("dependency-cruiser").IConfiguration;
|
|
5
|
+
export default defaultConfig;
|
package/build/index.js
CHANGED
|
@@ -17,5 +17,6 @@ exports.createConfig = void 0;
|
|
|
17
17
|
const config_1 = __importDefault(require("./config"));
|
|
18
18
|
exports.createConfig = config_1.default;
|
|
19
19
|
__exportStar(require("./rules"), exports);
|
|
20
|
-
|
|
20
|
+
const defaultConfig = (0, config_1.default)();
|
|
21
|
+
exports.default = defaultConfig;
|
|
21
22
|
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AAE3B,uBAFF,gBAAY,CAEE;AACrB,0CAAwB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AAE3B,uBAFF,gBAAY,CAEE;AACrB,0CAAwB;AAExB,MAAM,aAAa,GAAG,IAAA,gBAAY,GAAE,CAAC;AAErC,kBAAe,aAAa,CAAC"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { IRegularForbiddenRuleType } from 'dependency-cruiser';
|
|
2
|
-
|
|
2
|
+
export interface NoOrphansOptions {
|
|
3
|
+
ignoreTypes?: boolean;
|
|
4
|
+
}
|
|
5
|
+
declare const noOrphansRule: ({ ignoreTypes }?: NoOrphansOptions) => IRegularForbiddenRuleType;
|
|
3
6
|
export default noOrphansRule;
|
package/build/rules/noOrphans.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const noOrphansRule = () => ({
|
|
3
|
+
const noOrphansRule = ({ ignoreTypes = false } = {}) => ({
|
|
4
4
|
name: 'no-orphans',
|
|
5
5
|
comment: "This is an orphan module - it's likely not used (anymore?). Either use it or " +
|
|
6
6
|
"remove it. If it's logical this module is an orphan (i.e. it's a config file), " +
|
|
@@ -14,7 +14,8 @@ const noOrphansRule = () => ({
|
|
|
14
14
|
'(^|/)\\.[^/]+\\.(js|cjs|mjs|ts|json)$',
|
|
15
15
|
'\\.d\\.ts$',
|
|
16
16
|
'(^|/)tsconfig\\.json$',
|
|
17
|
-
'(^|/)(babel|webpack)\\.config\\.(js|cjs|mjs|ts|json)$',
|
|
17
|
+
'(^|/)(babel|webpack)\\.config\\.(js|cjs|mjs|ts|json)$',
|
|
18
|
+
...(ignoreTypes ? ['(^|/)types\\.ts$'] : []),
|
|
18
19
|
],
|
|
19
20
|
},
|
|
20
21
|
to: {},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"noOrphans.js","sourceRoot":"","sources":["../../src/rules/noOrphans.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"noOrphans.js","sourceRoot":"","sources":["../../src/rules/noOrphans.ts"],"names":[],"mappings":";;AAMA,MAAM,aAAa,GAAG,CAAC,EAAE,WAAW,GAAG,KAAK,KAAuB,EAAE,EAA6B,EAAE,CAAC,CAAC;IACpG,IAAI,EAAE,YAAY;IAClB,OAAO,EACL,+EAA+E;QAC/E,iFAAiF;QACjF,+EAA+E;QAC/E,qFAAqF;QACrF,yEAAyE;IAC3E,QAAQ,EAAE,MAAM;IAChB,IAAI,EAAE;QACJ,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE;YACP,uCAAuC;YACvC,YAAY;YACZ,uBAAuB;YACvB,uDAAuD;YACvD,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;SAC7C;KACF;IACD,EAAE,EAAE,EAAE;CACP,CAAC,CAAC;AAEH,kBAAe,aAAa,CAAC"}
|
package/build/types.d.ts
ADDED
package/build/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voiceflow/dependency-cruiser-config",
|
|
3
3
|
"description": "dependency-cruiser config for voiceflow",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"author": "Ben Teichman",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/voiceflow/dependency-cruiser-config/issues"
|
|
@@ -13,35 +13,35 @@
|
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"@istanbuljs/nyc-config-typescript": "^1.0.2",
|
|
16
|
-
"@types/chai": "
|
|
16
|
+
"@types/chai": "4.3.0",
|
|
17
17
|
"@types/chai-as-promised": "^7.1.4",
|
|
18
18
|
"@types/git-branch": "2.0.2",
|
|
19
|
-
"@types/mocha": "
|
|
20
|
-
"@types/node": "
|
|
21
|
-
"@voiceflow/commitlint-config": "
|
|
19
|
+
"@types/mocha": "9.1.0",
|
|
20
|
+
"@types/node": "17.0.10",
|
|
21
|
+
"@voiceflow/commitlint-config": "2.0.0",
|
|
22
22
|
"@voiceflow/eslint-config": "^3.2.1",
|
|
23
|
-
"@voiceflow/git-branch-check": "
|
|
24
|
-
"@voiceflow/prettier-config": "
|
|
25
|
-
"@voiceflow/tsconfig": "
|
|
23
|
+
"@voiceflow/git-branch-check": "1.2.3",
|
|
24
|
+
"@voiceflow/prettier-config": "1.0.6",
|
|
25
|
+
"@voiceflow/tsconfig": "1.2.5",
|
|
26
26
|
"@zerollup/ts-transform-paths": "^1.7.18",
|
|
27
27
|
"chai": "^4.3.4",
|
|
28
28
|
"chai-as-promised": "^7.1.1",
|
|
29
29
|
"commitizen": "^4.2.4",
|
|
30
|
-
"commitlint": "
|
|
30
|
+
"commitlint": "16.1.0",
|
|
31
31
|
"cz-conventional-changelog": "^3.3.0",
|
|
32
|
-
"depcheck": "
|
|
32
|
+
"depcheck": "1.4.3",
|
|
33
33
|
"dependency-cruiser": "11.2.1",
|
|
34
34
|
"eslint": "^7.26.0",
|
|
35
35
|
"fixpack": "^4.0.0",
|
|
36
|
-
"husky": "
|
|
37
|
-
"lint-staged": "
|
|
38
|
-
"mocha": "
|
|
36
|
+
"husky": "7.0.4",
|
|
37
|
+
"lint-staged": "12.2.2",
|
|
38
|
+
"mocha": "9.1.4",
|
|
39
39
|
"nyc": "^15.1.0",
|
|
40
40
|
"prettier": "^2.3.0",
|
|
41
41
|
"rimraf": "^3.0.2",
|
|
42
|
-
"ts-mocha": "
|
|
43
|
-
"ttypescript": "
|
|
44
|
-
"typescript": "
|
|
42
|
+
"ts-mocha": "9.0.2",
|
|
43
|
+
"ttypescript": "1.5.13",
|
|
44
|
+
"typescript": "4.5.5"
|
|
45
45
|
},
|
|
46
46
|
"files": [
|
|
47
47
|
"build"
|