@glyphlang/glyph 0.1.7 → 0.1.8

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.
Files changed (2) hide show
  1. package/bin/glyph.js +15 -0
  2. package/package.json +6 -6
package/bin/glyph.js CHANGED
@@ -8,6 +8,7 @@
8
8
  // esbuild/swc: no postinstall download, no curl-pipe-bash.
9
9
 
10
10
  const { spawnSync } = require("child_process");
11
+ const fs = require("fs");
11
12
  const { resolveBinary } = require("./resolve.js");
12
13
 
13
14
  let binary;
@@ -18,6 +19,20 @@ try {
18
19
  process.exit(1);
19
20
  }
20
21
 
22
+ // Ensure the binary is executable. GitHub's artifact upload/download (used to
23
+ // carry the built binaries into the publish job) does not preserve the Unix
24
+ // execute bit, so the tarball can ship a non-executable file and `spawn` would
25
+ // fail with EACCES. Restoring the bit here makes the launcher robust regardless
26
+ // of how the package was built. Best-effort: skip on Windows (no execute bit)
27
+ // and ignore a read-only install (the spawn error below still reports clearly).
28
+ if (process.platform !== "win32") {
29
+ try {
30
+ fs.chmodSync(binary, 0o755);
31
+ } catch {
32
+ // ignore — a read-only location; spawn will surface any real problem.
33
+ }
34
+ }
35
+
21
36
  const result = spawnSync(binary, process.argv.slice(2), { stdio: "inherit" });
22
37
  if (result.error) {
23
38
  console.error(`glyph: failed to launch the compiler: ${result.error.message}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glyphlang/glyph",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "The Glyph compiler: a statically typed language that transpiles to TypeScript, designed so AI agents can read, write, and modify code safely.",
5
5
  "bin": {
6
6
  "glyph": "bin/glyph.js"
@@ -13,11 +13,11 @@
13
13
  "node": ">=18"
14
14
  },
15
15
  "optionalDependencies": {
16
- "@glyphlang/darwin-x64": "0.1.7",
17
- "@glyphlang/darwin-arm64": "0.1.7",
18
- "@glyphlang/linux-x64": "0.1.7",
19
- "@glyphlang/linux-arm64": "0.1.7",
20
- "@glyphlang/win32-x64": "0.1.7"
16
+ "@glyphlang/darwin-x64": "0.1.8",
17
+ "@glyphlang/darwin-arm64": "0.1.8",
18
+ "@glyphlang/linux-x64": "0.1.8",
19
+ "@glyphlang/linux-arm64": "0.1.8",
20
+ "@glyphlang/win32-x64": "0.1.8"
21
21
  },
22
22
  "repository": {
23
23
  "type": "git",