@gjsify/cli 0.7.4 → 0.7.5

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.
@@ -29,16 +29,12 @@ export async function promptHidden(question) {
29
29
  let buf = '';
30
30
  stdin.setRawMode(true);
31
31
  stdin.resume();
32
+ // setEncoding makes 'data' emit decoded STRINGS — including under GJS,
33
+ // where @gjsify/process honours it via StringDecoder (was a no-op stub;
34
+ // bytes broke `ch === '\r'` so Enter never submitted). So we can iterate
35
+ // characters directly here; do NOT reintroduce a byte-normalising shim.
32
36
  stdin.setEncoding('utf-8');
33
- // Do NOT assume `chunk` is a string: under GJS `@gjsify/process` does
34
- // not honour `setEncoding('utf-8')` in raw mode, so each chunk arrives
35
- // as bytes (a Buffer). Iterating bytes makes `ch === '\r'` always false
36
- // and Enter (byte 13) coerce past `ch >= ' '` (→ `13 >= 0`) so it was
37
- // masked as another `*` and the prompt never submitted. Normalise to a
38
- // string first (same shape as readLine's handler), so this works on
39
- // both Node (string) and GJS (bytes) — aligning with `npm login`.
40
- const onData = (raw) => {
41
- const chunk = typeof raw === 'string' ? raw : raw.toString('utf-8');
37
+ const onData = (chunk) => {
42
38
  for (const ch of chunk) {
43
39
  if (ch === '\r' || ch === '\n') {
44
40
  cleanup();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/cli",
3
- "version": "0.7.4",
3
+ "version": "0.7.5",
4
4
  "description": "CLI for Gjsify",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -120,19 +120,19 @@
120
120
  "cli"
121
121
  ],
122
122
  "dependencies": {
123
- "@gjsify/buffer": "^0.7.4",
124
- "@gjsify/create-app": "^0.7.4",
125
- "@gjsify/node-globals": "^0.7.4",
126
- "@gjsify/node-polyfills": "^0.7.4",
127
- "@gjsify/npm-registry": "^0.7.4",
128
- "@gjsify/resolve-npm": "^0.7.4",
129
- "@gjsify/rolldown-plugin-gjsify": "^0.7.4",
130
- "@gjsify/rolldown-plugin-pnp": "^0.7.4",
131
- "@gjsify/semver": "^0.7.4",
132
- "@gjsify/tar": "^0.7.4",
133
- "@gjsify/tsc": "^0.7.4",
134
- "@gjsify/web-polyfills": "^0.7.4",
135
- "@gjsify/workspace": "^0.7.4",
123
+ "@gjsify/buffer": "^0.7.5",
124
+ "@gjsify/create-app": "^0.7.5",
125
+ "@gjsify/node-globals": "^0.7.5",
126
+ "@gjsify/node-polyfills": "^0.7.5",
127
+ "@gjsify/npm-registry": "^0.7.5",
128
+ "@gjsify/resolve-npm": "^0.7.5",
129
+ "@gjsify/rolldown-plugin-gjsify": "^0.7.5",
130
+ "@gjsify/rolldown-plugin-pnp": "^0.7.5",
131
+ "@gjsify/semver": "^0.7.5",
132
+ "@gjsify/tar": "^0.7.5",
133
+ "@gjsify/tsc": "^0.7.5",
134
+ "@gjsify/web-polyfills": "^0.7.5",
135
+ "@gjsify/workspace": "^0.7.5",
136
136
  "cosmiconfig": "^9.0.2",
137
137
  "get-tsconfig": "^4.14.0",
138
138
  "pkg-types": "^2.3.1",
@@ -140,13 +140,13 @@
140
140
  "yargs": "^18.0.0"
141
141
  },
142
142
  "devDependencies": {
143
- "@gjsify/unit": "^0.7.4",
143
+ "@gjsify/unit": "^0.7.5",
144
144
  "@types/yargs": "^17.0.35",
145
145
  "typescript": "^6.0.3"
146
146
  },
147
147
  "peerDependencies": {
148
- "@gjsify/oxfmt-native": "^0.7.4",
149
- "@gjsify/rolldown-native": "^0.7.4"
148
+ "@gjsify/oxfmt-native": "^0.7.5",
149
+ "@gjsify/rolldown-native": "^0.7.5"
150
150
  },
151
151
  "peerDependenciesMeta": {
152
152
  "@gjsify/oxfmt-native": {