@packtory/cli 0.0.103 → 0.0.105

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,4 +1,5 @@
1
1
  import "packtory/packtory/packtory-results.js";
2
2
  import "../../report/terminal-renderer/terminal-package-dependencies-renderer.js";
3
+ import "./package-inspection-handler.js";
3
4
  import "./terminal-error-chain.js";
4
5
  //# sourceMappingURL=package-dependencies-handler.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"package-dependencies-handler.js","sourceRoot":"","sources":["../../../../../source/command-line-interface/runner/package-dependencies-handler.ts"],"names":[],"mappings":"AAAA,OAKO,uCAAoC,CAAC;AAE5C,OAEO,0EAA0E,CAAC;AAGlF,OAA0E,2BAA2B,CAAC"}
1
+ {"version":3,"file":"package-dependencies-handler.js","sourceRoot":"","sources":["../../../../../source/command-line-interface/runner/package-dependencies-handler.ts"],"names":[],"mappings":"AAAA,OAKO,uCAAoC,CAAC;AAE5C,OAEO,0EAA0E,CAAC;AAGlF,OAA4C,iCAAiC,CAAC;AAC9E,OAA0E,2BAA2B,CAAC"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=package-inspection-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-inspection-handler.js","sourceRoot":"","sources":["../../../../../source/command-line-interface/runner/package-inspection-handler.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import 'ts-pattern';
2
+ import "packtory/packtory/packtory-results.js";
3
+ import "../../report/terminal-renderer/terminal-package-side-effects-renderer.js";
4
+ import "./package-inspection-handler.js";
5
+ import "./terminal-error-chain.js";
6
+ //# sourceMappingURL=package-side-effects-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-side-effects-handler.js","sourceRoot":"","sources":["../../../../../source/command-line-interface/runner/package-side-effects-handler.ts"],"names":[],"mappings":"AAAA,OAAsB,YAAY,CAAC;AACnC,OAKO,uCAAoC,CAAC;AAE5C,OAEO,0EAA0E,CAAC;AAGlF,OAA4C,iCAAiC,CAAC;AAC9E,OAA0E,2BAA2B,CAAC"}
@@ -5,6 +5,7 @@ import "./command-parsing.js";
5
5
  import "./config-inspect-handler.js";
6
6
  import "./pack-handler.js";
7
7
  import "./package-dependencies-handler.js";
8
+ import "./package-side-effects-handler.js";
8
9
  import "./package-tree-handler.js";
9
10
  import "./preview-handler.js";
10
11
  import "./release-diff-handler.js";
@@ -1 +1 @@
1
- {"version":3,"file":"runner.js","sourceRoot":"","sources":["../../../../../source/command-line-interface/runner/runner.ts"],"names":[],"mappings":"AAAA,6GAA6G;AAC7G,OAWO,QAAQ,CAAC;AAOhB,OAAoC,wBAAwB,CAAC;AAC7D,OAAiC,sBAAsB,CAAC;AACxD,OAAwC,6BAA6B,CAAC;AACtE,OAA+B,mBAAmB,CAAC;AACnD,OAA8C,mCAAmC,CAAC;AAClF,OAAsC,2BAA2B,CAAC;AAClE,OAAkC,sBAAsB,CAAC;AACzD,OAAsC,2BAA2B,CAAC;AAElE,OAAkC,sBAAsB,CAAC;AACzD,OAA0C,sBAAsB,CAAC;AACjE,OAAkC,sBAAsB,CAAC;AAEzD,OAA6C,mCAAmC,CAAC;AACjF,OAA8D,2BAA2B,CAAC"}
1
+ {"version":3,"file":"runner.js","sourceRoot":"","sources":["../../../../../source/command-line-interface/runner/runner.ts"],"names":[],"mappings":"AAAA,6GAA6G;AAC7G,OAWO,QAAQ,CAAC;AAOhB,OAAoC,wBAAwB,CAAC;AAC7D,OAAiC,sBAAsB,CAAC;AACxD,OAAwC,6BAA6B,CAAC;AACtE,OAA+B,mBAAmB,CAAC;AACnD,OAA8C,mCAAmC,CAAC;AAClF,OAA6C,mCAAmC,CAAC;AACjF,OAAsC,2BAA2B,CAAC;AAClE,OAAkC,sBAAsB,CAAC;AACzD,OAAsC,2BAA2B,CAAC;AAElE,OAAkC,sBAAsB,CAAC;AACzD,OAA0C,sBAAsB,CAAC;AACjE,OAAkC,sBAAsB,CAAC;AAEzD,OAA6C,mCAAmC,CAAC;AACjF,OAA8D,2BAA2B,CAAC"}
package/package.json CHANGED
@@ -17,8 +17,8 @@
17
17
  "cmd-ts": "0.15.0",
18
18
  "diff": "9.0.0",
19
19
  "open": "11.0.1",
20
- "packtory": "0.0.92",
21
- "remeda": "2.43.0",
20
+ "packtory": "0.0.94",
21
+ "remeda": "2.45.0",
22
22
  "semver": "7.8.5",
23
23
  "true-myth": "9.4.0",
24
24
  "ts-pattern": "5.9.0",
@@ -59,5 +59,5 @@
59
59
  "./packages/command-line-interface/spinner-worker.entry-point.js"
60
60
  ],
61
61
  "type": "module",
62
- "version": "0.0.103"
62
+ "version": "0.0.105"
63
63
  }
package/readme.md CHANGED
@@ -21,6 +21,7 @@ packtory <command> [options]
21
21
  - **preview:** Runs a fresh dry-run build with report collection enabled and shows a human-oriented preview of the emitted package contents, file statuses, and changed-file diffs.
22
22
  - **tree:** Builds locally and prints one configured package's artifact tree without reading the registry or writing an artifact.
23
23
  - **inspect dependencies:** Builds locally and prints why one configured package emits final `dependencies` and `peerDependencies`.
24
+ - **inspect side-effects:** Builds locally and prints why one configured package emits, lists, or omits `package.json` `sideEffects`.
24
25
  - **release-diff:** Runs the same dry-run build as `preview` and shows, per package, the changes between the latest version currently published on the configured registry and the bundle the next run would publish.
25
26
  - **changelog:** Builds the next release plan, attributes merged GitHub pull requests to changed packages, and prints grouped Markdown changelog output.
26
27
  - **config inspect:** Validates `packtory.config.js` and prints a compact package-shape summary without building packages.
@@ -36,6 +37,7 @@ packtory <command> [options]
36
37
  - **preview --open:** Generates the same fresh preview report as `packtory preview`, writes a temporary HTML file, and opens it with the platform opener.
37
38
  - **tree &lt;package&gt;:** Selects which package from the configuration to inspect. The output includes package-relative paths, file kind, byte size, status, and artifact badges.
38
39
  - **inspect dependencies &lt;package&gt;:** Selects which package from the configuration to inspect. The output groups final manifest dependencies by `dependencies`, `peerDependencies`, and unresolved version state, then lists source import specifiers and emitted import specifiers for each dependency.
40
+ - **inspect side-effects &lt;package&gt;:** Selects which package from the configuration to inspect. The output shows the generated `sideEffects` decision and every impure runtime file with line-level side effect reasons.
39
41
  - **publish --report-json:** Writes `packtory-report.json`, the machine-readable `BuildReport`.
40
42
  - **publish --report-html:** Writes `packtory-report.html`, the rich HTML report used by `packtory preview --open`.
41
43
  - **publish --stage:** Uses npm staged publishing instead of a direct publish. Successful runs print the npm `stageId` per package. Approval still happens later via `npm stage approve <stage-id>` or npmjs.com. Stage mode is npm-only, and the package must already exist on npm.
