Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump the actions group across 1 directory with 7 updates #346

Merged
merged 8 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/prettify-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: install deps
run: npm install
davidgamero marked this conversation as resolved.
Show resolved Hide resolved

- name: Enforce Prettier
uses: actionsx/prettier@v3
with:
args: --check .
run: npm run format-check
6 changes: 6 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
presets: [
['@babel/preset-env', {targets: {node: 'current'}}],
'@babel/preset-typescript'
]
}
13 changes: 11 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
module.exports = {
clearMocks: true,
moduleFileExtensions: ['js', 'ts'],
testEnvironment: 'node',
testMatch: ['**/*.test.ts'],
transform: {
'^.+\\.ts$': 'ts-jest'
'\\.[jt]sx?$': 'babel-jest'
},
transformIgnorePatterns: [
'node_modules/(?!' +
[
'@octokit',
'universal-user-agent',
'before-after-hook',
'minimist'
].join('|') +
')'
],
verbose: true,
testTimeout: 9000
}
8,282 changes: 5,078 additions & 3,204 deletions package-lock.json

Large diffs are not rendered by default.

17 changes: 10 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,27 @@
"format-check": "prettier --check ."
},
"dependencies": {
"@actions/core": "^1.10.1",
"@actions/core": "^1.11.1",
"@actions/exec": "^1.0.0",
"@actions/io": "^1.1.3",
"@actions/tool-cache": "2.0.1",
"@octokit/core": "^3.5.1",
"@octokit/plugin-retry": "^3.0.9",
"@babel/preset-env": "^7.26.0",
"@babel/preset-typescript": "^7.26.0",
"@octokit/core": "^6.1.2",
"@octokit/plugin-retry": "^7.1.2",
"@types/minipass": "^3.3.5",
"js-yaml": "4.1.0",
"minimist": "^1.2.8"
},
"devDependencies": {
"@types/jest": "^29.5.13",
"@types/jest": "^29.5.14",
"@types/js-yaml": "^4.0.9",
"@types/node": "^22.7.4",
"@types/minimist": "^1.2.5",
"@types/node": "^22.8.7",
"@vercel/ncc": "^0.38.2",
"jest": "^29.7.0",
"prettier": "^2.8.8",
"prettier": "^3.3.3",
"ts-jest": "^29.2.5",
"typescript": "5.6.2"
"typescript": "5.6.3"
}
}
5 changes: 2 additions & 3 deletions src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ export async function run() {
.map((manifest) => manifest.trim()) // remove surrounding whitespace
.filter((manifest) => manifest.length > 0) // remove any blanks

const fullManifestFilePaths = await getFilesFromDirectoriesAndURLs(
manifestFilePaths
)
const fullManifestFilePaths =
await getFilesFromDirectoriesAndURLs(manifestFilePaths)
const kubectlPath = await getKubectlPath()
const namespace = core.getInput('namespace') || 'default'
const isPrivateCluster =
Expand Down
5 changes: 2 additions & 3 deletions src/strategyHelpers/blueGreen/smiBlueGreenHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,8 @@ export async function createTrafficSplitObject(
): Promise<TrafficSplitObject> {
// cache traffic split api version
if (!trafficSplitAPIVersion)
trafficSplitAPIVersion = await kubectlUtils.getTrafficSplitAPIVersion(
kubectl
)
trafficSplitAPIVersion =
await kubectlUtils.getTrafficSplitAPIVersion(kubectl)

// retrieve annotations for TS object
const annotations = inputAnnotations
Expand Down
5 changes: 2 additions & 3 deletions src/strategyHelpers/canary/smiCanaryHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,8 @@ async function getTrafficSplitObject(
): Promise<string> {
// cached version
if (!trafficSplitAPIVersion) {
trafficSplitAPIVersion = await kubectlUtils.getTrafficSplitAPIVersion(
kubectl
)
trafficSplitAPIVersion =
await kubectlUtils.getTrafficSplitAPIVersion(kubectl)
}

return JSON.stringify({
Expand Down
2 changes: 1 addition & 1 deletion src/types/privatekubectl.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as fileUtils from '../utilities/fileUtils'
import * as fs from 'fs'
import fs from 'node:fs'
import {
PrivateKubectl,
extractFileNames,
Expand Down
5 changes: 2 additions & 3 deletions src/types/privatekubectl.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import {Kubectl} from './kubectl'
import * as minimist from 'minimist'
import minimist from 'minimist'
import {ExecOptions, ExecOutput, getExecOutput} from '@actions/exec'
import * as core from '@actions/core'
import * as os from 'os'
import * as fs from 'fs'
import fs from 'node:fs'
import * as path from 'path'
import {getTempDirectory} from '../utilities/fileUtils'

Expand Down
2 changes: 1 addition & 1 deletion src/utilities/fileUtils.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as fileUtils from './fileUtils'

import * as yaml from 'js-yaml'
import * as fs from 'fs'
import fs from 'node:fs'
import * as path from 'path'
import {K8sObject} from '../types/k8sObject'

Expand Down
2 changes: 1 addition & 1 deletion src/utilities/fileUtils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as fs from 'fs'
import fs from 'node:fs'
import * as https from 'https'
import * as path from 'path'
import * as core from '@actions/core'
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"compilerOptions": {
"target": "ES6",
"module": "commonjs"
"module": "commonjs",
"esModuleInterop": true
},
"exclude": ["node_modules", "test", "src/**/*.test.ts"]
}
Loading