Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

cpu-arch

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cpu-arch - npm Package Compare versions

Comparing version
1.0.5
to
1.0.6
+1
-1
dist/cjs/compat.js.map

@@ -1,1 +0,1 @@

{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/cpu-arch/src/compat.ts"],"sourcesContent":["/**\n * Compatibility Layer for Node.js 0.8+\n * Local to this package - contains only needed functions.\n */\n\n/**\n * String.prototype.startsWith wrapper for Node.js 0.8+\n * - Uses native startsWith on Node 4.0+ / ES2015+\n * - Falls back to indexOf on Node 0.8-3.x\n */\nvar hasStartsWith = typeof String.prototype.startsWith === 'function';\n\nexport function stringStartsWith(str: string, search: string, position?: number): boolean {\n if (hasStartsWith) {\n return str.startsWith(search, position);\n }\n position = position || 0;\n return str.indexOf(search, position) === position;\n}\n"],"names":["stringStartsWith","hasStartsWith","String","prototype","startsWith","str","search","position","indexOf"],"mappings":";;;;+BAYgBA;;;eAAAA;;;AAZhB;;;CAGC,GAED;;;;CAIC,GACD,IAAIC,gBAAgB,OAAOC,OAAOC,SAAS,CAACC,UAAU,KAAK;AAEpD,SAASJ,iBAAiBK,GAAW,EAAEC,MAAc,EAAEC,QAAiB;IAC7E,IAAIN,eAAe;QACjB,OAAOI,IAAID,UAAU,CAACE,QAAQC;IAChC;IACAA,WAAWA,YAAY;IACvB,OAAOF,IAAIG,OAAO,CAACF,QAAQC,cAAcA;AAC3C"}
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/cpu-arch/src/compat.ts"],"sourcesContent":["/**\n * Compatibility Layer for Node.js 0.8+\n * Local to this package - contains only needed functions.\n */\n\n/**\n * String.prototype.startsWith wrapper for Node.js 0.8+\n * - Uses native startsWith on Node 4.0+ / ES2015+\n * - Falls back to indexOf on Node 0.8-3.x\n */\nconst hasStartsWith = typeof String.prototype.startsWith === 'function';\n\nexport function stringStartsWith(str: string, search: string, position?: number): boolean {\n if (hasStartsWith) {\n return str.startsWith(search, position);\n }\n position = position || 0;\n return str.indexOf(search, position) === position;\n}\n"],"names":["stringStartsWith","hasStartsWith","String","prototype","startsWith","str","search","position","indexOf"],"mappings":";;;;+BAYgBA;;;eAAAA;;;AAZhB;;;CAGC,GAED;;;;CAIC,GACD,IAAMC,gBAAgB,OAAOC,OAAOC,SAAS,CAACC,UAAU,KAAK;AAEtD,SAASJ,iBAAiBK,GAAW,EAAEC,MAAc,EAAEC,QAAiB;IAC7E,IAAIN,eAAe;QACjB,OAAOI,IAAID,UAAU,CAACE,QAAQC;IAChC;IACAA,WAAWA,YAAY;IACvB,OAAOF,IAAIG,OAAO,CAACF,QAAQC,cAAcA;AAC3C"}

@@ -1,8 +0,3 @@

/**
* Local execSync implementation that doesn't pollute global namespace.
* Uses native cp.execSync if available (Node 0.12+), otherwise falls back
* to function-exec-sync polyfill.
*/
export default function execSync(cmd: string, options?: {
encoding?: BufferEncoding;
}): string;

@@ -1,8 +0,3 @@

/**
* Local execSync implementation that doesn't pollute global namespace.
* Uses native cp.execSync if available (Node 0.12+), otherwise falls back
* to function-exec-sync polyfill.
*/
export default function execSync(cmd: string, options?: {
encoding?: BufferEncoding;
}): string;

@@ -5,7 +5,3 @@ "use strict";

});
Object.defineProperty(exports, /**
* Local execSync implementation that doesn't pollute global namespace.
* Uses native cp.execSync if available (Node 0.12+), otherwise falls back
* to function-exec-sync polyfill.
*/ "default", {
Object.defineProperty(exports, "default", {
enumerable: true,

@@ -27,3 +23,5 @@ get: function() {

var __dirname = _path.default.dirname(typeof __filename !== 'undefined' ? __filename : _url.default.fileURLToPath(require("url").pathToFileURL(__filename).toString()));
var functionExec = null;
// Worker MUST always load from dist/cjs/ for old Node compatibility
var workerPath = _path.default.join(__dirname, '..', '..', 'cjs', 'lib', 'worker.js');
var functionExec = null; // break dependencies
function execSync(cmd) {

@@ -35,8 +33,3 @@ var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};

}
// Polyfill for Node < 0.12 using function-exec-sync
if (!functionExec) {
functionExec = _require('function-exec-sync');
}
// Worker path is relative to dist/cjs/lib/ at runtime
var workerPath = _path.default.join(__dirname, 'worker.js');
if (!functionExec) functionExec = _require('function-exec-sync');
return functionExec === null || functionExec === void 0 ? void 0 : functionExec({

@@ -43,0 +36,0 @@ callbacks: true

@@ -1,1 +0,1 @@

{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/cpu-arch/src/lib/execSync.ts"],"sourcesContent":["import cp from 'child_process';\nimport Module from 'module';\nimport path from 'path';\nimport url from 'url';\n\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\nconst __dirname = path.dirname(typeof __filename !== 'undefined' ? __filename : url.fileURLToPath(import.meta.url));\n\nlet functionExec: ((options: { callbacks: boolean }, workerPath: string, cmd: string, execOptions: { encoding?: BufferEncoding }) => string) | null = null;\n\n/**\n * Local execSync implementation that doesn't pollute global namespace.\n * Uses native cp.execSync if available (Node 0.12+), otherwise falls back\n * to function-exec-sync polyfill.\n */\nexport default function execSync(cmd: string, options: { encoding?: BufferEncoding } = {}): string {\n // Use native execSync if available (Node 0.12+)\n if (typeof cp.execSync === 'function') {\n return cp.execSync(cmd, options) as unknown as string;\n }\n\n // Polyfill for Node < 0.12 using function-exec-sync\n if (!functionExec) {\n functionExec = _require('function-exec-sync');\n }\n // Worker path is relative to dist/cjs/lib/ at runtime\n const workerPath = path.join(__dirname, 'worker.js');\n return functionExec?.({ callbacks: true }, workerPath, cmd, options);\n}\n"],"names":["execSync","_require","require","Module","createRequire","__dirname","path","dirname","__filename","url","fileURLToPath","functionExec","cmd","options","cp","workerPath","join","callbacks"],"mappings":";;;;+BAUA;;;;CAIC,GACD;;;eAAwBA;;;oEAfT;6DACI;2DACF;0DACD;;;;;;AAEhB,IAAMC,WAAW,OAAOC,YAAY,cAAcC,eAAM,CAACC,aAAa,CAAC,uDAAmBF;AAC1F,IAAMG,YAAYC,aAAI,CAACC,OAAO,CAAC,OAAOC,eAAe,cAAcA,aAAaC,YAAG,CAACC,aAAa,CAAC;AAElG,IAAIC,eAAkJ;AAOvI,SAASX,SAASY,GAAW;QAAEC,UAAAA,iEAAyC,CAAC;IACtF,gDAAgD;IAChD,IAAI,OAAOC,sBAAE,CAACd,QAAQ,KAAK,YAAY;QACrC,OAAOc,sBAAE,CAACd,QAAQ,CAACY,KAAKC;IAC1B;IAEA,oDAAoD;IACpD,IAAI,CAACF,cAAc;QACjBA,eAAeV,SAAS;IAC1B;IACA,sDAAsD;IACtD,IAAMc,aAAaT,aAAI,CAACU,IAAI,CAACX,WAAW;IACxC,OAAOM,yBAAAA,mCAAAA,aAAe;QAAEM,WAAW;IAAK,GAAGF,YAAYH,KAAKC;AAC9D"}
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/cpu-arch/src/lib/execSync.ts"],"sourcesContent":["import cp from 'child_process';\nimport Module from 'module';\nimport path from 'path';\nimport url from 'url';\n\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\nconst __dirname = path.dirname(typeof __filename !== 'undefined' ? __filename : url.fileURLToPath(import.meta.url));\n\n// Worker MUST always load from dist/cjs/ for old Node compatibility\nconst workerPath = path.join(__dirname, '..', '..', 'cjs', 'lib', 'worker.js');\n\nlet functionExec = null; // break dependencies\nexport default function execSync(cmd: string, options: { encoding?: BufferEncoding } = {}): string {\n // Use native execSync if available (Node 0.12+)\n if (typeof cp.execSync === 'function') {\n return cp.execSync(cmd, options) as unknown as string;\n }\n\n if (!functionExec) functionExec = _require('function-exec-sync');\n return functionExec?.({ callbacks: true }, workerPath, cmd, options);\n}\n"],"names":["execSync","_require","require","Module","createRequire","__dirname","path","dirname","__filename","url","fileURLToPath","workerPath","join","functionExec","cmd","options","cp","callbacks"],"mappings":";;;;+BAYA;;;eAAwBA;;;oEAZT;6DACI;2DACF;0DACD;;;;;;AAEhB,IAAMC,WAAW,OAAOC,YAAY,cAAcC,eAAM,CAACC,aAAa,CAAC,uDAAmBF;AAC1F,IAAMG,YAAYC,aAAI,CAACC,OAAO,CAAC,OAAOC,eAAe,cAAcA,aAAaC,YAAG,CAACC,aAAa,CAAC;AAElG,oEAAoE;AACpE,IAAMC,aAAaL,aAAI,CAACM,IAAI,CAACP,WAAW,MAAM,MAAM,OAAO,OAAO;AAElE,IAAIQ,eAAe,MAAM,qBAAqB;AAC/B,SAASb,SAASc,GAAW;QAAEC,UAAAA,iEAAyC,CAAC;IACtF,gDAAgD;IAChD,IAAI,OAAOC,sBAAE,CAAChB,QAAQ,KAAK,YAAY;QACrC,OAAOgB,sBAAE,CAAChB,QAAQ,CAACc,KAAKC;IAC1B;IAEA,IAAI,CAACF,cAAcA,eAAeZ,SAAS;IAC3C,OAAOY,yBAAAA,mCAAAA,aAAe;QAAEI,WAAW;IAAK,GAAGN,YAAYG,KAAKC;AAC9D"}

@@ -8,3 +8,3 @@ /**

* - Falls back to indexOf on Node 0.8-3.x
*/ var hasStartsWith = typeof String.prototype.startsWith === 'function';
*/ const hasStartsWith = typeof String.prototype.startsWith === 'function';
export function stringStartsWith(str, search, position) {

@@ -11,0 +11,0 @@ if (hasStartsWith) {

@@ -1,1 +0,1 @@

{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/cpu-arch/src/compat.ts"],"sourcesContent":["/**\n * Compatibility Layer for Node.js 0.8+\n * Local to this package - contains only needed functions.\n */\n\n/**\n * String.prototype.startsWith wrapper for Node.js 0.8+\n * - Uses native startsWith on Node 4.0+ / ES2015+\n * - Falls back to indexOf on Node 0.8-3.x\n */\nvar hasStartsWith = typeof String.prototype.startsWith === 'function';\n\nexport function stringStartsWith(str: string, search: string, position?: number): boolean {\n if (hasStartsWith) {\n return str.startsWith(search, position);\n }\n position = position || 0;\n return str.indexOf(search, position) === position;\n}\n"],"names":["hasStartsWith","String","prototype","startsWith","stringStartsWith","str","search","position","indexOf"],"mappings":"AAAA;;;CAGC,GAED;;;;CAIC,GACD,IAAIA,gBAAgB,OAAOC,OAAOC,SAAS,CAACC,UAAU,KAAK;AAE3D,OAAO,SAASC,iBAAiBC,GAAW,EAAEC,MAAc,EAAEC,QAAiB;IAC7E,IAAIP,eAAe;QACjB,OAAOK,IAAIF,UAAU,CAACG,QAAQC;IAChC;IACAA,WAAWA,YAAY;IACvB,OAAOF,IAAIG,OAAO,CAACF,QAAQC,cAAcA;AAC3C"}
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/cpu-arch/src/compat.ts"],"sourcesContent":["/**\n * Compatibility Layer for Node.js 0.8+\n * Local to this package - contains only needed functions.\n */\n\n/**\n * String.prototype.startsWith wrapper for Node.js 0.8+\n * - Uses native startsWith on Node 4.0+ / ES2015+\n * - Falls back to indexOf on Node 0.8-3.x\n */\nconst hasStartsWith = typeof String.prototype.startsWith === 'function';\n\nexport function stringStartsWith(str: string, search: string, position?: number): boolean {\n if (hasStartsWith) {\n return str.startsWith(search, position);\n }\n position = position || 0;\n return str.indexOf(search, position) === position;\n}\n"],"names":["hasStartsWith","String","prototype","startsWith","stringStartsWith","str","search","position","indexOf"],"mappings":"AAAA;;;CAGC,GAED;;;;CAIC,GACD,MAAMA,gBAAgB,OAAOC,OAAOC,SAAS,CAACC,UAAU,KAAK;AAE7D,OAAO,SAASC,iBAAiBC,GAAW,EAAEC,MAAc,EAAEC,QAAiB;IAC7E,IAAIP,eAAe;QACjB,OAAOK,IAAIF,UAAU,CAACG,QAAQC;IAChC;IACAA,WAAWA,YAAY;IACvB,OAAOF,IAAIG,OAAO,CAACF,QAAQC,cAAcA;AAC3C"}

@@ -1,8 +0,3 @@

/**
* Local execSync implementation that doesn't pollute global namespace.
* Uses native cp.execSync if available (Node 0.12+), otherwise falls back
* to function-exec-sync polyfill.
*/
export default function execSync(cmd: string, options?: {
encoding?: BufferEncoding;
}): string;

@@ -7,8 +7,6 @@ import cp from 'child_process';

const __dirname = path.dirname(typeof __filename !== 'undefined' ? __filename : url.fileURLToPath(import.meta.url));
let functionExec = null;
/**
* Local execSync implementation that doesn't pollute global namespace.
* Uses native cp.execSync if available (Node 0.12+), otherwise falls back
* to function-exec-sync polyfill.
*/ export default function execSync(cmd, options = {}) {
// Worker MUST always load from dist/cjs/ for old Node compatibility
const workerPath = path.join(__dirname, '..', '..', 'cjs', 'lib', 'worker.js');
let functionExec = null; // break dependencies
export default function execSync(cmd, options = {}) {
// Use native execSync if available (Node 0.12+)

@@ -18,8 +16,3 @@ if (typeof cp.execSync === 'function') {

}
// Polyfill for Node < 0.12 using function-exec-sync
if (!functionExec) {
functionExec = _require('function-exec-sync');
}
// Worker path is relative to dist/cjs/lib/ at runtime
const workerPath = path.join(__dirname, 'worker.js');
if (!functionExec) functionExec = _require('function-exec-sync');
return functionExec === null || functionExec === void 0 ? void 0 : functionExec({

@@ -26,0 +19,0 @@ callbacks: true

@@ -1,1 +0,1 @@

{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/cpu-arch/src/lib/execSync.ts"],"sourcesContent":["import cp from 'child_process';\nimport Module from 'module';\nimport path from 'path';\nimport url from 'url';\n\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\nconst __dirname = path.dirname(typeof __filename !== 'undefined' ? __filename : url.fileURLToPath(import.meta.url));\n\nlet functionExec: ((options: { callbacks: boolean }, workerPath: string, cmd: string, execOptions: { encoding?: BufferEncoding }) => string) | null = null;\n\n/**\n * Local execSync implementation that doesn't pollute global namespace.\n * Uses native cp.execSync if available (Node 0.12+), otherwise falls back\n * to function-exec-sync polyfill.\n */\nexport default function execSync(cmd: string, options: { encoding?: BufferEncoding } = {}): string {\n // Use native execSync if available (Node 0.12+)\n if (typeof cp.execSync === 'function') {\n return cp.execSync(cmd, options) as unknown as string;\n }\n\n // Polyfill for Node < 0.12 using function-exec-sync\n if (!functionExec) {\n functionExec = _require('function-exec-sync');\n }\n // Worker path is relative to dist/cjs/lib/ at runtime\n const workerPath = path.join(__dirname, 'worker.js');\n return functionExec?.({ callbacks: true }, workerPath, cmd, options);\n}\n"],"names":["cp","Module","path","url","_require","require","createRequire","__dirname","dirname","__filename","fileURLToPath","functionExec","execSync","cmd","options","workerPath","join","callbacks"],"mappings":"AAAA,OAAOA,QAAQ,gBAAgB;AAC/B,OAAOC,YAAY,SAAS;AAC5B,OAAOC,UAAU,OAAO;AACxB,OAAOC,SAAS,MAAM;AAEtB,MAAMC,WAAW,OAAOC,YAAY,cAAcJ,OAAOK,aAAa,CAAC,YAAYH,GAAG,IAAIE;AAC1F,MAAME,YAAYL,KAAKM,OAAO,CAAC,OAAOC,eAAe,cAAcA,aAAaN,IAAIO,aAAa,CAAC,YAAYP,GAAG;AAEjH,IAAIQ,eAAkJ;AAEtJ;;;;CAIC,GACD,eAAe,SAASC,SAASC,GAAW,EAAEC,UAAyC,CAAC,CAAC;IACvF,gDAAgD;IAChD,IAAI,OAAOd,GAAGY,QAAQ,KAAK,YAAY;QACrC,OAAOZ,GAAGY,QAAQ,CAACC,KAAKC;IAC1B;IAEA,oDAAoD;IACpD,IAAI,CAACH,cAAc;QACjBA,eAAeP,SAAS;IAC1B;IACA,sDAAsD;IACtD,MAAMW,aAAab,KAAKc,IAAI,CAACT,WAAW;IACxC,OAAOI,yBAAAA,mCAAAA,aAAe;QAAEM,WAAW;IAAK,GAAGF,YAAYF,KAAKC;AAC9D"}
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/cpu-arch/src/lib/execSync.ts"],"sourcesContent":["import cp from 'child_process';\nimport Module from 'module';\nimport path from 'path';\nimport url from 'url';\n\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\nconst __dirname = path.dirname(typeof __filename !== 'undefined' ? __filename : url.fileURLToPath(import.meta.url));\n\n// Worker MUST always load from dist/cjs/ for old Node compatibility\nconst workerPath = path.join(__dirname, '..', '..', 'cjs', 'lib', 'worker.js');\n\nlet functionExec = null; // break dependencies\nexport default function execSync(cmd: string, options: { encoding?: BufferEncoding } = {}): string {\n // Use native execSync if available (Node 0.12+)\n if (typeof cp.execSync === 'function') {\n return cp.execSync(cmd, options) as unknown as string;\n }\n\n if (!functionExec) functionExec = _require('function-exec-sync');\n return functionExec?.({ callbacks: true }, workerPath, cmd, options);\n}\n"],"names":["cp","Module","path","url","_require","require","createRequire","__dirname","dirname","__filename","fileURLToPath","workerPath","join","functionExec","execSync","cmd","options","callbacks"],"mappings":"AAAA,OAAOA,QAAQ,gBAAgB;AAC/B,OAAOC,YAAY,SAAS;AAC5B,OAAOC,UAAU,OAAO;AACxB,OAAOC,SAAS,MAAM;AAEtB,MAAMC,WAAW,OAAOC,YAAY,cAAcJ,OAAOK,aAAa,CAAC,YAAYH,GAAG,IAAIE;AAC1F,MAAME,YAAYL,KAAKM,OAAO,CAAC,OAAOC,eAAe,cAAcA,aAAaN,IAAIO,aAAa,CAAC,YAAYP,GAAG;AAEjH,oEAAoE;AACpE,MAAMQ,aAAaT,KAAKU,IAAI,CAACL,WAAW,MAAM,MAAM,OAAO,OAAO;AAElE,IAAIM,eAAe,MAAM,qBAAqB;AAC9C,eAAe,SAASC,SAASC,GAAW,EAAEC,UAAyC,CAAC,CAAC;IACvF,gDAAgD;IAChD,IAAI,OAAOhB,GAAGc,QAAQ,KAAK,YAAY;QACrC,OAAOd,GAAGc,QAAQ,CAACC,KAAKC;IAC1B;IAEA,IAAI,CAACH,cAAcA,eAAeT,SAAS;IAC3C,OAAOS,yBAAAA,mCAAAA,aAAe;QAAEI,WAAW;IAAK,GAAGN,YAAYI,KAAKC;AAC9D"}
{
"name": "cpu-arch",
"version": "1.0.5",
"version": "1.0.6",
"description": "Detect CPU architecture (handles WoW64, Rosetta 2, ARM64)",

@@ -53,3 +53,3 @@ "keywords": [

"dependencies": {
"function-exec-sync": "^1.5.1"
"function-exec-sync": "^1.5.2"
},

@@ -59,5 +59,5 @@ "devDependencies": {

"@types/node": "^25.0.1",
"node-version-use": "^2.1.3",
"node-version-use": "^2.1.5",
"ts-dev-stack": "^1.21.3",
"tsds-config": "^0.2.0"
"tsds-config": "^0.2.1"
},

@@ -64,0 +64,0 @@ "engines": {