Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow using auth token #19

Merged
merged 11 commits into from
May 22, 2024
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
3 changes: 1 addition & 2 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
"updateInternalDependencies": "patch"
}
4 changes: 3 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
enable-pre-post-scripts=true
ignore-workspace-root-check=true
hoist-pattern[]=!@types/react
hoist-pattern[]=!@ts-rest/core
hoist-pattern[]=!@ts-rest/core
hoist-pattern[]=!analytics
hoist-pattern[]=!@analytics/*
31 changes: 19 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# pubpub-client

## 1.1.0

### Minor Changes

- Add ability to authenticate using authorization tokens instead of username/password
- Update changed types

## 1.0.1

### Patch Changes

- 726f510: Initial Release

## 1.0.2

### Patch Changes

- Improve types for facets and certain CRUD operations, make `pubpub.pub.text.importToPub` work

## 0.9.0

### Minor Changes
Expand Down Expand Up @@ -71,15 +90,3 @@
### Minor Changes

- Add the ability to import and export pubs

## 1.0.1

### Patch Changes

- 726f510: Initial Release

## 1.0.2

### Patch Changes

- Improve types for facets and certain CRUD operations, make `pubpub.pub.text.importToPub` work
2 changes: 1 addition & 1 deletion core
Submodule core updated 128 files
54 changes: 54 additions & 0 deletions development.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Development

These are internal notes for the development of the project.

## Installation

Install dependencies

```bash
pnpm i
```

Setup environment correctly

```bash
cp .env.example .env
```

Look in the usual place for the relevant variables.

## Running tests

Before running tests, make sure you load the environment variables from the `.env` file.

```bash
source .env
```

> [!NOTE]
> This is only necessary because I cannot for the life of me find out how to load the environment variables from the `.env` file in the `jest.config.ts` file.

Then, to run the tests, run

```bash
pnpm test
```

## Generating updated documentation

To generate the updated documentation, run

```bash
pnpm generate-docs
```

## Publishing

Just run

```bash
pnpm publish
```

This will create a new release in the `changeset` package.
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pubpub/sdk",
"version": "1.0.2",
"version": "1.1.0",
"description": "Official PubPub API client for Node.js.",
"type": "module",
"main": "dist/index.cjs",
Expand All @@ -9,7 +9,7 @@
"scripts": {
"build": "tsup",
"postbuild": "attw . -P && size-limit",
"lint": "tsc",
"lint": "tsc --noEmit",
"ci": "rm -rf dist && npm run lint && pnpm run test && pnpm run build",
"prepublish": "pnpm run ci",
"release": "pnpm run ci && changeset publish",
Expand Down Expand Up @@ -48,6 +48,7 @@
"dist"
],
"dependencies": {
"@analytics/core": "^0.12.7",
"@anatine/zod-openapi": "^2.2.0",
"@ts-rest/core": "github:pubpub/ts-rest#ts-rest-core-v3.30.52-gitpkg",
"@types/uuid": "^3.3.0",
Expand All @@ -63,8 +64,8 @@
"zod-to-json-schema": "^3.21.4"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.9.0",
"@changesets/cli": "^2.26.0",
"@arethetypeswrong/cli": "^0.15.3",
"@changesets/cli": "^2.27.3",
"@commitlint/cli": "^17.0.0",
"@commitlint/config-conventional": "^17.0.0",
"@jest/types": "^29.6.3",
Expand Down Expand Up @@ -107,7 +108,7 @@
"tsx": "^3.12.7",
"typedoc": "^0.25.3",
"typedoc-plugin-markdown": "4.0.0-next.36",
"typescript": "^5.2.2",
"typescript": "^5.3.3",
"unified": "^11.0.4",
"unist-util-is": "^6.0.0",
"unist-util-visit": "^5.0.0",
Expand Down
Loading
Loading