Migrate the monorepo to Node.js#104
Merged
Merged
Conversation
f4d0329 to
ed141d1
Compare
cowboyd
reviewed
Dec 15, 2025
Member
cowboyd
left a comment
There was a problem hiding this comment.
Looks good. My only question is if we should extends the packages to be compatible with e4
cowboyd
approved these changes
Dec 18, 2025
- Extract shared BDD logic into bdd.ts with createBDD factory function - Add mod.deno.ts for Deno with SanitizeOptions support - Add mod.node.ts for Node.js using node:test - Add package.json with conditional exports for Node/Deno - Update deno.json to export mod.deno.ts
- Add root package.json with npm workspaces for bdd and test-adapter - Add test-adapter/package.json for Node.js resolution - Update bdd/package.json to use npm-compatible dependency syntax - Add node_modules and package-lock.json to .gitignore
- Add verify-node.yaml workflow for Node.js CI on ubuntu/macos with Node 20/22 - Add bdd/bdd.test.ts for testing the BDD package - Add test scripts using npm workspaces (npm test --workspaces --if-present) - Update README with Node.js testing documentation
- Add nodeModulesDir: "none" to deno.json to prevent Deno from using node_modules when package.json is present - Add pnpm-workspace.yaml for pnpm workspace configuration - Add package.json with Volta pinned versions and packageManager field - Update bdd/package.json to use workspace:* for local deps - Update CI to use pnpm/action-setup and actions/setup-node - Update README with Volta installation instructions
- Create package.json with npm exports and dependencies - Add tinyexec to pnpm workspace
Explicitly use --frozen-lockfile to ensure reproducible builds and fail CI if lockfile is out of sync with package.json files.
- Create package.json with npm exports and dependencies - Add timebox to pnpm workspace
- Create package.json with npm exports and dependencies - Add context-api to pnpm workspace
- Create package.json with npm exports and dependencies - Add fx to pnpm workspace
- Create package.json with npm exports and dependencies - Add signals to pnpm workspace
- Add afterEachTest hook to BDD for assertion state cleanup - Implement assertion state checking in mod.node.ts - Add @std/expect and @std/internal via JSR registry (.npmrc) - Add test scripts to context-api, fx, signals, timebox packages - All 43 tests now pass on Node.js with expect.assertions() support
This reverts commit 12374ad.
cbac99e to
60debac
Compare
@effectionx/bdd
@effectionx/chain
@effectionx/context-api
@effectionx/converge
@effectionx/fs
@effectionx/fx
@effectionx/jsonl-store
@effectionx/node
@effectionx/process
@effectionx/raf
@effectionx/signals
@effectionx/stream-helpers
@effectionx/stream-yaml
@effectionx/task-buffer
@effectionx/test-adapter
@effectionx/timebox
@effectionx/tinyexec
@effectionx/watch
@effectionx/websocket
@effectionx/worker
commit: |
- Add engines >= 22 requirement - Add strict pnpm peer dependency rules - Add main/types fields for legacy compat - Enable Biome for JSON files - Integrate sync-tsrefs.ts for auto-generating tsconfig references - Add check:tsrefs to CI workflow - Add effection-based fs helpers plan (ensureDir, exists, emptyDir, walk) - Add fromFileUrl/toFileUrl replacements - Update test glob to exclude dist/node_modules - Add JSDoc example updates for jsonl-store
- Add tsconfig.test.json for test file detection (Phase 1.4) - Document all three sync-tsrefs modes: update, fix, check - Add note about pnpm-workspace.yaml requiring explicit paths (no globs) - Update package tsconfig template: include **/*.ts, exclude **/*.test.ts - Renumber Phase 1 sections (1.4 biome → 1.5, etc.)
- Fix test glob: use './**/*.test.ts' instead of extglob syntax (Node's test runner doesn't support extglob '!()') - Add note that sync:tsrefs skips packages without tsconfig.json - Clarify that tsconfig.json must be created before running sync:tsrefs - Note that root tsconfig.test.json is used as fallback for test detection
- Clarify tsconfig.test.json location (repository root) and mark as required - Document sync-tsrefs subcommand modes (update/fix/check) - Explain devDependencies vs dependencies classification for workspace imports - Add workspace:* version format to dependency examples - Emphasize prerequisites: tsconfig.json and tsconfig.test.json must exist
- Explain tsconfig.test.json include/exclude pattern matching for test file classification - Document sync-tsrefs.ts subcommands (update/fix/check) in Phase 5.4 - Note that fix mode updates package.json dependencies - Explain why --experimental-strip-types is used for task scripts - Biome config already doesn't ignore JSON (verified consistent with decisions)
- Implement yamlDocuments() stream helper using yaml package Parser/Composer - Properly exhaust composer.next() generators to update internal state - Support multi-document YAML streams (documents separated by ---) - Forward close value from upstream stream - Add comprehensive test suite (6 tests)
…rting - Move lines() helper from process to stream-helpers, fix FIFO ordering bug - Add tap-parser.ts for streaming TAP output parsing with YAML metadata - Update effection-compat.ts to show failures in real-time - Add summary table and detailed failure output at end - Use --test-reporter=tap and --log-order=grouped for structured output
- Use node --test with glob patterns instead of pnpm turbo run test - Fix test counting to include tests without type metadata - Skip suite-level failures (subtestsFailed) to avoid double-counting
When a process is killed on Windows, the stream may emit an 'error' event with EPIPE before 'end'. This is treated as a normal close since the process was intentionally terminated.
Add error handler on stdin stream to suppress EPIPE errors that occur when the child process exits before we finish writing to it. This is expected during cleanup when killing processes on Windows.
67213ef to
47e71eb
Compare
- Combine verify-posix, verify-windows, and effection-compat into test.yaml - Run lint, test-posix, and test-windows jobs in parallel - Windows tests use CMD shell (fixes graceful shutdown issues with bash) - Each test job runs both unit tests and effection compatibility tests - Update publish.yaml to depend on consolidated test workflow
7741ad4 to
78066eb
Compare
- Add fromReadable() to @effectionx/stream-helpers for converting Node.js Readable streams to Effection Streams - Add tests and documentation for fromReadable() - Update @effectionx/process to use fromReadable from stream-helpers - Fix type annotation in watch/main.ts
Consolidate Node.js-specific utilities into a new @effectionx/node package with sub-exports for streams and events: - /stream: fromReadable (moved from stream-helpers) - /events: once, on (moved from node-events) Changes: - Create node/ package with stream.ts, events.ts, and mod.ts - Delete node-events package (not yet published) - Remove fromReadable from stream-helpers - Update process package to import from @effectionx/node - Remove unused node-events dependency from worker package - Update workspace and TypeScript configurations
- Update root devDependency to effection ^4 - Update .internal dependency to effection ^4 - Update all package peerDependencies from '^3 || ^4.0.0-0' to '^3 || ^4' - Cherry-pick fx v4 compatibility changes from fx-v4 branch
- Port when() and always() from @bigtest/convergence as Effection Operations - when(): converge when assertion passes within timeout - always(): converge if assertion passes throughout timeout - Both return stats object with timing info and run count - Update worker shutdown test to use when() for reliable file content checks - Fixes flaky test by properly converging on expected file content
- Use writeFileSync in shutdown-worker.ts finally block to ensure file write completes before worker exits (async writes may not complete during task halt on Windows) - Remove shell: true from effection-compat.ts and pass arguments separately to exec() since shell: true doesn't work properly on Windows with cross-spawn
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.
Motivation
Complete the Node.js migration for the effectionx repository, enabling all packages to run in Node.js environments. This also consolidates CI workflows for better maintainability and fixes Windows-specific process handling issues.
Approach
Effection Compatibility Testing
Added a compatibility test runner that tests packages against the minimum and maximum Effection versions declared by each package's
peerDependencies.New Packages
@effectionx/stream-yaml- Streaming YAML document parser for parsing multi-document YAML streams from string chunks@effectionx/fs- File and directory operations based onnode:fs@effectionx/node- Node specific operations like fromReadable and on/once event emitter@effectionx/converge- Imported convergence library from BigTest 1.0 to usewhenconvergence in tests.Stream Helpers:
fromReadable()Added
fromReadable()to@effectionx/stream-helpersfor converting Node.js Readable streams to Effection Streams. This enables easy integration with Node.js file streams, HTTP responses, and other Readable streams.Key features
.internal/tap-parser.ts) for real-time test failure reportingCI Workflow Consolidation
verify-posix.yaml,verify-windows.yaml, andeffection-compat.yamlinto singletest.yamlWindows Process Handling Fixes
Internal Tooling
tasks/to.internal/sync-tsrefs.tsfor managing TypeScript project referencesTesting