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

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 (62) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/Manifest.json +1 -1
  3. package/README.md +7 -3
  4. package/lib/compiler/compile-info.json +67 -67
  5. package/lib/compiler/index.js +2176 -1397
  6. package/lib/resource/qx/tool/loadsass.js +6 -4
  7. package/package.json +15 -2
  8. package/source/class/qx/io/__init__.js +5 -3
  9. package/source/class/qx/io/exception/Cancel.js +34 -0
  10. package/source/class/qx/io/exception/Exception.js +38 -0
  11. package/source/class/qx/io/exception/Protocol.js +26 -0
  12. package/source/class/qx/io/exception/Transport.js +39 -0
  13. package/source/class/qx/io/exception/__init__.js +4 -0
  14. package/source/class/qx/io/graphql/Client.js +112 -0
  15. package/source/class/qx/io/graphql/__init__.js +9 -0
  16. package/source/class/qx/io/graphql/protocol/Message.js +65 -0
  17. package/source/class/qx/io/graphql/protocol/Request.js +95 -0
  18. package/source/class/qx/io/graphql/protocol/Response.js +61 -0
  19. package/source/class/qx/io/graphql/protocol/__init__.js +6 -0
  20. package/source/class/qx/io/jsonrpc/Client.js +323 -0
  21. package/source/class/qx/io/jsonrpc/__init__.js +15 -0
  22. package/source/class/qx/io/jsonrpc/protocol/Batch.js +97 -0
  23. package/source/class/qx/io/jsonrpc/protocol/Error.js +63 -0
  24. package/source/class/qx/io/jsonrpc/protocol/Message.js +48 -0
  25. package/source/class/qx/io/jsonrpc/protocol/Notification.js +45 -0
  26. package/source/class/qx/io/jsonrpc/protocol/Parser.js +81 -0
  27. package/source/class/qx/io/jsonrpc/protocol/Request.js +93 -0
  28. package/source/class/qx/io/jsonrpc/protocol/Result.js +48 -0
  29. package/source/class/qx/io/jsonrpc/protocol/__init__.js +5 -0
  30. package/source/class/qx/io/request/authentication/Bearer.js +52 -0
  31. package/source/class/qx/io/transport/AbstractClient.js +100 -0
  32. package/source/class/qx/io/transport/AbstractTransport.js +41 -0
  33. package/source/class/qx/io/transport/Fetch.js +95 -0
  34. package/source/class/qx/io/transport/ITransport.js +40 -0
  35. package/source/class/qx/io/transport/PostMessage.js +55 -0
  36. package/source/class/qx/io/transport/Websocket.js +97 -0
  37. package/source/class/qx/io/transport/Xhr.js +139 -0
  38. package/source/class/qx/io/transport/__init__.js +18 -0
  39. package/source/class/qx/test/io/MAssert.js +46 -0
  40. package/source/class/qx/test/io/graphql/Client.js +169 -0
  41. package/source/class/qx/test/io/graphql/ClientFetch.js +34 -0
  42. package/source/class/qx/test/io/graphql/Request.js +42 -0
  43. package/source/class/qx/test/io/jsonrpc/Client.js +267 -0
  44. package/source/class/qx/test/io/jsonrpc/Protocol.js +80 -0
  45. package/source/class/qx/test/io/transport/PostMessage.js +56 -0
  46. package/source/class/qx/test/io/transport/Websocket.js +63 -0
  47. package/source/class/qx/test/ui/embed/Iframe.js +1 -1
  48. package/source/class/qx/test/util/DateFormat.js +45 -6
  49. package/source/class/qx/tool/cli/commands/Compile.js +3 -3
  50. package/source/class/qx/tool/cli/commands/package/Publish.js +14 -0
  51. package/source/class/qx/tool/compiler/makers/AppMaker.js +2 -1
  52. package/source/class/qx/tool/compiler/targets/Target.js +2 -1
  53. package/source/class/qx/tool/compiler/targets/meta/PolyfillJs.js +11 -3
  54. package/source/class/qx/ui/form/ComboBox.js +8 -3
  55. package/source/class/qx/ui/form/MenuButton.js +8 -4
  56. package/source/class/qx/ui/form/SelectBox.js +8 -3
  57. package/source/class/qx/ui/menu/AbstractButton.js +12 -8
  58. package/source/class/qx/ui/menu/Menu.js +18 -8
  59. package/source/class/qx/ui/table/pane/Model.js +10 -4
  60. package/source/class/qx/util/format/DateFormat.js +44 -17
  61. package/source/resource/qx/tool/loadsass.js +6 -4
  62. package/source/translation/hr.po +297 -0
