commitlint-config-spellbookx 0.11.1 → 0.12.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.
Files changed (60) hide show
  1. package/.turbo/turbo-build.log +19 -7
  2. package/.turbo/turbo-test.log +59 -0
  3. package/README.md +211 -30
  4. package/__tests__/index.test.ts +47 -0
  5. package/__tests__/lint.test.ts +65 -0
  6. package/__tests__/scopes.test.ts +55 -0
  7. package/__tests__/workspaces.test.ts +76 -0
  8. package/dist/constants/commit-types.d.ts +13 -0
  9. package/dist/constants/commit-types.d.ts.map +1 -0
  10. package/dist/constants/commit-types.js +24 -0
  11. package/dist/get-scopes-D9bIfVqN.js +5698 -0
  12. package/dist/get-workspaces-raw-path-Cg196xaD.js +2043 -0
  13. package/dist/helpers.d.ts +8 -17
  14. package/dist/helpers.d.ts.map +1 -1
  15. package/dist/helpers.js +21 -0
  16. package/dist/index.d.ts +14 -1
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +15 -7878
  19. package/dist/lib/find-git-root.d.ts +16 -0
  20. package/dist/lib/find-git-root.d.ts.map +1 -0
  21. package/dist/lib/find-git-root.js +30 -0
  22. package/dist/lib/get-scope-description.d.ts +21 -0
  23. package/dist/lib/get-scope-description.d.ts.map +1 -0
  24. package/dist/lib/get-scope-description.js +35 -0
  25. package/dist/lib/get-scopes.d.ts +16 -0
  26. package/dist/lib/get-scopes.d.ts.map +1 -0
  27. package/dist/lib/get-scopes.js +4 -0
  28. package/dist/lib/get-workspaces-raw-path.d.ts +19 -0
  29. package/dist/lib/get-workspaces-raw-path.d.ts.map +1 -0
  30. package/dist/lib/get-workspaces-raw-path.js +3 -0
  31. package/dist/lib/index.d.ts +10 -0
  32. package/dist/lib/index.d.ts.map +1 -0
  33. package/dist/lib/index.js +7 -0
  34. package/dist/lib/package-json.d.ts +14 -0
  35. package/dist/lib/package-json.d.ts.map +1 -0
  36. package/dist/lib/package-json.js +16 -0
  37. package/dist/prompt.d.ts +10 -0
  38. package/dist/prompt.d.ts.map +1 -0
  39. package/dist/prompt.js +99 -0
  40. package/dist/rules.d.ts +10 -0
  41. package/dist/rules.d.ts.map +1 -0
  42. package/dist/rules.js +45 -0
  43. package/dist/scopes.d.ts +23 -0
  44. package/dist/scopes.d.ts.map +1 -0
  45. package/dist/scopes.js +38 -0
  46. package/package.json +43 -9
  47. package/rolldown.config.ts +13 -1
  48. package/src/constants/commit-types.ts +26 -0
  49. package/src/index.ts +26 -153
  50. package/src/lib/find-git-root.ts +31 -0
  51. package/src/lib/get-scope-description.ts +38 -0
  52. package/src/lib/get-scopes.ts +89 -0
  53. package/src/lib/get-workspaces-raw-path.ts +53 -0
  54. package/src/lib/index.ts +10 -0
  55. package/src/lib/package-json.ts +22 -0
  56. package/src/prompt.ts +99 -0
  57. package/src/rules.ts +22 -0
  58. package/src/scopes.ts +40 -0
  59. package/tsconfig.json +1 -0
  60. package/src/helpers.ts +0 -123
package/dist/helpers.d.ts CHANGED
@@ -1,23 +1,14 @@
1
+ /**
2
+ * @file helpers.ts
3
+ * Package metadata and re-exports of atomic utility functions for commitlint-config-spellbookx.
4
+ */
5
+ export * from './lib/index.js';
6
+ /**
7
+ * Parsed `package.json` metadata for `commitlint-config-spellbookx`.
8
+ */
1
9
  export declare const packageJson: {
2
10
  name: string;
3
11
  version: string;
4
12
  peerDependencies: Record<string, string>;
5
13
  };
