utils/node_modules/@rushstack/node-core-library/lib/IPackageJson.js.map

1 line
6.3 KiB
Plaintext
Raw Normal View History

2024-02-07 01:33:07 -05:00
{"version":3,"file":"IPackageJson.js","sourceRoot":"","sources":["../src/IPackageJson.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n/**\n * This interface is part of the {@link IPackageJson} file format. It is used for the\n * \"dependencies\", \"optionalDependencies\", and \"devDependencies\" fields.\n * @public\n */\nexport interface IPackageJsonDependencyTable {\n /**\n * The key is the name of a dependency. The value is a Semantic Versioning (SemVer)\n * range specifier.\n */\n [dependencyName: string]: string;\n}\n\n/**\n * This interface is part of the {@link IPackageJson} file format. It is used for the\n * \"scripts\" field.\n * @public\n */\nexport interface IPackageJsonScriptTable {\n /**\n * The key is the name of the script hook. The value is the script body which may\n * be a file path or shell script command.\n */\n [scriptName: string]: string;\n}\n\n/**\n * This interface is part of the {@link IPackageJson} file format. It is used for the\n * \"repository\" field.\n * @public\n */\nexport interface IPackageJsonRepository {\n /**\n * The source control type for the repository that hosts the project. This is typically \"git\".\n */\n type: string;\n\n /**\n * The URL of the repository that hosts the project.\n */\n url: string;\n\n /**\n * If the project does not exist at the root of the repository, its path is specified here.\n */\n directory?: string;\n}\n\n/**\n * This interface is part of the {@link IPackageJson} file format. It is used for the\n * \"peerDependenciesMeta\" field.\n * @public\n */\nexport interface IPeerDependenciesMetaTable {\n [dependencyName: string]: {\n optional?: boolean;\n };\n}\n\n/**\n * An interface for accessing common fields from a package.json file whose version field may be missing.\n *\n * @remarks\n * This interface is the same as {@link IPackageJson}, except that the `version` field is optional.\n * According to the {@link https://docs.npmjs.com/files/package.json | NPM documentation}\n * and {@link http://wiki.commonjs.org/wiki/Packages/1.0 | CommonJS Packages specification}, the `version` field\n * is normally a required field for package.json files.\n *\n * However, NodeJS relaxes this requirement for its `require()` API. The\n * {@link https://nodejs.org/dist/latest-v10.x/docs/api/modules.html#modules_folders_as_modules\n * | \"Folders as Modules\" section} from the NodeJS documentation gives an example of a package.json file\n * that has only the `name` and `main` fields. NodeJS does not consider the `version` field during resolution,\n * so it can be omitted. Some libraries do this.\n *\n * Use the `INodePackageJson` interface when loading such files. Use `IPackageJson` for package.json files\n * that are installed from an NPM registry, or are otherwise known to have a `version` field.\n *\n * @public\n */\nexport interface INodePackageJson {\n /**\n * The name of the package.\n */\n name: string;\n\n /**\n * A version number conforming to the Semantic Versioning (SemVer) standard.\n */\n version?: string;\n\n /**\n * Indicates whether this package is allowed to be published or not.\n */\n private?: boolean;\n\n /**\n * A brief description of the package.\n */\n description?: string;\n\n /**\n * The URL of the project's repository.\n */\n repository?: string | IPackageJsonRepository;\n\n /**\n * The URL to the project's web page.\n */\n homepage?: string;\n\n /**\n * The name of the license.\n */\n license?: string;\n\n /**\n * The path to the module file that will act as the main entry point.\n */\n main?: string;\n\n /**\n * The path to the TypeScript *.d.ts file describing the module file\n * that will act as the main entry point.\n */\n types?: string;\n\n /**\n * Alias for `types`\n */\n typings?: string;\n\n /**\n * The path to the TSDoc metadata file.\n * This is