@monorepolint/rules 0.5.0-beta.8 → 0.5.0-beta.9

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.
Files changed (76) hide show
  1. package/.turbo/turbo-clean.log +4 -0
  2. package/.turbo/turbo-compile-typescript.log +4 -0
  3. package/.turbo/turbo-lint.log +4 -0
  4. package/.turbo/turbo-test.log +667 -0
  5. package/.turbo/turbo-transpile-typescript.log +18 -0
  6. package/CHANGELOG.md +10 -0
  7. package/build/js/chunk-A2MUUSNE.js +26 -0
  8. package/build/js/chunk-A2MUUSNE.js.map +1 -0
  9. package/build/js/index.js +1403 -0
  10. package/build/js/index.js.map +1 -0
  11. package/build/js/public/util.js +7 -0
  12. package/build/js/public/util.js.map +1 -0
  13. package/build/tsconfig.tsbuildinfo +1 -0
  14. package/build/types/__tests__/alphabeticalScripts.spec.d.ts +8 -0
  15. package/build/types/__tests__/alphabeticalScripts.spec.d.ts.map +1 -0
  16. package/build/types/__tests__/bannedDependencies.spec.d.ts +2 -0
  17. package/build/types/__tests__/bannedDependencies.spec.d.ts.map +1 -0
  18. package/build/types/__tests__/consistentDependencies.spec.d.ts +2 -0
  19. package/build/types/__tests__/consistentDependencies.spec.d.ts.map +1 -0
  20. package/build/types/__tests__/consistentVersions.spec.d.ts +8 -0
  21. package/build/types/__tests__/consistentVersions.spec.d.ts.map +1 -0
  22. package/build/types/__tests__/fileContents.spec.d.ts +8 -0
  23. package/build/types/__tests__/fileContents.spec.d.ts.map +1 -0
  24. package/build/types/__tests__/mustSatisfyPeerDependencies.spec.d.ts +8 -0
  25. package/build/types/__tests__/mustSatisfyPeerDependencies.spec.d.ts.map +1 -0
  26. package/build/types/__tests__/nestedWorkspaces.spec.d.ts +2 -0
  27. package/build/types/__tests__/nestedWorkspaces.spec.d.ts.map +1 -0
  28. package/build/types/__tests__/packageEntry.spec.d.ts +8 -0
  29. package/build/types/__tests__/packageEntry.spec.d.ts.map +1 -0
  30. package/build/types/__tests__/packageOrder.spec.d.ts +8 -0
  31. package/build/types/__tests__/packageOrder.spec.d.ts.map +1 -0
  32. package/build/types/__tests__/packageScript.spec.d.ts +8 -0
  33. package/build/types/__tests__/packageScript.spec.d.ts.map +1 -0
  34. package/build/types/__tests__/requireDependency.spec.d.ts +2 -0
  35. package/build/types/__tests__/requireDependency.spec.d.ts.map +1 -0
  36. package/build/types/__tests__/utils.d.ts +81 -0
  37. package/build/types/__tests__/utils.d.ts.map +1 -0
  38. package/build/types/alphabeticalDependencies.d.ts +8 -0
  39. package/build/types/alphabeticalDependencies.d.ts.map +1 -0
  40. package/build/types/alphabeticalScripts.d.ts +8 -0
  41. package/build/types/alphabeticalScripts.d.ts.map +1 -0
  42. package/build/types/bannedDependencies.d.ts +66 -0
  43. package/build/types/bannedDependencies.d.ts.map +1 -0
  44. package/build/types/consistentDependencies.d.ts +18 -0
  45. package/build/types/consistentDependencies.d.ts.map +1 -0
  46. package/build/types/consistentVersions.d.ts +25 -0
  47. package/build/types/consistentVersions.d.ts.map +1 -0
  48. package/build/types/fileContents.d.ts +39 -0
  49. package/build/types/fileContents.d.ts.map +1 -0
  50. package/build/types/index.d.ts +20 -0
  51. package/build/types/index.d.ts.map +1 -0
  52. package/build/types/mustSatisfyPeerDependencies.d.ts +427 -0
  53. package/build/types/mustSatisfyPeerDependencies.d.ts.map +1 -0
  54. package/build/types/nestedWorkspaces.d.ts +10 -0
  55. package/build/types/nestedWorkspaces.d.ts.map +1 -0
  56. package/build/types/packageEntry.d.ts +62 -0
  57. package/build/types/packageEntry.d.ts.map +1 -0
  58. package/build/types/packageOrder.d.ts +12 -0
  59. package/build/types/packageOrder.d.ts.map +1 -0
  60. package/build/types/packageScript.d.ts +47 -0
  61. package/build/types/packageScript.d.ts.map +1 -0
  62. package/build/types/public/util.d.ts +2 -0
  63. package/build/types/public/util.d.ts.map +1 -0
  64. package/build/types/requireDependency.d.ts +50 -0
  65. package/build/types/requireDependency.d.ts.map +1 -0
  66. package/build/types/standardTsconfig.d.ts +29 -0
  67. package/build/types/standardTsconfig.d.ts.map +1 -0
  68. package/build/types/util/checkAlpha.d.ts +10 -0
  69. package/build/types/util/checkAlpha.d.ts.map +1 -0
  70. package/build/types/util/makeDirectory.d.ts +8 -0
  71. package/build/types/util/makeDirectory.d.ts.map +1 -0
  72. package/build/types/util/makeRule.d.ts +12 -0
  73. package/build/types/util/makeRule.d.ts.map +1 -0
  74. package/build/types/util/packageDependencyGraphService.d.ts +37 -0
  75. package/build/types/util/packageDependencyGraphService.d.ts.map +1 -0
  76. package/package.json +4 -4
