Skip to content

Commit 3439b42

Browse files
committed
fix(package): ignore all dotfiles/dot-dirs and tsbuildinfo in the VSIX
The earlier per-name dot excludes (.dev/, .oxlint/) still let other gitignored dot-directories ship whenever a local `pnpm package` ran: a repo-local .pnpm-store/ (hundreds of MB), .superpowers/, and root *.tsbuildinfo all leaked into the working tree that vsce zips. Replace the piecemeal entries with a general dotfile glob. vsce runs minimatch with { dot: true } and only auto-appends /** to non-glob folder names, so a bare `.*` matches dot NAMES but not their contents. The four forms `.*` / `.*/**` / `**/.*` / `**/.*/**` cover root dotfiles, root dot-dir contents, and nested dotfiles/dot-dirs at any depth. Verified no runtime file is dot-prefixed, so nothing needed is dropped. Also exclude *.tsbuildinfo (not a dotfile). Verified end to end: pnpm package now emits a clean 7.8MB VSIX (was 21MB), the content guard passes, and installing it into code-server activates the extension and transpiles a .tssl live with no esbuild "service is no longer running" error.
1 parent 7503580 commit 3439b42

1 file changed

Lines changed: 19 additions & 31 deletions

File tree

.vscodeignore

Lines changed: 19 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,22 @@
22
# pnpm symlinks in server/node_modules are stripped by package.sh.
33
# Root node_modules is excluded below; TS plugins are injected by package.sh.
44
#
5-
# WARNING: vsce does NOT read .gitignore. A gitignored build/cache dir (e.g. .dev/)
6-
# still ships unless it is ALSO listed here. This denylist fails open - anything new
7-
# in the working tree ships by default - so scripts/verify-package-contents.sh runs at
8-
# the end of package.sh and fails the build if an unexpected path or size regresses in.
9-
10-
# Dotfiles and dotdirs
11-
.claude/
12-
.editorconfig
13-
.gitattributes
14-
.github/
15-
.gitignore
16-
.reports/
17-
.vscode/
18-
.vscode-test/
5+
# WARNING: vsce does NOT read .gitignore. A gitignored build/cache dir still ships unless
6+
# it is ALSO listed here. The dotfile glob below covers dot-prefixed caches (.dev/, .oxlint/,
7+
# .pnpm-store/, ...); a NON-dot dir added later still needs its own entry. This denylist fails
8+
# open - anything new in the working tree ships by default - so scripts/verify-package-contents.sh
9+
# runs at the end of package.sh and fails the build if an unexpected path or size regresses in.
10+
11+
# All dotfiles and dot-directories, at any depth. vsce runs minimatch with { dot: true }
12+
# and only auto-appends /** to NON-glob folder names, so a bare `.*` matches dot NAMES but
13+
# not their contents - the four forms below cover root dotfiles, root dot-dir contents, and
14+
# nested dotfiles/dot-dirs. This subsumes .git*/.vscode*/.claude/ AND every gitignored local
15+
# cache vsce would otherwise ship (.dev/ tool binaries, .oxlint/, .pnpm-store/, .superpowers/,
16+
# .pkg-inject/, .oxlintrc.json, .oxfmtrc.json). Nothing runtime is dot-prefixed.
17+
.*
18+
.*/**
19+
**/.*
20+
**/.*/**
1921

2022
# Dev files
2123
CLAUDE.md
@@ -30,6 +32,7 @@ dist/
3032
*.vsix
3133
*.tgz
3234
*.log
35+
*.tsbuildinfo
3336
**/*.map
3437
*.tmbundle
3538
*.zip
@@ -47,13 +50,6 @@ test/
4750
tmp/
4851
transpilers/
4952

50-
# Local tool/binary caches. Gitignored (so invisible to git-based reasoning) but NOT
51-
# excluded by that alone - vsce packages the working tree. .dev/ holds the dev:web
52-
# code-server bootstrap and the downloaded CI lint binaries (actionlint/zizmor/shfmt);
53-
# .oxlint/ holds the oxlint plugin cache. Neither is runtime.
54-
.dev/
55-
.oxlint/
56-
5753
# Bundled library workspaces: esbuild inlines their src/data into client/out and
5854
# server/out at build time, so nothing under them is read from disk at runtime.
5955
# (binary/binary-editor/format each had per-subdir excludes before; the wholesale
@@ -72,8 +68,6 @@ editors/
7268
AGENTS.md
7369
**/AGENTS.md
7470
**/INTERNALS.md
75-
.oxlintrc.json
76-
.oxfmtrc.json
7771
lefthook.yml
7872
stryker.conf.json
7973
tsconfig.base.json
@@ -95,10 +89,9 @@ themes/vscode-monokai.json
9589
themes/vs-seti-icon-theme.json
9690

9791
# READMEs and co-located agent instruction files in subdirectories
98-
# (root README auto-included by vsce)
92+
# (root README auto-included by vsce; nested .gitignore covered by the dotfile glob)
9993
**/README.md
10094
**/CLAUDE.md
101-
**/.gitignore
10295

10396
# Client dev files. The webview HTML/CSS assets under client/src/ ARE runtime (loaded
10497
# via webview.asWebviewUri), so client/src is kept - but its Svelte/TS/test sources are
@@ -132,11 +125,6 @@ server/node_modules/esbuild-wasm/**/*.d.ts
132125
server/node_modules/esbuild-wasm/LICENSE.md
133126
server/node_modules/esbuild-wasm/README.md
134127

135-
# pnpm internal dirs in server/node_modules (surviving after symlink strip)
136-
server/node_modules/.ignored*/
137-
138128
# Root node_modules: exclude entirely (TS plugins injected by package.sh)
129+
# (pnpm .ignored*/ dirs and the .pkg-inject/ staging dir are covered by the dotfile glob.)
139130
node_modules/
140-
141-
# Temp dir used by package.sh for zip injection
142-
.pkg-inject/

0 commit comments

Comments
 (0)