Skip to main content
Glama
nrwl

Nx MCP Server

Official
by nrwl
compare-nx-versions.ts1.23 kB
// eslint-disable-next-line no-restricted-imports import { gte as semverGte, gt as semverGt } from 'semver'; import { NxVersion } from './nx-version'; export function gte(a: NxVersion, b: NxVersion): boolean; export function gte(a: NxVersion, b: string): boolean; export function gte(a: string, b: NxVersion): boolean; export function gte(a: string, b: string): boolean; export function gte(a: NxVersion | string, b: NxVersion | string): boolean { if (typeof a !== 'string') { a = a.full; } if (typeof b !== 'string') { b = b.full; } if (a.startsWith('0.0.0-pr-')) { return true; } if (b.startsWith('0.0.0-pr-')) { return false; } return semverGte(a, b); } export function gt(a: NxVersion, b: NxVersion): boolean; export function gt(a: NxVersion, b: string): boolean; export function gt(a: string, b: NxVersion): boolean; export function gt(a: string, b: string): boolean; export function gt(a: NxVersion | string, b: NxVersion | string): boolean { if (typeof a !== 'string') { a = a.full; } if (typeof b !== 'string') { b = b.full; } if (a.startsWith('0.0.0-pr-')) { return true; } if (b.startsWith('0.0.0-pr-')) { return false; } return semverGt(a, b); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nrwl/nx-console'

If you have feedback or need assistance with the MCP directory API, please join our Discord server