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

getByPrototype #472

Closed
wants to merge 13 commits into from
Closed

getByPrototype #472

wants to merge 13 commits into from

Conversation

yofukashino
Copy link
Contributor

@yofukashino yofukashino commented Jun 4, 2023

adds a function to webpack to get function with specified prototype properties.
returns the function itself if not getting raw/all modules.
closes #375

note: i did the testing and it works as of function, idk about types. pls test them <3

Copy link
Member

@asportnoy asportnoy left a comment

Choose a reason for hiding this comment

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

For cSpell

src/renderer/modules/webpack/get-modules.ts Outdated Show resolved Hide resolved
src/renderer/modules/webpack/get-modules.ts Outdated Show resolved Hide resolved
@asportnoy asportnoy added enhancement New feature or request semver: minor Requires a minor semver version bump labels Jun 4, 2023
@asportnoy asportnoy changed the base branch from main to v4.4.0 June 4, 2023 05:28
@asportnoy asportnoy added this to the v4.4.0 milestone Jun 4, 2023
@yofukashino yofukashino requested a review from asportnoy June 4, 2023 06:44
@asportnoy asportnoy modified the milestones: v4.4.0, v4.5.0 Jun 10, 2023
@yofukashino yofukashino requested a review from asportnoy June 14, 2023 23:05
@asportnoy asportnoy changed the base branch from v4.4.0 to v4.5.0 June 18, 2023 04:20
Copy link
Member

@asportnoy asportnoy left a comment

Choose a reason for hiding this comment

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

Should be renamed to getByPrototype (singular)

@yofukashino
Copy link
Contributor Author

Should be renamed to getByPrototype (singular)

keeping it consistent with getByProps it shouldn't be singular

@asportnoy
Copy link
Member

Should be renamed to getByPrototype (singular)

keeping it consistent with getByProps it shouldn't be singular

Props is plural because there are multiple props that you're getting by. There's only one prototype. Plus, getBySource is also singular.

@colin273
Copy link
Member

colin273 commented Jun 22, 2023

keeping it consistent with getByProps it shouldn't be singular

What? No. Singular is more appropriate here. If you're just getting one prototype with the filter, there is no scenario in which plural makes sense. Use what fits the meaning.

@yofukashino
Copy link
Contributor Author

Should be renamed to getByPrototype (singular)

keeping it consistent with getByProps it shouldn't be singular

Props is plural because there are multiple props that you're getting by. There's only one prototype. Plus, getBySource is also singular.

nope multiple prototypes are used to get the function usually for good measures. it works just like getByProps

@yofukashino
Copy link
Contributor Author

yofukashino commented Jun 22, 2023

this is how its used webpack.getByPrototypes(["updateVideoQuality", "setUseElectronVideo"], {raw:false,all:false})

edit: you can use without options too just included to show that it works just like getByProps

@netlify
Copy link

netlify bot commented Jun 27, 2023

Deploy Preview for replugged-docs failed.

Name Link
🔨 Latest commit 9b6b557
🔍 Latest deploy log https://app.netlify.com/sites/replugged-docs/deploys/649b27d8718a410008d278ff

@yofukashino yofukashino requested a review from asportnoy June 27, 2023 18:22
@asportnoy asportnoy modified the milestones: v4.5.0, v4.6.0 Jun 28, 2023
@asportnoy asportnoy deleted the branch replugged-org:v4.5.0 June 28, 2023 16:07
@asportnoy asportnoy closed this Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request semver: minor Requires a minor semver version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

getByPrototype
3 participants