diff --git a/CHANGELOG.md b/CHANGELOG.md index d16c8fd4b..fd6b3d90d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,30 @@ # Changelog -## Unreleased +## v0.12.0 + +This release have been primarily about cleanups and simplification. + +Please update: + +* `loco-rs` +* `loco-cli` + +Changes: + +* **generators (BREAKING)**: all prefixes in starters (e.g. `/api`) are now _local to each controller_, and generators will be prefix-aware (`--api` generator will add an `/api` prefix to controllers) [https://github.com/loco-rs/loco/pull/818](https://github.com/loco-rs/loco/pull/818) + +To migrate, please move prefixes from `app.rs` to each controller you use in `controllers/`, for example in `notes` controller: + +```rust +Routes::new() + .prefix("api/notes") + .add("/", get(list)) +``` + +* **starters**: removed `.devcontainer` which can now be found in [loco-devcontainer](https://github.com/loco-rs/loco-devcontainer) +* **starters**: removed example `notes` scaffold (model, controllers, etc), and unified `user` and `auth` into a single file: `auth.rs` +* **generators**: `scaffold` generator will now generate a CRUD with `PUT` and `PATCH` semantics for updating an entity [https://github.com/loco-rs/loco/issues/896](https://github.com/loco-rs/loco/issues/896) +* **cleanup**: `loco-extras` was moved out of the repo, but we've incorporated `MultiDB` and `ExtraDB` from `extras` into `loco-rs` [https://github.com/loco-rs/loco/pull/917](https://github.com/loco-rs/loco/pull/917) * `cargo loco doctor` now checks for minimal required SeaORM CLI version * **BREAKING** Improved migration generator. If you have an existing migration project, add the following comment indicator to the top of the `vec` statement and right below the opening bracked like so in `migration/src/lib.rs`: diff --git a/Cargo.toml b/Cargo.toml index a80d6d8ff..243fea6ac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ license = "Apache-2.0" [package] name = "loco-rs" -version = "0.11.2" +version = "0.12.0" description = "The one-person framework for Rust" homepage = "https://loco.rs/" documentation = "https://docs.rs/loco-rs" @@ -39,7 +39,7 @@ bg_redis = ["dep:rusty-sidekiq", "dep:bb8"] bg_pg = ["dep:sqlx", "dep:ulid"] [dependencies] -loco-gen = { version = "0.11.2", path = "./loco-gen" } +loco-gen = { version = "0.12.0", path = "./loco-gen" } backtrace_printer = { version = "1.3.0" } # cli diff --git a/loco-cli/Cargo.toml b/loco-cli/Cargo.toml index d1f380fb7..8c4d6ec04 100644 --- a/loco-cli/Cargo.toml +++ b/loco-cli/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "loco-cli" -version = "0.2.10" +version = "0.12.0" edition = "2021" description = "loco cli website generator" license = "Apache-2.0" diff --git a/loco-gen/Cargo.toml b/loco-gen/Cargo.toml index 9b2426596..07038d80a 100644 --- a/loco-gen/Cargo.toml +++ b/loco-gen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "loco-gen" -version = "0.11.2" +version = "0.12.0" description = "Loco generators" license.workspace = true edition.workspace = true diff --git a/starters/lightweight-service/Cargo.lock b/starters/lightweight-service/Cargo.lock index 91c8ec006..b8e74c8c4 100644 --- a/starters/lightweight-service/Cargo.lock +++ b/starters/lightweight-service/Cargo.lock @@ -1387,7 +1387,7 @@ dependencies = [ [[package]] name = "loco-gen" -version = "0.11.2" +version = "0.12.0" dependencies = [ "chrono", "clap", @@ -1404,7 +1404,7 @@ dependencies = [ [[package]] name = "loco-rs" -version = "0.11.2" +version = "0.12.0" dependencies = [ "argon2", "async-trait", diff --git a/starters/lightweight-service/Cargo.toml b/starters/lightweight-service/Cargo.toml index 8aeda8607..0bf777207 100644 --- a/starters/lightweight-service/Cargo.toml +++ b/starters/lightweight-service/Cargo.toml @@ -11,7 +11,7 @@ default-run = "loco_starter_template-cli" [dependencies] -loco-rs = { version = "0.11.2", default-features = false, features = ["cli"] } +loco-rs = { version = "0.12.0", default-features = false, features = ["cli"] } serde = "1" serde_json = "1" tokio = { version = "1.33.0", default-features = false, features = [ @@ -35,7 +35,7 @@ required-features = [] [dev-dependencies] serial_test = "3.1.1" rstest = "0.21.0" -loco-rs = { version = "0.11.2", default-features = false, features = [ +loco-rs = { version = "0.12.0", default-features = false, features = [ "testing", "cli", ] } diff --git a/starters/rest-api/Cargo.lock b/starters/rest-api/Cargo.lock index 6c707ae89..90bc181ef 100644 --- a/starters/rest-api/Cargo.lock +++ b/starters/rest-api/Cargo.lock @@ -2130,7 +2130,7 @@ dependencies = [ [[package]] name = "loco-gen" -version = "0.11.2" +version = "0.12.0" dependencies = [ "chrono", "clap", @@ -2147,7 +2147,7 @@ dependencies = [ [[package]] name = "loco-rs" -version = "0.11.2" +version = "0.12.0" dependencies = [ "argon2", "async-trait", diff --git a/starters/rest-api/Cargo.toml b/starters/rest-api/Cargo.toml index 90c85642c..efcec573f 100644 --- a/starters/rest-api/Cargo.toml +++ b/starters/rest-api/Cargo.toml @@ -11,7 +11,7 @@ default-run = "loco_starter_template-cli" [dependencies] -loco-rs = { version = "0.11.2" } +loco-rs = { version = "0.12.0" } migration = { path = "migration" } serde = { version = "1", features = ["derive"] } @@ -46,5 +46,5 @@ required-features = [] [dev-dependencies] serial_test = "3.1.1" rstest = "0.21.0" -loco-rs = { version = "0.11.2", features = ["testing"] } +loco-rs = { version = "0.12.0", features = ["testing"] } insta = { version = "1.34.0", features = ["redactions", "yaml", "filters"] } diff --git a/starters/rest-api/migration/Cargo.toml b/starters/rest-api/migration/Cargo.toml index 0f66cff2f..01ed5e185 100644 --- a/starters/rest-api/migration/Cargo.toml +++ b/starters/rest-api/migration/Cargo.toml @@ -10,7 +10,7 @@ path = "src/lib.rs" [dependencies] async-std = { version = "1", features = ["attributes", "tokio1"] } -loco-rs = { version = "0.11.2" } +loco-rs = { version = "0.12.0" } [dependencies.sea-orm-migration] version = "1.1.0" diff --git a/starters/saas/Cargo.lock b/starters/saas/Cargo.lock index 643425bc1..03d228410 100644 --- a/starters/saas/Cargo.lock +++ b/starters/saas/Cargo.lock @@ -2265,7 +2265,7 @@ dependencies = [ [[package]] name = "loco-gen" -version = "0.11.2" +version = "0.12.0" dependencies = [ "chrono", "clap", @@ -2282,7 +2282,7 @@ dependencies = [ [[package]] name = "loco-rs" -version = "0.11.2" +version = "0.12.0" dependencies = [ "argon2", "async-trait", diff --git a/starters/saas/Cargo.toml b/starters/saas/Cargo.toml index 2c30e891e..44910d272 100644 --- a/starters/saas/Cargo.toml +++ b/starters/saas/Cargo.toml @@ -11,7 +11,7 @@ default-run = "loco_starter_template-cli" [dependencies] -loco-rs = { version = "0.11.2" } +loco-rs = { version = "0.12.0" } migration = { path = "migration" } serde = { version = "1", features = ["derive"] } @@ -51,5 +51,5 @@ required-features = [] [dev-dependencies] serial_test = "3.1.1" rstest = "0.21.0" -loco-rs = { version = "0.11.2", features = ["testing"] } +loco-rs = { version = "0.12.0", features = ["testing"] } insta = { version = "1.34.0", features = ["redactions", "yaml", "filters"] } diff --git a/starters/saas/migration/Cargo.toml b/starters/saas/migration/Cargo.toml index 0f66cff2f..01ed5e185 100644 --- a/starters/saas/migration/Cargo.toml +++ b/starters/saas/migration/Cargo.toml @@ -10,7 +10,7 @@ path = "src/lib.rs" [dependencies] async-std = { version = "1", features = ["attributes", "tokio1"] } -loco-rs = { version = "0.11.2" } +loco-rs = { version = "0.12.0" } [dependencies.sea-orm-migration] version = "1.1.0"