@ts-gql/tag
Advanced tools
Comparing version 0.5.1 to 0.5.2
# @ts-gql/tag | ||
## 0.5.2 | ||
### Patch Changes | ||
- [`ab25d45`](https://github.com/Thinkmill/ts-gql/commit/ab25d45bd80dfe58f878a500c92e0bdb3eef5c86) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Improve error message when `gql` is called at runtime | ||
## 0.5.1 | ||
@@ -4,0 +10,0 @@ |
@@ -6,3 +6,7 @@ 'use strict'; | ||
const gql = () => { | ||
throw new Error("Please include `@ts-gql/babel-plugin`"); | ||
if (process.env.NODE_ENV !== "production") { | ||
throw new Error("Unexpected runtime `gql` call. `gql` from `@ts-gql/tag` should never be called at runtime. This is likely happening because:\n- You haven't included `@ts-gql/babel-plugin` in your Babel config\n- This call doesn't have `as import(...)` that should be added by `@ts-gql/eslint-plugin`"); | ||
} else { | ||
throw new Error("Unexpected runtime `gql` call."); | ||
} | ||
}; | ||
@@ -9,0 +13,0 @@ const getDocumentNode = node => node; |
@@ -8,5 +8,5 @@ "use strict"; | ||
const gql = () => { | ||
throw new Error("Please include `@ts-gql/babel-plugin`"); | ||
throw new Error("Unexpected runtime `gql` call."); | ||
}, getDocumentNode = node => node; | ||
exports.getDocumentNode = getDocumentNode, exports.gql = gql; |
const gql = () => { | ||
throw new Error("Please include `@ts-gql/babel-plugin`"); | ||
if (process.env.NODE_ENV !== "production") { | ||
throw new Error("Unexpected runtime `gql` call. `gql` from `@ts-gql/tag` should never be called at runtime. This is likely happening because:\n- You haven't included `@ts-gql/babel-plugin` in your Babel config\n- This call doesn't have `as import(...)` that should be added by `@ts-gql/eslint-plugin`"); | ||
} else { | ||
throw new Error("Unexpected runtime `gql` call."); | ||
} | ||
}; | ||
@@ -4,0 +8,0 @@ const getDocumentNode = node => node; |
{ | ||
"name": "@ts-gql/tag", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"main": "dist/tag.cjs.js", | ||
@@ -5,0 +5,0 @@ "module": "dist/tag.esm.js", |
export const gql = () => { | ||
throw new Error("Please include `@ts-gql/babel-plugin`"); | ||
if (process.env.NODE_ENV !== "production") { | ||
throw new Error( | ||
"Unexpected runtime `gql` call. `gql` from `@ts-gql/tag` should never be called at runtime. This is likely happening because:\n- You haven't included `@ts-gql/babel-plugin` in your Babel config\n- This call doesn't have `as import(...)` that should be added by `@ts-gql/eslint-plugin`" | ||
); | ||
} else { | ||
throw new Error("Unexpected runtime `gql` call."); | ||
} | ||
}; | ||
export const getDocumentNode = (node) => node; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6981
93