mysql-import
Advanced tools
Comparing version 5.0.21 to 5.0.26
/** | ||
* mysql-import - v5.0.21 | ||
* mysql-import - v5.0.26 | ||
* Import .sql into a MySQL database with Node. | ||
@@ -11,3 +11,3 @@ * @author Rob Parham | ||
const mysql = require('mysql'); | ||
const mysql = require('mysql2'); | ||
const fs = require('fs'); | ||
@@ -20,3 +20,3 @@ const path = require("path"); | ||
* mysql-import - Importer class | ||
* @version 5.0.21 | ||
* @version 5.0.26 | ||
* https://github.com/Pamblam/mysql-import | ||
@@ -374,3 +374,3 @@ */ | ||
*/ | ||
Importer.version = '5.0.21'; | ||
Importer.version = '5.0.26'; | ||
@@ -377,0 +377,0 @@ module.exports = Importer; |
@@ -6,6 +6,2 @@ { | ||
}, | ||
"bundleDependencies": false, | ||
"dependencies": { | ||
"mysql": "^2.18.1" | ||
}, | ||
"deprecated": false, | ||
@@ -46,3 +42,6 @@ "description": "Import .sql into a MySQL database with Node.", | ||
}, | ||
"version": "5.0.21" | ||
} | ||
"version": "5.0.26", | ||
"dependencies": { | ||
"mysql2": "^2.3.3" | ||
} | ||
} |
@@ -7,3 +7,3 @@ | ||
*Version 5.0.21* ([NPM](https://www.npmjs.com/package/mysql-import)) ([Github](https://github.com/Pamblam/mysql-import/)) | ||
*Version 5.0.26* ([NPM](https://www.npmjs.com/package/mysql-import)) ([Github](https://github.com/Pamblam/mysql-import/)) | ||
@@ -50,3 +50,2 @@ [![Build Status](https://api.travis-ci.org/Pamblam/mysql-import.svg?branch=master)](https://travis-ci.org/Pamblam/mysql-import/) [![Coverage Status](https://coveralls.io/repos/github/Pamblam/mysql-import/badge.svg?branch=master)](https://coveralls.io/github/Pamblam/mysql-import?branch=master) | ||
// New onProgress method, added in version 5.0! | ||
importer.onProgress(progress=>{ | ||
@@ -66,5 +65,5 @@ var percent = Math.floor(progress.bytes_processed / progress.total_bytes * 10000) / 100; | ||
### `new Importer({host, user, password[, database]})` | ||
### `new Importer({host, user, password[, database, port, ssl]})` | ||
The constructor requires an object with a `host`, `user`, and `password` parameter. Passing in a database parameter is optional. | ||
The constructor requires an object with a `host`, `user`, and `password` parameter. Passing in a database parameter is optional. Any of the parameters [listed here](https://github.com/mysqljs/mysql#connection-options) will work as well. | ||
@@ -85,3 +84,3 @@ ### `Importer.prototype.getImported()` | ||
*(New in v. 5.0!) -* Set a callback to be called as the importer processes chunks of the dump file. Callback is provided an object with the following properties: | ||
Set a callback to be called as the importer processes chunks of the dump file. Callback is provided an object with the following properties: | ||
@@ -96,3 +95,3 @@ - `total_files`: The total files in the queue. | ||
*(New in v. 5.0!) -* Set a callback to be called after each dump file has completed processing. Callback is provided an object with the following properties: | ||
Set a callback to be called after each dump file has completed processing. Callback is provided an object with the following properties: | ||
@@ -99,0 +98,0 @@ - `total_files`: The total files in the queue. |
'use strict'; | ||
const mysql = require('mysql'); | ||
const mysql = require('mysql2'); | ||
const fs = require('fs'); | ||
const path = require("path"); | ||
const stream = require('stream'); |
@@ -1,2 +0,2 @@ | ||
const mysql = require('mysql'); | ||
const mysql = require('mysql2'); | ||
@@ -61,3 +61,3 @@ var con; | ||
async function destroyTestDB(db){ | ||
await query("DROP DATABASE `"+db+"`;"); | ||
await query("DROP DATABASE IF EXISTS `"+db+"`;"); | ||
} | ||
@@ -64,0 +64,0 @@ |
// SET THESE FOR LOCAL TESTING ONLY! | ||
// RESET THEM TO '' BEFORE COMMITING CHANGES! | ||
const mysql_host = ''; | ||
const mysql_user = ''; | ||
const mysql_pass = ''; | ||
const mysql_host = '127.0.0.1'; | ||
const mysql_user = 'root'; | ||
const mysql_pass = 'bijoux22'; | ||
@@ -7,0 +7,0 @@ const expect = require('chai').expect; |
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
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
174302
26
123
+ Addedmysql2@^2.3.3
+ Addeddenque@2.1.0(transitive)
+ Addedgenerate-function@2.3.1(transitive)
+ Addediconv-lite@0.6.3(transitive)
+ Addedis-property@1.0.2(transitive)
+ Addedlong@4.0.0(transitive)
+ Addedlru-cache@6.0.07.18.3(transitive)
+ Addedmysql2@2.3.3(transitive)
+ Addednamed-placeholders@1.1.3(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedseq-queue@0.0.5(transitive)
+ Addedsqlstring@2.3.3(transitive)
+ Addedyallist@4.0.0(transitive)
- Removedmysql@^2.18.1
- Removedbignumber.js@9.0.0(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removedinherits@2.0.4(transitive)
- Removedisarray@1.0.0(transitive)
- Removedmysql@2.18.1(transitive)
- Removedprocess-nextick-args@2.0.1(transitive)
- Removedreadable-stream@2.3.7(transitive)
- Removedsafe-buffer@5.1.2(transitive)
- Removedsqlstring@2.3.1(transitive)
- Removedstring_decoder@1.1.1(transitive)
- Removedutil-deprecate@1.0.2(transitive)