Skip to content

Commit 91f3a3d

Browse files
chore(config): set package manager to pnpm & allow sdk usage in browser
1 parent ddadbbf commit 91f3a3d

10 files changed

Lines changed: 4231 additions & 3514 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"features": {
77
"ghcr.io/devcontainers/features/node:1": {}
88
},
9-
"postCreateCommand": "yarn install",
9+
"postCreateCommand": "pnpm install",
1010
"customizations": {
1111
"vscode": {
1212
"extensions": ["esbenp.prettier-vscode"]

.github/workflows/ci.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ jobs:
2626
with:
2727
node-version: '20'
2828

29+
- name: Set up pnpm
30+
uses: pnpm/action-setup@v4
31+
with:
32+
version: '10.14.0'
33+
2934
- name: Bootstrap
3035
run: ./scripts/bootstrap
3136

@@ -48,6 +53,11 @@ jobs:
4853
with:
4954
node-version: '20'
5055

56+
- name: Set up pnpm
57+
uses: pnpm/action-setup@v4
58+
with:
59+
version: '10.14.0'
60+
5161
- name: Bootstrap
5262
run: ./scripts/bootstrap
5363

@@ -81,6 +91,11 @@ jobs:
8191
with:
8292
node-version: '20'
8393

94+
- name: Set up pnpm
95+
uses: pnpm/action-setup@v4
96+
with:
97+
version: '10.14.0'
98+
8499
- name: Bootstrap
85100
run: ./scripts/bootstrap
86101

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 11
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/droidrun%2Fdroidrun-cloud-4fe1ae9eff01102cd1c24a53b5f8d4237c7816b19f3c9f996a377ea35649a4b1.yml
33
openapi_spec_hash: cfeab542f073eeea5fc5a3e38d67d81f
4-
config_hash: da482ac0881a698516290f720552205c
4+
config_hash: b31c431785f82620b575ae9eca23ffea

CONTRIBUTING.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
## Setting up the environment
22

3-
This repository uses [`yarn@v1`](https://classic.yarnpkg.com/lang/en/docs/install).
3+
This repository uses [`pnpm`](https://pnpm.io/).
44
Other package managers may work but are not officially supported for development.
55

66
To set up the repository, run:
77

88
```sh
9-
$ yarn
10-
$ yarn build
9+
$ pnpm install
10+
$ pnpm build
1111
```
1212

1313
This will install all the required dependencies and build output files to `dist/`.
@@ -32,7 +32,7 @@ All files in the `examples/` directory are not modified by the generator and can
3232
```sh
3333
$ chmod +x examples/<your-example>.ts
3434
# run the example against your api
35-
$ yarn tsn -T examples/<your-example>.ts
35+
$ pnpm tsn -T examples/<your-example>.ts
3636
```
3737

3838
## Using the repository from source
@@ -72,7 +72,7 @@ $ npx prism mock path/to/your/openapi.yml
7272
```
7373

7474
```sh
75-
$ yarn run test
75+
$ pnpm run test
7676
```
7777

7878
## Linting and formatting
@@ -83,11 +83,11 @@ This repository uses [prettier](https://www.npmjs.com/package/prettier) and
8383
To lint:
8484

8585
```sh
86-
$ yarn lint
86+
$ pnpm lint
8787
```
8888

8989
To format and fix all lint issues automatically:
9090

9191
```sh
92-
$ yarn fix
92+
$ pnpm fix
9393
```

bin/publish-npm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -eux
44

55
npm config set '//registry.npmjs.org/:_authToken' "$NPM_TOKEN"
66

7-
yarn build
7+
pnpm build
88
cd dist
99

1010
# Get package name and version from package.json
@@ -58,4 +58,4 @@ else
5858
fi
5959

6060
# Publish with the appropriate tag
61-
yarn publish --tag "$TAG"
61+
pnpm publish --no-git-checks --tag "$TAG"

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"type": "commonjs",
99
"repository": "github:droidrun/cloud-sdk-typescript",
1010
"license": "Apache-2.0",
11-
"packageManager": "yarn@1.22.22",
11+
"packageManager": "pnpm@10.14.0",
1212
"files": [
1313
"**/*"
1414
],
@@ -19,7 +19,7 @@
1919
"scripts": {
2020
"test": "./scripts/test",
2121
"build": "./scripts/build",
22-
"prepublishOnly": "echo 'to publish, run yarn build && (cd dist; yarn publish)' && exit 1",
22+
"prepublishOnly": "echo 'to publish, run pnpm build && (cd dist; pnpm publish)' && exit 1",
2323
"format": "./scripts/format",
2424
"prepare": "if ./scripts/utils/check-is-in-git-install.sh; then ./scripts/build && ./scripts/utils/git-swap.sh; fi",
2525
"tsn": "ts-node -r tsconfig-paths/register",

0 commit comments

Comments
 (0)