Skip to content

Conversation

@cyjake
Copy link
Owner

@cyjake cyjake commented Nov 16, 2025

  • Consolidate tsconfig files into single tsconfig.json
  • Move entry point to src/index.ts for cleaner build output
  • Configure Mocha to run TypeScript tests directly via ts-node
  • Update build to output to dist/ directory without nested src/
  • Remove pretest compilation step (tests run directly from TS)
  • Add .mocharc.json for Mocha configuration

This prepares the codebase for JSR publishing support while maintaining backward compatibility with npm.

- Consolidate tsconfig files into single tsconfig.json
- Move entry point to src/index.ts for cleaner build output
- Configure Mocha to run TypeScript tests directly via ts-node
- Update build to output to dist/ directory without nested src/
- Remove pretest compilation step (tests run directly from TS)
- Add .mocharc.json for Mocha configuration

This prepares the codebase for JSR publishing support while
maintaining backward compatibility with npm.
@cyjake cyjake force-pushed the refactor/typescript-build-setup branch from 3ee4520 to e0c3a94 Compare November 16, 2025 12:27
@codecov
Copy link

codecov bot commented Nov 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.05%. Comparing base (f0c264b) to head (e0c3a94).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #96   +/-   ##
=======================================
  Coverage   97.05%   97.05%           
=======================================
  Files           3        3           
  Lines         339      340    +1     
  Branches       93       93           
=======================================
+ Hits          329      330    +1     
  Misses          4        4           
  Partials        6        6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the TypeScript build configuration to prepare the codebase for JSR publishing while maintaining npm compatibility. The changes consolidate configuration files, improve the build output structure, and enable running tests directly from TypeScript source files.

  • Consolidates TypeScript configuration into a single tsconfig.json with proper rootDir and outDir settings
  • Moves the package entry point from root index.ts to src/index.ts for cleaner build output to dist/ directory
  • Configures Mocha to run TypeScript tests directly via ts-node, eliminating the need for pretest compilation

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tsconfig.json Added rootDir, outDir, declarationDir options and explicit include/exclude patterns to compile only source files to dist/
package.json Updated entry points to dist/index.js and dist/index.d.ts, added ts-node dependency, and modified scripts to run tests directly from TypeScript
.mocharc.json Added Mocha configuration to run TypeScript tests directly via ts-node/register
test/unit/glob.test.ts Updated import path from '../../src/glob' to '../..' to import from the package root
src/index.ts New entry point that imports and re-exports all exports from ssh-config.ts
src/ssh-config.ts Added named export for glob function to make it available through the package's public API
index.ts Removed root-level entry point (moved to src/index.ts)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cyjake cyjake merged commit 77f8d25 into master Nov 16, 2025
12 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant