Skip to content

Commit 80535f4

Browse files
committed
Cache .zoneId. Update dependencies.
1 parent e14f9e9 commit 80535f4

File tree

13 files changed

+215
-23
lines changed

13 files changed

+215
-23
lines changed

.gitignore

Lines changed: 198 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,34 @@
1+
# Compiled class files
12
*.class
3+
4+
# Log files
25
*.log
36

7+
# BlueJ files
8+
*.ctxt
9+
10+
# Mobile Tools for Java (J2ME)
11+
.mtj.tmp/
12+
13+
# Package Files
14+
*.jar
15+
*.war
16+
*.nar
17+
*.ear
18+
*.zip
19+
*.tar.gz
20+
*.rar
21+
22+
# Virtual machine crash logs
23+
hs_err_pid*
24+
replay_pid*
25+
26+
# Scala specific
27+
*.scala
28+
!src/**/*.scala
29+
!test/**/*.scala
30+
!examples/**/*.scala
31+
432
# sbt specific
533
.cache
634
.history
@@ -11,6 +39,175 @@ lib_managed/
1139
src_managed/
1240
project/boot/
1341
project/plugins/project/
42+
project/target/
43+
project/project/
44+
project/.bloop/
45+
project/.metals/
46+
project/.bsp/
47+
48+
# Metals (Scala Language Server)
49+
.metals/
50+
.bloop/
51+
.bsp/
52+
53+
# Mill
54+
out/
55+
.mill-version
56+
57+
# Coursier
58+
.coursier/
59+
60+
# Ammonite
61+
.ammonite/
62+
63+
# Ensime
64+
.ensime_cache/
65+
.ensime
66+
67+
# Scala IDE
68+
.scala_dependencies
69+
.worksheet
70+
71+
# IntelliJ IDEA
72+
.idea/
73+
*.iml
74+
*.ipr
75+
*.iws
76+
out/
77+
78+
# Eclipse
79+
.apt_generated
80+
.classpath
81+
.factorypath
82+
.project
83+
.settings
84+
.springBeans
85+
.sts4-cache
86+
87+
# NetBeans
88+
/nbproject/private/
89+
/nbbuild/
90+
/dist/
91+
/nbdist/
92+
/.nb-gradle/
93+
build/
94+
!**/src/main/**/build/
95+
!**/src/test/**/build/
96+
97+
# VS Code
98+
.vscode/
99+
*.code-workspace
100+
101+
# Vim
102+
*.swp
103+
*.swo
104+
*~
105+
106+
# Emacs
107+
*~
108+
\#*\#
109+
/.emacs.desktop
110+
/.emacs.desktop.lock
111+
*.elc
112+
auto-save-list
113+
tramp
114+
.\#*
115+
116+
# macOS
14117
.DS_Store
118+
.AppleDouble
119+
.LSOverride
120+
Icon
121+
._*
122+
.DocumentRevisions-V100
123+
.fseventsd
124+
.Spotlight-V100
125+
.TemporaryItems
126+
.Trashes
127+
.VolumeIcon.icns
128+
.com.apple.timemachine.donotpresent
129+
.AppleDB
130+
.AppleDesktop
131+
Network Trash Folder
132+
Temporary Items
133+
.apdisk
134+
135+
# Windows
136+
Thumbs.db
137+
Thumbs.db:encryptable
138+
ehthumbs.db
139+
ehthumbs_vista.db
140+
*.tmp
141+
*.temp
142+
Desktop.ini
143+
$RECYCLE.BIN/
144+
*.cab
145+
*.msi
146+
*.msix
147+
*.msm
148+
*.msp
149+
*.lnk
150+
151+
# Linux
152+
*~
153+
.fuse_hidden*
154+
.directory
155+
.Trash-*
156+
.nfs*
157+
158+
# Node.js (for Scala.js projects)
159+
node_modules/
160+
npm-debug.log*
161+
yarn-debug.log*
162+
yarn-error.log*
163+
.npm
164+
.eslintcache
165+
.node_repl_history
166+
*.tgz
167+
.yarn-integrity
168+
169+
# Coverage reports
170+
coverage/
171+
*.coverage
172+
*.lcov
173+
coverage.xml
174+
jacoco.xml
175+
176+
# Test reports
177+
test-reports/
178+
TEST-*.xml
179+
180+
# Temporary files
181+
*.tmp
182+
*.temp
183+
*.bak
184+
*.backup
185+
*.orig
186+
*.rej
187+
188+
# Environment files
189+
.env
190+
.env.local
191+
.env.development.local
192+
.env.test.local
193+
.env.production.local
194+
195+
# Local configuration
196+
application.local.conf
197+
application.local.properties
198+
*.local
199+
200+
# Database
201+
*.db
202+
*.sqlite
203+
*.sqlite3
204+
205+
# Documentation build
206+
docs/_build/
207+
site/
15208

16-
.idea
209+
# OS generated files
210+
.DS_Store?
211+
ehthumbs.db
212+
Icon?
213+
Thumbs.db

build.sbt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import sbtcrossproject.CrossPlugin.autoImport.crossProject
33

44
lazy val buildSettings = Seq(
55
organization := "ru.pavkin",
6-
scalaVersion := "2.13.10"
6+
scalaVersion := "2.13.16"
77
)
88

