firecrawl 4.29.0 → 4.29.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/audit-ci.jsonc CHANGED
@@ -1,12 +1,4 @@
1
1
  {
2
2
  "$schema": "https://github.com/IBM/audit-ci/raw/main/docs/schema.json",
3
- "low": true,
4
- "allowlist": [
5
- // GHSA-h67p-54hq-rp68 (js-yaml):
6
- // Jest coverage tooling still resolves a js-yaml 3.x line; the non-affected
7
- // release is 4.x, so avoid a major-crossing override in this SDK package.
8
- // Owner: team-engineering-reviewers. Tracking: create internal ticket.
9
- // Expires: 2026-06-30.
10
- "GHSA-h67p-54hq-rp68"
11
- ]
3
+ "low": true
12
4
  }
@@ -12,7 +12,7 @@ var require_package = __commonJS({
12
12
  "package.json"(exports, module) {
13
13
  module.exports = {
14
14
  name: "@mendable/firecrawl-js",
15
- version: "4.29.0",
15
+ version: "4.29.2",
16
16
  description: "JavaScript SDK for Firecrawl API",
17
17
  main: "dist/index.js",
18
18
  types: "dist/index.d.ts",
@@ -82,6 +82,7 @@ var require_package = __commonJS({
82
82
  "picomatch@<4.0.4": ">=4.0.4",
83
83
  handlebars: ">=4.7.9",
84
84
  "brace-expansion": ">=5.0.6",
85
+ "js-yaml@>=3.0.0 <3.15.0": "3.15.0",
85
86
  "axios@>=1.0.0 <1.16.0": "1.16.1",
86
87
  "follow-redirects@<1.16.0": ">=1.16.0 <2.0.0",
87
88
  "form-data@>=4.0.0 <4.0.6": "4.0.6",
package/dist/index.cjs CHANGED
@@ -39,7 +39,7 @@ var require_package = __commonJS({
39
39
  "package.json"(exports2, module2) {
40
40
  module2.exports = {
41
41
  name: "@mendable/firecrawl-js",
42
- version: "4.29.0",
42
+ version: "4.29.2",
43
43
  description: "JavaScript SDK for Firecrawl API",
44
44
  main: "dist/index.js",
45
45
  types: "dist/index.d.ts",
@@ -109,6 +109,7 @@ var require_package = __commonJS({
109
109
  "picomatch@<4.0.4": ">=4.0.4",
110
110
  handlebars: ">=4.7.9",
111
111
  "brace-expansion": ">=5.0.6",
112
+ "js-yaml@>=3.0.0 <3.15.0": "3.15.0",
112
113
  "axios@>=1.0.0 <1.16.0": "1.16.1",
113
114
  "follow-redirects@<1.16.0": ">=1.16.0 <2.0.0",
114
115
  "form-data@>=4.0.0 <4.0.6": "4.0.6",
@@ -1490,6 +1491,7 @@ function appendParam(params, key, value) {
1490
1491
  }
1491
1492
  }
1492
1493
  function withQuery(path, params) {
1494
+ params.append("origin", `js-sdk@${getVersion()}`);
1493
1495
  const qs = params.toString();
1494
1496
  return qs ? `${path}?${qs}` : path;
1495
1497
  }
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  require_package
3
- } from "./chunk-Z2MP42KG.js";
3
+ } from "./chunk-N3GO36OX.js";
4
4
 
5
5
  // src/v2/utils/httpClient.ts
6
6
  import axios from "axios";
@@ -1358,6 +1358,7 @@ function appendParam(params, key, value) {
1358
1358
  }
1359
1359
  }
1360
1360
  function withQuery(path, params) {
1361
+ params.append("origin", `js-sdk@${getVersion()}`);
1361
1362
  const qs = params.toString();
1362
1363
  return qs ? `${path}?${qs}` : path;
1363
1364
  }
@@ -2302,7 +2303,7 @@ var FirecrawlApp = class {
2302
2303
  if (typeof process !== "undefined" && process.env && process.env.npm_package_version) {
2303
2304
  return process.env.npm_package_version;
2304
2305
  }
2305
- const packageJson = await import("./package-EHFB74LL.js");
2306
+ const packageJson = await import("./package-VAY7ZMTB.js");
2306
2307
  return packageJson.default.version;
2307
2308
  } catch (error) {
2308
2309
  const isTest = typeof process !== "undefined" && (process.env.JEST_WORKER_ID != null || false);
@@ -1,4 +1,4 @@
1
1
  import {
2
2
  require_package
3
- } from "./chunk-Z2MP42KG.js";
3
+ } from "./chunk-N3GO36OX.js";
4
4
  export default require_package();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "firecrawl",
3
- "version": "4.29.0",
3
+ "version": "4.29.2",
4
4
  "description": "JavaScript SDK for Firecrawl API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -53,7 +53,8 @@ describe("research.searchPapers", () => {
53
53
  const { client, calls } = makeClient(() => ({ status: 200, data: { results: [] } }));
54
54
  await client.searchPapers("q");
55
55
  const qs = new URLSearchParams(calls[0].split("?")[1]);
56
- expect([...qs.keys()]).toEqual(["query"]);
56
+ expect([...qs.keys()]).toEqual(["query", "origin"]);
57
+ expect(qs.get("origin")).toMatch(/^js-sdk@/);
57
58
  });
58
59
 
59
60
  test("rejects empty query", async () => {
@@ -74,10 +75,14 @@ describe("research.searchPapers", () => {
74
75
  });
75
76
 
76
77
  describe("research.getPaper", () => {
77
- test("detail mode encodes the id and sends no query params", async () => {
78
+ test("detail mode encodes the id and sends only the origin param", async () => {
78
79
  const { client, calls } = makeClient(() => ({ status: 200, data: { paper: {} } }));
79
80
  await client.getPaper("arxiv:2105.05233");
80
- expect(calls[0]).toBe("/v2/search/research/papers/arxiv%3A2105.05233");
81
+ const [path, query] = calls[0].split("?");
82
+ expect(path).toBe("/v2/search/research/papers/arxiv%3A2105.05233");
83
+ const qs = new URLSearchParams(query);
84
+ expect([...qs.keys()]).toEqual(["origin"]);
85
+ expect(qs.get("origin")).toMatch(/^js-sdk@/);
81
86
  });
82
87
 
83
88
  test("read mode adds query and k", async () => {
@@ -12,6 +12,7 @@ import type {
12
12
  import { SdkError } from "../types";
13
13
  import { HttpClient } from "../utils/httpClient";
14
14
  import { throwForBadResponse } from "../utils/errorHandler";
15
+ import { getVersion } from "../utils/getVersion";
15
16
 
16
17
  const BASE = "/v2/search/research";
17
18
 
@@ -32,6 +33,9 @@ function appendParam(
32
33
  }
33
34
 
34
35
  function withQuery(path: string, params: URLSearchParams): string {
36
+ // Research endpoints are GETs, so the POST-body origin injection in
37
+ // HttpClient never applies — attach it as a query param instead.
38
+ params.append("origin", `js-sdk@${getVersion()}`);
35
39
  const qs = params.toString();
36
40
  return qs ? `${path}?${qs}` : path;
37
41
  }