Created attachment 255489 [details] Patch to update yarn-node20 to 1.22.22 Update to 1.22.22, which is the latest available upstream. Project changelog is out of date, but this update: Fixes the lockfile hydration of the npm: protocol Fixes the punycode deprecation warning Fixes the projectRoot detection Prevents crashes when reading from an empty .yarnrc.yml file Generates nonzero exit code when yarn 2 process is killed Updates child.js
Created attachment 255490 [details] Patch to update yarn-node20 to 1.22.22
Created attachment 256555 [details] Patch to update yarn-node22 to 1.22.22, add option for patch New patch to: 1. Reflect change to use yarn-node22 as master port 2. Upgrade yarn to 1.22.22 3. Move/rename lingering yarn-node20 patch files 4. Add new option to support conditional patching According to the discussion in Bug# 245425, the patch was necessary to permit yarn global operations. However, even without the patch, I was able to perform numerous yarn global operations using yarn 1.22.22 with node22 without the patch. Rather than completely get rid of it, I updated the patch so it would apply cleanly to 1.22.22, and then made it optional so those users who still need it can do it. I added the note that the option isn't recommended because of the yarn documentation which states: "If you have used a package manager like npm previously, you may be looking for how to add global dependencies. For the vast majority of packages it is considered a bad practice to have global dependencies because they are implicit. It is much better to add all of your dependencies locally so that they are explicit and anyone else using your project gets the same set of dependencies."
Maintainer timeout?
Ping - maintainer timeout.
Do you know why www/yarn-node20/files/patch-lib_cli.js was not moved to the www/yarn-node22 in commit https://cgit.freebsd.org/ports/commit/www/yarn-node20?id=ef17b830d649cd5c0c4e659015e47bc934b8ced3 ?
(In reply to Vladimir Druzenko from comment #5) I do not know. Unless the thought was to only patch yarn when used with node20, and wait for a bug report to materialize for the other node versions. And then the patch would not be carried forward unnecessarily.
Created attachment 265344 [details] Updated patch I abandoned the attempts to make the patch optional, and simply updated the port (and the meta port). Build log for meta port (www/yarn): https://pkg.compasses.xyz/data/143Ramd64-default-baseSSL/2025-11-10_20h36m56s/logs/yarn-1.22.22.log Build log for www/yarn-node22: https://pkg.compasses.xyz/data/143Ramd64-default-baseSSL/2025-11-10_20h36m56s/logs/yarn-node22-1.22.22.log Build log for slave ports: https://pkg.compasses.xyz/data/143Ramd64-default-baseSSL/2025-11-10_21h40m55s/logs/yarn-node20-1.22.22.log https://pkg.compasses.xyz/data/143Ramd64-default-baseSSL/2025-11-10_21h46m44s/logs/yarn-node24-1.22.22.log https://pkg.compasses.xyz/data/143Ramd64-default-baseSSL/2025-11-11_09h06m25s/logs/yarn-node25-1.22.22.log
Created attachment 265733 [details] Latest version of patch This is an updated patch that: - Makes the global patch optional (but default enabled) - Updates yarn to latest version Although, there have been 0 bugs filed for yarn in the 11 months since sunpoet's commit https://cgit.freebsd.org/ports/commit/?id=ef17b830d649cd5c0c4e659015e47bc934b8ced3 in Dec 2024 that changed the "default" ports/pkg behavior by not applying the global patch. Nevertheless, my revised patch applies the global patch by default while allowing users opt-out. The upstream changelog is out of date, but the bugs fixed: Fix the lockfile hydration of the npm: protocol Fix the punycode deprecation warning Fix the projectRoot detection Prevent crashes when reading from an empty .yarnrc.yml file Generate nonzero exit code when yarn 2 process is killed Update child.js Build logs: https://pkg.compasses.xyz/data/143Ramd64-default-baseSSL/2025-11-30_12h34m21s/logs/yarn-node25-1.22.22.log https://pkg.compasses.xyz/data/143Ramd64-default-baseSSL/2025-11-30_12h12m02s/logs/yarn-node24-1.22.22.log https://pkg.compasses.xyz/data/143Ramd64-default-baseSSL/2025-11-30_12h20m35s/logs/yarn-node22-1.22.22.log https://pkg.compasses.xyz/data/143Ramd64-default-baseSSL/2025-11-30_12h30m23s/logs/yarn-node20-1.22.22.log https://pkg.compasses.xyz/data/143Ramd64-default-baseSSL/2025-11-30_12h12m02s/logs/yarn-1.22.22.log