Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.prism.log
node_modules
yarn-error.log
package-lock.json
codegen.log
Brewfile.lock.json
dist
Expand Down
11 changes: 8 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ All files in the `examples/` directory are not modified by the generator and can
```ts
// add an example to examples/<your-example>.ts

#!/usr/bin/env -S npm run tsn -T
#!/usr/bin/env -S yarn tsn -T
```

Expand All @@ -37,7 +37,7 @@ $ yarn tsn -T examples/<your-example>.ts

## Using the repository from source

If youd like to use the repository from source, you can either install from git or link to a cloned repository:
If you'd like to use the repository from source, you can either install from git or link to a cloned repository:

To install via git:

Expand All @@ -57,6 +57,11 @@ $ yarn link
$ cd ../my-package
$ yarn link llama-stack-client

# With npm
$ npm link
$ cd ../my-package
$ npm link llama-stack-client

# With pnpm
$ pnpm link --global
$ cd ../my-package
Expand All @@ -68,7 +73,7 @@ $ pnpm link -—global llama-stack-client
Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.

```sh
$ npx prism mock path/to/your/openapi.yml
$ npx @stainless-api/prism-cli@5.15.0 prism mock path/to/your/openapi.yml
```

```sh
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,8 @@ If you are interested in other runtime environments, please open or upvote an is

See [the contributing documentation](./CONTRIBUTING.md).

Note: This project uses [yarn](https://classic.yarnpkg.com/) v1 as its package manager for development. Please ensure you have yarn installed before contributing.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
20 changes: 13 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,27 @@
"devDependencies": {
"@swc/core": "^1.3.102",
"@swc/jest": "^0.2.29",
"@types/jest": "^29.4.0",
"@typescript-eslint/eslint-plugin": "^6.7.0",
"@typescript-eslint/parser": "^6.7.0",
"eslint": "^8.49.0",
"@types/jest": "^30.0.0",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"eslint": "^9.0.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-unused-imports": "^3.0.0",
"eslint-plugin-unused-imports": "^4.0.0",
"iconv-lite": "^0.6.3",
"jest": "^29.4.0",
"jest": "^30.0.0",
"prettier": "^3.0.0",
"ts-jest": "^29.1.0",
"ts-jest": "^29.4.0",
"ts-node": "^10.5.0",
"tsc-multi": "^1.1.0",
"tsconfig-paths": "^4.0.0",
"typescript": "^4.8.2"
},
"resolutions": {
"@babel/core": "^7.28.5",
"@babel/helpers": "^7.28.4",
"js-yaml": "^4.1.1",
"brace-expansion": "^2.0.1"
},
"sideEffects": [
"./_shims/index.js",
"./_shims/index.mjs",
Expand Down
8 changes: 6 additions & 2 deletions scripts/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ fi

echo "==> Installing Node dependencies…"

PACKAGE_MANAGER=$(command -v yarn >/dev/null 2>&1 && echo "yarn" || echo "npm")
if ! command -v yarn >/dev/null 2>&1; then
echo "Error: yarn is required but not installed."
echo "Please install yarn: https://classic.yarnpkg.com/en/docs/install"
exit 1
fi

$PACKAGE_MANAGER install
yarn install
2 changes: 1 addition & 1 deletion tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ describe('instantiate client', () => {

const spy = jest.spyOn(client, 'request');

await expect(client.get('/foo', { signal: controller.signal })).rejects.toThrowError(APIUserAbortError);
await expect(client.get('/foo', { signal: controller.signal })).rejects.toThrow(APIUserAbortError);
expect(spy).toHaveBeenCalledTimes(1);
});

Expand Down
Loading