Skip to content

Commit c248fb5

Browse files
authored
Merge pull request #4 from ppl-ai/release-please--branches--main--changes--next--components--perplexity_ai
2 parents 2507192 + e31191f commit c248fb5

23 files changed

+61
-44
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.0"
2+
".": "0.2.0"
33
}

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 6
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/perplexity-ai%2Fperplexity-0a20b2c1a864613083f602f3589f85caa0e39b04c29c0a37db76f6398dfd2f50.yml
33
openapi_spec_hash: 5c8d07ba17d180b472679f2b85def126
4-
config_hash: 8cb2e1b44d6e6679f8cc4e4df6f85a97
4+
config_hash: d3612805022ba4461f6399145be920d5

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## 0.2.0 (2025-09-10)
4+
5+
Full Changelog: [v0.1.0...v0.2.0](https://github.com/ppl-ai/perplexity-node/compare/v0.1.0...v0.2.0)
6+
7+
### Features
8+
9+
* **api:** manual updates ([80c06a6](https://github.com/ppl-ai/perplexity-node/commit/80c06a65cdb5673fc4c580bcb30c4b701e5d3ab7))
10+
11+
12+
### Chores
13+
14+
* update SDK settings ([f48e28e](https://github.com/ppl-ai/perplexity-node/commit/f48e28e7fc749be9ebe30c64ac9dd92ba6e9a411))
15+
316
## 0.1.0 (2025-09-10)
417

518
Full Changelog: [v0.0.1...v0.1.0](https://github.com/ppl-ai/perplexity-node/compare/v0.0.1...v0.1.0)

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ $ cd perplexity-node
5555
# With yarn
5656
$ yarn link
5757
$ cd ../my-package
58-
$ yarn link perplexity_ai
58+
$ yarn link @perplexity-ai/perplexity_ai
5959

6060
# With pnpm
6161
$ pnpm link --global
6262
$ cd ../my-package
63-
$ pnpm link -—global perplexity_ai
63+
$ pnpm link -—global @perplexity-ai/perplexity_ai
6464
```
6565

6666
## Running tests

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Perplexity TypeScript API Library
22

3-
[![NPM version](<https://img.shields.io/npm/v/perplexity_ai.svg?label=npm%20(stable)>)](https://npmjs.org/package/perplexity_ai) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/perplexity_ai)
3+
[![NPM version](<https://img.shields.io/npm/v/@perplexity-ai/perplexity_ai.svg?label=npm%20(stable)>)](https://npmjs.org/package/@perplexity-ai/perplexity_ai) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@perplexity-ai/perplexity_ai)
44

55
This library provides convenient access to the Perplexity REST API from server-side TypeScript or JavaScript.
66

@@ -11,7 +11,7 @@ It is generated with [Stainless](https://www.stainless.com/).
1111
## Installation
1212

1313
```sh
14-
npm install perplexity_ai
14+
npm install @perplexity-ai/perplexity_ai
1515
```
1616

1717
## Usage
@@ -20,7 +20,7 @@ The full API of this library can be found in [api.md](api.md).
2020

2121
<!-- prettier-ignore -->
2222
```js
23-
import Perplexity from 'perplexity_ai';
23+
import Perplexity from '@perplexity-ai/perplexity_ai';
2424

2525
const client = new Perplexity({
2626
apiKey: process.env['PERPLEXITY_API_KEY'], // This is the default and can be omitted
@@ -40,7 +40,7 @@ This library includes TypeScript definitions for all request params and response
4040

4141
<!-- prettier-ignore -->
4242
```ts
43-
import Perplexity from 'perplexity_ai';
43+
import Perplexity from '@perplexity-ai/perplexity_ai';
4444

4545
const client = new Perplexity({
4646
apiKey: process.env['PERPLEXITY_API_KEY'], // This is the default and can be omitted
@@ -172,7 +172,7 @@ The log level can be configured in two ways:
172172
2. Using the `logLevel` client option (overrides the environment variable if set)
173173

174174
```ts
175-
import Perplexity from 'perplexity_ai';
175+
import Perplexity from '@perplexity-ai/perplexity_ai';
176176

177177
const client = new Perplexity({
178178
logLevel: 'debug', // Show all log messages
@@ -200,7 +200,7 @@ When providing a custom logger, the `logLevel` option still controls which messa
200200
below the configured level will not be sent to your logger.
201201

202202
```ts
203-
import Perplexity from 'perplexity_ai';
203+
import Perplexity from '@perplexity-ai/perplexity_ai';
204204
import pino from 'pino';
205205

206206
const logger = pino();
@@ -269,7 +269,7 @@ globalThis.fetch = fetch;
269269
Or pass it to the client:
270270

271271
```ts
272-
import Perplexity from 'perplexity_ai';
272+
import Perplexity from '@perplexity-ai/perplexity_ai';
273273
import fetch from 'my-fetch';
274274

275275
const client = new Perplexity({ fetch });
@@ -280,7 +280,7 @@ const client = new Perplexity({ fetch });
280280
If you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)
281281

282282
```ts
283-
import Perplexity from 'perplexity_ai';
283+
import Perplexity from '@perplexity-ai/perplexity_ai';
284284

285285
const client = new Perplexity({
286286
fetchOptions: {
@@ -297,7 +297,7 @@ options to requests:
297297
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg" align="top" width="18" height="21"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>
298298

299299
```ts
300-
import Perplexity from 'perplexity_ai';
300+
import Perplexity from '@perplexity-ai/perplexity_ai';
301301
import * as undici from 'undici';
302302

303303
const proxyAgent = new undici.ProxyAgent('http://localhost:8888');
@@ -311,7 +311,7 @@ const client = new Perplexity({
311311
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg" align="top" width="18" height="21"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>
312312

313313
```ts
314-
import Perplexity from 'perplexity_ai';
314+
import Perplexity from '@perplexity-ai/perplexity_ai';
315315

316316
const client = new Perplexity({
317317
fetchOptions: {
@@ -323,7 +323,7 @@ const client = new Perplexity({
323323
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg" align="top" width="18" height="21"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>
324324

325325
```ts
326-
import Perplexity from 'npm:perplexity_ai';
326+
import Perplexity from 'npm:@perplexity-ai/perplexity_ai';
327327

328328
const httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });
329329
const client = new Perplexity({

eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default tseslint.config(
2525
{
2626
patterns: [
2727
{
28-
regex: '^perplexity_ai(/.*)?',
28+
regex: '^@perplexity-ai/perplexity_ai(/.*)?',
2929
message: 'Use a relative import, not a package import.',
3030
},
3131
],

jest.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ const config: JestConfigWithTsJest = {
77
'^.+\\.(t|j)sx?$': ['@swc/jest', { sourceMaps: 'inline' }],
88
},
99
moduleNameMapper: {
10-
'^perplexity_ai$': '<rootDir>/src/index.ts',
11-
'^perplexity_ai/(.*)$': '<rootDir>/src/$1',
10+
'^@perplexity-ai/perplexity_ai$': '<rootDir>/src/index.ts',
11+
'^@perplexity-ai/perplexity_ai/(.*)$': '<rootDir>/src/$1',
1212
},
1313
modulePathIgnorePatterns: [
1414
'<rootDir>/ecosystem-tests/',

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "perplexity_ai",
3-
"version": "0.1.0",
2+
"name": "@perplexity-ai/perplexity_ai",
3+
"version": "0.2.0",
44
"description": "The official TypeScript library for the Perplexity API",
55
"author": "Perplexity <>",
66
"types": "dist/index.d.ts",

scripts/build

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ node scripts/utils/check-version.cjs
88

99
# Build into dist and will publish the package from there,
1010
# so that src/resources/foo.ts becomes <package root>/resources/foo.js
11-
# This way importing from `"perplexity_ai/resources/foo"` works
11+
# This way importing from `"@perplexity-ai/perplexity_ai/resources/foo"` works
1212
# even with `"moduleResolution": "node"`
1313

1414
rm -rf dist; mkdir dist
@@ -42,8 +42,8 @@ node scripts/utils/postprocess-files.cjs
4242

4343
# make sure that nothing crashes when we require the output CJS or
4444
# import the output ESM
45-
(cd dist && node -e 'require("perplexity_ai")')
46-
(cd dist && node -e 'import("perplexity_ai")' --input-type=module)
45+
(cd dist && node -e 'require("@perplexity-ai/perplexity_ai")')
46+
(cd dist && node -e 'import("@perplexity-ai/perplexity_ai")' --input-type=module)
4747

4848
if [ -e ./scripts/build-deno ]
4949
then

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const VERSION = '0.1.0'; // x-release-please-version
1+
export const VERSION = '0.2.0'; // x-release-please-version

0 commit comments

Comments
 (0)