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

refactor: convert to typescript#106

Merged
JustinBeckwith merged 4 commits intogoogleapis:masterfrom
JustinBeckwith:ts1
Nov 4, 2018
Merged

refactor: convert to typescript#106
JustinBeckwith merged 4 commits intogoogleapis:masterfrom
JustinBeckwith:ts1

Conversation

@JustinBeckwith
Copy link
Copy Markdown
Contributor

@JustinBeckwith JustinBeckwith commented Nov 4, 2018

BREAKING CHANGE: The import style of this library has changed to be es-module compliant. The default export is no longer a function. To get the path to a given proto file, please use the getProtoPath method.

Old code

const protoFiles = require('google-proto-files');
const pathToProto = protoFiles('/some/proto/file');

New Code

const protoFiles = require('google-proto-files');
const pathToProto = protoFiles.getProtoPath('/some/proto/file');

All other exported methods and properties remain the same.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 4, 2018
@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #106 into master will increase coverage by 7.41%.
The diff coverage is 91.47%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #106      +/-   ##
==========================================
+ Coverage      84%   91.41%   +7.41%     
==========================================
  Files           3        6       +3     
  Lines          75      198     +123     
  Branches        0        6       +6     
==========================================
+ Hits           63      181     +118     
- Misses         12       17       +5
Impacted Files Coverage Δ
src/index.ts 100% <100%> (ø)
test/index.test.ts 100% <100%> (ø)
src/load.ts 100% <100%> (ø)
tools/prepublish.ts 38.09% <38.09%> (ø)
test/prepublish.test.ts 83.33% <90%> (ø)
test/load.test.ts 96.15% <96.15%> (ø)
load.js
prepublish.js
index.js
... and 5 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 2e6ff86...95aef13. Read the comment docs.

Comment thread package.json Outdated
"lint": "eslint '**/*.js'",
"mocha": "nyc mocha",
"prepare": "npm run compile && node ./build/tools/prepublish.js",
"prepublishOnly": "npm run prepare",

This comment was marked as spam.

@JustinBeckwith JustinBeckwith requested review from a team and stephenplusplus November 4, 2018 23:30
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.

4 participants