@agentprojectcontext/apx 1.3.0 → 1.3.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentprojectcontext/apx",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "APX — unified CLI + daemon for the Agent Project Context (APC) standard.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -4,7 +4,7 @@ import { getLatestVersion } from "../../core/update-check.js";
4
4
 
5
5
  const PACKAGE_NAME = "@agentprojectcontext/apx";
6
6
 
7
- export async function cmdUpdate(args) {
7
+ export async function cmdUpdate(args, currentVersion) {
8
8
  const force = args.flags.force || args.flags.yes || args.flags.y;
9
9
 
10
10
  console.log("Checking for updates...");
@@ -15,12 +15,7 @@ export async function cmdUpdate(args) {
15
15
  process.exit(1);
16
16
  }
17
17
 
18
- // Read current version from the package that owns this file.
19
- const { createRequire } = await import("node:module");
20
- const { fileURLToPath } = await import("node:url");
21
- const require = createRequire(import.meta.url);
22
- const pkg = require("../../package.json");
23
- const current = pkg.version;
18
+ const current = currentVersion;
24
19
 
25
20
  function isNewer(cur, lat) {
26
21
  const parse = (v) => v.replace(/^v/, "").split(".").map(Number);
package/src/cli/index.js CHANGED
@@ -490,7 +490,7 @@ async function dispatch(cmd, rest) {
490
490
 
491
491
  case "update":
492
492
  case "upgrade":
493
- await cmdUpdate(parseArgs(rest));
493
+ await cmdUpdate(parseArgs(rest), VERSION);
494
494
  return; // skip checkForUpdate after an update
495
495
 
496
496
  default: