diff --git a/Makefile b/Makefile index c48818e..e24d900 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ FLOW_BINS = \ flow-linux64-v$(FLOW_VERSION)/flow \ flow-linux-arm64-v$(FLOW_VERSION)/flow \ flow-osx-v$(FLOW_VERSION)/flow \ + flow-osx-arm64-v$(FLOW_VERSION)/flow \ flow-win64-v$(FLOW_VERSION)/flow.exe .PHONY: all @@ -66,6 +67,9 @@ flow-linux-arm64-v%/flow: flow-osx-v%/flow: $(get-flow) +flow-osx-arm64-v%/flow: + $(get-flow) + flow-win64-v%/flow.exe: $(get-flow) diff --git a/SHASUM256.txt b/SHASUM256.txt index d95a6c7..1633b45 100644 --- a/SHASUM256.txt +++ b/SHASUM256.txt @@ -1,4 +1,5 @@ 8be245e57445e7b3f7f8a4c7dfc8d06d2b493b1654f6cb2791af3a78d088828b flow-linux64-v0.206.0/flow 83854daff1a8911439314207bcba6fec5dbac80891186642b4ba2783340970d5 flow-linux-arm64-v0.206.0/flow 940b921b5b23e61c0af339623572f7e8f31de7123ff994c9b02b69a8329f31f3 flow-osx-v0.206.0/flow +f994baa69f16fc729eb990e2c80c87b9de39841fecf801ddf49f5dd232a15990 flow-osx-arm64-v0.206.0/flow 67cf09d2b7b9bddbb39d9d6264f6085952e7c836cb4e8b8733d46eede7cef858 flow-win64-v0.206.0/flow.exe diff --git a/index.js b/index.js index 51d6c44..7362dbf 100644 --- a/index.js +++ b/index.js @@ -10,8 +10,10 @@ var VERSION = require('./package.json').version; var path = require('path'); module.exports = - process.platform === 'darwin' + process.platform === 'darwin' && process.arch === 'x64' ? path.join(__dirname, 'flow-osx-v' + VERSION, 'flow') : + process.platform === 'darwin' && process.arch === 'arm64' + ? path.join(__dirname, 'flow-osx-arm64-v' + VERSION, 'flow') : process.platform === 'linux' && process.arch === 'x64' ? path.join(__dirname, 'flow-linux64-v' + VERSION, 'flow') : process.platform === 'linux' && process.arch === 'arm64' diff --git a/package.json b/package.json index ae6c9ff..453a58e 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "flow-linux64-v*/flow", "flow-linux-arm64-v*/flow", "flow-osx-v*/flow", + "flow-osx-arm64-v*/flow", "flow-win64-v*/flow.exe", "vendor", "cli.js", diff --git a/readme.md b/readme.md index 4b54367..3652602 100644 --- a/readme.md +++ b/readme.md @@ -2,7 +2,7 @@ > Binary wrapper for [Flow](https://flow.org) - A static type checker for JavaScript -macOS (x64), Linux (x64, arm64) and Windows (x64) binaries are currently [provided](https://flow.org/en/docs/install/). +macOS (x64, arm64), Linux (x64, arm64) and Windows (x64) binaries are currently [provided](https://flow.org/en/docs/install/). ## CLI diff --git a/test.js b/test.js index fa44a43..470b157 100755 --- a/test.js +++ b/test.js @@ -6,8 +6,15 @@ */ var fs = require('fs'); -// osx +// osx x64 process.platform = 'darwin'; +process.arch = 'x64' +delete require.cache[require.resolve('./')]; +fs.statSync(require('./')); + +// osx arm64 +process.platform = 'darwin'; +process.arch = 'arm64' delete require.cache[require.resolve('./')]; fs.statSync(require('./'));