Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ jobs:
NODE_OPTIONS: '--max-old-space-size=8192'
AWS_TOOLKIT_TEST_CACHE_DIR: '/tmp/.vscode-test/'
AWS_TOOLKIT_TEST_USER_DIR: '/tmp/.vscode-test/user-data/'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
Expand Down Expand Up @@ -169,6 +170,7 @@ jobs:
NODE_OPTIONS: '--max-old-space-size=8192'
AWS_TOOLKIT_TEST_CACHE_DIR: '/tmp/.vscode-test/'
AWS_TOOLKIT_TEST_USER_DIR: '/tmp/.vscode-test/user-data/'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
Expand Down
4 changes: 4 additions & 0 deletions buildspec/linuxTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ env:
# followed by Error: Could not delete obsolete instance handle Error: ENOENT: no such file or directory, unlink <path>
AWS_TOOLKIT_TEST_CACHE_DIR: '/tmp/.vscode-test/'
AWS_TOOLKIT_TEST_USER_DIR: '/tmp/.vscode-test/user-data/'
# GITHUB_TOKEN should be set in the CodeBuild project environment variables
# or passed as a parameter to the build

phases:
install:
Expand All @@ -25,6 +27,8 @@ phases:
pre_build:
commands:
- export HOME=/home/codebuild-user
# produce an API key, set the GITHUB_TOKEN environment var, and vscode-ripgrep will pick it up
- export GITHUB_TOKEN=${GITHUB_TOKEN}
- bash buildspec/shared/linux-pre_build.sh

build:
Expand Down
1 change: 1 addition & 0 deletions buildspec/packageTestVsix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ phases:
pre_build:
commands:
- export HOME=/home/codebuild-user
- export GITHUB_TOKEN=${GITHUB_READONLY_TOKEN}
- bash buildspec/shared/linux-pre_build.sh

build:
Expand Down
7 changes: 7 additions & 0 deletions buildspec/shared/linux-pre_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ _SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Include common functions.
. "${_SCRIPT_DIR}/common.sh"

# Set up GitHub token for vscode-ripgrep to avoid rate limiting
if [ -n "$GITHUB_TOKEN" ]; then
echo "GITHUB_TOKEN is set. vscode-ripgrep will use this for GitHub API authentication."
else
echo "WARNING: GITHUB_TOKEN is not set. GitHub API requests may be rate-limited."
fi

# If present, log into CodeArtifact. Provides a fallback in case NPM is down.
# Should only affect tests run through Toolkits-hosted CodeBuild.
if [ "$TOOLKITS_CODEARTIFACT_DOMAIN" ] && [ "$TOOLKITS_CODEARTIFACT_REPO" ] && [ "$TOOLKITS_ACCOUNT_ID" ]; then
Expand Down
41 changes: 35 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"dependencies": {
"@types/node": "^22.7.5",
"vscode-nls": "^5.2.0",
"vscode-nls-dev": "^4.0.4"
"vscode-nls-dev": "^4.0.4",
"@vscode/ripgrep": "1.15.11"
}
}
5 changes: 5 additions & 0 deletions packages/amazonq/scripts/build/copyFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ const tasks: CopyTask[] = [
target: path.join('../../node_modules', 'web-tree-sitter', 'tree-sitter.wasm'),
destination: path.join('src', 'tree-sitter.wasm'),
},
// ripgrep binary
{
target: path.join('../../node_modules', '@vscode/ripgrep', 'bin'),
destination: 'bin/',
},
]

function copy(task: CopyTask): void {
Expand Down
Loading