Open
Description
Issue Description
I'm encountering multiple issues with the @databricks/sql library version 1.7.1 in a Node.js 20.x Lambda function environment:
Deprecation warning when using the library:
[DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
When attempting to upgrade from v1.7.1, I encounter a dependency resolution error:
Error: Could not resolve "../build/Release/xxhash"
node_modules/lz4/lib/utils.js:4:18:
4 │ var XXH = require('../build/Release/xxhash')
Steps to Reproduce
- Use @databricks/sql v1.7.1 in a Node.js 20.x environment
- Execute any operation that uses the library's connection functionality
- When attempting to upgrade to a newer version, the xxhash dependency fails to resolve
Current Behavior
- v1.7.1 generates deprecation warnings about unsafe Buffer usage
- Upgrading to newer versions results in dependency resolution errors with the lz4 package and its xxhash dependency
Expected Behavior
- The library should use the recommended Buffer methods instead of the deprecated Buffer constructor
- Dependencies should be properly resolved during installation without errors
Environment Information
Node.js version: 20.x
@databricks/sql version: 1.7.1
Runtime environment: AWS Lambda
Architecture: x86_64
Function memory: 3008MB
Additional Context
I'm caught between two issues:
- Current version (1.7.1) works but produces deprecation warnings
- Attempting to upgrade to newer versions fails with dependency resolution errors
This suggests there might be issues with how the library's dependencies are packaged or with compatibility in Node.js 20.x environments.
Impact
These issues affect the reliability and maintainability of applications using this library, especially in serverless environments where dependency resolution is critical.
Metadata
Metadata
Assignees
Labels
No labels