@teambit/dependency-resolver 1.0.916 → 1.0.918
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/dist/dependency-resolver-workspace-config.d.ts +5 -0
- package/dist/dependency-resolver-workspace-config.js.map +1 -1
- package/dist/package-manager.d.ts +4 -0
- package/dist/package-manager.js.map +1 -1
- package/dist/{preview-1774372807628.js → preview-1774447481762.js} +2 -2
- package/package.json +9 -9
|
@@ -119,6 +119,11 @@ export interface DependencyResolverWorkspaceConfig {
|
|
|
119
119
|
* Tells pnpm to automatically install peer dependencies. It is true by default.
|
|
120
120
|
*/
|
|
121
121
|
autoInstallPeers?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* When true (default), pnpm will deduplicate peer dependencies.
|
|
124
|
+
* Set to false to disable peer dependency deduplication.
|
|
125
|
+
*/
|
|
126
|
+
dedupePeers?: boolean;
|
|
122
127
|
/**
|
|
123
128
|
* When true (default), env peer dependencies defined in env.jsonc are resolved once and merged
|
|
124
129
|
* into the workspace root manifest as regular dependencies, instead of being injected into each
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["dependency-resolver-workspace-config.ts"],"sourcesContent":["import type { PeerDependencyRules } from '@pnpm/types';\nimport type { WorkspacePolicyConfigObject } from './policy';\nimport type { PackageImportMethod } from './package-manager';\n\nexport type NodeLinker = 'hoisted' | 'isolated';\n\nexport type ComponentRangePrefix = '~' | '^' | '+' | '-';\n\nexport interface DependencyResolverWorkspaceConfig {\n policy: WorkspacePolicyConfigObject;\n /**\n * choose the package manager for Bit to use. you can choose between 'npm', 'yarn', 'pnpm'\n * and 'librarian'. our recommendation is use 'librarian' which reduces package duplicates\n * and totally removes the need of a 'node_modules' directory in your project.\n */\n packageManager?: string;\n\n /**\n * A proxy server for out going network requests by the package manager\n * Used for both http and https requests (unless the httpsProxy is defined)\n */\n proxy?: string;\n\n /**\n * A proxy server for outgoing https requests by the package manager (fallback to proxy server if not defined)\n * Use this in case you want different proxy for http and https requests.\n */\n httpsProxy?: string;\n\n /**\n * A path to a file containing one or multiple Certificate Authority signing certificates.\n * allows for multiple CA's, as well as for the CA information to be stored in a file on disk.\n */\n ca?: string;\n\n /**\n * Whether or not to do SSL key validation when making requests to the registry via https\n */\n strictSsl?: string;\n\n /**\n * A client certificate to pass when accessing the registry. Values should be in PEM format (Windows calls it \"Base-64 encoded X.509 (.CER)\") with newlines replaced by the string \"\\n\". For example:\n * cert=\"----BEGIN CERTIFICATE-----\\nXXXX\\nXXXX\\n-----END CERTIFICATE----\"\n * It is not the path to a certificate file (and there is no \"certfile\" option).\n */\n cert?: string;\n\n /**\n * A client key to pass when accessing the registry. Values should be in PEM format with newlines replaced by the string \"\\n\". For example:\n * key=\"----BEGIN PRIVATE KEY-----\\nXXXX\\nXXXX\\n-----END PRIVATE KEY----\"\n * It is not the path to a key file (and there is no \"keyfile\" option).\n */\n key?: string;\n\n /**\n * A comma-separated string of domain extensions that a proxy should not be used for.\n */\n noProxy?: string;\n\n /**\n * The IP address of the local interface to use when making connections to the npm registry.\n */\n localAddress?: string;\n\n /**\n * How many times to retry if Bit fails to fetch from the registry.\n */\n fetchRetries?: number;\n\n /*\n * The exponential factor for retry backoff.\n */\n fetchRetryFactor?: number;\n\n /*\n * The minimum (base) timeout for retrying requests.\n */\n fetchRetryMintimeout?: number;\n\n /*\n * The maximum fallback timeout to ensure the retry factor does not make requests too long.\n */\n fetchRetryMaxtimeout?: number;\n\n /*\n * The maximum amount of time (in milliseconds) to wait for HTTP requests to complete.\n */\n fetchTimeout?: number;\n\n /*\n * The maximum number of connections to use per origin (protocol/host/port combination).\n */\n maxSockets?: number;\n\n /*\n * Controls the maximum number of HTTP(S) requests to process simultaneously.\n */\n networkConcurrency?: number;\n\n /*\n * Set the prefix to use when adding dependency to workspace.jsonc via bit install\n * to lock version to exact version you can use empty string (default)\n */\n savePrefix?: string;\n\n /*\n * in case you want to disable this proxy set this config to false\n *\n */\n installFromBitDevRegistry?: boolean;\n\n /*\n * map of extra arguments to pass to the configured package manager upon the installation\n * of dependencies.\n */\n packageManagerArgs?: string[];\n\n /*\n * This field allows to instruct the package manager to override any dependency in the dependency graph.\n * This is useful to enforce all your packages to use a single version of a dependency, backport a fix,\n * or replace a dependency with a fork.\n */\n overrides?: Record<string, string>;\n\n /**\n * This is similar to overrides, but will only affect installation in capsules.\n * In case overrides is configured and this not, the regular overrides will affect capsules as well.\n * in case both configured, capsulesOverrides will be used for capsules, and overrides will affect the workspace.\n */\n capsulesOverrides?: Record<string, string>;\n\n /*\n * Defines what linker should be used for installing Node.js packages.\n * Supported values are hoisted and isolated.\n */\n nodeLinker?: NodeLinker;\n\n /*\n * Controls the way packages are imported from the store.\n */\n packageImportMethod?: PackageImportMethod;\n\n /*\n * Use and cache the results of (pre/post)install hooks.\n */\n sideEffectsCache?: boolean;\n\n /*\n * The list of components that should be installed in isolation from the workspace.\n * The component's package names should be used in this list, not their component IDs.\n */\n rootComponents?: boolean;\n\n /*\n * The node version to use when checking a package's engines setting.\n */\n nodeVersion?: string;\n\n /*\n * Refuse to install any package that claims to not be compatible with the current Node.js version.\n */\n engineStrict?: boolean;\n\n /*\n * Rules to mute specific peer dependeny warnings.\n */\n peerDependencyRules?: PeerDependencyRules;\n\n /*\n * This setting is \"true\" by default and tells bit to link core aspects to the node_modules of the workspace.\n * It only makes sense to set this to \"false\" in a workspace in which core aspects are actually developed.\n */\n linkCoreAspects?: boolean;\n\n /**\n * When false, Bit will create a shared node_modules directory for all components in a capsule.\n */\n isolatedCapsules?: boolean;\n\n /**\n * Ignore the builds of specific dependencies. The \"preinstall\", \"install\", and \"postinstall\" scripts\n * of the listed packages will not be executed during installation.\n */\n neverBuiltDependencies?: string[];\n\n /**\n * Fine-grained control over dependency lifecycle scripts. Allows explicitly permitting (true), blocking (false), or warning ('warn')\n * for specific dependencies' \"preinstall\", \"install\", and \"postinstall\" scripts during installation.\n */\n allowScripts?: Record<string, boolean | 'warn'>;\n\n /**\n * Set this to true in order to allow all dependencies to run install scripts.\n */\n dangerouslyAllowAllScripts?: boolean;\n\n /**\n * If true, staleness checks for cached data will be bypassed, but missing data will be requested from the server.\n */\n preferOffline?: boolean;\n\n /**\n * When true, components in capsules are symlinked into their own node_modules.\n */\n capsuleSelfReference?: boolean;\n\n /**\n * Tells pnpm which packages should be hoisted to node_modules/.pnpm/node_modules.\n * By default, all packages are hoisted - however, if you know that only some flawed packages have phantom dependencies,\n * you can use this option to exclusively hoist the phantom dependencies (recommended).\n */\n hoistPatterns?: string[];\n\n /**\n * When true, dependencies from the workspace are hoisted to node_modules/.pnpm/node_modules\n * even if they are found in the root node_modules\n */\n hoistInjectedDependencies?: boolean;\n\n /**\n * Tells pnpm to automatically install peer dependencies. It is true by default.\n */\n autoInstallPeers?: boolean;\n\n /**\n * When true (default), env peer dependencies defined in env.jsonc are resolved once and merged\n * into the workspace root manifest as regular dependencies, instead of being injected into each\n * component's manifest individually. Conflicts between envs are resolved by picking the version\n * that satisfies the most envs, with a warning logged for any conflicts.\n * Set to false to revert to the legacy per-component env peer injection behavior.\n */\n resolveEnvPeersFromRoot?: boolean;\n\n /**\n * When true, ALL env peer dependencies are forced to the workspace root manifest,\n * even when different envs specify conflicting versions. The best version is chosen\n * (satisfying the most envs) and a warning is logged for unsatisfied envs.\n * When false (default), conflicting peers without `workspaceSingleton` are injected\n * per-component, allowing different envs to use different versions.\n * Only applies when resolveEnvPeersFromRoot is true.\n */\n forceEnvPeersToRoot?: boolean;\n\n /**\n * By default, Bit saves component dependencies with exact versions (pinned) in the package.json,\n * even if the dependency-resolver policy specifies a version range.\n *\n * To preserve the range defined in the policy, set this value to \"+\".\n * To apply a predefined range (\"~\" or \"^\") to other component dependencies not covered by the policy,\n * set this to the desired range symbol.\n */\n componentRangePrefix?: ComponentRangePrefix;\n\n externalPackageManager?: boolean;\n\n /**\n * Defines the minimum number of minutes that must pass after a version is published before pnpm will install it.\n * This applies to all dependencies, including transitive ones.\n */\n minimumReleaseAge?: number;\n\n /**\n * If you set minimumReleaseAge but need certain dependencies to always install the newest version immediately,\n * you can list them under minimumReleaseAgeExclude. The exclusion works by package name or package name pattern\n * and applies to all versions of that package.\n */\n minimumReleaseAgeExclude?: string[];\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["dependency-resolver-workspace-config.ts"],"sourcesContent":["import type { PeerDependencyRules } from '@pnpm/types';\nimport type { WorkspacePolicyConfigObject } from './policy';\nimport type { PackageImportMethod } from './package-manager';\n\nexport type NodeLinker = 'hoisted' | 'isolated';\n\nexport type ComponentRangePrefix = '~' | '^' | '+' | '-';\n\nexport interface DependencyResolverWorkspaceConfig {\n policy: WorkspacePolicyConfigObject;\n /**\n * choose the package manager for Bit to use. you can choose between 'npm', 'yarn', 'pnpm'\n * and 'librarian'. our recommendation is use 'librarian' which reduces package duplicates\n * and totally removes the need of a 'node_modules' directory in your project.\n */\n packageManager?: string;\n\n /**\n * A proxy server for out going network requests by the package manager\n * Used for both http and https requests (unless the httpsProxy is defined)\n */\n proxy?: string;\n\n /**\n * A proxy server for outgoing https requests by the package manager (fallback to proxy server if not defined)\n * Use this in case you want different proxy for http and https requests.\n */\n httpsProxy?: string;\n\n /**\n * A path to a file containing one or multiple Certificate Authority signing certificates.\n * allows for multiple CA's, as well as for the CA information to be stored in a file on disk.\n */\n ca?: string;\n\n /**\n * Whether or not to do SSL key validation when making requests to the registry via https\n */\n strictSsl?: string;\n\n /**\n * A client certificate to pass when accessing the registry. Values should be in PEM format (Windows calls it \"Base-64 encoded X.509 (.CER)\") with newlines replaced by the string \"\\n\". For example:\n * cert=\"----BEGIN CERTIFICATE-----\\nXXXX\\nXXXX\\n-----END CERTIFICATE----\"\n * It is not the path to a certificate file (and there is no \"certfile\" option).\n */\n cert?: string;\n\n /**\n * A client key to pass when accessing the registry. Values should be in PEM format with newlines replaced by the string \"\\n\". For example:\n * key=\"----BEGIN PRIVATE KEY-----\\nXXXX\\nXXXX\\n-----END PRIVATE KEY----\"\n * It is not the path to a key file (and there is no \"keyfile\" option).\n */\n key?: string;\n\n /**\n * A comma-separated string of domain extensions that a proxy should not be used for.\n */\n noProxy?: string;\n\n /**\n * The IP address of the local interface to use when making connections to the npm registry.\n */\n localAddress?: string;\n\n /**\n * How many times to retry if Bit fails to fetch from the registry.\n */\n fetchRetries?: number;\n\n /*\n * The exponential factor for retry backoff.\n */\n fetchRetryFactor?: number;\n\n /*\n * The minimum (base) timeout for retrying requests.\n */\n fetchRetryMintimeout?: number;\n\n /*\n * The maximum fallback timeout to ensure the retry factor does not make requests too long.\n */\n fetchRetryMaxtimeout?: number;\n\n /*\n * The maximum amount of time (in milliseconds) to wait for HTTP requests to complete.\n */\n fetchTimeout?: number;\n\n /*\n * The maximum number of connections to use per origin (protocol/host/port combination).\n */\n maxSockets?: number;\n\n /*\n * Controls the maximum number of HTTP(S) requests to process simultaneously.\n */\n networkConcurrency?: number;\n\n /*\n * Set the prefix to use when adding dependency to workspace.jsonc via bit install\n * to lock version to exact version you can use empty string (default)\n */\n savePrefix?: string;\n\n /*\n * in case you want to disable this proxy set this config to false\n *\n */\n installFromBitDevRegistry?: boolean;\n\n /*\n * map of extra arguments to pass to the configured package manager upon the installation\n * of dependencies.\n */\n packageManagerArgs?: string[];\n\n /*\n * This field allows to instruct the package manager to override any dependency in the dependency graph.\n * This is useful to enforce all your packages to use a single version of a dependency, backport a fix,\n * or replace a dependency with a fork.\n */\n overrides?: Record<string, string>;\n\n /**\n * This is similar to overrides, but will only affect installation in capsules.\n * In case overrides is configured and this not, the regular overrides will affect capsules as well.\n * in case both configured, capsulesOverrides will be used for capsules, and overrides will affect the workspace.\n */\n capsulesOverrides?: Record<string, string>;\n\n /*\n * Defines what linker should be used for installing Node.js packages.\n * Supported values are hoisted and isolated.\n */\n nodeLinker?: NodeLinker;\n\n /*\n * Controls the way packages are imported from the store.\n */\n packageImportMethod?: PackageImportMethod;\n\n /*\n * Use and cache the results of (pre/post)install hooks.\n */\n sideEffectsCache?: boolean;\n\n /*\n * The list of components that should be installed in isolation from the workspace.\n * The component's package names should be used in this list, not their component IDs.\n */\n rootComponents?: boolean;\n\n /*\n * The node version to use when checking a package's engines setting.\n */\n nodeVersion?: string;\n\n /*\n * Refuse to install any package that claims to not be compatible with the current Node.js version.\n */\n engineStrict?: boolean;\n\n /*\n * Rules to mute specific peer dependeny warnings.\n */\n peerDependencyRules?: PeerDependencyRules;\n\n /*\n * This setting is \"true\" by default and tells bit to link core aspects to the node_modules of the workspace.\n * It only makes sense to set this to \"false\" in a workspace in which core aspects are actually developed.\n */\n linkCoreAspects?: boolean;\n\n /**\n * When false, Bit will create a shared node_modules directory for all components in a capsule.\n */\n isolatedCapsules?: boolean;\n\n /**\n * Ignore the builds of specific dependencies. The \"preinstall\", \"install\", and \"postinstall\" scripts\n * of the listed packages will not be executed during installation.\n */\n neverBuiltDependencies?: string[];\n\n /**\n * Fine-grained control over dependency lifecycle scripts. Allows explicitly permitting (true), blocking (false), or warning ('warn')\n * for specific dependencies' \"preinstall\", \"install\", and \"postinstall\" scripts during installation.\n */\n allowScripts?: Record<string, boolean | 'warn'>;\n\n /**\n * Set this to true in order to allow all dependencies to run install scripts.\n */\n dangerouslyAllowAllScripts?: boolean;\n\n /**\n * If true, staleness checks for cached data will be bypassed, but missing data will be requested from the server.\n */\n preferOffline?: boolean;\n\n /**\n * When true, components in capsules are symlinked into their own node_modules.\n */\n capsuleSelfReference?: boolean;\n\n /**\n * Tells pnpm which packages should be hoisted to node_modules/.pnpm/node_modules.\n * By default, all packages are hoisted - however, if you know that only some flawed packages have phantom dependencies,\n * you can use this option to exclusively hoist the phantom dependencies (recommended).\n */\n hoistPatterns?: string[];\n\n /**\n * When true, dependencies from the workspace are hoisted to node_modules/.pnpm/node_modules\n * even if they are found in the root node_modules\n */\n hoistInjectedDependencies?: boolean;\n\n /**\n * Tells pnpm to automatically install peer dependencies. It is true by default.\n */\n autoInstallPeers?: boolean;\n\n /**\n * When true (default), pnpm will deduplicate peer dependencies.\n * Set to false to disable peer dependency deduplication.\n */\n dedupePeers?: boolean;\n\n /**\n * When true (default), env peer dependencies defined in env.jsonc are resolved once and merged\n * into the workspace root manifest as regular dependencies, instead of being injected into each\n * component's manifest individually. Conflicts between envs are resolved by picking the version\n * that satisfies the most envs, with a warning logged for any conflicts.\n * Set to false to revert to the legacy per-component env peer injection behavior.\n */\n resolveEnvPeersFromRoot?: boolean;\n\n /**\n * When true, ALL env peer dependencies are forced to the workspace root manifest,\n * even when different envs specify conflicting versions. The best version is chosen\n * (satisfying the most envs) and a warning is logged for unsatisfied envs.\n * When false (default), conflicting peers without `workspaceSingleton` are injected\n * per-component, allowing different envs to use different versions.\n * Only applies when resolveEnvPeersFromRoot is true.\n */\n forceEnvPeersToRoot?: boolean;\n\n /**\n * By default, Bit saves component dependencies with exact versions (pinned) in the package.json,\n * even if the dependency-resolver policy specifies a version range.\n *\n * To preserve the range defined in the policy, set this value to \"+\".\n * To apply a predefined range (\"~\" or \"^\") to other component dependencies not covered by the policy,\n * set this to the desired range symbol.\n */\n componentRangePrefix?: ComponentRangePrefix;\n\n externalPackageManager?: boolean;\n\n /**\n * Defines the minimum number of minutes that must pass after a version is published before pnpm will install it.\n * This applies to all dependencies, including transitive ones.\n */\n minimumReleaseAge?: number;\n\n /**\n * If you set minimumReleaseAge but need certain dependencies to always install the newest version immediately,\n * you can list them under minimumReleaseAgeExclude. The exclusion works by package name or package name pattern\n * and applies to all versions of that package.\n */\n minimumReleaseAgeExclude?: string[];\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -88,6 +88,10 @@ export type PackageManagerInstallOptions = {
|
|
|
88
88
|
* Tells pnpm to automatically install peer dependencies. It is true by default.
|
|
89
89
|
*/
|
|
90
90
|
autoInstallPeers?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* When true, pnpm will deduplicate peer dependencies where possible. It is enabled by default.
|
|
93
|
+
*/
|
|
94
|
+
dedupePeers?: boolean;
|
|
91
95
|
/**
|
|
92
96
|
* Tells the package manager to return the list of dependencies that has to be built.
|
|
93
97
|
* This is used by Ripple CI.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","data","require"],"sources":["package-manager.ts"],"sourcesContent":["import { PeerDependencyIssuesByProjects } from '@pnpm/core';\nimport type { PeerDependencyRules, ProjectManifest, DependencyManifest } from '@pnpm/types';\nimport type { ComponentID, ComponentMap, Component } from '@teambit/component';\nimport { type DependenciesGraph } from '@teambit/objects';\nimport type { Registries } from '@teambit/pkg.entities.registry';\nimport type { DepsFilterFn } from './manifest';\nimport type { NetworkConfig, ProxyConfig } from './dependency-resolver.main.runtime';\n\nexport { PeerDependencyIssuesByProjects };\n\nexport type PackageImportMethod = 'auto' | 'hardlink' | 'copy' | 'clone';\n\nexport type PackageManagerInstallOptions = {\n cacheRootDir?: string;\n /**\n * decide whether to dedup dependencies.\n */\n dedupe?: boolean;\n\n copyPeerToRuntimeOnRoot?: boolean;\n\n copyPeerToRuntimeOnComponents?: boolean;\n\n excludeLinksFromLockfile?: boolean;\n\n installPeersFromEnvs?: boolean;\n\n resolveEnvPeersFromRoot?: boolean;\n\n dependencyFilterFn?: DepsFilterFn;\n\n overrides?: Record<string, string>;\n\n lockfileOnly?: boolean;\n\n /**\n * When false, the package manager will not write the node_modules directory\n */\n enableModulesDir?: boolean;\n\n nodeLinker?: 'hoisted' | 'isolated';\n\n packageManagerConfigRootDir?: string;\n\n packageImportMethod?: PackageImportMethod;\n\n rootComponents?: boolean;\n\n rootComponentsForCapsules?: boolean;\n\n useNesting?: boolean;\n\n keepExistingModulesDir?: boolean;\n\n sideEffectsCache?: boolean;\n\n engineStrict?: boolean;\n\n nodeVersion?: string;\n\n peerDependencyRules?: PeerDependencyRules;\n\n includeOptionalDeps?: boolean;\n\n updateAll?: boolean;\n\n hidePackageManagerOutput?: boolean;\n\n pruneNodeModules?: boolean;\n\n hasRootComponents?: boolean;\n\n neverBuiltDependencies?: string[];\n\n allowScripts?: Record<string, boolean | 'warn'>;\n\n dangerouslyAllowAllScripts?: boolean;\n\n preferOffline?: boolean;\n\n nmSelfReferences?: boolean;\n\n /**\n * e.g. when running `bit install` through the web or the IDE, not from the CLI.\n */\n optimizeReportForNonTerminal?: boolean;\n\n /**\n * Sets the frequency of updating the progress output in milliseconds.\n * E.g., if this is set to 1000, then the progress will be updated every second.\n */\n throttleProgress?: number;\n\n hideProgressPrefix?: boolean;\n\n hideLifecycleOutput?: boolean;\n\n /**\n * Do installation using lockfile only. Ignore the component manifests.\n */\n ignorePackageManifest?: boolean;\n\n /**\n * When enabled, installation by the package manager will be skipped\n * but all the options will be calculated and the rebuild function will be returned.\n * We use this option for a performance optimization in Ripple CI.\n */\n dryRun?: boolean;\n\n dedupeInjectedDeps?: boolean;\n\n /**\n * When this is set to true, pnpm will hoist workspace packages to node_modules/.pnpm/node_modules.\n * This is something we need in capsules.\n */\n hoistWorkspacePackages?: boolean;\n\n /**\n * Tells pnpm which packages should be hoisted to node_modules/.pnpm/node_modules.\n * By default, all packages are hoisted - however, if you know that only some flawed packages have phantom dependencies,\n * you can use this option to exclusively hoist the phantom dependencies (recommended).\n */\n hoistPatterns?: string[];\n\n /**\n * When true, dependencies from the workspace are hoisted to node_modules/.pnpm/node_modules\n * even if they are found in the root node_modules\n */\n hoistInjectedDependencies?: boolean;\n\n /**\n * Tells pnpm to automatically install peer dependencies. It is true by default.\n */\n autoInstallPeers?: boolean;\n\n /**\n * Tells the package manager to return the list of dependencies that has to be built.\n * This is used by Ripple CI.\n */\n returnListOfDepsRequiringBuild?: boolean;\n\n dependenciesGraph?: DependenciesGraph;\n\n forcedHarmonyVersion?: string;\n\n /**\n * Defines the minimum number of minutes that must pass after a version is published before pnpm will install it.\n * This applies to all dependencies, including transitive ones.\n */\n minimumReleaseAge?: number;\n\n /**\n * If you set minimumReleaseAge but need certain dependencies to always install the newest version immediately,\n * you can list them under minimumReleaseAgeExclude. The exclusion works by package name or package name pattern\n * and applies to all versions of that package.\n */\n minimumReleaseAgeExclude?: string[];\n};\n\nexport type PackageManagerGetPeerDependencyIssuesOptions = PackageManagerInstallOptions;\n\nexport type ResolvedPackageVersion = {\n packageName: string;\n version: string | null;\n wantedRange?: string;\n isSemver: boolean;\n resolvedVia?: string;\n manifest?: DependencyManifest;\n};\n\nexport type PackageManagerResolveRemoteVersionOptions = {\n rootDir: string;\n cacheRootDir?: string;\n packageManagerConfigRootDir?: string;\n fullMetadata?: boolean;\n // fetchToCache?: boolean;\n // update?: boolean;\n};\n\nexport interface InstallationContext {\n rootDir: string;\n manifests: Record<string, ProjectManifest>;\n componentDirectoryMap: ComponentMap<string>;\n}\n\nexport interface PackageManager {\n /**\n * Name of the package manager\n */\n name: string;\n /**\n * install dependencies\n * @param componentDirectoryMap\n */\n install(\n context: InstallationContext,\n options: PackageManagerInstallOptions\n ): Promise<{ dependenciesChanged: boolean }>;\n\n pruneModules?(rootDir: string): Promise<void>;\n\n resolveRemoteVersion(\n packageName: string,\n options: PackageManagerResolveRemoteVersionOptions\n ): Promise<ResolvedPackageVersion>;\n\n getPeerDependencyIssues?(\n rootDir: string,\n manifests: Record<string, ProjectManifest>,\n options: PackageManagerGetPeerDependencyIssuesOptions\n ): Promise<PeerDependencyIssuesByProjects>;\n\n getInjectedDirs?(rootDir: string, componentDir: string, packageName: string): Promise<string[]>;\n\n getRegistries?(): Promise<Registries>;\n\n getProxyConfig?(): Promise<ProxyConfig>;\n\n getNetworkConfig?(): Promise<NetworkConfig>;\n\n /**\n * Specify if the package manager can be run with deduping on existing worksapce (which already contains root dependencies)\n * again, with a different context.\n * If the package manager is not capable of doing so, we want to disable the deduping.\n */\n supportsDedupingOnExistingRoot?: () => boolean;\n\n /**\n * Returns \"dependencies\" entries for \".bit_roots\".\n * These entries tell the package manager from where to the local components should be installed.\n */\n getWorkspaceDepsOfBitRoots(manifests: ProjectManifest[]): Record<string, string>;\n\n findUsages?(depName: string, opts: { lockfileDir: string; depth?: number }): Promise<string>;\n\n calcDependenciesGraph?(options: CalcDepsGraphOptions): Promise<void>;\n}\n\nexport interface CalcDepsGraphForComponentOptions {\n component: Component;\n componentRootDir?: string;\n componentRelativeDir: string;\n pkgName?: string;\n}\n\nexport interface CalcDepsGraphOptions {\n components: CalcDepsGraphForComponentOptions[];\n componentIdByPkgName: ComponentIdByPkgName;\n rootDir: string;\n}\n\nexport type ComponentIdByPkgName = Map<string, ComponentID>;\n"],"mappings":";;;;;;;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_core","data","require"],"sources":["package-manager.ts"],"sourcesContent":["import { PeerDependencyIssuesByProjects } from '@pnpm/core';\nimport type { PeerDependencyRules, ProjectManifest, DependencyManifest } from '@pnpm/types';\nimport type { ComponentID, ComponentMap, Component } from '@teambit/component';\nimport { type DependenciesGraph } from '@teambit/objects';\nimport type { Registries } from '@teambit/pkg.entities.registry';\nimport type { DepsFilterFn } from './manifest';\nimport type { NetworkConfig, ProxyConfig } from './dependency-resolver.main.runtime';\n\nexport { PeerDependencyIssuesByProjects };\n\nexport type PackageImportMethod = 'auto' | 'hardlink' | 'copy' | 'clone';\n\nexport type PackageManagerInstallOptions = {\n cacheRootDir?: string;\n /**\n * decide whether to dedup dependencies.\n */\n dedupe?: boolean;\n\n copyPeerToRuntimeOnRoot?: boolean;\n\n copyPeerToRuntimeOnComponents?: boolean;\n\n excludeLinksFromLockfile?: boolean;\n\n installPeersFromEnvs?: boolean;\n\n resolveEnvPeersFromRoot?: boolean;\n\n dependencyFilterFn?: DepsFilterFn;\n\n overrides?: Record<string, string>;\n\n lockfileOnly?: boolean;\n\n /**\n * When false, the package manager will not write the node_modules directory\n */\n enableModulesDir?: boolean;\n\n nodeLinker?: 'hoisted' | 'isolated';\n\n packageManagerConfigRootDir?: string;\n\n packageImportMethod?: PackageImportMethod;\n\n rootComponents?: boolean;\n\n rootComponentsForCapsules?: boolean;\n\n useNesting?: boolean;\n\n keepExistingModulesDir?: boolean;\n\n sideEffectsCache?: boolean;\n\n engineStrict?: boolean;\n\n nodeVersion?: string;\n\n peerDependencyRules?: PeerDependencyRules;\n\n includeOptionalDeps?: boolean;\n\n updateAll?: boolean;\n\n hidePackageManagerOutput?: boolean;\n\n pruneNodeModules?: boolean;\n\n hasRootComponents?: boolean;\n\n neverBuiltDependencies?: string[];\n\n allowScripts?: Record<string, boolean | 'warn'>;\n\n dangerouslyAllowAllScripts?: boolean;\n\n preferOffline?: boolean;\n\n nmSelfReferences?: boolean;\n\n /**\n * e.g. when running `bit install` through the web or the IDE, not from the CLI.\n */\n optimizeReportForNonTerminal?: boolean;\n\n /**\n * Sets the frequency of updating the progress output in milliseconds.\n * E.g., if this is set to 1000, then the progress will be updated every second.\n */\n throttleProgress?: number;\n\n hideProgressPrefix?: boolean;\n\n hideLifecycleOutput?: boolean;\n\n /**\n * Do installation using lockfile only. Ignore the component manifests.\n */\n ignorePackageManifest?: boolean;\n\n /**\n * When enabled, installation by the package manager will be skipped\n * but all the options will be calculated and the rebuild function will be returned.\n * We use this option for a performance optimization in Ripple CI.\n */\n dryRun?: boolean;\n\n dedupeInjectedDeps?: boolean;\n\n /**\n * When this is set to true, pnpm will hoist workspace packages to node_modules/.pnpm/node_modules.\n * This is something we need in capsules.\n */\n hoistWorkspacePackages?: boolean;\n\n /**\n * Tells pnpm which packages should be hoisted to node_modules/.pnpm/node_modules.\n * By default, all packages are hoisted - however, if you know that only some flawed packages have phantom dependencies,\n * you can use this option to exclusively hoist the phantom dependencies (recommended).\n */\n hoistPatterns?: string[];\n\n /**\n * When true, dependencies from the workspace are hoisted to node_modules/.pnpm/node_modules\n * even if they are found in the root node_modules\n */\n hoistInjectedDependencies?: boolean;\n\n /**\n * Tells pnpm to automatically install peer dependencies. It is true by default.\n */\n autoInstallPeers?: boolean;\n\n /**\n * When true, pnpm will deduplicate peer dependencies where possible. It is enabled by default.\n */\n dedupePeers?: boolean;\n\n /**\n * Tells the package manager to return the list of dependencies that has to be built.\n * This is used by Ripple CI.\n */\n returnListOfDepsRequiringBuild?: boolean;\n\n dependenciesGraph?: DependenciesGraph;\n\n forcedHarmonyVersion?: string;\n\n /**\n * Defines the minimum number of minutes that must pass after a version is published before pnpm will install it.\n * This applies to all dependencies, including transitive ones.\n */\n minimumReleaseAge?: number;\n\n /**\n * If you set minimumReleaseAge but need certain dependencies to always install the newest version immediately,\n * you can list them under minimumReleaseAgeExclude. The exclusion works by package name or package name pattern\n * and applies to all versions of that package.\n */\n minimumReleaseAgeExclude?: string[];\n};\n\nexport type PackageManagerGetPeerDependencyIssuesOptions = PackageManagerInstallOptions;\n\nexport type ResolvedPackageVersion = {\n packageName: string;\n version: string | null;\n wantedRange?: string;\n isSemver: boolean;\n resolvedVia?: string;\n manifest?: DependencyManifest;\n};\n\nexport type PackageManagerResolveRemoteVersionOptions = {\n rootDir: string;\n cacheRootDir?: string;\n packageManagerConfigRootDir?: string;\n fullMetadata?: boolean;\n // fetchToCache?: boolean;\n // update?: boolean;\n};\n\nexport interface InstallationContext {\n rootDir: string;\n manifests: Record<string, ProjectManifest>;\n componentDirectoryMap: ComponentMap<string>;\n}\n\nexport interface PackageManager {\n /**\n * Name of the package manager\n */\n name: string;\n /**\n * install dependencies\n * @param componentDirectoryMap\n */\n install(\n context: InstallationContext,\n options: PackageManagerInstallOptions\n ): Promise<{ dependenciesChanged: boolean }>;\n\n pruneModules?(rootDir: string): Promise<void>;\n\n resolveRemoteVersion(\n packageName: string,\n options: PackageManagerResolveRemoteVersionOptions\n ): Promise<ResolvedPackageVersion>;\n\n getPeerDependencyIssues?(\n rootDir: string,\n manifests: Record<string, ProjectManifest>,\n options: PackageManagerGetPeerDependencyIssuesOptions\n ): Promise<PeerDependencyIssuesByProjects>;\n\n getInjectedDirs?(rootDir: string, componentDir: string, packageName: string): Promise<string[]>;\n\n getRegistries?(): Promise<Registries>;\n\n getProxyConfig?(): Promise<ProxyConfig>;\n\n getNetworkConfig?(): Promise<NetworkConfig>;\n\n /**\n * Specify if the package manager can be run with deduping on existing worksapce (which already contains root dependencies)\n * again, with a different context.\n * If the package manager is not capable of doing so, we want to disable the deduping.\n */\n supportsDedupingOnExistingRoot?: () => boolean;\n\n /**\n * Returns \"dependencies\" entries for \".bit_roots\".\n * These entries tell the package manager from where to the local components should be installed.\n */\n getWorkspaceDepsOfBitRoots(manifests: ProjectManifest[]): Record<string, string>;\n\n findUsages?(depName: string, opts: { lockfileDir: string; depth?: number }): Promise<string>;\n\n calcDependenciesGraph?(options: CalcDepsGraphOptions): Promise<void>;\n}\n\nexport interface CalcDepsGraphForComponentOptions {\n component: Component;\n componentRootDir?: string;\n componentRelativeDir: string;\n pkgName?: string;\n}\n\nexport interface CalcDepsGraphOptions {\n components: CalcDepsGraphForComponentOptions[];\n componentIdByPkgName: ComponentIdByPkgName;\n rootDir: string;\n}\n\nexport type ComponentIdByPkgName = Map<string, ComponentID>;\n"],"mappings":";;;;;;;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.dependencies_dependency-resolver@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.dependencies_dependency-resolver@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.dependencies_dependency-resolver@1.0.918/dist/dependency-resolver.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.dependencies_dependency-resolver@1.0.918/dist/dependency-resolver.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/dependency-resolver",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.918",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/dependencies/dependency-resolver",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.dependencies",
|
|
8
8
|
"name": "dependency-resolver",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.918"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "4.1.2",
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
"lodash": "4.17.21",
|
|
19
19
|
"resolve-from": "5.0.0",
|
|
20
20
|
"graphql-tag": "2.12.1",
|
|
21
|
-
"@pnpm/npm-resolver": "1005.2.
|
|
21
|
+
"@pnpm/npm-resolver": "1005.2.3",
|
|
22
22
|
"comment-json": "4.2.5",
|
|
23
23
|
"multimatch": "5.0.0",
|
|
24
24
|
"semver": "7.7.1",
|
|
25
25
|
"p-limit": "3.1.0",
|
|
26
|
-
"@pnpm/core": "1016.
|
|
26
|
+
"@pnpm/core": "1016.2.0",
|
|
27
27
|
"semver-intersect": "1.4.0",
|
|
28
28
|
"semver-range-intersect": "0.3.1",
|
|
29
29
|
"@teambit/logger": "0.0.1397",
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
"@teambit/legacy.consumer-config": "0.0.102",
|
|
56
56
|
"@teambit/toolbox.crypto.sha1": "0.0.15",
|
|
57
57
|
"@teambit/toolbox.object.sorter": "0.0.2",
|
|
58
|
-
"@teambit/component": "1.0.
|
|
59
|
-
"@teambit/envs": "1.0.
|
|
60
|
-
"@teambit/aspect-loader": "1.0.
|
|
61
|
-
"@teambit/objects": "0.0.
|
|
62
|
-
"@teambit/graphql": "1.0.
|
|
58
|
+
"@teambit/component": "1.0.918",
|
|
59
|
+
"@teambit/envs": "1.0.918",
|
|
60
|
+
"@teambit/aspect-loader": "1.0.918",
|
|
61
|
+
"@teambit/objects": "0.0.425",
|
|
62
|
+
"@teambit/graphql": "1.0.918"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@types/fs-extra": "9.0.7",
|