@markw65/monkeyc-optimizer 1.1.88 → 1.1.89

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,10 @@
2
2
 
3
3
  All notable changes to the "monkeyc-optimizer" package will be documented in this file.
4
4
 
5
+ ### 1.1.89
6
+
7
+ - Fix error determining whether or not to generate a SHA256 signature, so that things start working with sdk-8.2.2 again
8
+
5
9
  ### 1.1.88
6
10
 
7
11
  - Fix output of cft-font-info
File without changes
package/build/api.cjs CHANGED
@@ -18,52 +18,52 @@ 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_ROZUBUPR.checkCompilerVersion,
22
- clearDiagnostics: () => import_chunk_ROZUBUPR.clearDiagnostics,
23
- collectNamespaces: () => import_chunk_ROZUBUPR.collectNamespaces,
24
- createDocumentationMap: () => import_chunk_ROZUBUPR.createDocumentationMap,
25
- declKey: () => import_chunk_ROZUBUPR.declKey,
26
- diagnostic: () => import_chunk_ROZUBUPR.diagnostic,
27
- diagnosticHelper: () => import_chunk_ROZUBUPR.diagnosticHelper,
28
- findNamesInScope: () => import_chunk_ROZUBUPR.findNamesInScope,
29
- findUsingForNode: () => import_chunk_ROZUBUPR.findUsingForNode,
30
- formatAst: () => import_chunk_ROZUBUPR.formatAst,
31
- formatAstLongLines: () => import_chunk_ROZUBUPR.formatAstLongLines,
32
- formatScopedName: () => import_chunk_ROZUBUPR.formatScopedName,
33
- getApiFunctionInfo: () => import_chunk_ROZUBUPR.getApiFunctionInfo,
34
- getApiMapping: () => import_chunk_ROZUBUPR.getApiMapping,
35
- getSuperClasses: () => import_chunk_ROZUBUPR.getSuperClasses,
36
- handleImportUsing: () => import_chunk_ROZUBUPR.handleImportUsing,
21
+ checkCompilerVersion: () => import_chunk_7CG7CM26.checkCompilerVersion,
22
+ clearDiagnostics: () => import_chunk_7CG7CM26.clearDiagnostics,
23
+ collectNamespaces: () => import_chunk_7CG7CM26.collectNamespaces,
24
+ createDocumentationMap: () => import_chunk_7CG7CM26.createDocumentationMap,
25
+ declKey: () => import_chunk_7CG7CM26.declKey,
26
+ diagnostic: () => import_chunk_7CG7CM26.diagnostic,
27
+ diagnosticHelper: () => import_chunk_7CG7CM26.diagnosticHelper,
28
+ findNamesInScope: () => import_chunk_7CG7CM26.findNamesInScope,
29
+ findUsingForNode: () => import_chunk_7CG7CM26.findUsingForNode,
30
+ formatAst: () => import_chunk_7CG7CM26.formatAst,
31
+ formatAstLongLines: () => import_chunk_7CG7CM26.formatAstLongLines,
32
+ formatScopedName: () => import_chunk_7CG7CM26.formatScopedName,
33
+ getApiFunctionInfo: () => import_chunk_7CG7CM26.getApiFunctionInfo,
34
+ getApiMapping: () => import_chunk_7CG7CM26.getApiMapping,
35
+ getSuperClasses: () => import_chunk_7CG7CM26.getSuperClasses,
36
+ handleImportUsing: () => import_chunk_7CG7CM26.handleImportUsing,
37
37
  hasProperty: () => import_chunk_JDC43A3I.hasProperty,
