Skip to content

Commit 899f0d9

Browse files
committed
Revert "libs @effect/language-service at build time (#226)"
This reverts commit 201cb75.
1 parent 95e6e0f commit 899f0d9

13 files changed

Lines changed: 19 additions & 81 deletions

File tree

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"test-packages": "pnpm packages test:run",
3838
"testsuite-packages": "pnpm packages testsuite",
3939
"watch-packages": "pnpm packages build && pnpm packages watch",
40-
"build:tsc": "effect-app-cli packagejson-packages tspc --build ./tsconfig.all.json",
40+
"build:tsc": "effect-app-cli packagejson-packages tsc --build ./tsconfig.all.json",
4141
"watch": "cd packages/effect-app && pnpm build && cd .. && pnpm build:tsc --watch",
4242
"build": "cd packages/cli && pnpm build && cd ../effect-app && pnpm build && cd .. && pnpm build:tsc && cd vue-components && pnpm build",
4343
"rbuild": "pnpm clean && pnpm build",
@@ -98,7 +98,6 @@
9898
"module-alias": "^2.2.3",
9999
"nodemon": "^3.1.10",
100100
"npm-check-updates": "^18.0.1",
101-
"ts-patch": "^3.3.0",
102101
"ts-plugin-sort-import-suggestions": "^1.0.4",
103102
"ts-transform-paths": "^3.0.0",
104103
"tsc-watch": "^7.1.1",

