Skip to content
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
13 changes: 7 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"eslint-plugin-security-node": "^1.1.4",
"eslint-plugin-unicorn": "^54.0.0",
"husky": "^9.0.7",
"prettier": "^3.3.2",
"prettier": "^3.3.3",
"prettier-plugin-sh": "^0.14.0",
"pretty-quick": "^4.0.0",
"ts-node": "^10.9.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/amazonqFeatureDev/session/sessionState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ function registerNewFiles(
const folder =
workspaceFolderPrefixes === undefined
? workspaceFolders[0]
: workspaceFolderPrefixes[prefix] ??
: (workspaceFolderPrefixes[prefix] ??
workspaceFolderPrefixes[
Object.values(workspaceFolderPrefixes).find((val) => val.index === 0)?.name ?? ''
]
])
if (folder === undefined) {
telemetry.toolkit_trackScenario.emit({
count: 1,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/auth/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function hasScopes(target: SsoConnection | SsoProfile | string[], scopes:
* Not optimized, but the set of possible scopes is currently very small (< 8)
*/
export function hasExactScopes(target: SsoConnection | SsoProfile | string[], scopes: string[]): boolean {
const targetScopes = Array.isArray(target) ? target : target.scopes ?? []
const targetScopes = Array.isArray(target) ? target : (target.scopes ?? [])
return scopes.length === targetScopes.length && scopes.every((s) => targetScopes.includes(s))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export abstract class IotCertificateNode extends AWSTreeNodeBase implements AWSR
this.certificate.id,
this.certificate.activeStatus,
formatLocalized(this.certificate.creationDate),
things?.length ?? 0 > 0 ? `\nAttached to: ${things!.join(', ')}` : ''
(things?.length ?? 0 > 0) ? `\nAttached to: ${things!.join(', ')}` : ''
)
this.iconPath = getIcon('aws-iot-certificate')
this.description = `\t[${this.certificate.activeStatus}]`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class IotPolicyNode extends AWSTreeNodeBase implements AWSResourceNode {
'AWS.explorerNode.iot.policyToolTip',
'{0}{1}',
policy.name,
certs?.length ?? 0 > 0 ? `\nAttached to: ${certs?.join(', ')}` : ''
(certs?.length ?? 0 > 0) ? `\nAttached to: ${certs?.join(', ')}` : ''
)
this.iconPath = getIcon('aws-iot-policy')
this.contextValue = 'awsIotPolicyNode.Certificates'
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/codecatalyst/devEnv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export class DevEnvActivityStarter {
}
// If user is not authenticated, assume 15 minutes.
const inactivityTimeoutMin =
devenvTimeoutMs > 0 ? devenvTimeoutMs / 60000 : thisDevenv?.summary.inactivityTimeoutMinutes ?? 15
devenvTimeoutMs > 0 ? devenvTimeoutMs / 60000 : (thisDevenv?.summary.inactivityTimeoutMinutes ?? 15)
if (!shouldSendActivity(inactivityTimeoutMin)) {
getLogger().info(
`codecatalyst: disabling DevEnvActivity heartbeat: configured to never timeout (inactivityTimeoutMinutes=${inactivityTimeoutMin})`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ export async function uploadArtifactToS3(
)
const errorMessage = getTelemetryReasonDesc(error)?.includes(`"PUT" request failed with code "403"`)
? `"PUT" request failed with code "403"`
: getTelemetryReasonDesc(error) ?? 'Security scan failed.'
: (getTelemetryReasonDesc(error) ?? 'Security scan failed.')

throw new UploadArtifactToS3Error(errorMessage)
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/lambda/models/samLambdaRuntime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ export function createRuntimeQuickPick(params: {
totalSteps?: number
}): QuickPickPrompter<RuntimeAndPackage> {
const zipRuntimes = params.runtimeFamily
? getRuntimesForFamily(params.runtimeFamily) ?? samLambdaCreatableRuntimes()
? (getRuntimesForFamily(params.runtimeFamily) ?? samLambdaCreatableRuntimes())
: samLambdaCreatableRuntimes()

const zipRuntimeItems = zipRuntimes
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/shared/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ export function scrubNames(s: string, username?: string) {
* @param err Error object, or message text
*/
export function getTelemetryReasonDesc(err: unknown | undefined): string | undefined {
const m = typeof err === 'string' ? err : getErrorMsg(err as Error, true) ?? ''
const m = typeof err === 'string' ? err : (getErrorMsg(err as Error, true) ?? '')
const msg = scrubNames(m, _username)

// Truncate message as these strings can be very long.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export class HttpResourceFetcher implements ResourceFetcher {
}

private logText(): string {
return this.params.showUrl ? this.url : this.params.friendlyName ?? 'resource from URL'
return this.params.showUrl ? this.url : (this.params.friendlyName ?? 'resource from URL')
}

private logCancellation(event: CancelEvent) {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/shared/sam/debugger/awsSamDebugger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,11 @@ export class SamDebugConfigProvider implements vscode.DebugConfigurationProvider
if (resource) {
// we do not know enough to populate the runtime field for Image-based Lambdas
const runtimeName = CloudFormation.isZipLambdaResource(resource?.Properties)
? CloudFormation.getStringForProperty(
? (CloudFormation.getStringForProperty(
resource?.Properties,
'Runtime',
templateDatum.item
) ?? ''
) ?? '')
: ''
configs.push(
createTemplateAwsSamDebugConfig(
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/webviews/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ function createWebviewPanel(ctx: vscode.ExtensionContext, params: WebviewPanelPa
const viewColumn =
isCloud9() && params.viewColumn === vscode.ViewColumn.Beside
? vscode.ViewColumn.Two
: params.viewColumn ?? vscode.ViewColumn.Active
: (params.viewColumn ?? vscode.ViewColumn.Active)

const panel = vscode.window.createWebviewPanel(
params.id,
Expand Down
Loading