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

apollo-codegen-core

Package Overview
Dependencies
Maintainers
1
Versions
168
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apollo-codegen-core - npm Package Compare versions

Comparing version 0.26.0 to 0.27.0

20

lib/loading.js

@@ -58,2 +58,5 @@ "use strict";

.map(inputPath => {
if (localfs_1.fs.lstatSync(inputPath).isDirectory()) {
return null;
}
const body = localfs_1.fs.readFileSync(inputPath, "utf8");

@@ -70,6 +73,17 @@ if (!body) {

}
return new graphql_1.Source(body, inputPath);
if (inputPath.endsWith(".graphql") || inputPath.endsWith(".gql")) {
return new graphql_1.Source(body, inputPath);
}
return null;
})
.filter(source => source);
return sources.map(source => graphql_1.parse(source));
.filter(source => source)
.map(source => {
try {
return graphql_1.parse(source);
}
catch (_a) {
return null;
}
}).filter(source => source);
return sources;
}

@@ -76,0 +90,0 @@ exports.loadQueryDocuments = loadQueryDocuments;

2

package.json
{
"name": "apollo-codegen-core",
"description": "Core generator APIs for Apollo Codegen",
"version": "0.26.0",
"version": "0.27.0",
"main": "./lib/index.js",

@@ -6,0 +6,0 @@ "scripts": {

@@ -87,2 +87,6 @@ import { fs } from "./localfs";

.map(inputPath => {
if (fs.lstatSync(inputPath).isDirectory()) {
return null;
}
const body = fs.readFileSync(inputPath, "utf8");

@@ -103,7 +107,18 @@ if (!body) {

return new Source(body, inputPath);
if (inputPath.endsWith(".graphql") || inputPath.endsWith(".gql")) {
return new Source(body, inputPath);
}
return null;
})
.filter(source => source);
.filter(source => source)
.map(source => {
try {
return parse(source!);
} catch {
return null;
}
}).filter(source => source);
return (sources as Source[]).map(source => parse(source));
return sources as DocumentNode[];
}

@@ -110,0 +125,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