Socket
Socket
Sign inDemoInstall

@ui5/builder

Package Overview
Dependencies
122
Maintainers
4
Versions
138
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.1.0 to 3.1.1

10

CHANGELOG.md

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

A list of unreleased changes can be found [here](https://github.com/SAP/ui5-builder/compare/v3.1.0...HEAD).
A list of unreleased changes can be found [here](https://github.com/SAP/ui5-builder/compare/v3.1.1...HEAD).
<a name="v3.1.1"></a>
## [v3.1.1] - 2023-11-19
### Bug Fixes
- Handle graceful termination of workerpool for parallel builds ([#953](https://github.com/SAP/ui5-builder/issues/953)) [`f7b9f27`](https://github.com/SAP/ui5-builder/commit/f7b9f27ac5966bd89e52e4c2d5b03482a0f3dbb7)
- **Bundling:** Detect manifest.json dependency of libraries [`6f9995f`](https://github.com/SAP/ui5-builder/commit/6f9995f5b47a6094fa93b5d433be849b1d3cdc7e)
<a name="v3.1.0"></a>

@@ -836,2 +843,3 @@ ## [v3.1.0] - 2023-10-11

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

@@ -838,0 +846,0 @@ [v3.0.9]: https://github.com/SAP/ui5-builder/compare/v3.0.8...v3.0.9

@@ -98,2 +98,12 @@ import {parseJS} from "../utils/parseUtils.js";

);
} else if ( /(?:^|\/)library\.js/.test(resource.name) ) {
promises.push(
(async () => {
const manifestName = resource.name.replace(/library\.js$/, "manifest.json");
const manifestResource = await pool.findResource(manifestName).catch(() => null);
if (manifestResource) {
info.addDependency(manifestName);
}
})()
);
}

@@ -100,0 +110,0 @@

@@ -9,2 +9,3 @@ import {fileURLToPath} from "node:url";

const log = getLogger("builder:processors:minifier");
import {setTimeout as setTimeoutPromise} from "node:timers/promises";

@@ -32,7 +33,24 @@ const debugFileRegex = /((?:\.view|\.fragment|\.controller|\.designtime|\.support)?\.js)$/;

});
taskUtil.registerCleanupTask(() => {
log.verbose(`Terminating workerpool`);
const poolToBeTerminated = pool;
pool = null;
poolToBeTerminated.terminate();
taskUtil.registerCleanupTask((force) => {
const attemptPoolTermination = async () => {
log.verbose(`Attempt to terminate the workerpool...`);
if (!pool) {
return;
}
// There are many stats that could be used, but these ones seem the most
// convenient. When all the (available) workers are idle, then it's safe to terminate.
let {idleWorkers, totalWorkers} = pool.stats();
while (idleWorkers !== totalWorkers && !force) {
await setTimeoutPromise(100); // Wait a bit workers to finish and try again
({idleWorkers, totalWorkers} = pool.stats());
}
const poolToBeTerminated = pool;
pool = null;
return poolToBeTerminated.terminate(force);
};
return attemptPoolTermination();
});

@@ -39,0 +57,0 @@ }

@@ -10,2 +10,3 @@ import path from "node:path";

import {deserializeResources, serializeResources, FsMainThreadInterface} from "../processors/themeBuilderWorker.js";
import {setTimeout as setTimeoutPromise} from "node:timers/promises";

@@ -27,7 +28,24 @@ let pool;

});
taskUtil.registerCleanupTask(() => {
log.verbose(`Terminating workerpool`);
const poolToBeTerminated = pool;
pool = null;
poolToBeTerminated.terminate();
taskUtil.registerCleanupTask((force) => {
const attemptPoolTermination = async () => {
log.verbose(`Attempt to terminate the workerpool...`);
if (!pool) {
return;
}
// There are many stats that could be used, but these ones seem the most
// convenient. When all the (available) workers are idle, then it's safe to terminate.
let {idleWorkers, totalWorkers} = pool.stats();
while (idleWorkers !== totalWorkers && !force) {
await setTimeoutPromise(100); // Wait a bit workers to finish and try again
({idleWorkers, totalWorkers} = pool.stats());
}
const poolToBeTerminated = pool;
pool = null;
return poolToBeTerminated.terminate(force);
};
return attemptPoolTermination();
});

@@ -34,0 +52,0 @@ }

8

lib/tasks/bundlers/generateLibraryPreload.js

@@ -35,3 +35,7 @@ import {getLogger} from "@ui5/logger";

function getBundleDefinition(namespace, excludes) {
// TODO: move to config of actual core project
// Note: This configuration is only used when no bundle definition in ui5.yaml exists (see "skipBundles" parameter)
// TODO: Remove this hardcoded bundle definition.
// sap.ui.core ui5.yaml contains a configuration since UI5 1.103.0 (specVersion 2.4)
// so this is still required to build UI5 versions <= 1.102.0.
if (namespace === "sap/ui/core") {

@@ -55,4 +59,2 @@ return {

// as they are already hardcoded below.
// In future the sap/ui/core/library-preload should be configured
// as a custom bundle in the ui5.yaml.
...getDefaultLibraryPreloadFilters(namespace),

@@ -59,0 +61,0 @@

{
"name": "@ui5/builder",
"version": "3.1.0",
"version": "3.1.1",
"description": "UI5 Tooling - Builder",

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

"semver": "^7.5.4",
"terser": "^5.21.0",
"workerpool": "^6.5.0",
"terser": "^5.24.0",
"workerpool": "^6.5.1",
"xml2js": "^0.6.2"

@@ -141,4 +141,4 @@ },

"@istanbuljs/esm-loader-hook": "^0.2.0",
"@jridgewell/trace-mapping": "^0.3.19",
"@ui5/project": "^3.7.1",
"@jridgewell/trace-mapping": "^0.3.20",
"@ui5/project": "^3.7.3",
"ava": "^5.3.1",

@@ -149,9 +149,9 @@ "chai": "^4.3.10",

"cross-env": "^7.0.3",
"depcheck": "^1.4.6",
"depcheck": "^1.4.7",
"docdash": "^2.0.2",
"eslint": "^8.51.0",
"eslint": "^8.54.0",
"eslint-config-google": "^0.14.0",
"eslint-plugin-ava": "^14.0.0",
"eslint-plugin-jsdoc": "^46.8.2",
"esmock": "^2.5.2",
"eslint-plugin-jsdoc": "^46.9.0",
"esmock": "^2.6.0",
"line-column": "^1.0.2",

@@ -161,5 +161,5 @@ "nyc": "^15.1.0",

"recursive-readdir": "^2.2.3",
"sinon": "^16.1.0",
"sinon": "^16.1.3",
"tap-xunit": "^2.4.1"
}
}
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc