@vltpkg/graph 0.0.0-14 → 0.0.0-15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/actual/load.d.ts +7 -0
- package/dist/esm/actual/load.d.ts.map +1 -1
- package/dist/esm/actual/load.js +22 -6
- package/dist/esm/actual/load.js.map +1 -1
- package/dist/esm/graph.d.ts +1 -1
- package/dist/esm/graph.d.ts.map +1 -1
- package/dist/esm/graph.js +3 -2
- package/dist/esm/graph.js.map +1 -1
- package/dist/esm/ideal/add-nodes.d.ts +3 -1
- package/dist/esm/ideal/add-nodes.d.ts.map +1 -1
- package/dist/esm/ideal/add-nodes.js +3 -2
- package/dist/esm/ideal/add-nodes.js.map +1 -1
- package/dist/esm/ideal/append-nodes.d.ts +2 -1
- package/dist/esm/ideal/append-nodes.d.ts.map +1 -1
- package/dist/esm/ideal/append-nodes.js +18 -4
- package/dist/esm/ideal/append-nodes.js.map +1 -1
- package/dist/esm/ideal/build-ideal-from-starting-graph.d.ts +2 -0
- package/dist/esm/ideal/build-ideal-from-starting-graph.d.ts.map +1 -1
- package/dist/esm/ideal/build-ideal-from-starting-graph.js +3 -0
- package/dist/esm/ideal/build-ideal-from-starting-graph.js.map +1 -1
- package/dist/esm/ideal/build.d.ts +5 -0
- package/dist/esm/ideal/build.d.ts.map +1 -1
- package/dist/esm/ideal/build.js.map +1 -1
- package/dist/esm/ideal/check-nodes.d.ts +33 -0
- package/dist/esm/ideal/check-nodes.d.ts.map +1 -0
- package/dist/esm/ideal/check-nodes.js +42 -0
- package/dist/esm/ideal/check-nodes.js.map +1 -0
- package/dist/esm/ideal/get-importer-specs.d.ts +6 -1
- package/dist/esm/ideal/get-importer-specs.d.ts.map +1 -1
- package/dist/esm/ideal/get-importer-specs.js +14 -5
- package/dist/esm/ideal/get-importer-specs.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/install.d.ts.map +1 -1
- package/dist/esm/install.js +3 -0
- package/dist/esm/install.js.map +1 -1
- package/dist/esm/modifiers.d.ts +199 -0
- package/dist/esm/modifiers.d.ts.map +1 -0
- package/dist/esm/modifiers.js +342 -0
- package/dist/esm/modifiers.js.map +1 -0
- package/dist/esm/node.d.ts +7 -0
- package/dist/esm/node.d.ts.map +1 -1
- package/dist/esm/node.js +7 -0
- package/dist/esm/node.js.map +1 -1
- package/dist/esm/reify/add-edge.d.ts.map +1 -1
- package/dist/esm/reify/add-edge.js +18 -7
- package/dist/esm/reify/add-edge.js.map +1 -1
- package/package.json +18 -16
|
@@ -2,6 +2,7 @@ import type { PackageInfoClient } from '@vltpkg/package-info';
|
|
|
2
2
|
import type { LoadOptions as LoadActualOptions } from '../actual/load.ts';
|
|
3
3
|
import type { AddImportersDependenciesMap, RemoveImportersDependenciesMap } from '../dependencies.ts';
|
|
4
4
|
import type { Graph } from '../graph.ts';
|
|
5
|
+
import type { GraphModifier } from '../modifiers.ts';
|
|
5
6
|
export type BuildIdealOptions = LoadActualOptions & {
|
|
6
7
|
/**
|
|
7
8
|
* A `Map` in which keys are {@link DepID} linking to another `Map` in which
|
|
@@ -10,6 +11,10 @@ export type BuildIdealOptions = LoadActualOptions & {
|
|
|
10
11
|
* represented by {@link DepID}.
|
|
11
12
|
*/
|
|
12
13
|
add?: AddImportersDependenciesMap;
|
|
14
|
+
/**
|
|
15
|
+
* The graph modifiers helper object.
|
|
16
|
+
*/
|
|
17
|
+
modifiers?: GraphModifier;
|
|
13
18
|
/**
|
|
14
19
|
* A `Map` object representing nodes to be removed from the ideal graph.
|
|
15
20
|
* Each {@link DepID} key represents an importer node and the `Set` of
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/ideal/build.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAE7D,OAAO,KAAK,EAAE,WAAW,IAAI,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AACzE,OAAO,KAAK,EACV,2BAA2B,EAC3B,8BAA8B,EAE/B,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/ideal/build.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAE7D,OAAO,KAAK,EAAE,WAAW,IAAI,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AACzE,OAAO,KAAK,EACV,2BAA2B,EAC3B,8BAA8B,EAE/B,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAKxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAKpD,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,GAAG;IAClD;;;;;OAKG;IACH,GAAG,CAAC,EAAE,2BAA2B,CAAA;IACjC;;OAEG;IACH,SAAS,CAAC,EAAE,aAAa,CAAA;IACzB;;;;OAIG;IACH,MAAM,CAAC,EAAE,8BAA8B,CAAA;IACvC;;OAEG;IACH,WAAW,EAAE,iBAAiB,CAAA;CAC/B,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,YACP,iBAAiB,KACzB,OAAO,CAAC,KAAK,CAiCf,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../../src/ideal/build.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAQtD,OAAO,EAAE,IAAI,IAAI,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,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M,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;KAC/B,CAAC,CAAA;IACF,IAAI,EAAE,CAAA;IACN,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA","sourcesContent":["import type { PackageInfoClient } from '@vltpkg/package-info'\nimport { load as loadActual } from '../actual/load.ts'\nimport type { LoadOptions as LoadActualOptions } from '../actual/load.ts'\nimport type {\n AddImportersDependenciesMap,\n RemoveImportersDependenciesMap,\n Dependency,\n} from '../dependencies.ts'\nimport type { Graph } from '../graph.ts'\nimport { load as loadVirtual } from '../lockfile/load.ts'\nimport { buildIdealFromStartingGraph } from './build-ideal-from-starting-graph.ts'\nimport type { DepID } from '@vltpkg/dep-id'\nimport { graphStep } from '@vltpkg/output'\nimport type { GraphModifier } from '../modifiers.ts'\n\nconst getMap = <T extends Map<any, any>>(m?: T) =>\n m ?? (new Map() as T)\n\nexport type BuildIdealOptions = LoadActualOptions & {\n /**\n * A `Map` in which keys are {@link DepID} linking to another `Map` in which\n * keys are the dependency names and values are {@link Dependency}. This\n * structure represents dependencies that need to be added to the importer\n * represented by {@link DepID}.\n */\n add?: AddImportersDependenciesMap\n /**\n * The graph modifiers helper object.\n */\n modifiers?: GraphModifier\n /**\n * A `Map` object representing nodes to be removed from the ideal graph.\n * Each {@link DepID} key represents an importer node and the `Set` of\n * dependency names to be removed from its dependency list.\n */\n remove?: RemoveImportersDependenciesMap\n /**\n * A {@link PackageInfoClient} instance to read manifest info from.\n */\n packageInfo: PackageInfoClient\n}\n\n/**\n * Builds an ideal {@link Graph} representing the dependencies that\n * should be present in order to fulfill the requirements defined\n * by the `package.json` and `vlt-lock.json` files using either the\n * virtual or actual graph as a starting point. Also add / remove any\n * dependencies listed in the `add` and `remove` properties.\n */\nexport const build = async (\n options: BuildIdealOptions,\n): Promise<Graph> => {\n const done = graphStep('build')\n\n // Creates the shared instances that are going to be used\n // in both the loader methods and the build graph\n const { packageInfo, packageJson, scurry, monorepo } = options\n const mainManifest =\n options.mainManifest ?? packageJson.read(options.projectRoot)\n let graph\n try {\n graph = loadVirtual({\n ...options,\n mainManifest,\n monorepo,\n })\n } catch {\n graph = loadActual({\n ...options,\n mainManifest,\n monorepo,\n })\n }\n\n const res = await buildIdealFromStartingGraph({\n ...options,\n scurry,\n add: getMap(options.add),\n graph,\n packageInfo,\n remove: getMap(options.remove),\n })\n done()\n return res\n}\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { DepID } from '@vltpkg/dep-id';
|
|
2
|
+
import type { GraphModifier } from '../modifiers.ts';
|
|
3
|
+
import type { PackageInfoClient } from '@vltpkg/package-info';
|
|
4
|
+
import type { SpecOptions } from '@vltpkg/spec';
|
|
5
|
+
import type { PathScurry } from 'path-scurry';
|
|
6
|
+
import type { Dependency } from '../dependencies.ts';
|
|
7
|
+
import type { BuildIdealFromGraphOptions } from './types.ts';
|
|
8
|
+
export type CheckNodesOptions = BuildIdealFromGraphOptions & SpecOptions & {
|
|
9
|
+
/**
|
|
10
|
+
* The dependencies to check.
|
|
11
|
+
*/
|
|
12
|
+
check: Map<DepID, Map<string, Dependency>>;
|
|
13
|
+
/**
|
|
14
|
+
* A {@link GraphModifier} instance that holds information on how to
|
|
15
|
+
* modify the graph, replacing nodes and edges as defined in the
|
|
16
|
+
* project configuration.
|
|
17
|
+
*/
|
|
18
|
+
modifiers?: GraphModifier;
|
|
19
|
+
/**
|
|
20
|
+
* The package info client to use.
|
|
21
|
+
*/
|
|
22
|
+
packageInfo: PackageInfoClient;
|
|
23
|
+
/**
|
|
24
|
+
* The path scurry instance to use.
|
|
25
|
+
*/
|
|
26
|
+
scurry: PathScurry;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Runs an extra check and apply modifiers in all nodes that are not part
|
|
30
|
+
* of the the list of nodes to add.
|
|
31
|
+
*/
|
|
32
|
+
export declare const checkNodes: ({ check, graph, modifiers, packageInfo, scurry, ...specOptions }: CheckNodesOptions) => Promise<void>;
|
|
33
|
+
//# sourceMappingURL=check-nodes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-nodes.d.ts","sourceRoot":"","sources":["../../../src/ideal/check-nodes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,EACV,aAAa,EAEd,MAAM,iBAAiB,CAAA;AAExB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAA;AAE5D,MAAM,MAAM,iBAAiB,GAAG,0BAA0B,GACxD,WAAW,GAAG;IACZ;;OAEG;IACH,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAA;IAC1C;;;;OAIG;IACH,SAAS,CAAC,EAAE,aAAa,CAAA;IACzB;;OAEG;IACH,WAAW,EAAE,iBAAiB,CAAA;IAC9B;;OAEG;IACH,MAAM,EAAE,UAAU,CAAA;CACnB,CAAA;AAEH;;;GAGG;AACH,eAAO,MAAM,UAAU,qEAOpB,iBAAiB,KAAG,OAAO,CAAC,IAAI,CAiDlC,CAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { appendNodes } from "./append-nodes.js";
|
|
2
|
+
import { asDependency } from "../dependencies.js";
|
|
3
|
+
/**
|
|
4
|
+
* Runs an extra check and apply modifiers in all nodes that are not part
|
|
5
|
+
* of the the list of nodes to add.
|
|
6
|
+
*/
|
|
7
|
+
export const checkNodes = async ({ check, graph, modifiers, packageInfo, scurry, ...specOptions }) => {
|
|
8
|
+
const seen = new Set();
|
|
9
|
+
const importers = new Set(graph.importers);
|
|
10
|
+
// initializes the map of modifiers with any importers marked to check
|
|
11
|
+
for (const node of importers) {
|
|
12
|
+
const deps = check.get(node.id);
|
|
13
|
+
if (deps?.size) {
|
|
14
|
+
modifiers?.tryImporter(node);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
// otherwise we remove the importer from the list
|
|
18
|
+
importers.delete(node);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
for (const node of importers) {
|
|
22
|
+
const modifiedDeps = new Map();
|
|
23
|
+
const modifierRefs = new Map();
|
|
24
|
+
for (const [name, edge] of node.edgesOut) {
|
|
25
|
+
// when we find a modifier that applies to a direct dependency, mark
|
|
26
|
+
// that dependency as a dependency to be added by append-nodes
|
|
27
|
+
const modifierRef = modifiers?.tryNewDependency(node, name);
|
|
28
|
+
if (modifierRef && 'spec' in modifierRef.modifier) {
|
|
29
|
+
modifiedDeps.set(name, asDependency({
|
|
30
|
+
type: edge.type,
|
|
31
|
+
spec: edge.spec,
|
|
32
|
+
}));
|
|
33
|
+
modifierRefs.set(name, modifierRef);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
const deps = [...modifiedDeps.values()];
|
|
37
|
+
if (modifiedDeps.size) {
|
|
38
|
+
await appendNodes(modifiedDeps, packageInfo, graph, node, deps, scurry, specOptions, seen, modifiers, modifierRefs);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=check-nodes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-nodes.js","sourceRoot":"","sources":["../../../src/ideal/check-nodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAmCjD;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,EAAE,EAC/B,KAAK,EACL,KAA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,EAAE,CAAC,CAAA;QACvC,IAAI,YAAY,CAAC,IAAI,EAAE,CAAC;YACtB,MAAM,WAAW,CACf,YAAY,EACZ,WAAW,EACX,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,WAAW,EACX,IAAI,EACJ,SAAS,EACT,YAAY,CACb,CAAA;QACH,CAAC;IACH,CAAC;AACH,CAAC,CAAA","sourcesContent":["import { appendNodes } from './append-nodes.ts'\nimport { asDependency } from '../dependencies.ts'\nimport type { DepID } from '@vltpkg/dep-id'\nimport type {\n GraphModifier,\n ModifierActiveEntry,\n} from '../modifiers.ts'\nimport type { Node } from '../node.ts'\nimport type { PackageInfoClient } from '@vltpkg/package-info'\nimport type { SpecOptions } from '@vltpkg/spec'\nimport type { PathScurry } from 'path-scurry'\nimport type { Dependency } from '../dependencies.ts'\nimport type { BuildIdealFromGraphOptions } from './types.ts'\n\nexport type CheckNodesOptions = BuildIdealFromGraphOptions &\n SpecOptions & {\n /**\n * The dependencies to check.\n */\n check: Map<DepID, Map<string, Dependency>>\n /**\n * A {@link GraphModifier} instance that holds information on how to\n * modify the graph, replacing nodes and edges as defined in the\n * project configuration.\n */\n modifiers?: GraphModifier\n /**\n * The package info client to use.\n */\n packageInfo: PackageInfoClient\n /**\n * The path scurry instance to use.\n */\n scurry: PathScurry\n }\n\n/**\n * Runs an extra check and apply modifiers in all nodes that are not part\n * of the the list of nodes to add.\n */\nexport const checkNodes = async ({\n check,\n graph,\n modifiers,\n packageInfo,\n scurry,\n ...specOptions\n}: CheckNodesOptions): Promise<void> => {\n const seen = new Set<DepID>()\n const importers = new Set<Node>(graph.importers)\n\n // initializes the map of modifiers with any importers marked to check\n for (const node of importers) {\n const deps = check.get(node.id)\n if (deps?.size) {\n modifiers?.tryImporter(node)\n } else {\n // otherwise we remove the importer from the list\n importers.delete(node)\n }\n }\n\n for (const node of importers) {\n const modifiedDeps = new Map<string, Dependency>()\n const modifierRefs = new Map<string, ModifierActiveEntry>()\n for (const [name, edge] of node.edgesOut) {\n // when we find a modifier that applies to a direct dependency, mark\n // that dependency as a dependency to be added by append-nodes\n const modifierRef = modifiers?.tryNewDependency(node, name)\n if (modifierRef && 'spec' in modifierRef.modifier) {\n modifiedDeps.set(\n name,\n asDependency({\n type: edge.type,\n spec: edge.spec,\n }),\n )\n modifierRefs.set(name, modifierRef)\n }\n }\n const deps = [...modifiedDeps.values()]\n if (modifiedDeps.size) {\n await appendNodes(\n modifiedDeps,\n packageInfo,\n graph,\n node,\n deps,\n scurry,\n specOptions,\n seen,\n modifiers,\n modifierRefs,\n )\n }\n }\n}\n"]}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import type { AddImportersDependenciesMap, RemoveImportersDependenciesMap } from '../dependencies.ts';
|
|
2
2
|
import type { BuildIdealAddOptions, BuildIdealFromGraphOptions, BuildIdealRemoveOptions } from './types.ts';
|
|
3
|
+
import type { GraphModifier } from '../modifiers.ts';
|
|
3
4
|
import type { SpecOptions } from '@vltpkg/spec';
|
|
4
|
-
export type GetImporterSpecsOptions = BuildIdealAddOptions & BuildIdealFromGraphOptions & BuildIdealRemoveOptions & SpecOptions
|
|
5
|
+
export type GetImporterSpecsOptions = BuildIdealAddOptions & BuildIdealFromGraphOptions & BuildIdealRemoveOptions & SpecOptions & {
|
|
6
|
+
modifiers?: GraphModifier;
|
|
7
|
+
};
|
|
5
8
|
/**
|
|
6
9
|
* Given a {@link Graph} and a list of {@link Dependency}, merges the
|
|
7
10
|
* dependencies info found in the graph importers and returns the add & remove
|
|
8
11
|
* results as a Map in which keys are {@link DepID} of each importer node.
|
|
12
|
+
* A list of dependencies to be checked for modifiers is also returned.
|
|
9
13
|
*/
|
|
10
14
|
export declare const getImporterSpecs: (options: GetImporterSpecsOptions) => {
|
|
11
15
|
add: AddImportersDependenciesMap;
|
|
16
|
+
check: AddImportersDependenciesMap;
|
|
12
17
|
remove: RemoveImportersDependenciesMap;
|
|
13
18
|
};
|
|
14
19
|
//# sourceMappingURL=get-importer-specs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-importer-specs.d.ts","sourceRoot":"","sources":["../../../src/ideal/get-importer-specs.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,2BAA2B,EAE3B,8BAA8B,EAC/B,MAAM,oBAAoB,CAAA;AAE3B,OAAO,KAAK,EACV,oBAAoB,EACpB,0BAA0B,EAC1B,uBAAuB,EACxB,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"get-importer-specs.d.ts","sourceRoot":"","sources":["../../../src/ideal/get-importer-specs.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,2BAA2B,EAE3B,8BAA8B,EAC/B,MAAM,oBAAoB,CAAA;AAE3B,OAAO,KAAK,EACV,oBAAoB,EACpB,0BAA0B,EAC1B,uBAAuB,EACxB,MAAM,YAAY,CAAA;AAInB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAGpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE/C,MAAM,MAAM,uBAAuB,GAAG,oBAAoB,GACxD,0BAA0B,GAC1B,uBAAuB,GACvB,WAAW,GAAG;IACZ,SAAS,CAAC,EAAE,aAAa,CAAA;CAC1B,CAAA;AAyBH;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,YAClB,uBAAuB;;;;CAmGjC,CAAA"}
|
|
@@ -21,10 +21,12 @@ class RemoveImportersDependenciesMapImpl extends Map {
|
|
|
21
21
|
* Given a {@link Graph} and a list of {@link Dependency}, merges the
|
|
22
22
|
* dependencies info found in the graph importers and returns the add & remove
|
|
23
23
|
* results as a Map in which keys are {@link DepID} of each importer node.
|
|
24
|
+
* A list of dependencies to be checked for modifiers is also returned.
|
|
24
25
|
*/
|
|
25
26
|
export const getImporterSpecs = (options) => {
|
|
26
|
-
const { add, graph, remove } = options;
|
|
27
|
+
const { add, graph, modifiers, remove } = options;
|
|
27
28
|
const addResult = new AddImportersDependenciesMapImpl();
|
|
29
|
+
const checkResult = new AddImportersDependenciesMapImpl();
|
|
28
30
|
const removeResult = new RemoveImportersDependenciesMapImpl();
|
|
29
31
|
// traverse the list of importers in the starting graph
|
|
30
32
|
for (const importer of graph.importers) {
|
|
@@ -32,6 +34,7 @@ export const getImporterSpecs = (options) => {
|
|
|
32
34
|
// only a single dependency entry for a given dependency for each importer
|
|
33
35
|
const addDeps = new Map();
|
|
34
36
|
const removeDeps = new Set();
|
|
37
|
+
const checkDeps = new Map();
|
|
35
38
|
// if an edge from the graph is not listed in the manifest,
|
|
36
39
|
// add that edge to the list of dependencies to be removed
|
|
37
40
|
for (const edge of importer.edgesOut.values()) {
|
|
@@ -47,15 +50,20 @@ export const getImporterSpecs = (options) => {
|
|
|
47
50
|
const deps = Object.entries(importer.manifest?.[depType] ?? {});
|
|
48
51
|
for (const [depName, depSpec] of deps) {
|
|
49
52
|
const edge = importer.edgesOut.get(depName);
|
|
53
|
+
const dependency = asDependency({
|
|
54
|
+
spec: Spec.parse(depName, depSpec, options),
|
|
55
|
+
type: shorten(depType, depName, importer.manifest),
|
|
56
|
+
});
|
|
50
57
|
if (!edge?.to) {
|
|
51
|
-
addDeps.set(depName,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
58
|
+
addDeps.set(depName, dependency);
|
|
59
|
+
}
|
|
60
|
+
else if (modifiers?.maybeHasModifier(depName)) {
|
|
61
|
+
checkDeps.set(depName, dependency);
|
|
55
62
|
}
|
|
56
63
|
}
|
|
57
64
|
}
|
|
58
65
|
addResult.set(importer.id, addDeps);
|
|
66
|
+
checkResult.set(importer.id, checkDeps);
|
|
59
67
|
removeResult.set(importer.id, removeDeps);
|
|
60
68
|
}
|
|
61
69
|
// merges any provided specs to add to the current found results
|
|
@@ -99,6 +107,7 @@ export const getImporterSpecs = (options) => {
|
|
|
99
107
|
}
|
|
100
108
|
return {
|
|
101
109
|
add: addResult,
|
|
110
|
+
check: checkResult,
|
|
102
111
|
remove: removeResult,
|
|
103
112
|
};
|
|
104
113
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-importer-specs.js","sourceRoot":"","sources":["../../../src/ideal/get-importer-specs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAM1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"get-importer-specs.js","sourceRoot":"","sources":["../../../src/ideal/get-importer-specs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAM1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAWlE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAUnC,MAAM,UAAU,GAAG,CAAC,QAAc,EAAE,IAAU,EAAW,EAAE;IACzD,KAAK,MAAM,OAAO,IAAI,mBAAmB,EAAE,CAAC;QAC1C,MAAM,UAAU,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAA;QAC/C,IAAI,UAAU,IAAI,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC;YACpD,OAAO,IAAI,CAAA;IACf,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAED,MAAM,+BACJ,SAAQ,GAAG;IAGX,oBAAoB,GAAG,KAAK,CAAA;CAC7B;AAED,MAAM,kCACJ,SAAQ,GAAG;IAGX,oBAAoB,GAAG,KAAK,CAAA;CAC7B;AAED;;;;;GAKG;AACH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AG,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;QACrB,CAAC;IACH,CAAC;IAED,oEAAoE;IACpE,kEAAkE;IAClE,KAAK,MAAM,CAAC,GAAG,EAAE,SAAS,CAAC,IAAI,MAAM,EAAE,CAAC;QACtC,MAAM,kBAAkB,GAAG,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QAChD,IAAI,kBAAkB,EAAE,CAAC;YACvB,KAAK,MAAM,OAAO,IAAI,SAAS,EAAE,CAAC;gBAChC,kBAAkB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;YACjC,CAAC;QACH,CAAC;IACH,CAAC;IAED,iEAAiE;IACjE,KAAK,MAAM,CAAC,GAAG,EAAE,UAAU,CAAC,IAAI,YAAY,EAAE,CAAC;QAC7C,IAAI,UAAU,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;YAC1B,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;QAC1B,CAAC;IACH,CAAC;IAED,oEAAoE;IACpE,oBAAoB,CAAC;QACnB,GAAG,EAAE,SAAS;QACd,KAAK;KACN,CAAC,CAAA;IAEF,2CAA2C;IAC3C,8CAA8C;IAC9C,KAAK,MAAM,OAAO,IAAI,SAAS,CAAC,MAAM,EAAE,EAAE,CAAC;QACzC,IAAI,OAAO,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;YACrB,SAAS,CAAC,oBAAoB,GAAG,IAAI,CAAA;YACrC,MAAK;QACP,CAAC;IACH,CAAC;IAED,OAAO;QACL,GAAG,EAAE,SAAS;QACd,KAAK,EAAE,WAAW;QAClB,MAAM,EAAE,YAAY;KACrB,CAAA;AACH,CAAC,CAAA","sourcesContent":["import { error } from '@vltpkg/error-cause'\nimport { longDependencyTypes } from '@vltpkg/types'\nimport { shorten, asDependency } from '../dependencies.ts'\nimport type {\n AddImportersDependenciesMap,\n Dependency,\n RemoveImportersDependenciesMap,\n} from '../dependencies.ts'\nimport { removeSatisfiedSpecs } from './remove-satisfied-specs.ts'\nimport type {\n BuildIdealAddOptions,\n BuildIdealFromGraphOptions,\n BuildIdealRemoveOptions,\n} from './types.ts'\nimport type { Edge } from '../edge.ts'\nimport type { Node } from '../node.ts'\nimport type { Graph } from '../graph.ts'\nimport type { GraphModifier } from '../modifiers.ts'\nimport type { DepID } from '@vltpkg/dep-id'\nimport { Spec } from '@vltpkg/spec'\nimport type { SpecOptions } from '@vltpkg/spec'\n\nexport type GetImporterSpecsOptions = BuildIdealAddOptions &\n BuildIdealFromGraphOptions &\n BuildIdealRemoveOptions &\n SpecOptions & {\n modifiers?: GraphModifier\n }\n\nconst hasDepName = (importer: Node, edge: Edge): boolean => {\n for (const depType of longDependencyTypes) {\n const listedDeps = importer.manifest?.[depType]\n if (listedDeps && Object.hasOwn(listedDeps, edge.name))\n return true\n }\n return false\n}\n\nclass AddImportersDependenciesMapImpl\n extends Map\n implements AddImportersDependenciesMap\n{\n modifiedDependencies = false\n}\n\nclass RemoveImportersDependenciesMapImpl\n extends Map\n implements RemoveImportersDependenciesMap\n{\n modifiedDependencies = false\n}\n\n/**\n * Given a {@link Graph} and a list of {@link Dependency}, merges the\n * dependencies info found in the graph importers and returns the add & remove\n * results as a Map in which keys are {@link DepID} of each importer node.\n * A list of dependencies to be checked for modifiers is also returned.\n */\nexport const getImporterSpecs = (\n options: GetImporterSpecsOptions,\n) => {\n const { add, graph, modifiers, remove } = options\n const addResult: AddImportersDependenciesMap =\n new AddImportersDependenciesMapImpl()\n const checkResult: AddImportersDependenciesMap =\n new AddImportersDependenciesMapImpl()\n const removeResult: RemoveImportersDependenciesMap =\n new RemoveImportersDependenciesMapImpl()\n\n // traverse the list of importers in the starting graph\n for (const importer of graph.importers) {\n // uses a Map keying to the spec.name in order to easily make sure there's\n // only a single dependency entry for a given dependency for each importer\n const addDeps = new Map<string, Dependency>()\n const removeDeps = new Set<string>()\n const checkDeps = new Map<string, Dependency>()\n // if an edge from the graph is not listed in the manifest,\n // add that edge to the list of dependencies to be removed\n for (const edge of importer.edgesOut.values()) {\n if (\n !hasDepName(importer, edge) &&\n !add.get(importer.id)?.has(edge.name)\n ) {\n removeDeps.add(edge.name)\n removeResult.modifiedDependencies = true\n }\n }\n // if a dependency is listed in the manifest but not in the graph,\n // add that dependency to the list of dependencies to be added\n for (const depType of longDependencyTypes) {\n const deps = Object.entries(importer.manifest?.[depType] ?? {})\n for (const [depName, depSpec] of deps) {\n const edge = importer.edgesOut.get(depName)\n const dependency = asDependency({\n spec: Spec.parse(depName, depSpec, options),\n type: shorten(depType, depName, importer.manifest),\n })\n if (!edge?.to) {\n addDeps.set(depName, dependency)\n } else if (modifiers?.maybeHasModifier(depName)) {\n checkDeps.set(depName, dependency)\n }\n }\n }\n addResult.set(importer.id, addDeps)\n checkResult.set(importer.id, checkDeps)\n removeResult.set(importer.id, removeDeps)\n }\n\n // merges any provided specs to add to the current found results\n for (const [id, addDeps] of add.entries()) {\n const deps = addResult.get(id)\n if (!deps) {\n throw error('Not an importer', { found: id })\n }\n for (const [name, dep] of addDeps.entries()) {\n deps.set(name, dep)\n }\n }\n\n // Merges results from user-provided `remove` option with any remove\n // results found from comparing the manifest with the loaded graph\n for (const [key, removeSet] of remove) {\n const importerRemoveItem = removeResult.get(key)\n if (importerRemoveItem) {\n for (const depName of removeSet) {\n importerRemoveItem.add(depName)\n }\n }\n }\n\n // Removes any references to an importer that no longer has specs\n for (const [key, removeItem] of removeResult) {\n if (removeItem.size === 0) {\n removeResult.delete(key)\n }\n }\n\n // removes already satisfied dependencies from the dependencies list\n removeSatisfiedSpecs({\n add: addResult,\n graph,\n })\n\n // set the modifiedDependencies flag if any\n // of the importers have modified dependencies\n for (const addDeps of addResult.values()) {\n if (addDeps.size > 0) {\n addResult.modifiedDependencies = true\n break\n }\n }\n\n return {\n add: addResult,\n check: checkResult,\n remove: removeResult,\n }\n}\n"]}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export * from './types.ts';
|
|
|
11
11
|
export * from './install.ts';
|
|
12
12
|
export * from './uninstall.ts';
|
|
13
13
|
export * from './diff.ts';
|
|
14
|
+
export * from './modifiers.ts';
|
|
14
15
|
import type { LoadOptions as ActualLoadOptions } from './actual/load.ts';
|
|
15
16
|
export declare const actual: {
|
|
16
17
|
load: (options: ActualLoadOptions) => import("./graph.ts").Graph;
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,0CAA0C,CAAA;AACxD,cAAc,mCAAmC,CAAA;AACjD,cAAc,qBAAqB,CAAA;AACnC,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,0CAA0C,CAAA;AACxD,cAAc,mCAAmC,CAAA;AACjD,cAAc,qBAAqB,CAAA;AACnC,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAG9B,OAAO,KAAK,EAAE,WAAW,IAAI,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACxE,eAAO,MAAM,MAAM;;CAAuB,CAAA;AAG1C,OAAO,KAAK,EAAE,WAAW,IAAI,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAI5E,eAAO,MAAM,QAAQ;;;;;CAKpB,CAAA;AAED,YAAY,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,CAAA;AACtD,YAAY,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAGrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACzD,YAAY,EAAE,iBAAiB,EAAE,CAAA;AACjC,eAAO,MAAM,KAAK;;CAAY,CAAA;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACxC,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA"}
|
package/dist/esm/index.js
CHANGED
|
@@ -11,6 +11,7 @@ export * from "./types.js";
|
|
|
11
11
|
export * from "./install.js";
|
|
12
12
|
export * from "./uninstall.js";
|
|
13
13
|
export * from "./diff.js";
|
|
14
|
+
export * from "./modifiers.js";
|
|
14
15
|
import { load as actualLoad } from "./actual/load.js";
|
|
15
16
|
export const actual = { load: actualLoad };
|
|
16
17
|
import { load as lockfileLoad } from "./lockfile/load.js";
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,0CAA0C,CAAA;AACxD,cAAc,mCAAmC,CAAA;AACjD,cAAc,qBAAqB,CAAA;AACnC,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,0CAA0C,CAAA;AACxD,cAAc,mCAAmC,CAAA;AACjD,cAAc,qBAAqB,CAAA;AACnC,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAE9B,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAErD,MAAM,CAAC,MAAM,MAAM,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,CAAA;AAE1C,OAAO,EAAE,IAAI,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AACzC,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,YAAY;IAClB,SAAS;IACT,SAAS;IACT,IAAI;CACL,CAAA;AAKD,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAGxC,MAAM,CAAC,MAAM,KAAK,GAAG,EAAE,KAAK,EAAE,CAAA;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA","sourcesContent":["export * from './edge.ts'\nexport * from './graph.ts'\nexport * from './node.ts'\nexport * from './dependencies.ts'\nexport * from './lockfile/types.ts'\nexport * from './visualization/json-output.ts'\nexport * from './visualization/human-readable-output.ts'\nexport * from './visualization/mermaid-output.ts'\nexport * from './stringify-node.ts'\nexport * from './types.ts'\nexport * from './install.ts'\nexport * from './uninstall.ts'\nexport * from './diff.ts'\nexport * from './modifiers.ts'\n\nimport { load as actualLoad } from './actual/load.ts'\nimport type { LoadOptions as ActualLoadOptions } from './actual/load.ts'\nexport const actual = { load: actualLoad }\n\nimport { load as lockfileLoad } from './lockfile/load.ts'\nimport type { LoadOptions as LockfileLoadOptions } from './lockfile/load.ts'\nimport { loadEdges } from './lockfile/load-edges.ts'\nimport { loadNodes } from './lockfile/load-nodes.ts'\nimport { save } from './lockfile/save.ts'\nexport const lockfile = {\n load: lockfileLoad,\n loadEdges,\n loadNodes,\n save,\n}\n\nexport type { ActualLoadOptions, LockfileLoadOptions }\nexport type { SaveOptions } from './lockfile/save.ts'\n\nimport { build } from './ideal/build.ts'\nimport type { BuildIdealOptions } from './ideal/build.ts'\nexport type { BuildIdealOptions }\nexport const ideal = { build }\nexport { reify } from './reify/index.ts'\nexport type { ReifyOptions } from './reify/index.ts'\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/install.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEnD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/install.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEnD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAA;AAKpE,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG;IACzC,WAAW,EAAE,iBAAiB,CAAA;CAC/B,CAAA;AAED,eAAO,MAAM,OAAO,YACT,cAAc,QACjB,2BAA2B;;;EA0BlC,CAAA"}
|
package/dist/esm/install.js
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { load as actualLoad } from "./actual/load.js";
|
|
2
2
|
import { build as idealBuild } from "./ideal/build.js";
|
|
3
3
|
import { reify } from "./reify/index.js";
|
|
4
|
+
import { GraphModifier } from "./modifiers.js";
|
|
4
5
|
export const install = async (options, add) => {
|
|
5
6
|
const mainManifest = options.packageJson.read(options.projectRoot);
|
|
7
|
+
const modifiers = GraphModifier.maybeLoad(options);
|
|
6
8
|
const graph = await idealBuild({
|
|
7
9
|
...options,
|
|
8
10
|
add,
|
|
9
11
|
mainManifest,
|
|
10
12
|
loadManifests: true,
|
|
13
|
+
modifiers,
|
|
11
14
|
});
|
|
12
15
|
const act = actualLoad({
|
|
13
16
|
...options,
|
package/dist/esm/install.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/install.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAErD,OAAO,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/install.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAErD,OAAO,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAM9C,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAC1B,OAAuB,EACvB,GAAiC,EACjC,EAAE;IACF,MAAM,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;IAClE,MAAM,SAAS,GAAG,aAAa,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;IAElD,MAAM,KAAK,GAAG,MAAM,UAAU,CAAC;QAC7B,GAAG,OAAO;QACV,GAAG;QACH,YAAY;QACZ,aAAa,EAAE,IAAI;QACnB,SAAS;KACV,CAAC,CAAA;IACF,MAAM,GAAG,GAAG,UAAU,CAAC;QACrB,GAAG,OAAO;QACV,YAAY;QACZ,aAAa,EAAE,IAAI;KACpB,CAAC,CAAA;IACF,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC;QACvB,GAAG,OAAO;QACV,GAAG;QACH,MAAM,EAAE,GAAG;QACX,KAAK;QACL,aAAa,EAAE,IAAI;KACpB,CAAC,CAAA;IAEF,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAA;AACxB,CAAC,CAAA","sourcesContent":["import type { PackageInfoClient } from '@vltpkg/package-info'\nimport type { LoadOptions } from './actual/load.ts'\nimport { load as actualLoad } from './actual/load.ts'\nimport type { AddImportersDependenciesMap } from './dependencies.ts'\nimport { build as idealBuild } from './ideal/build.ts'\nimport { reify } from './reify/index.ts'\nimport { GraphModifier } from './modifiers.ts'\n\nexport type InstallOptions = LoadOptions & {\n packageInfo: PackageInfoClient\n}\n\nexport const install = async (\n options: InstallOptions,\n add?: AddImportersDependenciesMap,\n) => {\n const mainManifest = options.packageJson.read(options.projectRoot)\n const modifiers = GraphModifier.maybeLoad(options)\n\n const graph = await idealBuild({\n ...options,\n add,\n mainManifest,\n loadManifests: true,\n modifiers,\n })\n const act = actualLoad({\n ...options,\n mainManifest,\n loadManifests: true,\n })\n const diff = await reify({\n ...options,\n add,\n actual: act,\n graph,\n loadManifests: true,\n })\n\n return { graph, diff }\n}\n"]}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { Spec } from '@vltpkg/spec';
|
|
2
|
+
import type { ModifierBreadcrumb, ModifierInteractiveBreadcrumb } from '@vltpkg/dss-breadcrumb';
|
|
3
|
+
import type { SpecOptions } from '@vltpkg/spec';
|
|
4
|
+
import type { Manifest } from '@vltpkg/types';
|
|
5
|
+
import type { Edge } from './edge.ts';
|
|
6
|
+
import type { Node } from './node.ts';
|
|
7
|
+
import type { Dependency } from './dependencies.ts';
|
|
8
|
+
/**
|
|
9
|
+
* Loaded modifiers configuration as described in the `vlt.json` file.
|
|
10
|
+
*/
|
|
11
|
+
export type GraphModifierLoadedConfig = {
|
|
12
|
+
modifiers: GraphModifierConfigObject;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Type definition for the modifiers configuration object
|
|
16
|
+
*/
|
|
17
|
+
export type GraphModifierConfigObject = Record<string, string>;
|
|
18
|
+
/**
|
|
19
|
+
* Info needed to define a graph modifier.
|
|
20
|
+
*/
|
|
21
|
+
export type BaseModifierEntry = {
|
|
22
|
+
type: 'edge' | 'node';
|
|
23
|
+
query: string;
|
|
24
|
+
breadcrumb: ModifierBreadcrumb;
|
|
25
|
+
value: string | Manifest;
|
|
26
|
+
refs: Set<{
|
|
27
|
+
name: string;
|
|
28
|
+
from: Node;
|
|
29
|
+
}>;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Extra info to define specifically a graph edge modifier.
|
|
33
|
+
*/
|
|
34
|
+
export type EdgeModifierEntry = BaseModifierEntry & {
|
|
35
|
+
type: 'edge';
|
|
36
|
+
spec: Spec;
|
|
37
|
+
value: string;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Extra info to define the graph node modifier.
|
|
41
|
+
*/
|
|
42
|
+
export type NodeModifierEntry = BaseModifierEntry & {
|
|
43
|
+
type: 'node';
|
|
44
|
+
manifest: Manifest;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* A graph modifier entry, which can be either an edge or a node modifier.
|
|
48
|
+
*/
|
|
49
|
+
export type ModifierEntry = EdgeModifierEntry | NodeModifierEntry;
|
|
50
|
+
/**
|
|
51
|
+
* An object to track modifiers that have matched an initial part of the
|
|
52
|
+
* breadcrumb. It holds pointers to both nodes and edges matched in the
|
|
53
|
+
* current traversed graph on top of the modifier info and the breadcrumb
|
|
54
|
+
* state that is used to track the current state of the parsing.
|
|
55
|
+
*/
|
|
56
|
+
export type ModifierActiveEntry = {
|
|
57
|
+
/**
|
|
58
|
+
* The modifier this active entry is working with.
|
|
59
|
+
*/
|
|
60
|
+
modifier: ModifierEntry;
|
|
61
|
+
/**
|
|
62
|
+
* The breadcrumb that is used to track the current state of the parsing.
|
|
63
|
+
*/
|
|
64
|
+
interactiveBreadcrumb: ModifierInteractiveBreadcrumb;
|
|
65
|
+
/**
|
|
66
|
+
* The first node to be affected by this modifier.
|
|
67
|
+
*/
|
|
68
|
+
originalFrom: Node;
|
|
69
|
+
/**
|
|
70
|
+
* The original edge that is being replaced with this entry.
|
|
71
|
+
*/
|
|
72
|
+
originalEdge?: Edge;
|
|
73
|
+
/**
|
|
74
|
+
* The modified edge that is being used to replace the original edge.
|
|
75
|
+
*/
|
|
76
|
+
modifiedEdge?: Edge;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Class representing loaded modifiers configuration for a project.
|
|
80
|
+
*
|
|
81
|
+
* Instances of this class can be used as a helper to modify the graph
|
|
82
|
+
* during the graph build ideal traversal time.
|
|
83
|
+
*
|
|
84
|
+
* ```
|
|
85
|
+
* const modifier = new GraphModifier(options)
|
|
86
|
+
* modifier.load(options)
|
|
87
|
+
* ```
|
|
88
|
+
*
|
|
89
|
+
* The `tryImporter` method can be used to register the initial importer
|
|
90
|
+
* node along with any modifier that includes an importer selector, e.g:
|
|
91
|
+
* `modifier.tryImporter(graph.mainImporter)`
|
|
92
|
+
*
|
|
93
|
+
* When traversing the graph, use the `tryNewDependency` method to check
|
|
94
|
+
* if a given dependency name to the current traversed node has matching
|
|
95
|
+
* registered modifiers, e.g:
|
|
96
|
+
* `const entries = modifier.tryNewDependency(fromNode, depName)`
|
|
97
|
+
*
|
|
98
|
+
* Use `updateActiveEntry` to update a given active modifier entry state
|
|
99
|
+
* with the current node of the graph being traversed. e.g:
|
|
100
|
+
* ```
|
|
101
|
+
* for (const entry of entries)
|
|
102
|
+
* modifier.updateActiveEntry(fromNode, entry)
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
export declare class GraphModifier {
|
|
106
|
+
#private;
|
|
107
|
+
/**
|
|
108
|
+
* A set of currently active modifiers, which are being parsed.
|
|
109
|
+
*/
|
|
110
|
+
activeModifiers: Set<ModifierActiveEntry>;
|
|
111
|
+
constructor(options: SpecOptions);
|
|
112
|
+
/**
|
|
113
|
+
* Load the modifiers definitions from vlt.json,
|
|
114
|
+
* converting the result into a GraphModifierConfigObject
|
|
115
|
+
*/
|
|
116
|
+
get config(): GraphModifierConfigObject;
|
|
117
|
+
/**
|
|
118
|
+
* Loads the modifiers defined in `vlt.json` into memory.
|
|
119
|
+
*/
|
|
120
|
+
load(options: SpecOptions): void;
|
|
121
|
+
/**
|
|
122
|
+
* Check if a given importer dependency name has potentially a registered
|
|
123
|
+
* modifier. In case of an ambiguous modifier, the method will always
|
|
124
|
+
* return `true`, it only returns `false` in the case that only fully
|
|
125
|
+
* qualified modifiers are registered and none are targeting the given
|
|
126
|
+
* top-level dependency name.
|
|
127
|
+
*
|
|
128
|
+
* This method is useful to help avoiding traversing the sub graph of
|
|
129
|
+
* a direct dependency when we know that it's impossible to ever match
|
|
130
|
+
* beforehand.
|
|
131
|
+
*/
|
|
132
|
+
maybeHasModifier(depName: string): boolean;
|
|
133
|
+
/**
|
|
134
|
+
* Try matching the provided node against the top-level selectors. In case
|
|
135
|
+
* a match is found it will also register the active entry modifier and
|
|
136
|
+
* update the active entry to the current importer node.
|
|
137
|
+
*/
|
|
138
|
+
tryImporter(importer: Node): void;
|
|
139
|
+
/**
|
|
140
|
+
* Try matching the provided node and dependency name to the current
|
|
141
|
+
* active parsing modifier entries along with possible starting-level
|
|
142
|
+
* modifiers.
|
|
143
|
+
*
|
|
144
|
+
* Any entries in which the breachcrumb have already reached its last
|
|
145
|
+
* element will be prioritized, along with checking for specificity,
|
|
146
|
+
* the complete entry with the highest specificity will be returned or just
|
|
147
|
+
* the entry with the highest specificity if no complete entry is found.
|
|
148
|
+
* Returns `undefined` if no matching entry is found.
|
|
149
|
+
*
|
|
150
|
+
* This method works with the assumption that it's going to be called
|
|
151
|
+
* during a graph traversal, such that any ascendent has been checked
|
|
152
|
+
* and the active modifier entry state has been updated in the previous
|
|
153
|
+
* iteration.
|
|
154
|
+
*/
|
|
155
|
+
tryNewDependency(from: Node, name: string): ModifierActiveEntry | undefined;
|
|
156
|
+
/**
|
|
157
|
+
* Returns the set of {@link ModifierActiveEntry} instances that matches
|
|
158
|
+
* the provided {@link Dependency} specs for a given node.
|
|
159
|
+
*
|
|
160
|
+
* This method is mostly a helper to {@link GraphModifier.tryNewDependency}
|
|
161
|
+
* that handles the registered modifiers traversal lookup.
|
|
162
|
+
*/
|
|
163
|
+
tryDependencies(from: Node, dependencies: Dependency[]): Map<string, ModifierActiveEntry>;
|
|
164
|
+
/**
|
|
165
|
+
* Updates an active entry state keeping track of items in the multi-level
|
|
166
|
+
* active entries map. If the current breadcrumb state shows there's no more
|
|
167
|
+
* items left, then we deregister the modifier.
|
|
168
|
+
*/
|
|
169
|
+
updateActiveEntry(from: Node, active: ModifierActiveEntry): void;
|
|
170
|
+
/**
|
|
171
|
+
* Creates a new active modifier.
|
|
172
|
+
*/
|
|
173
|
+
newModifier(from: Node, modifier: ModifierEntry): ModifierActiveEntry;
|
|
174
|
+
/**
|
|
175
|
+
* Removes a previously registered modifier from the active entries.
|
|
176
|
+
*/
|
|
177
|
+
deregisterModifier(modifier: ModifierEntry): void;
|
|
178
|
+
/**
|
|
179
|
+
* Operates in previously registered nodes and edges in order to put
|
|
180
|
+
* back in place any of the original edges that were referenced to in
|
|
181
|
+
* active (ongoing) breadcrumb parsing entries that were never completed.
|
|
182
|
+
*
|
|
183
|
+
* This method can be used to easily rollback any pending operations
|
|
184
|
+
* once the graph traversal is done.
|
|
185
|
+
*/
|
|
186
|
+
rollbackActiveEntries(): void;
|
|
187
|
+
/**
|
|
188
|
+
* Convenience method to instantiate and load in one call.
|
|
189
|
+
* Returns undefined if the project does not have a vlt.json file,
|
|
190
|
+
* otherwise returns the loaded Modifiers instance.
|
|
191
|
+
*/
|
|
192
|
+
static maybeLoad(options: SpecOptions): GraphModifier | undefined;
|
|
193
|
+
/**
|
|
194
|
+
* Convenience method to instantiate and load in one call.
|
|
195
|
+
* Throws if called on a directory that does not have a vlt.json file.
|
|
196
|
+
*/
|
|
197
|
+
static load(options: SpecOptions): GraphModifier;
|
|
198
|
+
}
|
|
199
|
+
//# sourceMappingURL=modifiers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modifiers.d.ts","sourceRoot":"","sources":["../../src/modifiers.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAGnC,OAAO,KAAK,EACV,kBAAkB,EAClB,6BAA6B,EAC9B,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAEnD;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,EAAE,yBAAyB,CAAA;CACrC,CAAA;AAED;;GAEG;AAEH,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAE9D;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,kB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