@markw65/monkeyc-optimizer 1.1.68 → 1.1.70

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 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.70
6
+
7
+ - Use formatAstLongLines to avoid line wrapping error messages
8
+ - Better handling of calleeObjType when there's no typeMap
9
+ - Add special handling for toNumber
10
+ - Fix incorrect types in generated rezAsts
11
+ - Keep track of all the definition nodes for a module (better support for goto def)
12
+ - Run type analysis on module and class scope initializers
13
+
14
+ ### 1.1.69
15
+
16
+ - Make sure barrel resource references are found.
17
+
5
18
  ### 1.1.68
6
19
 
7
20
  - Fix a race between removing and creating outputPath that could potentially cause a build to fail
package/build/api.cjs CHANGED
@@ -18,47 +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: () => import_chunk_NGCEDNHJ.checkCompilerVersion,
22
- collectNamespaces: () => import_chunk_NGCEDNHJ.collectNamespaces,
23
- createDocumentationMap: () => import_chunk_NGCEDNHJ.createDocumentationMap,
24
- diagnostic: () => import_chunk_NGCEDNHJ.diagnostic,
25
- diagnosticHelper: () => import_chunk_NGCEDNHJ.diagnosticHelper,
26
- findNamesInScope: () => import_chunk_NGCEDNHJ.findNamesInScope,
27
- findUsingForNode: () => import_chunk_NGCEDNHJ.findUsingForNode,
28
- formatAst: () => import_chunk_NGCEDNHJ.formatAst,
29
- formatAstLongLines: () => import_chunk_NGCEDNHJ.formatAstLongLines,
30
- formatScopedName: () => import_chunk_NGCEDNHJ.formatScopedName,
31
- getApiFunctionInfo: () => import_chunk_NGCEDNHJ.getApiFunctionInfo,
32
- getApiMapping: () => import_chunk_NGCEDNHJ.getApiMapping,
33
- getSuperClasses: () => import_chunk_NGCEDNHJ.getSuperClasses,
34
- hasProperty: () => import_chunk_MBTLUWXR.hasProperty,
35
- isClassVariable: () => import_chunk_NGCEDNHJ.isClassVariable,
36
- isLocal: () => import_chunk_NGCEDNHJ.isLocal,
37
- isLookupCandidate: () => import_chunk_NGCEDNHJ.isLookupCandidate,
38
- isStateNode: () => import_chunk_NGCEDNHJ.isStateNode,
39
- lookupByFullName: () => import_chunk_NGCEDNHJ.lookupByFullName,
40
- lookupNext: () => import_chunk_NGCEDNHJ.lookupNext,
41
- lookupResultContains: () => import_chunk_NGCEDNHJ.lookupResultContains,
42
- lookupWithType: () => import_chunk_NGCEDNHJ.lookupWithType,
43
- makeToyboxLink: () => import_chunk_NGCEDNHJ.makeToyboxLink,
44
- mapVarDeclsByType: () => import_chunk_NGCEDNHJ.mapVarDeclsByType,
45
- markInvokeClassMethod: () => import_chunk_NGCEDNHJ.markInvokeClassMethod,
46
- parseSdkVersion: () => import_chunk_NGCEDNHJ.parseSdkVersion,
47
- resolveDiagnostics: () => import_chunk_NGCEDNHJ.resolveDiagnostics,
48
- resolveDiagnosticsMap: () => import_chunk_NGCEDNHJ.resolveDiagnosticsMap,
49
- sameLookupResult: () => import_chunk_NGCEDNHJ.sameLookupResult,
50
- traverseAst: () => import_chunk_MBTLUWXR.traverseAst,
51
- variableDeclarationName: () => import_chunk_NGCEDNHJ.variableDeclarationName,
52
- visitReferences: () => import_chunk_NGCEDNHJ.visitReferences,
53
- visit_resources: () => import_chunk_NGCEDNHJ.visit_resources,
54
- visitorNode: () => import_chunk_NGCEDNHJ.visitorNode
21
+ checkCompilerVersion: () => import_chunk_2PJMJVYN.checkCompilerVersion,
22
+ collectNamespaces: () => import_chunk_2PJMJVYN.collectNamespaces,
23
+ createDocumentationMap: () => import_chunk_2PJMJVYN.createDocumentationMap,
24
+ diagnostic: () => import_chunk_2PJMJVYN.diagnostic,
25
+ diagnosticHelper: () => import_chunk_2PJMJVYN.diagnosticHelper,
26
+ findNamesInScope: () => import_chunk_2PJMJVYN.findNamesInScope,
27
+ findUsingForNode: () => import_chunk_2PJMJVYN.findUsingForNode,
28
+ formatAst: () => import_chunk_2PJMJVYN.formatAst,
29
+ formatAstLongLines: () => import_chunk_2PJMJVYN.formatAstLongLines,
30
+ formatScopedName: () => import_chunk_2PJMJVYN.formatScopedName,
31
+ getApiFunctionInfo: () => import_chunk_2PJMJVYN.getApiFunctionInfo,
32
+ getApiMapping: () => import_chunk_2PJMJVYN.getApiMapping,
33
+ getSuperClasses: () => import_chunk_2PJMJVYN.getSuperClasses,
34
+ handleImportUsing: () => import_chunk_2PJMJVYN.handleImportUsing,
35
+ hasProperty: () => import_chunk_JDC43A3I.hasProperty,
36
+ isClassVariable: () => import_chunk_2PJMJVYN.isClassVariable,
37
+ isLocal: () => import_chunk_2PJMJVYN.isLocal,
38
+ isLookupCandidate: () => import_chunk_2PJMJVYN.isLookupCandidate,
39
+ isStateNode: () => import_chunk_2PJMJVYN.isStateNode,
40
+ lookupByFullName: () => import_chunk_2PJMJVYN.lookupByFullName,
41
+ lookupNext: () => import_chunk_2PJMJVYN.lookupNext,
42
+ lookupResultContains: () => import_chunk_2PJMJVYN.lookupResultContains,
43
+ lookupWithType: () => import_chunk_2PJMJVYN.lookupWithType,
44
+ makeToyboxLink: () => import_chunk_2PJMJVYN.makeToyboxLink,
45
+ mapVarDeclsByType: () => import_chunk_2PJMJVYN.mapVarDeclsByType,
46
+ markInvokeClassMethod: () => import_chunk_2PJMJVYN.markInvokeClassMethod,
47
+ parseSdkVersion: () => import_chunk_2PJMJVYN.parseSdkVersion,
48
+ popRootNode: () => import_chunk_2PJMJVYN.popRootNode,
49
+ pushRootNode: () => import_chunk_2PJMJVYN.pushRootNode,
50
+ resolveDiagnostics: () => import_chunk_2PJMJVYN.resolveDiagnostics,
51
+ resolveDiagnosticsMap: () => import_chunk_2PJMJVYN.resolveDiagnosticsMap,
52
+ sameLookupResult: () => import_chunk_2PJMJVYN.sameLookupResult,
53
+ traverseAst: () => import_chunk_JDC43A3I.traverseAst,
54
+ variableDeclarationName: () => import_chunk_2PJMJVYN.variableDeclarationName,
55
+ visitReferences: () => import_chunk_2PJMJVYN.visitReferences,
56
+ visit_resources: () => import_chunk_2PJMJVYN.visit_resources,
57
+ visitorNode: () => import_chunk_2PJMJVYN.visitorNode
55
58
  });
