chore(deps): switch to smol-toml (#1169)

This commit is contained in:
Fabian-Lars
2025-11-13 16:24:28 +01:00
committed by GitHub
parent 9b645673d5
commit 7485c956ab
7 changed files with 1194 additions and 2191 deletions
+5
View File
@@ -0,0 +1,5 @@
---
action: patch
---
Switch from unmaintained `@iarna/toml` to `smol-toml`. No user-facing changes.
+1 -2
View File
@@ -11,8 +11,7 @@ on:
jobs:
CI:
strategy:
fail-fast: false
continue-on-error: true
runs-on: ubuntu-latest
steps:
+1161 -2162
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -26,10 +26,10 @@
"dependencies": {
"@actions/core": "1.11.1",
"@actions/github": "6.0.1",
"@iarna/toml": "2.2.5",
"execa": "9.6.0",
"globby": "15.0.0",
"json5": "2.2.3",
"smol-toml": "1.4.2",
"string-argv": "0.3.2",
"tslib": "2.8.1"
},
+19 -19
View File
@@ -14,9 +14,6 @@ importers:
'@actions/github':
specifier: 6.0.1
version: 6.0.1
'@iarna/toml':
specifier: 2.2.5
version: 2.2.5
execa:
specifier: 9.6.0
version: 9.6.0
@@ -26,6 +23,9 @@ importers:
json5:
specifier: 2.2.3
version: 2.2.3
smol-toml:
specifier: 1.4.2
version: 1.4.2
string-argv:
specifier: 0.3.2
version: 0.3.2
@@ -196,9 +196,6 @@ packages:
resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==}
engines: {node: '>=18.18'}
'@iarna/[email protected]':
resolution: {integrity: sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==}
'@nodelib/[email protected]':
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
engines: {node: '>= 8'}
@@ -1078,6 +1075,10 @@ packages:
[email protected]:
resolution: {integrity: sha512-cf723wn9JeRIYP9tdtd86GuqoR5937u64Io+CYjlm2i7jvu7g0H+Cp0l0ShAf/4ZL+ISUTVT+8Qzz7RZmp9FjA==}
[email protected]:
resolution: {integrity: sha512-rInDH6lCNiEyn3+hH8KVGFdbjc099j47+OSgbMrfDYX1CmXLfdKd7qi6IfcWj2wFxvSVkuI46M+wPGYfEOEj6g==}
engines: {node: '>= 18'}
[email protected]:
resolution: {integrity: sha512-INb7TM37/mAcsGmc9hyyI6+QR3rR1zVRu36B0NeGXKnOOLiZOfER5SA+N7X7k3yUYRzLWafduTDvJAfDswwEww==}
@@ -1316,9 +1317,9 @@ snapshots:
- encoding
- mocha
'@covector/[email protected]':
'@covector/[email protected]([email protected])':
dependencies:
'@covector/command': 0.8.0
'@covector/command': 0.8.0([email protected])
'@covector/files': 0.8.0
effection: 2.0.8([email protected])
js-yaml: 4.1.0
@@ -1329,9 +1330,10 @@ snapshots:
unified: 9.2.2
transitivePeerDependencies:
- encoding
- mocha
- supports-color
'@covector/[email protected]':
'@covector/[email protected]([email protected])':
dependencies:
'@covector/files': 0.8.0
effection: 2.0.8([email protected])
@@ -1341,14 +1343,16 @@ snapshots:
unified: 9.2.2
transitivePeerDependencies:
- encoding
- mocha
- supports-color
'@covector/[email protected]':
'@covector/[email protected]([email protected])':
dependencies:
'@effection/process': 2.1.4
effection: 2.0.8([email protected])
transitivePeerDependencies:
- encoding
- mocha
'@covector/[email protected]':
dependencies:
@@ -1395,8 +1399,6 @@ snapshots:
dependencies:
effection: 2.0.8([email protected])
mocha: 10.4.0
transitivePeerDependencies:
- encoding
'@effection/[email protected]':
dependencies:
@@ -1404,8 +1406,6 @@ snapshots:
ctrlc-windows: 2.2.0
effection: 2.0.8([email protected])
shellwords: 0.1.1
transitivePeerDependencies:
- encoding
'@effection/[email protected]':
dependencies:
@@ -1475,8 +1475,6 @@ snapshots:
'@humanwhocodes/[email protected]': {}
'@iarna/[email protected]': {}
'@nodelib/[email protected]':
dependencies:
'@nodelib/fs.stat': 2.0.5
@@ -1777,9 +1775,9 @@ snapshots:
dependencies:
'@clack/prompts': 0.7.0
'@covector/apply': 0.10.0([email protected])
'@covector/assemble': 0.12.0
'@covector/changelog': 0.12.0
'@covector/command': 0.8.0
'@covector/assemble': 0.12.0([email protected])
'@covector/changelog': 0.12.0([email protected])
'@covector/command': 0.8.0([email protected])
'@covector/files': 0.8.0
effection: 2.0.8([email protected])
globby: 11.1.0
@@ -2404,6 +2402,8 @@ snapshots:
[email protected]: {}
[email protected]: {}
[email protected]:
dependencies:
atomic-sleep: 1.0.0
+2 -2
View File
@@ -1,7 +1,7 @@
import { existsSync, readFileSync, writeFileSync } from 'fs';
import path, { join } from 'path';
import { parse as parseToml } from '@iarna/toml';
import TOML from 'smol-toml';
import JSON5 from 'json5';
import { TargetPlatform, TauriConfigV2 } from './types';
@@ -38,7 +38,7 @@ function _tryParseJson5Config(contents: string): TauriConfigV2 | null {
function _tryParseTomlConfig(contents: string): TauriConfigV2 | null {
try {
const config = parseToml(contents) as unknown as TauriConfigV2;
const config = TOML.parse(contents) as unknown as TauriConfigV2;
return config;
} catch (e) {
// @ts-expect-error Catching errors in typescript is a headache
+5 -5
View File
@@ -8,7 +8,7 @@ import path, {
sep,
} from 'node:path';
import { parse as parseToml } from '@iarna/toml';
import TOML from 'smol-toml';
import { execa } from 'execa';
import { globbySync } from 'globby';
@@ -202,7 +202,7 @@ export function getWorkspaceDir(dir: string): string | null {
while (dir.length && dir[dir.length - 1] !== sep) {
const manifestPath = join(dir, 'Cargo.toml');
if (existsSync(manifestPath)) {
const toml = parseToml(readFileSync(manifestPath).toString()) as {
const toml = TOML.parse(readFileSync(manifestPath).toString()) as {
workspace?: { members?: string[]; exclude?: string[] };
};
if (toml.workspace?.members) {
@@ -254,7 +254,7 @@ export function getTargetDir(
cargoConfigPath = join(dir, '.cargo/config.toml');
}
if (existsSync(cargoConfigPath)) {
const cargoConfig = parseToml(
const cargoConfig = TOML.parse(
readFileSync(cargoConfigPath).toString(),
) as CargoConfig;
@@ -295,7 +295,7 @@ export function getTargetDir(
export function getCargoManifest(dir: string): CargoManifest {
const manifestPath = join(dir, 'Cargo.toml');
const cargoManifest = parseToml(
const cargoManifest = TOML.parse(
readFileSync(manifestPath).toString(),
) as unknown as CargoManifest & {
package: {
@@ -319,7 +319,7 @@ export function getCargoManifest(dir: string): CargoManifest {
);
}
const manifestPath = join(workspaceDir, 'Cargo.toml');
const workspaceManifest = parseToml(
const workspaceManifest = TOML.parse(
readFileSync(manifestPath).toString(),
) as unknown as CargoManifest;