Description
When developing Azure DevOps Custom Tasks and using pnpm as the package manager, the task upload command fails to correctly bundle the node_modules directory.
pnpm relies heavily on symbolic links to create its strict node_modules structure, and hardlinks to the global store for the actual files. The current implementation uses archiver (specifically archive.directory(...)) without dereferencing/following these links.
Server-Side Verification
I have manually verified this behavior directly on the Azure DevOps Agent server. Upon inspecting the extracted task directory on the server, the node_modules folder structure is incomplete and broken. The hardlinks and symlinks were stored as metadata or empty placeholders rather than being dereferenced into physical files during the zip process. The agent cannot resolve the dependencies, rendering the task completely unusable.
Expected Behavior
The packaging tool should fully dereference (follow) symlinks and hardlinks during the zipping process, copying the actual physical file contents into the archive. This ensures the .zip contains a self-contained, fully resolved node_modules tree that works seamlessly on the agent, regardless of the local package manager used (npm, yarn, or pnpm).
Description
When developing Azure DevOps Custom Tasks and using
pnpmas the package manager, the task upload command fails to correctly bundle thenode_modulesdirectory.pnpmrelies heavily on symbolic links to create its strictnode_modulesstructure, and hardlinks to the global store for the actual files. The current implementation usesarchiver(specificallyarchive.directory(...)) without dereferencing/following these links.Server-Side Verification
I have manually verified this behavior directly on the Azure DevOps Agent server. Upon inspecting the extracted task directory on the server, the
node_modulesfolder structure is incomplete and broken. The hardlinks and symlinks were stored as metadata or empty placeholders rather than being dereferenced into physical files during the zip process. The agent cannot resolve the dependencies, rendering the task completely unusable.Expected Behavior
The packaging tool should fully dereference (follow) symlinks and hardlinks during the zipping process, copying the actual physical file contents into the archive. This ensures the
.zipcontains a self-contained, fully resolvednode_modulestree that works seamlessly on the agent, regardless of the local package manager used (npm, yarn, or pnpm).