56
59
  module.exports = __toCommonJS(api_exports);
57
- var import_chunk_NGCEDNHJ = require("./chunk-NGCEDNHJ.cjs");
58
- var import_chunk_OASVKTK5 = require("./chunk-OASVKTK5.cjs");
59
- var import_chunk_MBTLUWXR = require("./chunk-MBTLUWXR.cjs");
60
+ var import_chunk_2PJMJVYN = require("./chunk-2PJMJVYN.cjs");
61
+ var import_chunk_NHZRKHZO = require("./chunk-NHZRKHZO.cjs");
62
+ var import_chunk_JDC43A3I = require("./chunk-JDC43A3I.cjs");
60
63
  var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
61
- (0, import_chunk_NGCEDNHJ.init_api)();
64
+ (0, import_chunk_2PJMJVYN.init_api)();
62
65
  // Annotate the CommonJS export names for ESM import in node:
63
66
  0 && (module.exports = {
64
67
  checkCompilerVersion,
@@ -74,6 +77,7 @@ var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
74
77
  getApiFunctionInfo,
75
78
  getApiMapping,
76
79
  getSuperClasses,
80
+ handleImportUsing,
77
81
  hasProperty,
78
82
  isClassVariable,
79
83
  isLocal,
@@ -87,6 +91,8 @@ var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
87
91
  mapVarDeclsByType,
88
92
  markInvokeClassMethod,
89
93
  parseSdkVersion,
94
+ popRootNode,
95
+ pushRootNode,
90
96
  resolveDiagnostics,
91
97
  resolveDiagnosticsMap,
92
98
  sameLookupResult,
package/build/cftinfo.cjs CHANGED
@@ -33,13 +33,13 @@ __export(cftinfo_exports, {
33
33
  getDeviceFontInfo: () => getDeviceFontInfo
34
34
  });
35
35
  module.exports = __toCommonJS(cftinfo_exports);
36
- var import_chunk_MBTLUWXR = require("./chunk-MBTLUWXR.cjs");
36
+ var import_chunk_JDC43A3I = require("./chunk-JDC43A3I.cjs");
37
37
  var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
38
38
  var import_node_assert = __toESM(require("node:assert"));
39
39
  var fs = __toESM(require("node:fs/promises"));
40
40
  var path = __toESM(require("node:path"));
41
41
  var zlib = __toESM(require("node:zlib"));
42
- (0, import_chunk_MBTLUWXR.init_ast)();
42
+ (0, import_chunk_JDC43A3I.init_ast)();
43
43
  async function getCFTFontInfoFromBuffer(name, data, options) {
44
44
  const view = new DataView(data.buffer, data.byteOffset, data.byteLength);
45
45
  const glyphFlags = view.getUint8(3);
@@ -131,8 +131,8 @@ function getDeviceFontInfo(dirname) {
131
131
  const langMap = {};
132
132
  partNumbers.map(
133
133
  (part) => part.languages.map((lang) => {
134
- (0, import_node_assert.default)((0, import_chunk_MBTLUWXR.hasProperty)(fontSets, lang.fontSet));
135
- if ((0, import_chunk_MBTLUWXR.hasProperty)(langMap, lang.code)) {
134
+ (0, import_node_assert.default)((0, import_chunk_JDC43A3I.hasProperty)(fontSets, lang.fontSet));
135
+ if ((0, import_chunk_JDC43A3I.hasProperty)(langMap, lang.code)) {
136
136
  (0, import_node_assert.default)(langMap[lang.code] === lang.fontSet);
137
137
  } else {
138
138
  langMap[lang.code] = lang.fontSet;