Skip to content

Commit

Permalink
Merge pull request #27 from justinphilpott/feature/import-src
Browse files Browse the repository at this point in the history
release 0.1.0
  • Loading branch information
justinphilpott authored Nov 11, 2024
2 parents 19d9f38 + 89a2410 commit 33acf48
Show file tree
Hide file tree
Showing 24 changed files with 2,425 additions and 2,523 deletions.
14 changes: 0 additions & 14 deletions .eslintrc.json

This file was deleted.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
dist
dist
coverage
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @jphil/bookwhen-client

## 0.1.0

### Minor Changes

- 0b5c39a: Adding BookwhenClient, Events service, supporting code and tests

## 0.0.10

### Patch Changes
Expand Down
29 changes: 19 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ You'll likely be at least somewhat familiar with the [Bookwhen](www.bookwhen.com

## Features

- Lightweight and easy to integrate
- Fully typed for TypeScript support
- Provides an easy way to pull your data from Bookwhen for NodeJS environments
- Provides fully typed methods for each model (so far just the events model) in the Bookwhen API v2

## Installation

Expand All @@ -34,10 +34,18 @@ pnpm add @jphil/bookwhen-client

## Usage

\[wip\]!
!N.B. this usage structure may change as I progress towards a 1.0.0

```typescript
// ... todo
import { createBookwhenClient } from 'bookwhen-client';

const client = createBookwhenClient(YOUR_API_KEY)
const event = client.event.getByID({myEventId});
const events = client.event.getMultiple({
filters: ["filter1", "filter2"]
includes: ["inc1", "inc2"]
});

```

## Configuration
Expand All @@ -56,14 +64,15 @@ Please see the docs in the CONTRIBUTIONS.md file, thanks!

## Roadmap

- Todo
[] - patch in code from previous repo from src
[] -


- Keep up with any future changes or additions to the [Bookwhen API](https://api.bookwhen.com/v2), additions will be driven mainly by this.
- Possibly add a "fields" param to service methods to allow response filtering

- Todos
[] - put Zod in place in more areas to strengthen runtime type guards
[] - refine error handling
[] - write more integration tests
[] - write services for the other integrations

## License

ISC License. See [LICENSE](LICENSE) for more information.

26 changes: 7 additions & 19 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
// eslint.config.js
import eslintPluginPrettier from 'eslint-plugin-prettier';
import eslintConfigPrettier from 'eslint-config-prettier';

export default [
{
files: ['**/*.js', '**/*.ts', '**/*.tsx'],
files: ["**/*.ts", "**/*.tsx"], // Apply these settings to TypeScript files
languageOptions: {
ecmaVersion: 2021,
sourceType: 'module',
globals: {
browser: true,
es6: true,
node: true,
},
parser: "@typescript-eslint/parser",
},
plugins: {
prettier: eslintPluginPrettier,
"@typescript-eslint": require("@typescript-eslint/eslint-plugin"),
},
rules: {
...eslintConfigPrettier.rules, // integrates Prettier rules
// Add any custom rules here, e.g.:
// "semi": ["error", "always"]
},
},
];
...require("@typescript-eslint/eslint-plugin").configs.recommended.rules,
}
}
];
17 changes: 12 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jphil/bookwhen-client",
"version": "0.0.10",
"version": "0.1.0",
"description": "",
"private": false,
"main": "dist/index.js",
Expand All @@ -12,6 +12,7 @@
"build": "tsc",
"lint": "tsc",
"test": "vitest run",
"coverage": "vitest run --coverage",
"type-check": "tsc --noEmit",
"check-exports": "attw --pack . --ignore-rules=cjs-resolves-to-esm",
"prettier-check": "prettier --check 'src/**/*.ts'",
Expand Down Expand Up @@ -50,8 +51,15 @@
"@changesets/cli": "^2.27.9",
"@commitlint/cli": "^19.5.0",
"@commitlint/config-conventional": "^19.5.0",
"@types/node": "^22.9.0",
"@typescript-eslint/eslint-plugin": "^8.13.0",
"@typescript-eslint/parser": "^8.13.0",
"@vitest/coverage-v8": "2.1.3",
"axios": "^1.7.7",
"c8": "^10.1.2",
"commitizen": "^4.3.1",
"cz-conventional-changelog": "^3.3.0",
"dotenv": "^16.4.5",
"eslint": "^9.13.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
Expand All @@ -60,14 +68,13 @@
"tsup": "^8.3.4",
"typescript": "^5.6.3",
"vite": "^5.4.10",
"vitest": "^2.1.3"
"vite-tsconfig-paths": "^5.1.0",
"vitest": "^2.1.3",
"zod": "^3.23.8"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"dependencies": {
"rollup": "^4.24.0"
}
}
Loading

0 comments on commit 33acf48

Please sign in to comment.