From 912b485099f79bfde6975d18592165ca5c458eab Mon Sep 17 00:00:00 2001 From: Andrey Bakhvalov Date: Mon, 26 Mar 2018 17:08:23 +0300 Subject: [PATCH] fix: default options order --- index.js | 10 +++++----- yarn.lock | 27 ++++++++++++++++----------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/index.js b/index.js index 3bc116a..731343d 100755 --- a/index.js +++ b/index.js @@ -45,11 +45,11 @@ Connection options: const opt = docopt(doc, { version: packagejson.version }); const options = { - database: opt['--db'] || process.env.PGDATABASE || process.env.POSTGRES_DB, - host: opt['--host'] || process.env.PGHOST || process.env.POSTGRES_HOST || 'localhost', - port: opt['--port'] || process.env.PGPORT || process.env.POSTGRES_PORT || 5432, - user: opt['--user'] || process.env.PGUSER || process.env.POSTGRES_USER, - password: opt['--password'] || process.env.PGPASSWORD || process.env.POSTGRES_PASSWORD, + database: process.env.PGDATABASE || process.env.POSTGRES_DB || opt['--db'], + host: process.env.PGHOST || process.env.POSTGRES_HOST || opt['--host'], + port: process.env.PGPORT || process.env.POSTGRES_PORT || opt['--port'], + user: process.env.PGUSER || process.env.POSTGRES_USER || opt['--user'], + password: process.env.PGPASSWORD || process.env.POSTGRES_PASSWORD || opt['--password'], migrationsSchema: opt['--migrations-schema'], migrationsTable: opt['--migrations-table'], migrationsDir: opt['--migrations-dir'], diff --git a/yarn.lock b/yarn.lock index c207848..f0d3e0c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -27,9 +27,9 @@ acorn@^4.0.3: version "4.0.13" resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" -acorn@^5.4.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.5.0.tgz#1abb587fbf051f94e3de20e6b26ef910b1828298" +acorn@^5.5.0: + version "5.5.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.5.3.tgz#f473dd47e0277a08e28e9bec5aeeb04751f0b8c9" ajv-keywords@^2.1.0: version "2.1.1" @@ -2024,9 +2024,9 @@ eslint-visitor-keys@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" -eslint@4.18.2: - version "4.18.2" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.18.2.tgz#0f81267ad1012e7d2051e186a9004cc2267b8d45" +eslint@4.19.1: + version "4.19.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.19.1.tgz#32d1d653e1d90408854bfb296f076ec7e186a300" dependencies: ajv "^5.3.0" babel-code-frame "^6.22.0" @@ -2037,7 +2037,7 @@ eslint@4.18.2: doctrine "^2.1.0" eslint-scope "^3.7.1" eslint-visitor-keys "^1.0.0" - espree "^3.5.2" + espree "^3.5.4" esquery "^1.0.0" esutils "^2.0.2" file-entry-cache "^2.0.0" @@ -2059,6 +2059,7 @@ eslint@4.18.2: path-is-inside "^1.0.2" pluralize "^7.0.0" progress "^2.0.0" + regexpp "^1.0.1" require-uncached "^1.0.3" semver "^5.3.0" strip-ansi "^4.0.0" @@ -2066,11 +2067,11 @@ eslint@4.18.2: table "4.0.2" text-table "~0.2.0" -espree@^3.5.2: - version "3.5.3" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.3.tgz#931e0af64e7fbbed26b050a29daad1fc64799fa6" +espree@^3.5.4: + version "3.5.4" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7" dependencies: - acorn "^5.4.0" + acorn "^5.5.0" acorn-jsx "^3.0.0" esprima@^4.0.0: @@ -4434,6 +4435,10 @@ regex-not@^1.0.0: dependencies: extend-shallow "^2.0.1" +regexpp@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-1.0.1.tgz#d857c3a741dce075c2848dcb019a0a975b190d43" + regexpu-core@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240"