@@ -0,0 +1,10 @@
1
+ /*!
2
+ * Copyright 2019 Palantir Technologies, Inc.
3
+ *
4
+ * Licensed under the MIT license. See LICENSE file in the project root for details.
5
+ *
6
+ */
7
+ import { Context } from "@monorepolint/config";
8
+ export declare function checkAlpha(context: Context, block: "dependencies" | "devDependencies" | "peerDependencies" | "scripts"): void;
9
+ export declare function createIncorrectOrderErrorMessage(block: string, packageName: string): string;
10
+ //# sourceMappingURL=checkAlpha.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkAlpha.d.ts","sourceRoot":"","sources":["../../../src/util/checkAlpha.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAG/C,wBAAgB,UAAU,CACxB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,cAAc,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,SAAS,QAgC3E;AAYD,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,UAElF"}
@@ -0,0 +1,8 @@
1
+ /*!
2
+ * Copyright 2019 Palantir Technologies, Inc.
3
+ *
4
+ * Licensed under the MIT license. See LICENSE file in the project root for details.
5
+ *
6
+ */
7
+ export declare function makeDirectoryRecursively(directoryPath: string): void;
8
+ //# sourceMappingURL=makeDirectory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"makeDirectory.d.ts","sourceRoot":"","sources":["../../../src/util/makeDirectory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,wBAAgB,wBAAwB,CAAC,aAAa,EAAE,MAAM,QAa7D"}
@@ -0,0 +1,12 @@
1
+ import { Context, RuleEntry, RuleModule } from "@monorepolint/config";
2
+ export declare function makeRule<X>({ name, check, validateOptions, printStats, }: {
3
+ name: string;
4
+ check: (context: Context, options: X, extra: {
5
+ id: string;
6
+ }) => Promise<unknown> | unknown;
7
+ printStats?: () => void;
8
+ validateOptions: (options: unknown) => asserts options is X;
9
+ }): RuleFunction<X>;
10
+ type RuleFunction<T> = (ruleEntry: RuleEntry<T>) => RuleModule<T>;
11
+ export {};
12
+ //# sourceMappingURL=makeRule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"makeRule.d.ts","sourceRoot":"","sources":["../../../src/util/makeRule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGtE,wBAAgB,QAAQ,CAAC,CAAC,EAAE,EAC1B,IAAI,EACJ,KAAK,EACL,eAAe,EACf,UAAU,GACX,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;IAC3F,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,IAAI,CAAC,CAAC;CAC7D,GAAG,YAAY,CAAC,CAAC,CAAC,CAalB;AAED,KAAK,YAAY,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * @license Copyright 2019 Palantir Technologies, Inc. All rights reserved.
3
+ */
4
+ import { Host, PackageJson } from "@monorepolint/utils";
5
+ /** Interface for a node in a package dependency graph. */
6
+ export interface IPackageDependencyGraphNode {
7
+ packageJson: PackageJson;
8
+ dependencies: Map<string, IPackageDependencyGraphNode>;
9
+ paths: {
10
+ packageJsonPath: string;
11
+ rootDirectory: string;
12
+ };
13
+ }
14
+ /** Service abstraction for constructing and traversing package dependency graphs. */
15
+ export interface IPackageDependencyGraphService {
16
+ /** Construct a graph of package dependencies. */
17
+ buildDependencyGraph(packageJsonPath: string, host: Host, maxDepth?: number): IPackageDependencyGraphNode;
18
+ /** Traverse a package dependency graph. */
19
+ traverse(root: IPackageDependencyGraphNode, opts?: {
20
+ /** Traverse each unique path to a given package (potentially slow). */
21
+ traverseAllPaths?: boolean;
22
+ }): IterableIterator<IPackageDependencyGraphNode & {
23
+ importPath: IPackageDependencyGraphNode[];
24
+ }>;
25
+ }
26
+ /** Default implementation of the package dependency graph service. */
27
+ export declare class PackageDependencyGraphService implements IPackageDependencyGraphService {
28
+ /** Construct a graph of package dependencies and return the root node. */
29
+ buildDependencyGraph(startPackageJsonPath: string, host: Host, maxDepth?: number): IPackageDependencyGraphNode;
30
+ /** Traverse a package dependency graph with an iterator. */
31
+ traverse(root: IPackageDependencyGraphNode, opts?: {
32
+ traverseAllPaths: boolean;
33
+ }): IterableIterator<IPackageDependencyGraphNode & {
34
+ importPath: IPackageDependencyGraphNode[];
35
+ }>;
36
+ }
37
+ //# sourceMappingURL=packageDependencyGraphService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"packageDependencyGraphService.d.ts","sourceRoot":"","sources":["../../../src/util/packageDependencyGraphService.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIxD,0DAA0D;AAC1D,MAAM,WAAW,2BAA2B;IAC1C,WAAW,EAAE,WAAW,CAAC;IACzB,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,2BAA2B,CAAC,CAAC;IACvD,KAAK,EAAE;QACL,eAAe,EAAE,MAAM,CAAC;QACxB,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;CACH;AAED,qFAAqF;AACrF,MAAM,WAAW,8BAA8B;IAC7C,iDAAiD;IACjD,oBAAoB,CAAC,eAAe,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,2BAA2B,CAAC;IAE1G,2CAA2C;IAC3C,QAAQ,CACN,IAAI,EAAE,2BAA2B,EACjC,IAAI,CAAC,EAAE;QACL,uEAAuE;QACvE,gBAAgB,CAAC,EAAE,OAAO,CAAC;KAC5B,GACA,gBAAgB,CAAC,2BAA2B,GAAG;QAAE,UAAU,EAAE,2BAA2B,EAAE,CAAA;KAAE,CAAC,CAAC;CAClG;AAED,sEAAsE;AACtE,qBAAa,6BAA8B,YAAW,8BAA8B;IAClF,0EAA0E;IACnE,oBAAoB,CACzB,oBAAoB,EAAE,MAAM,EAC5B,IAAI,EAAE,IAAI,EACV,QAAQ,CAAC,EAAE,MAAM,GAChB,2BAA2B;IAuC9B,4DAA4D;IACpD,QAAQ,CACd,IAAI,EAAE,2BAA2B,EACjC,IAAI;;KAA8B,GACjC,gBAAgB,CAAC,2BAA2B,GAAG;QAAE,UAAU,EAAE,2BAA2B,EAAE,CAAA;KAAE,CAAC;CA8BjG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monorepolint/rules",
3
- "version": "0.5.0-beta.8",
3
+ "version": "0.5.0-beta.9",
4
4
  "author": "Eric L Anderson (https://github.com/ericanderson)",
5
5
  "contributors": [
6
6
  "Mac Lockard (https://github.com/maclockard)"
@@ -28,9 +28,9 @@
28
28
  "runtypes": "^6.7.0",
29
29
  "semver": "^7.6.0",
30
30
  "tslib": "^2.6.2",
31
- "@monorepolint/config": "^0.5.0-beta.8",
32
- "@monorepolint/utils": "^0.5.0-beta.8",
33
- "@monorepolint/core": "^0.5.0-beta.8"
31
+ "@monorepolint/config": "^0.5.0-beta.9",
32
+ "@monorepolint/core": "^0.5.0-beta.9",
33
+ "@monorepolint/utils": "^0.5.0-beta.9"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@jest/globals": "^29.7.0",