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

chore: update ink to v3 #26190

Merged
merged 28 commits into from
Dec 15, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
8253f48
Fix most stuff
herecydev Aug 2, 2020
c399920
Whitespace
herecydev Aug 2, 2020
64577c7
Upgrade spinners
herecydev Aug 23, 2020
36305dc
Format
herecydev Aug 23, 2020
36a0622
Wrap error in text
herecydev Aug 23, 2020
606910c
Merge branch 'master' of https://github.com/herecydev/gatsby into fea…
herecydev Aug 23, 2020
579fb06
Fix devDeps
herecydev Aug 23, 2020
ab462bc
Remove ink-box
herecydev Aug 23, 2020
fd2b06f
Eslint fix
herecydev Sep 3, 2020
4309ae1
Eslint
herecydev Sep 3, 2020
20737a8
Merge remote-tracking branch 'base/master' into feature/updateInk
herecydev Sep 3, 2020
8a494fc
Eslint
herecydev Sep 3, 2020
fe32c46
Eslint
herecydev Sep 3, 2020
94661c7
Fix return type missing
herecydev Sep 3, 2020
85a9b61
Merge branch 'master' into feature/updateInk
KyleAMathews Oct 13, 2020
2d1a1d2
Merge remote-tracking branch 'origin/master' into feature/updateInk
KyleAMathews Nov 15, 2020
a833157
fix: update bundled ink
hoobdeebla Nov 30, 2020
4f0b1e2
Merge pull request #1 from hoobdeebla/feature/updateInk
herecydev Dec 4, 2020
e79c2ef
fix: update caniuse-lite so tests pass
hoobdeebla Dec 9, 2020
8c106bf
Merge pull request #2 from hoobdeebla/feature/updateInk
herecydev Dec 9, 2020
1401834
Merge remote-tracking branch 'origin/master' into feature/updateInk
pieh Dec 11, 2020
090e4b8
since we started bundling ink resolution check was almost never true …
pieh Dec 11, 2020
9e97df2
workaround rollup problem when trying to import cjs with default
pieh Dec 11, 2020
248afad
some tests should be fixed
pieh Dec 11, 2020
be334f3
ink auto wraps output, so current ln splitting won't work well - just…
pieh Dec 12, 2020
cabf8fc
fix "default" import thingies
pieh Dec 12, 2020
b8d58e2
Merge remote-tracking branch 'origin/master' into feature/updateInk
pieh Dec 13, 2020
e3ab7d1
add comment about nullable stdout
pieh Dec 15, 2020
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 packages/gatsby-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@babel/cli": "^7.12.1",
"@babel/core": "^7.12.3",
"@rollup/plugin-babel": "^5.1.0",
"@rollup/plugin-commonjs": "^14.0.0",
"@rollup/plugin-commonjs": "^17.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^8.4.0",
"@rollup/plugin-replace": "^2.3.3",
Expand All @@ -66,7 +66,7 @@
"npm-run-all": "4.1.5",
"react": "^16.8.0",
"rimraf": "^3.0.2",
"rollup": "^2.23.0",
"rollup": "^2.34.2",
"rollup-plugin-auto-external": "^2.0.0",
"rollup-plugin-internal": "^1.0.0",
"typescript": "^3.9.7"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react"
import { Box, Text } from "ink"
import * as InkSpinner from "ink-spinner"
import InkSpinner from "ink-spinner"

