@knime/utils 1.3.0 → 1.3.2

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @knime/utils
2
2
 
3
+ ## 1.3.2
4
+
5
+ ### Patch Changes
6
+
7
+ - ee229d3: add isWindows check to navigator utils
8
+
9
+ ## 1.3.1
10
+
11
+ ### Patch Changes
12
+
13
+ - a674c18: Allow zero duration but disallow empty duration in IntervalInput
14
+
3
15
  ## 1.3.0
4
16
 
5
17
  ### Minor Changes
package/package.json CHANGED
@@ -1,17 +1,24 @@
1
1
  {
2
2
  "name": "@knime/utils",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "Internal utility functions and constants shared across @knime packages.",
5
5
  "homepage": "https://knime.github.io/webapps-common/",
6
6
  "license": "GPL 3 and Additional Permissions according to Sec. 7 (SEE the file LICENSE)",
7
7
  "author": "KNIME AG, Zurich, Switzerland",
8
8
  "type": "module",
9
9
  "dependencies": {
10
- "consola": "3.2.3",
11
10
  "date-fns": "2.30.0",
12
11
  "date-fns-tz": "2.0.0",
13
12
  "@knime/styles": "1.3.1"
14
13
  },
14
+ "peerDependencies": {
15
+ "consola": "3.x"
16
+ },
17
+ "devDependencies": {
18
+ "consola": "3.2.3",
19
+ "flush-promises": "^1.0.2",
20
+ "mock-xmlhttprequest": "^8.3.0"
21
+ },
15
22
  "main": "src/index.ts",
16
23
  "module": "src/index.ts",
17
24
  "files": [
@@ -32,10 +39,6 @@
32
39
  "import": "./test-utils/index.ts"
33
40
  }
34
41
  },
35
- "devDependencies": {
36
- "flush-promises": "^1.0.2",
37
- "mock-xmlhttprequest": "^8.3.0"
38
- },
39
42
  "scripts": {
40
43
  "test:unit": "TZ='Europe/Berlin' vitest"
41
44
  }
@@ -22,7 +22,6 @@ type IntervalStringValidationResult =
22
22
  valid: true;
23
23
  type: AllowedIntervalTypes;
24
24
  negative: boolean;
25
- zero: boolean;
26
25
  }
27
26
  | { valid: false };
28
27
 
@@ -305,7 +304,6 @@ export const isValidHumanReadableIntervalString = (
305
304
  valid: true,
306
305
  type: actualType,
307
306
  negative,
308
- zero: isZero(validationResult),
309
307
  };
310
308
  } else {
311
309
  return { valid: false };
@@ -382,7 +380,6 @@ export const isValidISOIntervalString = (
382
380
  valid: true,
383
381
  type: actualType,
384
382
  negative,
385
- zero: isZero(validationResult),
386
383
  };
387
384
  } else {
388
385
  return { valid: false };
package/src/navigator.ts CHANGED
@@ -1,10 +1,17 @@
1
1
  /**
2
2
  *
3
- * @returns true when the platform of the user is Mac
3
+ * @returns true if the platform of the user is Mac
4
4
  */
5
5
  export const isMac = (): boolean =>
6
6
  navigator?.userAgent?.toLowerCase()?.includes("mac");
7
7
 
8
+ /**
9
+ *
10
+ * @returns true if the platform of the user is Windows
11
+ */
12
+ export const isWindows = (): boolean =>
13
+ navigator?.userAgent?.toLowerCase()?.includes("windows");
14
+
8
15
  /**
9
16
  * @deprecated Since version 1.3.6. Use `hotkeys.ts` instead.
10
17
  *