@qooxdoo/framework 7.0.0-beta.1 → 7.0.0-beta.5

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.
Files changed (113) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/Manifest.json +2 -2
  3. package/bin/deploy/qx +0 -0
  4. package/lib/compiler/compile-info.json +59 -60
  5. package/lib/compiler/index.js +636 -7815
  6. package/lib/resource/qx/tool/cli/templates/loader/loader-node.tmpl.js +3 -1
  7. package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/theme/custom/css/custom.css +1 -1
  8. package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/theme/custom/css/custom.css.map +1 -1
  9. package/lib/resource/qx/tool/cli/templates/template_vars.js +1 -1
  10. package/lib/resource/qx/tool/loadsass.js +2 -10
  11. package/lib/resource/qx/tool/schema/Manifest-1-0-0.json +1 -2
  12. package/lib/resource/qx/tool/schema/Manifest-2-0-0.json +1 -2
  13. package/lib/resource/qx/tool/schema/compile-1-0-0.json +3 -7
  14. package/package.json +11 -11
  15. package/source/class/qx/test/type/BaseString.js +7 -0
  16. package/source/class/qx/test/ui/embed/Iframe.js +1 -0
  17. package/source/class/qx/test/ui/form/ComboBox.js +0 -42
  18. package/source/class/qx/theme/manager/Decoration.js +0 -0
  19. package/source/class/qx/theme/tangible/ColorDark.js +0 -0
  20. package/source/class/qx/tool/cli/Cli.js +5 -3
  21. package/source/class/qx/tool/cli/api/CompilerApi.js +15 -5
  22. package/source/class/qx/tool/cli/commands/Command.js +7 -0
  23. package/source/class/qx/tool/cli/commands/Compile.js +6 -6
  24. package/source/class/qx/tool/cli/commands/Lint.js +30 -11
  25. package/source/class/qx/tool/cli/commands/Package.js +1 -2
  26. package/source/class/qx/tool/cli/commands/package/Publish.js +19 -10
  27. package/source/class/qx/tool/compiler/Analyser.js +21 -22
  28. package/source/class/qx/tool/compiler/app/WebFont.js +1 -1
  29. package/source/class/qx/tool/compiler/makers/AppMaker.js +13 -13
  30. package/source/class/qx/tool/compiler/targets/TypeScriptWriter.js +1 -2
  31. package/source/class/qx/tool/compiler/targets/meta/PolyfillJs.js +7 -7
  32. package/source/class/qx/tool/config/Abstract.js +3 -3
  33. package/source/class/qx/tool/config/Utils.js +10 -1
  34. package/source/class/qx/tool/utils/Json.js +1 -1
  35. package/source/class/qx/type/BaseString.js +2 -1
  36. package/source/class/qx/ui/container/SlideBar.js +3 -0
  37. package/source/class/qx/ui/core/Widget.js +70 -0
  38. package/source/class/qx/ui/core/scroll/NativeScrollBar.js +3 -0
  39. package/source/class/qx/ui/core/scroll/ScrollBar.js +3 -0
  40. package/source/class/qx/ui/form/AbstractSelectBox.js +38 -6
  41. package/source/class/qx/ui/form/Button.js +3 -0
  42. package/source/class/qx/ui/form/CheckBox.js +25 -1
  43. package/source/class/qx/ui/form/ComboBox.js +36 -27
  44. package/source/class/qx/ui/form/DateField.js +16 -1
  45. package/source/class/qx/ui/form/List.js +3 -0
  46. package/source/class/qx/ui/form/MenuButton.js +24 -2
  47. package/source/class/qx/ui/form/RadioButton.js +7 -0
  48. package/source/class/qx/ui/form/RadioButtonGroup.js +3 -0
  49. package/source/class/qx/ui/form/RadioGroup.js +19 -0
  50. package/source/class/qx/ui/form/SelectBox.js +23 -1
  51. package/source/class/qx/ui/form/Slider.js +15 -0
  52. package/source/class/qx/ui/form/SplitButton.js +3 -0
  53. package/source/class/qx/ui/form/ToggleButton.js +8 -0
  54. package/source/class/qx/ui/menu/AbstractButton.js +24 -0
  55. package/source/class/qx/ui/menu/Button.js +3 -0
  56. package/source/class/qx/ui/menu/CheckBox.js +8 -0
  57. package/source/class/qx/ui/menu/Manager.js +2 -0
  58. package/source/class/qx/ui/menu/Menu.js +63 -1
  59. package/source/class/qx/ui/menu/RadioButton.js +10 -1
  60. package/source/class/qx/ui/menubar/Button.js +0 -27
  61. package/source/class/qx/ui/menubar/MenuBar.js +12 -0
  62. package/source/class/qx/ui/splitpane/Blocker.js +3 -0
  63. package/source/class/qx/ui/splitpane/Pane.js +3 -0
  64. package/source/class/qx/ui/table/Table.js +24 -2
  65. package/source/class/qx/ui/table/cellrenderer/Abstract.js +3 -1
  66. package/source/class/qx/ui/table/cellrenderer/AbstractImage.js +7 -3
  67. package/source/class/qx/ui/table/headerrenderer/HeaderCell.js +3 -0
  68. package/source/class/qx/ui/table/pane/Header.js +3 -0
  69. package/source/class/qx/ui/table/pane/Scroller.js +3 -7
  70. package/source/class/qx/ui/table/rowrenderer/Default.js +1 -1
  71. package/source/class/qx/ui/tabview/Page.js +26 -0
  72. package/source/class/qx/ui/tabview/TabView.js +3 -0
  73. package/source/class/qx/ui/toolbar/Button.js +2 -27
  74. package/source/class/qx/ui/toolbar/CheckBox.js +0 -27
  75. package/source/class/qx/ui/toolbar/RadioButton.js +21 -0
  76. package/source/class/qx/ui/toolbar/SplitButton.js +0 -28
  77. package/source/class/qx/ui/toolbar/ToolBar.js +3 -0
  78. package/source/class/qx/ui/window/Window.js +8 -0
  79. package/source/class/qxWeb.js +2 -0
  80. package/source/resource/qx/decoration/Indigo/font/JosefinSlab-SemiBold.ttf +0 -0
  81. package/source/resource/qx/decoration/Indigo/font/SIL Open Font License 1.1.txt +0 -0
  82. package/source/resource/qx/iconfont/MaterialIcons/fetch-fonts.sh +0 -0
  83. package/source/resource/qx/mobile/scss/common/_gradients.scss +3 -1
  84. package/source/resource/qx/mobile/scss/theme/indigo/_styles.scss +1 -1
  85. package/source/resource/qx/mobile/scss/ui/_carousel.scss +2 -2
  86. package/source/resource/qx/mobile/scss/ui/_checkbox.scss +3 -3
  87. package/source/resource/qx/mobile/scss/ui/_collapsible.scss +2 -2
  88. package/source/resource/qx/mobile/scss/ui/_picker.scss +4 -4
  89. package/source/resource/qx/mobile/scss/ui/_radiobutton.scss +4 -4
  90. package/source/resource/qx/mobile/scss/ui/_slider.scss +7 -7
  91. package/source/resource/qx/scss/_gradients.scss +3 -1
  92. package/source/resource/qx/scss/_mixins.scss +4 -2
  93. package/source/resource/qx/tool/bin/build-devtools +0 -0
  94. package/source/resource/qx/tool/bin/build-website +0 -0
  95. package/source/resource/qx/tool/bin/download-assets +0 -0
  96. package/source/resource/qx/tool/cli/templates/loader/loader-node.tmpl.js +3 -1
  97. package/source/resource/qx/tool/cli/templates/skeleton/mobile/source/theme/custom/scss/_styles.scss +1 -1
  98. package/source/resource/qx/tool/cli/templates/template_vars.js +1 -1
  99. package/source/resource/qx/tool/loadsass.js +2 -10
  100. package/source/resource/qx/tool/schema/Manifest-1-0-0.json +1 -2
  101. package/source/resource/qx/tool/schema/Manifest-2-0-0.json +1 -2
  102. package/source/resource/qx/tool/schema/compile-1-0-0.json +3 -7
  103. package/source/resource/qx/website/scss/ui/_carousel.scss +2 -2
  104. package/lib/resource/qx/tool/website/.gitignore +0 -2
  105. package/source/class/qx/io/request/auth/.gitignore +0 -0
  106. package/source/class/qx/test/bom/client/.gitignore +0 -0
  107. package/source/class/qx/test/ui/control/.gitignore +0 -0
  108. package/source/class/qx/tool/compiler/Version.js +0 -20
  109. package/source/resource/qx/decoration/Modern/treevirtual/.gitignore +0 -0
  110. package/source/resource/qx/mobile/css/.gitignore +0 -3
  111. package/source/resource/qx/tool/website/.gitignore +0 -2
  112. package/source/resource/qx/website/.gitignore +0 -1
  113. package/source/resource/qx/website/scss/.gitignore +0 -1
