w-orm-reladb 1.0.42 → 1.0.44

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.
@@ -9,12 +9,12 @@ jobs:
9
9
 
10
10
  strategy:
11
11
  matrix:
12
- node-version: [20.x]
12
+ node-version: [24.x]
13
13
 
14
14
  steps:
15
- - uses: actions/checkout@v2
15
+ - uses: actions/checkout@v4
16
16
  - name: Use Node.js ${{ matrix.node-version }}
17
- uses: actions/setup-node@v1
17
+ uses: actions/setup-node@v4
18
18
  with:
19
19
  node-version: ${{ matrix.node-version }}
20
20
  - run: npm cache clean -f
@@ -0,0 +1,52 @@
1
+ name: test
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+
13
+ services:
14
+ mssql:
15
+ image: mcr.microsoft.com/mssql/server:2022-latest
16
+ env:
17
+ ACCEPT_EULA: Y
18
+ MSSQL_SA_PASSWORD: Worm#Mssql2026
19
+ ports:
20
+ - 1433:1433
21
+
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+
25
+ - uses: actions/setup-node@v4
26
+ with:
27
+ node-version: 20
28
+ cache: npm
29
+
30
+ - name: Install dependencies
31
+ run: npm ci
32
+
33
+ - name: Wait for MSSQL ready
34
+ run: |
35
+ for i in $(seq 1 30); do
36
+ if docker exec ${{ job.services.mssql.id }} /opt/mssql-tools18/bin/sqlcmd -C -S localhost -U sa -P 'Worm#Mssql2026' -b -Q "SELECT 1" >/dev/null 2>&1; then
37
+ echo "mssql ready"
38
+ exit 0
39
+ fi
40
+ sleep 3
41
+ done
42
+ echo "mssql not ready in time"
43
+ exit 1
44
+
45
+ - name: Provision worm database and login
46
+ run: |
47
+ docker exec ${{ job.services.mssql.id }} /opt/mssql-tools18/bin/sqlcmd -C -S localhost -U sa -P 'Worm#Mssql2026' -b -Q "CREATE DATABASE worm;"
48
+ docker exec ${{ job.services.mssql.id }} /opt/mssql-tools18/bin/sqlcmd -C -S localhost -U sa -P 'Worm#Mssql2026' -b -Q "CREATE LOGIN username WITH PASSWORD='password', CHECK_POLICY=OFF, CHECK_EXPIRATION=OFF, DEFAULT_DATABASE=worm;"
49
+ docker exec ${{ job.services.mssql.id }} /opt/mssql-tools18/bin/sqlcmd -C -S localhost -U sa -P 'Worm#Mssql2026' -b -d worm -Q "CREATE USER username FOR LOGIN username; ALTER ROLE db_owner ADD MEMBER username;"
50
+
51
+ - name: Run tests
52
+ run: npm test
package/README.md CHANGED
@@ -4,7 +4,6 @@ An operator for relational database in nodejs.
4
4
  ![language](https://img.shields.io/badge/language-JavaScript-orange.svg)
5
5
  [![npm version](http://img.shields.io/npm/v/w-orm-reladb.svg?style=flat)](https://npmjs.org/package/w-orm-reladb)
6
6
  [![license](https://img.shields.io/npm/l/w-orm-reladb.svg?style=flat)](https://npmjs.org/package/w-orm-reladb)
7
- [![gzip file size](http://img.badgesize.io/yuda-lyu/w-orm-reladb/master/dist/w-orm-reladb.umd.js.svg?compression=gzip)](https://github.com/yuda-lyu/w-orm-reladb)
8
7
  [![npm download](https://img.shields.io/npm/dt/w-orm-reladb.svg)](https://npmjs.org/package/w-orm-reladb)
9
8
  [![npm download](https://img.shields.io/npm/dm/w-orm-reladb.svg)](https://npmjs.org/package/w-orm-reladb)
10
9
  [![jsdelivr download](https://img.shields.io/jsdelivr/npm/hm/w-orm-reladb.svg)](https://www.jsdelivr.com/package/npm/w-orm-reladb)
@@ -20,8 +19,8 @@ To view documentation or get support, visit [docs](https://yuda-lyu.github.io/w-
20
19
  >4. Install `@journeyapps/sqlcipher` second, use command to install: `npm i @journeyapps/sqlcipher`.
21
20
 
22
21
  ## Installation
22
+
23
23
  ### Using npm(ES6 module):
24
- > **Note:** `w-orm-reladb` is mainly dependent on `sequelize`, `mssql`, `sqlite3` and `w-auto-sequelize`.
25
24
 
26
25
  > **Note:** `@journeyapps/sqlcipher` is not compiled into the *.umd file by default, and it is not tied to the dependents for general use in package.json.
27
26
 
@@ -735,7 +734,7 @@ async function test() {
735
734
  // })
736
735
 
737
736
 
738
- //createStorage, create table for mssql
737
+ //createStorage, create table for sqlite
739
738
  await w.createStorage()
740
739
  console.log('createStorage')
741
740
 
@@ -931,7 +930,7 @@ async function testCommit() {
931
930
  let w = wo(opt)
932
931
 
933
932
 
934
- //createStorage, create table for mssql
933
+ //createStorage, create table for sqlite
935
934
  await w.createStorage()
936
935
  console.log('createStorage')
937
936
 
@@ -1155,7 +1154,7 @@ async function testRollback() {
1155
1154
  let w = wo(opt)
1156
1155
 
1157
1156
 
1158
- //createStorage, create table for mssql
1157
+ //createStorage, create table for sqlite
1159
1158
  await w.createStorage()
1160
1159
  console.log('createStorage')
1161
1160
 
@@ -1393,7 +1392,7 @@ async function test() {
1393
1392
  // })
1394
1393
 
1395
1394
 
1396
- //createStorage, create table for mssql
1395
+ //createStorage, create table for sqlite
1397
1396
  await w.createStorage()
1398
1397
  console.log('createStorage')
1399
1398
 
package/babel.config.js CHANGED
@@ -7,9 +7,10 @@ module.exports = {
7
7
  ],
8
8
  'plugins': [
9
9
  '@babel/plugin-transform-runtime',
10
- '@babel/plugin-syntax-import-assertions',
11
10
  '@babel/plugin-proposal-export-default-from',
12
- '@babel/plugin-proposal-nullish-coalescing-operator',
13
- '@babel/plugin-proposal-optional-chaining'
11
+ // '@babel/plugin-syntax-import-assertions', //已被棄用
12
+ // '@babel/plugin-proposal-nullish-coalescing-operator', //browser與nodejs已支援
13
+ // '@babel/plugin-proposal-object-rest-spread', //browser與nodejs已支援
14
+ // '@babel/plugin-proposal-optional-chaining', //browser與nodejs已支援
14
15
  ]
15
16
  }