Skip to content

Commit 1e1eba1

Browse files
committed
Merge branch 'master' into kevin/telemetry
2 parents 3ca9af2 + 30ea80a commit 1e1eba1

File tree

60 files changed

+1275
-320
lines changed

Some content is hidden

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

60 files changed

+1275
-320
lines changed

.github/workflows/node.js.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
- run: npm run testCompile
5858
- run: npm run lint
5959

60-
jscpd:
60+
lint-duplicate-code:
6161
needs: lint-commits
6262
if: ${{ github.event_name == 'pull_request'}}
6363
runs-on: ubuntu-latest
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
version: 0.2
2+
3+
phases:
4+
install:
5+
runtime-versions:
6+
nodejs: 16
7+
8+
commands:
9+
- apt update
10+
- apt install -y wget gpg
11+
- curl -sSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
12+
- install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/
13+
- sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
14+
- apt update
15+
- apt install -y code
16+
17+
pre_build:
18+
commands:
19+
# Check for implicit env vars passed from the release pipeline.
20+
- test -n "${TARGET_EXTENSION}"
21+
22+
build:
23+
commands:
24+
- VERSION=$(node -e "console.log(require('./packages/${TARGET_EXTENSION}/package.json').version);")
25+
# get extension name, if in beta, use some hard-coded recent version
26+
- |
27+
if [ "${TARGET_EXTENSION}" = "amazonq" ]; then
28+
extension_name="amazonwebservices.amazon-q-vscode"
29+
[ "$STAGE" != "prod" ] && VERSION="1.43.0" || true
30+
elif [ "${TARGET_EXTENSION}" = "toolkit" ]; then
31+
extension_name="amazonwebservices.aws-toolkit-vscode"
32+
[ "$STAGE" != "prod" ] && VERSION="3.42.0" || true
33+
else
34+
echo checkmarketplace: "Unknown TARGET_EXTENSION: ${TARGET_EXTENSION}"
35+
exit 1
36+
fi
37+
if [ "$STAGE" != "prod" ]; then
38+
echo "checkmarketplace: Non-production stage detected. Installing hardcoded version '${VERSION}'."
39+
fi
40+
# keep installing the desired extension version until successful. Otherwise fail on codebuild timeout (1 hour).
41+
- |
42+
while true; do
43+
code --uninstall-extension "${extension_name}" --no-sandbox --user-data-dir /tmp/vscode
44+
code --install-extension "${extension_name}@${VERSION}" --no-sandbox --user-data-dir /tmp/vscode || true
45+
cur_version=$(code --list-extensions --show-versions --no-sandbox --user-data-dir /tmp/vscode | grep ${extension_name} | cut -d'@' -f2)
46+
if [ "${cur_version}" = "${VERSION}" ]; then
47+
echo "checkmarketplace: Extension ${extension_name} is updated to version '${cur_version}.'"
48+
break
49+
else
50+
echo "checkmarketplace: Expected extension version '${VERSION}' has not been successfully installed. Retrying..."
51+
fi
52+
sleep 120 # Wait for 2 minutes before retrying
53+
done

docs/web.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ You can run the Web mode implementation of the extension in the following ways.
1616
- To see logs, using the Command Palette search: `Toggle Developer Tools`. Then go to the `Console` tab. In web mode VS Code seems to duplicate log messages, idk how to fix this.
1717
- The difference between web mode and Node.js/desktop is that in web mode everything runs in browser environment so certain things like Node.js modules will **not** be available.
1818

19-
## Running in an actual Browser
19+
## Running in an actual Browser (Recommended)
2020

2121
The following steps will result in a Chrome window running with VS Code
2222
and the web version of the AWS Toolkit extension installed:
@@ -43,7 +43,7 @@ and the web version of the AWS Toolkit extension installed:
4343
const context = browser
4444
```
4545

46-
2. In the `Run & Debug` menu select the `Extension (Chrome)` option
46+
2. In the `Run & Debug` menu select the `Extension Web` option
4747

4848
> Note: To stop the debug session, you need to click the read `Disconnect` button multiple times
4949

@@ -62,6 +62,12 @@ do the following:
6262

6363
Now when you run the extension in the browser it will do CORS checks.
6464

65+
### Troubleshooting
66+
67+
- `Extension Web` fails to launch
68+
- Update `@vscode/test-web` by running `$ npm install @vscode/test-web@latest`
69+
- Update/install playwright with `$ npx playwright install`. This will be mentioned in one of the build tasks outputs.
70+
6571
## Running in [vscode.dev](https://vscode.dev)
6672

6773
The following will explain how to get your latest local development changes running in the actual `vscode.dev`. Use this if you want to test on an actual VS Code Web instance.

0 commit comments

Comments
 (0)