-
-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deps(proto): Upgrade to v0.23. (#1186)
* First pass. * Update commands. * Add blog post. * Update dep. * Bump.
- Loading branch information
Showing
31 changed files
with
373 additions
and
225 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
releases: | ||
"@moonrepo/cli": patch | ||
"@moonrepo/core-linux-arm64-gnu": patch | ||
"@moonrepo/core-linux-arm64-musl": patch | ||
"@moonrepo/core-linux-x64-gnu": patch | ||
"@moonrepo/core-linux-x64-musl": patch | ||
"@moonrepo/core-macos-arm64": patch | ||
"@moonrepo/core-macos-x64": patch | ||
"@moonrepo/core-windows-x64-msvc": patch |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
--- | ||
slug: proto-v0.23 | ||
title: proto v0.23 - New detection strategy, tool commands, and more | ||
authors: [milesj] | ||
tags: [proto] | ||
image: ./img/proto/v0.23.png | ||
--- | ||
|
||
With this release, we've reorganized our commands, improved version detection, and Windows support. | ||
|
||
<!--truncate--> | ||
|
||
## New `detect-strategy` setting | ||
|
||
Up until now, when proto would attempt to detect a version, it would use a version from the closest | ||
`.prototools` file, or tool specific file (`package.json`, `.nvmrc`, etc), which ever matched first. | ||
For the most part, this works great, but what if you wanted `.prototools` to take precedence over | ||
other files, even if found in a higher parent directory? You unfortunately couldn't. | ||
|
||
To support this new flow, we're introducing a new | ||
[`~/.proto/config.toml`](/docs/proto/config#user-configuration) setting called | ||
[`detect-strategy`](/docs/proto/config#detect-strategy). This setting supports the following values, | ||
with more possibly in the future! | ||
|
||
- `first-available` (default) - Will use the first available version that is found. Either from | ||
`.prototools` or a tool specific file. | ||
- `prefer-prototools` - Prefer a `.prototools` version, even if found in a parent directory. If none | ||
found, falls back to tool specific file. | ||
|
||
```toml title="~/.proto/config.toml" | ||
detect-strategy = "prefer-prototools" | ||
``` | ||
|
||
## New `proto tool` command group (breaking) | ||
|
||
Our CLI surface area has been growing and we felt it was time to start grouping commands, starting | ||
with the new [`proto tool`](/docs/proto/commands/tool) command. This command will contain "not used | ||
very often" subcommands in relation to tools and their plugins, primarily for managing plugins, and | ||
viewing tool information and inventory. As such, we've deprecated and moved the following top-level | ||
commands: | ||
|
||
- Moved `proto add-plugin` to `proto tool add`. | ||
- Moved `proto remove-plugin` to `proto tool remove`. | ||
- Moved `proto plugins` to `proto tool list-plugins`. | ||
- Moved `proto tools` to `proto tool list`. | ||
|
||
## New `proto tool info` command | ||
|
||
Continuing with the changes above, we're also introducing a new command, | ||
[`proto tool info`](/docs/proto/commands/tool/info), which displays detailed information about a | ||
tool and its backing plugin. For example: | ||
|
||
``` | ||
$ proto tool info node | ||
|
||
node - Node.js | ||
|
||
Inventory | ||
Store: ~/.proto/tools/node | ||
Executable: ~/.proto/tools/node/20.0.0/bin/node | ||
Globals directory: ~/.proto/tools/node/globals/bin | ||
Binaries: | ||
- ~/.proto/bin/node (primary) | ||
Shims: | ||
- ~/.proto/shims/node (primary) | ||
|
||
Plugin | ||
Version: 0.5.2 | ||
Source: https://github.com/moonrepo/node-plugin/releases/download/v0.5.2/node_plugin.wasm | ||
``` | ||
|
||
> This command also supports JSON output via `--json`. | ||
|
||
## Other changes | ||
|
||
View the [official release](https://github.com/moonrepo/proto/releases/tag/v0.23.0) for a full list | ||
of changes. | ||
|
||
- Added support to plugins to ignore certain paths when detecting a version. | ||
- Updated Windows to create 3 shim files for each tool: `.cmd` (cmd.exe), `.ps1` (powershell), and | ||
no extension (bash). |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
title: tool add | ||
sidebar_label: add | ||
--- | ||
|
||
import VersionLabel from '@site/src/components/Docs/VersionLabel'; | ||
|
||
<VersionLabel version="0.23.0" header /> | ||
|
||
The `proto tool add <id> <plugin>` command (formerly `proto add-plugin`) will add the provided ID | ||
and plugin locator string to the `[plugins]` section of the local (`.prototools`) or global | ||
(`~/.proto/config.toml`) config file. | ||
|
||
```shell | ||
$ proto tool add node "source:https://github.com/moonrepo/node-plugin/releases/latest/download/node_plugin.wasm" | ||
``` | ||
|
||
> Learn more about [plugin locator strings](../../plugins#enabling-plugins). | ||
### Arguments | ||
|
||
- `<id>` - ID of the tool. | ||
- `<plugin>` - How to locate the plugin. | ||
|
||
### Options | ||
|
||
- `--global` - Add to the global config instead of local. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
title: tool info | ||
sidebar_label: info | ||
--- | ||
|
||
import VersionLabel from '@site/src/components/Docs/VersionLabel'; | ||
|
||
<VersionLabel version="0.23.0" header /> | ||
|
||
The `proto tool info <id>` command will display information about a tool and its plugin. | ||
|
||
``` | ||
$ proto tool info node | ||
node - Node.js | ||
Inventory | ||
Store: ~/.proto/tools/node | ||
Executable: ~/.proto/tools/node/20.0.0/bin/node | ||
Globals directory: ~/.proto/tools/node/globals/bin | ||
Binaries: | ||
- ~/.proto/bin/node (primary) | ||
Shims: | ||
- ~/.proto/shims/node (primary) | ||
Plugin | ||
Version: 0.5.2 | ||
Source: https://github.com/moonrepo/node-plugin/releases/download/v0.5.2/node_plugin.wasm | ||
``` | ||
|
||
### Arguments | ||
|
||
- `<id>` - ID of tool. | ||
|
||
### Options | ||
|
||
- `--json` - Print the info in JSON format. |
12 changes: 7 additions & 5 deletions
12
website/docs/proto/commands/plugins.mdx → ...docs/proto/commands/tool/list-plugins.mdx
This file contains 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
Oops, something went wrong.