Skip to content

Commit

Permalink
fix: Add instructions for peerDependencies (#27)
Browse files Browse the repository at this point in the history
* Add instructions for peerDependencies

* ci: Format code

* ci: Generate code

* Move section down

* Move section up

* Fix typo

* Collapse sections

---------

Co-authored-by: Seam Bot <[email protected]>
  • Loading branch information
razor-x and seambot authored Dec 6, 2023
1 parent f613414 commit 5d5de7f
Show file tree
Hide file tree
Showing 6 changed files with 126 additions and 14 deletions.
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,17 @@ The underlying HTTP client is [Axios].

[Seam]: https://www.seam.co/
[Seam Docs]: https://docs.seam.co/latest/
[seamapi]: https://www.npmjs.com/package/seamapi
[@seamapi/types]: https://github.com/seamapi/types/
[Axios]: https://axios-http.com/

## Installation

_This is a low-level package meant for applications and libraries with particular dependency requirements.
Before using this package, ensure you understand the installation and updating instructions.
This SDK is entirely contained in the [seamapi] package. Seam recommends using that package instead
for simpler dependency management._

Add this as a dependency to your project using [npm] with

```
Expand All @@ -35,6 +41,36 @@ $ npm install @seamapi/http

[npm]: https://www.npmjs.com/

### Optional Peer Dependencies for TypeScript

This package has optional peer dependencies for TypeScript users.
Recent versions of npm will automatically install peer dependencies by default.
For those users, no additional steps are necessary for full TypeScript support,
however users should still explicitly install the latest types (see the next section).

Other package managers require peer dependencies to be added manually.
Refer to any warnings generated by your package manager
about missing peer dependencies and install them as needed.
Refer to the next section for keeping the types updated.

#### Keeping up with the latest types

This package depends on [@seamapi/types] for the latest TypeScript types.
New versions of this package are generally not released when new types are published.
Unless your project frequently runs a blanket `npm update`,
the types will become outdated with the Seam API over time.
Thus, users of this package should explicitly install the types

```
$ npm install @seamapi/types
```

and update them when consuming new API features:

```
$ npm install @seamapi/http@latest
```

## Usage

```ts
Expand Down
14 changes: 8 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"npm": ">= 8.1.0"
},
"peerDependencies": {
"@seamapi/types": "^1.0.0",
"@seamapi/types": "^1.58.0",
"type-fest": "^4.0.0"
},
"peerDependenciesMeta": {
Expand All @@ -98,11 +98,11 @@
"dependencies": {
"axios": "^1.5.0",
"axios-better-stacktrace": "^2.1.5",
"axios-retry": "^3.8.1",
"@seamapi/types": "^1.44.1"
"axios-retry": "^3.8.1"
},
"devDependencies": {
"@seamapi/fake-seam-connect": "^1.43.0",
"@seamapi/types": "^1.58.0",
"@types/eslint": "^8.44.2",
"@types/node": "^18.11.18",
"ava": "^5.0.1",
Expand Down
37 changes: 33 additions & 4 deletions src/lib/seam/connect/routes/acs-credentials.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 26 additions & 1 deletion src/lib/seam/connect/routes/user-identities.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions src/lib/seam/connect/routes/workspaces.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5d5de7f

Please sign in to comment.