rake-db 2.3.4 → 2.3.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 +16 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +20 -2
- package/dist/index.js.map +1 -1
- package/dist/{index.esm.js → index.mjs} +3 -3
- package/dist/index.mjs.map +1 -0
- package/package.json +4 -4
- package/src/commands/migrateOrRollback.ts +1 -1
- package/src/common.ts +2 -2
- package/dist/index.esm.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# rake-db
|
|
2
2
|
|
|
3
|
+
## 2.3.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Improve esm support
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- pqb@0.9.4
|
|
10
|
+
|
|
11
|
+
## 2.3.5
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Change package.json exports for esm support
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
- pqb@0.9.3
|
|
18
|
+
|
|
3
19
|
## 2.3.4
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -185,7 +185,7 @@ declare namespace RakeDbAst {
|
|
|
185
185
|
declare type RakeDbConfig = {
|
|
186
186
|
migrationsPath: string;
|
|
187
187
|
migrationsTable: string;
|
|
188
|
-
requireTs(path: string): void
|
|
188
|
+
requireTs(path: string): Promise<void>;
|
|
189
189
|
noPrimaryKey?: NoPrimaryKeyOption;
|
|
190
190
|
appCodeUpdater?: AppCodeUpdater;
|
|
191
191
|
useCodeUpdater?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -9,6 +9,24 @@ var promises = require('fs/promises');
|
|
|
9
9
|
|
|
10
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
11
|
|
|
12
|
+
function _interopNamespace(e) {
|
|
13
|
+
if (e && e.__esModule) return e;
|
|
14
|
+
var n = Object.create(null);
|
|
15
|
+
if (e) {
|
|
16
|
+
Object.keys(e).forEach(function (k) {
|
|
17
|
+
if (k !== 'default') {
|
|
18
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
19
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return e[k]; }
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
n["default"] = e;
|
|
27
|
+
return Object.freeze(n);
|
|
28
|
+
}
|
|
29
|
+
|
|
12
30
|
var Enquirer__default = /*#__PURE__*/_interopDefaultLegacy(Enquirer);
|
|
13
31
|
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
|
|
14
32
|
|
|
@@ -34,7 +52,7 @@ var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
|
34
52
|
const migrationConfigDefaults = {
|
|
35
53
|
migrationsPath: path__default["default"].resolve("src", "migrations"),
|
|
36
54
|
migrationsTable: "schemaMigrations",
|
|
37
|
-
requireTs: require,
|
|
55
|
+
requireTs: (path2) => (function (t) { return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(t)); }); })(path2),
|
|
38
56
|
log: true,
|
|
39
57
|
logger: console,
|
|
40
58
|
useCodeUpdater: true
|
|
@@ -1156,7 +1174,7 @@ const processMigration = async (db, up, file, config, options, appCodeUpdaterCac
|
|
|
1156
1174
|
if (callback) {
|
|
1157
1175
|
change(callback);
|
|
1158
1176
|
} else {
|
|
1159
|
-
config.requireTs(file.path);
|
|
1177
|
+
await config.requireTs(file.path);
|
|
1160
1178
|
changeCache[file.path] = getCurrentChangeCallback();
|
|
1161
1179
|
}
|
|
1162
1180
|
await getCurrentPromise();
|