Skip to content

Commit 383236a

Browse files
Upgraded dependencies; require node >= 18
1 parent 2a424e6 commit 383236a

File tree

3 files changed

+81
-71
lines changed

3 files changed

+81
-71
lines changed

.github/workflows/ci.yml

Lines changed: 50 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3,62 +3,60 @@ name: CI
33
on:
44
push:
55
paths-ignore:
6-
- '*.md'
7-
branches: [ main ]
6+
- "*.md"
7+
branches: [main]
88
tags:
9-
- '*'
9+
- "*"
1010
pull_request:
11-
branches: [ main ]
11+
branches: [main]
1212

1313
jobs:
1414
build:
1515
runs-on: ubuntu-latest
1616
steps:
17-
18-
- name: Git checkout
19-
uses: actions/checkout@v3
20-
with:
21-
fetch-depth: 0
22-
23-
- name: Setup Node.js
24-
uses: actions/setup-node@v3
25-
with:
26-
node-version: '16'
27-
28-
- name: Cache node_modules
29-
uses: actions/cache@v3
30-
with:
31-
path: |
32-
~/.npm
33-
~/.nvm
34-
~/work/better-sqlite3-wrapper/better-sqlite3-wrapper/node_modules
35-
~/work/better-sqlite3-wrapper/better-sqlite3-wrapper/package-lock.json
36-
key: ${{ runner.os }}-node_modules-cache-v3-${{ hashFiles('**/package-lock.json') }}
37-
restore-keys: |
38-
${{ runner.os }}-node_modules-cache-v3-
39-
40-
- name: Extract Tag Name
41-
run: echo "TAG_NAME=$(echo ${GITHUB_REF##*/})" >> $GITHUB_ENV
42-
if: ${{ startsWith(github.ref, 'refs/tags') }}
43-
44-
- name: Run tests
45-
run: |
46-
npm i
47-
node --test
48-
if: ${{ env.TAG_NAME == '' }}
49-
50-
- name: Build SNAPSHOT
51-
run: npm pack
52-
if: ${{ env.TAG_NAME == '' }}
53-
54-
- name: Publish RELEASE
55-
run: |
56-
VERSION="$(echo "$TAG_NAME" | cut -d'v' -f 2)"
57-
echo "Publish a release version=$VERSION for tag $TAG_NAME"
58-
npm --no-git-tag-version --allow-same-version version $VERSION
59-
npm pack
60-
echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
61-
npm publish --access=public farjs-better-sqlite3-wrapper-${VERSION}.tgz
62-
if: ${{ env.TAG_NAME != '' }}
63-
env:
64-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
17+
- name: Git checkout
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: "20"
26+
27+
- name: Cache node_modules
28+
uses: actions/cache@v4
29+
with:
30+
path: |
31+
~/.npm
32+
~/.nvm
33+
~/work/better-sqlite3-wrapper/better-sqlite3-wrapper/node_modules
34+
~/work/better-sqlite3-wrapper/better-sqlite3-wrapper/package-lock.json
35+
key: ${{ runner.os }}-node_modules-cache-v4-${{ hashFiles('**/package-lock.json') }}
36+
restore-keys: |
37+
${{ runner.os }}-node_modules-cache-v4-
38+
39+
- name: Extract Tag Name
40+
run: echo "TAG_NAME=$(echo ${GITHUB_REF##*/})" >> $GITHUB_ENV
41+
if: ${{ startsWith(github.ref, 'refs/tags') }}
42+
43+
- name: Run tests
44+
run: |
45+
npm i
46+
node ./index.test.js
47+
if: ${{ env.TAG_NAME == '' }}
48+
49+
- name: Build SNAPSHOT
50+
run: npm pack
51+
if: ${{ env.TAG_NAME == '' }}
52+
53+
- name: Publish RELEASE
54+
run: |
55+
VERSION="$(echo "$TAG_NAME" | cut -d'v' -f 2)"
56+
echo "Publish a release version=$VERSION for tag $TAG_NAME"
57+
npm --no-git-tag-version --allow-same-version version $VERSION
58+
echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
59+
npm publish
60+
if: ${{ env.TAG_NAME != '' }}
61+
env:
62+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/ci_bun.yml

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,36 @@ name: Bun CI
33
on:
44
push:
55
paths-ignore:
6-
- '*.md'
7-
branches: [ main ]
6+
- "*.md"
7+
branches: [main]
88
pull_request:
9-
branches: [ main ]
9+
branches: [main]
1010

1111
jobs:
1212
build:
1313
runs-on: ubuntu-latest
1414
steps:
15+
- name: Git checkout
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
1519

16-
- name: Git checkout
17-
uses: actions/checkout@v3
18-
with:
19-
fetch-depth: 0
20+
- name: Setup Bun
21+
uses: oven-sh/setup-bun@v1
22+
with:
23+
bun-version: "1.0.1"
2024

21-
- name: Setup Bun
22-
uses: oven-sh/setup-bun@v1
23-
with:
24-
bun-version: "0.5.8"
25+
- name: Cache Dependencies
26+
uses: actions/cache@v4
27+
with:
28+
path: |
29+
~/.bun/install/cache
30+
~/work/better-sqlite3-wrapper/better-sqlite3-wrapper/bun.lockb
31+
key: ${{ runner.os }}-bun-cache-v1-${{ hashFiles('package.json') }}
32+
restore-keys: |
33+
${{ runner.os }}-bun-cache-v1-
2534
26-
- name: Run tests
27-
run: |
28-
bun install
29-
bun test
35+
- name: Run tests
36+
run: |
37+
bun install
38+
bun test

package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"url": "git+https://github.com/farjs/better-sqlite3-wrapper.git"
77
},
88
"author": "viktor-podzigun",
9-
"private": false,
109
"description": "Thin api wrapper around better-sqlite3 and bun:sqlite to allow cross- runtime/engine usage",
1110
"license": "MIT",
1211
"bugs": {
@@ -27,12 +26,16 @@
2726
"main": "./index.js",
2827
"exports": "./index.js",
2928
"typings": "./index.d.ts",
29+
"private": false,
30+
"publishConfig": {
31+
"access": "public"
32+
},
3033
"browserslist": "maintained node versions",
3134
"engines": {
32-
"node": ">=14.21.1",
33-
"bun": ">=0.5.8"
35+
"node": ">=18",
36+
"bun": ">=0.8"
3437
},
3538
"optionalDependencies": {
36-
"better-sqlite3": "^8.2.0"
39+
"better-sqlite3": "^11.5.0"
3740
}
3841
}

0 commit comments

Comments
 (0)