interface ISpinnerProps {
text: string
Expand All @@ -15,7 +15,7 @@ export function Spinner({ text, statusText }: ISpinnerProps): JSX.Element {
return (
<Box>
<Text>
<InkSpinner.default type="dots" /> {label}
<InkSpinner type="dots" /> {label}
</Text>
</Box>
)
Expand Down
4 changes: 2 additions & 2 deletions packages/gatsby-cli/src/reporter/loggers/ink/context.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState, useEffect, createContext } from "react"
import React, { useState, useLayoutEffect, createContext } from "react"
import { getStore, onLogAction } from "../../redux"
import { IGatsbyState } from "gatsby/src/redux/types"

Expand All @@ -17,7 +17,7 @@ export const StoreStateProvider: React.FC = ({
(getStore().getState() as any) as IGatsbyState
)

useEffect(
useLayoutEffect(
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems needed for quick commands (like gatsby options) that are in practice short sync ink@3 doesn't seem to run useEffect before we start printing things and result in no output in those cases

() =>
onLogAction(() => {
setState((getStore().getState() as any) as IGatsbyState)
Expand Down
4 changes: 2 additions & 2 deletions packages/gatsby-recipes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"@mdx-js/react": "^2.0.0-next.4",
"@mdx-js/runtime": "^2.0.0-next.4",
"@rollup/plugin-babel": "^5.1.0",
"@rollup/plugin-commonjs": "^14.0.0",
"@rollup/plugin-commonjs": "^17.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^8.4.0",
"@rollup/plugin-replace": "^2.3.3",
Expand All @@ -84,7 +84,7 @@
"react": "^16.12.0",
"react-reconciler": "^0.25.1",
"rimraf": "^3.0.2",
"rollup": "^2.23.0",
"rollup": "^2.34.2 ",
"rollup-plugin-auto-external": "^2.0.0",
"rollup-plugin-internal": "^1.0.0",
"subscriptions-transport-ws": "^0.9.16",
Expand Down
43 changes: 31 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3441,18 +3441,18 @@
magic-string "^0.25.2"
resolve "^1.11.0"

"@rollup/plugin-commonjs@^14.0.0":
version "14.0.0"
resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-14.0.0.tgz#4285f9ec2db686a31129e5a2b415c94aa1f836f0"
integrity sha512-+PSmD9ePwTAeU106i9FRdc+Zb3XUWyW26mo5Atr2mk82hor8+nPwkztEjFo8/B1fJKfaQDg9aM2bzQkjhi7zOw==
"@rollup/plugin-commonjs@^17.0.0":
version "17.0.0"
resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-17.0.0.tgz#2ae2228354cf0fbba6cf9f06f30b2c66a974324c"
integrity sha512-/omBIJG1nHQc+bgkYDuLpb/V08QyutP9amOrJRUSlYJZP+b/68gM//D8sxJe3Yry2QnYIr3QjR3x4AlxJEN3GA==
dependencies:
"@rollup/pluginutils" "^3.0.8"
"@rollup/pluginutils" "^3.1.0"
commondir "^1.0.1"
estree-walker "^1.0.1"
glob "^7.1.2"
is-reference "^1.1.2"
magic-string "^0.25.2"
resolve "^1.11.0"
estree-walker "^2.0.1"
glob "^7.1.6"
is-reference "^1.2.1"
magic-string "^0.25.7"
resolve "^1.17.0"

"@rollup/plugin-json@^4.1.0":
version "4.1.0"
Expand Down Expand Up @@ -10283,6 +10283,11 @@ estree-walker@^1.0.1:
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700"
integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==

estree-walker@^2.0.1:
version "2.0.2"
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac"
integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==

esutils@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
Expand Down Expand Up @@ -13996,6 +14001,13 @@ is-reference@^1.1.2:
dependencies:
"@types/estree" "0.0.39"

is-reference@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7"
integrity sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==
dependencies:
"@types/estree" "*"

is-regex@^1.0.4, is-regex@^1.1.0, is-regex@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9"
Expand Down Expand Up @@ -16246,7 +16258,7 @@ magic-string@^0.22.4:
dependencies:
vlq "^0.2.2"

magic-string@^0.25.2, magic-string@^0.25.3, magic-string@^0.25.5:
magic-string@^0.25.2, magic-string@^0.25.3, magic-string@^0.25.5, magic-string@^0.25.7:
version "0.25.7"
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051"
integrity sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==
Expand Down Expand Up @@ -22217,13 +22229,20 @@ rollup@^1, rollup@^1.32.1:
"@types/node" "*"
acorn "^7.1.0"

rollup@^2.0.0, rollup@^2.23.0:
rollup@^2.0.0:
version "2.23.0"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.23.0.tgz#b7ab1fee0c0e60132fd0553c4df1e9cdacfada9d"
integrity sha512-vLNmZFUGVwrnqNAJ/BvuLk1MtWzu4IuoqsH9UWK5AIdO3rt8/CSiJNvPvCIvfzrbNsqKbNzPAG1V2O4eTe2XZg==
optionalDependencies:
fsevents "~2.1.2"

rollup@^2.34.2, "rollup@^2.34.2 ":
version "2.34.2"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.34.2.tgz#fa73e05c64df587e9ed4dc80d7d4e7d4a43f8908"
integrity sha512-mvtQLqu3cNeoctS+kZ09iOPxrc1P1/Bt1z15enuQ5feyKOdM3MJAVFjjsygurDpSWn530xB4AlA83TWIzRstXA==
optionalDependencies:
fsevents "~2.1.2"

rss@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/rss/-/rss-1.2.2.tgz#50a1698876138133a74f9a05d2bdc8db8d27a921"
Expand Down