Skip to content

fix!: call executePackageManagerRequest directly - #430

Merged
merceyz merged 3 commits into
nodejs:mainfrom
merceyz:merceyz/perf/call-executePackageManagerRequest-directly
Apr 20, 2024
Merged

fix!: call executePackageManagerRequest directly#430
merceyz merged 3 commits into
nodejs:mainfrom
merceyz:merceyz/perf/call-executePackageManagerRequest-directly

Conversation

@merceyz

@merceyzmerceyz commented Mar 15, 2024

Copy link
Copy Markdown
Member

Calling executePackageManagerRequest directly instead of through Clipanion lets Node.js handle printing errors which results in the cause property being printed correctly.

Ref #458 and others like it.
Ref #425 (comment)

Depends on

Performance is roughly the same

$ hyperfine -w 5 "node ./dist-before/yarn.js -v""node ./dist-after/yarn.js -v"Benchmark 1: node ./dist-before/yarn.js -v Time (mean ± σ): 188.0 ms ± 9.9 ms [User: 204.5 ms, System: 22.3 ms] Range (min … max): 179.0 ms … 222.1 ms 16 runsBenchmark 2: node ./dist-after/yarn.js -v Time (mean ± σ): 186.5 ms ± 7.8 ms [User: 202.5 ms, System: 22.4 ms] Range (min … max): 178.1 ms … 204.9 ms 16 runsSummary node ./dist-after/yarn.js -v ran 1.01 ± 0.07 times faster than node ./dist-before/yarn.js -v

BREAKING CHANGE:
Some errors are now printed to stderr instead of stdout

Comment threadtests/main.test.ts Outdated
Comment threadtests/main.test.ts Outdated
Comment threadtests/main.test.ts Outdated
@merceyz
merceyzforce-pushed the merceyz/perf/call-executePackageManagerRequest-directly branch from d1b5d0b to 0a0359eCompareMarch 15, 2024 22:16
@merceyz
merceyzforce-pushed the merceyz/perf/call-executePackageManagerRequest-directly branch from 0a0359e to ab77bb5CompareApril 20, 2024 12:48
merceyzand others added 2 commits April 20, 2024 14:50
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
@merceyz
merceyzforce-pushed the merceyz/perf/call-executePackageManagerRequest-directly branch from ab77bb5 to 6e62f29CompareApril 20, 2024 12:51
@merceyzmerceyz changed the title perf!: call executePackageManagerRequest directlyfix!: call executePackageManagerRequest directlyApr 20, 2024
@merceyz
merceyz marked this pull request as ready for review April 20, 2024 12:54
@merceyz
merceyzforce-pushed the merceyz/perf/call-executePackageManagerRequest-directly branch from dfddf92 to a82e453CompareApril 20, 2024 13:21
@merceyz
merceyz merged commit 0f9b748 into nodejs:mainApr 20, 2024
@merceyz
merceyz deleted the merceyz/perf/call-executePackageManagerRequest-directly branch April 20, 2024 17:33
@github-actionsgithub-actionsBot mentioned this pull request Apr 20, 2024
@merceyzmerceyz mentioned this pull request Apr 20, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@merceyz@aduh95