Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

parse-database-url

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse-database-url - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

9

lib/parse-database-url.js

@@ -19,5 +19,10 @@ var url = require("url");

// The protocol coming from url.parse() has a trailing :
config.driver = (parsedUrl.protocol || "sqlite3:").replace(/\:$/, "");
config.driver = (parsedUrl.protocol || "sqlite3:")
// The protocol coming from url.parse() has a trailing :
.replace(/\:$/, "")
// Cloud Foundry will sometimes set a 'mysql2' scheme instead of 'mysql'.
if (config.driver == "mysql2")
config.driver = "mysql";
// url.parse() produces an "auth" that looks like "user:password". No

@@ -24,0 +29,0 @@ // individual fields, unfortunately.

{
"name": "parse-database-url",
"version": "0.2.1",
"version": "0.2.2",
"description": "Database configuration URL parser for node.js",

@@ -5,0 +5,0 @@ "keywords": ["database", "configuration", "url", "heroku", "database_url"],

@@ -73,2 +73,14 @@ [

{
"desc": "Cloud Foundry ClearDB connection string with mysql2 scheme",
"url": "mysql2://user:pass@host/database?reconnect=true",
"config": {
"driver": "mysql",
"user": "user",
"password": "pass",
"host": "host",
"database": "database",
"reconnect": "true"
}
},
{
"desc": "Redis URL, which doesn't have a path (Issue #4)",

@@ -75,0 +87,0 @@ "url": "redis://localhost:6379",

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