@savvy-web/silk 1.3.10 → 2.0.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 (36) hide show
  1. package/changesets-changelog.cjs +39308 -96625
  2. package/changesets-changelog.d.cts +137 -36
  3. package/changesets-changelog.d.ts +137 -36
  4. package/changesets-markdownlint.cjs +39305 -96622
  5. package/changesets-markdownlint.d.cts +137 -36
  6. package/changesets-markdownlint.d.ts +137 -36
  7. package/package.json +12 -12
  8. package/packages/silk-effects/dist/dev/pkg/changesets/api/changelog.cjs +2 -2
  9. package/packages/silk-effects/dist/dev/pkg/changesets/api/changelog.js +2 -2
  10. package/packages/silk-effects/dist/dev/pkg/changesets/api/transformer.cjs +24 -30
  11. package/packages/silk-effects/dist/dev/pkg/changesets/api/transformer.js +24 -30
  12. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/formatting.cjs +4 -10
  13. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/formatting.js +4 -10
  14. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/getDependencyReleaseLine.cjs +13 -9
  15. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/getDependencyReleaseLine.js +13 -9
  16. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/getReleaseLine.cjs +8 -8
  17. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/getReleaseLine.js +8 -8
  18. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/index.cjs +1 -1
  19. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/index.js +1 -1
  20. package/packages/silk-effects/dist/dev/pkg/changesets/index.cjs +12 -2
  21. package/packages/silk-effects/dist/dev/pkg/changesets/index.js +9 -3
  22. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/deduplicate-items.cjs +11 -9
  23. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/deduplicate-items.js +11 -9
  24. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/maintenance-note.cjs +61 -0
  25. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/maintenance-note.js +61 -0
  26. package/packages/silk-effects/dist/dev/pkg/changesets/remark/presets.cjs +1 -1
  27. package/packages/silk-effects/dist/dev/pkg/changesets/remark/presets.js +1 -1
  28. package/packages/silk-effects/dist/dev/pkg/changesets/services/maintenance-reason.cjs +68 -0
  29. package/packages/silk-effects/dist/dev/pkg/changesets/services/maintenance-reason.js +66 -0
  30. package/packages/silk-effects/dist/dev/pkg/changesets/services/release-planner.cjs +105 -59
  31. package/packages/silk-effects/dist/dev/pkg/changesets/services/release-planner.js +104 -58
  32. package/packages/silk-effects/dist/dev/pkg/changesets/vendor/github-info.cjs +33 -11
  33. package/packages/silk-effects/dist/dev/pkg/changesets/vendor/github-info.js +33 -11
  34. package/packages/silk-effects/dist/dev/pkg/schemas/VersioningSchemas.cjs +1 -1
  35. package/packages/silk-effects/dist/dev/pkg/schemas/VersioningSchemas.js +1 -1
  36. package/tsconfig/node/dist/tsconfig.tsbuildinfo +1 -1
@@ -1,5 +1,5 @@
1
1
  import { GitHubApiError } from "../errors.js";
2
- import { getInfo } from "../../../../../../../node_modules/.pnpm/@changesets_get-github-info@0.8.0/node_modules/@changesets/get-github-info/dist/changesets-get-github-info.esm.js";
2
+ import { getCommitInfo } from "../../../../../../../node_modules/.pnpm/@changesets_get-github-info@1.0.0-next.3/node_modules/@changesets/get-github-info/dist/index.js";
3
3
  import { Effect } from "effect";
4
4
 
5
5
  //#region ../silk-effects/dist/dev/pkg/changesets/vendor/github-info.js
@@ -9,8 +9,14 @@ import { Effect } from "effect";
9
9
  * @remarks
10
10
  * Bridges the `\@changesets/get-github-info` package (which returns
11
11
  * promises) into the Effect ecosystem. The {@link getGitHubInfo}
