bunmicro 0.8.2 → 0.8.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.8.3] - 2026-06-02
4
+ - Fixed Linux failed to parse php.yaml crashes the whole program
5
+ - Fixed Linux espeak-ng args passing
6
+
3
7
  ## [0.8.2] - 2026-06-02
4
8
  - Fixed Windows TTS function
5
9
  - Added ttslang for Windows
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bunmicro",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
4
4
  "description": "Bun JavaScript rewrite of the micro editor originally in Golang",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
@@ -45,9 +45,15 @@ export async function loadSyntaxDefinitions(runtime) {
45
45
 
46
46
  const definitions = [];
47
47
  for (const file of runtime.list(1)) {
48
- const source = Bun.YAML.parse(await file.text());
49
- const header = headers.get(file.name) ?? parseHeaderYaml(source);
50
- definitions.push(new SyntaxDefinition(header, source));
48
+ try{
49
+ const source = Bun.YAML.parse(await file.text());
50
+ const header = headers.get(file.name) ?? parseHeaderYaml(source);
51
+ definitions.push(new SyntaxDefinition(header, source));
52
+ }catch(e){
53
+ console.error("Failed to parse syntax yaml:",file.name)
54
+ console.error(" Will not highlight this kind of file")
55
+ console.error(" @ loadSyntaxDefinitions ")
56
+ }
51
57
  }
52
58
  return definitions;
53
59
  }
package/src/index.js CHANGED
@@ -4898,12 +4898,12 @@ function detectTtsCmd() {
4898
4898
  }
4899
4899
 
4900
4900
  // Linux / Android fallback: espeak-ng / espeak
4901
- // --speed=<wpm> (175 = normal), --pitch=<n> (0-99, 50 = normal)
4901
+ // Speed: -s <wpm> (175 = normal), Pitch: -p <n> (0-99, 50 = normal)
4902
4902
  for (const bin of ["espeak-ng", "espeak"]) {
4903
4903
  if (runSync(["sh", "-c", `command -v ${bin}`], { stdout: "ignore", stderr: "ignore" }).ok) {
4904
4904
  const spd = Math.round(175 * speed);
4905
4905
  const pit = Math.max(0, Math.min(99, Math.round(50 * pitch)));
4906
- return { cmd: [bin, `--speed=${spd}`, `--pitch=${pit}`], via: "arg" };
4906
+ return { cmd: [bin, '-s', spd, '-p', pit], via: "arg" };
4907
4907
  }
4908
4908
  }
4909
4909