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: code parser #1203

Merged
merged 1 commit into from
Apr 13, 2023
Merged

fix: code parser #1203

merged 1 commit into from
Apr 13, 2023

Conversation

khlevon
Copy link
Contributor

@khlevon khlevon commented Apr 6, 2023

Youtube changed base.js code, especially this regex /[{//'],]/ and it broke this package.
This patch will fix the situation, but we need to refactor utils.js code to get stability in the future

Issue: #1197

@khlevon
Copy link
Contributor Author

khlevon commented Apr 6, 2023

@fent can you review this PR?

@AliAryanTech
Copy link

It's working, I tested

@shnithu
Copy link

shnithu commented Apr 6, 2023

it's working form me!

@JPBM135
Copy link

JPBM135 commented Apr 6, 2023

Worked! Thank you so much, I will make an patch until the official release!

diff --git a/lib/utils.js b/lib/utils.js
index 705c8dd3dd9c2aad97c21f70c95029b32a69ce1c..143ef1ff3f66f344b5df9e0312c7b812064308b2 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -60,7 +60,7 @@ const ESCAPING_SEQUENZES = [
   { start: "'", end: "'" },
   { start: '`', end: '`' },
   // RegeEx
-  { start: '/', end: '/', startPrefix: /(^|[[{:;,])\s?$/ },
+  { start: '/', end: '/', startPrefix: /(^|[[{:;,/])\s?$/ },
 ];
 
 /**

If anyone wants it!

Copy link

@shakeebshams shakeebshams left a comment

Choose a reason for hiding this comment

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

@fent merge please

@ShantanuNair
Copy link

Worked! Thank you so much, I will make an patch until the official release!

diff --git a/lib/utils.js b/lib/utils.js
index 705c8dd3dd9c2aad97c21f70c95029b32a69ce1c..143ef1ff3f66f344b5df9e0312c7b812064308b2 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -60,7 +60,7 @@ const ESCAPING_SEQUENZES = [
   { start: "'", end: "'" },
   { start: '`', end: '`' },
   // RegeEx
-  { start: '/', end: '/', startPrefix: /(^|[[{:;,])\s?$/ },
+  { start: '/', end: '/', startPrefix: /(^|[[{:;,/])\s?$/ },
 ];
 
 /**

If anyone wants it!

You can simply add .patch to the end of the PR URL instead, like so https://patch-diff.githubusercontent.com/raw/fent/node-ytdl-core/pull/1203.patch to get the patch

@JPBM135
Copy link

JPBM135 commented Apr 7, 2023

Worked! Thank you so much, I will make an patch until the official release!

diff --git a/lib/utils.js b/lib/utils.js
index 705c8dd3dd9c2aad97c21f70c95029b32a69ce1c..143ef1ff3f66f344b5df9e0312c7b812064308b2 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -60,7 +60,7 @@ const ESCAPING_SEQUENZES = [
   { start: "'", end: "'" },
   { start: '`', end: '`' },
   // RegeEx
-  { start: '/', end: '/', startPrefix: /(^|[[{:;,])\s?$/ },
+  { start: '/', end: '/', startPrefix: /(^|[[{:;,/])\s?$/ },
 ];
 
 /**

If anyone wants it!

You can simply add .patch to the end of the PR URL instead, like so https://patch-diff.githubusercontent.com/raw/fent/node-ytdl-core/pull/1203.patch to get the patch

Didn't know that, thank you!

Copy link

@dskaiser82 dskaiser82 left a comment

Choose a reason for hiding this comment

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

works for me

@Amatog94
Copy link

Amatog94 commented Apr 7, 2023

Working

@bdeshak
Copy link

bdeshak commented Apr 10, 2023

[email protected] not working Syntex error

Copy link

@sum117 sum117 left a comment

Choose a reason for hiding this comment

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

Works.

Copy link

@LoboMetalurgico LoboMetalurgico left a comment

Choose a reason for hiding this comment

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

Thank you!

@TimeForANinja
Copy link
Collaborator

TimeForANinja commented Apr 13, 2023

Thanks for the PR 👍.
Expected this to fail at some point due to some oversight with what's possible with JS syntax but luckily it's a small fix.

@TimeForANinja TimeForANinja merged commit 0d3f91b into fent:master Apr 13, 2023
@github-actions
Copy link

🎉 This PR is included in version 4.11.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.