-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
remove change in type of original Options from remark-rehype #6211
remove change in type of original Options from remark-rehype #6211
Conversation
🦋 Changeset detectedLatest commit: 3e67032 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
I don't know why that error in github checks appears but it continues appearing even if I left the code as it was before 😕 (at least in my IDE) |
The change makes sense to me, but I'm stumped with the TypeScript error too. Looks like it's a bug there: microsoft/TypeScript#42873 If I do: export type RemarkRehype = Omit<RemarkRehypeOptions, ''> instead, which is kinda silly, it works. Maybe you can try this and merge up main? I can't seem to merge main locally, there's some sort of history mismatch. |
@pedro199288 do you plan to still work on this? |
@bluwy thanks for the support. What you suggested looks silly, but the fact that it doesn't work without that, also looks silly to me. So I will give a try, thanks! :) |
Yeah I will give it a third and last try this week or the next one. If don't manage to fix it I'll let you know |
I've tried what @bluwy suggested but it didn't work just with that. I've changed two files in my last commit. Curiously, only doing one of these changes didn't fix the issue with the build step but adding the two changes did so (I don't know why). You can see that I set |
@pedro199288 all tests are passing now, are you saying this isn't working? Or just that you're unsure about the option you added? |
@matthewp yeah it works fine for me also. It's just that I'm not sure if the change in tsconfig might be a problem for whatever reason that I'm not aware of. Other than that it looks good to me :) |
d128462
to
62078c4
Compare
Hey @pedro199288, sorry for the delay on this! This change seems good to me, but I agree that the Happy to try to resolve these if you're still interesting in getting this change in. |
Hey @natemoo-re ! sorry for the late response. But yeah sure, it'd be nice if you can help with this |
@pedro199288 I don't think the team has the bandwidth to help you with this PR. It's OK if you aren't interested anymore to this PR |
We're planning to fix this in #9147 and release in Astro 4.0. |
Closing as #9147 is merged |
Changes
This PR removes a change that was introduced in the type of original Options from
remark-rehype
package. This was done in this PR make Remark rehype options available in astro config #4138 inpackages/markdown/remark/src/types.ts
.The reason for this PR is that when passing a valid configuration for remark-rehype (that actually works correctly), typescript is returning an error.
Before the PR change:
The above error is:
After the PR change:
No error appears
Maybe I missed something from the original PR but as it is is giving a typescript error with a config that actually works.
Testing
No test was updated because this is just related to typescript
Docs
/cc @withastro/maintainers-docs for feedback!
Haven't add docs but I can if necessary