Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move CommonJS entry from cjs/index.js to index.cjs #346

Merged
merged 2 commits into from
Mar 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
node_modules
/.nyc_output
/cjs
/coverage
/index.cjs
/coverage
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ export default [
globals: { ...globals.builtin, ...globals.node },
},
},
{ ignores: ['cjs'] },
{ ignores: ['index.cjs'] },
]
1 change: 0 additions & 1 deletion package.cjs.json

This file was deleted.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@
},
"require": {
"types": "./index.d.ts",
"default": "./cjs/index.js"
"default": "./index.cjs"
}
}
},
"types": "index.d.ts",
"bin": "cli.js",
"files": [
"cjs",
"index.js",
"index.d.ts",
"cli.js",
"reporter.js"
"reporter.js",
"index.cjs"
],
"scripts": {
"build": "esbuild index.js --bundle --platform=node --alias:git-hooks-list=./git-hooks-list_shim.cjs --outfile=./cjs/index.js && ncp package.cjs.json ./cjs/package.json",
"build": "esbuild index.js --bundle --platform=node --alias:git-hooks-list=./git-hooks-list_shim.cjs --outfile=./index.cjs",
"fix": "eslint . --fix && prettier . --write && node cli.js \"package.json\"",
"lint": "eslint . && prettier . \"!**/*.js\" --check && node cli.js \"package.json\" --check",
"prepare": "husky install",
Expand Down