qrcode-terminal
qrcode-terminal copied to clipboard
Convert to ES6
hey :)
this PR is a major upgrade for qrcode-terminal:
- upgrade es5 to es6
- dosen't change any logic
- doesn't add any depencies
- fixes tests (duto sinon upgrade)
ES6 and ESModules require Node12. I hope that is fine - now that Node14 is the current long term support version: https://nodejs.org/en/about/releases/
Incredible work @jantimon! Thank you for taking the time to upgrade the package while retaining the logic and avoiding new dependencies.
I'm happy to merge this PR. I'll just give it a few moments to see if @gtanner has anything to add.
Looks ok to me as well @mwbrooks !
Awesome @gtanner!
@jantimon I'm running into 2 failed tests on my end and I'm curious if you can help me through it.
$ node --version
v12.19.0
$ npm test
...
6 passing (92ms)
2 failing
1) in the main module
the generate method
when not providing a callback
"after each" hook for "logs to the console":
TypeError: Cannot read property 'restore' of undefined
at Context.<anonymous> (test/main.js:13:31)
at processImmediate (internal/timers.js:461:21)
2) in the main module
the generate method
when providing a callback
will not call the console.log method:
Error: expected true to equal false
at Assertion.assert (node_modules/expect.js/index.js:96:13)
at Assertion.be.Assertion.equal (node_modules/expect.js/index.js:216:10)
at Assertion.<computed> [as be] (node_modules/expect.js/index.js:69:24)
at Context.<anonymous> (test/main.js:32:47)
at processImmediate (internal/timers.js:461:21)
The first error is that sinon.sandbox.restore
is undefined. It looks like a fresh npm install
used [email protected]
:
cat node_modules/sinon/package.json | grep version
"postversion": "./scripts/postversion.sh",
"preversion": "./scripts/preversion.sh",
"version": "./scripts/version.sh"
"version": "13.0.1"
Hope this pr gets merged
Any idea on when this will be merged?
Would love to see ES6 support and the updates.
can someone merge this asap?