-
Notifications
You must be signed in to change notification settings - Fork 553
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
Add typescript #216
Add typescript #216
Conversation
11199d3
to
b8edc07
Compare
b8edc07
to
bdf2554
Compare
Let's not make this all |
think now we should update |
"eslint": "^4.11.0", | ||
"nock": "^9.2.5", | ||
"proxyquire": "^1.7.4", | ||
"restify": "^4.1.1", | ||
"sinon": "^1.17.2", | ||
"strip-ansi": "^4.0.0", | ||
"tap": "^12.0.0", | ||
"tap-only": "0.0.5", |
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.
maybe if you remove tap-only
, can also remove the check-tests
scripts above? as it's purpose it to check for only()
accidently commited
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.
@michael-go tap
supports .only()
as well (https://www.node-tap.org/only/), that's why I have left it.
"tap-only": "0.0.5", | ||
"tape": "^4.0.0" | ||
"tap": "github:snyk/node-tap#alternative-runtimes", | ||
"tape": "^4.0.0", |
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.
is tape
really needed? maybe it can easily be replaced with tap
?
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.
TBH, I don't know, but don't want to do this decision now :-)
@adrukh In my opinion - it's not a functional change and we should be confident we haven't broken anything. I also believe that adoption of CLI tool is not as fast as it happens in SaaS enviroment, so we would get a feedback after a while. Therefore, I don't believe feedback in a way Additionally, if we would publish a new version ( with functional change) in the meantime and there would be a problem - what's a safe version for a rollback? |
src/cli/index.ts
Outdated
if (!runtime.isSupported(process.versions.node)) { | ||
console.error(process.versions.node + | ||
' is an unsupported nodejs runtime! Supported runtime range is \'' + | ||
runtime.supportedRange + '\''); | ||
console.error('Please upgrade your nodejs runtime version ' + | ||
'and try again.'); | ||
process.exit(1); | ||
}; | ||
} |
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.
with real ES6 modules (which is not the case here, but might be in the future with node 10), all the imports happen before the the script starts, so I think it's better to put all imports on top before any code to be more clear about it.
f8ef17b
to
c5ebbff
Compare
🎉 This PR is included in version 1.97.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Introducing TypeScript will happen in
32 phases (flow verified inregistry
):lib
andcli
mapping works before/after compilationThis PR introduces typescript support for source files and tests. One source file and test are converted in order to verify everything works as intended.
As a side effect,
package-lock.json
was added andnpm prune
was removed from Travis setup.* Sourcode and tests had to be merged together, because conversion of one file led to different requires in tests