Skip to content
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
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ version: 2
working_directory: /mnt/ramdisk
- &node_env
docker:
- image: node:13-alpine
- image: node:14-alpine
user: node

jobs:
Expand Down Expand Up @@ -143,7 +143,7 @@ jobs:
deploy firefox:
<<: *ramdisk
docker:
- image: node:13
- image: node:14
user: node
steps:
- checkout
Expand Down
3 changes: 2 additions & 1 deletion .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"silent": true
"silent": true,
"node": "14"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

}
1 change: 0 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"plugin:import/errors",
"plugin:import/typescript",
"prettier",
"prettier/@typescript-eslint",
"plugin:react/recommended"
],
"rules": {
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
13
14
7 changes: 4 additions & 3 deletions cosmos.override.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ module.exports = (c) => ({
alias: {
"react-error-overlay": `${__dirname}/src/panel/util/ErrorOverlay.ts`,
},
},
node: {
fs: "empty",
fallback: {
fs: false,
path: false,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non blocking - any idea what update caused us to need to use path in the browser?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am facing this issue when I build cosmos with webpack 5
image

I will upgrade electron later and check if this is still needed

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting - can you try building cosmos but changing this to be BUILD_ENV=extension - https://github.com/FormidableLabs/urql-devtools/blob/master/package.json#L25

I can't think of any good reason as to why we would want to use the electron version of the devtools in cosmos (other than me being a pleb and mixing up the two)

},
},
plugins: [
new webpack.DefinePlugin({
Expand Down
70 changes: 34 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
],
"scripts": {
"build": "yarn build:extension && yarn build:electron",
"build:electron": "export NODE_ENV=production; export BUILD_ENV=electron; yarn webpack:extension && yarn webpack:electron",
"build:electron": "export NODE_ENV=production; export BUILD_ENV=electron; yarn webpack:electron",
"build:extension": "export NODE_ENV=production; export BUILD_ENV=extension; yarn webpack:extension",
"bundle": "cd dist/extension && bestzip ../../extension.zip *",
"changelog": "docker run -it --rm -v \"$(pwd)\":/usr/local/src/your-app ferrarimarco/github-changelog-generator",
Expand Down Expand Up @@ -62,37 +62,35 @@
"ws": "^7.4.5"
},
"devDependencies": {
"@babel/core": "^7.13.16",
"@babel/core": "^7.14.0",
"@babel/plugin-proposal-class-properties": "^7.13.0",
"@babel/plugin-proposal-optional-chaining": "^7.13.12",
"@babel/preset-env": "^7.13.15",
"@babel/preset-env": "^7.14.1",
"@babel/preset-react": "^7.13.13",
"@babel/preset-typescript": "^7.13.0",
"@fortawesome/fontawesome-svg-core": "^1.2.35",
"@fortawesome/free-solid-svg-icons": "^5.15.3",
"@fortawesome/react-fontawesome": "^0.1.14",
"@types/chrome": "0.0.122",
"@types/codemirror": "0.0.97",
"@types/d3-scale": "^2.2.0",
"@types/chrome": "0.0.137",
"@types/codemirror": "5.60.0",
"@types/d3-scale": "^3.2.2",
"@types/enzyme": "^3.10.8",
"@types/fast-json-stable-stringify": "^2.0.0",
"@types/graphql": "^14.5.0",
"@types/jest": "^26.0.23",
"@types/jest-environment-puppeteer": "^4.4.1",
"@types/jest-image-snapshot": "^4.3.0",
"@types/nanoid": "^2.1.0",
"@types/prismjs": "^1.16.5",
"@types/puppeteer": "^3.0.1",
"@types/react": "^17.0.4",
"@types/react": "^17.0.5",
"@types/react-dom": "^17.0.3",
"@types/react-router": "^5.1.13",
"@types/react-router": "^5.1.14",
"@types/react-router-dom": "^5.1.7",
"@types/resize-observer-browser": "^0.1.5",
"@types/semver": "^7.3.5",
"@types/styled-components": "^5.1.9",
"@types/ws": "^7.4.1",
"@typescript-eslint/eslint-plugin": "^4.22.0",
"@typescript-eslint/parser": "^4.22.0",
"@types/ws": "^7.4.2",
"@typescript-eslint/eslint-plugin": "^4.22.1",
"@typescript-eslint/parser": "^4.22.1",
"@urql/core": "^2.0.0",
"@urql/devtools": "https://pkg.csb.dev/FormidableLabs/urql-devtools-exchange/commit/89b2a7aa/@urql/devtools",
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.1",
Expand All @@ -102,50 +100,50 @@
"babel-plugin-inline-react-svg": "andyrichardson/babel-plugin-inline-react-svg#refs",
"babel-plugin-styled-components": "^1.12.0",
"bestzip": "^2.2.0",
"clean-webpack-plugin": "^3.0.0",
"clean-webpack-plugin": "^4.0.0-alpha.0",
"codemirror": "^5.61.0",
"codemirror-graphql": "^0.12.1",
"concurrently": "^5.3.0",
"copy-webpack-plugin": "^6.1.0",
"csp-html-webpack-plugin": "^4.0.0",
"css-loader": "^3.6.0",
"codemirror-graphql": "^1.0.1",
"concurrently": "^6.0.2",
"copy-webpack-plugin": "^8.1.1",
"csp-html-webpack-plugin": "^5.1.0",
"css-loader": "^5.2.4",
"d3-scale": "^3.3.0",
"dotenv": "^8.2.0",
"dotenv": "^9.0.0",
"enzyme": "^3.11.0",
"enzyme-to-json": "^3.6.2",
"eslint": "^7.25.0",
"eslint-config-prettier": "^6.11.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-react": "^7.23.2",
"fast-json-stable-stringify": "^2.1.0",
"graphql": "^14.7.0",
"graphql-tag": "^2.11.0",
"html-webpack-plugin": "^4.4.1",
"graphql": "^15.5.0",
"graphql-tag": "^2.12.4",
"html-webpack-plugin": "^5.3.1",
"husky": "^4.2.5",
"identity-obj-proxy": "^3.0.0",
"jest": "^26.6.3",
"jest-image-snapshot": "^4.4.1",
"jest-image-snapshot": "^4.5.0",
"jest-styled-components": "^7.0.4",
"lint-staged": "^10.5.4",
"nanoid": "^3.1.22",
"polished": "^3.6.6",
"polished": "^4.1.2",
"prettier": "^2.2.1",
"puppeteer": "^3.3.0",
"puppeteer": "^9.1.1",
"react": "^17.0.2",
"react-cosmos": "5.6.2",
"react-dom": "^17.0.2",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"react-spring": "^9.1.2",
"react-spring": "^8.0.27",
"semver": "^7.3.5",
"style-loader": "^1.2.1",
"styled-components": "^5.2.3",
"terser-webpack-plugin": "^4.2.2",
"ts-jest": "^26.5.5",
"style-loader": "^2.0.0",
"styled-components": "^5.3.0",
"terser-webpack-plugin": "^5.1.1",
"ts-jest": "^26.5.6",
"typescript": "^4.2.4",
"web-ext": "^5.1.0",
"webpack": "^4.44.1",
"webpack-cli": "^3.3.12",
"webpack-node-externals": "^2.5.2"
"web-ext": "^6.1.0",
"webpack": "^5.36.2",
"webpack-cli": "^4.7.0",
"webpack-node-externals": "^3.0.0"
}
}
3 changes: 1 addition & 2 deletions src/panel/context/Explorer/ast/variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
valueFromASTUntyped,
} from "graphql";
import { Operation } from "@urql/core";
import Maybe from "graphql/tsutils/Maybe";

/** Evaluates a fields arguments taking vars into account */
export const getFieldArguments = (
Expand All @@ -27,7 +26,7 @@ export const getFieldArguments = (
/** Returns a normalized form of variables with defaulted values */
export const getNormalizedVariables = (
variableDefinitions: OperationDefinitionNode["variableDefinitions"] = [],
variables?: Maybe<Record<string, any>>
variables?: Record<string, any>
): Record<string, unknown> | undefined =>
variableDefinitions.reduce<Operation["variables"]>(
(normalized, definition) => ({
Expand Down
9 changes: 5 additions & 4 deletions src/panel/context/Request.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,18 +235,18 @@ describe("on debug message", () => {
"query": undefined,
"response": undefined,
"schema": GraphQLSchema {
"__allowedLegacyNames": Array [],
"__validationErrors": undefined,
"_directives": Array [
"@skip",
"@include",
"@skip",
"@deprecated",
"@specifiedBy",
"@populate",
],
"_implementations": Object {},
"_implementationsMap": Object {},
"_mutationType": null,
"_possibleTypeMap": Object {},
"_queryType": "Simple",
"_subTypeMap": Object {},
"_subscriptionType": null,
"_typeMap": Object {
"Boolean": "Boolean",
Expand All @@ -262,6 +262,7 @@ describe("on debug message", () => {
"__TypeKind": "__TypeKind",
},
"astNode": undefined,
"description": undefined,
"extensionASTNodes": Array [],
"extensions": undefined,
},
Expand Down
4 changes: 2 additions & 2 deletions src/panel/pages/explorer/hooks/useFlash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const flashState = { background: "rgba(255, 255, 255, 1)" };

type Flash = () => void;

type UseFlashResponse = [any, Flash];
type UseFlashResponse = [React.CSSProperties, Flash];

/** Hook for flashing a screen element */
export const useFlash = (): UseFlashResponse => {
Expand All @@ -23,5 +23,5 @@ export const useFlash = (): UseFlashResponse => {
[setSpring]
);

return [props, flash];
return [props as React.CSSProperties, flash];
};
3 changes: 1 addition & 2 deletions webpack/webpack.extension.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ module.exports = {
new TerserPlugin({
test: /\.js(\?.*)?$/i,
parallel: true,
sourceMap: true,
terserOptions: {
output: {
ascii_only: true, // Required for codemirror
Expand Down Expand Up @@ -112,7 +111,7 @@ module.exports = {
},
].filter(Boolean),
}),
isExtension && new webpack.IgnorePlugin(/electron/),
isExtension && new webpack.IgnorePlugin({ resourceRegExp: /electron/ }),
isExtension &&
new HtmlWebpackPlugin({
template: `${root}/src/extension/devtools.html`,
Expand Down
Loading