Skip to content

Commit

Permalink
scalafix
Browse files Browse the repository at this point in the history
  • Loading branch information
rpiaggio committed Dec 23, 2024
1 parent 42c0675 commit d9e6902
Show file tree
Hide file tree
Showing 16 changed files with 59 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@

package japgolly.webapputil.binary

import cats.Eq
import japgolly.webapputil.general.ErrorMsg

import java.io.OutputStream
import java.lang.{StringBuilder => JStringBuilder}
import java.lang.StringBuilder as JStringBuilder
import java.nio.ByteBuffer
import java.nio.charset.StandardCharsets
import java.util.{Arrays, Base64}
import java.util.Arrays
import java.util.Base64
import scala.collection.immutable.ArraySeq
import cats.Eq

object BinaryData extends BinaryData_PlatformSpecific_Object {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ package japgolly.webapputil.binary
// **********

import org.scalajs.dom.Blob

import scala.scalajs.js
import scala.scalajs.js.JSConverters._
import scala.scalajs.js.typedarray.{ArrayBuffer, Uint8Array}
import scala.scalajs.js.JSConverters.*
import scala.scalajs.js.typedarray.ArrayBuffer
import scala.scalajs.js.typedarray.Uint8Array

trait BinaryData_PlatformSpecific_Object { self: BinaryData.type =>

Expand Down
11 changes: 7 additions & 4 deletions workers/src/main/scala/japgolly/webapputil/binary/BinaryJs.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@

package japgolly.webapputil.binary

import org.scalajs.dom.Blob
import org.scalajs.dom.FileReader
import org.scalajs.dom.window

import java.nio.ByteBuffer
import org.scalajs.dom.{Blob, FileReader, window}
import scala.scalajs.js
import scala.scalajs.js.JSConverters._
import scala.scalajs.js.typedarray.TypedArrayBufferOps._
import scala.scalajs.js.typedarray._
import scala.scalajs.js.JSConverters.*
import scala.scalajs.js.typedarray.*
import scala.scalajs.js.typedarray.TypedArrayBufferOps.*

object BinaryJs extends BinaryJs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@

package japgolly.webapputil.boopickle

import boopickle.{PickleImpl, Pickler, UnpickleImpl}
import boopickle.PickleImpl
import boopickle.Pickler
import boopickle.UnpickleImpl
import japgolly.scalajs.react.callback.AsyncCallback
import japgolly.webapputil.binary._
import japgolly.webapputil.binary.*

import java.nio.ByteBuffer
import scala.scalajs.js

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,19 @@
package japgolly.webapputil.boopickle

import boopickle.Decoder
import boopickle.DefaultBasic._
import boopickle.DefaultBasic.*
import cats.Eq
import cats.data.Ior
// import japgolly.microlibs.nonempty._
// import japgolly.microlibs.recursion._
// import japgolly.microlibs.stdlib_ext.StdlibExt._
// import japgolly.microlibs.utils.SafeBool
// import japgolly.univeq.UnivEq
import cats.data.NonEmptySet
import cats.data.NonEmptyVector
import japgolly.webapputil.binary.BinaryData
import japgolly.webapputil.general.ErrorMsg

import java.nio.ByteBuffer
import java.time.Instant
import scala.collection.immutable.ArraySeq
import scala.reflect.ClassTag
import cats.Eq
import cats.data.NonEmptyVector
import cats.data.NonEmptySet
import scala.collection.immutable.SortedSet
import scala.reflect.ClassTag

object PicklerUtil {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@

package japgolly.webapputil.boopickle

import boopickle.PickleState
import boopickle.Pickler
import boopickle.UnpickleState
import cats.syntax.eq.*
import boopickle.{PickleState, Pickler, UnpickleState}
import japgolly.webapputil.binary.BinaryData
import japgolly.webapputil.general.Version
import japgolly.webapputil.general.Version.ordering.mkOrderingOps

import scala.annotation.elidable
import scala.util.control.NonFatal

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

package japgolly.webapputil.boopickle

import boopickle.{PickleState, UnpickleState}
import boopickle.PickleState
import boopickle.UnpickleState
import japgolly.webapputil.general.Version

object SafePicklerUtil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package japgolly.webapputil.general

import cats.Eq
import cats.syntax.option.*

import scala.collection.mutable

final case class Version(major: Version.Major, minor: Version.Minor) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
package japgolly.webapputil.indexeddb

import cats.kernel.Eq
import japgolly.scalajs.react._
import japgolly.scalajs.react.util.Util.{identity => identityFn}
import japgolly.webapputil.indexeddb.TxnMode._
import org.scalajs.dom._
import japgolly.scalajs.react.*
import japgolly.scalajs.react.util.Util.identity as identityFn
import japgolly.webapputil.indexeddb.TxnMode.*
import org.scalajs.dom.*

import scala.annotation.elidable
import scala.scalajs.js
import scala.util.{Failure, Success, Try}
import scala.util.Failure
import scala.util.Success
import scala.util.Try

final class IndexedDb(raw: IDBFactory) {
import IndexedDb._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
package japgolly.webapputil.indexeddb

import japgolly.scalajs.react.CallbackTo

import java.util.UUID
import scala.reflect.ClassTag
import scala.scalajs.js
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@

package japgolly.webapputil.indexeddb

import japgolly.scalajs.react.{AsyncCallback, CallbackTo}
import org.scalajs.dom.IDBValue
import cats.Eq
import japgolly.scalajs.react.AsyncCallback
import japgolly.scalajs.react.CallbackTo
import org.scalajs.dom.IDBValue

sealed trait ObjectStoreDef[K, V] {
val name: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package japgolly.webapputil.indexeddb

import cats.Monad
import japgolly.webapputil.indexeddb.TxnMode._
import japgolly.webapputil.indexeddb.TxnMode.*

/**
* Embedded language for safely working with(in) an IndexedDB transaction.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
package japgolly.webapputil.indexeddb

import cats.Traverse
import japgolly.scalajs.react._
import japgolly.scalajs.react.util.Util.{identity => identityFn}
import japgolly.scalajs.react.*
import japgolly.scalajs.react.util.Util.identity as identityFn
import japgolly.webapputil.indexeddb.IndexedDb.ObjectStore
import japgolly.webapputil.indexeddb.TxnMode._
import japgolly.webapputil.indexeddb.TxnMode.*

import scala.collection.BuildFrom

sealed abstract class TxnDsl[M <: TxnMode] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

package japgolly.webapputil.indexeddb

import japgolly.scalajs.react._
import japgolly.scalajs.react.*
import japgolly.webapputil.indexeddb.IndexedDb.ObjectStore
import org.scalajs.dom._
import org.scalajs.dom.*

/**
* Embedded language for safely working with(in) an IndexedDB transaction.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@

package japgolly.webapputil.indexeddb

import japgolly.scalajs.react.{AsyncCallback, CallbackTo}
import japgolly.webapputil.binary._
import java.util.UUID
import japgolly.scalajs.react.AsyncCallback
import japgolly.scalajs.react.CallbackTo
import japgolly.webapputil.binary.*
import org.scalajs.dom.IDBValue

import java.util.UUID
import scala.reflect.ClassTag
import scala.scalajs.js
import scala.scalajs.js.typedarray.ArrayBuffer
Expand Down
2 changes: 1 addition & 1 deletion workers/src/main/scala/workers/CacheIDBStores.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import explore.model.boopickle.CatalogPicklers.given
import japgolly.scalajs.react.callback.*
import japgolly.webapputil.binary.*
import japgolly.webapputil.boopickle.*
import japgolly.webapputil.boopickle.BinaryFormatExt.Implicits.*
import japgolly.webapputil.indexeddb.*
import japgolly.webapputil.indexeddb.IndexedDb.DatabaseName
import lucuma.ags.GuideStarCandidate
import japgolly.webapputil.boopickle.BinaryFormatExt.Implicits.*

import scala.annotation.nowarn
import scala.scalajs.js
Expand Down

0 comments on commit d9e6902

Please sign in to comment.