mirror of
https://github.com/Azure/setup-helm.git
synced 2025-11-07 13:06:56 +00:00
Fix types, and update node version.
Signed-off-by: Tatsat Mishra <tamishra@microsoft.com>
This commit is contained in:
parent
05502a08f2
commit
fc282b5411
3 changed files with 24 additions and 24 deletions
8
package-lock.json
generated
8
package-lock.json
generated
|
|
@ -18,7 +18,7 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^29.5.14",
|
"@types/jest": "^29.5.14",
|
||||||
"@types/node": "^22.15.3",
|
"@types/node": "^22.15.17",
|
||||||
"@vercel/ncc": "^0.38.3",
|
"@vercel/ncc": "^0.38.3",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"prettier": "^3.5.3",
|
"prettier": "^3.5.3",
|
||||||
|
|
@ -1365,9 +1365,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "22.15.3",
|
"version": "22.15.17",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.3.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.17.tgz",
|
||||||
"integrity": "sha512-lX7HFZeHf4QG/J7tBZqrCAXwz9J5RD56Y6MpP0eJkka8p+K0RY/yBTW7CYFJ4VGCclxqOLKmiGP5juQc6MKgcw==",
|
"integrity": "sha512-wIX2aSZL5FE+MR0JlvF87BNVrtFWf6AE6rxSE9X7OwnVvoyCQjpzSRJ+M87se/4QCkCiebQAqrJ0y6fwIyi7nw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^29.5.14",
|
"@types/jest": "^29.5.14",
|
||||||
"@types/node": "^22.15.3",
|
"@types/node": "^22.15.17",
|
||||||
"@vercel/ncc": "^0.38.3",
|
"@vercel/ncc": "^0.38.3",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"prettier": "^3.5.3",
|
"prettier": "^3.5.3",
|
||||||
|
|
|
||||||
|
|
@ -99,20 +99,20 @@ describe('run.ts', () => {
|
||||||
jest.spyOn(fs, 'readdirSync').mockImplementation((file, _) => {
|
jest.spyOn(fs, 'readdirSync').mockImplementation((file, _) => {
|
||||||
if (file == 'mainFolder')
|
if (file == 'mainFolder')
|
||||||
return [
|
return [
|
||||||
'file1' as unknown as fs.Dirent,
|
'file1' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
|
||||||
'file2' as unknown as fs.Dirent,
|
'file2' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
|
||||||
'folder1' as unknown as fs.Dirent,
|
'folder1' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
|
||||||
'folder2' as unknown as fs.Dirent
|
'folder2' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>
|
||||||
]
|
]
|
||||||
if (file == path.join('mainFolder', 'folder1'))
|
if (file == path.join('mainFolder', 'folder1'))
|
||||||
return [
|
return [
|
||||||
'file11' as unknown as fs.Dirent,
|
'file11' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
|
||||||
'file12' as unknown as fs.Dirent
|
'file12' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>
|
||||||
]
|
]
|
||||||
if (file == path.join('mainFolder', 'folder2'))
|
if (file == path.join('mainFolder', 'folder2'))
|
||||||
return [
|
return [
|
||||||
'file21' as unknown as fs.Dirent,
|
'file21' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
|
||||||
'file22' as unknown as fs.Dirent
|
'file22' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>
|
||||||
]
|
]
|
||||||
return []
|
return []
|
||||||
})
|
})
|
||||||
|
|
@ -134,20 +134,20 @@ describe('run.ts', () => {
|
||||||
jest.spyOn(fs, 'readdirSync').mockImplementation((file, _) => {
|
jest.spyOn(fs, 'readdirSync').mockImplementation((file, _) => {
|
||||||
if (file == 'mainFolder')
|
if (file == 'mainFolder')
|
||||||
return [
|
return [
|
||||||
'file1' as unknown as fs.Dirent,
|
'file1' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
|
||||||
'file2' as unknown as fs.Dirent,
|
'file2' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
|
||||||
'folder1' as unknown as fs.Dirent,
|
'folder1' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
|
||||||
'folder2' as unknown as fs.Dirent
|
'folder2' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>
|
||||||
]
|
]
|
||||||
if (file == path.join('mainFolder', 'folder1'))
|
if (file == path.join('mainFolder', 'folder1'))
|
||||||
return [
|
return [
|
||||||
'file11' as unknown as fs.Dirent,
|
'file11' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
|
||||||
'file12' as unknown as fs.Dirent
|
'file12' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>
|
||||||
]
|
]
|
||||||
if (file == path.join('mainFolder', 'folder2'))
|
if (file == path.join('mainFolder', 'folder2'))
|
||||||
return [
|
return [
|
||||||
'file21' as unknown as fs.Dirent,
|
'file21' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
|
||||||
'file22' as unknown as fs.Dirent
|
'file22' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>
|
||||||
]
|
]
|
||||||
return []
|
return []
|
||||||
})
|
})
|
||||||
|
|
@ -166,7 +166,7 @@ describe('run.ts', () => {
|
||||||
test('findHelm() - change access permissions and find the helm in given directory', () => {
|
test('findHelm() - change access permissions and find the helm in given directory', () => {
|
||||||
jest.spyOn(fs, 'chmodSync').mockImplementation(() => {})
|
jest.spyOn(fs, 'chmodSync').mockImplementation(() => {})
|
||||||
jest.spyOn(fs, 'readdirSync').mockImplementation((file, _) => {
|
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 []
|
return []
|
||||||
})
|
})
|
||||||
jest.spyOn(fs, 'statSync').mockImplementation((file) => {
|
jest.spyOn(fs, 'statSync').mockImplementation((file) => {
|
||||||
|
|
@ -208,7 +208,7 @@ describe('run.ts', () => {
|
||||||
jest.spyOn(toolCache, 'cacheDir').mockResolvedValue('pathToCachedDir')
|
jest.spyOn(toolCache, 'cacheDir').mockResolvedValue('pathToCachedDir')
|
||||||
jest
|
jest
|
||||||
.spyOn(fs, 'readdirSync')
|
.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) => {
|
jest.spyOn(fs, 'statSync').mockImplementation((file) => {
|
||||||
const isDirectory =
|
const isDirectory =
|
||||||
(file as string).indexOf('folder') == -1 ? false : true
|
(file as string).indexOf('folder') == -1 ? false : true
|
||||||
|
|
@ -254,7 +254,7 @@ describe('run.ts', () => {
|
||||||
jest.spyOn(fs, 'chmodSync').mockImplementation(() => {})
|
jest.spyOn(fs, 'chmodSync').mockImplementation(() => {})
|
||||||
jest
|
jest
|
||||||
.spyOn(fs, 'readdirSync')
|
.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) => {
|
jest.spyOn(fs, 'statSync').mockImplementation((file) => {
|
||||||
const isDirectory =
|
const isDirectory =
|
||||||
(file as string).indexOf('folder') == -1 ? false : true
|
(file as string).indexOf('folder') == -1 ? false : true
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue