-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
First step to TypeScript upgrade #731
Conversation
Codecov Report
@@ Coverage Diff @@
## master #731 +/- ##
===========================================
- Coverage 94.71% 79.58% -15.14%
===========================================
Files 20 8 -12
Lines 1382 240 -1142
Branches 0 53 +53
===========================================
- Hits 1309 191 -1118
+ Misses 73 30 -43
- Partials 0 19 +19
Continue to review full report at Codecov.
|
@matthewloring since @ofrobots is out, can you take a look? |
"lint": "semistandard \"**/*.js\"", | ||
"generate-apis": "node scripts/generate", | ||
"lint": "semistandard \"samples/**/*.js\"", | ||
"generate-apis": "npm run build-tools && node scripts/generate.js", |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This seems wrong to me unless the thing that generates the code has been updated to spit out |
@lukesneeringer I updated the generators and templates to emit *.ts files, re-ran the generator, and ensured that it all worked. The problem is that regenerating the ts files is non-deterministic. The PR would include surface changes, and about 200k lines across all generated files to review. It's really up to you guys. I'm trying to limit the scope and improve the readability of the PR - but I'm happy to throw a watermelon over the fence :) |
If you updated the generator, that resolves my complaint. |
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.
It looks like a few files (auth and some others) did not go through the s/module.exports/export
change. Why were these omitted?
@@ -59,13 +58,14 @@ function makeMethod (schema, method, context) { | |||
params: params, | |||
requiredParams: method.parameterOrder || [], | |||
pathParams: getPathParams(method.parameters), | |||
context: context | |||
context: context, | |||
mediaUrl: null |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -131,10 +133,10 @@ describe('Clients', function () { | |||
it('should support default params', function (done) { | |||
var google = new googleapis.GoogleApis(); | |||
var datastore = google.datastore({ | |||
version: 'v1beta2', | |||
version: 'v1beta3', |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
I'm going to test this branch against our Node.js samples that use google-api-nodejs-client |
Tested against our googleapis samples in the nodejs-docs-samples repo. |
First steps towards #503. This simply renames all the files (including generated ones) to *.ts, and makes any changes necessary to get the build and tests to pass. I am going to update #503 with the full list of steps we need to take here.
npm test
succeedsapis/
I chose to hand modify apis/ to mollify the TypeScript compiler, and because I didn't want to complicate the PR with schema changes.