From 80ff4cb43ec23ab070b0a22d4ac19ddc41ef9f2b Mon Sep 17 00:00:00 2001 From: Yoriyasu Yano <430092+yorinasub17@users.noreply.github.com> Date: Tue, 3 Oct 2023 15:47:04 -0500 Subject: [PATCH] fix: include cjs as a possible target Signed-off-by: Yoriyasu Yano <430092+yorinasub17@users.noreply.github.com> --- .npmignore | 1 + package.json | 17 ++++++++--------- pnpm-lock.yaml | 17 ----------------- 3 files changed, 9 insertions(+), 26 deletions(-) diff --git a/.npmignore b/.npmignore index b4b90d7..9c48e2d 100644 --- a/.npmignore +++ b/.npmignore @@ -6,3 +6,4 @@ src jest.config.cjs decs.d.ts tsconfig.json +.releaserc.yaml diff --git a/package.json b/package.json index 5333316..cfdc2af 100644 --- a/package.json +++ b/package.json @@ -8,15 +8,15 @@ "bugs": { "url": "https://github.com/fensak-io/reng/issues" }, - "type": "module", "source": "src/index.ts", - "exports": "dist/index.js", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "targets": { - "module": { - "context": "node", - "optimize": true + "main": "./dist/index.cjs", + "module": "./dist/module.mjs", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/module.mjs", + "require": "./dist/index.cjs" } }, "scripts": { @@ -37,7 +37,6 @@ "@jest/globals": "^29.7.0", "@parcel/config-default": "2.9.3", "@parcel/packager-ts": "2.9.3", - "@parcel/transformer-typescript-tsc": "2.9.3", "@parcel/transformer-typescript-types": "2.9.3", "@semantic-release/git": "^10.0.1", "@types/babel__core": "^7.20.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d9bfe01..c383dc9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -34,9 +34,6 @@ devDependencies: '@parcel/packager-ts': specifier: 2.9.3 version: 2.9.3(@parcel/core@2.9.3) - '@parcel/transformer-typescript-tsc': - specifier: 2.9.3 - version: 2.9.3(@parcel/core@2.9.3)(typescript@5.2.2) '@parcel/transformer-typescript-types': specifier: 2.9.3 version: 2.9.3(@parcel/core@2.9.3)(typescript@5.2.2) @@ -2494,20 +2491,6 @@ packages: - '@parcel/core' dev: true - /@parcel/transformer-typescript-tsc@2.9.3(@parcel/core@2.9.3)(typescript@5.2.2): - resolution: {integrity: sha512-kQUts/PVFhEb9JoyJBlKvaa5qR/3bEiyZSjn8qE3S+97CUOIVun8fNxGiDPwpaPd90BgPcgU43gSAQwlY9rIMQ==} - engines: {node: '>= 12.0.0', parcel: ^2.9.3} - peerDependencies: - typescript: '>=3.0.0' - dependencies: - '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) - '@parcel/source-map': 2.1.1 - '@parcel/ts-utils': 2.9.3(typescript@5.2.2) - typescript: 5.2.2 - transitivePeerDependencies: - - '@parcel/core' - dev: true - /@parcel/transformer-typescript-types@2.9.3(@parcel/core@2.9.3)(typescript@5.2.2): resolution: {integrity: sha512-W+Ze3aUTdZuBQokXlkEQ/1hUApUm6VRyYzPqEs9jcqCqU8mv18i5ZGAz4bMuIJOBprp7M2wt10SJJx/SC1pl1A==} engines: {node: '>= 12.0.0', parcel: ^2.9.3}