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

babel-plugin-modular-graphql

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

babel-plugin-modular-graphql - npm Package Compare versions

Comparing version 0.1.3 to 1.0.0

4

import-map-overrides.json

@@ -5,3 +5,7 @@ {

"from": "graphql"
},
"executeSync": {
"local": "executeSync",
"from": "graphql"
}
}

@@ -102,2 +102,6 @@ {

},
"GraphQLSpecifiedByDirective": {
"local": "GraphQLSpecifiedByDirective",
"from": "graphql/type/directives"
},
"GraphQLString": {

@@ -135,2 +139,6 @@ "local": "GraphQLString",

},
"Location": {
"local": "Location",
"from": "graphql/language/ast"
},
"LoneAnonymousOperationRule": {

@@ -144,2 +152,6 @@ "local": "LoneAnonymousOperationRule",

},
"NoDeprecatedCustomRule": {
"local": "NoDeprecatedCustomRule",
"from": "graphql/validation/rules/custom/NoDeprecatedCustomRule"
},
"NoFragmentCyclesRule": {

@@ -149,2 +161,6 @@ "local": "NoFragmentCyclesRule",

},
"NoSchemaIntrospectionCustomRule": {
"local": "NoSchemaIntrospectionCustomRule",
"from": "graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule"
},
"NoUndefinedVariablesRule": {

@@ -194,2 +210,6 @@ "local": "NoUndefinedVariablesRule",

},
"Token": {
"local": "Token",
"from": "graphql/language/ast"
},
"TokenKind": {

@@ -435,2 +455,6 @@ "local": "TokenKind",

},
"executeSync": {
"local": "executeSync",
"from": "graphql/execution/execute"
},
"extendSchema": {

@@ -437,0 +461,0 @@ "local": "extendSchema",

9

index.js

@@ -1,2 +0,7 @@

module.exports = function babelPluginModularGraphql({ types: t }) {
module.exports = function babelPluginModularGraphql({ types: t }, options = {}) {
let extension = (options.extension || '').trim();
if (extension && extension[0] !== '.') {
extension = '.' + extension;
}
const importMap = require('./import-map.json');

@@ -24,3 +29,3 @@ const importMapOverrides = require('./import-map-overrides.json');

if (!acc[from]) {
acc[from] = t.importDeclaration([], t.stringLiteral(from));
acc[from] = t.importDeclaration([], t.stringLiteral(from + extension));
}

@@ -27,0 +32,0 @@

{
"name": "babel-plugin-modular-graphql",
"description": "Modular GraphQL.js import paths without the hassle",
"version": "0.1.3",
"version": "1.0.0",
"main": "index.js",

@@ -28,9 +28,8 @@ "author": "Phil Pluckthun <phil@kitten.sh>",

"devDependencies": {
"@rollup/plugin-node-resolve": "^7.1.3",
"acorn-walk": "^7.1.1",
"graphql": "^15.0.0",
"husky": "^4.2.5",
"lint-staged": "^10.1.3",
"prettier": "^2.0.4",
"rollup": "^2.6.1"
"@rollup/plugin-node-resolve": "^10.0.0",
"graphql": "^15.4.0",
"husky": "^4.3.0",
"lint-staged": "^10.5.0",
"prettier": "^2.1.2",
"rollup": "^2.32.1"
},

@@ -37,0 +36,0 @@ "lint-staged": {

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