@types/package-json
Advanced tools
Comparing version 4.0.1 to 5.0.0
@@ -1,14 +0,77 @@ | ||
// Type definitions for package-json 4.0 | ||
// Type definitions for package-json 5.0 | ||
// Project: https://github.com/sindresorhus/package-json#readme | ||
// Definitions by: Jinwoo Lee <https://github.com/jinwoo> | ||
// BendingBender <https://github.com/BendingBender> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
interface PackageJsonOptions { | ||
version?: string; | ||
fullMetadata?: boolean; | ||
allVersions?: boolean; | ||
} | ||
export = packageJson; | ||
declare function packageJson(name: string, options?: PackageJsonOptions): Promise<{}>; | ||
/** | ||
* Get metadata of a package from the npm registry. | ||
* | ||
* @param name Name of the package. | ||
*/ | ||
declare function packageJson( | ||
name: string, | ||
options?: packageJson.Options | ||
): Promise<packageJson.PackageJson>; | ||
export = packageJson; | ||
declare namespace packageJson { | ||
interface Options { | ||
/** | ||
* Package version such as `1.0.0` or a [dist tag](https://docs.npmjs.com/cli/dist-tag) such as `latest`. | ||
* | ||
* The version can also be in any format supported by the [semver](https://github.com/npm/node-semver) module. | ||
* For example: | ||
* - `1` - Get the latest `1.x.x` | ||
* - `1.2` - Get the latest `1.2.x` | ||
* - `^1.2.3` - Get the latest `1.x.x` but at least `1.2.3` | ||
* - `~1.2.3` - Get the latest `1.2.x` but at least `1.2.3` | ||
* | ||
* @default 'latest' | ||
*/ | ||
version?: string; | ||
/** | ||
* By default, only an abbreviated metadata object is returned for performance reasons. | ||
* [Read more.](https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md) | ||
* @default false | ||
*/ | ||
fullMetadata?: boolean; | ||
/** | ||
* Return the [main entry](https://registry.npmjs.org/ava) containing all versions. | ||
* @default false | ||
*/ | ||
allVersions?: boolean; | ||
} | ||
interface PackageJson { | ||
[k: string]: any; | ||
name?: string; | ||
version?: string; | ||
files?: string[]; | ||
bin?: { [k: string]: string }; | ||
man?: string[]; | ||
keywords?: string[]; | ||
author?: Person; | ||
maintainers?: Person[]; | ||
contributors?: Person[]; | ||
bundleDependencies?: { [name: string]: string }; | ||
dependencies?: { [name: string]: string }; | ||
devDependencies?: { [name: string]: string }; | ||
optionalDependencies?: { [name: string]: string }; | ||
description?: string; | ||
engines?: { [type: string]: string }; | ||
license?: string; | ||
repository?: { type: string; url: string }; | ||
bugs?: { url: string; email?: string } | { url?: string; email: string }; | ||
homepage?: string; | ||
scripts?: { [k: string]: string }; | ||
readme?: string; | ||
} | ||
interface Person { | ||
name?: string; | ||
email?: string; | ||
url?: string; | ||
} | ||
} |
{ | ||
"name": "@types/package-json", | ||
"version": "4.0.1", | ||
"version": "5.0.0", | ||
"description": "TypeScript definitions for package-json", | ||
@@ -11,13 +11,19 @@ "license": "MIT", | ||
"githubUsername": "jinwoo" | ||
}, | ||
{ | ||
"name": "BendingBender", | ||
"url": "https://github.com/BendingBender", | ||
"githubUsername": "BendingBender" | ||
} | ||
], | ||
"main": "", | ||
"types": "index", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" | ||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git" | ||
}, | ||
"scripts": {}, | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "609d38d24e55bf2beb3ccbf61f0fc37fc1998c58a0db289bc0d7696923ee6fbd", | ||
"typesPublisherContentHash": "0bd0ee154ad6cdfe1e783a1c3c4a5adf5a1f72c4250ba73d210b752a5b7e3730", | ||
"typeScriptVersion": "2.0" | ||
} |
@@ -8,6 +8,6 @@ # Installation | ||
# Details | ||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/package-json | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/package-json | ||
Additional Details | ||
* Last updated: Thu, 16 Nov 2017 23:11:41 GMT | ||
* Last updated: Sat, 19 Jan 2019 01:20:42 GMT | ||
* Dependencies: none | ||
@@ -17,2 +17,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by Jinwoo Lee <https://github.com/jinwoo>. | ||
These definitions were written by Jinwoo Lee <https://github.com/jinwoo>, BendingBender <https://github.com/BendingBender>. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5163
72