-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: go live (#1) * chore: update SDK settings (#3) * codegen metadata * release: 0.11.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
- Loading branch information
1 parent
3c8c120
commit c84b8bc
Showing
13 changed files
with
194 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# This workflow is triggered when a GitHub release is created. | ||
# It can also be run manually to re-publish to NPM in case it failed for some reason. | ||
# You can run this workflow by navigating to https://www.github.com/dodopayments/dodopayments-node/actions/workflows/publish-npm.yml | ||
name: Publish NPM | ||
on: | ||
workflow_dispatch: | ||
|
||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
name: publish | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Install dependencies | ||
run: | | ||
yarn install | ||
- name: Publish to NPM | ||
run: | | ||
bash ./bin/publish-npm | ||
env: | ||
NPM_TOKEN: ${{ secrets.DODO_PAYMENTS_NPM_TOKEN || secrets.NPM_TOKEN }} |
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,22 @@ | ||
name: Release Doctor | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release_doctor: | ||
name: release doctor | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'dodopayments/dodopayments-node' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Check release environment | ||
run: | | ||
bash ./bin/check-release-environment | ||
env: | ||
NPM_TOKEN: ${{ secrets.DODO_PAYMENTS_NPM_TOKEN || secrets.NPM_TOKEN }} | ||
|
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,3 @@ | ||
{ | ||
".": "0.11.0" | ||
} |
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,2 +1,2 @@ | ||
configured_endpoints: 23 | ||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dodo-payments%2Fdodo-payments-d5f389e46a63405c1c9d3a85ee33ec193b7d91d554ab56a042203db30ae8de71.yml | ||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dodo-payments%2Fdodo-payments-09c6445de16785322a065066ba5767a09be1511bfb72e348e19e3d992f03b670.yml |
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,22 @@ | ||
# Changelog | ||
|
||
## 0.11.0 (2024-12-16) | ||
|
||
Full Changelog: [v0.0.1-alpha.0...v0.11.0](https://github.com/dodopayments/dodopayments-node/compare/v0.0.1-alpha.0...v0.11.0) | ||
|
||
### Features | ||
|
||
* **api:** update via SDK Studio ([3c8c120](https://github.com/dodopayments/dodopayments-node/commit/3c8c1207491653be794ef19f6c88685ea9ea25fc)) | ||
* **api:** update via SDK Studio ([2187350](https://github.com/dodopayments/dodopayments-node/commit/21873500053ab57c7e6896794f19cb02dd8f6ef2)) | ||
* **api:** update via SDK Studio ([b6a4997](https://github.com/dodopayments/dodopayments-node/commit/b6a4997533b095682c53b3cad7d45511989c0660)) | ||
* **api:** update via SDK Studio ([e7ee0bd](https://github.com/dodopayments/dodopayments-node/commit/e7ee0bd60f63a0d616546058c095b403d55e75ea)) | ||
* **api:** update via SDK Studio ([e69d96d](https://github.com/dodopayments/dodopayments-node/commit/e69d96d3f52a8b4de4cd59a2ee844d518335316d)) | ||
* **api:** update via SDK Studio ([cd1786f](https://github.com/dodopayments/dodopayments-node/commit/cd1786fb59450d77997302593a67f208652701ea)) | ||
* **api:** update via SDK Studio ([2b8c5a2](https://github.com/dodopayments/dodopayments-node/commit/2b8c5a21824a80d4cd8967b9e30464037cbca83a)) | ||
* **api:** update via SDK Studio ([ecd2ce8](https://github.com/dodopayments/dodopayments-node/commit/ecd2ce841aca90eb6853c6d96d734f6bde19b792)) | ||
|
||
|
||
### Chores | ||
|
||
* go live ([#1](https://github.com/dodopayments/dodopayments-node/issues/1)) ([0ee38c7](https://github.com/dodopayments/dodopayments-node/commit/0ee38c7ef6ab3bb8057711aeeee1ddb381805775)) | ||
* update SDK settings ([#3](https://github.com/dodopayments/dodopayments-node/issues/3)) ([99f2b94](https://github.com/dodopayments/dodopayments-node/commit/99f2b94294e5b5dd5dc6eed57244b1b976858adf)) |
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 |
---|---|---|
|
@@ -42,15 +42,15 @@ If you’d like to use the repository from source, you can either install from g | |
To install via git: | ||
|
||
```sh | ||
$ npm install git+ssh://[email protected]:stainless-sdks/dodo-payments-node.git | ||
$ npm install git+ssh://[email protected]:dodopayments/dodopayments-node.git | ||
``` | ||
|
||
Alternatively, to link a local copy of the repo: | ||
|
||
```sh | ||
# Clone | ||
$ git clone https://www.github.com/stainless-sdks/dodo-payments-node | ||
$ cd dodo-payments-node | ||
$ git clone https://www.github.com/dodopayments/dodopayments-node | ||
$ cd dodopayments-node | ||
|
||
# With yarn | ||
$ yarn link | ||
|
@@ -91,3 +91,17 @@ To format and fix all lint issues automatically: | |
```sh | ||
$ yarn fix | ||
``` | ||
|
||
## Publishing and releases | ||
|
||
Changes made to this repository via the automated release PR pipeline should publish to npm automatically. If | ||
the changes aren't made through the automated pipeline, you may want to make releases manually. | ||
|
||
### Publish with a GitHub workflow | ||
|
||
You can release to package managers by using [the `Publish NPM` GitHub action](https://www.github.com/dodopayments/dodopayments-node/actions/workflows/publish-npm.yml). This requires a setup organization or repository secret to be set up. | ||
|
||
### Publish manually | ||
|
||
If you need to manually release a package, you can run the `bin/publish-npm` script with an `NPM_TOKEN` set on | ||
the 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,12 +11,9 @@ It is generated with [Stainless](https://www.stainlessapi.com/). | |
## Installation | ||
|
||
```sh | ||
npm install git+ssh://[email protected]:stainless-sdks/dodo-payments-node.git | ||
npm install dodopayments | ||
``` | ||
|
||
> [!NOTE] | ||
> Once this package is [published to npm](https://app.stainlessapi.com/docs/guides/publish), this will become: `npm install dodopayments` | ||
## Usage | ||
|
||
The full API of this library can be found in [api.md](api.md). | ||
|
@@ -276,7 +273,7 @@ import DodoPayments from 'dodopayments'; | |
``` | ||
|
||
To do the inverse, add `import "dodopayments/shims/node"` (which does import polyfills). | ||
This can also be useful if you are getting the wrong TypeScript types for `Response` ([more details](https://github.com/stainless-sdks/dodo-payments-node/tree/main/src/_shims#readme)). | ||
This can also be useful if you are getting the wrong TypeScript types for `Response` ([more details](https://github.com/dodopayments/dodopayments-node/tree/main/src/_shims#readme)). | ||
|
||
### Logging and middleware | ||
|
||
|
@@ -339,7 +336,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con | |
|
||
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience. | ||
|
||
We are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/dodo-payments-node/issues) with questions, bugs, or suggestions. | ||
We are keen for your feedback; please open an [issue](https://www.github.com/dodopayments/dodopayments-node/issues) with questions, bugs, or suggestions. | ||
|
||
## Requirements | ||
|
||
|
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,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
errors=() | ||
|
||
if [ -z "${NPM_TOKEN}" ]; then | ||
errors+=("The DODO_PAYMENTS_NPM_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets") | ||
fi | ||
|
||
lenErrors=${#errors[@]} | ||
|
||
if [[ lenErrors -gt 0 ]]; then | ||
echo -e "Found the following errors in the release environment:\n" | ||
|
||
for error in "${errors[@]}"; do | ||
echo -e "- $error\n" | ||
done | ||
|
||
exit 1 | ||
fi | ||
|
||
echo "The environment is ready to push releases!" | ||
|
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,12 +1,12 @@ | ||
{ | ||
"name": "dodopayments", | ||
"version": "0.0.1-alpha.0", | ||
"version": "0.11.0", | ||
"description": "The official TypeScript library for the Dodo Payments API", | ||
"author": "Dodo Payments <[email protected]>", | ||
"types": "dist/index.d.ts", | ||
"main": "dist/index.js", | ||
"type": "commonjs", | ||
"repository": "github:stainless-sdks/dodo-payments-node", | ||
"repository": "github:dodopayments/dodopayments-node", | ||
"license": "Apache-2.0", | ||
"packageManager": "[email protected]", | ||
"files": [ | ||
|
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,67 @@ | ||
{ | ||
"packages": { | ||
".": {} | ||
}, | ||
"$schema": "https://raw.githubusercontent.com/stainless-api/release-please/main/schemas/config.json", | ||
"include-v-in-tag": true, | ||
"include-component-in-tag": false, | ||
"versioning": "prerelease", | ||
"prerelease": true, | ||
"bump-minor-pre-major": true, | ||
"bump-patch-for-minor-pre-major": false, | ||
"pull-request-header": "Automated Release PR", | ||
"pull-request-title-pattern": "release: ${version}", | ||
"changelog-sections": [ | ||
{ | ||
"type": "feat", | ||
"section": "Features" | ||
}, | ||
{ | ||
"type": "fix", | ||
"section": "Bug Fixes" | ||
}, | ||
{ | ||
"type": "perf", | ||
"section": "Performance Improvements" | ||
}, | ||
{ | ||
"type": "revert", | ||
"section": "Reverts" | ||
}, | ||
{ | ||
"type": "chore", | ||
"section": "Chores" | ||
}, | ||
{ | ||
"type": "docs", | ||
"section": "Documentation" | ||
}, | ||
{ | ||
"type": "style", | ||
"section": "Styles" | ||
}, | ||
{ | ||
"type": "refactor", | ||
"section": "Refactors" | ||
}, | ||
{ | ||
"type": "test", | ||
"section": "Tests", | ||
"hidden": true | ||
}, | ||
{ | ||
"type": "build", | ||
"section": "Build System" | ||
}, | ||
{ | ||
"type": "ci", | ||
"section": "Continuous Integration", | ||
"hidden": true | ||
} | ||
], | ||
"release-type": "node", | ||
"extra-files": [ | ||
"src/version.ts", | ||
"README.md" | ||
] | ||
} |
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 +1 @@ | ||
export const VERSION = '0.0.1-alpha.0'; | ||
export const VERSION = '0.11.0'; // x-release-please-version |