{"_id":"@percy/env@1.33.1","bugs":{"url":"https://github.com/percy/cli/issues"},"dist":{"shasum":"7c890136ff89d5eb8f54d26f350798a41a556953","tarball":"http://registry-npm.ywwl.com/@percy/env/download/@percy/env-1.33.1.tgz","fileCount":8,"integrity":"sha512-Sm7QrInP0ze1uOegR/8fwDV5zUgucAlc1cBYy/8n7ghxvVZPv2bLXzaAvUrP3YT1whZU1+VbYLMrY0AP86KDNw==","signatures":[{"sig":"MEUCIQCq4VjqbSyVG+7EVQ3tFm73r92GGTJDc17YUqp0Z99lnwIgU/05flys871D+7euZ1lE+YpayPBj0mtx1xVlXrhiYg8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEU+Hz0Tj/tXcNhxzPO6PSgnEak2yu2zq7XqIffLB244AiEA/rgxqaZzHv5W7JhBQ2bPoYDrDeOCcJ1/EexECDEFz/s="}],"unpackedSize":31468,"size":9406,"noattachment":false,"key":"/@percy/env/-/@percy/env-1.33.1.tgz"},"main":"./dist/index.js","name":"@percy/env","type":"module","engines":{"node":">=14"},"exports":{".":"./dist/index.js","./utils":"./dist/utils.js","./test/helpers":"./test/helpers.js"},"gitHead":"5cf4b6a43336e853e6578c8c71f2ab78c537f50d","license":"MIT","scripts":{"lint":"eslint --ignore-path ../../.gitignore .","test":"node ../../scripts/test","build":"node ../../scripts/build","test:coverage":"yarn test --coverage"},"version":"1.33.1","_npmUser":{"name":"percy-admin","email":"apps+npm@percy.io"},"homepage":"https://github.com/percy/cli#readme","repository":{"url":"git+https://github.com/percy/cli.git","type":"git","directory":"packages/env"},"_npmVersion":"lerna/6.0.1/node@v24.22.2+x64 (linux)","description":"This package provides various CI/CD support for Percy by coalescing different environment variables into a common interface for consumption by `@percy/client`.","directories":{},"maintainers":[{"name":"percy-admin","email":"apps+npm@percy.io"}],"_nodeVersion":"24.22.2","dependencies":{"@percy/logger":"1.33.1"},"publishConfig":{"tag":"latest","access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/env_1.33.1_1795157101009_0.6115300896178483"},"readme":"# @percy/env\n\nThis package provides various CI/CD support for Percy by coalescing different environment variables\ninto a common interface for consumption by `@percy/client`.\n\n## Supported Environments\n\nAuto-detected based on environment variables that the CI provider sets during a build.\n\n- [AppVeyor](https://www.browserstack.com/docs/percy/ci-cd/appveyor)\n- [Atlassian Bamboo](#supported-environments) (needs doc)\n- [AWS CodeBuild](#supported-environments) (needs doc)\n- [Azure Pipelines](https://www.browserstack.com/docs/percy/ci-cd/azure-pipelines)\n- [Bitbucket Pipelines](https://www.browserstack.com/docs/percy/ci-cd/bitbucket-pipeline)\n- [Bitrise](#supported-environments) (needs doc)\n- [Buildkite](https://www.browserstack.com/docs/percy/ci-cd/buildkite)\n- [CircleCI](https://www.browserstack.com/docs/percy/ci-cd/circleci)\n- [Cloudflare Pages](#supported-environments) (needs doc)\n- [Codemagic](#supported-environments) (needs doc)\n- [Codeship](https://www.browserstack.com/docs/percy/ci-cd/codeship)\n- [Drone CI](https://docs.percy.io/docs/drone)\n- [GitHub Actions](https://www.browserstack.com/docs/percy/ci-cd/github-actions)\n- [GitLab CI](https://www.browserstack.com/docs/percy/ci-cd/gitlab)\n- [GoCD](#supported-environments) (needs doc)\n- [Google Cloud Build](#supported-environments) (needs doc)\n- [Harness CI](#supported-environments) (needs doc)\n- [Heroku CI](#supported-environments) (needs doc)\n- [Jenkins](https://www.browserstack.com/docs/percy/ci-cd/jenkins)\n- [Jenkins PRB](https://www.browserstack.com/docs/percy/ci-cd/jenkins)\n- [Netlify](https://www.browserstack.com/docs/percy/ci-cd/netlify)\n- [Probo.CI](#supported-environments) (needs doc)\n- [Semaphore](https://www.browserstack.com/docs/percy/ci-cd/semaphore)\n- [TeamCity](#supported-environments) (needs doc)\n- [Travis CI](https://www.browserstack.com/docs/percy/ci-cd/travis-ci)\n- [Vercel](#vercel) — see note below\n- [Woodpecker CI](#supported-environments) (needs doc)\n\n## Opt-in Environments\n\nKubernetes-native pipelines do not inject provider-identifying environment variables\ninto step containers by default. To enable Percy detection on these systems, expose\nthe following variables via template substitution in your pipeline definition.\n\n### Tekton Pipelines\n\n```yaml\nsteps:\n  - name: percy\n    image: node:20\n    env:\n      - name: TEKTON_PIPELINE_RUN          # required — triggers detection\n        value: \"$(context.pipelineRun.name)\"\n      - name: TEKTON_COMMIT_SHA\n        value: \"$(params.commit-sha)\"\n      - name: TEKTON_BRANCH\n        value: \"$(params.branch)\"\n      - name: TEKTON_PULL_REQUEST          # optional\n        value: \"$(params.pr-number)\"\n```\n\n### Argo Workflows\n\n```yaml\n- name: percy\n  container:\n    image: node:20\n    env:\n      - name: ARGO_WORKFLOW_NAME           # required — triggers detection\n        value: \"{{workflow.name}}\"\n      - name: ARGO_WORKFLOW_UID            # recommended — used as parallel nonce\n        value: \"{{workflow.uid}}\"\n      - name: ARGO_COMMIT_SHA\n        value: \"{{workflow.parameters.commit-sha}}\"\n      - name: ARGO_BRANCH\n        value: \"{{workflow.parameters.branch}}\"\n      - name: ARGO_PULL_REQUEST            # optional\n        value: \"{{workflow.parameters.pr-number}}\"\n```\n\n### Vercel\n\nVercel exposes its `VERCEL_*` system environment variables to the build step only\nwhen **Automatically expose System Environment Variables** is enabled on the project\n(Settings → Environment Variables). Percy also needs `PERCY_PARALLEL_TOTAL=-1`\nset in the project environment for the parallel nonce to populate from\n`VERCEL_DEPLOYMENT_ID` — otherwise reruns of the same deploy will create separate\nPercy builds instead of deduping.\n\n## Percy Environment Variables\n\nThe following variables may be defined to override the respective derived CI environment variables.\n\n```bash\nPERCY_COMMIT          # build commit sha\nPERCY_BRANCH          # build branch name\nPERCY_PULL_REQUEST    # associated PR number\nPERCY_PARALLEL_NONCE  # parallel nonce unique for this CI workflow\nPERCY_PARALLEL_TOTAL  # total number of parallel shards\n```\n\nAdditional Percy specific environment variable may be set to control aspects of your Percy build.\n\n```bash\nPERCY_TARGET_COMMIT   # percy target commit sha\nPERCY_TARGET_BRANCH   # percy target branch name\nPERCY_PARTIAL_BUILD   # if this build was marked as partial\n```\n\n## Adding Environment Support\n\n1. Add CI detection to [`environment.js`](./src/environment.js)\n2. Add respective environment variables\n3. Add a dedicated CI test suite\n4. Open a Pull Request!\n","publish_time":1795157101128,"_cnpm_publish_time":1795157101128,"dist-tags":{"alpha":"1.31.15-alpha.0","beta":"1.33.0-beta.0","latest":"1.33.1"}}