keyv-github 1.0.0 → 1.1.0
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/.github/workflows/release.yml +43 -0
- package/README.md +1 -1
- package/bun.lock +885 -0
- package/dist/index.d.mts +14 -1
- package/dist/index.mjs +50 -28
- package/examples/hello-today.ts +14 -12
- package/package.json +30 -25
- package/src/index.test.ts +545 -411
- package/src/index.ts +372 -295
- package/tsconfig.json +24 -24
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Release workflow
|
|
2
|
+
|
|
3
|
+
# check https://www.npmjs.com/package/[package-name]/access for OIDC setup
|
|
4
|
+
# 1. repo = this repo
|
|
5
|
+
# 2. package-name = package to publish
|
|
6
|
+
|
|
7
|
+
name: Release
|
|
8
|
+
description: "Release workflow for publishing package"
|
|
9
|
+
|
|
10
|
+
on:
|
|
11
|
+
pull_request:
|
|
12
|
+
branches:
|
|
13
|
+
- main
|
|
14
|
+
push:
|
|
15
|
+
tags:
|
|
16
|
+
- 'v*.*.*'
|
|
17
|
+
branches:
|
|
18
|
+
- main
|
|
19
|
+
- beta
|
|
20
|
+
|
|
21
|
+
permissions:
|
|
22
|
+
id-token: write # required for OIDC
|
|
23
|
+
contents: write # read and write access to repository contents
|
|
24
|
+
issues: write
|
|
25
|
+
|
|
26
|
+
jobs:
|
|
27
|
+
build-test-release:
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v5
|
|
31
|
+
- uses: actions/setup-node@v6
|
|
32
|
+
with: {node-version: latest} #[semantic-release]: node version >=20.8.1 is required. Found v18.20.5.
|
|
33
|
+
- uses: oven-sh/setup-bun@v2
|
|
34
|
+
- run: bun i
|
|
35
|
+
- run: bunx biofix
|
|
36
|
+
- run: bun run build
|
|
37
|
+
- run: bun run test
|
|
38
|
+
- if: github.event_name == 'push'
|
|
39
|
+
run: bunx semantic-release
|
|
40
|
+
env:
|
|
41
|
+
# reminder to setup read/write permission for this token
|
|
42
|
+
# here: REPO_URL/settings/actions
|
|
43
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ import Keyv from "keyv";
|
|
|
29
29
|
import KeyvGithub from "keyv-github";
|
|
30
30
|
|
|
31
31
|
const store = new KeyvGithub("https://github.com/owner/repo/tree/main", {
|
|
32
|
-
client: new Octokit({ auth: process.env.GITHUB_TOKEN }),
|
|
32
|
+
client: new Octokit({ auth: process.env.GITHUB_TOKEN }), // only required if you want .set(), or .get() in private repo
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
const kv = new Keyv({ store });
|