runtime-resolver 0.3.0 → 0.3.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.
package/711.js CHANGED
@@ -485,6 +485,14 @@ const SemVerLayer = VersionCacheLive.pipe(Layer.provide(SemVerParserLive));
485
485
  const BaseCacheLayer = BunReleaseCacheLive.pipe(Layer.provide(SemVerLayer));
486
486
  const AutoBunCacheLive = BaseCacheLayer.pipe(Layer.tap((ctx)=>setup.pipe(Effect.provide(ctx))));
487
487
  const denoDefaultInputs = [
488
+ {
489
+ version: "2.7.7",
490
+ date: "2026-03-19T13:52:21Z"
491
+ },
492
+ {
493
+ version: "2.7.6",
494
+ date: "2026-03-18T12:09:26Z"
495
+ },
488
496
  {
489
497
  version: "2.7.5",
490
498
  date: "2026-03-11T12:40:10Z"
@@ -876,14 +884,6 @@ const denoDefaultInputs = [
876
884
  {
877
885
  version: "1.43.1",
878
886
  date: "2024-05-01T21:45:40Z"
879
- },
880
- {
881
- version: "1.43.0",
882
- date: "2024-05-01T08:19:33Z"
883
- },
884
- {
885
- version: "1.42.4",
886
- date: "2024-04-16T01:46:33Z"
887
887
  }
888
888
  ];
889
889
  class DenoRelease extends Data.TaggedClass("DenoRelease") {
@@ -921,6 +921,11 @@ const AutoDenoCacheLive_SemVerLayer = VersionCacheLive.pipe(Layer.provide(SemVer
921
921
  const AutoDenoCacheLive_BaseCacheLayer = DenoReleaseCacheLive.pipe(Layer.provide(AutoDenoCacheLive_SemVerLayer));
922
922
  const AutoDenoCacheLive = AutoDenoCacheLive_BaseCacheLayer.pipe(Layer.tap((ctx)=>AutoDenoCacheLive_setup.pipe(Effect.provide(ctx))));
923
923
  const nodeDefaultInputs = [
924
+ {
925
+ version: "25.8.2",
926
+ npm: "11.11.1",
927
+ date: "2026-03-24"
928
+ },
924
929
  {
925
930
  version: "25.8.1",
926
931
  npm: "11.11.0",
@@ -981,6 +986,11 @@ const nodeDefaultInputs = [
981
986
  npm: "11.6.2",
982
987
  date: "2025-10-15"
983
988
  },
989
+ {
990
+ version: "24.14.1",
991
+ npm: "11.11.0",
992
+ date: "2026-03-24"
993
+ },
984
994
  {
985
995
  version: "24.14.0",
986
996
  npm: "11.9.0",
@@ -1151,6 +1161,11 @@ const nodeDefaultInputs = [
1151
1161
  npm: "10.9.0",
1152
1162
  date: "2024-10-16"
1153
1163
  },
1164
+ {
1165
+ version: "22.22.2",
1166
+ npm: "10.9.7",
1167
+ date: "2026-03-24"
1168
+ },
1154
1169
  {
1155
1170
  version: "22.22.1",
1156
1171
  npm: "10.9.4",
@@ -1366,6 +1381,11 @@ const nodeDefaultInputs = [
1366
1381
  npm: "10.2.0",
1367
1382
  date: "2023-10-17"
1368
1383
  },
1384
+ {
1385
+ version: "20.20.2",
1386
+ npm: "10.8.2",
1387
+ date: "2026-03-24"
1388
+ },
1369
1389
  {
1370
1390
  version: "20.20.1",
1371
1391
  npm: "10.8.2",
@@ -259,7 +259,7 @@ const rootCommand = Command.make("runtime-resolver", {
259
259
  }, resolveHandler);
260
260
  const cli = Command.run(rootCommand, {
261
261
  name: "runtime-resolver",
262
- version: "0.3.0"
262
+ version: "0.3.1"
263
263
  });
264
264
  const main = Effect.suspend(()=>cli(process.argv)).pipe(Effect.provide(NodeContext.layer), Effect.catchAllCause((cause)=>{
265
265
  const defects = Cause.defects(cause);
package/index.d.ts CHANGED
@@ -271,13 +271,7 @@ declare const BunResolver_base: Context.TagClass<BunResolver, "runtime-resolver/
271
271
  *
272
272
  * @see {@link BunResolverOptions}
273
273
  */
274
- readonly resolve: (options?: BunResolverOptions | undefined) => Effect.Effect<{
275
- readonly source: "api" | "cache";
276
- readonly versions: readonly string[];
277
- readonly latest: string;
278
- readonly lts?: string | undefined;
279
- readonly default?: string | undefined;
280
- }, VersionNotFoundError, never>;
274
+ readonly resolve: (options?: BunResolverOptions) => Effect.Effect<ResolvedVersions, BunResolverError>;
281
275
  }>;
282
276
 
283
277
  /**
@@ -419,12 +413,9 @@ declare const BunVersionFetcher_base: Context.TagClass<BunVersionFetcher, "runti
419
413
  * - {@link RateLimitError} — the GitHub API rate limit was exceeded.
420
414
  */
421
415
  readonly fetch: () => Effect.Effect<{
422
- readonly versions: readonly SemVer[];
423
- readonly inputs: readonly {
424
- readonly version: string;
425
- readonly date: string;
426
- }[];
427
- }, AuthenticationError | NetworkError | ParseError | RateLimitError, never>;
416
+ readonly versions: ReadonlyArray<SemVer>;
417
+ readonly inputs: ReadonlyArray<RuntimeReleaseInput>;
418
+ }, AuthenticationError | NetworkError | ParseError | RateLimitError>;
428
419
  }>;
429
420
 
430
421
  /**
@@ -661,13 +652,7 @@ declare const DenoResolver_base: Context.TagClass<DenoResolver, "runtime-resolve
661
652
  *
662
653
  * @see {@link DenoResolverOptions}
663
654
  */
664
- readonly resolve: (options?: DenoResolverOptions | undefined) => Effect.Effect<{
665
- readonly source: "api" | "cache";
666
- readonly versions: readonly string[];
667
- readonly latest: string;
668
- readonly lts?: string | undefined;
669
- readonly default?: string | undefined;
670
- }, VersionNotFoundError, never>;
655
+ readonly resolve: (options?: DenoResolverOptions) => Effect.Effect<ResolvedVersions, DenoResolverError>;
671
656
  }>;
672
657
 
673
658
  /**
@@ -808,12 +793,9 @@ declare const DenoVersionFetcher_base: Context.TagClass<DenoVersionFetcher, "run
808
793
  * - {@link RateLimitError} — the GitHub API rate limit was exceeded.
809
794
  */
810
795
  readonly fetch: () => Effect.Effect<{
811
- readonly versions: readonly SemVer[];
812
- readonly inputs: readonly {
813
- readonly version: string;
814
- readonly date: string;
815
- }[];
816
- }, AuthenticationError | NetworkError | ParseError | RateLimitError, never>;
796
+ readonly versions: ReadonlyArray<SemVer>;
797
+ readonly inputs: ReadonlyArray<RuntimeReleaseInput>;
798
+ }, AuthenticationError | NetworkError | ParseError | RateLimitError>;
817
799
  }>;
818
800
 
819
801
  /**
@@ -969,7 +951,7 @@ export declare const FreshNodeCacheLive: Layer.Layer<NodeReleaseCache, Freshness
969
951
  * @see {@link GitHubTokenAuth}
970
952
  * @public
971
953
  */
972
- export declare const GitHubAppAuth: (config: GitHubAppAuthConfig) => Layer.Layer<OctokitInstance, AuthenticationError, never>;
954
+ export declare const GitHubAppAuth: (config: GitHubAppAuthConfig) => Layer.Layer<OctokitInstance, AuthenticationError>;
973
955
 
974
956
  /**
975
957
  * Configuration required to authenticate as a GitHub App installation.
@@ -1074,16 +1056,7 @@ declare const GitHubClient_base: Context.TagClass<GitHubClient, "runtime-resolve
1074
1056
  * @param repo - Repository name (e.g. `"bun"`).
1075
1057
  * @param options - Optional pagination controls.
1076
1058
  */
1077
- readonly listTags: (owner: string, repo: string, options?: ListOptions | undefined) => Effect.Effect<readonly {
1078
- readonly name: string;
1079
- readonly zipball_url: string;
1080
- readonly tarball_url: string;
1081
- readonly commit: {
1082
- readonly sha: string;
1083
- readonly url: string;
1084
- };
1085
- readonly node_id: string;
1086
- }[], AuthenticationError | NetworkError | ParseError | RateLimitError, never>;
1059
+ readonly listTags: (owner: string, repo: string, options?: ListOptions) => Effect.Effect<ReadonlyArray<GitHubTag>, AuthenticationError | NetworkError | RateLimitError | ParseError>;
1087
1060
  /**
1088
1061
  * Lists all GitHub Releases for the given repository, automatically
1089
1062
  * paginating through results according to `options`.
@@ -1098,13 +1071,7 @@ declare const GitHubClient_base: Context.TagClass<GitHubClient, "runtime-resolve
1098
1071
  * @param repo - Repository name (e.g. `"deno"`).
1099
1072
  * @param options - Optional pagination controls.
1100
1073
  */
1101
- readonly listReleases: (owner: string, repo: string, options?: ListOptions | undefined) => Effect.Effect<readonly {
1102
- readonly tag_name: string;
1103
- readonly name: string | null;
1104
- readonly draft: boolean;
1105
- readonly prerelease: boolean;
1106
- readonly published_at: string | null;
1107
- }[], AuthenticationError | NetworkError | ParseError | RateLimitError, never>;
1074
+ readonly listReleases: (owner: string, repo: string, options?: ListOptions) => Effect.Effect<ReadonlyArray<GitHubRelease>, AuthenticationError | NetworkError | RateLimitError | ParseError>;
1108
1075
  /**
1109
1076
  * Fetches arbitrary JSON from `url` and decodes it with the provided
1110
1077
  * schema, returning the typed result.
@@ -1122,8 +1089,8 @@ declare const GitHubClient_base: Context.TagClass<GitHubClient, "runtime-resolve
1122
1089
  * Effect Schema's `decodeUnknown`.
1123
1090
  */
1124
1091
  readonly getJson: <A>(url: string, schema: {
1125
- readonly decode: (input: unknown) => Effect.Effect<A, ParseError, never>;
1126
- }) => Effect.Effect<A, NetworkError | ParseError, never>;
1092
+ readonly decode: (input: unknown) => Effect.Effect<A, ParseError>;
1093
+ }) => Effect.Effect<A, NetworkError | ParseError>;
1127
1094
  }>;
1128
1095
 
1129
1096
  /**
@@ -1246,7 +1213,7 @@ export declare const GitHubTokenAuth: Layer.Layer<OctokitInstance>;
1246
1213
  * @see {@link GitHubAppAuth}
1247
1214
  * @public
1248
1215
  */
1249
- export declare const GitHubTokenAuthFromToken: (token: string) => Layer.Layer<OctokitInstance, never, never>;
1216
+ export declare const GitHubTokenAuthFromToken: (token: string) => Layer.Layer<OctokitInstance>;
1250
1217
 
1251
1218
  /**
1252
1219
  * Controls the granularity at which matching versions are grouped when a
@@ -1525,7 +1492,7 @@ declare const NodeReleaseCache_base: Context.TagClass<NodeReleaseCache, "runtime
1525
1492
  *
1526
1493
  * @see {@link NodeScheduleData}
1527
1494
  */
1528
- readonly updateSchedule: (data: NodeScheduleData) => Effect.Effect<void, never, never>;
1495
+ readonly updateSchedule: (data: NodeScheduleData) => Effect.Effect<void>;
1529
1496
  /**
1530
1497
  * Populates the cache from raw {@link NodeReleaseInput} records (as
1531
1498
  * returned by the Node.js release index JSON) rather than from already-
@@ -1538,11 +1505,7 @@ declare const NodeReleaseCache_base: Context.TagClass<NodeReleaseCache, "runtime
1538
1505
  *
1539
1506
  * @see {@link NodeReleaseInput}
1540
1507
  */
1541
- readonly loadFromInputs: (inputs: readonly {
1542
- readonly version: string;
1543
- readonly npm: string;
1544
- readonly date: string;
1545
- }[]) => Effect.Effect<void, never, never>;
1508
+ readonly loadFromInputs: (inputs: ReadonlyArray<NodeReleaseInput>) => Effect.Effect<void>;
1546
1509
  /**
1547
1510
  * Returns all cached releases whose lifecycle phase is `"active-lts"` or
1548
1511
  * `"maintenance-lts"` as of the given point in time.
@@ -1553,7 +1516,7 @@ declare const NodeReleaseCache_base: Context.TagClass<NodeReleaseCache, "runtime
1553
1516
  *
1554
1517
  * @see {@link NodeRelease}
1555
1518
  */
1556
- readonly ltsReleases: (now?: DateTime.DateTime | undefined) => Effect.Effect<readonly NodeRelease[], never, never>;
1519
+ readonly ltsReleases: (now?: DateTime.DateTime) => Effect.Effect<ReadonlyArray<NodeRelease>>;
1557
1520
  /**
1558
1521
  * Returns all cached releases whose lifecycle phase is `"current"` as of
1559
1522
  * the given point in time.
@@ -1564,7 +1527,7 @@ declare const NodeReleaseCache_base: Context.TagClass<NodeReleaseCache, "runtime
1564
1527
  *
1565
1528
  * @see {@link NodeRelease}
1566
1529
  */
1567
- readonly currentReleases: (now?: DateTime.DateTime | undefined) => Effect.Effect<readonly NodeRelease[], never, never>;
1530
+ readonly currentReleases: (now?: DateTime.DateTime) => Effect.Effect<ReadonlyArray<NodeRelease>>;
1568
1531
  }>;
1569
1532
 
1570
1533
  /**
@@ -1673,13 +1636,7 @@ declare const NodeResolver_base: Context.TagClass<NodeResolver, "runtime-resolve
1673
1636
  *
1674
1637
  * @see {@link NodeResolverOptions}
1675
1638
  */
1676
- readonly resolve: (options?: NodeResolverOptions | undefined) => Effect.Effect<{
1677
- readonly source: "api" | "cache";
1678
- readonly versions: readonly string[];
1679
- readonly latest: string;
1680
- readonly lts?: string | undefined;
1681
- readonly default?: string | undefined;
1682
- }, VersionNotFoundError, never>;
1639
+ readonly resolve: (options?: NodeResolverOptions) => Effect.Effect<ResolvedVersions, NodeResolverError>;
1683
1640
  }>;
1684
1641
 
1685
1642
  /**
@@ -1971,7 +1928,7 @@ declare const NodeScheduleFetcher_base: Context.TagClass<NodeScheduleFetcher, "r
1971
1928
  * - {@link NetworkError} — the upstream request could not be completed.
1972
1929
  * - {@link ParseError} — the response payload could not be decoded.
1973
1930
  */
1974
- readonly fetch: () => Effect.Effect<NodeScheduleData, NetworkError | ParseError, never>;
1931
+ readonly fetch: () => Effect.Effect<NodeScheduleData, NetworkError | ParseError>;
1975
1932
  }>;
1976
1933
 
1977
1934
  /**
@@ -2040,13 +1997,9 @@ declare const NodeVersionFetcher_base: Context.TagClass<NodeVersionFetcher, "run
2040
1997
  * - {@link ParseError} — the response payload could not be decoded.
2041
1998
  */
2042
1999
  readonly fetch: () => Effect.Effect<{
2043
- readonly versions: readonly SemVer[];
2044
- readonly inputs: readonly {
2045
- readonly version: string;
2046
- readonly npm: string;
2047
- readonly date: string;
2048
- }[];
2049
- }, NetworkError | ParseError, never>;
2000
+ readonly versions: ReadonlyArray<SemVer>;
2001
+ readonly inputs: ReadonlyArray<NodeReleaseInput>;
2002
+ }, NetworkError | ParseError>;
2050
2003
  }>;