@@ -239,7 +239,9 @@ Version: v${await qx.tool.config.Utils.getQxVersion()}
239
239
  this._compilerApi.setCommand(command);
240
240
  await this.__notifyLibraries();
241
241
  try {
242
- return await command.process();
242
+ const res = await command.process();
243
+ await this._compilerApi.afterProcessFinished(command, res);
244
+ return res;
243
245
  } catch (e) {
244
246
  qx.tool.compiler.Console.error("Error: " + (e.stack || e.message));
245
247
  process.exit(1);
@@ -420,8 +422,8 @@ Version: v${await qx.tool.config.Utils.getQxVersion()}
420
422
  if (config.libraries && needLibraries) {
421
423
  let neededLibraries = config.libraries.filter(libData => !fs.existsSync(libData + "/Manifest.json"));
422
424
  if (neededLibraries.length) {
423
- if (!fs.existsSync(qx.tool.config.Manifest.config.fileName)) {
424
- qx.tool.compiler.Console.error("Libraries are missing and there is no Manifest.json in the current directory so we cannot attempt to install them; the missing libraries are: \n " + neededLibraries.join("\n "));
425
+ if (!fs.existsSync(qx.tool.config.Manifest.config.fileName)) {
426
+ qx.tool.compiler.Console.error("Libraries are missing and there is no Manifest.json in the current directory so we cannot attempt to install them; the missing libraries are: \n " + neededLibraries.join("\n "));
425
427
  process.exit(1);
426
428
  }
427
429
  qx.tool.compiler.Console.info("One or more libraries not found - trying to install them from library repository...");
@@ -25,7 +25,7 @@ const fs = qx.tool.utils.Promisify.fs;
25
25
 
26
26
  /**
27
27
  * Provides an API for the compiler
28
- *
28
+ *
29
29
  */
30
30
  qx.Class.define("qx.tool.cli.api.CompilerApi", {
31
31
  extend: qx.tool.cli.api.AbstractApi,
@@ -75,7 +75,7 @@ qx.Class.define("qx.tool.cli.api.CompilerApi", {
75
75
 
76
76
  /**
77
77
  * called after deployment happens
78
- *
78
+ *
79
79
  * @param data {Object} contains deployment infos with the following properties:
80
80
  * targetDir : {String} The target dir of the build
81
81
  * deployDir : {String} The output dir for the deployment
@@ -89,7 +89,7 @@ qx.Class.define("qx.tool.cli.api.CompilerApi", {
89
89
 
90
90
  /**
91
91
  * Loads the configuration data
92
- *
92
+ *
93
93
  * @overridden
94
94
  */
95
95
  async load() {
@@ -102,6 +102,16 @@ qx.Class.define("qx.tool.cli.api.CompilerApi", {
102
102
  return this.base(arguments);
103
103
  },
104
104
 
105
+ /**
106
+ * runs after the whole process is finished
107
+ * @param cmd {qx.tool.cli.commands.Command} current command
108
+ * @param res {boolean} result of the just finished process
109
+ */
110
+ async afterProcessFinished(cmd, res) {
111
+ // Nothing
112
+ },
113
+
114
+
105
115
  /**
106
116
  * Called after all libraries have been loaded and added to the compilation data
107
117
  */
@@ -113,7 +123,7 @@ qx.Class.define("qx.tool.cli.api.CompilerApi", {
113
123
 
114
124
  /**
115
125
  * Adds a library configuration
116
- *
126
+ *
117
127
  * @param libraryApi {LibraryApi} the configuration for the library
118
128
  */
119
129
  addLibraryApi(libraryApi) {
@@ -123,7 +133,7 @@ qx.Class.define("qx.tool.cli.api.CompilerApi", {
123
133
 
124
134
  /**
125
135
  * Returns an array of library configurations
126
- *
136
+ *
127
137
  * @return {LibraryApi[]}
128
138
  */
129
139
  getLibraryApis() {
@@ -127,6 +127,13 @@ qx.Class.define("qx.tool.cli.commands.Command", {
127
127
  */
128
128
  getQxPath: qx.tool.config.Utils.getQxPath.bind(qx.tool.config.Utils),
129
129
 
130
+ /**
131
+ *
132
+ * @returns @see {@link qx.tool.config.Utils#getCompilerVersion}
133
+ */
134
+ getCompilerVersion() {
135
+ return qx.tool.config.Utils.getCompilerVersion();
136
+ },
130
137
 
131
138
  /**
132
139
  * Returns the qooxdoo version, either from the `--qx-version` command line
@@ -326,7 +326,7 @@ qx.Class.define("qx.tool.cli.commands.Compile", {
326
326
 
327
327
  if (this.argv.verbose) {
328
328
  console.log(`
329
- Compiler: v${qx.tool.compiler.Version.VERSION} in ${require.main.filename}
329
+ Compiler: v${this.getCompilerVersion()} in ${require.main.filename}
330
330
  Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
331
331
  }
332
332
 
@@ -628,7 +628,7 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
628
628
  }
629
629
  if (appConfig.group) {
630
630
  if (typeof appConfig.group == "string") {
631
- appConfig.group = [ appConfig.group ];
631
+ appConfig.group = [ appConfig.group ];
632
632
  }
633
633
  }
634
634
  appConfig.index = index;
@@ -1076,15 +1076,15 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
1076
1076
  let requires_uris = Object.getOwnPropertyNames(requires)
1077
1077
  .filter(uri => !libs.find(lib => lib.getLibraryInfo().name === uri));
1078
1078
 
1079
- let urisToInstall = requires_uris.filter(name => name !== "@qooxdoo/framework");
1079
+ let urisToInstall = requires_uris.filter(name => (name !== "@qooxdoo/framework") && (name !== "@qooxdoo/compiler"));
1080
1080
 
1081
1081
  let pkg_libs = Object.getOwnPropertyNames(packages);
1082
1082
  if (urisToInstall.length > 0 && pkg_libs.length === 0) {
1083
1083
  // if we don't have package data
1084
1084
  if (this.argv.download) {
1085
- if (!fs.existsSync(qx.tool.config.Manifest.config.fileName)) {
1086
- Console.error("Libraries are missing and there is no Manifest.json in the current directory so we cannot attempt to install them; the missing libraries are: \n " +
1087
- urisToInstall.join("\n ") + "\nThe library which refers to the missing libraries is " + lib.getNamespace() + " in " + lib.getRootDir());
1085
+ if (!fs.existsSync(qx.tool.config.Manifest.config.fileName)) {
1086
+ Console.error("Libraries are missing and there is no Manifest.json in the current directory so we cannot attempt to install them; the missing libraries are: \n " +
1087
+ urisToInstall.join("\n ") + "\nThe library which refers to the missing libraries is " + lib.getNamespace() + " in " + lib.getRootDir());
1088
1088
  process.exit(1);
1089
1089
  }
1090
1090
  // but we're instructed to download the libraries
@@ -16,8 +16,9 @@
16
16
 
17
17
  ************************************************************************ */
18
18
 
19
- const CLIEngine = require("eslint").CLIEngine;
19
+ const {ESLint} = require("eslint");
20
20
  const fs = qx.tool.utils.Promisify.fs;
21
+ const path = require("path");
21
22
  const replaceInFile = require("replace-in-file");
22
23
 
23
24
  qx.Class.define("qx.tool.cli.commands.Lint", {
@@ -85,12 +86,21 @@ qx.Class.define("qx.tool.cli.commands.Lint", {
85
86
 
86
87
  process: async function() {
87
88
  await this.__applyFixes();
88
- let config;
89
- config = await qx.tool.cli.Cli.getInstance().getParsedArgs();
89
+
90
+ let helperFilePath = require.main.path;
91
+ while (true) {
92
+ if (await fs.existsAsync(path.join(helperFilePath, "node_modules"))) {
93
+ break;
94
+ }
95
+ helperFilePath = path.dirname(helperFilePath);
96
+ }
97
+
98
+ let config = await qx.tool.cli.Cli.getInstance().getParsedArgs();
90
99
  let lintOptions = config.eslintConfig || {};
91
100
  lintOptions.extends = lintOptions.extends || ["@qooxdoo/qx/browser"];
92
101
  lintOptions.globals = Object.assign(lintOptions.globals || {}, await this.__addGlobals(config));
93
- let linter = new CLIEngine({
102
+ let linter = new ESLint({
103
+ cwd: helperFilePath,
94
104
  cache: this.argv.cache || false,
95
105
  baseConfig: lintOptions,
96
106
  useEslintrc: this.argv.useEslintrc,
@@ -98,15 +108,24 @@ qx.Class.define("qx.tool.cli.commands.Lint", {
98
108
  });
99
109
  let files = this.argv.files || [];
100
110
  if (files.length === 0) {
101
- files.push("source/class/");
111
+ files.push("source/class/**/*.js");
112
+ }
113
+ for (let i = 0; i < files.length; i++) {
114
+ files[i] = path.join(process.cwd(), files[i]);
102
115
  }
103
- if (this.argv.config) {
104
- const fileConfig = linter.getConfigForFile(files[0]);
116
+ if (this.argv.printConfig) {
117
+ const fileConfig = await linter.calculateConfigForFile(files[0]);
105
118
  qx.tool.compiler.Console.info(JSON.stringify(fileConfig, null, " "));
106
119
  } else {
107
- let report = linter.executeOnFiles(files);
120
+ let report = await linter.lintFiles(files);
121
+ report.errorCount = 0;
122
+ report.warningCount =0;
123
+ for (const r of report) {
124
+ report.errorCount += r.errorCount;
125
+ report.warningCount += r.warningCount;
126
+ }
108
127
  if (this.argv.fix) {
109
- CLIEngine.outputFixes(report);
128
+ await ESLint.outputFixes(report);
110
129
  }
111
130
  if (report.errorCount > 0 || report.warningCount > 0) {
112
131
  let outputFormat = this.argv.format || "codeframe";
@@ -115,8 +134,8 @@ qx.Class.define("qx.tool.cli.commands.Lint", {
115
134
  if (report.errorCount + report.warningCount > 150) {
116
135
  outputFormat = "compact";
117
136
  }
118
- const formatter = linter.getFormatter(outputFormat);
119
- const s = formatter(report.results);
137
+ const formatter = await linter.loadFormatter(outputFormat);
138
+ const s = formatter.format(report);
120
139
  if (this.argv.outputFile) {
121
140
  if (this.argv.verbose) {
122
141
  qx.tool.compiler.Console.info(`Report to be written to ${this.argv.outputFile}`);
@@ -18,7 +18,6 @@
18
18
  const fs = qx.tool.utils.Promisify.fs;
19
19
  const path = require("upath");
20
20
  const process = require("process");
21
- const jsonlint = require("jsonlint");
22
21
  const stringify = require("json-stable-stringify");
23
22
 
24
23
  /**
@@ -213,7 +212,7 @@ qx.Class.define("qx.tool.cli.commands.Package", {
213
212
  return this.__cache;
214
213
  }
215
214
  try {
216
- this.__cache = jsonlint.parse(fs.readFileSync(this.getCachePath(), "UTF-8"));
215
+ this.__cache = JSON.parse(fs.readFileSync(this.getCachePath(), "UTF-8"));
217
216
  } catch (e) {
218
217
  this.__cache = {
219
218
  repos : {
@@ -39,10 +39,8 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
39
39
  alias : "t",
40
40
  describe: "Set the release type",
41
41
  nargs: 1,
42
- requiresArg: true,
43
42
  choices: "major,premajor,minor,preminor,patch,prepatch,prerelease".split(/,/),
44
- type: "string",
45
- default : "patch"
43
+ type: "string"
46
44
  },
47
45
  "noninteractive":{
48
46
  alias: "I",
@@ -121,7 +119,10 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
121
119
  const argv = this.argv;
122
120
 
123
121
  // qooxdoo version
124
- let qxVersion = await this.getAppQxVersion();
122
+ let qxVersion = await this.getQxVersion();
123
+ if (fs.existsSync("Manifest.json")) {
124
+ qxVersion = await this.getAppQxVersion();
125
+ }
125
126
  if (argv.verbose) {
126
127
  this.info(`Using qooxdoo version: ${qxVersion}`);
127
128
  }
@@ -210,6 +211,7 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
210
211
  }
211
212
 
212
213
  // version
214
+ let old_version = mainManifestModel.getValue("info.version");
213
215
  let new_version;
214
216
  if (argv.useVersion) {
215
217
  // use user-supplied value
@@ -220,10 +222,17 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
220
222
  new_version = new_version.toString();
221
223
  } else {
222
224
  // use version number from manifest and increment it
223
- let old_version = mainManifestModel.getValue("info.version");
224
225
  if (!semver.valid(old_version)) {
225
226
  throw new qx.tool.utils.Utils.UserError("Invalid version number in Manifest. Must be a valid semver version (x.y.z).");
226
227
  }
228
+ if (!argv.type) {
229
+ argv.type = (semver.prerelease(old_version)) ? "prerelease" : "patch";
230
+ }
231
+ argv.prerelease = Boolean(argv.prerelease)
232
+ || (argv.type === "prerelease")
233
+ || (argv.type === "prepatch")
234
+ || (argv.type === "preminor")
235
+ || (argv.type === "premajor");
227
236
  new_version = semver.inc(old_version, argv.type);
228
237
  }
229
238
 
@@ -286,7 +295,7 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
286
295
  let question = {
287
296
  type: "confirm",
288
297
  name: "doRelease",
289
- message: `This will ${argv.version?"set":"increment"} the version to ${new_version}, having a dependency on qooxdoo ${semver_range}, and create a release of the current master on GitHub. Do you want to proceed?`,
298
+ message: `This will ${argv.version?"set":"increment"} the version from ${old_version} to ${new_version}, having a dependency on qooxdoo ${semver_range}, and create a release of the current master on GitHub. Do you want to proceed?`,
290
299
  default: "y"
291
300
  };
292
301
  let answer = await inquirer.prompt(question);
@@ -306,7 +315,7 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
306
315
  if (argv.dryrun) {
307
316
  if (!argv.quiet) {
308
317
  qx.tool.compiler.Console.info(`Dry run: Not committing ${manifestModel.getRelativeDataPath()} with the following content:`);
309
- qx.tool.compiler.Console.info(manifestModel.getData());
318
+ qx.tool.compiler.Console.info(JSON.stringify(manifestModel.getData(), null, 2));
310
319
  }
311
320
  } else {
312
321
  manifestModel.save();
@@ -330,7 +339,7 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
330
339
 
331
340
  if (argv.dryrun) {
332
341
  qx.tool.compiler.Console.info(`Dry run: not creating tag and release '${tag}' of ${repo_name}...`);
333
- process.exit(0);
342
+ return;
334
343
  }
335
344
 
336
345
  // commit message
@@ -368,7 +377,7 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
368
377
  name: tag,
369
378
  body: message,
370
379
  draft: false,
371
- prerelease: Boolean(argv.prerelease)
380
+ prerelease: argv.prerelease
372
381
  };
373
382
  await octokit.repos.createRelease(release_data);
374
383
  if (!argv.quiet) {
@@ -388,7 +397,7 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
388
397
  qx.tool.compiler.Console.info(`Added GitHub topic '${topic}'.`);
389
398
  }
390
399
  }
391
- await run("git", ["pull"]);
400
+ run("git", ["pull"]);
392
401
  },
393
402
 
394
403
  /**
@@ -27,7 +27,6 @@
27
27
  var fs = require("fs");
28
28
  var async = require("async");
29
29
 
30
- var jsonlint = require("jsonlint");
31
30
  var hash = require("object-hash");
32
31
 
33
32
  const {promisify} = require("util");
@@ -104,7 +103,7 @@ qx.Class.define("qx.tool.compiler.Analyser", {
104
103
  check: "Map",
105
104
  apply: "_applyEnvironment"
106
105
  },
107
-
106
+
108
107
  /** configuration of babel */
109
108
  babelConfig: {
110
109
  init: null,
@@ -125,7 +124,7 @@ qx.Class.define("qx.tool.compiler.Analyser", {
125
124
  nullable: false,
126
125
  check: "Array"
127
126
  },
128
-
127
+
129
128
  /** Whether and how to mangle private identifiers */
130
129
  manglePrivates: {
131
130
  init: "readable",
@@ -353,11 +352,11 @@ qx.Class.define("qx.tool.compiler.Analyser", {
353
352
 
354
353
  compiledClasses[data.classFile.getClassName()] = data;
355
354
  });
356
-
355
+
357
356
  // Note that it is important to pre-load the classes in all libraries - this is because
358
357
  // Babel plugins MUST be synchronous (ie cannot afford an async lookup of files on disk
359
358
  // in mid parse)
360
- await qx.tool.utils.Promisify.map(this.__libraries, async library =>
359
+ await qx.tool.utils.Promisify.map(this.__libraries, async library =>
361
360
  qx.tool.utils.Promisify.call(cb => library.scanForClasses(cb))
362
361
  );
363
362
 
@@ -390,7 +389,7 @@ qx.Class.define("qx.tool.compiler.Analyser", {
390
389
  }
391
390
  return deps;
392
391
  }
393
-
392
+
394
393
  for (var classIndex = 0; classIndex < classes.length; classIndex++) {
395
394
  try {
396
395
  let dbClassInfo = await qx.tool.utils.Promisify.call(cb => t.getClassInfo(classes[classIndex], cb));
@@ -679,7 +678,7 @@ qx.Class.define("qx.tool.compiler.Analyser", {
679
678
  eventMeta.overriddenFrom = eventInfo.overriddenFrom;
680
679
  }
681
680
  }
682
- }
681
+ }
683
682
 
684
683
  if (meta.properties) {
685
684
  for (let propertyName in meta.properties) {
@@ -695,7 +694,7 @@ qx.Class.define("qx.tool.compiler.Analyser", {
695
694
  }
696
695
  }
697
696
  }
698
-
697
+
699
698
  for (let propertyName in classEntities.properties) {
700
699
  let propertyInfo = classEntities.properties[propertyName];
701
700
  if ((propertyInfo.abstract || propertyInfo.mixin) && !meta.properties[propertyName]) {
@@ -809,7 +808,7 @@ qx.Class.define("qx.tool.compiler.Analyser", {
809
808
  }
810
809
  var filename = qx.tool.compiler.ClassFile.getOutputPath(t, classname) + "on";
811
810
  return readFile(filename, {encoding: "utf-8"})
812
- .then(str => jsonlint.parse(str))
811
+ .then(str => JSON.parse(str))
813
812
  .then(meta => cachedMeta[classname] = meta)
814
813
  .catch(err => {
815
814
  qx.tool.compiler.Console.error("Failed to load meta for " + classname + ": " + err);
@@ -857,7 +856,7 @@ qx.Class.define("qx.tool.compiler.Analyser", {
857
856
 
858
857
  await Promise.all(Object.keys(toSave).map(classname => saveMetaData(classname, toSave[classname])));
859
858
  }
860
-
859
+
861
860
  return await analyzeMeta();
862
861
  },
863
862
 
@@ -1025,24 +1024,24 @@ qx.Class.define("qx.tool.compiler.Analyser", {
1025
1024
  libraries = [];
1026
1025
  }
1027
1026
  libraries = libraries.filter(lib => lib != appLibrary);
1028
-
1027
+
1029
1028
  await qx.Promise.all(locales.map(async locale => {
1030
1029
  let libTranslations = {};
1031
1030
  await qx.Promise.all(libraries.map(async lib => {
1032
1031
  var translation = new qx.tool.compiler.app.Translation(lib, locale);
1033
1032
  await translation.read();
1034
- libTranslations[lib.toHashCode()] = translation;
1033
+ libTranslations[lib.toHashCode()] = translation;
1035
1034
  }));
1036
-
1035
+
1037
1036
  var translation = new qx.tool.compiler.app.Translation(appLibrary, locale);
1038
1037
  translation.setWriteLineNumbers(this.isWritePoLineNumbers());
1039
1038
  await translation.read();
1040
-
1039
+
1041
1040
  let unusedEntries = {};
1042
1041
  for (let msgid in translation.getEntries()) {
1043
1042
  unusedEntries[msgid] = true;
1044
1043
  }
1045
-
1044
+
1046
1045
  await qx.Promise.all(this.__classes.map(async classname => {
1047
1046
  let isAppClass = appLibrary.isClass(classname);
1048
1047
  let classLibrary = !isAppClass && libraries.find(lib => lib.isClass(classname)) || null;
@@ -1054,7 +1053,7 @@ qx.Class.define("qx.tool.compiler.Analyser", {
1054
1053
  if (!dbClassInfo.translations) {
1055
1054
  return;
1056
1055
  }
1057
-
1056
+
1058
1057
  function isEmpty(entry) {
1059
1058
  if (!entry) {
1060
1059
  return true;
@@ -1067,7 +1066,7 @@ qx.Class.define("qx.tool.compiler.Analyser", {
1067
1066
 
1068
1067
  dbClassInfo.translations.forEach(function(src) {
1069
1068
  delete unusedEntries[src.msgid];
1070
-
1069
+
1071
1070
  if (classLibrary) {
1072
1071
  let entry = translation.getEntry(src.msgid);
1073
1072
  if (!isEmpty(entry)) {
@@ -1085,7 +1084,7 @@ qx.Class.define("qx.tool.compiler.Analyser", {
1085
1084
  }
1086
1085
  return;
1087
1086
  }
1088
-
1087
+
1089
1088
  let entry = translation.getOrCreateEntry(src.msgid);
1090
1089
  if (src.msgid_plural) {
1091
1090
  entry.msgid_plural = src.msgid_plural;
@@ -1114,7 +1113,7 @@ qx.Class.define("qx.tool.compiler.Analyser", {
1114
1113
  }
1115
1114
  });
1116
1115
  }));
1117
-
1116
+
1118
1117
  Object.keys(unusedEntries).forEach(msgid => {
1119
1118
  var entry = translation.getEntry(msgid);
1120
1119
  if (entry) {
@@ -1129,7 +1128,7 @@ qx.Class.define("qx.tool.compiler.Analyser", {
1129
1128
  }
1130
1129
  }
1131
1130
  });
1132
-
1131
+
1133
1132
  await translation.write();
1134
1133
  }));
1135
1134
  },
@@ -1345,7 +1344,7 @@ qx.Class.define("qx.tool.compiler.Analyser", {
1345
1344
  }
1346
1345
 
1347
1346
  // then check if compiler version is the same
1348
- if (db.compilerVersion !== qx.tool.compiler.Version.VERSION) {
1347
+ if (db.compilerVersion !== qx.tool.config.Utils.getCompilerVersion()) {
1349
1348
  return true;
1350
1349
  }
1351
1350
 
@@ -1370,7 +1369,7 @@ qx.Class.define("qx.tool.compiler.Analyser", {
1370
1369
 
1371
1370
  db.libraries = libraries;
1372
1371
  db.environmentHash = this.__environmentHash;
1373
- db.compilerVersion = qx.tool.compiler.Version.VERSION;
1372
+ db.compilerVersion = qx.tool.config.Utils.getCompilerVersion();
1374
1373
  }
1375
1374
  }
1376
1375
  });
@@ -23,7 +23,7 @@ const fs = require("fs");
23
23
  const path = require("path");
24
24
  const tmp = require("tmp");
25
25
  const http = require("http");
26
- const fontkit = require("fontkit");
26
+ const fontkit = require("@foliojs-fork/fontkit");
27
27
 
28
28
  var log = qx.tool.utils.LogManager.createLog("font");
29
29
 
@@ -70,7 +70,7 @@ qx.Class.define("qx.tool.compiler.makers.AppMaker", {
70
70
  async make() {
71
71
  var analyser = this.getAnalyser();
72
72
  let target = this.getTarget();
73
-
73
+
74
74
  await this.fireEventAsync("making");
75
75
  this.setSuccess(null);
76
76
  this.setHasWarnings(null);
@@ -82,12 +82,12 @@ qx.Class.define("qx.tool.compiler.makers.AppMaker", {
82
82
  qx.tool.compiler.ClassFile.ENVIRONMENT_CONSTANTS,
83
83
  {
84
84
  "qx.compiler": true,
85
- "qx.compiler.version": qx.tool.compiler.Version.VERSION
85
+ "qx.compiler.version": qx.tool.config.Utils.getCompilerVersion()
86
86
  },
87
87
  this.getEnvironment(),
88
88
  target.getDefaultEnvironment(),
89
89
  target.getEnvironment());
90
-
90
+
91
91
  let preserve = target.getPreserveEnvironment();
92
92
  if (preserve) {
93
93
  let tmp = {};
@@ -101,7 +101,7 @@ qx.Class.define("qx.tool.compiler.makers.AppMaker", {
101
101
  this.getApplications().forEach(app => {
102
102
  appEnvironments[app.toHashCode()] = qx.tool.utils.Values.merge({}, compileEnv, app.getCalculatedEnvironment());
103
103
  });
104
-
104
+
105
105
  // Analyze the list of environment variables, detect which are shared between all apps
106
106
  let allAppEnv = {};
107
107
  this.getApplications().forEach(app => {
@@ -117,7 +117,7 @@ qx.Class.define("qx.tool.compiler.makers.AppMaker", {
117
117
  }
118
118
  });
119
119
  });
120
-
120
+
121
121
  // If an env setting is the same for all apps, move it to the target for code elimination; similarly,
122
122
  // if it varies between apps, then remove it from the target and make each app specify it individually
123
123
  this.getApplications().forEach(app => {
@@ -132,8 +132,8 @@ qx.Class.define("qx.tool.compiler.makers.AppMaker", {
132
132
  }
133
133
  });
134
134
  });
135
-
136
- // Cleanup to remove env that have been moved to the app
135
+
136
+ // Cleanup to remove env that have been moved to the app
137
137
  Object.keys(allAppEnv).forEach(key => {
138
138
  if (!preserve[key] && allAppEnv[key].same) {
139
139
  compileEnv[key] = allAppEnv[key].value;
@@ -150,14 +150,14 @@ qx.Class.define("qx.tool.compiler.makers.AppMaker", {
150
150
  await qx.tool.utils.Utils.makeParentDir(this.getOutputDir());
151
151
  await analyser.resetDatabase();
152
152
  }
153
-
153
+
154
154
  await qx.tool.utils.Utils.promisifyThis(analyser.initialScan, analyser);
155
155
  await analyser.updateEnvironmentData();
156
156
 
157
157
  target.setAnalyser(analyser);
158
158
  this.__applications.forEach(app => app.setAnalyser(analyser));
159
159
  await target.open();
160
-
160
+
161
161
  if (this.isOutputTypescript()) {
162
162
  analyser.getLibraries().forEach(library => {
163
163
  var symbols = library.getKnownSymbols();
@@ -179,7 +179,7 @@ qx.Class.define("qx.tool.compiler.makers.AppMaker", {
179
179
  }
180
180
  });
181
181
  await analyser.analyseClasses();
182
-
182
+
183
183
  await analyser.saveDatabase();
184
184
  await this.fireEventAsync("writingApplications");
185
185
 
@@ -191,11 +191,11 @@ qx.Class.define("qx.tool.compiler.makers.AppMaker", {
191
191
  var appsThisTime = this.__applications.filter(app => {
192
192
  let loadDeps = app.getDependencies();
193
193
  if (!loadDeps || !loadDeps.length) {
194
- return true;
194
+ return true;
195
195
  }
196
196
  return loadDeps.some(name => Boolean(compiledClasses[name]));
197
197
  });
198
-
198
+
199
199
  let allAppInfos = [];
200
200
 
201
201
  let db = analyser.getDatabase();
@@ -244,7 +244,7 @@ qx.Class.define("qx.tool.compiler.makers.AppMaker", {
244
244
  .run()
245
245
  );
246
246
  }
247
-
247
+
248
248
  await analyser.saveDatabase();
249
249
  await this.fireEventAsync("made");
250
250
  this.setSuccess(success);
@@ -24,7 +24,6 @@
24
24
  var path = require("path");
25
25
 
26
26
  var fs = require("fs");
27
- var jsonlint = require("jsonlint");
28
27
  const {promisify} = require("util");
29
28
  const readFile = promisify(fs.readFile);
30
29
  /**
@@ -150,7 +149,7 @@ qx.Class.define("qx.tool.compiler.targets.TypeScriptWriter", {
150
149
  }
151
150
  var fileName = path.join(this.__target.getOutputDir(), "transpiled", classname.replace(/\./g, "/") + ".json");
152
151
  return readFile(fileName, "UTF-8")
153
- .then(content => this.__apiCache[classname] = jsonlint.parse(content))
152
+ .then(content => this.__apiCache[classname] = JSON.parse(content))
154
153
  .catch(err => qx.tool.compiler.Console.error("Error parsing " + classname + ": " + err.stack));
155
154
  },
156
155
 
@@ -24,29 +24,29 @@ const fs = qx.tool.utils.Promisify.fs;
24
24
  const path = require("upath");
25
25
 
26
26
  /**
27
- * Represents a "polyfill.js" that is generated as part of a compile
27
+ * Represents a "polyfill.js" that is generated as part of a compile
28
28
  */
29
29
  qx.Class.define("qx.tool.compiler.targets.meta.PolyfillJs", {
30
30
  extend: qx.tool.compiler.targets.meta.AbstractJavascriptMeta,
31
-
31
+
32
32
  construct(appMeta) {
33
33
  this.base(arguments, appMeta, `${appMeta.getApplicationRoot()}polyfill.js`);
34
34
  },
35
-
35
+
36
36
  properties: {
37
37
  needsWriteToDisk: {
38
38
  init: true,
39
39
  refine: true
40
40
  }
41
41
  },
42
-
42
+
43
43
  members: {
44
-
44
+
45
45
  /*
46
46
  * @Override
47
47
  */
48
48
  async writeSourceCodeToStream(ws) {
49
- const srcFilename = path.join(require.resolve("@babel/polyfill"), "../../dist/polyfill.js");
49
+ const srcFilename = path.join(require.resolve("core-js-bundle"), "../minified.js");
50
50
  let rs = fs.createReadStream(srcFilename, "utf8");
51
51
  await new Promise((resolve, reject) => {
52
52
  rs.on("end", resolve);
@@ -54,7 +54,7 @@ qx.Class.define("qx.tool.compiler.targets.meta.PolyfillJs", {
54
54
  rs.pipe(ws, { end: false });
55
55
  });
56
56
  },
57
-
57
+
58
58
  /*
59
59
  * @Override
60
60
  */