babel-plugin-transform-modules-ui5 7.4.0 → 7.4.1
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 +11 -0
- package/dist/modules/visitor.js +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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.4.1](https://github.com/ui5-community/babel-plugin-transform-modules-ui5/compare/v7.4.0...v7.4.1) (2024-06-02)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* ensure to remove file ext .js only from module path ([#127](https://github.com/ui5-community/babel-plugin-transform-modules-ui5/issues/127)) ([c6afb92](https://github.com/ui5-community/babel-plugin-transform-modules-ui5/commit/c6afb92c2f758a245086baa6f77d3274bb4e5466))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [7.4.0](https://github.com/ui5-community/babel-plugin-transform-modules-ui5/compare/v7.3.1...v7.4.0) (2024-05-31)
|
|
7
18
|
|
|
8
19
|
|
package/dist/modules/visitor.js
CHANGED
|
@@ -37,11 +37,11 @@ const hasGlobalExportFlag = node => (0, _jsdoc.hasJsdocGlobalExportFlag)(node);
|
|
|
37
37
|
const addImport = (imports, imp, filename, first) => {
|
|
38
38
|
const existingImport = imports.find(i => i.src === imp.src);
|
|
39
39
|
if (!existingImport) {
|
|
40
|
-
// if a module ends with the file extension ".js" and it can be resolved to
|
|
40
|
+
// if a module path ends with the file extension ".js" and it can be resolved to
|
|
41
41
|
// a local file having also the file extension ".js" and not ".js.js" then
|
|
42
42
|
// we need to slice the file extension to avoid redundant file extension
|
|
43
43
|
// (the require/define of UI5 always adds the file extension ".js" to the module name)
|
|
44
|
-
if (imp.src
|
|
44
|
+
if (/^(?:(@[^/]+)\/)?([^/]+)\/(.*)\.js$/.test(imp.src)) {
|
|
45
45
|
try {
|
|
46
46
|
const modulePath = require.resolve(imp.src);
|
|
47
47
|
if (modulePath.endsWith(imp.src.split("/").pop())) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babel-plugin-transform-modules-ui5",
|
|
3
|
-
"version": "7.4.
|
|
3
|
+
"version": "7.4.1",
|
|
4
4
|
"description": "An unofficial babel plugin for SAP UI5.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -94,5 +94,5 @@
|
|
|
94
94
|
"prettier": "^3.1.0",
|
|
95
95
|
"rimraf": "^5.0.5"
|
|
96
96
|
},
|
|
97
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "9c9165b630703bc760131df1277f258468c809ea"
|
|
98
98
|
}
|