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

Maven datasource should use fs wrapper #10037

Closed
viceice opened this issue May 19, 2021 · 8 comments · Fixed by #10191
Closed

Maven datasource should use fs wrapper #10037

viceice opened this issue May 19, 2021 · 8 comments · Fixed by #10191
Assignees
Labels
priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:refactor Refactoring or improving of existing code

Comments

@viceice
Copy link
Member

viceice commented May 19, 2021

What would you like Renovate to be able to do?

Currently maven datasource is using fs-extra :

async function downloadFileProtocol(pkgUrl: url.URL): Promise<string | null> {
const pkgPath = pkgUrl.toString().replace('file://', '');
if (!(await fs.exists(pkgPath))) {
return null;
}
return fs.readFile(pkgPath, 'utf8');
}

It should use our fs wrapper. seen it while reviewing #6747

Did you already have any implementation ideas?

Sure, replace fs-extra with lib/util/fs.

@viceice viceice added priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:refactor Refactoring or improving of existing code status:ready labels May 19, 2021
@viceice
Copy link
Member Author

viceice commented May 19, 2021

@rarkins @HonkingGoose Can we have a issue templates for refactorings / docs ?

@HonkingGoose
Copy link
Collaborator

We could have templates for refactoring and docs, but we need to decide if we want to keep things simple (bug/feature template only), or if we want to have templates for all the things.

I remember that @rarkins was against having docs issue templates, as he wants contributors to open a discussion first in case of docs problems/confusion. We can put a comment in the new docs/refactoring templates that these templates are only for "internal use".

I noticed that @zharinov is making a lot of refactoring issues, so it might be helpful for them to have a template with the correct labels applied, right now we need to manually fix up the labels.

@viceice What kind of things do you need out of the docs/refactoring templates?

@rarkins
Copy link
Collaborator

rarkins commented May 19, 2021

I'm not sure about this - both ways have pros and cons. The main cons are that users confuse or misuse them, although maybe they won't really be so tempted by "refactor" or "docs" options? Today I just create a feature template and then delete the template and labels

@viceice
Copy link
Member Author

viceice commented May 19, 2021

yeah, was mainly because of automatic labels 🙃 Do you see another option to automaticall apply labels when i change the type label only? eg, prio normal and state ready?

@rarkins
Copy link
Collaborator

rarkins commented May 19, 2021

We could maybe use an Action to apply triage/status labels to new Issues and only apply type: labels automatically by GitHub, that way you only have to change one label and not 3 when you are creating issues? Could help for all types of issues, not just refactor

@zharinov
Copy link
Collaborator

Do we need to support file protocol at all? What are use-cases other than now defunct file-based mocks?

@rarkins
Copy link
Collaborator

rarkins commented May 27, 2021

I don't think we need to support file

@renovate-release
Copy link
Collaborator

🎉 This issue has been resolved in version 25.33.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:refactor Refactoring or improving of existing code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants