@cellaware/utils 3.3.25 → 3.3.27

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.
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Extracts `version` from `package.json`.
3
+ */
4
+ export declare function getVersion(): any;
@@ -0,0 +1,12 @@
1
+ import fs from 'fs';
2
+ /**
3
+ * Extracts `version` from `package.json`.
4
+ */
5
+ export function getVersion() {
6
+ const path = 'package.json';
7
+ if (!fs.existsSync(path)) {
8
+ throw new Error(`VERSION: '${path}' not found`);
9
+ }
10
+ const content = JSON.parse(fs.readFileSync(path, 'utf8'));
11
+ return content.version;
12
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cellaware/utils",
3
- "version": "3.3.25",
3
+ "version": "3.3.27",
4
4
  "description": "Cellaware Utilities for Node.js",
5
5
  "author": "Cellaware Technologies",
6
6
  "type": "module",