@ui5/server 3.2.0 → 3.2.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 CHANGED
@@ -2,7 +2,13 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
  This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
4
4
 
5
- A list of unreleased changes can be found [here](https://github.com/SAP/ui5-server/compare/v3.2.0...HEAD).
5
+ A list of unreleased changes can be found [here](https://github.com/SAP/ui5-server/compare/v3.2.1...HEAD).
6
+
7
+ <a name="v3.2.1"></a>
8
+ ## [v3.2.1] - 2024-05-15
9
+ ### Bug Fixes
10
+ - **middleware/versionInfo:** Only process dependencies of type 'library' [`4c99455`](https://github.com/SAP/ui5-server/commit/4c99455cf21539c2d1403cca81c603ead7124351)
11
+
6
12
 
7
13
  <a name="v3.2.0"></a>
8
14
  ## [v3.2.0] - 2024-04-24
@@ -335,6 +341,7 @@ Only Node.js v10 or higher is supported.
335
341
 
336
342
  <a name="v0.0.1"></a>
337
343
  ## v0.0.1 - 2018-06-06
344
+ [v3.2.1]: https://github.com/SAP/ui5-server/compare/v3.2.0...v3.2.1
338
345
  [v3.2.0]: https://github.com/SAP/ui5-server/compare/v3.1.5...v3.2.0
339
346
  [v3.1.5]: https://github.com/SAP/ui5-server/compare/v3.1.4...v3.1.5
340
347
  [v3.1.4]: https://github.com/SAP/ui5-server/compare/v3.1.3...v3.1.4
@@ -13,6 +13,8 @@ export default async function generateLibraryManifest(middlewareUtil, dotLibReso
13
13
  return middlewareUtil.getProject(projectName)?.getVersion();
14
14
  }
15
15
  });
16
- res.setProject(project);
17
- return res;
16
+ if (res) {
17
+ res.setProject(project);
18
+ return res;
19
+ }
18
20
  }
@@ -41,14 +41,14 @@ function createMiddleware({resources, middlewareUtil}) {
41
41
  // Attempt to find a .library file, which is required for generating a manifest.json
42
42
  const dotLibraryPath = pathname.replace(rManifest, "/.library");
43
43
  const dotLibraryResource = await resources.all.byPath(dotLibraryPath);
44
- if (!dotLibraryResource) {
45
- log.verbose(
46
- `Could not find a .library to generate manifest.json from at ${dotLibraryPath}. ` +
47
- `This might indicate that the project is not a library project.`);
44
+ if (dotLibraryResource && dotLibraryResource.getProject()?.getType() === "library") {
45
+ resource = await generateLibraryManifest(middlewareUtil, dotLibraryResource);
46
+ }
47
+ if (!resource) {
48
+ // Not a library project, missing .library file or other reason for failed manifest.json generation
48
49
  next();
49
50
  return;
50
51
  }
51
- resource = await generateLibraryManifest(middlewareUtil, dotLibraryResource);
52
52
  }
53
53
 
54
54
  const resourcePath = resource.getPath();
@@ -16,7 +16,9 @@ function createMiddleware({resources, middlewareUtil}) {
16
16
  return async function versionInfo(req, res, next) {
17
17
  try {
18
18
  const dependencies = resources.dependencies;
19
- const dotLibResources = await dependencies.byGlob("/resources/**/.library");
19
+ let dotLibResources = await dependencies.byGlob("/resources/**/.library");
20
+
21
+ dotLibResources = dotLibResources.filter((res) => res.getProject()?.getType() === "library");
20
22
 
21
23
  dotLibResources.sort((a, b) => {
22
24
  return a.getProject().getName().localeCompare(b.getProject().getName());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/server",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
4
4
  "description": "UI5 Tooling - Server",
5
5
  "author": {
6
6
  "name": "SAP SE",
@@ -115,7 +115,7 @@
115
115
  "url": "git@github.com:SAP/ui5-server.git"
116
116
  },
117
117
  "dependencies": {
118
- "@ui5/builder": "^3.4.0",
118
+ "@ui5/builder": "^3.4.1",
119
119
  "@ui5/fs": "^3.0.5",
120
120
  "@ui5/logger": "^3.0.0",
121
121
  "body-parser": "^1.20.2",
@@ -147,11 +147,11 @@
147
147
  "eslint-config-google": "^0.14.0",
148
148
  "eslint-plugin-ava": "^14.0.0",
149
149
  "eslint-plugin-jsdoc": "^46.10.1",
150
- "esmock": "^2.6.4",
151
- "jsdoc": "^4.0.2",
150
+ "esmock": "^2.6.5",
151
+ "jsdoc": "^4.0.3",
152
152
  "nyc": "^15.1.0",
153
153
  "open-cli": "^7.2.0",
154
- "rimraf": "^5.0.5",
154
+ "rimraf": "^5.0.7",
155
155
  "sinon": "^16.1.3",
156
156
  "supertest": "^6.3.4",
157
157
  "tap-xunit": "^2.4.1"