@davidsouther/jiffies 2.1.0 → 2.1.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@davidsouther/jiffies",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "private": false,
5
5
  "displayName": "JEFRi Jiffies",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
- import { describe, it, expect } from "../scope/index.js"
2
- import { FC } from "./fc.js"
3
- import { button, div, form, input, label, small } from "./html.js"
1
+ import { describe, it, expect } from "../scope/index.js";
2
+ import { button, div, form, input, label, small } from "./html.js";
3
+ import { FC } from "./fc.js";
4
4
 
5
5
  describe("FC", () => {
6
6
  it("creates FCs", () => {
package/src/fs.test.ts CHANGED
@@ -81,15 +81,19 @@ describe("FileSystem", () => {
81
81
 
82
82
  describe("ObjectFileSystem", () => {
83
83
  it("treats object keys as directories and final values as strings", async () => {
84
- let fs = new FileSystem(
85
- new ObjectFileSystemAdapter({
86
- deep: {
87
- hello: "world",
88
- bonjour: "monde",
89
- },
90
- other_file: "text",
91
- })
92
- );
84
+ const fsAdapter = new ObjectFileSystemAdapter({
85
+ deep: {
86
+ hello: "world",
87
+ bonjour: "monde",
88
+ },
89
+ other_file: "text",
90
+ });
91
+ expect([
92
+ ...Object.keys(
93
+ (fsAdapter as unknown as { fs: Record<string, string> }).fs
94
+ ),
95
+ ]).toEqual(["/deep/hello", "/deep/bonjour", "/other_file"]);
96
+ let fs = new FileSystem(fsAdapter);
93
97
 
94
98
  const deep = await fs.stat("/deep");
95
99
  expect(deep.isDirectory()).toBe(true);
package/src/fs.ts CHANGED
@@ -231,7 +231,7 @@ function reduceObjectFileSystem(
231
231
  level[`/${k}`] = v;
232
232
  } else {
233
233
  for (let [k2, v2] of Object.entries(reduceObjectFileSystem(v))) {
234
- level[`/${k}/${k2}`] = v2;
234
+ level[`/${k}${k2}`] = v2;
235
235
  }
236
236
  }
237
237
  }