Skip to content

fix: add missing file extension in import#331

Merged
mpetrunic merged 1 commit intoChainSafe:masterfrom
spalladino:fix/file-extension-in-import
May 22, 2023
Merged

fix: add missing file extension in import#331
mpetrunic merged 1 commit intoChainSafe:masterfrom
spalladino:fix/file-extension-in-import

Conversation

@spalladino
Copy link
Copy Markdown
Contributor

The missing file extension breaks the package for consumers using node16 module resolution with the following error:

node_modules/@chainsafe/libp2p-noise/dist/src/nonce.d.ts:1:36 - error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './@types/basic.js'?

These errors are easy to miss when using node module resolution in the library. I can set up another PR to update the module resolution to node16 so these are easier to catch, if that's ok.

@spalladino spalladino requested a review from a team as a code owner May 19, 2023 18:27
@mpetrunic mpetrunic merged commit b578438 into ChainSafe:master May 22, 2023
@mpetrunic
Copy link
Copy Markdown
Member

Thnx!

@spalladino spalladino deleted the fix/file-extension-in-import branch May 22, 2023 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants