@effect-app/infra 4.0.0-beta.153 → 4.0.0-beta.154

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @effect-app/infra
2
2
 
3
+ ## 4.0.0-beta.154
4
+
5
+ ### Patch Changes
6
+
7
+ - effect-app@4.0.0-beta.154
8
+
3
9
  ## 4.0.0-beta.153
4
10
 
5
11
  ### Patch Changes
package/eslint.config.mjs CHANGED
@@ -1,6 +1,6 @@
1
+ import { augmentedConfig } from "@effect-app/eslint-shared-config/eslint.base.config"
1
2
  import path from "node:path"
2
3
  import { fileURLToPath } from "node:url"
3
- import { augmentedConfig } from "@effect-app/eslint-shared-config/eslint.base.config"
4
4
 
5
5
  const __filename = fileURLToPath(import.meta.url)
6
6
  const __dirname = path.dirname(__filename)
@@ -18,7 +18,7 @@ export default [
18
18
  {
19
19
  rules: {
20
20
  "@typescript-eslint/no-empty-interface": "off",
21
- "@typescript-eslint/no-explicit-any": "warn",
21
+ "@typescript-eslint/no-explicit-any": "warn"
22
22
  }
23
23
  }
24
24
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect-app/infra",
3
- "version": "4.0.0-beta.153",
3
+ "version": "4.0.0-beta.154",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "dependencies": {
@@ -13,7 +13,7 @@
13
13
  "proper-lockfile": "^4.1.2",
14
14
  "pure-rand": "8.4.0",
15
15
  "query-string": "^9.3.1",
16
- "effect-app": "4.0.0-beta.153"
16
+ "effect-app": "4.0.0-beta.154"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@azure/cosmos": "^4.9.3",
@@ -33,7 +33,7 @@
33
33
  "strip-ansi": "^7.2.0",
34
34
  "typescript": "npm:@typescript/native-preview@beta",
35
35
  "vitest": "^4.1.5",
36
- "@effect-app/eslint-shared-config": "0.6.0-beta.13"
36
+ "@effect-app/eslint-shared-config": "0.6.0-beta.15"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@azure/cosmos": "^4.9.3",
@@ -407,9 +407,9 @@
407
407
  "circular:src": "madge --circular --ts-config ./tsconfig.json --extensions ts ./src",
408
408
  "circular:dist": "madge --circular --extensions js ./dist",
409
409
  "compile": "NODE_OPTIONS=--max-old-space-size=6144 tsgo --noEmit",
410
- "lint": "oxlint ./src && NODE_OPTIONS=--max-old-space-size=6144 ESLINT_TS=1 eslint ./src",
410
+ "lint": "oxlint ./src && NODE_OPTIONS=--max-old-space-size=6144 ESLINT_TS=1 eslint ./src && pnpm exec dprint check --config ../../dprint.jsonc .",
411
411
  "lint:watch": "ESLINT_TS=1 esw -w --changed --clear --ext ts,tsx .",
412
- "lint-fix": "oxlint --fix ./src && NODE_OPTIONS=--max-old-space-size=6144 ESLINT_TS=1 eslint --fix ./src",
412
+ "lint-fix": "oxlint --fix ./src && NODE_OPTIONS=--max-old-space-size=6144 ESLINT_TS=1 eslint --fix ./src && pnpm exec dprint fmt --config ../../dprint.jsonc .",
413
413
  "test": "vitest",
414
414
  "test:run": "pnpm run test run --passWithNoTests",
415
415
  "testsuite": "pnpm lint && pnpm circular && pnpm run test:run",
@@ -14,45 +14,47 @@ const TestStoreLive = Layer.merge(MemoryStoreLive, RepositoryRegistryLive)
14
14
 
15
15
  describe("repository ext save/remove batching", () => {
16
16
  it.effect("supports save batching overload", () =>
17
- Effect.gen(function*() {
18
- const repo = yield* makeRepo("BatchItem", BatchItem, {})
19
- const items = [
20
- new BatchItem({ id: "1", label: "one" }),
21
- new BatchItem({ id: "2", label: "two" }),
22
- new BatchItem({ id: "3", label: "three" }),
23
- new BatchItem({ id: "4", label: "four" })
24
- ] as const
25
-
26
- yield* repo.save(items, { batch: 2 })
27
-
28
- const all = yield* repo.all
29
- expect(all).toHaveLength(4)
30
- expect(all.map((_) => _.id).toSorted()).toEqual(["1", "2", "3", "4"])
31
- }).pipe(
32
- setupRequestContextFromCurrent(),
33
- Effect.provide(TestStoreLive)
34
- )
35
- )
17
+ Effect
18
+ .gen(function*() {
19
+ const repo = yield* makeRepo("BatchItem", BatchItem, {})
20
+ const items = [
21
+ new BatchItem({ id: "1", label: "one" }),
22
+ new BatchItem({ id: "2", label: "two" }),
23
+ new BatchItem({ id: "3", label: "three" }),
24
+ new BatchItem({ id: "4", label: "four" })
25
+ ] as const
26
+
27
+ yield* repo.save(items, { batch: 2 })
28
+
29
+ const all = yield* repo.all
30
+ expect(all).toHaveLength(4)
31
+ expect(all.map((_) => _.id).toSorted()).toEqual(["1", "2", "3", "4"])
32
+ })
33
+ .pipe(
34
+ setupRequestContextFromCurrent(),
35
+ Effect.provide(TestStoreLive)
36
+ ))
36
37
 
37
38
  it.effect("supports remove batching overload", () =>
38
- Effect.gen(function*() {
39
- const repo = yield* makeRepo("BatchItem", BatchItem, {})
40
- const items = [
41
- new BatchItem({ id: "1", label: "one" }),
42
- new BatchItem({ id: "2", label: "two" }),
43
- new BatchItem({ id: "3", label: "three" }),
44
- new BatchItem({ id: "4", label: "four" })
45
- ] as const
46
-
47
- yield* repo.save(items)
48
- yield* repo.remove([items[0], items[1], items[2]], { batch: true })
49
-
50
- const all = yield* repo.all
51
- expect(all).toHaveLength(1)
52
- expect(all[0]?.id).toBe("4")
53
- }).pipe(
54
- setupRequestContextFromCurrent(),
55
- Effect.provide(TestStoreLive)
56
- )
57
- )
39
+ Effect
40
+ .gen(function*() {
41
+ const repo = yield* makeRepo("BatchItem", BatchItem, {})
42
+ const items = [
43
+ new BatchItem({ id: "1", label: "one" }),
44
+ new BatchItem({ id: "2", label: "two" }),
45
+ new BatchItem({ id: "3", label: "three" }),
46
+ new BatchItem({ id: "4", label: "four" })
47
+ ] as const
48
+
49
+ yield* repo.save(items)
50
+ yield* repo.remove([items[0], items[1], items[2]], { batch: true })
51
+
52
+ const all = yield* repo.all
53
+ expect(all).toHaveLength(1)
54
+ expect(all[0]?.id).toBe("4")
55
+ })
56
+ .pipe(
57
+ setupRequestContextFromCurrent(),
58
+ Effect.provide(TestStoreLive)
59
+ ))
58
60
  })
