Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

graphql-schema-linter

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-schema-linter - npm Package Compare versions

Comparing version 2.0.2 to 3.0.0

lib/util/getDescription.js

6

CHANGELOG.md
# 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 @@

4

lib/rules/arguments_have_descriptions.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc