From 62482f51cb94eba8868ea16b9512afb00054a96c Mon Sep 17 00:00:00 2001 From: Merlin Beutlberger Date: Mon, 12 Dec 2022 12:49:15 +0100 Subject: [PATCH] [INTERNAL] Resource#getProject: Add notice for extensions (#451) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Matthias Oßwald <1410947+matz3@users.noreply.github.com> --- lib/Resource.js | 7 +++++++ lib/ResourceFacade.js | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/lib/Resource.js b/lib/Resource.js index 29737739..1edca7f9 100644 --- a/lib/Resource.js +++ b/lib/Resource.js @@ -330,6 +330,13 @@ class Resource { /** * Retrieve the project assigned to the resource + *
+ * Note for UI5 Tooling extensions (i.e. custom tasks, custom middleware): + * In order to ensure compatibility across UI5 Tooling versions, consider using the + * getProject(resource) method provided by + * [TaskUtil]{@link module:@ui5/project/build/helpers/TaskUtil} and + * [MiddlewareUtil]{@link module:@ui5/server.middleware.MiddlewareUtil}, which will + * return a Specification Version-compatible Project interface. * * @public * @returns {@ui5/project/specifications/Project} Project this resource is associated with diff --git a/lib/ResourceFacade.js b/lib/ResourceFacade.js index 16940371..05517b54 100644 --- a/lib/ResourceFacade.js +++ b/lib/ResourceFacade.js @@ -187,6 +187,13 @@ class ResourceFacade { /** * Retrieve the project assigned to the resource + *
+ * Note for UI5 Tooling extensions (i.e. custom tasks, custom middleware): + * In order to ensure compatibility across UI5 Tooling versions, consider using the + * getProject(resource) method provided by + * [TaskUtil]{@link module:@ui5/project/build/helpers/TaskUtil} and + * [MiddlewareUtil]{@link module:@ui5/server.middleware.MiddlewareUtil}, which will + * return a Specification Version-compatible Project interface. * * @public * @returns {@ui5/project/specifications/Project} Project this resource is associated with