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 }} 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,