Skip to content

Commit

Permalink
feat: impl with typescript (ali-sdk#103)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: drop Node.js < 16 support
  • Loading branch information
fengmk2 authored Mar 4, 2023
1 parent 6b7d240 commit 1cf7814
Show file tree
Hide file tree
Showing 23 changed files with 566 additions and 524 deletions.
5 changes: 1 addition & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"extends": "eslint-config-egg",
"parserOptions": {
"ecmaVersion": "latest"
}
"extends": "eslint-config-egg/typescript"
}
62 changes: 12 additions & 50 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,18 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI
name: CI

on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
schedule:
- cron: '0 2 * * *'

jobs:
build:
runs-on: ${{ matrix.os }}

services:
mysql:
image: mysql:5
env:
MYSQL_ALLOW_EMPTY_PASSWORD: true
MYSQL_DATABASE: unittest
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
branches: [ master, 4.x ]

strategy:
fail-fast: false
matrix:
node-version: [14.17.0, 14, 16, 18]
os: [ubuntu-latest]

steps:
- name: Checkout Git Source
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install Dependencies
run: npm i
pull_request:
branches: [ master, 4.x ]

- name: Continuous Integration
run: npm run ci
workflow_dispatch: {}

- name: Code Coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
jobs:
Job:
name: Node.js
uses: fengmk2/github-actions/.github/workflows/node-test-mysql.yml@master
with:
os: 'ubuntu-latest'
version: '16, 18'
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ results

node_modules
npm-debug.log
coverage/
coverage
lib
.eslintcache
5 changes: 0 additions & 5 deletions AUTHORS

This file was deleted.

147 changes: 147 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,150 @@
### Bug Fixes

* should export conn property ([#101](https://github.com/ali-sdk/ali-rds/issues/101)) ([37afa42](https://github.com/ali-sdk/ali-rds/commit/37afa420f3330cbc7a5e6e68da88086339a2a955))

---

4.0.1 / 2022-12-14
==================

**fixes**
* [[`add4669`](http://github.com/ali-sdk/ali-rds/commit/add466917422b15deddd434c25595b6f6082bb6b)] - 🐛 FIX: Export db pool stats (#95) (fengmk2 <<fengmk2@gmail.com>>)

4.0.0 / 2022-12-14
==================

**features**
* [[`6296b5b`](http://github.com/ali-sdk/ali-rds/commit/6296b5b1a0e08bf88097937a0b579a4c90b13a2d)] - 📦 NEW: [BREAKING] Refactor impl base on async/await (#94) (fengmk2 <<fengmk2@gmail.com>>)

3.4.1 / 2022-12-13
==================

**fixes**
* [[`d983478`](http://github.com/ali-sdk/ali-rds/commit/d983478d40203357c71187c94f44ef3afab0b604)] - fix: handle concurrent transaction (#85) (killa <<killa123@126.com>>)

**others**
* [[`61e8e38`](http://github.com/ali-sdk/ali-rds/commit/61e8e38208acf4a9cc1780128063318f7f0e17ac)] - Create codeql.yml (fengmk2 <<fengmk2@gmail.com>>)

3.4.0 / 2020-07-16
==================

**features**
* [[`2e99ab8`](http://github.com/ali-sdk/ali-rds/commit/2e99ab8ce872b8482fe2b0a29af51a7a99aaff84)] - feat: export sqlstring method (#79) (Haoliang Gao <<sakura9515@gmail.com>>)

3.3.1 / 2019-04-24
==================

**fixes**
* [[`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>>)

**others**
* [[`0f9f23b`](git@github.com:ali-sdk/ali-rds/commit/0f9f23bbd935650a1440537b18aaa982a6db2d44)] - chore: remove node 4 in ci (dead-horse <<dead_horse@qq.com>>)

3.3.0 / 2018-12-11
==================

**features**
* [[`0d4d4ab`](http://github.com/ali-sdk/ali-rds/commit/0d4d4ab99a7cd655180f22d4d95e3cfef8c8714b)] - feat: where condition support NULL value (#60) (fengmk2 <<fengmk2@gmail.com>>)

3.2.0 / 2018-11-19
==================

**features**
* [[`b227bc1`](http://github.com/ali-sdk/ali-rds/commit/b227bc12e5c6252264d4761b72f915b73d53c688)] - feat: support doomed transaction scope on test cases (#58) (AngrySean <<xujihui1985@gmail.com>>)

3.1.0 / 2018-09-30
==================

**features**
* [[`859d818`](http://github.com/ali-sdk/ali-rds/commit/859d818d7e327d1ff590d363dfbf3135d8c90454)] - feat: update multiple rows (#55) (Hang Jiang <<jianghangscu@gmail.com>>)

**fixes**
* [[`db6d596`](http://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>>)

**others**
* [[`db3524c`](http://github.com/ali-sdk/ali-rds/commit/db3524c8da7f8b32291695a2fc5497ea8fddd155)] - doc: add object arguments in readme (#52) (凯 方 <<fkvsssl@126.com>>)

3.0.1 / 2017-09-26
==================

**fixes**
* [[`5ca4489`](http://github.com/ali-sdk/ali-rds/commit/5ca4489b903923302c81a8c9c8ac94c0afbce819)] - fix: don't redefined sqlstring.escape (#39) (Yiyu He <<dead_horse@qq.com>>)

**others**
* [[`004713c`](http://github.com/ali-sdk/ali-rds/commit/004713cf9a4aa2da84a9f02348996b1a8ec82430)] - doc: fix typo 'Can\'t not' => 'Can not' (#34) (dreamswhite <<dreamswhite@aliyun.com>>)

3.0.0 / 2017-04-02
==================

* feat: promiseify (#20)

2.7.0 / 2017-03-31
==================

* feat: wrap generator function to promise (#19)

2.6.1 / 2017-01-20
==================

* fix: `where` with empty object (#15)

2.6.0 / 2016-08-09
==================

* feat: support query(sql, object) (#12)
* test: use travis ci local mysql server (#13)

2.5.0 / 2016-06-07
==================

* feat: support end()

2.4.0 / 2016-06-07
==================

* feat: add queryOne api (#9)

2.3.1 / 2016-06-02
==================

* fix: move sql to error stack (#8)

2.3.0 / 2016-05-15
==================

* feat: support transaction on one request ctx (#7)

2.2.0 / 2016-01-13
==================

* deps: mysql@2.10.2

2.1.0 / 2015-06-08
==================

* feat: add *beginTransactionScope(scope)
* docs: require ali-rds

2.0.0 / 2015-06-08
==================

* test: only test on iojs-2
* feat: add count(table, where)
* refactor: use const and let instead of var
* feat: add Transaction
* feat: support insert multi rows
* break: remove fields property from result
* refactor: use options params style
* feat: add get(), list(), insert(), update()

1.1.0 / 2015-06-02
==================

* test: improve test coverage
* test: make sure name prefix is different
* feat: add options.needFields, default is true

1.0.0 / 2015-02-25
==================

* first release, only support MySQL
145 changes: 0 additions & 145 deletions History.md

This file was deleted.

Loading

0 comments on commit 1cf7814

Please sign in to comment.