diff --git a/client/python/scripts/check_version.py b/client/python/scripts/check_version.py index d6156cb5b0..b37510fcb5 100644 --- a/client/python/scripts/check_version.py +++ b/client/python/scripts/check_version.py @@ -56,8 +56,9 @@ REPO_ROOT = os.path.dirname( os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) ) -NODE_PACKAGE = os.path.join(REPO_ROOT, "client", "node", "package.json") -MCP_PACKAGE = os.path.join(REPO_ROOT, "packaging", "npm", "sysml-mcp", "package.json") +PACKAGE_JSON = "package.json" +NODE_PACKAGE = os.path.join(REPO_ROOT, "client", "node", PACKAGE_JSON) +MCP_PACKAGE = os.path.join(REPO_ROOT, "packaging", "npm", "sysml-mcp", PACKAGE_JSON) JAVA_POM = os.path.join(REPO_ROOT, "client", "java", "pom.xml") RUST_CARGO = os.path.join(REPO_ROOT, "client", "rust", "opensysml", "Cargo.toml") KERNEL_VERSION_FILE = os.path.join( @@ -236,7 +237,7 @@ def node_version(declared=None, node=None, tag=None): node = node_declared_version() if node is None else node return _client_version( "client/node/package.json", - "package.json", + PACKAGE_JSON, "npm", "The Node client", node, diff --git a/packaging/npm/sysml-mcp/lib/platform.js b/packaging/npm/sysml-mcp/lib/platform.js index d54d6cf23a..c0321bc49e 100644 --- a/packaging/npm/sysml-mcp/lib/platform.js +++ b/packaging/npm/sysml-mcp/lib/platform.js @@ -63,7 +63,7 @@ export function resolveBinary({ os, cpu, version, from = import.meta.url }) { try { manifestPath = require.resolve(`${name}/package.json`); } catch (error) { - if (error && error.code === "MODULE_NOT_FOUND") { + if (error?.code === "MODULE_NOT_FOUND") { throw new ShimError( `${PACKAGE_NAME}: the platform package ${name}@${version} is not installed. ` + "It is an optional dependency, so an install with --no-optional or --omit=optional " + diff --git a/scripts/install-mcp-publisher.sh b/scripts/install-mcp-publisher.sh index 981fa8442c..eff57ebfa1 100755 --- a/scripts/install-mcp-publisher.sh +++ b/scripts/install-mcp-publisher.sh @@ -30,6 +30,7 @@ arch="$(uname -m)" case "$arch" in x86_64) arch=amd64 ;; aarch64 | arm64) arch=arm64 ;; + *) ;; # any other machine name is looked up as uname spells it esac platform="${os}_${arch}" expected="${MCP_PUBLISHER_SHA256[$platform]:-}" diff --git a/scripts/mcp-stdio-probe.mjs b/scripts/mcp-stdio-probe.mjs index aa209dbb95..83ce0a87a0 100755 --- a/scripts/mcp-stdio-probe.mjs +++ b/scripts/mcp-stdio-probe.mjs @@ -68,7 +68,8 @@ const timer = setTimeout(() => fail(`no complete answer within ${timeout} ms`), child.on("exit", (code, signal) => { clearTimeout(timer); if (verdict === 0 && code !== 0) { - process.stderr.write(`mcp-stdio-probe: the server ended with ${signal ?? `status ${code}`} after a clean probe\n`); + const ending = signal ?? `status ${code}`; + process.stderr.write(`mcp-stdio-probe: the server ended with ${ending} after a clean probe\n`); verdict = 1; } process.exit(verdict); diff --git a/scripts/npm-publish-missing.sh b/scripts/npm-publish-missing.sh index 58bdd2c806..b0cffeea18 100755 --- a/scripts/npm-publish-missing.sh +++ b/scripts/npm-publish-missing.sh @@ -11,7 +11,8 @@ tag=$1 shift manifest() { - if [[ -d "$1" ]]; then cat "$1/package.json"; else tar -xOf "$1" package/package.json; fi + local package=$1 + if [[ -d "$package" ]]; then cat "$package/package.json"; else tar -xOf "$package" package/package.json; fi } for package in "$@"; do