@savvy-web/silk 0.1.0 → 0.2.1

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 (24) hide show
  1. package/README.md +82 -0
  2. package/cjs/commitlint/index.cjs +6 -2
  3. package/cjs/{commitlint.d.cts → commitlint/index.d.cts} +7 -5
  4. package/cjs/lint/index.cjs +14 -1
  5. package/cjs/{lint.d.cts → lint/index.d.cts} +7 -2
  6. package/esm/{commitlint.d.ts → commitlint/index.d.ts} +7 -5
  7. package/esm/commitlint/index.js +6 -2
  8. package/esm/{lint.d.ts → lint/index.d.ts} +7 -2
  9. package/esm/lint/index.js +14 -1
  10. package/package.json +14 -15
  11. /package/cjs/{changesets-changelog.d.cts → changesets/changelog/index.d.cts} +0 -0
  12. /package/cjs/{changesets.d.cts → changesets/index.d.cts} +0 -0
  13. /package/cjs/{changesets-markdownlint.d.cts → changesets/markdownlint/index.d.cts} +0 -0
  14. /package/cjs/{changesets-remark.d.cts → changesets/remark/index.d.cts} +0 -0
  15. /package/cjs/{commitlint-formatter.d.cts → commitlint/formatter/index.d.cts} +0 -0
  16. /package/cjs/{commitlint-prompt.d.cts → commitlint/prompt/index.d.cts} +0 -0
  17. /package/cjs/{commitlint-static.d.cts → commitlint/static/index.d.cts} +0 -0
  18. /package/esm/{changesets-changelog.d.ts → changesets/changelog/index.d.ts} +0 -0
  19. /package/esm/{changesets.d.ts → changesets/index.d.ts} +0 -0
  20. /package/esm/{changesets-markdownlint.d.ts → changesets/markdownlint/index.d.ts} +0 -0
  21. /package/esm/{changesets-remark.d.ts → changesets/remark/index.d.ts} +0 -0
  22. /package/esm/{commitlint-formatter.d.ts → commitlint/formatter/index.d.ts} +0 -0
  23. /package/esm/{commitlint-prompt.d.ts → commitlint/prompt/index.d.ts} +0 -0
  24. /package/esm/{commitlint-static.d.ts → commitlint/static/index.d.ts} +0 -0
