isaacscript 3.2.1 → 3.2.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/package.json
CHANGED
|
@@ -36,10 +36,17 @@ information about using TypeScript, see the website: https://isaacscript.github.
|
|
|
36
36
|
--]]
|
|
37
37
|
|
|
38
38
|
`;
|
|
39
|
+
const LUA_LANGUAGE_SERVER_DISABLES = `
|
|
40
|
+
---@diagnostic disable: deprecated
|
|
41
|
+
---@diagnostic disable: lowercase-global
|
|
42
|
+
`
|
|
43
|
+
.trim()
|
|
44
|
+
.concat("\n\n");
|
|
39
45
|
const plugin = {
|
|
40
46
|
beforeEmit(_program, _options, _emitHost, result) {
|
|
41
47
|
for (const file of result) {
|
|
42
|
-
file.code =
|
|
48
|
+
file.code =
|
|
49
|
+
INFORMATIONAL_HEADER + LUA_LANGUAGE_SERVER_DISABLES + file.code;
|
|
43
50
|
}
|
|
44
51
|
},
|
|
45
52
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addIsaacScriptCommentHeaderCommon.js","sourceRoot":"","sources":["../../../../../packages/isaacscript-cli/src/plugins/addIsaacScriptCommentHeaderCommon.ts"],"names":[],"mappings":";AAAA,mFAAmF;;;AAEnF,+CAAyB;AACzB,mDAA6B;AAI7B,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;AAC1B,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;AACvD,MAAM,mBAAmB,GAAG,EAAE,CAAC,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;AACrE,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAA4B,CAAC;AAE/E,MAAM,oBAAoB,GAAG;;qBAER,WAAW,CAAC,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;CAyB1C,CAAC;AAEF,MAAM,MAAM,GAAgB;IAC1B,UAAU,CACR,QAAoB,EACpB,QAA8B,EAC9B,SAAwB,EACxB,MAAuB;QAEvB,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE;YACzB,IAAI,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"addIsaacScriptCommentHeaderCommon.js","sourceRoot":"","sources":["../../../../../packages/isaacscript-cli/src/plugins/addIsaacScriptCommentHeaderCommon.ts"],"names":[],"mappings":";AAAA,mFAAmF;;;AAEnF,+CAAyB;AACzB,mDAA6B;AAI7B,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;AAC1B,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;AACvD,MAAM,mBAAmB,GAAG,EAAE,CAAC,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;AACrE,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAA4B,CAAC;AAE/E,MAAM,oBAAoB,GAAG;;qBAER,WAAW,CAAC,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;CAyB1C,CAAC;AAEF,MAAM,4BAA4B,GAAG;;;CAGpC;KACE,IAAI,EAAE;KACN,MAAM,CAAC,MAAM,CAAC,CAAC;AAElB,MAAM,MAAM,GAAgB;IAC1B,UAAU,CACR,QAAoB,EACpB,QAA8B,EAC9B,SAAwB,EACxB,MAAuB;QAEvB,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE;YACzB,IAAI,CAAC,IAAI;gBACP,oBAAoB,GAAG,4BAA4B,GAAG,IAAI,CAAC,IAAI,CAAC;SACnE;IACH,CAAC;CACF,CAAC;AAEF,uBAAuB;AACvB,kBAAe,MAAM,CAAC"}
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
* enum Foo {
|
|
32
32
|
* Value1,
|
|
33
33
|
* }
|
|
34
|
+
*
|
|
34
35
|
* enum Foo {
|
|
35
36
|
* Value2,
|
|
36
37
|
* }
|
|
@@ -51,11 +52,18 @@ const plugin = {
|
|
|
51
52
|
// Get the first element, which will be equal to something like:
|
|
52
53
|
//
|
|
53
54
|
// ```lua
|
|
55
|
+
// local Foo = Foo or ({})
|
|
56
|
+
// ```
|
|
57
|
+
//
|
|
58
|
+
// Or, if exported:
|
|
59
|
+
//
|
|
60
|
+
// ```lua
|
|
54
61
|
// local ____exports.Foo = Foo or ({})
|
|
55
62
|
// ```
|
|
56
63
|
const oldDeclaration = statements[0];
|
|
57
64
|
if (oldDeclaration !== undefined &&
|
|
58
|
-
tstl.isAssignmentStatement(oldDeclaration)
|
|
65
|
+
(tstl.isAssignmentStatement(oldDeclaration) ||
|
|
66
|
+
tstl.isVariableDeclarationStatement(oldDeclaration))) {
|
|
59
67
|
// Replace the right side of the assignment with a blank Lua table, e.g.
|
|
60
68
|
//
|
|
61
69
|
// ```lua
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"noExtendedEnums.js","sourceRoot":"","sources":["../../../../../packages/isaacscript-cli/src/plugins/noExtendedEnums.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"noExtendedEnums.js","sourceRoot":"","sources":["../../../../../packages/isaacscript-cli/src/plugins/noExtendedEnums.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;;;AAEH,uDAAiC;AACjC,gEAA0C;AAE1C,MAAM,MAAM,GAAgB;IAC1B,QAAQ,EAAE;QACR,CAAC,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;YACjD,kDAAkD;YAClD,MAAM,UAAU,GAAG,OAAO,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;YAE1D,gEAAgE;YAChE,EAAE;YACF,SAAS;YACT,0BAA0B;YAC1B,MAAM;YACN,EAAE;YACF,mBAAmB;YACnB,EAAE;YACF,SAAS;YACT,sCAAsC;YACtC,MAAM;YACN,MAAM,cAAc,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;YACrC,IACE,cAAc,KAAK,SAAS;gBAC5B,CAAC,IAAI,CAAC,qBAAqB,CAAC,cAAc,CAAC;oBACzC,IAAI,CAAC,8BAA8B,CAAC,cAAc,CAAC,CAAC,EACtD;gBACA,wEAAwE;gBACxE,EAAE;gBACF,SAAS;gBACT,6BAA6B;gBAC7B,MAAM;gBACN,MAAM,UAAU,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC;gBAChD,cAAc,CAAC,KAAK,GAAG,CAAC,UAAU,CAAC,CAAC;aACrC;YAED,OAAO,UAAU,CAAC;QACpB,CAAC;KACF;CACF,CAAC;AAEF,uBAAuB;AACvB,kBAAe,MAAM,CAAC"}
|