From 1c92505c3e12916fed1b41b6503b33607fe263e1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 11 Apr 2024 22:35:42 +0200 Subject: [PATCH 1/2] ci(action): update actions/add-to-project action to v1.0.1 (#479) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/add_to_octokit_project.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/add_to_octokit_project.yml b/.github/workflows/add_to_octokit_project.yml index 0ac7fd7b..936e1f4f 100644 --- a/.github/workflows/add_to_octokit_project.yml +++ b/.github/workflows/add_to_octokit_project.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest continue-on-error: true steps: - - uses: actions/add-to-project@v1.0.0 + - uses: actions/add-to-project@v1.0.1 with: project-url: https://github.com/orgs/octokit/projects/10 github-token: ${{ secrets.OCTOKITBOT_PROJECT_ACTION_TOKEN }} From f9e79913ca6a2d13362a825facc406e7c5da27e2 Mon Sep 17 00:00:00 2001 From: wolfy1339 <4595477+wolfy1339@users.noreply.github.com> Date: Mon, 15 Apr 2024 21:18:31 -0400 Subject: [PATCH 2/2] fix(pkg): add a default fallback export (#480) * fix(pkg): add a `default` fallback export See octokit/core.js#665 octokit/core.js#667 * docs(README): add note on needed config changes for TypeScript --- README.md | 3 +++ scripts/build.mjs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index 95b62de8..164f60d1 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,9 @@ got[options.method](url, options); axios(requestOptions); ``` +> [!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). + ## API ### `endpoint(route, options)` or `endpoint(options)` diff --git a/scripts/build.mjs b/scripts/build.mjs index 3363b684..e8f962df 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -61,10 +61,13 @@ async function main() { { ...pkg, files: ["dist-*/**", "bin/**"], + 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", }, }, sideEffects: false,