shelving 1.128.1 → 1.128.2

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
@@ -11,7 +11,7 @@
11
11
  "state-management",
12
12
  "query-builder"
13
13
  ],
14
- "version": "1.128.1",
14
+ "version": "1.128.2",
15
15
  "repository": "https://github.com/dhoulb/shelving",
16
16
  "author": "Dave Houlbrooke <dave@shax.com>",
17
17
  "license": "0BSD",
@@ -43,30 +43,26 @@
43
43
  "node": ">=16.0.0"
44
44
  },
45
45
  "scripts": {
46
- "test": "npm run test:biome && npm run test:typescript && npm run test:jest",
47
- "test:biome": "biome check .",
48
- "test:typescript": "tsc --noEmit",
49
- "test:jest": "jest --detectOpenHandles",
50
- "fix": "npm run fix:biome",
46
+ "test": "bun run test:check && bun run test:types && bun run test:unit",
47
+ "test:check": "biome check .",
48
+ "test:types": "tsc --noEmit",
49
+ "test:unit": "bun test",
50
+ "fix": "bun run fix:biome",
51
51
  "fix:biome": "biome check --apply .",
52
- "build": "npm run build:setup && npm run build:copy && npm run build:typescript && npm run build:check && npm run build:jest",
52
+ "build": "bun run build:setup && bun run build:copy && bun run build:emit && bun run build:test:syntax && bun run build:test:unit",
53
53
  "build:setup": "rm -rf ./dist && mkdir -p ./dist",
54
54
  "build:copy": "cp package.json dist/package.json && cp LICENSE.md dist/LICENSE.md && cp README.md dist/README.md && cp .npmignore dist/.npmignore",
55
- "build:typescript": "tsc",
56
- "build:check": "node ./dist/index.js",
57
- "build:jest": "node --experimental-vm-modules node_modules/jest/bin/jest.js --config=jest.config.build.cjs"
55
+ "build:emit": "tsc",
56
+ "build:test:syntax": "bun run ./dist/index.js",
57
+ "build:test:unit": "bun test ./dist/**/*.test.js --bail"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@biomejs/biome": "^1.7.3",
61
61
  "@google-cloud/firestore": "^7.3.0",
62
- "@types/jest": "^29.4.0",
62
+ "@types/bun": "^1.1.3",
63
63
  "@types/react": "^18.0.27",
64
64
  "@types/react-dom": "^18.0.10",
65
- "esbuild": "^0.21.3",
66
- "esbuild-jest": "^0.5.0",
67
65
  "firebase": "^10.3.1",
68
- "jest": "^29.4.1",
69
- "jest-ts-webcompat-resolver": "^1.0.0",
70
66
  "react": "^18.1.0",
71
67
  "react-dom": "^18.1.0",
72
68
  "typescript": "^5.0.2"
package/test/basics.d.ts CHANGED
@@ -15,15 +15,14 @@ export declare const BASIC_SCHEMA: import("../schema/DataSchema.js").DataSchema<
15
15
  };
16
16
  }>;
17
17
  export type BasicData = ValidatorType<typeof BASIC_SCHEMA>;
18
- export type BasicItemData = Item<BasicData>;
19
- export declare const basic1: BasicItemData;
20
- export declare const basic2: BasicItemData;
21
- export declare const basic3: BasicItemData;
22
- export declare const basic4: BasicItemData;
23
- export declare const basic5: BasicItemData;
24
- export declare const basic6: BasicItemData;
25
- export declare const basic7: BasicItemData;
26
- export declare const basic8: BasicItemData;
27
- export declare const basic9: BasicItemData;
28
- export declare const basics: ReadonlyArray<BasicItemData>;
18
+ export declare const basic1: Item<BasicData>;
19
+ export declare const basic2: Item<BasicData>;
20
+ export declare const basic3: Item<BasicData>;
21
+ export declare const basic4: Item<BasicData>;
22
+ export declare const basic5: Item<BasicData>;
23
+ export declare const basic6: Item<BasicData>;
24
+ export declare const basic7: Item<BasicData>;
25
+ export declare const basic8: Item<BasicData>;
26
+ export declare const basic9: Item<BasicData>;
27
+ export declare const basics: ReadonlyArray<Item<BasicData>>;
29
28
  export declare const basic999: BasicData;
package/test/people.d.ts CHANGED
@@ -8,10 +8,9 @@ export declare const PERSON_SCHEMA: import("../schema/DataSchema.js").DataSchema
8
8
  birthday: string | null;
9
9
  }>;
10
10
  export type PersonData = ValidatorType<typeof PERSON_SCHEMA>;
11
- export type PersonItemData = Item<PersonData>;
12
- export declare const person1: PersonItemData;
13
- export declare const person2: PersonItemData;
14
- export declare const person3: PersonItemData;
15
- export declare const person4: PersonItemData;
16
- export declare const person5: PersonItemData;
17
- export declare const people: ReadonlyArray<PersonItemData>;
11
+ export declare const person1: Item<PersonData>;
12
+ export declare const person2: Item<PersonData>;
13
+ export declare const person3: Item<PersonData>;
14
+ export declare const person4: Item<PersonData>;
15
+ export declare const person5: Item<PersonData>;
16
+ export declare const people: ReadonlyArray<Item<PersonData>>;
package/test/util.js CHANGED
@@ -1,4 +1,4 @@
1
- import { expect } from "@jest/globals";
1
+ import { expect } from "bun:test";
2
2
  import { getItemIDs } from "../util/item.js";
3
3
  /** Expect the thing to throw a `PromiseLike` object. */
4
4
  export function expectToThrowPromiseLike(func) {
package/util/iterate.d.ts CHANGED
@@ -33,10 +33,6 @@ export declare function reduceItems<T>(items: Iterable<T>, reducer: (previous: T
33
33
  export declare function reduceItems<I, O>(items: Iterable<I>, reducer: (previous: O, item: I) => O, initial: O): O;
34
34
  export declare function reduceItems<I, O>(items: Iterable<I>, reducer: (previous: O | undefined, item: I) => O, initial?: O): O | undefined;
35
35
  /** Yield chunks of a given size. */
36
- export declare function getChunks<T>(items: Iterable<T>, size: 1): Iterable<readonly [T]>;
37
- export declare function getChunks<T>(items: Iterable<T>, size: 2): Iterable<readonly [T, T]>;
38
- export declare function getChunks<T>(items: Iterable<T>, size: 3): Iterable<readonly [T, T, T]>;
39
- export declare function getChunks<T>(items: Iterable<T>, size: 4): Iterable<readonly [T, T, T, T]>;
40
36
  export declare function getChunks<T>(items: Iterable<T>, size: number): Iterable<readonly T[]>;
41
37
  /** Merge two or more iterables into a single iterable set. */
42
38
  export declare function mergeItems<T>(...inputs: [Iterable<T>, Iterable<T>, ...Iterable<T>[]]): Iterable<T>;
package/util/iterate.js CHANGED
@@ -76,6 +76,7 @@ export function reduceItems(items, reducer, initial) {
76
76
  current = reducer(current, item);
77
77
  return current;
78
78
  }
79
+ /** Yield chunks of a given size. */
79
80
  export function* getChunks(items, size) {
80
81
  let chunk = [];
81
82
  for (const item of items) {