@yahoo/uds 1.7.3 → 1.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
declare var self: Worker;
|
|
4
4
|
|
|
5
5
|
import { UniversalTokensConfig } from '@yahoo/uds/tokens';
|
|
6
|
-
import { gte } from 'semver';
|
|
6
|
+
import { eq, gte } from 'semver';
|
|
7
7
|
|
|
8
8
|
import { ConfigWorkerThreadMessageEvent } from './types';
|
|
9
9
|
|
|
@@ -61,8 +61,9 @@ self.onmessage = async ({ data }: ConfigWorkerThreadMessageEvent) => {
|
|
|
61
61
|
|
|
62
62
|
// check if the locally installed version of UDS is compatible with the config version
|
|
63
63
|
// it needs to be equal or greater than the config version
|
|
64
|
+
// note: 0.0.0-development is a special case for local development
|
|
64
65
|
const installedUdsVersion = (await import('@yahoo/uds/package.json')).default.version;
|
|
65
|
-
if (!gte(installedUdsVersion, udsVersion)) {
|
|
66
|
+
if (!gte(installedUdsVersion, udsVersion) && !eq(installedUdsVersion, '0.0.0-development')) {
|
|
66
67
|
throw new Error(`
|
|
67
68
|
Installed version of UDS is not compatible with the config version. \n
|
|
68
69
|
Required: ${udsVersion}. Installed: ${installedUdsVersion} \n
|