conductor-node 11.0.1 → 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,14 +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
+ // Exit early if npm is not installed.
11
+ try {
12
+ node_child_process_1.default.execSync("which npm");
13
+ }
14
+ catch {
15
+ return;
16
+ }
10
17
  const currentVersion = package_json_1.default.version;
11
- const latestVersion = (0, node_child_process_1.execSync)(`npm view ${package_json_1.default.name} version --silent`)
18
+ const latestVersion = node_child_process_1.default
19
+ .execSync(`npm view ${package_json_1.default.name} version --silent`)
12
20
  .toString()
13
21
  .trim();
14
22
  if (currentVersion !== latestVersion) {
15
- console.warn(`⚠️ A new release of Conductor is available: ${currentVersion} -> ${latestVersion}. To update, run: yarn upgrade ${package_json_1.default.name} --latest`);
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`);
16
27
  }
17
28
  }
18
29
  exports.checkForUpdates = checkForUpdates;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conductor-node",
3
- "version": "11.0.1",
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 test",
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"