-
Notifications
You must be signed in to change notification settings - Fork 375
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
feat: support building in CJS and ESM formats #2296
Conversation
Need googleapis/gax-nodejs#1459 merged first. |
7f11b1b
to
a029333
Compare
7ca5c04
to
5604034
Compare
"includePattern": "\\.js$" | ||
}, | ||
"templates": { | ||
"copyright": "Copyright 2019 Google, LLC.", |
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.
2023?
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 was just a renamed file / moved file. Should I still update the year?
appBufferSize: NODE_DEFAULT_HIGHWATER_MARK_BYTES, | ||
crc32cEnabled: false, | ||
md5Enabled: false, | ||
api: 'JSON', | ||
elapsedTimeUs: 0, | ||
cpuTimeUs: -1, | ||
status: 'OK', | ||
chunkSize: argv.range_read_size, | ||
workers: argv.workers, | ||
chunkSize: argv.range_read_size as number, |
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.
Are these casts related to ESM or something else?
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.
They are related to updates in TypeScript not ESM.
src/resumable-upload.ts
Outdated
@@ -769,7 +775,9 @@ export class Upload extends Writable { | |||
const headers: GaxiosOptions['headers'] = { | |||
'x-goog-api-client': `${getRuntimeTrackingString()} gccl/${ | |||
packageJson.version | |||
} gccl-invocation-id/${this.currentInvocationId.chunk}`, | |||
}-${getModuleFormat()} gccl-invocation-id/${ |
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.
Not a blocker but it would be easier to cipher through this if the header changes was decoupled in a separate PR
@@ -21,6 +21,7 @@ import { | |||
deleteTestFile, | |||
} from './testBenchUtil'; | |||
import * as uuid from 'uuid'; | |||
import {getDirName} from '../src/util.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.
NB, you could save dirName = getDirName(), that way you improve performance vs. memory (seems like you call it in multiple spots)
Exciting stuff! |
3ccc9bc
to
7d74572
Compare
a81f71a
to
08fdd6c
Compare
08fdd6c
to
0bd65ad
Compare
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> 🦕