packages/cli/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@
4848
},
4949
"scripts": {
5050
"watch": "pnpm build:tsc -w",
51-
"build:tsc": "pnpm clean-dist && tspc --build",
51+
"build:tsc": "pnpm clean-dist && tsc --build",
5252
"build": "pnpm build:tsc",
53-
"watch2": "pnpm clean-dist && NODE_OPTIONS=--max-old-space-size=6144 tspc -w",
53+
"watch2": "pnpm clean-dist && NODE_OPTIONS=--max-old-space-size=6144 tsc -w",
5454
"clean": "rm -rf dist",
5555
"clean-dist": "sh ../../scripts/clean-dist.sh",
5656
"circular": "pnpm circular:src && pnpm circular:dist",
5757
"circular:src": "madge --circular --ts-config ./tsconfig.json --extensions ts ./src",
5858
"circular:dist": "madge --circular --extensions js ./dist",
59-
"compile": "NODE_OPTIONS=--max-old-space-size=6144 tspc --noEmit",
59+
"compile": "NODE_OPTIONS=--max-old-space-size=6144 tsc --noEmit",
6060
"lint": "NODE_OPTIONS=--max-old-space-size=6144 ESLINT_TS=1 eslint ./src",
6161
"lint:watch": "ESLINT_TS=1 esw -w --changed --clear --ext ts,tsx .",
6262
"autofix": "pnpm lint --fix",

packages/effect-app/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,15 +260,15 @@
260260
},
261261
"scripts": {
262262
"watch": "pnpm build:tsc -w",
263-
"build:tsc": "pnpm clean-dist && effect-app-cli packagejson tspc --build",
263+
"build:tsc": "pnpm clean-dist && effect-app-cli packagejson tsc --build",
264264
"build": "pnpm build:tsc && cp -f ./src/internal/Prelude.* ./dist/internal",
265-
"watch2": "pnpm clean-dist && NODE_OPTIONS=--max-old-space-size=6144 tspc -w",
265+
"watch2": "pnpm clean-dist && NODE_OPTIONS=--max-old-space-size=6144 tsc -w",
266266
"clean": "rm -rf dist",
267267
"clean-dist": "sh ../../scripts/clean-dist.sh",
268268
"circular": "pnpm circular:src && pnpm circular:dist",
269269
"circular:src": "madge --circular --ts-config ./tsconfig.json --extensions ts ./src",
270270
"circular:dist": "madge --circular --extensions js ./dist",
271-
"compile": "NODE_OPTIONS=--max-old-space-size=6144 tspc --noEmit",
271+
"compile": "NODE_OPTIONS=--max-old-space-size=6144 tsc --noEmit",
272272
"lint": "NODE_OPTIONS=--max-old-space-size=6144 ESLINT_TS=1 eslint ./src",
273273
"lint:watch": "ESLINT_TS=1 esw -w --changed --clear --ext ts,tsx .",
274274
"autofix": "pnpm lint --fix",

packages/effect-app/src/Context.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ export const proxify = <T extends object>(Tag: T) =>
100100
const fn = (...args: Array<any>) => Effect.andThen(Tag as any, (s: any) => s[prop](...args))
101101
// @ts-expect-error abc
102102
const cn = Effect.andThen(Tag, (s) => s[prop])
103-
// @effect-diagnostics effect/floatingEffect:off
104103
Object.assign(fn, cn)
105104
Object.setPrototypeOf(fn, Object.getPrototypeOf(cn))
106105
cache.set(prop, fn)

packages/effect-app/src/client/apiClientFactory.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ const makeApiClientFactory = Effect
208208
...requestMeta,
209209
raw: {
210210
handler: (req: any) =>
211-
// @effect-diagnostics effect/missingEffectContext:off
212211
TheClient.pipe(
213212
Effect.flatMap((client) =>
214213
(client as any)[requestAttr]!(new Request(req)) as Effect<any, any, never>

packages/eslint-codegen-model/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"version": "1.39.0",
66
"scripts": {
77
"watch": "pnpm build:tsc -w",
8-
"build:tsc": "pnpm clean-dist && tspc --build",
9-
"build": "tspc",
8+
"build:tsc": "pnpm clean-dist && tsc --build",
9+
"build": "tsc",
1010
"circular": "madge --circular --ts-config ./tsconfig.json --extensions ts ./src",
1111
"ncu": "ncu",
1212
"pub": "pnpm prepublish && npm publish --access public",

packages/infra/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,15 +361,15 @@
361361
},
362362
"scripts": {
363363
"watch": "pnpm build:tsc -w",
364-
"build:tsc": "pnpm clean-dist && effect-app-cli packagejson tspc --build",
364+
"build:tsc": "pnpm clean-dist && effect-app-cli packagejson tsc --build",
365365
"build": "pnpm build:tsc",
366-
"watch2": "pnpm clean-dist && NODE_OPTIONS=--max-old-space-size=6144 tspc -w",
366+
"watch2": "pnpm clean-dist && NODE_OPTIONS=--max-old-space-size=6144 tsc -w",
367367
"clean": "rm -rf dist",
368368
"clean-dist": "sh ../../scripts/clean-dist.sh",
369369
"circular": "pnpm circular:src && pnpm circular:dist",
370370
"circular:src": "madge --circular --ts-config ./tsconfig.json --extensions ts ./src",
371371
"circular:dist": "madge --circular --extensions js ./dist",
372-
"compile": "NODE_OPTIONS=--max-old-space-size=6144 tspc --noEmit",
372+
"compile": "NODE_OPTIONS=--max-old-space-size=6144 tsc --noEmit",
373373
"lint": "NODE_OPTIONS=--max-old-space-size=6144 ESLINT_TS=1 eslint ./src",
374374
"lint:watch": "ESLINT_TS=1 esw -w --changed --clear --ext ts,tsx .",
375375
"autofix": "pnpm lint --fix",

packages/vue/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@
8383
},
8484
"scripts": {
8585
"watch": "pnpm build:tsc -w",
86-
"build:tsc": "pnpm clean-dist && effect-app-cli packagejson tspc --build",
86+
"build:tsc": "pnpm clean-dist && effect-app-cli packagejson tsc --build",
8787
"build": "pnpm build:tsc",
88-
"watch2": "pnpm clean-dist && NODE_OPTIONS=--max-old-space-size=6144 tspc -w",
88+
"watch2": "pnpm clean-dist && NODE_OPTIONS=--max-old-space-size=6144 tsc -w",
8989
"clean": "rm -rf dist",
9090
"clean-dist": "sh ../../scripts/clean-dist.sh",
9191
"circular": "pnpm circular:src && pnpm circular:dist",
9292
"circular:src": "madge --circular --ts-config ./tsconfig.json --extensions ts ./src",
9393
"circular:dist": "madge --circular --extensions js ./dist",
94-
"compile": "NODE_OPTIONS=--max-old-space-size=6144 tspc --noEmit",
94+
"compile": "NODE_OPTIONS=--max-old-space-size=6144 tsc --noEmit",
9595
"lint": "NODE_OPTIONS=--max-old-space-size=6144 ESLINT_TS=1 eslint ./src",
9696
"lint:watch": "ESLINT_TS=1 esw -w --changed --clear --ext ts,tsx .",
9797
"autofix": "pnpm lint --fix",

packages/vue/src/makeClient.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,6 @@ export const makeClient = <Locale extends string, R>(
852852
argOrOptions,
853853
{ ...options, suspense: true } // experimental_prefetchInRender: true }
854854
)
855-
// @effect-diagnostics effect/missingEffectError:off
856855
return Effect.gen(function*() {
857856
// we want to throw on error so that we can catch cancelled error and skip handling it
858857
// what's the difference with just calling `fetch` ?

packages/vue/src/mutate.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as Result from "@effect-rx/rx/Result"
33
import { type InvalidateOptions, type InvalidateQueryFilters, useQueryClient } from "@tanstack/vue-query"
44
import { type Cause, Effect, type Exit, Option } from "effect-app"
55
import type { RequestHandler, RequestHandlerWithInput, TaggedRequestClassAny } from "effect-app/client/clientFor"
6-
import { identity, tuple } from "effect-app/Function"
6+
import { tuple } from "effect-app/Function"
77
import { computed, type ComputedRef, type Ref, shallowRef } from "vue"
88
import { makeQueryKey } from "./lib.js"
99

@@ -193,8 +193,7 @@ export const makeMutation = () => {
193193
.pipe(Effect.withSpan("client.query.invalidation", { captureStackTrace: false }))
194194
})
195195

196-
type MH = NonNullable<NonNullable<typeof options>["mapHandler"]>
197-
const mapHandler = options?.mapHandler ?? identity as MH
196+
const mapHandler = options?.mapHandler ?? ((_) => _)
198197

199198
const handle = (self: Effect<A, E, R>, i: I | void = void 0) => (mapHandler(
200199
Effect.tapBoth(self, { onFailure: () => invalidateCache, onSuccess: () => invalidateCache }),

0 commit comments

Comments
 (0)