React-native-dotenv - Load react native environment variables using import statements for multiple env files.

Last update: May 9, 2022

react-native-dotenv CircleCI

Load environment variables using import statements.

npm version dependencies Status codecov XO code style Join the chat at https://gitter.im/pass-it-on/react-native-dotenv npm downloads

Installation

$ npm install react-native-dotenv

Breaking changes: moving from v0.x to v2.x changes both the setup and usage of this package. Please see the migration guide.

Many have been asking about the reasons behind recent changes in this repo. Please see the story wiki page.

Introduction

This babel plugin lets you inject your environment variables into your react-native environment using dotenv for multiple environments.

Usage

.babelrc

Basic setup:

{
  "plugins": [
    ["module:react-native-dotenv"]
  ]
}

If the defaults do not cut it for your project, this outlines the available options for your Babel configuration and their respective default values, but you do not need to add them if you are using the default settings.

{
  "plugins": [
    ["module:react-native-dotenv", {
      "envName": "APP_ENV",
      "moduleName": "@env",
      "path": ".env",
      "blocklist": null,
      "allowlist": null,
      "blacklist": null, // DEPRECATED
      "whitelist": null, // DEPRECATED
      "safe": false,
      "allowUndefined": true,
      "verbose": false
    }]
  ]
}

Note: for safe mode, it's highly recommended to set allowUndefined to false.

.env

API_URL=https://api.example.org
API_TOKEN=abc123

In users.js

import {API_URL, API_TOKEN} from "@env"

fetch(`${API_URL}/users`, {
  headers: {
    'Authorization': `Bearer ${API_TOKEN}`
  }
})

Also preview the upcoming test app.

[DEPRECATED] White and black lists

Moving forward to a more inclusive language, terms like white and black are being moved away. Future versions will just use allowlist and blocklist while whitelist/blacklist are still supported.

Allow and Block lists

It is possible to limit the scope of env variables that will be imported by specifying a allowlist and/or a blocklist as an array of strings.

{
  "plugins": [
    ["module:react-native-dotenv", {
      "blocklist": [
        "GITHUB_TOKEN"
      ]
    }]
  ]
}
{
  "plugins": [
    ["module:react-native-dotenv", {
      "allowlist": [
        "API_URL",
        "API_TOKEN"
      ]
    }]
  ]
}

Safe mode

Enable safe mode to only allow environment variables defined in the .env file. This will completely ignore everything that is already defined in the environment.

The .env file has to exist.

{
  "plugins": [
    ["module:react-native-dotenv", {
      "safe": true
    }]
  ]
}

Allow undefined

Allow importing undefined variables, their value will be undefined.

{
  "plugins": [
    ["module:react-native-dotenv", {
      "allowUndefined": true
    }]
  ]
}
import {UNDEFINED_VAR} from '@env'

console.log(UNDEFINED_VAR === undefined) // true

When set to false, an error will be thrown. This is no longer default behavior.

Override envName

One thing that we've noticed is that metro overwrites the test environment variable even if you specify a config, so we've added a way to fix this. By default, defining the APP_ENV variable can be used to set your preferred environment, separate from NODE_ENV.

// package.json
{
  "scripts": {
    "start:staging": "APP_ENV=staging npx react-native start",
  }
}

The above example would use the .env.staging file. The standard word is test, but go nuts.

To use your own defined name as the environment override, you can define it using envName:

{
  "plugins": [
    ["module:react-native-dotenv", {
     "envName": "MY_ENV"
    }]
  ]
}

Now you can define MY_ENV:

// package.json
{
  "scripts": {
    "start:staging": "MY_ENV=staging npx react-native start",
  }
}

Note: if you're using APP_ENV (or envName), you should avoid using development nor production as values, and you should avoid having a .env.development or .env.production. This is a Babel and Node thing that I have little control over unfortunately and is consistent with many other platforms that have an override option, like Gatsby. If you want to use development and production, you should not use APP_ENV (or envName), but rather the built-in NODE_ENV=development or NODE_ENV=production.

Multi-env

This package now supports environment specific variables. This means you may now import environment variables from multiple files, i.e. .env, .env.development, .env.production, and .env.test. This is based on dotenv-flow.

