Skip to content
Merged
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
7 changes: 4 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"service": "devcontainer",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"features": {
"ghcr.io/devcontainers/features/aws-cli:1.1.1": {
"ghcr.io/devcontainers/features/aws-cli:1.1.2": {
// https://github.com/devcontainers/features/blob/main/src/aws-cli/devcontainer-feature.json
// view latest version https://raw.githubusercontent.com/aws/aws-cli/v2/CHANGELOG.rst
"version": "2.27.14"
"version": "2.32.6"
},
"ghcr.io/devcontainers/features/python:1.7.1": {
// https://github.com/devcontainers/features/blob/main/src/python/devcontainer-feature.json
Expand All @@ -19,6 +19,7 @@
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"-AmazonWebServices.aws-toolkit-vscode", // the AWS CLI feature installs this automatically, but it's causing problems in VS Code
// basic tooling
// "eamodio.gitlens@15.5.1",
"coderabbit.coderabbit-vscode@0.16.0",
Expand Down Expand Up @@ -61,5 +62,5 @@
"initializeCommand": "sh .devcontainer/initialize-command.sh",
"onCreateCommand": "sh .devcontainer/on-create-command.sh",
"postStartCommand": "sh .devcontainer/post-start-command.sh"
// Devcontainer context hash (do not manually edit this, it's managed by a pre-commit hook): 876c1d76 # spellchecker:disable-line
// Devcontainer context hash (do not manually edit this, it's managed by a pre-commit hook): 5878af82 # spellchecker:disable-line
}
45 changes: 18 additions & 27 deletions .devcontainer/windows-host-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# If you're still having issues, make sure in Windows Developer Settings that you enabled Developer Mode, and also that you set your git config to have `core.autocrlf=false` and `core.symlinks=true` globally

set -euo pipefail # Exit immediately on error
set -e # Exit immediately on error

if [ -z "$BASH_VERSION" ]; then
echo "Error: This script must be run with bash (e.g., 'bash windows-host-helper.sh')." >&2
Expand All @@ -27,38 +27,29 @@ repoName=$(basename "$gitUrl" .git)

echo "Repo name extracted as '$repoName'"

# Remove any existing subfolder with the repository name and recreate it
rm -rf "./$repoName" || true # sometimes deleting the .venv folder fails
rm -rf "./$repoName/*.md" # for some reason, sometimes md files are left behind
sudo rm -rf "./$repoName" || true
sudo rm -rf "./$repoName/*.md"
Comment on lines +30 to +31
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Line 31 is redundant and potentially problematic.

If line 30 succeeds, the directory "./$repoName" no longer exists, making the glob "./$repoName/*.md" on line 31 meaningless. With set -e enabled and depending on shell behavior, the non-matching glob could cause an error.

Remove the redundant line:

 sudo rm -rf "./$repoName" || true
-sudo rm -rf "./$repoName/*.md"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
sudo rm -rf "./$repoName" || true
sudo rm -rf "./$repoName/*.md"
sudo rm -rf "./$repoName" || true
🤖 Prompt for AI Agents
.devcontainer/windows-host-helper.sh around lines 30 to 31: remove the redundant
and potentially problematic second rm command (sudo rm -rf "./$repoName/*.md")
and keep only the directory removal (sudo rm -rf "./$repoName"); if you want to
explicitly remove markdown files without risking glob errors, replace the line
with a safe find command or a nullglob-guarded removal, but simplest fix is to
delete line 31.

mkdir -p "./$repoName"

# Create a temporary directory for cloning
tmpdir=$(mktemp -d)

# Clone the repository into a subfolder inside the temporary directory.
# This creates "$tmpdir/$repoName" with the repository's contents.
# Clone the repository into a subfolder inside the temporary directory
git clone "$gitUrl" "$tmpdir/$repoName"


SRC="$(realpath "$tmpdir/$repoName")"
DST="$(realpath "./$repoName")"

# 1) Recreate directory tree under $DST
while IFS= read -r -d '' dir; do
rel="${dir#$SRC/}" # strip leading $SRC/ → e.g. "sub/dir"
mkdir -p "$DST/$rel"
done < <(find "$SRC" -type d -print0)

# 2) Move all files into that mirror
while IFS= read -r -d '' file; do
rel="${file#$SRC/}" # e.g. "sub/dir/file.txt"
# ensure parent exists (though step 1 already did)
mkdir -p "$(dirname "$DST/$rel")"
mv "$file" "$DST/$rel"
done < <(find "$SRC" -type f -print0)

# 3) Clean up now‑empty dirs and the tmp clone
find "$SRC" -depth -type d -empty -delete
# Use rsync to merge all contents (including hidden files) from cloned repo to target
# -a: archive mode (preserves permissions, timestamps, etc.)
# -v: verbose
# --exclude: skip volume mount directories that should not be overwritten
echo "Syncing repository contents..."
rsync -av \
--exclude='node_modules' \
--exclude='.pnpm-store' \
--exclude='.venv' \
"$tmpdir/$repoName/" "./$repoName/"

# Clean up: remove the temporary directory
rm -rf "$tmpdir"

echo "Repository '$repoName' has been synced into '$DST'."
echo "Repository '$repoName' has been updated."
echo "Note: Volume mounts (node_modules, .pnpm-store, .venv) were preserved."
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ dist
**/logs/*.log.*

# macOS dev cleanliness
*.DS_Store
.DS_Store
**/.DS_Store

# Ignores specific to this repository
2 changes: 1 addition & 1 deletion extensions/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def hook(self, context: dict[Any, Any]) -> dict[Any, Any]:
context["copier_version"] = "9.11.0"
context["copier_template_extensions_version"] = "0.3.3"
#######
context["pnpm_version"] = "10.23.0"
context["pnpm_version"] = "10.24.0"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

pnpm latest version December 2025

💡 Result:

As of December 1, 2025:

  • Latest stable pnpm: v10.22.0 (released Nov 12, 2025). [1]
  • pnpm 11 is available as pre-release/alpha/dev builds (not yet stable). [2]

Sources:
[1] pnpm GitHub releases.
[2] pnpm package listings / dev builds.


Version 10.24.0 appears to be ahead of the latest stable pnpm release. As of December 2025, the latest stable version is 10.22.0 (released November 12, 2025). Verify that 10.24.0 is a valid, available release or use the correct latest stable version (10.22.0).

🤖 Prompt for AI Agents
In extensions/context.py around line 20, the pnpm_version is set to "10.24.0"
which does not match the latest stable pnpm release; update this to the correct
stable version or validate availability. Replace "10.24.0" with the verified
stable version "10.22.0" (or fetch the current stable release dynamically) and
ensure any tests or docs referencing pnpm_version are updated to the same value.

# These are duplicated in the pyproject.toml of this repository
context["pyright_version"] = "1.1.407"
context["pytest_version"] = "9.0.1"
Expand Down
11 changes: 4 additions & 7 deletions src/hash_git_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,16 @@ def compute_adler32(repo_path: Path, files: list[str]) -> int:
if not chunk:
break
checksum = zlib.adler32(chunk, checksum)
except Exception as e:
if "[Errno 21] Is a directory" in str(e):
# Ignore symlinks that on windows sometimes get confused as being directories
continue
print(f"Error reading file {file}: {e}", file=sys.stderr) # noqa: T201 # this just runs as a simple script, so using print instead of log
raise
except IsADirectoryError:
# Ignore symlinks that on windows sometimes get confused as being directories
continue

return checksum


def find_devcontainer_hash_line(lines: list[str]) -> tuple[int, str | None]:
"""Find the line index and current hash in the devcontainer.json file."""
for i in range(len(lines) - 1, -1, -1):
for i in reversed(range(len(lines))):
if lines[i].strip() == "}":
# Check the line above it
if i > 0:
Expand Down
9 changes: 5 additions & 4 deletions template/.devcontainer/devcontainer.json.jinja-base
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"dockerComposeFile": "docker-compose.yml",
"service": "devcontainer",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"features": {
"features": {{% endraw %}{% if is_child_of_copier_base_template is not defined %}{% raw %}
"ghcr.io/devcontainers/features/aws-cli:1.1.2": {
// https://github.com/devcontainers/features/blob/main/src/aws-cli/devcontainer-feature.json
// view latest version https://raw.githubusercontent.com/aws/aws-cli/v2/CHANGELOG.rst
"version": "2.31.11"
},
"version": "2.32.6",
},{% endraw %}{% endif %}{% raw %}
"ghcr.io/devcontainers/features/python:1.7.1": {
// https://github.com/devcontainers/features/blob/main/src/python/devcontainer-feature.json
"version": "{% endraw %}{{ python_version }}{% raw %}",
Expand All @@ -24,7 +24,8 @@
"customizations": {
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"extensions": [{% endraw %}{% if is_child_of_copier_base_template is not defined %}{% raw %}
"-AmazonWebServices.aws-toolkit-vscode", // the AWS CLI feature installs this automatically, but it's causing problems in VS Code{% endraw %}{% endif %}{% raw %}
// basic tooling
// "eamodio.gitlens@15.5.1",
"coderabbit.coderabbit-vscode@0.16.0",
Expand Down
3 changes: 3 additions & 0 deletions template/.github/workflows/get-values.yaml.jinja-base
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
dependabot-commit-created:
description: whether or not a commit was created on a dependabot branch
value: ${{ jobs.get-values.outputs.dependabot-commit-created }}
pr-short-num:
description: the last two digits of the PR number (to be used for fixed width naming, like Pulumi stacks)
value: ${{ jobs.get-values.outputs.pr-short-num }}

env:
PYTHONUNBUFFERED: True
Expand Down
2 changes: 1 addition & 1 deletion template/.github/workflows/pre-commit.yaml.jinja-base
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ jobs:
{% endraw %}{{ gha_linux_runner }}{% raw %}-py${{ inputs.python-version }}-node-${{ inputs.node-version}}-${{ env.cache-name }}-

- name: Run pre-commit
run: pre-commit run -a{% endraw %}
run: pre-commit run -a{% endraw %}