node-semvers 1.5.5 → 1.5.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-semvers",
3
- "version": "1.5.5",
3
+ "version": "1.5.6",
4
4
  "description": "Utilities for managing versions of node including looking up codenames",
5
5
  "keywords": [
6
6
  "node",
@@ -26,7 +26,7 @@
26
26
  "./package.json": "./package.json"
27
27
  },
28
28
  "main": "dist/cjs/index.js",
29
- "types": "dist/cjs/index.d.cts",
29
+ "types": "dist/cjs/index.d.ts",
30
30
  "bin": {
31
31
  "nsv": "bin/cli.js"
32
32
  },
@@ -1,10 +0,0 @@
1
- import type { LoadError, LoadOptions, ResolveOptions, Schedule, ScheduleRaw, Version, VersionRaw } from './types.js';
2
- export type LoadCallback = (error?: LoadError, semvers?: NodeVersions) => void;
3
- export default class NodeVersions {
4
- versions: Version[];
5
- schedules: Schedule[];
6
- constructor(versions: VersionRaw[], schedule: ScheduleRaw[]);
7
- static load(options?: LoadOptions | LoadCallback, callback?: LoadCallback): undefined | Promise<NodeVersions>;
8
- static loadSync(options?: LoadOptions): NodeVersions | null;
9
- resolve(expression: string | number | Date, options?: ResolveOptions): string | string[] | Version | Version[] | null;
10
- }
@@ -1,2 +0,0 @@
1
- declare const _default: (argv: string[]) => undefined;
2
- export default _default;
@@ -1,3 +0,0 @@
1
- export declare const CACHE_PATH: string;
2
- export declare const DISTS_URL: string;
3
- export declare const SCHEDULES_URL: string;
@@ -1,2 +0,0 @@
1
- export { default, type LoadCallback } from './NodeVersions.js';
2
- export type * from './types.js';
@@ -1 +0,0 @@
1
- export default function isNaN(value: unknown): boolean;
@@ -1,3 +0,0 @@
1
- import type { Version } from '../types.js';
2
- export declare function major(version: Version): string;
3
- export declare function minor(version: Version): string;
@@ -1,3 +0,0 @@
1
- import type { Version } from '../types.js';
2
- export declare function even(version: Version): boolean;
3
- export declare function odd(version: Version): boolean;
@@ -1 +0,0 @@
1
- export default function match(test: object, query: object): boolean;
@@ -1,2 +0,0 @@
1
- import type { Schedule, ScheduleRaw } from '../types.js';
2
- export default function normalizeSchedule(name: string, raw: ScheduleRaw): Schedule;
@@ -1,2 +0,0 @@
1
- import type { Schedule, Version, VersionRaw } from '../types.js';
2
- export default function normalizeVersion(raw: VersionRaw, schedules: Schedule[]): Version;
@@ -1,2 +0,0 @@
1
- import type { ParsedExpression } from '../types.js';
2
- export default function parseExpression(expression: string, now: Date): ParsedExpression;
@@ -1,3 +0,0 @@
1
- import type { Schedule } from '../types.js';
2
- export type Function = (item: Schedule) => boolean;
3
- export default function isLTSFn(now: Date): Function;
@@ -1,3 +0,0 @@
1
- import type { Schedule } from '../types.js';
2
- export type Function = (item: Schedule) => boolean;
3
- export default function isLatestFn(now: Date): Function;
@@ -1,3 +0,0 @@
1
- import type { Schedule } from '../types.js';
2
- export type Filter = (item: Schedule) => boolean;
3
- export default function schedulesLatest(schedules: Schedule[], filter: Filter): Schedule;
@@ -1,69 +0,0 @@
1
- export interface LoadOptions {
2
- cachePath?: string;
3
- now?: Date;
4
- }
5
- export interface LoadError extends Error {
6
- code?: number;
7
- }
8
- export interface ResolveOptions {
9
- now?: Date;
10
- range?: string;
11
- path?: string;
12
- }
13
- export interface ScheduleRaw {
14
- version: string;
15
- name: string;
16
- semver: string;
17
- date: string;
18
- start: string;
19
- end: string;
20
- codename?: string;
21
- lts: string;
22
- maintenance?: string;
23
- }
24
- export interface Schedule {
25
- name: string;
26
- semver: string;
27
- raw: ScheduleRaw;
28
- start: Date;
29
- end: Date;
30
- codename?: string;
31
- lts?: Date;
32
- maintenance?: Date;
33
- }
34
- export interface VersionRaw {
35
- version: string;
36
- name: string;
37
- semver: string;
38
- major: number;
39
- minor: number;
40
- patch: number;
41
- lts: string;
42
- date: Date;
43
- raw: ScheduleRaw;
44
- codename: string;
45
- }
46
- export interface Version {
47
- version: string;
48
- name: string;
49
- semver: string;
50
- major: number;
51
- minor: number;
52
- patch: number;
53
- lts: string;
54
- date: Date;
55
- raw: VersionRaw;
56
- codename: string;
57
- }
58
- export interface ParsedVersion {
59
- major: number;
60
- minor?: number;
61
- patch?: number;
62
- }
63
- export interface ParsedCodename {
64
- codename: string;
65
- }
66
- export interface ParsedName {
67
- name: string;
68
- }
69
- export type ParsedExpression = ParsedVersion | ParsedCodename | ParsedName;