@component-compass/plugin-core 0.1.7 → 0.1.10

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.
@@ -181,6 +181,16 @@ export type CompositionRollup = {
181
181
  export type EventDistribution = {
182
182
  boundCount: number;
183
183
  };
184
+ /**
185
+ * Entry/wrapper package through which this repo reached the component
186
+ * (#331). Scan-observational provenance — how the repo imported it — not
187
+ * identity. `version` is the entry package's installed version, null when
188
+ * its package.json is unreadable or unversioned.
189
+ */
190
+ export type EntryPackageRef = {
191
+ package: string;
192
+ version: string | null;
193
+ };
184
194
  export type OutputComponent = {
185
195
  id: string;
186
196
  identity: OutputIdentity;
@@ -200,6 +210,9 @@ export type OutputComponent = {
200
210
  /** Source-derived declared prop API. Local components only; absent when the
201
211
  * declaration site is unreadable. Orthogonal to `manifest`. */
202
212
  declared?: DeclaredPropApi;
213
+ /** Entry/wrapper packages this repo reached the component through (#331).
214
+ * Deduped by {package, version}, sorted. Present only when non-empty. */
215
+ entryPackages?: EntryPackageRef[];
203
216
  /** Package version from package.json or CEM. Null for external packages not versioned at scan time. */
204
217
  version: string | null;
205
218
  /** Git-mtime: first commit of the declaring file. ISO 8601 string, or null for external packages. */
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * Function type for "where does this import specifier point?" — the single
3
- * source of truth consumed by both the lazy resolver and the
4
- * classifyImportOrigin helper. Implementation lives in
3
+ * source of truth consumed by the lazy resolver and the engine's
4
+ * module-resolution path (graph traversal + bounded definition resolver).
5
+ * Implementation lives in
5
6
  * `cli/src/walker/resolve-import.ts` (knows about node-resolve quirks,
6
7
  * tsconfig paths, config aliases). Type lives here so plugin-core consumers
7
8
  * (ast-utils, parsers) can depend on it without depending on the CLI.
@@ -54,6 +54,11 @@ export type LazyResolverHit = {
54
54
  leafPackage: string;
55
55
  /** Terminal file's path relative to the leaf package root, POSIX-normalised. */
56
56
  modulePath: string;
57
+ /**
58
+ * Export name at the terminal file after the walk. Equals the input
59
+ * exportName unless a hop renamed it (`export { X as Y } from ...`).
60
+ */
61
+ exportName: string;
57
62
  matched: IndexedComponent | null;
58
63
  };
59
64
  export type ResolveLazyManifest = (fromFile: string, specifier: string, exportName: string) => LazyResolverHit | null;
@@ -230,13 +235,6 @@ export type ParseContext = {
230
235
  resolveLocalExport: ResolveLocalExport;
231
236
  lookupByTag: LookupByTag;
232
237
  repoRoot: string;
233
- /**
234
- * Set of package names known to belong to the scan's repo (workspace
235
- * siblings + declared deps). Threaded into `classifyImportOrigin` so
236
- * specifiers that don't resolve on disk (uninstalled workspace siblings)
237
- * can still recover external-package identity.
238
- */
239
- knownPackageNames?: ReadonlySet<string>;
240
238
  /** Shared diagnostic collector for the scan run. */
241
239
  collector?: DiagnosticCollector;
242
240
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"scan-types.js","sourceRoot":"","sources":["../src/scan-types.ts"],"names":[],"mappings":"AAsBA,kEAAkE;AAClE,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAS,EAAW,EAAE,CAAC,CAAY,CAAC;AAC9D,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAS,EAAa,EAAE,CAAC,CAAc,CAAC;AAoHpE,MAAM,CAAC,MAAM,eAAe,GAAyB;IACnD,MAAM,EAAE,IAAI,GAAG,EAAE;IACjB,KAAK,EAAE,IAAI,GAAG,EAAE;CACjB,CAAC"}
1
+ {"version":3,"file":"scan-types.js","sourceRoot":"","sources":["../src/scan-types.ts"],"names":[],"mappings":"AAsBA,kEAAkE;AAClE,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAS,EAAW,EAAE,CAAC,CAAY,CAAC;AAC9D,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAS,EAAa,EAAE,CAAC,CAAc,CAAC;AAyHpE,MAAM,CAAC,MAAM,eAAe,GAAyB;IACnD,MAAM,EAAE,IAAI,GAAG,EAAE;IACjB,KAAK,EAAE,IAAI,GAAG,EAAE;CACjB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@component-compass/plugin-core",
3
- "version": "0.1.7",
3
+ "version": "0.1.10",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",