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

@vbilopav/pgmigrations

Package Overview
Dependencies
Maintainers
0
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vbilopav/pgmigrations - npm Package Compare versions

Comparing version 0.8.0 to 0.8.1

2

package.json
{
"name": "@vbilopav/pgmigrations",
"version": "0.8.0",
"version": "0.8.1",
"description": "PostgreSQL Migration Tool for Node.js and NPM",

@@ -5,0 +5,0 @@ "author": "vb-consulting",

@@ -37,3 +37,3 @@ const { warning, info, error, passed, failed } = require("./log.js");

return str.replace(/{([^{}]+)}/g, function(match, key) {
var val = obj[key];
let val = obj[key];
if (val === undefined) {

@@ -50,3 +50,3 @@ return match;

module.exports = async function(opt, config) {
var tests = JSON.parse(await query(formatStrByName(testListQuery, {
let tests = JSON.parse(await query(formatStrByName(testListQuery, {
testFunctionsSchemaSimilarTo: config.testFunctionsSchemaSimilarTo,

@@ -68,8 +68,8 @@ testFunctionsNameSimilarTo: config.testFunctionsNameSimilarTo,

var failedCount = 0;
var passedCount = 0;
var label = "Total " + tests.length.toString() + " tests";
let failedCount = 0;
let passedCount = 0;
let label = "Total " + tests.length.toString() + " tests";
console.time(label);
await Promise.all(tests.map(async (test) => {
var cmd;
let cmd;
if (test.type == "FUNCTION") {

@@ -88,9 +88,14 @@ if (config.testAutomaticallyRollbackFunctionTests) {

var testInfo = `${test.schema == "public" ? "" : test.schema + "."}${test.name}${test.comment ? " (" + test.comment.replace(/[\r\n\t]/g, " ").trim() + ")" : ""}`;
var result = await command(cmd, opt, ["--tuples-only", "--no-align"], config, true, true);
let testInfo = `${test.schema == "public" ? "" : test.schema + "."}${test.name}${test.comment ? " (" + test.comment.replace(/[\r\n\t]/g, " ").trim() + ")" : ""}`;
let result = await command(cmd, opt, ["--tuples-only", "--no-align"], config, true, true);
if (result.code != 0 || result.stderr || result.stdout == "f" || result.stdout.toLowerCase().startsWith("not ok")) {
let lower = result.stderr ? result.stderr.toLowerCase() : "";
if (result.code != 0 || result.stdout == "f" || result.stdout.toLowerCase().startsWith("not ok")) {
failed(testInfo);
error(result.stderr || result.stdout);
failedCount++;
} else if (lower.indexOf("error:") > -1 || lower.indexOf("fatal:") > -1 || lower.indexOf("panic:") > -1) {
failed(testInfo);
error(result.stderr || result.stdout);
failedCount++;
} else {

@@ -97,0 +102,0 @@ passed(testInfo);

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