event-store-adapter-js 2.2.159 → 2.2.160-snapshot.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.
@@ -7,7 +7,7 @@ jobs:
7
7
  bump-version:
8
8
  runs-on: ubuntu-latest
9
9
  steps:
10
- - uses: actions/checkout@v4
10
+ - uses: actions/checkout@v5
11
11
  with:
12
12
  fetch-depth: 0
13
13
  persist-credentials: true
@@ -16,9 +16,9 @@ jobs:
16
16
  with:
17
17
  node-version: 20.x
18
18
  cache: 'npm'
19
- - uses: actions/setup-python@v5
19
+ - uses: actions/setup-python@v6
20
20
  with:
21
- python-version: "3.13"
21
+ python-version: "3.14"
22
22
  - run: pip install semver
23
23
  - id: defines
24
24
  run: |
@@ -9,7 +9,7 @@ jobs:
9
9
  runs-on: ubuntu-latest
10
10
  name: "Run lint"
11
11
  steps:
12
- - uses: actions/checkout@v4
12
+ - uses: actions/checkout@v5
13
13
  - uses: actions/setup-node@v4
14
14
  with:
15
15
  node-version: 20.x
@@ -25,7 +25,7 @@ jobs:
25
25
  matrix:
26
26
  node-version: [20.x]
27
27
  steps:
28
- - uses: actions/checkout@v4
28
+ - uses: actions/checkout@v5
29
29
  - name: Use Node.js ${{ matrix.node-version }}
30
30
  uses: actions/setup-node@v4
31
31
  with:
@@ -7,7 +7,7 @@ jobs:
7
7
  release:
8
8
  runs-on: ubuntu-latest
9
9
  steps:
10
- - uses: actions/checkout@v4
10
+ - uses: actions/checkout@v5
11
11
  with:
12
12
  fetch-depth: 0
13
13
  persist-credentials: false
@@ -14,7 +14,7 @@ jobs:
14
14
  if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main'
15
15
  name: "Publish Snapshot"
16
16
  steps:
17
- - uses: actions/checkout@v4
17
+ - uses: actions/checkout@v5
18
18
  with:
19
19
  fetch-depth: 0
20
20
  persist-credentials: true
package/README.ja.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # event-store-adapter-js
2
2
 
