packtory 0.0.32 → 0.0.33

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.
@@ -1,3 +1,4 @@
1
+ import { Node as TsMorphNode } from 'ts-morph';
1
2
  import { bindingId } from "./binding-id.js";
2
3
  import { collectIdentifierTargets } from "./identifier-target-collector.js";
3
4
  import { collectImpureStatements } from "./impure-statements.js";
@@ -8,6 +9,15 @@ function addStatementSeeds(statements, declarationIndex, seeds) {
8
9
  }
9
10
  }
10
11
  }
12
+ function addEntryPointExportDeclarationSeeds(file, declarationIndex, seeds) {
13
+ for (const statement of file.sourceFile.getStatements()) {
14
+ if (TsMorphNode.isExportDeclaration(statement)) {
15
+ for (const target of collectIdentifierTargets(statement, declarationIndex)) {
16
+ seeds.add(target);
17
+ }
18
+ }
19
+ }
20
+ }
11
21
  export function gatherLocalSeeds(files, entryPointFilePaths, declarationIndex, deadCodeElimination) {
12
22
  const seeds = new Set();
13
23
  for (const file of files) {
@@ -17,6 +27,9 @@ export function gatherLocalSeeds(files, entryPointFilePaths, declarationIndex, d
17
27
  seeds.add(bindingId(file.sourceFilePath, binding.name));
18
28
  }
19
29
  }
30
+ if (isEntry) {
31
+ addEntryPointExportDeclarationSeeds(file, declarationIndex, seeds);
32
+ }
20
33
  addStatementSeeds(collectImpureStatements(file.sourceFile, deadCodeElimination), declarationIndex, seeds);
21
34
  }
22
35
  return seeds;
@@ -1 +1 @@
1
- {"version":3,"file":"local-seed-gathering.js","sourceRoot":"","sources":["../../../../../source/dead-code-eliminator/reachability/local-seed-gathering.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAuB,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAA6B,MAAM,kCAAkC,CAAC;AACvG,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAMjE,SAAS,iBAAiB,CACtB,UAAgC,EAChC,gBAAsC,EACtC,KAAkB;IAElB,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACjC,KAAK,MAAM,MAAM,IAAI,wBAAwB,CAAC,SAAS,EAAE,gBAAgB,CAAC,EAAE,CAAC;YACzE,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACtB,CAAC;IACL,CAAC;AACL,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC5B,KAA8B,EAC9B,mBAAwC,EACxC,gBAAsC,EACtC,mBAA4D;IAE5D,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAChC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACvB,MAAM,OAAO,GAAG,mBAAmB,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC7D,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClC,IAAI,OAAO,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;gBAChC,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;YAC5D,CAAC;QACL,CAAC;QACD,iBAAiB,CAAC,uBAAuB,CAAC,IAAI,CAAC,UAAU,EAAE,mBAAmB,CAAC,EAAE,gBAAgB,EAAE,KAAK,CAAC,CAAC;IAC9G,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC"}
1
+ {"version":3,"file":"local-seed-gathering.js","sourceRoot":"","sources":["../../../../../source/dead-code-eliminator/reachability/local-seed-gathering.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,WAAW,EAAmC,MAAM,UAAU,CAAC;AAEhF,OAAO,EAAE,SAAS,EAAuB,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAA6B,MAAM,kCAAkC,CAAC;AACvG,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAMjE,SAAS,iBAAiB,CACtB,UAAgC,EAChC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BAAiB,CAAC,uBAAuB,CAAC,IAAI,CAAC,UAAU,EAAE,mBAAmB,CAAC,EAAE,gBAAgB,EAAE,KAAK,CAAC,CAAC;IAC9G,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC"}
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  ],
6
6
  "dependencies": {
7
7
  "@arethetypeswrong/core": "0.18.3",
8
- "@cyclonedx/cyclonedx-library": "10.0.0",
8
+ "@cyclonedx/cyclonedx-library": "10.1.0",
9
9
  "@jridgewell/gen-mapping": "0.3.13",
10
10
  "@jridgewell/trace-mapping": "0.3.31",
11
11
  "@schema-hub/zod-error-formatter": "0.0.11",
@@ -17,9 +17,9 @@
17
17
  "hosted-git-info": "10.1.1",
18
18
  "libnpmpublish": "11.2.0",
19
19
  "npm-package-arg": "14.0.0",
20
- "npm-registry-fetch": "20.0.0",
21
- "remeda": "2.37.0",
22
- "semver": "7.8.1",
20
+ "npm-registry-fetch": "20.0.1",
21
+ "remeda": "2.38.0",
22
+ "semver": "7.8.2",
23
23
  "spdx-expression-parse": "4.0.0",
24
24
  "tar-stream": "3.1.8",
25
25
  "true-myth": "9.4.0",
@@ -116,5 +116,5 @@
116
116
  "./tar/tarball-builder.js"
117
117
  ],
118
118
  "type": "module",
119
- "version": "0.0.32"
119
+ "version": "0.0.33"
120
120
  }
package/sbom.cdx.json CHANGED
@@ -9,16 +9,16 @@
9
9
  {
10
10
  "type": "application",
11
11
  "name": "packtory",
12
- "version": "0.0.31"
12
+ "version": "0.0.32"
13
13
  }
14
14
  ]
15
15
  },
16
16
  "component": {
17
17
  "type": "library",
18
18
  "name": "packtory",
19
- "version": "0.0.32",
20
- "bom-ref": "pkg:npm/packtory@0.0.32",
21
- "purl": "pkg:npm/packtory@0.0.32"
19
+ "version": "0.0.33",
20
+ "bom-ref": "pkg:npm/packtory@0.0.33",
21
+ "purl": "pkg:npm/packtory@0.0.33"
22
22
  }