6
- /**
7
- * Reads workspace paths from configuration files (JSON or YAML).
8
- * @param configPath The path to the config file (e.g., package.json, pnpm-workspace.yaml).
9
- * @param parser The parser type to use for reading the file.
10
- * @param [property] The property name in the config containing workspace paths.
11
- * @returns Array of raw workspace path patterns.
12
- * @example
13
- * getWorkspacesRawPath('package.json', 'json', 'workspaces');
14
- */
15
- export declare function getWorkspacesRawPath(configPath: string, parser: 'json' | 'yaml', property?: string): string[];
16
- /**
17
- * Retrieves a list of scopes (workspace paths) from various configuration files.
18
- * @returns An array of absolute workspace paths.
19
- * @example
20
- * const scopes = getScopes();
21
- */
22
- export declare function getScopes(): string[];
23
14
  //# sourceMappingURL=helpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,WAAW,EAAoD;IAC1E,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC1C,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,QAAQ,GAAE,MAAqB,GAC9B,MAAM,EAAE,CA0BV;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,IAAI,MAAM,EAAE,CA6DpC"}
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,cAAc,gBAAgB,CAAC;AAI/B;;GAEG;AACH,eAAO,MAAM,WAAW,EAAoD;IAC1E,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC1C,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { t as getScopes } from "./get-scopes-D9bIfVqN.js";
2
+ import { getScopeDescription } from "./lib/get-scope-description.js";
3
+ import { findGitRoot } from "./lib/find-git-root.js";
4
+ import { t as getWorkspacesRawPath } from "./get-workspaces-raw-path-Cg196xaD.js";
5
+ import "./lib/index.js";
6
+ import { readFileSync } from "node:fs";
7
+ import { URL, fileURLToPath } from "node:url";
8
+
9
+ //#region src/helpers.ts
10
+ /**
11
+ * @file helpers.ts
12
+ * Package metadata and re-exports of atomic utility functions for commitlint-config-spellbookx.
13
+ */
14
+ const packagePath = fileURLToPath(new URL("../package.json", import.meta.url));
15
+ /**
16
+ * Parsed `package.json` metadata for `commitlint-config-spellbookx`.
17
+ */
18
+ const packageJson = JSON.parse(readFileSync(packagePath, "utf8"));
19
+
20
+ //#endregion
21
+ export { findGitRoot, getScopeDescription, getScopes, getWorkspacesRawPath, packageJson };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,17 @@
1
+ /**
2
+ * @file index.ts
3
+ * Main entry point for commitlint-config-spellbookx.
4
+ * Exports conventional commit configuration, rules, prompt settings, and scope definitions.
5
+ */
1
6
  import type { UserConfig } from '@commitlint/types';
2
- declare const config: UserConfig;
7
+ export { COMMIT_TYPES, type CommitType } from './constants/commit-types.js';
8
+ export * from './lib/index.js';
9
+ export { prompt } from './prompt.js';
10
+ export { rules } from './rules.js';
11
+ export { SCOPE_RELEASE, SCOPE_WORKSPACE, scopesArray, scopesEnum, } from './scopes.js';
12
+ /**
13
+ * Shareable Commitlint configuration preset enforcing conventional commits.
14
+ */
15
+ export declare const config: UserConfig;
3
16
  export default config;
4
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAyCpD,QAAA,MAAM,MAAM,EAAE,UAoHb,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAKpD,OAAO,EAAE,YAAY,EAAE,KAAK,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC5E,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EACL,aAAa,EACb,eAAe,EACf,WAAW,EACX,UAAU,GACX,MAAM,aAAa,CAAC;AAErB;;GAEG;AACH,eAAO,MAAM,MAAM,EAAE,UAKpB,CAAC;AAEF,eAAe,MAAM,CAAC"}