Skip to content

Commit 92ea686

Browse files
authored
Merge pull request #4 from argotdev/release-please--branches--main--changes--next--components--argot-stainless-openai
release: 0.1.0-alpha.1
2 parents f7578f2 + a382279 commit 92ea686

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+320
-129
lines changed

.github/workflows/publish-npm.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow is triggered when a GitHub release is created.
2+
# It can also be run manually to re-publish to NPM in case it failed for some reason.
3+
# You can run this workflow by navigating to https://www.github.com/argotdev/argot-stainless-openai/actions/workflows/publish-npm.yml
4+
name: Publish NPM
5+
on:
6+
workflow_dispatch:
7+
8+
release:
9+
types: [published]
10+
11+
jobs:
12+
publish:
13+
name: publish
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Node
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: '18'
23+
24+
- name: Install dependencies
25+
run: |
26+
yarn install
27+
28+
- name: Publish to NPM
29+
run: |
30+
bash ./bin/publish-npm
31+
env:
32+
NPM_TOKEN: ${{ secrets.ARGOT_OPENAI_NPM_TOKEN || secrets.NPM_TOKEN }}

.github/workflows/release-doctor.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Release Doctor
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
workflow_dispatch:
7+
8+
jobs:
9+
release_doctor:
10+
name: release doctor
11+
runs-on: ubuntu-latest
12+
if: github.repository == 'argotdev/argot-stainless-openai' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Check release environment
18+
run: |
19+
bash ./bin/check-release-environment
20+
env:
21+
NPM_TOKEN: ${{ secrets.ARGOT_OPENAI_NPM_TOKEN || secrets.NPM_TOKEN }}
22+

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.1.0-alpha.1"
3+
}

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Changelog
2+
3+
## 0.1.0-alpha.1 (2024-10-18)
4+
5+
Full Changelog: [v0.0.1-alpha.0...v0.1.0-alpha.1](https://github.com/argotdev/argot-stainless-openai/compare/v0.0.1-alpha.0...v0.1.0-alpha.1)
6+
7+
### Features
8+
9+
* **api:** api update ([f7578f2](https://github.com/argotdev/argot-stainless-openai/commit/f7578f282962cb2481d290274b6889a72989be49))
10+
* **api:** api update ([#1](https://github.com/argotdev/argot-stainless-openai/issues/1)) ([e819f3c](https://github.com/argotdev/argot-stainless-openai/commit/e819f3c49382f95b06284e4ee122c420d106c841))
11+
* **api:** api update ([#3](https://github.com/argotdev/argot-stainless-openai/issues/3)) ([de61b44](https://github.com/argotdev/argot-stainless-openai/commit/de61b448ac20a75748b975a7d4104755c96303d6))

CONTRIBUTING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,25 +42,25 @@ If you’d like to use the repository from source, you can either install from g
4242
To install via git:
4343

4444
```sh
45-
$ npm install git+ssh://[email protected]:stainless-sdks/argot-openai-node.git
45+
$ npm install git+ssh://[email protected]:argotdev/argot-stainless-openai.git
4646
```
4747

4848
Alternatively, to link a local copy of the repo:
4949

5050
```sh
5151
# Clone
52-
$ git clone https://www.github.com/stainless-sdks/argot-openai-node
53-
$ cd argot-openai-node
52+
$ git clone https://www.github.com/argotdev/argot-stainless-openai
53+
$ cd argot-stainless-openai
5454

5555
# With yarn
5656
$ yarn link
5757
$ cd ../my-package
58-
$ yarn link argot-openai
58+
$ yarn link argot-stainless-openai
5959

6060
# With pnpm
6161
$ pnpm link --global
6262
$ cd ../my-package
63-
$ pnpm link -—global argot-openai
63+
$ pnpm link -—global argot-stainless-openai
6464
```
6565

6666
## Running tests
@@ -99,7 +99,7 @@ the changes aren't made through the automated pipeline, you may want to make rel
9999

100100
### Publish with a GitHub workflow
101101

102-
You can release to package managers by using [the `Publish NPM` GitHub action](https://www.github.com/stainless-sdks/argot-openai-node/actions/workflows/publish-npm.yml). This requires a setup organization or repository secret to be set up.
102+
You can release to package managers by using [the `Publish NPM` GitHub action](https://www.github.com/argotdev/argot-stainless-openai/actions/workflows/publish-npm.yml). This requires a setup organization or repository secret to be set up.
103103

104104
### Publish manually
105105

README.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Argot OpenAI Node API Library
22

3-
[![NPM version](https://img.shields.io/npm/v/argot-openai.svg)](https://npmjs.org/package/argot-openai) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/argot-openai)
3+
[![NPM version](https://img.shields.io/npm/v/argot-stainless-openai.svg)](https://npmjs.org/package/argot-stainless-openai) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/argot-stainless-openai)
44

55
This library provides convenient access to the Argot OpenAI REST API from server-side TypeScript or JavaScript.
66

@@ -11,19 +11,16 @@ It is generated with [Stainless](https://www.stainlessapi.com/).
1111
## Installation
1212

1313
```sh
14-
npm install git+ssh://[email protected]:stainless-sdks/argot-openai-node.git
14+
npm install argot-stainless-openai
1515
```
1616

17-
> [!NOTE]
18-
> Once this package is [published to npm](https://app.stainlessapi.com/docs/guides/publish), this will become: `npm install argot-openai`
19-
2017
## Usage
2118

2219
The full API of this library can be found in [api.md](api.md).
2320

2421
<!-- prettier-ignore -->
2522
```js
26-
import ArgotOpenAI from 'argot-openai';
23+
import ArgotOpenAI from 'argot-stainless-openai';
2724

2825
const client = new ArgotOpenAI({
2926
apiKey: process.env['API_KEY'], // This is the default and can be omitted
@@ -44,7 +41,7 @@ This library includes TypeScript definitions for all request params and response
4441

4542
<!-- prettier-ignore -->
4643
```ts
47-
import ArgotOpenAI from 'argot-openai';
44+
import ArgotOpenAI from 'argot-stainless-openai';
4845

4946
const client = new ArgotOpenAI({
5047
apiKey: process.env['API_KEY'], // This is the default and can be omitted
@@ -218,12 +215,12 @@ add the following import before your first import `from "ArgotOpenAI"`:
218215
```ts
219216
// Tell TypeScript and the package to use the global web fetch instead of node-fetch.
220217
// Note, despite the name, this does not add any polyfills, but expects them to be provided if needed.
221-
import 'argot-openai/shims/web';
222-
import ArgotOpenAI from 'argot-openai';
218+
import 'argot-stainless-openai/shims/web';
219+
import ArgotOpenAI from 'argot-stainless-openai';
223220
```
224221

225-
To do the inverse, add `import "argot-openai/shims/node"` (which does import polyfills).
226-
This can also be useful if you are getting the wrong TypeScript types for `Response` ([more details](https://github.com/stainless-sdks/argot-openai-node/tree/main/src/_shims#readme)).
222+
To do the inverse, add `import "argot-stainless-openai/shims/node"` (which does import polyfills).
223+
This can also be useful if you are getting the wrong TypeScript types for `Response` ([more details](https://github.com/argotdev/argot-stainless-openai/tree/main/src/_shims#readme)).
227224

228225
### Logging and middleware
229226

@@ -232,7 +229,7 @@ which can be used to inspect or alter the `Request` or `Response` before/after e
232229

233230
```ts
234231
import { fetch } from 'undici'; // as one example
235-
import ArgotOpenAI from 'argot-openai';
232+
import ArgotOpenAI from 'argot-stainless-openai';
236233

237234
const client = new ArgotOpenAI({
238235
fetch: async (url: RequestInfo, init?: RequestInit): Promise<Response> => {
@@ -282,7 +279,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con
282279

283280
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
284281

285-
We are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/argot-openai-node/issues) with questions, bugs, or suggestions.
282+
We are keen for your feedback; please open an [issue](https://www.github.com/argotdev/argot-stainless-openai/issues) with questions, bugs, or suggestions.
286283

287284
## Requirements
288285

bin/check-release-environment

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/env bash
2+
3+
errors=()
4+
5+
if [ -z "${NPM_TOKEN}" ]; then
6+
errors+=("The ARGOT_OPENAI_NPM_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets")
7+
fi
8+
9+
lenErrors=${#errors[@]}
10+
11+
if [[ lenErrors -gt 0 ]]; then
12+
echo -e "Found the following errors in the release environment:\n"
13+
14+
for error in "${errors[@]}"; do
15+
echo -e "- $error\n"
16+
done
17+
18+
exit 1
19+
fi
20+
21+
echo "The environment is ready to push releases!"
22+

jest.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ const config: JestConfigWithTsJest = {
77
'^.+\\.(t|j)sx?$': ['@swc/jest', { sourceMaps: 'inline' }],
88
},
99
moduleNameMapper: {
10-
'^argot-openai$': '<rootDir>/src/index.ts',
11-
'^argot-openai/_shims/auto/(.*)$': '<rootDir>/src/_shims/auto/$1-node',
12-
'^argot-openai/(.*)$': '<rootDir>/src/$1',
10+
'^argot-stainless-openai$': '<rootDir>/src/index.ts',
11+
'^argot-stainless-openai/_shims/auto/(.*)$': '<rootDir>/src/_shims/auto/$1-node',
12+
'^argot-stainless-openai/(.*)$': '<rootDir>/src/$1',
1313
},
1414
modulePathIgnorePatterns: [
1515
'<rootDir>/ecosystem-tests/',

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"name": "argot-openai",
3-
"version": "0.0.1-alpha.0",
2+
"name": "argot-stainless-openai",
3+
"version": "0.1.0-alpha.1",
44
"description": "The official TypeScript library for the Argot OpenAI API",
55
"author": "Argot OpenAI <[email protected]>",
66
"types": "dist/index.d.ts",
77
"main": "dist/index.js",
88
"type": "commonjs",
9-
"repository": "github:stainless-sdks/argot-openai-node",
9+
"repository": "github:argotdev/argot-stainless-openai",
1010
"license": "Apache-2.0",
1111
"packageManager": "[email protected]",
1212
"files": [
@@ -60,8 +60,8 @@
6060
"./shims/web.mjs"
6161
],
6262
"imports": {
63-
"argot-openai": ".",
64-
"argot-openai/*": "./src/*"
63+
"argot-stainless-openai": ".",
64+
"argot-stainless-openai/*": "./src/*"
6565
},
6666
"exports": {
6767
"./_shims/auto/*": {

release-please-config.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"packages": {
3+
".": {}
4+
},
5+
"$schema": "https://raw.githubusercontent.com/stainless-api/release-please/main/schemas/config.json",
6+
"include-v-in-tag": true,
7+
"include-component-in-tag": false,
8+
"versioning": "prerelease",
9+
"prerelease": true,
10+
"bump-minor-pre-major": true,
11+
"bump-patch-for-minor-pre-major": false,
12+
"pull-request-header": "Automated Release PR",
13+
"pull-request-title-pattern": "release: ${version}",
14+
"changelog-sections": [
15+
{
16+
"type": "feat",
17+
"section": "Features"
18+
},
19+
{
20+
"type": "fix",
21+
"section": "Bug Fixes"
22+
},
23+
{
24+
"type": "perf",
25+
"section": "Performance Improvements"
26+
},
27+
{
28+
"type": "revert",
29+
"section": "Reverts"
30+
},
31+
{
32+
"type": "chore",
33+
"section": "Chores"
34+
},
35+
{
36+
"type": "docs",
37+
"section": "Documentation"
38+
},
39+
{
40+
"type": "style",
41+
"section": "Styles"
42+
},
43+
{
44+
"type": "refactor",
45+
"section": "Refactors"
46+
},
47+
{
48+
"type": "test",
49+
"section": "Tests",
50+
"hidden": true
51+
},
52+
{
53+
"type": "build",
54+
"section": "Build System"
55+
},
56+
{
57+
"type": "ci",
58+
"section": "Continuous Integration",
59+
"hidden": true
60+
}
61+
],
62+
"release-type": "node",
63+
"extra-files": [
64+
"src/version.ts",
65+
"README.md"
66+
]
67+
}

0 commit comments

Comments
 (0)