2051
2004
 
2052
2005
  /**
@@ -2124,7 +2077,7 @@ declare const OctokitInstance_base: Context.TagClass<OctokitInstance, "runtime-r
2124
2077
  per_page?: number;
2125
2078
  page?: number;
2126
2079
  }) => Promise<{
2127
- data: unknown[];
2080
+ data: Array<unknown>;
2128
2081
  }>;
2129
2082
  /**
2130
2083
  * Lists GitHub Releases for a repository, corresponding to
@@ -2138,7 +2091,7 @@ declare const OctokitInstance_base: Context.TagClass<OctokitInstance, "runtime-r
2138
2091
  per_page?: number;
2139
2092
  page?: number;
2140
2093
  }) => Promise<{
2141
- data: unknown[];
2094
+ data: Array<unknown>;
2142
2095
  }>;
2143
2096
  };
2144
2097
  };
@@ -2320,13 +2273,7 @@ declare const RateLimitError_base: new <A extends Record<string, any> = {}>(args
2320
2273
  *
2321
2274
  * @public
2322
2275
  */
2323
- export declare const resolveBun: (options?: BunResolverOptions | undefined) => Promise<{
2324
- readonly source: "api" | "cache";
2325
- readonly versions: readonly string[];
2326
- readonly latest: string;
2327
- readonly lts?: string | undefined;
2328
- readonly default?: string | undefined;
2329
- }>;
2276
+ export declare const resolveBun: (options?: BunResolverOptions) => Promise<ResolvedVersions>;
2330
2277
 
