@effect-app/infra 4.0.0-beta.277 → 4.0.0-beta.278

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,15 @@
1
1
  # @effect-app/infra
2
2
 
3
+ ## 4.0.0-beta.278
4
+
5
+ ### Patch Changes
6
+
7
+ - a354345: Move release tsconfig flattening from publish to pack lifecycle so package configs are restored before registry upload/auth can fail.
8
+ - a69da09: Publish from generated staging directories so release-only files are created outside the source package tree.
9
+ - Updated dependencies [a354345]
10
+ - Updated dependencies [a69da09]
11
+ - effect-app@4.0.0-beta.278
12
+
3
13
  ## 4.0.0-beta.277
4
14
 
5
15
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect-app/infra",
3
- "version": "4.0.0-beta.277",
3
+ "version": "4.0.0-beta.278",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "dependencies": {
@@ -10,7 +10,7 @@
10
10
  "proper-lockfile": "^4.1.2",
11
11
  "pure-rand": "8.4.0",
12
12
  "query-string": "^9.4.0",
13
- "effect-app": "4.0.0-beta.277"
13
+ "effect-app": "4.0.0-beta.278"
14
14
  },
15
15
  "devDependencies": {
16
16
  "@azure/cosmos": "^4.9.3",
@@ -83,7 +83,6 @@
83
83
  "testsuite": "pnpm lint && pnpm circular && pnpm run test:run",
84
84
  "client": "node --experimental-specifier-resolution=node -r source-map-support/register ./dist/client.bin.js",
85
85
  "ncu": "ncu",
86
- "pub": "pnpm prepublish && npm publish --access public",
87
- "prepublish": "cp -f ./tsconfig.json ./tsconfig.json.bak && node ../../scripts/mergeTsConfig.mjs ./tsconfig.json"
86
+ "pub": "npm publish --access public"
88
87
  }
89
88
  }
