graphile-many-to-many 1.0.3 → 1.0.5
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 +2 -1
- package/index.js +5 -4
- package/package.json +5 -4
package/esm/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { findAndRequirePackageJson } from 'find-and-require-package-json';
|
|
2
2
|
import PgManyToManyRelationEdgeColumnsPlugin from './PgManyToManyRelationEdgeColumnsPlugin';
|
|
3
3
|
import PgManyToManyRelationEdgeTablePlugin from './PgManyToManyRelationEdgeTablePlugin';
|
|
4
4
|
import PgManyToManyRelationInflectionPlugin from './PgManyToManyRelationInflectionPlugin';
|
|
5
5
|
import PgManyToManyRelationPlugin from './PgManyToManyRelationPlugin';
|
|
6
|
+
const pkg = findAndRequirePackageJson(__dirname);
|
|
6
7
|
const PgManyToManyPlugin = (builder, options = {}) => {
|
|
7
8
|
builder.hook('build', (build) => {
|
|
8
9
|
// Check dependencies
|
package/index.js
CHANGED
|
@@ -4,25 +4,26 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.PgManyToManyPlugin = void 0;
|
|
7
|
-
const
|
|
7
|
+
const find_and_require_package_json_1 = require("find-and-require-package-json");
|
|
8
8
|
const PgManyToManyRelationEdgeColumnsPlugin_1 = __importDefault(require("./PgManyToManyRelationEdgeColumnsPlugin"));
|
|
9
9
|
const PgManyToManyRelationEdgeTablePlugin_1 = __importDefault(require("./PgManyToManyRelationEdgeTablePlugin"));
|
|
10
10
|
const PgManyToManyRelationInflectionPlugin_1 = __importDefault(require("./PgManyToManyRelationInflectionPlugin"));
|
|
11
11
|
const PgManyToManyRelationPlugin_1 = __importDefault(require("./PgManyToManyRelationPlugin"));
|
|
12
|
+
const pkg = (0, find_and_require_package_json_1.findAndRequirePackageJson)(__dirname);
|
|
12
13
|
const PgManyToManyPlugin = (builder, options = {}) => {
|
|
13
14
|
builder.hook('build', (build) => {
|
|
14
15
|
// Check dependencies
|
|
15
16
|
if (!build.versions) {
|
|
16
|
-
throw new Error(`Plugin ${
|
|
17
|
+
throw new Error(`Plugin ${pkg.name}@${pkg.version} requires graphile-build@^4.1.0 in order to check dependencies (current version: ${build.graphileBuildVersion})`);
|
|
17
18
|
}
|
|
18
19
|
const depends = (name, range) => {
|
|
19
20
|
if (!build.hasVersion(name, range)) {
|
|
20
|
-
throw new Error(`Plugin ${
|
|
21
|
+
throw new Error(`Plugin ${pkg.name}@${pkg.version} requires ${name}@${range} (${build.versions[name] ? `current version: ${build.versions[name]}` : 'not found'})`);
|
|
21
22
|
}
|
|
22
23
|
};
|
|
23
24
|
depends('graphile-build-pg', '^4.5.0');
|
|
24
25
|
// Register this plugin
|
|
25
|
-
build.versions = build.extend(build.versions, { [
|
|
26
|
+
build.versions = build.extend(build.versions, { [pkg.name]: pkg.version });
|
|
26
27
|
return build;
|
|
27
28
|
});
|
|
28
29
|
(0, PgManyToManyRelationInflectionPlugin_1.default)(builder, options);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphile-many-to-many",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Add connection fields for many-to-many relations",
|
|
5
5
|
"author": "Matt Bretl",
|
|
6
6
|
"homepage": "https://github.com/constructive-io/constructive",
|
|
@@ -37,15 +37,16 @@
|
|
|
37
37
|
"plugin"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
+
"find-and-require-package-json": "^0.8.0",
|
|
40
41
|
"graphile-build": "^4.14.1",
|
|
41
42
|
"graphile-build-pg": "^4.14.1"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
44
|
-
"graphile-test": "^2.
|
|
45
|
+
"graphile-test": "^2.10.0",
|
|
45
46
|
"graphql": "15.10.1",
|
|
46
47
|
"makage": "^0.1.8",
|
|
47
|
-
"pgsql-test": "^2.
|
|
48
|
+
"pgsql-test": "^2.16.0",
|
|
48
49
|
"postgraphile": "^4.14.1"
|
|
49
50
|
},
|
|
50
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "e4d5396a5d9154f4886176bb00c2b460b0f320e5"
|
|
51
52
|
}
|