rbxts-transformer-commit-migrations 1.0.1 → 1.0.2
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/out/cli/resolveMacros.js
CHANGED
|
@@ -29,11 +29,7 @@ function walk(node, ctx) {
|
|
|
29
29
|
const entry = findEntryName(node);
|
|
30
30
|
const orderArg = node.arguments[0];
|
|
31
31
|
const order = orderArg ? ts.isNumericLiteral(orderArg) ? parseInt(orderArg.getText()) : null : 0;
|
|
32
|
-
if (order
|
|
33
|
-
console.error("Recieved null order when resolving migration macros.");
|
|
34
|
-
process.exit(1);
|
|
35
|
-
}
|
|
36
|
-
if (usedOrders.has(order)) {
|
|
32
|
+
if (order !== null && usedOrders.has(order)) {
|
|
37
33
|
console.error("Multiple of the same migration orders found. Every migration has to have a unique order.");
|
|
38
34
|
process.exit(1);
|
|
39
35
|
}
|
|
@@ -42,8 +38,10 @@ function walk(node, ctx) {
|
|
|
42
38
|
process.exit(1);
|
|
43
39
|
}
|
|
44
40
|
if (!orderArg?.getText().includes("__resolved")) {
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
45
42
|
usedOrders.add(order);
|
|
46
|
-
|
|
43
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
44
|
+
migrationData[entry] = { timestamp: Date.now(), order: order };
|
|
47
45
|
ctx.changed = true;
|
|
48
46
|
}
|
|
49
47
|
migrations.push(entry);
|
|
@@ -30,7 +30,6 @@ export default function (config) {
|
|
|
30
30
|
continue;
|
|
31
31
|
result.push(prop.name.text);
|
|
32
32
|
object[prop.name.text] = reconstructProperties(prop.initializer.properties);
|
|
33
|
-
console.log(reconstructProperties(prop.initializer.properties));
|
|
34
33
|
}
|
|
35
34
|
return [result, object];
|
|
36
35
|
}
|