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
5 changes: 3 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ if grep -E '"resolved": "https?://' package-lock.json | grep -v registry.npmjs.o
fi

# Capture staged files so we only re-stage what the user intended to commit
# (avoids sweeping unrelated WIP into the commit)
STAGED=$(git diff --name-only --cached)
# (avoids sweeping unrelated WIP into the commit). --diff-filter=d skips
# deletions so the xargs git add below doesn't fail on removed paths.
STAGED=$(git diff --name-only --cached --diff-filter=d)

npm run build:all
npm run prettier:fix
Expand Down
4 changes: 3 additions & 1 deletion scripts/link-self.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
* so examples always type-check against the latest local types.
* See: https://github.com/npm/feedback/discussions/774
*/
import { cpSync, existsSync } from "fs";
import { cpSync, existsSync, lstatSync } from "fs";

const target = "node_modules/@modelcontextprotocol/ext-apps";
if (!existsSync(target)) process.exit(0);
// If target is a symlink (e.g. to the repo root), dist is already current.
if (lstatSync(target).isSymbolicLink()) process.exit(0);

cpSync("dist", `${target}/dist`, { recursive: true });
cpSync("package.json", `${target}/package.json`);
Loading