Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I output the repository.url as a custom field? #181

Closed
alex-martinez opened this issue Aug 26, 2024 · 3 comments
Closed

How do I output the repository.url as a custom field? #181

alex-martinez opened this issue Aug 26, 2024 · 3 comments
Labels

Comments

@alex-martinez
Copy link

When having a custom field, what's the syntax for getting using a field for a key that's nested in the package.json? For example, repository.url.

I tried npx license-report --output=csv --fields=repository.url --repository.url.label="Repo" --repository.url.value="n/a"

@BePo65 BePo65 added the feature label Aug 27, 2024
@BePo65
Copy link
Collaborator

BePo65 commented Aug 27, 2024

I think that at the moment this is not possible.

In 'addLocalPackageData.js' line 65 we do a simple object reference
element[fieldName] = packageJSONContent[fieldName]; and in your case ´fieldName´ would be repository.url and of course this will fail.

Could you be motivated to create a pr for this 😄 ?

@BePo65
Copy link
Collaborator

BePo65 commented Sep 13, 2024

Solved by pr #194 - waiting for publishing project to npmjs by owner.

@BePo65
Copy link
Collaborator

BePo65 commented Sep 14, 2024

published as 6.7.0

@BePo65 BePo65 closed this as completed Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants