Skip to content

Commit f90fe2c

Browse files
committed
build: remove package.json syncing
1 parent 6f9e6b0 commit f90fe2c

File tree

25 files changed

+3315
-232
lines changed

25 files changed

+3315
-232
lines changed

package-lock.json

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

packages/amazonq/.vscode/tasks.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@
109109
// Since `webpack --watch` never terminates (but finishes packaging at some point),
110110
// VS Code uses this to parse the CLI output to pattern match something that indicates it is done
111111
"problemMatcher": "$ts-webpack-watch",
112-
"dependsOn": ["copyPackageJson"],
113112
"options": {
114113
"cwd": "${workspaceFolder}/../../packages/core"
115114
}
@@ -124,7 +123,7 @@
124123
"label": "webRunTerminate",
125124
"command": "echo ${input:webRunTerminate}",
126125
"type": "shell",
127-
"dependsOn": ["restorePackageJson"]
126+
"dependsOn": []
128127
},
129128
// ---------- End: Web Mode Tasks ----------
130129
{

packages/amazonq/test/e2e/index.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ import { runTests } from 'aws-core-vscode/test'
77
import { VSCODE_EXTENSION_ID } from 'aws-core-vscode/utils'
88

99
export function run(): Promise<void> {
10-
return runTests(
11-
process.env.TEST_DIR ?? 'test/e2e',
12-
['../../core/dist/src/testInteg/globalSetup.test.ts'],
13-
VSCODE_EXTENSION_ID.amazonq
14-
)
10+
return runTests(process.env.TEST_DIR ?? 'test/e2e', VSCODE_EXTENSION_ID.amazonq, [
11+
'../../core/dist/src/testInteg/globalSetup.test.ts',
12+
])
1513
}

packages/amazonq/test/unit/index.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ import { runTests } from 'aws-core-vscode/test'
77
import { VSCODE_EXTENSION_ID } from 'aws-core-vscode/utils'
88

99
export function run(): Promise<void> {
10-
return runTests(
11-
process.env.TEST_DIR ?? 'test/unit',
12-
['../../core/dist/src/test/globalSetup.test.ts'],
13-
VSCODE_EXTENSION_ID.amazonq
14-
)
10+
return runTests(process.env.TEST_DIR ?? ['test/unit'], VSCODE_EXTENSION_ID.amazonq, [
11+
'../../core/dist/src/test/globalSetup.test.ts',
12+
])
1513
}

packages/core/package.json

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,12 @@
22
"name": "aws-core-vscode",
33
"description": "Core library used AWS IDE extensions for VSCode.",
44
"version": "1.0.0",
5-
"extensionKind": [
6-
"workspace"
7-
],
85
"publisher": "amazonwebservices",
96
"license": "Apache-2.0",
107
"engines": {
118
"npm": "^10.1.0",
129
"vscode": "^1.68.0"
1310
},
14-
"activationEvents": [
15-
"onStartupFinished",
16-
"onUri",
17-
"onDebugResolve:aws-sam",
18-
"onDebugInitialConfigurations",
19-
"onLanguage:javascript",
20-
"onLanguage:java",
21-
"onLanguage:python",
22-
"onLanguage:csharp",
23-
"onLanguage:yaml",
24-
"onFileSystem:s3",
25-
"onFileSystem:s3-readonly"
26-
],
27-
"main": "./dist/src/extensionNode.js",
28-
"browser": "./dist/src/extensionWebCore.js",
2911
"exports": {
3012
".": "./dist/src/extension.js",
3113
"./node": "./dist/src/extensionNode.js",
@@ -4038,10 +4020,6 @@
40384020
"serveVue": "webpack serve --config-name vue --mode development",
40394021
"watch": "npm run testCompile -- -- --watch",
40404022
"testCompile": "npm run clean && npm run buildScripts && npm run compileOnly",
4041-
"test": "npm run testCompile && c8 ts-node ./scripts/test/test.ts dist/src/test/index.js",
4042-
"testWeb": "npm run compileDev && c8 ts-node ./scripts/test/testWeb.ts",
4043-
"testE2E": "npm run testCompile && c8 ts-node ./scripts/test/testE2E.ts dist/src/testE2E/index.js",
4044-
"testInteg": "npm run testCompile && c8 ts-node ./scripts/test/testInteg.ts",
40454023
"lint": "ts-node ./scripts/lint/testLint.ts",
40464024
"generateClients": "ts-node ./scripts/build/generateServiceClient.ts ",
40474025
"generateIcons": "ts-node ../../scripts/generateIcons.ts",

packages/core/scripts/test/testInteg.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,11 @@
55

66
import { runToolkitTests } from './launchTestUtilities'
77
void (async () => {
8-
await runToolkitTests('integration', 'dist/src/testInteg/index.js')
8+
const relativeEntrypoint = process.argv[2]
9+
if (!relativeEntrypoint) {
10+
throw new Error('Relative entrypoint is required')
11+
}
12+
13+
const relativeWorkspaceFolder = process.argv[3]
14+
await runToolkitTests('integration', relativeEntrypoint, relativeWorkspaceFolder)
915
})()

packages/core/scripts/test/testWeb.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,11 @@
55

66
import { runToolkitTests } from './launchTestUtilities'
77
void (async () => {
8-
await runToolkitTests('web', 'dist/src/testWeb/testRunnerWebCore.js')
8+
const relativeEntrypoint = process.argv[2]
9+
if (!relativeEntrypoint) {
10+
throw new Error('Relative entrypoint is required')
11+
}
12+
13+
const relativeWorkspaceFolder = process.argv[3]
14+
await runToolkitTests('web', relativeEntrypoint, relativeWorkspaceFolder)
915
})()

packages/core/src/shared/extensionUtilities.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const notInitialized = 'notInitialized'
2626

2727
function _isAmazonQ() {
2828
const id = globals.context.extension.id
29-
const isToolkit = id === VSCODE_EXTENSION_ID.awstoolkit || id === VSCODE_EXTENSION_ID.awstoolkitcore
29+
const isToolkit = id === VSCODE_EXTENSION_ID.awstoolkit
3030
const isQ = id === VSCODE_EXTENSION_ID.amazonq
3131
if (!isToolkit && !isQ) {
3232
throw Error(`unexpected extension id: ${id}`) // sanity check

packages/core/src/shared/extensions.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import { UriHandler } from './vscode/uriHandler'
1515
export const VSCODE_EXTENSION_ID = {
1616
awstoolkit: 'amazonwebservices.aws-toolkit-vscode',
1717
amazonq: 'amazonwebservices.amazon-q-vscode',
18-
awstoolkitcore: 'amazonwebservices.aws-core-vscode', // Core "extension" for tests - not a real extension.
1918
python: 'ms-python.python',
2019
// python depends on jupyter plugin
2120
jupyter: 'ms-toolsai.jupyter',

packages/core/src/test/codewhisperer/commands/startSecurityScan.test.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ import { FakeExtensionContext } from '../../fakeExtensionContext'
1414
import * as diagnosticsProvider from '../../../codewhisperer/service/diagnosticsProvider'
1515
import { getTestWorkspaceFolder } from '../../../testInteg/integrationTestsUtilities'
1616
import { join } from 'path'
17-
import { assertTelemetry, closeAllEditors, createTestWorkspaceFolder, toFile } from '../../testUtil'
17+
import {
18+
assertTelemetry,
19+
closeAllEditors,
20+
createTestWorkspaceFolder,
21+
getFetchStubWithResponse,
22+
toFile,
23+
} from '../../testUtil'
1824
import { stub } from '../../utilities/stubber'
1925
import { AWSError, HttpResponse } from 'aws-sdk'
2026
import { getTestWindow } from '../../shared/vscode/window'
@@ -30,7 +36,6 @@ import * as model from '../../../codewhisperer/models/model'
3036
import { CodewhispererSecurityScan } from '../../../shared/telemetry/telemetry.gen'
3137
import * as errors from '../../../shared/errors'
3238
import * as timeoutUtils from '../../../shared/utilities/timeoutUtils'
33-
import { getFetchStubWithResponse } from '../../index'
3439
import { performanceTest } from '../../../shared/performance/performance'
3540

3641
const mockCreateCodeScanResponse = {

0 commit comments

Comments
 (0)