Skip to content
Open
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
24 changes: 11 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,37 +15,34 @@
},
"repository": {
"type": "git",
"url": "https://github.com/changesets/ghcommit.git"
"url": "git+https://github.com/changesets/ghcommit.git"
},
"type": "commonjs",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Any reason that makes you want to set "type": "commonjs" here?

Since we explicitly use .mjs and .cjs file extensions, "type": "commonjs" and "type": "module" should both be good. Setting "type": "module" might be a bit easier for dev config files like eslint.config.js (i.e., I don't need to explicitly use eslint.config.mjs).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Publint has a rule that suggests setting this field explicitly. I want to move to type module eventually but I'd like to modernize all the tools first so it's easier to move over.

"sideEffects": false,
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"types": "./dist/index.d.ts"
"require": "./dist/index.cjs"
},
"./core": {
"import": "./dist/core.mjs",
"require": "./dist/core.js",
"types": "./dist/core.d.ts"
"require": "./dist/core.cjs"
},
"./fs": {
"import": "./dist/fs.mjs",
"require": "./dist/fs.js",
"types": "./dist/fs.d.ts"
"require": "./dist/fs.cjs"
},
"./git": {
"import": "./dist/git.mjs",
"require": "./dist/git.js",
"types": "./dist/git.d.ts"
"require": "./dist/git.cjs"
},
"./node": {
"import": "./dist/node.mjs",
"require": "./dist/node.js",
"types": "./dist/node.d.ts"
"require": "./dist/node.cjs"
}
},
"scripts": {
"build": "rm -rf dist && pnpm codegen:github && tsc --noEmit && tsup",
"build": "pnpm codegen:github && tsc --noEmit && tsdown",
"codegen:github": "graphql-codegen --config src/github/codegen.ts",
"format:check": "prettier --check \"**/*.{ts,tsx,md}\"",
"format:fix": "prettier --write \"**/*.{ts,tsx,md}\"",
Expand Down Expand Up @@ -77,9 +74,10 @@
"pino": "^9.3.2",
"pino-pretty": "^11.2.2",
"prettier": "^3.3.3",
"publint": "^0.3.21",
"ts-jest": "^29.2.0",
"ts-node": "^10.9.2",
"tsup": "^8.1.0",
"tsdown": "^0.22.0",
"typescript": "^5.3.3"
},
"files": [
Expand Down
Loading