Mirror: The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.

chore(build): remove modular graphql (#2551)

* remove graphql modules

* add changeset

Changed files
+11 -11
.changeset
scripts
+10
.changeset/beige-chefs-add.md
···
+
---
+
'@urql/exchange-auth': minor
+
'@urql/exchange-execute': minor
+
'@urql/exchange-graphcache': minor
+
'@urql/exchange-persisted-fetch': minor
+
'@urql/exchange-populate': minor
+
'@urql/core': minor
+
---
+
+
Remove the `babel-plugin-modular-graphql` helper, this because the graphql package hasn't converted to ESM yet which gives issues in node environments
-1
package.json
···
"@types/jest": "^26.0.23",
"@typescript-eslint/eslint-plugin": "^4.22.0",
"@typescript-eslint/parser": "^4.22.0",
-
"babel-plugin-modular-graphql": "^1.1.0",
"babel-plugin-transform-async-to-promises": "^0.8.15",
"cjs-module-lexer": "^1.2.2",
"cypress": "^9.5.1",
+1 -5
scripts/rollup/cleanup-plugin.js
···
import { transformSync as transform } from '@babel/core';
import { createFilter } from '@rollup/pluginutils';
-
import babelPluginModularGraphQL from 'babel-plugin-modular-graphql';
function removeEmptyImports({ types: t }) {
return {
···
}
return transform(code, {
-
plugins: [
-
!opts.maintainImports && [babelPluginModularGraphQL, { extension: opts.extension }],
-
removeEmptyImports
-
].filter(Boolean),
+
plugins: [removeEmptyImports],
babelrc: false
});
}
-5
yarn.lock
···
cosmiconfig "^7.0.0"
resolve "^1.19.0"
-
babel-plugin-modular-graphql@^1.1.0:
-
version "1.1.0"
-
resolved "https://registry.yarnpkg.com/babel-plugin-modular-graphql/-/babel-plugin-modular-graphql-1.1.0.tgz#d1d509913295f0320cc1ce38361b229ca04480ba"
-
integrity sha512-U9QXdxvJhxLU4YYrF7646bB4muLXWdW0sXXKrI9FkGDErqjw0utVn+Zk5W0nNXP82rAmg5vl+cv2nAyZ1dnbxg==
-
babel-plugin-named-asset-import@^0.3.1:
version "0.3.7"
resolved "https://registry.yarnpkg.com/babel-plugin-named-asset-import/-/babel-plugin-named-asset-import-0.3.7.tgz#156cd55d3f1228a5765774340937afc8398067dd"