-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[Bug]: index.d.ts for @fluentui/react-provider
references a non-dependency
#33189
Comments
@fluentui/react-provider
is missing a required dependency used in the produced index.d.ts
@fluentui/react-provider
is missing a required dependency used in the produced index.d.ts@fluentui/react-provider
is missing a required dependency used in index.d.ts
@fluentui/react-provider
is missing a required dependency used in index.d.ts@fluentui/react-provider
references a non-dependency
Looking further, it seems that the types output by SWC are incorrect and are causing the reference to show up in the API-Extractor output that gets included in the package. |
In Suggested severity, a possible workaround is mentioned. What is it exactly? |
@v-iabuassab we use the PNPM package manager in our repository, so we can take a couple approaches:
We opted for the latter, since it is what the SWC compilation should be doing but apparently isn't. |
After some more investigation, it seems that this is happening because SWC is doing some incorrect type inference on the export from |
Hi @D4N14L, do you have any mock repo you could share with the correct configuration setup where this happens that I could take a look at? |
@khmakoto I can put a mock repo together if you would like, but this issue should be visible from just inspecting the Line 8 in e8a616e
|
Component
FluentProvider
Package version
9.17.6
React version
17.0.2
Environment
System:
OS: Linux 6.5 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
CPU: (16) x64 AMD EPYC 7763 64-Core Processor
Memory: 58.73 GB / 62.78 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Browsers:
Chrome: 128.0.6613.113
Current Behavior
Missing required dependency
@fluentui/tokens
in package@fluentui/react-provider
. The package is referenced in the index.d.ts but not present in the dependencies.Expected Behavior
Package should have a reference to
@fluentui/tokens
Reproduction
Import any export from
@fluentui/react-provider
and it will failSteps to reproduce
@fluentui/react-provider
in a TypeScript projectAre you reporting an Accessibility issue?
no
Suggested severity
Medium - Has workaround
Products/sites affected
No response
Are you willing to submit a PR to fix?
no
Validations
The text was updated successfully, but these errors were encountered: