diff --git a/package-lock.json b/package-lock.json index 910ec0d..35324a6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ }, "devDependencies": { "@types/jest": "^29.5.14", - "@types/node": "^22.15.3", + "@types/node": "^22.15.17", "@vercel/ncc": "^0.38.3", "jest": "^29.7.0", "prettier": "^3.5.3", @@ -1365,9 +1365,9 @@ } }, "node_modules/@types/node": { - "version": "22.15.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.3.tgz", - "integrity": "sha512-lX7HFZeHf4QG/J7tBZqrCAXwz9J5RD56Y6MpP0eJkka8p+K0RY/yBTW7CYFJ4VGCclxqOLKmiGP5juQc6MKgcw==", + "version": "22.15.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.17.tgz", + "integrity": "sha512-wIX2aSZL5FE+MR0JlvF87BNVrtFWf6AE6rxSE9X7OwnVvoyCQjpzSRJ+M87se/4QCkCiebQAqrJ0y6fwIyi7nw==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 4318449..5900cd3 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ }, "devDependencies": { "@types/jest": "^29.5.14", - "@types/node": "^22.15.3", + "@types/node": "^22.15.17", "@vercel/ncc": "^0.38.3", "jest": "^29.7.0", "prettier": "^3.5.3", diff --git a/src/run.test.ts b/src/run.test.ts index 8b02210..54bbe50 100644 --- a/src/run.test.ts +++ b/src/run.test.ts @@ -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>, + 'file2' as unknown as fs.Dirent>, + 'folder1' as unknown as fs.Dirent>, + 'folder2' as unknown as fs.Dirent> ] 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>, + 'file12' as unknown as fs.Dirent> ] 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>, + 'file22' as unknown as fs.Dirent> ] 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>, + 'file2' as unknown as fs.Dirent>, + 'folder1' as unknown as fs.Dirent>, + 'folder2' as unknown as fs.Dirent> ] 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>, + 'file12' as unknown as fs.Dirent> ] 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>, + 'file22' as unknown as fs.Dirent> ] return [] }) @@ -166,7 +166,7 @@ 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>] return [] }) jest.spyOn(fs, 'statSync').mockImplementation((file) => { @@ -208,7 +208,7 @@ 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>]) jest.spyOn(fs, 'statSync').mockImplementation((file) => { const isDirectory = (file as string).indexOf('folder') == -1 ? false : true @@ -254,7 +254,7 @@ 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>]) jest.spyOn(fs, 'statSync').mockImplementation((file) => { const isDirectory = (file as string).indexOf('folder') == -1 ? false : true