@@ -79,6 +81,15 @@ packtory <command> [options]
79
81
  - An unknown `<package>` argument is reported as `package-not-found`.
80
82
  - `packtory inspect dependencies` exits with code `0` on a clean run and `1` on config errors, package failures, or an unknown package.
81
83
 
84
+ **Side effects inspect behavior:**
85
+
86
+ - `packtory inspect side-effects <package>` validates the local config, resolves and links all configured packages, and prints why the selected package's generated manifest would emit `"sideEffects": false`, emit a file list, or omit the field.
87
+ - It reports the analyzer's generated decision even when `additionalPackageJsonAttributes.sideEffects` overrides the generated value.
88
+ - Runtime side effects are shown by package path, repository-relative source path, line number, and analyzer reason.
89
+ - It does not read registry metadata, publish, write artifacts, run package checks, open HTML, or use a pager.
90
+ - An unknown `<package>` argument is reported as `package-not-found`.
91
+ - `packtory inspect side-effects` exits with code `0` on a clean run and `1` on config errors, package failures, or an unknown package.
92
+
82
93
  **Release-diff behavior:**
83
94
 
84
95
  ![packtory release-diff showing per-file hunks between the published latest and the next bundle](../../../documentation/release-diff-example.gif)
@@ -89,6 +100,7 @@ packtory <command> [options]
89
100
  - Packages that have never been published are rendered with a `[first publish]` chip and every bundled file in the **Added** group.
90
101
  - Packages whose new build is byte-equal to the published version are rendered as a single dim `no changes` line.
91
102
  - A package that fails earlier in the dry-run build appears in the document `Issues` section rather than as a per-package diff entry.
103
+ - A package whose selected target version already exists with different artifacts, or exists without being tagged `latest`, appears in `Issues` before publish can start.
92
104
  - Previewable runs are shown through `$PAGER` when possible, otherwise `less -R`, otherwise standard output. Failure-only runs go directly to standard output.
93
105
  - `packtory release-diff` exits with code `0` on a clean run and `1` on config errors, check failures, or partial failures.
94
106
  - `release-diff` is read-only: it never publishes and never writes to the registry. It is currently terminal-only; an HTML/`--open` variant and an `--against <version>` selector are not part of this release.
@@ -154,8 +166,8 @@ packtory <command> [options]
154
166
 
155
167
  **Preview vs release-diff:**
156
168
 
157
- - **What question does each answer?** `preview` answers _"what would the next publish actually bundle, and what did packtory's linker/DCE change about my source on the way?"_. `release-diff` answers _"what's in this release that wasn't in the previously published one?"_.
158
- - **What is each comparing?** Both run the same fresh dry-run build. `preview` diffs **source on disk** against the **linker/DCE-processed artifacts**. `release-diff` diffs the **latest tarball on the registry** against the **bundle that next run would publish**.
169
+ - **What question does each answer?** `preview` answers _"what would the next publish actually bundle, and what did packtory's linker and dead code elimination change about my source on the way?"_. `release-diff` answers _"what's in this release that wasn't in the previously published one?"_.
170
+ - **What is each comparing?** Both run the same fresh dry-run build. `preview` diffs **source on disk** against the **artifacts processed by the linker and dead code elimination**. `release-diff` diffs the **latest tarball on the registry** against the **bundle that next run would publish**.
159
171
  - A careful release flow runs both: `preview` to validate that the bundle is what you intended to build, `release-diff` to validate that the change set against the last release is what you intended to ship.
160
172
 
161
173
  **Report outputs:**
@@ -0,0 +1,2 @@
1
+ import "./terminal-preview-renderer-shared.js";
2
+ //# sourceMappingURL=terminal-package-side-effects-renderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"terminal-package-side-effects-renderer.js","sourceRoot":"","sources":["../../../../../source/report/terminal-renderer/terminal-package-side-effects-renderer.ts"],"names":[],"mappings":"AAMA,OAA0C,uCAAuC,CAAC"}
package/sbom.cdx.json CHANGED
@@ -9,16 +9,16 @@
9
9
  {
10
10
  "type": "application",
11
11
  "name": "packtory",
12
- "version": "0.0.98"
12
+ "version": "0.0.99"
13
13
  }
