Skip to content

Commit

Permalink
fix(cli): execution with npx
Browse files Browse the repository at this point in the history
Npx fails because of the postinstall of didyoumean2.
We now use the separate @clerk/* packages instead of the clerk package,
this removes the indirect dependency to didyoumean2.
  • Loading branch information
sdorra committed Nov 13, 2024
1 parent ee4c97e commit 4728a43
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 88 deletions.
6 changes: 6 additions & 0 deletions .changeset/brave-flies-rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"content-collections": patch
"@content-collections/cli": patch
---

Fix cli execution with npx
5 changes: 4 additions & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
},
"dependencies": {
"@content-collections/integrations": "workspace:*",
"clerc": "^0.44.0"
"@clerc/core": "^0.44.0",
"@clerc/plugin-completions": "^0.44.0",
"@clerc/plugin-help": "^0.44.0",
"@clerc/plugin-version": "^0.44.0"
},
"devDependencies": {
"@content-collections/core": "workspace:*",
Expand Down
5 changes: 4 additions & 1 deletion packages/cli/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env node
import { Clerc, completionsPlugin, helpPlugin, versionPlugin } from "clerc";
import { Clerc } from "@clerc/core";
import { completionsPlugin } from "@clerc/plugin-completions";
import { helpPlugin } from "@clerc/plugin-help";
import { versionPlugin } from "@clerc/plugin-version";
import build from "./commands/build.js";
import watch from "./commands/watch.js";

Expand Down
5 changes: 4 additions & 1 deletion packages/content-collections/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@
"build": "tsc"
},
"dependencies": {
"@clerc/core": "^0.44.0",
"@clerc/plugin-completions": "^0.44.0",
"@clerc/plugin-help": "^0.44.0",
"@clerc/plugin-version": "^0.44.0",
"@content-collections/installer": "workspace:^",
"@inquirer/prompts": "^7.0.0",
"chalk": "^5.3.0",
"clerc": "^0.44.0",
"listr2": "^8.2.5",
"zod": "^3.23.8"
},
Expand Down
5 changes: 4 additions & 1 deletion packages/content-collections/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/usr/bin/env node

import { Clerc, completionsPlugin, helpPlugin, versionPlugin } from "clerc";
import { Clerc } from "@clerc/core";
import { completionsPlugin } from "@clerc/plugin-completions";
import { helpPlugin } from "@clerc/plugin-help";
import { versionPlugin } from "@clerc/plugin-version";
import install from "./commands/install.js";

import { createRequire } from "node:module";
Expand Down
108 changes: 24 additions & 84 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4728a43

Please sign in to comment.