diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e6a61ab..c4e0e34 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,16 +1,16 @@ name: Rust on: push: - branches: [master, main, diesel-2] + branches: [main, diesel-2] pull_request: - branches: [master, main, diesel-2] + branches: [main, diesel-2] env: CARGO_TERM_COLOR: always jobs: test: strategy: matrix: - rust_version: [1.52.1, stable, beta] + rust_version: [1.56.0, stable, beta] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 103384d..9de5410 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,20 @@ +# Unreleased + +# 1.0.2 + +* Update syn to 2.0, bump MSRV to 1.56 + +# 1.0.1 + +* Update syn/quote/proc-macro2 dependencies to 1.x + +# 1.0.0 + +* Remove non-dev dependency on `diesel` -- `diesel-derive-newtype` generates generic diesel code. + If a future release of Diesel breaks compatibility with `diesel-derive-newtype` an explicit + dependency on the correct version span will be added and a new release will be made. +* CI improvements. + # 0.1.1 Bugs Fixed: diff --git a/Cargo.toml b/Cargo.toml index a04766c..a500680 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,11 +9,16 @@ keywords = ["newtype", "derive"] license = "Apache-2.0/MIT" readme = "README.md" repository = "https://github.com/quodlibetor/diesel-derive-newtype" +# Inherited MSRV of `syn`. +rust-version = "1.56" [dependencies] -proc-macro2 = "0.4" -quote = "0.6" -syn = "0.14" +proc-macro2 = "1.0.51" +syn = "2.0.10" +quote = "1.0.23" + +[badges] +maintenance = { status = "passively-maintained" } [dev-dependencies] diesel = {version = "2.0.0-rc.0", features = ["sqlite"]} diff --git a/README.md b/README.md index d7ce6d4..7bf16da 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,27 @@ Easy-peasy support of newtypes inside of Diesel. [![Rust](https://github.com/quodlibetor/diesel-derive-newtype/actions/workflows/test.yml/badge.svg?branch=diesel-2)](https://github.com/quodlibetor/diesel-derive-newtype/actions/workflows/test.yml) [![Crates.io Version](https://img.shields.io/crates/v/diesel-derive-newtype.svg)](https://crates.io/crates/diesel-derive-newtype) +## Installation + +diesel-derive-newtype supports Diesel according to its major version -- 0.x +through 1.x support the corresponding diesel versions, 2.x supports diesel 2.x. + +So for Diesel 1.x: + +```toml +[dependencies] +diesel-derive-newtype = "1.0" +``` + +And for Diesel 2.x: + +```toml +[dependencies] +diesel-derive-newtype = "2.0.0-rc.0" +``` + +Note: this crate requires Rust 1.56 due to the dependency on syn 2.x. + ## `#[derive(DieselNewType)]` This crate exposes a single custom-derive macro `DieselNewType` which diff --git a/README.tpl b/README.tpl index 9fe2287..108a7c8 100644 --- a/README.tpl +++ b/README.tpl @@ -4,18 +4,27 @@ Easy-peasy support of newtypes inside of Diesel. [![Rust](https://github.com/quodlibetor/diesel-derive-newtype/actions/workflows/test.yml/badge.svg?branch=diesel-2)](https://github.com/quodlibetor/diesel-derive-newtype/actions/workflows/test.yml) [![Crates.io Version](https://img.shields.io/crates/v/diesel-derive-newtype.svg)](https://crates.io/crates/diesel-derive-newtype) -{{readme}} - ## Installation diesel-derive-newtype supports Diesel according to its major version -- 0.x through 1.x support the corresponding diesel versions, 2.x supports diesel 2.x. +So for Diesel 1.x: + +```toml +[dependencies] +diesel-derive-newtype = "1.0" +``` + +And for Diesel 2.x: + ```toml [dependencies] -diesel-derive-newtype = "2.0" +diesel-derive-newtype = "2.0.0-rc.0" ``` +{{readme}} + ## License diesel-derive-newtype is licensed under either of