@ms-cloudpack/common-types 0.24.11 → 0.24.12
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/lib/AppConfig.d.ts +3 -0
- package/lib/AppConfig.d.ts.map +1 -1
- package/lib/AppConfig.js.map +1 -1
- package/lib/PackageJson.d.ts +5 -0
- package/lib/PackageJson.d.ts.map +1 -1
- package/lib/PackageJson.js.map +1 -1
- package/package.json +1 -1
- package/schema/AppConfig.json +1 -1
- package/schema/UserConfig.json +1 -1
package/lib/AppConfig.d.ts
CHANGED
|
@@ -55,6 +55,9 @@ export interface AppConfig {
|
|
|
55
55
|
/**
|
|
56
56
|
* Glob pattern to match `patch-package` patch files, relative to the project root
|
|
57
57
|
* (usually the same as the repository root).
|
|
58
|
+
*
|
|
59
|
+
* Note that if you're using `yarn patch` (v2+), those patches will be handled automatically
|
|
60
|
+
* (not by this glob pattern).
|
|
58
61
|
* @default "patches/*.patch"
|
|
59
62
|
*/
|
|
60
63
|
patchFilesGlobPattern?: string;
|
package/lib/AppConfig.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppConfig.d.ts","sourceRoot":"","sources":["../src/AppConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;;;;;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CAAC,EAAE,QAAQ,CAAC;IAEpB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,eAAe,CAAC,EAAE,eAAe,EAAE,CAAC;IAEpC;;;OAGG;IACH,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;IAEjC;;;;;;;OAOG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B;;;OAGG;IACH,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAEhC;;;OAGG;IACH,MAAM,CAAC,EAAE,cAAc,EAAE,CAAC;IAE1B;;;;;OAKG;IACH,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEpC;;;;OAIG;IACH,2BAA2B,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAErD;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB"}
|
package/lib/AppConfig.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppConfig.js","sourceRoot":"","sources":["../src/AppConfig.ts"],"names":[],"mappings":"","sourcesContent":["import type { ServerConfig } from './ServerConfig.js';\nimport type { Features } from './Features.js';\nimport type { PackageSettings } from './PackageSettings.js';\nimport type { RemoteCacheConfig } from './RemoteCacheConfig.js';\nimport type { ShorthandRoute } from './Route.js';\nimport type { TelemetryConfig } from './TelemetryConfig.js';\nimport type { DefineFlags } from '@ms-cloudpack/common-types-browser';\n\n/**\n * Per-application user-provided configuration for Cloudpack.\n */\nexport interface AppConfig {\n /**\n * Extend the configuration from another file: either an import path or a relative path\n * (resolved from the config file's location).\n *\n * If an array, later files will take precedence when merging.\n * (The user config always takes precedence over any extended config.)\n *\n * Config merging approach:\n * - Objects will be deeply merged.\n * - Primitive values will be overwritten.\n * - Arrays will be overwritten, EXCEPT for `packageSettings`, which will be concatenated.\n */\n extends?: string | string[];\n\n /**\n * @deprecated - use \"server\" instead.\n */\n devServer?: ServerConfig;\n\n /**\n * Configuration for the dev server.\n */\n server?: ServerConfig;\n\n /**\n * Configuration for telemetry.\n */\n telemetry?: TelemetryConfig;\n\n /**\n * Enable additional Cloudpack features.\n */\n features?: Features;\n\n /**\n * Help message to display when Cloudpack starts up.\n */\n helpMessage?: string;\n\n /**\n * Settings to customize how packages are bundled.\n * Later settings in the array take precedence over earlier ones.\n */\n packageSettings?: PackageSettings[];\n\n /**\n * Commands to execute prior to Cloudpack bundling.\n * Each entry has a command and an array of arguments: `['command', ['arg1', 'arg2']]`.\n */\n dependsOn?: [string, string[]][];\n\n /**\n * Glob pattern to match `patch-package` patch files, relative to the project root\n * (usually the same as the repository root).\n * @default \"patches/*.patch\"\n */\n patchFilesGlobPattern?: string;\n\n /**\n * Azure Blob Storage configuration for remote cache - uploading and downloading packages\n * via `cloudpack sync`. If this is not provided, the remote cache will not be used.\n */\n remoteCache?: RemoteCacheConfig;\n\n /**\n * Defines what routes to support from the app server, and which scripts will be loaded\n * for each.\n */\n routes?: ShorthandRoute[];\n\n /**\n * Ignore these package names when calculating included and excluded dependencies.\n * This is mainly intended for helper packages such as `tslib`.\n *\n * Include `...` to merge with the default list (`tslib` and `@babel/runtime` as of writing).\n */\n neverExcludeDependencies?: string[];\n\n /**\n * Key value pairs of external bundler capabilities that can be enabled in the package settings.\n * - Key is the name of the capability, which will be used in `PackageSettings.bundlerCapabilities`.\n * - Value is the import specifier (local path or package name) for the capability module.\n */\n bundlerCapabilitiesRegistry?: Record<string, string>;\n\n /**\n * Key value pairs that will be used to define global variables in the runtime.\n */\n define?: DefineFlags;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"AppConfig.js","sourceRoot":"","sources":["../src/AppConfig.ts"],"names":[],"mappings":"","sourcesContent":["import type { ServerConfig } from './ServerConfig.js';\nimport type { Features } from './Features.js';\nimport type { PackageSettings } from './PackageSettings.js';\nimport type { RemoteCacheConfig } from './RemoteCacheConfig.js';\nimport type { ShorthandRoute } from './Route.js';\nimport type { TelemetryConfig } from './TelemetryConfig.js';\nimport type { DefineFlags } from '@ms-cloudpack/common-types-browser';\n\n/**\n * Per-application user-provided configuration for Cloudpack.\n */\nexport interface AppConfig {\n /**\n * Extend the configuration from another file: either an import path or a relative path\n * (resolved from the config file's location).\n *\n * If an array, later files will take precedence when merging.\n * (The user config always takes precedence over any extended config.)\n *\n * Config merging approach:\n * - Objects will be deeply merged.\n * - Primitive values will be overwritten.\n * - Arrays will be overwritten, EXCEPT for `packageSettings`, which will be concatenated.\n */\n extends?: string | string[];\n\n /**\n * @deprecated - use \"server\" instead.\n */\n devServer?: ServerConfig;\n\n /**\n * Configuration for the dev server.\n */\n server?: ServerConfig;\n\n /**\n * Configuration for telemetry.\n */\n telemetry?: TelemetryConfig;\n\n /**\n * Enable additional Cloudpack features.\n */\n features?: Features;\n\n /**\n * Help message to display when Cloudpack starts up.\n */\n helpMessage?: string;\n\n /**\n * Settings to customize how packages are bundled.\n * Later settings in the array take precedence over earlier ones.\n */\n packageSettings?: PackageSettings[];\n\n /**\n * Commands to execute prior to Cloudpack bundling.\n * Each entry has a command and an array of arguments: `['command', ['arg1', 'arg2']]`.\n */\n dependsOn?: [string, string[]][];\n\n /**\n * Glob pattern to match `patch-package` patch files, relative to the project root\n * (usually the same as the repository root).\n *\n * Note that if you're using `yarn patch` (v2+), those patches will be handled automatically\n * (not by this glob pattern).\n * @default \"patches/*.patch\"\n */\n patchFilesGlobPattern?: string;\n\n /**\n * Azure Blob Storage configuration for remote cache - uploading and downloading packages\n * via `cloudpack sync`. If this is not provided, the remote cache will not be used.\n */\n remoteCache?: RemoteCacheConfig;\n\n /**\n * Defines what routes to support from the app server, and which scripts will be loaded\n * for each.\n */\n routes?: ShorthandRoute[];\n\n /**\n * Ignore these package names when calculating included and excluded dependencies.\n * This is mainly intended for helper packages such as `tslib`.\n *\n * Include `...` to merge with the default list (`tslib` and `@babel/runtime` as of writing).\n */\n neverExcludeDependencies?: string[];\n\n /**\n * Key value pairs of external bundler capabilities that can be enabled in the package settings.\n * - Key is the name of the capability, which will be used in `PackageSettings.bundlerCapabilities`.\n * - Value is the import specifier (local path or package name) for the capability module.\n */\n bundlerCapabilitiesRegistry?: Record<string, string>;\n\n /**\n * Key value pairs that will be used to define global variables in the runtime.\n */\n define?: DefineFlags;\n}\n"]}
|
package/lib/PackageJson.d.ts
CHANGED
|
@@ -66,6 +66,11 @@ export type PackageJson = {
|
|
|
66
66
|
export interface PackageJsonCloudpackMeta extends Omit<PackageSettings, 'match' | 'exports' | 'includedDependencies' | 'excludedDependencies' | 'bundlerType'> {
|
|
67
67
|
/** Controls how the package is bundled. */
|
|
68
68
|
mode: BundleMode;
|
|
69
|
+
/**
|
|
70
|
+
* If the package manager is yarn berry (v2+) and the package has been patched with `yarn patch`,
|
|
71
|
+
* this is the path to the patch file relative to the project root (set by `getNonSemverTransform`).
|
|
72
|
+
*/
|
|
73
|
+
patchFilePath?: string;
|
|
69
74
|
}
|
|
70
75
|
/**
|
|
71
76
|
* Union type which has intellisense for specific keys but also allows arbitrary strings.
|
package/lib/PackageJson.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PackageJson.d.ts","sourceRoot":"","sources":["../src/PackageJson.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;;;;GAKG;AAOH,MAAM,MAAM,WAAW,GAAG;IACxB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb,oCAAoC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAYhB,2IAA2I;IAC3I,IAAI,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;IAE7B,oEAAoE;IACpE,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,8EAA8E;IAC9E,MAAM,CAAC,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EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,CAAC,WAAW,SAAS,MAAM,IAAI,WAAW,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;AAExG,gGAAgG;AAChG,MAAM,MAAM,0BAA0B,GAAG,eAAe,CACpD,SAAS,GACT,SAAS,GACT,MAAM,GACN,UAAU,GACV,QAAQ,GACR,QAAQ,GACR,aAAa,GACb,MAAM,GACN,cAAc,GACd,SAAS,CACZ,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAC/B,IAAI,GACJ,MAAM,GACN;KAAG,SAAS,IAAI,0BAA0B,CAAC,CAAC,EAAE,uBAAuB;CAAE,GACvE,KAAK,CAAC,uBAAuB,CAAC,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,CAAC,eAAe,EAAE,MAAM,GAAG,uBAAuB,CAAC;CACpD,CAAC;AAEF,gHAAgH;AAChH,MAAM,MAAM,kBAAkB,GAAG,uBAAuB,GAAG,wBAAwB,GAAG,kBAAkB,EAAE,CAAC;AAE3G;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,CAAC,IAAI,EAAE,MAAM,GACT,MAAM,GACN,IAAI,GACJ;QACE,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG;YAAE,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;SAAE,CAAC;KAChE,CAAC;CACP,CAAC;AAOF,mDAAmD;AACnD,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC"}
|
package/lib/PackageJson.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PackageJson.js","sourceRoot":"","sources":["../src/PackageJson.ts"],"names":[],"mappings":"","sourcesContent":["import type { BundleMode } from './BundleMode.js';\nimport type { PackageSettings } from './PackageSettings.js';\n\n/**\n * Types for the `package.json` file, derived from [`type-fest`](https://github.com/sindresorhus/type-fest/blob/main/source/package-json.d.ts).\n *\n * This version intentionally does not permit arbitrary keys, and only includes properties that are\n * used by Cloudpack. Additional properties can be added as needed.\n */\n//\n// NOTE: Some of the known properties not currently used by Cloudpack are commented out, but\n// preserved in the file for future typing reference.\n//\n// If adding or uncommenting a property, you'll also need to update PackageDefinitions copyPackageJsonKeys.\n//\nexport type PackageJson = {\n /**\n * The name of the package. This is always set when reading via `PackageDefinitions`, but might be\n * missing if reading package.json directly.\n */\n name: string;\n\n /** A description of the package. */\n description?: string;\n\n /**\n * Package semantic version. This is always set when reading via `PackageDefinitions`, but might be\n * missing if reading package.json directly.\n */\n version: string;\n\n // /** The files included in the package. */\n // files?: string[];\n\n // /** Indicates the structure of the package. https://docs.npmjs.com/cli/v9/configuring-npm/package-json#directories */\n // directories?: {\n // [directoryType: string]: string | undefined;\n // bin?: string;\n // lib?: string;\n // };\n\n /** Resolution algorithm for importing \".js\" files from the package's scope. https://nodejs.org/api/esm.html#esm_package_json_type_field */\n type?: 'module' | 'commonjs';\n\n /** The module ID that is the primary entry point to the package. */\n main?: string;\n\n /** An ECMAScript module ID that is the primary entry point to the package. */\n module?: string;\n\n // /** The executable file(s) for this package. */\n // bin?: string | Partial<Record<string, string>>;\n\n // /** A module ID with untranspiled code that is the primary entry point to the package. */\n // esnext?:\n // | string\n // | {\n // [moduleName: string]: string | undefined;\n // main?: string;\n // browser?: string;\n // };\n\n /** A hint to JavaScript bundlers or component tools when packaging modules for client side use. */\n browser?: string | Partial<Record<string, string | false>>;\n\n // /**\n // * Denote which files in the package have side effects and may not be pruned by bundlers, even if unused.\n // * If a boolean, applies to all files in the package. `false` indicates there are no side effects.\n // * https://webpack.js.org/guides/tree-shaking/\n // */\n // sideEffects?: boolean | string[];\n\n // /** Location of the bundled TypeScript declaration file. */\n // types?: string;\n\n // /** Location of the bundled TypeScript declaration file. Alias of `types`. */\n // typings?: string;\n\n // /** Location of TypeScript declaration files for different TypeScript versions. */\n // typesVersions?: Partial<Record<string, Partial<Record<string, string[]>>>>;\n\n /** Subpath exports to define entry points of the package. https://nodejs.org/api/packages.html#subpath-exports */\n exports?: PackageJsonExports;\n\n // /**\n // * Subpath imports to define internal package import maps that only apply to import specifiers from\n // * within the package itself. https://nodejs.org/api/packages.html#subpath-imports\n // */\n // imports?: PackageJsonImports;\n\n /** Dependencies that will be installed when the package is consumed. */\n dependencies?: PackageJsonDependencies;\n\n /** Dependencies for local development only. */\n devDependencies?: PackageJsonDependencies;\n\n /** Dependencies that must be installed alongside this package when consumed. */\n peerDependencies?: PackageJsonDependencies;\n\n /** Indicates which peer dependencies are optional. */\n peerDependenciesMeta?: Partial<Record<string, { optional: true }>>;\n\n optionalDependencies?: PackageJsonDependencies;\n bundledDependencies?: PackageJsonDependencies | string[];\n bundleDependencies?: PackageJsonDependencies | string[];\n\n resolutions?: PackageJsonDependencies;\n\n // /** Required engine versions for running this package. */\n // engines?: {\n // [engine in LiteralOrString<'npm' | 'node'>]?: string;\n // };\n\n // /** If `true`, this package cannot be published. */\n // private?: boolean;\n\n // /** Configuration for npm or yarn workspaces. */\n // workspaces?:\n // | string[]\n // | {\n // /** An array of workspace pattern strings which contain the workspace packages. */\n // packages?: string[];\n // /** Prevent hoisting of these dependencies within the workspace (yarn only). https://classic.yarnpkg.com/blog/2018/02/15/nohoist/) */\n // nohoist?: string[];\n // };\n\n /**\n * Cached result of calling `getPackageSettings` for this package (excluding properties that are\n * fully handled by `createPackageSettingsTransform`), plus other info.\n *\n * This can be used while bundling for cached access to package settings.\n * It's also used for calculating the hash in `getPackageHashEntries`.\n *\n * This should NOT be used during init's analysis of the bundle result, since it might be\n * out of date due to pending generated settings updates. (If a package is re-enqueued after\n * analysis due to generated settings updates, we refresh the definition, which updates these\n * cached setting. So it's safe to use again on the next bundle attempt.)\n */\n cloudpack?: PackageJsonCloudpackMeta;\n};\n\n/**\n * Cached merged package settings (user and generated) for this package (excluding properties\n * that are fully handled by `createPackageSettingsTransform`), plus other info.\n *\n * See `PackageJson.cloudpack` for details of when this can be used.\n */\nexport interface PackageJsonCloudpackMeta\n extends Omit<\n PackageSettings,\n | 'match'\n | 'exports'\n | 'includedDependencies'\n | 'excludedDependencies'\n // this is deprecated\n | 'bundlerType'\n > {\n /** Controls how the package is bundled. */\n mode: BundleMode;\n}\n\n/**\n * Union type which has intellisense for specific keys but also allows arbitrary strings.\n * This is a workaround for a [TypeScript issue](https://github.com/Microsoft/TypeScript/issues/29729)\n */\nexport type LiteralOrString<LiteralType extends string> = LiteralType | (string & Record<never, never>);\n\n/** Conditions which provide a way to resolve a package entry point based on the environment. */\nexport type PackageJsonExportCondition = LiteralOrString<\n | 'browser'\n | 'default'\n | 'deno'\n | 'electron'\n | 'import'\n | 'module'\n | 'node-addons'\n | 'node'\n | 'react-native'\n | 'require'\n>;\n\n/**\n * The value of an `PackageJson.exports` object key. Note at the root of the object, keys can be represented\n * either by a condition, or a `string` to provide import paths (such as \"./foo\"). At subsequent levels\n * within the object, only conditions (string which don't start with \".\") can be used as keys.\n */\nexport type PackageJsonExportsValue =\n | null\n | string\n | { [condition in PackageJsonExportCondition]?: PackageJsonExportsValue }\n | Array<PackageJsonExportsValue>;\n\n/**\n * Definition of the root exports object. Keys can be either conditions or import paths.\n */\nexport type PackageJsonExportsObject = {\n [pathOrCondition: string]: PackageJsonExportsValue;\n};\n\n/** Entry points of a package, optionally with conditions and subpath exports. Used as `PackageJson.exports`. */\nexport type PackageJsonExports = PackageJsonExportsValue | PackageJsonExportsObject | PackageJsonExports[];\n\n/**\n * Mapping from import path to either file path, or a nested object of conditions to file paths\n * (occasionally with two levels of conditions). This is the format used for generated exports maps.\n */\nexport type GeneratedExports = {\n [path: string]:\n | string\n | null\n | {\n [condition: string]: string | { [condition2: string]: string };\n };\n};\n\n// /** Import map entries of a module, optionally with conditions. */\n// export type PackageJsonImports = {\n// [key: `#${string}`]: string | { [key in PackageJsonExportCondition]: PackageJsonExports };\n// };\n\n/** Mapping from dependency name to semver spec. */\nexport type PackageJsonDependencies = Partial<Record<string, string>>;\n"]}
|
|
1
|
+
{"version":3,"file":"PackageJson.js","sourceRoot":"","sources":["../src/PackageJson.ts"],"names":[],"mappings":"","sourcesContent":["import type { BundleMode } from './BundleMode.js';\nimport type { PackageSettings } from './PackageSettings.js';\n\n/**\n * Types for the `package.json` file, derived from [`type-fest`](https://github.com/sindresorhus/type-fest/blob/main/source/package-json.d.ts).\n *\n * This version intentionally does not permit arbitrary keys, and only includes properties that are\n * used by Cloudpack. Additional properties can be added as needed.\n */\n//\n// NOTE: Some of the known properties not currently used by Cloudpack are commented out, but\n// preserved in the file for future typing reference.\n//\n// If adding or uncommenting a property, you'll also need to update PackageDefinitions copyPackageJsonKeys.\n//\nexport type PackageJson = {\n /**\n * The name of the package. This is always set when reading via `PackageDefinitions`, but might be\n * missing if reading package.json directly.\n */\n name: string;\n\n /** A description of the package. */\n description?: string;\n\n /**\n * Package semantic version. This is always set when reading via `PackageDefinitions`, but might be\n * missing if reading package.json directly.\n */\n version: string;\n\n // /** The files included in the package. */\n // files?: string[];\n\n // /** Indicates the structure of the package. https://docs.npmjs.com/cli/v9/configuring-npm/package-json#directories */\n // directories?: {\n // [directoryType: string]: string | undefined;\n // bin?: string;\n // lib?: string;\n // };\n\n /** Resolution algorithm for importing \".js\" files from the package's scope. https://nodejs.org/api/esm.html#esm_package_json_type_field */\n type?: 'module' | 'commonjs';\n\n /** The module ID that is the primary entry point to the package. */\n main?: string;\n\n /** An ECMAScript module ID that is the primary entry point to the package. */\n module?: string;\n\n // /** The executable file(s) for this package. */\n // bin?: string | Partial<Record<string, string>>;\n\n // /** A module ID with untranspiled code that is the primary entry point to the package. */\n // esnext?:\n // | string\n // | {\n // [moduleName: string]: string | undefined;\n // main?: string;\n // browser?: string;\n // };\n\n /** A hint to JavaScript bundlers or component tools when packaging modules for client side use. */\n browser?: string | Partial<Record<string, string | false>>;\n\n // /**\n // * Denote which files in the package have side effects and may not be pruned by bundlers, even if unused.\n // * If a boolean, applies to all files in the package. `false` indicates there are no side effects.\n // * https://webpack.js.org/guides/tree-shaking/\n // */\n // sideEffects?: boolean | string[];\n\n // /** Location of the bundled TypeScript declaration file. */\n // types?: string;\n\n // /** Location of the bundled TypeScript declaration file. Alias of `types`. */\n // typings?: string;\n\n // /** Location of TypeScript declaration files for different TypeScript versions. */\n // typesVersions?: Partial<Record<string, Partial<Record<string, string[]>>>>;\n\n /** Subpath exports to define entry points of the package. https://nodejs.org/api/packages.html#subpath-exports */\n exports?: PackageJsonExports;\n\n // /**\n // * Subpath imports to define internal package import maps that only apply to import specifiers from\n // * within the package itself. https://nodejs.org/api/packages.html#subpath-imports\n // */\n // imports?: PackageJsonImports;\n\n /** Dependencies that will be installed when the package is consumed. */\n dependencies?: PackageJsonDependencies;\n\n /** Dependencies for local development only. */\n devDependencies?: PackageJsonDependencies;\n\n /** Dependencies that must be installed alongside this package when consumed. */\n peerDependencies?: PackageJsonDependencies;\n\n /** Indicates which peer dependencies are optional. */\n peerDependenciesMeta?: Partial<Record<string, { optional: true }>>;\n\n optionalDependencies?: PackageJsonDependencies;\n bundledDependencies?: PackageJsonDependencies | string[];\n bundleDependencies?: PackageJsonDependencies | string[];\n\n resolutions?: PackageJsonDependencies;\n\n // /** Required engine versions for running this package. */\n // engines?: {\n // [engine in LiteralOrString<'npm' | 'node'>]?: string;\n // };\n\n // /** If `true`, this package cannot be published. */\n // private?: boolean;\n\n // /** Configuration for npm or yarn workspaces. */\n // workspaces?:\n // | string[]\n // | {\n // /** An array of workspace pattern strings which contain the workspace packages. */\n // packages?: string[];\n // /** Prevent hoisting of these dependencies within the workspace (yarn only). https://classic.yarnpkg.com/blog/2018/02/15/nohoist/) */\n // nohoist?: string[];\n // };\n\n /**\n * Cached result of calling `getPackageSettings` for this package (excluding properties that are\n * fully handled by `createPackageSettingsTransform`), plus other info.\n *\n * This can be used while bundling for cached access to package settings.\n * It's also used for calculating the hash in `getPackageHashEntries`.\n *\n * This should NOT be used during init's analysis of the bundle result, since it might be\n * out of date due to pending generated settings updates. (If a package is re-enqueued after\n * analysis due to generated settings updates, we refresh the definition, which updates these\n * cached setting. So it's safe to use again on the next bundle attempt.)\n */\n cloudpack?: PackageJsonCloudpackMeta;\n};\n\n/**\n * Cached merged package settings (user and generated) for this package (excluding properties\n * that are fully handled by `createPackageSettingsTransform`), plus other info.\n *\n * See `PackageJson.cloudpack` for details of when this can be used.\n */\nexport interface PackageJsonCloudpackMeta\n extends Omit<\n PackageSettings,\n | 'match'\n | 'exports'\n | 'includedDependencies'\n | 'excludedDependencies'\n // this is deprecated\n | 'bundlerType'\n > {\n /** Controls how the package is bundled. */\n mode: BundleMode;\n\n /**\n * If the package manager is yarn berry (v2+) and the package has been patched with `yarn patch`,\n * this is the path to the patch file relative to the project root (set by `getNonSemverTransform`).\n */\n patchFilePath?: string;\n}\n\n/**\n * Union type which has intellisense for specific keys but also allows arbitrary strings.\n * This is a workaround for a [TypeScript issue](https://github.com/Microsoft/TypeScript/issues/29729)\n */\nexport type LiteralOrString<LiteralType extends string> = LiteralType | (string & Record<never, never>);\n\n/** Conditions which provide a way to resolve a package entry point based on the environment. */\nexport type PackageJsonExportCondition = LiteralOrString<\n | 'browser'\n | 'default'\n | 'deno'\n | 'electron'\n | 'import'\n | 'module'\n | 'node-addons'\n | 'node'\n | 'react-native'\n | 'require'\n>;\n\n/**\n * The value of an `PackageJson.exports` object key. Note at the root of the object, keys can be represented\n * either by a condition, or a `string` to provide import paths (such as \"./foo\"). At subsequent levels\n * within the object, only conditions (string which don't start with \".\") can be used as keys.\n */\nexport type PackageJsonExportsValue =\n | null\n | string\n | { [condition in PackageJsonExportCondition]?: PackageJsonExportsValue }\n | Array<PackageJsonExportsValue>;\n\n/**\n * Definition of the root exports object. Keys can be either conditions or import paths.\n */\nexport type PackageJsonExportsObject = {\n [pathOrCondition: string]: PackageJsonExportsValue;\n};\n\n/** Entry points of a package, optionally with conditions and subpath exports. Used as `PackageJson.exports`. */\nexport type PackageJsonExports = PackageJsonExportsValue | PackageJsonExportsObject | PackageJsonExports[];\n\n/**\n * Mapping from import path to either file path, or a nested object of conditions to file paths\n * (occasionally with two levels of conditions). This is the format used for generated exports maps.\n */\nexport type GeneratedExports = {\n [path: string]:\n | string\n | null\n | {\n [condition: string]: string | { [condition2: string]: string };\n };\n};\n\n// /** Import map entries of a module, optionally with conditions. */\n// export type PackageJsonImports = {\n// [key: `#${string}`]: string | { [key in PackageJsonExportCondition]: PackageJsonExports };\n// };\n\n/** Mapping from dependency name to semver spec. */\nexport type PackageJsonDependencies = Partial<Record<string, string>>;\n"]}
|
package/package.json
CHANGED
package/schema/AppConfig.json
CHANGED
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
},
|
|
66
66
|
"patchFilesGlobPattern": {
|
|
67
67
|
"type": "string",
|
|
68
|
-
"description": "Glob pattern to match `patch-package` patch files, relative to the project root (usually the same as the repository root).",
|
|
68
|
+
"description": "Glob pattern to match `patch-package` patch files, relative to the project root (usually the same as the repository root).\n\nNote that if you're using `yarn patch` (v2+), those patches will be handled automatically (not by this glob pattern).",
|
|
69
69
|
"default": "patches/*.patch"
|
|
70
70
|
},
|
|
71
71
|
"remoteCache": {
|
package/schema/UserConfig.json
CHANGED
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
},
|
|
70
70
|
"patchFilesGlobPattern": {
|
|
71
71
|
"type": "string",
|
|
72
|
-
"description": "Glob pattern to match `patch-package` patch files, relative to the project root (usually the same as the repository root).",
|
|
72
|
+
"description": "Glob pattern to match `patch-package` patch files, relative to the project root (usually the same as the repository root).\n\nNote that if you're using `yarn patch` (v2+), those patches will be handled automatically (not by this glob pattern).",
|
|
73
73
|
"default": "patches/*.patch"
|
|
74
74
|
},
|
|
75
75
|
"remoteCache": {
|