diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b7c4e40..8c52909 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,6 +44,12 @@ jobs: - name: Test run: npm test + + - name: Configure Git + run: | + git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" + git config --global user.name "${GITHUB_ACTOR}" + - name: Version (dry-run) if: ${{ inputs.dryRun }} run: npm version --no-git-tag-version "${{ inputs.version }}" diff --git a/package.json b/package.json index c87611d..fb2c9d5 100644 --- a/package.json +++ b/package.json @@ -17,19 +17,20 @@ }, "type": "module", "license": "Apache-2.0", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "./dist/index.cjs", + "module": "./dist/index.mjs", + "types": "./dist/index.d.cts", "exports": { ".": { "import": { - "types": "./dist/index.d.ts", - "default": "./dist/index.js" + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" }, "require": { "types": "./dist/index.d.cts", "default": "./dist/index.cjs" }, - "default": "./dist/index.js" + "default": "./dist/index.cjs" } }, "files": [ diff --git a/tsdown.config.ts b/tsdown.config.ts index 0784a1a..3621d28 100644 --- a/tsdown.config.ts +++ b/tsdown.config.ts @@ -2,8 +2,8 @@ import { defineConfig } from 'tsdown'; export default defineConfig({ entry: ['lib/index.ts'], - format: ['cjs', 'esm'], + fixedExtension: true, dts: { sourcemap: true, }, @@ -16,5 +16,6 @@ export default defineConfig({ target: 'es2022', platform: 'node', tsconfig: './tsconfig.json', + nodeProtocol: true, skipNodeModulesBundle: false, });