Skip to content

Commit edd5d96

Browse files
committed
chore: Further clean up.
1 parent d16ac66 commit edd5d96

32 files changed

Lines changed: 876 additions & 4313 deletions

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ updates:
1717
prefix-development: chore
1818

1919
- package-ecosystem: docker
20-
directory: "/test/shared/docker/eventsourcingdb"
20+
directory: "/test/eventsourcingdb"
2121
schedule:
2222
interval: weekly
2323
open-pull-requests-limit: 10

package-lock.json

Lines changed: 703 additions & 1363 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,13 @@
1515
"types": "./dist/index.d.ts",
1616
"dependencies": {
1717
"axios": "1.8.4",
18-
"http-status-codes": "2.3.0",
1918
"stream-to-async-iterator": "1.0.0"
2019
},
2120
"devDependencies": {
2221
"@biomejs/biome": "1.9.4",
23-
"@types/express": "5.0.1",
2422
"@types/node": "22.14.0",
2523
"@types/shelljs": "0.8.15",
26-
"express": "5.1.0",
24+
"get-port": "7.1.0",
2725
"shelljs": "0.9.2",
2826
"tsup": "8.4.0",
2927
"tsx": "4.19.3",
@@ -35,8 +33,8 @@
3533
"format": "npx biome format --write .",
3634
"qa": "npm run analyze && npm run test",
3735
"test": "npm run test:unit && npm run test:integration",
38-
"test:unit": "node --test --import tsx \"./test/unit/**/*.ts\"",
39-
"test:integration": "node --test --import tsx \"./test/integration/**/*.ts\""
36+
"test:unit": "node --test --import tsx \"./src/**/*.test.ts\"",
37+
"test:integration": "node --test --import tsx \"./test/**/*.test.ts\""
4038
},
4139
"repository": {
4240
"type": "git",

src/Precondition.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,4 @@ type Precondition =
1717
payload: IsSubjectOnEventIdPrecondition;
1818
};
1919

20-
const isSubjectPristine = (subject: string): Precondition => {
21-
return {
22-
type: 'isSubjectPristine',
23-
payload: { subject },
24-
};
25-
};
26-
27-
const isSubjectOnEventId = (subject: string, eventId: string): Precondition => {
28-
return {
29-
type: 'isSubjectOnEventId',
30-
payload: { subject, eventId },
31-
};
32-
};
33-
3420
export type { Precondition };
35-
export { isSubjectPristine, isSubjectOnEventId };

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { Client } from './Client.js';
22
import type { ObserveEventsOptions } from './ObserveEventsOptions.js';
3-
import { isSubjectOnEventId, isSubjectPristine } from './Precondition.js';
43
import type { ReadEventsOptions } from './ReadEventsOptions.js';
4+
import { isSubjectOnEventId } from './isSubjectOnEventId.js';
5+
import { isSubjectPristine } from './isSubjectPristine.js';
56

67
export { Client, isSubjectPristine, isSubjectOnEventId };
78
export type { ReadEventsOptions, ObserveEventsOptions };

src/isSubjectOnEventId.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import type { Precondition } from './Precondition.js';
2+
3+
const isSubjectOnEventId = (subject: string, eventId: string): Precondition => {
4+
return {
5+
type: 'isSubjectOnEventId',
6+
payload: { subject, eventId },
7+
};
8+
};
9+
10+
export { isSubjectOnEventId };

src/isSubjectPristine.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import type { Precondition } from './Precondition.js';
2+
3+
const isSubjectPristine = (subject: string): Precondition => {
4+
return {
5+
type: 'isSubjectPristine',
6+
payload: { subject },
7+
};
8+
};
9+
10+
export { isSubjectPristine };
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import assert from 'node:assert/strict';
22
import { suite, test } from 'node:test';
3-
import { LinesDecoder } from '../../../src/ndjson/LinesDecoder.js';
3+
import { LinesDecoder } from './LinesDecoder.js';
44

55
suite('LinesDecoder', (): void => {
66
test('returns all completed lines on write().', (): void => {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import assert from 'node:assert/strict';
22
import { Readable } from 'node:stream';
33
import { suite, test } from 'node:test';
4-
import { readNdJsonStream } from '../../../src/ndjson/readNdJsonStream.js';
4+
import { readNdJsonStream } from './readNdJsonStream.js';
55

66
suite('readNdJsonStream', (): void => {
77
test('returns an async generator that yields parsed json objects.', async (): Promise<void> => {

test/shared/docker/eventsourcingdb/Dockerfile renamed to test/docker/Dockerfile

File renamed without changes.

0 commit comments

Comments
 (0)