semver-effect
Advanced tools
+27
-27
@@ -92,3 +92,3 @@ /** | ||
| */ | ||
| export declare const bumpPrerelease: (v: SemVer, id?: string | undefined) => SemVer; | ||
| export declare const bumpPrerelease: (v: SemVer, id?: string) => SemVer; | ||
@@ -587,3 +587,3 @@ /** | ||
| */ | ||
| export declare const max: (versions: readonly SemVer[]) => Option_2.Option<SemVer>; | ||
| export declare const max: (versions: ReadonlyArray<SemVer>) => Option_2.Option<SemVer>; | ||
@@ -611,3 +611,3 @@ /** | ||
| */ | ||
| export declare const min: (versions: readonly SemVer[]) => Option_2.Option<SemVer>; | ||
| export declare const min: (versions: ReadonlyArray<SemVer>) => Option_2.Option<SemVer>; | ||
@@ -667,3 +667,3 @@ /** | ||
| */ | ||
| export declare const parseRange: (input: string) => Effect_2.Effect<Range, InvalidRangeError, never>; | ||
| export declare const parseRange: (input: string) => Effect_2.Effect<Range, InvalidRangeError>; | ||
@@ -694,3 +694,3 @@ /** | ||
| */ | ||
| export declare const parseSingleComparator: (raw: string) => Effect_2.Effect<Comparator, InvalidComparatorError, never>; | ||
| export declare const parseSingleComparator: (raw: string) => Effect_2.Effect<Comparator, InvalidComparatorError>; | ||
@@ -721,3 +721,3 @@ /** | ||
| */ | ||
| export declare const parseValidSemVer: (raw: string) => Effect_2.Effect<SemVer, InvalidVersionError, never>; | ||
| export declare const parseValidSemVer: (raw: string) => Effect_2.Effect<SemVer, InvalidVersionError>; | ||
@@ -816,3 +816,3 @@ /** | ||
| */ | ||
| export declare const rsort: (versions: readonly SemVer[]) => SemVer[]; | ||
| export declare const rsort: (versions: ReadonlyArray<SemVer>) => Array<SemVer>; | ||
@@ -1022,7 +1022,7 @@ /** | ||
| /** Parse a string into a {@link SemVer}. Fails with {@link InvalidVersionError} on invalid input. */ | ||
| readonly parseVersion: (input: string) => Effect_2.Effect<SemVer, InvalidVersionError, never>; | ||
| readonly parseVersion: (input: string) => Effect_2.Effect<SemVer, InvalidVersionError>; | ||
| /** Parse a range expression into a {@link Range}. Fails with {@link InvalidRangeError} on invalid input. */ | ||
| readonly parseRange: (input: string) => Effect_2.Effect<Range, InvalidRangeError, never>; | ||
| readonly parseRange: (input: string) => Effect_2.Effect<Range, InvalidRangeError>; | ||
| /** Parse a single comparator string into a {@link Comparator}. Fails with {@link InvalidComparatorError} on invalid input. */ | ||
| readonly parseComparator: (input: string) => Effect_2.Effect<Comparator, InvalidComparatorError, never>; | ||
| readonly parseComparator: (input: string) => Effect_2.Effect<Comparator, InvalidComparatorError>; | ||
| }>; | ||
@@ -1073,3 +1073,3 @@ | ||
| */ | ||
| export declare const sort: (versions: readonly SemVer[]) => SemVer[]; | ||
| export declare const sort: (versions: ReadonlyArray<SemVer>) => Array<SemVer>; | ||
@@ -1224,17 +1224,17 @@ /** | ||
| /** Replace all cached versions with the given array. */ | ||
| readonly load: (versions: readonly SemVer[]) => Effect_2.Effect<void, never, never>; | ||
| readonly load: (versions: ReadonlyArray<SemVer>) => Effect_2.Effect<void, never>; | ||
| /** Add a single version to the cache. */ | ||
| readonly add: (version: SemVer) => Effect_2.Effect<void, never, never>; | ||
| readonly add: (version: SemVer) => Effect_2.Effect<void, never>; | ||
| /** Remove a single version from the cache. */ | ||
| readonly remove: (version: SemVer) => Effect_2.Effect<void, never, never>; | ||
| readonly remove: (version: SemVer) => Effect_2.Effect<void, never>; | ||
| /** Retrieve all cached versions in sorted order. Fails with {@link EmptyCacheError} if empty. */ | ||
| readonly versions: Effect_2.Effect<readonly SemVer[], EmptyCacheError, never>; | ||
| readonly versions: Effect_2.Effect<ReadonlyArray<SemVer>, EmptyCacheError>; | ||
| /** Retrieve the highest version in the cache. Fails with {@link EmptyCacheError} if empty. */ | ||
| readonly latest: () => Effect_2.Effect<SemVer, EmptyCacheError, never>; | ||
| readonly latest: () => Effect_2.Effect<SemVer, EmptyCacheError>; | ||
| /** Retrieve the lowest version in the cache. Fails with {@link EmptyCacheError} if empty. */ | ||
| readonly oldest: () => Effect_2.Effect<SemVer, EmptyCacheError, never>; | ||
| readonly oldest: () => Effect_2.Effect<SemVer, EmptyCacheError>; | ||
| /** Find the highest version satisfying a {@link Range}. Fails with {@link UnsatisfiedRangeError} if none match. */ | ||
| readonly resolve: (range: Range) => Effect_2.Effect<SemVer, UnsatisfiedRangeError, never>; | ||
| readonly resolve: (range: Range) => Effect_2.Effect<SemVer, UnsatisfiedRangeError>; | ||
| /** Parse a range string and resolve it. Fails with {@link InvalidRangeError} or {@link UnsatisfiedRangeError}. */ | ||
| readonly resolveString: (input: string) => Effect_2.Effect<SemVer, InvalidRangeError | UnsatisfiedRangeError, never>; | ||
| readonly resolveString: (input: string) => Effect_2.Effect<SemVer, InvalidRangeError | UnsatisfiedRangeError>; | ||
| /** | ||
@@ -1245,15 +1245,15 @@ * Return all cached versions satisfying a {@link Range}. | ||
| */ | ||
| readonly filter: (range: Range) => Effect_2.Effect<readonly SemVer[], EmptyCacheError, never>; | ||
| readonly filter: (range: Range) => Effect_2.Effect<ReadonlyArray<SemVer>, EmptyCacheError>; | ||
| /** Group cached versions by major, minor, or patch level. Fails with {@link EmptyCacheError} if empty. */ | ||
| readonly groupBy: (strategy: "major" | "minor" | "patch") => Effect_2.Effect<Map<string, readonly SemVer[]>, EmptyCacheError, never>; | ||
| readonly groupBy: (strategy: "major" | "minor" | "patch") => Effect_2.Effect<Map<string, ReadonlyArray<SemVer>>, EmptyCacheError>; | ||
| /** Return the latest version for each distinct major version. Fails with {@link EmptyCacheError} if empty. */ | ||
| readonly latestByMajor: () => Effect_2.Effect<readonly SemVer[], EmptyCacheError, never>; | ||
| readonly latestByMajor: () => Effect_2.Effect<ReadonlyArray<SemVer>, EmptyCacheError>; | ||
| /** Return the latest version for each distinct major.minor pair. Fails with {@link EmptyCacheError} if empty. */ | ||
| readonly latestByMinor: () => Effect_2.Effect<readonly SemVer[], EmptyCacheError, never>; | ||
| readonly latestByMinor: () => Effect_2.Effect<ReadonlyArray<SemVer>, EmptyCacheError>; | ||
| /** Compute a {@link VersionDiff} between two versions. Fails with {@link VersionNotFoundError} if either is missing. */ | ||
| readonly diff: (a: SemVer, b: SemVer) => Effect_2.Effect<VersionDiff, VersionNotFoundError, never>; | ||
| readonly diff: (a: SemVer, b: SemVer) => Effect_2.Effect<VersionDiff, VersionNotFoundError>; | ||
| /** Get the next higher version after the given one. Fails with {@link VersionNotFoundError} if not in cache. */ | ||
| readonly next: (version: SemVer) => Effect_2.Effect<Option_2.Option<SemVer>, VersionNotFoundError, never>; | ||
| readonly next: (version: SemVer) => Effect_2.Effect<Option_2.Option<SemVer>, VersionNotFoundError>; | ||
| /** Get the next lower version before the given one. Fails with {@link VersionNotFoundError} if not in cache. */ | ||
| readonly prev: (version: SemVer) => Effect_2.Effect<Option_2.Option<SemVer>, VersionNotFoundError, never>; | ||
| readonly prev: (version: SemVer) => Effect_2.Effect<Option_2.Option<SemVer>, VersionNotFoundError>; | ||
| }>; | ||
@@ -1364,3 +1364,3 @@ | ||
| /** Fetch all available versions for the given package name. Fails with {@link VersionFetchError} on failure. */ | ||
| readonly fetch: (packageName: string) => Effect_2.Effect<readonly SemVer[], VersionFetchError, never>; | ||
| readonly fetch: (packageName: string) => Effect_2.Effect<ReadonlyArray<SemVer>, VersionFetchError>; | ||
| }>; | ||
@@ -1367,0 +1367,0 @@ |
+2
-2
| { | ||
| "name": "semver-effect", | ||
| "version": "0.2.0", | ||
| "version": "0.2.1", | ||
| "private": false, | ||
@@ -44,3 +44,3 @@ "description": "Strict SemVer 2.0.0 implementation built on Effect, providing typed parsing, range algebra and version cache services.", | ||
| "peerDependencies": { | ||
| "effect": "^3.19.0" | ||
| "effect": ">=3.21.0" | ||
| }, | ||
@@ -47,0 +47,0 @@ "files": [ |
103002
-0.11%