Skip to content

Commit f0af829

Browse files
feat(NODE-7310): Replace process.arch with os.arch() (#4823)
1 parent c990750 commit f0af829

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/cmap/handshake/client_metadata.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export async function makeClientMetadata(
158158
// Note: order matters, os.type is last so it will be removed last if we're at maxSize
159159
const osInfo = new Map()
160160
.set('name', process.platform)
161-
.set('architecture', process.arch)
161+
.set('architecture', os.arch())
162162
.set('version', os.release())
163163
.set('type', os.type());
164164

test/unit/cmap/handshake/client_metadata.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ describe('client metadata module', () => {
154154
os: {
155155
type: os.type(),
156156
name: process.platform,
157-
architecture: process.arch,
157+
architecture: os.arch(),
158158
version: os.release()
159159
},
160160
platform: `Node.js ${process.version}, ${os.endianness()}`
@@ -180,7 +180,7 @@ describe('client metadata module', () => {
180180
os: {
181181
type: os.type(),
182182
name: process.platform,
183-
architecture: process.arch,
183+
architecture: os.arch(),
184184
version: os.release()
185185
},
186186
platform: `Node.js ${process.version}, ${os.endianness()}|myPlatform`
@@ -204,7 +204,7 @@ describe('client metadata module', () => {
204204
os: {
205205
type: os.type(),
206206
name: process.platform,
207-
architecture: process.arch,
207+
architecture: os.arch(),
208208
version: os.release()
209209
},
210210
platform: `Node.js ${process.version}, ${os.endianness()}`
@@ -230,7 +230,7 @@ describe('client metadata module', () => {
230230
os: {
231231
type: os.type(),
232232
name: process.platform,
233-
architecture: process.arch,
233+
architecture: os.arch(),
234234
version: os.release()
235235
},
236236
platform: `Node.js ${process.version}, ${os.endianness()}`
@@ -249,7 +249,7 @@ describe('client metadata module', () => {
249249
os: {
250250
type: os.type(),
251251
name: process.platform,
252-
architecture: process.arch,
252+
architecture: os.arch(),
253253
version: os.release()
254254
},
255255
platform: `Node.js ${process.version}, ${os.endianness()}`

0 commit comments

Comments
 (0)