lingo.dev 0.111.11 → 0.111.13

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.mjs CHANGED
@@ -3091,26 +3091,44 @@ async function findBiomeConfig(startPath) {
3091
3091
  return null;
3092
3092
  }
3093
3093
  async function formatDataWithBiome(data, filePath, options) {
3094
+ let configPath = null;
3094
3095
  try {
3095
3096
  const biome = await Biome.create({
3096
3097
  distribution: Distribution.NODE
3097
3098
  });
3098
- const configPath = await findBiomeConfig(filePath);
3099
+ const openResult = biome.openProject(".");
3100
+ const projectKey = openResult.projectKey;
3101
+ configPath = await findBiomeConfig(filePath);
3099
3102
  if (!configPath && !options.alwaysFormat) {
3103
+ console.log();
3104
+ console.log(
3105
+ `\u26A0\uFE0F Biome config not found for ${path12.basename(filePath)} - skipping formatting`
3106
+ );
3100
3107
  return data;
3101
3108
  }
3102
3109
  if (configPath) {
3103
3110
  const configContent = await fs9.readFile(configPath, "utf-8");
3104
- biome.applyConfiguration(JSON.parse(configContent));
3111
+ try {
3112
+ const config = JSON.parse(configContent);
3113
+ biome.applyConfiguration(projectKey, config);
3114
+ } catch (parseError) {
3115
+ throw new Error(
3116
+ `Invalid Biome configuration in ${configPath}: ${parseError instanceof Error ? parseError.message : "JSON parse error"}`
3117
+ );
3118
+ }
3105
3119
  }
3106
- const formatted = biome.formatContent(data, {
3120
+ const formatted = biome.formatContent(projectKey, data, {
3107
3121
  filePath
3108
3122
  });
3109
3123
  return formatted.content;
3110
3124
  } catch (error) {
3111
- if (error instanceof Error) {
3112
- console.log();
3113
- console.log("\u26A0\uFE0F Biome formatting failed:", error.message);
3125
+ const errorMessage = error instanceof Error ? error.message || error.stackTrace?.toString().split("\n")[0] : "";
3126
+ if (errorMessage?.includes("does not exist in the workspace")) {
3127
+ } else {
3128
+ console.log(`\u26A0\uFE0F Biome skipped ${path12.basename(filePath)}`);
3129
+ if (errorMessage) {
3130
+ console.log(` ${errorMessage}`);
3131
+ }
3114
3132
  }
3115
3133
  return data;
3116
3134
  }
@@ -11253,7 +11271,7 @@ async function renderHero2() {
11253
11271
  // package.json
11254
11272
  var package_default = {
11255
11273
  name: "lingo.dev",
11256
- version: "0.111.11",
11274
+ version: "0.111.13",
11257
11275
  description: "Lingo.dev CLI",
11258
11276
  private: false,
11259
11277
  publishConfig: {
@@ -11383,8 +11401,8 @@ var package_default = {
11383
11401
  "@babel/parser": "^7.27.1",
11384
11402
  "@babel/traverse": "^7.27.4",
11385
11403
  "@babel/types": "^7.27.1",
11386
- "@biomejs/js-api": "^0.6.2",
11387
- "@biomejs/wasm-nodejs": "^1.8.3",
11404
+ "@biomejs/js-api": "^3.0.0",
11405
+ "@biomejs/wasm-nodejs": "^2.2.4",
11388
11406
  "@datocms/cma-client-node": "^4.0.1",
11389
11407
  "@gitbeaker/rest": "^39.34.3",
11390
11408
  "@inkjs/ui": "^2.0.0",