-
Notifications
You must be signed in to change notification settings - Fork 85
fix(astro): resolve Astro's private APIs properly #238
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
Conversation
|
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.
This API was added after we talked to them 😄
Having that import is intentional here. Once it's stabilized on the Astro side, we'll be able to get rid of the type error.
I would rather us to keep included their logic because:
- If it's updated then it's less maintenance for us and we don't have to track every version from astro of those swap functions.
- We don't include the logic multiple times in the final bundle
This is not just type error. In monorepo setups this import actually fails and TutorialKit fails to start. Here's example from https://github.com/AriPerkkio/tutorialkit/tree/test/ui-tests/test/ui which doesn't work without this fix. ![]() |
Yes, I agree with @Nemikolh and I'd like to keep it as is. The whole point to get this in upstream is to avoid copying code from Astro so we can fully rely on upstream for this. I think we can give them the feedback that it works well for us so it can be exposed properly and we don't need to import from |
Sure, that would be ideal case. It's also breaking change as we would need to set new minimum version of If you have any ideas how to fix #235 and #241 without this change, feel free to help! Otherwise this will block those two, I think. |
@AriPerkkio For #235, I think we can temporarily use a config option. We should definitely provide feedback that this has been working fine for us. For #241, why is this an issue there? Doesn't the dependency also get installed by |
464d12b
to
3d3032d
Compare
Removed copied Astro's Tested with #235 and #241. Checked dev mode and build Using private APIs like this relies on Astro's npm package's file structure and can break at any time. There's reason why |
@Nemikolh @AriPerkkio I can provide that feedback to them and ask them to expose it properly for us. |
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.
Looking good! 🤩
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.
Clever!
Ok PR is on the way withastro/astro#11708 |
@d3lm, @AriPerkkio do we want to wait for that PR to land on Astro's side then? Or are we all happy to move forward with this PR? |
The usage of private APIs was added in #4 (👋 @d3lm).