Skip to content

Commit ab03dac

Browse files
committed
🐛 upgrade package
1 parent 3df61ef commit ab03dac

12 files changed

Lines changed: 5873 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- master
7+
tags:
8+
- '!*' # Do not execute on tags
9+
env:
10+
NAME: ${{vars.NAME}}
11+
EMAIL: ${{vars.EMAIL}}
12+
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
13+
GITHUB_TOKEN: ${{secrets.GH_TOKEN}}
14+
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
15+
FORCE_COLOR: 1
16+
17+
18+
jobs:
19+
test:
20+
strategy:
21+
matrix:
22+
platform: [ubuntu-latest, windows-latest, macOS-latest]
23+
node: [20.x, 22.x]
24+
name: Test with Node ${{matrix.node}} on ${{matrix.platform}}
25+
runs-on: ${{matrix.platform}}
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: actions/setup-node@v3
29+
with:
30+
node-version: ${{matrix.node}}
31+
- run: npm ci
32+
- run: npm test
33+
34+
35+
coverage:
36+
name: Publish coverage
37+
needs: [test]
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v4
41+
- uses: actions/setup-node@v3
42+
with:
43+
node-version: 22.x
44+
- run: npm ci
45+
- run: npm test
46+
- uses: paambaati/codeclimate-action@v3.0.0
47+
- uses: coverallsapp/github-action@master
48+
with:
49+
github-token: ${{secrets.GITHUB_TOKEN}}
50+
51+
52+
docs:
53+
name: Publish docs
54+
needs: [test]
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@v4
58+
- uses: actions/setup-node@v3
59+
with:
60+
node-version: 22.x
61+
- uses: nodef/git-config.action@v1.0.0
62+
- run: npm i -g typescript typedoc
63+
- run: npm ci
64+
- run: npm run publish-docs
65+
66+
67+
packages:
68+
name: Publish packages
69+
needs: [test]
70+
runs-on: ubuntu-latest
71+
steps:
72+
- uses: actions/checkout@v4
73+
- uses: actions/setup-node@v3
74+
with:
75+
node-version: 22.x
76+
- uses: nodef/npm-config.action@v1.0.0
77+
with:
78+
entries: access = public
79+
- run: npm i -g typescript rollup typedoc browserify terser
80+
- run: npm ci
81+
- run: npm run publish-packages

.github/workflows/pr.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: PR
2+
on: [pull_request]
3+
env:
4+
FORCE_COLOR: 1
5+
6+
7+
jobs:
8+
test:
9+
strategy:
10+
matrix:
11+
platform: [ubuntu-latest, windows-latest, macOS-latest]
12+
node: [20.x, 22.x]
13+
name: Test with Node ${{ matrix.node }} on ${{ matrix.platform }}
14+
runs-on: ${{ matrix.platform }}
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-node@v3
18+
with:
19+
node-version: ${{ matrix.node }}
20+
- run: npm ci
21+
- run: npm test

.npmignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Source only
2+
.gitmodules
3+
.github/
4+
.docs/
5+
src/
6+
data/
7+
wiki/
8+
tests/
9+
unused/
10+
test.js
11+
CITATION.cff
12+
TODO
13+
14+
# Build
15+
.build/
16+
coverage/
17+
.travis.yml
18+
.coveralls.yml
19+
tsconfig.json
20+
jest.config.js
21+
rollup.config.js
22+
build.js

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018-20 Subhajit Sahu
3+
Copyright (c) 2018-25 Subhajit Sahu
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
[SQL] is designed for managing or stream processing data in an RDBMS.
2-
Includes SQL command generation functions, with a few for text matching (PostgreSQL).
1+
[SQL] is designed for managing or stream processing data in an RDBMS. Includes SQL command generation functions, with a few for text matching (PostgreSQL).
32

43
```javascript
5-
const sql = require('extra-sql');
4+
const xsql = require('extra-sql');
65

7-
sql.tableExists('food');
6+
xsql.tableExists('food');
87
// SELECT EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name='food');
98

10-
sql.setupTable('food', {code: 'TEXT', name: 'TEXT'},
9+
xsql.setupTable('food', {code: 'TEXT', name: 'TEXT'},
1110
[{code: 'F1', name: 'Mango'}, {code: 'F2', name: 'Lychee'}]);
1211
// CREATE TABLE IF NOT EXISTS "food" ("code" TEXT, "name" TEXT);
1312
// INSERT INTO "food" ("code", "name") VALUES
1413
// ('F1', 'Mango'),
1514
// ('F2', 'Lychee');
1615

17-
sql.selectTsquery('columns', 'total fat');
16+
xsql.selectTsquery('columns', 'total fat');
1817
// SELECT * FROM "columns" WHERE "tsvector" @@ plainto_tsquery('total fat');
1918

20-
sql.matchTsquery('columns', ['total', 'fat']);
19+
xsql.matchTsquery('columns', ['total', 'fat']);
2120
// SELECT *, '2'::INT AS "matchTsquery" FROM "columns" WHERE "tsvector" @@ plainto_tsquery('total fat') UNION ALL
22-
// SELECT *, '1'::INT AS "matchTsquery" FROM "columns" WHERE "tsvector" @@ plainto_tsquery('total');
21+
// SELECT *, '1'::INT AS "matchTsquery" FROM "columns" WHERE "tsvector" @@ plainto_tsquery('total');
2322
```
2423

25-
### reference
24+
25+
## Index
2626

2727
| Name | Action
2828
|---------------------|-------

jest.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
collectCoverage: true,
3+
coverageDirectory: "coverage",
4+
coverageProvider: "v8",
5+
transform: {
6+
"^.+\\.(t|j)sx?$": "ts-jest"
7+
},
8+
};

0 commit comments

Comments
 (0)