@abaplint/transpiler-cli 2.10.52 → 2.10.53

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/build/bundle.js CHANGED
@@ -80938,6 +80938,9 @@ export async function initializeABAP() {\n`;
80938
80938
  // this will not solve all problems with class constructors 100%, but probably good enough
80939
80939
  late.push(name);
80940
80940
  }
80941
+ else if (obj instanceof abaplint.Objects.Program && obj.isInclude() === true) {
80942
+ continue;
80943
+ }
80941
80944
  else if (obj instanceof abaplint.Objects.Interface
80942
80945
  || obj instanceof abaplint.Objects.FunctionGroup
80943
80946
  || obj instanceof abaplint.Objects.Program
@@ -100509,7 +100512,8 @@ function loadLib(config) {
100509
100512
  }
100510
100513
  return files;
100511
100514
  }
100512
- function writeObjects(objects, writeSourceMaps, outputFolder, files) {
100515
+ function writeObjects(objects, config, outputFolder, files) {
100516
+ const writeSourceMaps = config.write_source_map || false;
100513
100517
  for (const o of objects) {
100514
100518
  let contents = o.chunk.getCode();
100515
100519
  if (writeSourceMaps === true
@@ -100535,7 +100539,7 @@ function writeObjects(objects, writeSourceMaps, outputFolder, files) {
100535
100539
  }
100536
100540
  fs.writeFileSync(outputFolder + path.sep + name, map);
100537
100541
  }
100538
- if (o.object.type.toUpperCase() === "PROG") {
100542
+ if (o.object.type.toUpperCase() === "PROG" && config.no_top_level_prog !== true) {
100539
100543
  // hmm, will this work for INCLUDEs ?
100540
100544
  contents = `await import("./_init.mjs");\n` + contents;
100541
100545
  }
@@ -100563,7 +100567,7 @@ async function run() {
100563
100567
  if (!fs.existsSync(outputFolder)) {
100564
100568
  fs.mkdirSync(outputFolder);
100565
100569
  }
100566
- writeObjects(output.objects, config.write_source_map || false, outputFolder, files);
100570
+ writeObjects(output.objects, config, outputFolder, files);
100567
100571
  console.log(output.objects.length + " objects written to disk");
100568
100572
  if (config.write_unit_tests === true) {
100569
100573
  // breaking change? rename this output file,
package/build/types.d.ts CHANGED
@@ -15,5 +15,6 @@ export interface ITranspilerConfig {
15
15
  }[];
16
16
  write_unit_tests?: boolean;
17
17
  write_source_map?: boolean;
18
+ no_top_level_prog?: boolean;
18
19
  options: ITranspilerOptions;
19
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.10.52",
3
+ "version": "2.10.53",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -28,7 +28,7 @@
28
28
  "license": "MIT",
29
29
  "devDependencies": {
30
30
  "@abaplint/core": "^2.113.114",
31
- "@abaplint/transpiler": "^2.10.52",
31
+ "@abaplint/transpiler": "^2.10.53",
32
32
  "@types/glob": "^8.1.0",
33
33
  "@types/node": "^22.15.18",
34
34
  "@types/progress": "^2.0.7",