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
chore: generator v7 #10
Conversation
Copyright Brightcove Inc | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The long version of this license used to be in the repo, but all of our other projects use the short one. I think it makes sense to switch here.
@@ -12,12 +12,14 @@ if (userArgs.indexOf('-h') !== -1 || userArgs.indexOf('--help') !== -1) { | |||
// eslint-disable-next-line | |||
console.log('usage: pkcs7'); | |||
// eslint-disable-next-line | |||
return console.log('pkcs7 expects input on stdin and outputs to stdout'); | |||
console.log('pkcs7 expects input on stdin and outputs to stdout'); | |||
process.exit(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The linter complained about using return here, I think process.exit makes more sense. Same for the code below this.
}] | ||
}); | ||
|
||
if (config.builds.browserMin) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These previously did not exist, but I think they probably should.
@@ -0,0 +1,62 @@ | |||
/* eslint-disable object-shorthand */ | |||
|
|||
import {pad, unpad} from '../src/pkcs7.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole file was moved to follow the standard test naming format and converted to QUnit
I think that its small enough to see that everything is still the same though.
b9338b2
to
be148b1
Compare
"watch:test": "rollup -c scripts/test.rollup.js -w", | ||
"prepublish": "npm run build" | ||
"watch:js": "npm run build:js -- -w", | ||
"watch:test": "npm run test:node -- -w", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This watches the tests and re-runs them when test/dist/bundle.js
changes, I could see removing this or keeping it in. It mostly to have parity when npm run start
is used so that we get test feedback on changes.
"pretest": "npm-run-all lint build", | ||
"test": "npm-run-all -p test:browser test:node", | ||
"test:browser": "karma start scripts/karma.conf.js", | ||
"test:node": "qunit test/dist/bundle.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously tests only ran on node with nodeunit
but qunit
can now run its tests in node. So after switching the tests to QUnit
we run them in both places. Super cool.
Changes