Skip to content

Commit

Permalink
fix(graphql): prepare for Rollup 3
Browse files Browse the repository at this point in the history
BREAKING CHANGES: Requires Node 14
  • Loading branch information
lukastaegert committed Oct 9, 2022
1 parent e1e6833 commit 285d42f
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 43 deletions.
2 changes: 1 addition & 1 deletion packages/graphql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

## Requirements

This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v10.0.0+) and Rollup v1.20.0+.
This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v14.0.0+) and Rollup v1.20.0+.

## Install

Expand Down
34 changes: 23 additions & 11 deletions packages/graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,16 @@
"author": "rollup",
"homepage": "https://github.com/rollup/plugins/tree/master/packages/graphql#readme",
"bugs": "https://github.com/rollup/plugins/issues",
"main": "dist/index.js",
"module": "dist/index.es.js",
"main": "./dist/cjs/index.js",
"module": "./dist/es/index.js",
"exports": {
"import": "./dist/es/index.js",
"types": "./types/index.d.ts",
"default": "./dist/cjs/index.js"
},
"engines": {
"node": ">=14.0.0"
},
"scripts": {
"build": "rollup -c",
"ci:coverage": "nyc pnpm test && nyc report --reporter=text-lcov > coverage.lcov",
Expand All @@ -32,6 +40,7 @@
},
"files": [
"dist",
"!dist/**/*.map",
"types",
"README.md",
"LICENSE"
Expand All @@ -46,22 +55,25 @@
],
"peerDependencies": {
"graphql": ">=0.9.0",
"rollup": "^1.20.0 || ^2.0.0"
"rollup": "^1.20.0||^2.0.0||^3.0.0"
},
"peerDependenciesMeta": {
"rollup": {
"optional": true
}
},
"dependencies": {
"@rollup/pluginutils": "^4.0.0",
"graphql-tag": "^2.2.2"
"@rollup/pluginutils": "^4.2.1",
"graphql-tag": "^2.12.6"
},
"devDependencies": {
"@rollup/plugin-buble": "^0.21.3",
"graphql": "^14.1.1",
"rollup": "^2.67.3"
"graphql": "^16.6.0",
"rollup": "^3.0.0-7"
},
"types": "types/index.d.ts",
"types": "./types/index.d.ts",
"ava": {
"babel": {
"compileEnhancements": false
},
"workerThreads": false,
"files": [
"!**/fixtures/**",
"!**/helpers/**",
Expand Down
13 changes: 0 additions & 13 deletions packages/graphql/rollup.config.js

This file was deleted.

14 changes: 14 additions & 0 deletions packages/graphql/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { readFileSync } from 'fs';

import buble from '@rollup/plugin-buble';

import { createConfig } from '../../shared/rollup.config.mjs';

export default {
...createConfig({
pkg: JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf8')),
external: ['graphql-tag/loader']
}),
input: 'src/index.js',
plugins: [buble()]
};
43 changes: 25 additions & 18 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 285d42f

Please sign in to comment.