@ui5/builder 3.0.4 → 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,16 @@
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.4...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
+
6
15
 
7
16
  <a name="v3.0.4"></a>
8
17
  ## [v3.0.4] - 2023-05-23
@@ -791,6 +800,7 @@ to load the custom bundle file instead.
791
800
 
792
801
  ### Features
793
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
794
804
  [v3.0.4]: https://github.com/SAP/ui5-builder/compare/v3.0.3...v3.0.4
795
805
  [v3.0.3]: https://github.com/SAP/ui5-builder/compare/v3.0.2...v3.0.3
796
806
  [v3.0.2]: https://github.com/SAP/ui5-builder/compare/v3.0.1...v3.0.2
@@ -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 ) );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/builder",
3
- "version": "3.0.4",
3
+ "version": "3.0.5",
4
4
  "description": "UI5 Tooling - Builder",
5
5
  "author": {
6
6
  "name": "SAP SE",
@@ -130,25 +130,25 @@
130
130
  "pretty-data": "^0.40.0",
131
131
  "rimraf": "^5.0.1",
132
132
  "semver": "^7.5.1",
133
- "terser": "^5.17.4",
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.3.0",
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.41.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": "^44.2.4",
151
- "esmock": "^2.2.3",
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",