@zohodesk/client_build_tool 0.0.9 → 0.0.10
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 +10 -0
- package/README.md +10 -0
- package/lib/schemas/defaultConfigValues.js +4 -1
- package/lib/shared/babel/getBabelPlugin.js +9 -4
- package/lib/shared/babel/runBabelForTsFile.js +1 -1
- package/lib/shared/server/mockApiHandler.js +7 -0
- package/npm-shrinkwrap.json +8240 -32
- package/package.json +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
# Changelog and Release Notes
|
|
2
|
+
# v0.0.10 (12-05-2025)
|
|
3
|
+
**Feature:-**
|
|
4
|
+
- `alias` support for `build:es` and `build:lib`
|
|
5
|
+
- Add babel-plugin-module-resolver dependencies
|
|
6
|
+
- Modify getBabelPlugin to include module resolver with aliases
|
|
2
7
|
|
|
8
|
+
**Bug Fix:-**
|
|
9
|
+
- Enhance runBabelForTSFile to handle both .tsx and .ts file extensions
|
|
10
|
+
- Update mockApiHandler to ensure mock function is called correctly
|
|
3
11
|
|
|
12
|
+
**Change:-**
|
|
13
|
+
- Refactor defaultConfigValues.js to include cli options for enableRTLSplit
|
|
4
14
|
|
|
5
15
|
**Feature:-**
|
|
6
16
|
- externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
|
package/README.md
CHANGED
|
@@ -99,8 +99,18 @@ fixes :-
|
|
|
99
99
|
- preload plc undefined url fixed
|
|
100
100
|
|
|
101
101
|
# Changelog and Release Notes
|
|
102
|
+
# v0.0.10 (12-05-2025)
|
|
103
|
+
**Feature:-**
|
|
104
|
+
- `alias` support for `build:es` and `build:lib`
|
|
105
|
+
- Add babel-plugin-module-resolver dependencies
|
|
106
|
+
- Modify getBabelPlugin to include module resolver with aliases
|
|
102
107
|
|
|
108
|
+
**Bug Fix:-**
|
|
109
|
+
- Enhance runBabelForTSFile to handle both .tsx and .ts file extensions
|
|
110
|
+
- Update mockApiHandler to ensure mock function is called correctly
|
|
103
111
|
|
|
112
|
+
**Change:-**
|
|
113
|
+
- Refactor defaultConfigValues.js to include cli options for enableRTLSplit
|
|
104
114
|
|
|
105
115
|
**Feature:-**
|
|
106
116
|
- externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
|
|
@@ -115,7 +115,10 @@ var _default = {
|
|
|
115
115
|
// Name Suggestions `customizations` this will be easier then `plugin` to understand for developers
|
|
116
116
|
plugins: {
|
|
117
117
|
rtlSplit: {
|
|
118
|
-
enableRTLSplit:
|
|
118
|
+
enableRTLSplit: {
|
|
119
|
+
value: false,
|
|
120
|
+
cli: 'enable_rtl_split'
|
|
121
|
+
},
|
|
119
122
|
templateLabel: '{{--dir}}',
|
|
120
123
|
disableMinifySelector: false,
|
|
121
124
|
dirVarName: 'document.dir'
|
|
@@ -20,7 +20,14 @@ function getBabelPlugin(options) {
|
|
|
20
20
|
const {
|
|
21
21
|
mode
|
|
22
22
|
} = options;
|
|
23
|
-
|
|
23
|
+
const {
|
|
24
|
+
alias
|
|
25
|
+
} = options.resolve; // let customPlugins = [];
|
|
26
|
+
|
|
27
|
+
let customPlugins = [[require.resolve('babel-plugin-module-resolver'), {
|
|
28
|
+
root: ['./'],
|
|
29
|
+
alias
|
|
30
|
+
}]];
|
|
24
31
|
const {
|
|
25
32
|
babelCustomizations
|
|
26
33
|
} = options;
|
|
@@ -32,6 +39,4 @@ function getBabelPlugin(options) {
|
|
|
32
39
|
}
|
|
33
40
|
|
|
34
41
|
return customPlugins.filter(Boolean);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
;
|
|
42
|
+
}
|
|
@@ -25,6 +25,6 @@ function runBabelForTSFile({
|
|
|
25
25
|
// const jsSourceCode = readFileSync(filename).toString();
|
|
26
26
|
const babelConfig = (0, _babelWebConfig.babelWebConfig)(options, mode);
|
|
27
27
|
const result = (0, _core.transformFileSync)(filename, babelConfig);
|
|
28
|
-
(0, _copyFile.writeFile)(outputFile.replace('.tsx', '.js'), result.code);
|
|
28
|
+
(0, _copyFile.writeFile)(outputFile.replace('.tsx', '.js').replace('.ts', '.js'), result.code);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -44,6 +44,13 @@ function handleMockApi(mockEntryFile, app) {
|
|
|
44
44
|
const entryFilePath = (0, _constants.joinWithAppPath)(mockEntryFile); // eslint-disable-next-line no-use-before-define
|
|
45
45
|
|
|
46
46
|
const mockFunc = safeRequire(entryFilePath);
|
|
47
|
+
|
|
48
|
+
if (typeof mockFunc === 'function') {
|
|
49
|
+
// eslint-disable-next-line no-use-before-define
|
|
50
|
+
mockFunc(app);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
|
|
47
54
|
mockFunc?.mockApi?.(app);
|
|
48
55
|
} // function handleMockApi(params) {
|
|
49
56
|
// }
|