Skip to content

fix: include dotfiles in template file uploads - #1162

Merged
mishushakov merged 2 commits into
mainfrom
mishushakov/fix-dotfile-upload
Mar 5, 2026
Merged

mishushakov merged 2 commits into
mainfrom
mishushakov/fix-dotfile-upload

Conversation

@mishushakov

@mishushakov mishushakov commented Feb 25, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Enable glob patterns to match files starting with dot (e.g., .env, .gitignore)
  • JS SDK: Add dot: true to glob calls in getAllFilesInPath
  • Python SDK: Add glob.DOTMATCH flag to glob calls in get_all_files_in_path
  • Add comprehensive tests for dotfile handling in both SDKs

Previously, the glob library defaults prevented dotfiles from being matched, preventing upload of configuration files like .env. This fix enables proper handling of dotfiles in template file uploads.

Test plan

  • ✅ All 16 JS SDK tests pass (4 new dotfile tests)
  • ✅ All 17 Python SDK tests pass (4 new dotfile tests)
  • ✅ pnpm run format passes
  • ✅ pnpm run lint passes
  • ✅ pnpm run typecheck passes

🤖 Generated with Claude Code


Note

Low Risk
Small, well-scoped change to glob options that only broadens matched file sets; main risk is unintentionally including hidden files unless excluded via ignore patterns.

Overview
Template file collection now includes dot-prefixed files and directories (e.g., .env, .gitignore, .hidden/**) when building/uploading templates.

This updates globbing in the JS SDK’s getAllFilesInPath to set dot: true (including recursive directory expansion) and the Python SDK’s get_all_files_in_path to add glob.DOTMATCH, and adds targeted tests in both SDKs to verify dotfile inclusion and that ignore patterns still exclude specified dotfiles. A changeset bumps both e2b and @e2b/python-sdk as patch releases.

Written by Cursor Bugbot for commit fc3cbcc. This will update automatically on new commits. Configure here.

Enable glob patterns to match files starting with dot (e.g., .env, .gitignore). The glob library defaults to dot: false in JS and wcmatch.glob requires DOTMATCH flag in Python, which excluded dotfiles from uploads.

- JS SDK: add dot: true to glob calls in getAllFilesInPath
- Python SDK: add glob.DOTMATCH flag to glob calls in get_all_files_in_path
- Add comprehensive tests for dotfile handling in both SDKs

Fixes issue where dotfiles could not be uploaded with templates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Feb 25, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fc3cbcc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@e2b/python-sdk Patch
e2b Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Feb 25, 2026 •

Copy link
Copy Markdown
Contributor

Package Artifacts

Built from 213fdcd. Download artifacts from this workflow run.

JS SDK (e2b@2.13.1-mishushakov-fix-dotfile-upload.0):

npm install ./e2b-2.13.1-mishushakov-fix-dotfile-upload.0.tgz

CLI (@e2b/cli@2.7.2-mishushakov-fix-dotfile-upload.0):

npm install ./e2b-cli-2.7.2-mishushakov-fix-dotfile-upload.0.tgz

Python SDK (e2b==2.14.0+mishushakov-fix-dotfile-upload):

pip install ./e2b-2.14.0+mishushakov.fix.dotfile.upload-py3-none-any.whl

@mishushakov
mishushakov merged commit 222105d into main Mar 5, 2026
17 of 23 checks passed
@mishushakov
mishushakov deleted the mishushakov/fix-dotfile-upload branch March 5, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants