We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7727ee3 commit ba809d6Copy full SHA for ba809d6
internal/node/target_darwin.go
@@ -3,6 +3,8 @@ package node
3
import (
4
"fmt"
5
"runtime"
6
+
7
+ "github.com/Masterminds/semver"
8
)
9
10
func GetRemoteArtifactTarget(version string) *RemoteArtifactTarget {
@@ -27,6 +29,13 @@ func getNodeFileName(version string) *string {
27
29
28
30
return &str
31
} else if runtime.GOARCH == "arm64" {
32
+ // Node.js 16.0.0 and later versions have official support for Apple Silicon
33
+ // https://nodejs.org/en/blog/release/v16.0.0/
34
+ if c, err := semver.NewConstraint("< 16.0.0"); err == nil && c.Check(semver.MustParse(version)) {
35
+ str := fmt.Sprintf("node-v%s-darwin-x64", version)
36
+ return &str
37
+ }
38
39
str := fmt.Sprintf("node-v%s-darwin-arm64", version)
40
41
0 commit comments