package/README.md ADDED
@@ -0,0 +1,82 @@
1
+ # @savvy-web/silk
2
+
3
+ [![npm](https://img.shields.io/npm/v/@savvy-web%2Fsilk?label=npm&color=cb3837)](https://www.npmjs.com/package/@savvy-web/silk)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-4caf50.svg)](https://opensource.org/licenses/MIT)
5
+
6
+ The single package you install to get the whole [Silk Suite](https://github.com/savvy-web/systems) dev-tooling system: drop-in config entry points for changesets, commitlint and lint-staged, a Biome preset and — through its peers — the `savvy` CLI. Each subpath re-exports the matching logic from `@savvy-web/silk-effects` in the exact module shape the consuming tool's config loader expects.
7
+
8
+ ## Install
9
+
10
+ ```bash
11
+ npm install --save-dev @savvy-web/silk
12
+ # or
13
+ pnpm add -D @savvy-web/silk
14
+ ```
15
+
16
+ Installing `silk` pulls [`@savvy-web/cli`](https://www.npmjs.com/package/@savvy-web/cli) and [`@savvy-web/mcp`](https://www.npmjs.com/package/@savvy-web/mcp) along with the real tools its configs reference (Biome, husky, commitlint, changesets, lint-staged, markdownlint), so the versions stay in lockstep.
17
+
18
+ ## Quick start
19
+
20
+ After install, seed the config files and wire the git hooks:
21
+
22
+ ```bash
23
+ npx savvy init
24
+ # writes the changeset, commit and lint configs and wires husky to the savvy subcommands
25
+ ```
26
+
27
+ The configs `savvy init` writes reference the `@savvy-web/silk` subpaths shown below. You can also write them by hand.
28
+
29
+ ## Config entry points
30
+
31
+ Point each tool's config at the matching subpath.
32
+
33
+ Commitlint (`commitlint.config.ts`) re-exports the auto-detecting config:
34
+
35
+ ```ts
36
+ export { default } from "@savvy-web/silk/commitlint";
37
+ ```
38
+
39
+ Markdownlint (`.markdownlint-cli2.jsonc`) loads the changeset rule module:
40
+
41
+ ```jsonc
42
+ {
43
+ "customRules": ["@savvy-web/silk/changesets/markdownlint"]
44
+ }
45
+ ```
46
+
47
+ Changesets (`.changeset/config.json`) loads the changelog formatter:
48
+
49
+ ```json
50
+ {
51
+ "changelog": "@savvy-web/silk/changesets/changelog"
52
+ }
53
+ ```
54
+
55
+ Biome (`biome.jsonc`) extends the bundled preset:
56
+
57
+ ```jsonc
58
+ {
59
+ "extends": ["@savvy-web/silk/biome"]
60
+ }
61
+ ```
62
+
63
+ ## Export map
64
+
65
+ | Subpath | What it provides |
66
+ | ------- | ---------------- |
67
+ | `./changesets` | Changeset class and service surface |
68
+ | `./changesets/changelog` | `ChangelogFunctions` default for `.changeset/config.json` |
69
+ | `./changesets/markdownlint` | markdownlint-cli2 rules (default array plus named rules) |
70
+ | `./changesets/remark` | remark transform plugins, presets and lint rules |
71
+ | `./commitlint` | Auto-detecting `CommitlintConfig` plus types |
72
+ | `./commitlint/static` | Static config default with no auto-detection |
73
+ | `./commitlint/prompt` | commitizen adapter |
74
+ | `./commitlint/formatter` | Custom commitlint error formatter |
75
+ | `./lint` | lint-staged handlers, `Preset`, `createConfig` and workspace utils |
76
+ | `./biome` | Static Biome preset asset |
77
+
78
+ The package ships dual-format ESM and CommonJS, because some loaders — markdownlint-cli2's custom-rule loader among them — `require()` these subpaths from a CommonJS context.
79
+
80
+ ## License
81
+
82
+ [MIT](LICENSE)
@@ -77892,12 +77892,16 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
77892
77892
  clearCache
77893
77893
  };
77894
77894
  }));
77895
- const commitlint_CommitlintConfig = commitlint_namespaceObject.CommitlintConfig;
77895
+ const commitlint_CommitlintConfig = {
77896
+ silk (options) {
77897
+ return commitlint_namespaceObject.CommitlintConfig.silk(options);
77898
+ }
77899
+ };
77896
77900
  const commitlint_COMMIT_TYPES = commitlint_namespaceObject.COMMIT_TYPES;
77897
77901
  const commitlint_COMMIT_TYPE_DEFINITIONS = commitlint_namespaceObject.COMMIT_TYPE_DEFINITIONS;
77898
77902
  const commitlint_TDD_SCOPE_PATTERN = commitlint_namespaceObject.TDD_SCOPE_PATTERN;
77899
77903
  const commitlint_TDD_STATES = commitlint_namespaceObject.TDD_STATES;
77900
- const src_commitlint = commitlint_namespaceObject.CommitlintConfig;
77904
+ const src_commitlint = commitlint_CommitlintConfig;
77901
77905
  },