Note: it is not recommended that you commit any sensitive information in .env file to code in case your git repo is exposed. The best practice is to put a .env.template or .env.development.template that contains dummy values so other developers know what to configure. Then add your .env and .env.development to .gitignore. You can also keep sensitive keys in a separate .env.local (and respective .env.local.template) in .gitignore and you can use your other .env files for non-sensitive config.

The base set of variables will be .env and the environment-specific variables will overwrite them.

The variables will automatically be pulled from the appropriate environment and development is the default. The choice of environment is based on your Babel environment first and if that value is not set, your NPM environment, which should actually be the same, but this makes it more robust.

In general, Release is production and Debug is development.

To choose, setup your scripts with NODE_ENV for each environment

// package.json
{
  "scripts": {
    "start:development": "NODE_ENV=development npx react-native start",
    "start:production": "NODE_ENV=production npx react-native start",
  }
}

TypeScript

Option 1: easy mode

Install the @types package npm version

npm install @types/react-native-dotenv

Set the moduleName in your Babel config as react-native-dotenv.

{
  "plugins": [
    ["module:react-native-dotenv", {
      "moduleName": "react-native-dotenv"
    }]
  ]
}

Import your variables from react-native-dotenv:

import {API_URL} from 'react-native-dotenv'

console.log(API_URL)

Option 2: specify types manually

  • Create a types folder in your project
  • Inside that folder, create a *.d.tsfile, say, env.d.ts
  • in that file, declare a module as the following format:
declare module '@env' {
  export const API_BASE: string;
}

Add all of your .env variables inside this module.

  • Finally, add this folder into the typeRoots field in your tsconfig.json file:
{
...
    "typeRoots": ["./src/types"],
...
}

Reference Material

Caveats

When using with babel-loader with caching enabled you will run into issues where environment changes won’t be picked up. This is due to the fact that babel-loader computes a cacheIdentifier that does not take your environment into account.

You can easily clear the cache:

rm -rf node_modules/.cache/babel-loader/*

or

yarn start --reset-cache

or

expo r -c

and

expo start --clear

or

react-native-clean-project

You can also set api.cache(false) in your babel config

metro.config.jsresetCache: true

Maybe a solution for updating package.json scripts:

"cc": "rimraf node_modules/.cache/babel-loader/*,",
"android": "npm run cc && react-native run-android",
"ios": "npm run cc && react-native run-ios",

Or you can override the default cacheIdentifier to include some of your environment variables.

The tests that use require('@env') are also not passing.

For nextjs, you must set moduleName to react-native-dotenv.

Credits

If you'd like to become an active contributor, please send us a message.

Miscellaneous

    ╚⊙ ⊙╝
  ╚═(███)═╝
 ╚═(███)═╝
╚═(███)═╝
 ╚═(███)═╝
  ╚═(███)═╝
   ╚═(███)═╝

GitHub

https://github.com/goatandsheep/react-native-dotenv
Comments
  • 1. Error: Unable to resolve module `@env` from `src/utils.ts`: @env could not be found within the project.

    I'm using yarn.

    React Native info

    System: OS: macOS 10.15.4 CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz Memory: 116.45 MB / 8.00 GB Shell: 5.7.1 - /bin/zsh Binaries: Node: 12.16.3 - /usr/local/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 6.14.4 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.9.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 13.5, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2 Android SDK: API Levels: 23, 27, 28, 29 Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.0 System Images: android-28 | Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom_64 Android NDK: Not Found IDEs: Android Studio: 3.6 AI-192.7142.36.36.6392135 Xcode: 11.5/11E608c - /usr/bin/xcodebuild Languages: Java: 1.8.0_252 - /usr/bin/javac Python: 2.7.16 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.13.1 => 16.13.1 react-native: 0.63.0 => 0.63.0 npmGlobalPackages: react-native: Not Found

    My import statement import { FIXER_KEY } from '@env'; Typescript complains about this with

    Cannot find module '@env' or its corresponding type declarations

    My .babelrc contents { "plugins": [ [ "module:react-native-dotenv", { "moduleName": "@env", "path": ".env", "blacklist": null, "whitelist": null, "safe": true, "allowUndefined": true } ] ] }

    I'm using version

    "react-native-dotenv": "^2.3.0",

    When I run the app I get

    Error: Unable to resolve module @env from src/utils.ts: @env could not be found within the project.

    Reviewed by JanithaR at 2020-08-07 05:03
  • 2. Multi-env doesn't change

    Multi-env doesn't change. I always get variables from .env.development, most likely because this file is the first in the folder. I have the folder with 3 files: .env.development .env.staging .env.production. I've tried cleaning, reinstalling, and many more options, but nothing seems to work.

    My npm scripts:

    "start:development": "NODE_ENV=development npx react-native start --reset-cache",
    "start:staging": "NODE_ENV=staging npx react-native start --reset-cache",
    "start:production": "NODE_ENV=production npx react-native start --reset-cache",
    

    I also use the next script:

    "babel-clear": "rimraf node_modules/.cache/babel-loader/*,"

    My babel config:

    module.exports = {
      presets: ['module:metro-react-native-babel-preset'],
      plugins: [
        [
          'module:react-native-dotenv',
          {
            moduleName: '@env',
            path: './config/.env',
            blocklist: null,
            allowlist: null,
            safe: false,
            allowUndefined: true,
          },
        ],
      ],
    };
    

    In my file index.js

    import { URL } from '@env';

    "react": "17.0.1", "react-native": "0.64.1", "react-native-dotenv": "^3.0.0",

    Reviewed by KonstantinZhukovskij at 2021-07-12 13:56
  • 3. how multi env works?

    I'm sorry but I really dont know how it works. If there are two files .env.dev and .env.prod,how does dotenv choose the right one? Does it need environment variables from command line like yarn start NODE_ENV=pro? But how to do if I build the project in xcode where I cannot use command line variables?

    NOTE: .env.dev and .env.prod are both used in Release version, not in Debug. They are different from React Native global variable __DEV__.

    Reviewed by helvenk at 2020-09-17 10:17
  • 4. Importing variables throws an error in TypeScript.

    • [ ] Asked question in discussions
    • [x] Tried the troubleshooting Wiki
    • [x] Followed the migration Wiki

    Describe the bug Whenever an environment variable is imported from the module, TypeScript throws the following error:

    Screenshot 2021-12-20 at 7 27 54 PM

    To Reproduce Steps to reproduce the behavior:

    1. Create an environment variable in .env file.
    2. Import the same variable from the module react-native-dotenv in TypeScript file.

    Expected behavior TypeScript should not throw any errors/warnings if the variable exists.

    Screenshots My Babel Config is as follows:

    Screenshot 2021-12-20 at 7 36 37 PM

    Env file:

    Screenshot 2021-12-20 at 7 42 02 PM

    Version Details React Native Dotenv: ^3.3.1 React Native: 0.66.4 TypeScript: ^4.4.4 React: 17.0.2

    Additional context The variables seem to hold values when used in development builds. However, TypeScript should not throw any errors if user has followed all the steps in the documentation.

    Reviewed by dmahajan980 at 2021-12-20 14:10
  • 5. @env could not be found within the project

    simulator_screenshot_2F90FE7A-53E9-4E64-9B08-92B18C920372

    .babelrc { "presets": [ "module:metro-react-native-babel-preset", ], "plugins": [ ["module:react-native-dotenv", { "moduleName": "@env", "path": ".env", "blacklist": null, "whitelist": null, "safe": false, "allowUndefined": true }] ] }

    Reviewed by MaganAnkur at 2021-04-06 13:57
  • 6. Version 2.2.0 creating Babel issues in other packages?

    For more context, please refer to this issue report react-native#29314.

    After upgrading from version 0.2.0 to 2.2.0, this package started causing errors in other non-related packages, here's a list from my environment:

    node_modules/@invertase/react-native-apple-authentication/lib/version.js: [BABEL] /Users/admin/Documents/Repositories/react-native-app/node_modules/@invertase/react-native-apple-authentication/lib/version.js: Unknown option: .name. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.
    node_modules/@sentry/browser/dist/integrations/trycatch.js: [BABEL] /Users/admin/Documents/Repositories/react-native-app/node_modules/@sentry/browser/dist/integrations/trycatch.js: Unknown option: .name. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.
    node_modules/@sentry/browser/dist/version.js: [BABEL] /Users/admin/Documents/Repositories/react-native-app/node_modules/@sentry/browser/dist/version.js: Unknown option: .name. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.
    

    Packages in my environment works fine with latest releases, expect for this one from trial and error.

    I'm trying to run this with react-native 0.63.0 (if relevant) on MacOS 10.15.5 inside: react-native run-android.

    Reviewed by xRiot at 2020-07-09 20:17
  • 7. APP_ENV doesn't work as expected

    I want to be able to use development and production config files according to the APP_ENV variable I pass.

    But even if I pass the env as a variable, it uses development for debug and production for release.

    "android": "APP_ENV=development react-native run-android --variant 'devDebug'",
    "android-prod": "APP_ENV=production react-native run-android --variant 'prodDebug'",
    "build-android-dev": "cd android && APP_ENV=development ./gradlew assembleDevRelease",
    "build-android": "cd android && APP_ENV=production ./gradlew assembleProdRelease",
    
    Reviewed by siemya at 2021-03-03 19:04
  • 8. Autogenerate typescript typings file

    • Create a types folder in your project
    • Inside that folder, create a *.d.tsfile, say, env.d.ts
    • in that file, declare a module as the following format:
    declare module '@env' {
      export const API_BASE: string;
    }
    

    You should add all of your .env variables inside this module.

    • Finally, add this folder into the typeRoots field in your tsconfig.json file:
    {
    ...
        "typeRoots": ["./src/types"],
    ...
    }
    

    Originally posted by @ajaxjiang96 in https://github.com/goatandsheep/react-native-dotenv/issues/52#issuecomment-673218479

    Reviewed by goatandsheep at 2020-08-13 12:39
  • 9. How to use with jest? ReferenceError: ENV_VARIABLE is not defined.

    I'm running a react-native project with the typical usage, and getting an error while testing:

    ReferenceError: ENV_VARIABLE is not defined.
    

    babel.config.js

    module.exports = {
      presets: ['module:metro-react-native-babel-preset'],
      plugins: ['module:react-native-dotenv'],
    }
    

    I use it like this: (for simplicity)

    function.js

    import { SECRET_URL } from '@env'
    
    export default = () => {
      return `${SECRET_URL}`
    }
    
    

    I add a test to my function: function.test.js and does something like this

    describe('testing my function', () => {
      it('should return correct url', () => {
       const foo = myFunction()
       expect(foo).toBe('whatever url I was expecting')
      }
     )
    )
    

    Do I need to mock things with jest or what's the workflow?

    Reviewed by ugglr at 2020-08-12 07:06
  • 10. using with ESlint

    Hi When i use this line import { GOOGLE_WEBCLIENTID } from '@env';

    I'll face this error from ESlint: Unable to resolve path to module '@env'.eslintimport/no-unresolved of course I can use disable for this line eslint. but isn't there a better way? thanks.

    Reviewed by ph98 at 2021-02-14 15:12
  • 11. APP_ENV breaks builds that already use that environment variable

    • [x] Tried the troubleshooting Wiki
    • [x] Followed the migration Wiki

    Describe the bug The title basically says it. The addition of the APP_ENV override is a breaking change for those of us who already had that variable defined for other purposes.

    Expected behavior I should have a way of overriding this variable if I don't want to use it or want to use another variable.

    I've already created a fix for this, so I'm opening this issue because the template wanted me to do so before opening a PR.

    Reviewed by bfricka at 2021-08-26 19:27
  • 12. Bump @babel/core from 7.17.7 to 7.17.12

    Bumps @babel/core from 7.17.7 to 7.17.12.

    Release notes

    Sourced from @​babel/core's releases.

    v7.17.12 (2022-05-16)

    Thanks @​varunsh-coder and @​xiawenqi for your first pull requests!

    :bug: Bug Fix

    • babel-plugin-transform-react-constant-elements
    • babel-generator
    • babel-plugin-transform-destructuring
    • babel-parser
    • babel-parser, babel-plugin-transform-destructuring, babel-types

    :house: Internal

    • babel-plugin-proposal-decorators, babel-types
    • babel-core
    • babel-core, babel-generator, babel-helper-create-class-features-plugin, babel-helper-create-regexp-features-plugin, babel-helper-module-transforms, babel-helper-plugin-utils, babel-parser, babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression, babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining, babel-plugin-external-helpers, babel-plugin-proposal-async-do-expressions, babel-plugin-proposal-async-generator-functions, babel-plugin-proposal-class-properties, babel-plugin-proposal-class-static-block, babel-plugin-proposal-decorators, babel-plugin-proposal-export-default-from, babel-plugin-proposal-export-namespace-from, babel-plugin-proposal-function-sent, babel-plugin-proposal-json-strings, babel-plugin-proposal-logical-assignment-operators, babel-plugin-proposal-nullish-coalescing-operator, babel-plugin-proposal-object-rest-spread, babel-plugin-proposal-optional-chaining, babel-plugin-proposal-partial-application, babel-plugin-proposal-pipeline-operator, babel-plugin-proposal-private-methods, babel-plugin-proposal-private-property-in-object, babel-plugin-proposal-record-and-tuple, babel-plugin-proposal-unicode-property-regex, babel-plugin-syntax-decorators, babel-plugin-syntax-destructuring-private, babel-plugin-syntax-flow, babel-plugin-syntax-import-assertions, babel-plugin-syntax-pipeline-operator, babel-plugin-syntax-record-and-tuple, babel-plugin-syntax-typescript, babel-plugin-transform-arrow-functions, babel-plugin-transform-async-to-generator, babel-plugin-transform-block-scoping, babel-plugin-transform-classes, babel-plugin-transform-computed-properties, babel-plugin-transform-destructuring, babel-plugin-transform-duplicate-keys, babel-plugin-transform-flow-comments, babel-plugin-transform-flow-strip-types, babel-plugin-transform-for-of, babel-plugin-transform-instanceof, babel-plugin-transform-jscript, babel-plugin-transform-literals, babel-plugin-transform-modules-amd, babel-plugin-transform-modules-commonjs, babel-plugin-transform-modules-systemjs, babel-plugin-transform-modules-umd, babel-plugin-transform-named-capturing-groups-regex, babel-plugin-transform-new-target, babel-plugin-transform-parameters, babel-plugin-transform-property-mutators, babel-plugin-transform-proto-to-assign, babel-plugin-transform-react-constant-elements, babel-plugin-transform-react-jsx, babel-plugin-transform-reserved-words, babel-plugin-transform-runtime, babel-plugin-transform-spread, babel-plugin-transform-template-literals, babel-plugin-transform-typeof-symbol, babel-plugin-transform-typescript, babel-preset-env, babel-preset-flow, babel-preset-react, babel-preset-typescript, babel-traverse, babel-types

    Committers: 9

    v7.17.11 (2022-04-29)

    :bug: Bug Fix

    • babel-runtime-corejs2

    Committers: 1

    v7.17.10 (2022-04-29)

    Thanks @​Abreto, @​Andoryuuta, @​apeltop, @​JohnDaly, and @​wjw99830 for your first PRs!

    :bug: Bug Fix

    ... (truncated)

    Changelog

    Sourced from @​babel/core's changelog.

    v7.17.12 (2022-05-16)

    :bug: Bug Fix

    • babel-plugin-transform-react-constant-elements
    • babel-generator
    • babel-plugin-transform-destructuring
    • babel-parser
    • babel-parser, babel-plugin-transform-destructuring, babel-types

    :house: Internal

    • babel-plugin-proposal-decorators, babel-types
    • babel-core
    • babel-core, babel-generator, babel-helper-create-class-features-plugin, babel-helper-create-regexp-features-plugin, babel-helper-module-transforms, babel-helper-plugin-utils, babel-parser, babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression, babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining, babel-plugin-external-helpers, babel-plugin-proposal-async-do-expressions, babel-plugin-proposal-async-generator-functions, babel-plugin-proposal-class-properties, babel-plugin-proposal-class-static-block, babel-plugin-proposal-decorators, babel-plugin-proposal-export-default-from, babel-plugin-proposal-export-namespace-from, babel-plugin-proposal-function-sent, babel-plugin-proposal-json-strings, babel-plugin-proposal-logical-assignment-operators, babel-plugin-proposal-nullish-coalescing-operator, babel-plugin-proposal-object-rest-spread, babel-plugin-proposal-optional-chaining, babel-plugin-proposal-partial-application, babel-plugin-proposal-pipeline-operator, babel-plugin-proposal-private-methods, babel-plugin-proposal-private-property-in-object, babel-plugin-proposal-record-and-tuple, babel-plugin-proposal-unicode-property-regex, babel-plugin-syntax-decorators, babel-plugin-syntax-destructuring-private, babel-plugin-syntax-flow, babel-plugin-syntax-import-assertions, babel-plugin-syntax-pipeline-operator, babel-plugin-syntax-record-and-tuple, babel-plugin-syntax-typescript, babel-plugin-transform-arrow-functions, babel-plugin-transform-async-to-generator, babel-plugin-transform-block-scoping, babel-plugin-transform-classes, babel-plugin-transform-computed-properties, babel-plugin-transform-destructuring, babel-plugin-transform-duplicate-keys, babel-plugin-transform-flow-comments, babel-plugin-transform-flow-strip-types, babel-plugin-transform-for-of, babel-plugin-transform-instanceof, babel-plugin-transform-jscript, babel-plugin-transform-literals, babel-plugin-transform-modules-amd, babel-plugin-transform-modules-commonjs, babel-plugin-transform-modules-systemjs, babel-plugin-transform-modules-umd, babel-plugin-transform-named-capturing-groups-regex, babel-plugin-transform-new-target, babel-plugin-transform-parameters, babel-plugin-transform-property-mutators, babel-plugin-transform-proto-to-assign, babel-plugin-transform-react-constant-elements, babel-plugin-transform-react-jsx, babel-plugin-transform-reserved-words, babel-plugin-transform-runtime, babel-plugin-transform-spread, babel-plugin-transform-template-literals, babel-plugin-transform-typeof-symbol, babel-plugin-transform-typescript, babel-preset-env, babel-preset-flow, babel-preset-react, babel-preset-typescript, babel-traverse, babel-types

    v7.17.11 (2022-04-29)

    :bug: Bug Fix

    • babel-runtime-corejs2

    v7.17.10 (2022-04-29)

    :bug: Bug Fix

    • babel-cli, babel-core, babel-generator, babel-helper-transform-fixture-test-runner

    :nail_care: Polish

    • babel-cli, babel-core, babel-generator, babel-helper-fixtures, babel-helper-transform-fixture-test-runner
    • babel-plugin-proposal-pipeline-operator, babel-traverse

    :house: Internal

    :running_woman: Performance

    • babel-cli, babel-core, babel-generator

    v7.17.9 (2022-04-06)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    Reviewed by dependabot[bot] at 2022-05-17 10:04
  • 13. Bump xo from 0.48.0 to 0.49.0

    Bumps xo from 0.48.0 to 0.49.0.

    Release notes

    Sourced from xo's releases.

    v0.49.0

    New rules

    Breaking

    https://github.com/xojs/xo/compare/v0.48.0...v0.49.0

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    Reviewed by dependabot[bot] at 2022-05-17 10:03
  • 14. Bump dotenv from 16.0.0 to 16.0.1

    Bumps dotenv from 16.0.0 to 16.0.1.

    Changelog

    Sourced from dotenv's changelog.

    16.0.1 (2022-05-10)

    Changed

    • Minor README clarifications
    • Development ONLY: updated devDependencies as recommended for development only security risks (#658)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    Reviewed by dependabot[bot] at 2022-05-11 10:04
  • 15. Bump jest from 27.5.1 to 28.1.0

    Bumps jest from 27.5.1 to 28.1.0.

    Release notes

    Sourced from jest's releases.

    v28.1.0

    Features

    • [jest-circus] Add failing test modifier that inverts the behaviour of tests (#12610)
    • [jest-environment-node, jest-environment-jsdom] Allow specifying customExportConditions (#12774)

    Fixes

    • [expect] Adjust typings of lastCalledWith, nthCalledWith, toBeCalledWith matchers to allow a case there a mock was called with no arguments (#12807)
    • [@jest/expect-utils] Fix deep equality of ImmutableJS Lists (#12763)
    • [jest-core] Do not collect SIGNREQUEST as open handles (#12789)

    Chore & Maintenance

    • [docs] Specified documentation about --filter CLI docs (#12799)
    • [@jest-reporters] Move helper functions from utils.ts into separate files (#12782)
    • [jest-resolve] Replace process.versions.pnp type declaration with @types/pnpapi devDependency (#12783)

    New Contributors

    Full Changelog: https://github.com/facebook/jest/compare/v28.0.3...v28.1.0

    v28.0.3

    Fixes

    • [jest-config] Normalize reporters option defined in presets (#12769)
    • [@jest/reporters] Fix trailing slash in matching coverageThreshold key (#12714)
    • [jest-resolve] Fix (experimental) ESM module mocking for re-exports (#12766)
    • [@jest/transform] Throw better error if an invalid return value if encountered (#12764)

    Chore & Maintenance

    • [docs] Fix typo in --shard CLI docs (#12761)

    New Contributors

    Full Changelog: https://github.com/facebook/jest/compare/v28.0.2...v28.0.3

    v28.0.2

    Features

    ... (truncated)

    Changelog

    Sourced from jest's changelog.

    28.1.0

    Features

    • [jest-circus] Add failing test modifier that inverts the behaviour of tests (#12610)
    • [jest-environment-node, jest-environment-jsdom] Allow specifying customExportConditions (#12774)

    Fixes

    • [expect] Adjust typings of lastCalledWith, nthCalledWith, toBeCalledWith matchers to allow a case there a mock was called with no arguments (#12807)
    • [@jest/expect-utils] Fix deep equality of ImmutableJS Lists (#12763)
    • [jest-core] Do not collect SIGNREQUEST as open handles (#12789)

    Chore & Maintenance

    • [docs] Specified documentation about --filter CLI docs (#12799)
    • [@jest-reporters] Move helper functions from utils.ts into separate files (#12782)
    • [jest-resolve] Replace process.versions.pnp type declaration with @types/pnpapi devDependency (#12783)

    28.0.3

    Fixes

    • [jest-config] Normalize reporters option defined in presets (#12769)
    • [@jest/reporters] Fix trailing slash in matching coverageThreshold key (#12714)
    • [jest-resolve] Fix (experimental) ESM module mocking for re-exports (#12766)
    • [@jest/transform] Throw better error if an invalid return value if encountered (#12764)

    Chore & Maintenance

    • [docs] Fix typo in --shard CLI docs (#12761)

    28.0.2

    Features

    • [jest-worker] Add JestWorkerFarm helper type (#12753)

    Fixes

    • [*] Lower Node 16 requirement to 16.10 from 16.13 due to a Node bug that causes memory and performance issues (#12754)

    28.0.1

    Features

    • [jest-resolve] Expose ResolverOptions type (#12736)

    Fixes

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    Reviewed by dependabot[bot] at 2022-05-09 10:05
  • 16. only replace `process.env` variable if value is defined

    This fixes https://github.com/goatandsheep/react-native-dotenv/issues/251#issuecomment-1066200376

    react-native sets the NODE_ENV after this transformation happens. Code that directly access process.env.NODE_ENV was replaced by babelMode during transformation (if latest babel was used) or by undefined.

    With this commit, any access to a process.env variable is only replaced by the corresponding value if its value is set.

    Reviewed by schiller-manuel at 2022-05-02 21:03
Easily create presentation board using React

React Speaker Board Easily create presentation board using React. Quick Usage It install react-speaker-board running this comand. $ yarn add react-spe

Mar 28, 2022
A ReactJS password recovery box component built using the FluentUI library
A ReactJS password recovery  box component built using the FluentUI library

A ReactJS password recovery box component built using the FluentUI library

Mar 18, 2022
A small utility for constructing classnames using a variant based api.

twix ?? twix is a small utility for constructing classnames using a variant based api. The API is largely copied from stitches but works with just pla

May 11, 2022
Library created to format numbers easily and quickly using the Intl.NumberFormat Constructor API.
Library created to format numbers easily and quickly using the Intl.NumberFormat Constructor API.

Number Formatter number-formater is a JavaScript library built to make it faster and more efficient to use the ECMAScript (Intl) API for number format

Nov 19, 2021
Amplify-secure-js - A secure http only cookie based approach to using AWS Amplify

Amplify-secure-js - A secure http only cookie based approach to using AWS Amplify

Apr 27, 2022
Utility functions for drawing beautiful arrows using cubic bezier paths
Utility functions for drawing beautiful arrows using cubic bezier paths

proto-arrows A set of utility functions for drawing beautiful arrows using cubic bezier paths. Inspired by perfect-arrows. Why proto-arrows? Because c

May 2, 2022
A react or react native library to call functions comparing the last time that it was called
A react or react native library to call functions comparing the last time that it was called

A react or react native library to call functions comparing the last time that it was called and running it when it's really needed. Avoiding unnecessary database calls or data loads that are updated at a certain time.

Apr 18, 2022
iOS Today Widget in React Native
iOS Today Widget in React Native

React Native Today Widget Experimental library investigating limits of implementation iOS App Extensions using React Native. Sample result from Comple

May 3, 2022
🤖 React Native Android widgets bridged to JS, a proof of concept
 🤖 React Native Android widgets bridged to JS, a proof of concept

React Native Android Widget Proof Of Concept ?? Using React Native and having Android widgets is possible. Create buttons in Java / Android XML to tri

Apr 12, 2022
A simple Facebook Chat Head like bubble for react native
A simple Facebook Chat Head like bubble for react native

react-native-floating-bubble A simple Facebook Chat Head like bubble for react native. Special thanks to bubble-for-android because this is just react

May 3, 2022
React-Native library for the WidgetKit framework. Integrate a Widget into your App 🍏📱
React-Native library for the WidgetKit framework. Integrate a Widget into your App 🍏📱

react-native-widgetkit React-Native Library for the iOS ?? WidgetKit framework Table of Contents ?? Introduction ??‍?? Installation ??‍ Usage ????‍??

May 14, 2022
Example of Widget for React Native App in iOS 14 with SwiftUI
Example of Widget for React Native App in iOS 14 with SwiftUI

React-Native-SwiftUI-Widget by The WuuD Team® Buiding an iOS 14 widget with SwiftUI for react-native app. ?? Dev Team Moh Badjah Lead Backend Develope

Feb 14, 2022
A lightweight react library that converts raw HTML to a React DOM structure.

A lightweight react library that converts raw HTML to a React DOM structure.

May 9, 2022
React-intersection-observer - Intersection observer With React
React-intersection-observer - Intersection observer With React

react-intersection-observer Package ?? Copy and Paste the Framer Package Usage F

Feb 17, 2022
React-compress - This compress library was made with Brotli and Gzip help, for React users who want to make website more performance and reduce JS bundle code
React-compress - This compress library was made with Brotli and Gzip help, for React users who want to make website more performance and reduce JS bundle code

React-compress - This compress library was made with Brotli and Gzip help, for React users who want to make website more performance and reduce JS bundle code

Apr 20, 2022
React adblocker detect - Provides you with react hook to detect is an adblocker is enabled

React adblocker detect - Provides you with react hook to detect is an adblocker is enabled

Mar 15, 2022
Extended utils for ⚛️ React.Children data structure that adds recursive filter, map and more methods to iterate nested children.
Extended utils for ⚛️  React.Children data structure that adds recursive filter, map and more methods to iterate nested children.

React Children Utilities Recursive and extended utils for React children opaque data structure. Installation Available as a package and can be added t

May 4, 2022
CSS media queries for React

react-media react-media is a CSS media query component for React. A <Media> component listens for matches to a CSS media query and renders stuff based

May 16, 2022
A component for React that utilizes the Counterpart module to provide multi-lingual/localized text content.

React Translate Component Translate is a component for React that utilizes the Counterpart module and the Interpolate component to provide multi-lingu

May 17, 2022