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

WIP: upgrade to latest sql.js #36

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

WIP: upgrade to latest sql.js #36

wants to merge 10 commits into from

Conversation

ewnd9
Copy link
Member

@ewnd9 ewnd9 commented Jan 25, 2020

No description provided.

@ewnd9 ewnd9 changed the title upgrade to latest sql.js WIP: upgrade to latest sql.js Jan 25, 2020
src/index.js Show resolved Hide resolved
Copy link
Contributor

@yakhinvadim yakhinvadim left a comment

Choose a reason for hiding this comment

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

Really like the simplification!

src/index.js Outdated
export { Exporter };

export default function(deckName, template) {
export default function(deckName, template, sql) {
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about providing parameters via object?
export default function({deckName, template, sql}) {
We now have 3 params, and 1st and 3rd are required, which is a little odd.

Also, should we provide a default value for template?

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with @yakhinvadim, this does seem awkward as template is optional. I do see an advantage for using object notation for method params. This could be a good pattern that other methods could benefit from, e.g. addCard.

Copy link
Member Author

Choose a reason for hiding this comment

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

Initially I didn't want to introduce breaking changes, but it totally makes sense. Thanks for insisting 👍

src/index.js Show resolved Hide resolved
examples/server/package.json Show resolved Hide resolved
- [browser usage with media attachments via <form />](examples/browser-media-file-input)
- [Node.js](examples/server)
- [Browser/webpack/asm, with ajax and input media attachments](examples/browser)
- [Browser/webpack/wasm, with ajax and input media attachments](examples/browser)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this link to examples/browser-wasm?

Copy link
Contributor

@jamsinclair jamsinclair left a comment

Choose a reason for hiding this comment

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

Looks great! I totally agree, we should leave it up the user as to which sql.js implementation they want to use.

src/index.js Outdated
export { Exporter };

export default function(deckName, template) {
export default function(deckName, template, sql) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we throw an explicit error if sql argument is not defined? It would help people migrating from older code as it would fail loudly and clearly.

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.

None yet

3 participants