mirror of
https://github.com/Azure/setup-helm.git
synced 2025-07-14 17:50:34 +00:00
Fix types, and update node version. (#181)
* Fix types, and update node version. Signed-off-by: Tatsat Mishra <tamishra@microsoft.com> * Prettier Fix for this repo. Signed-off-by: Tatsat Mishra <tamishra@microsoft.com> --------- Signed-off-by: Tatsat Mishra <tamishra@microsoft.com>
This commit is contained in:
4
.github/workflows/prettify-code.yml
vendored
4
.github/workflows/prettify-code.yml
vendored
@ -13,6 +13,4 @@ jobs:
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: Enforce Prettier
|
||||
uses: actionsx/prettier@3d9f7c3fa44c9cb819e68292a328d7f4384be206 # v3
|
||||
with:
|
||||
args: --check .
|
||||
run: npx prettier --check .
|
||||
|
12
CHANGELOG.md
12
CHANGELOG.md
@ -2,18 +2,18 @@
|
||||
|
||||
## [4.3.0] - 2025-02-15
|
||||
|
||||
- #152 feat: log when restoring from cache
|
||||
- #157 Dependencies Update
|
||||
- #137 Add dependabot
|
||||
- #152 feat: log when restoring from cache
|
||||
- #157 Dependencies Update
|
||||
- #137 Add dependabot
|
||||
|
||||
## [4.2.0] - 2024-04-15
|
||||
|
||||
- #124 Fix OS detection and download OS-native archive extension
|
||||
- #124 Fix OS detection and download OS-native archive extension
|
||||
|
||||
## [4.1.0] - 2024-03-01
|
||||
|
||||
- #130 switches to use Helm published file to read latest version instead of using GitHub releases
|
||||
- #130 switches to use Helm published file to read latest version instead of using GitHub releases
|
||||
|
||||
## [4.0.0] - 2024-02-12
|
||||
|
||||
- #121 update to node20 as node16 is deprecated
|
||||
- #121 update to node20 as node16 is deprecated
|
||||
|
@ -4,6 +4,6 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope
|
||||
|
||||
Resources:
|
||||
|
||||
- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
|
||||
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
|
||||
- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns
|
||||
- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
|
||||
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
|
||||
- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns
|
||||
|
14
SECURITY.md
14
SECURITY.md
@ -18,13 +18,13 @@ You should receive a response within 24 hours. If for some reason you do not, pl
|
||||
|
||||
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
|
||||
|
||||
- Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
|
||||
- Full paths of source file(s) related to the manifestation of the issue
|
||||
- The location of the affected source code (tag/branch/commit or direct URL)
|
||||
- Any special configuration required to reproduce the issue
|
||||
- Step-by-step instructions to reproduce the issue
|
||||
- Proof-of-concept or exploit code (if possible)
|
||||
- Impact of the issue, including how an attacker might exploit the issue
|
||||
- Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
|
||||
- Full paths of source file(s) related to the manifestation of the issue
|
||||
- The location of the affected source code (tag/branch/commit or direct URL)
|
||||
- Any special configuration required to reproduce the issue
|
||||
- Step-by-step instructions to reproduce the issue
|
||||
- Proof-of-concept or exploit code (if possible)
|
||||
- Impact of the issue, including how an attacker might exploit the issue
|
||||
|
||||
This information will help us triage your report more quickly.
|
||||
|
||||
|
@ -99,20 +99,20 @@ describe('run.ts', () => {
|
||||
jest.spyOn(fs, 'readdirSync').mockImplementation((file, _) => {
|
||||
if (file == 'mainFolder')
|
||||
return [
|
||||
'file1' as unknown as fs.Dirent,
|
||||
'file2' as unknown as fs.Dirent,
|
||||
'folder1' as unknown as fs.Dirent,
|
||||
'folder2' as unknown as fs.Dirent
|
||||
'file1' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
|
||||
'file2' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
|
||||
'folder1' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
|
||||
'folder2' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>
|
||||
]
|
||||
if (file == path.join('mainFolder', 'folder1'))
|
||||
return [
|
||||
'file11' as unknown as fs.Dirent,
|
||||
'file12' as unknown as fs.Dirent
|
||||
'file11' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
|
||||
'file12' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>
|
||||
]
|
||||
if (file == path.join('mainFolder', 'folder2'))
|
||||
return [
|
||||
'file21' as unknown as fs.Dirent,
|
||||
'file22' as unknown as fs.Dirent
|
||||
'file21' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
|
||||
'file22' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>
|
||||
]
|
||||
return []
|
||||
})
|
||||
@ -134,20 +134,20 @@ describe('run.ts', () => {
|
||||
jest.spyOn(fs, 'readdirSync').mockImplementation((file, _) => {
|
||||
if (file == 'mainFolder')
|
||||
return [
|
||||
'file1' as unknown as fs.Dirent,
|
||||
'file2' as unknown as fs.Dirent,
|
||||
'folder1' as unknown as fs.Dirent,
|
||||
'folder2' as unknown as fs.Dirent
|
||||
'file1' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
|
||||
'file2' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
|
||||
'folder1' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
|
||||
'folder2' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>
|
||||
]
|
||||
if (file == path.join('mainFolder', 'folder1'))
|
||||
return [
|
||||
'file11' as unknown as fs.Dirent,
|
||||
'file12' as unknown as fs.Dirent
|
||||
'file11' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
|
||||
'file12' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>
|
||||
]
|
||||
if (file == path.join('mainFolder', 'folder2'))
|
||||
return [
|
||||
'file21' as unknown as fs.Dirent,
|
||||
'file22' as unknown as fs.Dirent
|
||||
'file21' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
|
||||
'file22' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>
|
||||
]
|
||||
return []
|
||||
})
|
||||
@ -166,7 +166,8 @@ describe('run.ts', () => {
|
||||
test('findHelm() - change access permissions and find the helm in given directory', () => {
|
||||
jest.spyOn(fs, 'chmodSync').mockImplementation(() => {})
|
||||
jest.spyOn(fs, 'readdirSync').mockImplementation((file, _) => {
|
||||
if (file == 'mainFolder') return ['helm.exe' as unknown as fs.Dirent]
|
||||
if (file == 'mainFolder')
|
||||
return ['helm.exe' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>]
|
||||
return []
|
||||
})
|
||||
jest.spyOn(fs, 'statSync').mockImplementation((file) => {
|
||||
@ -208,7 +209,9 @@ describe('run.ts', () => {
|
||||
jest.spyOn(toolCache, 'cacheDir').mockResolvedValue('pathToCachedDir')
|
||||
jest
|
||||
.spyOn(fs, 'readdirSync')
|
||||
.mockImplementation((file, _) => ['helm.exe' as unknown as fs.Dirent])
|
||||
.mockImplementation((file, _) => [
|
||||
'helm.exe' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>
|
||||
])
|
||||
jest.spyOn(fs, 'statSync').mockImplementation((file) => {
|
||||
const isDirectory =
|
||||
(file as string).indexOf('folder') == -1 ? false : true
|
||||
@ -254,7 +257,9 @@ describe('run.ts', () => {
|
||||
jest.spyOn(fs, 'chmodSync').mockImplementation(() => {})
|
||||
jest
|
||||
.spyOn(fs, 'readdirSync')
|
||||
.mockReturnValue(['helm.exe' as unknown as fs.Dirent])
|
||||
.mockReturnValue([
|
||||
'helm.exe' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>
|
||||
])
|
||||
jest.spyOn(fs, 'statSync').mockImplementation((file) => {
|
||||
const isDirectory =
|
||||
(file as string).indexOf('folder') == -1 ? false : true
|
||||
|
Reference in New Issue
Block a user