-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: update module resolution to bundler #1387
Conversation
2024af7
to
aec7cf6
Compare
aec7cf6
to
0ad380b
Compare
package.json
Outdated
"@types/node": "^20.10.5", | ||
"i18next-scanner": "^4.4.0", | ||
"jest": "^29.7.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we adding jest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compiler failing with : Cannot find name 'it'. Do you need to install type definitions for a test runner? Try
npm i --save-dev @types/jestor
npm i --save-dev @types/mocha.
after i changed the node resolution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is causing problems in others files with the defined custom global jest types referenced in @polkadot/dev-test
.
@Tbaut Some eyes on this from you would be nice as well. |
What types do you specifically need exported? |
Trying to import
|
Nah doesnt work |
I think this is an issue with smoldot-discovery and should be solved at that level no? Instead of completely changing the module resolution for one package in the extension? I would be weary of the potential downstream affects it would have since many wallets and users leverage the extension-* packages but additionally the overhead between In terms of adding |
Should be good now and have no side effects. |
Nice changes, Thank you! One last thing I would want to be sure of is the potential downstream affects of changing |
The code we are emitting is the same so I think its fine; And since we are using rollup, moduleResolution bundler is the way to go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Fixes: #1386
adds jest/@types/jest to resolve compiler error after node resolution change./// <reference types="@polkadot/dev-test/globals" />
withimport '@polkadot/dev-test/globals.d.ts';
and adds'import/extensions': 'off'
to eslint config. This is required to resolve type issues.import/extensions
is also a useless eslint rule and will be superseded by native node esm resolution. see https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/extensions.md#when-not-to-use-it