@isograph/babel-plugin 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,7 +30,7 @@ let IsographConfig;
30
30
  * @returns {babel.PluginObj} */
31
31
  module.exports = function BabelPluginIsograph(context, options) {
32
32
  const result = configExplorer.searchSync(options.searchFrom);
33
- if (result) {
33
+ if (result != null) {
34
34
  IsographConfig = result;
35
35
  } else {
36
36
  throw new Error(
@@ -39,7 +39,7 @@ module.exports = function BabelPluginIsograph(context, options) {
39
39
  }
40
40
 
41
41
  const { types } = context;
42
- if (!types) {
42
+ if (types == null) {
43
43
  throw new Error(
44
44
  'BabelPluginIsograph: Expected plugin context to include "types", but got:' +
45
45
  String(context),
package/compileTag.js CHANGED
@@ -12,7 +12,11 @@ const os = require('os');
12
12
  */
13
13
  function compileTag(t, path, config) {
14
14
  const callee = path.node.callee;
15
- if (t.isIdentifier(callee) && callee.name === 'iso' && path.node.arguments) {
15
+ if (
16
+ t.isIdentifier(callee) &&
17
+ callee.name === 'iso' &&
18
+ path.node.arguments != null
19
+ ) {
16
20
  const { keyword, parentObjectEntityName, selectableName } =
17
21
  getParentObjectEntityNameAndSelectableName(path);
18
22
  if (keyword === 'entrypoint') {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@isograph/babel-plugin",
3
3
  "description": "A Babel plugin for use with Isograph applications.",
4
4
  "homepage": "https://isograph.dev",
5
- "version": "0.5.0",
5
+ "version": "0.5.1",
6
6
  "keywords": [
7
7
  "graphql",
8
8
  "isograph",