Skip to content
This repository was archived by the owner on Oct 20, 2026. It is now read-only.

build!: drop node8 and convert to TypeScript - #888

Merged
alexander-fenster merged 11 commits into
masterfrom
typescript-again
Apr 10, 2020
Merged

alexander-fenster merged 11 commits into
masterfrom
typescript-again

Conversation

@alexander-fenster

@alexander-fenster alexander-fenster commented Apr 9, 2020 •

Copy link
Copy Markdown
Contributor

This is the final library to be migrated to TypeScript generator! :)

Long story short:

  • Node.js v8 support is dropped
  • gts v2
  • getting rid of proto/ folder in favor of auto-generated protos/ folder

One code changes: in the manually written enums string values were used:

  const enum TypeCode {	
    TYPE_CODE_UNSPECIFIED = 'TYPE_CODE_UNSPECIFIED',	
    BOOL = 'BOOL',	
    INT64 = 'INT64',	
   ...  
}

I'm getting rid of manually written types so this gets replaced with a real enum (with integer values), hence some smaller code changes in src/codec.ts. Luckily, src/codec.ts is covered by tests really well, so (a) this problem was caught, and (b) I'm pretty confident in a fix.

No changes to system tests or samples, which makes me feel really good :)

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Apr 9, 2020
@alexander-fenster alexander-fenster changed the title build: convert to TypeScript build!: drop node8 and convert to TypeScript Apr 9, 2020

@JustinBeckwith JustinBeckwith left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM assuming nits are addressed

Comment thread package.json Resolved
Comment thread package.json Resolved
Comment thread package.json Resolved
Comment thread src/database.ts Resolved
Comment thread src/index.ts Resolved
Comment thread tsconfig.json Resolved

@xiaozhenliu-gg5 xiaozhenliu-gg5 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👏 LGTM!

Comment thread .gitignore Resolved
Comment thread .jsdoc.js Resolved
@codecov

codecov Bot commented Apr 9, 2020 •

Copy link
Copy Markdown

Codecov Report

Merging #888 into master will increase coverage by 22.61%.
The diff coverage is 98.17%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #888       +/-   ##
===========================================
+ Coverage   74.89%   97.51%   +22.61%     
===========================================
  Files          44       22       -22     
  Lines       22386    18212     -4174     
  Branches      694      965      +271     
===========================================
+ Hits        16766    17759      +993     
+ Misses       5619      451     -5168     
- Partials        1        2        +1     
Impacted Files Coverage Δ
bin/benchwrapper.js 0.00% <0.00%> (ø)
src/common.ts 0.00% <0.00%> (ø)
src/v1/database_admin_client.ts 98.39% <ø> (ø)
src/v1/instance_admin_client.ts 98.08% <98.08%> (ø)
src/codec.ts 99.67% <98.11%> (-0.33%) ⬇️
src/v1/spanner_client.ts 98.32% <98.32%> (ø)
src/batch-transaction.ts 100.00% <100.00%> (ø)
src/common-grpc/service-object.ts 99.34% <100.00%> (-0.66%) ⬇️
src/common-grpc/service.ts 99.90% <100.00%> (-0.10%) ⬇️
src/database.ts 99.86% <100.00%> (-0.05%) ⬇️
... and 18 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e6b4af6...a7bc1fb. Read the comment docs.

@summer-ji-eng summer-ji-eng left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@bcoe bcoe left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

great work @alexander-fenster, this is truly looking like the home stretch.

Comment thread package.json Resolved
Comment thread package.json
"eslint-plugin-prettier": "^3.0.0",
"gts": "^1.0.0",
"execa": "^4.0.0",
"gts": "2.0.0-alpha.9",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@JustinBeckwith if you give me broad strokes of what's needed, I might be able to help draft the migration guide.

Comment thread synth.py Resolved
@alexander-fenster
alexander-fenster merged commit 4116f81 into master Apr 10, 2020
@alexander-fenster
alexander-fenster deleted the typescript-again branch April 10, 2020 01:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants