Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump packages and rewrite webpack config to use webpack 5 #189

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
{
"plugins": ["@babel/syntax-dynamic-import"],
"presets": [
["env", {
"targets": {
"electron": "0.36",
"uglify": true
[
"@babel/preset-env",
{
"modules": false
}
}],
"stage-1",
"stage-2",
"stage-3",
"react"
],
"plugins": [
"transform-runtime"
],
"@babel/preset-react",
"@babel/preset-flow"
]
}
37 changes: 37 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Release

on:
push:
tags: 'v*'

jobs:
release:
permissions:
contents: write
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]

steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 14
- name: Install deps
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get install --no-install-recommends -y libarchive-tools
- name: Electron Builder Action
# You may pin to the exact commit or the version.
# uses: samuelmeuli/action-electron-builder@92327c67bc45ff7c38bf55d8aa8c4d75b7ea38e7
uses: samuelmeuli/[email protected]
with:
# GitHub authentication token
github_token: ${{ secrets.GITHUB_TOKEN }}
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
6 changes: 3 additions & 3 deletions app/components/App.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*global Mousetrap*/
import _ from 'lodash';
import uuid from 'uuid';
import { v4 } from 'uuid';
import React from 'react';
import ReactDOM from 'react-dom';
import GraphiQL from 'graphiql/dist';
Expand Down Expand Up @@ -76,7 +76,7 @@ export default class App extends React.Component {

this.setState({
tabs: [...this.state.tabs, {
uuid: uuid.v1(),
uuid: v4(),
headers: currentTab.headers,
endpoint: currentTab.endpoint,
method: currentTab.method
Expand Down Expand Up @@ -104,7 +104,7 @@ export default class App extends React.Component {
newTabs = [
{
name: null,
uuid: uuid.v1(),
uuid: v4(),
headers: {},
endpoint: '',
method: 'post'
Expand Down
6 changes: 5 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ var crashReporter = electron.crashReporter;
const shell = electron.shell;
var menu, template;

try {
require('electron-reloader')(module);
} catch {}

crashReporter.start({
productName: 'GraphiQL',
companyName: 'n/a',
Expand All @@ -22,7 +26,7 @@ app.on('window-all-closed', function() {

app.on('ready', function() {

mainWindow = new BrowserWindow({ width: 1024, height: 728 });
mainWindow = new BrowserWindow({ width: 1024, height: 728, webPreferences: { nodeIntegration: true, contextIsolation: false } });

electron.session.defaultSession.webRequest.onBeforeSendHeaders((details, callback) => {
details.requestHeaders['Origin'] = 'electron://graphiql-app';
Expand Down
Loading