From 5ce468a300e23d1ff4996f0d8a5ded2cf6fe5f0f Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 25 Mar 2025 14:44:30 +0100 Subject: [PATCH] feat: address ESLint's `no-unresolved` warning This adds the `main` property for backwards-compatibility, needed e.g. when running ESLint. The change recapitulates what https://github.com/octokit/rest.js/pull/413/commits/aad55f47f1e6348fa3d246697d7503985eff4c06 already did but which was unfortunately reverted in the same PR by https://github.com/octokit/rest.js/pull/413/commits/1b6e5829faaaefb9e4133685f719a56234a304b1 (probably under the incorrect assumption that `exports.default` would be enough as a fall-back). This fixes https://github.com/octokit/rest.js/issues/446. Signed-off-by: Johannes Schindelin --- scripts/build.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/build.mjs b/scripts/build.mjs index 6fc2c1be..c729bfb7 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -54,6 +54,7 @@ async function main() { ...pkg, files: ["dist-*/**"], types: "dist-types/index.d.ts", + main: "./dist-src/index.js", exports: { ".": { types: "./dist-types/index.d.ts",