Skip to content

Commit f2ea75d

Browse files
committed
fix(cli): update NODE_VERSION to getNodeVersion()
Change imports from NODE_VERSION constant to getNodeVersion() function to match @socketsecurity/lib@1.3.5 API.
1 parent 5fe8319 commit f2ea75d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/cli/src/commands/analytics/cmd-analytics.test.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import semver from 'semver'
22
import { describe, expect } from 'vitest'
33

4-
import { NODE_VERSION } from '@socketsecurity/lib/constants/node'
4+
import { getNodeVersion } from '@socketsecurity/lib/constants/node'
55
import { WIN32 } from '@socketsecurity/lib/constants/platform'
66

77
import {
@@ -48,7 +48,7 @@ describe('socket analytics', async () => {
4848
`)
4949
// Node 24 on Windows currently fails this test with added stderr:
5050
// Assertion failed: !(handle->flags & UV_HANDLE_CLOSING), file src\win\async.c, line 76
51-
const skipOnWin32Node24 = WIN32 && semver.parse(NODE_VERSION)?.major >= 24
51+
const skipOnWin32Node24 = WIN32 && semver.parse(getNodeVersion())?.major >= 24
5252
if (!skipOnWin32Node24) {
5353
expect(`\n ${stderr}`).toMatchInlineSnapshot(`
5454
"

packages/cli/src/commands/config/cmd-config-get.test.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import semver from 'semver'
22
import { describe, expect } from 'vitest'
33

4-
import { NODE_VERSION } from '@socketsecurity/lib/constants/node'
4+
import { getNodeVersion } from '@socketsecurity/lib/constants/node'
55
import { WIN32 } from '@socketsecurity/lib/constants/platform'
66

77
import { cmdit, spawnSocketCli } from '../../../test/utils.mts'
@@ -44,7 +44,7 @@ describe('socket config get', async () => {
4444
`)
4545
// Node 24 on Windows currently fails this test with added stderr:
4646
// Assertion failed: !(handle->flags & UV_HANDLE_CLOSING), file src\win\async.c, line 76
47-
const skipOnWin32Node24 = WIN32 && semver.parse(NODE_VERSION)?.major >= 24
47+
const skipOnWin32Node24 = WIN32 && semver.parse(getNodeVersion())?.major >= 24
4848
if (!skipOnWin32Node24) {
4949
expect(`\n ${stderr}`).toMatchInlineSnapshot(`
5050
"

0 commit comments

Comments
 (0)