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

apollo-fragment-utils

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apollo-fragment-utils - npm Package Compare versions

Comparing version 0.1.3 to 0.2.0

2

lib/bundle.umd.js

@@ -14,3 +14,3 @@ (function (global, factory) {

function getFragmentInfo(fragment) {
var fragmentAST = gql(fragment);
var fragmentAST = typeof fragment === "string" ? gql(fragment) : fragment;
var fragmentDefinitions = fragmentAST.definitions && fragmentAST.definitions[0];

@@ -17,0 +17,0 @@ var fragmentName = fragmentDefinitions && fragmentDefinitions.name.value;

import { DocumentNode } from 'graphql';
export declare function getFragmentInfo(fragment: string): {
export declare function getFragmentInfo(fragment: string | DocumentNode): {
fragmentName: any;

@@ -7,5 +7,5 @@ fragmentTypeName: any;

export declare type buildFragmentQueryType = {
fragment: string;
fragment: string | DocumentNode;
fragmentName: string;
};
export declare function buildFragmentQuery({ fragment, fragmentName, }: buildFragmentQueryType): DocumentNode;

@@ -7,3 +7,3 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {

export function getFragmentInfo(fragment) {
var fragmentAST = gql(fragment);
var fragmentAST = typeof fragment === "string" ? gql(fragment) : fragment;
var fragmentDefinitions = fragmentAST.definitions && fragmentAST.definitions[0];

@@ -10,0 +10,0 @@ var fragmentName = fragmentDefinitions && fragmentDefinitions.name.value;

{
"name": "apollo-fragment-utils",
"version": "0.1.3",
"version": "0.2.0",
"description": "A set of utils to help components to GraphQL fragments",

@@ -20,4 +20,3 @@ "author": "Abhi Aiyer <abhiaiyer91@gmail.com>",

"scripts": {
"build:browser":
"browserify ./lib/bundle.umd.js -o=./lib/bundle.js --i apollo-link --i apollo-utilities --i graphql-anywhere && npm run minify:browser",
"build:browser": "browserify ./lib/bundle.umd.js -o=./lib/bundle.js --i apollo-link --i apollo-utilities --i graphql-anywhere && npm run minify:browser",
"build": "tsc -p .",

@@ -28,8 +27,6 @@ "bundle": "rollup -c",

"prelint": "npm run lint-fix",
"lint-fix":
"prettier --trailing-comma all --single-quote --write \"src/**/*.{j,t}s*\"",
"lint-fix": "prettier --trailing-comma all --single-quote --write \"src/**/*.{j,t}s*\"",
"lint": "tslint --type-check -p tsconfig.json -c tslint.json src/*.ts",
"lint-staged": "lint-staged",
"minify:browser":
"uglifyjs -c -m -o ./lib/bundle.min.js -- ./lib/bundle.js",
"minify:browser": "uglifyjs -c -m -o ./lib/bundle.min.js -- ./lib/bundle.js",
"postbuild": "npm run bundle",

@@ -61,2 +58,3 @@ "prebuild": "npm run clean",

"graphql-tag": "2.5.0",
"jest": "21.2.1",
"lint-staged": "4.3.0",

@@ -77,2 +75,15 @@ "pre-commit": "1.2.2",

},
"jest": {
"mapCoverage": true,
"transform": {
".(ts|tsx)": "<rootDir>/node_modules/ts-jest/preprocessor.js"
},
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"json"
]
},
"lint-staged": {

@@ -87,5 +98,8 @@ "*.ts*": [

],
"*.json*": ["prettier --write", "git add"]
"*.json*": [
"prettier --write",
"git add"
]
},
"pre-commit": "lint-staged"
}

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