From e6cd9c53391e729c058ba153492287bc40734b4c Mon Sep 17 00:00:00 2001 From: JPeer264 Date: Tue, 3 Mar 2026 13:26:06 +0100 Subject: [PATCH 1/7] feat(effect): Add base skaffolding for Effect.ts --- package.json | 1 + packages/effect/.eslintrc.js | 3 + packages/effect/LICENSE | 21 ++++++ packages/effect/README.md | 52 +++++++++++++++ packages/effect/package.json | 67 +++++++++++++++++++ packages/effect/rollup.npm.config.mjs | 11 ++++ packages/effect/src/client.ts | 59 +++++++++++++++++ packages/effect/src/index.ts | 92 +++++++++++++++++++++++++++ packages/effect/src/sdk.ts | 60 +++++++++++++++++ packages/effect/tsconfig.json | 8 +++ packages/effect/tsconfig.types.json | 10 +++ 11 files changed, 384 insertions(+) create mode 100644 packages/effect/.eslintrc.js create mode 100644 packages/effect/LICENSE create mode 100644 packages/effect/README.md create mode 100644 packages/effect/package.json create mode 100644 packages/effect/rollup.npm.config.mjs create mode 100644 packages/effect/src/client.ts create mode 100644 packages/effect/src/index.ts create mode 100644 packages/effect/src/sdk.ts create mode 100644 packages/effect/tsconfig.json create mode 100644 packages/effect/tsconfig.types.json diff --git a/package.json b/package.json index 91bc549e4527..59d0415142c1 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "packages/core", "packages/cloudflare", "packages/deno", + "packages/effect", "packages/ember", "packages/eslint-config-sdk", "packages/eslint-plugin-sdk", diff --git a/packages/effect/.eslintrc.js b/packages/effect/.eslintrc.js new file mode 100644 index 000000000000..5a2cc7f1ec08 --- /dev/null +++ b/packages/effect/.eslintrc.js @@ -0,0 +1,3 @@ +module.exports = { + extends: ['../../.eslintrc.js'], +}; diff --git a/packages/effect/LICENSE b/packages/effect/LICENSE new file mode 100644 index 000000000000..fea6013e7dbf --- /dev/null +++ b/packages/effect/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Functional Software Inc. dba Sentry + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/effect/README.md b/packages/effect/README.md new file mode 100644 index 000000000000..24526c91aa04 --- /dev/null +++ b/packages/effect/README.md @@ -0,0 +1,52 @@ +# Sentry Effect SDK + +[![npm version](https://img.shields.io/npm/v/@sentry/effect.svg)](https://www.npmjs.com/package/@sentry/effect) +[![npm dm](https://img.shields.io/npm/dm/@sentry/effect.svg)](https://www.npmjs.com/package/@sentry/effect) +[![npm dt](https://img.shields.io/npm/dt/@sentry/effect.svg)](https://www.npmjs.com/package/@sentry/effect) + +## Links + +- [Official SDK Docs](https://docs.sentry.io/) +- [TypeDoc](http://getsentry.github.io/sentry-javascript/) + +## General + +This package is a Sentry SDK for [Effect](https://effect.website/). + +## Installation + +```bash +npm install @sentry/effect +# or +yarn add @sentry/effect +# or +pnpm add @sentry/effect +``` + +## Usage + +```typescript +import * as Sentry from '@sentry/effect/server'; +import { NodeRuntime } from '@effect/platform-node'; +import { Layer } from 'effect'; +import { HttpLive } from './Http.js'; + +const MainLive = HttpLive.pipe( + Layer.provide( + Sentry.effectLayer({ + dsn: '__DSN__', + enableLogs: true, + enableMetrics: true, + }), + ), +); + +MainLive.pipe(Layer.launch, NodeRuntime.runMain); +``` + +The `effectLayer` function initializes Sentry and returns an Effect Layer that provides: + +- Distributed tracing with automatic HTTP header extraction/injection +- Effect spans traced as Sentry spans +- Effect logs forwarded to Sentry (when `enableLogs` is set) +- Effect metrics sent to Sentry (when `enableMetrics` is set) diff --git a/packages/effect/package.json b/packages/effect/package.json new file mode 100644 index 000000000000..dbee14b478a8 --- /dev/null +++ b/packages/effect/package.json @@ -0,0 +1,67 @@ +{ + "name": "@sentry/effect", + "version": "10.42.0", + "description": "Official Sentry SDK for Effect", + "repository": "git://github.com/getsentry/sentry-javascript.git", + "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/effect", + "author": "Sentry", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "files": [ + "/build" + ], + "main": "build/cjs/index.js", + "module": "build/esm/index.js", + "types": "build/types/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "types": "./build/types/index.d.ts", + "default": "./build/esm/index.js" + }, + "require": { + "types": "./build/types/index.d.ts", + "default": "./build/cjs/index.js" + } + } + }, + "typesVersions": { + "<5.0": { + "build/types/index.d.ts": [ + "build/types-ts3.8/index.d.ts" + ] + } + }, + "publishConfig": { + "access": "public" + }, + "dependencies": { + "@sentry/core": "10.42.0" + }, + "scripts": { + "build": "run-p build:transpile build:types", + "build:dev": "yarn build", + "build:transpile": "rollup -c rollup.npm.config.mjs", + "build:types": "run-s build:types:core build:types:downlevel", + "build:types:core": "tsc -p tsconfig.types.json", + "build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8", + "build:watch": "run-p build:transpile:watch", + "build:dev:watch": "yarn build:watch", + "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", + "build:tarball": "npm pack", + "circularDepCheck": "madge --circular src/index.ts", + "clean": "rimraf build coverage sentry-effect-*.tgz", + "fix": "eslint . --format stylish --fix", + "lint": "eslint . --format stylish", + "test": "vitest run", + "test:watch": "vitest --watch", + "yalc:publish": "yalc publish --push --sig" + }, + "volta": { + "extends": "../../package.json" + }, + "sideEffects": false +} diff --git a/packages/effect/rollup.npm.config.mjs b/packages/effect/rollup.npm.config.mjs new file mode 100644 index 000000000000..ca36da81392f --- /dev/null +++ b/packages/effect/rollup.npm.config.mjs @@ -0,0 +1,11 @@ +import { makeBaseNPMConfig, makeNPMConfigVariants } from '@sentry-internal/rollup-utils'; + +export default makeNPMConfigVariants( + makeBaseNPMConfig({ + packageSpecificConfig: { + output: { + preserveModulesRoot: 'src', + }, + }, + }), +); diff --git a/packages/effect/src/client.ts b/packages/effect/src/client.ts new file mode 100644 index 000000000000..c5b73153a0e3 --- /dev/null +++ b/packages/effect/src/client.ts @@ -0,0 +1,59 @@ +import type { ClientOptions, Event, EventHint, Options, ParameterizedString, SeverityLevel } from '@sentry/core'; +import { + applySdkMetadata, + Client, + eventFromMessage as coreEventFromMessage, + eventFromUnknownInput as coreEventFromUnknownInput, + resolvedSyncPromise, +} from '@sentry/core'; + +/** + * Configuration options for the Sentry Effect SDK. + * @see @sentry/core Options for more information. + */ +export type EffectOptions = Options; + +/** + * Configuration options for the Sentry Effect SDK Client class. + * @see EffectClient for more information. + */ +export type EffectClientOptions = ClientOptions; + +/** + * The Sentry Effect SDK Client. + * + * @see EffectOptions for documentation on configuration options. + * @see Client for usage documentation. + */ +export class EffectClient extends Client { + /** + * Creates a new Effect SDK instance. + * @param options Configuration options for this SDK. + */ + public constructor(options: EffectClientOptions) { + applySdkMetadata(options, 'effect'); + super(options); + } + + /** + * @inheritDoc + */ + public eventFromException(exception: unknown, hint?: EventHint): PromiseLike { + const event = coreEventFromUnknownInput(this, this._options.stackParser, exception, hint); + event.level = 'error'; + return resolvedSyncPromise(event); + } + + /** + * @inheritDoc + */ + public eventFromMessage( + message: ParameterizedString, + level: SeverityLevel = 'info', + hint?: EventHint, + ): PromiseLike { + return resolvedSyncPromise( + coreEventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace), + ); + } +} diff --git a/packages/effect/src/index.ts b/packages/effect/src/index.ts new file mode 100644 index 000000000000..f2fbf34a253a --- /dev/null +++ b/packages/effect/src/index.ts @@ -0,0 +1,92 @@ +export type { + Breadcrumb, + BreadcrumbHint, + Context, + Contexts, + RequestEventData, + SdkInfo, + Event, + EventHint, + ErrorEvent, + Exception, + SeverityLevel, + StackFrame, + Stacktrace, + Thread, + User, + Session, + CaptureContext, + ExclusiveEventHintOrCaptureContext, + Log, + LogSeverityLevel, + Span, +} from '@sentry/core'; + +export type { EffectOptions, EffectClientOptions } from './client'; + +export { + addEventProcessor, + addBreadcrumb, + addIntegration, + captureException, + captureEvent, + captureFeedback, + captureMessage, + close, + createTransport, + lastEventId, + flush, + getClient, + isInitialized, + isEnabled, + getCurrentScope, + getIsolationScope, + getGlobalScope, + setCurrentClient, + Scope, + continueTrace, + getTraceData, + suppressTracing, + SDK_VERSION, + setContext, + setExtra, + setExtras, + setTag, + setTags, + setUser, + withScope, + withIsolationScope, + functionToStringIntegration, + eventFiltersIntegration, + dedupeIntegration, + parameterize, + startSession, + captureSession, + endSession, + spanToJSON, + spanToTraceHeader, + spanToBaggageHeader, + updateSpanName, + metrics, + getActiveSpan, + getRootSpan, + startSpan, + startInactiveSpan, + startSpanManual, + withActiveSpan, + startNewTrace, + getSpanDescendants, + setMeasurement, + getSpanStatusFromHttpCode, + setHttpStatus, +} from '@sentry/core'; + +export { + SEMANTIC_ATTRIBUTE_SENTRY_OP, + SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, + SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, + SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, +} from '@sentry/core'; + +export { EffectClient } from './client'; +export { init } from './sdk'; diff --git a/packages/effect/src/sdk.ts b/packages/effect/src/sdk.ts new file mode 100644 index 000000000000..7e13d880c840 --- /dev/null +++ b/packages/effect/src/sdk.ts @@ -0,0 +1,60 @@ +import type { Client } from '@sentry/core'; +import { getIntegrationsToSetup, initAndBind, stackParserFromStackParserOptions } from '@sentry/core'; +import type { EffectClientOptions, EffectOptions } from './client'; +import { EffectClient } from './client'; + +/** + * The Sentry Effect SDK Client. + * + * To use this SDK, call the {@link init} function as early as possible in your application. + * + * @example + * + * ``` + * import { init } from '@sentry/effect'; + * + * init({ + * dsn: '__DSN__', + * transport: myTransport, + * // ... + * }); + * ``` + * + * @example + * ``` + * import { addBreadcrumb } from '@sentry/effect'; + * addBreadcrumb({ + * message: 'My Breadcrumb', + * // ... + * }); + * ``` + * + * @example + * + * ``` + * import * as Sentry from '@sentry/effect'; + * Sentry.captureMessage('Hello, world!'); + * Sentry.captureException(new Error('Good bye')); + * Sentry.captureEvent({ + * message: 'Manual', + * stacktrace: [ + * // ... + * ], + * }); + * ``` + * + * @see {@link EffectOptions} for documentation on configuration options. + */ +export function init(options: EffectOptions & { transport: EffectClientOptions['transport'] }): Client | undefined { + const clientOptions: EffectClientOptions = { + ...options, + stackParser: stackParserFromStackParserOptions(options.stackParser || []), + integrations: getIntegrationsToSetup({ + integrations: options.integrations, + defaultIntegrations: options.defaultIntegrations ?? [], + }), + transport: options.transport, + }; + + return initAndBind(EffectClient, clientOptions); +} diff --git a/packages/effect/tsconfig.json b/packages/effect/tsconfig.json new file mode 100644 index 000000000000..ee81c1a20817 --- /dev/null +++ b/packages/effect/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "module": "esnext", + "outDir": "build" + }, + "include": ["src/**/*"] +} diff --git a/packages/effect/tsconfig.types.json b/packages/effect/tsconfig.types.json new file mode 100644 index 000000000000..76eb1a9bb7c3 --- /dev/null +++ b/packages/effect/tsconfig.types.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "build/types" + }, + "include": ["src/**/*"] +} From 86f72092a11fc5480f5e1234285d1d06cb6532d4 Mon Sep 17 00:00:00 2001 From: JPeer264 Date: Wed, 4 Mar 2026 11:59:52 +0100 Subject: [PATCH 2/7] fixup! feat(effect): Add base skaffolding for Effect.ts --- packages/effect/src/client.ts | 59 ---------------------------------- packages/effect/src/index.ts | 5 --- packages/effect/src/sdk.ts | 60 ----------------------------------- 3 files changed, 124 deletions(-) delete mode 100644 packages/effect/src/client.ts delete mode 100644 packages/effect/src/sdk.ts diff --git a/packages/effect/src/client.ts b/packages/effect/src/client.ts deleted file mode 100644 index c5b73153a0e3..000000000000 --- a/packages/effect/src/client.ts +++ /dev/null @@ -1,59 +0,0 @@ -import type { ClientOptions, Event, EventHint, Options, ParameterizedString, SeverityLevel } from '@sentry/core'; -import { - applySdkMetadata, - Client, - eventFromMessage as coreEventFromMessage, - eventFromUnknownInput as coreEventFromUnknownInput, - resolvedSyncPromise, -} from '@sentry/core'; - -/** - * Configuration options for the Sentry Effect SDK. - * @see @sentry/core Options for more information. - */ -export type EffectOptions = Options; - -/** - * Configuration options for the Sentry Effect SDK Client class. - * @see EffectClient for more information. - */ -export type EffectClientOptions = ClientOptions; - -/** - * The Sentry Effect SDK Client. - * - * @see EffectOptions for documentation on configuration options. - * @see Client for usage documentation. - */ -export class EffectClient extends Client { - /** - * Creates a new Effect SDK instance. - * @param options Configuration options for this SDK. - */ - public constructor(options: EffectClientOptions) { - applySdkMetadata(options, 'effect'); - super(options); - } - - /** - * @inheritDoc - */ - public eventFromException(exception: unknown, hint?: EventHint): PromiseLike { - const event = coreEventFromUnknownInput(this, this._options.stackParser, exception, hint); - event.level = 'error'; - return resolvedSyncPromise(event); - } - - /** - * @inheritDoc - */ - public eventFromMessage( - message: ParameterizedString, - level: SeverityLevel = 'info', - hint?: EventHint, - ): PromiseLike { - return resolvedSyncPromise( - coreEventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace), - ); - } -} diff --git a/packages/effect/src/index.ts b/packages/effect/src/index.ts index f2fbf34a253a..88781f88051a 100644 --- a/packages/effect/src/index.ts +++ b/packages/effect/src/index.ts @@ -22,8 +22,6 @@ export type { Span, } from '@sentry/core'; -export type { EffectOptions, EffectClientOptions } from './client'; - export { addEventProcessor, addBreadcrumb, @@ -87,6 +85,3 @@ export { SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, } from '@sentry/core'; - -export { EffectClient } from './client'; -export { init } from './sdk'; diff --git a/packages/effect/src/sdk.ts b/packages/effect/src/sdk.ts deleted file mode 100644 index 7e13d880c840..000000000000 --- a/packages/effect/src/sdk.ts +++ /dev/null @@ -1,60 +0,0 @@ -import type { Client } from '@sentry/core'; -import { getIntegrationsToSetup, initAndBind, stackParserFromStackParserOptions } from '@sentry/core'; -import type { EffectClientOptions, EffectOptions } from './client'; -import { EffectClient } from './client'; - -/** - * The Sentry Effect SDK Client. - * - * To use this SDK, call the {@link init} function as early as possible in your application. - * - * @example - * - * ``` - * import { init } from '@sentry/effect'; - * - * init({ - * dsn: '__DSN__', - * transport: myTransport, - * // ... - * }); - * ``` - * - * @example - * ``` - * import { addBreadcrumb } from '@sentry/effect'; - * addBreadcrumb({ - * message: 'My Breadcrumb', - * // ... - * }); - * ``` - * - * @example - * - * ``` - * import * as Sentry from '@sentry/effect'; - * Sentry.captureMessage('Hello, world!'); - * Sentry.captureException(new Error('Good bye')); - * Sentry.captureEvent({ - * message: 'Manual', - * stacktrace: [ - * // ... - * ], - * }); - * ``` - * - * @see {@link EffectOptions} for documentation on configuration options. - */ -export function init(options: EffectOptions & { transport: EffectClientOptions['transport'] }): Client | undefined { - const clientOptions: EffectClientOptions = { - ...options, - stackParser: stackParserFromStackParserOptions(options.stackParser || []), - integrations: getIntegrationsToSetup({ - integrations: options.integrations, - defaultIntegrations: options.defaultIntegrations ?? [], - }), - transport: options.transport, - }; - - return initAndBind(EffectClient, clientOptions); -} From 3d7aaed92870deadc1e5f78163585a10d53a630f Mon Sep 17 00:00:00 2001 From: JPeer264 Date: Wed, 4 Mar 2026 12:01:37 +0100 Subject: [PATCH 3/7] test(effect): Add a smoke test so CI doesn't fail --- packages/effect/test/index.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 packages/effect/test/index.test.ts diff --git a/packages/effect/test/index.test.ts b/packages/effect/test/index.test.ts new file mode 100644 index 000000000000..f774de6eaf24 --- /dev/null +++ b/packages/effect/test/index.test.ts @@ -0,0 +1,8 @@ +import { describe, expect, it } from 'vitest'; +import * as index from '../src'; + +describe('effect index export', () => { + it('has correct exports', () => { + expect(index.captureException).toBeDefined(); + }); +}); From a88e9a5577869114b6b6d058ece3deb3fdb8f027 Mon Sep 17 00:00:00 2001 From: JPeer264 Date: Thu, 5 Mar 2026 09:04:46 +0100 Subject: [PATCH 4/7] docs(effect): Update general structure of README + mark it as alpha --- packages/effect/README.md | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/packages/effect/README.md b/packages/effect/README.md index 24526c91aa04..a209c930b659 100644 --- a/packages/effect/README.md +++ b/packages/effect/README.md @@ -1,27 +1,14 @@ -# Sentry Effect SDK +# Official Sentry SDK for Effect.ts (Alpha) [![npm version](https://img.shields.io/npm/v/@sentry/effect.svg)](https://www.npmjs.com/package/@sentry/effect) [![npm dm](https://img.shields.io/npm/dm/@sentry/effect.svg)](https://www.npmjs.com/package/@sentry/effect) [![npm dt](https://img.shields.io/npm/dt/@sentry/effect.svg)](https://www.npmjs.com/package/@sentry/effect) -## Links - -- [Official SDK Docs](https://docs.sentry.io/) -- [TypeDoc](http://getsentry.github.io/sentry-javascript/) - -## General +> NOTICE: This package is in alpha state and may be subject to breaking changes. -This package is a Sentry SDK for [Effect](https://effect.website/). +## Getting Started -## Installation - -```bash -npm install @sentry/effect -# or -yarn add @sentry/effect -# or -pnpm add @sentry/effect -``` +This SDK does not have docs yet. Stay tuned. ## Usage @@ -50,3 +37,11 @@ The `effectLayer` function initializes Sentry and returns an Effect Layer that p - Effect spans traced as Sentry spans - Effect logs forwarded to Sentry (when `enableLogs` is set) - Effect metrics sent to Sentry (when `enableMetrics` is set) + +## Links + + + +- [Sentry.io](https://sentry.io/?utm_source=github&utm_medium=npm_effect) +- [Sentry Discord Server](https://discord.gg/Ww9hbqr) +- [Stack Overflow](https://stackoverflow.com/questions/tagged/sentry) From a3afc059bfb64742fca5182fc97a95c869dddc02 Mon Sep 17 00:00:00 2001 From: JPeer264 Date: Thu, 5 Mar 2026 09:07:14 +0100 Subject: [PATCH 5/7] fix(e2e): Add @sentry/effect to Verdaccio config Co-Authored-By: Claude Made-with: Cursor --- dev-packages/e2e-tests/verdaccio-config/config.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dev-packages/e2e-tests/verdaccio-config/config.yaml b/dev-packages/e2e-tests/verdaccio-config/config.yaml index 6e57ee2ea812..beb758aca018 100644 --- a/dev-packages/e2e-tests/verdaccio-config/config.yaml +++ b/dev-packages/e2e-tests/verdaccio-config/config.yaml @@ -74,6 +74,12 @@ packages: unpublish: $all # proxy: npmjs # Don't proxy for E2E tests! + '@sentry/effect': + access: $all + publish: $all + unpublish: $all + # proxy: npmjs # Don't proxy for E2E tests! + '@sentry/ember': access: $all publish: $all From f47fa775c4446e70b4f0eda1a1daa75b49dc6b2f Mon Sep 17 00:00:00 2001 From: JPeer264 Date: Thu, 5 Mar 2026 09:34:22 +0100 Subject: [PATCH 6/7] fixup! test(effect): Add a smoke test so CI doesn't fail --- packages/effect/tsconfig.test.json | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 packages/effect/tsconfig.test.json diff --git a/packages/effect/tsconfig.test.json b/packages/effect/tsconfig.test.json new file mode 100644 index 000000000000..9dd90014ef37 --- /dev/null +++ b/packages/effect/tsconfig.test.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + + "include": ["test/**/*", "vitest.config.ts"], + + "compilerOptions": { + "types": ["node"] + } +} From 7e9e7c2eff2bcbc6ff794cac2a663e9e05e4ccfb Mon Sep 17 00:00:00 2001 From: JPeer264 Date: Thu, 5 Mar 2026 09:38:34 +0100 Subject: [PATCH 7/7] fixup! test(effect): Add a smoke test so CI doesn't fail --- packages/effect/.eslintrc.js | 12 ++++++++++++ packages/effect/tsconfig.vite.json | 9 +++++++++ packages/effect/vitest.config.ts | 10 ++++++++++ 3 files changed, 31 insertions(+) create mode 100644 packages/effect/tsconfig.vite.json create mode 100644 packages/effect/vitest.config.ts diff --git a/packages/effect/.eslintrc.js b/packages/effect/.eslintrc.js index 5a2cc7f1ec08..d37e458c151c 100644 --- a/packages/effect/.eslintrc.js +++ b/packages/effect/.eslintrc.js @@ -1,3 +1,15 @@ module.exports = { + env: { + browser: true, + node: true, + }, + overrides: [ + { + files: ['vite.config.ts', 'vitest.config.ts'], + parserOptions: { + project: ['tsconfig.vite.json'], + }, + }, + ], extends: ['../../.eslintrc.js'], }; diff --git a/packages/effect/tsconfig.vite.json b/packages/effect/tsconfig.vite.json new file mode 100644 index 000000000000..4f2b7371b076 --- /dev/null +++ b/packages/effect/tsconfig.vite.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + + "include": ["vite.config.ts", "vitest.config.ts"], + + "compilerOptions": { + "types": ["node"] + } +} diff --git a/packages/effect/vitest.config.ts b/packages/effect/vitest.config.ts new file mode 100644 index 000000000000..ed62557713c1 --- /dev/null +++ b/packages/effect/vitest.config.ts @@ -0,0 +1,10 @@ +import { defineConfig } from 'vitest/config'; +import baseConfig from '../../vite/vite.config'; + +export default defineConfig({ + ...baseConfig, + test: { + ...baseConfig.test, + include: ['test/**/*.test.ts'], + }, +});