Socket
Socket
Sign inDemoInstall

arch

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arch - npm Package Compare versions

Comparing version 2.2.0 to 3.0.0

.github/dependabot.yml

1

browser.js

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

/*! arch. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
module.exports = function arch () {

@@ -2,0 +3,0 @@ /**

3

index.d.ts

@@ -0,4 +1,3 @@

declare function arch(): 'x64' | 'x86' | 'arm64';
declare function arch(): 'x64' | 'x86';
export = arch;

@@ -20,6 +20,11 @@ /*! arch. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */

/**
* All recent versions of Mac OS are 64-bit.
* On macOS, we need to detect if x64 Node is running because the CPU is truly
* an Intel chip, or if it's running on Apple Silicon via Rosetta 2:
* https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment
*/
if (process.platform === 'darwin') {
return 'x64'
var nativeArm = process.arch === 'arm64'
var rosettaArm = cp.execSync('sysctl -in sysctl.proc_translated', { encoding: 'utf8' }) === '1\n'
return (nativeArm || rosettaArm) ? 'arm64' : 'x64'
}

@@ -26,0 +31,0 @@

{
"name": "arch",
"description": "Better `os.arch()` for node and the browser -- detect OS architecture",
"version": "2.2.0",
"version": "3.0.0",
"author": {

@@ -42,4 +42,4 @@ "name": "Feross Aboukhadijeh",

"test": "standard && npm run test-node && npm run test-browser",
"test-browser": "airtap -- test/*.js",
"test-browser-local": "airtap --local -- test/*.js",
"test-browser": "airtap --concurrency 1 -- test/*.js",
"test-browser-local": "airtap --preset local -- test/*.js",
"test-node": "tape test/*.js"

@@ -46,0 +46,0 @@ },

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

# arch [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]
# arch [![ci][ci-image]][ci-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]
[travis-image]: https://img.shields.io/travis/feross/arch/master.svg
[travis-url]: https://travis-ci.org/feross/arch
[ci-image]: https://img.shields.io/github/workflow/status/feross/arch/ci/master
[ci-url]: https://github.com/feross/arch/actions
[npm-image]: https://img.shields.io/npm/v/arch.svg

@@ -6,0 +6,0 @@ [npm-url]: https://npmjs.org/package/arch

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc