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 0.0.14 to 0.0.15

screenshot-v0.0.14.png

38

CHANGELOG.md
# Changelog
### Breaking changes
### Deprecations
### New features
### Bug fixes
## 0.0.15 (August 28th, 2017)
### Bug fixes
- Fix crash when `graphql-schema-linter` is given an invalid schema. [#42](https://github.com/cjoudrey/graphql-schema-linter/pull/42)
## 0.0.14 (August 27th, 2017)
### Bug fixes
- Do not require descriptions on type extension definitions. [#41](https://github.com/cjoudrey/graphql-schema-linter/pull/41)

@@ -9,2 +25,4 @@

### New features
- Add support for schemas that are split amongst multiple files. [#39](https://github.com/cjoudrey/graphql-schema-linter/pull/39)

@@ -15,2 +33,4 @@ - Add what `file` an error occurred in to `JSONFormatter` output. [#39](https://github.com/cjoudrey/graphql-schema-linter/pull/39)

### New features
- Add `enum-values-all-caps` rule. [#30](https://github.com/cjoudrey/graphql-schema-linter/pull/30) (Thanks @goldcaddy77)

@@ -20,2 +40,4 @@

### Deprecations
- Deprecate `--only` and `--except` in favour of `--rules`. [#29](https://github.com/cjoudrey/graphql-schema-linter/pull/29)

@@ -25,2 +47,4 @@

### New features
- Add ability to configure `graphql-schema-linter` via configuration files. [#26](https://github.com/cjoudrey/graphql-schema-linter/pull/26) (Thanks @goldcaddy77)

@@ -30,2 +54,4 @@

### Bug fixes
- Fix a bug where the wrong location (column/line) was being reported for `DeprecationsHaveAReason` rule. [#13](https://github.com/cjoudrey/graphql-schema-linter/issues/13)

@@ -36,2 +62,4 @@ - Fix a bug where the wrong location (column/line) was being reported for `TypesAreCapitalized` rule. [#14](https://github.com/cjoudrey/graphql-schema-linter/issues/14)

### New features
- Add `defined-types-are-used` rule. [#24](https://github.com/cjoudrey/graphql-schema-linter/pull/24)

@@ -41,2 +69,4 @@

### Deprecations
- Rule names passed to `--only` and `--except` should now be passed in kebab-case instead of UpperCamelCase. [#19](https://github.com/cjoudrey/graphql-schema-linter/pull/19)

@@ -46,2 +76,4 @@

### New features
- Add `EnumValuesSortedAlphabetically` rule. [#15](https://github.com/cjoudrey/graphql-schema-linter/pull/15) (Thanks @goldcaddy77)

@@ -51,2 +83,4 @@

### New features
- Add some color to `--text` output format.

@@ -56,2 +90,4 @@

### New features
- Added `--only` and `--except` to control what rules get used to validate the schema.

@@ -63,2 +99,4 @@ - Added `--help` and usage.

### New features
- Exit code is `1` when a linter rule failed against the provided schema. Otherwise exit code will be `0`.

@@ -65,0 +103,0 @@

16

lib/runner.js

@@ -18,2 +18,4 @@ 'use strict';

var _error = require('graphql/error');
var _figures = require('figures');

@@ -47,4 +49,16 @@

var errors = (0, _validator.validateSchemaDefinition)(schema, rules);
var errors;
try {
errors = (0, _validator.validateSchemaDefinition)(schema, rules);
} catch (e) {
if (e instanceof _error.GraphQLError) {
stderr.write(_chalk2.default.red(_figures2.default.cross + ' An error occurred while parsing the GraphQL schema:\n\n'));
stderr.write(String(e));
return 2;
}
throw e;
}
var groupedErrors = groupErrorsBySchemaFilePath(errors, schemaSourceMap);

@@ -51,0 +65,0 @@

2

package.json
{
"name": "graphql-schema-linter",
"version": "0.0.14",
"version": "0.0.15",
"description": "Command line tool and package to validate GraphQL schemas against a set of rules.",

@@ -5,0 +5,0 @@ "author": "Christian Joudrey",

@@ -5,3 +5,3 @@ # 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)

![](https://raw.githubusercontent.com/cjoudrey/graphql-schema-linter/master/screenshot-v0.0.13.png)
![](https://raw.githubusercontent.com/cjoudrey/graphql-schema-linter/master/screenshot-v0.0.14.png)

@@ -8,0 +8,0 @@ If you're looking to lint your GraphQL queries, check out this ESLint plugin: [apollographql/eslint-plugin-graphql](https://github.com/apollographql/eslint-plugin-graphql).

Sorry, the diff of this file is not supported yet

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