@nymphjs/driver-sqlite3 1.0.0-alpha.2 → 1.0.0-alpha.6

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,24 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.0.0-alpha.6](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.5...v1.0.0-alpha.6) (2021-10-05)
7
+
8
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
9
+
10
+ # [1.0.0-alpha.5](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.4...v1.0.0-alpha.5) (2021-09-30)
11
+
12
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
13
+
14
+ # [1.0.0-alpha.4](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.3...v1.0.0-alpha.4) (2021-09-27)
15
+
16
+ **Note:** Version bump only for package @nymphjs/driver-sqlite3
17
+
18
+ # [1.0.0-alpha.3](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.2...v1.0.0-alpha.3) (2021-09-22)
19
+
20
+ ### Features
21
+
22
+ - move to fully instance based design, no more globals ([c036220](https://github.com/sciactive/nymphjs/commit/c0362209b90a475b8b85269a829b0ec6bed4465f))
23
+
6
24
  # [1.0.0-alpha.2](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2021-09-21)
7
25
 
8
26
  ### Features
package/README.md CHANGED
@@ -12,17 +12,17 @@ npm install --save @nymphjs/driver-sqlite3
12
12
 
13
13
  ## Usage
14
14
 
15
- Supply an instance of this driver with its configuration to Nymph's init function.
15
+ Supply an instance of this driver with its configuration to Nymph's constructor.
16
16
 
17
17
  ```ts
18
- import nymph from '@nymphjs/nymph';
18
+ import { Nymph } from '@nymphjs/nymph';
19
19
  import SQLite3Driver from '@nymphjs/driver-sqlite3';
20
20
 
21
21
  const sqliteConfig = {
22
22
  filename: __dirname + '/mydatabase.db',
23
23
  };
24
24
 
25
- nymph.init({}, new SQLite3Driver(sqliteConfig));
25
+ const nymph = new Nymph({}, new SQLite3Driver(sqliteConfig));
26
26
 
27
27
  // All done. Nymph is ready to use.
28
28
  ```
@@ -1,40 +1,21 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
22
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
23
4
  };
24
5
  Object.defineProperty(exports, "__esModule", { value: true });
25
- const nymph_1 = __importStar(require("@nymphjs/nymph"));
6
+ const nymph_1 = require("@nymphjs/nymph");
26
7
  const SQLite3Driver_1 = __importDefault(require("./SQLite3Driver"));
27
8
  const sqliteConfig = {
28
9
  filename: ':memory:',
29
10
  };
30
- nymph_1.default.init({}, new SQLite3Driver_1.default(sqliteConfig));
11
+ const nymph = new nymph_1.Nymph({}, new SQLite3Driver_1.default(sqliteConfig));
31
12
  describe('SQLite3Driver', () => {
32
- if (nymph_1.default.driver.isConnected()) {
33
- nymph_1.default.driver.disconnect();
34
- nymph_1.default.driver.connect();
13
+ if (nymph.driver.isConnected()) {
14
+ nymph.driver.disconnect();
15
+ nymph.driver.connect();
35
16
  }
36
- (0, nymph_1.QueriesTest)(it);
37
- (0, nymph_1.UIDTest)(it);
38
- (0, nymph_1.ExportImportTest)(it);
17
+ (0, nymph_1.QueriesTest)(nymph, it);
18
+ (0, nymph_1.UIDTest)(nymph, it);
19
+ (0, nymph_1.ExportImportTest)(nymph, it);
39
20
  });
40
21
  //# sourceMappingURL=SQLite3Driver.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SQLite3Driver.test.js","sourceRoot":"","sources":["../src/SQLite3Driver.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,wDAA+E;AAE/E,oEAA4C;AAE5C,MAAM,YAAY,GAAG;IAEnB,QAAQ,EAAE,UAAU;CACrB,CAAC;AAEF,eAAK,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,uBAAa,CAAC,YAAY,CAAC,CAAC,CAAC;AAEhD,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,IAAI,eAAK,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE;QAC9B,eAAK,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;QAC1B,eAAK,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;KACxB;IACD,IAAA,mBAAW,EAAC,EAAE,CAAC,CAAC;IAChB,IAAA,eAAO,EAAC,EAAE,CAAC,CAAC;IACZ,IAAA,wBAAgB,EAAC,EAAE,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"SQLite3Driver.test.js","sourceRoot":"","sources":["../src/SQLite3Driver.test.ts"],"names":[],"mappings":";;;;;AAAA,0CAA+E;AAE/E,oEAA4C;AAE5C,MAAM,YAAY,GAAG;IAEnB,QAAQ,EAAE,UAAU;CACrB,CAAC;AAEF,MAAM,KAAK,GAAG,IAAI,aAAK,CAAC,EAAE,EAAE,IAAI,uBAAa,CAAC,YAAY,CAAC,CAAC,CAAC;AAE7D,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,IAAI,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE;QAC9B,KAAK,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;QAC1B,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;KACxB;IACD,IAAA,mBAAW,EAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACvB,IAAA,eAAO,EAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACnB,IAAA,wBAAgB,EAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nymphjs/driver-sqlite3",
3
- "version": "1.0.0-alpha.2",
3
+ "version": "1.0.0-alpha.6",
4
4
  "description": "NymphJS - SQLite3 DB Driver",
5
5
  "type": "commonjs",
6
6
  "main": "dist/index.js",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "license": "Apache-2.0",
33
33
  "dependencies": {
34
- "@nymphjs/nymph": "^1.0.0-alpha.2",
34
+ "@nymphjs/nymph": "^1.0.0-alpha.6",
35
35
  "better-sqlite3": "^7.4.3",
36
36
  "nanoid": "^3.1.25"
37
37
  },
@@ -43,5 +43,5 @@
43
43
  "ts-jest": "^27.0.5",
44
44
  "typescript": "^4.3.5"
45
45
  },
46
- "gitHead": "9596354bffaa484f3002f3063f0963f6261040be"
46
+ "gitHead": "81b3a610d047aee69e74a9f61fa37a158df3cd8b"
47
47
  }
@@ -1,4 +1,4 @@
1
- import nymph, { QueriesTest, UIDTest, ExportImportTest } from '@nymphjs/nymph';
1
+ import { Nymph, QueriesTest, UIDTest, ExportImportTest } from '@nymphjs/nymph';
2
2
 
3
3
  import SQLite3Driver from './SQLite3Driver';
4
4
 
@@ -7,14 +7,14 @@ const sqliteConfig = {
7
7
  filename: ':memory:',
8
8
  };
9
9
 
10
- nymph.init({}, new SQLite3Driver(sqliteConfig));
10
+ const nymph = new Nymph({}, new SQLite3Driver(sqliteConfig));
11
11
 
12
12
  describe('SQLite3Driver', () => {
13
13
  if (nymph.driver.isConnected()) {
14
14
  nymph.driver.disconnect();
15
15
  nymph.driver.connect();
16
16
  }
17
- QueriesTest(it);
18
- UIDTest(it);
19
- ExportImportTest(it);
17
+ QueriesTest(nymph, it);
18
+ UIDTest(nymph, it);
19
+ ExportImportTest(nymph, it);
20
20
  });