mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-06 10:48:12 +02:00
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.28.1 to 0.28.2. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/evanw/esbuild/releases">esbuild's releases</a>.</em></p> <blockquote> <h2>v0.28.2</h2> <ul> <li> <p>Fix tree shaking bug due to TypeScript import alias (<a href="https://redirect.github.com/evanw/esbuild/issues/4507">#4507</a>)</p> <p>This release fixes a bug that could cause esbuild to incorrectly tree-shake imports that are used in a TypeScript type alias under certain circumstances. Affected code uses a TypeScript-specific <code>import</code> assignment and looks something like this:</p> <pre lang="ts"><code>import Base from './dep.js'; import Alias = Base.SomeType; </code></pre> </li> <li> <p>Fix CSS minification bug involving <code>&</code> (<a href="https://redirect.github.com/evanw/esbuild/issues/4497">#4497</a>)</p> <p>This release fixes a bug where esbuild's CSS minifier incorrectly removed a <code>&</code> when it was unsafe to do so. Here is an example:</p> <pre lang="css"><code>/* Original code */ .a .b { & .b:not(& .c) { color: red; } } <p>/* Old output (with --minify) */<br /> .a .b{.b:not(& .c){color:red}}</p> <p>/* New output (with --minify) */<br /> .a .b{& .b:not(& .c){color:red}}<br /> </code></pre></p> <p>This should match <code><span class="a"><span class="b"><span class="b">yes</span></span></span></code> but not <code><span class="a"><span class="b">no</span></span></code>. The old output incorrectly matched both.</p> </li> <li> <p>Avoid overwriting input files without <code>--allow-overwrite</code> (<a href="https://redirect.github.com/evanw/esbuild/issues/4484">#4484</a>)</p> <p>For example: <code>esbuild input.js --outfile=input.js</code> tells esbuild to overwrite <code>input.js</code> with the output of running esbuild on it. This was supposed to already be prevented by default, but it accidentally regressed in version 0.17.0 and apparently didn't have any test coverage. The error message was being printed but the input file was still being overwritten. Oops.</p> <p>This release puts the original behavior back. With this release, esbuild should now actually avoid overwriting input files unless <code>--allow-overwrite</code> is explicitly present. This is done by not writing out any files when a build error is encountered.</p> </li> <li> <p>Fix incorrect code generated when using top-level await (<a href="https://redirect.github.com/evanw/esbuild/issues/4498">#4498</a>)</p> <p>Previously esbuild could generate code containing a syntax error in complex scenarios involving top-level await used in a dependency cycle. The problem was a missing <code>async</code> on one or more module wrapper closures. With this release, esbuild now uses a fixed-point iteration algorithm to correctly annotate all dependencies in the cycle as needing an <code>async</code> module wrapper.</p> </li> <li> <p>Fix a minification bug with lowered logical assignment operators (<a href="https://redirect.github.com/evanw/esbuild/issues/4508">#4508</a>)</p> <p>This release fixes a bug that could cause esbuild to generate incorrect code for logical assignment operators when lowering them to an older target environment. Specifically the lowering process requires duplicating the left-hand side, but esbuild incorrectly failed to count the duplicate as a new usage when the left-hand side is an identifier. That then caused the minifier to believe that the left-hand side was only used once and could attempt to incorrectly inline an initializer into the first usage. This bug has now been fixed:</p> <pre lang="js"><code>// Original code function foo() { let x bar(x ||= {}) </code></pre> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/evanw/esbuild/blob/main/CHANGELOG.md">esbuild's changelog</a>.</em></p> <blockquote> <h2>0.28.2</h2> <ul> <li> <p>Fix tree shaking bug due to TypeScript import alias (<a href="https://redirect.github.com/evanw/esbuild/issues/4507">#4507</a>)</p> <p>This release fixes a bug that could cause esbuild to incorrectly tree-shake imports that are used in a TypeScript type alias under certain circumstances. Affected code uses a TypeScript-specific <code>import</code> assignment and looks something like this:</p> <pre lang="ts"><code>import Base from './dep.js'; import Alias = Base.SomeType; </code></pre> </li> <li> <p>Fix CSS minification bug involving <code>&</code> (<a href="https://redirect.github.com/evanw/esbuild/issues/4497">#4497</a>)</p> <p>This release fixes a bug where esbuild's CSS minifier incorrectly removed a <code>&</code> when it was unsafe to do so. Here is an example:</p> <pre lang="css"><code>/* Original code */ .a .b { & .b:not(& .c) { color: red; } } <p>/* Old output (with --minify) */<br /> .a .b{.b:not(& .c){color:red}}</p> <p>/* New output (with --minify) */<br /> .a .b{& .b:not(& .c){color:red}}<br /> </code></pre></p> <p>This should match <code><span class="a"><span class="b"><span class="b">yes</span></span></span></code> but not <code><span class="a"><span class="b">no</span></span></code>. The old output incorrectly matched both.</p> </li> <li> <p>Avoid overwriting input files without <code>--allow-overwrite</code> (<a href="https://redirect.github.com/evanw/esbuild/issues/4484">#4484</a>)</p> <p>For example: <code>esbuild input.js --outfile=input.js</code> tells esbuild to overwrite <code>input.js</code> with the output of running esbuild on it. This was supposed to already be prevented by default, but it accidentally regressed in version 0.17.0 and apparently didn't have any test coverage. The error message was being printed but the input file was still being overwritten. Oops.</p> <p>This release puts the original behavior back. With this release, esbuild should now actually avoid overwriting input files unless <code>--allow-overwrite</code> is explicitly present. This is done by not writing out any files when a build error is encountered.</p> </li> <li> <p>Fix incorrect code generated when using top-level await (<a href="https://redirect.github.com/evanw/esbuild/issues/4498">#4498</a>)</p> <p>Previously esbuild could generate code containing a syntax error in complex scenarios involving top-level await used in a dependency cycle. The problem was a missing <code>async</code> on one or more module wrapper closures. With this release, esbuild now uses a fixed-point iteration algorithm to correctly annotate all dependencies in the cycle as needing an <code>async</code> module wrapper.</p> </li> <li> <p>Fix a minification bug with lowered logical assignment operators (<a href="https://redirect.github.com/evanw/esbuild/issues/4508">#4508</a>)</p> <p>This release fixes a bug that could cause esbuild to generate incorrect code for logical assignment operators when lowering them to an older target environment. Specifically the lowering process requires duplicating the left-hand side, but esbuild incorrectly failed to count the duplicate as a new usage when the left-hand side is an identifier. That then caused the minifier to believe that the left-hand side was only used once and could attempt to incorrectly inline an initializer into the first usage. This bug has now been fixed:</p> <pre lang="js"><code>// Original code function foo() { let x </code></pre> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/evanw/esbuild/commit/609683d892977362a0f99026cb74b96263d728a9"><code>609683d</code></a> publish 0.28.2 to npm</li> <li><a href="https://github.com/evanw/esbuild/commit/11b1fe48df6859393d9469f323b5ebd17baaf989"><code>11b1fe4</code></a> add to release notes</li> <li><a href="https://github.com/evanw/esbuild/commit/ab50d91559a27e54cd0a27a403389130ea10d97d"><code>ab50d91</code></a> css: fix green/blue channel swap in oklch gamut mapping (<a href="https://redirect.github.com/evanw/esbuild/issues/4488">#4488</a>)</li> <li><a href="https://github.com/evanw/esbuild/commit/04627b6cf99b4a7491bebb0268173a7c77a85030"><code>04627b6</code></a> fix <a href="https://redirect.github.com/evanw/esbuild/issues/4498">#4498</a>: <code>async</code> TLA checks need a worklist</li> <li><a href="https://github.com/evanw/esbuild/commit/5c15177a308c7224604058a769c4abf0a66b0a36"><code>5c15177</code></a> disable <code>gopls</code> in the <code>go</code> folder</li> <li><a href="https://github.com/evanw/esbuild/commit/fc2ee9babc5a2e8ea7ec7c10dd5850b71f7cec7e"><code>fc2ee9b</code></a> css: adjust parser to allow <code>--foo: {...}</code></li> <li><a href="https://github.com/evanw/esbuild/commit/209db54371e62ad1c50e12e56bb93c74c53b0408"><code>209db54</code></a> release notes for css nesting bugfix</li> <li><a href="https://github.com/evanw/esbuild/commit/c625d31bf08a0647ec724bf76c7115f7aec55971"><code>c625d31</code></a> fix <a href="https://redirect.github.com/evanw/esbuild/issues/4497">#4497</a>: preserve nested ampersands during minification (<a href="https://redirect.github.com/evanw/esbuild/issues/4500">#4500</a>)</li> <li><a href="https://github.com/evanw/esbuild/commit/34474e278528a60f58c959c0f422d2bfa6f6886d"><code>34474e2</code></a> better isolation of current part in js parser</li> <li><a href="https://github.com/evanw/esbuild/commit/07f6e8c50677e0b41e5ed726c08b0ea200b14e5b"><code>07f6e8c</code></a> fix <a href="https://redirect.github.com/evanw/esbuild/issues/4507">#4507</a>: <code>import</code> assignment tree-shaking bug</li> <li>Additional commits viewable in <a href="https://github.com/evanw/esbuild/compare/v0.28.1...v0.28.2">compare view</a></li> </ul> </details> <br /> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
File Browser Example Plugin
Example Paperclip plugin that demonstrates:
- projectSidebarItem — An optional "Files" link under each project in the sidebar that opens the project detail with this plugin’s tab selected. This is controlled by plugin settings and defaults to off.
- detailTab (entityType project) — A project detail tab with a workspace-path selector, a desktop two-column layout (file tree left, editor right), and a mobile one-panel flow with a back button from editor to file tree, including save support.
This is a repo-local example plugin for development. It should not be assumed to ship in a generic production build unless it is explicitly included.
Slots
| Slot | Type | Description |
|---|---|---|
| Files (sidebar) | projectSidebarItem |
Optional link under each project → project detail + tab. |
| Files (tab) | detailTab |
Responsive tree/editor layout with save support. |
Settings
Show Files in Sidebar— toggles the project sidebar link on or off. Defaults to off.Comment File Links— controls whether comment annotations and the comment context-menu action are shown.
Capabilities
ui.sidebar.register— project sidebar itemui.detailTab.register— project detail tabprojects.read— resolve projectproject.workspaces.read— list workspaces and read paths for file access
Worker
- getData
workspaces—ctx.projects.listWorkspaces(projectId, companyId)(ordered, primary first). - getData
fileList—{ projectId, workspaceId, directoryPath? }→ list directory entries for the workspace root or a subdirectory (Nodefs). - getData
fileContent—{ projectId, workspaceId, filePath }→ read file content using workspace-relative paths (Nodefs). - performAction
writeFile—{ projectId, workspaceId, filePath, content }→ write the current editor buffer back to disk.
Local Install (Dev)
From the repo root, build the plugin and install it by local path:
pnpm --filter @paperclipai/plugin-file-browser-example build
npx paperclipai plugin install ./packages/plugins/examples/plugin-file-browser-example
To uninstall:
npx paperclipai plugin uninstall paperclip-file-browser-example --force
Local development notes:
- Build first. The host resolves the worker from the manifest
entrypoints.worker(e.g../dist/worker.js). Runpnpm buildin the plugin directory before installing so the worker file exists. - Dev-only install path. This local-path install flow assumes this monorepo checkout is present on disk. For deployed installs, publish an npm package instead of depending on
packages/plugins/examples/...existing on the host. - Reinstall after pulling. If you installed a plugin by local path before the server stored
package_path, the plugin may show status error (worker not found). Uninstall and install again so the server persists the path and can activate the plugin. - Optional: use
paperclip-plugin-dev-serverfor UI hot-reload withdevUiUrlin plugin config.
Structure
src/manifest.ts— manifest withprojectSidebarItemanddetailTab(entityTypes["project"]).src/worker.ts— data handlers for workspaces, file list, file content.src/ui/index.tsx—FilesLink(sidebar) andFilesTab(workspace path selector + two-panel file tree/editor).