23
23
  },
24
24
  "components": [
@@ -38,15 +38,15 @@
38
38
  {
39
39
  "type": "library",
40
40
  "name": "@cyclonedx/cyclonedx-library",
41
- "version": "10.0.0",
42
- "bom-ref": "pkg:npm/@cyclonedx/cyclonedx-library@10.0.0",
41
+ "version": "10.1.0",
42
+ "bom-ref": "pkg:npm/@cyclonedx/cyclonedx-library@10.1.0",
43
43
  "scope": "required",
44
44
  "licenses": [
45
45
  {
46
46
  "expression": "Apache-2.0"
47
47
  }
48
48
  ],
49
- "purl": "pkg:npm/@cyclonedx/cyclonedx-library@10.0.0"
49
+ "purl": "pkg:npm/@cyclonedx/cyclonedx-library@10.1.0"
50
50
  },
51
51
  {
52
52
  "type": "library",
@@ -194,41 +194,41 @@
194
194
  {
195
195
  "type": "library",
196
196
  "name": "npm-registry-fetch",
197
- "version": "20.0.0",
198
- "bom-ref": "pkg:npm/npm-registry-fetch@20.0.0",
197
+ "version": "20.0.1",
198
+ "bom-ref": "pkg:npm/npm-registry-fetch@20.0.1",
199
199
  "scope": "required",
200
200
  "licenses": [
201
201
  {
202
202
  "expression": "ISC"
203
203
  }
204
204
  ],
205
- "purl": "pkg:npm/npm-registry-fetch@20.0.0"
205
+ "purl": "pkg:npm/npm-registry-fetch@20.0.1"
206
206
  },
207
207
  {
208
208
  "type": "library",
209
209
  "name": "remeda",
210
- "version": "2.37.0",
211
- "bom-ref": "pkg:npm/remeda@2.37.0",
210
+ "version": "2.38.0",
211
+ "bom-ref": "pkg:npm/remeda@2.38.0",
212
212
  "scope": "required",
213
213
  "licenses": [
214
214
  {
215
215
  "expression": "MIT"
216
216
  }
217
217
  ],
218
- "purl": "pkg:npm/remeda@2.37.0"
218
+ "purl": "pkg:npm/remeda@2.38.0"
219
219
  },
220
220
  {
221
221
  "type": "library",
222
222
  "name": "semver",
223
- "version": "7.8.1",
224
- "bom-ref": "pkg:npm/semver@7.8.1",
223
+ "version": "7.8.2",
224
+ "bom-ref": "pkg:npm/semver@7.8.2",
225
225
  "scope": "required",
226
226
  "licenses": [
227
227
  {
228
228
  "expression": "ISC"
229
229
  }
230
230
  ],
231
- "purl": "pkg:npm/semver@7.8.1"
231
+ "purl": "pkg:npm/semver@7.8.2"
232
232
  },
233
233
  {
234
234
  "type": "library",
@@ -340,7 +340,7 @@
340
340
  "ref": "pkg:npm/@arethetypeswrong/core@0.18.3"
341
341
  },
342
342
  {
343
- "ref": "pkg:npm/@cyclonedx/cyclonedx-library@10.0.0"
343
+ "ref": "pkg:npm/@cyclonedx/cyclonedx-library@10.1.0"
344
344
  },
345
345
  {
346
346
  "ref": "pkg:npm/@jridgewell/gen-mapping@0.3.13"
@@ -376,13 +376,13 @@
376
376
  "ref": "pkg:npm/npm-package-arg@14.0.0"
377
377
  },
378
378
  {
379
- "ref": "pkg:npm/npm-registry-fetch@20.0.0"
379
+ "ref": "pkg:npm/npm-registry-fetch@20.0.1"
380
380
  },
381
381
  {
382
- "ref": "pkg:npm/packtory@0.0.32",
382
+ "ref": "pkg:npm/packtory@0.0.33",
383
383
  "dependsOn": [
384
384
  "pkg:npm/@arethetypeswrong/core@0.18.3",
385
- "pkg:npm/@cyclonedx/cyclonedx-library@10.0.0",
385
+ "pkg:npm/@cyclonedx/cyclonedx-library@10.1.0",
386
386
  "pkg:npm/@jridgewell/gen-mapping@0.3.13",
387
387
  "pkg:npm/@jridgewell/trace-mapping@0.3.31",
388
388
  "pkg:npm/@schema-hub/zod-error-formatter@0.0.11",
@@ -394,9 +394,9 @@
394
394
  "pkg:npm/hosted-git-info@10.1.1",
395
395
  "pkg:npm/libnpmpublish@11.2.0",
396
396
  "pkg:npm/npm-package-arg@14.0.0",
397
- "pkg:npm/npm-registry-fetch@20.0.0",
398
- "pkg:npm/remeda@2.37.0",
399
- "pkg:npm/semver@7.8.1",
397
+ "pkg:npm/npm-registry-fetch@20.0.1",
398
+ "pkg:npm/remeda@2.38.0",
399
+ "pkg:npm/semver@7.8.2",
400
400
  "pkg:npm/spdx-expression-parse@4.0.0",
401
401
  "pkg:npm/tar-stream@3.1.8",
402
402
  "pkg:npm/true-myth@9.4.0",
@@ -408,10 +408,10 @@
408
408
  ]
409
409
  },
410
410
  {
411
- "ref": "pkg:npm/remeda@2.37.0"
411
+ "ref": "pkg:npm/remeda@2.38.0"
412
412
  },
413
413
  {
414
- "ref": "pkg:npm/semver@7.8.1"
414
+ "ref": "pkg:npm/semver@7.8.2"
415
415
  },
416
416
  {
417
417
  "ref": "pkg:npm/spdx-expression-parse@4.0.0"