Skip to content

Commit 645f360

Browse files
Release v33.4.2 from PR #737
2 parents 36c406f + c7cc4a0 commit 645f360

5 files changed

Lines changed: 15 additions & 64 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ For public Changelog covering all changes done to Pipedrive’s API, webhooks an
88

99
## [Unreleased]
1010

11+
## [33.4.2] - 2026-06-04
12+
### Fixed
13+
- Replaced dynamic imports, so now SSR is supported (ie.: NextJS with Turbopack)
14+
1115
## [33.4.1] - 2026-05-29
1216
### Fixed
1317
- Fixed double-nested response schema in `GET /api/v2/products``data` array items were incorrectly typed as a full response wrapper object instead of the product schema
@@ -1286,7 +1290,8 @@ Those fields will be formatted as "2020-07-13" instead of "2020-07-13T00:00:00.0
12861290
* Fixed `GET /goal/:id/results` error handling in case when there are no existing stages connected to specified goal
12871291
* Fixed typo in lead example response (`crrency` to `currency`)
12881292

1289-
[Unreleased]: https://github.com/pipedrive/api-docs/compare/v33.4.1...HEAD
1293+
[Unreleased]: https://github.com/pipedrive/api-docs/compare/v33.4.2...HEAD
1294+
[33.4.2]: https://github.com/pipedrive/api-docs/compare/v33.4.1...v33.4.2
12901295
[33.4.1]: https://github.com/pipedrive/api-docs/compare/v33.4.0...v33.4.1
12911296
[33.4.0]: https://github.com/pipedrive/api-docs/compare/v33.3.0...v33.4.0
12921297
[33.3.0]: https://github.com/pipedrive/api-docs/compare/v33.2.0...v33.3.0

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pipedrive",
3-
"version": "33.4.1",
3+
"version": "33.4.2",
44
"description": "Pipedrive REST client for NodeJS",
55
"license": "MIT",
66
"homepage": "https://developers.pipedrive.com",

src/versions/v1/base.ts

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import type { Configuration } from './configuration';
1818
// @ts-ignore
1919
import type { AxiosError, AxiosResponse, AxiosRequestConfig , InternalAxiosRequestConfig , AxiosInstance } from 'axios';
2020
import axios from 'axios';
21-
import { join, dirname } from 'path';
22-
import { existsSync } from 'fs';
21+
// eslint-disable-next-line @typescript-eslint/no-var-requires
22+
const _pkg = require('../../../package.json') as { version: string };
2323

2424
export const BASE_PATH = "https://api.pipedrive.com/v1".replace(/\/+$/, "");
2525

@@ -44,35 +44,8 @@ export interface RequestArgs {
4444
options: AxiosRequestConfig;
4545
}
4646

47-
const searchForPackageJson = (startPath: string): string | null => {
48-
const filePath = join(startPath, 'package.json');
49-
50-
if (existsSync(filePath)) {
51-
return filePath;
52-
}
53-
54-
const parentDir = dirname(startPath);
55-
56-
// Stop if we've reached the root directory
57-
if (parentDir.endsWith('/pipedrive') || parentDir === startPath) {
58-
return null;
59-
}
60-
61-
return searchForPackageJson(parentDir);
62-
};
63-
64-
6547
export const versionInterceptor = async (config:InternalAxiosRequestConfig) => {
66-
let version:string;
67-
try {
68-
const path = searchForPackageJson(__dirname);
69-
70-
version = path ? require(path).version : '22.x';
71-
} catch (error) {
72-
version = '22.x';
73-
}
74-
75-
config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
48+
config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${_pkg.version}`;
7649
return config;
7750
}
7851

src/versions/v2/base.ts

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import type { Configuration } from './configuration';
1818
// @ts-ignore
1919
import type { AxiosError, AxiosResponse, AxiosRequestConfig , InternalAxiosRequestConfig , AxiosInstance } from 'axios';
2020
import axios from 'axios';
21-
import { join, dirname } from 'path';
22-
import { existsSync } from 'fs';
21+
// eslint-disable-next-line @typescript-eslint/no-var-requires
22+
const _pkg = require('../../../package.json') as { version: string };
2323

2424
export const BASE_PATH = "https://api.pipedrive.com/api/v2".replace(/\/+$/, "");
2525

@@ -44,35 +44,8 @@ export interface RequestArgs {
4444
options: AxiosRequestConfig;
4545
}
4646

47-
const searchForPackageJson = (startPath: string): string | null => {
48-
const filePath = join(startPath, 'package.json');
49-
50-
if (existsSync(filePath)) {
51-
return filePath;
52-
}
53-
54-
const parentDir = dirname(startPath);
55-
56-
// Stop if we've reached the root directory
57-
if (parentDir.endsWith('/pipedrive') || parentDir === startPath) {
58-
return null;
59-
}
60-
61-
return searchForPackageJson(parentDir);
62-
};
63-
64-
6547
export const versionInterceptor = async (config:InternalAxiosRequestConfig) => {
66-
let version:string;
67-
try {
68-
const path = searchForPackageJson(__dirname);
69-
70-
version = path ? require(path).version : '22.x';
71-
} catch (error) {
72-
version = '22.x';
73-
}
74-
75-
config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
48+
config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${_pkg.version}`;
7649
return config;
7750
}
7851

0 commit comments

Comments
 (0)