Since corepack is disabled on the extensions (and probably wouldn't work anyway due to no internet), I believe there has to be a better system for managing package managers for node flatpaks. Currently, we have to do this:
(from wip legcord flatpak, similar to flathub/dev.vencord.Vesktop)
- type: archive
url: https://registry.npmjs.org/pnpm/-/pnpm-10.11.0.tgz
sha512: 6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977
dest: pnpm
This is less than ideal. For one, because it is not automated, maintainers have an extra thing to manage. Second, many apps update their package manager versions on each release, and they might not be compatible.
Right now, there are only two package managers built into the Node extensions: yarn classic and npm. They have been the 'industry standard' for a while now, but many apps, especially those with monorepos, use better managers such as PNPM or newer yarn versions, which are not backward-compatible.
If this hiccup is addressed upstream, I predict a lower burden on app maintainers and the ability to submit other node apps with less hassle.
I'll let people smarter than myself figure out the logistics, but an idea I had was to simply read the package.json, look for the packageManager or engines field, add the NPM source to generated-sources.json, then perhaps move the executable or directory with the unarchived NPM package to an easier place for apps to then use the exe?
Since corepack is disabled on the extensions (and probably wouldn't work anyway due to no internet), I believe there has to be a better system for managing package managers for node flatpaks. Currently, we have to do this:
(from wip legcord flatpak, similar to flathub/dev.vencord.Vesktop)
This is less than ideal. For one, because it is not automated, maintainers have an extra thing to manage. Second, many apps update their package manager versions on each release, and they might not be compatible.
Right now, there are only two package managers built into the Node extensions: yarn classic and npm. They have been the 'industry standard' for a while now, but many apps, especially those with monorepos, use better managers such as PNPM or newer yarn versions, which are not backward-compatible.
If this hiccup is addressed upstream, I predict a lower burden on app maintainers and the ability to submit other node apps with less hassle.
I'll let people smarter than myself figure out the logistics, but an idea I had was to simply read the
package.json, look for thepackageManagerorenginesfield, add the NPM source togenerated-sources.json, then perhaps move the executable or directory with the unarchived NPM package to an easier place for apps to then use the exe?