@markw65/monkeyc-optimizer 1.1.71 → 1.1.73
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/CHANGELOG.md +13 -0
- package/build/api.cjs +37 -37
- package/build/{chunk-DI3VCMXL.cjs → chunk-XNAPUWVE.cjs} +61 -42
- package/build/optimizer.cjs +18 -18
- package/build/sdk-util.cjs +14 -14
- package/build/worker-thread.cjs +3 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to the "monkeyc-optimizer" package will be documented in this file.
|
|
4
4
|
|
|
5
|
+
### 1.1.73
|
|
6
|
+
|
|
7
|
+
- Fix an issue formatting body-less class/module/program nodes.
|
|
8
|
+
|
|
9
|
+
### 1.1.72
|
|
10
|
+
|
|
11
|
+
- Update to [@markw65/prettier-plugin-monkeyc@1.0.59](https://github.com/markw65/prettier-plugin-monkeyc/blob/main/CHANGELOG.md#1059)
|
|
12
|
+
|
|
13
|
+
- Ignore `resolveType` field in serializeMonkeyC to avoid errors due to cycles.
|
|
14
|
+
|
|
15
|
+
- Make `evaluate` skip everything except the `body` when processing class, module or function declarations.
|
|
16
|
+
- Always fully evaluate expressions in enum initializers.
|
|
17
|
+
|
|
5
18
|
### 1.1.71
|
|
6
19
|
|
|
7
20
|
- Fix various import paths so that .d.ts files work
|
package/build/api.cjs
CHANGED
|
@@ -18,50 +18,50 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var api_exports = {};
|
|
20
20
|
__export(api_exports, {
|
|
21
|
-
checkCompilerVersion: () =>
|
|
22
|
-
collectNamespaces: () =>
|
|
23
|
-
createDocumentationMap: () =>
|
|
24
|
-
diagnostic: () =>
|
|
25
|
-
diagnosticHelper: () =>
|
|
26
|
-
findNamesInScope: () =>
|
|
27
|
-
findUsingForNode: () =>
|
|
28
|
-
formatAst: () =>
|
|
29
|
-
formatAstLongLines: () =>
|
|
30
|
-
formatScopedName: () =>
|
|
31
|
-
getApiFunctionInfo: () =>
|
|
32
|
-
getApiMapping: () =>
|
|
33
|
-
getSuperClasses: () =>
|
|
34
|
-
handleImportUsing: () =>
|
|
21
|
+
checkCompilerVersion: () => import_chunk_XNAPUWVE.checkCompilerVersion,
|
|
22
|
+
collectNamespaces: () => import_chunk_XNAPUWVE.collectNamespaces,
|
|
23
|
+
createDocumentationMap: () => import_chunk_XNAPUWVE.createDocumentationMap,
|
|
24
|
+
diagnostic: () => import_chunk_XNAPUWVE.diagnostic,
|
|
25
|
+
diagnosticHelper: () => import_chunk_XNAPUWVE.diagnosticHelper,
|
|
26
|
+
findNamesInScope: () => import_chunk_XNAPUWVE.findNamesInScope,
|
|
27
|
+
findUsingForNode: () => import_chunk_XNAPUWVE.findUsingForNode,
|
|
28
|
+
formatAst: () => import_chunk_XNAPUWVE.formatAst,
|
|
29
|
+
formatAstLongLines: () => import_chunk_XNAPUWVE.formatAstLongLines,
|
|
30
|
+
formatScopedName: () => import_chunk_XNAPUWVE.formatScopedName,
|
|
31
|
+
getApiFunctionInfo: () => import_chunk_XNAPUWVE.getApiFunctionInfo,
|
|
32
|
+
getApiMapping: () => import_chunk_XNAPUWVE.getApiMapping,
|
|
33
|
+
getSuperClasses: () => import_chunk_XNAPUWVE.getSuperClasses,
|
|
34
|
+
handleImportUsing: () => import_chunk_XNAPUWVE.handleImportUsing,
|
|
35
35
|
hasProperty: () => import_chunk_JDC43A3I.hasProperty,
|
|
36
|
-
isClassVariable: () =>
|
|
37
|
-
isLocal: () =>
|
|
38
|
-
isLookupCandidate: () =>
|
|
39
|
-
isStateNode: () =>
|
|
40
|
-
lookupByFullName: () =>
|
|
41
|
-
lookupNext: () =>
|
|
42
|
-
lookupResultContains: () =>
|
|
43
|
-
lookupWithType: () =>
|
|
44
|
-
makeToyboxLink: () =>
|
|
45
|
-
mapVarDeclsByType: () =>
|
|
46
|
-
markInvokeClassMethod: () =>
|
|
47
|
-
parseSdkVersion: () =>
|
|
48
|
-
popRootNode: () =>
|
|
49
|
-
pushRootNode: () =>
|
|
50
|
-
resolveDiagnostics: () =>
|
|
51
|
-
resolveDiagnosticsMap: () =>
|
|
52
|
-
sameLookupResult: () =>
|
|
36
|
+
isClassVariable: () => import_chunk_XNAPUWVE.isClassVariable,
|
|
37
|
+
isLocal: () => import_chunk_XNAPUWVE.isLocal,
|
|
38
|
+
isLookupCandidate: () => import_chunk_XNAPUWVE.isLookupCandidate,
|
|
39
|
+
isStateNode: () => import_chunk_XNAPUWVE.isStateNode,
|
|
40
|
+
lookupByFullName: () => import_chunk_XNAPUWVE.lookupByFullName,
|
|
41
|
+
lookupNext: () => import_chunk_XNAPUWVE.lookupNext,
|
|
42
|
+
lookupResultContains: () => import_chunk_XNAPUWVE.lookupResultContains,
|
|
43
|
+
lookupWithType: () => import_chunk_XNAPUWVE.lookupWithType,
|
|
44
|
+
makeToyboxLink: () => import_chunk_XNAPUWVE.makeToyboxLink,
|
|
45
|
+
mapVarDeclsByType: () => import_chunk_XNAPUWVE.mapVarDeclsByType,
|
|
46
|
+
markInvokeClassMethod: () => import_chunk_XNAPUWVE.markInvokeClassMethod,
|
|
47
|
+
parseSdkVersion: () => import_chunk_XNAPUWVE.parseSdkVersion,
|
|
48
|
+
popRootNode: () => import_chunk_XNAPUWVE.popRootNode,
|
|
49
|
+
pushRootNode: () => import_chunk_XNAPUWVE.pushRootNode,
|
|
50
|
+
resolveDiagnostics: () => import_chunk_XNAPUWVE.resolveDiagnostics,
|
|
51
|
+
resolveDiagnosticsMap: () => import_chunk_XNAPUWVE.resolveDiagnosticsMap,
|
|
52
|
+
sameLookupResult: () => import_chunk_XNAPUWVE.sameLookupResult,
|
|
53
53
|
traverseAst: () => import_chunk_JDC43A3I.traverseAst,
|
|
54
|
-
variableDeclarationName: () =>
|
|
55
|
-
visitReferences: () =>
|
|
56
|
-
visit_resources: () =>
|
|
57
|
-
visitorNode: () =>
|
|
54
|
+
variableDeclarationName: () => import_chunk_XNAPUWVE.variableDeclarationName,
|
|
55
|
+
visitReferences: () => import_chunk_XNAPUWVE.visitReferences,
|
|
56
|
+
visit_resources: () => import_chunk_XNAPUWVE.visit_resources,
|
|
57
|
+
visitorNode: () => import_chunk_XNAPUWVE.visitorNode
|
|
58
58
|
});
|
|
59
59
|
module.exports = __toCommonJS(api_exports);
|
|
60
|
-
var
|
|
60
|
+
var import_chunk_XNAPUWVE = require("./chunk-XNAPUWVE.cjs");
|
|
61
61
|
var import_chunk_NHZRKHZO = require("./chunk-NHZRKHZO.cjs");
|
|
62
62
|
var import_chunk_JDC43A3I = require("./chunk-JDC43A3I.cjs");
|
|
63
63
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
64
|
-
(0,
|
|
64
|
+
(0, import_chunk_XNAPUWVE.init_api)();
|
|
65
65
|
// Annotate the CommonJS export names for ESM import in node:
|
|
66
66
|
0 && (module.exports = {
|
|
67
67
|
checkCompilerVersion,
|
|
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_XNAPUWVE_exports = {};
|
|
30
|
+
__export(chunk_XNAPUWVE_exports, {
|
|
31
31
|
EnumTagsConst: () => EnumTagsConst,
|
|
32
32
|
LastTypeTag: () => LastTypeTag,
|
|
33
33
|
ObjectLikeTagsConst: () => ObjectLikeTagsConst,
|
|
@@ -138,7 +138,7 @@ __export(chunk_DI3VCMXL_exports, {
|
|
|
138
138
|
visitorNode: () => visitorNode,
|
|
139
139
|
xml_util_exports: () => xml_util_exports
|
|
140
140
|
});
|
|
141
|
-
module.exports = __toCommonJS(
|
|
141
|
+
module.exports = __toCommonJS(chunk_XNAPUWVE_exports);
|
|
142
142
|
var import_chunk_NHZRKHZO = require("./chunk-NHZRKHZO.cjs");
|
|
143
143
|
var import_chunk_JDC43A3I = require("./chunk-JDC43A3I.cjs");
|
|
144
144
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
@@ -10374,7 +10374,7 @@ function evaluate(istate, root) {
|
|
|
10374
10374
|
case "ClassDeclaration":
|
|
10375
10375
|
if (node !== root)
|
|
10376
10376
|
return false;
|
|
10377
|
-
|
|
10377
|
+
return ["body"];
|
|
10378
10378
|
case "AssignmentExpression":
|
|
10379
10379
|
skipNode = node.left;
|
|
10380
10380
|
break;
|
|
@@ -11431,26 +11431,6 @@ function relaxType(type) {
|
|
|
11431
11431
|
unionInto(relaxed, type);
|
|
11432
11432
|
return relaxed;
|
|
11433
11433
|
}
|
|
11434
|
-
function resolveEnum(e) {
|
|
11435
|
-
if (e.resolvedType)
|
|
11436
|
-
return e.resolvedType;
|
|
11437
|
-
return e.resolvedType = e.node.body.members.reduce(
|
|
11438
|
-
(result, next) => {
|
|
11439
|
-
unionInto(
|
|
11440
|
-
result,
|
|
11441
|
-
next.type === "EnumStringMember" && next.init?.type === "Literal" ? typeFromLiteral(next.init) : {
|
|
11442
|
-
type: next.type === "EnumStringMember" && next.init ? EnumTagsConst : 8
|
|
11443
|
-
/* Number */
|
|
11444
|
-
}
|
|
11445
|
-
);
|
|
11446
|
-
return result;
|
|
11447
|
-
},
|
|
11448
|
-
{
|
|
11449
|
-
type: 0
|
|
11450
|
-
/* Never */
|
|
11451
|
-
}
|
|
11452
|
-
);
|
|
11453
|
-
}
|
|
11454
11434
|
function typeFromTypeStateNode(state, sn, classVsObj) {
|
|
11455
11435
|
switch (sn.type) {
|
|
11456
11436
|
case "ClassDeclaration": {
|
|
@@ -11530,15 +11510,46 @@ function typeFromTypeStateNode(state, sn, classVsObj) {
|
|
|
11530
11510
|
type: 4096
|
|
11531
11511
|
/* Module */
|
|
11532
11512
|
};
|
|
11533
|
-
case "EnumDeclaration":
|
|
11534
|
-
|
|
11513
|
+
case "EnumDeclaration": {
|
|
11514
|
+
if (sn.resolvedType)
|
|
11515
|
+
return sn.resolvedType;
|
|
11516
|
+
if ((0, import_chunk_JDC43A3I.hasProperty)(sn, "resolvedType")) {
|
|
11517
|
+
return {
|
|
11518
|
+
type: 65536,
|
|
11519
|
+
value: { enum: sn, value: { type: EnumTagsConst } }
|
|
11520
|
+
};
|
|
11521
|
+
}
|
|
11522
|
+
sn.resolvedType = void 0;
|
|
11523
|
+
const value2 = sn.node.body.members.reduce(
|
|
11524
|
+
(type, member) => {
|
|
11525
|
+
unionInto(type, deEnumerate(typeFromTypeStateNode(state, member)));
|
|
11526
|
+
return type;
|
|
11527
|
+
},
|
|
11528
|
+
{
|
|
11529
|
+
type: 0
|
|
11530
|
+
/* Never */
|
|
11531
|
+
}
|
|
11532
|
+
);
|
|
11533
|
+
return sn.resolvedType = {
|
|
11535
11534
|
type: 65536,
|
|
11536
|
-
value: { enum: sn, value:
|
|
11535
|
+
value: { enum: sn, value: value2 }
|
|
11537
11536
|
};
|
|
11537
|
+
}
|
|
11538
11538
|
case "EnumStringMember": {
|
|
11539
|
-
const
|
|
11540
|
-
|
|
11541
|
-
|
|
11539
|
+
const n = sn;
|
|
11540
|
+
if (!n.resolvedType) {
|
|
11541
|
+
if ((0, import_chunk_JDC43A3I.hasProperty)(n, "resolvedType")) {
|
|
11542
|
+
return { type: EnumTagsConst };
|
|
11543
|
+
}
|
|
11544
|
+
n.resolvedType = void 0;
|
|
11545
|
+
const value2 = n.init?.type === "Literal" ? typeFromLiteral(n.init) : n.init ? deEnumerate(evaluateExpr(state, n.init).value) : {
|
|
11546
|
+
type: 8
|
|
11547
|
+
/* Number */
|
|
11548
|
+
};
|
|
11549
|
+
n.resolvedType = value2;
|
|
11550
|
+
}
|
|
11551
|
+
const e = state.enumMap?.get(n);
|
|
11552
|
+
return e ? { type: 65536, value: { enum: e, value: n.resolvedType } } : n.resolvedType;
|
|
11542
11553
|
}
|
|
11543
11554
|
case "TypedefDeclaration": {
|
|
11544
11555
|
if (sn.resolvedType) {
|
|
@@ -17851,11 +17862,13 @@ function cleanup(state, node, ast, usedNodes) {
|
|
|
17851
17862
|
);
|
|
17852
17863
|
if (i >= 0) {
|
|
17853
17864
|
const old = decls[i];
|
|
17854
|
-
|
|
17865
|
+
const rep = {
|
|
17855
17866
|
...old,
|
|
17856
17867
|
type: "TypedefDeclaration",
|
|
17857
17868
|
node: typedefDecl
|
|
17858
|
-
}
|
|
17869
|
+
};
|
|
17870
|
+
delete rep.resolvedType;
|
|
17871
|
+
decls.splice(i, 1, rep);
|
|
17859
17872
|
}
|
|
17860
17873
|
}
|
|
17861
17874
|
return typedefDecl;
|
|
@@ -19829,18 +19842,24 @@ function formatAstLongLines(node) {
|
|
|
19829
19842
|
const filter = (s) => s.type !== "ClassDeclaration" && s.type !== "ModuleDeclaration" && s.type !== "FunctionDeclaration";
|
|
19830
19843
|
switch (node.type) {
|
|
19831
19844
|
case "ClassDeclaration":
|
|
19832
|
-
node
|
|
19833
|
-
|
|
19834
|
-
|
|
19845
|
+
if (node.body?.body) {
|
|
19846
|
+
node = { ...node };
|
|
19847
|
+
node.body = { ...node.body };
|
|
19848
|
+
node.body.body = node.body.body.filter((c) => filter(c.item));
|
|
19849
|
+
}
|
|
19835
19850
|
break;
|
|
19836
19851
|
case "ModuleDeclaration":
|
|
19837
|
-
node
|
|
19838
|
-
|
|
19839
|
-
|
|
19852
|
+
if (node.body?.body) {
|
|
19853
|
+
node = { ...node };
|
|
19854
|
+
node.body = { ...node.body };
|
|
19855
|
+
node.body.body = node.body.body.filter(filter);
|
|
19856
|
+
}
|
|
19840
19857
|
break;
|
|
19841
19858
|
case "Program":
|
|
19842
|
-
node
|
|
19843
|
-
|
|
19859
|
+
if (node.body) {
|
|
19860
|
+
node = { ...node };
|
|
19861
|
+
node.body = node.body.filter(filter);
|
|
19862
|
+
}
|
|
19844
19863
|
break;
|
|
19845
19864
|
}
|
|
19846
19865
|
return formatAst(node, null, { printWidth: 1e4 });
|
|
@@ -30102,7 +30121,7 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
|
|
|
30102
30121
|
const opt_time = await (0, import_chunk_NHZRKHZO.first_modified)(
|
|
30103
30122
|
Object.values(fnMap).map((v) => v.output)
|
|
30104
30123
|
);
|
|
30105
|
-
if (source_time < opt_time &&
|
|
30124
|
+
if (source_time < opt_time && 1722003035546 < opt_time) {
|
|
30106
30125
|
return {
|
|
30107
30126
|
hasTests,
|
|
30108
30127
|
diagnostics: prevDiagnostics,
|
|
@@ -30140,7 +30159,7 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
|
|
|
30140
30159
|
hasTests: hasTests2,
|
|
30141
30160
|
diagnostics,
|
|
30142
30161
|
sdkVersion,
|
|
30143
|
-
optimizerVersion: "1.1.
|
|
30162
|
+
optimizerVersion: "1.1.73",
|
|
30144
30163
|
...Object.fromEntries(
|
|
30145
30164
|
configOptionsToCheck.map((option) => [option, config[option]])
|
|
30146
30165
|
)
|
package/build/optimizer.cjs
CHANGED
|
@@ -18,30 +18,30 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var optimizer_exports = {};
|
|
20
20
|
__export(optimizer_exports, {
|
|
21
|
-
StateNodeAttributes: () =>
|
|
22
|
-
buildConfigDescription: () =>
|
|
23
|
-
buildOptimizedProject: () =>
|
|
21
|
+
StateNodeAttributes: () => import_chunk_XNAPUWVE.StateNodeAttributes,
|
|
22
|
+
buildConfigDescription: () => import_chunk_XNAPUWVE.buildConfigDescription,
|
|
23
|
+
buildOptimizedProject: () => import_chunk_XNAPUWVE.buildOptimizedProject,
|
|
24
24
|
copyRecursiveAsNeeded: () => import_chunk_NHZRKHZO.copyRecursiveAsNeeded,
|
|
25
|
-
defaultConfig: () =>
|
|
26
|
-
display: () =>
|
|
27
|
-
generateOneConfig: () =>
|
|
28
|
-
generateOptimizedProject: () =>
|
|
29
|
-
getConfig: () =>
|
|
30
|
-
getFnMapAnalysis: () =>
|
|
31
|
-
getProjectAnalysis: () =>
|
|
32
|
-
get_jungle: () =>
|
|
33
|
-
isErrorWithLocation: () =>
|
|
34
|
-
launchSimulator: () =>
|
|
35
|
-
manifestProducts: () =>
|
|
36
|
-
mctree: () =>
|
|
37
|
-
simulateProgram: () =>
|
|
25
|
+
defaultConfig: () => import_chunk_XNAPUWVE.defaultConfig,
|
|
26
|
+
display: () => import_chunk_XNAPUWVE.display,
|
|
27
|
+
generateOneConfig: () => import_chunk_XNAPUWVE.generateOneConfig,
|
|
28
|
+
generateOptimizedProject: () => import_chunk_XNAPUWVE.generateOptimizedProject,
|
|
29
|
+
getConfig: () => import_chunk_XNAPUWVE.getConfig,
|
|
30
|
+
getFnMapAnalysis: () => import_chunk_XNAPUWVE.getFnMapAnalysis,
|
|
31
|
+
getProjectAnalysis: () => import_chunk_XNAPUWVE.getProjectAnalysis,
|
|
32
|
+
get_jungle: () => import_chunk_XNAPUWVE.get_jungle,
|
|
33
|
+
isErrorWithLocation: () => import_chunk_XNAPUWVE.isErrorWithLocation,
|
|
34
|
+
launchSimulator: () => import_chunk_XNAPUWVE.launchSimulator,
|
|
35
|
+
manifestProducts: () => import_chunk_XNAPUWVE.manifestProducts,
|
|
36
|
+
mctree: () => import_chunk_XNAPUWVE.mctree,
|
|
37
|
+
simulateProgram: () => import_chunk_XNAPUWVE.simulateProgram
|
|
38
38
|
});
|
|
39
39
|
module.exports = __toCommonJS(optimizer_exports);
|
|
40
|
-
var
|
|
40
|
+
var import_chunk_XNAPUWVE = require("./chunk-XNAPUWVE.cjs");
|
|
41
41
|
var import_chunk_NHZRKHZO = require("./chunk-NHZRKHZO.cjs");
|
|
42
42
|
var import_chunk_JDC43A3I = require("./chunk-JDC43A3I.cjs");
|
|
43
43
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
44
|
-
(0,
|
|
44
|
+
(0, import_chunk_XNAPUWVE.init_optimizer)();
|
|
45
45
|
// Annotate the CommonJS export names for ESM import in node:
|
|
46
46
|
0 && (module.exports = {
|
|
47
47
|
StateNodeAttributes,
|
package/build/sdk-util.cjs
CHANGED
|
@@ -18,25 +18,25 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var sdk_util_exports = {};
|
|
20
20
|
__export(sdk_util_exports, {
|
|
21
|
-
SectionKinds: () =>
|
|
22
|
-
appSupport: () =>
|
|
23
|
-
connectiq: () =>
|
|
24
|
-
getDeviceInfo: () =>
|
|
25
|
-
getFunctionDocumentation: () =>
|
|
26
|
-
getLanguages: () =>
|
|
27
|
-
getSdkPath: () =>
|
|
28
|
-
isWin: () =>
|
|
29
|
-
optimizeProgram: () =>
|
|
30
|
-
readPrg: () =>
|
|
31
|
-
readPrgWithOffsets: () =>
|
|
32
|
-
xmlUtil: () =>
|
|
21
|
+
SectionKinds: () => import_chunk_XNAPUWVE.SectionKinds,
|
|
22
|
+
appSupport: () => import_chunk_XNAPUWVE.appSupport,
|
|
23
|
+
connectiq: () => import_chunk_XNAPUWVE.connectiq,
|
|
24
|
+
getDeviceInfo: () => import_chunk_XNAPUWVE.getDeviceInfo,
|
|
25
|
+
getFunctionDocumentation: () => import_chunk_XNAPUWVE.getFunctionDocumentation,
|
|
26
|
+
getLanguages: () => import_chunk_XNAPUWVE.getLanguages,
|
|
27
|
+
getSdkPath: () => import_chunk_XNAPUWVE.getSdkPath,
|
|
28
|
+
isWin: () => import_chunk_XNAPUWVE.isWin,
|
|
29
|
+
optimizeProgram: () => import_chunk_XNAPUWVE.optimizeProgram,
|
|
30
|
+
readPrg: () => import_chunk_XNAPUWVE.readPrg,
|
|
31
|
+
readPrgWithOffsets: () => import_chunk_XNAPUWVE.readPrgWithOffsets,
|
|
32
|
+
xmlUtil: () => import_chunk_XNAPUWVE.xml_util_exports
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(sdk_util_exports);
|
|
35
|
-
var
|
|
35
|
+
var import_chunk_XNAPUWVE = require("./chunk-XNAPUWVE.cjs");
|
|
36
36
|
var import_chunk_NHZRKHZO = require("./chunk-NHZRKHZO.cjs");
|
|
37
37
|
var import_chunk_JDC43A3I = require("./chunk-JDC43A3I.cjs");
|
|
38
38
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
39
|
-
(0,
|
|
39
|
+
(0, import_chunk_XNAPUWVE.init_sdk_util)();
|
|
40
40
|
// Annotate the CommonJS export names for ESM import in node:
|
|
41
41
|
0 && (module.exports = {
|
|
42
42
|
SectionKinds,
|
package/build/worker-thread.cjs
CHANGED
|
@@ -21,17 +21,17 @@ __export(worker_thread_exports, {
|
|
|
21
21
|
default: () => worker_thread_default
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(worker_thread_exports);
|
|
24
|
-
var
|
|
24
|
+
var import_chunk_XNAPUWVE = require("./chunk-XNAPUWVE.cjs");
|
|
25
25
|
var import_chunk_NHZRKHZO = require("./chunk-NHZRKHZO.cjs");
|
|
26
26
|
var import_chunk_JDC43A3I = require("./chunk-JDC43A3I.cjs");
|
|
27
27
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
28
28
|
var import_node_worker_threads = require("node:worker_threads");
|
|
29
29
|
var require_worker_thread = (0, import_chunk_ABYVSU2C.__commonJS)({
|
|
30
30
|
"src/worker-thread.ts"() {
|
|
31
|
-
(0,
|
|
31
|
+
(0, import_chunk_XNAPUWVE.init_worker_task)();
|
|
32
32
|
if (import_node_worker_threads.parentPort) {
|
|
33
33
|
import_node_worker_threads.parentPort.on("message", async (task) => {
|
|
34
|
-
return import_node_worker_threads.parentPort.postMessage(await (0,
|
|
34
|
+
return import_node_worker_threads.parentPort.postMessage(await (0, import_chunk_XNAPUWVE.performTask)(task));
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markw65/monkeyc-optimizer",
|
|
3
3
|
"type": "commonjs",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.73",
|
|
5
5
|
"description": "Source to source optimizer for Garmin Monkey C code",
|
|
6
6
|
"main": "build/optimizer.cjs",
|
|
7
7
|
"types": "build/src/optimizer.d.ts",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"author": "markw65",
|
|
57
57
|
"license": "MIT",
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@markw65/prettier-plugin-monkeyc": "^1.0.
|
|
59
|
+
"@markw65/prettier-plugin-monkeyc": "^1.0.59"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@markw65/peggy-optimizer": "^1.0.1",
|