graphql-schema-linter
Advanced tools
Comparing version 2.0.2 to 3.0.0
# Changelog | ||
## 3.0.0 (May 6th, 2022) | ||
### Breaking changes | ||
- `graphql` has been moved to `peerDependencies` in order to more flexible. This should help projects that were previously unable to upgrade the `graphql` package due to `graphql-schema-linter` requiring `graphql` v15. Usage information for this tool has been updated in the `README.md` to reflect this change. [#298](https://github.com/cjoudrey/graphql-schema-linter/pull/298) (Thanks @dchambers) | ||
## 2.0.2 (May 5th, 2022) | ||
@@ -4,0 +10,0 @@ |
@@ -8,3 +8,3 @@ "use strict"; | ||
var _extendSchema = require("graphql/utilities/extendSchema"); | ||
var _getDescription = require("../util/getDescription"); | ||
@@ -19,3 +19,3 @@ var _validation_error = require("../validation_error"); | ||
for (const arg of node.arguments || []) { | ||
const description = (0, _extendSchema.getDescription)(arg, { | ||
const description = (0, _getDescription.getDescription)(arg, { | ||
commentDescriptions: configuration.getCommentDescriptions() | ||
@@ -22,0 +22,0 @@ }); |
@@ -8,4 +8,2 @@ "use strict"; | ||
var _buildASTSchema = require("graphql/utilities/buildASTSchema"); | ||
var _validation_error = require("../validation_error"); | ||
@@ -12,0 +10,0 @@ |
@@ -8,3 +8,3 @@ "use strict"; | ||
var _extendSchema = require("graphql/utilities/extendSchema"); | ||
var _getDescription = require("../util/getDescription"); | ||
@@ -16,3 +16,3 @@ var _validation_error = require("../validation_error"); | ||
FieldDefinition(node, key, parent, path, ancestors) { | ||
const description = (0, _extendSchema.getDescription)(node, { | ||
const description = (0, _getDescription.getDescription)(node, { | ||
commentDescriptions: configuration.getCommentDescriptions() | ||
@@ -19,0 +19,0 @@ }); // Rule should pass if there's an empty/missing string description. If empty |
@@ -8,3 +8,3 @@ "use strict"; | ||
var _extendSchema = require("graphql/utilities/extendSchema"); | ||
var _getDescription = require("../util/getDescription"); | ||
@@ -16,3 +16,3 @@ var _validation_error = require("../validation_error"); | ||
EnumValueDefinition(node, key, parent, path, ancestors) { | ||
if ((0, _extendSchema.getDescription)(node, { | ||
if ((0, _getDescription.getDescription)(node, { | ||
commentDescriptions: configuration.getCommentDescriptions() | ||
@@ -19,0 +19,0 @@ })) { |
@@ -8,3 +8,3 @@ "use strict"; | ||
var _extendSchema = require("graphql/utilities/extendSchema"); | ||
var _getDescription = require("../util/getDescription"); | ||
@@ -16,3 +16,3 @@ var _validation_error = require("../validation_error"); | ||
FieldDefinition(node, key, parent, path, ancestors) { | ||
if ((0, _extendSchema.getDescription)(node, { | ||
if ((0, _getDescription.getDescription)(node, { | ||
commentDescriptions: configuration.getCommentDescriptions() | ||
@@ -19,0 +19,0 @@ })) { |
@@ -8,3 +8,3 @@ "use strict"; | ||
var _extendSchema = require("graphql/utilities/extendSchema"); | ||
var _getDescription = require("../util/getDescription"); | ||
@@ -16,3 +16,3 @@ var _validation_error = require("../validation_error"); | ||
InputValueDefinition(node, key, parent, path, ancestors) { | ||
if ((0, _extendSchema.getDescription)(node, { | ||
if ((0, _getDescription.getDescription)(node, { | ||
commentDescriptions: configuration.getCommentDescriptions() | ||
@@ -19,0 +19,0 @@ })) { |
@@ -8,3 +8,3 @@ "use strict"; | ||
var _extendSchema = require("graphql/utilities/extendSchema"); | ||
var _getDescription = require("../util/getDescription"); | ||
@@ -14,3 +14,3 @@ var _validation_error = require("../validation_error"); | ||
function validateTypeHasDescription(configuration, context, node, typeKind) { | ||
if ((0, _extendSchema.getDescription)(node, { | ||
if ((0, _getDescription.getDescription)(node, { | ||
commentDescriptions: configuration.getCommentDescriptions() | ||
@@ -17,0 +17,0 @@ })) { |
{ | ||
"name": "graphql-schema-linter", | ||
"version": "2.0.2", | ||
"version": "3.0.0", | ||
"description": "Command line tool and package to validate GraphQL schemas against a set of rules.", | ||
@@ -8,3 +8,7 @@ "author": "Christian Joudrey", | ||
"scripts": { | ||
"test": "mocha test/index.js", | ||
"test": "mocha test/index.js && yarn test:integration", | ||
"test:integration": "node -e 'console.log(\"GraphQL version: \", require(\"graphql\").version);' node lib/cli.js --version && node lib/cli.js test/fixtures/valid.graphql && (cat test/fixtures/valid.graphql | node lib/cli.js --stdin)", | ||
"test:ci": "yarn test && yarn test:ci:graphql-v15.x && yarn test:ci:graphql-v16.x", | ||
"test:ci:graphql-v15.x": "yarn upgrade graphql@^15.0.0 && yarn test", | ||
"test:ci:graphql-v16.x": "yarn upgrade graphql@^16.0.0 && yarn test", | ||
"prepare": "rm -rf lib/* && babel ./src --ignore test --out-dir ./lib" | ||
@@ -20,2 +24,5 @@ }, | ||
}, | ||
"peerDependencies": { | ||
"graphql": "^15.0.0 || ^16.0.0" | ||
}, | ||
"devDependencies": { | ||
@@ -26,4 +33,5 @@ "@babel/cli": "^7.8.4", | ||
"@babel/register": "^7.9.0", | ||
"graphql": "=15.0.0", | ||
"husky": "4.3.0", | ||
"lint-staged": "10.5.3", | ||
"lint-staged": "10.5.4", | ||
"mocha": "8.2.1", | ||
@@ -50,4 +58,3 @@ "prettier": "2.2.1" | ||
"cosmiconfig": "^5.2.1", | ||
"glob": "^7.1.2", | ||
"graphql": "^15.0.0" | ||
"glob": "^7.1.2" | ||
}, | ||
@@ -54,0 +61,0 @@ "bin": { |
@@ -11,12 +11,22 @@ # graphql-schema-linter [![Travis CI](https://travis-ci.org/cjoudrey/graphql-schema-linter.svg?branch=master)](https://travis-ci.org/cjoudrey/graphql-schema-linter) [![npm version](https://badge.fury.io/js/graphql-schema-linter.svg)](https://yarnpkg.com/en/package/graphql-schema-linter) | ||
Yarn: | ||
`graphql-schema-linter` depends on `graphql` as a peer dependency. | ||
In order to use `graphql-schema-linter`, you can either add it to an existing project that uses the `graphql` package: | ||
``` | ||
yarn global add graphql-schema-linter | ||
# Using yarn | ||
yarn add graphql-schema-linter | ||
# Using npm | ||
npm install --save graphql-schema-linter | ||
``` | ||
npm: | ||
Or, you may install it globally along side `graphql`: | ||
``` | ||
npm install -g graphql-schema-linter | ||
# Using yarn | ||
yarn global add graphql-schema-linter graphql | ||
# Using npm | ||
npm install -g graphql-schema-linter graphql | ||
``` | ||
@@ -23,0 +33,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
367878
47
1402
458
9
+ Addedgraphql@16.9.0(transitive)
- Removedgraphql@^15.0.0
- Removedgraphql@15.9.0(transitive)