Skip to content

Commit

Permalink
release: 0.8.0 (#123)
Browse files Browse the repository at this point in the history
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
Co-authored-by: Stainless Bot <dev+git@stainlessapi.com>
  • Loading branch information
stainless-app[bot] and Stainless Bot authored Nov 11, 2024
1 parent ab82c0a commit 6176a97
Show file tree
Hide file tree
Showing 100 changed files with 545 additions and 275 deletions.
Empty file modified .devcontainer/Dockerfile
100755 → 100644
Empty file.
Empty file modified .devcontainer/devcontainer.json
100755 → 100644
Empty file.
Empty file modified .eslintrc.js
100755 → 100644
Empty file.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
with:
node-version: '18'

- name: Install dependencies
run: yarn install
- name: Bootstrap
run: ./scripts/bootstrap

- name: Check types
run: ./scripts/lint
Expand All @@ -41,8 +41,8 @@ jobs:
with:
node-version: '18'

- name: Install dependencies
run: yarn install
- name: Bootstrap
run: ./scripts/bootstrap

- name: Check build
run: ./scripts/build
Expand Down
Empty file modified .github/workflows/publish-npm.yml
100755 → 100644
Empty file.
Empty file modified .github/workflows/release-doctor.yml
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion .gitignore
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ yarn-error.log
codegen.log
Brewfile.lock.json
dist
/deno
dist-deno
/*.tgz
.idea/

Empty file modified .prettierignore
100755 → 100644
Empty file.
Empty file modified .prettierrc.json
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.7.0"
".": "0.8.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 7
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/groqcloud%2Fgroqcloud-1f0d266ba97b03672f10d33a6dc6e324af9a95646f978ffbff6a31f3907bbfe7.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/groqcloud%2Fgroqcloud-2e2427d7a1c97af4cb989c736fabccf1531532dd3487d330c851db96d6c5da1c.yml
Empty file modified Brewfile
100755 → 100644
Empty file.
22 changes: 22 additions & 0 deletions CHANGELOG.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Changelog

## 0.8.0 (2024-11-09)

Full Changelog: [v0.7.0...v0.8.0](https://github.com/groq/groq-typescript/compare/v0.7.0...v0.8.0)

### Features

* **api:** api update ([#127](https://github.com/groq/groq-typescript/issues/127)) ([5d82d2d](https://github.com/groq/groq-typescript/commit/5d82d2dd7119c17fdae3618b06c607b17ee00d67))
* **api:** api update ([#128](https://github.com/groq/groq-typescript/issues/128)) ([ae555c1](https://github.com/groq/groq-typescript/commit/ae555c1c6934b589e862ebd6b684cede0f09fb18))


### Bug Fixes

* **client:** correct File construction from node-fetch Responses ([#125](https://github.com/groq/groq-typescript/issues/125)) ([42a63ac](https://github.com/groq/groq-typescript/commit/42a63ac2bbf51fde1f61d94a61011d9a49822552))
* GitHub Terraform: Create/Update .github/workflows/stale.yaml [skip ci] ([ab82c0a](https://github.com/groq/groq-typescript/commit/ab82c0a3ba00e63a92a88e24d25e4e41ec090951))


### Chores

* **ci:** install deps via ./script/bootstrap ([#124](https://github.com/groq/groq-typescript/issues/124)) ([edc34d0](https://github.com/groq/groq-typescript/commit/edc34d08c51c8cae2ebbc32296dc9069a6547384))
* rebuild project due to codegen change ([#130](https://github.com/groq/groq-typescript/issues/130)) ([58bc1e8](https://github.com/groq/groq-typescript/commit/58bc1e81f7e89108cada06cf762b8de923849078))
* run tsc as part of lint script ([#122](https://github.com/groq/groq-typescript/issues/122)) ([85a3a56](https://github.com/groq/groq-typescript/commit/85a3a5617b69f87c8dcb4641e39b7302b7b9cfae))

## 0.7.0 (2024-09-03)

Full Changelog: [v0.6.1...v0.7.0](https://github.com/groq/groq-typescript/compare/v0.6.1...v0.7.0)
Expand Down
Empty file modified CODEOWNERS
100755 → 100644
Empty file.
54 changes: 27 additions & 27 deletions CONTRIBUTING.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@ Other package managers may work but are not officially supported for development

To set up the repository, run:

```bash
yarn
yarn build
```sh
$ yarn
$ yarn build
```

This will install all the required dependencies and build output files to `dist/`.

## Modifying/Adding code

Most of the SDK is generated code, and any modified code will be overridden on the next generation. The
`src/lib/` and `examples/` directories are exceptions and will never be overridden.
Most of the SDK is generated code. Modifications to code will be persisted between generations, but may
result in merge conflicts between manual patches and changes from the generator. The generator will never
modify the contents of the `src/lib/` and `examples/` directories.

## Adding and running examples

All files in the `examples/` directory are not modified by the Stainless generator and can be freely edited or
added to.
All files in the `examples/` directory are not modified by the generator and can be freely edited or added to.

```bash
```ts
// add an example to examples/<your-example>.ts

#!/usr/bin/env -S npm run tsn -T
Expand All @@ -41,38 +41,38 @@ If you’d like to use the repository from source, you can either install from g

To install via git:

```bash
npm install git+ssh://git@github.com:groq/groq-typescript.git
```sh
$ npm install git+ssh://git@github.com:groq/groq-typescript.git
```

Alternatively, to link a local copy of the repo:

```bash
```sh
# Clone
git clone https://www.github.com/groq/groq-typescript
cd groq-typescript
$ git clone https://www.github.com/groq/groq-typescript
$ cd groq-typescript

# With yarn
yarn link
cd ../my-package
yarn link groq-sdk
$ yarn link
$ cd ../my-package
$ yarn link groq-sdk

# With pnpm
pnpm link --global
cd ../my-package
pnpm link -—global groq-sdk
$ pnpm link --global
$ cd ../my-package
$ pnpm link -—global groq-sdk
```

## Running tests

Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.

```bash
npx prism mock path/to/your/openapi.yml
```sh
$ npx prism mock path/to/your/openapi.yml
```

```bash
yarn run test
```sh
$ yarn run test
```

## Linting and formatting
Expand All @@ -82,14 +82,14 @@ This repository uses [prettier](https://www.npmjs.com/package/prettier) and

To lint:

```bash
yarn lint
```sh
$ yarn lint
```

To format and fix all lint issues automatically:

```bash
yarn fix
```sh
$ yarn fix
```

## Publishing and releases
Expand Down
Empty file modified LICENSE
100755 → 100644
Empty file.
14 changes: 12 additions & 2 deletions README.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -330,18 +330,28 @@ The following runtimes are supported:
- Jest 28 or greater with the `"node"` environment (`"jsdom"` is not supported at this time).
- Nitro v2.6 or greater.
- Web browsers: disabled by default to avoid exposing your secret API credentials. Enable browser support by explicitly setting `dangerouslyAllowBrowser` to true'.
<details>
<summary>More explanation</summary>
<details>
<summary>More explanation</summary>

### Why is this dangerous?

Enabling the `dangerouslyAllowBrowser` option can be dangerous because it exposes your secret API credentials in the client-side code. Web browsers are inherently less secure than server environments,
any user with access to the browser can potentially inspect, extract, and misuse these credentials. This could lead to unauthorized access using your credentials and potentially compromise sensitive data or functionality.

### When might this not be dangerous?

In certain scenarios where enabling browser support might not pose significant risks:

- Internal Tools: If the application is used solely within a controlled internal environment where the users are trusted, the risk of credential exposure can be mitigated.
- Public APIs with Limited Scope: If your API has very limited scope and the exposed credentials do not grant access to sensitive data or critical operations, the potential impact of exposure is reduced.
- Development or debugging purpose: Enabling this feature temporarily might be acceptable, provided the credentials are short-lived, aren't also used in production environments, or are frequently rotated.

</details>

Note that React Native is not supported at this time.

If you are interested in other runtime environments, please open or upvote an issue on GitHub.

## Contributing

See [the contributing documentation](./CONTRIBUTING.md).
Empty file modified SECURITY.md
100755 → 100644
Empty file.
Empty file modified api.md
100755 → 100644
Empty file.
Empty file modified bin/check-release-environment
100755 → 100644
Empty file.
Empty file modified bin/publish-npm
100755 → 100644
Empty file.
Empty file modified examples/.keep
100755 → 100644
Empty file.
Empty file modified examples/chat_completion.js
100755 → 100644
Empty file.
Empty file modified examples/chat_completion_stop.js
100755 → 100644
Empty file.
Empty file modified examples/chat_completion_streaming.js
100755 → 100644
Empty file.
Empty file modified jest.config.ts
100755 → 100644
Empty file.
5 changes: 3 additions & 2 deletions package.json
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "groq-sdk",
"version": "0.7.0",
"version": "0.8.0",
"description": "The official TypeScript library for the Groq API",
"author": "Groq <support@groq.com>",
"types": "dist/index.d.ts",
Expand All @@ -10,7 +10,7 @@
"license": "Apache-2.0",
"packageManager": "yarn@1.22.22",
"files": [
"*"
"**/*"
],
"private": false,
"scripts": {
Expand Down Expand Up @@ -41,6 +41,7 @@
"eslint": "^8.49.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-unused-imports": "^3.0.0",
"iconv-lite": "^0.6.3",
"jest": "^29.4.0",
"prettier": "^3.0.0",
"ts-jest": "^29.1.0",
Expand Down
Empty file modified release-please-config.json
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ node scripts/utils/postprocess-files.cjs
(cd dist && node -e 'require("groq-sdk")')
(cd dist && node -e 'import("groq-sdk")' --input-type=module)

if command -v deno &> /dev/null && [ -e ./scripts/build-deno ]
if [ -e ./scripts/build-deno ]
then
./scripts/build-deno
fi
3 changes: 3 additions & 0 deletions scripts/lint
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ cd "$(dirname "$0")/.."

echo "==> Running eslint"
ESLINT_USE_FLAT_CONFIG="false" ./node_modules/.bin/eslint --ext ts,js .

echo "==> Running tsc"
./node_modules/.bin/tsc --noEmit
Empty file modified scripts/utils/check-version.cjs
100755 → 100644
Empty file.
Empty file modified scripts/utils/fix-index-exports.cjs
100755 → 100644
Empty file.
Empty file modified scripts/utils/make-dist-package-json.cjs
100755 → 100644
Empty file.
Empty file modified scripts/utils/postprocess-files.cjs
100755 → 100644
Empty file.
Empty file modified src/_shims/MultipartBody.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/README.md
100755 → 100644
Empty file.
Empty file modified src/_shims/auto/runtime-bun.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/auto/runtime-deno.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/auto/runtime-node.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/auto/runtime.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/auto/types-deno.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/auto/types-node.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/auto/types.d.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/auto/types.js
100755 → 100644
Empty file.
Empty file modified src/_shims/auto/types.mjs
100755 → 100644
Empty file.
Empty file modified src/_shims/bun-runtime.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/index-deno.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/index.d.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/index.js
100755 → 100644
Empty file.
Empty file modified src/_shims/index.mjs
100755 → 100644
Empty file.
Empty file modified src/_shims/manual-types.d.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/manual-types.js
100755 → 100644
Empty file.
Empty file modified src/_shims/manual-types.mjs
100755 → 100644
Empty file.
Empty file modified src/_shims/node-runtime.ts
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion src/_shims/node-types.d.ts
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as fd from 'formdata-node';
export { type Agent } from 'node:http';
export { type Readable } from 'node:stream';
export { type ReadStream as FsReadStream } from 'node:fs';
export { ReadableStream } from 'web-streams-polyfill';
export { ReadableStream } from 'node:stream/web';

export const fetch: typeof nf.default;

Expand Down
Empty file modified src/_shims/node-types.js
100755 → 100644
Empty file.
Empty file modified src/_shims/node-types.mjs
100755 → 100644
Empty file.
Empty file modified src/_shims/registry.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/web-runtime.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/web-types.d.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/web-types.js
100755 → 100644
Empty file.
Empty file modified src/_shims/web-types.mjs
100755 → 100644
Empty file.
Loading

0 comments on commit 6176a97

Please sign in to comment.