Skip to content

Commit

Permalink
fix: move from ni to nypm (#277)
Browse files Browse the repository at this point in the history
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
atinux and autofix-ci[bot] authored Sep 12, 2024
1 parent 9e2d097 commit b5a7e1f
Show file tree
Hide file tree
Showing 9 changed files with 421 additions and 566 deletions.
4 changes: 2 additions & 2 deletions docs/content/1.docs/2.features/ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ NuxtHub AI is compatible with some functions of the [Vercel AI SDK](https://sdk
Make sure to install the Vercel AI SDK in your project.

```[Terminal]
npx ni ai @ai-sdk/vue
npx nypm i ai @ai-sdk/vue
```

::note
[`ni`](https://github.com/antfu/ni) will detect your package manager and install the dependencies with it.
[`nypm`](https://github.com/unjs/nypm) will detect your package manager and install the dependencies with it.
::

### `useChat()`
Expand Down
4 changes: 2 additions & 2 deletions docs/content/1.docs/2.features/browser.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ export default defineNuxtConfig({
Lastly, install the required dependencies by running the following command:

```bash [Terminal]
npx ni @cloudflare/puppeteer puppeteer
npx nypm i @cloudflare/puppeteer puppeteer
```

::note
[ni](https://github.com/antfu/ni) will automatically detect the package manager you are using and install the dependencies.
[nypm](https://github.com/unjs/nypm) will automatically detect the package manager you are using and install the dependencies.
::

## Usage
Expand Down
2 changes: 1 addition & 1 deletion docs/content/1.docs/3.recipes/5.postgres.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The module ensures that you can connect to your PostgreSQL database using [Cloud
2. Install the [`postgres`](https://www.npmjs.com/package/postgres) NPM package in your project.

```bash
npx ni postgres
npx nypm i postgres
```

::tip{icon="i-ph-rocket-launch"}
Expand Down
2 changes: 1 addition & 1 deletion docs/content/4.changelog/hub-browser.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default defineNuxtConfig({
3. Install the required dependencies

```bash [Terminal]
npx ni @cloudflare/puppeteer puppeteer
npx nypm i @cloudflare/puppeteer puppeteer
```

4. Start using [`hubBrowser()`](/docs/features/browser) in your server routes
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"h3": "^1.12.0",
"mime": "^4.0.4",
"nitro-cloudflare-dev": "^0.1.6",
"nuxthub": "^0.5.18",
"ofetch": "^1.3.4",
"pathe": "^1.1.2",
"pkg-types": "^1.2.0",
Expand Down
2 changes: 1 addition & 1 deletion playground/server/api/browser/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default cachedEventHandler(async (event) => {
title: document.title,
description: getMetaContent('description') || getMetaContent('og:description'),
favicon: document.querySelector('link[rel="shortcut icon"]')?.href
|| document.querySelector('link[rel="icon"]')?.href,
|| document.querySelector('link[rel="icon"]')?.href,
ogImage: getMetaContent('og:image'),
origin: document.location.origin
}
Expand Down
968 changes: 411 additions & 557 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export async function setupBrowser(nuxt: Nuxt) {
}
}
if (missingDeps.length > 0) {
console.error(`Missing dependencies for \`hubBrowser()\`, please install with:\n\n\`npx ni ${missingDeps.join(' ')}\``)
console.error(`Missing dependencies for \`hubBrowser()\`, please install with:\n\n\`npx nypm i ${missingDeps.join(' ')}\``)
process.exit(1)
}
// Add Server scanning
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/browser/server/utils/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ async function getPuppeteer() {
const _pkg = 'puppeteer' // Bypass bundling!
_puppeteer = (await import(_pkg).catch(() => {
throw new Error(
'Package `puppeteer` not found, please install it with: `npx ni puppeteer`'
'Package `puppeteer` not found, please install it with: `npx nypm i puppeteer`'
)
}))
} else {
Expand Down

0 comments on commit b5a7e1f

Please sign in to comment.