Skip to content

Add improvements to b.download() - #369

Closed
romaincazier wants to merge 4 commits into
basiljs:masterfrom
romaincazier:master
Closed

romaincazier wants to merge 4 commits into
basiljs:masterfrom
romaincazier:master

Conversation

@romaincazier

Copy link
Copy Markdown

Hi,

For a project I worked on, I faced issues trying to download a qrcode using Google's QR code generator:

https://chart.googleapis.com/chart?chs=500x500&cht=qr&chl=https://basiljs.ch

Here are two small commits to the b.download() method, which:

  • make sure all spaces in the project path are properly escaped (and not just the first one)
  • avoid the query string to be stripped by the shell (because of "&") by surrounding the url with quotes

Hope it helps !

@ff6347
ff6347 requested review from ff6347 and ffd8 February 19, 2022 05:07

@ff6347 ff6347 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Awesome thank you. Can you also:

  • maybe write a test for that change
  • run all tests and tell us the output
  • run the build so the bundle is updated

@romaincazier

Copy link
Copy Markdown
Author

Hi,

I've never written tests so I hope I got it right.

The new tests I wrote for "./test/download/download.jsx" all pass, and after bundling (the tests are running with the bundled lib so I had to update it first) there seems to be no issues with all the other tests as they all passed as well.

Do you need me to give a dump of the outputs ?

@ffd8

ffd8 commented Feb 19, 2022

Copy link
Copy Markdown
Member

Hey Romain! (Ted here)

Thaaanks for the PR, hooowever - this is v1.0, and we're much further along in our someday-to-release 2.0 (download also got some updates there) – check the develop branch and sorry it's not yet more clear that's where the dev/progress is taking place (we have lots of cleaning up to do with the other branches)...

@romaincazier

Copy link
Copy Markdown
Author

Hey Ted! Hope you're good!

Yeah when starting the project I first tried to check if there was a more up-to-date version but didn't look that much and seeing all the branches... I decided I'll stick with v1 with the docs and all.

Let me check the develop branch and apply my changes there if they're still relevant!

@romaincazier

Copy link
Copy Markdown
Author

Opened a new pull request for the develop branch

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.

3 participants