rbxts-transformer-commit-migrations 1.2.3 → 1.2.5
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/index.js +1 -1
- package/package.json +5 -6
- package/out/abc.js +0 -7
- package/out/macro.js +0 -21
- package/out/test.js +0 -7
package/out/index.js
CHANGED
|
@@ -8,7 +8,7 @@ export default function (_, config) {
|
|
|
8
8
|
const configPath = config?.configPath ?? CONFIG;
|
|
9
9
|
if (!existsSync(configPath)) {
|
|
10
10
|
console.error(`Invalid migration config path ${configPath}`);
|
|
11
|
-
|
|
11
|
+
return (file) => file;
|
|
12
12
|
}
|
|
13
13
|
const [entryArr, entries] = loadMigrationEntries(configPath);
|
|
14
14
|
const orderedEntries = entryArr
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rbxts-transformer-commit-migrations",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
4
|
"description": "rbxts transformer used in user data migration builder chains",
|
|
5
5
|
"main": "out/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -26,8 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"husky": "*",
|
|
29
|
-
"jiti": "*"
|
|
30
|
-
"typescript": "*"
|
|
29
|
+
"jiti": "*"
|
|
31
30
|
},
|
|
32
31
|
"files": [
|
|
33
32
|
"out",
|
|
@@ -40,10 +39,10 @@
|
|
|
40
39
|
"eslint-plugin-prettier": "^5.5.6",
|
|
41
40
|
"prettier": "^3.9.6",
|
|
42
41
|
"tsx": "^4.23.13",
|
|
43
|
-
"typescript-eslint": "^8.70.0"
|
|
44
|
-
"typescript": "^5.5.3"
|
|
42
|
+
"typescript-eslint": "^8.70.0"
|
|
45
43
|
},
|
|
46
44
|
"dependencies": {
|
|
47
|
-
"glob": "^13.0.6"
|
|
45
|
+
"glob": "^13.0.6",
|
|
46
|
+
"typescript": "~5.5.3"
|
|
48
47
|
}
|
|
49
48
|
}
|
package/out/abc.js
DELETED
package/out/macro.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import ts from "typescript";
|
|
2
|
-
import { MACRO_REGEX } from "./config.js";
|
|
3
|
-
export function findMacroCall(node) {
|
|
4
|
-
if (ts.isCallExpression(node) && ts.isIdentifier(node.expression) && MACRO_REGEX.test(node.expression.text)) {
|
|
5
|
-
return node;
|
|
6
|
-
}
|
|
7
|
-
if (ts.isCallExpression(node)) {
|
|
8
|
-
for (const arg of node.arguments) {
|
|
9
|
-
if (ts.isCallExpression(arg) && ts.isIdentifier(arg.expression) && MACRO_REGEX.test(arg.expression.text)) {
|
|
10
|
-
return arg;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
return undefined;
|
|
15
|
-
}
|
|
16
|
-
export function replaceMacroCall(node, replacement) {
|
|
17
|
-
if (ts.isCallExpression(node) && ts.isIdentifier(node.expression) && MACRO_REGEX.test(node.expression.text)) {
|
|
18
|
-
return ts.factory.createNumericLiteral(replacement);
|
|
19
|
-
}
|
|
20
|
-
return ts.visitEachChild(node, (child) => replaceMacroCall(child, replacement), undefined);
|
|
21
|
-
}
|