test(tests): add lifecycle, symlink, watch tests + benchmarks #30
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.
This pull request adds comprehensive benchmarking support to the project, enabling easy performance comparisons between
lnpmand competing tools (such asyalcandrelative-deps). It introduces new benchmark targets in theMakefile, a script for automated comparison, and a suite of Go benchmarks for core operations. The documentation is updated to include benchmark results and instructions. Additionally, new test helpers and fixtures are provided to facilitate testing of packages with custom scripts and lockfile scenarios.Benchmarking and Comparison Features
bench,bench-mem, andbench-comparetargets to theMakefilefor running Go benchmarks, memory allocation stats, and tool comparisons, respectively.scripts/benchmark-compare.sh, a Bash script that automates benchmarking oflnpm,yalc, andrelative-depsfor publish/add/push operations, reporting average times for each.tests/bench_test.goto measure performance oflnpmoperations and compare againstyalcandrelative-deps.Documentation Updates
README.mdwith a new Benchmarks section, including performance tables, detailed results, and instructions for running benchmarks locally.Makefilehelp output to include descriptions of the new benchmark targets.Test Infrastructure Improvements
tests/helpers_test.gofor creating test packages with custom scripts, asserting presence/absence of scripts, and waiting for sync events, improving test coverage for script and watch functionality.(References: [1] [2] [3] [4] [5] [6] [7] [8]