-
-
Notifications
You must be signed in to change notification settings - Fork 232
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
refactor(parser)!: Implement endpoint/command parsers #812
Conversation
+ Clean up some stuff.
…nto feat/innertube-command-parser
Before this gets merged, I would like to try adding support for this gigantic refractoring in FreeTube, we definitely need to make changes on our side. I want to check that FreeTube can still do everything that it currently does, so that I can request changes if necessary before this is merged. |
@@ -26,5 +26,5 @@ export interface StreamingInfoOptions { | |||
* | |||
* Defaults to `(audio_track_display_name) => audio_track_display_name + " (Stable Volume)"` | |||
*/ | |||
label_drc_mutiple?: (audio_track_display_name: string) => string; | |||
label_drc_multiple?: (audio_track_display_name: string) => string; |
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.
^^ Technically, this is also a breaking change. This was going to be a big refactor anyway, so I went ahead fixed some typos and removed deprecated code (like the YouTube Studio stuff).
As this will trigger a major version bump because of the breaking changes, should we also use it as an opportunity to get rid of some of the dead nodes? In a separate pull request of course (wouldn't want to make this one even bigger) but in the same release because it will also be a breaking change (TypeScript users will probably get type errors after the dead nodes are removed). |
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.
Less changes were necessary to FreeTube than expected (just 3 minor ones). I did notice that this increases FreeTube's bundle size by 15 kb compared to the main branch, which is likely because the endpoints used to be just variables and functions that could be inlined and now they are fully fledged classes, it's not a big deal though.
Closes #810
The old request builders (under the
Endpoints
namespace) have been removed. Those who relied on them should now use theNavigationEndpoint
node to build requests.Example:
Why?
The old request builders were messy and incompatible with the parser. With this PR, the parser can correctly identify endpoints, commands, and build request payloads.