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

fix: replace relative-require with our own resolveDependencyData #254

Merged
merged 5 commits into from
Jan 21, 2022

Conversation

dominikg
Copy link
Member

to avoid errors when package.json isn't exported

this could resolve #244 and also should get rid of errors that package.json isn't exported in general as resolveDependencyData falls back to a filesystem read - and even if it isn't exported, npm packages do always contain their package.json .

Note: before merging we should check performance and make sure it works the way we expect it to.

Some libraries (eg carbon-components-svelte) ship both compiled and uncompiled code, svelte field must take precedence in this case.

( related: carbon-design-system/carbon-components-svelte#991 )

…void errors when package.json isn't exported
@dominikg dominikg requested a review from bluwy January 19, 2022 16:30
@dominikg
Copy link
Member Author

updated to latest vite too as for some reason pnpm i left it in an inconsistent state for me (maybe because of the override that wasn't updated by renovate?)

@dominikg
Copy link
Member Author

note to future self: cache results for resolved svelte fields

Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

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

LGTM. The implementation looks simpler than I expected, which is great. I haven't tested this locally though but it looks like it'll work.

Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

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

Nice. The caching looks good.

@dominikg dominikg merged commit 1901b42 into main Jan 21, 2022
@dominikg dominikg deleted the fix/replace-relative-require branch January 21, 2022 17:27
@github-actions github-actions bot mentioned this pull request Jan 21, 2022
@github-actions github-actions bot mentioned this pull request Jul 13, 2022
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.

Warning 'The following packages did not export their package.json file...' in case of non-svelte packages
2 participants