@@ -0,0 +1,267 @@
1
+ /* ************************************************************************
2
+
3
+ qooxdoo - the new era of web development
4
+
5
+ http://qooxdoo.org
6
+
7
+ Copyright:
8
+ 2004-2011 1&1 Internet AG, Germany, http://www.1und1.de & contributors
9
+
10
+ License:
11
+ MIT: https://opensource.org/licenses/MIT
12
+ See the LICENSE file in the project's top-level directory for details.
13
+
14
+ Authors:
15
+ * Tristan Koch (tristankoch)
16
+ * Christian Boulanger (cboulanger)
17
+
18
+ ************************************************************************ */
19
+
20
+ /**
21
+ * Tests for qx.io.jsonrpc.Client with a qx.test.io.request.Xhr transport
22
+ */
23
+ qx.Class.define("qx.test.io.jsonrpc.Client",
24
+ {
25
+ extend : qx.dev.unit.TestCase,
26
+
27
+ include : [
28
+ qx.dev.unit.MMock,
29
+ qx.test.io.MAssert
30
+ ],
31
+
32
+ members : {
33
+
34
+ setUp() {
35
+ this.sinon = qx.dev.unit.Sinon.getSinon();
36
+ this.setUpRequest();
37
+ this.setUpFakeTransport();
38
+ qx.io.jsonrpc.protocol.Request.resetId();
39
+ },
40
+
41
+ setUpRequest: function () {
42
+ this.req && this.req.dispose();
43
+ this.req = new qx.io.request.Xhr();
44
+ this.req.setUrl("url");
45
+ },
46
+
47
+ setUpFakeTransport: function () {
48
+ if (this.transport && this.transport.send.restore) {
49
+ return;
50
+ }
51
+ this.transport = this.injectStub(qx.io.request.Xhr.prototype, "_createTransport");
52
+ this.setUpRequest();
53
+ },
54
+
55
+ setUpFakeXhr: function () {
56
+ // Not fake transport
57
+ this.getSandbox().restore();
58
+ this.useFakeXMLHttpRequest();
59
+ this.setUpRequest();
60
+ },
61
+
62
+ /**
63
+ * Sets up the fake server and instructs it to send the given response(s)
64
+ * @param {String} response The server response to the first request
65
+ */
66
+ setUpFakeServer: function (response) {
67
+ // Not fake transport
68
+ this.getSandbox().restore();
69
+ this.useFakeServer();
70
+ this.setUpRequest();
71
+ this.getServer().respondWith(
72
+ "POST", /.*/,
73
+ [200, {"Content-Type": "application/json; charset=utf-8"}, response]
74
+ );
75
+ this.getServer().autoRespond = true;
76
+ },
77
+
78
+ /**
79
+ * Assert that the given exception is thrown on receiving the given result
80
+ * @param {String} response
81
+ * @param {Class|Number} exception If class, the exception class, which must
82
+ * be a subclass of qx.io.exception.Exception. If number, the error number
83
+ */
84
+ assertExceptionThrown: function (response, exception) {
85
+ if (!(qx.lang.Type.isNumber(exception) || qx.Class.isSubClassOf(exception, qx.io.exception.Exception))) {
86
+ throw new Error("Second argument must be a Number or a subclass of qx.io.exception.Exception");
87
+ }
88
+ this.setUpFakeServer(response);
89
+ const message_out = new qx.io.jsonrpc.protocol.Request("foo",[1,2,3]);
90
+ const client = new qx.io.jsonrpc.Client("http://jsonrpc");
91
+ const errorCallback = this.spy(err => {
92
+ //console.warn(err);
93
+ if (qx.lang.Type.isNumber(exception)) {
94
+ if (!(err instanceof qx.io.exception.Exception)) {
95
+ throw err;
96
+ }
97
+ this.assertEquals(exception, err.code,`Error code does not match`);
98
+ } else {
99
+ this.assertInstance(err, exception,
100
+ `Exception class does not match. Expected ${exception.classname}, got ${err}.`);
101
+ }
102
+ });
103
+ // check message promise
104
+ message_out.getPromise().catch(errorCallback);
105
+ // check event
106
+ client.addListener("error", evt => errorCallback(evt.getData()));
107
+ // check transport promise
108
+ client.send(message_out).catch(errorCallback);
109
+ this.wait(100, () => {
110
+ if (
111
+ // the request promise will not be called since the promise is already rejected
112
+ exception === qx.io.exception.Transport.DUPLICATE_ID
113
+ // or the send promise will not be rejected because we have a server-side error
114
+ || exception === qx.io.exception.Protocol) {
115
+ this.assertCalledTwice(errorCallback)
116
+ } else {
117
+ // the error handler will be called three times
118
+ this.assertCalledThrice(errorCallback)
119
+ }
120
+ });
121
+ },
122
+
123
+ tearDown: function () {
124
+ this.getSandbox().restore();
125
+ this.req.dispose();
126
+ },
127
+
128
+ resetId(){
129
+ qx.io.jsonrpc.protocol.Request.resetId();
130
+ },
131
+
132
+ //
133
+ // Auth, should be moved into qx.test.io.request.Xhr
134
+ //
135
+
136
+ "test: Bearer authentication": function () {
137
+ this.setUpFakeTransport();
138
+
139
+ var transport = this.transport, auth, call, key, credentials;
140
+
141
+ auth = new qx.io.request.authentication.Bearer("TOKEN");
142
+ this.req.setAuthentication(auth);
143
+ this.req.send();
144
+
145
+ call = transport.setRequestHeader.getCall(1);
146
+ key = "Authorization";
147
+ credentials = /Bearer\s(.*)/.exec(call.args[1])[1];
148
+ this.assertEquals(key, call.args[0]);
149
+ this.assertEquals("TOKEN", credentials);
150
+ },
151
+
152
+ //
153
+ // JSON-RPC
154
+ //
155
+
156
+ "test: throw on invalid response id" : function() {
157
+ this.resetId();
158
+ var response = qx.lang.Json.stringify({"jsonrpc": "2.0", "result": 19, "id": 2});
159
+ this.assertExceptionThrown(response, qx.io.exception.Transport.UNKNOWN_ID);
160
+ },
161
+
162
+ "test: throw on duplicate response id" : function() {
163
+ this.resetId();
164
+ var response = qx.lang.Json.stringify([
165
+ {"jsonrpc": "2.0", "result": 19, "id": 1},
166
+ {"jsonrpc": "2.0", "result": 19, "id": 1}
167
+ ]);
168
+ this.assertExceptionThrown(response, qx.io.exception.Transport.DUPLICATE_ID);
169
+ },
170
+
171
+ "test: call jsonrpc method and receive response with single result" : async function() {
172
+ this.resetId();
173
+ let message_out = new qx.io.jsonrpc.protocol.Request("foo", ["bar"]);
174
+ let result = "Hello World!";
175
+ let message_in = new qx.io.jsonrpc.protocol.Result(message_out.getId(), result);
176
+ this.setUpFakeServer(message_in.toString());
177
+ const client = new qx.io.jsonrpc.Client("http://jsonrpc");
178
+ let spy = this.spy(value => this.assertEquals(result, value));
179
+ message_out.getPromise().then(spy);
180
+ await client.send(message_out);
181
+ this.assertCalled(spy);
182
+ },
183
+
184
+ "test: call jsonrpc method and receive batched response" : async function() {
185
+ this.resetId();
186
+ let message_out = new qx.io.jsonrpc.protocol.Request("foo", ["bar"]);
187
+ let result = "Hello World!";
188
+ let response = (new qx.io.jsonrpc.protocol.Batch())
189
+ .add(new qx.io.jsonrpc.protocol.Result(message_out.getId(), result))
190
+ .addRequest("foo", ["bar"])
191
+ .addNotification("logout")
192
+ .toString();
193
+ this.setUpFakeServer(response);
194
+ const client = new qx.io.jsonrpc.Client("http://jsonrpc");
195
+ let spy = this.spy(value => this.assertEquals(result, value));
196
+ message_out.getPromise().then(spy);
197
+ await client.send(message_out);
198
+ this.assertCalled(spy);
199
+ },
200
+
201
+ "test: call jsonrpc method and expect error on invalid reponse "() {
202
+ this.assertExceptionThrown("helloworld!", qx.io.exception.Transport.INVALID_JSON);
203
+ },
204
+
205
+ "test: call jsonrpc method and expect error on invalid reponse - missing result" () {
206
+ this.assertExceptionThrown("null", qx.io.exception.Transport.NO_DATA);
207
+ },
208
+
209
+ "test: call jsonrpc method and expect error response"() {
210
+ this.resetId();
211
+ var response = qx.lang.Json.stringify({"jsonrpc": "2.0", "error" : {"code": -32600, "message": "Division by zero!"}, "id": 1});
212
+ this.assertExceptionThrown(response, qx.io.exception.Protocol);
213
+ },
214
+
215
+ "test: send batched requests"() {
216
+ this.resetId();
217
+ var response = qx.lang.Json.stringify([
218
+ {"jsonrpc": "2.0", "result": 7, "id": 1},
219
+ {"jsonrpc": "2.0", "result": "foo", "id": 2},
220
+ {"jsonrpc": "2.0", "error": {"code": -32600, "message": "Invalid Request"}, "id": 3},
221
+ {"jsonrpc": "2.0", "error": {"code": -32601, "message": "Method not found"}, "id": 4},
222
+ {"jsonrpc": "2.0", "result": ["hello", 5], "id": 5}]);
223
+ this.setUpFakeServer(response);
224
+ var client = new qx.io.jsonrpc.Client("http://jsonrpc");
225
+ var spies = [];
226
+ var batch = new qx.io.jsonrpc.protocol.Batch();
227
+ for( var i=1; i < 6; i++) {
228
+ spies[i] = { result: this.spy(), error: this.spy() };
229
+ let request = new qx.io.jsonrpc.protocol.Request("someMethod", []);
230
+ request.getPromise()
231
+ .then(spies[i].result)
232
+ .catch(spies[i].error);
233
+ batch.add(request);
234
+ }
235
+ client.sendBatch(batch).catch(err => {
236
+ this.assertInstance(err, qx.io.exception.Protocol);
237
+ });
238
+ this.wait(100, function(){
239
+ this.assertCalledWith(spies[1].result, 7);
240
+ this.assertCalledWith(spies[2].result, "foo");
241
+ this.assertCalled(spies[3].error);
242
+ this.assertCalled(spies[4].error);
243
+ this.assertCalledWith(spies[5].result, ["hello", 5]);
244
+ },this);
245
+ },
246
+
247
+ "test: receive jsonrpc requests from server" : function() {
248
+ this.resetId();
249
+ var response = [
250
+ {"jsonrpc": "2.0", "method": "clientMethod", "params": ["foo", "bar"], "id": 1},
251
+ {"jsonrpc": "2.0", "method": "clientNotification", "params": []}
252
+ ];
253
+ this.setUpFakeServer(qx.lang.Json.stringify(response));
254
+ var client = new qx.io.jsonrpc.Client("http://jsonrpc");
255
+ var spy = this.spy();
256
+ client.addListener("incomingRequest", evt => {
257
+ let message = evt.getData().toObject();
258
+ this.assertDeepEquals(response.shift(), message);
259
+ spy(message);
260
+ });
261
+ client.sendNotification("ping");
262
+ this.wait(100, function(){
263
+ this.assertCalledTwice(spy);
264
+ },this);
265
+ }
266
+ }
267
+ });
@@ -0,0 +1,80 @@
1
+ /* ************************************************************************
2
+
3
+ qooxdoo - the new era of web development
4
+
5
+ http://qooxdoo.org
6
+
7
+ Copyright:
8
+ 2020 Christian Boulanger
9
+
10
+ License:
11
+ MIT: https://opensource.org/licenses/MIT
12
+ See the LICENSE file in the project's top-level directory for details.
13
+
14
+ Authors:
15
+ * Christian Boulanger (cboulanger)
16
+
17
+ ************************************************************************ */
18
+
19
+ qx.Class.define("qx.test.io.jsonrpc.Protocol",
20
+ {
21
+ extend : qx.dev.unit.TestCase,
22
+ include : [qx.test.io.MAssert],
23
+ construct() {
24
+ this.base(arguments);
25
+ this.parser = new qx.io.jsonrpc.protocol.Parser();
26
+ },
27
+ members : {
28
+ "test: JSON-RPC request message object"() {
29
+ let message = new qx.io.jsonrpc.protocol.Request("foo", ["bar", 1, false]);
30
+ let expected = {
31
+ id: 1,
32
+ jsonrpc: "2.0",
33
+ method: "foo",
34
+ params: ["bar", 1, false]
35
+ };
36
+ this.assertDeepEquals(expected, message.toObject());
37
+ // test parser
38
+ this.assertDeepEquals(expected, this.parser.parse(JSON.stringify(expected)).toObject());
39
+ },
40
+
41
+ "test: JSON-RPC request notification object"() {
42
+ let message = new qx.io.jsonrpc.protocol.Notification("foo", ["bar", 1, false]);
43
+ let expected = {
44
+ jsonrpc: "2.0",
45
+ method: "foo",
46
+ params: ["bar", 1, false]
47
+ };
48
+ this.assertDeepEquals(expected, message.toObject());
49
+ // test parser
50
+ this.assertDeepEquals(expected, this.parser.parse(JSON.stringify(expected)).toObject());
51
+ },
52
+
53
+ "test: JSON-RPC error object"() {
54
+ let message = new qx.io.jsonrpc.protocol.Error(1, 5, "error!");
55
+ let expected = {
56
+ jsonrpc: "2.0",
57
+ id: 1,
58
+ error: {
59
+ code: 5,
60
+ message: "error!"
61
+ }
62
+ };
63
+ this.assertDeepEquals(expected, message.toObject());
64
+ // test parser
65
+ this.assertDeepEquals(expected, this.parser.parse(JSON.stringify(expected)).toObject());
66
+ },
67
+
68
+ "test: JSON-RPC result object"() {
69
+ let message = new qx.io.jsonrpc.protocol.Error(1, 5, "error!");
70
+ let expected = {
71
+ jsonrpc: "2.0", id: 1, error: {
72
+ code: 5, message: "error!"
73
+ }
74
+ };
75
+ this.assertDeepEquals(expected, message.toObject());
76
+ // test parser
77
+ this.assertDeepEquals(expected, this.parser.parse(JSON.stringify(expected)).toObject());
78
+ }
79
+ }
80
+ });
@@ -0,0 +1,56 @@
1
+ /* ************************************************************************
2
+
3
+ qooxdoo - the new era of web development
4
+
5
+ http://qooxdoo.org
6
+
7
+ Copyright:
8
+ 2004-2011 1&1 Internet AG, Germany, http://www.1und1.de & contributors
9
+
10
+ License:
11
+ MIT: https://opensource.org/licenses/MIT
12
+ See the LICENSE file in the project's top-level directory for details.
13
+
14
+ Authors:
15
+ * Tristan Koch (tristankoch)
16
+ * Christian Boulanger (cboulanger)
17
+
18
+ ************************************************************************ */
19
+
20
+ /**
21
+ * Tests for the postMessage transport
22
+ * @ignore(URL)
23
+ * @ignore(Worker)
24
+ * @ignore(self)
25
+ */
26
+ qx.Class.define("qx.test.io.transport.PostMessage", {
27
+ extend: qx.dev.unit.TestCase,
28
+
29
+ members: {
30
+
31
+ setUp() {
32
+ // see https://medium.com/@dee_bloo/make-multithreading-easier-with-inline-web-workers-a58723428a42
33
+ function createWorker(fn) {
34
+ let blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' });
35
+ return new Worker(URL.createObjectURL(blob));
36
+ }
37
+ // create echo server
38
+ const worker = createWorker(evt => {
39
+ self.postMessage(evt.data);
40
+ });
41
+ this.transport = new qx.io.transport.PostMessage(worker);
42
+ },
43
+
44
+ async "test: send message to worker and check response"() {
45
+ let message = "Hello World!";
46
+ await new qx.Promise((resolve, reject) => {
47
+ this.transport.addListenerOnce("message", evt => {
48
+ this.assertEquals(message, evt.getData());
49
+ });
50
+ this.transport.send(message)
51
+ .then(resolve)
52
+ .catch(reject);
53
+ });
54
+ }
55
+ }
56
+ });
@@ -0,0 +1,63 @@
1
+ /* ************************************************************************
2
+
3
+ qooxdoo - the new era of web development
4
+
5
+ http://qooxdoo.org
6
+
7
+ Copyright:
8
+ 2004-2011 1&1 Internet AG, Germany, http://www.1und1.de & contributors
9
+
10
+ License:
11
+ MIT: https://opensource.org/licenses/MIT
12
+ See the LICENSE file in the project's top-level directory for details.
13
+
14
+ Authors:
15
+ * Tristan Koch (tristankoch)
16
+ * Christian Boulanger (cboulanger)
17
+
18
+ ************************************************************************ */
19
+
20
+ /**
21
+ * Tests for the websocket transport
22
+ */
23
+ qx.Class.define("qx.test.io.transport.Websocket", {
24
+ extend: qx.dev.unit.TestCase,
25
+
26
+ statics: {
27
+ TEST_ENDPOINT: "echo.websocket.events"
28
+ },
29
+
30
+ members: {
31
+
32
+ __hasEndpoint : false,
33
+ __skipMsg: "Skipping test as endpoint is not available.",
34
+
35
+ setUp() {
36
+ this.transport = new qx.io.transport.Websocket("wss://" + this.constructor.TEST_ENDPOINT);
37
+ },
38
+
39
+ async "test: check endpoint"() {
40
+ try {
41
+ await this.transport.send("test");
42
+ this.__hasEndpoint = true;
43
+ } catch(e) {
44
+ console.error(`Endpoint ${this.constructor.TEST_ENDPOINT} is not accessible: ${e.message}`);
45
+ }
46
+ },
47
+
48
+ async "test: send message to public websocket echo server and check response"() {
49
+ if (!this.__hasEndpoint) {
50
+ return this.skip(this.__skipMsg);
51
+ }
52
+ let message = "Hello World!";
53
+ await new qx.Promise((resolve, reject) => {
54
+ this.transport.addListenerOnce("message", evt => {
55
+ this.assertEquals(message, evt.getData());
56
+ });
57
+ this.transport.send(message)
58
+ .then(resolve)
59
+ .catch(reject);
60
+ });
61
+ }
62
+ }
63
+ });
@@ -88,6 +88,7 @@ qx.Class.define("qx.test.ui.embed.Iframe",
88
88
  this.wait(10000);
89
89
  },
