From 7a6958e05af6fab6248de12f7264bfb2be213831 Mon Sep 17 00:00:00 2001 From: wolfy1339 Date: Mon, 26 Feb 2024 19:20:46 -0500 Subject: [PATCH 1/2] fix(pkg): add `main` field Some tools don't play well with only having the `exports` field present. See https://github.com/octokit/core.js/pull/662 --- scripts/build.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/build.mjs b/scripts/build.mjs index 3363b684..334d379d 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -61,6 +61,8 @@ async function main() { { ...pkg, files: ["dist-*/**", "bin/**"], + main: "dist-bundle/index.js", + types: "dist-types/index.d.ts", exports: { ".": { types: "./dist-types/index.d.ts", From 5d8949fa12565932705e7e77c7fa2313c8d37182 Mon Sep 17 00:00:00 2001 From: wolfy1339 Date: Thu, 29 Feb 2024 16:27:21 -0500 Subject: [PATCH 2/2] maint: add comment --- scripts/build.mjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/build.mjs b/scripts/build.mjs index 334d379d..aba1ded2 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -61,6 +61,9 @@ async function main() { { ...pkg, files: ["dist-*/**", "bin/**"], + // Tooling currently are having issues with the "exports" field, ex: TypeScript, eslint + // We add a `main` and `types` field to the package.json for the time being + // See https://github.com/octokit/core.js/pulls/662 main: "dist-bundle/index.js", types: "dist-types/index.d.ts", exports: {