Skip to content

Commit 5984462

Browse files
committed
Rename node-arch to architecture
1 parent aabe026 commit 5984462

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -91,21 +91,21 @@ jobs:
9191
- 10
9292
- 12
9393
- 14
94-
node_arch:
94+
architecture:
9595
- x64
9696
# an extra windows-x86 run:
9797
include:
9898
- os: windows-2016
9999
node_version: 12
100-
node_arch: x86
101-
name: Node ${{ matrix.node_version }} - ${{ matrix.node_arch }} on ${{ matrix.os }}
100+
architecture: x86
101+
name: Node ${{ matrix.node_version }} - ${{ matrix.architecture }} on ${{ matrix.os }}
102102
steps:
103103
- uses: actions/checkout@v2
104104
- name: Setup node
105105
uses: actions/setup-node@v1
106106
with:
107107
node-version: ${{ matrix.node_version }}
108-
node-arch: ${{ matrix.node_arch }}
108+
architecture: ${{ matrix.architecture }}
109109
- run: npm install
110110
- run: npm test
111111
```

__tests__/installer.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ describe('setup-node', () => {
356356
}[os.platform];
357357

358358
inputs['node-version'] = version;
359-
inputs['node-arch'] = arch;
359+
inputs['architecture'] = arch;
360360
inputs['always-auth'] = false;
361361
inputs['token'] = 'faketoken';
362362

action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ inputs:
77
default: 'false'
88
node-version:
99
description: 'Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0'
10-
node-arch:
10+
architecture:
1111
description: 'Target architecture for Node to use. Examples: x86, x64. Will use system architecture by default.'
1212
check-latest:
1313
description: 'Set this option if you want the action to check for the latest available version that satisfies the version spec'

dist/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -4706,11 +4706,11 @@ function run() {
47064706
if (!version) {
47074707
version = core.getInput('version');
47084708
}
4709-
let arch = core.getInput('node-arch');
4710-
// if node-arch supplied but node-version is not
4709+
let arch = core.getInput('architecture');
4710+
// if architecture supplied but node-version is not
47114711
// if we don't throw a warning, the already installed x64 node will be used which is not probably what user meant.
47124712
if (arch && !version) {
4713-
core.warning('`node-arch` is provided but `node-version` is missing. This results in using an already installed x64 node which is not probably what you meant. To fix this, provide `node-arch` in combination with `node-version`');
4713+
core.warning('`architecture` is provided but `node-version` is missing. This results in using an already installed x64 node which is not probably what you meant. To fix this, provide `architecture` in combination with `node-version`');
47144714
}
47154715
if (!arch) {
47164716
arch = os.arch();

src/main.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ export async function run() {
1616
version = core.getInput('version');
1717
}
1818

19-
let arch = core.getInput('node-arch');
19+
let arch = core.getInput('architecture');
2020

21-
// if node-arch supplied but node-version is not
21+
// if architecture supplied but node-version is not
2222
// if we don't throw a warning, the already installed x64 node will be used which is not probably what user meant.
2323
if (arch && !version) {
2424
core.warning(
25-
'`node-arch` is provided but `node-version` is missing. This results in using an already installed x64 node which is not probably what you meant. To fix this, provide `node-arch` in combination with `node-version`'
25+
'`architecture` is provided but `node-version` is missing. This results in using an already installed x64 node which is not probably what you meant. To fix this, provide `architecture` in combination with `node-version`'
2626
);
2727
}
2828

0 commit comments

Comments
 (0)