Repository navigation
feat: add dprint install command - #1339
Merged
Merged
Conversation
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.
Adds
dprint install(and the equivalentdprint config install) for downloading and setting up plugins ahead of time instead of on first use.dprint installinstalls the plugins in the configuration file. The config file is found the same way as fordprint add(including the global config fallback andDPRINT_CONFIG_DISCOVERY).dprint install -ginstalls the plugins in the global configuration file.dprint install <plugin>...acts likedprint add <plugin>...(same flags) and then installs everything in the configuration file.dprint install --recursivealso installs the plugins of the configuration files in descendant directories.This is groundwork for eventually no longer automatically installing process plugins in the language server.
Notes
--recursivethe plugins are only resolved (downloaded, verified, compiled/extracted into the cache) and never started, so process plugins aren't spawned.--recursivereuses the same resolution asdprint fmtto find descendant config files, so it skips config files in gitignored or excluded directories and stops at the first config that fails to resolve.--pluginsis rejected for this sub command, since it would override the plugins being installed.--checksum,--no-version,--package-json,--minimum-dependency-age) require a plugin to be provided.Known gaps for the LSP follow-up
"inherit": truedoesn't inherit in the CLI (only descendant configs do), while the LSP always inherits from the ancestor config, sodprint installin such a directory doesn't install the inherited plugins.--recursiveskips.dprint installwould need to be run again.