Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.22 #272

Merged
merged 7 commits into from
Nov 8, 2023
Merged

v0.22 #272

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,54 @@
- [Rust](https://github.com/moonrepo/rust-plugin/blob/master/CHANGELOG.md)
- [TOML schema](https://github.com/moonrepo/schema-plugin/blob/master/CHANGELOG.md)

## Unreleased

#### 🚀 Updates

- Refactored and standardized how executables (bins and shims) are managed.
- Binaries (`~/.proto/bin`) and shims (`~/.proto/shims`) now share the same internal data structures.
- For the most part, is a 1:1 relation. There will be a shim for every binary, and vice versa.
- Reduced the amount of WASM calls to locate executables to 1 call.
- Removed the concept of local shims (was a hidden implementation detail).
- Reworked the `proto bin` command.
- By default returns an absolute path to the real executable (`~/.proto/tools/<tool>/<version>/bin`).
- Pass `--bin` to return the `~/.proto/bin` path.
- Pass `--shim` to return the `~/.proto/shims` path.
- Updated `proto clean --purge` and `proto uninstall` to accurately delete all executables.
- Updated `proto uninstall` to support removing the tool entirely (simply omit the version).
- Updated internet connection checks to only check during critical workflows.
- Will no longer happen if we have a fully-qualified version (primarily for `proto run`).
- Will still happen for partial versions, as we need to resolve to a fully-qualified.
- Will always happen for install, upgrade, and other flows that must download files.
- TOML API
- Added `install.no_bin` and `install.no_shim` fields.
- WASM API
- Added `locate_executables` function.
- Added `LocateExecutablesInput`, `LocateExecutablesOutput`, `ExecutableConfig` structs.
- Deprecated `locate_bins` and `create_shims` functions.
- Deprecated `LocateBinsInput`, `LocateBinsOutput`, `CreateShimsInput`, `CreateShimsOutput`, `ShimConfig` structs.

#### 🐞 Fixes

- Fixed an issue where config files in the user home directory were not loaded.

#### 🧩 Plugins

- Updated `bun_plugin` to v0.5.
- Updated `deno_plugin` to v0.5.
- Updated `go_plugin` to v0.5.
- Updated `node_plugin` and `node_depman_plugin` to v0.5.
- Updated `python_plugin` to v0.2.
- Updated `rust_plugin` to v0.4.
- Updated `schema_plugin` (TOML) to v0.5.
- **Node**
- Updated the `npm` tool to create the `npx` shim instead of the `node` tool.
- Updated symlinked binaries to use the shell scripts instead of the source `.js` files (when applicable).

#### ⚙️ Internal

- Plugin versions are now pinned and tied to proto releases to avoid unintended drift and API changes.

## 0.21.1

#### 🐞 Fixes
Expand Down
60 changes: 30 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 5 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ members = ["crates/*"]
default-members = ["crates/cli"]

[workspace.dependencies]
cached = "0.46.0"
cached = "0.46.1"
clap = "4.4.7"
clap_complete = "4.4.4"
convert_case = "0.6.0"
Expand All @@ -14,17 +14,14 @@ human-sort = "0.2.2"
miette = "5.10.0"
once_cell = "1.18.0"
once_map = "0.4.10"
regex = { version = "1.10.2", default-features = false, features = [
"std",
"unicode-perl",
] }
regex = { version = "1.10.2", default-features = false, features = ["std"] }
reqwest = { version = "0.11.22", default-features = false }
schematic = { version = "0.12.7", default-features = false, features = [
"schema",
] }
semver = "1.0.20"
serde = { version = "1.0.190", features = ["derive"] }
serde_json = "1.0.107"
serde = { version = "1.0.192", features = ["derive"] }
serde_json = "1.0.108"
sha2 = "0.10.8"
starbase = "0.2.9"
starbase_archive = { version = "0.2.4", features = [
Expand All @@ -37,7 +34,7 @@ starbase_archive = { version = "0.2.4", features = [
starbase_events = "0.2.2"
starbase_sandbox = { version = "0.1.12" }
starbase_styles = "0.1.16"
starbase_utils = { version = "0.3.6", default-features = false, features = [
starbase_utils = { version = "0.3.7", default-features = false, features = [
"json",
"toml",
] }
Expand Down
7 changes: 4 additions & 3 deletions crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ name = "proto"
path = "src/main.rs"

[dependencies]
proto_core = { version = "0.21.2", path = "../core" }
proto_pdk_api = { version = "0.9.0", path = "../pdk-api" }
system_env = { version = "0.1.2", path = "../system-env" }
proto_core = { version = "0.22.3", path = "../core" }
proto_pdk_api = { version = "0.10.2", path = "../pdk-api" }
system_env = { version = "0.1.4", path = "../system-env" }
chrono = "0.4.31"
clap = { workspace = true, features = ["derive", "env"] }
clap_complete = { workspace = true }
Expand All @@ -43,6 +43,7 @@ miette = { workspace = true }
reqwest = { workspace = true, features = ["rustls-tls-native-roots", "stream"] }
semver = { workspace = true }
serde = { workspace = true }
shell-words = "1.1.0"
starbase = { workspace = true }
starbase_archive = { workspace = true }
starbase_styles = { workspace = true }
Expand Down
8 changes: 4 additions & 4 deletions crates/cli/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ pub enum Commands {

#[command(
name = "bin",
about = "Display the absolute path to a tools binary.",
long_about = "Display the absolute path to a tools binary. If no version is provided,\nit will detected from the current environment."
about = "Display the absolute path to a tools executable.",
long_about = "Display the absolute path to a tools executable. If no version is provided,\nit will be detected from the current environment."
)]
Bin(BinArgs),

Expand Down Expand Up @@ -144,7 +144,7 @@ pub enum Commands {
alias = "lsg",
name = "list-global",
about = "List installed globals.",
long_about = "List installed globals by scanning the global bins installation directory. Will return the canonical source path."
long_about = "List installed globals by scanning the global packages installation directory. Will return the canonical source path."
)]
ListGlobal(ListGlobalArgs),

Expand Down Expand Up @@ -191,7 +191,7 @@ pub enum Commands {
alias = "r",
name = "run",
about = "Run a tool after detecting a version from the environment.",
long_about = "Run a tool after detecting a version from the environment. In order of priority,\na version will be resolved from a provided CLI argument, a PROTO_VERSION environment variable,\na local version file (.prototools), and lastly a global version file (~/.proto/tools/version).\n\nIf no version can be found, the program will exit with an error."
long_about = "Run a tool after detecting a version from the environment. In order of priority,\na version will be resolved from a provided CLI argument, a PROTO_VERSION environment variable,\na local version file (.prototools), and lastly a global version file (~/.proto/tools).\n\nIf no version can be found, the program will exit with an error."
)]
Run(RunArgs),

Expand Down
Loading