Skip to content

feat(build): add dual package support with tsup#23

Merged
sectsect merged 15 commits into
masterfrom
feature/modern-infrastructure
Sep 14, 2025
Merged

feat(build): add dual package support with tsup#23
sectsect merged 15 commits into
masterfrom
feature/modern-infrastructure

Conversation

@sectsect
Copy link
Copy Markdown
Owner

feat(build): add dual package support with tsup

- Add CLAUDE.md with project overview and development commands
- Document core architecture and WebpackSweetEntry function behavior
- Include testing structure and code standards for future development
- Revert engines.node from >=21.0.0 to >=20.0.0
- Node.js 20.x LTS is still supported until April 2026
- Align with Microsoft's recommended setting for Node.js 20.x
- Enables ES2023 features while maintaining CommonJS output
- Add tsup for ESM and CommonJS dual package builds
- Configure package.json exports for both module formats
- Update build system from tsc to tsup
- Add tsup.config.ts for dual package configuration
- Update .gitignore for tsconfig.tsbuildinfo
- Replace Jest with Vitest for modern ESM support
- Add comprehensive dual package testing (CommonJS/ESM)
- Remove Jest dependencies and configuration
- Add Vitest configuration with coverage support
- Update test scripts and ESLint configuration
- Verify both module formats produce identical results
- Fix tsup config to use default export instead of named export
- Disable TypeScript incremental compilation to prevent DTS build conflicts
- Move build step from prepare hook to prepublishOnly to avoid unnecessary builds during npm install
- Replace import.meta.url with direct require usage in dual package tests
- Add missing vitest imports to all test files
- Update tsconfig to include test files in type checking
- Added @vitest/eslint-plugin dependency
- Configured ESLint to lint test files with vitest-specific rules
- Updated lint scripts to include src/__tests__ directory
- Fixed import ordering and formatting in test files
- Removed test directory from ignorePatterns
- Added Dual Package Support feature to features list
- Added ES Modules usage example with import syntax
- Added TypeScript usage example with type annotations
- Organized usage examples with clear section headers
- Updated test framework from Jest to Vitest with v8 coverage
- Added new test commands: test:watch, test:ui, type-check:watch
- Documented dual package support (CommonJS + ESModule)
- Updated build system documentation for tsup
- Added Node.js 20+ requirement and ES2023 target information
- Updated test file patterns and coverage configuration
- Added lcov to vitest coverage reporters for codecov upload
- Replaced generic "Test" describe blocks with descriptive function-specific names
- Changed vague "toEqual()" test names to meaningful behavior descriptions
- Enhanced test readability for better maintenance and debugging
@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (be367c8) to head (c5b4fa7).
⚠️ Report is 16 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master       #23   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           23        32    +9     
  Branches         4         5    +1     
=========================================
+ Hits            23        32    +9     

☔ 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.

@sectsect sectsect merged commit 01d0a78 into master Sep 14, 2025
6 checks passed
@sectsect sectsect deleted the feature/modern-infrastructure branch September 14, 2025 00:04
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