Fix error that occurs when parsing TOML files that use dotted keys (#444)

* Add test for parsing TOML file with dotted keys

* Use smol-toml instead of toml for TOML parsing

* Run build-dist
This commit is contained in:
Mitchell Henke
2026-03-30 04:53:57 -05:00
committed by GitHub
parent 92dab893ed
commit 190c3a5e7b
5 changed files with 1137 additions and 4080 deletions
+1131 -4069
View File
File diff suppressed because it is too large Load Diff
+1 -8
View File
@@ -13,7 +13,7 @@
"csv-parse": "6.2.1", "csv-parse": "6.2.1",
"lodash": "4.17.23", "lodash": "4.17.23",
"semver": "7.7.4", "semver": "7.7.4",
"toml": "3.0.0" "smol-toml": "1.6.1"
}, },
"devDependencies": { "devDependencies": {
"@eslint/js": "10.0.1", "@eslint/js": "10.0.1",
@@ -3315,7 +3315,6 @@
"version": "1.6.1", "version": "1.6.1",
"resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.6.1.tgz", "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.6.1.tgz",
"integrity": "sha512-dWUG8F5sIIARXih1DTaQAX4SsiTXhInKf1buxdY9DIg4ZYPZK5nGM1VRIYmEbDbsHt7USo99xSLFu5Q1IqTmsg==", "integrity": "sha512-dWUG8F5sIIARXih1DTaQAX4SsiTXhInKf1buxdY9DIg4ZYPZK5nGM1VRIYmEbDbsHt7USo99xSLFu5Q1IqTmsg==",
"dev": true,
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"engines": { "engines": {
"node": ">= 18" "node": ">= 18"
@@ -3531,12 +3530,6 @@
"url": "https://github.com/sponsors/Borewit" "url": "https://github.com/sponsors/Borewit"
} }
}, },
"node_modules/toml": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/toml/-/toml-3.0.0.tgz",
"integrity": "sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==",
"license": "MIT"
},
"node_modules/tslib": { "node_modules/tslib": {
"version": "2.8.1", "version": "2.8.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
+1 -1
View File
@@ -23,7 +23,7 @@
"csv-parse": "6.2.1", "csv-parse": "6.2.1",
"lodash": "4.17.23", "lodash": "4.17.23",
"semver": "7.7.4", "semver": "7.7.4",
"toml": "3.0.0" "smol-toml": "1.6.1"
}, },
"devDependencies": { "devDependencies": {
"@eslint/js": "10.0.1", "@eslint/js": "10.0.1",
+1 -1
View File
@@ -8,7 +8,7 @@ import * as tc from '@actions/tool-cache'
import * as semver from 'semver' import * as semver from 'semver'
import * as csv from 'csv-parse/sync' import * as csv from 'csv-parse/sync'
import _ from 'lodash' import _ from 'lodash'
import toml from 'toml' import toml from 'smol-toml'
const __dirname = path.dirname(fileURLToPath(import.meta.url)) const __dirname = path.dirname(fileURLToPath(import.meta.url))
+3 -1
View File
@@ -1040,7 +1040,9 @@ describe('mise.toml file', () => {
"erlang" = "${erlang}" "erlang" = "${erlang}"
elixir = { version = "${elixir}", postinstall="mix deps.get" } # comment, with space and ref: elixir = { version = "${elixir}", postinstall="mix deps.get" } # comment, with space and ref:
"not-gleam" = 0.23 # not picked up "not-gleam" = 0.23 # not picked up
"gleam" = "${gleam}" \n` "gleam" = "${gleam}"
[env]
_.file = ".env"\n`
const filename = 'test/mise.toml' const filename = 'test/mise.toml'
if (process.platform === 'win32') { if (process.platform === 'win32') {
// Force \r\n to test in Windows // Force \r\n to test in Windows