@carlesandres/house 0.10.2 → 0.10.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,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.10.3
4
+
5
+ ### Patch Changes
6
+
7
+ - A Markdown file deleted or renamed while house scans the folder is now skipped, instead of failing the scan with "scan failed: unable to read discovery root".
8
+
3
9
  ## 0.10.2
4
10
 
5
11
  ### Patch Changes
package/dist/bin.js CHANGED
File without changes
package/dist/index.js CHANGED
@@ -3067,7 +3067,7 @@ import { useState as useState6 } from "react";
3067
3067
  // package.json
3068
3068
  var package_default = {
3069
3069
  name: "@carlesandres/house",
3070
- version: "0.10.2",
3070
+ version: "0.10.3",
3071
3071
  description: "TUI-first markdown reader on opentui",
3072
3072
  type: "module",
3073
3073
  license: "MIT",
@@ -3104,6 +3104,7 @@ var package_default = {
3104
3104
  house: "dist/bin.js"
3105
3105
  },
3106
3106
  scripts: {
3107
+ "audit:shipped": "bun run dev/audit-shipped.ts",
3107
3108
  build: "bun run build:cli",
3108
3109
  "build:cli": "bun run dev/build-cli.ts",
3109
3110
  "build:npm-main": "bun run dev/build-npm-main.ts",
@@ -5118,6 +5119,10 @@ var DEFAULT_BATCH_SIZE = 64;
5118
5119
  var slash = (value) => value.split(sep2).join("/");
5119
5120
  var compare = (left, right) => left < right ? -1 : left > right ? 1 : 0;
5120
5121
  var missing = (error) => typeof error === "object" && error !== null && ("code" in error) && error.code === "ENOENT";
5122
+ var skipMissing = (error) => {
5123
+ if (!missing(error))
5124
+ throw error;
5125
+ };
5121
5126
  var inside = (root, path) => {
5122
5127
  const candidate = relative2(root, path);
5123
5128
  return candidate === "" || !candidate.startsWith(`..${sep2}`) && candidate !== "..";
@@ -5239,9 +5244,15 @@ var scanFiles = async (input, policyInput, options = {}) => {
5239
5244
  const next = frozenRecord(lexical, root, value2);
5240
5245
  records[index] = inside(root, next.absolutePath) ? next : null;
5241
5246
  };
5242
- const value = metadata(path);
5247
+ let value;
5248
+ try {
5249
+ value = metadata(path);
5250
+ } catch (error) {
5251
+ skipMissing(error);
5252
+ continue;
5253
+ }
5243
5254
  if (thenable(value))
5244
- pendingMetadata.push(value.then(apply));
5255
+ pendingMetadata.push(value.then(apply, skipMissing));
5245
5256
  else
5246
5257
  apply(value);
5247
5258
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carlesandres/house",
3
- "version": "0.10.2",
3
+ "version": "0.10.3",
4
4
  "description": "TUI-first markdown reader on opentui",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -37,6 +37,7 @@
37
37
  "house": "dist/bin.js"
38
38
  },
39
39
  "scripts": {
40
+ "audit:shipped": "bun run dev/audit-shipped.ts",
40
41
  "build": "bun run build:cli",
41
42
  "build:cli": "bun run dev/build-cli.ts",
42
43
  "build:npm-main": "bun run dev/build-npm-main.ts",
@@ -62,10 +63,10 @@
62
63
  "verify:github": "bun test test/github-emulation.test.ts"
63
64
  },
64
65
  "optionalDependencies": {
65
- "@carlesandres/house-darwin-arm64": "0.10.2",
66
- "@carlesandres/house-darwin-x64": "0.10.2",
67
- "@carlesandres/house-linux-arm64": "0.10.2",
68
- "@carlesandres/house-linux-x64": "0.10.2"
66
+ "@carlesandres/house-darwin-arm64": "0.10.3",
67
+ "@carlesandres/house-darwin-x64": "0.10.3",
68
+ "@carlesandres/house-linux-arm64": "0.10.3",
69
+ "@carlesandres/house-linux-x64": "0.10.3"
69
70
  },
70
71
  "dependencies": {
71
72
  "@effect/atom-react": "4.0.6",