fx 34.0.0 → 35.0.0

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/index.js +7 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -272,8 +272,12 @@ async function read(fd = 0) {
272
272
  }
273
273
 
274
274
  function isFile(fs, path) {
275
- const stat = fs.statSync(path, {throwIfNoEntry: false})
276
- return stat !== undefined && stat.isFile()
275
+ try {
276
+ const stat = fs.statSync(path, {throwIfNoEntry: false})
277
+ return stat !== undefined && stat.isFile()
278
+ } catch (err) {
279
+ return false
280
+ }
277
281
  }
278
282
 
279
283
  function sleepSync(ms) {
@@ -290,6 +294,7 @@ function* readLine(stdin) {
290
294
  buffer += ch
291
295
  }
292
296
  }
297
+ if (buffer.length > 0) yield buffer
293
298
  return buffer
294
299
  }
295
300
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fx",
3
- "version": "34.0.0",
3
+ "version": "35.0.0",
4
4
  "bin": {
5
5
  "fx": "index.js"
6
6
  },