ferdium / ferdium-app

All your services in one place, built by the community
https://ferdium.org
Apache License 2.0
2.65k stars 164 forks source link

Problem with package validation not reporting the correct version number #1778

Closed Shampra closed 1 month ago

Shampra commented 1 month ago

Your issue

Hi,

I try to update a recipe but each time I have an error in Ferdium Recipes build :

Couldn't package "xxx": There were errors in the recipe's package.json: Found changes in 'recipes/xxx' without the corresponding version bump in 'recipes/xxx/package.json'

No matter which recipes....

Error encountered on an update for Hangout chat (https://github.com/ferdium/ferdium-recipes/pull/549) Tested in another random recipes (https://github.com/Shampra/ferdium-recipes/pull/3)

I can't figure it out. Is it something I did wrong (thanks for the explanation)? Or a bug? Thanks for your help!

SpecialAro commented 1 month ago

Please follow then contributing guidelines for ferdium-recipes

You should run pnpm validate

Shampra commented 1 month ago

Thanks but it's what I've done (with a Github action and after your message I also tried locally)

Always same result image

Shampra commented 1 month ago

And if I add log in scripts\package.json, change are correctly detected in webview and package json image But "No changes in recipes\hangoutschat\package.json detected", a problem with pkgJsonRelative?

edit : Item in result has / in their string path pkgJsonRelative has \ So if (result.files.some(({ file }) => file === pkgJsonRelative)) is never true If I change code to this to : const normalizePath = p => p.replace(/\/g, '/'); const pkgJsonRelative = normalizePath( path.relative(repoRoot, packageJson), ); It's work. But I'm not sure it's a global problem. Do you think it could be the subject of a PR?