@component-compass/plugin-core 0.1.17 → 0.1.19

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/index.d.ts CHANGED
@@ -8,6 +8,7 @@ export type { TagName, WrapperId, IndexedComponent, Loc, WarningCode, Warning, S
8
8
  export { asTagName, asWrapperId, emptyLocalIndex } from "./scan-types.js";
9
9
  export type { Enrichment, AuthoredLeafPayload } from "./enrichment.js";
10
10
  export { normalizeOwnerPath } from "./owner-utils.js";
11
+ export { posixPath } from "./posix.js";
11
12
  export { logicalKeyFor, hashLogicalKey, computeLogicalId } from "./logical-id.js";
12
13
  export { computeOccurrenceId } from "./occurrence-id.js";
13
14
  export { projectPropUsages, classifyExprText } from "./project-props.js";
package/dist/index.js CHANGED
@@ -4,6 +4,7 @@ export { manifestJsonSchema } from "./schema.js";
4
4
  export { ManifestBuilder } from "./builder.js";
5
5
  export { asTagName, asWrapperId, emptyLocalIndex } from "./scan-types.js";
6
6
  export { normalizeOwnerPath } from "./owner-utils.js";
7
+ export { posixPath } from "./posix.js";
7
8
  export { logicalKeyFor, hashLogicalKey, computeLogicalId } from "./logical-id.js";
8
9
  export { computeOccurrenceId } from "./occurrence-id.js";
9
10
  export { projectPropUsages, classifyExprText } from "./project-props.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC3G,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAe/C,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAI1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGzE,cAAc,mBAAmB,CAAC;AAGlC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC3G,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAe/C,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAI1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGzE,cAAc,mBAAmB,CAAC;AAGlC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { relative, isAbsolute } from "node:path";
2
+ import { posixPath } from "./posix.js";
2
3
  /**
3
4
  * Normalize a file path to the form used as keys in `LocalDefinitionIndex.byPath`.
4
5
  *
@@ -10,7 +11,7 @@ import { relative, isAbsolute } from "node:path";
10
11
  */
11
12
  export function normalizeOwnerPath(file, repoRoot) {
12
13
  if (!repoRoot || !isAbsolute(file))
13
- return file.replace(/\\/g, "/");
14
- return relative(repoRoot, file).replace(/\\/g, "/");
14
+ return posixPath(file);
15
+ return posixPath(relative(repoRoot, file));
15
16
  }
16
17
  //# sourceMappingURL=owner-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"owner-utils.js","sourceRoot":"","sources":["../src/owner-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEjD;;;;;;;;GAQG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAY,EAAE,QAAiB;IAChE,IAAI,CAAC,QAAQ,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACpE,OAAO,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AACtD,CAAC"}
1
+ {"version":3,"file":"owner-utils.js","sourceRoot":"","sources":["../src/owner-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC;;;;;;;;GAQG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAY,EAAE,QAAiB;IAChE,IAAI,CAAC,QAAQ,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;IAC3D,OAAO,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;AAC7C,CAAC"}
@@ -0,0 +1,2 @@
1
+ /** Normalises backslashes to forward slashes for cross-platform path output. */
2
+ export declare function posixPath(p: string): string;
package/dist/posix.js ADDED
@@ -0,0 +1,5 @@
1
+ /** Normalises backslashes to forward slashes for cross-platform path output. */
2
+ export function posixPath(p) {
3
+ return p.replaceAll("\\", "/");
4
+ }
5
+ //# sourceMappingURL=posix.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"posix.js","sourceRoot":"","sources":["../src/posix.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,MAAM,UAAU,SAAS,CAAC,CAAS;IACjC,OAAO,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AACjC,CAAC"}
@@ -44,9 +44,11 @@ export type OccurrenceVia = {
44
44
  specifier: string;
45
45
  import: string;
46
46
  } | {
47
- kind: "dynamic-binding";
48
- bindingName: string;
49
- bindingSource: "parameter" | "hook-return";
47
+ kind: "passed-as-argument";
48
+ callee: string;
49
+ index: number;
50
+ specifier: string;
51
+ import: string;
50
52
  } | {
51
53
  kind: "prop-forward";
52
54
  bindingName: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@component-compass/plugin-core",
3
- "version": "0.1.17",
3
+ "version": "0.1.19",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -12,6 +12,10 @@
12
12
  "./logical-id": {
13
13
  "types": "./dist/logical-id.d.ts",
14
14
  "import": "./dist/logical-id.js"
15
+ },
16
+ "./id": {
17
+ "types": "./dist/id.d.ts",
18
+ "import": "./dist/id.js"
15
19
  }
16
20
  },
17
21
  "files": [