Skip to content

Commit 327356b

Browse files
mhdawsoncanerakdasrichardlauovflowd
authored
Add missing os from website redesign (#6575)
* Add missing os from website redesign Refs: #6479 Adds back the ability to download Node.js binaries for AIX Signed-off-by: Michael Dawson <[email protected]> * Update components/Downloads/Release/BitnessDropdown.tsx Co-authored-by: Caner Akdas <[email protected]> Signed-off-by: Michael Dawson <[email protected]> * Update util/detectOS.ts Co-authored-by: Richard Lau <[email protected]> Signed-off-by: Michael Dawson <[email protected]> * Update util/downloadUtils.ts Co-authored-by: Richard Lau <[email protected]> Signed-off-by: Michael Dawson <[email protected]> * chore: fixed prettier --------- Signed-off-by: Michael Dawson <[email protected]> Signed-off-by: Michael Dawson <[email protected]> Co-authored-by: Caner Akdas <[email protected]> Co-authored-by: Richard Lau <[email protected]> Co-authored-by: Claudio Wunder <[email protected]>
1 parent b36f123 commit 327356b

File tree

10 files changed

+31
-5
lines changed

10 files changed

+31
-5
lines changed

components/Downloads/Release/BitnessDropdown.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ const BitnessDropdown: FC = () => {
5252
disabledItems.push('s390x');
5353
}
5454

55+
if (os === 'AIX' && semVer.satisfies(release.version, '< 6.7.0')) {
56+
disabledItems.push('ppc64');
57+
}
58+
5559
return disabledItems;
5660
}, [os, release.version]);
5761

components/Downloads/Release/OperatingSystemDropdown.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import type { FC } from 'react';
66

77
import Select from '@/components/Common/Select';
88
import Apple from '@/components/Icons/Platform/Apple';
9+
import Aix from '@/components/Icons/Platform/Generic';
910
import Linux from '@/components/Icons/Platform/Linux';
1011
import Microsoft from '@/components/Icons/Platform/Microsoft';
1112
import { useDetectOS } from '@/hooks/react-client';
@@ -75,6 +76,7 @@ const OperatingSystemDropdown: FC<OperatingSystemDropdownProps> = ({
7576
WIN: <Microsoft width={16} height={16} />,
7677
MAC: <Apple width={16} height={16} />,
7778
LINUX: <Linux width={16} height={16} />,
79+
AIX: <Aix width={16} height={16} />,
7880
},
7981
})}
8082
defaultValue={os}

pages/en/download/current.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ subtitle: Download Node.js the way you want.
55
---
66

77
<section>
8-
I want the <Release.VersionDropdown /> version of Node.js for <Release.OperatingSystemDropdown exclude={["LINUX"]} /> running <Release.BitnessDropdown />
8+
I want the <Release.VersionDropdown /> version of Node.js for <Release.OperatingSystemDropdown exclude={["LINUX", "AIX"]} /> running <Release.BitnessDropdown />
99

1010
<Release.DownloadButton kind={"installer"} />
1111
</section>

pages/en/download/index.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ subtitle: Download Node.js the way you want.
55
---
66

77
<section>
8-
I want the <Release.VersionDropdown /> version of Node.js for <Release.OperatingSystemDropdown exclude={["LINUX"]} /> running <Release.BitnessDropdown />
8+
I want the <Release.VersionDropdown /> version of Node.js for <Release.OperatingSystemDropdown exclude={["LINUX", "AIX"]} /> running <Release.BitnessDropdown />
99

1010
<Release.DownloadButton kind={"installer"} />
1111
</section>

pages/en/download/package-manager/current.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ subtitle: Download Node.js the way you want.
55
---
66

77
<section>
8-
Install Node.js <Release.VersionDropdown /> on <Release.OperatingSystemDropdown /> using <Release.PlatformDropdown />
8+
Install Node.js <Release.VersionDropdown /> on <Release.OperatingSystemDropdown exclude={["AIX"]} /> using <Release.PlatformDropdown />
99

1010
<Release.ReleaseCodeBox />
1111
</section>

pages/en/download/package-manager/index.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ subtitle: Download Node.js the way you want.
55
---
66

77
<section>
8-
Install Node.js <Release.VersionDropdown /> on <Release.OperatingSystemDropdown /> using <Release.PlatformDropdown />
8+
Install Node.js <Release.VersionDropdown /> on <Release.OperatingSystemDropdown exclude={["AIX"]} /> using <Release.PlatformDropdown />
99

1010
<Release.ReleaseCodeBox />
1111
</section>

types/userOS.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export type UserOS = 'MAC' | 'WIN' | 'LINUX' | 'OTHER' | 'LOADING';
1+
export type UserOS = 'MAC' | 'WIN' | 'LINUX' | 'AIX' | 'OTHER' | 'LOADING';

util/detectOS.ts

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ export const detectOsInUserAgent = (userAgent: string | undefined): UserOS => {
99
return 'MAC';
1010
case 'Linux':
1111
return 'LINUX';
12+
case 'AIX':
13+
return 'AIX';
1214
default:
1315
return 'OTHER';
1416
}

util/downloadUtils.ts

+11
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export enum OperatingSystem {
66
WIN = 'Windows',
77
MAC = 'macOS',
88
LINUX = 'Linux',
9+
AIX = 'AIX',
910
OTHER = 'Other',
1011
}
1112

@@ -22,6 +23,10 @@ export const operatingSystemItems = [
2223
label: OperatingSystem.LINUX,
2324
value: 'LINUX' as UserOS,
2425
},
26+
{
27+
label: OperatingSystem.AIX,
28+
value: 'AIX' as UserOS,
29+
},
2530
];
2631

2732
export const platformItems = [
@@ -90,6 +95,12 @@ export const bitnessItems = {
9095
value: 's390x',
9196
},
9297
],
98+
AIX: [
99+
{
100+
label: 'Power',
101+
value: 'ppc64',
102+
},
103+
],
93104
OTHER: [],
94105
LOADING: [],
95106
};

util/getNodeDownloadUrl.ts

+7
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ export const getNodeDownloadUrl = (
5959
// Since the x86 platform is not officially supported, returns the x64
6060
// link as the default value.
6161
return `${baseURL}/node-${versionWithPrefix}-linux-x64.tar.xz`;
62+
case 'AIX':
63+
// Prepares a downloadable Node.js link for AIX
64+
if (typeof bitness === 'string') {
65+
return `${baseURL}/node-${versionWithPrefix}-aix-${bitness}.tar.gz`;
66+
}
67+
68+
return `${baseURL}/node-${versionWithPrefix}-aix-ppc64.tar.gz`;
6269
default:
6370
// Prepares a downloadable Node.js source code link
6471
return `${baseURL}/node-${versionWithPrefix}.tar.gz`;

0 commit comments

Comments
 (0)