Skip to content

Commit

Permalink
Merge pull request #25 from sd2k/diesel-2
Browse files Browse the repository at this point in the history
Merge main into diesel-2
  • Loading branch information
quodlibetor committed Apr 1, 2023
2 parents b5d837b + e583d0c commit 053b521
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .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
Expand Down
17 changes: 17 additions & 0 deletions 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:
Expand Down
11 changes: 8 additions & 3 deletions Cargo.toml
Expand Up @@ -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"]}
Expand Down
21 changes: 21 additions & 0 deletions README.md
Expand Up @@ -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
Expand Down
15 changes: 12 additions & 3 deletions README.tpl
Expand Up @@ -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
Expand Down

0 comments on commit 053b521

Please sign in to comment.