From 27a855290a61de36055e662fa19ef42f62f0e2ac Mon Sep 17 00:00:00 2001 From: wolfy1339 Date: Thu, 2 May 2024 17:51:12 -0400 Subject: [PATCH] Revert "fix(pkg): add default fallback and types export (#612)" This reverts commit 069235f45a8b49f2bccdc9cc561ec7375d225eec. --- README.md | 3 --- scripts/build.mjs | 8 +++----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 3ac766a3..9ebf695f 100644 --- a/README.md +++ b/README.md @@ -73,9 +73,6 @@ function myPlugin(octokit, options) { } ``` -> [!IMPORTANT] -> As we use [conditional exports](https://nodejs.org/api/packages.html#conditional-exports), you will need to adapt your `tsconfig.json`. See the TypeScript docs on [package.json "exports"](https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-exports). - ## `octokit.paginate()` The `paginateRest` plugin adds a new `octokit.paginate()` method which accepts the same parameters as [`octokit.request`](https://github.com/octokit/request.js#request). Only "List ..." endpoints such as [List issues for a repository](https://developer.github.com/v3/issues/#list-issues-for-a-repository) are supporting pagination. Their [response includes a Link header](https://developer.github.com/v3/issues/#response-1). For other endpoints, `octokit.paginate()` behaves the same as `octokit.request()`. diff --git a/scripts/build.mjs b/scripts/build.mjs index 98e7d3d0..d4be5308 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -62,16 +62,14 @@ 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 + main: "dist-bundle/index.js", types: "dist-types/index.d.ts", exports: { ".": { types: "./dist-types/index.d.ts", import: "./dist-bundle/index.js", - // Tooling currently are having issues with the "exports" field when there is no "default", ex: TypeScript, eslint - default: "./dist-bundle/index.js", - }, - "./types": { - types: "./dist-types/.d.ts", }, }, sideEffects: false,