28 Commits

Author SHA1 Message Date
David Gamero
e2ceabf570 remove --no-bin-links flag 2025-06-18 18:54:21 +00:00
David Gamero
f200035467 test with no bin links 2025-06-18 18:48:45 +00:00
David Gamero
3e6c6c37c6 upgrade failing deps 2025-06-18 18:14:33 +00:00
David Gamero
d2d46d801e 4.0.1 fix v prefix (#167) 2025-06-18 13:57:02 -04:00
dependabot[bot]
2ec05092d4 Bump github/codeql-action in /.github/workflows in the actions group (#164) 2025-06-17 15:12:52 -04:00
Tatsinnit
8ee333116b Fix the major update packages including Jest. (#166)
Signed-off-by: Tatsat Mishra <tamishra@microsoft.com>
2025-06-17 15:10:19 -04:00
dependabot[bot]
857b11c18c Bump github/codeql-action in /.github/workflows in the actions group (#163) 2025-06-10 15:06:03 -04:00
dependabot[bot]
fa3df0f1e2 Bump @types/node from 22.15.21 to 22.15.29 in the actions group (#161) 2025-06-03 10:25:59 -04:00
dependabot[bot]
4d5f3eda74 Bump @types/node from 22.15.19 to 22.15.21 in the actions group (#160) 2025-05-27 12:04:22 -07:00
dependabot[bot]
393d232f65 Bump github/codeql-action in /.github/workflows in the actions group (#158) 2025-05-20 15:13:31 -04:00
dependabot[bot]
a0d66424c8 Bump the actions group with 2 updates (#159) 2025-05-20 15:13:20 -04:00
dependabot[bot]
a76651a0e0 Bump @types/node from 22.15.3 to 22.15.17 in the actions group (#157) 2025-05-13 15:08:34 -04:00
dependabot[bot]
cf5fdd749b Bump github/codeql-action in /.github/workflows in the actions group (#156) 2025-05-06 15:05:05 -04:00
dependabot[bot]
de1d5ec5de Bump @types/node from 22.14.1 to 22.15.3 in the actions group (#154) 2025-04-29 15:10:58 -04:00
dependabot[bot]
e6e81bbc41 Bump the actions group in /.github/workflows with 2 updates (#155) 2025-04-29 15:10:37 -04:00
dependabot[bot]
30d747582d Bump the actions group with 2 updates (#152) 2025-04-15 15:07:41 -04:00
dependabot[bot]
f4440b5470 Bump the actions group in /.github/workflows with 2 updates (#153) 2025-04-15 15:07:21 -04:00
dependabot[bot]
0fd96d6276 Bump the actions group with 3 updates (#150) 2025-04-08 15:06:25 -04:00
dependabot[bot]
4ef821e7ca Bump github/codeql-action in /.github/workflows in the actions group (#151) 2025-04-08 15:05:58 -04:00
dependabot[bot]
95e0936d6e Bump @types/node from 22.13.12 to 22.13.14 in the actions group (#148) 2025-04-01 15:07:10 -04:00
dependabot[bot]
87e53e3f71 Bump the actions group in /.github/workflows with 2 updates (#149)
Bumps the actions group in /.github/workflows with 2 updates: [github/codeql-action](https://github.com/github/codeql-action) and [actions/setup-python](https://github.com/actions/setup-python).


Updates `github/codeql-action` from 3.28.12 to 3.28.13
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](5f8171a638...1b549b9259)

Updates `actions/setup-python` from 5.4.0 to 5.5.0
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](42375524e2...8d9ed9ac5c)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-01 15:06:48 -04:00
dependabot[bot]
13bef3ca00 Bump the actions group across 1 directory with 2 updates (#147)
Bumps the actions group with 2 updates in the /.github/workflows directory: [github/codeql-action](https://github.com/github/codeql-action) and [actions/setup-node](https://github.com/actions/setup-node).


Updates `github/codeql-action` from 3.28.11 to 3.28.12
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](6bb031afdd...5f8171a638)

Updates `actions/setup-node` from 4.2.0 to 4.3.0
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](1d0ff469b7...cdca7365b2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-26 08:11:07 +13:00
dependabot[bot]
023f859e5d Bump the actions group with 2 updates (#146) 2025-03-26 08:10:51 +13:00
dependabot[bot]
6bd1f0daf1 Bump the actions group across 1 directory with 4 updates (#143)
Bumps the actions group with 4 updates in the / directory: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [prettier](https://github.com/prettier/prettier), [ts-jest](https://github.com/kulshekhar/ts-jest) and [typescript](https://github.com/microsoft/TypeScript).


Updates `@types/node` from 22.13.1 to 22.13.10
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `prettier` from 3.5.0 to 3.5.3
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.5.0...3.5.3)

Updates `ts-jest` from 29.2.5 to 29.2.6
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v29.2.5...v29.2.6)

Updates `typescript` from 5.7.3 to 5.8.2
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.7.3...v5.8.2)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-13 14:20:16 -04:00
dependabot[bot]
574933e749 Bump github/codeql-action (#144)
Bumps the actions group with 1 update in the /.github/workflows directory: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 3.28.9 to 3.28.11
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](9e8d0789d4...6bb031afdd)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-13 14:19:24 -04:00
dependabot[bot]
46ce001b45 Bump braces, jest and ts-jest (#103) 2025-02-19 20:50:54 -08:00
dependabot[bot]
f7a3237edf Bump the actions group across 1 directory with 2 updates (#135)
Bumps the actions group with 2 updates in the / directory: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [prettier](https://github.com/prettier/prettier).


Updates `@types/node` from 22.10.10 to 22.13.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `prettier` from 3.4.2 to 3.5.0
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.4.2...3.5.0)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-12 12:11:31 -08:00
dependabot[bot]
9c31f8cc61 Bump github/codeql-action in /.github/workflows in the actions group (#136)
Bumps the actions group in /.github/workflows with 1 update: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 3.28.6 to 3.28.9
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](17a820bf2e...9e8d0789d4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-12 12:11:05 -08:00
9 changed files with 3340 additions and 8464 deletions

View File

@@ -59,7 +59,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@17a820bf2e43b47be2c72b39cc905417bc1ab6d0 # v3.28.6
uses: github/codeql-action/init@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
@@ -86,6 +86,6 @@ jobs:
echo ' make release'
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@17a820bf2e43b47be2c72b39cc905417bc1ab6d0 # v3.28.6
uses: github/codeql-action/analyze@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
with:
category: '/language:${{matrix.language}}'

View File

@@ -27,9 +27,11 @@ jobs:
if [[ $PR_BASE_REF != releases/* ]]; then
npm install
npm run build
# remove node_modules to match production environment where only index.js is present
rm -rf node_modules
fi
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
name: Install Python
with:
python-version: '3.x'

View File

@@ -13,7 +13,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Node.js
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 'lts/*'
cache: 'npm'

1
.gitignore vendored
View File

@@ -330,3 +330,4 @@ ASALocalRun/
node_modules
# Transpiled JS
lib/

View File

@@ -1,6 +1,11 @@
# Changelog
## [v4.0.0] - 2024-01-30
## [4.0.1] - 2025-06-17
- Remove erronious 'v' prefix on previous changelog for v4.0.0 that led to "vv4.0.0" tag issue
- Dependabot fixes
## [4.0.0] - 2024-01-30
### Changed

File diff suppressed because it is too large Load Diff

5453
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -20,16 +20,15 @@
"dependencies": {
"@actions/core": "^1.11.1",
"@actions/exec": "^1.0.0",
"@actions/tool-cache": "^2.0.2",
"ncc": "^0.3.6"
"@actions/tool-cache": "^2.0.2"
},
"devDependencies": {
"@types/jest": "^29.5.14",
"@types/node": "^22.10.10",
"@types/jest": "^30.0.0",
"@types/node": "^24.0.2",
"@vercel/ncc": "^0.38.3",
"jest": "^29.7.0",
"prettier": "3.4.2",
"ts-jest": "^29.2.5",
"typescript": "5.7.3"
"jest": "^30.0.0",
"prettier": "3.5.3",
"ts-jest": "^29.4.0",
"typescript": "5.8.3"
}
}

View File

@@ -15,12 +15,12 @@ describe('Testing all functions in run file.', () => {
test('getExecutableExtension() - return .exe when os is Windows', () => {
jest.spyOn(os, 'type').mockReturnValue('Windows_NT')
expect(getExecutableExtension()).toBe('.exe')
expect(os.type).toBeCalled()
expect(os.type).toHaveBeenCalled()
})
test('getExecutableExtension() - return empty string for non-windows OS', () => {
jest.spyOn(os, 'type').mockReturnValue('Darwin')
expect(getExecutableExtension()).toBe('')
expect(os.type).toBeCalled()
expect(os.type).toHaveBeenCalled()
})
test.each([
['arm', 'arm'],
@@ -29,9 +29,9 @@ describe('Testing all functions in run file.', () => {
])(
'getKubectlArch() - return on %s os arch %s kubectl arch',
(osArch, kubectlArch) => {
jest.spyOn(os, 'arch').mockReturnValue(osArch)
jest.spyOn(os, 'arch').mockReturnValue(osArch as NodeJS.Architecture)
expect(getKubectlArch()).toBe(kubectlArch)
expect(os.arch).toBeCalled()
expect(os.arch).toHaveBeenCalled()
}
)
test.each([['arm'], ['arm64'], ['amd64']])(
@@ -43,7 +43,7 @@ describe('Testing all functions in run file.', () => {
arch
)
expect(getkubectlDownloadURL('v1.15.0', arch)).toBe(kubectlLinuxUrl)
expect(os.type).toBeCalled()
expect(os.type).toHaveBeenCalled()
}
)
test.each([['arm'], ['arm64'], ['amd64']])(
@@ -55,7 +55,7 @@ describe('Testing all functions in run file.', () => {
arch
)
expect(getkubectlDownloadURL('v1.15.0', arch)).toBe(kubectlDarwinUrl)
expect(os.type).toBeCalled()
expect(os.type).toHaveBeenCalled()
}
)
test.each([['arm'], ['arm64'], ['amd64']])(
@@ -67,7 +67,7 @@ describe('Testing all functions in run file.', () => {
arch
)
expect(getkubectlDownloadURL('v1.15.0', arch)).toBe(kubectlWindowsUrl)
expect(os.type).toBeCalled()
expect(os.type).toHaveBeenCalled()
}
)
test('getStableKubectlVersion() - download stable version file, read version and return it', async () => {
@@ -76,7 +76,7 @@ describe('Testing all functions in run file.', () => {
.mockReturnValue(Promise.resolve('pathToTool'))
jest.spyOn(fs, 'readFileSync').mockReturnValue('v1.20.4')
expect(await run.getStableKubectlVersion()).toBe('v1.20.4')
expect(toolCache.downloadTool).toBeCalled()
expect(toolCache.downloadTool).toHaveBeenCalled()
expect(fs.readFileSync).toHaveBeenCalledWith('pathToTool', 'utf8')
})
test('getStableKubectlVersion() - return default v1.15.0 if version read is empty', async () => {
@@ -85,7 +85,7 @@ describe('Testing all functions in run file.', () => {
.mockReturnValue(Promise.resolve('pathToTool'))
jest.spyOn(fs, 'readFileSync').mockReturnValue('')
expect(await run.getStableKubectlVersion()).toBe('v1.15.0')
expect(toolCache.downloadTool).toBeCalled()
expect(toolCache.downloadTool).toHaveBeenCalled()
expect(fs.readFileSync).toHaveBeenCalledWith('pathToTool', 'utf8')
})
test('getStableKubectlVersion() - return default v1.15.0 if unable to download file', async () => {
@@ -93,7 +93,7 @@ describe('Testing all functions in run file.', () => {
.spyOn(toolCache, 'downloadTool')
.mockRejectedValue('Unable to download.')
expect(await run.getStableKubectlVersion()).toBe('v1.15.0')
expect(toolCache.downloadTool).toBeCalled()
expect(toolCache.downloadTool).toHaveBeenCalled()
})
test('downloadKubectl() - download kubectl, add it to toolCache and return path to it', async () => {
jest.spyOn(toolCache, 'find').mockReturnValue('')
@@ -109,9 +109,9 @@ describe('Testing all functions in run file.', () => {
path.join('pathToCachedTool', 'kubectl.exe')
)
expect(toolCache.find).toHaveBeenCalledWith('kubectl', 'v1.15.0')
expect(toolCache.downloadTool).toBeCalled()
expect(toolCache.cacheFile).toBeCalled()
expect(os.type).toBeCalled()
expect(toolCache.downloadTool).toHaveBeenCalled()
expect(toolCache.cacheFile).toHaveBeenCalled()
expect(os.type).toHaveBeenCalled()
expect(fs.chmodSync).toHaveBeenCalledWith(
path.join('pathToCachedTool', 'kubectl.exe'),
'775'
@@ -126,12 +126,12 @@ describe('Testing all functions in run file.', () => {
'DownloadKubectlFailed'
)
expect(toolCache.find).toHaveBeenCalledWith('kubectl', 'v1.15.0')
expect(toolCache.downloadTool).toBeCalled()
expect(toolCache.downloadTool).toHaveBeenCalled()
})
test('downloadKubectl() - throw kubectl not found error when receive 404 response', async () => {
const kubectlVersion = 'v1.15.0'
const arch = 'arm128'
jest.spyOn(os, 'arch').mockReturnValue(arch)
jest.spyOn(os, 'arch').mockReturnValue(arch as any)
jest.spyOn(toolCache, 'find').mockReturnValue('')
jest.spyOn(toolCache, 'downloadTool').mockImplementation((_) => {
throw new toolCache.HTTPError(404)
@@ -143,9 +143,9 @@ describe('Testing all functions in run file.', () => {
arch
)
)
expect(os.arch).toBeCalled()
expect(os.arch).toHaveBeenCalled()
expect(toolCache.find).toHaveBeenCalledWith('kubectl', kubectlVersion)
expect(toolCache.downloadTool).toBeCalled()
expect(toolCache.downloadTool).toHaveBeenCalled()
})
test('downloadKubectl() - return path to existing cache of kubectl', async () => {
jest.spyOn(core, 'getInput').mockImplementation(() => 'v1.15.5')
@@ -157,12 +157,12 @@ describe('Testing all functions in run file.', () => {
path.join('pathToCachedTool', 'kubectl.exe')
)
expect(toolCache.find).toHaveBeenCalledWith('kubectl', 'v1.15.0')
expect(os.type).toBeCalled()
expect(os.type).toHaveBeenCalled()
expect(fs.chmodSync).toHaveBeenCalledWith(
path.join('pathToCachedTool', 'kubectl.exe'),
'775'
)
expect(toolCache.downloadTool).not.toBeCalled()
expect(toolCache.downloadTool).not.toHaveBeenCalled()
})
test('run() - download specified version and set output', async () => {
jest.spyOn(core, 'getInput').mockReturnValue('v1.15.5')