ectypes-postgres
Advanced tools
Comparing version 0.1.2 to 1.0.0
{ | ||
"name": "ectypes-postgres", | ||
"description": "An ectypes strategy for node-postgres", | ||
"version": "0.1.2", | ||
"version": "1.0.0", | ||
"homepage": "https://github.com/nicholas/ectypes-postgres", | ||
@@ -24,5 +24,2 @@ "author": { | ||
"main": "lib/ectypes_postgres", | ||
"engines": { | ||
"node": "0.8.0" | ||
}, | ||
"scripts": { | ||
@@ -32,9 +29,12 @@ "test": "mocha test/" | ||
"keywords": [], | ||
"peerDependencies": { | ||
"ectypes": "~1.x" | ||
}, | ||
"dependencies": { | ||
"pg": "~0.8.4", | ||
"faker": "*", | ||
"lingo": "0.0.5", | ||
"nconf": "~0.6.4", | ||
"ectypes": "1.0.0", | ||
"faker2": "~0.5.0" | ||
"pg": "*", | ||
"should": "^8.0.2" | ||
} | ||
} |
@@ -5,2 +5,31 @@ # ectypes-postgres | ||
## Installing | ||
`npm install ectypes-postgres` | ||
## Running tests | ||
Steps. | ||
1) ectypes-postgres uses ectypes as a peer dependency, so if you want to run tests locally you will have to manually | ||
`npm install ectypes`. | ||
2) Identify the connection string. | ||
The postgres strategy connects via a connectionString that is passed into a constructor function. | ||
For example, in the tests: | ||
``` | ||
strategy = new PGStrategy(process.env['DBCONN']); | ||
``` | ||
If you want the tests to run you will need to work out this value (see step 3). Similarly, if you want to develop | ||
against this lib you will need to come up with a way to identify this value. | ||
3) Run mocha | ||
`NODE_ENV=test DBCONN=postgres://nicholasf:@localhost/keno_api_link_test mocha` | ||
See the tests, https://github.com/brianc/node-postgres and https://github.com/nicholasf/ectypes.js | ||
@@ -7,0 +36,0 @@ |
@@ -6,7 +6,6 @@ var PGStrategy = require('../lib/ectypes_postgres.js'); | ||
, faker2 = require('faker2') | ||
, env = require('./../config/env') | ||
, ctx = ectypes.createContext() | ||
, pg = require('pg'); | ||
strategy = new PGStrategy(env.connectionString); | ||
strategy = new PGStrategy(process.env['DBCONN']); | ||
@@ -30,3 +29,3 @@ ctx.load(strategy); | ||
pg.connect(env.connectionString, function(err, client){ | ||
pg.connect(process.env['DBCONN'], function(err, client){ | ||
client.query(sql, function(err, result){ | ||
@@ -42,3 +41,2 @@ done(); | ||
var rowCount = parseInt(project.rowCount); | ||
console.log("And the winner is! ", rowCount); | ||
rowCount.should.equal(1); | ||
@@ -45,0 +43,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
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 2 instances in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
39
0
6434
6
8
114
3
1
+ Addedfaker@*
+ Addedshould@^8.0.2
+ Addedasync@0.1.22(transitive)
+ Addedectypes@1.1.1(transitive)
+ Addedfaker@6.6.6(transitive)
+ Addedpg@8.13.1(transitive)
+ Addedpg-cloudflare@1.1.1(transitive)
+ Addedpg-connection-string@2.7.0(transitive)
+ Addedpg-int8@1.0.1(transitive)
+ Addedpg-pool@3.7.0(transitive)
+ Addedpg-protocol@1.7.0(transitive)
+ Addedpg-types@2.2.0(transitive)
+ Addedpgpass@1.0.5(transitive)
+ Addedpostgres-array@2.0.0(transitive)
+ Addedpostgres-bytea@1.0.0(transitive)
+ Addedpostgres-date@1.0.7(transitive)
+ Addedpostgres-interval@1.2.0(transitive)
+ Addedshould@8.4.0(transitive)
+ Addedshould-equal@0.8.0(transitive)
+ Addedshould-format@0.3.2(transitive)
+ Addedshould-type@0.2.0(transitive)
+ Addedsplit2@4.2.0(transitive)
+ Addedxtend@4.0.2(transitive)
- Removedectypes@1.0.0
- Removedfaker2@~0.5.0
- Removedectypes@1.0.0(transitive)
- Removedgeneric-pool@1.0.12(transitive)
- Removedpg@0.8.8(transitive)
Updatedpg@*