Releases: Azure/azure-kusto-node
V3.0.0 - Managed Streaming Ingest, Interactive Login, token provider improvements, custom parsers for datetime results, and security fixes
Breaking Changes
- The minimum node.js version was bumped from 8 to 14, the earliest version still under support.
This was required from dependent packages in order to keep up-to-date with security patches. - Stricter checks on formats and mapping types. If your code breaks due to this, you had a bug. Includes providing a incompatible formats to the mappings or providing more than one type of mapping.
IngestionProperties
properties can no longer be null- they can now be their value, orundefined
- Added an option to create a Connection String without auth, to align with the other sdks.
Before, not providing any auth defaulted to Device Code, now it will default to no auth. - Device Code Login now requires
useDeviceCodeAuth
to be true.withAadDeviceAuthentication
sets it automatically. - Added the AAD Federated Security property to all With* methods of
KustoConnectionStringBuilder
by default. It's possible to turn off by setting the propertyaadFederatedSecurity
to undefined. - Renaming some of the properties in
KustoConnectionStringBuilder
, if you used theWithX
methods there is nothing to change:managedIdentity
->useManagedIdentityAuth
azLoginIdentity
->useAzLoginAuth
- Column Mappings now live in "./source/columnMappings". This shouldn't affect clients that import them from "azure-kusto-ingest" directly.
Deprecations
- Deprecated
toJson
methods on various type, they are now wrappers around the proper, compliant,toJSON
methods. - Creating a
JsonColumnMapping
or aCsvColumnMapping
from the constructor has been deprecated. Use the new type-safewithX
methods ingestionMappingType
has been renamed toingestionMappingKind
. The original still exists, but is deprecated.ingestionMapping
has been renamed toingestionMappingColumns
. The original still exists, but is deprecated.- Importing
IngestionPropertiesEnums
has been deprecated, instead import classes directly from "azure-kusto-ingest"
Token Providers
Improvements
- Added
UserPrompt
token provider, which will pop-up a browser window and let you login from there. You can create it usingwithUserPrompt
or settinguseUserPromptAuth
. - Added
withTokenProvider
to create an authentication token from a custom function. - Correctly pass scopes and authority url to all types based on cloud info.
- Added ToString() to KustoConnectionStringBuilder. It censors secrets by default, but it's possible to override with a parameter.
- Added
authorityId
andtimeoutMs
parameters towithAzLoginIdentity
andwithAadManagedIdentities
- Added more known aliases to connection string parts
- Added better errors for failed tokens with the type
KustoAuthenticationError
, which also includes context on the token provider.
Internal Fixes
- Added extensive tests to Connection Strings and token providers
- Some tests are now skipped based on environment variables:
AUTO_TEST
- will skip tests that require manual run (for example, interactive log)LOGIN_TEST
- if not set, will skip tests that are related to logging in.- Some login tests require additional credentials as env variables.
- Simplified the KeywordMapping type and made it less prone to mistakes using the power of typescript
- Simplified TokenProvider code by using a better class hierarchy
- Removed useless checks that typescript already checks for
Managed Streaming Ingestion
- Adds a new type of ingestion client -
ManagedStreamingIngestClient
. - Drop-in replacement for StreamingIngestClient
- The client will default to using streaming ingestion, but will be more robust to errors.
- If it fails to use streaming ingestion, it will fall back to queued when:
- Retrying streaming ingest fails multiple times, getting transient errors
- The size of the ingested object is more than 4MB
Type-safe Column Mappings
- There are now distinct types for each kind of column mappings (e.g AvroColumnMapping), that can only be constructed with their properties in a type safe way - e.g
AvroColumnMapping.withField
will define a column mapping from a field to a field, andAvroColumnMapping.withConstantValue
will define a mapping with a constant value. - Fixed issues with serialization that caused column mappings to not be sent correctly sometimes.
- Old constructors for Json and Csv column mappings have been deprecated.
Custom Parsers
By default, when working with KustoResultRow
, the SDK will parse date and time fields to moment.js
objects.
You can now override this behaviors, either from the constructor of KustoReesultRow
, or the properties timeSpanParser
and dateTimeParser
of KustoResultTable
.
This is useful for cases that the standard datetime objects do not support, such as significant nanoseconds.
Other Fixes
IngestFromStream
now accepts any readableIngestFromStream
now supports Client Request ID- Bumped azure-msal, azure-identity, axios and mocha to their latest versions, fixing security warnings
- Added docs to DataFormats
toJson
in rows and columns is now generic, for easier object conversion.
internal Changes
- The code has moved from the deprecated
tslint
toeslint
, and now has more strict lints, including for types and headers. - The code is now formatted, and enforces formatting using
prettify
Bump axios & uuid and move @types/mocha to devDependencies #148
Breaking Changes:
- None
Features:
- None
Fixes:
- bump axios 0.21.1 -> 0.21.2
- bump uuid 3.4.0 -> 8.3.2
- move @types/mocha to devDependencies
AzCli authentication via @azure/identity
Breaking Changes:
- None
Features:
- None
Fixes:
- Remove problematic dependencies (adal-node, xmldom)
Remove 'adal-node' from dependencies
Remove adal-node from dependencies (#142) * Remove adal from dependencies * bump * fix * fix azCli
Moving to MSAL
Refactoring token acquiring and migrate from ADAL to MSAL
Add support for application and user in ClientRequestProperties
Add application and user to Client Request Properties (#136) * Support machine and app in CRP * nit
axios improvements
Add validateStatus and "Keep-Alive" for axios client
Fixed Typescript integration
Now ts files aren't included in the npm package, as they should.
Also we moved typings from dev-dependencies, to normal dependencies.
These should stop issues when depending on this project on an already typescript codebase.
Add support for query V1
Add support for query V1
Breaking Changes:
- None
Features:
- Method executeQueryV1 for query V1 endpoint
Fixes:
- None
Fixed lock files
v2.1.3 Properly update lock files.