react-native-dotenv
Advanced tools
Comparing version 2.5.4 to 2.5.5
@@ -10,2 +10,3 @@ --- | ||
- [x] Asked question in discussions | ||
- [x] Tried the troubleshooting Wiki | ||
@@ -12,0 +13,0 @@ - [x] Followed the migration Wiki |
@@ -60,3 +60,3 @@ const {readFileSync} = require('fs') | ||
if (path.node.source.value === opts.moduleName) { | ||
path.node.specifiers.forEach((specifier, idx) => { | ||
for (const [idx, specifier] of path.node.specifiers.entries()) { | ||
if (specifier.type === 'ImportDefaultSpecifier') { | ||
@@ -87,7 +87,7 @@ throw path.get('specifiers')[idx].buildCodeFrameError('Default import is not supported') | ||
const binding = path.scope.getBinding(localId) | ||
binding.referencePaths.forEach(refPath => { | ||
for (const refPath of binding.referencePaths) { | ||
refPath.replaceWith(t.valueToNode(this.env[importedId])) | ||
}) | ||
} | ||
} | ||
}) | ||
} | ||
@@ -94,0 +94,0 @@ path.remove() |
{ | ||
"name": "react-native-dotenv", | ||
"version": "2.5.4", | ||
"version": "2.5.5", | ||
"description": "Load environment variables using import statements.", | ||
@@ -24,7 +24,7 @@ "repository": "github:goatandsheep/react-native-dotenv", | ||
"devDependencies": { | ||
"@babel/core": "7.13.1", | ||
"@babel/core": "7.13.14", | ||
"codecov": "^3.8.1", | ||
"jest": "26.6.3", | ||
"jest-junit": "^12.0.0", | ||
"xo": "^0.37.1" | ||
"xo": "^0.38.2" | ||
}, | ||
@@ -31,0 +31,0 @@ "author": "Kemal Ahmed", |
@@ -77,2 +77,4 @@ # react-native-dotenv [![CircleCI](https://circleci.com/gh/goatandsheep/react-native-dotenv.svg?style=svg)](https://circleci.com/gh/goatandsheep/react-native-dotenv) | ||
Also preview [the upcoming test app](https://github.com/goatandsheep/chatkitty-example-react-native/). | ||
## White and black lists | ||
@@ -245,2 +247,6 @@ | ||
or | ||
[react-native-clean-project](https://www.npmjs.com/package/react-native-clean-project) | ||
Maybe a solution for updating package.json scripts: | ||
@@ -256,2 +262,4 @@ | ||
For nextjs, you _must_ set `moduleName` to `react-native-dotenv`. | ||
## Credits | ||
@@ -258,0 +266,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31212
280