@jphil/bookwhen-client 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.changeset/README.md +8 -0
- package/.changeset/config.json +11 -0
- package/.eslintrc.json +14 -0
- package/.github/workflows/main.yml +29 -0
- package/.github/workflows/publish.yml +37 -0
- package/.husky/commit-msg +1 -0
- package/.husky/pre-commit +2 -0
- package/.nvmrc +1 -0
- package/.prettierrc.json +5 -0
- package/CHANGELOG.md +7 -0
- package/README +29 -0
- package/commitlint.config.cjs +1 -0
- package/dist/index.cjs +32 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +7 -0
- package/eslint.config.js +26 -0
- package/package.json +49 -0
- package/src/index.test.ts +7 -0
- package/src/index.ts +3 -0
- package/tsconfig.json +16 -0
- package/vite.config.ts +5 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Changesets
|
|
2
|
+
|
|
3
|
+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
|
|
4
|
+
with multi-package repos, or single-package repos to help you version and publish your code. You can
|
|
5
|
+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
|
|
6
|
+
|
|
7
|
+
We have a quick list of common questions to get you started engaging with this project in
|
|
8
|
+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://unpkg.com/@changesets/config@3.0.3/schema.json",
|
|
3
|
+
"changelog": "@changesets/cli/changelog",
|
|
4
|
+
"commit": false,
|
|
5
|
+
"fixed": [],
|
|
6
|
+
"linked": [],
|
|
7
|
+
"access": "public",
|
|
8
|
+
"baseBranch": "main",
|
|
9
|
+
"updateInternalDependencies": "patch",
|
|
10
|
+
"ignore": []
|
|
11
|
+
}
|
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches:
|
|
5
|
+
- '**'
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
build:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- name: Checkout code
|
|
12
|
+
uses: actions/checkout@v4
|
|
13
|
+
|
|
14
|
+
- name: Set up pnpm
|
|
15
|
+
uses: pnpm/action-setup@v4
|
|
16
|
+
with:
|
|
17
|
+
version: 9
|
|
18
|
+
|
|
19
|
+
- name: Set up Node.js
|
|
20
|
+
uses: actions/setup-node@v4
|
|
21
|
+
with:
|
|
22
|
+
node-version: 20.x
|
|
23
|
+
cache: 'pnpm'
|
|
24
|
+
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: pnpm install --frozen-lockfile
|
|
27
|
+
|
|
28
|
+
- name: Run CI
|
|
29
|
+
run: pnpm run ci
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches:
|
|
5
|
+
- 'main'
|
|
6
|
+
|
|
7
|
+
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
publish:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- name: Checkout code
|
|
14
|
+
uses: actions/checkout@v4
|
|
15
|
+
|
|
16
|
+
- name: Set up pnpm
|
|
17
|
+
uses: pnpm/action-setup@v4
|
|
18
|
+
with:
|
|
19
|
+
version: 9
|
|
20
|
+
|
|
21
|
+
- name: Set up Node.js
|
|
22
|
+
uses: actions/setup-node@v4
|
|
23
|
+
with:
|
|
24
|
+
node-version: 20.x
|
|
25
|
+
cache: 'pnpm'
|
|
26
|
+
|
|
27
|
+
- name: Install dependencies
|
|
28
|
+
run: pnpm install --frozen-lockfile
|
|
29
|
+
|
|
30
|
+
- name: Create Release Pull Request or Publish
|
|
31
|
+
id: changesets
|
|
32
|
+
uses: changesets/action@v1
|
|
33
|
+
with:
|
|
34
|
+
publish: pnpm release
|
|
35
|
+
env:
|
|
36
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
37
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pnpx commitlint --edit "$1"
|
package/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
v18
|
package/.prettierrc.json
ADDED
package/CHANGELOG.md
ADDED
package/README
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Bookwhen Client
|
|
2
|
+
|
|
3
|
+
[](http://commitizen.github.io/cz-cli/)
|
|
4
|
+
|
|
5
|
+
## About this Repo
|
|
6
|
+
|
|
7
|
+
bookwhen-client exist to provide an easy interface for pulling data from the bookwhen API (V2)
|
|
8
|
+
|
|
9
|
+
## Setting Up Husky for Contributions
|
|
10
|
+
|
|
11
|
+
This project uses Husky for Git hooks and Commitlint to enforce commit message standards.
|
|
12
|
+
|
|
13
|
+
Install Dependencies: First, clone the repository and install the project dependencies, which include Husky:
|
|
14
|
+
|
|
15
|
+
bash
|
|
16
|
+
|
|
17
|
+
git clone <repository-url>
|
|
18
|
+
cd <repository-directory>
|
|
19
|
+
pnpm install
|
|
20
|
+
|
|
21
|
+
Activate Husky Hooks: After installing dependencies, you need to initialize Husky's Git hooks. Run the following command:
|
|
22
|
+
|
|
23
|
+
bash
|
|
24
|
+
|
|
25
|
+
pnpm husky install
|
|
26
|
+
|
|
27
|
+
This command sets up a .husky/ directory in the project, linking the necessary scripts to Git’s hook system. Once activated, Husky will automatically enforce commit message standards during commits.
|
|
28
|
+
|
|
29
|
+
Thank you for helping maintain commit quality and consistency!
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = { extends: ['@commitlint/config-conventional'] };
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var src_exports = {};
|
|
22
|
+
__export(src_exports, {
|
|
23
|
+
test: () => test
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(src_exports);
|
|
26
|
+
var test = () => {
|
|
27
|
+
console.log("hello test");
|
|
28
|
+
};
|
|
29
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
+
0 && (module.exports = {
|
|
31
|
+
test
|
|
32
|
+
});
|
package/dist/index.d.cts
ADDED
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
package/eslint.config.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// eslint.config.js
|
|
2
|
+
import eslintPluginPrettier from "eslint-plugin-prettier";
|
|
3
|
+
import eslintConfigPrettier from "eslint-config-prettier";
|
|
4
|
+
|
|
5
|
+
export default [
|
|
6
|
+
{
|
|
7
|
+
files: ["**/*.js", "**/*.ts", "**/*.tsx"],
|
|
8
|
+
languageOptions: {
|
|
9
|
+
ecmaVersion: 2021,
|
|
10
|
+
sourceType: "module",
|
|
11
|
+
globals: {
|
|
12
|
+
browser: true,
|
|
13
|
+
es6: true,
|
|
14
|
+
node: true,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
plugins: {
|
|
18
|
+
prettier: eslintPluginPrettier,
|
|
19
|
+
},
|
|
20
|
+
rules: {
|
|
21
|
+
...eslintConfigPrettier.rules, // integrates Prettier rules
|
|
22
|
+
// Add any custom rules here, e.g.:
|
|
23
|
+
// "semi": ["error", "always"]
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
];
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@jphil/bookwhen-client",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "",
|
|
5
|
+
"private": false,
|
|
6
|
+
"main": "/dist/index.js",
|
|
7
|
+
"module": "/dist/index.mjs",
|
|
8
|
+
"types": "/dist/index.d.ts",
|
|
9
|
+
"keywords": [],
|
|
10
|
+
"type": "module",
|
|
11
|
+
"author": "Justin Philpott",
|
|
12
|
+
"license": "ISC",
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@changesets/cli": "^2.27.9",
|
|
15
|
+
"@commitlint/cli": "^19.5.0",
|
|
16
|
+
"@commitlint/config-conventional": "^19.5.0",
|
|
17
|
+
"commitizen": "^4.3.1",
|
|
18
|
+
"cz-conventional-changelog": "^3.3.0",
|
|
19
|
+
"eslint": "^9.13.0",
|
|
20
|
+
"eslint-config-prettier": "^9.1.0",
|
|
21
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
22
|
+
"husky": "^9.1.6",
|
|
23
|
+
"prettier": "^3.3.3",
|
|
24
|
+
"tsup": "^8.3.4",
|
|
25
|
+
"typescript": "^5.6.3",
|
|
26
|
+
"vite": "^5.4.10",
|
|
27
|
+
"vitest": "^2.1.3"
|
|
28
|
+
},
|
|
29
|
+
"config": {
|
|
30
|
+
"commitizen": {
|
|
31
|
+
"path": "./node_modules/cz-conventional-changelog"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"rollup": "^4.24.0"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"dev": "vitest",
|
|
39
|
+
"build": "tsup src/index.ts --format cjs,esm --dts",
|
|
40
|
+
"lint": "tsc",
|
|
41
|
+
"test": "vitest run",
|
|
42
|
+
"ci": "pnpm lint && pnpm test && pnpm build",
|
|
43
|
+
"release": "pnpm lint && pnpm test && pnpm build && changeset publish",
|
|
44
|
+
"commit": "cz",
|
|
45
|
+
"type-check": "tsc --noEmit",
|
|
46
|
+
"pre-commit": "pnpm lint",
|
|
47
|
+
"prepush": "pnpm test"
|
|
48
|
+
}
|
|
49
|
+
}
|
package/src/index.ts
ADDED
package/tsconfig.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2021",
|
|
4
|
+
"module": "nodenext",
|
|
5
|
+
"moduleResolution": "nodenext",
|
|
6
|
+
"noEmit": true,
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"forceConsistentCasingInFileNames": true,
|
|
9
|
+
"strict": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"outDir": "./dist",
|
|
12
|
+
"baseUrl": "./"
|
|
13
|
+
},
|
|
14
|
+
"include": ["src/**/*"], // Include your source files
|
|
15
|
+
"exclude": ["node_modules", "dist"] // Exclude unnecessary directories
|
|
16
|
+
}
|