@@ -12,4 +12,4 @@
12
12
  "tsBuildInfoFile": ".tsbuildinfo/examples.tsbuildinfo",
13
13
  "rootDir": "examples"
14
14
  }
15
- }
15
+ }
package/tsconfig.json.bak CHANGED
@@ -8,5 +8,5 @@
8
8
  {
9
9
  "path": "./tsconfig.test.json"
10
10
  }
11
- ],
12
- }
11
+ ]
12
+ }
package/tsconfig.src.json CHANGED
@@ -1,38 +1,38 @@
1
1
  {
2
- "extends": "../../tsconfig.base.json",
3
- "compilerOptions": {
4
- "lib": [
5
- "esnext"
6
- ],
7
- "tsBuildInfoFile": "./dist/.tsbuildinfo",
8
- "esModuleInterop": true,
9
- "rootDir": "./src",
10
- // keep in here, cause madge can't detect it from extended tsconfig
11
- "moduleResolution": "Node16",
12
- "types": [
13
- "./types/modules"
14
- ],
15
- "outDir": "./dist"
16
- },
17
- "include": [
18
- "./src/**/*.ts"
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "lib": [
5
+ "esnext"
19
6
  ],
20
- "exclude": [
21
- "./dist",
22
- "*.test.ts",
23
- "node_modules",
24
- "build",
25
- "lib",
26
- "dist",
27
- "**/*.d.ts.map",
28
- ".git",
29
- ".data",
30
- "**/.*",
31
- "**/*.tmp"
7
+ "tsBuildInfoFile": "./dist/.tsbuildinfo",
8
+ "esModuleInterop": true,
9
+ "rootDir": "./src",
10
+ // keep in here, cause madge can't detect it from extended tsconfig
11
+ "moduleResolution": "Node16",
12
+ "types": [
13
+ "./types/modules"
32
14
  ],
33
- "references": [
34
- {
35
- "path": "../effect-app"
36
- },
37
- ]
38
- }
15
+ "outDir": "./dist"
16
+ },
17
+ "include": [
18
+ "./src/**/*.ts"
19
+ ],
20
+ "exclude": [
21
+ "./dist",
22
+ "*.test.ts",
23
+ "node_modules",
24
+ "build",
25
+ "lib",
26
+ "dist",
27
+ "**/*.d.ts.map",
28
+ ".git",
29
+ ".data",
30
+ "**/.*",
31
+ "**/*.tmp"
32
+ ],
33
+ "references": [
34
+ {
35
+ "path": "../effect-app"
36
+ }
37
+ ]
38
+ }
@@ -28,6 +28,6 @@
28
28
  "references": [
29
29
  {
30
30
  "path": "./tsconfig.src.json"
31
- },
31
+ }
32
32
  ]
33
- }
33
+ }