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.24 #317

Merged
merged 7 commits into from
Dec 6, 2023
Merged

v0.24 #317

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
7 changes: 7 additions & 0 deletions .prototools
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
[plugins]
moon-test = "source:https://raw.githubusercontent.com/moonrepo/moon/master/proto-plugin.toml"
wasm-test = "source:./plugins/target/wasm32-wasi/debug/proto_wasm_test.wasm"

# [tools.wasm-test]
# number = 123
# string = "foo"
# boolean = true
# list = ["a", "b", "c"]
# map = { "a" = 123 }
53 changes: 53 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,59 @@
- [Rust](https://github.com/moonrepo/rust-plugin/blob/master/CHANGELOG.md)
- [TOML schema](https://github.com/moonrepo/schema-plugin/blob/master/CHANGELOG.md)

## Unreleased

#### 💥 Breaking

> To ease the migration process, we've added a new migrate command. Simply run `proto migrate v0.24` after upgrading proto!

- Standardized configuration files.
- Merged `~/.proto/config.toml` functionality into `.prototools` under a new `[settings]` table. This means settings like `auto-clean` can be defined anywhere now.
- Removed `~/.proto/config.toml`. Use `~/.proto/.prototools` instead, which is now the new global config (via `--global` arg).
- Moved `node-intercept-globals` setting to `tools.node.intercept-globals`.
- Reworked user configured aliases and default/global version.
- Moved values to `.prototools` (user managed) from `~/.proto/tools/<name>/manifest.json` (internally managed).
- Aliases are now stored in the `[tools.<name>]`, while the default version is at the root.
```toml
node = "20.10.0"
[tools.node.aliases]
work = "^18"
```
- Updated `proto alias` and `proto unalias` to longer write to the global config by default. Now requires a `--global` flag.
- This change was made to align with `proto pin`, `proto tool add`, and `proto tool remove`.

#### 🚀 Updates

- Added a `proto migrate v0.24` command for migrating configs. We'll also log a warning if we detect the old configuration.
- For some scenarios, we'll attempt to auto-migrate under the hood when applicable.
- Added support for defining configuration that can be passed to WASM plugins.
- Can be added to `.prototools` under a `[tools.<name>]` table.
- Moved Node.js specific settings into this new format.
```toml
[tools.node]
bundled-npm = false
intercept-globals = false
```
- Updated non-latest plugins to be cached for 30 days, instead of forever.
- Updated cleaning to also remove old proto versions from `~/.proto/tools/proto`.
- WASM API
- Added a `get_tool_config` function. Can be typed with a serde compatible struct.
- Deprecated the `get_proto_user_config` function.

#### 🐞 Fixes

- Fixed an issue where resolving canary versions wouldn't work correctly.

#### 🧩 Plugins

- Updated `bun_plugin` to v0.6.
- Updated `deno_plugin` to v0.6.
- Updated `go_plugin` to v0.6.
- Updated `node_plugin` and `node_depman_plugin` to v0.6.
- Updated `python_plugin` to v0.4.
- Updated `rust_plugin` to v0.5.
- Updated `schema_plugin` (TOML) to v0.6.

## 0.23.8

#### 🚀 Updates
Expand Down
110 changes: 94 additions & 16 deletions Cargo.lock

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

4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ once_cell = "1.18.0"
once_map = "0.4.13"
regex = { version = "1.10.2", default-features = false, features = ["std"] }
reqwest = { version = "0.11.22", default-features = false }
schematic = { version = "0.12.8", default-features = false, features = [
"schema",
] }
schematic = { version = "0.12.10", default-features = false }
semver = "1.0.20"
serde = { version = "1.0.193", features = ["derive"] }
serde_json = "1.0.108"
Expand Down
6 changes: 3 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.23.7", path = "../core" }
proto_pdk_api = { version = "0.10.4", path = "../pdk-api" }
system_env = { version = "0.1.6", path = "../system-env" }
proto_core = { version = "0.24.0", path = "../core" }
proto_pdk_api = { version = "0.11.1", path = "../pdk-api" }
system_env = { version = "0.1.7", path = "../system-env" }
chrono = "0.4.31"
clap = { workspace = true, features = ["derive", "env"] }
clap_complete = { 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 @@ -85,7 +85,7 @@ pub enum Commands {
alias = "ap",
name = "add-plugin",
about = "Add a plugin.",
long_about = "Add a plugin to the local .prototools config, or global ~/.proto/config.toml config.",
long_about = "Add a plugin to the local .prototools config, or global ~/.proto/.prototools config.",
hide = true
)]
AddPlugin(AddToolArgs),
Expand Down Expand Up @@ -188,7 +188,7 @@ pub enum Commands {
alias = "rp",
name = "remove-plugin",
about = "Remove a plugin.",
long_about = "Remove a plugin from the local .prototools config, or global ~/.proto/config.toml config.",
long_about = "Remove a plugin from the local .prototools config, or global ~/.proto/.prototools config.",
hide = true
)]
RemovePlugin(RemoveToolArgs),
Expand Down Expand Up @@ -255,7 +255,7 @@ pub enum ToolCommands {
#[command(
name = "add",
about = "Add a tool plugin.",
long_about = "Add a plugin to the local .prototools config, or global ~/.proto/config.toml config."
long_about = "Add a plugin to the local .prototools config, or global ~/.proto/.prototools config."
)]
Add(AddToolArgs),

Expand All @@ -278,7 +278,7 @@ pub enum ToolCommands {
#[command(
name = "remove",
about = "Remove a tool plugin.",
long_about = "Remove a plugin from the local .prototools config, or global ~/.proto/config.toml config."
long_about = "Remove a plugin from the local .prototools config, or global ~/.proto/.prototools config."
)]
Remove(RemoveToolArgs),
}
Loading
Loading