UI5 / UI5/cli

Access package.json in custom task

Open
#360 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

module/ui5-builder module/ui5-project
Dominant language
JavaScript
Stars
511
Forks
83
Avg merge
1d 5h
Merged PRs (30d)
55

Description

Expected Behavior

It would be nice to be able to access the projects package.json within a custom task (e.g. for getting the version or the like).

Current Behavior

The only hacky way I've found was by using workspace._reader._readers[0]._project.

Affected components (if known)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ui5-builder custom-task workspace API and the workspace._reader._readers[0]._project workaround described in the issue. Determine where project metadata is exposed to custom tasks; done means a supported way exists to access package.json details such as the project version without using private internals.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.