Use forceActual: true when resolving dependency tree #638
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 introduces a new end-to-end (E2E) test suite for handling optional dependencies in npm projects, specifically to verify that the
generate-license-filetool works correctly when optional dependencies are omitted from installation. Additionally, it upgrades the@npmcli/arboristdependency and adds a minor performance log to the CLI. The changes are grouped below by theme:E2E Testing for Optional Dependencies:
e2e/optional-dependencieswith configuration files (README.md,jest.config.js,package.json,tsconfig.json) and a test verifying license file generation when optional dependencies are omitted. [1] [2] [3] [4] [5] [6]src/packages/generate-license-file-e2e/optional-dependencies/project.jsonto automate E2E testing with omitted optional dependencies. [1] [2]Dependency Management:
@npmcli/arboristfrom version 9.0.0 to 9.1.1 in bothsrc/package.jsonandsrc/package-lock.jsonto ensure compatibility and bug fixes. [1] [2] [3]CLI Improvements:
main.ts, displaying the time taken to generate the license file. [1] [2]Internal Dependency Resolution:
resolveNpmDependencies.tsto usearborist.loadActual({ forceActual: true }), ensuring the actual dependency tree is loaded even if optional dependencies are omitted.