New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@dotenvx/dotenvx

Package Overview
Dependencies
Maintainers
0
Versions
188
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dotenvx/dotenvx - npm Package Compare versions

Comparing version 1.31.0 to 1.31.1

src/lib/helpers/dotenvParse.js

8

CHANGELOG.md

@@ -5,4 +5,10 @@ # Changelog

[Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.31.0...main)
[Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.31.1...main)
## [1.31.1](https://github.com/dotenvx/dotenvx/compare/v1.31.0...v1.31.1)
### Changed
* 🐞 fix encryption of values containing explicit `\n` newlines ([#495](https://github.com/dotenvx/dotenvx/pull/495))
## [1.31.0](https://github.com/dotenvx/dotenvx/compare/v1.30.1...v1.31.0)

@@ -9,0 +15,0 @@

4

package.json
{
"version": "1.31.0",
"version": "1.31.1",
"name": "@dotenvx/dotenvx",

@@ -55,3 +55,3 @@ "description": "a better dotenv–from the creator of `dotenv`",

"standard-version": "^9.5.0",
"tap": "^19.2.0"
"tap": "^21.0.1"
},

@@ -58,0 +58,0 @@ "publishConfig": {

@@ -83,3 +83,3 @@ [![dotenvx](https://dotenvx.com/better-banner.png)](https://dotenvx.com)

<details><summary>or with windows 🟦🟩🟥🟨</summary><br>
<details><summary>or with windows 🪟</summary><br>

@@ -86,0 +86,0 @@ ```sh

@@ -1,2 +0,1 @@

const fsx = require('./fsx')
const path = require('path')

@@ -30,3 +29,25 @@ const childProcess = require('child_process')

const pro = fsx.readFileX(path.join(__dirname, './../../cli/pro.txt'))
const pro = `_______________________________________________________________
| |
| coming soon! (for small business) |
| |
| | | | | |
| __| | ___ | |_ ___ _ ____ ____ __ _ __ _ __ ___ |
| / _\` |/ _ \\| __/ _ \\ '_ \\ \\ / /\\ \\/ / | '_ \\| '__/ _ \\ |
| | (_| | (_) | || __/ | | \\ V / > < | |_) | | | (_) | |
| \\__,_|\\___/ \\__\\___|_| |_|\\_/ /_/\\_\\ | .__/|_| \\___/ |
| | | |
| |_| |
| ## learn more on github 🐙 |
| |
| >> https://github.com/dotenvx/dotenvx/issues/259 |
| |
| ## subscribe on github to be notified 📣 |
| |
| >> https://github.com/dotenvx/dotenvx/issues/259 |
| |
| ----------------------------------------------------------- |
| - thank you for using dotenvx! - @motdotla |
|_____________________________________________________________|`
console.log(pro)

@@ -33,0 +54,0 @@ } else {

@@ -1,3 +0,2 @@

const dotenv = require('dotenv')
const dotenvParse = require('./dotenvParse')
const isEncrypted = require('./isEncrypted')

@@ -7,3 +6,3 @@ const isPublicKey = require('./isPublicKey')

function isFullyEncrypted (src) {
const parsed = dotenv.parse(src)
const parsed = dotenvParse(src)

@@ -10,0 +9,0 @@ for (const [key, value] of Object.entries(parsed)) {

@@ -1,4 +0,3 @@

const dotenv = require('dotenv')
const quotes = require('./quotes')
const dotenvParse = require('./dotenvParse')
const escapeForRegex = require('./escapeForRegex')

@@ -11,3 +10,3 @@ const escapeDollarSigns = require('./escapeDollarSigns')

const parsed = dotenv.parse(src)
const parsed = dotenvParse(src, true) // skip expanding \n
const _quotes = quotes(src)

@@ -14,0 +13,0 @@ if (Object.prototype.hasOwnProperty.call(parsed, key)) {

const fsx = require('./fsx')
const path = require('path')
const dotenv = require('dotenv')

@@ -8,2 +7,3 @@ const PUBLIC_KEY_SCHEMA = 'DOTENV_PUBLIC_KEY'

const dotenvParse = require('./dotenvParse')
const guessPrivateKeyName = require('./guessPrivateKeyName')

@@ -25,3 +25,3 @@

const keysSrc = fsx.readFileX(keysFilepath)
const keysParsed = dotenv.parse(keysSrc)
const keysParsed = dotenvParse(keysSrc)

@@ -40,3 +40,3 @@ if (keysParsed[privateKeyName] && keysParsed[privateKeyName].length > 0) {

const envSrc = fsx.readFileX(envFilepath)
const envParsed = dotenv.parse(envSrc)
const envParsed = dotenvParse(envSrc)

@@ -43,0 +43,0 @@ let publicKeyName

const fsx = require('./fsx')
const dotenv = require('dotenv')
const dotenvParse = require('./dotenvParse')

@@ -15,3 +15,3 @@ const guessPublicKeyName = require('./guessPublicKeyName')

const keysSrc = fsx.readFileX(envFilepath)
const keysParsed = dotenv.parse(keysSrc)
const keysParsed = dotenvParse(keysSrc)

@@ -18,0 +18,0 @@ if (keysParsed[publicKeyName] && keysParsed[publicKeyName].length > 0) {

const fsx = require('./../helpers/fsx')
const path = require('path')
const dotenv = require('dotenv')
const picomatch = require('picomatch')

@@ -13,2 +12,3 @@

const isEncrypted = require('./../helpers/isEncrypted')
const dotenvParse = require('./../helpers/dotenvParse')
const replace = require('./../helpers/replace')

@@ -67,3 +67,3 @@ const detectEncoding = require('./../helpers/detectEncoding')

let envSrc = fsx.readFileX(filepath, { encoding })
const envParsed = dotenv.parse(envSrc)
const envParsed = dotenvParse(envSrc)

@@ -70,0 +70,0 @@ const privateKey = findPrivateKey(envFilepath, this.envKeysFilepath)

const fsx = require('./../helpers/fsx')
const path = require('path')
const dotenv = require('dotenv')
const picomatch = require('picomatch')

@@ -13,2 +12,3 @@

const isEncrypted = require('./../helpers/isEncrypted')
const dotenvParse = require('./../helpers/dotenvParse')
const replace = require('./../helpers/replace')

@@ -73,3 +73,3 @@ const detectEncoding = require('./../helpers/detectEncoding')

let envSrc = fsx.readFileX(filepath, { encoding })
const envParsed = dotenv.parse(envSrc)
const envParsed = dotenvParse(envSrc)

@@ -178,2 +178,3 @@ let publicKey

const encryptedValue = encryptValue(value, publicKey)
// once newSrc is built write it out

@@ -180,0 +181,0 @@ envSrc = replace(envSrc, key, encryptedValue)

const fsx = require('./../helpers/fsx')
const path = require('path')
const dotenv = require('dotenv')

@@ -8,2 +7,3 @@ const Errors = require('../helpers/errors')

const replace = require('../helpers/replace')
const dotenvParse = require('../helpers/dotenvParse')

@@ -51,3 +51,3 @@ class Genexample {

let src = fsx.readFileX(filepath)
const parsed = dotenv.parse(src)
const parsed = dotenvParse(src)
for (const key in parsed) {

@@ -77,3 +77,3 @@ // used later

const parsed = dotenv.parse(exampleSrc)
const parsed = dotenvParse(exampleSrc)
for (const key of [...keys]) {

@@ -80,0 +80,0 @@ if (key in parsed) {

const fsx = require('./../helpers/fsx')
const path = require('path')
const dotenv = require('dotenv')

@@ -12,2 +11,3 @@ const TYPE_ENV = 'env'

const Errors = require('./../helpers/errors')
const dotenvParse = require('./../helpers/dotenvParse')
const parseEnvironmentFromDotenvKey = require('./../helpers/parseEnvironmentFromDotenvKey')

@@ -200,3 +200,3 @@ const detectEncoding = require('./../helpers/detectEncoding')

const src = fsx.readFileX(filepath)
return dotenv.parse(src)
return dotenvParse(src)
}

@@ -203,0 +203,0 @@

const fsx = require('./../helpers/fsx')
const path = require('path')
const dotenv = require('dotenv')

@@ -13,2 +12,3 @@ const TYPE_ENV_FILE = 'envFile'

const replace = require('./../helpers/replace')
const dotenvParse = require('./../helpers/dotenvParse')
const detectEncoding = require('./../helpers/detectEncoding')

@@ -70,3 +70,3 @@ const determineEnvs = require('./../helpers/determineEnvs')

let envSrc = fsx.readFileX(filepath, { encoding })
const envParsed = dotenv.parse(envSrc)
const envParsed = dotenvParse(envSrc)
row.originalValue = envParsed[row.key] || null

@@ -73,0 +73,0 @@ const wasPlainText = !isEncrypted(row.originalValue)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc