-
-
Notifications
You must be signed in to change notification settings - Fork 260
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(content): fix deprecation warnings for marked package #487
Conversation
Fixed by adding the new extensions as well added a test
✅ Deploy Preview for analog-blog ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for analog-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for analog-app ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
#482 Hope this works 🥇 |
Thanks @luishcastroc! Things aren't rendering correctly now comparing the deploy preview against the current version https://deploy-preview-487--analog-blog.netlify.app/blog/2022-12-31-my-second-post If you go to https://deploy-preview-487--analog-blog.netlify.app/blog and click "My Second Post", it doesn't show the code snippet. If you refresh the page, it shows correctly. The e2e test failure is unrelated so don't worry about that for now. |
Thanks i really didn't know how to test it properly so i gave it a shot but with that i can now tell for sure, let me give it a look |
applying new approach on marked to replace setOptions for use this might need to be replaced once the marked/types are updated
@brandonroberts i think it should be fixed now however e2e seems to be still failing. |
@luishcastroc works as expected! Question: What do you think about turning the It would still behave like a singleton. |
i was thinking on this however since all the logic was inside the service i just complemented with the new approach, i think since this is an angular ecosystem it definitely makes sense so let me do the proper changes. thanks for the feedback. |
@brandonroberts i sent a commit with the markedService injected in root but i wanted to know in your experience if that would be the best approach (seems to be straight forward after that). another one i tried was this. export function withMarkdownRenderer(): Provider {
return {
provide: ContentRenderer,
useClass: MarkdownContentRendererService,
deps: [MarkedSetupService],
};
}
export function provideContent(...features: Provider[]) {
return [...features, MarkedSetupService];
} not sure if that would be the best |
@luishcastroc I think it should follow the same pattern as the provider and not use |
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.
LGTM
Thanks for pushing through @luishcastroc! We'll need to add a migration for the new dependencies but that can be done separately. |
@allcontributors add @luishcastroc for code |
I've put up a pull request to add @luishcastroc! 🎉 |
let me read a little bit about how to do this and I'll take a look |
Fixed by adding the new extensions as well added a test
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Which package are you modifying?
What is the current behavior?
When serving the application and prerendering routes, a console warning is shown for the marked package
Closes #482
What is the new behavior?
After the fix no warning should appear.
Does this PR introduce a breaking change?
Other information
[optional] What gif best describes this PR or how it makes you feel?