graphql-compose-modules
Advanced tools
Comparing version 2.0.0-beta.2 to 2.0.0-beta.3
@@ -36,3 +36,3 @@ /// <reference types="node" /> | ||
/** Scan relative directory to `module` which was provided as a first arg to directoryToAst method. By default `.` */ | ||
relativePath?: string; | ||
rootDir?: string; | ||
/** Which file extensions should be loaded. By default: .js, .ts */ | ||
@@ -39,0 +39,0 @@ extensions?: string[]; |
@@ -31,6 +31,10 @@ "use strict"; | ||
if (options === void 0) { options = exports.defaultOptions; } | ||
// @ts-ignore | ||
if (options === null || options === void 0 ? void 0 : options.relativePath) { | ||
throw new Error('graphql-compose-modules: `relativePath` option is deprecated use `rootDir` instead'); | ||
} | ||
// if no path was passed in, assume the equivalent of __dirname from caller | ||
// otherwise, resolve path relative to the equivalent of __dirname | ||
var schemaPath = (options === null || options === void 0 ? void 0 : options.relativePath) | ||
? (0, path_1.resolve)((0, path_1.dirname)(m.filename), options.relativePath) | ||
var schemaPath = (options === null || options === void 0 ? void 0 : options.rootDir) | ||
? (0, path_1.resolve)((0, path_1.dirname)(m.filename), options.rootDir) | ||
: (0, path_1.dirname)(m.filename); | ||
@@ -37,0 +41,0 @@ // setup default options |
{ | ||
"name": "graphql-compose-modules", | ||
"license": "MIT", | ||
"version": "2.0.0-beta.2", | ||
"version": "2.0.0-beta.3", | ||
"description": "A toolkit for construction GraphQL Schema via file structure", | ||
@@ -24,5 +24,5 @@ "repository": "https://github.com/graphql-compose/graphql-compose-modules", | ||
"@types/lodash.sortby": "^4.7.6", | ||
"@types/node": "16.10.2", | ||
"@typescript-eslint/eslint-plugin": "4.32.0", | ||
"@typescript-eslint/parser": "4.32.0", | ||
"@types/node": "16.10.8", | ||
"@typescript-eslint/eslint-plugin": "5.0.0", | ||
"@typescript-eslint/parser": "5.0.0", | ||
"apollo-server": "2.25.0", | ||
@@ -34,3 +34,4 @@ "eslint": "7.32.0", | ||
"graphql-compose": "9.0.3", | ||
"jest": "27.2.4", | ||
"jest": "27.2.5", | ||
"jest-junit": "^13.0.0", | ||
"lodash.sortby": "^4.7.0", | ||
@@ -41,5 +42,5 @@ "prettier": "2.4.1", | ||
"ts-jest": "27.0.5", | ||
"ts-node": "10.2.1", | ||
"ts-node": "10.3.0", | ||
"ts-node-dev": "1.1.8", | ||
"typescript": "4.4.3" | ||
"typescript": "4.4.4" | ||
}, | ||
@@ -46,0 +47,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
99748
1267
23
3