From ff8bbc688eab2025e97de4e6362c648595a4ed81 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Tue, 15 Oct 2024 18:54:04 +0200 Subject: [PATCH 1/8] chore: Align custom kotlinx-serializers to be objects, part 2 This is a follow-up to 9607cd0 for code that was merged in parallel. Signed-off-by: Sebastian Schuberth --- plugins/package-managers/pub/src/main/kotlin/Lockfile.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/package-managers/pub/src/main/kotlin/Lockfile.kt b/plugins/package-managers/pub/src/main/kotlin/Lockfile.kt index 166e8e3eee14e..3eece0704b0e2 100644 --- a/plugins/package-managers/pub/src/main/kotlin/Lockfile.kt +++ b/plugins/package-managers/pub/src/main/kotlin/Lockfile.kt @@ -76,7 +76,7 @@ internal data class PackageInfo( ) } -private class DescriptionDeserializer : KSerializer by Description.generatedSerializer() { +private object DescriptionDeserializer : KSerializer by Description.generatedSerializer() { @OptIn(InternalSerializationApi::class) override val descriptor: SerialDescriptor by lazy { val serialName = checkNotNull(Description::class.qualifiedName) From e59225e34b25f72de5c5658bf76bd1f94ade2501 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Tue, 15 Oct 2024 14:28:06 +0200 Subject: [PATCH 2/8] docs(pub): Add links to dependency types Signed-off-by: Sebastian Schuberth --- plugins/package-managers/pub/src/main/kotlin/Pubspec.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/package-managers/pub/src/main/kotlin/Pubspec.kt b/plugins/package-managers/pub/src/main/kotlin/Pubspec.kt index 6e78758cb29b9..34dfa8e547143 100644 --- a/plugins/package-managers/pub/src/main/kotlin/Pubspec.kt +++ b/plugins/package-managers/pub/src/main/kotlin/Pubspec.kt @@ -73,22 +73,26 @@ internal data class Pubspec( @Serializable sealed interface Dependency + /** See https://dart.dev/tools/pub/dependencies#hosted-packages. */ @Serializable data class HostedDependency( val version: String, val url: String? = null ) : Dependency + /** See https://dart.dev/tools/pub/dependencies#path-packages. */ @Serializable data class PathDependency( val path: String ) : Dependency + /** See https://dart.dev/tools/pub/dependencies#sdk. */ @Serializable data class SdkDependency( val sdk: String ) : Dependency + /** See https://dart.dev/tools/pub/dependencies#git-packages. */ @Serializable data class GitDependency( val url: String, From 6e834c3f29fb2f8dbd9ad6f28594095638e53aba Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Tue, 15 Oct 2024 14:28:59 +0200 Subject: [PATCH 3/8] chore(pub): Order dependency classes as in the linked documentation Signed-off-by: Sebastian Schuberth --- .../pub/src/main/kotlin/Pubspec.kt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/package-managers/pub/src/main/kotlin/Pubspec.kt b/plugins/package-managers/pub/src/main/kotlin/Pubspec.kt index 34dfa8e547143..d60cfc2a4a566 100644 --- a/plugins/package-managers/pub/src/main/kotlin/Pubspec.kt +++ b/plugins/package-managers/pub/src/main/kotlin/Pubspec.kt @@ -80,6 +80,14 @@ internal data class Pubspec( val url: String? = null ) : Dependency + /** See https://dart.dev/tools/pub/dependencies#git-packages. */ + @Serializable + data class GitDependency( + val url: String, + val path: String? = null, + val ref: String? = null + ) : Dependency + /** See https://dart.dev/tools/pub/dependencies#path-packages. */ @Serializable data class PathDependency( @@ -91,14 +99,6 @@ internal data class Pubspec( data class SdkDependency( val sdk: String ) : Dependency - - /** See https://dart.dev/tools/pub/dependencies#git-packages. */ - @Serializable - data class GitDependency( - val url: String, - val path: String? = null, - val ref: String? = null - ) : Dependency } /** From 8be16d96e853420ffb22babe2a00b801f030c760 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Tue, 15 Oct 2024 21:00:42 +0200 Subject: [PATCH 4/8] refactor(pub): Reduce code by delegating to the default serializer Signed-off-by: Sebastian Schuberth --- .../package-managers/pub/src/main/kotlin/Pubspec.kt | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/plugins/package-managers/pub/src/main/kotlin/Pubspec.kt b/plugins/package-managers/pub/src/main/kotlin/Pubspec.kt index d60cfc2a4a566..8075e704f42c9 100644 --- a/plugins/package-managers/pub/src/main/kotlin/Pubspec.kt +++ b/plugins/package-managers/pub/src/main/kotlin/Pubspec.kt @@ -35,9 +35,8 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable import kotlinx.serialization.SerializationException import kotlinx.serialization.decodeFromString -import kotlinx.serialization.descriptors.serialDescriptor import kotlinx.serialization.encoding.Decoder -import kotlinx.serialization.encoding.Encoder +import kotlinx.serialization.serializer import org.ossreviewtoolkit.plugins.packagemanagers.pub.Pubspec.Dependency import org.ossreviewtoolkit.plugins.packagemanagers.pub.Pubspec.GitDependency @@ -105,13 +104,7 @@ internal data class Pubspec( * If transformations like for JSON were available in kaml, this serializer could be simplified, see also * https://github.com/charleskorn/kaml/issues/29. */ -private object DependencyMapSerializer : KSerializer> { - override val descriptor = serialDescriptor>() - - override fun serialize(encoder: Encoder, value: Map) { - TODO("Not implemented yet.") - } - +private object DependencyMapSerializer : KSerializer> by serializer>() { override fun deserialize(decoder: Decoder): Map { val input = decoder.beginStructure(descriptor) as YamlInput From ae06cfc37fa3990c72a6d5138214f9397644e28d Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Tue, 15 Oct 2024 19:52:59 +0200 Subject: [PATCH 5/8] chore(pub): Simplify deserializing dependencies The dependencies node itself is never a scalar, so the code can be simplified. Signed-off-by: Sebastian Schuberth --- plugins/package-managers/pub/src/main/kotlin/Pubspec.kt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/plugins/package-managers/pub/src/main/kotlin/Pubspec.kt b/plugins/package-managers/pub/src/main/kotlin/Pubspec.kt index 8075e704f42c9..a57d137865e66 100644 --- a/plugins/package-managers/pub/src/main/kotlin/Pubspec.kt +++ b/plugins/package-managers/pub/src/main/kotlin/Pubspec.kt @@ -108,11 +108,7 @@ private object DependencyMapSerializer : KSerializer> by override fun deserialize(decoder: Decoder): Map { val input = decoder.beginStructure(descriptor) as YamlInput - val result = when (val node = input.node) { - is YamlScalar -> emptyMap() - is YamlMap -> node.entries.asSequence().associateBy({ it.key.content }, { it.value.decodeDependency() }) - else -> throw SerializationException("Unexpected YAML node type: ${node.javaClass.simpleName}.") - } + val result = input.node.yamlMap.entries.asSequence().associate { it.key.content to it.value.decodeDependency() } input.endStructure(descriptor) From 4a3c23079f059c8d29179b6f5b86c26b7ed93cd1 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Tue, 15 Oct 2024 22:18:31 +0200 Subject: [PATCH 6/8] chore(pub): Handle dependency types in the same order as documented Signed-off-by: Sebastian Schuberth --- .../pub/src/main/kotlin/Pubspec.kt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/package-managers/pub/src/main/kotlin/Pubspec.kt b/plugins/package-managers/pub/src/main/kotlin/Pubspec.kt index a57d137865e66..80eb4081a33c0 100644 --- a/plugins/package-managers/pub/src/main/kotlin/Pubspec.kt +++ b/plugins/package-managers/pub/src/main/kotlin/Pubspec.kt @@ -118,14 +118,6 @@ private object DependencyMapSerializer : KSerializer> by private fun YamlNode.decodeDependency(): Dependency { if (this is YamlScalar) return HostedDependency(yamlScalar.content) - yamlMap.get("sdk")?.let { sdk -> - return SdkDependency(sdk = sdk.content) - } - - yamlMap.get("path")?.let { path -> - return PathDependency(path = path.content) - } - yamlMap.get("hosted")?.let { hosted -> val version = checkNotNull(yamlMap.get("version")).content val url = if (hosted is YamlMap) { @@ -149,6 +141,14 @@ private object DependencyMapSerializer : KSerializer> by } } + yamlMap.get("path")?.let { path -> + return PathDependency(path = path.content) + } + + yamlMap.get("sdk")?.let { sdk -> + return SdkDependency(sdk = sdk.content) + } + throw SerializationException("Unexpected dependency node format.") } } From e045fbdb3b2faf34c79824ad5af732e1863466e3 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Thu, 17 Oct 2024 14:27:10 +0200 Subject: [PATCH 7/8] refactor(pub): Reorder classes into packages Remove the `utils` package and move its only class to the root. In exchange, group the `Lockfile` and `Pubspec` classes in a new `model` package. Signed-off-by: Sebastian Schuberth --- plugins/package-managers/pub/src/main/kotlin/Pub.kt | 10 +++++++--- .../src/main/kotlin/{utils => }/PubCacheReader.kt | 4 ++-- .../pub/src/main/kotlin/{ => model}/Lockfile.kt | 4 ++-- .../pub/src/main/kotlin/{ => model}/Pubspec.kt | 12 ++++++------ .../test/kotlin/{utils => }/PubCacheReaderTest.kt | 4 ++-- .../pub/src/test/kotlin/{ => model}/PubspecTest.kt | 10 +++++----- 6 files changed, 24 insertions(+), 20 deletions(-) rename plugins/package-managers/pub/src/main/kotlin/{utils => }/PubCacheReader.kt (97%) rename plugins/package-managers/pub/src/main/kotlin/{ => model}/Lockfile.kt (95%) rename plugins/package-managers/pub/src/main/kotlin/{ => model}/Pubspec.kt (91%) rename plugins/package-managers/pub/src/test/kotlin/{utils => }/PubCacheReaderTest.kt (97%) rename plugins/package-managers/pub/src/test/kotlin/{ => model}/PubspecTest.kt (91%) diff --git a/plugins/package-managers/pub/src/main/kotlin/Pub.kt b/plugins/package-managers/pub/src/main/kotlin/Pub.kt index 805e8beac19e3..63e2827b28494 100644 --- a/plugins/package-managers/pub/src/main/kotlin/Pub.kt +++ b/plugins/package-managers/pub/src/main/kotlin/Pub.kt @@ -52,9 +52,13 @@ import org.ossreviewtoolkit.model.config.AnalyzerConfiguration import org.ossreviewtoolkit.model.config.PackageManagerConfiguration import org.ossreviewtoolkit.model.config.RepositoryConfiguration import org.ossreviewtoolkit.model.createAndLogIssue -import org.ossreviewtoolkit.plugins.packagemanagers.pub.Pubspec.Dependency -import org.ossreviewtoolkit.plugins.packagemanagers.pub.Pubspec.SdkDependency -import org.ossreviewtoolkit.plugins.packagemanagers.pub.utils.PubCacheReader +import org.ossreviewtoolkit.plugins.packagemanagers.pub.model.Lockfile +import org.ossreviewtoolkit.plugins.packagemanagers.pub.model.PackageInfo +import org.ossreviewtoolkit.plugins.packagemanagers.pub.model.Pubspec +import org.ossreviewtoolkit.plugins.packagemanagers.pub.model.Pubspec.Dependency +import org.ossreviewtoolkit.plugins.packagemanagers.pub.model.Pubspec.SdkDependency +import org.ossreviewtoolkit.plugins.packagemanagers.pub.model.parseLockfile +import org.ossreviewtoolkit.plugins.packagemanagers.pub.model.parsePubspec import org.ossreviewtoolkit.utils.common.CommandLineTool import org.ossreviewtoolkit.utils.common.Os import org.ossreviewtoolkit.utils.common.ProcessCapture diff --git a/plugins/package-managers/pub/src/main/kotlin/utils/PubCacheReader.kt b/plugins/package-managers/pub/src/main/kotlin/PubCacheReader.kt similarity index 97% rename from plugins/package-managers/pub/src/main/kotlin/utils/PubCacheReader.kt rename to plugins/package-managers/pub/src/main/kotlin/PubCacheReader.kt index b9df31622a664..048566e7a7417 100644 --- a/plugins/package-managers/pub/src/main/kotlin/utils/PubCacheReader.kt +++ b/plugins/package-managers/pub/src/main/kotlin/PubCacheReader.kt @@ -17,14 +17,14 @@ * License-Filename: LICENSE */ -package org.ossreviewtoolkit.plugins.packagemanagers.pub.utils +package org.ossreviewtoolkit.plugins.packagemanagers.pub import java.io.File import org.apache.logging.log4j.kotlin.logger import org.ossreviewtoolkit.downloader.VcsHost -import org.ossreviewtoolkit.plugins.packagemanagers.pub.PackageInfo +import org.ossreviewtoolkit.plugins.packagemanagers.pub.model.PackageInfo import org.ossreviewtoolkit.utils.common.Os import org.ossreviewtoolkit.utils.common.isSymbolicLink diff --git a/plugins/package-managers/pub/src/main/kotlin/Lockfile.kt b/plugins/package-managers/pub/src/main/kotlin/model/Lockfile.kt similarity index 95% rename from plugins/package-managers/pub/src/main/kotlin/Lockfile.kt rename to plugins/package-managers/pub/src/main/kotlin/model/Lockfile.kt index 3eece0704b0e2..ea360f69c4a8c 100644 --- a/plugins/package-managers/pub/src/main/kotlin/Lockfile.kt +++ b/plugins/package-managers/pub/src/main/kotlin/model/Lockfile.kt @@ -17,7 +17,7 @@ * License-Filename: LICENSE */ -package org.ossreviewtoolkit.plugins.packagemanagers.pub +package org.ossreviewtoolkit.plugins.packagemanagers.pub.model import com.charleskorn.kaml.Yaml import com.charleskorn.kaml.YamlConfiguration @@ -39,7 +39,7 @@ import kotlinx.serialization.descriptors.SerialKind import kotlinx.serialization.descriptors.buildSerialDescriptor import kotlinx.serialization.encoding.Decoder -import org.ossreviewtoolkit.plugins.packagemanagers.pub.PackageInfo.Description +import org.ossreviewtoolkit.plugins.packagemanagers.pub.model.PackageInfo.Description private val YAML = Yaml(configuration = YamlConfiguration(strictMode = false)) diff --git a/plugins/package-managers/pub/src/main/kotlin/Pubspec.kt b/plugins/package-managers/pub/src/main/kotlin/model/Pubspec.kt similarity index 91% rename from plugins/package-managers/pub/src/main/kotlin/Pubspec.kt rename to plugins/package-managers/pub/src/main/kotlin/model/Pubspec.kt index 80eb4081a33c0..50cc8334bbdfc 100644 --- a/plugins/package-managers/pub/src/main/kotlin/Pubspec.kt +++ b/plugins/package-managers/pub/src/main/kotlin/model/Pubspec.kt @@ -17,7 +17,7 @@ * License-Filename: LICENSE */ -package org.ossreviewtoolkit.plugins.packagemanagers.pub +package org.ossreviewtoolkit.plugins.packagemanagers.pub.model import com.charleskorn.kaml.Yaml import com.charleskorn.kaml.YamlConfiguration @@ -38,11 +38,11 @@ import kotlinx.serialization.decodeFromString import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.serializer -import org.ossreviewtoolkit.plugins.packagemanagers.pub.Pubspec.Dependency -import org.ossreviewtoolkit.plugins.packagemanagers.pub.Pubspec.GitDependency -import org.ossreviewtoolkit.plugins.packagemanagers.pub.Pubspec.HostedDependency -import org.ossreviewtoolkit.plugins.packagemanagers.pub.Pubspec.PathDependency -import org.ossreviewtoolkit.plugins.packagemanagers.pub.Pubspec.SdkDependency +import org.ossreviewtoolkit.plugins.packagemanagers.pub.model.Pubspec.Dependency +import org.ossreviewtoolkit.plugins.packagemanagers.pub.model.Pubspec.GitDependency +import org.ossreviewtoolkit.plugins.packagemanagers.pub.model.Pubspec.HostedDependency +import org.ossreviewtoolkit.plugins.packagemanagers.pub.model.Pubspec.PathDependency +import org.ossreviewtoolkit.plugins.packagemanagers.pub.model.Pubspec.SdkDependency private val YAML = Yaml(configuration = YamlConfiguration(strictMode = false)) diff --git a/plugins/package-managers/pub/src/test/kotlin/utils/PubCacheReaderTest.kt b/plugins/package-managers/pub/src/test/kotlin/PubCacheReaderTest.kt similarity index 97% rename from plugins/package-managers/pub/src/test/kotlin/utils/PubCacheReaderTest.kt rename to plugins/package-managers/pub/src/test/kotlin/PubCacheReaderTest.kt index bb3a81de3608d..549d89e71083d 100644 --- a/plugins/package-managers/pub/src/test/kotlin/utils/PubCacheReaderTest.kt +++ b/plugins/package-managers/pub/src/test/kotlin/PubCacheReaderTest.kt @@ -17,7 +17,7 @@ * License-Filename: LICENSE */ -package org.ossreviewtoolkit.plugins.packagemanagers.pub.utils +package org.ossreviewtoolkit.plugins.packagemanagers.pub import io.kotest.core.spec.style.WordSpec import io.kotest.engine.spec.tempdir @@ -25,7 +25,7 @@ import io.kotest.matchers.shouldBe import java.io.File -import org.ossreviewtoolkit.plugins.packagemanagers.pub.PackageInfo +import org.ossreviewtoolkit.plugins.packagemanagers.pub.model.PackageInfo import org.ossreviewtoolkit.utils.common.Os import org.ossreviewtoolkit.utils.common.safeMkdirs diff --git a/plugins/package-managers/pub/src/test/kotlin/PubspecTest.kt b/plugins/package-managers/pub/src/test/kotlin/model/PubspecTest.kt similarity index 91% rename from plugins/package-managers/pub/src/test/kotlin/PubspecTest.kt rename to plugins/package-managers/pub/src/test/kotlin/model/PubspecTest.kt index 2cdd67517079d..36b28bfe429f2 100644 --- a/plugins/package-managers/pub/src/test/kotlin/PubspecTest.kt +++ b/plugins/package-managers/pub/src/test/kotlin/model/PubspecTest.kt @@ -17,17 +17,17 @@ * License-Filename: LICENSE */ -package org.ossreviewtoolkit.plugins.packagemanagers.pub +package org.ossreviewtoolkit.plugins.packagemanagers.pub.model import io.kotest.core.spec.style.WordSpec import io.kotest.matchers.nulls.beNull import io.kotest.matchers.should import io.kotest.matchers.shouldBe -import org.ossreviewtoolkit.plugins.packagemanagers.pub.Pubspec.GitDependency -import org.ossreviewtoolkit.plugins.packagemanagers.pub.Pubspec.HostedDependency -import org.ossreviewtoolkit.plugins.packagemanagers.pub.Pubspec.PathDependency -import org.ossreviewtoolkit.plugins.packagemanagers.pub.Pubspec.SdkDependency +import org.ossreviewtoolkit.plugins.packagemanagers.pub.model.Pubspec.GitDependency +import org.ossreviewtoolkit.plugins.packagemanagers.pub.model.Pubspec.HostedDependency +import org.ossreviewtoolkit.plugins.packagemanagers.pub.model.Pubspec.PathDependency +import org.ossreviewtoolkit.plugins.packagemanagers.pub.model.Pubspec.SdkDependency class PubspecTest : WordSpec({ "parsePubspec()" should { From c643da0b5085e458834b3da3d99657b488ee22e2 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Thu, 17 Oct 2024 14:32:45 +0200 Subject: [PATCH 8/8] refactor(pub): Only use a single shared YAML instance Signed-off-by: Sebastian Schuberth --- .../pub/src/main/kotlin/model/Lockfile.kt | 4 --- .../pub/src/main/kotlin/model/Pubspec.kt | 4 --- .../pub/src/main/kotlin/model/Yaml.kt | 25 +++++++++++++++++++ 3 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 plugins/package-managers/pub/src/main/kotlin/model/Yaml.kt diff --git a/plugins/package-managers/pub/src/main/kotlin/model/Lockfile.kt b/plugins/package-managers/pub/src/main/kotlin/model/Lockfile.kt index ea360f69c4a8c..75c0790626813 100644 --- a/plugins/package-managers/pub/src/main/kotlin/model/Lockfile.kt +++ b/plugins/package-managers/pub/src/main/kotlin/model/Lockfile.kt @@ -19,8 +19,6 @@ package org.ossreviewtoolkit.plugins.packagemanagers.pub.model -import com.charleskorn.kaml.Yaml -import com.charleskorn.kaml.YamlConfiguration import com.charleskorn.kaml.YamlInput import com.charleskorn.kaml.YamlScalar @@ -41,8 +39,6 @@ import kotlinx.serialization.encoding.Decoder import org.ossreviewtoolkit.plugins.packagemanagers.pub.model.PackageInfo.Description -private val YAML = Yaml(configuration = YamlConfiguration(strictMode = false)) - internal fun parseLockfile(lockfile: File) = YAML.decodeFromString(lockfile.readText()) /** diff --git a/plugins/package-managers/pub/src/main/kotlin/model/Pubspec.kt b/plugins/package-managers/pub/src/main/kotlin/model/Pubspec.kt index 50cc8334bbdfc..cf50f79b9db63 100644 --- a/plugins/package-managers/pub/src/main/kotlin/model/Pubspec.kt +++ b/plugins/package-managers/pub/src/main/kotlin/model/Pubspec.kt @@ -19,8 +19,6 @@ package org.ossreviewtoolkit.plugins.packagemanagers.pub.model -import com.charleskorn.kaml.Yaml -import com.charleskorn.kaml.YamlConfiguration import com.charleskorn.kaml.YamlInput import com.charleskorn.kaml.YamlMap import com.charleskorn.kaml.YamlNode @@ -44,8 +42,6 @@ import org.ossreviewtoolkit.plugins.packagemanagers.pub.model.Pubspec.HostedDepe import org.ossreviewtoolkit.plugins.packagemanagers.pub.model.Pubspec.PathDependency import org.ossreviewtoolkit.plugins.packagemanagers.pub.model.Pubspec.SdkDependency -private val YAML = Yaml(configuration = YamlConfiguration(strictMode = false)) - internal fun parsePubspec(pubspecFile: File): Pubspec = parsePubspec(pubspecFile.readText()) internal fun parsePubspec(pubspecYaml: String): Pubspec = YAML.decodeFromString(pubspecYaml) diff --git a/plugins/package-managers/pub/src/main/kotlin/model/Yaml.kt b/plugins/package-managers/pub/src/main/kotlin/model/Yaml.kt new file mode 100644 index 0000000000000..469d6febd539a --- /dev/null +++ b/plugins/package-managers/pub/src/main/kotlin/model/Yaml.kt @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2024 The ORT Project Authors (see ) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * License-Filename: LICENSE + */ + +package org.ossreviewtoolkit.plugins.packagemanagers.pub.model + +import com.charleskorn.kaml.Yaml +import com.charleskorn.kaml.YamlConfiguration + +internal val YAML = Yaml(configuration = YamlConfiguration(strictMode = false))