@@ -2,32 +2,35 @@ import sbt.Keys.scalacOptions
22import sbtcrossproject .CrossPlugin .autoImport .crossProject
33
44/* scala libs */
5- lazy val utestVersion = " 0.7.7"
6- lazy val upickleVersion = " 1.2.2"
7- lazy val airframeLogVersion = " 20.11.0"
8- lazy val scalaParserCombinatorVersion = " 1.1.2"
9- lazy val RosHttpVersion = " 3.0.0"
5+ lazy val utestVersion = " 0.7.10"
6+ lazy val upickleVersion = " 1.4.0"
7+ lazy val airframeLogVersion = " 21.6.0"
108lazy val scalaJsDOMVersion = " 1.1.0"
119lazy val scalaStubVersion = " 1.0.0"
12- lazy val scalatagVersion = " 0.9.2 "
13- lazy val rdf4jVersion = " 3.6.0-M2 "
14- lazy val slf4j_version = " 1.7.9 "
10+ lazy val scalatagVersion = " 0.9.4 "
11+ lazy val rdf4jVersion = " 3.7.2 "
12+ lazy val slf4j_version = " 1.7.31 "
1513
1614/* p2m2 libs */
17- lazy val comunica_actor_init_sparql_rdfjs_version = " 1.0.0 "
15+ lazy val comunica_actor_init_sparql_rdfjs_version = " 1.21.1 "
1816lazy val data_model_rdfjs_version = " 1.0.0"
19- lazy val n3js_facade_version = " 1.0 .1"
20- lazy val rdfxml_streaming_parser_version = " 1.0 .0"
17+ lazy val n3js_facade_version = " 1.11 .1"
18+ lazy val rdfxml_streaming_parser_version = " 1.5 .0"
2119
2220/* npm libs */
2321lazy val npm_axios_version = " 0.21.1"
24- lazy val npm_qs_version = " 6.9.6 "
22+ lazy val npm_qs_version = " 6.10.1 "
2523lazy val npm_showdown_version = " 1.9.1"
26- lazy val npm_comunica_version = " 1.19.2"
24+ lazy val npm_comunica_version_datasource = " 1.21.1"
25+
26+ lazy val types_jest = " 27.0.1"
27+ lazy val jest = " 27.0.6"
28+ lazy val tsjest = " 27.0.5"
2729
2830releaseIgnoreUntrackedFiles := true
2931
30- val version_build = scala.util.Properties .envOrElse(" DISCOVERY_VERSION" , " local-SNAPSHOT" )
32+ val static_version_build = " 0.3.0-alpha.6"
33+ val version_build = scala.util.Properties .envOrElse(" DISCOVERY_VERSION" , static_version_build )
3134val SWDiscoveryVersionAtBuildTimeFile = " ./shared/src/main/scala/inrae/semantic_web/SWDiscoveryVersionAtBuildTime.scala"
3235
3336
@@ -51,11 +54,11 @@ ThisBuild / organization := "com.github.p2m2"
5154ThisBuild / organizationName := " p2m2"
5255ThisBuild / organizationHomepage := Some (url(" https://www6.inrae.fr/p2m2" ))
5356ThisBuild / licenses := Seq (" MIT License" -> url(" http://www.opensource.org/licenses/mit-license.php" ))
54- ThisBuild / homepage := Some (url(" https://github.com/p2m2/Discovery " ))
55- ThisBuild / description := " Ease Sparql request on the network MetaboHUB/Semantics Databases ."
57+ ThisBuild / homepage := Some (url(" https://github.com/p2m2/discovery " ))
58+ ThisBuild / description := " Ease Sparql request to reach semantic database ."
5659ThisBuild / scmInfo := Some (
5760 ScmInfo (
58- url(" https://github.com/p2m2/Discovery " ),
61+ url(" https://github.com/p2m2/discovery " ),
5962 " scm:git@github.com:p2m2/Discovery.git"
6063 )
6164 )
@@ -101,21 +104,20 @@ lazy val root = (project in file("."))
101104
102105lazy val discovery = crossProject(JSPlatform , JVMPlatform ).in(file(" ." ))
103106 .settings(
104- resolvers += Resolver .bintrayRepo(" hmil" , " maven" ),
105107 libraryDependencies ++= Seq (
108+ " com.softwaremill.sttp.client3" %% " core" % " 3.3.4" % Test ,
106109 " com.lihaoyi" %%% " utest" % utestVersion % Test ,
107- " fr.hmil" %%% " roshttp" % RosHttpVersion % Test ,
108110 " com.lihaoyi" %%% " upickle" % upickleVersion,
109111 " org.wvlet.airframe" %%% " airframe-log" % airframeLogVersion,
110- " org.scala-lang.modules " %%% " scala-parser-combinators " % scalaParserCombinatorVersion
112+ " io.lemonlabs " %%% " scala-uri " % " 3.5.0 "
111113 ),
112114 testFrameworks += new TestFramework (" utest.runner.Framework" ),
113115 scalacOptions ++= Seq (" -deprecation" , " -feature" ),
114116 classLoaderLayeringStrategy := ClassLoaderLayeringStrategy .AllLibraryJars ,
115- coverageMinimum := 70 ,
117+ coverageMinimumStmtTotal := 70 ,
116118 coverageFailOnMinimum := false ,
117119 coverageHighlighting := true ,
118- parallelExecution in Test := false
120+ Test / parallelExecution := false
119121 )
120122 .jsConfigure(_.enablePlugins(ScalaJSBundlerPlugin ))
121123 .jsSettings(
@@ -126,19 +128,20 @@ lazy val discovery=crossProject(JSPlatform, JVMPlatform).in(file("."))
126128 " com.github.p2m2" %%% " rdfxml-streaming-parser" % rdfxml_streaming_parser_version,
127129 ),
128130 webpackBundlingMode := BundlingMode .LibraryAndApplication (),
129- npmDependencies in Compile ++= Seq (
131+ Compile / npmDependencies ++= Seq (
130132 " axios" -> npm_axios_version,
131133 " qs" -> npm_qs_version,
132134 " showdown" -> npm_showdown_version,
133- " @comunica/utils-datasource" -> npm_comunica_version
135+ " @comunica/utils-datasource" -> npm_comunica_version_datasource,
136+ " @types/sax" -> " 1.2.1"
134137 ),
135138
136- scalaJSLinkerConfig in ( Compile , fastOptJS ) ~= {
139+ Compile / fastOptJS / scalaJSLinkerConfig ~= {
137140 _.withOptimizer(false )
138141 .withPrettyPrint(true )
139142 .withSourceMap(true )
140143 },
141- scalaJSLinkerConfig in ( Compile , fullOptJS) ~= {
144+ Compile / fullOptJS / scalaJSLinkerConfig ~= {
142145 _.withSourceMap(false )
143146 .withModuleKind(ModuleKind .CommonJSModule )
144147 },
@@ -151,6 +154,7 @@ lazy val discovery=crossProject(JSPlatform, JVMPlatform).in(file("."))
151154 " org.scala-js" %% " scalajs-stubs" % scalaStubVersion % " provided" ,
152155 " org.slf4j" % " slf4j-api" % slf4j_version,
153156 " org.slf4j" % " slf4j-simple" % slf4j_version,
157+ " org.eclipse.rdf4j" % " rdf4j-sail" % rdf4jVersion,
154158 " org.eclipse.rdf4j" % " rdf4j-storage" % rdf4jVersion,
155159 " org.eclipse.rdf4j" % " rdf4j-tools-federation" % rdf4jVersion
156160 ))
@@ -178,8 +182,7 @@ npmPackageJson := {
178182 case (x,idx) if ( (idx > indexStartDependencies) && (idx < indexEndDependencies) ) => x
179183 }
180184
181-
182- val file = reflect.io.File (" ./package.json" ).writeAll(
185+ reflect.io.File (" ./package.json" ).writeAll(
183186 Predef .augmentString(
184187s """ {
185188 "name": "@ ${(ThisBuild / organizationName).value}/ ${(ThisBuild / name).value}",
@@ -189,12 +192,31 @@ s"""{
189192 "files": [
190193 "js/target/scala-2.13/scalajs-bundler/main/discovery-opt.js"
191194 ],
195+ "scripts": {
196+ "test": "jest --detectOpenHandles"
197+ },
198+ "devDependencies": {
199+ "@types/jest": "^ $types_jest ",
200+ "jest": "^ $jest ",
201+ "ts-jest": "^ $tsjest"
202+ },
203+ "jest": {
204+ "transform": {
205+ ".(ts|tsx)": "ts-jest"
206+ },
207+ "testRegex": "(ts/__tests__/.*| \\\\ .(test|spec)) \\\\ .(ts|tsx|js) $$ ",
208+ "moduleFileExtensions": [
209+ "ts",
210+ "tsx",
211+ "js"
212+ ]
213+ },
192214 "dependencies": {
193215${dependencies.mkString(" \n " )}
194216 },
195217 "repository": {
196218 "type": "git",
197- "url": "git+https://github.com/p2m2/Discovery .git"
219+ "url": "git+https://github.com/p2m2/discovery .git"
198220 },
199221 "keywords": [
200222 "sparql",
@@ -204,9 +226,9 @@ ${dependencies.mkString("\n")}
204226 "author": "Olivier Filangi",
205227 "license": "MIT",
206228 "bugs": {
207- "url": "https://github.com/p2m2/Discovery /issues"
229+ "url": "https://github.com/p2m2/discovery /issues"
208230 },
209- "homepage": "https://github.com/p2m2/Discovery#README.md "
231+ "homepage": "https://p2m2. github.io/discovery/ "
210232 }
211233 """ ).stripMargin)
212234}
0 commit comments