4.0.0#56
Merged
Merged
Conversation
Member
nblumhardt
commented
Feb 11, 2026
- Bump js-yaml from 4.1.0 to 4.1.1 #52, Bump glob from 10.4.5 to 10.5.0 #53 - dependency updates (dependabot)
- Convert project to TypeScript with automatic type generation #54 - port to TypeScript (@jhf)
- Adjust integration test strategy following TypeScript port #55 - update integration testing strategy (@KodrAus)
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.0 to 4.1.1. - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](nodeca/js-yaml@4.1.0...4.1.1) --- updated-dependencies: - dependency-name: js-yaml dependency-version: 4.1.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [glob](https://github.com/isaacs/node-glob) from 10.4.5 to 10.5.0. - [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md) - [Commits](isaacs/node-glob@v10.4.5...v10.5.0) --- updated-dependencies: - dependency-name: glob dependency-version: 10.5.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
…4.1.1 Bump js-yaml from 4.1.0 to 4.1.1
Bump glob from 10.4.5 to 10.5.0
- Converts entire codebase from JavaScript to TypeScript - Implements tsup for building with automatic .d.ts generation - Fixes #45: Resolves 'no default export' error with proper ES module exports - Fixes #48: Eliminates manual type definition maintenance Breaking Changes: - Package is now ESM-only (matching seq-logging dependency) - TypeScript source in src/ directory, built output in dist/ New Features: - Automatic type generation from TypeScript source - PinoSeqStreamConfig interface properly extends Partial<SeqLoggerConfig> - Docker Compose setup for local Seq testing - Comprehensive integration test suite - Both default and named exports for flexible importing Developer Experience: - npm run build: Build TypeScript to dist/ - npm run dev: Watch mode for development - npm test: Build and run test suite - Examples updated to show real-world package usage Dependencies: - Added tsup for building - Added @types/node for Node.js types - Added pino as dev dependency for testing
Keep trace_id and span_id in props object instead of destructuring them, to match the original implementation behavior exactly.
- Remove tsup dependency to avoid unmaintained package and esbuild - Use vanilla TypeScript compiler (tsc) for building - Update build scripts to use 'tsc' and 'tsc --watch' - Remove tsup.config.ts - Update documentation to reflect vanilla tsc usage - Significantly reduces dependency footprint The generated output is identical in functionality, just using the standard TypeScript compiler without additional bundling tools.
- Remove declarationMap: not needed since source files aren't published - Remove redundant 'module' field from package.json (ESM-only) - Reduces published package size slightly - All tests still pass
- Add querySeqEvents() and waitForEvent() helpers to verify logs in Seq - Each test now queries Seq API to confirm events are actually ingested - Validate event properties: level, custom fields, trace_id, span_id, errors - Add new test for trace_id and span_id preservation - Update README to explain why Docker Compose is essential for testing - Document that tests verify real integration, not just type checking This demonstrates the critical value of docker-compose.yml for confidence in actual log ingestion rather than just mocking or type checking. Tests: 7 passing (236ms) with full round-trip verification
Per reviewer feedback: - Delete CHANGELOG.md (not used in this project) - Remove console.log from examples (demonstrating logging library) - Change examples to use relative imports (../dist/index.js) for local testing - Return PinoSeqStream directly instead of StreamWithFlush interface - Update error message to match seq-logging convention - Target ES2020 instead of ES2022 for broader compatibility - Minimize tsconfig.json (remove 5 unnecessary options) All tests pass (7 passing in 240ms)
- Health check tests actual API endpoint readiness, not just process - Sends HTTP GET to /api/events to verify Seq is fully ready - Prevents ECONNRESET errors when tests run too early - Use 'docker compose up -d --wait' to wait for healthy state - 20s start_period allows Seq to fully initialize This ensures tests and examples always connect to a ready Seq instance.
Examples now use 'pino-seq' imports (not relative paths): - Shows how users actually use the package after npm install - Copy-pasteable for documentation and user code - Both JavaScript and TypeScript examples Added example tests (test/example_tests.js): - Uses npm link to simulate installed package - Verifies both JS and TS examples run without errors - Ensures examples work as users expect them to - Automated verification that examples stay in sync This separates concerns: - Examples = user-facing, copy-pasteable - Integration tests = use relative imports for development Tests: 9 passing (2 new example tests + 7 integration tests)
Placing docker-compose.yml at the project root implies it's a necessary component for using the library. Moving it to test/ makes it clear this is test infrastructure, not a runtime requirement.
Now that the library is fully written in TypeScript and uses tsc to generate type definitions, a runtime test for type compatibility is unnecessary. TypeScript's compiler provides this validation during the build step.
Adds test:setup and test:teardown scripts as convenient shortcuts for managing the Docker Compose test environment. Updates documentation to use these scripts for a simpler, more discoverable workflow.
The library works identically in both JavaScript and TypeScript environments, so separate examples were redundant. The unified example: - Uses modern named imports (works in both JS and TS) - Includes inline comments explaining each step - Is fully compatible with both environments - Reduces maintenance burden and documentation complexity For TypeScript users who want explicit typing, a supplementary snippet shows how to use PinoSeqStreamConfig interface. The Configuration section provides complete API documentation for advanced usage.
Verifies the unified example works in both JavaScript and TypeScript environments by running the same example.js file with both node and tsx. This proves the claim that the example is truly compatible with both environments without requiring separate example files.
For ephemeral integration testing, a persistent volume is unnecessary. The Seq container works fine with an ephemeral /data volume, and this simplifies the configuration and cleanup between test runs.
Docker caches 'latest' tags, which can cause issues when Seq releases new versions with breaking changes. Adding 'docker pull' to test:setup ensures tests always run against the actual latest Seq version.
Seq 2025.2 requires authentication by default. Setting SEQ_FIRSTRUN_NOAUTHENTICATION=True allows integration tests to run without needing to configure authentication, simplifying the test setup while maintaining security best practices for production use.
- GitHub Actions now manages Seq automatically via service containers - Tests run on Node 18.x, 20.x, and 22.x on Linux - Updated README to clarify npm scripts are for contributor convenience - Contributors can use 'npm run test:setup' or manage their own Seq - CI/CD uses service containers without requiring Docker setup This addresses feedback about not assuming Docker for all environments while maintaining excellent local development experience.
Implements optional mocking to enable testing on all platforms: - Add MOCK_SEQ environment variable to control test mode - Create MockSeqTransport for testing without real Seq instance - Update integration tests to support both real and mock modes - Skip example tests in mock mode (they require real Seq) - Update GitHub Actions to run 12 jobs: - 9 jobs with mock mode (3 OS × 3 Node versions) - 3 jobs with real Seq (Linux only, 3 Node versions) - Update README with comprehensive testing documentation Benefits: - Full cross-platform test coverage (Windows, macOS, Linux) - No Docker requirement for basic testing - Maintains complete integration testing on Linux - Explicit mode control (no magic detection) - Fail-fast: tests expecting Seq will fail without it Tests verified: - Mock mode: 6 passing, 2 pending (example tests skipped) - Real Seq mode: 8 passing This addresses feedback about not assuming Docker for all contributors while maintaining excellent test coverage and developer experience.
Convert project to TypeScript with automatic type generation
Adjust integration test strategy following TypeScript port
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.