@ui5/builder 5.0.0-alpha.4 → 5.0.0-alpha.6

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
@@ -4,6 +4,50 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
4
4
 
5
5
  A list of unreleased changes can be found [here](https://github.com/SAP/ui5-builder/compare/v4.0.11...HEAD).
6
6
 
7
+ ## [5.0.0-alpha.6](https://github.com/UI5/cli/compare/builder-v5.0.0-alpha.5...builder-v5.0.0-alpha.6) (2026-07-10)
8
+
9
+
10
+ ### chore
11
+
12
+ * **builder:** Synchronize ui5-cli-packages versions
13
+
14
+
15
+ ### Dependencies
16
+
17
+ * The following workspace dependencies were updated
18
+ * dependencies
19
+ * @ui5/fs bumped from ^5.0.0-alpha.5 to ^5.0.0-alpha.6
20
+ * @ui5/logger bumped from ^5.0.0-alpha.5 to ^5.0.0-alpha.6
21
+ * devDependencies
22
+ * @ui5/project bumped from ^5.0.0-alpha.5 to ^5.0.0-alpha.6
23
+
24
+ ## [5.0.0-alpha.5](https://github.com/UI5/cli/compare/builder-v5.0.0-alpha.4...builder-v5.0.0-alpha.5) (2026-06-24)
25
+
26
+
27
+ ### Features
28
+
29
+ * **builder:** Adapt build tasks for incremental builds ([ace5ebb](https://github.com/UI5/cli/commit/ace5ebb6bf10b7d72db6397460f12e9040121456))
30
+
31
+
32
+ ### Bug Fixes
33
+
34
+ * **builder:** Also detect import.meta as ESM indicator ([5d1dcb7](https://github.com/UI5/cli/commit/5d1dcb719056eba85dc13271493baa8d5cbd1bd1))
35
+ * **builder:** Reduce noise from ESM parse errors ([4e7f69a](https://github.com/UI5/cli/commit/4e7f69aede38571dcd4643414ff54ab6131a5c73))
36
+ * **builder:** Skip ESM modules during bundling and log errors ([20bcdf2](https://github.com/UI5/cli/commit/20bcdf212c30569a6aba5c7c61d5717bfd9b1d0b))
37
+ * **builder:** Update lbt/bundle/Resolver to ensure deterministic ordering of raw modules ([9d19923](https://github.com/UI5/cli/commit/9d19923437f41f511cb51fb8477e7a2dec1f0d13))
38
+
39
+
40
+ ### Dependencies
41
+
42
+ * Bump espree from 10.4.0 to 11.2.0 ([#1381](https://github.com/UI5/cli/issues/1381)) ([29a00b2](https://github.com/UI5/cli/commit/29a00b236e4c410e4a47ccb0842e851ff9e2ab4a))
43
+ * Update npm dependencies ([0ac8ebb](https://github.com/UI5/cli/commit/0ac8ebbb5ffe9fc6e4455244cf5da50e4c540c5c))
44
+ * The following workspace dependencies were updated
45
+ * dependencies
46
+ * @ui5/fs bumped from ^5.0.0-alpha.4 to ^5.0.0-alpha.5
47
+ * @ui5/logger bumped from ^5.0.0-alpha.4 to ^5.0.0-alpha.5
48
+ * devDependencies
49
+ * @ui5/project bumped from ^5.0.0-alpha.4 to ^5.0.0-alpha.5
50
+
7
51
  ## [5.0.0-alpha.4](https://github.com/UI5/cli/compare/builder-v5.0.0-alpha.3...builder-v5.0.0-alpha.4) (2026-03-24)
8
52
 
9
53
 
@@ -597,10 +597,11 @@ class BundleBuilder {
597
597
  }
598
598
  }
599
599
 
600
- writeRequires(section) {
600
+ async writeRequires(section) {
601
601
  if (section.modules.length === 0) {
602
602
  return;
603
603
  }
604
+
604
605
  this.outW.ensureNewLine();
605
606
  if (section.async === false) {
606
607
  section.modules.forEach( (module) => {
@@ -767,7 +768,7 @@ async function rewriteDefine({moduleName, moduleContent, moduleSourceMap}) {
767
768
  } catch (e) {
768
769
  log.error(`Error while parsing ${moduleName}: ${e.message}`);
769
770
  log.verbose(e.stack);
770
- return {};
771
+ return null;
771
772
  }
772
773
 
773
774
  if ( ast.type === Syntax.Program &&
@@ -67,6 +67,7 @@ class ResolvedBundleDefinition {
67
67
  return pool.getModuleInfo(submodule).then(
68
68
  (subinfo) => {
69
69
  if (!bundleInfo.subModules.includes(subinfo.name) &&
70
+ subinfo.format !== ModuleInfo.Format.ESM &&
70
71
  (!subinfo.requiresTopLevelScope ||
71
72
  (subinfo.requiresTopLevelScope && allowStringBundling))) {
72
73
  bundleInfo.addSubModule(subinfo);
@@ -4,6 +4,7 @@
4
4
 
5
5
  import topologicalSort from "../graph/topologicalSort.js";
6
6
  import {getRendererName} from "../UI5ClientConstants.js";
7
+ import ModuleInfo from "../resources/ModuleInfo.js";
7
8
  import ResourceFilterList from "../resources/ResourceFilterList.js";
8
9
  import {SectionType} from "./BundleDefinition.js";
9
10
  import ResolvedBundleDefinition from "./ResolvedBundleDefinition.js";
@@ -135,6 +136,16 @@ class BundleResolver {
135
136
  const dependencyInfo = resource && resource.info;
136
137
  let promises = [];
137
138
 
139
+ // Skip ESM modules — they can't be bundled
140
+ if (resource?.info?.format === ModuleInfo.Format.ESM) {
141
+ log.error(
142
+ `Module ${resourceName} is an ECMAScript Module (ESM), ` +
143
+ `which is not supported for bundling. ` +
144
+ `The module will be skipped.`
145
+ );
146
+ return;
147
+ }
148
+
138
149
  if ( isBundle && !decomposable ) {
139
150
  resource.info.subModules.forEach(
140
151
  (included) => {
@@ -318,6 +329,15 @@ class BundleResolver {
318
329
  return collectModulesForSection(section).
319
330
  then( (modules) => {
320
331
  if ( section.mode == SectionType.Raw && section.sort !== false ) {
332
+ // Sort modules by their filter definition order to ensure
333
+ // deterministic input for the topological sort.
334
+ // Topological sort preserves input order for tie-breaking,
335
+ // so this ensures modules at the same dependency level
336
+ // appear in the order defined by the section filters.
337
+ const filterOrder = new ResourceFilterList(section.filters, fileTypes);
338
+ modules.sort((a, b) => {
339
+ return filterOrder.matchIndex(a) - filterOrder.matchIndex(b);
340
+ });
321
341
  // sort the modules in topological order
322
342
  return topologicalSort(pool, modules).then( (modules) => {
323
343
  log.silly(` Resolved modules (sorted): ${modules}`);
@@ -39,7 +39,7 @@ class SapUiDefineCall {
39
39
  this.dependencies = this.dependencyArray.elements.map( (elem) => {
40
40
  const value = getStringValue(elem);
41
41
  if ( !value ) {
42
- throw new TypeError();
42
+ throw new TypeError(`dependency element is not a string literal in module ${this.name}`);
43
43
  }
44
44
  return resolveRelativeRequireJSName(this.name, value);
45
45
  });
@@ -25,7 +25,8 @@ const CONDITIONAL = 2;
25
25
  const Format = {
26
26
  UI5_LEGACY: "ui5-declare",
27
27
  UI5_DEFINE: "ui5-define",
28
- AMD: "amd"
28
+ AMD: "amd",
29
+ ESM: "esm"
29
30
  };
30
31
 
31
32
  /**
@@ -124,6 +124,16 @@ export default class ResourceFilterList {
124
124
  );
125
125
  }
126
126
 
127
+ matchIndex(candidate) {
128
+ for (let i = 0; i < this.matchers.length; i++) {
129
+ const matcher = this.matchers[i];
130
+ if (matcher.include && matcher.calcMatch(candidate, false)) {
131
+ return i;
132
+ }
133
+ }
134
+ return this.matchers.length;
135
+ }
136
+
127
137
  toString() {
128
138
  return this.matchers.map((matcher) => matcher.pattern).join(",");
129
139
  }
@@ -62,8 +62,12 @@ async function determineDependencyInfo(resource, rawInfo, pool) {
62
62
  try {
63
63
  ast = parseJS(code, {comment: true});
64
64
  } catch (err) {
65
- log.error(`Failed to parse ${resource.name}: ${err.message}`);
65
+ log.verbose(`Failed to parse ${resource.name}: ${err.message}`);
66
66
  log.verbose(err.stack);
67
+ if (err.message.includes("'import' and 'export' may appear only with 'sourceType: module'") ||
68
+ err.message.includes("Cannot use 'import.meta' outside a module")) {
69
+ info.format = ModuleInfo.Format.ESM;
70
+ }
67
71
  }
68
72
  if (ast) {
69
73
  try {
@@ -243,4 +247,3 @@ class ResourcePool {
243
247
  }
244
248
 
245
249
  export default ResourcePool;
246
-
@@ -18,8 +18,8 @@ import {createResource} from "@ui5/fs/resourceFactory";
18
18
  * @param {@ui5/fs/Resource[]} parameters.resources List of resources to be processed
19
19
  * @param {object} parameters.options Options
20
20
  * @param {string} parameters.options.pathPrefix Prefix for bundle path
21
- * @param {string} parameters.options.hasFlexBundleVersion true if minUI5Version >= 1.73 than
22
- * create flexibility-bundle.json
21
+ * @param {string} parameters.options.hasFlexBundleVersion true if minUI5Version >= 1.73
22
+ * and create flexibility-bundle.json
23
23
  * @param {object} [parameters.existingFlexBundle={}] Object with existing flexibility-bundle.json
24
24
  * to merge with new changes
25
25
  * @returns {Promise<@ui5/fs/Resource[]>} Promise resolving with flex changes bundle resources
@@ -45,6 +45,7 @@ export default function({resources, options: {pathPrefix, hasFlexBundleVersion},
45
45
  const variants = [];
46
46
  const variantChanges = [];
47
47
  const variantManagementChanges = [];
48
+ const annotationChanges = [];
48
49
 
49
50
  changesContent.forEach(function(content) {
50
51
  if (content.layer === "VENDOR") {
@@ -74,14 +75,23 @@ export default function({resources, options: {pathPrefix, hasFlexBundleVersion},
74
75
  case "ctrl_variant_management_change":
75
76
  variantManagementChanges.push(content);
76
77
  break;
78
+ case "annotation_change":
79
+ annotationChanges.push(content);
80
+ break;
77
81
  }
78
82
  });
79
83
 
80
- if (!hasFlexBundleVersion && (compVariants.length != 0 || variants.length != 0 || variantChanges.length != 0 ||
81
- variantDependentControlChanges.length != 0 || variantManagementChanges.length != 0)) {
84
+ if (!hasFlexBundleVersion && (
85
+ compVariants.length != 0 ||
86
+ variants.length != 0 ||
87
+ variantChanges.length != 0 ||
88
+ variantDependentControlChanges.length != 0 ||
89
+ variantManagementChanges.length != 0 ||
90
+ annotationChanges.length != 0
91
+ )) {
82
92
  throw new Error(
83
- "There are some control variant changes in the changes folder. This only works with a " +
84
- "minUI5Version 1.73.0. Please update the minUI5Version in the manifest.json to 1.73.0 or higher");
93
+ "There are some files in the changes folder supported only with a UI5 version 1.73 and above. " +
94
+ "Please update the minUI5Version in the manifest.json to 1.73 or higher");
85
95
  }
86
96
  // create changes-bundle.json
87
97
  if (!hasFlexBundleVersion) {
@@ -89,6 +99,7 @@ export default function({resources, options: {pathPrefix, hasFlexBundleVersion},
89
99
  } else {
90
100
  bundleName = "flexibility-bundle.json";
91
101
  let newChangeFormat = {
102
+ annotationChanges,
92
103
  changes,
93
104
  compVariants,
94
105
  variants,
@@ -163,10 +163,11 @@ async function buildJsdoc({sourcePath, configPath}) {
163
163
  "--verbose",
164
164
  sourcePath
165
165
  ];
166
- const exitCode = await new Promise((resolve /* , reject */) => {
166
+ const exitCode = await new Promise((resolve, reject) => {
167
167
  const child = spawn("node", args, {
168
168
  stdio: ["ignore", "ignore", "inherit"]
169
169
  });
170
+ child.on("error", reject);
170
171
  child.on("close", resolve);
171
172
  });
172
173
 
@@ -83,8 +83,8 @@ async function nonAsciiEscaper({resources, options: {encoding}}) {
83
83
  // only modify the resource's string if it was changed
84
84
  if (escaped.modified) {
85
85
  resource.setString(escaped.string);
86
+ return resource;
86
87
  }
87
- return resource;
88
88
  }
89
89
 
90
90
  return Promise.all(resources.map(processResource));
@@ -21,9 +21,10 @@ export default function({resources, options: {pattern, replacement}}) {
21
21
  return Promise.all(resources.map(async (resource) => {
22
22
  const content = await resource.getString();
23
23
  const newContent = content.replaceAll(pattern, replacement);
24
+ // only modify the resource's string if it was changed
24
25
  if (content !== newContent) {
25
26
  resource.setString(newContent);
27
+ return resource;
26
28
  }
27
- return resource;
28
29
  }));
29
30
  }
@@ -192,7 +192,7 @@ export default async function({
192
192
  }
193
193
 
194
194
  let processedResources;
195
- const useWorkers = !!taskUtil;
195
+ const useWorkers = !process.env.UI5_CLI_NO_WORKERS && !!taskUtil;
196
196
  if (useWorkers) {
197
197
  const threadMessageHandler = new FsMainThreadInterface(fsInterface(combo));
198
198
 
@@ -95,7 +95,9 @@ export default async function({workspace, taskUtil, options = {}}) {
95
95
 
96
96
  log.verbose("Collecting flexibility changes");
97
97
  const allResources = await workspace.byGlob(
98
- `${pathPrefix}/changes/*.{change,variant,ctrl_variant,ctrl_variant_change,ctrl_variant_management_change}`);
98
+ pathPrefix + "/changes/*.{annotation_change,change,variant,ctrl_variant," +
99
+ "ctrl_variant_change,ctrl_variant_management_change}"
100
+ );
99
101
 
100
102
  let bBundleCreated = false;
101
103
 
@@ -14,17 +14,24 @@ import nonAsciiEscaper from "../processors/nonAsciiEscaper.js";
14
14
  *
15
15
  * @param {object} parameters Parameters
16
16
  * @param {@ui5/fs/DuplexCollection} parameters.workspace DuplexCollection to read and write files
17
+ * @param {string[]} [parameters.changedProjectResourcePaths] Set of changed resource paths within the project.
18
+ * This is only set if a cache is used and changes have been detected.
17
19
  * @param {object} parameters.options Options
18
20
  * @param {string} parameters.options.pattern Glob pattern to locate the files to be processed
19
21
  * @param {string} parameters.options.encoding source file encoding either "UTF-8" or "ISO-8859-1"
20
22
  * @returns {Promise<undefined>} Promise resolving with <code>undefined</code> once data has been written
21
23
  */
22
- export default async function({workspace, options: {pattern, encoding}}) {
24
+ export default async function({workspace, changedProjectResourcePaths, options: {pattern, encoding}}) {
23
25
  if (!encoding) {
24
26
  throw new Error("[escapeNonAsciiCharacters] Mandatory option 'encoding' not provided");
25
27
  }
26
28
 
27
- const allResources = await workspace.byGlob(pattern);
29
+ let allResources;
30
+ if (changedProjectResourcePaths) {
31
+ allResources = await Promise.all(changedProjectResourcePaths.map((resource) => workspace.byPath(resource)));
32
+ } else {
33
+ allResources = await workspace.byGlob(pattern);
34
+ }
28
35
 
29
36
  const processedResources = await nonAsciiEscaper({
30
37
  resources: allResources,
@@ -33,5 +40,5 @@ export default async function({workspace, options: {pattern, encoding}}) {
33
40
  }
34
41
  });
35
42
 
36
- await Promise.all(processedResources.map((resource) => workspace.write(resource)));
43
+ await Promise.all(processedResources.map((resource) => resource && workspace.write(resource)));
37
44
  }
@@ -16,6 +16,8 @@ import fsInterface from "@ui5/fs/fsInterface";
16
16
  * @param {object} parameters Parameters
17
17
  * @param {@ui5/fs/DuplexCollection} parameters.workspace DuplexCollection to read and write files
18
18
  * @param {@ui5/project/build/helpers/TaskUtil|object} [parameters.taskUtil] TaskUtil
19
+ * @param {string[]} [parameters.changedProjectResourcePaths] Set of changed resource paths within the project.
20
+ * This is only set if a cache is used and changes have been detected.
19
21
  * @param {object} parameters.options Options
20
22
  * @param {string} parameters.options.pattern Pattern to locate the files to be processed
21
23
  * @param {boolean} [parameters.options.omitSourceMapResources=false] Whether source map resources shall
@@ -26,9 +28,24 @@ import fsInterface from "@ui5/fs/fsInterface";
26
28
  * @returns {Promise<undefined>} Promise resolving with <code>undefined</code> once data has been written
27
29
  */
28
30
  export default async function({
29
- workspace, taskUtil, options: {pattern, omitSourceMapResources = false, useInputSourceMaps = true
30
- }}) {
31
- const resources = await workspace.byGlob(pattern);
31
+ workspace, taskUtil, changedProjectResourcePaths,
32
+ options: {pattern, omitSourceMapResources = false, useInputSourceMaps = true}
33
+ }) {
34
+ let resources;
35
+ if (changedProjectResourcePaths) {
36
+ resources = await Promise.all(
37
+ changedProjectResourcePaths
38
+ // Filtering out non-JS resources such as .map files
39
+ // FIXME: The changed resources should rather be matched against the provided pattern
40
+ .filter((resourcePath) => resourcePath.endsWith(".js"))
41
+ .map((resource) => workspace.byPath(resource))
42
+ );
43
+ } else {
44
+ resources = await workspace.byGlob(pattern);
45
+ }
46
+ if (resources.length === 0) {
47
+ return;
48
+ }
32
49
  const processedResources = await minifier({
33
50
  resources,
34
51
  fs: fsInterface(workspace),
@@ -36,7 +53,7 @@ export default async function({
36
53
  options: {
37
54
  addSourceMappingUrl: !omitSourceMapResources,
38
55
  readSourceMappingUrl: !!useInputSourceMaps,
39
- useWorkers: !!taskUtil,
56
+ useWorkers: !process.env.UI5_CLI_NO_WORKERS && !!taskUtil,
40
57
  }
41
58
  });
42
59
 
@@ -28,26 +28,30 @@ function getTimestamp() {
28
28
  *
29
29
  * @param {object} parameters Parameters
30
30
  * @param {@ui5/fs/DuplexCollection} parameters.workspace DuplexCollection to read and write files
31
+ * @param {string[]} [parameters.changedProjectResourcePaths] Set of changed resource paths within the project.
32
+ * This is only set if a cache is used and changes have been detected.
31
33
  * @param {object} parameters.options Options
32
34
  * @param {string} parameters.options.pattern Pattern to locate the files to be processed
33
35
  * @returns {Promise<undefined>} Promise resolving with <code>undefined</code> once data has been written
34
36
  */
35
- export default function({workspace, options: {pattern}}) {
37
+ export default async function({workspace, changedProjectResourcePaths, options: {pattern}}) {
38
+ let resources;
39
+ if (changedProjectResourcePaths) {
40
+ resources = await Promise.all(changedProjectResourcePaths.map((resource) => workspace.byPath(resource)));
41
+ } else {
42
+ resources = await workspace.byGlob(pattern);
43
+ }
36
44
  const timestamp = getTimestamp();
37
-
38
- return workspace.byGlob(pattern)
39
- .then((processedResources) => {
40
- return stringReplacer({
41
- resources: processedResources,
42
- options: {
43
- pattern: "${buildtime}",
44
- replacement: timestamp
45
- }
46
- });
47
- })
48
- .then((processedResources) => {
49
- return Promise.all(processedResources.map((resource) => {
50
- return workspace.write(resource);
51
- }));
52
- });
45
+ const processedResources = await stringReplacer({
46
+ resources,
47
+ options: {
48
+ pattern: "${buildtime}",
49
+ replacement: timestamp
50
+ }
51
+ });
52
+ return Promise.all(processedResources.map((resource) => {
53
+ if (resource) {
54
+ return workspace.write(resource);
55
+ }
56
+ }));
53
57
  }
@@ -24,32 +24,38 @@ import stringReplacer from "../processors/stringReplacer.js";
24
24
  *
25
25
  * @param {object} parameters Parameters
26
26
  * @param {@ui5/fs/DuplexCollection} parameters.workspace DuplexCollection to read and write files
27
+ * @param {string[]} [parameters.changedProjectResourcePaths] Set of changed resource paths within the project.
28
+ * This is only set if a cache is used and changes have been detected.
27
29
  * @param {object} parameters.options Options
28
30
  * @param {string} parameters.options.copyright Replacement copyright
29
31
  * @param {string} parameters.options.pattern Pattern to locate the files to be processed
30
32
  * @returns {Promise<undefined>} Promise resolving with <code>undefined</code> once data has been written
31
33
  */
32
- export default function({workspace, options: {copyright, pattern}}) {
34
+ export default async function({workspace, changedProjectResourcePaths, options: {copyright, pattern}}) {
33
35
  if (!copyright) {
34
- return Promise.resolve();
36
+ return;
35
37
  }
36
38
 
37
39
  // Replace optional placeholder ${currentYear} with the current year
38
40
  copyright = copyright.replace(/(?:\$\{currentYear\})/, new Date().getFullYear());
39
41
 
40
- return workspace.byGlob(pattern)
41
- .then((processedResources) => {
42
- return stringReplacer({
43
- resources: processedResources,
44
- options: {
45
- pattern: /(?:\$\{copyright\}|@copyright@)/g,
46
- replacement: copyright
47
- }
48
- });
49
- })
50
- .then((processedResources) => {
51
- return Promise.all(processedResources.map((resource) => {
52
- return workspace.write(resource);
53
- }));
54
- });
42
+ let resources;
43
+ if (changedProjectResourcePaths) {
44
+ resources = await Promise.all(changedProjectResourcePaths.map((resource) => workspace.byPath(resource)));
45
+ } else {
46
+ resources = await workspace.byGlob(pattern);
47
+ }
48
+
49
+ const processedResources = await stringReplacer({
50
+ resources,
51
+ options: {
52
+ pattern: /(?:\$\{copyright\}|@copyright@)/g,
53
+ replacement: copyright
54
+ }
55
+ });
56
+ return Promise.all(processedResources.map((resource) => {
57
+ if (resource) {
58
+ return workspace.write(resource);
59
+ }
60
+ }));
55
61
  }
@@ -14,25 +14,30 @@ import stringReplacer from "../processors/stringReplacer.js";
14
14
  *
15
15
  * @param {object} parameters Parameters
16
16
  * @param {@ui5/fs/DuplexCollection} parameters.workspace DuplexCollection to read and write files
17
+ * @param {string[]} [parameters.changedProjectResourcePaths] Set of changed resource paths within the project.
18
+ * This is only set if a cache is used and changes have been detected.
17
19
  * @param {object} parameters.options Options
18
20
  * @param {string} parameters.options.pattern Pattern to locate the files to be processed
19
21
  * @param {string} parameters.options.version Replacement version
20
22
  * @returns {Promise<undefined>} Promise resolving with <code>undefined</code> once data has been written
21
23
  */
22
- export default function({workspace, options: {pattern, version}}) {
23
- return workspace.byGlob(pattern)
24
- .then((allResources) => {
25
- return stringReplacer({
26
- resources: allResources,
27
- options: {
28
- pattern: /\$\{(?:project\.)?version\}/g,
29
- replacement: version
30
- }
31
- });
32
- })
33
- .then((processedResources) => {
34
- return Promise.all(processedResources.map((resource) => {
35
- return workspace.write(resource);
36
- }));
37
- });
24
+ export default async function({workspace, changedProjectResourcePaths, options: {pattern, version}}) {
25
+ let resources;
26
+ if (changedProjectResourcePaths) {
27
+ resources = await Promise.all(changedProjectResourcePaths.map((resource) => workspace.byPath(resource)));
28
+ } else {
29
+ resources = await workspace.byGlob(pattern);
30
+ }
31
+ const processedResources = await stringReplacer({
32
+ resources,
33
+ options: {
34
+ pattern: /\$\{(?:project\.)?version\}/g,
35
+ replacement: version
36
+ }
37
+ });
38
+ await Promise.all(processedResources.map((resource) => {
39
+ if (resource) {
40
+ return workspace.write(resource);
41
+ }
42
+ }));
38
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/builder",
3
- "version": "5.0.0-alpha.4",
3
+ "version": "5.0.0-alpha.6",
4
4
  "description": "UI5 CLI - Builder",
5
5
  "author": {
6
6
  "name": "SAP SE",
@@ -91,32 +91,32 @@
91
91
  },
92
92
  "dependencies": {
93
93
  "@jridgewell/sourcemap-codec": "^1.5.5",
94
- "@ui5/fs": "^5.0.0-alpha.4",
95
- "@ui5/logger": "^5.0.0-alpha.4",
94
+ "@ui5/fs": "^5.0.0-alpha.6",
95
+ "@ui5/logger": "^5.0.0-alpha.6",
96
96
  "cheerio": "1.0.0",
97
97
  "escape-unicode": "^0.3.0",
98
98
  "escope": "^4.0.0",
99
- "espree": "^10.4.0",
99
+ "espree": "^11.2.0",
100
100
  "graceful-fs": "^4.2.11",
101
- "jsdoc": "^4.0.4",
101
+ "jsdoc": "^4.0.5",
102
102
  "less-openui5": "^0.11.6",
103
103
  "pretty-data": "^0.40.0",
104
- "semver": "^7.7.2",
105
- "terser": "^5.44.0",
106
- "workerpool": "^10.0.1",
104
+ "semver": "^7.8.5",
105
+ "terser": "^5.48.0",
106
+ "workerpool": "^10.0.2",
107
107
  "xml2js": "^0.6.2"
108
108
  },
109
109
  "devDependencies": {
110
110
  "@istanbuljs/esm-loader-hook": "^0.3.0",
111
111
  "@jridgewell/trace-mapping": "^0.3.31",
112
- "@ui5/project": "^5.0.0-alpha.4",
112
+ "@ui5/project": "^5.0.0-alpha.6",
113
113
  "ava": "^6.4.1",
114
114
  "cross-env": "^10.1.0",
115
- "eslint": "^9.36.0",
116
- "esmock": "^2.7.3",
115
+ "eslint": "^10.5.0",
116
+ "esmock": "^2.7.6",
117
117
  "line-column": "^1.0.2",
118
- "nyc": "^17.1.0",
119
- "rimraf": "^6.0.1",
120
- "sinon": "^21.0.0"
118
+ "nyc": "^18.0.0",
119
+ "rimraf": "^6.1.3",
120
+ "sinon": "^21.1.2"
121
121
  }
122
122
  }