-
Notifications
You must be signed in to change notification settings - Fork 7
/
js-to-lua.config.js
51 lines (49 loc) · 1.69 KB
/
js-to-lua.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
module.exports = {
lastSync: {
ref: "63e506b5d1558a9132a8fa65151407b0a40be3a5",
conversionToolVersion: "ee85735b8dcec492526c85830d5d9fc6fc42f2a0"
},
upstream: {
owner: "facebook",
repo: "jest",
primaryBranch: "main"
},
downstream: {
owner: "roblox",
repo: "jest-roblox-internal",
primaryBranch: "master",
patterns: [
"src/**/*.lua"
]
},
renameFiles: [
[
(filename) => filename.includes("output/packages/"),
(filename) => filename.replace("output/packages/", "output/src/")
],
[
(filename) => filename.endsWith(".test.lua"),
(filename) => filename.replace(".test.lua", ".spec.lua")
],
[
(filename) => filename.endsWith(".test.ts.lua"),
(filename) => filename.replace(".test.ts.lua", ".spec.snap.lua")
],
[
(filename) => filename.endsWith(".ts.lua") && !filename.endsWith(".test.ts.lua"),
(filename) => filename.replace(".ts.lua", ".spec.snap.lua")
],
[
(filename) => filename.endsWith("index.lua") && !filename.endsWith("jest-globals/src/index.lua"),
(filename) => filename.replace("index.lua", "init.lua")
],
[
(filename) => filename.endsWith(".snap.lua") && !filename.endsWith(".spec.snap.lua"),
(filename) => filename.replace(".snap.lua", ".spec.snap.lua")
],
[
(filename) => filename.endsWith("init.spec.lua") || filename.endsWith("init.spec.snap.lua"),
(filename) => filename.replace("/init.spec", "/index.spec")
],
]
}