@ui5/builder 3.0.3 → 3.0.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.
package/CHANGELOG.md CHANGED
@@ -2,7 +2,22 @@
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.3...HEAD).
5
+ A list of unreleased changes can be found [here](https://github.com/SAP/ui5-builder/compare/v3.0.5...HEAD).
6
+
7
+ <a name="v3.0.5"></a>
8
+ ## [v3.0.5] - 2023-06-02
9
+ ### Bug Fixes
10
+ - **bundle/Builder:** Remove sourceMappingURL from modules embedded as string [`a2f410c`](https://github.com/SAP/ui5-builder/commit/a2f410c32945a6a25fdf47b7b06ccb7f21ef5716)
11
+
12
+ ### Dependency Updates
13
+ - Bump xml2js from 0.5.0 to 0.6.0 [`9679830`](https://github.com/SAP/ui5-builder/commit/967983000d64324089740c5ffc0460dcca23866f)
14
+
15
+
16
+ <a name="v3.0.4"></a>
17
+ ## [v3.0.4] - 2023-05-23
18
+ ### Bug Fixes
19
+ - **lbt/Resolver:** ensure stable module order in generated bundleInfo [`482b8a0`](https://github.com/SAP/ui5-builder/commit/482b8a011d9f0e3fc24d0485be7caf1509195c82)
20
+
6
21
 
7
22
  <a name="v3.0.3"></a>
8
23
  ## [v3.0.3] - 2023-04-21
@@ -785,6 +800,8 @@ to load the custom bundle file instead.
785
800
 
786
801
  ### Features
787
802
  - Add ability to configure component preloads and custom bundles [`2241e5f`](https://github.com/SAP/ui5-builder/commit/2241e5ff98fd95f1f80cc74959655ae7a9c660e7)
803
+ [v3.0.5]: https://github.com/SAP/ui5-builder/compare/v3.0.4...v3.0.5
804
+ [v3.0.4]: https://github.com/SAP/ui5-builder/compare/v3.0.3...v3.0.4
788
805
  [v3.0.3]: https://github.com/SAP/ui5-builder/compare/v3.0.2...v3.0.3
789
806
  [v3.0.2]: https://github.com/SAP/ui5-builder/compare/v3.0.1...v3.0.2
790
807
  [v3.0.1]: https://github.com/SAP/ui5-builder/compare/v3.0.0...v3.0.1
@@ -439,7 +439,20 @@ class BundleBuilder {
439
439
  } else if ( /\.js$/.test(moduleName) /* implicitly: && info != null && info.requiresTopLevelScope */ ) {
440
440
  log.warn(
441
441
  `Module ${moduleName} requires top level scope and can only be embedded as a string (requires 'eval')`);
442
- outW.write( makeStringLiteral( (await resource.buffer()).toString() ) );
442
+ let moduleContent = (await resource.buffer()).toString();
443
+ if (this.options.sourceMap) {
444
+ // We are actually not interested in the source map this module might contain,
445
+ // but we should make sure to remove any "sourceMappingURL" from the module content before
446
+ // writing it to the bundle. Otherwise browser dev-tools might create unnecessary (and likely incorrect)
447
+ // requests for any referenced .map files
448
+ ({moduleContent} =
449
+ await this.getSourceMapForModule({
450
+ moduleName,
451
+ moduleContent,
452
+ resourcePath: resource.getPath()
453
+ }));
454
+ }
455
+ outW.write( makeStringLiteral(moduleContent) );
443
456
  } else if ( /\.html$/.test(moduleName) ) {
444
457
  const fileContent = (await resource.buffer()).toString();
445
458
  outW.write( makeStringLiteral( fileContent ) );
@@ -295,7 +295,9 @@ class BundleResolver {
295
295
  return modules;
296
296
  });
297
297
  }
298
-
298
+ if ( section.mode === SectionType.BundleInfo ) {
299
+ modules.sort();
300
+ }
299
301
  log.silly(` Resolved modules: ${modules}`);
300
302
  return modules;
301
303
  }).then( function(modules) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/builder",
3
- "version": "3.0.3",
3
+ "version": "3.0.5",
4
4
  "description": "UI5 Tooling - Builder",
5
5
  "author": {
6
6
  "name": "SAP SE",
@@ -118,41 +118,41 @@
118
118
  },
119
119
  "dependencies": {
120
120
  "@jridgewell/sourcemap-codec": "^1.4.15",
121
- "@ui5/fs": "^3.0.3",
121
+ "@ui5/fs": "^3.0.4",
122
122
  "@ui5/logger": "^3.0.0",
123
123
  "cheerio": "1.0.0-rc.12",
124
124
  "escape-unicode": "^0.2.0",
125
125
  "escope": "^4.0.0",
126
- "espree": "^9.5.1",
126
+ "espree": "^9.5.2",
127
127
  "graceful-fs": "^4.2.11",
128
128
  "jsdoc": "^4.0.2",
129
129
  "less-openui5": "^0.11.6",
130
130
  "pretty-data": "^0.40.0",
131
- "rimraf": "^5.0.0",
132
- "semver": "^7.5.0",
133
- "terser": "^5.17.0",
131
+ "rimraf": "^5.0.1",
132
+ "semver": "^7.5.1",
133
+ "terser": "^5.17.7",
134
134
  "workerpool": "^6.4.0",
135
- "xml2js": "^0.5.0"
135
+ "xml2js": "^0.6.0"
136
136
  },
137
137
  "devDependencies": {
138
138
  "@istanbuljs/esm-loader-hook": "^0.2.0",
139
- "@ui5/project": "^3.1.1",
140
- "ava": "^5.2.0",
139
+ "@ui5/project": "^3.3.1",
140
+ "ava": "^5.3.0",
141
141
  "chai": "^4.3.7",
142
142
  "chai-fs": "^2.0.0",
143
143
  "chokidar-cli": "^3.0.0",
144
144
  "cross-env": "^7.0.3",
145
145
  "depcheck": "^1.4.3",
146
146
  "docdash": "^2.0.1",
147
- "eslint": "^8.38.0",
147
+ "eslint": "^8.42.0",
148
148
  "eslint-config-google": "^0.14.0",
149
149
  "eslint-plugin-ava": "^14.0.0",
150
- "eslint-plugin-jsdoc": "^41.1.2",
151
- "esmock": "^2.2.1",
150
+ "eslint-plugin-jsdoc": "^46.2.2",
151
+ "esmock": "^2.3.1",
152
152
  "nyc": "^15.1.0",
153
153
  "open-cli": "^7.2.0",
154
154
  "recursive-readdir": "^2.2.3",
155
- "sinon": "^15.0.3",
155
+ "sinon": "^15.1.0",
156
156
  "tap-xunit": "^2.4.1"
157
157
  }
158
158
  }