|
Repo Added
|
Files
5
|
Badge
README BADGES
|
push
github
[Claude] Fix ESM compatibility for Node.js type module (#67) * fix: Add exports field for Node.js ESM compatibility Fixes #58 When using Node.js with `"type": "module"`, the default import was not working correctly because Node.js treats CJS `exports.default` differently than ESM `export default`. Changes: - Add `exports` field to package.json for proper ESM/CJS resolution - Generate `.mjs` wrapper that re-exports the default correctly - ESM: `import applyCaseMiddleware from 'axios-case-converter'` now works - CJS: `require('axios-case-converter').default` continues to work Tested on Node.js v25 with `"type": "module"` enabled. 🤖 This commit was automatically created by Claude Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * test: Add ESM import test to CI Adds a dedicated test to verify ESM import works correctly: - test/esm/test-esm-import.mjs: Tests that default import is a function - CI workflow now builds and runs ESM test after Jest tests This ensures the fix for #58 is properly tested in CI. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * style: Format ESM test file with prettier * security: Add safe-chain to npm install for supply chain protection Adds --safe-chain flag to npm install in both CI and release workflows to detect malware in dependencies before they can execute. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Revert "security: Add safe-chain to npm install for supply chain protection" This reverts commit 54a1f3eae. * security: Add Aikido safe-chain for supply chain protection Installs safe-chain via curl before npm install to scan dependencies for malware before they can execute. Reference: https://github.com/AikidoSec/safe-chain Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
144 of 165 branches covered (87.27%)
Branch coverage included in aggregate %.
111 of 115 relevant lines covered (96.52%)
346.09 hits per line
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
|---|