rake-db 2.3.19 → 2.3.21

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.21
4
+
5
+ ### Patch Changes
6
+
7
+ - Improve windows support for path resolution
8
+
9
+ ## 2.3.20
10
+
11
+ ### Patch Changes
12
+
13
+ - Fix path resolution
14
+
3
15
  ## 2.3.19
4
16
 
5
17
  ### Patch Changes
package/dist/index.js CHANGED
@@ -69,10 +69,18 @@ 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
+ if (/file:\/\/\/\w+:\//.test(file)) {
77
+ file = decodeURI(file.slice(8));
78
+ } else {
79
+ try {
80
+ file = new URL(file).pathname;
81
+ } catch (_) {
82
+ }
83
+ }
76
84
  result.basePath = path__default["default"].dirname(file);
77
85
  break;
78
86
  }