38
- isClassVariable: () => import_chunk_ROZUBUPR.isClassVariable,
39
- isLocal: () => import_chunk_ROZUBUPR.isLocal,
40
- isLookupCandidate: () => import_chunk_ROZUBUPR.isLookupCandidate,
41
- isStateNode: () => import_chunk_ROZUBUPR.isStateNode,
42
- lookupByFullName: () => import_chunk_ROZUBUPR.lookupByFullName,
43
- lookupNext: () => import_chunk_ROZUBUPR.lookupNext,
44
- lookupResultContains: () => import_chunk_ROZUBUPR.lookupResultContains,
45
- lookupWithType: () => import_chunk_ROZUBUPR.lookupWithType,
46
- makeToyboxLink: () => import_chunk_ROZUBUPR.makeToyboxLink,
47
- mapVarDeclsByType: () => import_chunk_ROZUBUPR.mapVarDeclsByType,
48
- markInvokeClassMethod: () => import_chunk_ROZUBUPR.markInvokeClassMethod,
49
- parseSdkVersion: () => import_chunk_ROZUBUPR.parseSdkVersion,
50
- popRootNode: () => import_chunk_ROZUBUPR.popRootNode,
51
- pushRootNode: () => import_chunk_ROZUBUPR.pushRootNode,
52
- resolveDiagnostics: () => import_chunk_ROZUBUPR.resolveDiagnostics,
53
- resolveDiagnosticsMap: () => import_chunk_ROZUBUPR.resolveDiagnosticsMap,
54
- sameLookupResult: () => import_chunk_ROZUBUPR.sameLookupResult,
38
+ isClassVariable: () => import_chunk_7CG7CM26.isClassVariable,
39
+ isLocal: () => import_chunk_7CG7CM26.isLocal,
40
+ isLookupCandidate: () => import_chunk_7CG7CM26.isLookupCandidate,
41
+ isStateNode: () => import_chunk_7CG7CM26.isStateNode,
42
+ lookupByFullName: () => import_chunk_7CG7CM26.lookupByFullName,
43
+ lookupNext: () => import_chunk_7CG7CM26.lookupNext,
44
+ lookupResultContains: () => import_chunk_7CG7CM26.lookupResultContains,
45
+ lookupWithType: () => import_chunk_7CG7CM26.lookupWithType,
46
+ makeToyboxLink: () => import_chunk_7CG7CM26.makeToyboxLink,
47
+ mapVarDeclsByType: () => import_chunk_7CG7CM26.mapVarDeclsByType,
48
+ markInvokeClassMethod: () => import_chunk_7CG7CM26.markInvokeClassMethod,
49
+ parseSdkVersion: () => import_chunk_7CG7CM26.parseSdkVersion,
50
+ popRootNode: () => import_chunk_7CG7CM26.popRootNode,
51
+ pushRootNode: () => import_chunk_7CG7CM26.pushRootNode,
52
+ resolveDiagnostics: () => import_chunk_7CG7CM26.resolveDiagnostics,
53
+ resolveDiagnosticsMap: () => import_chunk_7CG7CM26.resolveDiagnosticsMap,
54
+ sameLookupResult: () => import_chunk_7CG7CM26.sameLookupResult,
55
55
  traverseAst: () => import_chunk_JDC43A3I.traverseAst,
56
- variableDeclarationName: () => import_chunk_ROZUBUPR.variableDeclarationName,
57
- visitReferences: () => import_chunk_ROZUBUPR.visitReferences,
58
- visit_resources: () => import_chunk_ROZUBUPR.visit_resources,
59
- visitorNode: () => import_chunk_ROZUBUPR.visitorNode
56
+ variableDeclarationName: () => import_chunk_7CG7CM26.variableDeclarationName,
57
+ visitReferences: () => import_chunk_7CG7CM26.visitReferences,
58
+ visit_resources: () => import_chunk_7CG7CM26.visit_resources,
59
+ visitorNode: () => import_chunk_7CG7CM26.visitorNode
60
60
  });
61
61
  module.exports = __toCommonJS(api_exports);
62
- var import_chunk_ROZUBUPR = require("./chunk-ROZUBUPR.cjs");
62
+ var import_chunk_7CG7CM26 = require("./chunk-7CG7CM26.cjs");
63
63
  var import_chunk_X7QCZR3F = require("./chunk-X7QCZR3F.cjs");
64
64
  var import_chunk_JDC43A3I = require("./chunk-JDC43A3I.cjs");
65
65
  var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