99
lazy val compilerOptions = Seq(
@@ -17,15 +17,15 @@ lazy val compilerOptions = Seq(
1717
"-Ywarn-dead-code"
1818
)
1919

20-
lazy val catsVersion = "2.9.0"
20+
lazy val catsVersion = "2.13.0"
2121
lazy val simulacrumVersion = "1.0.1"
22-
lazy val scalaJSJavaTimeVersion = "2.5.0"
23-
lazy val disciplineVersion = "1.5.1"
24-
lazy val disciplineScalatestVersion = "2.2.0"
22+
lazy val scalaJSJavaTimeVersion = "2.6.0"
23+
lazy val disciplineVersion = "1.7.0"
24+
lazy val disciplineScalatestVersion = "2.3.0"
2525
lazy val scalaCheckDateTimeVersion = "0.7.0"
26-
lazy val scalaCheckVersion = "1.17.0"
27-
lazy val scalaTestVersion = "3.2.15"
28-
lazy val scalaCollectionCompatVersion = "2.9.0"
26+
lazy val scalaCheckVersion = "1.18.1"
27+
lazy val scalaTestVersion = "3.2.19"
28+
lazy val scalaCollectionCompatVersion = "2.13.0"
2929

3030
lazy val momentFacadeVersion = "0.10.9"
3131

@@ -40,7 +40,7 @@ lazy val baseSettings = macroAnnotationOption ++ Seq(
4040
Test / testOptions += Tests.Argument("-oF"),
4141
Compile / console / scalacOptions := compilerOptions,
4242
Compile / test / scalacOptions := compilerOptions,
43-
resolvers ++= Resolver.sonatypeOssRepos("releases"),
43+
resolvers += Resolver.sonatypeCentralSnapshots,
4444

4545
libraryDependencies ++= List("org.typelevel" %%% "simulacrum" % simulacrumVersion)
4646
)

core/jvm/src/main/scala/dtc/syntax/timeZone.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import dtc.TimeZoneId
1010
object timeZone {
1111

1212
implicit final class TimeZoneIdOps(val timeZone: TimeZoneId) {
13-
final def zoneId: ZoneId = ZoneId.of(timeZone.id)
13+
val zoneId: ZoneId = ZoneId.of(timeZone.id)
1414
}
1515

1616
implicit final class JVMZoneIdOps(val zoneId: ZoneId) extends AnyVal {

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version = 1.8.2
1+
sbt.version = 1.11.3

project/plugins.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ resolvers ++= Seq(
33
Classpaths.sbtPluginReleases,
44
"jgit-repo" at "https://download.eclipse.org/jgit/maven"
55
)
6-
val scalaJSVersion = "1.13.1"
6+
val scalaJSVersion = "1.19.0"
77

88
addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)
99

tests/js/src/test/scala/dtc/tests/DTCSuiteJS.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ trait DTCSuiteJS extends DTCSuite {
2323

2424
val genTimeZone: Gen[TimeZoneId] = Gen.oneOf(availableZoneIds).map(TimeZoneId(_))
2525

26-
implicit val arbTimeZone = Arbitrary(genTimeZone)
26+
implicit val arbTimeZone: Arbitrary[TimeZoneId] = Arbitrary(genTimeZone)
2727

2828
val overflowSafePairGen: Gen[(LocalDate, LocalTime, Duration)] = for {
2929
date <- Gen.choose(-daysLimit / 2, daysLimit / 2).map(anchorDate.plusDays)

tests/js/src/test/scala/dtc/tests/JSDateTests.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package dtc.tests
22

33
import java.time.{LocalDate, LocalTime}
44

5-
import cats.instances.option._
65
import cats.kernel.laws.discipline.OrderTests
76
import dtc.instances.jsDate._
87
import dtc.js.JSDate

tests/js/src/test/scala/dtc/tests/MomentLocalDateTimeTests.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@ package dtc.tests
22

33
import java.time.{LocalDate, LocalTime}
44

5-
import cats.instances.option._
65
import cats.kernel.laws.discipline.OrderTests
76
import dtc.instances.moment._
87
import dtc.js.MomentLocalDateTime
98
import dtc.laws.{DateTimeTests, LocalDateTimeTests, ProviderTests}
10-
import org.scalacheck.Arbitrary
9+
import org.scalacheck.{Arbitrary, Cogen}
1110
import org.scalacheck.Arbitrary.arbitrary
1211
import dtc.instances.moment.providers.realMomentLocalDateTimeProvider
1312

@@ -18,7 +17,7 @@ class MomentLocalDateTimeTests extends DTCSuiteJS {
1817
time <- arbitrary[LocalTime]
1918
} yield MomentLocalDateTime.of(date, time))
2019

21-
implicit val cogenT = cogenMomentDateTime[MomentLocalDateTime]
20+
implicit val cogenT: Cogen[MomentLocalDateTime] = cogenMomentDateTime[MomentLocalDateTime]
2221

2322
val pairGen = overflowSafePairGen.map(t => (MomentLocalDateTime.of(t._1, t._2), t._3))
2423
val ldtTests = LocalDateTimeTests[MomentLocalDateTime](

tests/js/src/test/scala/dtc/tests/MomentZonedDateTimeTests.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package dtc.tests
22

33
import java.time.{Duration, LocalDate, LocalTime}
44

5-
import cats.instances.option._
65
import cats.kernel.laws.discipline.OrderTests
76
import dtc.{TimeZoneId, Zoned}
87
import dtc.js.MomentZonedDateTime

tests/jvm/src/test/scala/dtc/tests/JVMZonedDateTimeTests.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package dtc.tests
33
import java.time.temporal.ChronoUnit
44
import java.time.{Duration, ZonedDateTime}
55

6-
import cats.instances.option._
76
import cats.kernel.laws.discipline.OrderTests
87
import com.fortysevendeg.scalacheck.datetime.jdk8.ArbitraryJdk8
98
import dtc.{Offset, Zoned}

0 commit comments

Comments
 (0)