You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@airavata.apache.org by "yasithdev (via GitHub)" <gi...@apache.org> on 2026/06/13 15:35:28 UTC

[PR] Drop url-parse; extract the filename directly in DataProduct [airavata-portals]

yasithdev opened a new pull request, #220:
URL: https://github.com/apache/airavata-portals/pull/220

   `DataProduct.filename` parsed the replica `file_path` with `url-parse` only to read `.pathname` before applying `FILENAME_REGEX` (`/[^/]+$/`) for the last path segment. Native `URL` **throws** on the real `file://user@host:port/...` replica paths (and on bare paths), and the regex already yields the last segment from any of those forms — so the url-parse step was redundant.
   
   Apply the regex to `file_path` directly and drop the `url-parse` dependency (maintenance-mode, with a history of high-severity advisories).
   
   ## Test plan
   - Verified `FILENAME_REGEX` returns the correct filename for `file://user@host:22/.../Echo.stdout`, `file:///...`, and bare `/path` forms.
   - url-parse removed from api package.json + yarn.lock; no remaining references in source.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@airavata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Drop url-parse; extract the filename directly in DataProduct [airavata-portals]

Posted by "yasithdev (via GitHub)" <gi...@apache.org>.
yasithdev merged PR #220:
URL: https://github.com/apache/airavata-portals/pull/220


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@airavata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org