@qooxdoo/framework 7.0.0-beta.8 → 7.0.0-beta.9

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.
@@ -531,11 +531,18 @@
531
531
  }
532
532
  },
533
533
  "@babel/plugin-syntax-jsx": {
534
- "version": "7.16.0",
535
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.16.0.tgz",
536
- "integrity": "sha512-8zv2+xiPHwly31RK4RmnEYY5zziuF3O7W2kIDW+07ewWDh6Oi0dRq8kwvulRkFgt6DB97RlKs5c1y068iPlCUg==",
534
+ "version": "7.16.7",
535
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.16.7.tgz",
536
+ "integrity": "sha512-Esxmk7YjA8QysKeT3VhTXvF6y77f/a91SIs4pWb4H2eWGQkCKFgQaG6hdoEVZtGsrAcb2K5BW66XsOErD4WU3Q==",
537
537
  "requires": {
538
- "@babel/helper-plugin-utils": "^7.14.5"
538
+ "@babel/helper-plugin-utils": "^7.16.7"
539
+ },
540
+ "dependencies": {
541
+ "@babel/helper-plugin-utils": {
542
+ "version": "7.16.7",
543
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz",
544
+ "integrity": "sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA=="
545
+ }
539
546
  }
540
547
  },
541
548
  "@babel/plugin-syntax-logical-assignment-operators": {
@@ -5151,9 +5158,9 @@
5151
5158
  "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="
5152
5159
  },
