fix: package-manager and pnpm support fixes #5265
Merged
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 PR contains multiple fixes for package-manager issues and pnpm particularly:
fix: pnpm support should work on macOS and Linux
Currently we are unable to build applications on macOS and Linux when pnpm is set as package manager. The problem seems to be caused by the way pnpm produces files in node_modules and the way webpack expects them. However, the issue is resolved in case we do not pass
--preserve-symlinks
option to Node.js when starting the webpack process. According to docs (https://pnpm.js.org/en/faq) the preserve-symlinks does not work very well and pnpm does not require it.So, to resolve the issue, skip the
--preserve-symlinks
option when pnpm is used. To achieve this, introduce a new method in the packageManager that returns the package manager used for the current process.Fixes issue #5259
fix: CLI should print help of commands with dash in the name
When trying to print the help of a default hierarchical command, CLI expects the format of the command name to be
<letters>|*<something else>
. However, some commands have dash in the name, liketns package-manager get
. Fix the expectation of the help service.Fixes issue #5264
fix: help of package-manager commands does not list pnpm
The markdown files of package-manager commands does not list pnpm as supported value. Add it where is required and add help file for package-manager command (without passig get to it).
Fixes issue #5263
fix: register package-manager get as default hierarchical command
Register the package-manager get as default hierarchical command, so when you write
tns package-manager
we'll print the currently selected package-manager.Fixes issue #5262
fix: print information message when package-manager is set
Currently when calling
tns package-manager set <valid value>
you do not see any output or information if the operation is successful. Add such message and clean the code from hardcoded strings.Fixes issues #5260 #5261
PR Checklist
What is the current behavior?
What is the new behavior?
Fixes/Implements/Closes #[Issue Number].