lingo.dev 0.111.12 → 0.111.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.cjs +97 -95
- package/build/cli.cjs.map +1 -1
- package/build/cli.mjs +15 -13
- package/build/cli.mjs.map +1 -1
- package/package.json +1 -1
package/build/cli.mjs
CHANGED
|
@@ -3067,7 +3067,7 @@ async function formatDataWithPrettier(data, filePath, options) {
|
|
|
3067
3067
|
import path12 from "path";
|
|
3068
3068
|
import fs9 from "fs/promises";
|
|
3069
3069
|
import { Biome, Distribution } from "@biomejs/js-api";
|
|
3070
|
-
|
|
3070
|
+
import { parse as parseJsonc } from "jsonc-parser";
|
|
3071
3071
|
function createBiomeLoader(options) {
|
|
3072
3072
|
return createBaseFormatterLoader(options, async (data, filePath) => {
|
|
3073
3073
|
return await formatDataWithBiome(data, filePath, options);
|
|
@@ -3101,13 +3101,18 @@ async function formatDataWithBiome(data, filePath, options) {
|
|
|
3101
3101
|
const projectKey = openResult.projectKey;
|
|
3102
3102
|
configPath = await findBiomeConfig(filePath);
|
|
3103
3103
|
if (!configPath && !options.alwaysFormat) {
|
|
3104
|
+
console.log();
|
|
3105
|
+
console.log(
|
|
3106
|
+
`\u26A0\uFE0F Biome config not found for ${path12.basename(filePath)} - skipping formatting`
|
|
3107
|
+
);
|
|
3104
3108
|
return data;
|
|
3105
3109
|
}
|
|
3106
3110
|
if (configPath) {
|
|
3107
3111
|
const configContent = await fs9.readFile(configPath, "utf-8");
|
|
3108
3112
|
try {
|
|
3109
|
-
const config =
|
|
3110
|
-
|
|
3113
|
+
const config = parseJsonc(configContent);
|
|
3114
|
+
const { $schema, vcs, files, ...relevantConfig } = config;
|
|
3115
|
+
biome.applyConfiguration(projectKey, relevantConfig);
|
|
3111
3116
|
} catch (parseError) {
|
|
3112
3117
|
throw new Error(
|
|
3113
3118
|
`Invalid Biome configuration in ${configPath}: ${parseError instanceof Error ? parseError.message : "JSON parse error"}`
|
|
@@ -3119,15 +3124,12 @@ async function formatDataWithBiome(data, filePath, options) {
|
|
|
3119
3124
|
});
|
|
3120
3125
|
return formatted.content;
|
|
3121
3126
|
} catch (error) {
|
|
3122
|
-
const
|
|
3123
|
-
if (
|
|
3124
|
-
|
|
3125
|
-
console.log();
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
);
|
|
3129
|
-
if (error instanceof Error && error.message) {
|
|
3130
|
-
console.log(` ${error.message}`);
|
|
3127
|
+
const errorMessage = error instanceof Error ? error.message || error.stackTrace?.toString().split("\n")[0] : "";
|
|
3128
|
+
if (errorMessage?.includes("does not exist in the workspace")) {
|
|
3129
|
+
} else {
|
|
3130
|
+
console.log(`\u26A0\uFE0F Biome skipped ${path12.basename(filePath)}`);
|
|
3131
|
+
if (errorMessage) {
|
|
3132
|
+
console.log(` ${errorMessage}`);
|
|
3131
3133
|
}
|
|
3132
3134
|
}
|
|
3133
3135
|
return data;
|
|
@@ -11271,7 +11273,7 @@ async function renderHero2() {
|
|
|
11271
11273
|
// package.json
|
|
11272
11274
|
var package_default = {
|
|
11273
11275
|
name: "lingo.dev",
|
|
11274
|
-
version: "0.111.
|
|
11276
|
+
version: "0.111.14",
|
|
11275
11277
|
description: "Lingo.dev CLI",
|
|
11276
11278
|
private: false,
|
|
11277
11279
|
publishConfig: {
|