graphile-search 2.14.7 → 2.16.0

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.
@@ -12,45 +12,13 @@
12
12
  * 3. Stores discovered BM25 index info in a module-level Map for use by
13
13
  * the BM25 adapter during the schema build phase
14
14
  */
15
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
- if (k2 === undefined) k2 = k;
17
- var desc = Object.getOwnPropertyDescriptor(m, k);
18
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
19
- desc = { enumerable: true, get: function() { return m[k]; } };
20
- }
21
- Object.defineProperty(o, k2, desc);
22
- }) : (function(o, m, k, k2) {
23
- if (k2 === undefined) k2 = k;
24
- o[k2] = m[k];
25
- }));
26
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
27
- Object.defineProperty(o, "default", { enumerable: true, value: v });
28
- }) : function(o, v) {
29
- o["default"] = v;
30
- });
31
- var __importStar = (this && this.__importStar) || (function () {
32
- var ownKeys = function(o) {
33
- ownKeys = Object.getOwnPropertyNames || function (o) {
34
- var ar = [];
35
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
36
- return ar;
37
- };
38
- return ownKeys(o);
39
- };
40
- return function (mod) {
41
- if (mod && mod.__esModule) return mod;
42
- var result = {};
43
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
44
- __setModuleDefault(result, mod);
45
- return result;
46
- };
47
- })();
48
15
  var __importDefault = (this && this.__importDefault) || function (mod) {
49
16
  return (mod && mod.__esModule) ? mod : { "default": mod };
50
17
  };
51
18
  Object.defineProperty(exports, "__esModule", { value: true });
52
19
  exports.Bm25CodecPreset = exports.Bm25CodecPlugin = exports.bm25ExtensionDetected = exports.bm25IndexStore = void 0;
53
20
  require("graphile-build-pg");
21
+ const pg_1 = require("pg");
54
22
  const pg_sql2_1 = __importDefault(require("pg-sql2"));
55
23
  /**
56
24
  * Module-level store for discovered BM25 indexes.
@@ -139,10 +107,8 @@ exports.Bm25CodecPlugin = {
139
107
  if (!adaptorSettings?.connectionString && !adaptorSettings?.pool) {
140
108
  return;
141
109
  }
142
- // Import pg dynamically for the discovery query
143
- const { Pool } = await Promise.resolve().then(() => __importStar(require('pg')));
144
110
  const existingPool = adaptorSettings.pool;
145
- const pool = existingPool ?? new Pool({
111
+ const pool = existingPool ?? new pg_1.Pool({
146
112
  connectionString: adaptorSettings.connectionString,
147
113
  max: 1,
148
114
  });
@@ -12,6 +12,7 @@
12
12
  * the BM25 adapter during the schema build phase
13
13
  */
14
14
  import 'graphile-build-pg';
15
+ import { Pool } from 'pg';
15
16
  import sql from 'pg-sql2';
16
17
  /**
17
18
  * Module-level store for discovered BM25 indexes.
@@ -100,8 +101,6 @@ export const Bm25CodecPlugin = {
100
101
  if (!adaptorSettings?.connectionString && !adaptorSettings?.pool) {
101
102
  return;
102
103
  }
103
- // Import pg dynamically for the discovery query
104
- const { Pool } = await import('pg');
105
104
  const existingPool = adaptorSettings.pool;
106
105
  const pool = existingPool ?? new Pool({
107
106
  connectionString: adaptorSettings.connectionString,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphile-search",
3
- "version": "2.14.7",
3
+ "version": "2.16.0",
4
4
  "description": "Unified PostGraphile v5 search plugin — abstracts tsvector, BM25, pg_trgm, and pgvector behind a single adapter-based architecture with composite searchScore",
5
5
  "author": "Constructive <developers@constructive.io>",
6
6
  "homepage": "https://github.com/constructive-io/constructive",
@@ -34,11 +34,11 @@
34
34
  "devDependencies": {
35
35
  "@types/node": "^22.19.11",
36
36
  "@types/pg": "^8.20.4",
37
- "graphile-connection-filter": "^2.14.7",
38
- "graphile-test": "^5.14.7",
37
+ "graphile-connection-filter": "^2.16.0",
38
+ "graphile-test": "^5.16.0",
39
39
  "makage": "^0.8.0",
40
40
  "pg": "^8.21.0",
41
- "pgsql-test": "^5.13.7"
41
+ "pgsql-test": "^5.15.0"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@dataplan/pg": "^1.1.1",
@@ -65,5 +65,5 @@
65
65
  "hybrid-search",
66
66
  "searchScore"
67
67
  ],
68
- "gitHead": "9bba983b38395277e0400294aaa380e586b049d4"
68
+ "gitHead": "baa84094b8541eb5000701b0060aa5b298032dc7"
69
69
  }