77902
77906
  buffer (module) {
77903
77907
  "use strict";
@@ -15,11 +15,16 @@ export declare const COMMIT_TYPE_DEFINITIONS: readonly Commitlint.CommitTypeDefi
15
15
 
16
16
  export declare const COMMIT_TYPES: readonly ["ai", "build", "chore", "ci", "docs", "feat", "fix", "perf", "refactor", "release", "revert", "style", "tdd", "test"];
17
17
 
18
- export declare const CommitlintConfig: typeof Commitlint.CommitlintConfig;
18
+ declare const CommitlintConfig: {
19
+ silk(options?: Commitlint.ConfigOptions): CommitlintUserConfig;
20
+ };
21
+ export { CommitlintConfig }
22
+ export default CommitlintConfig;
19
23
 
20
24
  export declare type CommitlintPlugin = Commitlint.CommitlintPlugin;
21
25
 
22
- export declare type CommitlintUserConfig = Commitlint.CommitlintUserConfig;
26
+ export declare interface CommitlintUserConfig extends Commitlint.CommitlintUserConfig {
27
+ }
23
28
 
24
29
  export declare type CommitType = Commitlint.CommitType;
25
30
 
@@ -27,9 +32,6 @@ export declare type CommitTypeDefinition = Commitlint.CommitTypeDefinition;
27
32
 
28
33
  export declare type ConfigOptions = Commitlint.ConfigOptions;
29
34
 
30
- declare const _default: typeof Commitlint.CommitlintConfig;
31
- export default _default;
32
-
33
35
  export declare type PromptConfig = Commitlint.PromptConfig;
34
36
 
35
37
  export declare type PromptSettings = Commitlint.PromptSettings;
@@ -77926,7 +77926,20 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
77926
77926
  const lint_TypeScript = lint_namespaceObject.TypeScript;
77927
77927
  const lint_Yaml = lint_namespaceObject.Yaml;
77928
77928
  const lint_createConfig = lint_namespaceObject.createConfig;
77929
- const lint_Preset = lint_namespaceObject.Preset;
77929
+ const lint_Preset = {
77930
+ minimal (extend) {
77931
+ return lint_namespaceObject.Preset.minimal(extend);
77932
+ },
77933
+ standard (extend) {
77934
+ return lint_namespaceObject.Preset.standard(extend);
77935
+ },
77936
+ silk (extend) {
77937
+ return lint_namespaceObject.Preset.silk(extend);
77938
+ },
77939
+ get (name, extend) {
77940
+ return lint_namespaceObject.Preset.get(name, extend);
77941
+ }
77942
+ };
77930
77943
  const lint_Command = lint_namespaceObject.Command;
77931
77944
  const lint_Filter = lint_namespaceObject.Filter;
77932
77945
  const lint_getWorkspaceRoot = lint_namespaceObject.getWorkspaceRoot;
@@ -259,9 +259,14 @@ export declare const POST_CHECKOUT_HOOK_PATH = ".husky/post-checkout";
259
259
 
260
260
  export declare const POST_MERGE_HOOK_PATH = ".husky/post-merge";
261
261
 
262
- export declare const Preset: typeof Lint.Preset;
262
+ export declare const Preset: {
263
+ minimal(extend?: Lint.PresetExtendOptions): LintStagedConfig;
264
+ standard(extend?: Lint.PresetExtendOptions): LintStagedConfig;
265
+ silk(extend?: Lint.PresetExtendOptions): LintStagedConfig;
266
+ get(name: "minimal" | "standard" | "silk", extend?: Lint.PresetExtendOptions): LintStagedConfig;
267
+ };
263
268
 
264
- export declare type Preset = typeof Lint.Preset;
269
+ export declare type Preset = typeof Preset;
265
270
 
266
271
  export declare type PresetExtendOptions = Lint.PresetExtendOptions;
267
272
 
@@ -15,11 +15,16 @@ export declare const COMMIT_TYPE_DEFINITIONS: readonly Commitlint.CommitTypeDefi
15
15
 
16
16
  export declare const COMMIT_TYPES: readonly ["ai", "build", "chore", "ci", "docs", "feat", "fix", "perf", "refactor", "release", "revert", "style", "tdd", "test"];
17
17
 
18
- export declare const CommitlintConfig: typeof Commitlint.CommitlintConfig;
18
+ declare const CommitlintConfig: {
19
+ silk(options?: Commitlint.ConfigOptions): CommitlintUserConfig;
20
+ };
21
+ export { CommitlintConfig }
22
+ export default CommitlintConfig;
19
23
 
20
24
  export declare type CommitlintPlugin = Commitlint.CommitlintPlugin;
21
25
 
22
- export declare type CommitlintUserConfig = Commitlint.CommitlintUserConfig;
26
+ export declare interface CommitlintUserConfig extends Commitlint.CommitlintUserConfig {
27
+ }
23
28
 
24
29
  export declare type CommitType = Commitlint.CommitType;
25
30
 
@@ -27,9 +32,6 @@ export declare type CommitTypeDefinition = Commitlint.CommitTypeDefinition;
27
32
 
28
33
  export declare type ConfigOptions = Commitlint.ConfigOptions;
29
34
 
30
- declare const _default: typeof Commitlint.CommitlintConfig;
31
- export default _default;
32
-
33
35
  export declare type PromptConfig = Commitlint.PromptConfig;
34
36
 
35
37
  export declare type PromptSettings = Commitlint.PromptSettings;
@@ -1,9 +1,13 @@
1
1
  import { commitlint_namespaceObject as dev_commitlint_namespaceObject } from "../792.js";
2
- const CommitlintConfig = dev_commitlint_namespaceObject.CommitlintConfig;
2
+ const CommitlintConfig = {
3
+ silk (options) {
4
+ return dev_commitlint_namespaceObject.CommitlintConfig.silk(options);
5
+ }
6
+ };
3
7
  const COMMIT_TYPES = dev_commitlint_namespaceObject.COMMIT_TYPES;
4
8
  const COMMIT_TYPE_DEFINITIONS = dev_commitlint_namespaceObject.COMMIT_TYPE_DEFINITIONS;
5
9
  const TDD_SCOPE_PATTERN = dev_commitlint_namespaceObject.TDD_SCOPE_PATTERN;
6
10
  const TDD_STATES = dev_commitlint_namespaceObject.TDD_STATES;
7
- const commitlint = dev_commitlint_namespaceObject.CommitlintConfig;
11
+ const commitlint = CommitlintConfig;
8
12
  export default commitlint;
9
13
  export { COMMIT_TYPES, COMMIT_TYPE_DEFINITIONS, CommitlintConfig, TDD_SCOPE_PATTERN, TDD_STATES };
@@ -259,9 +259,14 @@ export declare const POST_CHECKOUT_HOOK_PATH = ".husky/post-checkout";
259
259
 
260
260
  export declare const POST_MERGE_HOOK_PATH = ".husky/post-merge";
261
261
 
262
- export declare const Preset: typeof Lint.Preset;
262
+ export declare const Preset: {
263
+ minimal(extend?: Lint.PresetExtendOptions): LintStagedConfig;
264
+ standard(extend?: Lint.PresetExtendOptions): LintStagedConfig;
265
+ silk(extend?: Lint.PresetExtendOptions): LintStagedConfig;
266
+ get(name: "minimal" | "standard" | "silk", extend?: Lint.PresetExtendOptions): LintStagedConfig;
267
+ };
263
268
 
264
- export declare type Preset = typeof Lint.Preset;
269
+ export declare type Preset = typeof Preset;
265
270
 
266
271
  export declare type PresetExtendOptions = Lint.PresetExtendOptions;
267
272
 
package/esm/lint/index.js CHANGED
@@ -8,7 +8,20 @@ const ShellScripts = dev_lint_namespaceObject.ShellScripts;
8
8
  const TypeScript = dev_lint_namespaceObject.TypeScript;
9
9
  const Yaml = dev_lint_namespaceObject.Yaml;
10
10
  const createConfig = dev_lint_namespaceObject.createConfig;
11
- const Preset = dev_lint_namespaceObject.Preset;
11
+ const Preset = {
12
+ minimal (extend) {
13
+ return dev_lint_namespaceObject.Preset.minimal(extend);
14
+ },
15
+ standard (extend) {
16
+ return dev_lint_namespaceObject.Preset.standard(extend);
17
+ },
18
+ silk (extend) {
19
+ return dev_lint_namespaceObject.Preset.silk(extend);
20
+ },
21
+ get (name, extend) {
22
+ return dev_lint_namespaceObject.Preset.get(name, extend);
23
+ }
24
+ };
12
25
  const Command = dev_lint_namespaceObject.Command;
13
26
  const Filter = dev_lint_namespaceObject.Filter;
14
27
  const getWorkspaceRoot = dev_lint_namespaceObject.getWorkspaceRoot;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@savvy-web/silk",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "private": false,
5
5
  "description": "The single Silk Suite dev-tooling package — changeset, commitlint, lint, and biome conventions",
6
6
  "homepage": "https://github.com/savvy-web/systems/tree/main/packages/silk",
@@ -22,56 +22,52 @@
22
22
  "type": "module",
23
23
  "exports": {
24
24
  "./changesets": {
25
- "types": "./esm/changesets.d.ts",
25
+ "types": "./esm/changesets/index.d.ts",
26
26
  "import": "./esm/changesets/index.js",
27
27
  "require": "./cjs/changesets/index.cjs"
28
28
  },
29
29
  "./changesets/changelog": {
30
- "types": "./esm/changesets/changelog.d.ts",
30
+ "types": "./esm/changesets/changelog/index.d.ts",
31
31
  "import": "./esm/changesets/changelog/index.js",
32
32
  "require": "./cjs/changesets/changelog/index.cjs"
33
33
  },
34
34
  "./changesets/markdownlint": {
35
- "types": "./esm/changesets/markdownlint.d.ts",
35
+ "types": "./esm/changesets/markdownlint/index.d.ts",
36
36
  "import": "./esm/changesets/markdownlint/index.js",
37
37
  "require": "./cjs/changesets/markdownlint/index.cjs"
38
38
  },
39
39
  "./changesets/remark": {
40
- "types": "./esm/changesets/remark.d.ts",
40
+ "types": "./esm/changesets/remark/index.d.ts",
41
41
  "import": "./esm/changesets/remark/index.js",
42
42
  "require": "./cjs/changesets/remark/index.cjs"
43
43
  },
44
44
  "./commitlint": {
45
- "types": "./esm/commitlint.d.ts",
45
+ "types": "./esm/commitlint/index.d.ts",
46
46
  "import": "./esm/commitlint/index.js",
47
47
  "require": "./cjs/commitlint/index.cjs"
48
48
  },
49
49
  "./commitlint/static": {
50
- "types": "./esm/commitlint/static.d.ts",
50
+ "types": "./esm/commitlint/static/index.d.ts",
51
51
  "import": "./esm/commitlint/static/index.js",
52
52
  "require": "./cjs/commitlint/static/index.cjs"
53
53
  },
54
54
  "./commitlint/prompt": {
55
- "types": "./esm/commitlint/prompt.d.ts",
55
+ "types": "./esm/commitlint/prompt/index.d.ts",
56
56
  "import": "./esm/commitlint/prompt/index.js",
57
57
  "require": "./cjs/commitlint/prompt/index.cjs"
58
58
  },
59
59
  "./commitlint/formatter": {
60
- "types": "./esm/commitlint/formatter.d.ts",
60
+ "types": "./esm/commitlint/formatter/index.d.ts",
61
61
  "import": "./esm/commitlint/formatter/index.js",
62
62
  "require": "./cjs/commitlint/formatter/index.cjs"
63
63
  },
64
64
  "./lint": {
65
- "types": "./esm/lint.d.ts",
65
+ "types": "./esm/lint/index.d.ts",
66
66
  "import": "./esm/lint/index.js",
67
67
  "require": "./cjs/lint/index.cjs"
68
68
  },
69
69
  "./biome": "./biome/silk.jsonc"
70
70
  },
71
- "dependencies": {
72
- "@savvy-web/cli": "0.1.0",
73
- "@savvy-web/mcp": "0.1.0"
74
- },
75
71
  "peerDependencies": {
76
72
  "@biomejs/biome": "2.4.16",
77
73
  "@changesets/cli": "^2.31.0",
@@ -85,7 +81,9 @@
85
81
  "markdownlint-cli2": "^0.22.1",
86
82
  "markdownlint-cli2-formatter-codequality": "^0.0.7",
87
83
  "turbo": "^2.9.16",
88
- "typescript": "^6.0.0"
84
+ "typescript": "^6.0.0",
85
+ "@savvy-web/cli": "0.2.1",
86
+ "@savvy-web/mcp": "0.2.1"
89
87
  },
90
88
  "peerDependenciesMeta": {
91
89
  "@biomejs/biome": {
@@ -109,6 +107,7 @@
109
107
  "0~postcss.js",
110
108
  "0~typescript.js",
111
109
  "0~yaml.js",
110
+ "README.md",
112
111
  "biome/silk.jsonc",
113
112
  "cjs",
114
113
  "esm",
File without changes