14
14
  ]
15
15
  },
16
16
  "component": {
17
17
  "type": "library",
18
18
  "name": "@packtory/cli",
19
- "version": "0.0.103",
20
- "bom-ref": "pkg:npm/@packtory/cli@0.0.103",
21
- "purl": "pkg:npm/@packtory/cli@0.0.103"
19
+ "version": "0.0.105",
20
+ "bom-ref": "pkg:npm/@packtory/cli@0.0.105",
21
+ "purl": "pkg:npm/@packtory/cli@0.0.105"
22
22
  }
23
23
  },
24
24
  "components": [
@@ -116,28 +116,28 @@
116
116
  {
117
117
  "type": "library",
118
118
  "name": "packtory",
119
- "version": "0.0.92",
120
- "bom-ref": "pkg:npm/packtory@0.0.92",
119
+ "version": "0.0.94",
120
+ "bom-ref": "pkg:npm/packtory@0.0.94",
121
121
  "scope": "required",
122
122
  "licenses": [
123
123
  {
124
124
  "expression": "MIT"
125
125
  }
126
126
  ],
127
- "purl": "pkg:npm/packtory@0.0.92"
127
+ "purl": "pkg:npm/packtory@0.0.94"
128
128
  },
129
129
  {
130
130
  "type": "library",
131
131
  "name": "remeda",
132
- "version": "2.43.0",
133
- "bom-ref": "pkg:npm/remeda@2.43.0",
132
+ "version": "2.45.0",
133
+ "bom-ref": "pkg:npm/remeda@2.45.0",
134
134
  "scope": "required",
135
135
  "licenses": [
136
136
  {
137
137
  "expression": "MIT"
138
138
  }
139
139
  ],
140
- "purl": "pkg:npm/remeda@2.43.0"
140
+ "purl": "pkg:npm/remeda@2.45.0"
141
141
  },
142
142
  {
143
143
  "type": "library",
@@ -216,7 +216,7 @@
216
216
  "ref": "pkg:npm/@octokit/plugin-rest-endpoint-methods@18.0.0"
217
217
  },
218
218
  {
219
- "ref": "pkg:npm/@packtory/cli@0.0.103",
219
+ "ref": "pkg:npm/@packtory/cli@0.0.105",
220
220
  "dependsOn": [
221
221
  "pkg:npm/@octokit/core@7.0.7",
222
222
  "pkg:npm/@octokit/plugin-paginate-rest@15.0.0",
@@ -225,8 +225,8 @@
225
225
  "pkg:npm/cmd-ts@0.15.0",
226
226
  "pkg:npm/diff@9.0.0",
227
227
  "pkg:npm/open@11.0.1",
228
- "pkg:npm/packtory@0.0.92",
229
- "pkg:npm/remeda@2.43.0",
228
+ "pkg:npm/packtory@0.0.94",
229
+ "pkg:npm/remeda@2.45.0",
230
230
  "pkg:npm/semver@7.8.5",
231
231
  "pkg:npm/true-myth@9.4.0",
232
232
  "pkg:npm/ts-pattern@5.9.0",
@@ -247,10 +247,10 @@
247
247
  "ref": "pkg:npm/open@11.0.1"
248
248
  },
249
249
  {
250
- "ref": "pkg:npm/packtory@0.0.92"
250
+ "ref": "pkg:npm/packtory@0.0.94"
251
251
  },
252
252
  {
253
- "ref": "pkg:npm/remeda@2.43.0"
253
+ "ref": "pkg:npm/remeda@2.45.0"
254
254
  },
255
255
  {
256
256
  "ref": "pkg:npm/semver@7.8.5"