@thi.ng/block-fs 0.6.31 → 0.6.33

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/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
8
8
 
9
9
  > [!NOTE]
10
- > This is one of 210 standalone projects, maintained as part
10
+ > This is one of 211 standalone projects, maintained as part
11
11
  > of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
12
12
  > and anti-framework.
13
13
  >
package/cli/convert.js CHANGED
@@ -54,7 +54,7 @@ const CONVERT = {
54
54
  logger.info("root dir block:", bfs.rootDirBlockID);
55
55
  logger.info("first data block:", bfs.dataStartBlockID);
56
56
  logger.info("block data size:", bfs.blockDataSize);
57
- for (let f of collected.files) {
57
+ for (const f of collected.files) {
58
58
  const data = readBinary(f.src, logger);
59
59
  logger.info("writing file:", f.dest, "size:", data.length);
60
60
  await bfs.writeFile(f.dest, data);
@@ -83,7 +83,7 @@ const collectFiles = ({
83
83
  const $include = include?.map((x) => new RegExp(x));
84
84
  const $exclude = exclude?.map((x) => new RegExp(x));
85
85
  let total = 0;
86
- for (let f of files(root)) {
86
+ for (const f of files(root)) {
87
87
  const stats = statSync(f);
88
88
  if ($exclude && $exclude.some((x) => x.test(f))) continue;
89
89
  if ($include && !$include.some((x) => x.test(f))) continue;
@@ -95,7 +95,7 @@ const collectFiles = ({
95
95
  ctime: stats.ctimeMs,
96
96
  mtime: stats.mtimeMs
97
97
  });
98
- for (let d of pathsForFile(dest)) dirs.add(d);
98
+ for (const d of pathsForFile(dest)) dirs.add(d);
99
99
  total += stats.size;
100
100
  }
101
101
  return { files: filtered, dirs: [...dirs], size: total };
@@ -113,7 +113,7 @@ const computeBlockCount = (collected, blockSize, logger, numBlocks) => {
113
113
  logger.info("num entries:", numEntries);
114
114
  logger.info("num entry blocks:", numEntryBlocks);
115
115
  blocks += numEntryBlocks;
116
- for (let f of collected.files) {
116
+ for (const f of collected.files) {
117
117
  const size = ceil(f.size / blockDataSize);
118
118
  logger.debug("file:", f.src, "blocks:", size);
119
119
  blocks += size;
package/cli/list.js CHANGED
@@ -78,7 +78,7 @@ const LIST = {
78
78
  maxWidths[i2] = Math.max(maxWidths[i2], row[i2].length);
79
79
  }
80
80
  }
81
- for (let row of rows) {
81
+ for (const row of rows) {
82
82
  console.log(row.map((x, i) => x.padEnd(maxWidths[i])).join(" "));
83
83
  }
84
84
  }
package/directory.js CHANGED
@@ -30,7 +30,7 @@ class Directory {
30
30
  entries.push(entry);
31
31
  }
32
32
  entries.sort(cmp);
33
- for (let entry of entries) {
33
+ for (const entry of entries) {
34
34
  yield entry;
35
35
  if (entry.isDirectory()) yield* entry.directory.tree(cmp);
36
36
  }
package/fs.js CHANGED
@@ -442,11 +442,11 @@ class BlockFS {
442
442
  const { blockIndex, storage, tmp } = this;
443
443
  const blockSize = storage.blockSize;
444
444
  const updatedBlocks = /* @__PURE__ */ new Set();
445
- for (let id of ids) {
445
+ for (const id of ids) {
446
446
  blockIndex.setAt(id, state);
447
447
  updatedBlocks.add((id >>> 3) / blockSize | 0);
448
448
  }
449
- for (let id of updatedBlocks) {
449
+ for (const id of updatedBlocks) {
450
450
  this.opts.logger.debug("update block index", id);
451
451
  const chunk = blockIndex.data.subarray(
452
452
  id * blockSize,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/block-fs",
3
- "version": "0.6.31",
3
+ "version": "0.6.33",
4
4
  "description": "Customizable block-based storage, adapters & file system layer",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -42,18 +42,18 @@
42
42
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
43
43
  },
44
44
  "dependencies": {
45
- "@thi.ng/api": "^8.12.9",
46
- "@thi.ng/args": "^3.2.4",
47
- "@thi.ng/binary": "^3.4.67",
48
- "@thi.ng/bitfield": "^2.4.21",
49
- "@thi.ng/checks": "^3.7.25",
50
- "@thi.ng/compare": "^2.4.35",
51
- "@thi.ng/errors": "^2.5.49",
52
- "@thi.ng/file-io": "^2.2.19",
53
- "@thi.ng/logger": "^3.2.8",
54
- "@thi.ng/mime": "^2.8.1",
55
- "@thi.ng/random": "^4.1.34",
56
- "@thi.ng/strings": "^3.9.30"
45
+ "@thi.ng/api": "^8.12.10",
46
+ "@thi.ng/args": "^3.2.5",
47
+ "@thi.ng/binary": "^3.5.0",
48
+ "@thi.ng/bitfield": "^2.4.23",
49
+ "@thi.ng/checks": "^3.8.0",
50
+ "@thi.ng/compare": "^2.4.36",
51
+ "@thi.ng/errors": "^2.5.50",
52
+ "@thi.ng/file-io": "^2.2.20",
53
+ "@thi.ng/logger": "^3.2.9",
54
+ "@thi.ng/mime": "^2.8.2",
55
+ "@thi.ng/random": "^4.1.35",
56
+ "@thi.ng/strings": "^3.9.31"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@types/node": "^24.10.1",
@@ -143,5 +143,5 @@
143
143
  "status": "alpha",
144
144
  "year": 2024
145
145
  },
146
- "gitHead": "fdca77cabf47dd23a9ab17a5ca13e3060075c12c\n"
146
+ "gitHead": "8625a1c6383737a8fdbe7a3f96ea3cbabc957fa6\n"
147
147
  }