leoric 2.2.0 → 2.2.1

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/History.md CHANGED
@@ -1,3 +1,12 @@
1
+ 2.2.1 / 2022-02-24
2
+ ==================
3
+
4
+ ## What's Changed
5
+ * fix: realm.DataTypes should be invokable by @cyjake in https://github.com/cyjake/leoric/pull/282
6
+
7
+
8
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v2.2.0...v2.2.1
9
+
1
10
  2.2.0 / 2022-02-24
2
11
  ==================
3
12
 
package/index.js CHANGED
@@ -36,7 +36,7 @@ const connect = async function connect(opts) {
36
36
  return realm;
37
37
  };
38
38
 
39
- Object.assign(Realm.prototype, migrations);
39
+ Object.assign(Realm.prototype, migrations, { DataTypes });
40
40
  Object.assign(Realm, {
41
41
  connect,
42
42
  Bone,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "leoric",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "JavaScript Object-relational mapping alchemy",
5
5
  "main": "index.js",
6
6
  "types": "types/index.d.ts",
package/src/realm.js CHANGED
@@ -129,11 +129,6 @@ class Realm {
129
129
  this.options = Spine.options = options;
130
130
  }
131
131
 
132
- get DataTypes() {
133
- if (!this.driver) throw new Error('database not connected yet');
134
- return this.driver.DataTypes;
135
- }
136
-
137
132
  define(name, attributes, opts = {}, descriptors = {}) {
138
133
  const Model = class extends this.Bone {
139
134
  static name = name;