@ui5/builder 3.0.0-rc.5 → 3.0.0-rc.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.
package/CHANGELOG.md CHANGED
@@ -2,7 +2,10 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
  This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
4
4
 
5
- A list of unreleased changes can be found [here](https://github.com/SAP/ui5-builder/compare/v3.0.0-rc.5...HEAD).
5
+ A list of unreleased changes can be found [here](https://github.com/SAP/ui5-builder/compare/v3.0.0-rc.6...HEAD).
6
+
7
+ <a name="v3.0.0-rc.6"></a>
8
+ ## [v3.0.0-rc.6] - 2023-02-08
6
9
 
7
10
  <a name="v3.0.0-rc.5"></a>
8
11
  ## [v3.0.0-rc.5] - 2023-02-03
@@ -855,6 +858,7 @@ to load the custom bundle file instead.
855
858
  - Add ability to configure component preloads and custom bundles [`2241e5f`](https://github.com/SAP/ui5-builder/commit/2241e5ff98fd95f1f80cc74959655ae7a9c660e7)
856
859
 
857
860
 
861
+ [v3.0.0-rc.6]: https://github.com/SAP/ui5-builder/compare/v3.0.0-rc.5...v3.0.0-rc.6
858
862
  [v3.0.0-rc.5]: https://github.com/SAP/ui5-builder/compare/v3.0.0-rc.4...v3.0.0-rc.5
859
863
  [v3.0.0-rc.4]: https://github.com/SAP/ui5-builder/compare/v3.0.0-rc.3...v3.0.0-rc.4
860
864
  [v3.0.0-rc.3]: https://github.com/SAP/ui5-builder/compare/v3.0.0-rc.2...v3.0.0-rc.3
@@ -1102,7 +1102,10 @@ function transformer(sInputFile, sOutputFile, sLibraryFile, vDependencyAPIFiles,
1102
1102
  "array",
1103
1103
  "element",
1104
1104
  "Element",
1105
+ "Date",
1105
1106
  "DomRef",
1107
+ "jQuery.promise",
1108
+ "QUnit.Assert",
1106
1109
  "object",
1107
1110
  "Object",
1108
1111
  "object[]",
@@ -88,7 +88,7 @@ let conf = {};
88
88
 
89
89
  let view;
90
90
 
91
- let __db;
91
+ let __symbols;
92
92
  let __longnames;
93
93
  let __missingLongnames = {};
94
94
 
@@ -120,12 +120,10 @@ function merge(target, source) {
120
120
  return target;
121
121
  }
122
122
 
123
- function lookup(longname /*, variant*/) {
124
- let key = longname; // variant ? longname + "|" + variant : longname;
123
+ function lookup(key) {
125
124
  if ( !Object.prototype.hasOwnProperty.call(__longnames, key) ) {
126
125
  __missingLongnames[key] = (__missingLongnames[key] || 0) + 1;
127
- let oResult = __db({longname: longname /*, variant: variant ? variant : {isUndefined: true}*/});
128
- __longnames[key] = oResult.first();
126
+ __longnames[key] = __symbols.find((symbol) => symbol.longname === key);
129
127
  }
130
128
  return __longnames[key];
131
129
  }
@@ -408,19 +406,21 @@ function publish(symbolSet) {
408
406
  // create output dir
409
407
  fs.mkPath(env.opts.destination);
410
408
 
411
- // if ( symbolSet().count() < 20000 ) {
409
+ __symbols = symbolSet().get();
410
+
411
+ // if ( __symbols.length < 20000 ) {
412
412
  // const rawSymbolsFile = path.join(env.opts.destination, "symbols-unpruned-ui5.json");
413
413
  // info(`writing raw symbols to ${rawSymbolsFile}`);
414
- // fs.writeFileSync(rawSymbolsFile, JSON.stringify(symbolSet().get(), filter, "\t"), 'utf8');
414
+ // fs.writeFileSync(rawSymbolsFile, JSON.stringify(__symbols, filter, "\t"), 'utf8');
415
415
  // }
416
416
 
417
- info(`before prune: ${symbolSet().count()} symbols.`);
417
+ info(`before prune: ${__symbols.length} symbols.`);
418
418
  symbolSet = helper.prune(symbolSet);
419
- info(`after prune: ${symbolSet().count()} symbols.`);
419
+ __symbols = symbolSet().get();
420
+ info(`after prune: ${__symbols.length} symbols.`);
420
421
 
421
- __db = symbolSet;
422
422
  __longnames = {};
423
- __db().each(function($) {
423
+ __symbols.forEach(function($) {
424
424
  __longnames[$.longname] = $;
425
425
  });
426
426
 
@@ -470,17 +470,17 @@ function publish(symbolSet) {
470
470
  collectMembers();
471
471
  mergeEventDocumentation();
472
472
 
473
- if ( symbolSet().count() < 20000 ) {
473
+ if ( __symbols.length < 20000 ) {
474
474
  const rawSymbolsFile = path.join(env.opts.destination, "symbols-pruned-ui5.json");
475
475
  info(`writing raw symbols to ${rawSymbolsFile}`);
476
- fs.writeFileSync(rawSymbolsFile, JSON.stringify(symbolSet().get(), filter, "\t"), 'utf8');
476
+ fs.writeFileSync(rawSymbolsFile, JSON.stringify(__symbols, filter, "\t"), 'utf8');
477
477
  }
478
478
 
479
479
  // used to allow Link to check the details of things being linked to
480
480
  Link.symbolSet = symbolSet;
481
481
 
482
482
  // get an array version of the symbol set, useful for filtering
483
- const symbols = symbolSet().get();
483
+ const symbols = __symbols;
484
484
 
485
485
  // -----
486
486
 
@@ -662,10 +662,10 @@ function publish(symbolSet) {
662
662
  */
663
663
  function createNamespaceTree() {
664
664
 
665
- info(`create namespace tree (${__db().count()} symbols)`);
665
+ info(`create namespace tree (${__symbols.length} symbols)`);
666
666
 
667
667
  const aRootNamespaces = [];
668
- const aTypes = __db(function() { return isFirstClassSymbol(this); }).get();
668
+ const aTypes = __symbols.filter((symbol) => isFirstClassSymbol(symbol));
669
669
 
670
670
  for (let i = 0; i < aTypes.length; i++) { // loop with a for-loop as it can handle concurrent modifications
671
671
 
@@ -677,7 +677,7 @@ function createNamespaceTree() {
677
677
  warning(`create missing namespace '${symbol.memberof}' (referenced by ${symbol.longname})`);
678
678
  parent = makeNamespace(symbol.memberof);
679
679
  __longnames[symbol.memberof] = parent;
680
- __db.insert(parent);
680
+ __symbols.push(parent);
681
681
  aTypes.push(parent); // concurrent modification: parent will be processed later in this loop
682
682
  }
683
683
  symbol.__ui5.parent = parent;
@@ -732,13 +732,13 @@ function createInheritanceTree() {
732
732
  const newDoclet = new doclet.Doclet("/**\n * " + lines.join("\n * ") + "\n */", {});
733
733
  newDoclet.__ui5 = {};
734
734
  __longnames[longname] = newDoclet;
735
- __db.insert(newDoclet);
735
+ __symbols.push(newDoclet);
736
736
  return newDoclet;
737
737
  }
738
738
 
739
- info(`create inheritance tree (${__db().count()} symbols)`);
739
+ info(`create inheritance tree (${__symbols.length} symbols)`);
740
740
 
741
- const oTypes = __db(function() { return supportsInheritance(this); });
741
+ const aTypes = __symbols.filter((symbol) => supportsInheritance(symbol));
742
742
  const aRootTypes = [];
743
743
 
744
744
  let oObject = lookup("Object");
@@ -780,7 +780,7 @@ function createInheritanceTree() {
780
780
  }
781
781
 
782
782
  // link them according to the inheritance infos
783
- oTypes.each((oClass) => {
783
+ aTypes.forEach((oClass) => {
784
784
 
785
785
  if ( oClass.longname === 'Object') {
786
786
  return;
@@ -849,7 +849,7 @@ function createInheritanceTree() {
849
849
 
850
850
  // check for cyclic inheritance (not supported)
851
851
  // Note: the check needs to run bottom up, not top down as a typical cyclic dependency never will end at the root node
852
- oTypes.each((oStartClass) => {
852
+ aTypes.forEach((oStartClass) => {
853
853
  const visited = {};
854
854
  function visit(oClass) {
855
855
  if ( visited[oClass.longname] ) {
@@ -869,7 +869,7 @@ function createInheritanceTree() {
869
869
  }
870
870
 
871
871
  function collectMembers() {
872
- __db().each(function($) {
872
+ __symbols.forEach(function($) {
873
873
  if ( $.memberof ) {
874
874
  const parent = lookup($.memberof);
875
875
  if ( parent /* && supportsInheritance(parent) */ ) {
@@ -884,9 +884,9 @@ function mergeEventDocumentation() {
884
884
 
885
885
  debug("merging JSDoc event documentation into UI5 metadata");
886
886
 
887
- const oTypes = __db(function() { return isaClass(this); });
887
+ const aTypes = __symbols.filter((symbol) => isaClass(symbol));
888
888
 
889
- oTypes.each((symbol) => {
889
+ aTypes.forEach((symbol) => {
890
890
 
891
891
  const metadata = symbol.__ui5.metadata;
892
892
  const members = symbol.__ui5.members;
@@ -2892,7 +2892,7 @@ function createAPIJSON4Symbol(symbol, omitDefaults) {
2892
2892
  }
2893
2893
  if ( omissibleParams.size > 0 ) {
2894
2894
  throw new Error(`parameter(s) '${[...omissibleParams].join("' and '")}' specified as '@ui5-omissible-params' for '${member.name}' missing among the actual @params`);
2895
- }
2895
+ }
2896
2896
 
2897
2897
  exceptions(member);
2898
2898
 
@@ -3466,14 +3466,17 @@ const builtinTypes = {
3466
3466
  WeakMap: true,
3467
3467
 
3468
3468
  // Web APIs
3469
+ AbortSignal:true,
3469
3470
  Attr:true,
3470
3471
  Blob:true,
3471
3472
  DataTransfer:true,
3472
3473
  Document:true,
3474
+ DOMException:true,
3473
3475
  Element:true,
3474
3476
  Event:true,
3475
3477
  File:true,
3476
3478
  FileList:true,
3479
+ Headers:true,
3477
3480
  HTMLDocument:true,
3478
3481
  HTMLElement:true,
3479
3482
  Node:true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/builder",
3
- "version": "3.0.0-rc.5",
3
+ "version": "3.0.0-rc.6",
4
4
  "description": "UI5 Tooling - Builder",
5
5
  "author": {
6
6
  "name": "SAP SE",
@@ -130,14 +130,14 @@
130
130
  "pretty-data": "^0.40.0",
131
131
  "rimraf": "^4.1.2",
132
132
  "semver": "^7.3.8",
133
- "terser": "^5.16.1",
133
+ "terser": "^5.16.3",
134
134
  "workerpool": "^6.3.1",
135
135
  "xml2js": "^0.4.23"
136
136
  },
137
137
  "devDependencies": {
138
138
  "@istanbuljs/esm-loader-hook": "^0.2.0",
139
- "@ui5/project": "^3.0.0-rc.7",
140
- "ava": "^5.1.1",
139
+ "@ui5/project": "^3.0.0-rc.9",
140
+ "ava": "^5.2.0",
141
141
  "chai": "^4.3.7",
142
142
  "chai-fs": "^2.0.0",
143
143
  "chokidar-cli": "^3.0.0",
@@ -147,7 +147,7 @@
147
147
  "eslint": "^8.33.0",
148
148
  "eslint-config-google": "^0.14.0",
149
149
  "eslint-plugin-ava": "^14.0.0",
150
- "eslint-plugin-jsdoc": "^39.7.4",
150
+ "eslint-plugin-jsdoc": "^39.8.0",
151
151
  "esmock": "^2.1.0",
152
152
  "nyc": "^15.1.0",
153
153
  "open-cli": "^7.1.0",