Skip to content

Commit 1536e49

Browse files
committed
Merge branch 'master' into hkobew/ec2/cwl
2 parents 0992a21 + af41d26 commit 1536e49

File tree

11 files changed

+78
-60
lines changed

11 files changed

+78
-60
lines changed

buildspec/shared/linux-pre_build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ if [ "$TOOLKITS_CODEARTIFACT_DOMAIN" ] && [ "$TOOLKITS_CODEARTIFACT_REPO" ] && [
2222
fi
2323

2424
# TODO: move this to the "install" phase?
25-
export NODE_OPTIONS=--max-old-space-size=8192
25+
export NODE_OPTIONS='--max-old-space-size=8192'
2626
npm 2>&1 ci | run_and_report 2 'npm WARN deprecated' 'Deprecated dependencies must be updated.'

docs/TESTPLAN.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ The test suite has the following categories of tests:
4242
- Live in `src/testE2E`
4343
- These tests are heavier than Integration tests.
4444
- Some E2E tests have a more complicated architecture, described in [TEST_E2E](./TEST_E2E.md)
45+
- Performance Tests: **slow** tests
46+
- Live in `src/testInteg/perf`.
47+
- A subset of integration tests focused on catching performance regressions.
48+
- Use a combination of operation counting and system usage statistics such as cpu usage, memory usage, and duration.
49+
- Each test is often repeated 10 or more times for less variant system usage statistics, then median of runs is used.
4550

4651
## Test files
4752

package-lock.json

Lines changed: 29 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"@playwright/browser-chromium": "^1.43.1",
4444
"@types/vscode": "^1.68.0",
4545
"@types/vscode-webview": "^1.57.1",
46-
"@types/webpack-env": "^1.18.1",
46+
"@types/webpack-env": "^1.18.5",
4747
"@typescript-eslint/eslint-plugin": "^7.14.1",
4848
"@typescript-eslint/parser": "^7.14.1",
4949
"@vscode/codicons": "^0.0.33",
@@ -63,12 +63,13 @@
6363
"pretty-quick": "^4.0.0",
6464
"ts-node": "^10.9.1",
6565
"typescript": "^5.0.4",
66-
"webpack": "^5.83.0",
66+
"webpack": "^5.95.0",
6767
"webpack-cli": "^5.1.4",
6868
"webpack-dev-server": "^4.15.1",
6969
"webpack-merge": "^5.10.0"
7070
},
7171
"dependencies": {
72+
"@types/node": "^22.7.5",
7273
"vscode-nls": "^5.2.0",
7374
"vscode-nls-dev": "^4.0.4"
7475
}

packages/amazonq/scripts/build/copyFiles.ts

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
/* eslint-disable no-restricted-imports */
7-
import * as fs from 'fs-extra'
7+
import fs from 'fs'
88
import * as path from 'path'
99

1010
// Moves all dependencies into `dist`
@@ -73,33 +73,35 @@ const tasks: CopyTask[] = [
7373
},
7474
]
7575

76-
async function copy(task: CopyTask): Promise<void> {
76+
function copy(task: CopyTask): void {
7777
const src = path.resolve(projectRoot, task.target)
7878
const dst = path.resolve(outRoot, task.destination ?? task.target)
7979

8080
try {
81-
await fs.copy(src, dst, {
81+
fs.cpSync(src, dst, {
8282
recursive: true,
83-
overwrite: true,
83+
force: true,
8484
errorOnExist: false,
8585
})
8686
} catch (error) {
8787
throw new Error(`Copy "${src}" to "${dst}" failed: ${error instanceof Error ? error.message : error}`)
8888
}
8989
}
9090

91-
void (async () => {
92-
const args = process.argv.slice(2)
93-
if (args.includes('--vueHr')) {
94-
vueHr = true
95-
console.log('Using Vue Hot Reload webpacks from core/')
96-
}
91+
const args = process.argv.slice(2)
92+
if (args.includes('--vueHr')) {
93+
vueHr = true
94+
console.log('Using Vue Hot Reload webpacks from core/')
95+
}
9796

97+
function main() {
9898
try {
99-
await Promise.all(tasks.map(copy))
99+
tasks.map(copy)
100100
} catch (error) {
101101
console.error('`copyFiles.ts` failed')
102102
console.error(error)
103103
process.exit(1)
104104
}
105-
})()
105+
}
106+
107+
void main()

packages/amazonq/test/e2e/amazonq/framework/jsdomInjector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ export function injectJSDOM() {
3434
})
3535

3636
// jsdom doesn't have support for structuredClone. See https://github.com/jsdom/jsdom/issues/3363
37-
global.structuredClone = (val) => JSON.parse(JSON.stringify(val))
37+
global.structuredClone = (val: any) => JSON.parse(JSON.stringify(val))
3838
}

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@
423423
"@types/node-fetch": "^2.6.8",
424424
"@types/prismjs": "^1.26.0",
425425
"@types/proper-lockfile": "^4.1.4",
426-
"@types/readline-sync": "^1.4.3",
426+
"@types/readline-sync": "^1.4.8",
427427
"@types/semver": "^7.5.0",
428428
"@types/sinon": "^10.0.5",
429429
"@types/sinonjs__fake-timers": "^8.1.2",

packages/core/scripts/build/copyFiles.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
/* eslint-disable no-restricted-imports */
7-
import * as fs from 'fs-extra'
7+
import fs from 'fs'
88
import * as path from 'path'
99

1010
// Moves all dependencies into `dist`
@@ -46,27 +46,28 @@ const tasks: CopyTask[] = [
4646
},
4747
]
4848

49-
async function copy(task: CopyTask): Promise<void> {
49+
function copy(task: CopyTask): void {
5050
const src = path.resolve(projectRoot, task.target)
5151
const dst = path.resolve(outRoot, task.destination ?? task.target)
5252

5353
try {
54-
await fs.copy(src, dst, {
54+
fs.cpSync(src, dst, {
5555
recursive: true,
56-
overwrite: true,
56+
force: true,
5757
errorOnExist: false,
5858
})
5959
} catch (error) {
6060
throw new Error(`Copy "${src}" to "${dst}" failed: ${error instanceof Error ? error.message : error}`)
6161
}
6262
}
63-
64-
void (async () => {
63+
function main() {
6564
try {
66-
await Promise.all(tasks.map(copy))
65+
tasks.map(copy)
6766
} catch (error) {
6867
console.error('`copyFiles.ts` failed')
6968
console.error(error)
7069
process.exit(1)
7170
}
72-
})()
71+
}
72+
73+
void main()

packages/core/src/test/shared/credentials/userCredentialsUtils.test.ts

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,31 +18,20 @@ import {
1818
import { UserCredentialsUtils } from '../../../shared/credentials/userCredentialsUtils'
1919
import { EnvironmentVariables } from '../../../shared/environmentVariables'
2020
import { makeTemporaryToolkitFolder } from '../../../shared/filesystemUtilities'
21-
import { getConfigFilename, getCredentialsFilename } from '../../../auth/credentials/sharedCredentialsFile'
2221
import { fs } from '../../../shared'
2322

2423
describe('UserCredentialsUtils', function () {
2524
let tempFolder: string
26-
let defaultConfigFileName: string
27-
let defaultCredentialsFilename: string
2825

29-
before(async function () {
30-
defaultConfigFileName = getConfigFilename()
31-
defaultCredentialsFilename = getCredentialsFilename()
26+
beforeEach(async function () {
3227
// Make a temp folder for all these tests
3328
// Stick some temp credentials files in there to load from
3429
tempFolder = await makeTemporaryToolkitFolder()
3530
})
3631

3732
afterEach(async function () {
38-
await fs.delete(defaultConfigFileName, { recursive: true })
39-
await fs.delete(defaultCredentialsFilename, { recursive: true })
40-
41-
sinon.restore()
42-
})
43-
44-
after(async function () {
4533
await fs.delete(tempFolder, { recursive: true })
34+
sinon.restore()
4635
})
4736

4837
describe('findExistingCredentialsFilenames', function () {
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "Fix userCredentialsUtils.test.ts so it won't remove the actual aws config"
4+
}

0 commit comments

Comments
 (0)