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

support custom score api url as function param (and removed unused provider param) #403

Merged
merged 9 commits into from
Nov 2, 2021
Merged

support custom score api url as function param (and removed unused provider param) #403

merged 9 commits into from
Nov 2, 2021

Conversation

mktcode
Copy link
Contributor

@mktcode mktcode commented Oct 21, 2021

fixes: #402

Needs adjustments in more places once snapshot.js version gets bumped up.

@mktcode mktcode changed the title support custom score api url as function parameter support custom score api url as function param (and removed unused provider param) Oct 21, 2021
@mktcode mktcode marked this pull request as ready for review October 21, 2021 07:44
@ChaituVR
Copy link
Member

@bonustrack Removing provider param can be a big change right, It may break for people who already integrated snapshot.js
Maybe we can leave it as it is RN?

@mktcode
Copy link
Contributor Author

mktcode commented Oct 21, 2021

@ChaituVR as long as nobody installs it @master, this shouldn't be a problem. And if you do, you should expect things to changes. Above I also linked a search result for the repos we control, where an update will be needed.

Should then probably be a minor update (not patch), so it will be 0.3.x, since it has breaking changes, right? There are also other refactorings on their way, that will potentially break compatibility with previous versions and could be included in an 0.3 update.

src/utils.ts Outdated Show resolved Hide resolved
Copy link
Member

@ChaituVR ChaituVR left a comment

Choose a reason for hiding this comment

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

Oops there are conflicts :P

@ChaituVR
Copy link
Member

@mktcode This looks good to me, ready to merge this, but the build is failing in GitHub actions with the below error:

src/index.ts  dist/snapshot.min.js...
[!] (plugin rpt2) Error: /home/runner/work/snapshot.js/snapshot.js/src/validations/basic/index.ts(19,26): semantic error TS2554: Expected 6 arguments, but got 4.
src/validations/basic/index.ts
Error: /home/runner/work/snapshot.js/snapshot.js/src/validations/basic/index.ts(19,26): semantic error TS2554: Expected 6 arguments, but got 4.
    at error (/home/runner/work/snapshot.js/snapshot.js/node_modules/rollup/dist/shared/rollup.js:5265:30)
    at throwPluginError (/home/runner/work/snapshot.js/snapshot.js/node_modules/rollup/dist/shared/rollup.js:17956:12)
    at Object.error (/home/runner/work/snapshot.js/snapshot.js/node_modules/rollup/dist/shared/rollup.js:18563:24)
    at Object.error (/home/runner/work/snapshot.js/snapshot.js/node_modules/rollup/dist/shared/rollup.js:18125:38)
    at RollupContext.error (/home/runner/work/snapshot.js/snapshot.js/node_modules/rollup-plugin-typescript2/src/rollupcontext.ts:37:18)
    at lodash_3 (/home/runner/work/snapshot.js/snapshot.js/node_modules/rollup-plugin-typescript2/src/print-diagnostics.ts:41:11)
    at arrayEach (/home/runner/work/snapshot.js/snapshot.js/node_modules/rollup-plugin-typescript2/node_modules/lodash/lodash.js:516:11)
    at _.each (/home/runner/work/snapshot.js/snapshot.js/node_modules/rollup-plugin-typescript2/node_modules/lodash/lodash.js:9342:14)
    at printDiagnostics (/home/runner/work/snapshot.js/snapshot.js/node_modules/rollup-plugin-typescript2/src/print-diagnostics.ts:9:2)
    at Object.transform (/home/runner/work/snapshot.js/snapshot.js/node_modules/rollup-plugin-typescript2/src/index.ts:242:5)

@mktcode
Copy link
Contributor Author

mktcode commented Nov 1, 2021

Yeah I saw that... didn't take a closer look yet. Will do today.

@mktcode
Copy link
Contributor Author

mktcode commented Nov 1, 2021

@mktcode This looks good to me, ready to merge this, but the build is failing in GitHub actions with the below error:

Resolved. I'm not so familiar with TypeScript and the syntax for setting the function param's default values was wrong.

@mktcode mktcode requested review from ChaituVR and samuveth November 1, 2021 16:02
Copy link
Member

@ChaituVR ChaituVR left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@renovate renovate bot mentioned this pull request Nov 4, 2021
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support custom score API URL for testing
3 participants