Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update thrift library patch and prepare release #140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## 1.x (Unreleased)

## 1.2.1

- Added Azure AD support (databricks/databricks-sql-nodejs#126)
- Improved direct results handling (databricks/databricks-sql-nodejs#134)
- Updated API endpoint references in docs and samples (databricks/databricks-sql-nodejs#137)
- Code refactoring to improve maintainability

## 1.2.0

- Added Apache Arrow support (databricks/databricks-sql-nodejs#94)
Expand Down
20 changes: 5 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@databricks/sql",
"version": "1.2.0",
"version": "1.2.1",
"description": "Driver for connection to Databricks SQL via Thrift API.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand All @@ -14,6 +14,7 @@
"scripts": {
"postinstall": "patch-package",
"prepare": "npm run build",
"prepack": "mkdir dist/node_modules && cp -R node_modules/thrift dist/node_modules/thrift",
"e2e": "nyc --reporter=lcov --report-dir=coverage_e2e mocha --config tests/e2e/.mocharc.js",
"test": "nyc --reporter=lcov --report-dir=coverage_unit mocha --config tests/unit/.mocharc.js",
"update-version": "node bin/update-version.js && prettier --write ./lib/version.ts",
Expand Down Expand Up @@ -77,8 +78,5 @@
"thrift": "^0.16.0",
"uuid": "^9.0.0",
"winston": "^3.8.2"
},
"bundledDependencies": [
"thrift"
]
}
}
10 changes: 6 additions & 4 deletions patches/thrift+0.16.0.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/node_modules/thrift/lib/nodejs/lib/thrift/http_connection.js b/node_modules/thrift/lib/nodejs/lib/thrift/http_connection.js
index 17e0d0c..d1ead4a 100644
index 17e0d0c..9e90096 100644
--- a/node_modules/thrift/lib/nodejs/lib/thrift/http_connection.js
+++ b/node_modules/thrift/lib/nodejs/lib/thrift/http_connection.js
@@ -106,7 +106,7 @@ var HttpConnection = exports.HttpConnection = function(options) {
Expand Down Expand Up @@ -34,7 +34,7 @@ index 17e0d0c..d1ead4a 100644
}
}
}
@@ -165,17 +166,15 @@ var HttpConnection = exports.HttpConnection = function(options) {
@@ -165,17 +166,17 @@ var HttpConnection = exports.HttpConnection = function(options) {

//Response handler
//////////////////////////////////////////////////
Expand All @@ -46,6 +46,8 @@ index 17e0d0c..d1ead4a 100644
if (response.statusCode !== 200) {
- this.emit("error", new THTTPException(response));
+ handleError(new THTTPException(response));
+ response.destroy();
+ return;
}

- response.on('error', function (e) {
Expand All @@ -55,7 +57,7 @@ index 17e0d0c..d1ead4a 100644

// When running directly under node, chunk will be a buffer,
// however, when running in a Browser (e.g. Browserify), chunk
@@ -199,7 +198,9 @@ var HttpConnection = exports.HttpConnection = function(options) {
@@ -199,7 +200,9 @@ var HttpConnection = exports.HttpConnection = function(options) {
}
//Get the receiver function for the transport and
// call it with the buffer
Expand All @@ -66,7 +68,7 @@ index 17e0d0c..d1ead4a 100644
});
};
};
@@ -212,18 +213,33 @@ util.inherits(HttpConnection, EventEmitter);
@@ -212,18 +215,33 @@ util.inherits(HttpConnection, EventEmitter);
* @event {error} the "error" event is raised upon request failure passing the
* Node.js error object to the listener.
*/
Expand Down