File tree Expand file tree Collapse file tree 3 files changed +18
-18
lines changed Expand file tree Collapse file tree 3 files changed +18
-18
lines changed Original file line number Diff line number Diff line change 11import { isValidStringProperty } from '../validation/string' ;
22import { DbVersionSupport } from '../utils/dbVersion' ;
33import { ConsistencyLevel } from './replication' ;
4- import { isValidWeaviateVersion } from '../validation/version' ;
4+ import { isNotValidWeaviateVersion } from '../validation/version' ;
55
66const objectsPathPrefix = '/objects' ;
77
@@ -177,11 +177,11 @@ export class ReferencesPath {
177177 } else {
178178 support . warns . notSupportedClassNamespacedEndpointsForReferences ( ) ;
179179 }
180- if ( support . version ) {
181- if ( isValidWeaviateVersion ( support . version ) ) {
180+ if ( support . version ) {
181+ if ( isNotValidWeaviateVersion ( support . version ) ) {
182182 support . warns . deprecatedWeaviateTooOld ( ) ;
183183 }
184- }
184+ }
185185 if ( isValidStringProperty ( id ) ) {
186186 path = `${ path } /${ id } ` ;
187187 }
Original file line number Diff line number Diff line change 11import { isValidStringProperty } from '../validation/string' ;
22import { DbVersionSupport } from './dbVersion' ;
3- import { isValidWeaviateVersion } from '../validation/version' ;
3+ import { isNotValidWeaviateVersion } from '../validation/version' ;
44
55const beaconPathPrefix = 'weaviate://localhost' ;
66
@@ -42,11 +42,11 @@ export class BeaconPath {
4242 } else {
4343 support . warns . notSupportedClassNamespacedEndpointsForBeacons ( ) ;
4444 }
45- if ( support . version ) {
46- if ( isValidWeaviateVersion ( support . version ) ) {
45+ if ( support . version ) {
46+ if ( isNotValidWeaviateVersion ( support . version ) ) {
4747 support . warns . deprecatedWeaviateTooOld ( ) ;
4848 }
49- }
49+ }
5050 if ( isValidStringProperty ( id ) ) {
5151 beaconPath = `${ beaconPath } /${ id } ` ;
5252 }
Original file line number Diff line number Diff line change 1- export function isValidWeaviateVersion ( version : string ) {
2- if ( typeof version === 'string' ) {
3- const versionNumbers = version . split ( '.' ) ;
4- if ( versionNumbers . length >= 2 ) {
5- const major = parseInt ( versionNumbers [ 0 ] , 10 ) ;
6- const minor = parseInt ( versionNumbers [ 1 ] , 10 ) ;
7- return ( major <= 1 && minor < 16 ) ;
8- }
1+ export function isNotValidWeaviateVersion ( version : string ) {
2+ if ( typeof version === 'string' ) {
3+ const versionNumbers = version . split ( '.' ) ;
4+ if ( versionNumbers . length >= 2 ) {
5+ const major = parseInt ( versionNumbers [ 0 ] , 10 ) ;
6+ const minor = parseInt ( versionNumbers [ 1 ] , 10 ) ;
7+ return major <= 1 && minor < 16 ;
98 }
10- return false ;
11- }
9+ }
10+ return false ;
11+ }
You can’t perform that action at this time.
0 commit comments