rake-db 2.3.18 → 2.3.20
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 +12 -0
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/commands/migrateOrRollback.test.ts +3 -3
- package/src/commands/migrateOrRollback.ts +1 -1
- package/src/common.ts +8 -1
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -69,10 +69,14 @@ const processRakeDbConfig = (config) => {
|
|
|
69
69
|
if (stack) {
|
|
70
70
|
const thisFile = (_a = stack[0]) == null ? void 0 : _a.getFileName();
|
|
71
71
|
for (const item of stack) {
|
|
72
|
-
|
|
72
|
+
let file = item.getFileName();
|
|
73
73
|
if (!file || file === thisFile || /\bnode_modules\b/.test(file)) {
|
|
74
74
|
continue;
|
|
75
75
|
}
|
|
76
|
+
try {
|
|
77
|
+
file = new URL(file).pathname;
|
|
78
|
+
} catch (_) {
|
|
79
|
+
}
|
|
76
80
|
result.basePath = path__default["default"].dirname(file);
|
|
77
81
|
break;
|
|
78
82
|
}
|
|
@@ -1241,7 +1245,7 @@ const processMigration = async (db, up, file, config, options, appCodeUpdaterCac
|
|
|
1241
1245
|
if (callback) {
|
|
1242
1246
|
change(callback);
|
|
1243
1247
|
} else {
|
|
1244
|
-
await config.import(url.pathToFileURL(file.path).
|
|
1248
|
+
await config.import(url.pathToFileURL(file.path).pathname);
|
|
1245
1249
|
changeCache[file.path] = getCurrentChangeCallback();
|
|
1246
1250
|
}
|
|
1247
1251
|
await getCurrentPromise();
|