Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ui5/builder

Package Overview
Dependencies
Maintainers
4
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ui5/builder - npm Package Compare versions

Comparing version 3.2.0 to 3.3.0

9

CHANGELOG.md

@@ -5,4 +5,10 @@ # Changelog

A list of unreleased changes can be found [here](https://github.com/SAP/ui5-builder/compare/v3.2.0...HEAD).
A list of unreleased changes can be found [here](https://github.com/SAP/ui5-builder/compare/v3.3.0...HEAD).
<a name="v3.3.0"></a>
## [v3.3.0] - 2024-01-18
### Features
- **flexChangesBundler:** Merge existing with new flexibility-bundle.json [`fd070ab`](https://github.com/SAP/ui5-builder/commit/fd070abaa22680ee70b448fa0ac406a8f2b57cc5)
<a name="v3.2.0"></a>

@@ -855,2 +861,3 @@ ## [v3.2.0] - 2023-12-12

- Add ability to configure component preloads and custom bundles [`2241e5f`](https://github.com/SAP/ui5-builder/commit/2241e5ff98fd95f1f80cc74959655ae7a9c660e7)
[v3.3.0]: https://github.com/SAP/ui5-builder/compare/v3.2.0...v3.3.0
[v3.2.0]: https://github.com/SAP/ui5-builder/compare/v3.1.1...v3.2.0

@@ -857,0 +864,0 @@ [v3.1.1]: https://github.com/SAP/ui5-builder/compare/v3.1.0...v3.1.1

@@ -23,5 +23,7 @@ import {getLogger} from "@ui5/logger";

* create flexibility-bundle.json
* @param {object} [parameters.existingFlexBundle={}] Object with existing flexibility-bundle.json
* to merge with new changes
* @returns {Promise<@ui5/fs/Resource[]>} Promise resolving with flex changes bundle resources
*/
export default function({resources, options: {pathPrefix, hasFlexBundleVersion}}) {
export default function({resources, options: {pathPrefix, hasFlexBundleVersion}, existingFlexBundle = {}}) {
let bundleName = "changes-bundle.json";

@@ -90,3 +92,3 @@

bundleName = "flexibility-bundle.json";
const newChangeFormat = {
let newChangeFormat = {
changes,

@@ -99,3 +101,5 @@ compVariants,

};
if (Object.keys(existingFlexBundle).length > 0) {
newChangeFormat = mergeFlexChangeBundles(newChangeFormat);
}
return JSON.stringify(newChangeFormat);

@@ -105,2 +109,22 @@ }

/**
* Merge new and existing bundles
*
* @param {object} newFlexBundle Object with new content of flexibility-bundle.json
* @returns {object} Object with merged content of new and existing flexibility-bundle.json
*/
function mergeFlexChangeBundles(newFlexBundle) {
const result = {};
Object.keys(newFlexBundle).forEach((key) => {
if (existingFlexBundle[key] && Array.isArray(existingFlexBundle[key])) {
result[key] = existingFlexBundle[key].concat(newFlexBundle[key]);
} else {
result[key] = newFlexBundle[key];
}
});
return result;
}
return Promise.all(resources.map((resource) => {

@@ -107,0 +131,0 @@ return resource.getBuffer().then((buffer) => {

@@ -86,4 +86,9 @@ import {getLogger} from "@ui5/logger";

let hasFlexBundleVersion = false;
let flexBundle = {};
if (semver.compare(version, "1.73.0") >= 0) {
hasFlexBundleVersion = true;
const flexBundleResource = await workspace.byPath(`${pathPrefix}/changes/flexibility-bundle.json`);
if (flexBundleResource) {
flexBundle = JSON.parse(await flexBundleResource.getString());
}
}

@@ -95,3 +100,4 @@ const processedResources = await flexChangesBundler({

hasFlexBundleVersion
}
},
existingFlexBundle: flexBundle
});

@@ -98,0 +104,0 @@ await Promise.all(processedResources.map((resource) => {

2

LICENSE.txt

@@ -189,3 +189,3 @@ Apache License

Copyright 2018-2023 SAP SE or an SAP affiliate company and UI5 Tooling contributors
Copyright 2018-2024 SAP SE or an SAP affiliate company and UI5 Tooling contributors

@@ -192,0 +192,0 @@ Licensed under the Apache License, Version 2.0 (the "License");

{
"name": "@ui5/builder",
"version": "3.2.0",
"version": "3.3.0",
"description": "UI5 Tooling - Builder",

@@ -134,3 +134,3 @@ "author": {

"semver": "^7.5.4",
"terser": "^5.26.0",
"terser": "^5.27.0",
"workerpool": "^6.5.1",

@@ -141,6 +141,6 @@ "xml2js": "^0.6.2"

"@istanbuljs/esm-loader-hook": "^0.2.0",
"@jridgewell/trace-mapping": "^0.3.20",
"@ui5/project": "^3.8.0",
"@jridgewell/trace-mapping": "^0.3.21",
"@ui5/project": "^3.9.0",
"ava": "^5.3.1",
"chai": "^4.3.10",
"chai": "^4.4.1",
"chai-fs": "^2.0.0",

@@ -151,7 +151,7 @@ "chokidar-cli": "^3.0.0",

"docdash": "^2.0.2",
"eslint": "^8.55.0",
"eslint": "^8.56.0",
"eslint-config-google": "^0.14.0",
"eslint-plugin-ava": "^14.0.0",
"eslint-plugin-jsdoc": "^46.9.0",
"esmock": "^2.6.0",
"eslint-plugin-jsdoc": "^46.10.1",
"esmock": "^2.6.2",
"line-column": "^1.0.2",

@@ -158,0 +158,0 @@ "nyc": "^15.1.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc