package-json
Advanced tools
Comparing version 8.1.1 to 9.0.0
import {Agent as HttpAgent} from 'node:http'; | ||
import {Agent as HttpsAgent} from 'node:https'; | ||
import {Agents} from 'got'; | ||
import {type Agents} from 'got'; | ||
@@ -71,8 +71,8 @@ /** | ||
interface DistTags { | ||
type DistTags = { | ||
readonly [tagName: string]: string; | ||
readonly latest: string; | ||
} | ||
}; | ||
interface AbbreviatedVersion { | ||
type AbbreviatedVersion = { | ||
readonly [key: string]: unknown; | ||
@@ -96,11 +96,11 @@ readonly name: string; | ||
readonly _hasShrinkwrap?: boolean; | ||
} | ||
}; | ||
interface Person { | ||
type Person = { | ||
readonly name?: string; | ||
readonly email?: string; | ||
readonly url?: string; | ||
} | ||
}; | ||
interface HoistedData { | ||
type HoistedData = { | ||
readonly author?: Person; | ||
@@ -119,5 +119,5 @@ readonly bugs?: | ||
readonly repository?: {readonly type: string; readonly url: string}; | ||
} | ||
}; | ||
interface FullVersion extends AbbreviatedVersion, HoistedData { | ||
type FullVersion = { | ||
readonly [key: string]: unknown; | ||
@@ -135,5 +135,5 @@ readonly _id: string; | ||
readonly typings?: string; | ||
} | ||
} & AbbreviatedVersion & HoistedData; | ||
export interface FullMetadata extends AbbreviatedMetadata, HoistedData { | ||
export type FullMetadata = { | ||
readonly [key: string]: unknown; | ||
@@ -149,5 +149,5 @@ readonly _id: string; | ||
readonly versions: Readonly<Record<string, FullVersion>>; | ||
} | ||
} & AbbreviatedMetadata & HoistedData; | ||
export interface AbbreviatedMetadata { | ||
export type AbbreviatedMetadata = { | ||
readonly [key: string]: unknown; | ||
@@ -158,3 +158,3 @@ readonly 'dist-tags': DistTags; | ||
readonly versions: Readonly<Record<string, AbbreviatedVersion>>; | ||
} | ||
}; | ||
@@ -161,0 +161,0 @@ /** |
@@ -86,3 +86,3 @@ import {Agent as HttpAgent} from 'node:http'; | ||
if (data['dist-tags'][version]) { | ||
const time = data.time; | ||
const {time} = data; | ||
data = data.versions[data['dist-tags'][version]]; | ||
@@ -100,3 +100,3 @@ data.time = time; | ||
const time = data.time; | ||
const {time} = data; | ||
data = data.versions[version]; | ||
@@ -103,0 +103,0 @@ data.time = time; |
{ | ||
"name": "package-json", | ||
"version": "8.1.1", | ||
"version": "9.0.0", | ||
"description": "Get metadata of a package from the npm registry", | ||
@@ -14,10 +14,13 @@ "license": "MIT", | ||
"type": "module", | ||
"exports": "./index.js", | ||
"types": "./index.d.ts", | ||
"exports": { | ||
"types": "./index.d.ts", | ||
"default": "./index.js" | ||
}, | ||
"sideEffects": false, | ||
"engines": { | ||
"node": ">=14.16" | ||
"node": ">=18" | ||
}, | ||
"scripts": { | ||
"//test": "xo && ava && tsd", | ||
"test": "ava && tsd" | ||
"test": "xo && ava" | ||
}, | ||
@@ -40,14 +43,14 @@ "files": [ | ||
"dependencies": { | ||
"got": "^12.1.0", | ||
"registry-auth-token": "^5.0.1", | ||
"registry-url": "^6.0.0", | ||
"semver": "^7.3.7" | ||
"got": "^13.0.0", | ||
"registry-auth-token": "^5.0.2", | ||
"registry-url": "^6.0.1", | ||
"semver": "^7.5.4" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^17.0.40", | ||
"ava": "^4.3.0", | ||
"@types/node": "^20.11.5", | ||
"ava": "^6.1.0", | ||
"mock-private-registry": "^1.1.2", | ||
"tsd": "^0.20.0", | ||
"xo": "^0.49.0" | ||
"tsd": "^0.30.4", | ||
"xo": "^0.56.0" | ||
} | ||
} |
12918
+ Addedgot@13.0.0(transitive)
- Removedgot@12.6.1(transitive)
Updatedgot@^13.0.0
Updatedregistry-auth-token@^5.0.2
Updatedregistry-url@^6.0.1
Updatedsemver@^7.5.4