diff --git a/.changeset/wicked-games-punch.md b/.changeset/wicked-games-punch.md new file mode 100644 index 00000000..dd4c0c17 --- /dev/null +++ b/.changeset/wicked-games-punch.md @@ -0,0 +1,8 @@ +--- +"@effect/platform-browser": minor +"@effect/platform-node": minor +"@effect/platform-bun": minor +"@effect/platform": minor +--- + +update effect diff --git a/package.json b/package.json index 31bddb2a..48ba5669 100644 --- a/package.json +++ b/package.json @@ -29,15 +29,15 @@ "@babel/preset-typescript": "^7.23.0", "@changesets/changelog-github": "^0.4.8", "@changesets/cli": "^2.26.2", - "@effect/build-utils": "^0.1.8", + "@effect/build-utils": "^0.1.9", "@effect/docgen": "^0.1.8", "@effect/eslint-plugin": "^0.1.2", "@effect/language-service": "0.0.21", "@preconstruct/cli": "^2.8.1", - "@types/chai": "^4.3.6", - "@types/node": "^20.8.3", - "@typescript-eslint/eslint-plugin": "^6.7.4", - "@typescript-eslint/parser": "^6.7.4", + "@types/chai": "^4.3.7", + "@types/node": "^20.8.4", + "@typescript-eslint/eslint-plugin": "^6.7.5", + "@typescript-eslint/parser": "^6.7.5", "@vitejs/plugin-react": "^4.1.0", "@vitest/coverage-v8": "^0.34.6", "@vitest/expect": "^0.34.6", @@ -56,6 +56,7 @@ "ts-node": "^10.9.1", "typescript": "^5.2.2", "ultra-runner": "^3.10.5", + "undici-types": "^5.25.3", "vite": "^4.4.11", "vitest": "0.34.6" }, diff --git a/packages/platform-browser/package.json b/packages/platform-browser/package.json index fd5d1432..1c1fa6be 100644 --- a/packages/platform-browser/package.json +++ b/packages/platform-browser/package.json @@ -39,11 +39,11 @@ "@effect/platform": "workspace:^" }, "devDependencies": { - "effect": "2.0.0-next.47", + "effect": "2.0.0-next.48", "vitest-localstorage-mock": "^0.0.1" }, "peerDependencies": { - "effect": "2.0.0-next.47" + "effect": "2.0.0-next.48" }, "files": [ "src", diff --git a/packages/platform-bun/package.json b/packages/platform-bun/package.json index fab8e721..94cf97ec 100644 --- a/packages/platform-bun/package.json +++ b/packages/platform-bun/package.json @@ -28,7 +28,7 @@ "scripts": { "example": "ts-node --project tsconfig.examples.json", "lint": "eslint src/**/*.ts test/**/*.ts", - "tc": "tsc --noEmit", + "tc": "tsc -b", "test": "vitest", "coverage": "vitest run --coverage" }, @@ -41,12 +41,12 @@ "@effect/platform-node": "workspace:^" }, "devDependencies": { - "@effect/schema": "^0.42.0", - "bun-types": "1.0.5-canary.20231008T140131", - "effect": "2.0.0-next.47" + "@effect/schema": "^0.43.0", + "bun-types": "1.0.5-canary.20231009T140142", + "effect": "2.0.0-next.48" }, "peerDependencies": { - "effect": "2.0.0-next.47" + "effect": "2.0.0-next.48" }, "files": [ "src", diff --git a/packages/platform-bun/src/internal/http/server.ts b/packages/platform-bun/src/internal/http/server.ts index bb509aff..3c02afef 100644 --- a/packages/platform-bun/src/internal/http/server.ts +++ b/packages/platform-bun/src/internal/http/server.ts @@ -65,7 +65,6 @@ export const make = ( Effect.async(() => { const runFork = Runtime.runFork(runtime) function handler(request: Request, _server: BunServer) { - console.log(request) return new Promise((resolve, reject) => { const fiber = runFork(Effect.provideService( app, @@ -112,7 +111,7 @@ const makeResponse = (request: ServerRequest.ServerRequest, response: ServerResp }) } case "FormData": { - return new Response(body.formData, { + return new Response(body.formData as any, { status: response.status, statusText: response.statusText, headers: response.headers @@ -213,7 +212,7 @@ class ServerRequestImpl implements ServerRequest.ServerRequest { get stream(): Stream.Stream { return this.source.body - ? Stream.fromReadableStream(() => this.source.body!, (_) => + ? Stream.fromReadableStream(() => this.source.body as any, (_) => Error.RequestError({ request: this, reason: "Decode", diff --git a/packages/platform-node/package.json b/packages/platform-node/package.json index d6f8e803..989e54df 100644 --- a/packages/platform-node/package.json +++ b/packages/platform-node/package.json @@ -40,13 +40,13 @@ "license": "MIT", "sideEffects": false, "devDependencies": { - "@effect/schema": "^0.42.0", + "@effect/schema": "^0.43.0", "@types/busboy": "^1.5.1", "@types/mime": "^3.0.2", - "effect": "2.0.0-next.47" + "effect": "2.0.0-next.48" }, "peerDependencies": { - "effect": "2.0.0-next.47" + "effect": "2.0.0-next.48" }, "dependencies": { "@effect/platform": "workspace:^", diff --git a/packages/platform-node/vitest.config.ts b/packages/platform-node/vitest.config.ts index 0a01ab31..6db8a352 100644 --- a/packages/platform-node/vitest.config.ts +++ b/packages/platform-node/vitest.config.ts @@ -1,13 +1,8 @@ /// -import babel from "@vitejs/plugin-react" -import path from "path" +import * as path from "path" import { defineConfig } from "vite" -// eslint-disable-next-line @typescript-eslint/no-var-requires -const babelConfig = require("../../.babel.mjs.json") - export default defineConfig({ - plugins: [babel({ babel: babelConfig })], test: { include: ["./test/**/*.test.ts"], globals: true diff --git a/packages/platform/package.json b/packages/platform/package.json index 19a25d6f..aa5f394d 100644 --- a/packages/platform/package.json +++ b/packages/platform/package.json @@ -37,17 +37,17 @@ "license": "MIT", "sideEffects": false, "dependencies": { - "find-my-way": "^7.6.2", + "find-my-way": "^7.7.0", "path-browserify": "^1.0.1" }, "devDependencies": { - "@effect/schema": "^0.42.0", + "@effect/schema": "^0.43.0", "@types/path-browserify": "^1.0.0", - "effect": "2.0.0-next.47" + "effect": "2.0.0-next.48" }, "peerDependencies": { - "@effect/schema": "^0.42.0", - "effect": "2.0.0-next.47" + "@effect/schema": "^0.43.0", + "effect": "2.0.0-next.48" }, "files": [ "src", diff --git a/packages/platform/src/Http/IncomingMessage.ts b/packages/platform/src/Http/IncomingMessage.ts index bcc7b113..9bcccbfd 100644 --- a/packages/platform/src/Http/IncomingMessage.ts +++ b/packages/platform/src/Http/IncomingMessage.ts @@ -3,13 +3,13 @@ */ import * as ParseResult from "@effect/schema/ParseResult" import * as Schema from "@effect/schema/Schema" -import * as Context from "effect/Context" import * as Effect from "effect/Effect" import * as FiberRef from "effect/FiberRef" import { dual, flow } from "effect/Function" import * as Global from "effect/GlobalValue" import * as Option from "effect/Option" import type * as Stream from "effect/Stream" +import * as Tracer from "effect/Tracer" import type { ExternalSpan } from "effect/Tracer" import * as FileSystem from "../FileSystem" import type * as Headers from "./Headers" @@ -74,7 +74,8 @@ export const schemaHeaders = >, A>(sch const SpanSchema = Schema.struct({ traceId: Schema.string, spanId: Schema.string, - parentSpanId: Schema.union(Schema.string, Schema.undefined) + parentSpanId: Schema.union(Schema.string, Schema.undefined), + sampled: Schema.boolean }) /** @@ -94,6 +95,7 @@ export const schemaExternalSpan = flow( return ParseResult.success({ traceId: parts[0], spanId: parts[1], + sampled: parts[2] ? parts[2] === "1" : true, parentSpanId: parts[3] }) } @@ -105,27 +107,31 @@ export const schemaExternalSpan = flow( Schema.struct({ "x-b3-traceid": Schema.NonEmpty, "x-b3-spanid": Schema.NonEmpty, - "x-b3-parentspanid": Schema.optional(Schema.NonEmpty) + "x-b3-parentspanid": Schema.optional(Schema.NonEmpty), + "x-b3-sampled": Schema.optional(Schema.NonEmpty).withDefault(() => "1") }), SpanSchema, (_) => ({ traceId: _["x-b3-traceid"], spanId: _["x-b3-spanid"], - parentSpanId: _["x-b3-parentspanid"] + parentSpanId: _["x-b3-parentspanid"], + sampled: _["x-b3-sampled"] === "1" }), (_) => ({ "x-b3-traceid": _.traceId, "x-b3-spanid": _.spanId, - "x-b3-parentspanid": _.parentSpanId + "x-b3-parentspanid": _.parentSpanId, + "x-b3-sampled": _.sampled ? "1" : "0" }) ) )), - Effect.map((_): ExternalSpan => ({ - _tag: "ExternalSpan", - traceId: _.traceId, - spanId: _.spanId, - context: Context.empty() - })) + Effect.map((_): ExternalSpan => + Tracer.externalSpan({ + traceId: _.traceId, + spanId: _.spanId, + sampled: _.sampled + }) + ) ) /** diff --git a/packages/platform/src/internal/http/client.ts b/packages/platform/src/internal/http/client.ts index e213a28e..6446d3c2 100644 --- a/packages/platform/src/internal/http/client.ts +++ b/packages/platform/src/internal/http/client.ts @@ -401,7 +401,7 @@ export const withB3Propagation = ( Effect.flatMap(self), Effect.tap((res) => Effect.ignore( - Effect.flatMap(IncomingMessage.schemaExternalSpan(res), Effect.withParentSpanScoped) + Effect.flatMap(IncomingMessage.schemaExternalSpan(res), Effect.setParentSpan) ) ) ) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64ab302f..34cffb77 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -26,11 +26,11 @@ importers: specifier: ^2.26.2 version: 2.26.2 '@effect/build-utils': - specifier: ^0.1.8 - version: 0.1.8 + specifier: ^0.1.9 + version: 0.1.9 '@effect/docgen': specifier: ^0.1.8 - version: 0.1.8(@types/node@20.8.3)(typescript@5.2.2) + version: 0.1.8(@types/node@20.8.4)(typescript@5.2.2) '@effect/eslint-plugin': specifier: ^0.1.2 version: 0.1.2 @@ -41,17 +41,17 @@ importers: specifier: ^2.8.1 version: 2.8.1 '@types/chai': - specifier: ^4.3.6 - version: 4.3.6 + specifier: ^4.3.7 + version: 4.3.7 '@types/node': - specifier: ^20.8.3 - version: 20.8.3 + specifier: ^20.8.4 + version: 20.8.4 '@typescript-eslint/eslint-plugin': - specifier: ^6.7.4 - version: 6.7.4(@typescript-eslint/parser@6.7.4)(eslint@8.51.0)(typescript@5.2.2) + specifier: ^6.7.5 + version: 6.7.5(@typescript-eslint/parser@6.7.5)(eslint@8.51.0)(typescript@5.2.2) '@typescript-eslint/parser': - specifier: ^6.7.4 - version: 6.7.4(eslint@8.51.0)(typescript@5.2.2) + specifier: ^6.7.5 + version: 6.7.5(eslint@8.51.0)(typescript@5.2.2) '@vitejs/plugin-react': specifier: ^4.1.0 version: 4.1.0(vite@4.4.11) @@ -72,7 +72,7 @@ importers: version: 8.51.0 eslint-import-resolver-typescript: specifier: ^3.6.1 - version: 3.6.1(@typescript-eslint/parser@6.7.4)(eslint-plugin-import@2.28.1)(eslint@8.51.0) + version: 3.6.1(@typescript-eslint/parser@6.7.5)(eslint-plugin-import@2.28.1)(eslint@8.51.0) eslint-plugin-codegen: specifier: 0.17.0 version: 0.17.0 @@ -81,7 +81,7 @@ importers: version: 2.0.0(eslint@8.51.0)(typescript@5.2.2) eslint-plugin-import: specifier: ^2.28.1 - version: 2.28.1(@typescript-eslint/parser@6.7.4)(eslint-import-resolver-typescript@3.6.1)(eslint@8.51.0) + version: 2.28.1(@typescript-eslint/parser@6.7.5)(eslint-import-resolver-typescript@3.6.1)(eslint@8.51.0) eslint-plugin-simple-import-sort: specifier: ^10.0.0 version: 10.0.0(eslint@8.51.0) @@ -99,16 +99,19 @@ importers: version: 5.0.5 ts-node: specifier: ^10.9.1 - version: 10.9.1(@types/node@20.8.3)(typescript@5.2.2) + version: 10.9.1(@types/node@20.8.4)(typescript@5.2.2) typescript: specifier: ^5.2.2 version: 5.2.2 ultra-runner: specifier: ^3.10.5 version: 3.10.5 + undici-types: + specifier: ^5.25.3 + version: 5.25.3 vite: specifier: ^4.4.11 - version: 4.4.11(@types/node@20.8.3) + version: 4.4.11(@types/node@20.8.4) vitest: specifier: 0.34.6 version: 0.34.6 @@ -116,21 +119,21 @@ importers: packages/platform: dependencies: find-my-way: - specifier: ^7.6.2 - version: 7.6.2 + specifier: ^7.7.0 + version: 7.7.0 path-browserify: specifier: ^1.0.1 version: 1.0.1 devDependencies: '@effect/schema': - specifier: ^0.42.0 - version: 0.42.0(effect@2.0.0-next.47)(fast-check@3.13.1) + specifier: ^0.43.0 + version: 0.43.0(effect@2.0.0-next.48)(fast-check@3.13.1) '@types/path-browserify': specifier: ^1.0.0 version: 1.0.0 effect: - specifier: 2.0.0-next.47 - version: 2.0.0-next.47 + specifier: 2.0.0-next.48 + version: 2.0.0-next.48 packages/platform-browser: dependencies: @@ -139,8 +142,8 @@ importers: version: link:../platform devDependencies: effect: - specifier: 2.0.0-next.47 - version: 2.0.0-next.47 + specifier: 2.0.0-next.48 + version: 2.0.0-next.48 vitest-localstorage-mock: specifier: ^0.0.1 version: 0.0.1(vitest@0.34.6) @@ -155,14 +158,14 @@ importers: version: link:../platform-node devDependencies: '@effect/schema': - specifier: ^0.42.0 - version: 0.42.0(effect@2.0.0-next.47)(fast-check@3.13.1) + specifier: ^0.43.0 + version: 0.43.0(effect@2.0.0-next.48)(fast-check@3.13.1) bun-types: - specifier: 1.0.5-canary.20231008T140131 - version: 1.0.5-canary.20231008T140131 + specifier: 1.0.5-canary.20231009T140142 + version: 1.0.5-canary.20231009T140142 effect: - specifier: 2.0.0-next.47 - version: 2.0.0-next.47 + specifier: 2.0.0-next.48 + version: 2.0.0-next.48 packages/platform-node: dependencies: @@ -177,8 +180,8 @@ importers: version: 3.0.0 devDependencies: '@effect/schema': - specifier: ^0.42.0 - version: 0.42.0(effect@2.0.0-next.47)(fast-check@3.13.1) + specifier: ^0.43.0 + version: 0.43.0(effect@2.0.0-next.48)(fast-check@3.13.1) '@types/busboy': specifier: ^1.5.1 version: 1.5.1 @@ -186,8 +189,8 @@ importers: specifier: ^3.0.2 version: 3.0.2 effect: - specifier: 2.0.0-next.47 - version: 2.0.0-next.47 + specifier: 2.0.0-next.48 + version: 2.0.0-next.48 packages: @@ -783,13 +786,13 @@ packages: resolution: {integrity: sha512-rPwwm/RrFIolz6xHa8Kzpshuwpe+xu/XcEw9iUmRF2tnyIwxxaW7XoFKaQ+GfPju81cKpH4vJeq7/2IizKvyjg==} dev: true - /@effect/build-utils@0.1.8: - resolution: {integrity: sha512-RGrn0ZwUO2v4CCGDEfW3loNNdqW5zrs8h0b9JJdPHKuKYaosvuy86DRqjyr/nzuga+/0xhvfOiucNnxbgw5qMQ==} + /@effect/build-utils@0.1.9: + resolution: {integrity: sha512-PmgMZxGgk5lweaYZpR/kC09eZpXOEth9hShr8xn5a5m4S7RiMUu7O1h19Tx/i2ZgpLa/GK1405nkROT5+5z8Sg==} engines: {node: '>=16.17.1'} hasBin: true dev: true - /@effect/docgen@0.1.8(@types/node@20.8.3)(typescript@5.2.2): + /@effect/docgen@0.1.8(@types/node@20.8.4)(typescript@5.2.2): resolution: {integrity: sha512-o3iLXvbkkxEuRUnJ6hJDEXHfeDfA86iVkQm/s8heWQQgD7UBZ7TTWkDIobFaXRKU8qKoCKPSgmLlSq0F3IsBgw==} engines: {node: '>=16.17.1'} hasBin: true @@ -803,7 +806,7 @@ packages: prettier: 2.8.8 rimraf: 5.0.5 ts-morph: 19.0.0 - ts-node: 10.9.1(@types/node@20.8.3)(typescript@5.2.2) + ts-node: 10.9.1(@types/node@20.8.4)(typescript@5.2.2) tsconfck: 2.1.2(typescript@5.2.2) typescript: 5.2.2 transitivePeerDependencies: @@ -824,13 +827,13 @@ packages: resolution: {integrity: sha512-e8vfKbjnbYiyneBincEFS0tzXluopGK77OkVFbPRtUbNDS5tJfb+jiwOQEiqASDsadcZmd+9J9+Q6v/z7GuN2g==} dev: true - /@effect/schema@0.42.0(effect@2.0.0-next.47)(fast-check@3.13.1): - resolution: {integrity: sha512-zhA6tX7rA4IhbUDsAkZYN8NdshZqGP2khjRgJzyLLZvTOBPDUJMLRv+VNztSj01RlYTfHGf7ztMtIyEmskeDnA==} + /@effect/schema@0.43.0(effect@2.0.0-next.48)(fast-check@3.13.1): + resolution: {integrity: sha512-MvWDyS1u/+X7DYQdhnN/Tu0/NwTlFx2/XgR9+JVrX7hQOzH01li6463rohfiH+NYxx3aruAqA1Oz5MSOCB7hnA==} peerDependencies: - effect: 2.0.0-next.47 + effect: 2.0.0-next.48 fast-check: ^3.13.1 dependencies: - effect: 2.0.0-next.47 + effect: 2.0.0-next.48 fast-check: 3.13.1 dev: true @@ -1119,7 +1122,7 @@ packages: dependencies: '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.2 - '@types/node': 20.8.3 + '@types/node': 20.8.4 '@types/yargs': 15.0.16 chalk: 4.1.2 dev: true @@ -1406,17 +1409,17 @@ packages: /@types/busboy@1.5.1: resolution: {integrity: sha512-JAymE2skNionWnBUwby3MatzPUw4D/6/7FX1qxBXLzmRnFxmqU0luIof7om0I8R3B/rSr9FKUnFCqxZ/NeGbrw==} dependencies: - '@types/node': 20.8.3 + '@types/node': 20.8.4 dev: true /@types/chai-subset@1.3.3: resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==} dependencies: - '@types/chai': 4.3.6 + '@types/chai': 4.3.7 dev: true - /@types/chai@4.3.6: - resolution: {integrity: sha512-VOVRLM1mBxIRxydiViqPcKn6MIxZytrbMpd6RJLIWKxUNr3zux8no0Oc7kJx0WAPIitgZ0gkrDS+btlqQpubpw==} + /@types/chai@4.3.7: + resolution: {integrity: sha512-/k+vesl92vMvMygmQrFe9Aimxi6oQXFUX9mA5HanTrKUSAMoLauSi6PNFOdRw0oeqilaW600GNx2vSaT2f8aIQ==} dev: true /@types/estree@0.0.39: @@ -1469,8 +1472,10 @@ packages: resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} dev: true - /@types/node@20.8.3: - resolution: {integrity: sha512-jxiZQFpb+NlH5kjW49vXxvxTjeeqlbsnTAdBTKpzEdPs9itay7MscYXz3Fo9VYFEsfQ6LJFitHad3faerLAjCw==} + /@types/node@20.8.4: + resolution: {integrity: sha512-ZVPnqU58giiCjSxjVUESDtdPk4QR5WQhhINbc9UBrKLU68MX5BF6kbQzTrkwbolyr0X8ChBpXfavr5mZFKZQ5A==} + dependencies: + undici-types: 5.25.3 dev: true /@types/normalize-package-data@2.4.2: @@ -1484,7 +1489,7 @@ packages: /@types/resolve@1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 20.8.3 + '@types/node': 20.8.4 dev: true /@types/semver@7.5.3: @@ -1505,8 +1510,8 @@ packages: '@types/yargs-parser': 21.0.1 dev: true - /@typescript-eslint/eslint-plugin@6.7.4(@typescript-eslint/parser@6.7.4)(eslint@8.51.0)(typescript@5.2.2): - resolution: {integrity: sha512-DAbgDXwtX+pDkAHwiGhqP3zWUGpW49B7eqmgpPtg+BKJXwdct79ut9+ifqOFPJGClGKSHXn2PTBatCnldJRUoA==} + /@typescript-eslint/eslint-plugin@6.7.5(@typescript-eslint/parser@6.7.5)(eslint@8.51.0)(typescript@5.2.2): + resolution: {integrity: sha512-JhtAwTRhOUcP96D0Y6KYnwig/MRQbOoLGXTON2+LlyB/N35SP9j1boai2zzwXb7ypKELXMx3DVk9UTaEq1vHEw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha @@ -1517,11 +1522,11 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.9.1 - '@typescript-eslint/parser': 6.7.4(eslint@8.51.0)(typescript@5.2.2) - '@typescript-eslint/scope-manager': 6.7.4 - '@typescript-eslint/type-utils': 6.7.4(eslint@8.51.0)(typescript@5.2.2) - '@typescript-eslint/utils': 6.7.4(eslint@8.51.0)(typescript@5.2.2) - '@typescript-eslint/visitor-keys': 6.7.4 + '@typescript-eslint/parser': 6.7.5(eslint@8.51.0)(typescript@5.2.2) + '@typescript-eslint/scope-manager': 6.7.5 + '@typescript-eslint/type-utils': 6.7.5(eslint@8.51.0)(typescript@5.2.2) + '@typescript-eslint/utils': 6.7.5(eslint@8.51.0)(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 6.7.5 debug: 4.3.4 eslint: 8.51.0 graphemer: 1.4.0 @@ -1534,8 +1539,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@6.7.4(eslint@8.51.0)(typescript@5.2.2): - resolution: {integrity: sha512-I5zVZFY+cw4IMZUeNCU7Sh2PO5O57F7Lr0uyhgCJmhN/BuTlnc55KxPonR4+EM3GBdfiCyGZye6DgMjtubQkmA==} + /@typescript-eslint/parser@6.7.5(eslint@8.51.0)(typescript@5.2.2): + resolution: {integrity: sha512-bIZVSGx2UME/lmhLcjdVc7ePBwn7CLqKarUBL4me1C5feOd663liTGjMBGVcGr+BhnSLeP4SgwdvNnnkbIdkCw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -1544,10 +1549,10 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 6.7.4 - '@typescript-eslint/types': 6.7.4 - '@typescript-eslint/typescript-estree': 6.7.4(typescript@5.2.2) - '@typescript-eslint/visitor-keys': 6.7.4 + '@typescript-eslint/scope-manager': 6.7.5 + '@typescript-eslint/types': 6.7.5 + '@typescript-eslint/typescript-estree': 6.7.5(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 6.7.5 debug: 4.3.4 eslint: 8.51.0 typescript: 5.2.2 @@ -1563,16 +1568,16 @@ packages: '@typescript-eslint/visitor-keys': 6.7.3 dev: true - /@typescript-eslint/scope-manager@6.7.4: - resolution: {integrity: sha512-SdGqSLUPTXAXi7c3Ob7peAGVnmMoGzZ361VswK2Mqf8UOYcODiYvs8rs5ILqEdfvX1lE7wEZbLyELCW+Yrql1A==} + /@typescript-eslint/scope-manager@6.7.5: + resolution: {integrity: sha512-GAlk3eQIwWOJeb9F7MKQ6Jbah/vx1zETSDw8likab/eFcqkjSD7BI75SDAeC5N2L0MmConMoPvTsmkrg71+B1A==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.7.4 - '@typescript-eslint/visitor-keys': 6.7.4 + '@typescript-eslint/types': 6.7.5 + '@typescript-eslint/visitor-keys': 6.7.5 dev: true - /@typescript-eslint/type-utils@6.7.4(eslint@8.51.0)(typescript@5.2.2): - resolution: {integrity: sha512-n+g3zi1QzpcAdHFP9KQF+rEFxMb2KxtnJGID3teA/nxKHOVi3ylKovaqEzGBbVY2pBttU6z85gp0D00ufLzViQ==} + /@typescript-eslint/type-utils@6.7.5(eslint@8.51.0)(typescript@5.2.2): + resolution: {integrity: sha512-Gs0qos5wqxnQrvpYv+pf3XfcRXW6jiAn9zE/K+DlmYf6FcpxeNYN0AIETaPR7rHO4K2UY+D0CIbDP9Ut0U4m1g==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -1581,8 +1586,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 6.7.4(typescript@5.2.2) - '@typescript-eslint/utils': 6.7.4(eslint@8.51.0)(typescript@5.2.2) + '@typescript-eslint/typescript-estree': 6.7.5(typescript@5.2.2) + '@typescript-eslint/utils': 6.7.5(eslint@8.51.0)(typescript@5.2.2) debug: 4.3.4 eslint: 8.51.0 ts-api-utils: 1.0.3(typescript@5.2.2) @@ -1606,8 +1611,8 @@ packages: engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/types@6.7.4: - resolution: {integrity: sha512-o9XWK2FLW6eSS/0r/tgjAGsYasLAnOWg7hvZ/dGYSSNjCh+49k5ocPN8OmG5aZcSJ8pclSOyVKP2x03Sj+RrCA==} + /@typescript-eslint/types@6.7.5: + resolution: {integrity: sha512-WboQBlOXtdj1tDFPyIthpKrUb+kZf2VroLZhxKa/VlwLlLyqv/PwUNgL30BlTVZV1Wu4Asu2mMYPqarSO4L5ZQ==} engines: {node: ^16.0.0 || >=18.0.0} dev: true @@ -1674,8 +1679,8 @@ packages: - supports-color dev: true - /@typescript-eslint/typescript-estree@6.7.4(typescript@5.2.2): - resolution: {integrity: sha512-ty8b5qHKatlNYd9vmpHooQz3Vki3gG+3PchmtsA4TgrZBKWHNjWfkQid7K7xQogBqqc7/BhGazxMD5vr6Ha+iQ==} + /@typescript-eslint/typescript-estree@6.7.5(typescript@5.2.2): + resolution: {integrity: sha512-NhJiJ4KdtwBIxrKl0BqG1Ur+uw7FiOnOThcYx9DpOGJ/Abc9z2xNzLeirCG02Ig3vkvrc2qFLmYSSsaITbKjlg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: typescript: '*' @@ -1683,8 +1688,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 6.7.4 - '@typescript-eslint/visitor-keys': 6.7.4 + '@typescript-eslint/types': 6.7.5 + '@typescript-eslint/visitor-keys': 6.7.5 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -1714,8 +1719,8 @@ packages: - typescript dev: true - /@typescript-eslint/utils@6.7.4(eslint@8.51.0)(typescript@5.2.2): - resolution: {integrity: sha512-PRQAs+HUn85Qdk+khAxsVV+oULy3VkbH3hQ8hxLRJXWBEd7iI+GbQxH5SEUSH7kbEoTp6oT1bOwyga24ELALTA==} + /@typescript-eslint/utils@6.7.5(eslint@8.51.0)(typescript@5.2.2): + resolution: {integrity: sha512-pfRRrH20thJbzPPlPc4j0UNGvH1PjPlhlCMq4Yx7EGjV7lvEeGX0U6MJYe8+SyFutWgSHsdbJ3BXzZccYggezA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -1723,9 +1728,9 @@ packages: '@eslint-community/eslint-utils': 4.4.0(eslint@8.51.0) '@types/json-schema': 7.0.13 '@types/semver': 7.5.3 - '@typescript-eslint/scope-manager': 6.7.4 - '@typescript-eslint/types': 6.7.4 - '@typescript-eslint/typescript-estree': 6.7.4(typescript@5.2.2) + '@typescript-eslint/scope-manager': 6.7.5 + '@typescript-eslint/types': 6.7.5 + '@typescript-eslint/typescript-estree': 6.7.5(typescript@5.2.2) eslint: 8.51.0 semver: 7.5.4 transitivePeerDependencies: @@ -1757,11 +1762,11 @@ packages: eslint-visitor-keys: 3.4.3 dev: true - /@typescript-eslint/visitor-keys@6.7.4: - resolution: {integrity: sha512-pOW37DUhlTZbvph50x5zZCkFn3xzwkGtNoJHzIM3svpiSkJzwOYr/kVBaXmf+RAQiUDs1AHEZVNPg6UJCJpwRA==} + /@typescript-eslint/visitor-keys@6.7.5: + resolution: {integrity: sha512-3MaWdDZtLlsexZzDSdQWsFQ9l9nL8B80Z4fImSpyllFC/KLqWQRdEcB+gGGO+N3Q2uL40EsG66wZLsohPxNXvg==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.7.4 + '@typescript-eslint/types': 6.7.5 eslint-visitor-keys: 3.4.3 dev: true @@ -1776,7 +1781,7 @@ packages: '@babel/plugin-transform-react-jsx-source': 7.22.5(@babel/core@7.23.0) '@types/babel__core': 7.20.2 react-refresh: 0.14.0 - vite: 4.4.11(@types/node@20.8.3) + vite: 4.4.11(@types/node@20.8.4) transitivePeerDependencies: - supports-color dev: true @@ -2130,8 +2135,8 @@ packages: engines: {node: '>=6'} dev: true - /bun-types@1.0.5-canary.20231008T140131: - resolution: {integrity: sha512-M1PTqYqQepL3VbrkJRcqebWfDalchmDmTjFRRpjxEIH5GQ3syTHXrKLqzdf3D/8GeTkn9SYNBFbCQNjY8ClhSg==} + /bun-types@1.0.5-canary.20231009T140142: + resolution: {integrity: sha512-5hT8WBXZ2ozdJt6s0nnnh4iQXn6xp9a7spbRYjapNxKjR3ckS5U2V347H3+XpaMVzc/a7D2I2KnKqIPO1R82kg==} dev: true /busboy@1.6.0: @@ -2725,8 +2730,8 @@ packages: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} dev: true - /effect@2.0.0-next.47: - resolution: {integrity: sha512-H2L1xoaOblZbrTHuUo/ppWVr9R34FyigxXkEn9iD9TMYgCJqSS9RIUOGCTdT4ATyCgVf7dWlJxOtLFSpirVWqA==} + /effect@2.0.0-next.48: + resolution: {integrity: sha512-vwMIl39m8fMBeXoGIdSwMi2lrg7NltyrGMK0N/liGDl7G9LXvERKOCipNcobSIGO0V7hjaXEWgL6W/KEWEww+g==} dev: true /electron-to-chromium@1.4.537: @@ -2904,7 +2909,7 @@ packages: - supports-color dev: true - /eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.7.4)(eslint-plugin-import@2.28.1)(eslint@8.51.0): + /eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.7.5)(eslint-plugin-import@2.28.1)(eslint@8.51.0): resolution: {integrity: sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -2914,8 +2919,8 @@ packages: debug: 4.3.4 enhanced-resolve: 5.15.0 eslint: 8.51.0 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.7.4)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.51.0) - eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.7.4)(eslint-import-resolver-typescript@3.6.1)(eslint@8.51.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.7.5)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.51.0) + eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.7.5)(eslint-import-resolver-typescript@3.6.1)(eslint@8.51.0) fast-glob: 3.3.1 get-tsconfig: 4.7.2 is-core-module: 2.13.0 @@ -2927,7 +2932,7 @@ packages: - supports-color dev: true - /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.7.4)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.51.0): + /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.7.5)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.51.0): resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: @@ -2948,11 +2953,11 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 6.7.4(eslint@8.51.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.7.5(eslint@8.51.0)(typescript@5.2.2) debug: 3.2.7 eslint: 8.51.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.7.4)(eslint-plugin-import@2.28.1)(eslint@8.51.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.7.5)(eslint-plugin-import@2.28.1)(eslint@8.51.0) transitivePeerDependencies: - supports-color dev: true @@ -2992,7 +2997,7 @@ packages: - supports-color dev: true - /eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.7.4)(eslint-import-resolver-typescript@3.6.1)(eslint@8.51.0): + /eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.7.5)(eslint-import-resolver-typescript@3.6.1)(eslint@8.51.0): resolution: {integrity: sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==} engines: {node: '>=4'} peerDependencies: @@ -3002,7 +3007,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 6.7.4(eslint@8.51.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.7.5(eslint@8.51.0)(typescript@5.2.2) array-includes: 3.1.7 array.prototype.findlastindex: 1.2.3 array.prototype.flat: 1.3.2 @@ -3011,7 +3016,7 @@ packages: doctrine: 2.1.0 eslint: 8.51.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.7.4)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.51.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.7.5)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.51.0) has: 1.0.3 is-core-module: 2.13.0 is-glob: 4.0.3 @@ -3292,8 +3297,8 @@ packages: to-regex-range: 5.0.1 dev: true - /find-my-way@7.6.2: - resolution: {integrity: sha512-0OjHn1b1nCX3eVbm9ByeEHiscPYiHLfhei1wOUU9qffQkk98wE0Lo8VrVYfSGMgnSnDh86DxedduAnBf4nwUEw==} + /find-my-way@7.7.0: + resolution: {integrity: sha512-+SrHpvQ52Q6W9f3wJoJBbAQULJuNEEQwBvlvYwACDhBTLOTMiQ0HYWh4+vC3OivGP2ENcTI1oKlFA2OepJNjhQ==} engines: {node: '>=14'} dependencies: fast-deep-equal: 3.1.3 @@ -4130,7 +4135,7 @@ packages: resolution: {integrity: sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 20.8.3 + '@types/node': 20.8.4 merge-stream: 2.0.0 supports-color: 7.2.0 dev: true @@ -5905,7 +5910,7 @@ packages: code-block-writer: 12.0.0 dev: true - /ts-node@10.9.1(@types/node@20.8.3)(typescript@5.2.2): + /ts-node@10.9.1(@types/node@20.8.4)(typescript@5.2.2): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -5924,7 +5929,7 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.8.3 + '@types/node': 20.8.4 acorn: 8.10.0 acorn-walk: 8.2.0 arg: 4.1.3 @@ -6149,6 +6154,10 @@ packages: which-boxed-primitive: 1.0.2 dev: true + /undici-types@5.25.3: + resolution: {integrity: sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==} + dev: true + /uniq@1.0.1: resolution: {integrity: sha512-Gw+zz50YNKPDKXs+9d+aKAjVwpjNwqzvNpLigIruT4HA9lMZNdMqs9x07kKHB/L9WRzqp4+DlTU5s4wG2esdoA==} dev: true @@ -6208,7 +6217,7 @@ packages: spdx-expression-parse: 3.0.1 dev: true - /vite-node@0.34.6(@types/node@20.8.3): + /vite-node@0.34.6(@types/node@20.8.4): resolution: {integrity: sha512-nlBMJ9x6n7/Amaz6F3zJ97EBwR2FkzhBRxF5e+jE6LA3yi6Wtc2lyTij1OnDMIr34v5g/tVQtsVAzhT0jc5ygA==} engines: {node: '>=v14.18.0'} hasBin: true @@ -6218,7 +6227,7 @@ packages: mlly: 1.4.2 pathe: 1.1.1 picocolors: 1.0.0 - vite: 4.4.11(@types/node@20.8.3) + vite: 4.4.11(@types/node@20.8.4) transitivePeerDependencies: - '@types/node' - less @@ -6230,7 +6239,7 @@ packages: - terser dev: true - /vite@4.4.11(@types/node@20.8.3): + /vite@4.4.11(@types/node@20.8.4): resolution: {integrity: sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true @@ -6258,7 +6267,7 @@ packages: terser: optional: true dependencies: - '@types/node': 20.8.3 + '@types/node': 20.8.4 esbuild: 0.18.20 postcss: 8.4.31 rollup: 3.29.4 @@ -6305,9 +6314,9 @@ packages: webdriverio: optional: true dependencies: - '@types/chai': 4.3.6 + '@types/chai': 4.3.7 '@types/chai-subset': 1.3.3 - '@types/node': 20.8.3 + '@types/node': 20.8.4 '@vitest/expect': 0.34.6 '@vitest/runner': 0.34.6 '@vitest/snapshot': 0.34.6 @@ -6326,8 +6335,8 @@ packages: strip-literal: 1.3.0 tinybench: 2.5.1 tinypool: 0.7.0 - vite: 4.4.11(@types/node@20.8.3) - vite-node: 0.34.6(@types/node@20.8.3) + vite: 4.4.11(@types/node@20.8.4) + vite-node: 0.34.6(@types/node@20.8.4) why-is-node-running: 2.2.2 transitivePeerDependencies: - less diff --git a/scripts/clean.mjs b/scripts/clean.mjs index 896e0dfa..478c4d31 100644 --- a/scripts/clean.mjs +++ b/scripts/clean.mjs @@ -10,6 +10,7 @@ import * as Glob from "glob"; "build", "tsconfig.tsbuildinfo", "coverage", + "src/tsconfig.json", ...(pkg === "." ? [] : ["docs"]), ...files, ] diff --git a/tsconfig.base.json b/tsconfig.base.json index 6fb6afcd..4a38123b 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -49,7 +49,7 @@ "@effect/platform-node/test/*": ["./packages/platform-node/test/*.ts"], "@effect/platform-node/*": ["./packages/platform-node/src/*.ts"] }, - "types": ["vitest/globals", "node"], + "types": ["vitest/globals"], "plugins": [{ "name": "@effect/language-service" }] } }