Skip to content
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

Update generated code for beta #2247

Merged
merged 19 commits into from
Jan 18, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added CONTRIBUTING.md file (#2252)
jar-stripe authored Jan 15, 2025

Verified

This commit was created on github.com and signed with GitHub’s verified signature.
commit 2fda90ebc32034cfb56cb355331584faa4038732
25 changes: 25 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

# Contributing

We welcome bug reports, feature requests, and code contributions in a pull request.

For most pull requests, we request that you identify or create an associated issue that has the necessary context. We use these issues to reach agreement on an approach and save the PR author from having to redo work. Fixing typos or documentation issues likely do not need an issue; for any issue that introduces substantial code changes, changes the public interface, or if you aren't sure, please find or [create an issue](https://www.github.com/stripe/stripe-node/issues/new/choose).

## Contributor License Agreement

All contributors must sign the Contributor License Agreement (CLA) before we can accept their contribution. If you have not yet signed the agreement, you will be given an option to do so when you open a pull request. You can then sign by clicking on the badge in the comment from @CLAassistant.

## Generated code

This project has a combination of manually maintained code and code generated from our private code generator. If your contribution involves changes to generated code, please call this out in the issue or pull request as we will likely need to make a change to our code generator before accepting the contribution.

To identify files with purely generated code, look for the comment `File generated from our OpenAPI spec.` at the start of the file. Generated blocks of code within hand-written files will be between comments that say `The beginning of the section generated from our OpenAPI spec` and `The end of the section generated from our OpenAPI spec`.

## Compatibility with supported language and runtime versions

This project supports [many different langauge and runtime versions](README.md#requirements) and we are unable to accept any contribution that does not work on _all_ supported versions. If, after discussing the approach in the associated issue, your change must use an API / feature that isn't available in all supported versions, please call this out explicitly in the issue or pull request so we can help figure out the best way forward.

## Set up your dev environment

Please refer to this project's [README.md](README.md#development) for instructions on how to set up your development environment.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -596,6 +596,8 @@ New features and bug fixes are released on the latest major version of the `stri

## Development

[Contribution guidelines for this project](CONTRIBUTING.md)

Run all tests:

```bash

Unchanged files with check annotations Beta

this._maxBufferedRequestMetric = maxBufferedRequestMetric;
}
_addHeadersDirectlyToObject(obj: any, headers: RequestHeaders): void {

Check warning on line 53 in src/RequestSender.ts

GitHub Actions / Build

Argument 'obj' should be typed with a non-any type
// For convenience, make some headers easily accessible on
// lastResponse.
sleepSeconds = Math.max(initialNetworkRetryDelay, sleepSeconds);
// And never sleep less than the time the API asks us to wait, assuming it's a reasonable ask.
if (Number.isInteger(retryAfter) && retryAfter! <= MAX_RETRY_AFTER_WAIT) {

Check warning on line 301 in src/RequestSender.ts

GitHub Actions / Build

Forbidden non-null assertion
sleepSeconds = Math.max(sleepSeconds, retryAfter!);

Check warning on line 302 in src/RequestSender.ts

GitHub Actions / Build

Forbidden non-null assertion
}
return sleepSeconds * 1000;
removeListener(eventName: string, listener: Listener): void {
const listenerWrapper = this.listenerMapping.get(listener);
this.listenerMapping.delete(listener);
return this.eventTarget.removeEventListener(eventName, listenerWrapper!);

Check warning on line 40 in src/StripeEmitter.ts

GitHub Actions / Build

Forbidden non-null assertion
}
once(eventName: string, listener: Listener): void {
resourcePath: '',
// Methods that don't use the API's default '/v1' path can override it with this setting.
basePath: null!,

Check warning on line 63 in src/StripeResource.ts

GitHub Actions / Build

Forbidden non-null assertion
initialize(): void {},
const isUsingFullPath = !!spec.fullPath;
const commandPath: UrlInterpolator = makeURLInterpolator(
isUsingFullPath ? spec.fullPath! : spec.path || ''

Check warning on line 132 in src/StripeResource.ts

GitHub Actions / Build

Forbidden non-null assertion
);
// When using fullPath, we ignore the resource path as it should already be
// fully qualified.
if (!webhooksCryptoProviderInstance) {
webhooksCryptoProviderInstance = platformFunctions.createDefaultCryptoProvider();
}
return webhooksCryptoProviderInstance!;

Check warning on line 445 in src/Webhooks.ts

GitHub Actions / Build

Forbidden non-null assertion
}
function prepareOptions(
if (err) {
return resolve(null);
}
resolve(uname!);

Check warning on line 57 in src/platform/NodePlatformFunctions.ts

GitHub Actions / Build

Forbidden non-null assertion
});
} catch (e) {
resolve(null);
Stripe.prototype = {
// Properties are set in the constructor above
_appInfo: undefined!,

Check warning on line 206 in src/stripe.core.ts

GitHub Actions / Build

Forbidden non-null assertion
on: null!,

Check warning on line 207 in src/stripe.core.ts

GitHub Actions / Build

Forbidden non-null assertion
off: null!,
once: null!,
VERSION: null!,