@teambit/dependency-resolver 1.0.410 → 1.0.411
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.
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<testsuites tests="50" failures="0" errors="0" skipped="0">
|
|
3
|
-
<testsuite name="teambit.dependencies/dependency-resolver@1.0.
|
|
4
|
-
<testcase classname="update-dependency-version.spec.js" name="should pick version from root policy, when no variation policy is present" time="0.
|
|
5
|
-
<testcase classname="validate-env-policy.spec.js" name="should throw an exception if peer supportedRange is empty" time="0.
|
|
6
|
-
<testcase classname="validate-env-policy.spec.js" name="should throw an exception if peer supportedRange is null"/>
|
|
3
|
+
<testsuite name="teambit.dependencies/dependency-resolver@1.0.411" timestamp="2024-09-19T04:01:22.047Z" tests="50" failures="0" errors="0" skipped="0">
|
|
4
|
+
<testcase classname="update-dependency-version.spec.js" name="should pick version from root policy, when no variation policy is present" time="0.025"/>
|
|
5
|
+
<testcase classname="validate-env-policy.spec.js" name="should throw an exception if peer supportedRange is empty" time="0.06"/>
|
|
6
|
+
<testcase classname="validate-env-policy.spec.js" name="should throw an exception if peer supportedRange is null" time="0.001"/>
|
|
7
7
|
<testcase classname="validate-env-policy.spec.js" name="should throw an exception if peer version is empty" time="0.001"/>
|
|
8
8
|
<testcase classname="validate-env-policy.spec.js" name="should throw an exception if peer version is null"/>
|
|
9
|
-
<testcase classname="apply-updates.spec.js" name="should apply updates on root dependencies" time="0.
|
|
10
|
-
<testcase classname="apply-updates.spec.js" name="should apply updates on variant dependencies" time="0.
|
|
11
|
-
<testcase classname="apply-updates.spec.js" name="should apply updates on component dependencies" time="0.
|
|
12
|
-
<testcase classname="get-all-policy-pkgs.spec.js" name="should read the version from a version object" time="0.
|
|
13
|
-
<testcase classname="get-all-policy-pkgs.spec.js" name="should deduplicate dependencies that are present in root policies" time="0.
|
|
14
|
-
<testcase classname="hoist-dependencies.spec.js" name="the root manifest should have the preserved version" time="0.
|
|
9
|
+
<testcase classname="apply-updates.spec.js" name="should apply updates on root dependencies" time="0.079"/>
|
|
10
|
+
<testcase classname="apply-updates.spec.js" name="should apply updates on variant dependencies" time="0.001"/>
|
|
11
|
+
<testcase classname="apply-updates.spec.js" name="should apply updates on component dependencies" time="0.133"/>
|
|
12
|
+
<testcase classname="get-all-policy-pkgs.spec.js" name="should read the version from a version object" time="0.153"/>
|
|
13
|
+
<testcase classname="get-all-policy-pkgs.spec.js" name="should deduplicate dependencies that are present in root policies" time="0.085"/>
|
|
14
|
+
<testcase classname="hoist-dependencies.spec.js" name="the root manifest should have the preserved version" time="0.115"/>
|
|
15
15
|
<testcase classname="hoist-dependencies.spec.js" name="the component dependencies which intersects with the preserved should be empty" time="0.001"/>
|
|
16
16
|
<testcase classname="hoist-dependencies.spec.js" name="the component dependencies which not intersects with the preserved to have a proper version" time="0.001"/>
|
|
17
17
|
<testcase classname="hoist-dependencies.spec.js" name="the component dependencies should be empty" time="0.001"/>
|
|
18
|
-
<testcase classname="hoist-dependencies.spec.js" name="should hoist the dependency to the root"
|
|
18
|
+
<testcase classname="hoist-dependencies.spec.js" name="should hoist the dependency to the root"/>
|
|
19
19
|
<testcase classname="hoist-dependencies.spec.js" name="the component dependencies should be empty"/>
|
|
20
20
|
<testcase classname="hoist-dependencies.spec.js" name="should hoist the dependency to the root"/>
|
|
21
|
-
<testcase classname="hoist-dependencies.spec.js" name="the component dependencies should be empty"
|
|
22
|
-
<testcase classname="hoist-dependencies.spec.js" name="should not hoist the dependency to the root"/>
|
|
23
|
-
<testcase classname="hoist-dependencies.spec.js" name="should have the peers in each component" time="0.
|
|
21
|
+
<testcase classname="hoist-dependencies.spec.js" name="the component dependencies should be empty"/>
|
|
22
|
+
<testcase classname="hoist-dependencies.spec.js" name="should not hoist the dependency to the root" time="0.001"/>
|
|
23
|
+
<testcase classname="hoist-dependencies.spec.js" name="should have the peers in each component" time="0.014"/>
|
|
24
24
|
<testcase classname="hoist-dependencies.spec.js" name="should not hoist the dependency to the root" time="0.001"/>
|
|
25
25
|
<testcase classname="hoist-dependencies.spec.js" name="should not report about peer conflicts"/>
|
|
26
26
|
<testcase classname="hoist-dependencies.spec.js" name="should have the peers in each component" time="0.001"/>
|
|
27
|
-
<testcase classname="hoist-dependencies.spec.js" name="should not hoist the dependency to the root"
|
|
27
|
+
<testcase classname="hoist-dependencies.spec.js" name="should not hoist the dependency to the root"/>
|
|
28
28
|
<testcase classname="hoist-dependencies.spec.js" name="should report about peer conflicts" time="0.001"/>
|
|
29
|
-
<testcase classname="hoist-dependencies.spec.js" name="should hoist the most common version to the root" time="0.
|
|
30
|
-
<testcase classname="hoist-dependencies.spec.js" name="should not put the most common version in the components that has it"/>
|
|
31
|
-
<testcase classname="hoist-dependencies.spec.js" name="should put other versions in the components"
|
|
29
|
+
<testcase classname="hoist-dependencies.spec.js" name="should hoist the most common version to the root" time="0.031"/>
|
|
30
|
+
<testcase classname="hoist-dependencies.spec.js" name="should not put the most common version in the components that has it" time="0.001"/>
|
|
31
|
+
<testcase classname="hoist-dependencies.spec.js" name="should put other versions in the components"/>
|
|
32
32
|
<testcase classname="hoist-dependencies.spec.js" name="should hoist the best range to the root" time="0.004"/>
|
|
33
33
|
<testcase classname="hoist-dependencies.spec.js" name="should not put the dependency in components that matches the best range" time="0.002"/>
|
|
34
|
-
<testcase classname="hoist-dependencies.spec.js" name="should put other ranges in the components" time="0.
|
|
34
|
+
<testcase classname="hoist-dependencies.spec.js" name="should put other ranges in the components" time="0.002"/>
|
|
35
35
|
<testcase classname="hoist-dependencies.spec.js" name="should hoist the best version to the root" time="0.001"/>
|
|
36
36
|
<testcase classname="hoist-dependencies.spec.js" name="should not put the dependency in components that matches the best version" time="0.001"/>
|
|
37
|
+
<testcase classname="hoist-dependencies.spec.js" name="should put other ranges in the components"/>
|
|
38
|
+
<testcase classname="hoist-dependencies.spec.js" name="should hoist the best range to the root" time="0.001"/>
|
|
39
|
+
<testcase classname="hoist-dependencies.spec.js" name="should not put the dependency in components that matches the best range"/>
|
|
37
40
|
<testcase classname="hoist-dependencies.spec.js" name="should put other ranges in the components" time="0.001"/>
|
|
38
|
-
<testcase classname="hoist-dependencies.spec.js" name="should hoist the best range to the root" time="0.
|
|
39
|
-
<testcase classname="hoist-dependencies.spec.js" name="should not put the dependency in components that matches the best range" time="0.
|
|
40
|
-
<testcase classname="hoist-dependencies.spec.js" name="should put other ranges in the components" time="0.
|
|
41
|
-
<testcase classname="
|
|
42
|
-
<testcase classname="hoist-dependencies.spec.js" name="should not put the dependency in components that matches the best range or the combined version" time="0.03"/>
|
|
43
|
-
<testcase classname="hoist-dependencies.spec.js" name="should put other ranges in the components" time="0.032"/>
|
|
44
|
-
<testcase classname="dependency-resolver.main.runtime.spec.js" name="should return settings from global config" time="0.009"/>
|
|
41
|
+
<testcase classname="hoist-dependencies.spec.js" name="should hoist the best range to the root" time="0.055"/>
|
|
42
|
+
<testcase classname="hoist-dependencies.spec.js" name="should not put the dependency in components that matches the best range or the combined version" time="0.029"/>
|
|
43
|
+
<testcase classname="hoist-dependencies.spec.js" name="should put other ranges in the components" time="0.022"/>
|
|
44
|
+
<testcase classname="dependency-resolver.main.runtime.spec.js" name="should return settings from global config" time="0.007"/>
|
|
45
45
|
<testcase classname="dependency-resolver.main.runtime.spec.js" name="should return settings from package manager config" time="0.001"/>
|
|
46
|
-
<testcase classname="dependency-resolver.main.runtime.spec.js" name="should return settings from aspect config" time="0.
|
|
47
|
-
<testcase classname="dependency-resolver.main.runtime.spec.js" name="should merge settings from global config, package manager config, and aspect config"
|
|
48
|
-
<testcase classname="dependency-resolver.main.runtime.spec.js" name="should read cafile when it is returned by the global config" time="0.
|
|
49
|
-
<testcase classname="dependency-resolver.main.runtime.spec.js" name="should return outdated dependencies" time="0.
|
|
46
|
+
<testcase classname="dependency-resolver.main.runtime.spec.js" name="should return settings from aspect config" time="0.001"/>
|
|
47
|
+
<testcase classname="dependency-resolver.main.runtime.spec.js" name="should merge settings from global config, package manager config, and aspect config"/>
|
|
48
|
+
<testcase classname="dependency-resolver.main.runtime.spec.js" name="should read cafile when it is returned by the global config" time="0.007"/>
|
|
49
|
+
<testcase classname="dependency-resolver.main.runtime.spec.js" name="should return outdated dependencies" time="0.078"/>
|
|
50
50
|
<testcase classname="dependency-resolver.main.runtime.spec.js" name="should return outdated dependencies when forcedVersionBump is set to patch" time="0.001"/>
|
|
51
51
|
<testcase classname="dependency-resolver.main.runtime.spec.js" name="should return outdated dependencies when forcedVersionBump is set to minor"/>
|
|
52
|
-
<testcase classname="dependency-resolver.main.runtime.spec.js" name="should return outdated dependencies when forcedVersionBump is set to major"
|
|
53
|
-
<testcase classname="dependency-resolver.main.runtime.spec.js" name="should throw an error if the env policy has a peer with an empty string set for the supportedRange" time="0.
|
|
52
|
+
<testcase classname="dependency-resolver.main.runtime.spec.js" name="should return outdated dependencies when forcedVersionBump is set to major"/>
|
|
53
|
+
<testcase classname="dependency-resolver.main.runtime.spec.js" name="should throw an error if the env policy has a peer with an empty string set for the supportedRange" time="0.091"/>
|
|
54
54
|
</testsuite>
|
|
55
55
|
</testsuites>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports["teambit.dependencies/dependency-resolver-preview"]=n():e["teambit.dependencies/dependency-resolver-preview"]=n()}(self,(()=>(()=>{"use strict";var e={499:(e,n,t)=>{var a={id:"teambit.dependencies/aspect-docs/dependency-resolver@0.0.177",homepage:"https://bit.cloud/teambit/dependencies/aspect-docs/dependency-resolver",exported:!0};Object.defineProperty(n,"__esModule",{value:!0}),n.default=c,d(t(594));var o=t(16),i=["components"];function d(e){return e&&e.__esModule?e:{default:e}}function r(){return r=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},r.apply(null,arguments)}function l(e,n){if(null==e)return{};var t,a,o=s(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],n.includes(t)||{}.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function s(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(n.includes(a))continue;t[a]=e[a]}return t}d.__bit_component=a,r.__bit_component=a,l.__bit_component=a,s.__bit_component=a;var p={},m="wrapper";function c(e){var n=e.components,t=l(e,i);return(0,o.mdx)(m,r({},p,t,{components:n,mdxType:"MDXLayout"}),(0,o.mdx)("p",null,"The ",(0,o.mdx)("a",{parentName:"p",href:"https://bit.cloud/teambit/dependencies/dependency-resolver"},"Dependency Resolver")," configures and installs dependencies for components in a Bit workspace. It auto-generates the dependency graph for components to spare us the tedious work of manually configuring it ourselves.\nIt does so by integrating the dependency policies set by various Bit extensions (primarily the workspace) with the components' parsed and analyzed ",(0,o.mdx)("inlineCode",{parentName:"p"},"import"),"/",(0,o.mdx)("inlineCode",{parentName:"p"},"require")," statements.\nIn addition to that, the Dependency Resolver offers an efficient API to manually modify the generated graph using policies that can be applied on groups of components."),(0,o.mdx)("h4",null,"Features"),(0,o.mdx)("ul",null,(0,o.mdx)("li",{parentName:"ul"},(0,o.mdx)("p",{parentName:"li"},(0,o.mdx)("strong",{parentName:"p"},"Auto-generated dependency graph"),":\nThe Dependency Resolver saves us time and effort by generating the dependency graph for each component handled by the workspace. It does so by parsing out all ",(0,o.mdx)("inlineCode",{parentName:"p"},"import")," \\ ",(0,o.mdx)("inlineCode",{parentName:"p"},"require")," statements in the component's files.\nIt then determines if these dependencies are packages, components or internal implementation files.\nIf they are external components or packages, it goes on to determine their version and dependency-type (",(0,o.mdx)("inlineCode",{parentName:"p"},"dependencies"),", ",(0,o.mdx)("inlineCode",{parentName:"p"},"devDependencies"),", ",(0,o.mdx)("inlineCode",{parentName:"p"},"peerDependencies"),").")),(0,o.mdx)("li",{parentName:"ul"},(0,o.mdx)("p",{parentName:"li"},(0,o.mdx)("strong",{parentName:"p"},"An efficient dependency configuration API:"),"\nThe Dependency Resolver strikes the right balance between automation and customization by offering a simple and efficient configuration API.\nUse it in the workspace configuration file to manually modify the version and dependency type of dependencies in the generated dependency graph.\nWhen used in combination with ",(0,o.mdx)("inlineCode",{parentName:"p"},"@teambit.workspace/variant")," it allows to define, in a cascading (CSS-like) way,\ndifferent dependency policies for different sets of components, and even to add or remove dependencies altogether.")),(0,o.mdx)("li",{parentName:"ul"},(0,o.mdx)("p",{parentName:"li"},(0,o.mdx)("strong",{parentName:"p"},"Optimized dependency installation:"),"\nThe Dependency Resolver directs the package manager to install the correct packages in the correct location in the workspace file structure.\nWhen a dependency appears in the workspace dependency graph more than once, the Resolver searches for a common version that satisfies ",(0,o.mdx)("em",{parentName:"p"},"most")," dependent\ncomponents and installs it at the workspace root directory, where it can be shared by all relevant components."),(0,o.mdx)("blockquote",{parentName:"li"},(0,o.mdx)("p",{parentName:"blockquote"},"dependency versions that are used by a minority of components will be installed in each component's directory."))),(0,o.mdx)("li",{parentName:"ul"},(0,o.mdx)("p",{parentName:"li"},(0,o.mdx)("strong",{parentName:"p"},"A single 'install command for packages and components:"),"\nA single ",(0,o.mdx)("inlineCode",{parentName:"p"},"bit install")," command will not only install packages but will also import components listed in your ",(0,o.mdx)("inlineCode",{parentName:"p"},".bitmap")," file.\nThese components will then be linked to your ",(0,o.mdx)("inlineCode",{parentName:"p"},"node_modules")," directory, to keep the same import pattern for both module types, components and packages.")),(0,o.mdx)("li",{parentName:"ul"},(0,o.mdx)("p",{parentName:"li"},(0,o.mdx)("strong",{parentName:"p"},"Programmatic API for extensions and environments"),"\nThe Dependency Resolver provides other extensions and environments with an API that allows them to register their own dependency policies.\nFor example, the 'React environment' uses the Dependency Resolver to set 'react-dom' as a peerDependency for all components using it (in case a component author had either left ",(0,o.mdx)("inlineCode",{parentName:"p"},"react-dom")," out of its dependencies, or even registered it as a regular dependency)."))),(0,o.mdx)("h2",null,"Quickstart & configuration"),(0,o.mdx)("h3",null,"Auto-registered dependency version and type"),(0,o.mdx)("p",null,"Dependency policies define the version and dependency type of each package used by components in the workspace.\nWhen installing a package, the Dependency Resolver registers its version in the dependency configuration (if a version is not specified upon installation, it will default to the latest one)."),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'// At the root-level of the workspace configuration JSON\n{\n "@teambit.dependencies/dependency-resolver": {\n "policy": {\n "dependencies": {\n "lodash": "4.17.0"\n }\n }\n }\n}\n')),(0,o.mdx)("h2",null,"The dependency policies hierarchy"),(0,o.mdx)("p",null,"The Dependency Resolver integrates dependency policies from various sources to determine the component's final dependency graph.\nCases of conflicting policies are resolved according to a hierarchy of source types, where a 'higher' rule in the list overrides lower rules."),(0,o.mdx)("p",null,"The hierarchy in a descending order:"),(0,o.mdx)("ol",null,(0,o.mdx)("li",{parentName:"ol"},"Policies set by Variants (",(0,o.mdx)("inlineCode",{parentName:"li"},"@teambit/variants"),") and the ",(0,o.mdx)("inlineCode",{parentName:"li"},"component.json"),' files of "ejected" components (these two sources are merged by Variants).'),(0,o.mdx)("li",{parentName:"ol"},"Policies set by various extensions/aspects (using ",(0,o.mdx)("inlineCode",{parentName:"li"},"registerDependencyPolicy"),")"),(0,o.mdx)("li",{parentName:"ol"},"Policies set by the environment (using ",(0,o.mdx)("inlineCode",{parentName:"li"},"getDependencies"),")"),(0,o.mdx)("li",{parentName:"ol"},"Bit’s automated dependency detections, and policies set by the Dependency Resolver at the workspace configuration root-level.")),(0,o.mdx)("blockquote",null,(0,o.mdx)("p",{parentName:"blockquote"},"Use the ",(0,o.mdx)("inlineCode",{parentName:"p"},"bit dependencies <component-id>")," command to understand the calculations and interactions which resolved to the generated dependency graph of a specific component.")),(0,o.mdx)("h3",null,"Select a package manager"),(0,o.mdx)("p",null,"The Dependency resolver does not replace package managers - it uses them and directs them.\nTo choose between 'Yarn' and 'pnpm', set the ",(0,o.mdx)("inlineCode",{parentName:"p"},"packageManager")," property to either of the following:"),(0,o.mdx)("ul",null,(0,o.mdx)("li",{parentName:"ul"},(0,o.mdx)("inlineCode",{parentName:"li"},"teambit.dependencies/yarn")),(0,o.mdx)("li",{parentName:"ul"},(0,o.mdx)("inlineCode",{parentName:"li"},"teambit.dependencies/pnpm"))),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'// At the root-level of the workspace configuration JSON\n{\n "teambit.dependencies/dependency-resolver": {\n "packageManager": "teambit.dependencies/yarn"\n }\n}\n')),(0,o.mdx)("h3",null,"Select the type of node_modules"),(0,o.mdx)("p",null,"By default, pnpm creates a symlinked ",(0,o.mdx)("inlineCode",{parentName:"p"},"node_modules"),' whereas Yarn creates a "classic" hoisted one.\nThis may be changed by setting the ',(0,o.mdx)("inlineCode",{parentName:"p"},"nodeLinker")," configuration option."),(0,o.mdx)("p",null,"Allowed values of ",(0,o.mdx)("inlineCode",{parentName:"p"},"nodeLinker"),":"),(0,o.mdx)("ul",null,(0,o.mdx)("li",{parentName:"ul"},(0,o.mdx)("inlineCode",{parentName:"li"},'"hoisted"')," - create a hoisted (aka flat) ",(0,o.mdx)("inlineCode",{parentName:"li"},"node_modules")," directory without using symlinks. Similar to the one created by npm or Yarn classic."),(0,o.mdx)("li",{parentName:"ul"},(0,o.mdx)("inlineCode",{parentName:"li"},'"isolated"')," - create a ",(0,o.mdx)("inlineCode",{parentName:"li"},"node_modules")," directory using symlinks. All dependencies are symlinked from a flat storage at ",(0,o.mdx)("inlineCode",{parentName:"li"},"node_modules/.pnpm")," (when using pnpm) or ",(0,o.mdx)("inlineCode",{parentName:"li"},"node_modules/.store")," (when using Yarn).")),(0,o.mdx)("h3",null,"Apply policies on all relevant components"),(0,o.mdx)("p",null,"A dependency policy configured at the root level of the workspace configuration (JSON) will by default affect ",(0,o.mdx)("em",{parentName:"p"},"all")," components that have that package as their dependency (i.e., components that have this module listed in their generated dependency graph).\n",(0,o.mdx)("strong",{parentName:"p"},"Components that do not have this package as a dependency will not be affected.")),(0,o.mdx)("p",null,"For example:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'// At the root-level of the workspace configuration JSON\n\n// Every component in the workspace that has \'lodash\' as a dependency will version \'3.0.0\'.\n// This policy will not affect any component that does not have \'lodash\' as a dependency.\n\n{\n "teambit.dependencies/dependency-resolver": {\n "policy": {\n "dependencies": {\n "lodash": "3.0.0"\n }\n }\n }\n}\n')),(0,o.mdx)("h3",null,"Apply policies on a selected group of components"),(0,o.mdx)("p",null,"Dependency policies can be applied on a specific group of components. This is done using the ",(0,o.mdx)("inlineCode",{parentName:"p"},"@teambit.workspace/variants")," configuration API."),(0,o.mdx)("p",null,"For example, to set version ",(0,o.mdx)("inlineCode",{parentName:"p"},"1.0.0")," of ",(0,o.mdx)("inlineCode",{parentName:"p"},"classnames")," as a dependency of all components located inside the ",(0,o.mdx)("inlineCode",{parentName:"p"},"./components/react")," directory (or any of its sub-directories):"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "teambit.workspace/variants": {\n "components/react": {\n // this creates a variant for all components contained in the components/react directory and it\'s sub-directories\n "teambit.dependencies/dependency-resolver": {\n // this creates dependencies overrides for the current variant\n "policy": {\n "dependencies": {\n "classnames": "1.0.0"\n }\n }\n }\n }\n }\n}\n')),(0,o.mdx)("h3",null,"Remove a dependency"),(0,o.mdx)("p",null,'Dependency policies can also be used to move or remove a dependency. That\'s especially useful when a dependency is defined with an incorrect dependency type.\nFor example, a module can be "moved" from ',(0,o.mdx)("inlineCode",{parentName:"p"},"dependencies")," to ",(0,o.mdx)("inlineCode",{parentName:"p"},"peerDependencies")," by removing it from ",(0,o.mdx)("inlineCode",{parentName:"p"},"dependencies")," and listing it under ",(0,o.mdx)("inlineCode",{parentName:"p"},"peerDependencies"),"."),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},' "teambit.dependencies/dependency-resolver": {\n "policy": {\n "dependencies": {\n "enzyme": "-"\n },\n "peerDependencies": {\n "enzyme": "^3.11.0"\n }\n }\n')),(0,o.mdx)("h3",null,"Override cascading policies"),(0,o.mdx)("p",null,"Policies set on a specific group of components will override any conflicting policies that have cascaded from more general configurations."),(0,o.mdx)("p",null,"For example, the following configuration will set ",(0,o.mdx)("inlineCode",{parentName:"p"},"classnames")," version ",(0,o.mdx)("inlineCode",{parentName:"p"},"1.0.0")," on all components using the ",(0,o.mdx)("inlineCode",{parentName:"p"},"react-ui")," namespace. This policy will override the workspace-level policy that uses version ",(0,o.mdx)("inlineCode",{parentName:"p"},"2.0.0")," of that same package."),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'// All components using the namespace \'react-ui\' will use version 1.0.0 of "classnames"\n// instead of version "2.0.0" which is set as the more general default for all components in the workspace\n{\n "teambit.workspace/workspace": {\n "name": "my-workspace"\n },\n "teambit.dependencies/dependency-resolver": {\n "policy": {\n "dependencies": {\n "classnames": "2.0.0"\n }\n }\n },\n "teambit.workspace/variants": {\n "{react-ui/*}": {\n // the {} notation sets the variant grouping via namespace, so in this case any (/*) components whose namespace begins with \'react-ui\'\n "teambit.dependencies/dependency-resolver": {\n "policy": {\n "classnames": "1.0.0"\n }\n }\n }\n }\n}\n')),(0,o.mdx)("h3",null,'"Forcibly" add dependencies to a component'),(0,o.mdx)("p",null,'Dependency policies applied on a selected group of components will "forcibly" add the listed packages to any ',"[selected]"," component for whom the Dependency Resolved has not already identified that package as a dependency.\nThis can be useful when a component depends on another module but has no ",(0,o.mdx)("inlineCode",{parentName:"p"},"import"),"/",(0,o.mdx)("inlineCode",{parentName:"p"},"require")," statement to be parsed by the Dependency Resolver (for example, in a Webpack configuration file, or as a peerDependency of a consumed package)."),(0,o.mdx)("p",null,"In the following example, ",(0,o.mdx)("inlineCode",{parentName:"p"},"classnames@1.0.0"),' will be "forcibly" added as a dependency to any component using the ',(0,o.mdx)("inlineCode",{parentName:"p"},"react-ui")," namespace."),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},' "teambit.workspace/variants": {\n "{react-ui/*}": {\n "teambit.dependencies/dependency-resolver": {\n "policy": {\n "classnames": "1.0.0"\n }\n }\n }\n }\n')),(0,o.mdx)("h3",null,"Set dependency types"),(0,o.mdx)("h4",null,"dev dependencies"),(0,o.mdx)("p",null,"Dev dependencies are determined by the type of file in a component that uses the dependency.\nIf it is a development file (e.g, ",(0,o.mdx)("inlineCode",{parentName:"p"},"doSomething.test.ts"),") then the packages consumed by it are also considered\nto be used for development and will therefore be registered as ",(0,o.mdx)("inlineCode",{parentName:"p"},"devDependencies"),". In cases where a module is consumed by both a runtime file and a development file, the module will be considered as a runtime (regular) dependency."),(0,o.mdx)("blockquote",null,(0,o.mdx)("p",{parentName:"blockquote"},(0,o.mdx)("inlineCode",{parentName:"p"},"devDependencies")," that are set by the Dependency Resolver will not be visible in the component's configuration. To validate that a dependency is registered as a dev dependency, use the ",(0,o.mdx)("inlineCode",{parentName:"p"},"bit show <component>")," command.")),(0,o.mdx)("p",null,"The list of file patterns to be considered as development files is determined by the various Bit extensions. For example, the ",(0,o.mdx)("inlineCode",{parentName:"p"},"@teambit.react/react")," environment lists all ",(0,o.mdx)("inlineCode",{parentName:"p"},"*.spec.tsx")," files as dev files.\nAny component using that environment will have its ",(0,o.mdx)("inlineCode",{parentName:"p"},".spec.tsx")," files considered as dev files and all these files' dependencies considered as ",(0,o.mdx)("inlineCode",{parentName:"p"},"devDependencies"),"."),(0,o.mdx)("h5",null,"Register file patterns to be considered as dev files"),(0,o.mdx)("p",null,"Set the ",(0,o.mdx)("inlineCode",{parentName:"p"},"devFilePatterns")," property to add your own list of file extensions to be considered as development files (and to have all their dependencies considered as ",(0,o.mdx)("inlineCode",{parentName:"p"},"devDependencies"),"):"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'// At the root-level of the workspace configuration JSON\n{\n "teambit.dependencies/dependency-resolver": {\n "devFilePatterns": [".spec.ts"]\n }\n}\n')),(0,o.mdx)("h5",null,"Configure specific dependencies as devDependencies"),(0,o.mdx)("blockquote",null,(0,o.mdx)("p",{parentName:"blockquote"},"Dependencies can be ",(0,o.mdx)("em",{parentName:"p"},"directly")," configured as ",(0,o.mdx)("inlineCode",{parentName:"p"},"devDependencies")," ",(0,o.mdx)("em",{parentName:"p"},"only")," via the ",(0,o.mdx)("inlineCode",{parentName:"p"},"variants")," config API.")),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "teambit.workspace/variants": {\n "*": {\n "teambit.dependencies/dependency-resolver": {\n "policy": {\n "devDependencies": {\n "react-test-renderer": "17.0.1"\n }\n }\n }\n }\n }\n}\n')),(0,o.mdx)("h4",null,"peer dependencies"),(0,o.mdx)("p",null,"Setting a package as a peer dependency ensures the package manager installs only a single version of that package. If that is not possible, i.e. if there is no single “agreed upon” version for all components in the workspace, then an error will be thrown."),(0,o.mdx)("p",null,"This can be crucial when different components communicate with each other using shared objects that are instantiated by an installed package (the dependency). If different versions of the same package create different object instances then the “means of communication” is broken. There is no single object to address, no single source of truth. This can turn out to be critical when working with modules that are used as “plugins” of another module (for example, Babel), or when working with components that are coordinated in runtime using a shared library (for example, React)."),(0,o.mdx)("p",null,"To set a package as a peer dependency, place it under the ",(0,o.mdx)("inlineCode",{parentName:"p"},"peerDependencies")," entry, like so:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "teambit.bit/dependency-resolver": {\n "policy": {\n "dependencies": {},\n "peerDependencies": {\n "react": "^17.0.0",\n "react-dom": "^17.0.0",\n }\n }\n}\n')),(0,o.mdx)("blockquote",null,(0,o.mdx)("p",{parentName:"blockquote"},'Peer dependencies are usually used in the context of a single "hosting code". That could be an application or a single component library.\nBit may generate multiple "hosts", one for each environment being used, to run components of different types.\nThat could translate into multiple versions of the same peer dependency, one for each environment.')),(0,o.mdx)("h2",null,"Enforce the installation of a specific package version"),(0,o.mdx)("p",null,"The dependency resolver determines the package version that best fits the requirements of most components consuming the same package.\nIt then installs it at the root of the workspace to make it available to all components sharing the same package (those that cannot use it will have their dependency installed inside their own directory)."),(0,o.mdx)("p",null,"As a result, a package installed by the Dependency Resolver may not have the same version that was specified in the Dependency Resolver policy.\nTo enforce the installation of the exact version specified in the policy, set the ",(0,o.mdx)("inlineCode",{parentName:"p"},"preserve")," property to ",(0,o.mdx)("inlineCode",{parentName:"p"},"true"),"."),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "teambit.dependencies/dependency-resolver": {\n "policy": {\n "dependencies": {\n "lodash": {\n "version": "3.0.0",\n "preserve": true\n }\n }\n }\n }\n}\n')),(0,o.mdx)("h2",null,"Set a proxy for outgoing HTTP/HTTPS requests"),(0,o.mdx)("p",null,"The package manager can be configured to use a proxy for outgoing network requests."),(0,o.mdx)("p",null,(0,o.mdx)("inlineCode",{parentName:"p"},"proxy")," - A URL for a proxy to be used in both HTTP and HTTPS requests."),(0,o.mdx)("p",null,(0,o.mdx)("inlineCode",{parentName:"p"},"httpsProxy")," - A URL specific for HTTPS requests (this will override the value set in ",(0,o.mdx)("inlineCode",{parentName:"p"},"proxy")," for HTTPS requests)."),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "teambit.dependencies/dependency-resolver": {\n "proxy": "http://domain-one.proxy.com:8080",\n "httpsProxy": "http://domain-two.proxy.com:8080"\n }\n}\n')),(0,o.mdx)("h5",null,"A proxy can also be set in NPM's and Bit's global configurations"),(0,o.mdx)("p",null,"To get the value for 'proxy'/'https-proxy':"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-bash"},"bit config get proxy\n\nbit config get https-proxy\n")),(0,o.mdx)("p",null,"To set a new 'proxy'/'https-proxy' value:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-bash"},"bit config set proxy http://domain-one.proxy.com:8080\n\nbit config set https-proxy http://domain-one.proxy.com:8080\n")),(0,o.mdx)("p",null,"Read about setting a proxy in NPM's global configuration ",(0,o.mdx)("a",{parentName:"p",href:"https://docs.npmjs.com/cli/v6/using-npm/config#https-proxy"},"here")),(0,o.mdx)("blockquote",null,(0,o.mdx)("p",{parentName:"blockquote"},"Notice the Dependency Resolver config will override ",(0,o.mdx)("em",{parentName:"p"},"all")," other proxy configurations. The NPM config will override Bit's global proxy configurations.")),(0,o.mdx)("h2",null,"Network settings"),(0,o.mdx)("p",null,"Settings that allow to change how aggressively the package manager is making and retrying network requests. Currently, these settings affect only the behavior of pnpm."),(0,o.mdx)("p",null,"These are settings passed to the aspect configuration. For instance:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "teambit.dependencies/dependency-resolver": {\n "networkConcurrency": 4\n }\n}\n')),(0,o.mdx)("h3",null,"networkConcurrency"),(0,o.mdx)("p",null,"Controls the maximum number of HTTP(S) requests to process simultaneously."),(0,o.mdx)("h3",null,"fetchRetries"),(0,o.mdx)("p",null,"How many times to retry if Bit fails to fetch from the registry."),(0,o.mdx)("h3",null,"fetchRetryFactor"),(0,o.mdx)("p",null,"The exponential factor for retry backoff."),(0,o.mdx)("h3",null,"fetchRetryMintimeout"),(0,o.mdx)("p",null,"The minimum (base) timeout for retrying requests."),(0,o.mdx)("h3",null,"fetchRetryMaxtimeout"),(0,o.mdx)("p",null,"The maximum fallback timeout to ensure the retry factor does not make requests too long."),(0,o.mdx)("h3",null,"fetchTimeout"),(0,o.mdx)("p",null,"The maximum amount of time (in milliseconds) to wait for HTTP requests to complete."),(0,o.mdx)("h3",null,"maxSockets"),(0,o.mdx)("p",null,"The maximum number of connections to use per origin (protocol/host/port combination)."),(0,o.mdx)("h2",null,"Overrides"),(0,o.mdx)("p",null,"This field allows you to instruct Bit to override any dependency in the dependency graph. This is useful to enforce all your packages to use a single version of a dependency, backport a fix, or replace a dependency with a fork."),(0,o.mdx)("p",null,"An example of the ",(0,o.mdx)("inlineCode",{parentName:"p"},'"overrides"')," field:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "@teambit.dependencies/dependency-resolver": {\n "overrides": {\n "foo": "^1.0.0",\n "quux": "npm:@myorg/quux@^1.0.0",\n "bar@^2.1.0": "3.0.0",\n "qar@1>zoo": "2"\n }\n }\n}\n')),(0,o.mdx)("p",null,"You may specify the package the overriden dependency belongs to by separating the package selector from the dependency selector with a ",(0,o.mdx)("inlineCode",{parentName:"p"},'">"'),", for example ",(0,o.mdx)("inlineCode",{parentName:"p"},"qar@1>zoo")," will only override the ",(0,o.mdx)("inlineCode",{parentName:"p"},"zoo")," dependency of ",(0,o.mdx)("inlineCode",{parentName:"p"},"qar@1"),", not for any other dependencies."),(0,o.mdx)("h2",null,"Side-Effects cache"),(0,o.mdx)("p",null,"By default, when pnpm is set as the package manager, build artifacts are cached. So when installing a package with pre/postinstall hooks, it is only built the first time it is installed on a computer."),(0,o.mdx)("p",null,"Side-effects cache can be turned off by setting the ",(0,o.mdx)("inlineCode",{parentName:"p"},"sideEffectsCache")," field to ",(0,o.mdx)("inlineCode",{parentName:"p"},"false"),":"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "@teambit.dependencies/dependency-resolver": {\n "sideEffectsCache": false\n }\n}\n')),(0,o.mdx)("h2",null,"Node.js engine checks"),(0,o.mdx)("p",null,"If you want to prevent contributors of your project from adding new incompatible dependencies, use ",(0,o.mdx)("inlineCode",{parentName:"p"},"nodeVersion")," and ",(0,o.mdx)("inlineCode",{parentName:"p"},"engineStrict")," in your ",(0,o.mdx)("inlineCode",{parentName:"p"},"workspace.jsonc"),":"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "@teambit.dependencies/dependency-resolver": {\n "engineStrict": true,\n "nodeVersion": "12.22.0"\n }\n}\n')),(0,o.mdx)("p",null,"This way, even if someone is using Node.js v16, they will not be able to install a new dependency that doesn't support Node.js v12.22.0."),(0,o.mdx)("p",null,"NOTE: This works only with pnpm currently."),(0,o.mdx)("h2",null,"peerDependencyRules"),(0,o.mdx)("h3",null,"peerDependencyRules.ignoreMissing"),(0,o.mdx)("p",null,"Bit will not print warnings about missing peer dependencies from this list."),(0,o.mdx)("p",null,"For instance, with the following configuration, Bit will not print warnings if a dependency needs ",(0,o.mdx)("inlineCode",{parentName:"p"},"react")," but ",(0,o.mdx)("inlineCode",{parentName:"p"},"react")," is not installed:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "@teambit.dependencies/dependency-resolver": {\n "peerDependencyRules": {\n "ignoreMissing": ["react"]\n }\n }\n}\n')),(0,o.mdx)("p",null,"Package name patterns may also be used:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "@teambit.dependencies/dependency-resolver": {\n "peerDependencyRules": {\n "ignoreMissing": ["@babel/*", "@eslint/*"]\n }\n }\n}\n')),(0,o.mdx)("h3",null,"peerDependencyRules.allowedVersions"),(0,o.mdx)("p",null,"Unmet peer dependency warnings will not be printed for peer dependencies of the specified range."),(0,o.mdx)("p",null,"For instance, if you have some dependencies that need ",(0,o.mdx)("inlineCode",{parentName:"p"},"react@16")," but you know that they work fine with ",(0,o.mdx)("inlineCode",{parentName:"p"},"react@17"),", then you may use the following configuration:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "@teambit.dependencies/dependency-resolver": {\n "peerDependencyRules": {\n "allowedVersions": {\n "react": "17"\n }\n }\n }\n}\n')),(0,o.mdx)("p",null,"This will tell Bit that any dependency that has react in its peer dependencies should allow ",(0,o.mdx)("inlineCode",{parentName:"p"},"react")," v17 to be installed."),(0,o.mdx)("h3",null,"peerDependencyRules.allowAny"),(0,o.mdx)("p",null,(0,o.mdx)("inlineCode",{parentName:"p"},"allowAny")," is an array of package name patterns, any peer dependency matching the pattern will be resolved from any version, regardless of the range specified in ",(0,o.mdx)("inlineCode",{parentName:"p"},"peerDependencies"),". For instance:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "@teambit.dependencies/dependency-resolver": {\n "peerDependencyRules": {\n "allowAny": ["@babel/*", "eslint"]\n }\n }\n}\n')),(0,o.mdx)("p",null,"The above setting will mute any warnings about peer dependency version mismatches related to ",(0,o.mdx)("inlineCode",{parentName:"p"},"@babel/")," packages or ",(0,o.mdx)("inlineCode",{parentName:"p"},"eslint"),"."),(0,o.mdx)("h2",null,"Build"),(0,o.mdx)("h3",null,"neverBuiltDependencies"),(0,o.mdx)("p",null,'This field allows to ignore the builds of specific dependencies. The "preinstall", "install", and "postinstall" scripts of the listed packages will not be executed during installation.'),(0,o.mdx)("p",null,'An example of the "neverBuiltDependencies" field:'),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "@teambit.dependencies/dependency-resolver": {\n "neverBuiltDependencies": ["fsevents", "level"]\n }\n}\n')),(0,o.mdx)("h2",null,"CLI reference"),(0,o.mdx)("h3",null,"install"),(0,o.mdx)("blockquote",null,(0,o.mdx)("p",{parentName:"blockquote"},"By default, the Dependency Resolver installs packages from Bit.dev's registry. The authentication for that registry is via your Bit.dev token, listed under ",(0,o.mdx)("inlineCode",{parentName:"p"},"@bit"),", in your ",(0,o.mdx)("inlineCode",{parentName:"p"},".npmrc")," file.\nIf that token cannot be found in the ",(0,o.mdx)("inlineCode",{parentName:"p"},".npmrc")," file, Bit will look for it in your global Bit configurations (use the ",(0,o.mdx)("inlineCode",{parentName:"p"},"bit config")," command to output your ",(0,o.mdx)("inlineCode",{parentName:"p"},"user.token")," property)."),(0,o.mdx)("br",null),"If your npm is configured to use a registry other than npmjs's, then the Dependency Resolver will use that configured registry, instead."),(0,o.mdx)("blockquote",null,(0,o.mdx)("p",{parentName:"blockquote"},"The 'install' process includes importing components and linking them to the ",(0,o.mdx)("inlineCode",{parentName:"p"},"node_modules")," directory.")),(0,o.mdx)("h5",null,"Install all dependencies listed in the Dependency Resolver configuration:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-bash"},"bit install\n")),(0,o.mdx)("h5",null,"Install the latest version of a package:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-bash"},"bit install <package>\n\n// For example\nbit install lodash\n")),(0,o.mdx)("h5",null,"Install a specific version of a package:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-bash"},"bit install <package>@<version>\n\n// For example\nbit install lodash@1.0.0\n")),(0,o.mdx)("h5",null,"Install packages without importing components"),(0,o.mdx)("p",null,"The 'install' process includes importing components listed in the ",(0,o.mdx)("inlineCode",{parentName:"p"},".bitmap")," file and linking them to the ",(0,o.mdx)("inlineCode",{parentName:"p"},"node_modules")," directory.\nTo disable importing and install all packages and components as standard packages use:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-bash"},"bit install --skip-import\n")))}c.__bit_component=a,c.isMDXComponent=!0},252:(e,n,t)=>{Object.defineProperty(n,"Q",{enumerable:!0,get:function(){return a.default}});var a=o(t(499));function o(e){return e&&e.__esModule?e:{default:e}}o.__bit_component={id:"teambit.dependencies/aspect-docs/dependency-resolver@0.0.177",homepage:"https://bit.cloud/teambit/dependencies/aspect-docs/dependency-resolver",exported:!0}},678:(e,n,t)=>{var a={id:"teambit.dependencies/dependency-resolver@1.0.410",homepage:"https://bit.cloud/teambit/dependencies/dependency-resolver",exported:!0};function o(){const e=i(t(594));return o=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0}),n.Logo=void 0,o.__bit_component=a,i.__bit_component=a;const d=()=>o().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},o().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/dependencies.svg"}));d.__bit_component=a,n.Logo=d},16:e=>{e.exports=MdxJsReact},594:e=>{e.exports=React}},n={};function t(a){var o=n[a];if(void 0!==o)return o.exports;var i=n[a]={exports:{}};return e[a](i,i.exports,t),i.exports}t.d=(e,n)=>{for(var a in n)t.o(n,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:n[a]})},t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};t.r(a),t.d(a,{compositions:()=>h,compositions_metadata:()=>y,overview:()=>x});var o={};t.r(o),t.d(o,{default:()=>u});var i=t(678),d=(t(594),t(16));const r=TeambitMdxUiMdxScopeContext;var l=t(252),s=["components"];function p(){return p=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},p.apply(null,arguments)}var m={},c="wrapper";function u(e){var n=e.components,t=function(e,n){if(null==e)return{};var t,a,o=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(n.includes(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],n.includes(t)||{}.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}(e,s);return(0,d.mdx)(c,p({},m,t,{components:n,mdxType:"MDXLayout"}),(0,d.mdx)(r.MDXScopeProvider,{components:{DependencyResolver:l.Q},mdxType:"MDXScopeProvider"},(0,d.mdx)(l.Q,{mdxType:"DependencyResolver"})))}u.isMDXComponent=!0;const h=[i],x=[o],y={compositions:[{displayName:"Logo",identifier:"Logo"}]};return a})()));
|
|
1
|
+
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports["teambit.dependencies/dependency-resolver-preview"]=n():e["teambit.dependencies/dependency-resolver-preview"]=n()}(self,(()=>(()=>{"use strict";var e={499:(e,n,t)=>{var a={id:"teambit.dependencies/aspect-docs/dependency-resolver@0.0.177",homepage:"https://bit.cloud/teambit/dependencies/aspect-docs/dependency-resolver",exported:!0};Object.defineProperty(n,"__esModule",{value:!0}),n.default=c,d(t(594));var o=t(16),i=["components"];function d(e){return e&&e.__esModule?e:{default:e}}function r(){return r=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},r.apply(null,arguments)}function l(e,n){if(null==e)return{};var t,a,o=s(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],n.includes(t)||{}.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function s(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(n.includes(a))continue;t[a]=e[a]}return t}d.__bit_component=a,r.__bit_component=a,l.__bit_component=a,s.__bit_component=a;var p={},m="wrapper";function c(e){var n=e.components,t=l(e,i);return(0,o.mdx)(m,r({},p,t,{components:n,mdxType:"MDXLayout"}),(0,o.mdx)("p",null,"The ",(0,o.mdx)("a",{parentName:"p",href:"https://bit.cloud/teambit/dependencies/dependency-resolver"},"Dependency Resolver")," configures and installs dependencies for components in a Bit workspace. It auto-generates the dependency graph for components to spare us the tedious work of manually configuring it ourselves.\nIt does so by integrating the dependency policies set by various Bit extensions (primarily the workspace) with the components' parsed and analyzed ",(0,o.mdx)("inlineCode",{parentName:"p"},"import"),"/",(0,o.mdx)("inlineCode",{parentName:"p"},"require")," statements.\nIn addition to that, the Dependency Resolver offers an efficient API to manually modify the generated graph using policies that can be applied on groups of components."),(0,o.mdx)("h4",null,"Features"),(0,o.mdx)("ul",null,(0,o.mdx)("li",{parentName:"ul"},(0,o.mdx)("p",{parentName:"li"},(0,o.mdx)("strong",{parentName:"p"},"Auto-generated dependency graph"),":\nThe Dependency Resolver saves us time and effort by generating the dependency graph for each component handled by the workspace. It does so by parsing out all ",(0,o.mdx)("inlineCode",{parentName:"p"},"import")," \\ ",(0,o.mdx)("inlineCode",{parentName:"p"},"require")," statements in the component's files.\nIt then determines if these dependencies are packages, components or internal implementation files.\nIf they are external components or packages, it goes on to determine their version and dependency-type (",(0,o.mdx)("inlineCode",{parentName:"p"},"dependencies"),", ",(0,o.mdx)("inlineCode",{parentName:"p"},"devDependencies"),", ",(0,o.mdx)("inlineCode",{parentName:"p"},"peerDependencies"),").")),(0,o.mdx)("li",{parentName:"ul"},(0,o.mdx)("p",{parentName:"li"},(0,o.mdx)("strong",{parentName:"p"},"An efficient dependency configuration API:"),"\nThe Dependency Resolver strikes the right balance between automation and customization by offering a simple and efficient configuration API.\nUse it in the workspace configuration file to manually modify the version and dependency type of dependencies in the generated dependency graph.\nWhen used in combination with ",(0,o.mdx)("inlineCode",{parentName:"p"},"@teambit.workspace/variant")," it allows to define, in a cascading (CSS-like) way,\ndifferent dependency policies for different sets of components, and even to add or remove dependencies altogether.")),(0,o.mdx)("li",{parentName:"ul"},(0,o.mdx)("p",{parentName:"li"},(0,o.mdx)("strong",{parentName:"p"},"Optimized dependency installation:"),"\nThe Dependency Resolver directs the package manager to install the correct packages in the correct location in the workspace file structure.\nWhen a dependency appears in the workspace dependency graph more than once, the Resolver searches for a common version that satisfies ",(0,o.mdx)("em",{parentName:"p"},"most")," dependent\ncomponents and installs it at the workspace root directory, where it can be shared by all relevant components."),(0,o.mdx)("blockquote",{parentName:"li"},(0,o.mdx)("p",{parentName:"blockquote"},"dependency versions that are used by a minority of components will be installed in each component's directory."))),(0,o.mdx)("li",{parentName:"ul"},(0,o.mdx)("p",{parentName:"li"},(0,o.mdx)("strong",{parentName:"p"},"A single 'install command for packages and components:"),"\nA single ",(0,o.mdx)("inlineCode",{parentName:"p"},"bit install")," command will not only install packages but will also import components listed in your ",(0,o.mdx)("inlineCode",{parentName:"p"},".bitmap")," file.\nThese components will then be linked to your ",(0,o.mdx)("inlineCode",{parentName:"p"},"node_modules")," directory, to keep the same import pattern for both module types, components and packages.")),(0,o.mdx)("li",{parentName:"ul"},(0,o.mdx)("p",{parentName:"li"},(0,o.mdx)("strong",{parentName:"p"},"Programmatic API for extensions and environments"),"\nThe Dependency Resolver provides other extensions and environments with an API that allows them to register their own dependency policies.\nFor example, the 'React environment' uses the Dependency Resolver to set 'react-dom' as a peerDependency for all components using it (in case a component author had either left ",(0,o.mdx)("inlineCode",{parentName:"p"},"react-dom")," out of its dependencies, or even registered it as a regular dependency)."))),(0,o.mdx)("h2",null,"Quickstart & configuration"),(0,o.mdx)("h3",null,"Auto-registered dependency version and type"),(0,o.mdx)("p",null,"Dependency policies define the version and dependency type of each package used by components in the workspace.\nWhen installing a package, the Dependency Resolver registers its version in the dependency configuration (if a version is not specified upon installation, it will default to the latest one)."),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'// At the root-level of the workspace configuration JSON\n{\n "@teambit.dependencies/dependency-resolver": {\n "policy": {\n "dependencies": {\n "lodash": "4.17.0"\n }\n }\n }\n}\n')),(0,o.mdx)("h2",null,"The dependency policies hierarchy"),(0,o.mdx)("p",null,"The Dependency Resolver integrates dependency policies from various sources to determine the component's final dependency graph.\nCases of conflicting policies are resolved according to a hierarchy of source types, where a 'higher' rule in the list overrides lower rules."),(0,o.mdx)("p",null,"The hierarchy in a descending order:"),(0,o.mdx)("ol",null,(0,o.mdx)("li",{parentName:"ol"},"Policies set by Variants (",(0,o.mdx)("inlineCode",{parentName:"li"},"@teambit/variants"),") and the ",(0,o.mdx)("inlineCode",{parentName:"li"},"component.json"),' files of "ejected" components (these two sources are merged by Variants).'),(0,o.mdx)("li",{parentName:"ol"},"Policies set by various extensions/aspects (using ",(0,o.mdx)("inlineCode",{parentName:"li"},"registerDependencyPolicy"),")"),(0,o.mdx)("li",{parentName:"ol"},"Policies set by the environment (using ",(0,o.mdx)("inlineCode",{parentName:"li"},"getDependencies"),")"),(0,o.mdx)("li",{parentName:"ol"},"Bit’s automated dependency detections, and policies set by the Dependency Resolver at the workspace configuration root-level.")),(0,o.mdx)("blockquote",null,(0,o.mdx)("p",{parentName:"blockquote"},"Use the ",(0,o.mdx)("inlineCode",{parentName:"p"},"bit dependencies <component-id>")," command to understand the calculations and interactions which resolved to the generated dependency graph of a specific component.")),(0,o.mdx)("h3",null,"Select a package manager"),(0,o.mdx)("p",null,"The Dependency resolver does not replace package managers - it uses them and directs them.\nTo choose between 'Yarn' and 'pnpm', set the ",(0,o.mdx)("inlineCode",{parentName:"p"},"packageManager")," property to either of the following:"),(0,o.mdx)("ul",null,(0,o.mdx)("li",{parentName:"ul"},(0,o.mdx)("inlineCode",{parentName:"li"},"teambit.dependencies/yarn")),(0,o.mdx)("li",{parentName:"ul"},(0,o.mdx)("inlineCode",{parentName:"li"},"teambit.dependencies/pnpm"))),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'// At the root-level of the workspace configuration JSON\n{\n "teambit.dependencies/dependency-resolver": {\n "packageManager": "teambit.dependencies/yarn"\n }\n}\n')),(0,o.mdx)("h3",null,"Select the type of node_modules"),(0,o.mdx)("p",null,"By default, pnpm creates a symlinked ",(0,o.mdx)("inlineCode",{parentName:"p"},"node_modules"),' whereas Yarn creates a "classic" hoisted one.\nThis may be changed by setting the ',(0,o.mdx)("inlineCode",{parentName:"p"},"nodeLinker")," configuration option."),(0,o.mdx)("p",null,"Allowed values of ",(0,o.mdx)("inlineCode",{parentName:"p"},"nodeLinker"),":"),(0,o.mdx)("ul",null,(0,o.mdx)("li",{parentName:"ul"},(0,o.mdx)("inlineCode",{parentName:"li"},'"hoisted"')," - create a hoisted (aka flat) ",(0,o.mdx)("inlineCode",{parentName:"li"},"node_modules")," directory without using symlinks. Similar to the one created by npm or Yarn classic."),(0,o.mdx)("li",{parentName:"ul"},(0,o.mdx)("inlineCode",{parentName:"li"},'"isolated"')," - create a ",(0,o.mdx)("inlineCode",{parentName:"li"},"node_modules")," directory using symlinks. All dependencies are symlinked from a flat storage at ",(0,o.mdx)("inlineCode",{parentName:"li"},"node_modules/.pnpm")," (when using pnpm) or ",(0,o.mdx)("inlineCode",{parentName:"li"},"node_modules/.store")," (when using Yarn).")),(0,o.mdx)("h3",null,"Apply policies on all relevant components"),(0,o.mdx)("p",null,"A dependency policy configured at the root level of the workspace configuration (JSON) will by default affect ",(0,o.mdx)("em",{parentName:"p"},"all")," components that have that package as their dependency (i.e., components that have this module listed in their generated dependency graph).\n",(0,o.mdx)("strong",{parentName:"p"},"Components that do not have this package as a dependency will not be affected.")),(0,o.mdx)("p",null,"For example:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'// At the root-level of the workspace configuration JSON\n\n// Every component in the workspace that has \'lodash\' as a dependency will version \'3.0.0\'.\n// This policy will not affect any component that does not have \'lodash\' as a dependency.\n\n{\n "teambit.dependencies/dependency-resolver": {\n "policy": {\n "dependencies": {\n "lodash": "3.0.0"\n }\n }\n }\n}\n')),(0,o.mdx)("h3",null,"Apply policies on a selected group of components"),(0,o.mdx)("p",null,"Dependency policies can be applied on a specific group of components. This is done using the ",(0,o.mdx)("inlineCode",{parentName:"p"},"@teambit.workspace/variants")," configuration API."),(0,o.mdx)("p",null,"For example, to set version ",(0,o.mdx)("inlineCode",{parentName:"p"},"1.0.0")," of ",(0,o.mdx)("inlineCode",{parentName:"p"},"classnames")," as a dependency of all components located inside the ",(0,o.mdx)("inlineCode",{parentName:"p"},"./components/react")," directory (or any of its sub-directories):"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "teambit.workspace/variants": {\n "components/react": {\n // this creates a variant for all components contained in the components/react directory and it\'s sub-directories\n "teambit.dependencies/dependency-resolver": {\n // this creates dependencies overrides for the current variant\n "policy": {\n "dependencies": {\n "classnames": "1.0.0"\n }\n }\n }\n }\n }\n}\n')),(0,o.mdx)("h3",null,"Remove a dependency"),(0,o.mdx)("p",null,'Dependency policies can also be used to move or remove a dependency. That\'s especially useful when a dependency is defined with an incorrect dependency type.\nFor example, a module can be "moved" from ',(0,o.mdx)("inlineCode",{parentName:"p"},"dependencies")," to ",(0,o.mdx)("inlineCode",{parentName:"p"},"peerDependencies")," by removing it from ",(0,o.mdx)("inlineCode",{parentName:"p"},"dependencies")," and listing it under ",(0,o.mdx)("inlineCode",{parentName:"p"},"peerDependencies"),"."),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},' "teambit.dependencies/dependency-resolver": {\n "policy": {\n "dependencies": {\n "enzyme": "-"\n },\n "peerDependencies": {\n "enzyme": "^3.11.0"\n }\n }\n')),(0,o.mdx)("h3",null,"Override cascading policies"),(0,o.mdx)("p",null,"Policies set on a specific group of components will override any conflicting policies that have cascaded from more general configurations."),(0,o.mdx)("p",null,"For example, the following configuration will set ",(0,o.mdx)("inlineCode",{parentName:"p"},"classnames")," version ",(0,o.mdx)("inlineCode",{parentName:"p"},"1.0.0")," on all components using the ",(0,o.mdx)("inlineCode",{parentName:"p"},"react-ui")," namespace. This policy will override the workspace-level policy that uses version ",(0,o.mdx)("inlineCode",{parentName:"p"},"2.0.0")," of that same package."),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'// All components using the namespace \'react-ui\' will use version 1.0.0 of "classnames"\n// instead of version "2.0.0" which is set as the more general default for all components in the workspace\n{\n "teambit.workspace/workspace": {\n "name": "my-workspace"\n },\n "teambit.dependencies/dependency-resolver": {\n "policy": {\n "dependencies": {\n "classnames": "2.0.0"\n }\n }\n },\n "teambit.workspace/variants": {\n "{react-ui/*}": {\n // the {} notation sets the variant grouping via namespace, so in this case any (/*) components whose namespace begins with \'react-ui\'\n "teambit.dependencies/dependency-resolver": {\n "policy": {\n "classnames": "1.0.0"\n }\n }\n }\n }\n}\n')),(0,o.mdx)("h3",null,'"Forcibly" add dependencies to a component'),(0,o.mdx)("p",null,'Dependency policies applied on a selected group of components will "forcibly" add the listed packages to any ',"[selected]"," component for whom the Dependency Resolved has not already identified that package as a dependency.\nThis can be useful when a component depends on another module but has no ",(0,o.mdx)("inlineCode",{parentName:"p"},"import"),"/",(0,o.mdx)("inlineCode",{parentName:"p"},"require")," statement to be parsed by the Dependency Resolver (for example, in a Webpack configuration file, or as a peerDependency of a consumed package)."),(0,o.mdx)("p",null,"In the following example, ",(0,o.mdx)("inlineCode",{parentName:"p"},"classnames@1.0.0"),' will be "forcibly" added as a dependency to any component using the ',(0,o.mdx)("inlineCode",{parentName:"p"},"react-ui")," namespace."),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},' "teambit.workspace/variants": {\n "{react-ui/*}": {\n "teambit.dependencies/dependency-resolver": {\n "policy": {\n "classnames": "1.0.0"\n }\n }\n }\n }\n')),(0,o.mdx)("h3",null,"Set dependency types"),(0,o.mdx)("h4",null,"dev dependencies"),(0,o.mdx)("p",null,"Dev dependencies are determined by the type of file in a component that uses the dependency.\nIf it is a development file (e.g, ",(0,o.mdx)("inlineCode",{parentName:"p"},"doSomething.test.ts"),") then the packages consumed by it are also considered\nto be used for development and will therefore be registered as ",(0,o.mdx)("inlineCode",{parentName:"p"},"devDependencies"),". In cases where a module is consumed by both a runtime file and a development file, the module will be considered as a runtime (regular) dependency."),(0,o.mdx)("blockquote",null,(0,o.mdx)("p",{parentName:"blockquote"},(0,o.mdx)("inlineCode",{parentName:"p"},"devDependencies")," that are set by the Dependency Resolver will not be visible in the component's configuration. To validate that a dependency is registered as a dev dependency, use the ",(0,o.mdx)("inlineCode",{parentName:"p"},"bit show <component>")," command.")),(0,o.mdx)("p",null,"The list of file patterns to be considered as development files is determined by the various Bit extensions. For example, the ",(0,o.mdx)("inlineCode",{parentName:"p"},"@teambit.react/react")," environment lists all ",(0,o.mdx)("inlineCode",{parentName:"p"},"*.spec.tsx")," files as dev files.\nAny component using that environment will have its ",(0,o.mdx)("inlineCode",{parentName:"p"},".spec.tsx")," files considered as dev files and all these files' dependencies considered as ",(0,o.mdx)("inlineCode",{parentName:"p"},"devDependencies"),"."),(0,o.mdx)("h5",null,"Register file patterns to be considered as dev files"),(0,o.mdx)("p",null,"Set the ",(0,o.mdx)("inlineCode",{parentName:"p"},"devFilePatterns")," property to add your own list of file extensions to be considered as development files (and to have all their dependencies considered as ",(0,o.mdx)("inlineCode",{parentName:"p"},"devDependencies"),"):"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'// At the root-level of the workspace configuration JSON\n{\n "teambit.dependencies/dependency-resolver": {\n "devFilePatterns": [".spec.ts"]\n }\n}\n')),(0,o.mdx)("h5",null,"Configure specific dependencies as devDependencies"),(0,o.mdx)("blockquote",null,(0,o.mdx)("p",{parentName:"blockquote"},"Dependencies can be ",(0,o.mdx)("em",{parentName:"p"},"directly")," configured as ",(0,o.mdx)("inlineCode",{parentName:"p"},"devDependencies")," ",(0,o.mdx)("em",{parentName:"p"},"only")," via the ",(0,o.mdx)("inlineCode",{parentName:"p"},"variants")," config API.")),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "teambit.workspace/variants": {\n "*": {\n "teambit.dependencies/dependency-resolver": {\n "policy": {\n "devDependencies": {\n "react-test-renderer": "17.0.1"\n }\n }\n }\n }\n }\n}\n')),(0,o.mdx)("h4",null,"peer dependencies"),(0,o.mdx)("p",null,"Setting a package as a peer dependency ensures the package manager installs only a single version of that package. If that is not possible, i.e. if there is no single “agreed upon” version for all components in the workspace, then an error will be thrown."),(0,o.mdx)("p",null,"This can be crucial when different components communicate with each other using shared objects that are instantiated by an installed package (the dependency). If different versions of the same package create different object instances then the “means of communication” is broken. There is no single object to address, no single source of truth. This can turn out to be critical when working with modules that are used as “plugins” of another module (for example, Babel), or when working with components that are coordinated in runtime using a shared library (for example, React)."),(0,o.mdx)("p",null,"To set a package as a peer dependency, place it under the ",(0,o.mdx)("inlineCode",{parentName:"p"},"peerDependencies")," entry, like so:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "teambit.bit/dependency-resolver": {\n "policy": {\n "dependencies": {},\n "peerDependencies": {\n "react": "^17.0.0",\n "react-dom": "^17.0.0",\n }\n }\n}\n')),(0,o.mdx)("blockquote",null,(0,o.mdx)("p",{parentName:"blockquote"},'Peer dependencies are usually used in the context of a single "hosting code". That could be an application or a single component library.\nBit may generate multiple "hosts", one for each environment being used, to run components of different types.\nThat could translate into multiple versions of the same peer dependency, one for each environment.')),(0,o.mdx)("h2",null,"Enforce the installation of a specific package version"),(0,o.mdx)("p",null,"The dependency resolver determines the package version that best fits the requirements of most components consuming the same package.\nIt then installs it at the root of the workspace to make it available to all components sharing the same package (those that cannot use it will have their dependency installed inside their own directory)."),(0,o.mdx)("p",null,"As a result, a package installed by the Dependency Resolver may not have the same version that was specified in the Dependency Resolver policy.\nTo enforce the installation of the exact version specified in the policy, set the ",(0,o.mdx)("inlineCode",{parentName:"p"},"preserve")," property to ",(0,o.mdx)("inlineCode",{parentName:"p"},"true"),"."),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "teambit.dependencies/dependency-resolver": {\n "policy": {\n "dependencies": {\n "lodash": {\n "version": "3.0.0",\n "preserve": true\n }\n }\n }\n }\n}\n')),(0,o.mdx)("h2",null,"Set a proxy for outgoing HTTP/HTTPS requests"),(0,o.mdx)("p",null,"The package manager can be configured to use a proxy for outgoing network requests."),(0,o.mdx)("p",null,(0,o.mdx)("inlineCode",{parentName:"p"},"proxy")," - A URL for a proxy to be used in both HTTP and HTTPS requests."),(0,o.mdx)("p",null,(0,o.mdx)("inlineCode",{parentName:"p"},"httpsProxy")," - A URL specific for HTTPS requests (this will override the value set in ",(0,o.mdx)("inlineCode",{parentName:"p"},"proxy")," for HTTPS requests)."),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "teambit.dependencies/dependency-resolver": {\n "proxy": "http://domain-one.proxy.com:8080",\n "httpsProxy": "http://domain-two.proxy.com:8080"\n }\n}\n')),(0,o.mdx)("h5",null,"A proxy can also be set in NPM's and Bit's global configurations"),(0,o.mdx)("p",null,"To get the value for 'proxy'/'https-proxy':"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-bash"},"bit config get proxy\n\nbit config get https-proxy\n")),(0,o.mdx)("p",null,"To set a new 'proxy'/'https-proxy' value:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-bash"},"bit config set proxy http://domain-one.proxy.com:8080\n\nbit config set https-proxy http://domain-one.proxy.com:8080\n")),(0,o.mdx)("p",null,"Read about setting a proxy in NPM's global configuration ",(0,o.mdx)("a",{parentName:"p",href:"https://docs.npmjs.com/cli/v6/using-npm/config#https-proxy"},"here")),(0,o.mdx)("blockquote",null,(0,o.mdx)("p",{parentName:"blockquote"},"Notice the Dependency Resolver config will override ",(0,o.mdx)("em",{parentName:"p"},"all")," other proxy configurations. The NPM config will override Bit's global proxy configurations.")),(0,o.mdx)("h2",null,"Network settings"),(0,o.mdx)("p",null,"Settings that allow to change how aggressively the package manager is making and retrying network requests. Currently, these settings affect only the behavior of pnpm."),(0,o.mdx)("p",null,"These are settings passed to the aspect configuration. For instance:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "teambit.dependencies/dependency-resolver": {\n "networkConcurrency": 4\n }\n}\n')),(0,o.mdx)("h3",null,"networkConcurrency"),(0,o.mdx)("p",null,"Controls the maximum number of HTTP(S) requests to process simultaneously."),(0,o.mdx)("h3",null,"fetchRetries"),(0,o.mdx)("p",null,"How many times to retry if Bit fails to fetch from the registry."),(0,o.mdx)("h3",null,"fetchRetryFactor"),(0,o.mdx)("p",null,"The exponential factor for retry backoff."),(0,o.mdx)("h3",null,"fetchRetryMintimeout"),(0,o.mdx)("p",null,"The minimum (base) timeout for retrying requests."),(0,o.mdx)("h3",null,"fetchRetryMaxtimeout"),(0,o.mdx)("p",null,"The maximum fallback timeout to ensure the retry factor does not make requests too long."),(0,o.mdx)("h3",null,"fetchTimeout"),(0,o.mdx)("p",null,"The maximum amount of time (in milliseconds) to wait for HTTP requests to complete."),(0,o.mdx)("h3",null,"maxSockets"),(0,o.mdx)("p",null,"The maximum number of connections to use per origin (protocol/host/port combination)."),(0,o.mdx)("h2",null,"Overrides"),(0,o.mdx)("p",null,"This field allows you to instruct Bit to override any dependency in the dependency graph. This is useful to enforce all your packages to use a single version of a dependency, backport a fix, or replace a dependency with a fork."),(0,o.mdx)("p",null,"An example of the ",(0,o.mdx)("inlineCode",{parentName:"p"},'"overrides"')," field:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "@teambit.dependencies/dependency-resolver": {\n "overrides": {\n "foo": "^1.0.0",\n "quux": "npm:@myorg/quux@^1.0.0",\n "bar@^2.1.0": "3.0.0",\n "qar@1>zoo": "2"\n }\n }\n}\n')),(0,o.mdx)("p",null,"You may specify the package the overriden dependency belongs to by separating the package selector from the dependency selector with a ",(0,o.mdx)("inlineCode",{parentName:"p"},'">"'),", for example ",(0,o.mdx)("inlineCode",{parentName:"p"},"qar@1>zoo")," will only override the ",(0,o.mdx)("inlineCode",{parentName:"p"},"zoo")," dependency of ",(0,o.mdx)("inlineCode",{parentName:"p"},"qar@1"),", not for any other dependencies."),(0,o.mdx)("h2",null,"Side-Effects cache"),(0,o.mdx)("p",null,"By default, when pnpm is set as the package manager, build artifacts are cached. So when installing a package with pre/postinstall hooks, it is only built the first time it is installed on a computer."),(0,o.mdx)("p",null,"Side-effects cache can be turned off by setting the ",(0,o.mdx)("inlineCode",{parentName:"p"},"sideEffectsCache")," field to ",(0,o.mdx)("inlineCode",{parentName:"p"},"false"),":"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "@teambit.dependencies/dependency-resolver": {\n "sideEffectsCache": false\n }\n}\n')),(0,o.mdx)("h2",null,"Node.js engine checks"),(0,o.mdx)("p",null,"If you want to prevent contributors of your project from adding new incompatible dependencies, use ",(0,o.mdx)("inlineCode",{parentName:"p"},"nodeVersion")," and ",(0,o.mdx)("inlineCode",{parentName:"p"},"engineStrict")," in your ",(0,o.mdx)("inlineCode",{parentName:"p"},"workspace.jsonc"),":"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "@teambit.dependencies/dependency-resolver": {\n "engineStrict": true,\n "nodeVersion": "12.22.0"\n }\n}\n')),(0,o.mdx)("p",null,"This way, even if someone is using Node.js v16, they will not be able to install a new dependency that doesn't support Node.js v12.22.0."),(0,o.mdx)("p",null,"NOTE: This works only with pnpm currently."),(0,o.mdx)("h2",null,"peerDependencyRules"),(0,o.mdx)("h3",null,"peerDependencyRules.ignoreMissing"),(0,o.mdx)("p",null,"Bit will not print warnings about missing peer dependencies from this list."),(0,o.mdx)("p",null,"For instance, with the following configuration, Bit will not print warnings if a dependency needs ",(0,o.mdx)("inlineCode",{parentName:"p"},"react")," but ",(0,o.mdx)("inlineCode",{parentName:"p"},"react")," is not installed:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "@teambit.dependencies/dependency-resolver": {\n "peerDependencyRules": {\n "ignoreMissing": ["react"]\n }\n }\n}\n')),(0,o.mdx)("p",null,"Package name patterns may also be used:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "@teambit.dependencies/dependency-resolver": {\n "peerDependencyRules": {\n "ignoreMissing": ["@babel/*", "@eslint/*"]\n }\n }\n}\n')),(0,o.mdx)("h3",null,"peerDependencyRules.allowedVersions"),(0,o.mdx)("p",null,"Unmet peer dependency warnings will not be printed for peer dependencies of the specified range."),(0,o.mdx)("p",null,"For instance, if you have some dependencies that need ",(0,o.mdx)("inlineCode",{parentName:"p"},"react@16")," but you know that they work fine with ",(0,o.mdx)("inlineCode",{parentName:"p"},"react@17"),", then you may use the following configuration:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "@teambit.dependencies/dependency-resolver": {\n "peerDependencyRules": {\n "allowedVersions": {\n "react": "17"\n }\n }\n }\n}\n')),(0,o.mdx)("p",null,"This will tell Bit that any dependency that has react in its peer dependencies should allow ",(0,o.mdx)("inlineCode",{parentName:"p"},"react")," v17 to be installed."),(0,o.mdx)("h3",null,"peerDependencyRules.allowAny"),(0,o.mdx)("p",null,(0,o.mdx)("inlineCode",{parentName:"p"},"allowAny")," is an array of package name patterns, any peer dependency matching the pattern will be resolved from any version, regardless of the range specified in ",(0,o.mdx)("inlineCode",{parentName:"p"},"peerDependencies"),". For instance:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "@teambit.dependencies/dependency-resolver": {\n "peerDependencyRules": {\n "allowAny": ["@babel/*", "eslint"]\n }\n }\n}\n')),(0,o.mdx)("p",null,"The above setting will mute any warnings about peer dependency version mismatches related to ",(0,o.mdx)("inlineCode",{parentName:"p"},"@babel/")," packages or ",(0,o.mdx)("inlineCode",{parentName:"p"},"eslint"),"."),(0,o.mdx)("h2",null,"Build"),(0,o.mdx)("h3",null,"neverBuiltDependencies"),(0,o.mdx)("p",null,'This field allows to ignore the builds of specific dependencies. The "preinstall", "install", and "postinstall" scripts of the listed packages will not be executed during installation.'),(0,o.mdx)("p",null,'An example of the "neverBuiltDependencies" field:'),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "@teambit.dependencies/dependency-resolver": {\n "neverBuiltDependencies": ["fsevents", "level"]\n }\n}\n')),(0,o.mdx)("h2",null,"CLI reference"),(0,o.mdx)("h3",null,"install"),(0,o.mdx)("blockquote",null,(0,o.mdx)("p",{parentName:"blockquote"},"By default, the Dependency Resolver installs packages from Bit.dev's registry. The authentication for that registry is via your Bit.dev token, listed under ",(0,o.mdx)("inlineCode",{parentName:"p"},"@bit"),", in your ",(0,o.mdx)("inlineCode",{parentName:"p"},".npmrc")," file.\nIf that token cannot be found in the ",(0,o.mdx)("inlineCode",{parentName:"p"},".npmrc")," file, Bit will look for it in your global Bit configurations (use the ",(0,o.mdx)("inlineCode",{parentName:"p"},"bit config")," command to output your ",(0,o.mdx)("inlineCode",{parentName:"p"},"user.token")," property)."),(0,o.mdx)("br",null),"If your npm is configured to use a registry other than npmjs's, then the Dependency Resolver will use that configured registry, instead."),(0,o.mdx)("blockquote",null,(0,o.mdx)("p",{parentName:"blockquote"},"The 'install' process includes importing components and linking them to the ",(0,o.mdx)("inlineCode",{parentName:"p"},"node_modules")," directory.")),(0,o.mdx)("h5",null,"Install all dependencies listed in the Dependency Resolver configuration:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-bash"},"bit install\n")),(0,o.mdx)("h5",null,"Install the latest version of a package:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-bash"},"bit install <package>\n\n// For example\nbit install lodash\n")),(0,o.mdx)("h5",null,"Install a specific version of a package:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-bash"},"bit install <package>@<version>\n\n// For example\nbit install lodash@1.0.0\n")),(0,o.mdx)("h5",null,"Install packages without importing components"),(0,o.mdx)("p",null,"The 'install' process includes importing components listed in the ",(0,o.mdx)("inlineCode",{parentName:"p"},".bitmap")," file and linking them to the ",(0,o.mdx)("inlineCode",{parentName:"p"},"node_modules")," directory.\nTo disable importing and install all packages and components as standard packages use:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-bash"},"bit install --skip-import\n")))}c.__bit_component=a,c.isMDXComponent=!0},252:(e,n,t)=>{Object.defineProperty(n,"Q",{enumerable:!0,get:function(){return a.default}});var a=o(t(499));function o(e){return e&&e.__esModule?e:{default:e}}o.__bit_component={id:"teambit.dependencies/aspect-docs/dependency-resolver@0.0.177",homepage:"https://bit.cloud/teambit/dependencies/aspect-docs/dependency-resolver",exported:!0}},103:(e,n,t)=>{var a={id:"teambit.dependencies/dependency-resolver@1.0.411",homepage:"https://bit.cloud/teambit/dependencies/dependency-resolver",exported:!0};function o(){const e=i(t(594));return o=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0}),n.Logo=void 0,o.__bit_component=a,i.__bit_component=a;const d=()=>o().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},o().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/dependencies.svg"}));d.__bit_component=a,n.Logo=d},16:e=>{e.exports=MdxJsReact},594:e=>{e.exports=React}},n={};function t(a){var o=n[a];if(void 0!==o)return o.exports;var i=n[a]={exports:{}};return e[a](i,i.exports,t),i.exports}t.d=(e,n)=>{for(var a in n)t.o(n,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:n[a]})},t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};t.r(a),t.d(a,{compositions:()=>h,compositions_metadata:()=>y,overview:()=>x});var o={};t.r(o),t.d(o,{default:()=>u});var i=t(103),d=(t(594),t(16));const r=TeambitMdxUiMdxScopeContext;var l=t(252),s=["components"];function p(){return p=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},p.apply(null,arguments)}var m={},c="wrapper";function u(e){var n=e.components,t=function(e,n){if(null==e)return{};var t,a,o=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(n.includes(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],n.includes(t)||{}.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}(e,s);return(0,d.mdx)(c,p({},m,t,{components:n,mdxType:"MDXLayout"}),(0,d.mdx)(r.MDXScopeProvider,{components:{DependencyResolver:l.Q},mdxType:"MDXScopeProvider"},(0,d.mdx)(l.Q,{mdxType:"DependencyResolver"})))}u.isMDXComponent=!0;const h=[i],x=[o],y={compositions:[{displayName:"Logo",identifier:"Logo"}]};return a})()));
|
package/artifacts/schema.json
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"line": 3,
|
|
21
21
|
"character": 15
|
|
22
22
|
},
|
|
23
|
+
"signature": "interface UpdatedComponent",
|
|
23
24
|
"name": "UpdatedComponent",
|
|
24
25
|
"exportNode": {
|
|
25
26
|
"__schema": "InterfaceSchema",
|
|
@@ -106,6 +107,7 @@
|
|
|
106
107
|
"line": 4,
|
|
107
108
|
"character": 15
|
|
108
109
|
},
|
|
110
|
+
"signature": "interface RawComponentState",
|
|
109
111
|
"name": "RawComponentState",
|
|
110
112
|
"exportNode": {
|
|
111
113
|
"__schema": "InterfaceSchema",
|
|
@@ -176,6 +178,7 @@
|
|
|
176
178
|
"line": 4,
|
|
177
179
|
"character": 34
|
|
178
180
|
},
|
|
181
|
+
"signature": "type ComponentsManifestsMap = Map<string, ComponentManifest>",
|
|
179
182
|
"name": "ComponentsManifestsMap",
|
|
180
183
|
"exportNode": {
|
|
181
184
|
"__schema": "TypeSchema",
|
|
@@ -224,6 +227,7 @@
|
|
|
224
227
|
"line": 4,
|
|
225
228
|
"character": 58
|
|
226
229
|
},
|
|
230
|
+
"signature": "type RegistriesMap = {\n [x: string]: Registry;\n}",
|
|
227
231
|
"name": "RegistriesMap",
|
|
228
232
|
"exportNode": {
|
|
229
233
|
"__schema": "TypeSchema",
|
|
@@ -272,6 +276,7 @@
|
|
|
272
276
|
"line": 5,
|
|
273
277
|
"character": 10
|
|
274
278
|
},
|
|
279
|
+
"signature": "class WorkspaceManifest",
|
|
275
280
|
"name": "WorkspaceManifest",
|
|
276
281
|
"exportNode": {
|
|
277
282
|
"__schema": "ClassSchema",
|
|
@@ -833,6 +838,7 @@
|
|
|
833
838
|
"line": 5,
|
|
834
839
|
"character": 29
|
|
835
840
|
},
|
|
841
|
+
"signature": "class ComponentManifest",
|
|
836
842
|
"name": "ComponentManifest",
|
|
837
843
|
"exportNode": {
|
|
838
844
|
"__schema": "ClassSchema",
|
|
@@ -1148,6 +1154,7 @@
|
|
|
1148
1154
|
"line": 6,
|
|
1149
1155
|
"character": 15
|
|
1150
1156
|
},
|
|
1157
|
+
"signature": "type CreateFromComponentsOptions = {\n filterComponentsFromManifests: boolean;\n createManifestForComponentsWithoutDependencies: boolean;\n dedupe?: boolean | undefined;\n dependencyFilterFn?: DepsFilterFn | undefined;\n resolveVersionsFromDependenciesOnly?: boolean | undefined;\n referenceLocalPackages?: boolean | undefined;\n hasRootComponents?: boolean | undefined;\n excludeExtensionsDependencies?: boolean | undefined;\n}",
|
|
1151
1158
|
"name": "CreateFromComponentsOptions",
|
|
1152
1159
|
"exportNode": {
|
|
1153
1160
|
"__schema": "TypeSchema",
|
|
@@ -1337,6 +1344,7 @@
|
|
|
1337
1344
|
"line": 6,
|
|
1338
1345
|
"character": 44
|
|
1339
1346
|
},
|
|
1347
|
+
"signature": "type ManifestDependenciesObject = Partial<Record<keyof ManifestDependenciesKeys, DepObjectValue>> & {\n peerDependenciesMeta?: PeerDependenciesMeta | undefined;\n}",
|
|
1340
1348
|
"name": "ManifestDependenciesObject",
|
|
1341
1349
|
"exportNode": {
|
|
1342
1350
|
"__schema": "TypeSchema",
|
|
@@ -1436,6 +1444,7 @@
|
|
|
1436
1444
|
"line": 7,
|
|
1437
1445
|
"character": 10
|
|
1438
1446
|
},
|
|
1447
|
+
"signature": "class Registries",
|
|
1439
1448
|
"name": "Registries",
|
|
1440
1449
|
"exportNode": {
|
|
1441
1450
|
"__schema": "ClassSchema",
|
|
@@ -1645,6 +1654,7 @@
|
|
|
1645
1654
|
"line": 7,
|
|
1646
1655
|
"character": 22
|
|
1647
1656
|
},
|
|
1657
|
+
"signature": "class Registry",
|
|
1648
1658
|
"name": "Registry",
|
|
1649
1659
|
"exportNode": {
|
|
1650
1660
|
"__schema": "ClassSchema",
|
|
@@ -1866,6 +1876,7 @@
|
|
|
1866
1876
|
"line": 9,
|
|
1867
1877
|
"character": 3
|
|
1868
1878
|
},
|
|
1879
|
+
"signature": "interface InstallationContext",
|
|
1869
1880
|
"name": "InstallationContext",
|
|
1870
1881
|
"exportNode": {
|
|
1871
1882
|
"__schema": "InterfaceSchema",
|
|
@@ -1979,6 +1990,7 @@
|
|
|
1979
1990
|
"line": 10,
|
|
1980
1991
|
"character": 3
|
|
1981
1992
|
},
|
|
1993
|
+
"signature": "type PackageImportMethod = \"auto\" | \"copy\" | \"hardlink\" | \"clone\"",
|
|
1982
1994
|
"name": "PackageImportMethod",
|
|
1983
1995
|
"exportNode": {
|
|
1984
1996
|
"__schema": "TypeSchema",
|
|
@@ -2044,6 +2056,7 @@
|
|
|
2044
2056
|
"line": 11,
|
|
2045
2057
|
"character": 3
|
|
2046
2058
|
},
|
|
2059
|
+
"signature": "interface PackageManager",
|
|
2047
2060
|
"name": "PackageManager",
|
|
2048
2061
|
"exportNode": {
|
|
2049
2062
|
"__schema": "InterfaceSchema",
|
|
@@ -2887,6 +2900,7 @@
|
|
|
2887
2900
|
"line": 12,
|
|
2888
2901
|
"character": 3
|
|
2889
2902
|
},
|
|
2903
|
+
"signature": "type PackageManagerInstallOptions = {\n cacheRootDir?: string | undefined;\n dedupe?: boolean | undefined;\n copyPeerToRuntimeOnRoot?: boolean | undefined;\n copyPeerToRuntimeOnComponents?: boolean | undefined;\n excludeLinksFromLockfile?: boolean | undefined;\n ... 35 more ...;\n returnListOfDepsRequiringBuild?: boolean | undefined;\n}",
|
|
2890
2904
|
"name": "PackageManagerInstallOptions",
|
|
2891
2905
|
"exportNode": {
|
|
2892
2906
|
"__schema": "TypeSchema",
|
|
@@ -3912,6 +3926,7 @@
|
|
|
3912
3926
|
"line": 13,
|
|
3913
3927
|
"character": 3
|
|
3914
3928
|
},
|
|
3929
|
+
"signature": "type PackageManagerResolveRemoteVersionOptions = {\n rootDir: string;\n cacheRootDir?: string | undefined;\n packageManagerConfigRootDir?: string | undefined;\n}",
|
|
3915
3930
|
"name": "PackageManagerResolveRemoteVersionOptions",
|
|
3916
3931
|
"exportNode": {
|
|
3917
3932
|
"__schema": "TypeSchema",
|
|
@@ -4001,6 +4016,7 @@
|
|
|
4001
4016
|
"line": 14,
|
|
4002
4017
|
"character": 3
|
|
4003
4018
|
},
|
|
4019
|
+
"signature": "type ResolvedPackageVersion = {\n packageName: string;\n version: string | null;\n wantedRange?: string | undefined;\n isSemver: boolean;\n resolvedVia?: string | undefined;\n}",
|
|
4004
4020
|
"name": "ResolvedPackageVersion",
|
|
4005
4021
|
"exportNode": {
|
|
4006
4022
|
"__schema": "TypeSchema",
|
|
@@ -4149,6 +4165,7 @@
|
|
|
4149
4165
|
"line": 17,
|
|
4150
4166
|
"character": 3
|
|
4151
4167
|
},
|
|
4168
|
+
"signature": "interface DependencyResolverWorkspaceConfig",
|
|
4152
4169
|
"name": "DependencyResolverWorkspaceConfig",
|
|
4153
4170
|
"exportNode": {
|
|
4154
4171
|
"__schema": "InterfaceSchema",
|
|
@@ -5162,6 +5179,7 @@
|
|
|
5162
5179
|
"line": 18,
|
|
5163
5180
|
"character": 3
|
|
5164
5181
|
},
|
|
5182
|
+
"signature": "type NodeLinker = \"isolated\" | \"hoisted\"",
|
|
5165
5183
|
"name": "NodeLinker",
|
|
5166
5184
|
"exportNode": {
|
|
5167
5185
|
"__schema": "TypeSchema",
|
|
@@ -5209,6 +5227,7 @@
|
|
|
5209
5227
|
"line": 21,
|
|
5210
5228
|
"character": 3
|
|
5211
5229
|
},
|
|
5230
|
+
"signature": "class DependencyResolverMain",
|
|
5212
5231
|
"name": "DependencyResolverMain",
|
|
5213
5232
|
"exportNode": {
|
|
5214
5233
|
"__schema": "ClassSchema",
|
|
@@ -11502,6 +11521,7 @@
|
|
|
11502
11521
|
"line": 22,
|
|
11503
11522
|
"character": 3
|
|
11504
11523
|
},
|
|
11524
|
+
"signature": "interface DependencyResolverVariantConfig",
|
|
11505
11525
|
"name": "DependencyResolverVariantConfig",
|
|
11506
11526
|
"exportNode": {
|
|
11507
11527
|
"__schema": "InterfaceSchema",
|
|
@@ -11544,6 +11564,7 @@
|
|
|
11544
11564
|
"line": 23,
|
|
11545
11565
|
"character": 3
|
|
11546
11566
|
},
|
|
11567
|
+
"signature": "interface MergedOutdatedPkg",
|
|
11547
11568
|
"name": "MergedOutdatedPkg",
|
|
11548
11569
|
"exportNode": {
|
|
11549
11570
|
"__schema": "InterfaceSchema",
|
|
@@ -11684,6 +11705,7 @@
|
|
|
11684
11705
|
"line": 25,
|
|
11685
11706
|
"character": 10
|
|
11686
11707
|
},
|
|
11708
|
+
"signature": "const NPM_REGISTRY: \"https://registry.npmjs.org/\"",
|
|
11687
11709
|
"name": "NPM_REGISTRY",
|
|
11688
11710
|
"exportNode": {
|
|
11689
11711
|
"__schema": "VariableLikeSchema",
|
|
@@ -11714,6 +11736,7 @@
|
|
|
11714
11736
|
"line": 25,
|
|
11715
11737
|
"character": 24
|
|
11716
11738
|
},
|
|
11739
|
+
"signature": "const BIT_CLOUD_REGISTRY: string",
|
|
11717
11740
|
"name": "BIT_CLOUD_REGISTRY",
|
|
11718
11741
|
"exportNode": {
|
|
11719
11742
|
"__schema": "VariableLikeSchema",
|
|
@@ -11744,17 +11767,17 @@
|
|
|
11744
11767
|
"line": 27,
|
|
11745
11768
|
"character": 18
|
|
11746
11769
|
},
|
|
11747
|
-
"
|
|
11770
|
+
"signature": "export { PackageManagerProxyConfig };\n\nPackageManagerProxyConfig",
|
|
11771
|
+
"name": "PackageManagerProxyConfig",
|
|
11748
11772
|
"exportNode": {
|
|
11749
|
-
"__schema": "
|
|
11773
|
+
"__schema": "UnresolvedSchema",
|
|
11750
11774
|
"location": {
|
|
11751
11775
|
"filePath": "index.ts",
|
|
11752
11776
|
"line": 27,
|
|
11753
|
-
"character":
|
|
11777
|
+
"character": 18
|
|
11754
11778
|
},
|
|
11755
|
-
"name": "
|
|
11756
|
-
}
|
|
11757
|
-
"alias": "PackageManagerProxyConfig"
|
|
11779
|
+
"name": "PackageManagerProxyConfig"
|
|
11780
|
+
}
|
|
11758
11781
|
},
|
|
11759
11782
|
{
|
|
11760
11783
|
"__schema": "ExportSchema",
|
|
@@ -11763,17 +11786,17 @@
|
|
|
11763
11786
|
"line": 28,
|
|
11764
11787
|
"character": 20
|
|
11765
11788
|
},
|
|
11766
|
-
"
|
|
11789
|
+
"signature": "export { PackageManagerNetworkConfig };\n\nPackageManagerNetworkConfig",
|
|
11790
|
+
"name": "PackageManagerNetworkConfig",
|
|
11767
11791
|
"exportNode": {
|
|
11768
|
-
"__schema": "
|
|
11792
|
+
"__schema": "UnresolvedSchema",
|
|
11769
11793
|
"location": {
|
|
11770
11794
|
"filePath": "index.ts",
|
|
11771
11795
|
"line": 28,
|
|
11772
|
-
"character":
|
|
11796
|
+
"character": 20
|
|
11773
11797
|
},
|
|
11774
|
-
"name": "
|
|
11775
|
-
}
|
|
11776
|
-
"alias": "PackageManagerNetworkConfig"
|
|
11798
|
+
"name": "PackageManagerNetworkConfig"
|
|
11799
|
+
}
|
|
11777
11800
|
},
|
|
11778
11801
|
{
|
|
11779
11802
|
"__schema": "ExportSchema",
|
|
@@ -11782,6 +11805,7 @@
|
|
|
11782
11805
|
"line": 30,
|
|
11783
11806
|
"character": 10
|
|
11784
11807
|
},
|
|
11808
|
+
"signature": "class DependencyList",
|
|
11785
11809
|
"name": "DependencyList",
|
|
11786
11810
|
"exportNode": {
|
|
11787
11811
|
"__schema": "ClassSchema",
|
|
@@ -12753,6 +12777,7 @@
|
|
|
12753
12777
|
"line": 30,
|
|
12754
12778
|
"character": 26
|
|
12755
12779
|
},
|
|
12780
|
+
"signature": "class BaseDependency",
|
|
12756
12781
|
"name": "BaseDependency",
|
|
12757
12782
|
"exportNode": {
|
|
12758
12783
|
"__schema": "ClassSchema",
|
|
@@ -13714,6 +13739,7 @@
|
|
|
13714
13739
|
"line": 30,
|
|
13715
13740
|
"character": 42
|
|
13716
13741
|
},
|
|
13742
|
+
"signature": "class ComponentDependency",
|
|
13717
13743
|
"name": "ComponentDependency",
|
|
13718
13744
|
"exportNode": {
|
|
13719
13745
|
"__schema": "ClassSchema",
|
|
@@ -15113,6 +15139,7 @@
|
|
|
15113
15139
|
"line": 30,
|
|
15114
15140
|
"character": 63
|
|
15115
15141
|
},
|
|
15142
|
+
"signature": "const KEY_NAME_BY_LIFECYCLE_TYPE: {\n runtime: string;\n dev: string;\n peer: string;\n 'optional-runtime': string;\n}",
|
|
15116
15143
|
"name": "KEY_NAME_BY_LIFECYCLE_TYPE",
|
|
15117
15144
|
"exportNode": {
|
|
15118
15145
|
"__schema": "VariableLikeSchema",
|
|
@@ -15143,6 +15170,7 @@
|
|
|
15143
15170
|
"line": 32,
|
|
15144
15171
|
"character": 3
|
|
15145
15172
|
},
|
|
15173
|
+
"signature": "type DependencyLifecycleType = \"dev\" | WorkspaceDependencyLifecycleType",
|
|
15146
15174
|
"name": "DependencyLifecycleType",
|
|
15147
15175
|
"exportNode": {
|
|
15148
15176
|
"__schema": "TypeSchema",
|
|
@@ -15190,6 +15218,7 @@
|
|
|
15190
15218
|
"line": 33,
|
|
15191
15219
|
"character": 3
|
|
15192
15220
|
},
|
|
15221
|
+
"signature": "type WorkspaceDependencyLifecycleType = \"peer\" | \"runtime\"",
|
|
15193
15222
|
"name": "WorkspaceDependencyLifecycleType",
|
|
15194
15223
|
"exportNode": {
|
|
15195
15224
|
"__schema": "TypeSchema",
|
|
@@ -15237,6 +15266,7 @@
|
|
|
15237
15266
|
"line": 34,
|
|
15238
15267
|
"character": 3
|
|
15239
15268
|
},
|
|
15269
|
+
"signature": "interface DependencyFactory",
|
|
15240
15270
|
"name": "DependencyFactory",
|
|
15241
15271
|
"exportNode": {
|
|
15242
15272
|
"__schema": "InterfaceSchema",
|
|
@@ -15400,6 +15430,7 @@
|
|
|
15400
15430
|
"line": 35,
|
|
15401
15431
|
"character": 3
|
|
15402
15432
|
},
|
|
15433
|
+
"signature": "interface SerializedDependency",
|
|
15403
15434
|
"name": "SerializedDependency",
|
|
15404
15435
|
"exportNode": {
|
|
15405
15436
|
"__schema": "InterfaceSchema",
|
|
@@ -15602,6 +15633,7 @@
|
|
|
15602
15633
|
"line": 36,
|
|
15603
15634
|
"character": 3
|
|
15604
15635
|
},
|
|
15636
|
+
"signature": "interface Dependency",
|
|
15605
15637
|
"name": "Dependency",
|
|
15606
15638
|
"exportNode": {
|
|
15607
15639
|
"__schema": "InterfaceSchema",
|
|
@@ -15956,6 +15988,7 @@
|
|
|
15956
15988
|
"line": 37,
|
|
15957
15989
|
"character": 3
|
|
15958
15990
|
},
|
|
15991
|
+
"signature": "type SemverVersion = string",
|
|
15959
15992
|
"name": "SemverVersion",
|
|
15960
15993
|
"exportNode": {
|
|
15961
15994
|
"__schema": "TypeSchema",
|
|
@@ -15995,6 +16028,7 @@
|
|
|
15995
16028
|
"line": 38,
|
|
15996
16029
|
"character": 3
|
|
15997
16030
|
},
|
|
16031
|
+
"signature": "interface DependenciesManifest",
|
|
15998
16032
|
"name": "DependenciesManifest",
|
|
15999
16033
|
"exportNode": {
|
|
16000
16034
|
"__schema": "InterfaceSchema",
|
|
@@ -16117,6 +16151,7 @@
|
|
|
16117
16151
|
"line": 40,
|
|
16118
16152
|
"character": 10
|
|
16119
16153
|
},
|
|
16154
|
+
"signature": "class WorkspacePolicy",
|
|
16120
16155
|
"name": "WorkspacePolicy",
|
|
16121
16156
|
"exportNode": {
|
|
16122
16157
|
"__schema": "ClassSchema",
|
|
@@ -16960,6 +16995,7 @@
|
|
|
16960
16995
|
"line": 40,
|
|
16961
16996
|
"character": 27
|
|
16962
16997
|
},
|
|
16998
|
+
"signature": "class VariantPolicy",
|
|
16963
16999
|
"name": "VariantPolicy",
|
|
16964
17000
|
"exportNode": {
|
|
16965
17001
|
"__schema": "ClassSchema",
|
|
@@ -18121,6 +18157,7 @@
|
|
|
18121
18157
|
"line": 40,
|
|
18122
18158
|
"character": 42
|
|
18123
18159
|
},
|
|
18160
|
+
"signature": "class EnvPolicy",
|
|
18124
18161
|
"name": "EnvPolicy",
|
|
18125
18162
|
"exportNode": {
|
|
18126
18163
|
"__schema": "ClassSchema",
|
|
@@ -19478,6 +19515,7 @@
|
|
|
19478
19515
|
"line": 42,
|
|
19479
19516
|
"character": 3
|
|
19480
19517
|
},
|
|
19518
|
+
"signature": "type WorkspacePolicyEntry = {\n dependencyId: string;\n lifecycleType: WorkspaceDependencyLifecycleType;\n value: WorkspacePolicyEntryValue;\n}",
|
|
19481
19519
|
"name": "WorkspacePolicyEntry",
|
|
19482
19520
|
"exportNode": {
|
|
19483
19521
|
"__schema": "TypeSchema",
|
|
@@ -19568,6 +19606,7 @@
|
|
|
19568
19606
|
"line": 43,
|
|
19569
19607
|
"character": 3
|
|
19570
19608
|
},
|
|
19609
|
+
"signature": "type WorkspacePolicyConfigObject = {\n dependencies?: WorkspacePolicyLifecycleConfigObject | undefined;\n peerDependencies?: WorkspacePolicyLifecycleConfigObject | undefined;\n}",
|
|
19571
19610
|
"name": "WorkspacePolicyConfigObject",
|
|
19572
19611
|
"exportNode": {
|
|
19573
19612
|
"__schema": "TypeSchema",
|
|
@@ -19627,6 +19666,7 @@
|
|
|
19627
19666
|
"line": 44,
|
|
19628
19667
|
"character": 3
|
|
19629
19668
|
},
|
|
19669
|
+
"signature": "type VariantPolicyConfigObject = {\n dependencies?: VariantPolicyLifecycleConfigObject | undefined;\n devDependencies?: VariantPolicyLifecycleConfigObject | undefined;\n peerDependencies?: VariantPolicyLifecycleConfigObject | undefined;\n}",
|
|
19630
19670
|
"name": "VariantPolicyConfigObject",
|
|
19631
19671
|
"exportNode": {
|
|
19632
19672
|
"__schema": "TypeSchema",
|
|
@@ -19695,6 +19735,7 @@
|
|
|
19695
19735
|
"line": 45,
|
|
19696
19736
|
"character": 3
|
|
19697
19737
|
},
|
|
19738
|
+
"signature": "interface Policy<T>",
|
|
19698
19739
|
"name": "Policy",
|
|
19699
19740
|
"exportNode": {
|
|
19700
19741
|
"__schema": "InterfaceSchema",
|
|
@@ -19741,6 +19782,7 @@
|
|
|
19741
19782
|
"line": 46,
|
|
19742
19783
|
"character": 3
|
|
19743
19784
|
},
|
|
19785
|
+
"signature": "type PolicySemver = string",
|
|
19744
19786
|
"name": "PolicySemver",
|
|
19745
19787
|
"exportNode": {
|
|
19746
19788
|
"__schema": "TypeSchema",
|
|
@@ -19799,6 +19841,7 @@
|
|
|
19799
19841
|
"line": 47,
|
|
19800
19842
|
"character": 3
|
|
19801
19843
|
},
|
|
19844
|
+
"signature": "type PolicyConfigKeys = {\n dependencies: 'dependencies';\n devDependencies: 'devDependencies';\n peerDependencies: 'peerDependencies';\n}",
|
|
19802
19845
|
"name": "PolicyConfigKeys",
|
|
19803
19846
|
"exportNode": {
|
|
19804
19847
|
"__schema": "TypeSchema",
|
|
@@ -19888,6 +19931,7 @@
|
|
|
19888
19931
|
"line": 48,
|
|
19889
19932
|
"character": 3
|
|
19890
19933
|
},
|
|
19934
|
+
"signature": "type PolicyConfigKeysNames = keyof PolicyConfigKeys",
|
|
19891
19935
|
"name": "PolicyConfigKeysNames",
|
|
19892
19936
|
"exportNode": {
|
|
19893
19937
|
"__schema": "TypeSchema",
|
|
@@ -19925,6 +19969,7 @@
|
|
|
19925
19969
|
"line": 49,
|
|
19926
19970
|
"character": 3
|
|
19927
19971
|
},
|
|
19972
|
+
"signature": "type PolicyEntry = {\n dependencyId: string;\n lifecycleType: DependencyLifecycleType;\n}",
|
|
19928
19973
|
"name": "PolicyEntry",
|
|
19929
19974
|
"exportNode": {
|
|
19930
19975
|
"__schema": "TypeSchema",
|
|
@@ -19994,6 +20039,7 @@
|
|
|
19994
20039
|
"line": 50,
|
|
19995
20040
|
"character": 3
|
|
19996
20041
|
},
|
|
20042
|
+
"signature": "type SerializedVariantPolicy = VariantPolicyEntry[]",
|
|
19997
20043
|
"name": "SerializedVariantPolicy",
|
|
19998
20044
|
"exportNode": {
|
|
19999
20045
|
"__schema": "TypeSchema",
|
|
@@ -20030,6 +20076,7 @@
|
|
|
20030
20076
|
"line": 51,
|
|
20031
20077
|
"character": 3
|
|
20032
20078
|
},
|
|
20079
|
+
"signature": "type WorkspacePolicyConfigKeysNames = \"dependencies\" | \"peerDependencies\"",
|
|
20033
20080
|
"name": "WorkspacePolicyConfigKeysNames",
|
|
20034
20081
|
"exportNode": {
|
|
20035
20082
|
"__schema": "TypeSchema",
|
|
@@ -20067,6 +20114,7 @@
|
|
|
20067
20114
|
"line": 52,
|
|
20068
20115
|
"character": 3
|
|
20069
20116
|
},
|
|
20117
|
+
"signature": "type EnvPolicyConfigObject = EnvPolicyEnvJsoncConfigObject | EnvPolicyLegacyConfigObject",
|
|
20070
20118
|
"name": "EnvPolicyConfigObject",
|
|
20071
20119
|
"exportNode": {
|
|
20072
20120
|
"__schema": "TypeSchema",
|
|
@@ -20114,6 +20162,7 @@
|
|
|
20114
20162
|
"line": 54,
|
|
20115
20163
|
"character": 10
|
|
20116
20164
|
},
|
|
20165
|
+
"signature": "class DependencyLinker",
|
|
20117
20166
|
"name": "DependencyLinker",
|
|
20118
20167
|
"exportNode": {
|
|
20119
20168
|
"__schema": "ClassSchema",
|
|
@@ -20868,6 +20917,7 @@
|
|
|
20868
20917
|
"line": 56,
|
|
20869
20918
|
"character": 3
|
|
20870
20919
|
},
|
|
20920
|
+
"signature": "type CoreAspectLinkResult = {\n aspectId: string;\n linkDetail: LinkDetail;\n}",
|
|
20871
20921
|
"name": "CoreAspectLinkResult",
|
|
20872
20922
|
"exportNode": {
|
|
20873
20923
|
"__schema": "TypeSchema",
|
|
@@ -20937,6 +20987,7 @@
|
|
|
20937
20987
|
"line": 57,
|
|
20938
20988
|
"character": 3
|
|
20939
20989
|
},
|
|
20990
|
+
"signature": "type LinkDetail = {\n packageName: string;\n from: string;\n to: string;\n}",
|
|
20940
20991
|
"name": "LinkDetail",
|
|
20941
20992
|
"exportNode": {
|
|
20942
20993
|
"__schema": "TypeSchema",
|
|
@@ -21026,6 +21077,7 @@
|
|
|
21026
21077
|
"line": 58,
|
|
21027
21078
|
"character": 3
|
|
21028
21079
|
},
|
|
21080
|
+
"signature": "type LinkResults = {\n teambitBitLink?: CoreAspectLinkResult | undefined;\n coreAspectsLinks?: CoreAspectLinkResult[] | undefined;\n harmonyLink?: LinkDetail | undefined;\n teambitLegacyLink?: LinkDetail | undefined;\n resolvedFromEnvLinks?: DepsLinkedToEnvResult[] | undefined;\n nestedDepsInNmLinks?: NestedNMDepsLinksResult[] | undefined;\n linkToDirResults?: LinkToDirResult[] | undefined;\n}",
|
|
21029
21081
|
"name": "LinkResults",
|
|
21030
21082
|
"exportNode": {
|
|
21031
21083
|
"__schema": "TypeSchema",
|
|
@@ -21227,6 +21279,7 @@
|
|
|
21227
21279
|
"line": 59,
|
|
21228
21280
|
"character": 3
|
|
21229
21281
|
},
|
|
21282
|
+
"signature": "type LinkingOptions = {\n rewire?: boolean | undefined;\n linkTeambitBit?: boolean | undefined;\n linkCoreAspects?: boolean | undefined;\n linkNestedDepsInNM?: boolean | undefined;\n linkToDir?: string | undefined;\n includePeers?: boolean | undefined;\n fetchObject?: boolean | undefined;\n linkDepsResolvedFromEnv?: boolean | undefined;\n}",
|
|
21230
21283
|
"name": "LinkingOptions",
|
|
21231
21284
|
"exportNode": {
|
|
21232
21285
|
"__schema": "TypeSchema",
|
|
@@ -21493,6 +21546,7 @@
|
|
|
21493
21546
|
"line": 60,
|
|
21494
21547
|
"character": 3
|
|
21495
21548
|
},
|
|
21549
|
+
"signature": "type DepsLinkedToEnvResult = {\n componentId: string;\n linksDetail: LinkDetail[];\n}",
|
|
21496
21550
|
"name": "DepsLinkedToEnvResult",
|
|
21497
21551
|
"exportNode": {
|
|
21498
21552
|
"__schema": "TypeSchema",
|
|
@@ -21570,6 +21624,7 @@
|
|
|
21570
21624
|
"line": 61,
|
|
21571
21625
|
"character": 3
|
|
21572
21626
|
},
|
|
21627
|
+
"signature": "type NestedNMDepsLinksResult = {\n componentId: string;\n linksDetail: LinkDetail[];\n}",
|
|
21573
21628
|
"name": "NestedNMDepsLinksResult",
|
|
21574
21629
|
"exportNode": {
|
|
21575
21630
|
"__schema": "TypeSchema",
|
|
@@ -21647,6 +21702,7 @@
|
|
|
21647
21702
|
"line": 62,
|
|
21648
21703
|
"character": 3
|
|
21649
21704
|
},
|
|
21705
|
+
"signature": "type LinkToDirResult = {\n componentId: string;\n linksDetail: LinkDetail;\n}",
|
|
21650
21706
|
"name": "LinkToDirResult",
|
|
21651
21707
|
"exportNode": {
|
|
21652
21708
|
"__schema": "TypeSchema",
|
|
@@ -21716,6 +21772,7 @@
|
|
|
21716
21772
|
"line": 64,
|
|
21717
21773
|
"character": 10
|
|
21718
21774
|
},
|
|
21775
|
+
"signature": "class DependencyInstaller",
|
|
21719
21776
|
"name": "DependencyInstaller",
|
|
21720
21777
|
"exportNode": {
|
|
21721
21778
|
"__schema": "ClassSchema",
|
|
@@ -22797,6 +22854,7 @@
|
|
|
22797
22854
|
"line": 65,
|
|
22798
22855
|
"character": 15
|
|
22799
22856
|
},
|
|
22857
|
+
"signature": "type GetComponentManifestsOptions = {\n componentDirectoryMap: ComponentMap<string>;\n rootPolicy: WorkspacePolicy;\n rootDir: string;\n resolveVersionsFromDependenciesOnly?: boolean | undefined;\n referenceLocalPackages?: boolean | undefined;\n hasRootComponents?: boolean | undefined;\n excludeExtensionsDependencies?: boolean | undefined;\n} & Pick<...>",
|
|
22800
22858
|
"name": "GetComponentManifestsOptions",
|
|
22801
22859
|
"exportNode": {
|
|
22802
22860
|
"__schema": "TypeSchema",
|
|
@@ -23062,6 +23120,7 @@
|
|
|
23062
23120
|
"line": 65,
|
|
23063
23121
|
"character": 45
|
|
23064
23122
|
},
|
|
23123
|
+
"signature": "type InstallOptions = {\n installTeambitBit: boolean;\n packageManagerConfigRootDir?: string | undefined;\n resolveVersionsFromDependenciesOnly?: boolean | undefined;\n linkedDependencies?: Record<string, Record<string, string>> | undefined;\n forceTeambitHarmonyLink?: boolean | undefined;\n excludeExtensionsDependencies?: boolean | undefined;\n dedupeInjectedDeps?: boolean | undefined;\n}",
|
|
23065
23124
|
"name": "InstallOptions",
|
|
23066
23125
|
"exportNode": {
|
|
23067
23126
|
"__schema": "TypeSchema",
|
|
@@ -23271,6 +23330,7 @@
|
|
|
23271
23330
|
"line": 65,
|
|
23272
23331
|
"character": 61
|
|
23273
23332
|
},
|
|
23333
|
+
"signature": "type InstallArgs = {\n rootDir: string | undefined;\n rootPolicy: WorkspacePolicy;\n componentDirectoryMap: ComponentMap<string>;\n options: InstallOptions;\n packageManagerOptions: PackageManagerInstallOptions;\n}",
|
|
23274
23334
|
"name": "InstallArgs",
|
|
23275
23335
|
"exportNode": {
|
|
23276
23336
|
"__schema": "TypeSchema",
|
|
@@ -23430,9 +23490,10 @@
|
|
|
23430
23490
|
"line": 66,
|
|
23431
23491
|
"character": 15
|
|
23432
23492
|
},
|
|
23493
|
+
"signature": "export { DependencyDetector };\n\nDependencyDetector",
|
|
23433
23494
|
"name": "DependencyDetector",
|
|
23434
23495
|
"exportNode": {
|
|
23435
|
-
"__schema": "
|
|
23496
|
+
"__schema": "UnresolvedSchema",
|
|
23436
23497
|
"location": {
|
|
23437
23498
|
"filePath": "index.ts",
|
|
23438
23499
|
"line": 66,
|
|
@@ -23448,9 +23509,10 @@
|
|
|
23448
23509
|
"line": 66,
|
|
23449
23510
|
"character": 35
|
|
23450
23511
|
},
|
|
23512
|
+
"signature": "export { FileContext };\n\nFileContext",
|
|
23451
23513
|
"name": "FileContext",
|
|
23452
23514
|
"exportNode": {
|
|
23453
|
-
"__schema": "
|
|
23515
|
+
"__schema": "UnresolvedSchema",
|
|
23454
23516
|
"location": {
|
|
23455
23517
|
"filePath": "index.ts",
|
|
23456
23518
|
"line": 66,
|
|
@@ -23466,6 +23528,7 @@
|
|
|
23466
23528
|
"line": 67,
|
|
23467
23529
|
"character": 15
|
|
23468
23530
|
},
|
|
23531
|
+
"signature": "type DependencySource = \"config\" | \"env\" | \"auto\" | \"env-own\" | \"slots\"",
|
|
23469
23532
|
"name": "DependencySource",
|
|
23470
23533
|
"exportNode": {
|
|
23471
23534
|
"__schema": "TypeSchema",
|
|
@@ -23540,6 +23603,7 @@
|
|
|
23540
23603
|
"line": 67,
|
|
23541
23604
|
"character": 33
|
|
23542
23605
|
},
|
|
23606
|
+
"signature": "type VariantPolicyEntry = PolicyEntry & {\n value: VariantPolicyEntryValue;\n source?: DependencySource | undefined;\n hidden?: boolean | undefined;\n force?: boolean | undefined;\n optional?: boolean | undefined;\n}",
|
|
23543
23607
|
"name": "VariantPolicyEntry",
|
|
23544
23608
|
"exportNode": {
|
|
23545
23609
|
"__schema": "TypeSchema",
|
|
@@ -23711,6 +23775,7 @@
|
|
|
23711
23775
|
"line": 68,
|
|
23712
23776
|
"character": 15
|
|
23713
23777
|
},
|
|
23778
|
+
"signature": "type OutdatedPkg = CurrentPkg & {\n latestRange: string;\n}",
|
|
23714
23779
|
"name": "OutdatedPkg",
|
|
23715
23780
|
"exportNode": {
|
|
23716
23781
|
"__schema": "TypeSchema",
|
|
@@ -23779,6 +23844,7 @@
|
|
|
23779
23844
|
"line": 69,
|
|
23780
23845
|
"character": 10
|
|
23781
23846
|
},
|
|
23847
|
+
"signature": "function extendWithComponentsFromDir(rootDir: string, manifestsByPaths: any): Promise<any>",
|
|
23782
23848
|
"name": "extendWithComponentsFromDir",
|
|
23783
23849
|
"exportNode": {
|
|
23784
23850
|
"__schema": "FunctionLikeSchema",
|
|
@@ -23864,6 +23930,7 @@
|
|
|
23864
23930
|
"line": 70,
|
|
23865
23931
|
"character": 10
|
|
23866
23932
|
},
|
|
23933
|
+
"signature": "function isRange(version: string, compIdStr: string): boolean",
|
|
23867
23934
|
"name": "isRange",
|
|
23868
23935
|
"exportNode": {
|
|
23869
23936
|
"__schema": "FunctionLikeSchema",
|
|
@@ -23937,6 +24004,7 @@
|
|
|
23937
24004
|
"line": 71,
|
|
23938
24005
|
"character": 15
|
|
23939
24006
|
},
|
|
24007
|
+
"signature": "interface DependencyEnv",
|
|
23940
24008
|
"name": "DependencyEnv",
|
|
23941
24009
|
"exportNode": {
|
|
23942
24010
|
"__schema": "InterfaceSchema",
|
|
@@ -24018,6 +24086,7 @@
|
|
|
24018
24086
|
"line": 72,
|
|
24019
24087
|
"character": 38
|
|
24020
24088
|
},
|
|
24089
|
+
"signature": "const DependencyResolverAspect: Aspect",
|
|
24021
24090
|
"name": "DependencyResolverAspect",
|
|
24022
24091
|
"exportNode": {
|
|
24023
24092
|
"__schema": "VariableLikeSchema",
|
|
@@ -24054,6 +24123,7 @@
|
|
|
24054
24123
|
"line": 72,
|
|
24055
24124
|
"character": 47
|
|
24056
24125
|
},
|
|
24126
|
+
"signature": "const DependencyResolverAspect: Aspect",
|
|
24057
24127
|
"name": "DependencyResolverAspect",
|
|
24058
24128
|
"exportNode": {
|
|
24059
24129
|
"__schema": "VariableLikeSchema",
|
|
@@ -27610,16 +27680,16 @@
|
|
|
27610
27680
|
"line": 8,
|
|
27611
27681
|
"character": 10
|
|
27612
27682
|
},
|
|
27683
|
+
"signature": "export { PeerDependencyIssuesByProjects };\n\nPeerDependencyIssuesByProjects",
|
|
27613
27684
|
"name": "PeerDependencyIssuesByProjects",
|
|
27614
27685
|
"exportNode": {
|
|
27615
|
-
"__schema": "
|
|
27686
|
+
"__schema": "UnresolvedSchema",
|
|
27616
27687
|
"location": {
|
|
27617
27688
|
"filePath": "package-manager.ts",
|
|
27618
27689
|
"line": 8,
|
|
27619
27690
|
"character": 10
|
|
27620
27691
|
},
|
|
27621
|
-
"name": "PeerDependencyIssuesByProjects"
|
|
27622
|
-
"internalFilePath": "package-manager.ts"
|
|
27692
|
+
"name": "PeerDependencyIssuesByProjects"
|
|
27623
27693
|
}
|
|
27624
27694
|
},
|
|
27625
27695
|
{
|
|
@@ -30983,16 +31053,16 @@
|
|
|
30983
31053
|
"line": 95,
|
|
30984
31054
|
"character": 10
|
|
30985
31055
|
},
|
|
31056
|
+
"signature": "export { ProxyConfig };\n\nProxyConfig",
|
|
30986
31057
|
"name": "ProxyConfig",
|
|
30987
31058
|
"exportNode": {
|
|
30988
|
-
"__schema": "
|
|
31059
|
+
"__schema": "UnresolvedSchema",
|
|
30989
31060
|
"location": {
|
|
30990
31061
|
"filePath": "dependency-resolver.main.runtime.ts",
|
|
30991
31062
|
"line": 95,
|
|
30992
31063
|
"character": 10
|
|
30993
31064
|
},
|
|
30994
|
-
"name": "ProxyConfig"
|
|
30995
|
-
"packageName": "@teambit/legacy/dist/scope/network/http"
|
|
31065
|
+
"name": "ProxyConfig"
|
|
30996
31066
|
}
|
|
30997
31067
|
},
|
|
30998
31068
|
{
|
|
@@ -31002,16 +31072,16 @@
|
|
|
31002
31072
|
"line": 95,
|
|
31003
31073
|
"character": 23
|
|
31004
31074
|
},
|
|
31075
|
+
"signature": "export { NetworkConfig };\n\nNetworkConfig",
|
|
31005
31076
|
"name": "NetworkConfig",
|
|
31006
31077
|
"exportNode": {
|
|
31007
|
-
"__schema": "
|
|
31078
|
+
"__schema": "UnresolvedSchema",
|
|
31008
31079
|
"location": {
|
|
31009
31080
|
"filePath": "dependency-resolver.main.runtime.ts",
|
|
31010
31081
|
"line": 95,
|
|
31011
31082
|
"character": 23
|
|
31012
31083
|
},
|
|
31013
|
-
"name": "NetworkConfig"
|
|
31014
|
-
"packageName": "@teambit/legacy/dist/scope/network/http"
|
|
31084
|
+
"name": "NetworkConfig"
|
|
31015
31085
|
}
|
|
31016
31086
|
},
|
|
31017
31087
|
{
|
|
@@ -55132,7 +55202,7 @@
|
|
|
55132
55202
|
"componentId": {
|
|
55133
55203
|
"scope": "teambit.dependencies",
|
|
55134
55204
|
"name": "dependency-resolver",
|
|
55135
|
-
"version": "1.0.
|
|
55205
|
+
"version": "1.0.411"
|
|
55136
55206
|
},
|
|
55137
55207
|
"taggedModuleExports": []
|
|
55138
55208
|
}
|
|
@@ -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.411/dist/dependency-resolver.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.dependencies_dependency-resolver@1.0.411/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.411",
|
|
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.411"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -34,23 +34,23 @@
|
|
|
34
34
|
"@teambit/legacy-bit-id": "1.1.1",
|
|
35
35
|
"@teambit/component-version": "1.0.3",
|
|
36
36
|
"@teambit/toolbox.object.sorter": "0.0.2",
|
|
37
|
-
"@teambit/component": "1.0.
|
|
38
|
-
"@teambit/envs": "1.0.
|
|
39
|
-
"@teambit/dependencies": "1.0.
|
|
40
|
-
"@teambit/aspect-loader": "1.0.
|
|
41
|
-
"@teambit/logger": "0.0.
|
|
37
|
+
"@teambit/component": "1.0.411",
|
|
38
|
+
"@teambit/envs": "1.0.411",
|
|
39
|
+
"@teambit/dependencies": "1.0.411",
|
|
40
|
+
"@teambit/aspect-loader": "1.0.411",
|
|
41
|
+
"@teambit/logger": "0.0.1081",
|
|
42
42
|
"@teambit/toolbox.path.path": "0.0.4",
|
|
43
43
|
"@teambit/pkg.modules.component-package-name": "0.0.4",
|
|
44
|
-
"@teambit/graphql": "1.0.
|
|
45
|
-
"@teambit/bit": "1.8.
|
|
46
|
-
"@teambit/cli": "0.0.
|
|
47
|
-
"@teambit/component.sources": "0.0.
|
|
48
|
-
"@teambit/config": "0.0.
|
|
49
|
-
"@teambit/global-config": "0.0.
|
|
44
|
+
"@teambit/graphql": "1.0.411",
|
|
45
|
+
"@teambit/bit": "1.8.62",
|
|
46
|
+
"@teambit/cli": "0.0.988",
|
|
47
|
+
"@teambit/component.sources": "0.0.30",
|
|
48
|
+
"@teambit/config": "0.0.1162",
|
|
49
|
+
"@teambit/global-config": "0.0.991",
|
|
50
50
|
"@teambit/harmony.modules.requireable-component": "0.0.497",
|
|
51
|
-
"@teambit/snapping": "1.0.
|
|
52
|
-
"@teambit/workspace.modules.node-modules-linker": "0.0.
|
|
53
|
-
"@teambit/isolator": "1.0.
|
|
51
|
+
"@teambit/snapping": "1.0.411",
|
|
52
|
+
"@teambit/workspace.modules.node-modules-linker": "0.0.205",
|
|
53
|
+
"@teambit/isolator": "1.0.411",
|
|
54
54
|
"@teambit/toolbox.fs.link-or-symlink": "0.0.1",
|
|
55
55
|
"@teambit/component-issues": "0.0.150",
|
|
56
56
|
"@teambit/component-package-version": "0.0.434",
|