Skip to content
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

Update module resolution and provide mandatory file extensions #1056

Merged
merged 14 commits into from
Oct 1, 2024

Conversation

GerardasB
Copy link
Collaborator

Changes

This PR changes moduleResolution used in AppUI packages from Node to NodeNext. This change required mandatory file extensions to be provided in import declarations https://nodejs.org/api/esm.html#mandatory-file-extensions
Additionally, the module is changed as well to be compatible with the new moduleResolution.

classnames and immer package versions are updated to solve some of the export problems caused by new module resolution.

CJS modules are dropped from a private @itwin/appui-test-providers package.

Testing

N/A

@GerardasB GerardasB requested review from a team as code owners October 1, 2024 10:05
@GerardasB GerardasB requested a review from mayank99 October 1, 2024 12:35
Copy link

@mayank99 mayank99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't looked deeply through all the file changes (I'm assuming that build passes means everything is generally ok), but I did have one comment on the tsconfig.


Also, you might want to add these two settings to your vscode settings to help with auto-import:

"javascript.preferences.importModuleSpecifierEnding": "js",
"typescript.preferences.importModuleSpecifierEnding": "js",

ui/appui-react/tsconfig.json Show resolved Hide resolved
@GerardasB GerardasB merged commit 69abe38 into master Oct 1, 2024
20 checks passed
@GerardasB GerardasB deleted the update-module-resolution branch October 1, 2024 15:21
@GerardasB GerardasB self-assigned this Oct 7, 2024
@GerardasB GerardasB added this to the AppUI 5.0 milestone Oct 23, 2024
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