← Back to PRs

#14292: fix(scripts): add js extension

by hannahhoward open 2026-02-11 22:24 View on GitHub →
scripts stale
add a js extension to the import statement in the generated dist/plugin-sdk/index.d.ts file so it functions properly in projects that use moduleResolution: NodeNext. fix #14291 <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> Adds the `.js` file extension to the import specifier in the generated `dist/plugin-sdk/index.d.ts` re-export wrapper, fixing TypeScript resolution for consumers using `moduleResolution: NodeNext`. - The `write-plugin-sdk-entry-dts.ts` script generates a re-export file at `dist/plugin-sdk/index.d.ts` that bridges the package.json export (`"./plugin-sdk"`) to the tsc-emitted types at `dist/plugin-sdk/plugin-sdk/index.d.ts` - The import path lacked the `.js` extension, which is required under `NodeNext` module resolution (TypeScript enforces explicit extensions in ESM) - This is a one-line fix with no risk to existing consumers <h3>Confidence Score: 5/5</h3> - This PR is safe to merge — it's a minimal, well-scoped one-line fix with no risk of regression. - The change is a single character addition (`.js` extension) to a string literal in a build script. The project already uses `moduleResolution: NodeNext` in its tsconfig, making this fix both correct and necessary. No logic changes, no new dependencies, no behavioral changes for existing consumers. - No files require special attention. <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs