Skip to content

Commit 1cf7814

Browse files
authored
feat: impl with typescript (ali-sdk#103)
BREAKING CHANGE: drop Node.js < 16 support
1 parent 6b7d240 commit 1cf7814

23 files changed

+566
-524
lines changed

.eslintrc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
{
2-
"extends": "eslint-config-egg",
3-
"parserOptions": {
4-
"ecmaVersion": "latest"
5-
}
2+
"extends": "eslint-config-egg/typescript"
63
}

.github/workflows/nodejs.yml

Lines changed: 12 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,18 @@
1-
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3-
4-
name: Node.js CI
1+
name: CI
52

63
on:
74
push:
8-
branches:
9-
- main
10-
- master
11-
pull_request:
12-
branches:
13-
- main
14-
- master
15-
schedule:
16-
- cron: '0 2 * * *'
17-
18-
jobs:
19-
build:
20-
runs-on: ${{ matrix.os }}
21-
22-
services:
23-
mysql:
24-
image: mysql:5
25-
env:
26-
MYSQL_ALLOW_EMPTY_PASSWORD: true
27-
MYSQL_DATABASE: unittest
28-
ports:
29-
- 3306:3306
30-
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
5+
branches: [ master, 4.x ]
316

32-
strategy:
33-
fail-fast: false
34-
matrix:
35-
node-version: [14.17.0, 14, 16, 18]
36-
os: [ubuntu-latest]
37-
38-
steps:
39-
- name: Checkout Git Source
40-
uses: actions/checkout@v2
41-
42-
- name: Use Node.js ${{ matrix.node-version }}
43-
uses: actions/setup-node@v3
44-
with:
45-
node-version: ${{ matrix.node-version }}
46-
47-
- name: Install Dependencies
48-
run: npm i
7+
pull_request:
8+
branches: [ master, 4.x ]
499

50-
- name: Continuous Integration
51-
run: npm run ci
10+
workflow_dispatch: {}
5211

53-
- name: Code Coverage
54-
uses: codecov/codecov-action@v3
55-
with:
56-
token: ${{ secrets.CODECOV_TOKEN }}
12+
jobs:
13+
Job:
14+
name: Node.js
15+
uses: fengmk2/github-actions/.github/workflows/node-test-mysql.yml@master
16+
with:
17+
os: 'ubuntu-latest'
18+
version: '16, 18'

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,6 @@ results
1212

1313
node_modules
1414
npm-debug.log
15-
coverage/
15+
coverage
16+
lib
17+
.eslintcache

AUTHORS

Lines changed: 0 additions & 5 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,150 @@
2121
### Bug Fixes
2222

2323
* should export conn property ([#101](https://github.com/ali-sdk/ali-rds/issues/101)) ([37afa42](https://github.com/ali-sdk/ali-rds/commit/37afa420f3330cbc7a5e6e68da88086339a2a955))
24+
25+
---
26+
27+
4.0.1 / 2022-12-14
28+
==================
29+
30+
**fixes**
31+
* [[`add4669`](https://github.com/ali-sdk/ali-rds/commit/add466917422b15deddd434c25595b6f6082bb6b)] - 🐛 FIX: Export db pool stats (#95) (fengmk2 <<fengmk2@gmail.com>>)
32+
33+
4.0.0 / 2022-12-14
34+
==================
35+
36+
**features**
37+
* [[`6296b5b`](https://github.com/ali-sdk/ali-rds/commit/6296b5b1a0e08bf88097937a0b579a4c90b13a2d)] - 📦 NEW: [BREAKING] Refactor impl base on async/await (#94) (fengmk2 <<fengmk2@gmail.com>>)
38+
39+
3.4.1 / 2022-12-13
40+
==================
41+
42+
**fixes**
43+
* [[`d983478`](https://github.com/ali-sdk/ali-rds/commit/d983478d40203357c71187c94f44ef3afab0b604)] - fix: handle concurrent transaction (#85) (killa <<killa123@126.com>>)
44+
45+
**others**
46+
* [[`61e8e38`](https://github.com/ali-sdk/ali-rds/commit/61e8e38208acf4a9cc1780128063318f7f0e17ac)] - Create codeql.yml (fengmk2 <<fengmk2@gmail.com>>)
47+
48+
3.4.0 / 2020-07-16
49+
==================
50+
51+
**features**
52+
* [[`2e99ab8`](https://github.com/ali-sdk/ali-rds/commit/2e99ab8ce872b8482fe2b0a29af51a7a99aaff84)] - feat: export sqlstring method (#79) (Haoliang Gao <<sakura9515@gmail.com>>)
53+
54+
3.3.1 / 2019-04-24
55+
==================
56+
57+
**fixes**
58+
* [[`52147de`](git@github.com:ali-sdk/ali-rds/commit/52147de9d7405b02efcf84ef28a11a4097675972)] - fix: query parameters are not allowed to be included in where (#67) (Hoyt <<hoythan@gmail.com>>)
59+
60+
**others**
61+
* [[`0f9f23b`](git@github.com:ali-sdk/ali-rds/commit/0f9f23bbd935650a1440537b18aaa982a6db2d44)] - chore: remove node 4 in ci (dead-horse <<dead_horse@qq.com>>)
62+
63+
3.3.0 / 2018-12-11
64+
==================
65+
66+
**features**
67+
* [[`0d4d4ab`](https://github.com/ali-sdk/ali-rds/commit/0d4d4ab99a7cd655180f22d4d95e3cfef8c8714b)] - feat: where condition support NULL value (#60) (fengmk2 <<fengmk2@gmail.com>>)
68+
69+
3.2.0 / 2018-11-19
70+
==================
71+
72+
**features**
73+
* [[`b227bc1`](https://github.com/ali-sdk/ali-rds/commit/b227bc12e5c6252264d4761b72f915b73d53c688)] - feat: support doomed transaction scope on test cases (#58) (AngrySean <<xujihui1985@gmail.com>>)
74+
75+
3.1.0 / 2018-09-30
76+
==================
77+
78+
**features**
79+
* [[`859d818`](https://github.com/ali-sdk/ali-rds/commit/859d818d7e327d1ff590d363dfbf3135d8c90454)] - feat: update multiple rows (#55) (Hang Jiang <<jianghangscu@gmail.com>>)
80+
81+
**fixes**
82+
* [[`db6d596`](https://github.com/ali-sdk/ali-rds/commit/db6d59616f4b5083142bed554fb104c1b5a7c14e)] - fix: add default value now() of `gmt_modified` and `gmt_create` (#56) (Hang Jiang <<jianghangscu@gmail.com>>)
83+
84+
**others**
85+
* [[`db3524c`](https://github.com/ali-sdk/ali-rds/commit/db3524c8da7f8b32291695a2fc5497ea8fddd155)] - doc: add object arguments in readme (#52) (凯 方 <<fkvsssl@126.com>>)
86+
87+
3.0.1 / 2017-09-26
88+
==================
89+
90+
**fixes**
91+
* [[`5ca4489`](https://github.com/ali-sdk/ali-rds/commit/5ca4489b903923302c81a8c9c8ac94c0afbce819)] - fix: don't redefined sqlstring.escape (#39) (Yiyu He <<dead_horse@qq.com>>)
92+
93+
**others**
94+
* [[`004713c`](https://github.com/ali-sdk/ali-rds/commit/004713cf9a4aa2da84a9f02348996b1a8ec82430)] - doc: fix typo 'Can\'t not' => 'Can not' (#34) (dreamswhite <<dreamswhite@aliyun.com>>)
95+
96+
3.0.0 / 2017-04-02
97+
==================
98+
99+
* feat: promiseify (#20)
100+
101+
2.7.0 / 2017-03-31
102+
==================
103+
104+
* feat: wrap generator function to promise (#19)
105+
106+
2.6.1 / 2017-01-20
107+
==================
108+
109+
* fix: `where` with empty object (#15)
110+
111+
2.6.0 / 2016-08-09
112+
==================
113+
114+
* feat: support query(sql, object) (#12)
115+
* test: use travis ci local mysql server (#13)
116+
117+
2.5.0 / 2016-06-07
118+
==================
119+
120+
* feat: support end()
121+
122+
2.4.0 / 2016-06-07
123+
==================
124+
125+
* feat: add queryOne api (#9)
126+
127+
2.3.1 / 2016-06-02
128+
==================
129+
130+
* fix: move sql to error stack (#8)
131+
132+
2.3.0 / 2016-05-15
133+
==================
134+
135+
* feat: support transaction on one request ctx (#7)
136+
137+
2.2.0 / 2016-01-13
138+
==================
139+
140+
* deps: mysql@2.10.2
141+
142+
2.1.0 / 2015-06-08
143+
==================
144+
145+
* feat: add *beginTransactionScope(scope)
146+
* docs: require ali-rds
147+
148+
2.0.0 / 2015-06-08
149+
==================
150+
151+
* test: only test on iojs-2
152+
* feat: add count(table, where)
153+
* refactor: use const and let instead of var
154+
* feat: add Transaction
155+
* feat: support insert multi rows
156+
* break: remove fields property from result
157+
* refactor: use options params style
158+
* feat: add get(), list(), insert(), update()
159+
160+
1.1.0 / 2015-06-02
161+
==================
162+
163+
* test: improve test coverage
164+
* test: make sure name prefix is different
165+
* feat: add options.needFields, default is true
166+
167+
1.0.0 / 2015-02-25
168+
==================
169+
170+
* first release, only support MySQL

History.md

Lines changed: 0 additions & 145 deletions
This file was deleted.

0 commit comments

Comments
 (0)