@teambit/dependency-resolver 1.0.108 → 1.0.110
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/__bit_junit.xml +55 -0
- package/artifacts/preview/teambit_dependencies_dependency_resolver-preview.js +1 -0
- package/dist/{preview-1703647408454.js → preview-1703733956734.js} +2 -2
- package/package.json +24 -20
- package/apply-updates.spec.ts +0 -215
- package/apply-updates.ts +0 -81
- package/dependency-detector.ts +0 -5
- package/dependency-env.ts +0 -6
- package/dependency-installer.ts +0 -347
- package/dependency-linker.ts +0 -719
- package/dependency-resolver.aspect.ts +0 -7
- package/dependency-resolver.graphql.ts +0 -99
- package/dependency-resolver.main.runtime.spec.ts +0 -530
- package/dependency-resolver.main.runtime.ts +0 -1797
- package/dependency-version-resolver.ts +0 -42
- package/extend-with-components-from-dir.ts +0 -29
- package/get-all-policy-pkgs.spec.ts +0 -82
- package/get-all-policy-pkgs.ts +0 -126
- package/index.ts +0 -70
- package/package-manager-legacy.ts +0 -137
- package/package-manager.ts +0 -174
- package/types.ts +0 -77
package/types.ts
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { ComponentConfig, ComponentFS } from '@teambit/component';
|
|
2
|
-
import { PathLinux } from '@teambit/legacy/dist/utils/path';
|
|
3
|
-
|
|
4
|
-
import { ComponentManifest } from './manifest/component-manifest';
|
|
5
|
-
import { PackageName } from './dependencies';
|
|
6
|
-
|
|
7
|
-
export type RegistryName = string;
|
|
8
|
-
|
|
9
|
-
export type Registry = {
|
|
10
|
-
uri: string;
|
|
11
|
-
alwaysAuth: boolean;
|
|
12
|
-
authHeaderValue?: string;
|
|
13
|
-
originalAuthType: string;
|
|
14
|
-
originalAuthValue: string;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export type RegistriesMap = Record<RegistryName, Registry>;
|
|
18
|
-
|
|
19
|
-
// Exact format TBD
|
|
20
|
-
export interface RawComponentState {
|
|
21
|
-
filesystem: ComponentFS;
|
|
22
|
-
config: ComponentConfig;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Import Specifier data.
|
|
27
|
-
* For example, `import foo from './bar' `, "foo" is the import-specifier and is default.
|
|
28
|
-
* Conversely, `import { foo } from './bar' `, here, "foo" is non-default.
|
|
29
|
-
*/
|
|
30
|
-
export type Specifier = {
|
|
31
|
-
isDefault: boolean;
|
|
32
|
-
name: string;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* ImportSpecifier are used to generate links from component to its dependencies.
|
|
37
|
-
* For example, a component might have a dependency: "import { foo } from './bar' ", when a link is generated, we use
|
|
38
|
-
* the import-specifier name, which is "foo" to generate the link correctly.
|
|
39
|
-
*/
|
|
40
|
-
export type ImportSpecifier = {
|
|
41
|
-
mainFile: Specifier;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* a dependency component may have multiple files that are required from the parent component, each
|
|
46
|
-
* one of the files has its RelativePath instance.
|
|
47
|
-
*
|
|
48
|
-
* For example:
|
|
49
|
-
* main component: "foo" => foo.js => `const isString = require('../utils/is-string'); const isArray = require('../utils/is-array');
|
|
50
|
-
* dependency: "utils" => utils/is-string.js, utils/is-array.js
|
|
51
|
-
* In this example, the component "foo" has one dependency "utils" with two RelativePaths.
|
|
52
|
-
* one for utils/is-string.js file and the second for utils/is-array.js file
|
|
53
|
-
*/
|
|
54
|
-
export type RelativePath = {
|
|
55
|
-
sourceRelativePath: PathLinux; // location of the link file
|
|
56
|
-
destinationRelativePath: PathLinux; // destination written inside the link file
|
|
57
|
-
importSpecifiers?: ImportSpecifier[];
|
|
58
|
-
importSource?: string; // available when isCustomResolveUsed=true, contains the import path. e.g. "import x from 'src/utils'", importSource is 'src/utils'.
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* A definition of one dependency statement in a file
|
|
63
|
-
* For example `import('something')` or require('something')
|
|
64
|
-
*/
|
|
65
|
-
interface FileDependencyDefinition {
|
|
66
|
-
// The path itself as appear in the source code (what inside the () for example)
|
|
67
|
-
// This can be a module path like 'my-package' or relative (for legacy support)
|
|
68
|
-
dependencyPath: string;
|
|
69
|
-
// Used for legacy support
|
|
70
|
-
relativePaths?: RelativePath[];
|
|
71
|
-
// Used for statements like `import type {x} from 'y'
|
|
72
|
-
isType?: boolean;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export type FileDependenciesDefinition = FileDependencyDefinition[];
|
|
76
|
-
|
|
77
|
-
export type ComponentsManifestsMap = Map<PackageName, ComponentManifest>;
|