Skip to content

Commit

Permalink
Merge pull request #62 from kitlangton/new-module-structure
Browse files Browse the repository at this point in the history
New module structure
  • Loading branch information
kitlangton authored Jun 1, 2024
2 parents 29dd519 + 3852593 commit 1fd2893
Show file tree
Hide file tree
Showing 26 changed files with 57 additions and 45 deletions.
32 changes: 18 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
A friendly newtype library for Scala 3.

```scala
"io.github.kitlangton" %% "neotype" % "0.2.19"
"io.github.kitlangton" %% "neotype" % "0.3.0"
```

## Features
Expand Down Expand Up @@ -62,19 +62,23 @@ Error: /src/main/scala/examples/Main.scala:9:16

## Integrations

Neotype integrates with the following libraries.

- zio-test `DeriveGen`
- zio-json
- zio-config
- zio-schema
- play-json
- tapir
- quill
- circe
- jsoniter
- chimney
- caliban
Neotype integrates with the following libraries:

- **JSON**
- [zio-json](https://github.com/zio/zio-json)
- [play-json](https://github.com/playframework/play-json)
- [jsoniter](https://github.com/plokhotnyuk/jsoniter-scala)
- [circe](https://github.com/circe/circe)
- **DATABASE**
- [doobie](https://github.com/tpolecat/doobie)
- [quill](https://github.com/zio/zio-quill)
- **MISCELLANEOUS**
- [zio-test](https://github.com/zio/zio) `DeriveGen`
- [zio-config](https://github.com/zio/zio-config)
- [zio-schema](https://github.com/zio/zio-schema)
- [tapir](https://github.com/softwaremill/tapir)
- [chimney](https://github.com/outr/chimney)
- [caliban](https://github.com/ghostdogpr/caliban)

### ZIO Json Example

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package neotype.caliban
package neotype.interop.caliban

import _root_.caliban.CalibanError.ExecutionError
import caliban.schema.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package neotype.caliban
package neotype.interop.caliban

import caliban.Value.IntValue
import caliban.Value.StringValue
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package neotype.chimney
package neotype.interop.chimney

import io.scalaland.chimney.*
import io.scalaland.chimney.partial.syntax.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package neotype.chimney
package neotype.interop.chimney

import io.scalaland.chimney.dsl.*
import neotype.Newtype
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package neotype.circe
package neotype.interop.circe

import io.circe.*
import neotype.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package neotype.circe
package neotype.interop.circe

import io.circe.*
import io.circe.parser.*
import neotype.Newtype
import neotype.Subtype
import neotype.interop.circe.given_Decoder_B
import neotype.test.definitions.*
import zio.test.*

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package neotype.doobie
package neotype.interop.doobie

import cats.Show
import cats.implicits.*
import doobie.*
import neotype.*

import scala.collection.mutable.ArrayBuffer
import scala.reflect.ClassTag

/////////////
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package neotype.doobie
package neotype.interop.doobie

import _root_.doobie.*
import _root_.doobie.implicits.*
Expand All @@ -9,6 +9,10 @@ import cats.effect.IO
import cats.effect.unsafe.implicits.global
import neotype.Newtype
import neotype.Subtype
import neotype.interop.doobie.newtypeArrayGet
import neotype.interop.doobie.newtypeGet
import neotype.interop.doobie.subtypeArrayGet
import neotype.interop.doobie.subtypeGet
import neotype.test.definitions.*
import zio.*
import zio.test.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package neotype.jsoniter
package neotype.interop.jsoniter

import com.github.plokhotnyuk.jsoniter_scala.core.JsonReader
import com.github.plokhotnyuk.jsoniter_scala.core.JsonValueCodec
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package neotype.jsoniter
package neotype.interop.jsoniter

import com.github.plokhotnyuk.jsoniter_scala.core.JsonValueCodec
import com.github.plokhotnyuk.jsoniter_scala.core.readFromString
import com.github.plokhotnyuk.jsoniter_scala.macros.CodecMakerConfig
import com.github.plokhotnyuk.jsoniter_scala.macros.ConfiguredJsonValueCodec
import com.github.plokhotnyuk.jsoniter_scala.macros.JsonCodecMaker
import neotype.*
import neotype.jsoniter.given
import neotype.test.definitions.*
import zio.*
import zio.test.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package neotype.playjson
package neotype.interop.playjson

import neotype.*
import play.api.libs.json.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package neotype.playjson
package neotype.interop.playjson

import neotype.interop.playjson.newtypeFormat
import neotype.interop.playjson.simpleNewtypeFormat
import neotype.interop.playjson.simpleSubtypeFormat
import neotype.interop.playjson.subtypeFormat
import neotype.test.*
import neotype.test.definitions.*
import play.api.libs.json.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package neotype.tapir
package neotype.interop.tapir

import neotype.*
import sttp.tapir.Codec
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package neotype.tapir
package neotype.interop.tapir

import neotype.Newtype
import neotype.Subtype
import neotype.interop.tapir.given_Codec_L_B_CF
import neotype.interop.tapir.given_Pickler_B
import neotype.interop.tapir.given_Schema_B
import neotype.test.definitions.*
import sttp.tapir.Codec
import sttp.tapir.DecodeResult
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package neotype.zioconfig
package neotype.interop.zioconfig

import neotype.*
import zio.Chunk
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package neotype.zioconfig
package neotype.interop.zioconfig

import neotype.*
import neotype.test.definitions.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package neotype.ziojson
package neotype.interop.ziojson

import neotype.*
import zio.json.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package neotype.ziojson
package neotype.interop.ziojson

import neotype.*
import neotype.interop.ziojson.given_JsonCodec_B
import neotype.test.*
import neotype.test.definitions.*
import zio.json.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package neotype.ziojson
package neotype.interop.ziojson

import neotype.*
import zio.json.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package neotype.zioquill
package neotype.interop.quill

import io.getquill
import io.getquill.MappedEncoding
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package neotype.zioquill
package neotype.interop.quill

import io.getquill.*
import neotype.Newtype
import neotype.Subtype
import neotype.test.definitions.*
import zio.test.*

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package neotype.zioschema
package neotype.interop.zioschema

import neotype.Newtype
import neotype.Subtype
import neotype.interop.zioschema.given_Schema_B
import neotype.test.definitions.*
import zio.*
import zio.json.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package neotype.zioschema
package neotype.interop.zioschema

import neotype.*
import zio.schema.Schema
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package neotype.ziotest
package neotype.interop.ziotest

import _root_.zio.test.*
import neotype.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package neotype.ziotest
package neotype.interop.ziotest

import neotype.Newtype
import neotype.Subtype
import neotype.test.definitions.*
import zio.*
import zio.test.*
Expand Down

0 comments on commit 1fd2893

Please sign in to comment.