From c7c72c6ab441715b035641c27f840387400122ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Zl=C3=A1mal?= Date: Mon, 2 Dec 2019 16:20:16 +0100 Subject: [PATCH] Relay: do not enforce project wide configuration This feature was requested here https://github.com/adeira/universe/issues/189 and was greatly improved in Babel itself here https://github.com/babel/babel/pull/10778. It can however be annoying and sometimes difficult to do such modification so I changed my mind and I'd like to allow it after all. It's because this code where we require "upward" mode is necessary only for Universe development and should not affect users of our NPM package. --- src/example-relay/package.json | 2 +- src/relay/bin/fetch-schema.js | 2 +- src/relay/bin/relay-compiler.js | 2 +- src/relay/package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/example-relay/package.json b/src/example-relay/package.json index 0b12f99bb0..33b26b02b8 100644 --- a/src/example-relay/package.json +++ b/src/example-relay/package.json @@ -5,7 +5,7 @@ "private": true, "dependencies": { "@adeira/fetch": "^1.0.0", - "@adeira/relay": "^0.5.0", + "@adeira/relay": "^0.6.0", "@kiwicom/orbit-components": "^0.68.0", "date-fns": "^2.8.1", "next": "^9.1.4", diff --git a/src/relay/bin/fetch-schema.js b/src/relay/bin/fetch-schema.js index 561310529f..02216c12c3 100755 --- a/src/relay/bin/fetch-schema.js +++ b/src/relay/bin/fetch-schema.js @@ -6,7 +6,7 @@ // This is here to make this `bin` available directly from our monorepo without transpiling it. require('@babel/register')({ ignore: [/node_modules\/(?!@adeira)/], - rootMode: 'upward', + rootMode: 'upward-optional', }); const fs = require('fs'); diff --git a/src/relay/bin/relay-compiler.js b/src/relay/bin/relay-compiler.js index 3fe7ed7c4f..aa3593562f 100755 --- a/src/relay/bin/relay-compiler.js +++ b/src/relay/bin/relay-compiler.js @@ -6,7 +6,7 @@ // This is here to make this `bin` available directly from our monorepo without transpiling it. require('@babel/register')({ ignore: [/node_modules\/(?!@adeira)/], - rootMode: 'upward', + rootMode: 'upward-optional', }); const program = require('commander'); diff --git a/src/relay/package.json b/src/relay/package.json index 4d5034bbd6..038ce481c2 100644 --- a/src/relay/package.json +++ b/src/relay/package.json @@ -1,7 +1,7 @@ { "name": "@adeira/relay", "private": false, - "version": "0.5.0", + "version": "0.6.0", "main": "src/index", "module": false, "sideEffects": false,