@package-json/types
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -76,10 +76,2 @@ /* eslint-disable */ | ||
); | ||
/** | ||
* DEPRECATED: Instead, use SPDX expressions, like this: { "license": "ISC" } or { "license": "(MIT OR Apache-2.0)" } see: 'https://docs.npmjs.com/files/package.json#license'. | ||
*/ | ||
licenses?: { | ||
type?: License; | ||
url?: string; | ||
[k: string]: unknown; | ||
}[]; | ||
author?: Person; | ||
@@ -102,22 +94,2 @@ /** | ||
main?: string; | ||
/** | ||
* The "exports" field is used to restrict external access to non-exported module files, also enables a module to import itself using "name". | ||
*/ | ||
exports?: | ||
| (string | null) | ||
| { | ||
/** | ||
* The module path that is resolved when the module specifier matches "name", shadows the "main" field. | ||
*/ | ||
"."?: PackageExportsEntry | PackageExportsFallback; | ||
/** | ||
* The module path prefix that is resolved when the module specifier starts with "name/", set to "./*" to allow external modules to import any subpath. | ||
* | ||
* This interface was referenced by `undefined`'s JSON-Schema definition | ||
* via the `patternProperty` "^\./.+". | ||
*/ | ||
[k: string]: PackageExportsEntry | PackageExportsFallback; | ||
} | ||
| PackageExportsEntryObject1 | ||
| PackageExportsFallback1; | ||
bin?: | ||
@@ -290,6 +262,2 @@ | string | ||
/** | ||
* DEPRECATED: This field is honored, but "bundleDependencies" is the correct field name. | ||
*/ | ||
bundledDependencies?: string[] | boolean; | ||
/** | ||
* Resolutions is used to support selective version resolutions using yarn, which lets you define custom package versions or ranges inside your dependencies. For npm, use overrides instead. See: https://classic.yarnpkg.com/en/docs/selective-version-resolutions | ||
@@ -338,6 +306,2 @@ */ | ||
/** | ||
* DEPRECATED: This option used to trigger an npm warning, but it will no longer warn. It is purely there for informational purposes. It is now recommended that you install any binaries as local devDependencies wherever possible. | ||
*/ | ||
preferGlobal?: boolean; | ||
/** | ||
* If set to true, then npm will refuse to publish it. | ||
@@ -396,28 +360,2 @@ */ | ||
}; | ||
type License = | ||
| string | ||
| ( | ||
| "AGPL-3.0-only" | ||
| "Apache-2.0" | ||
| "BSD-2-Clause" | ||
| "BSD-3-Clause" | ||
| "BSL-1.0" | ||
| "CC0-1.0" | ||
| "CDDL-1.0" | ||
| "CDDL-1.1" | ||
| "EPL-1.0" | ||
| "EPL-2.0" | ||
| "GPL-2.0-only" | ||
| "GPL-3.0-only" | ||
| "ISC" | ||
| "LGPL-2.0-only" | ||
| "LGPL-2.1-only" | ||
| "LGPL-2.1-or-later" | ||
| "LGPL-3.0-only" | ||
| "LGPL-3.0-or-later" | ||
| "MIT" | ||
| "MPL-2.0" | ||
| "MS-PL" | ||
| "UNLICENSED" | ||
); | ||
/** | ||
@@ -440,16 +378,3 @@ * A person who has been involved in creating or maintaining this package. | ||
| string; | ||
type PackageExportsEntry = PackageExportsEntryPath | PackageExportsEntryObject; | ||
/** | ||
* The module path that is resolved when this specifier is imported. Set to `null` to disallow importing this module. | ||
*/ | ||
type PackageExportsEntryPath = string | null; | ||
/** | ||
* Used to allow fallbacks in case this environment doesn't support the preceding entries. | ||
*/ | ||
type PackageExportsFallback = PackageExportsEntry[]; | ||
/** | ||
* Used to allow fallbacks in case this environment doesn't support the preceding entries. | ||
*/ | ||
type PackageExportsFallback1 = PackageExportsEntry[]; | ||
/** | ||
* URL to a website with details about how to fund the package. | ||
@@ -492,72 +417,2 @@ */ | ||
/** | ||
* Used to specify conditional exports, note that Conditional exports are unsupported in older environments, so it's recommended to use the fallback array option if support for those environments is a concern. | ||
*/ | ||
interface PackageExportsEntryObject { | ||
/** | ||
* The module path that is resolved when this specifier is imported as a CommonJS module using the `require(...)` function. | ||
*/ | ||
require?: PackageExportsEntry | PackageExportsFallback; | ||
/** | ||
* The module path that is resolved when this specifier is imported as an ECMAScript module using an `import` declaration or the dynamic `import(...)` function. | ||
*/ | ||
import?: PackageExportsEntry | PackageExportsFallback; | ||
/** | ||
* The module path that is resolved when this environment is Node.js. | ||
*/ | ||
node?: PackageExportsEntry | PackageExportsFallback; | ||
/** | ||
* The module path that is resolved when no other export type matches. | ||
*/ | ||
default?: PackageExportsEntry | PackageExportsFallback; | ||
/** | ||
* The module path that is resolved for TypeScript types when this specifier is imported. Should be listed before other conditions. | ||
*/ | ||
types?: PackageExportsEntry | PackageExportsFallback; | ||
/** | ||
* The module path that is resolved when this environment matches the property name. | ||
* | ||
* This interface was referenced by `PackageExportsEntryObject`'s JSON-Schema definition | ||
* via the `patternProperty` "^(?![\.0-9]).". | ||
* | ||
* This interface was referenced by `PackageExportsEntryObject1`'s JSON-Schema definition | ||
* via the `patternProperty` "^(?![\.0-9]).". | ||
*/ | ||
[k: string]: PackageExportsEntry | PackageExportsFallback; | ||
} | ||
/** | ||
* Used to specify conditional exports, note that Conditional exports are unsupported in older environments, so it's recommended to use the fallback array option if support for those environments is a concern. | ||
*/ | ||
interface PackageExportsEntryObject1 { | ||
/** | ||
* The module path that is resolved when this specifier is imported as a CommonJS module using the `require(...)` function. | ||
*/ | ||
require?: PackageExportsEntry | PackageExportsFallback; | ||
/** | ||
* The module path that is resolved when this specifier is imported as an ECMAScript module using an `import` declaration or the dynamic `import(...)` function. | ||
*/ | ||
import?: PackageExportsEntry | PackageExportsFallback; | ||
/** | ||
* The module path that is resolved when this environment is Node.js. | ||
*/ | ||
node?: PackageExportsEntry | PackageExportsFallback; | ||
/** | ||
* The module path that is resolved when no other export type matches. | ||
*/ | ||
default?: PackageExportsEntry | PackageExportsFallback; | ||
/** | ||
* The module path that is resolved for TypeScript types when this specifier is imported. Should be listed before other conditions. | ||
*/ | ||
types?: PackageExportsEntry | PackageExportsFallback; | ||
/** | ||
* The module path that is resolved when this environment matches the property name. | ||
* | ||
* This interface was referenced by `PackageExportsEntryObject`'s JSON-Schema definition | ||
* via the `patternProperty` "^(?![\.0-9]).". | ||
* | ||
* This interface was referenced by `PackageExportsEntryObject1`'s JSON-Schema definition | ||
* via the `patternProperty` "^(?![\.0-9]).". | ||
*/ | ||
[k: string]: PackageExportsEntry | PackageExportsFallback; | ||
} | ||
/** | ||
* Used to inform about ways to help fund development of the package. | ||
@@ -580,25 +435,18 @@ */ | ||
/** | ||
* The module path prefix that is resolved when the module specifier starts with "name/", set to "./*" to allow external modules to import any subpath. | ||
* | ||
* This interface was referenced by `undefined`'s JSON-Schema definition | ||
* via the `patternProperty` "^\./.+". | ||
A mapping of conditions and the paths to which they resolve. | ||
*/ | ||
type PatchedPackageExportsEntry = Record<`./${string}` | ({} & string), PackageExportsEntry | PackageExportsFallback>; | ||
interface ExportConditions { | ||
[condition: string]: Exports; | ||
} | ||
/** | ||
* The "exports" field is used to restrict external access to non-exported module files, also enables a module to import itself using "name". | ||
*/ | ||
type PatchedExports = { | ||
/** | ||
* The module path that is resolved when the module specifier matches "name", shadows the "main" field. | ||
*/ | ||
'.'?: PackageExportsEntry | PackageExportsFallback; | ||
'./package.json'?: './package.json'; | ||
} & PatchedPackageExportsEntry | (null | string) | PackageExportsEntryObject1 | PackageExportsFallback1; | ||
type Exports = Array<ExportConditions | string> | ExportConditions | null | string; | ||
type PackageJson = { | ||
exports?: PatchedExports; | ||
} & Omit<JSONSchemaForNPMPackageJsonFiles, 'exports'>; | ||
exports?: Exports; | ||
} & JSONSchemaForNPMPackageJsonFiles; | ||
declare const definePackageJson: (json: PackageJson) => PackageJson; | ||
export { type Dependency, type FundingUrl, type FundingWay, type JSONSchemaForNPMPackageJsonFiles, type License, type PackageExportsEntry, type PackageExportsEntryObject, type PackageExportsEntryObject1, type PackageExportsEntryPath, type PackageExportsFallback, type PackageExportsFallback1, type PackageJson as PackageJSON, type PackageJson, type Person, type Person1, type ScriptsInstallAfter, type ScriptsPublishAfter, type ScriptsRestart, type ScriptsStart, type ScriptsStop, type ScriptsTest, type ScriptsUninstallBefore, type ScriptsVersionBefore, definePackageJson as default, definePackageJson as definePackageJSON, definePackageJson }; | ||
export { type Dependency, type FundingUrl, type FundingWay, type JSONSchemaForNPMPackageJsonFiles, type PackageJson as PackageJSON, type PackageJson, type Person, type Person1, type ScriptsInstallAfter, type ScriptsPublishAfter, type ScriptsRestart, type ScriptsStart, type ScriptsStop, type ScriptsTest, type ScriptsUninstallBefore, type ScriptsVersionBefore, definePackageJson as default, definePackageJson as definePackageJSON, definePackageJson }; |
{ | ||
"name": "@package-json/types", | ||
"type": "module", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "Auto-generated package.json types.", | ||
@@ -6,0 +6,0 @@ "author": "藍+85CD", |
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
16594
442