12
- * function wraps the upstream `getInfo()` call in `Effect.tryPromise`,
13
- * mapping failures to {@link GitHubApiError}.
12
+ * function wraps the upstream `getCommitInfo()` call in `Effect.tryPromise`,
13
+ * adapting its structured `CommitInfo | undefined` return back to the
14
+ * legacy {@link GitHubCommitInfo} shape and mapping failures (including a
15
+ * `not found` result) to {@link GitHubApiError}.
16
+ *
17
+ * The upstream v1 package added a `.env` fallback: it reads
18
+ * `GITHUB_TOKEN` from `process.env` directly when no token is otherwise
19
+ * configured, so the caller does not need to plumb one through.
14
20
  *
15
21
  * The {@link GitHubCommitInfo} type is the only item from this module
16
22
  * that is part of the public API (re-exported from the package root).
@@ -24,9 +30,13 @@ import { Effect } from "effect";
24
30
  * Fetch GitHub info for a commit, wrapped in Effect.
25
31
  *
26
32
  * @remarks
27
- * Calls the upstream `getInfo()` from `\@changesets/get-github-info`
28
- * within `Effect.tryPromise`. Any thrown error is caught and mapped
29
- * to a {@link GitHubApiError} with the operation set to `"getInfo"`.
33
+ * Calls the upstream `getCommitInfo()` from `\@changesets/get-github-info`
34
+ * within `Effect.tryPromise`, adapting its structured `CommitInfo`
35
+ * return to the legacy {@link GitHubCommitInfo} shape. An `undefined`
36
+ * result (commit or repo not found) is treated as a thrown error so it
37
+ * is mapped to the same {@link GitHubApiError} failure channel. Any
38
+ * thrown error is caught and mapped to a {@link GitHubApiError} with
39
+ * the operation set to `"getCommitInfo"`.
30
40
  *
31
41
  * Requires a `GITHUB_TOKEN` environment variable to be set for
32
42
  * authenticated API access (the upstream library reads it directly).
@@ -39,13 +49,25 @@ import { Effect } from "effect";
39
49
  */
40
50
  function getGitHubInfo(params) {
41
51
  return Effect.tryPromise({
42
- try: () => getInfo({
43
- commit: params.commit,
44
- repo: params.repo
45
- }),
52
+ try: async () => {
53
+ const info = await getCommitInfo({
54
+ commit: params.commit,
55
+ repo: params.repo
56
+ });
57
+ if (info === void 0) throw new Error(`commit ${params.commit} not found in ${params.repo}`);
58
+ return {
59
+ user: info.author?.login ?? null,
60
+ pull: info.pull?.number ?? null,
61
+ links: {
62
+ commit: info.commit.markdownLink,
63
+ pull: info.pull?.markdownLink ?? null,
64
+ user: info.author?.markdownLink ?? null
65
+ }
66
+ };
67
+ },
46
68
  /* v8 ignore next 5 -- error mapping tested via GitHubService test layer */
47
69
  catch: (error) => new GitHubApiError({
48
- operation: "getInfo",
70
+ operation: "getCommitInfo",
49
71
  reason: error instanceof Error ? error.message : String(error)
50
72
  })
51
73
  });
@@ -30,7 +30,7 @@ const SnapshotConfig = effect.Schema.Struct({
30
30
  prereleaseTemplate: effect.Schema.optional(effect.Schema.String)
31
31
  });
32
32
  /**
33
- * Standard changesets configuration matching the `@changesets/config@3.1.1` spec.
33
+ * Standard changesets configuration matching the `@changesets/config@4.0.0-next.6` spec.
34
34
  *
35
35
  * @remarks
36
36
  * Represents the parsed `.changeset/config.json` file. All fields are optional
@@ -30,7 +30,7 @@ const SnapshotConfig = Schema.Struct({
30
30
  prereleaseTemplate: Schema.optional(Schema.String)
31
31
  });
32
32
  /**
33
- * Standard changesets configuration matching the `@changesets/config@3.1.1` spec.
33
+ * Standard changesets configuration matching the `@changesets/config@4.0.0-next.6` spec.
34
34
  *
35
35
  * @remarks
36
36
  * Represents the parsed `.changeset/config.json` file. All fields are optional