3
- [![CI](https://github.com/j5ik2o/event-store-adapter-js/actions/workflows/ci.yml/badge.svg)](https://github.com/j5ik2o/event-store-adapter-js/actions/workflows/ci.yml)
3
+ [![CI](https://github.com/j5ik2o/event-store-adapter-js/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/j5ik2o/event-store-adapter-js/actions/workflows/ci.yml)
4
4
  [![npm version](https://badge.fury.io/js/event-store-adapter-js.svg)](https://badge.fury.io/js/event-store-adapter-js)
5
5
  [![Renovate](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com)
6
6
  [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # event-store-adapter-js
2
2
 
3
- [![CI](https://github.com/j5ik2o/event-store-adapter-js/actions/workflows/ci.yml/badge.svg)](https://github.com/j5ik2o/event-store-adapter-js/actions/workflows/ci.yml)
3
+ [![CI](https://github.com/j5ik2o/event-store-adapter-js/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/j5ik2o/event-store-adapter-js/actions/workflows/ci.yml)
4
4
  [![npm version](https://badge.fury.io/js/event-store-adapter-js.svg)](https://badge.fury.io/js/event-store-adapter-js)
5
5
  [![Renovate](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com)
6
6
  [![License](https://img.shields.io/badge/License-APACHE2.0-blue.svg)](https://opensource.org/licenses/apache-2-0)
package/biome.json CHANGED
@@ -1,10 +1,8 @@
1
1
  {
2
- "$schema": "https://biomejs.dev/schemas/1.7.0/schema.json",
3
- "organizeImports": {
4
- "enabled": true
5
- },
2
+ "$schema": "https://biomejs.dev/schemas/2.2.3/schema.json",
3
+ "assist": { "actions": { "source": { "organizeImports": "on" } } },
6
4
  "files": {
7
- "include": ["./**/*.ts"]
5
+ "includes": ["**/*.ts"]
8
6
  },
9
7
  "vcs": {
10
8
  "enabled": true,
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./types";
2
1
  export * from "./event-store";
2
+ export * from "./types";
package/dist/index.js CHANGED
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./types"), exports);
18
17
  __exportStar(require("./event-store"), exports);
18
+ __exportStar(require("./types"), exports);
@@ -6,7 +6,7 @@ class JsonEventSerializer {
6
6
  this.encoder = new TextEncoder();
7
7
  this.decoder = new TextDecoder();
8
8
  }
9
- // biome-ignore lint/suspicious/noExplicitAny:
9
+ // biome-ignore lint/suspicious/noExplicitAny: JSON deserialization requires dynamic typing
10
10
  deserialize(bytes, converter) {
11
11
  const jsonString = this.decoder.decode(bytes);
12
12
  const json = JSON.parse(jsonString);
@@ -26,7 +26,7 @@ class JsonSnapshotSerializer {
26
26
  this.encoder = new TextEncoder();
27
27
  this.decoder = new TextDecoder();
28
28
  }
29
- // biome-ignore lint/suspicious/noExplicitAny:
29
+ // biome-ignore lint/suspicious/noExplicitAny: JSON deserialization requires dynamic typing
30
30
  deserialize(bytes, converter) {
31
31
  const jsonString = this.decoder.decode(bytes);
32
32
  const obj = JSON.parse(jsonString);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "event-store-adapter-js",
3
- "version": "2.2.159",
3
+ "version": "2.2.160-snapshot.2",
4
4
  "description": "This library is designed to turn DynamoDB into an Event Store for Event Sourcing.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -8,7 +8,8 @@
8
8
  "build": "tsc && rm -f dist/internal/*.test.d.ts && rm -f dist/internal/*.test.js && rm -fr dist/internal/test",
9
9
  "test": "jest --no-cache",
10
10
  "lint": "biome check",
11
- "fix": "biome format --write",
11
+ "fmt": "biome format",
12
+ "fix": "biome check --write",
12
13
  "clean": "rimraf ./dist"
13
14
  },
14
15
  "repository": {
@@ -27,14 +28,14 @@
27
28
  "author": "Junichi Kato <j5ik2o@gmail.com>",
28
29
  "license": "MIT",
29
30
  "devDependencies": {
30
- "@biomejs/biome": "2.2.3",
31
+ "@biomejs/biome": "2.3.2",
31
32
  "@types/jest": "^30.0.0",
32
33
  "@types/node": "^22.0.0",
33
34
  "@types/winston": "^2.4.4",
34
35
  "@typescript-eslint/eslint-plugin": "^8.0.0",
35
36
  "@typescript-eslint/parser": "^8.0.0",
36
37
  "jest": "^30.0.0",
37
- "rimraf": "6.0.1",
38
+ "rimraf": "6.1.0",
38
39
  "testcontainers": "^11.0.0",
39
40
  "ts-jest": "^29.1.1",
40
41
  "ts-node": "^10.9.1",
@@ -44,7 +45,7 @@
44
45
  "@aws-sdk/client-dynamodb": "^3.413.0",
45
46
  "aws-sdk": "^2.1459.0",
46
47
  "moment": "^2.29.4",
47
- "ulid": "^2.3.0",
48
+ "ulid": "^3.0.0",
48
49
  "winston": "^3.10.0"
49
50
  }
50
51
  }
package/src/index.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./types";
2
1
  export * from "./event-store";
2
+ export * from "./types";
@@ -12,7 +12,7 @@ class JsonEventSerializer<AID extends AggregateId, E extends Event<AID>>
12
12
  private encoder = new TextEncoder();
13
13
  private decoder = new TextDecoder();
14
14
 
15
- // biome-ignore lint/suspicious/noExplicitAny:
15
+ // biome-ignore lint/suspicious/noExplicitAny: JSON deserialization requires dynamic typing
16
16
  deserialize(bytes: Uint8Array, converter: (json: any) => E): E {
17
17
  const jsonString = this.decoder.decode(bytes);
18
18
  const json = JSON.parse(jsonString);
@@ -35,7 +35,7 @@ class JsonSnapshotSerializer<
35
35
  {
36
36
  private encoder = new TextEncoder();
37
37
  private decoder = new TextDecoder();
38
- // biome-ignore lint/suspicious/noExplicitAny:
38
+ // biome-ignore lint/suspicious/noExplicitAny: JSON deserialization requires dynamic typing
39
39
  deserialize(bytes: Uint8Array, converter: (json: any) => A): A {
40
40
  const jsonString = this.decoder.decode(bytes);
41
41
  const obj = JSON.parse(jsonString);
@@ -13,10 +13,10 @@ import {
13
13
  createJournalTable,
14
14
  createSnapshotTable,
15
15
  } from "./test/dynamodb-utils";
16
- import { UserAccount, convertJSONToUserAccount } from "./test/user-account";
16
+ import { convertJSONToUserAccount, UserAccount } from "./test/user-account";
17
17
  import {
18
- type UserAccountEvent,
19
18
  convertJSONtoUserAccountEvent,
19
+ type UserAccountEvent,
20
20
  } from "./test/user-account-event";
21
21
  import { UserAccountId } from "./test/user-account-id";
22
22
 
@@ -4,9 +4,9 @@ import {
4
4
  type Put,
5
5
  QueryCommand,
6
6
  type QueryCommandInput,
7
+ TransactionCanceledException,
7
8
  TransactWriteItemsCommand,
8
9
  type TransactWriteItemsInput,
9
- TransactionCanceledException,
10
10
  type Update,
11
11
  UpdateItemCommand,
12
12
  type UpdateItemInput,
@@ -1,7 +1,7 @@
1
1
  import type { Event } from "../../types";
2
2
  import {
3
- type UserAccountId,
4
3
  convertJSONToUserAccountId,
4
+ type UserAccountId,
5
5
  } from "./user-account-id";
6
6
 
7
7
  interface UserAccountEvent extends Event<UserAccountId> {}
@@ -31,7 +31,7 @@ class UserAccountRenamed implements UserAccountEvent {
31
31
  ) {}
32
32
  }
33
33
 
34
- // biome-ignore lint/suspicious/noExplicitAny:
34
+ // biome-ignore lint/suspicious/noExplicitAny: JSON deserialization requires dynamic typing
35
35
  function convertJSONtoUserAccountEvent(json: any): UserAccountEvent {
36
36
  const aggregateId = convertJSONToUserAccountId(json.data.aggregateId);
37
37
  switch (json.type) {
@@ -9,7 +9,7 @@ class UserAccountId implements AggregateId {
9
9
  }
10
10
  }
11
11
 
12
- // biome-ignore lint/suspicious/noExplicitAny:
12
+ // biome-ignore lint/suspicious/noExplicitAny: JSON deserialization requires dynamic typing
13
13
  function convertJSONToUserAccountId(json: any): UserAccountId {
14
14
  return new UserAccountId(json.value);
15
15
  }
@@ -13,10 +13,10 @@ import {
13
13
  createJournalTable,
14
14
  createSnapshotTable,
15
15
  } from "./dynamodb-utils";
16
- import { UserAccount, convertJSONToUserAccount } from "./user-account";
16
+ import { convertJSONToUserAccount, UserAccount } from "./user-account";
17
17
  import {
18
- type UserAccountEvent,
19
18
  convertJSONtoUserAccountEvent,
19
+ type UserAccountEvent,
20
20
  } from "./user-account-event";
21
21
  import { UserAccountId } from "./user-account-id";
22
22
  import { UserAccountRepository } from "./user-account-repository";
@@ -6,8 +6,8 @@ import {
6
6
  UserAccountRenamed,
7
7
  } from "./user-account-event";
8
8
  import {
9
- type UserAccountId,
10
9
  convertJSONToUserAccountId,
10
+ type UserAccountId,
11
11
  } from "./user-account-id";
12
12
 
13
13
  class UserAccount implements Aggregate<UserAccount, UserAccountId> {
@@ -95,7 +95,7 @@ class UserAccount implements Aggregate<UserAccount, UserAccountId> {
95
95
  }
96
96
  }
97
97
 
98
- // biome-ignore lint/suspicious/noExplicitAny:
98
+ // biome-ignore lint/suspicious/noExplicitAny: JSON deserialization requires dynamic typing
99
99
  function convertJSONToUserAccount(json: any): UserAccount {
100
100
  const id = convertJSONToUserAccountId(json.data.id);
101
101
  return new UserAccount(
package/src/types.ts CHANGED
@@ -33,7 +33,7 @@ interface KeyResolver<AID extends AggregateId> {
33
33
 
34
34
  interface EventSerializer<AID extends AggregateId, E extends Event<AID>> {
35
35
  serialize(event: E): Uint8Array;
36
- // biome-ignore lint/suspicious/noExplicitAny:
36
+ // biome-ignore lint/suspicious/noExplicitAny: JSON deserialization requires dynamic typing
37
37
  deserialize(bytes: Uint8Array, converter: (json: any) => E): E;
38
38
  }
39
39
 
@@ -42,20 +42,20 @@ interface SnapshotSerializer<
42
42
  A extends Aggregate<A, AID>,
43
43
  > {
44
44
  serialize(aggregate: A): Uint8Array;
45
- // biome-ignore lint/suspicious/noExplicitAny:
45
+ // biome-ignore lint/suspicious/noExplicitAny: JSON deserialization requires dynamic typing
46
46
  deserialize(bytes: Uint8Array, converter: (json: any) => A): A;
47
47
  }
48
48
 
49
49
  export interface Logger {
50
- // biome-ignore lint/suspicious/noExplicitAny:
50
+ // biome-ignore lint/suspicious/noExplicitAny: Logger accepts any content type
51
51
  trace?: (...content: any[]) => void;
52
- // biome-ignore lint/suspicious/noExplicitAny:
52
+ // biome-ignore lint/suspicious/noExplicitAny: Logger accepts any content type
53
53
  debug: (...content: any[]) => void;
54
- // biome-ignore lint/suspicious/noExplicitAny:
54
+ // biome-ignore lint/suspicious/noExplicitAny: Logger accepts any content type
55
55
  info: (...content: any[]) => void;
56
- // biome-ignore lint/suspicious/noExplicitAny:
56
+ // biome-ignore lint/suspicious/noExplicitAny: Logger accepts any content type
57
57
  warn: (...content: any[]) => void;
58
- // biome-ignore lint/suspicious/noExplicitAny:
58
+ // biome-ignore lint/suspicious/noExplicitAny: Logger accepts any content type
59
59
  error: (...content: any[]) => void;
60
60
  }
61
61