babel-plugin-transform-modules-ui5 7.1.2 → 7.1.4
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 +22 -0
- package/dist/utils/templates.js +10 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [7.1.4](https://github.com/ui5-community/babel-plugin-transform-modules-ui5/compare/v7.1.3...v7.1.4) (2023-04-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* properly handle dynamic import of non-existing modules ([#94](https://github.com/ui5-community/babel-plugin-transform-modules-ui5/issues/94)) ([c443b36](https://github.com/ui5-community/babel-plugin-transform-modules-ui5/commit/c443b36d5035d2e2fa367e074d0732336af8eb78))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [7.1.3](https://github.com/ui5-community/babel-plugin-transform-modules-ui5/compare/v7.1.2...v7.1.3) (2023-04-11)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* dynamic import must not handle __esModule flagged modules ([#93](https://github.com/ui5-community/babel-plugin-transform-modules-ui5/issues/93)) ([b269985](https://github.com/ui5-community/babel-plugin-transform-modules-ui5/commit/b26998540cac0c2c2868bd59198d6f9abfaab8f7))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## [7.1.2](https://github.com/ui5-community/babel-plugin-transform-modules-ui5/compare/v7.1.1...v7.1.2) (2023-04-11)
|
|
7
29
|
|
|
8
30
|
|
package/dist/utils/templates.js
CHANGED
|
@@ -142,6 +142,14 @@ const buildDefaultImportDeconstructor = (0, _core.template)(`
|
|
|
142
142
|
*
|
|
143
143
|
* (await import("./non/exporting/module")) => { __esModule: true, ... }
|
|
144
144
|
* (await import("./non/exporting/module")) => undefined
|
|
145
|
+
*
|
|
146
|
+
* 5.) Other dependencies (jsPDF)
|
|
147
|
+
*
|
|
148
|
+
* (await import("jsPDF")) => { __esModule: true, jsPDF: ?, ... }
|
|
149
|
+
* (await import("sap/m/MessageBox")).jsPDF => jsPDF
|
|
150
|
+
*
|
|
151
|
+
* When requiring other dependencies they are already flagged as __esModule
|
|
152
|
+
* and must not be processed in our dynamic import to require handler.
|
|
145
153
|
*/
|
|
146
154
|
// TODO: inject __extends instead of Object.assign unless useBuiltIns in set
|
|
147
155
|
exports.buildDefaultImportDeconstructor = buildDefaultImportDeconstructor;
|
|
@@ -149,8 +157,8 @@ const buildDynamicImportHelper = (0, _core.template)(`
|
|
|
149
157
|
function __ui5_require_async(path) {
|
|
150
158
|
return new Promise((resolve, reject) => {
|
|
151
159
|
sap.ui.require([path], (module) => {
|
|
152
|
-
|
|
153
|
-
|
|
160
|
+
if (!(module && module.__esModule)) {
|
|
161
|
+
module = module === null || !(typeof module === "object" && path.endsWith("/library")) ? { default: module } : module;
|
|
154
162
|
Object.defineProperty(module, "__esModule", { value: true });
|
|
155
163
|
}
|
|
156
164
|
resolve(module);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babel-plugin-transform-modules-ui5",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.4",
|
|
4
4
|
"description": "An unofficial babel plugin for SAP UI5.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"prettier": "^2.8.4",
|
|
93
93
|
"rimraf": "^4.1.2"
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "4a3fb836d05e71f8a4b89f7597b8d234edf18e55"
|
|
96
96
|
}
|