rake-db 2.3.35 → 2.3.37

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/dist/index.mjs CHANGED
@@ -2,7 +2,6 @@ import { singleQuote, quote, isRaw, getRaw, toArray, raw, EnumColumn, columnType
2
2
  import path from 'path';
3
3
  import { readdir, mkdir, writeFile } from 'fs/promises';
4
4
  import prompts from 'prompts';
5
- import { pathToFileURL } from 'url';
6
5
 
7
6
  var __defProp$6 = Object.defineProperty;
8
7
  var __defProps$5 = Object.defineProperties;
@@ -238,12 +237,12 @@ const makePopulateEnumQuery = (item) => {
238
237
  };
239
238
  };
240
239
 
241
- const currentChanges = [];
240
+ let currentChanges = [];
242
241
  const change = (fn) => {
243
242
  currentChanges.push(fn);
244
243
  };
245
244
  const clearChanges = () => {
246
- currentChanges.length = 0;
245
+ currentChanges = [];
247
246
  };
248
247
  const getCurrentChanges = () => currentChanges;
249
248
 
@@ -1291,7 +1290,7 @@ const processMigration = async (db, up, file, config, options, appCodeUpdaterCac
1291
1290
  clearChanges();
1292
1291
  let changes = changeCache[file.path];
1293
1292
  if (!changes) {
1294
- await config.import(pathToFileURL(file.path).pathname);
1293
+ await config.import(file.path);
1295
1294
  changes = getCurrentChanges();
1296
1295
  changeCache[file.path] = changes;
1297
1296
  }