2331
2278
  /**
2332
2279
  * Resolve Deno versions matching the given options.
@@ -2355,13 +2302,7 @@ export declare const resolveBun: (options?: BunResolverOptions | undefined) => P
2355
2302
  *
2356
2303
  * @public
2357
2304
  */
2358
- export declare const resolveDeno: (options?: DenoResolverOptions | undefined) => Promise<{
2359
- readonly source: "api" | "cache";
2360
- readonly versions: readonly string[];
2361
- readonly latest: string;
2362
- readonly lts?: string | undefined;
2363
- readonly default?: string | undefined;
2364
- }>;
2305
+ export declare const resolveDeno: (options?: DenoResolverOptions) => Promise<ResolvedVersions>;
2365
2306
 
2366
2307
  /**
2367
2308
  * The primary return type produced by every runtime resolver.
@@ -2443,13 +2384,7 @@ export declare type ResolvedVersions = typeof ResolvedVersions.Type;
2443
2384
  *
2444
2385
  * @public
2445
2386
  */
2446
- export declare const resolveNode: (options?: NodeResolverOptions | undefined) => Promise<{
2447
- readonly source: "api" | "cache";
2448
- readonly versions: readonly string[];
2449
- readonly latest: string;
2450
- readonly lts?: string | undefined;
2451
- readonly default?: string | undefined;
2452
- }>;
2387
+ export declare const resolveNode: (options?: NodeResolverOptions) => Promise<ResolvedVersions>;
2453
2388
 
2454
2389
  /**
2455
2390
  * Discriminates which JavaScript runtime a resolver targets.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "runtime-resolver",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "private": false,
5
5
  "description": "Resolve semver-compatible versions of Node.js, Bun, and Deno runtimes with Effect-based architecture and offline fallback.",
6
6
  "keywords": [
@@ -42,11 +42,11 @@
42
42
  "runtime-resolver": "./bin/runtime-resolver.js"
43
43
  },
44
44
  "dependencies": {
45
- "@effect/cli": "^0.74.0",
46
- "@effect/platform": "^0.95.0",
47
- "@effect/platform-node": "^0.105.0",
45
+ "@effect/cli": "^0.75.0",
46
+ "@effect/platform": "^0.96.0",
47
+ "@effect/platform-node": "^0.106.0",
48
48
  "@octokit/auth-app": "^8.2.0",
49
- "effect": "^3.20.0",
49
+ "effect": "^3.21.0",
50
50
  "octokit": "^5.0.5",
51
51
  "semver-effect": "^0.2.0"
52
52
  },