Gathering detailed insights and metrics for cypress-dotenv
Gathering detailed insights and metrics for cypress-dotenv
Gathering detailed insights and metrics for cypress-dotenv
Gathering detailed insights and metrics for cypress-dotenv
cypress-plugin-dotenv
Load .env variables in Cypress
@types/cypress-dotenv
TypeScript definitions for cypress-dotenv
cypress-dotenv-flow
Cypress plugin that enables compatability with dotenv-flow
@devmy/cypress-dotenv
integrate `dotenv` configuration with `@dotenv-run/core` into your Cypress setup, simplifying the management of environment variables for both component and end-to-end (E2E) tests.
npm install cypress-dotenv
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
55 Stars
91 Commits
13 Forks
2 Watchers
4 Branches
9 Contributors
Updated on Feb 17, 2025
Latest Version
3.0.1
Package Id
cypress-dotenv@3.0.1
Unpacked Size
7.02 kB
Size
2.84 kB
File Count
3
NPM Version
10.8.2
Node Version
18.20.5
Published on
Dec 30, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
3
5
Cypress plugin that enables compatibility with dotenv.
[!NOTE] If you need support for Cypress v9 or below, please use v2.x of this plugin
Please note that as of v2.0 this plugin only support Node v10+, Cypress 8+ and dotenv 10+
If you are still using older versions, then please install v1.x instead
It will load any environment variables
defined in your .env
file so you can access them via Cypress.env()
from within your tests as you would expect.
Any Cypress config options defined in your .env
will also be applied and take precedence over what is in your cypress.json
file. See the Cypress docs for details on this
For example, if your .env
file has something like this:
1CYPRESS_HELLO=hola 2GOODBYE=adios
You can use Cypress.env('HELLO')
to access its value.
You will also need to install the original dotenv
package along with cypress-dotenv
1npm install --save-dev dotenv cypress-dotenv
or
yarn add --dev dotenv cypress-dotenv
Version 3.x of this plugin only supports Cypress v10+. For instructions on how to set up this plugin with older versions of Cypress, please refer to the v2.x README
Since this is a plugin, you will need to modify your cypress.config.js
to look something like this
1import { defineConfig } from 'cypress' 2import dotenvPlugin from 'cypress-dotenv' 3 4export default defineConfig({ 5 e2e: { 6 ... 7 setupNodeEvents(on, config) { 8 const updatedConfig = dotenvPlugin(config, null, true) 9 // continue loading other plugins 10 return updatedConfig 11 }, 12 }, 13 ... 14})
This plugin takes three parameters:
all
) is an optional boolean parameter, which is set to false by default. If set to true, it returns all available environmental variables, not limited to those prefixed with CYPRESS_.No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
GitHub workflow tokens follow principle of least privilege
Details
Reason
no binaries found in the repo
Reason
2 existing vulnerabilities detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 4
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/6 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More