Thanks to visit codestin.com
Credit goes to GitHub.com

Skip to content

iseki0/yarnlock-kt

Repository files navigation

yarnlock-kt

Kotlin Multiplatform library for parsing Yarn v1 yarn.lock files.

Features

  • Tokenizes and parses Yarn v1 lockfiles into a typed tree.
  • Handles merge-conflict markers and merges variants when possible.
  • Exposes parse errors with line/column/offset metadata.
  • Kotlinx serialization support for parse results.

Usage

import space.iseki.yarnlock.parseYarnLock

val bytes: ByteArray = /* yarn.lock contents */
val result = parseYarnLock(bytes, "yarn.lock")

Types

  • ParseResultType: SUCCESS, MERGE, CONFLICT.
  • ParseResult: { type, obj }.
  • YarnValue: StringValue, BooleanValue, NumberValue, ObjectValue.
  • ParseException: includes line, col, offset, and fileLoc.

Tests

./gradlew allTests

ABI validation

ABI validation is enabled via Kotlin's built-in abiValidation:

./gradlew checkLegacyAbi
./gradlew updateLegacyAbi

Reference dumps are stored in api/.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages