Skip to content

Commit 9164073

Browse files
committed
Merge branch 'master' of https://github.com/aws/aws-toolkit-vscode into restructure3
2 parents c69c256 + 0bf7771 commit 9164073

File tree

136 files changed

+2714
-1216
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+2714
-1216
lines changed

.changes/2.8.0.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"date": "2024-02-01",
3+
"version": "2.8.0",
4+
"entries": [
5+
{
6+
"type": "Bug Fix",
7+
"description": "CodeWhisperer: Improve CodePercentage telemetry reporting"
8+
}
9+
]
10+
}
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": "Cloud9: certain filesystem calls did not work in Cloud9"
4+
}
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": "EC2 Credentials: Use IMDSv2 calls if available, otherwise fall back IMDSv1."
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Feature",
3+
"description": "Enable java 17 for SAM create and local Lambda debugging"
4+
}

.eslintrc.js

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@ module.exports = {
22
root: true,
33
parser: '@typescript-eslint/parser',
44
parserOptions: {
5+
ecmaVersion: 'latest',
6+
sourceType: 'module',
57
project: ['./packages/*/tsconfig.json', './plugins/*/tsconfig.json'],
68
tsconfigRootDir: __dirname,
79
},
810
env: {
911
node: true,
1012
mocha: true,
13+
es2024: true,
1114
},
12-
plugins: ['@typescript-eslint', 'header', 'no-null', 'aws-toolkits'],
15+
plugins: ['@typescript-eslint', 'unicorn', 'header', 'aws-toolkits'],
1316
extends: [
1417
'eslint:recommended',
1518
'plugin:@typescript-eslint/eslint-recommended',
@@ -90,7 +93,6 @@ module.exports = {
9093
'@typescript-eslint/no-namespace': 'error',
9194
// This is off because prettier takes care of it
9295
'no-extra-semi': 'off',
93-
'no-null/no-null': 'error',
9496
'@typescript-eslint/no-empty-function': 'off',
9597
'@typescript-eslint/no-unused-vars': 'off',
9698
'@typescript-eslint/no-floating-promises': 'error', // Promises must catch errors or be awaited.
@@ -105,6 +107,39 @@ module.exports = {
105107
// Do not check loops so while(true) works. Potentially reevalute this.
106108
'no-constant-condition': ['error', { checkLoops: false }],
107109
'no-empty': 'off',
110+
111+
// Rules from https://github.com/sindresorhus/eslint-plugin-unicorn
112+
// TODO: 'unicorn/no-useless-promise-resolve-reject': 'error',
113+
// TODO: 'unicorn/prefer-at': 'error',
114+
// TODO: 'unicorn/prefer-event-target': 'error',
115+
// TODO: 'unicorn/prefer-negative-index': 'error',
116+
// TODO: 'unicorn/prefer-string-slice': 'error',
117+
// TODO: 'unicorn/prefer-regexp-test': 'error',
118+
// TODO: 'unicorn/prefer-ternary': 'error',
119+
// TODO(?): 'unicorn/custom-error-definition': 'error',
120+
// TODO(?): 'unicorn/prefer-json-parse-buffer': 'error',
121+
// TODO: ESM modules https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-module.md
122+
// 'unicorn/prefer-module': 'error',
123+
'unicorn/no-abusive-eslint-disable': 'error',
124+
'unicorn/no-null': 'error',
125+
'unicorn/no-unnecessary-polyfills': 'error',
126+
'unicorn/no-useless-spread': 'error',
127+
'unicorn/prefer-array-some': 'error',
128+
'unicorn/prefer-blob-reading-methods': 'error',
129+
'unicorn/prefer-code-point': 'error',
130+
'unicorn/prefer-date-now': 'error',
131+
'unicorn/prefer-dom-node-text-content': 'error',
132+
'unicorn/prefer-includes': 'error',
133+
'unicorn/prefer-keyboard-event-key': 'error',
134+
'unicorn/prefer-modern-dom-apis': 'error',
135+
'unicorn/prefer-modern-math-apis': 'error',
136+
'unicorn/prefer-native-coercion-functions': 'error',
137+
// 'unicorn/prefer-node-protocol': 'error',
138+
// 'unicorn/prefer-object-from-entries': 'error',
139+
'unicorn/prefer-reflect-apply': 'error',
140+
'unicorn/prefer-string-trim-start-end': 'error',
141+
'unicorn/prefer-type-error': 'error',
142+
108143
'header/header': [
109144
'error',
110145
'block',

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ updates:
2020
vscode-lsp:
2121
patterns:
2222
- 'vscode-lang*'
23+
smithy:
24+
patterns:
25+
- '@smithy*'
26+
- 'smithy*'
2327
- package-ecosystem: 'github-actions'
2428
directory: './packages/toolkit/'
2529
target-branch: 'master' # Avoid updates to "staging".

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@ packages/toolkit/resources/css/icons.css
5151
.local.env
5252
*.config.local.json
5353

54-
# Created by `npm run runInBrowser` when testing extension in the browser
54+
# Created by `npm run browserRun` when testing extension in the browser
5555
.vscode-test-web

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.8.0 2024-02-01
2+
3+
- **Bug Fix** CodeWhisperer: Improve CodePercentage telemetry reporting
4+
15
## 2.7.0 2024-01-25
26

37
- **Bug Fix** Add invalid auth handling to Application Composer's Sync button

CONTRIBUTING.md

Lines changed: 95 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,21 @@ To run a single test in VSCode, do any one of:
189189
rootTestsPath: __dirname + '/shared/sam/debugger/'
190190
```
191191
192+
#### Run all tests in a specific folder
193+
194+
To run tests against a specific folder in VSCode, do any one of:
195+
196+
- Add the TEST_DIR environment variable to one of the testing launch configs and run it
197+
- Run in your terminal
198+
- Unix/macOS/POSIX shell:
199+
```
200+
TEST_DIR=src/test/foo npm run test
201+
```
202+
- Powershell:
203+
```
204+
$Env:TEST_DIR = "src/test/foo"; npm run test
205+
```
206+
192207
### Browser Support
193208
194209
Running the extension in the browser (eg: [vscode.dev](https://vscode.dev/)).
@@ -329,7 +344,7 @@ Example:
329344
}
330345
```
331346

332-
Overrides specifically for CodeCatalyst can be set using the `aws.dev.codecatalystService` setting. This is a JSON object consisting of keys/values required to override API calls to CodeCatalyst: `region`, `endpoint`, `hostname`, and `gitHostname`. If this setting is present, then all keys need to be explicitly provided.
347+
<a name="codecatalyst-settings">Overrides specifically for CodeCatalyst can be set using the `aws.dev.codecatalystService` setting. This is a JSON object consisting of keys/values required to override API calls to CodeCatalyst: `region`, `endpoint`, `hostname`, and `gitHostname`. If this setting is present, then all keys need to be explicitly provided.</a>
333348

334349
Example:
335350

@@ -342,6 +357,85 @@ Example:
342357
}
343358
```
344359

360+
<a name="codewhisperer-settings">Overrides specifically for CodeWhisperer/Amazon Q can be set using the `aws.dev.codewhispererService` setting. This is a JSON object consisting of keys/values required to override API calls to CodeWhisperer/Amazon Q: `region` and `endpoint`. If this setting is present, then all keys need to be explicitly provided.</a>
361+
362+
Example:
363+
364+
```json
365+
"aws.dev.codewhispererService": {
366+
"region": "us-west-2",
367+
"endpoint": "https://codewhisperer-gamma.example.com"
368+
}
369+
```
370+
371+
### Environment variables
372+
373+
Environment variables can be used to modify the behaviour of VSCode. The following are environment variables that can be used to configure the extension:
374+
375+
#### General AWS
376+
377+
- `AWS_ACCESS_KEY_ID`: The AWS access key associated with an IAM account. If defined, this environment variable overrides the value for the profile setting aws_access_key_id. For more information see [environment variables to configure the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html)
378+
- `AWS_SECRET_ACCESS_KEY`: The secret key associated with the access key. This is essentially the "password" for the access key. If defined, this environment variable overrides the value for the profile setting aws_secret_access_key. For more information see [environment variables to configure the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html)
379+
- `AWS_REGION`: The AWS Region to send the request to. If defined, this environment variable overrides the values in the environment variable AWS_DEFAULT_REGION and the profile setting region. For more information see [environment variables to configure the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html)
380+
- `AWS_SDK_LOAD_CONFIG`: Controls how the AWS SDK for javascript loads it's configuration when initialized. If the AWS_SDK_LOAD_CONFIG environment variable has been set to a truthy value, the SDK for JavaScript automatically searches for a config file when it loads. For more information see [the shared config file documentation](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-region.html#setting-region-config-file)
381+
- `AWS_SHARED_CREDENTIALS_FILE`: The location of the file that the AWS CLI uses to store access keys. The default path is `~/.aws/credentials`
382+
- `AWS_CONFIG_FILE`: The location of the file that the AWS CLI uses to store configuration profiles. The default path is `~/.aws/config`
383+
384+
#### General OS
385+
386+
- `HOME`: The home directory location for the current user in Linux and other Unix-like operating systems.
387+
- `SSH_AUTH_SOCK`: The location of a UNIX domain socket used by ssh-agent and SSH clients for agent-based authentication
388+
- `USERPROFILE`: The absolute path to the profile folder for the current user in Windows
389+
- `HOMEPATH`: The path to the home directory for the current user in Windows, without including the drive letter
390+
- `PROGRAMFILES/PROGRAMFILES(X86)`: The default installation directory for Windows
391+
- `WINDIR`: The location of the Windows installation directory
392+
- `PATH`: The set of directories where executable programs live
393+
394+
#### Codecatalyst
395+
396+
- `__DEV_ENVIRONMENT_ID`: The ID of the running development environment. Automatically set when running the toolkit in Codecatalyst
397+
- `__DEV_ENVIRONMENT_PROJECT_NAME`: The project name associated with the running development environment. Automatically set when running the toolkit in Codecatalyst
398+
- `__DEV_ENVIRONMENT_SPACE_NAME`: The space name associated with the running development environment. Automatically set when running the toolkit in Codecatalyst
399+
- `__DEV_ENVIRONMENT_ORGANIZATION_NAME`: The organization name associated with the running development environment. Automatically set when running the toolkit in Codecatalyst
400+
401+
The following are environment variable versions of the user `settings.json` overrides mentioned [here](#codecatalyst-settings). These will always override the toolkit defaults and those defined in `settings.json`.
402+
Unlike the user setting overrides, not all of these environment variables have to be set to make use of them.
403+
404+
- `__CODECATALYST_REGION`: for aws.dev.codecatalystService.region
405+
- `__CODECATALYST_ENDPOINT`: for aws.dev.codecatalystService.endpoint
406+
- `__CODECATALYST_HOSTNAME`: for aws.dev.codecatalystService.hostname
407+
- `__CODECATALYST_GIT_HOSTNAME`: for aws.dev.codecatalystService.gitHostname
408+
409+
#### Codewhisperer/Amazon Q
410+
411+
The following are environment variable versions of the user `settings.json` overrides mentioned [here](#codewhisperer-settings). These will always override the toolkit defaults and those defined in `settings.json`.
412+
Unlike the user setting overrides, not all of these environment variables have to be set to make use of them.
413+
414+
- `__CODEWHISPERER_REGION`: for aws.dev.codewhispererService.region
415+
- `__CODEWHISPERER_ENDPOINT`: for aws.dev.codewhispererService.endpoint
416+
417+
#### Lambda
418+
419+
- `AUTH_UTIL_LAMBDA_ARN`: The Amazon Resource Name (ARN) of the lambda function
420+
421+
#### ECS
422+
423+
- `AWS_CONTAINER_CREDENTIALS_RELATIVE_URI`: The relative HTTP URL endpoint for the SDK to use when making a request for credentials. The value is appended to the default Amazon ECS hostname of 169.254.170.2. For more information see [container credential provider](https://docs.aws.amazon.com/sdkref/latest/guide/feature-container-credentials.html)
424+
- `AWS_CONTAINER_CREDENTIALS_FULL_URI`: The full HTTP URL endpoint for the SDK to use when making a request for credentials. This includes both the scheme and the host. For more information see [container credential provider](https://docs.aws.amazon.com/sdkref/latest/guide/feature-container-credentials.html)
425+
426+
#### Step functions
427+
428+
- `SSMDOCUMENT_LANGUAGESERVER_PORT`: The port the ssm document language server should start debugging on
429+
430+
#### CI/Testing
431+
432+
- `GITHUB_ACTION`: The name of the current GitHub Action workflow step that is running
433+
- `CODEBUILD_BUILD_ID`: The unique ID of the current CodeBuild build that is executing
434+
- `AWS_TOOLKIT_AUTOMATION`: If tests are currently being ran
435+
- `DEVELOPMENT_PATH`: The path to the aws toolkit vscode project
436+
- `AWS_TOOLKIT_TEST_NO_COLOR`: If the tests should include colour in their output
437+
- `TEST_DIR` - The directory where the test runner should find the tests
438+
345439
### SAM/CFN ("goformation") JSON schema
346440

347441
See [docs/cfn-schema-support.md](./docs/cfn-schema-support.md) for how to fix
12.8 MB
Binary file not shown.

0 commit comments

Comments
 (0)