@proteinjs/reflection-build 2.0.2 → 2.1.0
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/CHANGELOG.md +24 -0
- package/dist/src/ReflectionDoctor.d.ts +6 -1
- package/dist/src/ReflectionDoctor.js +53 -51
- package/dist/src/ReflectionDoctor.js.map +1 -1
- package/dist/src/codegen/CanonicalSourceGraph.d.ts +22 -0
- package/dist/src/codegen/CanonicalSourceGraph.js +60 -0
- package/dist/src/codegen/CanonicalSourceGraph.js.map +1 -0
- package/dist/src/codegen/writeGeneratedIndex.d.ts +12 -3
- package/dist/src/codegen/writeGeneratedIndex.js +21 -13
- package/dist/src/codegen/writeGeneratedIndex.js.map +1 -1
- package/dist/src/parser/PackageSourceFiles.d.ts +30 -0
- package/dist/src/parser/PackageSourceFiles.js +151 -0
- package/dist/src/parser/PackageSourceFiles.js.map +1 -0
- package/dist/src/parser/SharedQualifiedNames.d.ts +43 -0
- package/dist/src/parser/SharedQualifiedNames.js +81 -0
- package/dist/src/parser/SharedQualifiedNames.js.map +1 -0
- package/dist/src/parser/createGraphBuilder.d.ts +6 -1
- package/dist/src/parser/createGraphBuilder.js +16 -31
- package/dist/src/parser/createGraphBuilder.js.map +1 -1
- package/dist/src/parser/createSourceGraph.d.ts +6 -1
- package/dist/src/parser/createSourceGraph.js +23 -38
- package/dist/src/parser/createSourceGraph.js.map +1 -1
- package/dist/test/Class.test.js +1 -1
- package/dist/test/Class.test.js.map +1 -1
- package/dist/test/ExamplePackageFixture.d.ts +47 -0
- package/dist/test/ExamplePackageFixture.js +207 -0
- package/dist/test/ExamplePackageFixture.js.map +1 -0
- package/dist/test/GraphEmitRelativePaths.test.js +1 -1
- package/dist/test/GraphEmitRelativePaths.test.js.map +1 -1
- package/dist/test/PackageSourceFiles.test.d.ts +1 -0
- package/dist/test/PackageSourceFiles.test.js +57 -0
- package/dist/test/PackageSourceFiles.test.js.map +1 -0
- package/dist/test/ReflectionDoctor.test.js +55 -18
- package/dist/test/ReflectionDoctor.test.js.map +1 -1
- package/dist/test/ReproducibleGeneratedIndex.test.d.ts +1 -0
- package/dist/test/ReproducibleGeneratedIndex.test.js +224 -0
- package/dist/test/ReproducibleGeneratedIndex.test.js.map +1 -0
- package/dist/test/SharedQualifiedNames.test.d.ts +1 -0
- package/dist/test/SharedQualifiedNames.test.js +186 -0
- package/dist/test/SharedQualifiedNames.test.js.map +1 -0
- package/dist/test/examples/reproducible/index.d.ts +4 -0
- package/dist/test/examples/reproducible/index.js +21 -0
- package/dist/test/examples/reproducible/index.js.map +1 -0
- package/dist/test/examples/reproducible/src/alpha/Alpha.d.ts +10 -0
- package/dist/test/examples/reproducible/src/alpha/Alpha.js +18 -0
- package/dist/test/examples/reproducible/src/alpha/Alpha.js.map +1 -0
- package/dist/test/examples/reproducible/src/alpha/Defaults.d.ts +2 -0
- package/dist/test/examples/reproducible/src/alpha/Defaults.js +6 -0
- package/dist/test/examples/reproducible/src/alpha/Defaults.js.map +1 -0
- package/dist/test/examples/reproducible/src/beta/Beta.d.ts +5 -0
- package/dist/test/examples/reproducible/src/beta/Beta.js +12 -0
- package/dist/test/examples/reproducible/src/beta/Beta.js.map +1 -0
- package/dist/test/examples/reproducible/src/beta/deep/Gamma.d.ts +4 -0
- package/dist/test/examples/reproducible/src/beta/deep/Gamma.js +11 -0
- package/dist/test/examples/reproducible/src/beta/deep/Gamma.js.map +1 -0
- package/dist/test/examples/reproducible/src/zeta/Defaults.d.ts +2 -0
- package/dist/test/examples/reproducible/src/zeta/Defaults.js +6 -0
- package/dist/test/examples/reproducible/src/zeta/Defaults.js.map +1 -0
- package/dist/test/examples/reproducible/src/zeta/Zeta.d.ts +7 -0
- package/dist/test/examples/reproducible/src/zeta/Zeta.js +18 -0
- package/dist/test/examples/reproducible/src/zeta/Zeta.js.map +1 -0
- package/dist/test/examples/shared-name/index.d.ts +1 -0
- package/dist/test/examples/shared-name/index.js +18 -0
- package/dist/test/examples/shared-name/index.js.map +1 -0
- package/dist/test/examples/shared-name/src/alpha/Widget.d.ts +4 -0
- package/dist/test/examples/shared-name/src/alpha/Widget.js +3 -0
- package/dist/test/examples/shared-name/src/alpha/Widget.js.map +1 -0
- package/dist/test/examples/shared-name/src/beta/Widget.d.ts +3 -0
- package/dist/test/examples/shared-name/src/beta/Widget.js +13 -0
- package/dist/test/examples/shared-name/src/beta/Widget.js.map +1 -0
- package/dist/test/examples/shared-name/src/gamma/Gear.d.ts +7 -0
- package/dist/test/examples/shared-name/src/gamma/Gear.js +5 -0
- package/dist/test/examples/shared-name/src/gamma/Gear.js.map +1 -0
- package/dist/test/examples/shared-name-pruned/index.d.ts +1 -0
- package/dist/test/examples/shared-name-pruned/index.js +18 -0
- package/dist/test/examples/shared-name-pruned/index.js.map +1 -0
- package/dist/test/examples/shared-name-pruned/src/alpha/Limits.d.ts +3 -0
- package/dist/test/examples/shared-name-pruned/src/alpha/Limits.js +6 -0
- package/dist/test/examples/shared-name-pruned/src/alpha/Limits.js.map +1 -0
- package/dist/test/examples/shared-name-pruned/src/alpha/Shape.d.ts +3 -0
- package/dist/test/examples/shared-name-pruned/src/alpha/Shape.js +3 -0
- package/dist/test/examples/shared-name-pruned/src/alpha/Shape.js.map +1 -0
- package/dist/test/examples/shared-name-pruned/src/alpha/Tile.d.ts +7 -0
- package/dist/test/examples/shared-name-pruned/src/alpha/Tile.js +11 -0
- package/dist/test/examples/shared-name-pruned/src/alpha/Tile.js.map +1 -0
- package/dist/test/examples/shared-name-pruned/src/beta/Limits.d.ts +3 -0
- package/dist/test/examples/shared-name-pruned/src/beta/Limits.js +6 -0
- package/dist/test/examples/shared-name-pruned/src/beta/Limits.js.map +1 -0
- package/dist/test/examples/shared-name-pruned/src/beta/Shape.d.ts +3 -0
- package/dist/test/examples/shared-name-pruned/src/beta/Shape.js +3 -0
- package/dist/test/examples/shared-name-pruned/src/beta/Shape.js.map +1 -0
- package/dist/test/examples/source-repository/a/generated/index.js +28 -28
- package/dist/test/examples/source-repository/a/generated/index.js.map +1 -1
- package/dist/test/examples/source-repository/a/src/ExtendsForeignType.d.ts +1 -1
- package/dist/test/examples/source-repository/a/src/ExtendsForeignType.js +5 -5
- package/dist/test/examples/source-repository/a/src/ExtendsForeignType.js.map +1 -1
- package/dist/test/examples/source-repository/b/generated/index.js +3 -3
- package/dist/test/examples/source-repository/b/generated/index.js.map +1 -1
- package/package.json +5 -5
- package/src/ReflectionDoctor.ts +37 -17
- package/src/codegen/CanonicalSourceGraph.ts +50 -0
- package/src/codegen/writeGeneratedIndex.ts +35 -9
- package/src/parser/PackageSourceFiles.ts +66 -0
- package/src/parser/SharedQualifiedNames.ts +76 -0
- package/src/parser/createGraphBuilder.ts +25 -10
- package/src/parser/createSourceGraph.ts +14 -16
- package/test/Class.test.ts +1 -1
- package/test/ExamplePackageFixture.ts +142 -0
- package/test/GraphEmitRelativePaths.test.ts +1 -1
- package/test/PackageSourceFiles.test.ts +42 -0
- package/test/ReflectionDoctor.test.ts +50 -12
- package/test/ReproducibleGeneratedIndex.test.ts +114 -0
- package/test/SharedQualifiedNames.test.ts +89 -0
- package/test/examples/reproducible/index.ts +4 -0
- package/test/examples/reproducible/src/alpha/Alpha.ts +13 -0
- package/test/examples/reproducible/src/alpha/Defaults.ts +4 -0
- package/test/examples/reproducible/src/beta/Beta.ts +7 -0
- package/test/examples/reproducible/src/beta/deep/Gamma.ts +5 -0
- package/test/examples/reproducible/src/zeta/Defaults.ts +4 -0
- package/test/examples/reproducible/src/zeta/Zeta.ts +9 -0
- package/test/examples/shared-name/index.ts +1 -0
- package/test/examples/shared-name/src/alpha/Widget.ts +6 -0
- package/test/examples/shared-name/src/beta/Widget.ts +5 -0
- package/test/examples/shared-name/src/gamma/Gear.ts +9 -0
- package/test/examples/shared-name-pruned/index.ts +1 -0
- package/test/examples/shared-name-pruned/src/alpha/Limits.ts +2 -0
- package/test/examples/shared-name-pruned/src/alpha/Shape.ts +3 -0
- package/test/examples/shared-name-pruned/src/alpha/Tile.ts +9 -0
- package/test/examples/shared-name-pruned/src/beta/Limits.ts +2 -0
- package/test/examples/shared-name-pruned/src/beta/Shape.ts +4 -0
- package/test/examples/source-repository/a/dist/codegen/CanonicalSourceGraph.d.ts +22 -0
- package/test/examples/source-repository/a/dist/codegen/CanonicalSourceGraph.js +60 -0
- package/test/examples/source-repository/a/dist/codegen/CanonicalSourceGraph.js.map +1 -0
- package/test/examples/source-repository/a/dist/codegen/writeGeneratedIndex.d.ts +12 -3
- package/test/examples/source-repository/a/dist/codegen/writeGeneratedIndex.js +21 -13
- package/test/examples/source-repository/a/dist/codegen/writeGeneratedIndex.js.map +1 -1
- package/test/examples/source-repository/a/dist/generated/index.js +28 -28
- package/test/examples/source-repository/a/dist/generated/index.js.map +1 -1
- package/test/examples/source-repository/a/dist/parser/PackageSourceFiles.d.ts +30 -0
- package/test/examples/source-repository/a/dist/parser/PackageSourceFiles.js +151 -0
- package/test/examples/source-repository/a/dist/parser/PackageSourceFiles.js.map +1 -0
- package/test/examples/source-repository/a/dist/parser/SharedQualifiedNames.d.ts +43 -0
- package/test/examples/source-repository/a/dist/parser/SharedQualifiedNames.js +81 -0
- package/test/examples/source-repository/a/dist/parser/SharedQualifiedNames.js.map +1 -0
- package/test/examples/source-repository/a/dist/parser/createGraphBuilder.d.ts +6 -1
- package/test/examples/source-repository/a/dist/parser/createGraphBuilder.js +16 -31
- package/test/examples/source-repository/a/dist/parser/createGraphBuilder.js.map +1 -1
- package/test/examples/source-repository/a/dist/parser/createSourceGraph.d.ts +6 -1
- package/test/examples/source-repository/a/dist/parser/createSourceGraph.js +23 -38
- package/test/examples/source-repository/a/dist/parser/createSourceGraph.js.map +1 -1
- package/test/examples/source-repository/a/dist/src/ExtendsForeignType.d.ts +1 -1
- package/test/examples/source-repository/a/dist/src/ExtendsForeignType.js +5 -5
- package/test/examples/source-repository/a/dist/src/ExtendsForeignType.js.map +1 -1
- package/test/examples/source-repository/a/generated/index.ts +44 -44
- package/test/examples/source-repository/a/node_modules/.package-lock.json +13 -13
- package/test/examples/source-repository/a/node_modules/@proteinjs/util/CHANGELOG.md +8 -0
- package/test/examples/source-repository/a/node_modules/@proteinjs/util/LICENSE +21 -0
- package/test/examples/source-repository/a/node_modules/@proteinjs/util/package.json +3 -2
- package/test/examples/source-repository/a/node_modules/@proteinjs/util/tsconfig.json +1 -0
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/CHANGELOG.md +63 -0
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/LICENSE +21 -0
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/dist/index.d.ts +1 -0
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/dist/index.js +1 -0
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/dist/index.js.map +1 -1
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/dist/src/ArgsMap.js +7 -4
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/dist/src/ArgsMap.js.map +1 -1
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/dist/src/Fs.js +16 -12
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/dist/src/Fs.js.map +1 -1
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/dist/src/PackageUtil.d.ts +59 -13
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/dist/src/PackageUtil.js +119 -80
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/dist/src/PackageUtil.js.map +1 -1
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/dist/src/WorkspaceDeclaration.d.ts +91 -0
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/dist/src/WorkspaceDeclaration.js +608 -0
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/dist/src/WorkspaceDeclaration.js.map +1 -0
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/dist/src/promisifiedFs.d.ts +0 -1
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/index.ts +1 -0
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/package.json +4 -3
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/src/ArgsMap.ts +7 -4
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/src/Fs.ts +12 -9
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/src/PackageUtil.ts +92 -38
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/src/WorkspaceDeclaration.ts +340 -0
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/test/ArgsMap.test.ts +35 -0
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/test/Fs.getFilePathsMatchingGlob.test.ts +70 -0
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/test/PackageUtil.getLocalPackageMap.test.ts +107 -0
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/test/PackageUtil.pathKeyedIdentity.test.ts +169 -0
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/test/WorkspaceDeclaration.test.ts +174 -0
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/tsconfig.json +1 -0
- package/test/examples/source-repository/a/package-lock.json +16 -16
- package/test/examples/source-repository/a/package.json +3 -3
- package/test/examples/source-repository/a/src/ExtendsForeignType.ts +1 -1
- package/test/examples/source-repository/b/dist/codegen/CanonicalSourceGraph.d.ts +22 -0
- package/test/examples/source-repository/b/dist/codegen/CanonicalSourceGraph.js +60 -0
- package/test/examples/source-repository/b/dist/codegen/CanonicalSourceGraph.js.map +1 -0
- package/test/examples/source-repository/b/dist/codegen/writeGeneratedIndex.d.ts +12 -3
- package/test/examples/source-repository/b/dist/codegen/writeGeneratedIndex.js +21 -13
- package/test/examples/source-repository/b/dist/codegen/writeGeneratedIndex.js.map +1 -1
- package/test/examples/source-repository/b/dist/generated/index.js +3 -3
- package/test/examples/source-repository/b/dist/generated/index.js.map +1 -1
- package/test/examples/source-repository/b/dist/parser/PackageSourceFiles.d.ts +30 -0
- package/test/examples/source-repository/b/dist/parser/PackageSourceFiles.js +151 -0
- package/test/examples/source-repository/b/dist/parser/PackageSourceFiles.js.map +1 -0
- package/test/examples/source-repository/b/dist/parser/SharedQualifiedNames.d.ts +43 -0
- package/test/examples/source-repository/b/dist/parser/SharedQualifiedNames.js +81 -0
- package/test/examples/source-repository/b/dist/parser/SharedQualifiedNames.js.map +1 -0
- package/test/examples/source-repository/b/dist/parser/createGraphBuilder.d.ts +6 -1
- package/test/examples/source-repository/b/dist/parser/createGraphBuilder.js +16 -31
- package/test/examples/source-repository/b/dist/parser/createGraphBuilder.js.map +1 -1
- package/test/examples/source-repository/b/dist/parser/createSourceGraph.d.ts +6 -1
- package/test/examples/source-repository/b/dist/parser/createSourceGraph.js +23 -38
- package/test/examples/source-repository/b/dist/parser/createSourceGraph.js.map +1 -1
- package/test/examples/source-repository/b/generated/index.ts +6 -6
- package/test/examples/source-repository/b/node_modules/.package-lock.json +10 -10
- package/test/examples/source-repository/b/node_modules/@proteinjs/util/CHANGELOG.md +8 -0
- package/test/examples/source-repository/b/node_modules/@proteinjs/util/LICENSE +21 -0
- package/test/examples/source-repository/b/node_modules/@proteinjs/util/package.json +3 -2
- package/test/examples/source-repository/b/node_modules/@proteinjs/util/tsconfig.json +1 -0
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/CHANGELOG.md +63 -0
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/LICENSE +21 -0
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/dist/index.d.ts +1 -0
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/dist/index.js +1 -0
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/dist/index.js.map +1 -1
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/dist/src/ArgsMap.js +7 -4
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/dist/src/ArgsMap.js.map +1 -1
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/dist/src/Fs.js +16 -12
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/dist/src/Fs.js.map +1 -1
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/dist/src/PackageUtil.d.ts +59 -13
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/dist/src/PackageUtil.js +119 -80
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/dist/src/PackageUtil.js.map +1 -1
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/dist/src/WorkspaceDeclaration.d.ts +91 -0
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/dist/src/WorkspaceDeclaration.js +608 -0
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/dist/src/WorkspaceDeclaration.js.map +1 -0
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/dist/src/promisifiedFs.d.ts +0 -1
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/index.ts +1 -0
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/package.json +4 -3
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/src/ArgsMap.ts +7 -4
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/src/Fs.ts +12 -9
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/src/PackageUtil.ts +92 -38
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/src/WorkspaceDeclaration.ts +340 -0
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/test/ArgsMap.test.ts +35 -0
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/test/Fs.getFilePathsMatchingGlob.test.ts +70 -0
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/test/PackageUtil.getLocalPackageMap.test.ts +107 -0
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/test/PackageUtil.pathKeyedIdentity.test.ts +169 -0
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/test/WorkspaceDeclaration.test.ts +174 -0
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/tsconfig.json +1 -0
- package/test/examples/source-repository/b/package-lock.json +13 -13
- package/test/examples/source-repository/b/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/alpha/Widget';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Loadable } from '@proteinjs/reflection';
|
|
2
|
+
|
|
3
|
+
// One file declares Gear twice, in TypeScript's type and value spaces: one declaring file, so the
|
|
4
|
+
// name is not shared, though it reaches the index. Only a name declared by two FILES is refused.
|
|
5
|
+
export interface Gear extends Loadable {
|
|
6
|
+
teeth: number;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const Gear = { teeth: 12 };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/alpha/Tile';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Graph } from '@dagrejs/graphlib';
|
|
2
|
+
/**
|
|
3
|
+
* The emitted form of a source graph: the same nodes, values and edges, in an order that is a
|
|
4
|
+
* function of the graph's content alone — never of the order the builder happened to visit the
|
|
5
|
+
* sources or insert placeholder parents. The generated index serializes nodes and edges in
|
|
6
|
+
* insertion order, so this order is the artifact's byte order (and the runtime's `objects()`
|
|
7
|
+
* order within one package).
|
|
8
|
+
*
|
|
9
|
+
* - Nodes by the declaring file's package-relative path, then by qualified name. A placeholder
|
|
10
|
+
* (a parent referenced here but declared elsewhere) has no file and sorts by name ahead of
|
|
11
|
+
* the declared nodes.
|
|
12
|
+
* - Edges by child, then parent (a source graph is never a multigraph: one edge per pair).
|
|
13
|
+
*
|
|
14
|
+
* Both keys are package-relative strings compared by code unit, so they are the same on every
|
|
15
|
+
* machine and in every checkout location.
|
|
16
|
+
*/
|
|
17
|
+
export declare class CanonicalSourceGraph {
|
|
18
|
+
/** A copy of `graph` whose node and edge order is canonical. */
|
|
19
|
+
static of(graph: Graph): Graph;
|
|
20
|
+
private static nodeOrder;
|
|
21
|
+
private static edgeOrder;
|
|
22
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
3
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4
|
+
if (ar || !(i in from)) {
|
|
5
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
6
|
+
ar[i] = from[i];
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CanonicalSourceGraph = void 0;
|
|
13
|
+
var graphlib_1 = require("@dagrejs/graphlib");
|
|
14
|
+
var PackageSourceFiles_1 = require("../parser/PackageSourceFiles");
|
|
15
|
+
/**
|
|
16
|
+
* The emitted form of a source graph: the same nodes, values and edges, in an order that is a
|
|
17
|
+
* function of the graph's content alone — never of the order the builder happened to visit the
|
|
18
|
+
* sources or insert placeholder parents. The generated index serializes nodes and edges in
|
|
19
|
+
* insertion order, so this order is the artifact's byte order (and the runtime's `objects()`
|
|
20
|
+
* order within one package).
|
|
21
|
+
*
|
|
22
|
+
* - Nodes by the declaring file's package-relative path, then by qualified name. A placeholder
|
|
23
|
+
* (a parent referenced here but declared elsewhere) has no file and sorts by name ahead of
|
|
24
|
+
* the declared nodes.
|
|
25
|
+
* - Edges by child, then parent (a source graph is never a multigraph: one edge per pair).
|
|
26
|
+
*
|
|
27
|
+
* Both keys are package-relative strings compared by code unit, so they are the same on every
|
|
28
|
+
* machine and in every checkout location.
|
|
29
|
+
*/
|
|
30
|
+
var CanonicalSourceGraph = /** @class */ (function () {
|
|
31
|
+
function CanonicalSourceGraph() {
|
|
32
|
+
}
|
|
33
|
+
/** A copy of `graph` whose node and edge order is canonical. */
|
|
34
|
+
CanonicalSourceGraph.of = function (graph) {
|
|
35
|
+
var canonical = new graphlib_1.Graph({
|
|
36
|
+
directed: graph.isDirected(),
|
|
37
|
+
multigraph: graph.isMultigraph(),
|
|
38
|
+
compound: graph.isCompound(),
|
|
39
|
+
});
|
|
40
|
+
for (var _i = 0, _a = CanonicalSourceGraph.nodeOrder(graph); _i < _a.length; _i++) {
|
|
41
|
+
var nodeName = _a[_i];
|
|
42
|
+
canonical.setNode(nodeName, graph.node(nodeName));
|
|
43
|
+
}
|
|
44
|
+
for (var _b = 0, _c = CanonicalSourceGraph.edgeOrder(graph); _b < _c.length; _b++) {
|
|
45
|
+
var edge = _c[_b];
|
|
46
|
+
canonical.setEdge(edge, graph.edge(edge));
|
|
47
|
+
}
|
|
48
|
+
return canonical;
|
|
49
|
+
};
|
|
50
|
+
CanonicalSourceGraph.nodeOrder = function (graph) {
|
|
51
|
+
var fileOf = function (nodeName) { var _a; return ((_a = graph.node(nodeName)) === null || _a === void 0 ? void 0 : _a.filePath) || ''; };
|
|
52
|
+
return __spreadArray([], graph.nodes(), true).sort(function (a, b) { return PackageSourceFiles_1.PackageSourceFiles.compare(fileOf(a), fileOf(b)) || PackageSourceFiles_1.PackageSourceFiles.compare(a, b); });
|
|
53
|
+
};
|
|
54
|
+
CanonicalSourceGraph.edgeOrder = function (graph) {
|
|
55
|
+
return __spreadArray([], graph.edges(), true).sort(function (a, b) { return PackageSourceFiles_1.PackageSourceFiles.compare(a.v, b.v) || PackageSourceFiles_1.PackageSourceFiles.compare(a.w, b.w); });
|
|
56
|
+
};
|
|
57
|
+
return CanonicalSourceGraph;
|
|
58
|
+
}());
|
|
59
|
+
exports.CanonicalSourceGraph = CanonicalSourceGraph;
|
|
60
|
+
//# sourceMappingURL=CanonicalSourceGraph.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CanonicalSourceGraph.js","sourceRoot":"","sources":["../../../../../../src/codegen/CanonicalSourceGraph.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAAgD;AAChD,mEAAkE;AAElE;;;;;;;;;;;;;;GAcG;AACH;IAAA;IA+BA,CAAC;IA9BC,gEAAgE;IACzD,uBAAE,GAAT,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AAI,CAC5B,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,uCAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,uCAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAA5E,CAA4E,CACvF,CAAC;IACJ,CAAC;IACH,2BAAC;AAAD,CAAC,AA/BD,IA+BC;AA/BY,oDAAoB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Graph } from '@dagrejs/graphlib';
|
|
2
|
+
import { SharedQualifiedName } from '../parser/SharedQualifiedNames';
|
|
2
3
|
/**
|
|
3
4
|
* @param packageDir Root of the package (contains package.json)
|
|
4
5
|
* @param packageGeneratedDir Directory where generated/index.ts will be written
|
|
@@ -27,9 +28,17 @@ export declare function findDependencySourceGraph(packageDir: string, packageNam
|
|
|
27
28
|
* consuming package — npm-layout resolution: the nearest installed copy shadows hoisted ones.
|
|
28
29
|
*/
|
|
29
30
|
export declare function findDependencyDir(packageDir: string, packageName: string): string | undefined;
|
|
31
|
+
export interface EmittedSourceGraph {
|
|
32
|
+
/** The pruned graph in canonical order: what the generated index serializes. */
|
|
33
|
+
graph: Graph;
|
|
34
|
+
/** The names in `graph` that two or more source files declare; the build refuses to emit while there is one. */
|
|
35
|
+
sharedNames: SharedQualifiedName[];
|
|
36
|
+
}
|
|
30
37
|
/**
|
|
31
38
|
* The graph exactly as a build emits it: parsed from the package's source roots, with
|
|
32
|
-
* build-time-non-loadable declarations pruned
|
|
33
|
-
*
|
|
39
|
+
* build-time-non-loadable declarations pruned, in canonical order (the serialized graph and
|
|
40
|
+
* the source links follow it, so the same sources emit the same bytes on every machine), and
|
|
41
|
+
* the names in it that more than one file declares. Owned here so build emit and diagnostic
|
|
42
|
+
* tooling (reflection-doctor drift and shared-name checks) share one pipeline.
|
|
34
43
|
*/
|
|
35
|
-
export declare function createEmittedSourceGraph(packageDir: string, sourceRootsRel: string[]): Promise<
|
|
44
|
+
export declare function createEmittedSourceGraph(packageDir: string, sourceRootsRel: string[]): Promise<EmittedSourceGraph>;
|
|
@@ -69,6 +69,9 @@ var util_node_1 = require("@proteinjs/util-node");
|
|
|
69
69
|
var util_1 = require("@proteinjs/util");
|
|
70
70
|
var jsesc_1 = __importDefault(require("jsesc"));
|
|
71
71
|
var createSourceGraph_1 = require("../parser/createSourceGraph");
|
|
72
|
+
var PackageSourceFiles_1 = require("../parser/PackageSourceFiles");
|
|
73
|
+
var SharedQualifiedNames_1 = require("../parser/SharedQualifiedNames");
|
|
74
|
+
var CanonicalSourceGraph_1 = require("./CanonicalSourceGraph");
|
|
72
75
|
var reflection_1 = require("@proteinjs/reflection");
|
|
73
76
|
/**
|
|
74
77
|
* @param packageDir Root of the package (contains package.json)
|
|
@@ -121,8 +124,8 @@ function writeGeneratedIndex(packageDir, packageGeneratedDir, generatedIndexPath
|
|
|
121
124
|
case 7:
|
|
122
125
|
generatedIndex = _a.sent();
|
|
123
126
|
exportTargetNoExt = publicEntryRelOverride
|
|
124
|
-
?
|
|
125
|
-
: "".concat(
|
|
127
|
+
? PackageSourceFiles_1.PackageSourceFiles.relativePath(packageGeneratedDir, path.join(packageDir, publicEntryRelOverride)).replace(/\.[^/.]+$/, '')
|
|
128
|
+
: "".concat(PackageSourceFiles_1.PackageSourceFiles.relativePath(packageGeneratedDir, packageDir), "/index");
|
|
126
129
|
generatedIndex += "\n\n\nexport * from '".concat(exportTargetNoExt, "';");
|
|
127
130
|
return [4 /*yield*/, util_node_1.promisifiedFs.writeFile(generatedIndexPath, generatedIndex)];
|
|
128
131
|
case 8:
|
|
@@ -135,17 +138,18 @@ function writeGeneratedIndex(packageDir, packageGeneratedDir, generatedIndexPath
|
|
|
135
138
|
exports.writeGeneratedIndex = writeGeneratedIndex;
|
|
136
139
|
function sourceRepositoryLoader(packageDir, generatedIndexPath, sourceRootsRel) {
|
|
137
140
|
return __awaiter(this, void 0, void 0, function () {
|
|
138
|
-
var packageJson, code, roots, sourceGraph;
|
|
139
|
-
return __generator(this, function (
|
|
140
|
-
switch (
|
|
141
|
+
var packageJson, code, roots, _a, sourceGraph, sharedNames;
|
|
142
|
+
return __generator(this, function (_b) {
|
|
143
|
+
switch (_b.label) {
|
|
141
144
|
case 0: return [4 /*yield*/, getPackageJson(packageDir)];
|
|
142
145
|
case 1:
|
|
143
|
-
packageJson =
|
|
146
|
+
packageJson = _b.sent();
|
|
144
147
|
code = loadDependencySourceGraphs(packageDir, packageJson);
|
|
145
148
|
roots = Array.isArray(sourceRootsRel) ? sourceRootsRel : [sourceRootsRel];
|
|
146
149
|
return [4 /*yield*/, createEmittedSourceGraph(packageDir, roots)];
|
|
147
150
|
case 2:
|
|
148
|
-
|
|
151
|
+
_a = _b.sent(), sourceGraph = _a.graph, sharedNames = _a.sharedNames;
|
|
152
|
+
SharedQualifiedNames_1.SharedQualifiedNames.refuse(packageJson.name, sharedNames);
|
|
149
153
|
code += generateSourceGraph(sourceGraph);
|
|
150
154
|
code += generateSourceLinks(sourceGraph, packageJson, packageDir, generatedIndexPath);
|
|
151
155
|
code += mergeSourceGraph();
|
|
@@ -304,22 +308,26 @@ function getDependencyImportSpecifier(packageDir, packageName) {
|
|
|
304
308
|
}
|
|
305
309
|
/**
|
|
306
310
|
* The graph exactly as a build emits it: parsed from the package's source roots, with
|
|
307
|
-
* build-time-non-loadable declarations pruned
|
|
308
|
-
*
|
|
311
|
+
* build-time-non-loadable declarations pruned, in canonical order (the serialized graph and
|
|
312
|
+
* the source links follow it, so the same sources emit the same bytes on every machine), and
|
|
313
|
+
* the names in it that more than one file declares. Owned here so build emit and diagnostic
|
|
314
|
+
* tooling (reflection-doctor drift and shared-name checks) share one pipeline.
|
|
309
315
|
*/
|
|
310
316
|
function createEmittedSourceGraph(packageDir, sourceRootsRel) {
|
|
311
317
|
return __awaiter(this, void 0, void 0, function () {
|
|
312
|
-
var packageJson, sourceGraph;
|
|
318
|
+
var packageJson, declarations, sourceGraph, sharedNames;
|
|
313
319
|
return __generator(this, function (_a) {
|
|
314
320
|
switch (_a.label) {
|
|
315
321
|
case 0: return [4 /*yield*/, getPackageJson(packageDir)];
|
|
316
322
|
case 1:
|
|
317
323
|
packageJson = _a.sent();
|
|
318
|
-
|
|
324
|
+
declarations = new SharedQualifiedNames_1.SharedQualifiedNames();
|
|
325
|
+
return [4 /*yield*/, (0, createSourceGraph_1.createSourceGraph)(packageDir, [], sourceRootsRel, declarations)];
|
|
319
326
|
case 2:
|
|
320
327
|
sourceGraph = _a.sent();
|
|
321
328
|
removeNonLoadables(sourceGraph, packageJson.name);
|
|
322
|
-
|
|
329
|
+
sharedNames = declarations.in(sourceGraph);
|
|
330
|
+
return [2 /*return*/, { graph: CanonicalSourceGraph_1.CanonicalSourceGraph.of(sourceGraph), sharedNames: sharedNames }];
|
|
323
331
|
}
|
|
324
332
|
});
|
|
325
333
|
});
|
|
@@ -410,7 +418,7 @@ function generateSourceLinks(sourceGraph, packageJson, packageDir, generatedInde
|
|
|
410
418
|
}
|
|
411
419
|
// node.filePath is package-relative (never serialized absolute); resolve against the
|
|
412
420
|
// package dir to compute the real import location for the generated index.
|
|
413
|
-
var relativeImportPath =
|
|
421
|
+
var relativeImportPath = PackageSourceFiles_1.PackageSourceFiles.relativePath(path.dirname(generatedIndexPath), path.join(packageDir, node.filePath));
|
|
414
422
|
code += "import { ".concat(node.name, " } from '").concat(relativeImportPath.replace(/\.[^/.]+$/, ''), "';\n");
|
|
415
423
|
linkableNodes.push(node);
|
|
416
424
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writeGeneratedIndex.js","sourceRoot":"","sources":["../../../../../../src/codegen/writeGeneratedIndex.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAyB;AACzB,yCAA6B;AAC7B,kDAAqD;AACrD,wCAAgE;AAEhE,gDAA0B;A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