From 2705e8191cf2a5250f77160c78acd4d6cde56dfd Mon Sep 17 00:00:00 2001 From: Tim Nieradzik Date: Sun, 4 Oct 2020 15:11:43 +0100 Subject: [PATCH 1/3] Build: Update dependencies --- build212.toml | 18 +++++++++--------- core/src/main/scala/leaf/markdown/Reader.scala | 7 +++++-- core/src/test/scala/leaf/StructureSpec.scala | 4 ++-- core/src/test/scala/leaf/TagSetSpec.scala | 4 ++-- core/src/test/scala/leaf/WriterSpec.scala | 9 ++++----- .../test/scala/leaf/markdown/ReaderSpec.scala | 4 ++-- .../scala/leaf/markdown/TagParserSpec.scala | 4 ++-- .../scala/leaf/pipeline/ListingsSpec.scala | 4 ++-- .../test/scala/leaf/pipeline/SetIdsSpec.scala | 4 ++-- 9 files changed, 30 insertions(+), 28 deletions(-) diff --git a/build212.toml b/build212.toml index 54f81e9..ec035bb 100644 --- a/build212.toml +++ b/build212.toml @@ -9,9 +9,9 @@ root = "." targets = ["jvm"] sources = ["shared/src/"] scalaDeps = [ - ["io.circe", "circe-core" , "0.11.1"], - ["io.circe", "circe-generic", "0.11.1"], - ["io.circe", "circe-parser" , "0.11.1"] + ["io.circe", "circe-core" , "0.13.0"], + ["io.circe", "circe-generic", "0.13.0"], + ["io.circe", "circe-parser" , "0.13.0"] ] [module.leaf-core.jvm] @@ -19,19 +19,19 @@ moduleDeps = ["leaf", "leaf-notebook"] root = "core" sources = ["core/src/main/scala"] scalaDeps = [ - ["tech.sparse" , "pine" , "0.1.5"], + ["tech.sparse" , "pine" , "0.1.7"], ["org.scalameta", "fastparse", "1.0.1"] ] javaDeps = [ - ["com.vladsch.flexmark", "flexmark" , "0.50.32"], - ["com.vladsch.flexmark", "flexmark-ext-tables" , "0.50.32"], - ["com.vladsch.flexmark", "flexmark-ext-footnotes", "0.50.32"] + ["com.vladsch.flexmark", "flexmark" , "0.62.2"], + ["com.vladsch.flexmark", "flexmark-ext-tables" , "0.62.2"], + ["com.vladsch.flexmark", "flexmark-ext-footnotes", "0.62.2"] ] [module.leaf-core.test.jvm] sources = ["core/src/test/scala"] scalaDeps = [ - ["org.scalatest" , "scalatest" , "3.0.8"] + ["org.scalatest", "scalatest", "3.2.2"] ] [module.leaf-notebook.jvm] @@ -39,5 +39,5 @@ moduleDeps = ["leaf"] root = "notebook" sources = ["notebook/src/main/scala"] scalaDeps = [ - ["com.lihaoyi", "sourcecode", "0.1.7"] + ["com.lihaoyi", "sourcecode", "0.2.1"] ] diff --git a/core/src/main/scala/leaf/markdown/Reader.scala b/core/src/main/scala/leaf/markdown/Reader.scala index 574bbc7..91b016c 100644 --- a/core/src/main/scala/leaf/markdown/Reader.scala +++ b/core/src/main/scala/leaf/markdown/Reader.scala @@ -11,6 +11,7 @@ import com.vladsch.flexmark.ext.footnotes.{ import com.vladsch.flexmark.ext.tables._ import com.vladsch.flexmark.parser.Parser import com.vladsch.flexmark.util.data.MutableDataSet +import com.vladsch.flexmark.util.misc.Extension import com.vladsch.flexmark.util.sequence.BasedSequence import leaf._ import leaf.notebook.TextHelpers @@ -254,8 +255,10 @@ class Reader(treeBase: NodeType.TreeBase) { val options = new MutableDataSet() .set( Parser.EXTENSIONS, - java.util.Arrays - .asList(TablesExtension.create, FootnoteExtension.create) + java.util.Arrays.asList( + TablesExtension.create(), + FootnoteExtension.create() + ): java.util.Collection[Extension] ) val parser = Parser.builder(options).build val document = parser.parse(input) diff --git a/core/src/test/scala/leaf/StructureSpec.scala b/core/src/test/scala/leaf/StructureSpec.scala index 5650f1d..2a44ca1 100644 --- a/core/src/test/scala/leaf/StructureSpec.scala +++ b/core/src/test/scala/leaf/StructureSpec.scala @@ -1,8 +1,8 @@ package leaf -import org.scalatest.FunSuite +import org.scalatest.funsuite.AnyFunSuite -class StructureSpec extends FunSuite { +class StructureSpec extends AnyFunSuite { test("tree() (1)") { val structure = Structure.tree( NodeType.Chapter, diff --git a/core/src/test/scala/leaf/TagSetSpec.scala b/core/src/test/scala/leaf/TagSetSpec.scala index 0cba7e9..12bc807 100644 --- a/core/src/test/scala/leaf/TagSetSpec.scala +++ b/core/src/test/scala/leaf/TagSetSpec.scala @@ -1,8 +1,8 @@ package leaf -import org.scalatest.FunSuite +import org.scalatest.funsuite.AnyFunSuite -class TagSetSpec extends FunSuite { +class TagSetSpec extends AnyFunSuite { test("Code") { assert( TagSet diff --git a/core/src/test/scala/leaf/WriterSpec.scala b/core/src/test/scala/leaf/WriterSpec.scala index 89936e4..f795056 100644 --- a/core/src/test/scala/leaf/WriterSpec.scala +++ b/core/src/test/scala/leaf/WriterSpec.scala @@ -1,8 +1,8 @@ package leaf -import org.scalatest.FunSuite +import org.scalatest.funsuite.AnyFunSuite -class WriterSpec extends FunSuite { +class WriterSpec extends AnyFunSuite { test("Generate link") { val url = Node( NodeType.Url("http://google.com/"), @@ -27,7 +27,7 @@ class WriterSpec extends FunSuite { assert( html.Writer.node(list) == List( pine.tag.Ol - .start("1") + .start(1) .set(List(pine.tag.Li.set("Item 1"), pine.tag.Li.set("Item 2"))) ) ) @@ -134,9 +134,8 @@ class WriterSpec extends FunSuite { pine.tag.Div .id("test") .set( - // TODO Ol.start should be integer pine.tag.Ol - .start("1") + .start(1) .set(List(pine.tag.Li.set("Item 1"), pine.tag.Li.set("Item 2"))) ) ) diff --git a/core/src/test/scala/leaf/markdown/ReaderSpec.scala b/core/src/test/scala/leaf/markdown/ReaderSpec.scala index 866e3e7..ddd6f97 100644 --- a/core/src/test/scala/leaf/markdown/ReaderSpec.scala +++ b/core/src/test/scala/leaf/markdown/ReaderSpec.scala @@ -1,9 +1,9 @@ package leaf.markdown import leaf.{Node, NodeType} -import org.scalatest.FunSuite +import org.scalatest.funsuite.AnyFunSuite -class ReaderSpec extends FunSuite { +class ReaderSpec extends AnyFunSuite { test("Bold") { assert( Reader.parse("**Hello**") == List( diff --git a/core/src/test/scala/leaf/markdown/TagParserSpec.scala b/core/src/test/scala/leaf/markdown/TagParserSpec.scala index 0e86f83..a144d95 100644 --- a/core/src/test/scala/leaf/markdown/TagParserSpec.scala +++ b/core/src/test/scala/leaf/markdown/TagParserSpec.scala @@ -4,9 +4,9 @@ import scala.meta.internal.fastparse.core.Parsed import leaf.NodeType import scala.util.{Failure, Success, Try} -import org.scalatest.FunSuite +import org.scalatest.funsuite.AnyFunSuite -class TagParserSpec extends FunSuite { +class TagParserSpec extends AnyFunSuite { def parse(input: String): Try[List[NodeType.Tag]] = TagParser.tags.parse(input) match { case Parsed.Success(value, _) => Success(value) diff --git a/core/src/test/scala/leaf/pipeline/ListingsSpec.scala b/core/src/test/scala/leaf/pipeline/ListingsSpec.scala index 4ad32c7..af3ed28 100644 --- a/core/src/test/scala/leaf/pipeline/ListingsSpec.scala +++ b/core/src/test/scala/leaf/pipeline/ListingsSpec.scala @@ -2,9 +2,9 @@ package leaf.pipeline import leaf.notebook.ListingResult import leaf.{Node, NodeType} -import org.scalatest.FunSuite +import org.scalatest.funsuite.AnyFunSuite -class ListingsSpec extends FunSuite { +class ListingsSpec extends AnyFunSuite { test("embed()") { val result = Listings.embed( Node(NodeType.Listing(id = Some("print"))), diff --git a/core/src/test/scala/leaf/pipeline/SetIdsSpec.scala b/core/src/test/scala/leaf/pipeline/SetIdsSpec.scala index 33f3816..81982ff 100644 --- a/core/src/test/scala/leaf/pipeline/SetIdsSpec.scala +++ b/core/src/test/scala/leaf/pipeline/SetIdsSpec.scala @@ -1,10 +1,10 @@ package leaf.pipeline -import org.scalatest.FunSuite +import org.scalatest.funsuite.AnyFunSuite import leaf._ -class SetIdsSpec extends FunSuite { +class SetIdsSpec extends AnyFunSuite { test("Set IDs") { val nodes = List( Node(NodeType.Section, List(Node(NodeType.Text("Section 1")))), From 4b22b42fc8f021d827ec13d689573f42c048f315 Mon Sep 17 00:00:00 2001 From: Tim Nieradzik Date: Sun, 4 Oct 2020 15:50:32 +0100 Subject: [PATCH 2/3] README: Fix badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bd70c9c..f5692e4 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Leaf -[![Build Status](https://travis-ci.org/sparsetech/leaf.svg)](https://travis-ci.org/sparsetech/leaf) +[![Build Status](https://travis-ci.org/sparsetech/leaf.svg?branch=master)](https://travis-ci.org/sparsetech/leaf) [![Join the chat at https://gitter.im/sparsetech/leaf](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/sparsetech/leaf?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Maven Central](https://img.shields.io/maven-central/v/tech.sparse/leaf-core_2.12.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22tech.sparse%22%20AND%20a%3A%22leaf-core_2.12%22) From 6b9f48f4733f0e99f13d9d9d25f2ddb5305ac760 Mon Sep 17 00:00:00 2001 From: Tim Nieradzik Date: Sun, 4 Oct 2020 16:07:20 +0100 Subject: [PATCH 3/3] Fix build.sbt --- build.sbt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build.sbt b/build.sbt index 65582cf..71d9e69 100644 --- a/build.sbt +++ b/build.sbt @@ -1,9 +1,9 @@ -val Pine = "0.1.5" -val Circe = "0.11.1" -val FlexMark = "0.50.32" +val Pine = "0.1.7" +val Circe = "0.13.0" +val FlexMark = "0.62.2" val FastParse = "1.0.1" -val ScalaTest = "3.0.8" -val SourceCode = "0.1.7" +val ScalaTest = "3.2.2" +val SourceCode = "0.2.1" name := "leaf"