5153
5160
  "node-fetch": {
5154
- "version": "2.6.6",
5155
- "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz",
5156
- "integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==",
5161
+ "version": "2.6.7",
5162
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
5163
+ "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
5157
5164
  "requires": {
5158
5165
  "whatwg-url": "^5.0.0"
5159
5166
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qooxdoo/framework",
3
- "version": "7.0.0-beta.8",
3
+ "version": "7.0.0-beta.9",
4
4
  "description": "The JS Framework for Coders",
5
5
  "author": "The qooxdoo project",
6
6
  "keywords": [
@@ -57,6 +57,7 @@
57
57
  "@babel/parser": "^7.12.11",
58
58
  "@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1",
59
59
  "@babel/plugin-proposal-optional-chaining": "^7.12.7",
60
+ "@babel/plugin-syntax-jsx": "^7.16.7",
60
61
  "@babel/plugin-transform-block-scoping": "^7.12.12",
61
62
  "@babel/plugin-transform-react-jsx": "^7.12.12",
62
63
  "@babel/preset-env": "^7.12.11",
@@ -96,7 +97,7 @@
96
97
  "metalsmith": "^2.3.0",
97
98
  "metalsmith-layouts": "^2.3.1",
98
99
  "metalsmith-markdown": "^1.3.0",
99
- "node-fetch": "^2.6.0",
100
+ "node-fetch": "^2.6.7",
100
101
  "object-hash": "^2.1.1",
101
102
  "prettier": "^2.5.1",
102
103
  "ps-tree": "^1.2.0",
@@ -1649,34 +1649,6 @@ qx.Bootstrap.define("qx.Class", {
1649
1649
  }
1650
1650
  },
1651
1651
 
1652
- /**
1653
- * Wraps a member function of a mixin, which is included using "patch". This
1654
- * allows "base" calls in the mixin member function.
1655
- *
1656
- * @param member {Function} The mixin method to wrap
1657
- * @param base {Function} The overwritten method
1658
- * @return {Function} the wrapped mixin member
1659
- */
1660
- __mixinMemberWrapper(member, base) {
1661
- if (qx.core.Environment.get("qx.compiler")) {
1662
- throw new Error(
1663
- "This function should not be used except with code compiled by the generator (ie python toolchain)"
1664
- );
1665
- } else {
1666
- if (base) {
1667
- return function () {
1668
- var oldBase = member.base;
1669
- member.base = base;
1670
- var retval = member.apply(this, arguments);
1671
- member.base = oldBase;
1672
- return retval;
1673
- };
1674
- } else {
1675
- return member;
1676
- }
1677
- }
1678
- },
1679
-
1680
1652
  /**
1681
1653
  * Add a single interface to a class
1682
1654
  *
@@ -1017,7 +1017,7 @@ qx.Class.define("qx.data.Array", {
1017
1017
  * <li><code>index</code>: the index of the current item</li>
1018
1018
  * <li><code>array</code>: The native array instance, NOT the data array instance.</li>
1019
1019
  * @param self {var?undefined} The context of the callback.
1020
- * @return {Boolean} <code>true</code>, if any element passed the test function.
1020
+ * @return {var | undefined} The found item.
1021
1021
  */
1022
1022
  find(callback, self) {
1023
1023
  return this.__array.find(callback, self);
@@ -402,6 +402,180 @@ qx.Class.define("qx.test.Mixin", {
402
402
  this.assertTrue(objBaseIncluded instanceof qx.test.testclasses.RootClass);
403
403
  this.assertTrue(objBaseBoth instanceof qx.test.testclasses.RootClass);
404
404
  this.assertTrue(objPatched instanceof qx.test.testclasses.RootClass);
405
+ },
406
+
407
+ testPatchDouble() {
408
+
409
+ qx.Class.define("qx.Patch_1", {
410
+ extend: qx.core.Object,
411
+
412
+ members: {
413
+ sayJuhu() {
414
+ return "Juhu 1";
415
+ }
416
+ }
417
+ });
418
+
419
+ qx.Class.define("qx.Patch_2", {
420
+ extend: qx.core.Object,
421
+
422
+ members: {
423
+ sayJuhu() {
424
+ return "Juhu 2";
425
+ }
426
+ }
427
+ });
428
+
429
+
430
+ qx.Mixin.define("qx.MPatch", {
431
+ members: {
432
+ sayJuhu() {
433
+ return super.sayJuhu() + " Mixin";
434
+ },
435
+ }
436
+ });
437
+ qx.Class.patch(qx.Patch_1, qx.MPatch);
438
+ qx.Class.patch(qx.Patch_2, qx.MPatch);
439
+
440
+ var o = new qx.Patch_1();
441
+ this.assertEquals("Juhu 1 Mixin", o.sayJuhu());
442
+ o.dispose();
443
+
444
+ var o = new qx.Patch_2();
445
+ this.assertEquals("Juhu 2 Mixin", o.sayJuhu());
446
+ o.dispose();
447
+
448
+ },
449
+
450
+ testPatchOverwrittenDerived() {
451
+ qx.Class.define("qx.Patch", {
452
+ extend: qx.core.Object,
453
+ members: {
454
+ sayJuhu() {
455
+ return "Juhu";
456
+ }
457
+ }
458
+ });
459
+
460
+ qx.Class.define("qx.PatchDerived", {
461
+ extend: qx.Patch,
462
+ members: {
463
+ sayJuhu() {
464
+ return super.sayJuhu() + " Derived";
465
+ }
466
+ }
467
+ });
468
+
469
+ qx.Mixin.define("qx.MPatch", {
470
+ members: {
471
+ sayJuhu() {
472
+ return super.sayJuhu() + " Mixin";
473
+ },
474
+ }
475
+ });
476
+ qx.Class.patch(qx.PatchDerived, qx.MPatch);
477
+
478
+ var o = new qx.PatchDerived();
479
+ this.assertEquals("Juhu Derived Mixin", o.sayJuhu());
480
+ o.dispose();
481
+ },
482
+
483
+ testPatchOverwrittenDerivedInBaseClass() {
484
+
485
+ qx.Mixin.define("qx.MPatch", {
486
+ members: {
487
+ sayJuhu() {
488
+ return super.sayJuhu() + " Mixin";
489
+ },
490
+ }
491
+ });
492
+
493
+ qx.Class.define("qx.Patch", {
494
+ extend: qx.core.Object,
495
+ members: {
496
+ sayJuhu() {
497
+ return "Juhu";
498
+ }
499
+ }
500
+ });
501
+
502
+ qx.Class.define("qx.PatchDerived", {
503
+ extend: qx.Patch,
504
+ members: {
505
+ sayJuhu() {
506
+ return super.sayJuhu() + " Derived";
507
+ }
508
+ }
509
+ });
510
+
511
+ qx.Class.patch(qx.Patch, qx.MPatch);
512
+
513
+ var o = new qx.Patch();
514
+ this.assertEquals("Juhu Mixin", o.sayJuhu());
515
+ o.dispose();
516
+
517
+ var o = new qx.PatchDerived();
518
+ this.assertEquals("Juhu Mixin Derived", o.sayJuhu());
519
+ o.dispose();
520
+
521
+ },
522
+
523
+ testPatchMultiOverwrittenDerived() {
524
+ qx.Class.define("qx.A", {
525
+ extend: qx.core.Object,
526
+ members: {
527
+ sayJuhu() {
528
+ return "A";
529
+ }
530
+ }
531
+ });
532
+ qx.Class.define("qx.B", {
533
+ extend: qx.A,
534
+ members: {
535
+ sayJuhu() {
536
+ return super() + " B";
537
+ }
538
+ }
539
+ });
540
+ qx.Class.define("qx.C", {
541
+ extend: qx.B,
542
+ members: {
543
+ sayJuhu() {
544
+ return super() + " C";
545
+ }
546
+ }
547
+ });
548
+ qx.Mixin.define("qx.MA", {
549
+ members: {
550
+ sayJuhu() {
551
+ return super.sayJuhu() + " MA";
552
+ },
553
+ }
554
+ });
555
+ qx.Mixin.define("qx.MB", {
556
+ members: {
557
+ sayJuhu() {
558
+ return super.sayJuhu() + " MB";
559
+ },
560
+ }
561
+ });
562
+ qx.Mixin.define("qx.MC", {
563
+ members: {
564
+ sayJuhu() {
565
+ return super.sayJuhu() + " MC";
566
+ },
567
+ }
568
+ });
569
+ qx.Class.patch(qx.A, qx.MA);
570
+ qx.Class.patch(qx.B, qx.MB);
571
+ qx.Class.patch(qx.C, qx.MC);
572
+
573
+ var o = new qx.C();
574
+ this.assertEquals("A MA B MB C MC", o.sayJuhu());
575
+ o.dispose();
576
+
405
577
  }
406
- }
578
+
579
+
580
+ }
407
581
  });
@@ -112,13 +112,14 @@ qx.Class.define("qx.tool.cli.commands.Lint", {
112
112
  lintOptions.globals || {},
113
113
  await this.__addGlobals(config)
114
114
  );
115
-
116
115
  lintOptions.parser = "@babel/eslint-parser";
117
116
  lintOptions.parserOptions = lintOptions.parserOptions || {};
118
117
  lintOptions.parserOptions.requireConfigFile = false;
119
118
  lintOptions.parserOptions.babelOptions = {
120
- plugins: ["@babel/plugin-syntax-jsx"],
121
-
119
+ cwd: helperFilePath,
120
+ plugins: [
121
+ "@babel/plugin-syntax-jsx"
122
+ ],
122
123
  parserOpts: {
123
124
  allowSuperOutsideMethod: true
124
125
  }
@@ -1828,10 +1828,7 @@ qx.Class.define("qx.tool.compiler.ClassFile", {
1828
1828
  types.stringLiteral(t.__classMeta.functionName)
1829
1829
  ]
1830
1830
  );
1831
-
1832
1831
  expr = types.memberExpression(expr, types.identifier("call"));
1833
- //expr = expandMemberExpression("qx.Mixin.baseClassMethod(this.constructor, " + t.__classMeta.className + ", \"" + t.__classMeta.functionName + "\").call");
1834
- //expr = expandMemberExpression(t.__classMeta.className + ".$$members." + t.__classMeta.functionName + ".base.call");
1835
1832
  } else if (t.__classMeta.functionName == "$$constructor") {
1836
1833
  expr = expandMemberExpression(
1837
1834
  t.__classMeta.superClass + ".constructor.call"
@@ -1839,9 +1836,10 @@ qx.Class.define("qx.tool.compiler.ClassFile", {
1839
1836
  } else if (t.__classMeta.className) {
1840
1837
  expr = expandMemberExpression(
1841
1838
  t.__classMeta.className +
1842
- ".prototype." +
1839
+ ".superclass" +
1840
+ ".prototype." +
1843
1841
  t.__classMeta.functionName +
1844
- ".base.call"
1842
+ ".call"
1845
1843
  );
1846
1844
  } else {
1847
1845
  expr = expandMemberExpression(