conductor-node 11.0.2 → 11.0.3
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.
|
@@ -5,21 +5,25 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.checkForUpdates = void 0;
|
|
7
7
|
const package_json_1 = __importDefault(require("../../package.json"));
|
|
8
|
-
const node_child_process_1 = require("node:child_process");
|
|
8
|
+
const node_child_process_1 = __importDefault(require("node:child_process"));
|
|
9
9
|
function checkForUpdates() {
|
|
10
10
|
// Exit early if npm is not installed.
|
|
11
11
|
try {
|
|
12
|
-
|
|
12
|
+
node_child_process_1.default.execSync("which npm");
|
|
13
13
|
}
|
|
14
14
|
catch {
|
|
15
15
|
return;
|
|
16
16
|
}
|
|
17
17
|
const currentVersion = package_json_1.default.version;
|
|
18
|
-
const latestVersion =
|
|
18
|
+
const latestVersion = node_child_process_1.default
|
|
19
|
+
.execSync(`npm view ${package_json_1.default.name} version --silent`)
|
|
19
20
|
.toString()
|
|
20
21
|
.trim();
|
|
21
22
|
if (currentVersion !== latestVersion) {
|
|
22
|
-
|
|
23
|
+
const updateCommand = process.env["npm_execpath"]?.includes("yarn") === true
|
|
24
|
+
? "yarn add"
|
|
25
|
+
: "npm install";
|
|
26
|
+
console.warn(`⚠️ Update available for Conductor: ${currentVersion} -> ${latestVersion}. To update, run: ${updateCommand} ${package_json_1.default.name}@latest`);
|
|
23
27
|
}
|
|
24
28
|
}
|
|
25
29
|
exports.checkForUpdates = checkForUpdates;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "conductor-node",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.3",
|
|
4
4
|
"description": "Easily integrate the entire QuickBooks Desktop API using fully-typed async TypeScript",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"QuickBooks Desktop",
|
|
@@ -26,9 +26,7 @@
|
|
|
26
26
|
"postpack": "rm -rf dist",
|
|
27
27
|
"clean": "rm -rf dist package conductor-node-*.tgz tsconfig.tsbuildinfo",
|
|
28
28
|
"diff": "yarn pack && npm diff --diff=conductor-node@latest --diff=conductor-node-v$(node -p \"require('./package.json').version\").tgz && yarn clean",
|
|
29
|
-
"prepublishOnly": "yarn
|
|
30
|
-
"test": "yarn --cwd=../../ test ./packages/client",
|
|
31
|
-
"jest": "yarn --cwd=../../ jest"
|
|
29
|
+
"prepublishOnly": "yarn jest"
|
|
32
30
|
},
|
|
33
31
|
"engines": {
|
|
34
32
|
"node": ">=16"
|