import type { BeachballOptions } from '../types/BeachballOptions'; /** * Filter PATH for running npm commands, removing entries that contain shell-script node wrappers. * * Package managers inject temp directories into PATH with shims for `node` — yarn classic uses * `yarn--*` dirs, yarn berry uses `xfs-*` dirs. (Context: https://github.com/yarnpkg/yarn/issues/6685 - * yarn berry does similar but cleans up afterwards.) * * These shims are POSIX shell scripts, e.g. this `node` shim: * ```sh * #!/bin/sh * exec "/path/to/node" "$@" * ``` * * Problem is POSIX `sh` drops env var names with invalid characters like `/` and `:`, which are * needed for npm auth token env vars (e.g. `npm_config_//someRegistry/:_authToken`). * * Removing those path entries fixes the issue and is unlikely to cause other problems in this context. * Use `checkNpmAuthEnvPassthrough` after this filter to detect unknown variants of this issue. */ export declare function filterPathForNpm(pathEnv: string): string; /** * Check whether env vars with special characters in their names (like npm auth token env vars, * which contain `//` and `:`) will be passed through to npm subprocesses. Runs a test using the same * PATH filtering applied to actual npm commands, so a failure here means the fix in * `filterPathForNpm` doesn't cover this platform/environment variant. */ export declare function checkNpmAuthEnvPassthrough(options: Pick & { /** PATH override only for testing */ pathEnv?: string; }): Promise; //# sourceMappingURL=npmAuthEnvPassthrough.d.ts.map