rbxts-transformer-commit-migrations 1.2.4 → 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 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
- process.exit(1);
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.4",
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",
package/out/abc.js DELETED
@@ -1,7 +0,0 @@
1
- import { $migrate } from "../index.js";
2
- function test(b) {
3
- return 0;
4
- }
5
- export const abc = {
6
- hello: { abc: test($migrate(0)) }
7
- };
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
- }
package/out/test.js DELETED
@@ -1,7 +0,0 @@
1
- import { $migrate } from "../index.js";
2
- function test(a) {
3
- return 0;
4
- }
5
- const abc = {
6
- test: { bruh: test($migrate(0)) }
7
- };