mirror of
https://github.com/knex/knex.git
synced 2025-09-26 16:48:29 +00:00
Add more debug output for dialect resolution
This commit is contained in:
parent
f52361dc60
commit
938d5c263a
@ -13,7 +13,7 @@ module.exports = {
|
|||||||
plugins: ['import'],
|
plugins: ['import'],
|
||||||
rules: {
|
rules: {
|
||||||
'no-unused-vars': [warning, { vars: 'all', args: 'none' }],
|
'no-unused-vars': [warning, { vars: 'all', args: 'none' }],
|
||||||
'no-console': warning,
|
'no-console': 'off',
|
||||||
'no-var': 2,
|
'no-var': 2,
|
||||||
'no-debugger': warning,
|
'no-debugger': warning,
|
||||||
'prefer-const': warning,
|
'prefer-const': warning,
|
||||||
|
2
.github/workflows/coverage.yml
vendored
2
.github/workflows/coverage.yml
vendored
@ -39,7 +39,7 @@ jobs:
|
|||||||
run: npm run test:coverage
|
run: npm run test:coverage
|
||||||
env:
|
env:
|
||||||
CI: true
|
CI: true
|
||||||
DB: postgres mysql mysql2 mssql sqlite
|
DB: "postgres mysql mysql2 mssql sqlite"
|
||||||
KNEX_TEST_TIMEOUT: 60000
|
KNEX_TEST_TIMEOUT: 60000
|
||||||
|
|
||||||
- name: Stop Databases
|
- name: Stop Databases
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
/* eslint no-console:0, no-var:0 */
|
|
||||||
const Liftoff = require('liftoff');
|
const Liftoff = require('liftoff');
|
||||||
const interpret = require('interpret');
|
const interpret = require('interpret');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* eslint max-len:0 no-console:0*/
|
/* eslint max-len:0*/
|
||||||
|
|
||||||
// MySQL Table Builder & Compiler
|
// MySQL Table Builder & Compiler
|
||||||
// -------
|
// -------
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
/* eslint no-console:0 */
|
|
||||||
|
|
||||||
const isPlainObject = require('lodash/isPlainObject');
|
const isPlainObject = require('lodash/isPlainObject');
|
||||||
const isTypedArray = require('lodash/isTypedArray');
|
const isTypedArray = require('lodash/isTypedArray');
|
||||||
const { CLIENT_ALIASES } = require('./constants');
|
const { CLIENT_ALIASES } = require('./constants');
|
||||||
|
@ -30,8 +30,6 @@ Knex.QueryBuilder = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/* eslint no-console:0 */
|
|
||||||
|
|
||||||
// Run a "raw" query, though we can't do anything with it other than put
|
// Run a "raw" query, though we can't do anything with it other than put
|
||||||
// it in a query statement.
|
// it in a query statement.
|
||||||
Knex.raw = (sql, bindings) => {
|
Knex.raw = (sql, bindings) => {
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
/* eslint no-console:0 */
|
|
||||||
|
|
||||||
const color = require('colorette');
|
const color = require('colorette');
|
||||||
const { inspect } = require('util');
|
const { inspect } = require('util');
|
||||||
const { isString, isFunction } = require('./util/is');
|
const { isString, isFunction } = require('./util/is');
|
||||||
|
@ -70,7 +70,6 @@ class MigrationGenerator {
|
|||||||
: [this.config.directory];
|
: [this.config.directory];
|
||||||
return directories.map((directory) => {
|
return directories.map((directory) => {
|
||||||
if (!directory) {
|
if (!directory) {
|
||||||
// eslint-disable-next-line no-console
|
|
||||||
console.warn(
|
console.warn(
|
||||||
'Failed to resolve config file, knex cannot determine where to generate migrations'
|
'Failed to resolve config file, knex cannot determine where to generate migrations'
|
||||||
);
|
);
|
||||||
|
@ -167,7 +167,6 @@ class Seeder {
|
|||||||
: [this.config.directory];
|
: [this.config.directory];
|
||||||
return directories.map((directory) => {
|
return directories.map((directory) => {
|
||||||
if (!directory) {
|
if (!directory) {
|
||||||
// eslint-disable-next-line no-console
|
|
||||||
console.warn(
|
console.warn(
|
||||||
'Failed to resolve config file, knex cannot determine where to run or make seeds'
|
'Failed to resolve config file, knex cannot determine where to run or make seeds'
|
||||||
);
|
);
|
||||||
|
@ -6,6 +6,7 @@ const config = require('../knexfile');
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|
||||||
Object.keys(config).forEach((dialectName) => {
|
Object.keys(config).forEach((dialectName) => {
|
||||||
|
console.log(`Loading integration suite for dialect ${dialectName}`);
|
||||||
require('./connection-config-provider')(config[dialectName]);
|
require('./connection-config-provider')(config[dialectName]);
|
||||||
return require('./suite')(logger(knex(config[dialectName])));
|
return require('./suite')(logger(knex(config[dialectName])));
|
||||||
});
|
});
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
/* eslint-disable no-undef */
|
/* eslint-disable no-undef */
|
||||||
/* eslint-disable no-console */
|
|
||||||
|
|
||||||
const os = require('os');
|
const os = require('os');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/usr/bin/env jake
|
#!/usr/bin/env jake
|
||||||
'use strict';
|
'use strict';
|
||||||
/* eslint-disable no-undef */
|
/* eslint-disable no-undef */
|
||||||
/* eslint-disable no-console */
|
|
||||||
|
|
||||||
const migrateTests = require('./jakelib/migrate-test').taskList;
|
const migrateTests = require('./jakelib/migrate-test').taskList;
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/usr/bin/env jake
|
#!/usr/bin/env jake
|
||||||
'use strict';
|
'use strict';
|
||||||
/* eslint-disable no-undef */
|
/* eslint-disable no-undef */
|
||||||
/* eslint-disable no-console */
|
|
||||||
|
|
||||||
const os = require('os');
|
const os = require('os');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
@ -12,6 +12,8 @@ const testIntegrationDialects = (
|
|||||||
process.env.DB || 'sqlite3 postgres mysql mysql2 mssql oracledb'
|
process.env.DB || 'sqlite3 postgres mysql mysql2 mssql oracledb'
|
||||||
).match(/\w+/g);
|
).match(/\w+/g);
|
||||||
|
|
||||||
|
console.log(`ENV DB: ${process.env.DB}`);
|
||||||
|
|
||||||
const pool = {
|
const pool = {
|
||||||
afterCreate: function (connection, callback) {
|
afterCreate: function (connection, callback) {
|
||||||
assert.ok(typeof connection.__knexUid !== 'undefined');
|
assert.ok(typeof connection.__knexUid !== 'undefined');
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
let isInitted = false;
|
let isInitted = false;
|
||||||
|
|
||||||
/* eslint-disable no-console */
|
|
||||||
function initTests() {
|
function initTests() {
|
||||||
if (isInitted) {
|
if (isInitted) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user