90
90
 
91
+ /** @ignore(require) */
91
92
  testSyncSourceAfterDOMMove : function ()
92
93
  {
93
94
  // This breaks (very) frequently when run under headless chrome on Travis; we can't
@@ -99,7 +100,6 @@ qx.Class.define("qx.test.ui.embed.Iframe",
99
100
 
100
101
  // This also breaks on MacOS runners on GitHub with webkit
101
102
  try {
102
- /** @ignore(require) */
103
103
  let CI = require("process").env.CI;
104
104
  if (CI && qx.core.Environment.get("browser.name") === "webkit") {
105
105
  this.skip("Skipping for Webkit for MacOS");
@@ -805,15 +805,54 @@ qx.Class.define("qx.test.util.DateFormat",
805
805
  this._testIsoMasks(date, 'isoDate', 'yyyy-MM-dd');
806
806
  this._testIsoMasks(date, 'isoTime', 'HH:mm:ss');
807
807
  this._testIsoMasks(date, 'isoDateTime', "yyyy-MM-dd'T'HH:mm:ss");
808
-
809
- // var isodf = new qx.util.format.DateFormat('isoUtcDateTime');
810
- // var df = new qx.util.format.DateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
811
- // var isoDateFormatted = isodf.format(date);
812
- // var dateFormatted = df.format(date);
813
- // this.assertEquals(isodf.parse(isoDateFormatted).getTime(),df.parse(dateFormatted).getTime());
808
+ this._testIsoMasks(date, 'isoDateTimeTz', "yyyy-MM-dd'T'HH:mm:ssZ");
809
+ //this._testIsoMasks(date, 'isoUtcDateTime', "yyyy-MM-dd'T'HH:mm:ss'Z'");
814
810
  }
815
811
  },
816
812
 
813
+ testIsoTz : function() {
814
+ var isodf = new qx.util.format.DateFormat('isoDateTimeTz');
815
+ var parsedDate = isodf.parse("2013-01-01T00:00:00+0000");
816
+ this.assertEquals(parsedDate.getUTCFullYear(), 2013);
817
+ this.assertEquals(parsedDate.getUTCMonth(), 0);
818
+ this.assertEquals(parsedDate.getUTCDate(), 1);
819
+ this.assertEquals(parsedDate.getUTCHours(), 0);
820
+ this.assertEquals(parsedDate.getUTCMinutes(), 0);
821
+ this.assertEquals(parsedDate.getUTCSeconds(), 0);
822
+ this.assertEquals(parsedDate.getUTCMilliseconds(), 0);
823
+
824
+ parsedDate = isodf.parse("2004-04-04T04:04:04-0500")
825
+ this.assertEquals(parsedDate.getUTCFullYear(), 2004);
826
+ this.assertEquals(parsedDate.getUTCMonth(), 3);
827
+ this.assertEquals(parsedDate.getUTCDate(), 3);
828
+ this.assertEquals(parsedDate.getUTCHours(), 23);
829
+ this.assertEquals(parsedDate.getUTCMinutes(), 4);
830
+ this.assertEquals(parsedDate.getUTCSeconds(), 4);
831
+ this.assertEquals(parsedDate.getUTCMilliseconds(), 0);
832
+ },
833
+
834
+ testUtc : function () {
835
+ var isodf = new qx.util.format.DateFormat('isoUtcDateTime');
836
+ var parsedDate = isodf.parse("2013-01-01T00:00:00Z");
837
+ this.assertEquals(parsedDate.getUTCFullYear(), 2013);
838
+ this.assertEquals(parsedDate.getUTCMonth(), 0);
839
+ this.assertEquals(parsedDate.getUTCDate(), 1);
840
+ this.assertEquals(parsedDate.getUTCHours(), 0);
841
+ this.assertEquals(parsedDate.getUTCMinutes(), 0);
842
+ this.assertEquals(parsedDate.getUTCSeconds(), 0);
843
+ this.assertEquals(parsedDate.getUTCMilliseconds(), 0);
844
+
845
+ // checks that UTC hours are calculated correctly
846
+ parsedDate = isodf.parse("2004-04-04T04:04:04Z");
847
+ this.assertEquals(parsedDate.getUTCHours(), 4);
848
+
849
+ // checks that UTC format does not parse a date with a timezone
850
+ this.assertException(function() {
851
+ isodf.parse("2004-04-04T04:04:04+05:00");
852
+ }, Error);
853
+
854
+ },
855
+
817
856
  testChangingLocales : function()
818
857
  {
819
858
  var manager = qx.locale.Manager.getInstance();
@@ -571,10 +571,10 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
571
571
  createMakersFromConfig: async function(data) {
572
572
  const Console = qx.tool.compiler.Console.getInstance();
573
573
  var t = this;
574
-
575
574
  if (data.babelOptions) {
576
- if (!data.babelConfig) {
577
- data.babelConfig = { options: data.babelOptions };
575
+ if (!data?.babel?.options) {
576
+ data.babel = data.babel || {};
577
+ data.babel.options = data.babelOptions;
578
578
  qx.tool.compiler.Console.print("qx.tool.cli.compile.deprecatedBabelOptions");
579
579
  } else {
580
580
  qx.tool.compiler.Console.print("qx.tool.cli.compile.deprecatedBabelOptionsConflicting");
@@ -99,6 +99,14 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
99
99
  };
100
100
  }
101
101
  },
102
+ events: {
103
+ /**
104
+ * Fired before commit happens. Data is an object with
105
+ * version: new_version,
106
+ * argv: this.argv
107
+ */
108
+ "beforeCommit": "qx.event.type.Data"
109
+ },
102
110
 
103
111
  members: {
104
112
 
@@ -337,6 +345,12 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
337
345
  }
338
346
  }
339
347
 
348
+ await this.fireDataEventAsync("beforeCommit", {
349
+ version: new_version,
350
+ argv: this.argv
351
+ });
352
+
353
+
340
354
  if (argv.dryrun) {
341
355
  qx.tool.compiler.Console.info(`Dry run: not creating tag and release '${tag}' of ${repo_name}...`);
342
356
  return;
@@ -86,7 +86,8 @@ qx.Class.define("qx.tool.compiler.makers.AppMaker", {
86
86
  },
87
87
  this.getEnvironment(),
88
88
  target.getDefaultEnvironment(),
89
- target.getEnvironment());
89
+ target.getEnvironment()
90
+ );
90
91
 
91
92
  let preserve = target.getPreserveEnvironment();
92
93
  if (preserve) {
@@ -894,7 +894,8 @@ qx.Class.define("qx.tool.compiler.targets.Target", {
894
894
  "appPath": t.getProjectDir(application) + "/",
895
895
  "preBootJs": "",
896
896
  "appTitle": (application.getTitle()||"Qooxdoo Application"),
897
- "timeStamp": timeStamp
897
+ "timeStamp": timeStamp,
898
+ "indexJsTimestamp": indexJsTimestamp
898
899
  };
899
900
  await fs.writeFileAsync(t.getOutputDir() + "index.html", replaceVars(indexHtml), { encoding: "utf8" });
900
901
  }
@@ -42,11 +42,18 @@ qx.Class.define("qx.tool.compiler.targets.meta.PolyfillJs", {
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("core-js-bundle"), "../minified.js");
49
+ await this.__write(path.join(require.resolve("core-js-bundle"), "../minified.js"), ws);
50
+ await new Promise(resolve => {
51
+ ws.write("\n", resolve);
52
+ });
53
+ await this.__write(path.join(require.resolve("regenerator-runtime"), "../runtime.js"), ws);
54
+ },
55
+
56
+ async __write(srcFilename, ws) {
50
57
  let rs = fs.createReadStream(srcFilename, "utf8");
51
58
  await new Promise((resolve, reject) => {
52
59
  rs.on("end", resolve);
@@ -55,7 +62,8 @@ qx.Class.define("qx.tool.compiler.targets.meta.PolyfillJs", {
55
62
  });
56
63
  },
57
64
 
58
- /*
65
+
66
+ /**
59
67
  * @Override
60
68
  */
61
69
  async getSourceMap() {
@@ -337,10 +337,15 @@ qx.Class.define("qx.ui.form.ComboBox",
337
337
  }
338
338
 
339
339
  // Set aria-activedescendant
340
- if (current && current[0]) {
341
- this.getChildControl("textfield").getContentElement().setAttribute("aria-activedescendant", current[0].getContentElement().getAttribute("id"));
340
+ const textFieldContentEl = this.getChildControl("textfield").getContentElement();
341
+ if (!textFieldContentEl) {
342
+ return;
343
+ }
344
+ const currentContentEl = current && current[0] ? current[0].getContentElement() : null;
345
+ if (currentContentEl) {
346
+ textFieldContentEl.setAttribute("aria-activedescendant", currentContentEl.getAttribute("id"));
342
347
  } else {
343
- this.getChildControl("textfield").getContentElement().removeAttribute("aria-activedescendant");
348
+ textFieldContentEl.removeAttribute("aria-activedescendant");
344
349
  }
345
350
  },
346
351