@markw65/monkeyc-optimizer 1.1.67 → 1.1.69
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/cftinfo.cjs +4 -4
- package/build/{chunk-MBTLUWXR.cjs → chunk-JDC43A3I.cjs} +5 -5
- package/build/{chunk-2OEXWI65.cjs → chunk-YERUPFGW.cjs} +406 -320
- package/build/optimizer.cjs +19 -19
- package/build/sdk-util.cjs +15 -15
- package/build/src/ast.d.ts +1 -1
- package/build/src/optimizer.d.ts +1 -1
- package/build/src/worker-task.d.ts +1 -0
- package/build/worker-thread.cjs +4 -4
- package/package.json +1 -1
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.69
|
|
6
|
+
|
|
7
|
+
- Make sure barrel resource references are found.
|
|
8
|
+
|
|
9
|
+
### 1.1.68
|
|
10
|
+
|
|
11
|
+
- Fix a race between removing and creating outputPath that could potentially cause a build to fail
|
|
12
|
+
- Only ignore jungle paths that resolve to `prettierMonkeyC.outputPath` if the pattern is the default, `**.mc`
|
|
13
|
+
- Ignore jungle paths that resolve to `prettierMonkeyC.outputPath`, rather than `bin`.
|
|
14
|
+
- Prevent infinite recursion with cyclic Class graphs. Now gives sensible error messages, and doesn't crash
|
|
15
|
+
- Record barrel paths in build dependencies, so that rebuilding a barrel will cause a re-run of the live analysis
|
|
16
|
+
- Add the jungle as the source file for "unresolved barrel" errors. Lets you know which project caused the error.
|
|
17
|
+
|
|
5
18
|
### 1.1.67
|
|
6
19
|
|
|
7
20
|
- Use the type of a variable, when known, if its the base of a lookup (fixes #35)
|
package/build/api.cjs
CHANGED
|
@@ -18,47 +18,47 @@ 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
|
-
hasProperty: () =>
|
|
35
|
-
isClassVariable: () =>
|
|
36
|
-
isLocal: () =>
|
|
37
|
-
isLookupCandidate: () =>
|
|
38
|
-
isStateNode: () =>
|
|
39
|
-
lookupByFullName: () =>
|
|
40
|
-
lookupNext: () =>
|
|
41
|
-
lookupResultContains: () =>
|
|
42
|
-
lookupWithType: () =>
|
|
43
|
-
makeToyboxLink: () =>
|
|
44
|
-
mapVarDeclsByType: () =>
|
|
45
|
-
markInvokeClassMethod: () =>
|
|
46
|
-
parseSdkVersion: () =>
|
|
47
|
-
resolveDiagnostics: () =>
|
|
48
|
-
resolveDiagnosticsMap: () =>
|
|
49
|
-
sameLookupResult: () =>
|
|
50
|
-
traverseAst: () =>
|
|
51
|
-
variableDeclarationName: () =>
|
|
52
|
-
visitReferences: () =>
|
|
53
|
-
visit_resources: () =>
|
|
54
|
-
visitorNode: () =>
|
|
21
|
+
checkCompilerVersion: () => import_chunk_YERUPFGW.checkCompilerVersion,
|
|
22
|
+
collectNamespaces: () => import_chunk_YERUPFGW.collectNamespaces,
|
|
23
|
+
createDocumentationMap: () => import_chunk_YERUPFGW.createDocumentationMap,
|
|
24
|
+
diagnostic: () => import_chunk_YERUPFGW.diagnostic,
|
|
25
|
+
diagnosticHelper: () => import_chunk_YERUPFGW.diagnosticHelper,
|
|
26
|
+
findNamesInScope: () => import_chunk_YERUPFGW.findNamesInScope,
|
|
27
|
+
findUsingForNode: () => import_chunk_YERUPFGW.findUsingForNode,
|
|
28
|
+
formatAst: () => import_chunk_YERUPFGW.formatAst,
|
|
29
|
+
formatAstLongLines: () => import_chunk_YERUPFGW.formatAstLongLines,
|
|
30
|
+
formatScopedName: () => import_chunk_YERUPFGW.formatScopedName,
|
|
31
|
+
getApiFunctionInfo: () => import_chunk_YERUPFGW.getApiFunctionInfo,
|
|
32
|
+
getApiMapping: () => import_chunk_YERUPFGW.getApiMapping,
|
|
33
|
+
getSuperClasses: () => import_chunk_YERUPFGW.getSuperClasses,
|
|
34
|
+
hasProperty: () => import_chunk_JDC43A3I.hasProperty,
|
|
35
|
+
isClassVariable: () => import_chunk_YERUPFGW.isClassVariable,
|
|
36
|
+
isLocal: () => import_chunk_YERUPFGW.isLocal,
|
|
37
|
+
isLookupCandidate: () => import_chunk_YERUPFGW.isLookupCandidate,
|
|
38
|
+
isStateNode: () => import_chunk_YERUPFGW.isStateNode,
|
|
39
|
+
lookupByFullName: () => import_chunk_YERUPFGW.lookupByFullName,
|
|
40
|
+
lookupNext: () => import_chunk_YERUPFGW.lookupNext,
|
|
41
|
+
lookupResultContains: () => import_chunk_YERUPFGW.lookupResultContains,
|
|
42
|
+
lookupWithType: () => import_chunk_YERUPFGW.lookupWithType,
|
|
43
|
+
makeToyboxLink: () => import_chunk_YERUPFGW.makeToyboxLink,
|
|
44
|
+
mapVarDeclsByType: () => import_chunk_YERUPFGW.mapVarDeclsByType,
|
|
45
|
+
markInvokeClassMethod: () => import_chunk_YERUPFGW.markInvokeClassMethod,
|
|
46
|
+
parseSdkVersion: () => import_chunk_YERUPFGW.parseSdkVersion,
|
|
47
|
+
resolveDiagnostics: () => import_chunk_YERUPFGW.resolveDiagnostics,
|
|
48
|
+
resolveDiagnosticsMap: () => import_chunk_YERUPFGW.resolveDiagnosticsMap,
|
|
49
|
+
sameLookupResult: () => import_chunk_YERUPFGW.sameLookupResult,
|
|
50
|
+
traverseAst: () => import_chunk_JDC43A3I.traverseAst,
|
|
51
|
+
variableDeclarationName: () => import_chunk_YERUPFGW.variableDeclarationName,
|
|
52
|
+
visitReferences: () => import_chunk_YERUPFGW.visitReferences,
|
|
53
|
+
visit_resources: () => import_chunk_YERUPFGW.visit_resources,
|
|
54
|
+
visitorNode: () => import_chunk_YERUPFGW.visitorNode
|
|
55
55
|
});
|
|
56
56
|
module.exports = __toCommonJS(api_exports);
|
|
57
|
-
var
|
|
57
|
+
var import_chunk_YERUPFGW = require("./chunk-YERUPFGW.cjs");
|
|
58
58
|
var import_chunk_OASVKTK5 = require("./chunk-OASVKTK5.cjs");
|
|
59
|
-
var
|
|
59
|
+
var import_chunk_JDC43A3I = require("./chunk-JDC43A3I.cjs");
|
|
60
60
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
61
|
-
(0,
|
|
61
|
+
(0, import_chunk_YERUPFGW.init_api)();
|
|
62
62
|
// Annotate the CommonJS export names for ESM import in node:
|
|
63
63
|
0 && (module.exports = {
|
|
64
64
|
checkCompilerVersion,
|
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
|
|
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,
|
|
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,
|
|
135
|
-
if ((0,
|
|
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;
|
|
@@ -16,8 +16,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_JDC43A3I_exports = {};
|
|
20
|
+
__export(chunk_JDC43A3I_exports, {
|
|
21
21
|
adjustLoc: () => adjustLoc,
|
|
22
22
|
cloneDeep: () => cloneDeep,
|
|
23
23
|
getLiteralNode: () => getLiteralNode,
|
|
@@ -36,7 +36,7 @@ __export(chunk_MBTLUWXR_exports, {
|
|
|
36
36
|
withLocDeep: () => withLocDeep,
|
|
37
37
|
wrap: () => wrap
|
|
38
38
|
});
|
|
39
|
-
module.exports = __toCommonJS(
|
|
39
|
+
module.exports = __toCommonJS(chunk_JDC43A3I_exports);
|
|
40
40
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
41
41
|
var import_prettier_plugin_monkeyc = require("@markw65/prettier-plugin-monkeyc");
|
|
42
42
|
function isMCTreeNode(node) {
|
|
@@ -239,7 +239,7 @@ function makeMemberExpression(object, property) {
|
|
|
239
239
|
object.loc && locRange(object.loc, property.loc)
|
|
240
240
|
);
|
|
241
241
|
}
|
|
242
|
-
function makeScopedName(dotted, l) {
|
|
242
|
+
function makeScopedName(dotted, l, base) {
|
|
243
243
|
const loc = l && adjustLoc(l, 0, l.start.offset - l.end.offset);
|
|
244
244
|
const result = dotted.split(/\s*\.\s*/).reduce(
|
|
245
245
|
({ cur, offset }, next) => {
|
|
@@ -255,7 +255,7 @@ function makeScopedName(dotted, l) {
|
|
|
255
255
|
offset += next.length + 1;
|
|
256
256
|
return { cur, offset };
|
|
257
257
|
},
|
|
258
|
-
{ cur:
|
|
258
|
+
{ cur: base, offset: 0 }
|
|
259
259
|
).cur;
|
|
260
260
|
if (!result)
|
|
261
261
|
throw new Error("Failed to make a ScopedName");
|