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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # rake-db
2
2
 
3
+ ## 2.3.20
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix path resolution
8
+
9
+ ## 2.3.19
10
+
11
+ ### Patch Changes
12
+
13
+ - Fix path resolution
14
+
3
15
  ## 2.3.18
4
16
 
5
17
  ### Patch Changes
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
- const file = item.getFileName();
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).toString());
1248
+ await config.import(url.pathToFileURL(file.path).pathname);
1245
1249
  changeCache[file.path] = getCurrentChangeCallback();
1246
1250
  }
1247
1251
  await getCurrentPromise();