@@ -1,112 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
2
- import * as Test from "@effect-ts/jest/Test"
3
- import { describe, expect } from "@jest/globals"
4
-
5
- import { OptimisticConcurrencyException } from "../../errors.ts"
6
-
7
- import { makeMemoryStore } from "./Memory.ts"
8
-
9
- const { it } = Test.runtime()
10
-
11
- describe("Optimistic Concurrency", () => {
12
- describe("set", () => {
13
- it("works", () =>
14
- Effect.gen(function*($) {
15
- const existing = new Map<
16
- string,
17
- { _etag?: string | undefined; id: string; a: string }
18
- >()
19
- const { make } = makeMemoryStore()
20
- const store = yield* $(make("test", Effect.sync(() => existing)))
21
-
22
- const result1 = yield* $(store.set({ id: "1", a: "string", _etag: undefined }))
23
- const result2_1 = yield* $(
24
- store.set({ id: "2", a: "string", _etag: undefined })
25
- )
26
- const result2 = yield* $(store.set({ ...result1, a: "another-string" }))
27
- const result3 = yield* $(store.set({ ...result2, a: "another-string2" }))
28
- const failResult = yield* $(
29
- store.set({ ...result1, a: "another-string3" }).result
30
- )
31
- expect(result1._etag).toBeTruthy()
32
- expect(result2_1._etag).toBeTruthy()
33
- expect(result2._etag).toBeTruthy()
34
- expect(result3._etag).toBeTruthy()
35
-
36
- expect(result2._etag).not.toEqual(result1._etag)
37
- expect(result3._etag).not.toEqual(result2._etag)
38
-
39
- expect(Exit.untraced(failResult)).toEqual(
40
- Exit.fail(new OptimisticConcurrencyException("test", "1"))
41
- )
42
- console.log({ result1, result2 })
43
- }))
44
- })
45
-
46
- describe("bulkSet", () => {
47
- it("works", () =>
48
- Effect.gen(function*($) {
49
- const existing = new Map<
50
- string,
51
- { _etag?: string | undefined; id: string; a: string }
52
- >()
53
- const { make } = makeMemoryStore()
54
- const store = yield* $(make("test", Effect.sync(() => existing)))
55
-
56
- const [result1] = yield* $(
57
- store.bulkSet([{ id: "1", a: "string", _etag: undefined }])
58
- )
59
- const [result2_1] = yield* $(
60
- store.bulkSet([{ id: "2", a: "string", _etag: undefined }])
61
- )
62
- const [result2] = yield* $(store.bulkSet([{ ...result1, a: "another-string" }]))
63
- const [result3] = yield* $(
64
- store.bulkSet([{ ...result2, a: "another-string2" }])
65
- )
66
- const failResult = yield* $(
67
- store.bulkSet([{ ...result1, a: "another-string3" }]).result
68
- )
69
- expect(result1._etag).toBeTruthy()
70
- expect(result2_1._etag).toBeTruthy()
71
- expect(result2._etag).toBeTruthy()
72
- expect(result3._etag).toBeTruthy()
73
-
74
- expect(result2._etag).not.toEqual(result1._etag)
75
- expect(result3._etag).not.toEqual(result2._etag)
76
-
77
- expect(Exit.untraced(failResult)).toEqual(
78
- Exit.fail(new OptimisticConcurrencyException("test", "1"))
79
- )
80
- console.log({ result1, result2 })
81
- }))
82
- })
83
-
84
- describe("batchSet", () => {
85
- it("works", () =>
86
- Effect.gen(function*($) {
87
- const existing = new Map<
88
- string,
89
- { _etag?: string | undefined; id: string; a: string }
90
- >()
91
- const { make } = makeMemoryStore()
92
- const store = yield* $(make("test", Effect.sync(() => existing)))
93
-
94
- const item1 = { id: "1", a: "string", _etag: undefined }
95
- const item2 = { id: "2", a: "string", _etag: undefined }
96
-
97
- yield* $(store.batchSet([item1, item2]))
98
-
99
- const [result1, result2] = yield* $(
100
- Effect.collectAll([store.find("1"), store.find("2")])
101
- )
102
- const failResult = yield* $(
103
- store.batchSet([{ id: "1", a: "another-string3", _etag: "abc" }]).result
104
- )
105
- expect(result1).toEqual(Option.some({ ...item1, _etag: expect.any(String) }))
106
- expect(result2).toEqual(Option.some({ ...item2, _etag: expect.any(String) }))
107
- expect(Exit.untraced(failResult)).toEqual(
108
- Exit.fail(new OptimisticConcurrencyException("test", "1"))
109
- )
110
- }))
111
- })
112
- })
package/tsconfig.json.bak DELETED
@@ -1,73 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "strict": true,
4
- "allowUnusedLabels": false,
5
- "allowUnreachableCode": false,
6
- "exactOptionalPropertyTypes": true,
7
- "noFallthroughCasesInSwitch": true,
8
- "noImplicitOverride": true,
9
- "noImplicitReturns": false,
10
- "noPropertyAccessFromIndexSignature": true,
11
- "noUncheckedIndexedAccess": true,
12
- "noUnusedLocals": true,
13
- "noUnusedParameters": true,
14
- "isolatedModules": true,
15
- "esModuleInterop": true,
16
- "skipLibCheck": true,
17
- "plugins": [],
18
- "module": "Node16",
19
- "lib": [
20
- "ES2023"
21
- ],
22
- "target": "es2022",
23
- "inlineSourceMap": true,
24
- "incremental": true,
25
- "composite": true,
26
- "declarationMap": true,
27
- "experimentalDecorators": true,
28
- "emitDecoratorMetadata": true,
29
- "noImplicitAny": true,
30
- "useUnknownInCatchVariables": true,
31
- "noImplicitThis": true,
32
- "outDir": "build/dist",
33
- "resolveJsonModule": true,
34
- "moduleResolution": "Node16",
35
- "noErrorTruncation": true,
36
- "forceConsistentCasingInFileNames": true,
37
- "erasableSyntaxOnly": true,
38
- "rewriteRelativeImportExtensions": true,
39
- "allowImportingTsExtensions": true,
40
- "types": [
41
- "node"
42
- ]
43
- },
44
- "$schema": "https://www.schemastore.org/tsconfig",
45
- "_version": "2.0.0",
46
- "watchOptions": {
47
- "watchFile": "useFsEvents",
48
- "watchDirectory": "useFsEvents",
49
- "fallbackPolling": "dynamicPriority",
50
- "excludeDirectories": [
51
- "**/node_modules",
52
- "**/dist",
53
- "**/.build",
54
- "**/.git",
55
- "**/.data",
56
- "**/.logs",
57
- "**/.*"
58
- ],
59
- "excludeFiles": [
60
- "**/*.tmp",
61
- "openapi.json",
62
- "*.json"
63
- ]
64
- },
65
- "include": [],
66
- "exclude": [
67
- "**/node_modules",
68
- "**/build",
69
- "**/dist",
70
- "**/.*"
71
- ],
72
- "references": []
73
- }