Conversation
Draft
zkochan
added a commit
to Saturate/pacquet
that referenced
this pull request
May 7, 2026
Match upstream's NDJSON wire format for the build phase so @pnpm/cli.default-reporter parses pacquet's lifecycle output the same way it parses pnpm's. - Add `LogEvent::Lifecycle(LifecycleLog)` with the three upstream message shapes (Script, Stdio, Exit) as a `#[serde(untagged)]` union, mirroring `core/core-loggers/src/lifecycleLogger.ts`. - Add `LogEvent::IgnoredScripts(IgnoredScriptsLog)` carrying `packageNames` (camelCase), mirroring `ignoredScriptsLogger.ts`. - `pacquet-executor` depends on `pacquet-reporter`. `run_postinstall_hooks` / `run_lifecycle_hook` are now generic over `R: Reporter`. The hook switches from `Stdio::inherit()` to `Stdio::piped()` and reads each stream on its own thread, emitting one `Stdio` event per line. A `Script` event fires before spawn, `Exit` fires after wait — same ordering as `runLifecycleHook.ts:102/165`. - `BuildModules::run::<R>` collects sorted (peer-stripped) keys of packages that hit the "not in allowBuilds" branch and returns them as `Vec<String>`. Explicit `false` is silently skipped, matching upstream's switch in `building/during-install/src/index.ts:88-101`. - `InstallFrozenLockfile::run` emits one `pnpm:ignored-scripts` event with the returned list (always, even when empty) — mirrors the unconditional emit at `installing/deps-installer/src/install/index.ts:414`. Tests: - Wire-shape tests for both new variants pin the JSON output. - Recording-fake tests for `run_postinstall_hooks` cover Script→Stdio→Exit ordering and non-zero exit propagation. - Recording-fake tests for `BuildModules::run` cover the ignored-builds return value (sorted, peer-stripped, excludes explicit-deny). - Updated `install_emits_pnpm_event_sequence` to expect the new `IgnoredScripts` event between `Stats` and `ImportingDone`. Addresses items pnpm#6 and pnpm#8 from pnpm#397. Upstream refs at `pnpm/pnpm@80037699fb`: - core/core-loggers/src/lifecycleLogger.ts - core/core-loggers/src/ignoredScriptsLogger.ts - exec/lifecycle/src/runLifecycleHook.ts - building/during-install/src/index.ts - installing/deps-installer/src/install/index.ts
zkochan
added a commit
to Saturate/pacquet
that referenced
this pull request
May 7, 2026
Match upstream's NDJSON wire format for the build phase so @pnpm/cli.default-reporter parses pacquet's lifecycle output the same way it parses pnpm's. - Add `LogEvent::Lifecycle(LifecycleLog)` with the three upstream message shapes (Script, Stdio, Exit) as a `#[serde(untagged)]` union, mirroring `core/core-loggers/src/lifecycleLogger.ts`. - Add `LogEvent::IgnoredScripts(IgnoredScriptsLog)` carrying `packageNames` (camelCase), mirroring `ignoredScriptsLogger.ts`. - `pacquet-executor` depends on `pacquet-reporter`. `run_postinstall_hooks` / `run_lifecycle_hook` are now generic over `R: Reporter`. The hook switches from `Stdio::inherit()` to `Stdio::piped()` and reads each stream on its own thread, emitting one `Stdio` event per line. A `Script` event fires before spawn, `Exit` fires after wait — same ordering as `runLifecycleHook.ts:102/165`. - `BuildModules::run::<R>` collects sorted (peer-stripped) keys of packages that hit the "not in allowBuilds" branch and returns them as `Vec<String>`. Explicit `false` is silently skipped, matching upstream's switch in `building/during-install/src/index.ts:88-101`. - `InstallFrozenLockfile::run` emits one `pnpm:ignored-scripts` event with the returned list (always, even when empty) — mirrors the unconditional emit at `installing/deps-installer/src/install/index.ts:414`. Tests: - Wire-shape tests for both new variants pin the JSON output. - Recording-fake tests for `run_postinstall_hooks` cover Script→Stdio→Exit ordering and non-zero exit propagation. - Recording-fake tests for `BuildModules::run` cover the ignored-builds return value (sorted, peer-stripped, excludes explicit-deny). - Updated `install_emits_pnpm_event_sequence` to expect the new `IgnoredScripts` event between `Stats` and `ImportingDone`. Addresses items pnpm#6 and pnpm#8 from pnpm#397. Upstream refs at `pnpm/pnpm@80037699fb`: - core/core-loggers/src/lifecycleLogger.ts - core/core-loggers/src/ignoredScriptsLogger.ts - exec/lifecycle/src/runLifecycleHook.ts - building/during-install/src/index.ts - installing/deps-installer/src/install/index.ts
zkochan
added a commit
to Saturate/pacquet
that referenced
this pull request
May 7, 2026
Match upstream's NDJSON wire format for the build phase so @pnpm/cli.default-reporter parses pacquet's lifecycle output the same way it parses pnpm's. - Add `LogEvent::Lifecycle(LifecycleLog)` with the three upstream message shapes (Script, Stdio, Exit) as a `#[serde(untagged)]` union, mirroring `core/core-loggers/src/lifecycleLogger.ts`. - Add `LogEvent::IgnoredScripts(IgnoredScriptsLog)` carrying `packageNames` (camelCase), mirroring `ignoredScriptsLogger.ts`. - `pacquet-executor` depends on `pacquet-reporter`. `run_postinstall_hooks` / `run_lifecycle_hook` are now generic over `R: Reporter`. The hook switches from `Stdio::inherit()` to `Stdio::piped()` and reads each stream on its own thread, emitting one `Stdio` event per line. A `Script` event fires before spawn, `Exit` fires after wait — same ordering as `runLifecycleHook.ts:102/165`. - `BuildModules::run::<R>` collects sorted (peer-stripped) keys of packages that hit the "not in allowBuilds" branch and returns them as `Vec<String>`. Explicit `false` is silently skipped, matching upstream's switch in `building/during-install/src/index.ts:88-101`. - `InstallFrozenLockfile::run` emits one `pnpm:ignored-scripts` event with the returned list (always, even when empty) — mirrors the unconditional emit at `installing/deps-installer/src/install/index.ts:414`. Tests: - Wire-shape tests for both new variants pin the JSON output. - Recording-fake tests for `run_postinstall_hooks` cover Script→Stdio→Exit ordering and non-zero exit propagation. - Recording-fake tests for `BuildModules::run` cover the ignored-builds return value (sorted, peer-stripped, excludes explicit-deny). - Updated `install_emits_pnpm_event_sequence` to expect the new `IgnoredScripts` event between `Stats` and `ImportingDone`. Addresses items pnpm#6 and pnpm#8 from pnpm#397. Upstream refs at `pnpm/pnpm@80037699fb`: - core/core-loggers/src/lifecycleLogger.ts - core/core-loggers/src/ignoredScriptsLogger.ts - exec/lifecycle/src/runLifecycleHook.ts - building/during-install/src/index.ts - installing/deps-installer/src/install/index.ts
zkochan
added a commit
to Saturate/pacquet
that referenced
this pull request
May 9, 2026
Match upstream's NDJSON wire format for the build phase so @pnpm/cli.default-reporter parses pacquet's lifecycle output the same way it parses pnpm's. - Add `LogEvent::Lifecycle(LifecycleLog)` with the three upstream message shapes (Script, Stdio, Exit) as a `#[serde(untagged)]` union, mirroring `core/core-loggers/src/lifecycleLogger.ts`. - Add `LogEvent::IgnoredScripts(IgnoredScriptsLog)` carrying `packageNames` (camelCase), mirroring `ignoredScriptsLogger.ts`. - `pacquet-executor` depends on `pacquet-reporter`. `run_postinstall_hooks` / `run_lifecycle_hook` are now generic over `R: Reporter`. The hook switches from `Stdio::inherit()` to `Stdio::piped()` and reads each stream on its own thread, emitting one `Stdio` event per line. A `Script` event fires before spawn, `Exit` fires after wait — same ordering as `runLifecycleHook.ts:102/165`. - `BuildModules::run::<R>` collects sorted (peer-stripped) keys of packages that hit the "not in allowBuilds" branch and returns them as `Vec<String>`. Explicit `false` is silently skipped, matching upstream's switch in `building/during-install/src/index.ts:88-101`. - `InstallFrozenLockfile::run` emits one `pnpm:ignored-scripts` event with the returned list (always, even when empty) — mirrors the unconditional emit at `installing/deps-installer/src/install/index.ts:414`. Tests: - Wire-shape tests for both new variants pin the JSON output. - Recording-fake tests for `run_postinstall_hooks` cover Script→Stdio→Exit ordering and non-zero exit propagation. - Recording-fake tests for `BuildModules::run` cover the ignored-builds return value (sorted, peer-stripped, excludes explicit-deny). - Updated `install_emits_pnpm_event_sequence` to expect the new `IgnoredScripts` event between `Stats` and `ImportingDone`. Addresses items pnpm#6 and pnpm#8 from pnpm#397. Upstream refs at `pnpm/pnpm@80037699fb`: - core/core-loggers/src/lifecycleLogger.ts - core/core-loggers/src/ignoredScriptsLogger.ts - exec/lifecycle/src/runLifecycleHook.ts - building/during-install/src/index.ts - installing/deps-installer/src/install/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, package.json serializer removed unknown attributes. We now use a serde_json::Value to define the value and store the reference to it.