-
Notifications
You must be signed in to change notification settings - Fork 764
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2247 from stripe/latest-codegen-beta
Update generated code for beta
- Loading branch information
Showing
44 changed files
with
795 additions
and
373 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# internal files of the nextjs example | ||
.next |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v1437 | ||
v1454 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
set quiet | ||
|
||
import? '../sdk-codegen/utils.just' | ||
|
||
# make locally installed binaries available throughout the tree without a longer specifier | ||
# this is useful in this file, but also depended on by webhook tests that expect to be able to call `eslint` and (I think) don't set it up correctly themselves. | ||
export PATH := `pwd` + "/node_modules/.bin:" + env('PATH') | ||
|
||
_default: | ||
just --list --unsorted | ||
|
||
# this uses positional-args so that mixed quoted and unquoted arguments | ||
# (like filtering for a certain test) work the way we expect | ||
# ⭐ run unit tests | ||
[positional-arguments] | ||
test *args: install build | ||
mocha "$@" | ||
|
||
# try to compile the example TS file to make sure exports work | ||
types-test: build | ||
tsc --build types/test | ||
|
||
# run full integration tests by installing a bunch of packages and starting servers (slow) | ||
integrations-test: build | ||
RUN_INTEGRATION_TESTS=1 mocha test/Integration.spec.ts | ||
|
||
# run the full test suite; you probably want `test` | ||
ci-test: install test types-test integrations-test | ||
|
||
_build mode packageType: install | ||
mkdir -p {{ mode }} | ||
tsc -p tsconfig.{{ mode }}.json | ||
echo '{"type":"{{ packageType }}"}' > {{ mode }}/package.json | ||
|
||
[private] | ||
build-esm: (_build "esm" "module") | ||
|
||
[private] | ||
build-cjs: (_build "cjs" "commonjs") | ||
|
||
# generate CJS and ESM versions of the package; mostly used as a pre-req for other steps | ||
build: build-esm build-cjs | ||
|
||
# ⭐ run style checks, fixing issues if possible | ||
lint: (lint-check "--fix") | ||
|
||
# run style checks without changing anything | ||
lint-check *args: install | ||
eslint --ext .js,.ts . {{ args }} | ||
|
||
# reinstall dependencies, if needed | ||
install: | ||
yarn {{ if is_dependency() == "true" { "--silent" } else { "" } }} | ||
|
||
[no-exit-message] | ||
[private] | ||
prettier *args: install | ||
# all the project-relevant JS code | ||
prettier "{src,examples,scripts,test,types}/**/*.{ts,js}" {{ args }} | ||
|
||
# ⭐ format all files | ||
format: (prettier "--write --loglevel silent") _update-api-version | ||
|
||
# verify formatting of files (without changes) | ||
format-check: (prettier "--check") | ||
|
||
# propagate automatic changes; should be run after generation | ||
# in practice, that means it runs after formatting, since that's the only recipe that the generator calls | ||
_update-api-version: | ||
./scripts/updateAPIVersion.js | ||
|
||
# called by tooling | ||
[private] | ||
update-version version: | ||
echo "{{ version }}" > VERSION | ||
perl -pi -e 's|"version": "[.\-\d\w]+"|"version": "{{ version }}"|' package.json | ||
perl -pi -e "s|Stripe.PACKAGE_VERSION = '[.\-\d\w]+'|Stripe.PACKAGE_VERSION = '{{ version }}'|" src/stripe.core.ts | ||
|
||
# remove build artifacts | ||
clean: | ||
rm -rf ./node_modules/.cache ./esm ./cjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
// File generated from our OpenAPI spec | ||
|
||
export const ApiVersion = '2024-12-18.acacia'; | ||
export const ApiVersion = '2025-01-27.acacia'; |
Oops, something went wrong.