Repository navigation
test: extract shared vitest base config to de-duplicate n8n-workflow alias (#7) - #10
Merged
MihaelaAghirculesei merged 2 commits intoSep 4, 2026
Conversation
…alias (MihaelaAghirculesei#7) - Create vitest.config.base.ts at repository root defining shared resolve.alias for n8n-workflow - Extend baseConfig via mergeConfig across packages/unit, packages/core, packages/mock-http, packages/e2e, packages/otel, and packages/metrics - Preserve local package test environments and coverage settings
amasen02
force-pushed
the
fix/shared-vitest-base-config-7
branch
from
September 3, 2026 16:41
80b2259 to
a926ec0
Compare
amasen02
marked this pull request as ready for review
September 4, 2026 02:40
`mergeConfig` + the shared base config work without switching the root package.json to ESM (`pnpm build/lint/typecheck/test` all green without it), and that switch could change how root-level tooling loads. Also strip the UTF-8 BOM that crept into `vitest.config.base.ts` so it matches the other config files.
Owner
|
Thanks for picking this up — the I pushed one small fixup commit (
Local run on the branch: build 7/7, lint 9/9, typecheck 9/9, test 14/14, Nice first contribution, and it lands right before it was needed: the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #7 — extracts a shared base Vitest configuration at the repository root (
vitest.config.base.ts) to centralize and de-duplicate then8n-workflowalias configuration across packages.Context
The CommonJS fixture node (
n8n-nodes-probe-example) requiresn8n-workflow, while ESM test suites import the ESM build of the package, causing multiple class instances across the boundary (breakinginstanceof). Centralizing the CJS pin intovitest.config.base.tsensures all packages share this configuration without duplication.Changes
vitest.config.base.tsat repository root definingbaseConfigwith then8n-workflowCJS resolution alias and documentation.packages/unit/vitest.config.ts,packages/core/vitest.config.ts,packages/e2e/vitest.config.ts,packages/mock-http/vitest.config.ts,packages/otel/vitest.config.ts, andpackages/metrics/vitest.config.tsto extendbaseConfigviamergeConfig.Verification
npx pnpm typecheck: 9/9 tasks passed cleanly with 0 type errors.npx pnpm test: 14/14 tasks passed cleanly (100% test pass across packages).npx pnpm lint: 9/9 tasks passed cleanly.Checklist
vitest.config.base.tsadded at rootbaseConfig