graphile-plugin-connection-filter 2.4.1 → 2.4.3

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/esm/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { findAndRequirePackageJson } from 'find-and-require-package-json';
1
2
  import ConnectionArgFilterPlugin from './ConnectionArgFilterPlugin';
2
3
  import PgConnectionArgFilterBackwardRelationsPlugin from './PgConnectionArgFilterBackwardRelationsPlugin';
3
4
  import PgConnectionArgFilterColumnsPlugin from './PgConnectionArgFilterColumnsPlugin';
@@ -8,7 +9,7 @@ import PgConnectionArgFilterLogicalOperatorsPlugin from './PgConnectionArgFilter
8
9
  import PgConnectionArgFilterOperatorsPlugin from './PgConnectionArgFilterOperatorsPlugin';
9
10
  import PgConnectionArgFilterPlugin from './PgConnectionArgFilterPlugin';
10
11
  import PgConnectionArgFilterRecordFunctionsPlugin from './PgConnectionArgFilterRecordFunctionsPlugin';
11
- import pkg from '../package.json';
12
+ const pkg = findAndRequirePackageJson(__dirname);
12
13
  const defaultOptions = {
13
14
  connectionFilterArrays: true,
14
15
  connectionFilterComputedColumns: true,
package/index.js CHANGED
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.PostGraphileConnectionFilterPlugin = void 0;
7
+ const find_and_require_package_json_1 = require("find-and-require-package-json");
7
8
  const ConnectionArgFilterPlugin_1 = __importDefault(require("./ConnectionArgFilterPlugin"));
8
9
  const PgConnectionArgFilterBackwardRelationsPlugin_1 = __importDefault(require("./PgConnectionArgFilterBackwardRelationsPlugin"));
9
10
  const PgConnectionArgFilterColumnsPlugin_1 = __importDefault(require("./PgConnectionArgFilterColumnsPlugin"));
@@ -14,7 +15,7 @@ const PgConnectionArgFilterLogicalOperatorsPlugin_1 = __importDefault(require(".
14
15
  const PgConnectionArgFilterOperatorsPlugin_1 = __importDefault(require("./PgConnectionArgFilterOperatorsPlugin"));
15
16
  const PgConnectionArgFilterPlugin_1 = __importDefault(require("./PgConnectionArgFilterPlugin"));
16
17
  const PgConnectionArgFilterRecordFunctionsPlugin_1 = __importDefault(require("./PgConnectionArgFilterRecordFunctionsPlugin"));
17
- const package_json_1 = __importDefault(require("../package.json"));
18
+ const pkg = (0, find_and_require_package_json_1.findAndRequirePackageJson)(__dirname);
18
19
  const defaultOptions = {
19
20
  connectionFilterArrays: true,
20
21
  connectionFilterComputedColumns: true,
@@ -27,17 +28,17 @@ const defaultOptions = {
27
28
  const PostGraphileConnectionFilterPlugin = (builder, configOptions = {}) => {
28
29
  builder.hook('build', (build) => {
29
30
  if (!build.versions) {
30
- throw new Error(`Plugin ${package_json_1.default.name}@${package_json_1.default.version} requires graphile-build@^4.1.0 in order to check dependencies (current version: ${build.graphileBuildVersion})`);
31
+ throw new Error(`Plugin ${pkg.name}@${pkg.version} requires graphile-build@^4.1.0 in order to check dependencies (current version: ${build.graphileBuildVersion})`);
31
32
  }
32
33
  const depends = (name, range) => {
33
34
  if (!build.hasVersion(name, range)) {
34
- throw new Error(`Plugin ${package_json_1.default.name}@${package_json_1.default.version} requires ${name}@${range} (${build.versions[name]
35
+ throw new Error(`Plugin ${pkg.name}@${pkg.version} requires ${name}@${range} (${build.versions[name]
35
36
  ? `current version: ${build.versions[name]}`
36
37
  : 'not found'})`);
37
38
  }
38
39
  };
39
40
  depends('graphile-build-pg', '^4.5.0');
40
- build.versions = build.extend(build.versions, { [package_json_1.default.name]: package_json_1.default.version });
41
+ build.versions = build.extend(build.versions, { [pkg.name]: pkg.version });
41
42
  return build;
42
43
  });
43
44
  const options = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphile-plugin-connection-filter",
3
- "version": "2.4.1",
3
+ "version": "2.4.3",
4
4
  "description": "Filtering on PostGraphile connections",
5
5
  "author": "Matt Bretl",
6
6
  "homepage": "https://github.com/constructive-io/constructive",
@@ -39,6 +39,7 @@
39
39
  "url": "https://github.com/constructive-io/constructive/issues"
40
40
  },
41
41
  "dependencies": {
42
+ "find-and-require-package-json": "^0.8.0",
42
43
  "graphile-build": "^4.14.1",
43
44
  "graphile-build-pg": "^4.14.1",
44
45
  "graphql": "15.10.1"
@@ -48,11 +49,11 @@
48
49
  },
49
50
  "devDependencies": {
50
51
  "@graphile-contrib/pg-simplify-inflector": "^6.1.0",
51
- "@types/pg": "^8.15.6",
52
- "graphile-test": "^2.9.1",
52
+ "@types/pg": "^8.16.0",
53
+ "graphile-test": "^2.9.3",
53
54
  "makage": "^0.1.6",
54
- "pg": "^8.16.0",
55
- "pgsql-test": "^2.15.1"
55
+ "pg": "^8.16.3",
56
+ "pgsql-test": "^2.15.3"
56
57
  },
57
- "gitHead": "3bfa1e2c4524664d19ebfa2baf214403821bdee9"
58
+ "gitHead": "d20ccff8c779259574a23e93abbae51234695db5"
58
59
  }