@effected/github 0.14.0 → 0.15.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.
@@ -1,14 +1,4 @@
1
1
  //#region src/internal/headers.ts
2
- /**
3
- * Reading GitHub's response headers.
4
- *
5
- * @remarks
6
- * octokit hands headers back as a plain object whose values may be `string`,
7
- * `number` or absent depending on the fetch implementation, so every read here
8
- * is defensive about both. Header names are already lowercased by octokit.
9
- *
10
- * @internal
11
- */
12
2
  /** A header's value as a string, when it is present and non-empty. */
13
3
  const headerString = (headers, name) => {
14
4
  const value = headers?.[name];
@@ -21,11 +21,9 @@ const SILENT_LOG = {
21
21
  * distinction an app JWT and an installation token need, so the App path
22
22
  * requires no separate auth strategy.
23
23
  *
24
- * `log` is silenced. The package this replaces installed
25
- * `plugin-request-log` and then rerouted every line of it into an Actions
26
- * `::debug::` workflow command, which is how GitHub Actions knowledge ended up
27
- * inside a GitHub API client. Here retries log through `Effect.logDebug`, and an
28
- * application maps Effect's logs to whatever its runtime wants.
24
+ * `log` is silenced. Retries log through `Effect.logDebug`, and an application
25
+ * maps Effect's logs to whatever its runtime wants, so no GitHub Actions
26
+ * knowledge lives in this client.
29
27
  */
30
28
  const makeOctokit = (options) => new Octokit({
31
29
  ...options.token !== void 0 ? { auth: Redacted.value(options.token) } : {},
@@ -38,12 +36,8 @@ const makeOctokit = (options) => new Octokit({
38
36
  * Build a transport over a freshly constructed octokit instance.
39
37
  *
40
38
  * @remarks
41
- * The rate-limit cell lives here, in the closure of the layer that writes it.
42
- * The package this replaces made it an optional shared `Ref` **service** that
43
- * the writer and the reader both resolved through `Effect.serviceOption`, so an
44
- * application that forgot to provide it got two private cells, a limiter that
45
- * never saw the client's headers, and no error, warning or type signal saying
46
- * so.
39
+ * The rate-limit cell lives here, in the closure of the layer that writes it,
40
+ * so the writer and the reader can never see different cells.
47
41
  */
48
42
  const makeTransport = (options) => Effect.gen(function* () {
49
43
  const octokit = makeOctokit(options);
@@ -8,10 +8,7 @@ import { Effect, Option, Stream } from "effect";
8
8
  * **This is the only pagination implementation in the package**, and it is why
9
9
  * the fixture double cannot drift from the live client: both build a
10
10
  * `PageSource` and hand it here, so `maxPages` and item flattening have exactly
11
- * one behavior. The package this replaces had a live loop that honored
12
- * `maxPages` and a test double whose equivalent parameters were named
13
- * `_options` and ignored — which made every truncation path structurally
14
- * untestable.
11
+ * one behavior.
15
12
  *
16
13
  * `maxPages` bounds **requests, not items**: the walk stops issuing them rather
17
14
  * than fetching everything and slicing.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effected/github",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "private": false,
5
5
  "description": "Typed GitHub REST and GraphQL services over the octokit core request surface, with app auth and resource helpers.",
6
6
  "keywords": [
@@ -38,8 +38,8 @@
38
38
  "./package.json": "./package.json"
39
39
  },
40
40
  "dependencies": {
41
- "@effected/github-references": "^0.6.0",
42
- "@effected/semver": "^0.10.0",
41
+ "@effected/github-references": "^0.7.0",
42
+ "@effected/semver": "^0.11.0",
43
43
  "@octokit/core": "^7.0.6",
44
44
  "@octokit/plugin-paginate-rest": "^15.0.0",
45
45
  "@octokit/types": "^18.0.0",
@@ -48,7 +48,7 @@
48
48
  "universal-github-app-jwt": "^2.2.2"
49
49
  },
50
50
  "peerDependencies": {
51
- "effect": "4.0.0-rc.118"
51
+ "effect": "^4.0.0"
52
52
  },
53
53
  "engines": {
54
54
  "node": ">=24.11.0"