66
- (0, import_chunk_ROZUBUPR.init_api)();
66
+ (0, import_chunk_7CG7CM26.init_api)();
67
67
  // Annotate the CommonJS export names for ESM import in node:
68
68
  0 && (module.exports = {
69
69
  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 chunk_ROZUBUPR_exports = {};
30
- __export(chunk_ROZUBUPR_exports, {
29
+ var chunk_7CG7CM26_exports = {};
30
+ __export(chunk_7CG7CM26_exports, {
31
31
  EnumTagsConst: () => EnumTagsConst,
32
32
  LastTypeTag: () => LastTypeTag,
33
33
  ObjectLikeTagsConst: () => ObjectLikeTagsConst,
@@ -140,7 +140,7 @@ __export(chunk_ROZUBUPR_exports, {
140
140
  visitorNode: () => visitorNode,
141
141
  xml_util_exports: () => xml_util_exports
142
142
  });
143
- module.exports = __toCommonJS(chunk_ROZUBUPR_exports);
143
+ module.exports = __toCommonJS(chunk_7CG7CM26_exports);
144
144
  var import_chunk_X7QCZR3F = require("./chunk-X7QCZR3F.cjs");
145
145
  var import_chunk_JDC43A3I = require("./chunk-JDC43A3I.cjs");
146
146
  var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
@@ -26078,7 +26078,7 @@ function getPrgSignature(context) {
26078
26078
  const withSha256 = context.sections[
26079
26079
  -507453934
26080
26080
  /* SIGNATURE */
26081
- ]?.length === 1036 + 512;
26081
+ ]?.length === 1036 + 512 - 8;
26082
26082
  delete context.sections[
26083
26083
  -507453934
26084
26084
  /* SIGNATURE */
@@ -30752,7 +30752,7 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
30752
30752
  const opt_time = await (0, import_chunk_X7QCZR3F.first_modified)(
30753
30753
  Object.values(fnMap).map((v) => v.output)
30754
30754
  );
30755
- if (source_time < opt_time && 1738628242341 < opt_time) {
30755
+ if (source_time < opt_time && 1754525704940 < opt_time) {
30756
30756
  return {
30757
30757
  hasTests,
30758
30758
  diagnostics: prevDiagnostics,
@@ -30790,7 +30790,7 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
30790
30790
  hasTests: hasTests2,
30791
30791
  diagnostics,
30792
30792
  sdkVersion,
30793
- optimizerVersion: "1.1.88",
30793
+ optimizerVersion: "1.1.89",
30794
30794
  ...Object.fromEntries(
30795
30795
  configOptionsToCheck.map((option) => [option, config[option]])
30796
30796
  )
@@ -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: () => import_chunk_ROZUBUPR.StateNodeAttributes,
22
- buildConfigDescription: () => import_chunk_ROZUBUPR.buildConfigDescription,
23
- buildOptimizedProject: () => import_chunk_ROZUBUPR.buildOptimizedProject,
21
+ StateNodeAttributes: () => import_chunk_7CG7CM26.StateNodeAttributes,
22
+ buildConfigDescription: () => import_chunk_7CG7CM26.buildConfigDescription,
23
+ buildOptimizedProject: () => import_chunk_7CG7CM26.buildOptimizedProject,
24
24
  copyRecursiveAsNeeded: () => import_chunk_X7QCZR3F.copyRecursiveAsNeeded,
25
- defaultConfig: () => import_chunk_ROZUBUPR.defaultConfig,
26
- display: () => import_chunk_ROZUBUPR.display,
27
- generateOneConfig: () => import_chunk_ROZUBUPR.generateOneConfig,
28
- generateOptimizedProject: () => import_chunk_ROZUBUPR.generateOptimizedProject,
29
- getConfig: () => import_chunk_ROZUBUPR.getConfig,
30
- getFnMapAnalysis: () => import_chunk_ROZUBUPR.getFnMapAnalysis,
31
- getProjectAnalysis: () => import_chunk_ROZUBUPR.getProjectAnalysis,
32
- get_jungle: () => import_chunk_ROZUBUPR.get_jungle,
33
- isErrorWithLocation: () => import_chunk_ROZUBUPR.isErrorWithLocation,
34
- launchSimulator: () => import_chunk_ROZUBUPR.launchSimulator,
35
- manifestProducts: () => import_chunk_ROZUBUPR.manifestProducts,
36
- mctree: () => import_chunk_ROZUBUPR.mctree,
37
- simulateProgram: () => import_chunk_ROZUBUPR.simulateProgram
25
+ defaultConfig: () => import_chunk_7CG7CM26.defaultConfig,
26
+ display: () => import_chunk_7CG7CM26.display,
27
+ generateOneConfig: () => import_chunk_7CG7CM26.generateOneConfig,
28
+ generateOptimizedProject: () => import_chunk_7CG7CM26.generateOptimizedProject,
29
+ getConfig: () => import_chunk_7CG7CM26.getConfig,
30
+ getFnMapAnalysis: () => import_chunk_7CG7CM26.getFnMapAnalysis,
31
+ getProjectAnalysis: () => import_chunk_7CG7CM26.getProjectAnalysis,
32
+ get_jungle: () => import_chunk_7CG7CM26.get_jungle,
33
+ isErrorWithLocation: () => import_chunk_7CG7CM26.isErrorWithLocation,
34
+ launchSimulator: () => import_chunk_7CG7CM26.launchSimulator,
35
+ manifestProducts: () => import_chunk_7CG7CM26.manifestProducts,
36
+ mctree: () => import_chunk_7CG7CM26.mctree,
37
+ simulateProgram: () => import_chunk_7CG7CM26.simulateProgram
38
38
  });
39
39
  module.exports = __toCommonJS(optimizer_exports);
40
- var import_chunk_ROZUBUPR = require("./chunk-ROZUBUPR.cjs");
40
+ var import_chunk_7CG7CM26 = require("./chunk-7CG7CM26.cjs");
41
41
  var import_chunk_X7QCZR3F = require("./chunk-X7QCZR3F.cjs");
42
42
  var import_chunk_JDC43A3I = require("./chunk-JDC43A3I.cjs");
43
43
  var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
44
- (0, import_chunk_ROZUBUPR.init_optimizer)();
44
+ (0, import_chunk_7CG7CM26.init_optimizer)();
45
45
  // Annotate the CommonJS export names for ESM import in node:
46
46
  0 && (module.exports = {
47
47
  StateNodeAttributes,
@@ -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: () => import_chunk_ROZUBUPR.SectionKinds,
22
- appSupport: () => import_chunk_ROZUBUPR.appSupport,
23
- connectiq: () => import_chunk_ROZUBUPR.connectiq,
24
- getDeviceInfo: () => import_chunk_ROZUBUPR.getDeviceInfo,
25
- getFunctionDocumentation: () => import_chunk_ROZUBUPR.getFunctionDocumentation,
26
- getLanguages: () => import_chunk_ROZUBUPR.getLanguages,
27
- getSdkPath: () => import_chunk_ROZUBUPR.getSdkPath,
28
- isWin: () => import_chunk_ROZUBUPR.isWin,
29
- optimizeProgram: () => import_chunk_ROZUBUPR.optimizeProgram,
30
- readPrg: () => import_chunk_ROZUBUPR.readPrg,
31
- readPrgWithOffsets: () => import_chunk_ROZUBUPR.readPrgWithOffsets,
32
- xmlUtil: () => import_chunk_ROZUBUPR.xml_util_exports
21
+ SectionKinds: () => import_chunk_7CG7CM26.SectionKinds,
22
+ appSupport: () => import_chunk_7CG7CM26.appSupport,
23
+ connectiq: () => import_chunk_7CG7CM26.connectiq,
24
+ getDeviceInfo: () => import_chunk_7CG7CM26.getDeviceInfo,
25
+ getFunctionDocumentation: () => import_chunk_7CG7CM26.getFunctionDocumentation,
26
+ getLanguages: () => import_chunk_7CG7CM26.getLanguages,
27
+ getSdkPath: () => import_chunk_7CG7CM26.getSdkPath,
28
+ isWin: () => import_chunk_7CG7CM26.isWin,
29
+ optimizeProgram: () => import_chunk_7CG7CM26.optimizeProgram,
30
+ readPrg: () => import_chunk_7CG7CM26.readPrg,
31
+ readPrgWithOffsets: () => import_chunk_7CG7CM26.readPrgWithOffsets,
32
+ xmlUtil: () => import_chunk_7CG7CM26.xml_util_exports
33
33
  });
34
34
  module.exports = __toCommonJS(sdk_util_exports);
35
- var import_chunk_ROZUBUPR = require("./chunk-ROZUBUPR.cjs");
35
+ var import_chunk_7CG7CM26 = require("./chunk-7CG7CM26.cjs");
36
36
  var import_chunk_X7QCZR3F = require("./chunk-X7QCZR3F.cjs");
37
37
  var import_chunk_JDC43A3I = require("./chunk-JDC43A3I.cjs");
38
38
  var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
39
- (0, import_chunk_ROZUBUPR.init_sdk_util)();
39
+ (0, import_chunk_7CG7CM26.init_sdk_util)();
40
40
  // Annotate the CommonJS export names for ESM import in node:
41
41
  0 && (module.exports = {
42
42
  SectionKinds,
@@ -0,0 +1,34 @@
1
+ import { JungleQualifier, JungleResourceMap, Target } from "./jungles";
2
+ import { BuildConfig, ExcludeAnnotationsMap, FilesToOptimizeMap, ProgramStateAnalysis } from "./optimizer-types";
3
+ import { xmlUtil } from "./sdk-util";
4
+ import { TypeMap } from "./type-flow/interp";
5
+ export type PreAnalysis = {
6
+ fnMap: FilesToOptimizeMap;
7
+ paths: string[];
8
+ };
9
+ export type Analysis = {
10
+ fnMap: FilesToOptimizeMap;
11
+ paths: string[];
12
+ state: ProgramStateAnalysis;
13
+ typeMap?: TypeMap | null | undefined;
14
+ };
15
+ export declare function relative_path_no_dotdot(relative: string): string;
16
+ type GlobCache = Map<string, Promise<string[]>>;
17
+ export declare function fileInfoFromConfig(workspace: string, buildDir: string, output: string, buildConfig: JungleQualifier, extraExcludes: ExcludeAnnotationsMap, barrel: string, cache?: GlobCache): Promise<PreAnalysis>;
18
+ /**
19
+ * A barrel can specify a list of possible annotations, and the
20
+ * jungle that requests the barrel can specify the annotations it wants.
21
+ *
22
+ * We should exclude all the possible annotations that weren't explicitly
23
+ * requested.
24
+ */
25
+ export declare function excludesFromAnnotations(baseAnnotations: string[] | undefined, barrelAnnotations: string[] | undefined): {
26
+ [k: string]: boolean;
27
+ };
28
+ export declare function getProjectAnalysisHelper(targets: Target[], analysis: PreAnalysis | null, manifestXML: xmlUtil.Document, options: BuildConfig): Promise<Analysis | PreAnalysis>;
29
+ export declare function getFnMapAnalysis(fnMap: FilesToOptimizeMap, resourcesMap: Record<string, JungleResourceMap>, manifestXML: xmlUtil.Document, options: BuildConfig): Promise<{
30
+ fnMap: FilesToOptimizeMap;
31
+ state: ProgramStateAnalysis;
32
+ typeMap: TypeMap | null;
33
+ }>;
34
+ export {};
@@ -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 import_chunk_ROZUBUPR = require("./chunk-ROZUBUPR.cjs");
24
+ var import_chunk_7CG7CM26 = require("./chunk-7CG7CM26.cjs");
25
25
  var import_chunk_X7QCZR3F = require("./chunk-X7QCZR3F.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, import_chunk_ROZUBUPR.init_worker_task)();
31
+ (0, import_chunk_7CG7CM26.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, import_chunk_ROZUBUPR.performTask)(task));
34
+ return import_node_worker_threads.parentPort.postMessage(await (0, import_chunk_7CG7CM26.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.88",
4
+ "version": "1.1.89",
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",