From 0b1d948232f488db6da0b46ed95e4985953e9d50 Mon Sep 17 00:00:00 2001 From: Pavel Grinchenko Date: Thu, 19 Mar 2020 19:32:49 +0300 Subject: [PATCH] Basic setup of TS, eslint for TS. Fix related linter errors --- .eslintrc.json | 21 +- .tmp-empty-package/index.d.ts | 0 .tmp-empty-package/package.json | 6 + gatsby-config.js | 9 + middleware/api/discourse.js | 4 +- middleware/redirects/index.js | 7 +- package.json | 23 +- .../Documentation/Markdown/lang/dvc.js | 16 +- .../Documentation/Markdown/lang/usage.js | 11 +- src/components/GithubLine/index.js | 2 +- src/components/LearnMore/styles.js | 6 +- src/components/Video/index.js | 3 - src/typings.ts | 23 ++ src/utils/redirects.js | 12 +- tsconfig.json | 16 ++ yarn.lock | 261 +++++++++++++++--- 16 files changed, 344 insertions(+), 76 deletions(-) create mode 100644 .tmp-empty-package/index.d.ts create mode 100644 .tmp-empty-package/package.json create mode 100644 src/typings.ts create mode 100644 tsconfig.json diff --git a/.eslintrc.json b/.eslintrc.json index 9a9cf75b86..0ef2f1a7f4 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,12 +1,18 @@ { "extends": [ - "eslint:recommended", - "plugin:prettier/recommended", "plugin:react/recommended", + "plugin:@typescript-eslint/recommended", + "prettier/@typescript-eslint", + "plugin:prettier/recommended", "plugin:jsx-a11y/recommended", "plugin:json/recommended" ], - "parser": "babel-eslint", + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaFeatures": { + "jsx": true // Allows for the parsing of JSX + } + }, "env": { "browser": true, "jest": true @@ -21,6 +27,13 @@ "error", { "code": 80, "ignoreTemplateLiterals": true, "ignoreUrls": true } ], - "no-tabs": "error" + "@typescript-eslint/interface-name-prefix": [ + "error", + { "prefixWithI": "always" } + ], + "no-tabs": "error", + // TODO: remove after rewriting code to TS + "@typescript-eslint/explicit-function-return-type": "warn", + "@typescript-eslint/no-var-requires": "warn" } } diff --git a/.tmp-empty-package/index.d.ts b/.tmp-empty-package/index.d.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.tmp-empty-package/package.json b/.tmp-empty-package/package.json new file mode 100644 index 0000000000..32a2f44040 --- /dev/null +++ b/.tmp-empty-package/package.json @@ -0,0 +1,6 @@ +{ + "name": "empty-package", + "version": "1.0.0", + "main": "index.js", + "license": "MIT" +} diff --git a/gatsby-config.js b/gatsby-config.js index 28821242de..9dec5408ad 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -21,6 +21,13 @@ const keywords = [ ] const plugins = [ + { + resolve: `gatsby-plugin-typescript`, + options: { + isTSX: true, + allExtensions: true + } + }, { resolve: 'gatsby-source-filesystem', options: { @@ -58,6 +65,7 @@ const plugins = [ { resolve: 'gatsby-plugin-manifest', options: { + /* eslint-disable @typescript-eslint/camelcase */ background_color: '#eff4f8', display: 'minimal-ui', icon: 'static/favicon-512x512.png', @@ -65,6 +73,7 @@ const plugins = [ short_name: 'dvc.org', start_url: '/', theme_color: '#eff4f8' + /* eslint-enable @typescript-eslint/camelcase */ } }, 'gatsby-plugin-react-helmet', diff --git a/middleware/api/discourse.js b/middleware/api/discourse.js index 9fbe2759a1..46278dc14d 100644 --- a/middleware/api/discourse.js +++ b/middleware/api/discourse.js @@ -32,10 +32,10 @@ module.exports = async (_, res) => { const data = await response.text() const { - topic_list: { topics: original_topics } + topic_list: { topics: originalTopics } } = JSON.parse(data) - const topics = original_topics.slice(0, 3).map(item => ({ + const topics = originalTopics.slice(0, 3).map(item => ({ title: item.title, comments: item.posts_count - 1, date: item.last_posted_at, diff --git a/middleware/redirects/index.js b/middleware/redirects/index.js index 5fffc9df93..11e7e55486 100644 --- a/middleware/redirects/index.js +++ b/middleware/redirects/index.js @@ -11,19 +11,20 @@ module.exports = (req, res, next) => { const { pathname, query } = parsedUrl const host = req.headers.host - let [redirectCode, redirectLocation] = getRedirect(host, pathname, { + const redirect = getRedirect(host, pathname, { req, dev }) - if (redirectLocation) { + if (redirect.redirectLocation) { // HTTP redirects + let redirectLocation = redirect.redirectLocation const queryStr = stringify(query) if (queryStr) { redirectLocation += '?' + queryStr } - res.writeHead(redirectCode, { + res.writeHead(redirect.redirectCode, { Location: redirectLocation }) diff --git a/package.json b/package.json index d5cfb533e8..ce836d5b77 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "start": "./scripts/clear-cloudflare-cache.js; NODE_ENV=production node server.js", "format-staged": "pretty-quick --staged --no-restage --bail", "format-check": "prettier --check '{.,pages/**,content/docs/**,src/**}/*.{js,md,json}'", - "lint-check": "eslint --ext .json,.js src middleware", + "lint-check": "tsc --noEmit && eslint --ext .json,.js,.ts,.tsx src middleware --quiet", "format-all": "prettier --write '{.,pages/**,content/docs/**,src/**}/*.{js,md,json}'", "format": "prettier --write", "link-check": "scripts/link-check-git-all.sh", @@ -31,6 +31,7 @@ "@octokit/graphql": "^4.3.1", "@reach/router": "^1.3.1", "@sentry/browser": "^5.12.1", + "@types/styled-components": "^5.0.1", "color": "^3.1.2", "compression": "^1.7.4", "date-fns": "^2.8.1", @@ -39,6 +40,7 @@ "express": "^4.17.1", "gatsby": "^2.20.2", "gatsby-link": "^2.3.0", + "gatsby-plugin-typescript": "^2.2.5", "gatsby-plugin-webpack-bundle-analyzer": "^1.0.5", "github-markdown-css": "^3.0.1", "isomorphic-fetch": "^2.2.1", @@ -56,7 +58,7 @@ "prop-types": "^15.7.2", "react": "^16.12.0", "react-collapse": "^5.0.1", - "react-collapsible": "^2.6.2", + "react-collapsible": "^2.7.0", "react-dom": "^16.12.0", "react-ga": "^2.7.0", "react-helmet": "^5.2.1", @@ -71,10 +73,13 @@ "slick-carousel": "^1.8.1", "styled-components": "^4.4.1", "styled-reset": "^4.0.8", - "unist-util-visit": "2.0.1" + "unist-util-visit": "2.0.2" }, "devDependencies": { "@babel/core": "^7.7.7", + "@types/vfile-message": "^1.0.1", + "@typescript-eslint/eslint-plugin": "^2.24.0", + "@typescript-eslint/parser": "^2.24.0", "babel-eslint": "^10.0.3", "babel-jest": "^24.9.0", "babel-plugin-styled-components": "^1.10.7", @@ -99,19 +104,23 @@ "gatsby-remark-prismjs": "^3.3.31", "gatsby-remark-smartypants": "^2.1.21", "gatsby-source-filesystem": "^2.1.48", - "gatsby-transformer-remark": "^2.6.53", + "gatsby-transformer-remark": "^2.6.59", "husky": "^4.0.10", "jest": "^24.9.0", "lint-staged": "^10.0.0", "prettier": "^1.19.1", - "pretty-quick": "^2.0.1" + "pretty-quick": "^2.0.1", + "typescript": "^3.8.3" + }, + "resolutions": { + "@types/react-native": "link:./.tmp-empty-package" }, "husky": { "hooks": { - "pre-commit": "yarn format-staged && yarn lint-staged" + "pre-commit": "yarn format-staged && tsc --noEmit && yarn lint-staged" } }, "lint-staged": { - "*.{js,json}": "eslint" + "*.{js,json,ts,tsx}": "eslint --quiet" } } diff --git a/src/components/Documentation/Markdown/lang/dvc.js b/src/components/Documentation/Markdown/lang/dvc.js index 5bf0292f38..21a288a092 100644 --- a/src/components/Documentation/Markdown/lang/dvc.js +++ b/src/components/Documentation/Markdown/lang/dvc.js @@ -1,17 +1,16 @@ /* global exports:readonly */ - 'use strict' Object.defineProperty(exports, '__esModule', { value: true }) -let _javascript = function(hljs) { - let VAR = { +const lang = function(hljs) { + const VAR = { className: 'variable', variants: [{ begin: /\$[\w\d#@][\w\d_]*/ }, { begin: /\$\{(.*?)}/ }] } - let QUOTE_STRING = { + const QUOTE_STRING = { className: 'string', begin: /"/, end: /"/, @@ -26,7 +25,7 @@ let _javascript = function(hljs) { } ] } - let APOS_STRING = { + const APOS_STRING = { className: 'string', begin: /'/, end: /'/ @@ -66,6 +65,7 @@ let _javascript = function(hljs) { begin: /dvc [a-z-]+/, lexemes: '[a-z-]+', keywords: { + // eslint-disable-next-line @typescript-eslint/camelcase built_in: 'help dvc init add import-url checkout run pull push ' + 'fetch status repro remove move gc config remote metrics ' + @@ -100,10 +100,8 @@ let _javascript = function(hljs) { } } -let _javascript2 = _interopRequireDefault(_javascript) - -function _interopRequireDefault(obj) { +function interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj } } -exports.default = _javascript2.default +exports.default = interopRequireDefault(lang).default diff --git a/src/components/Documentation/Markdown/lang/usage.js b/src/components/Documentation/Markdown/lang/usage.js index a47fb25616..9a7396900b 100644 --- a/src/components/Documentation/Markdown/lang/usage.js +++ b/src/components/Documentation/Markdown/lang/usage.js @@ -6,8 +6,8 @@ Object.defineProperty(exports, '__esModule', { value: true }) -var _javascript = function(hljs) { - var QUOTE_STRING = { +const lang = function(hljs) { + const QUOTE_STRING = { className: 'string', begin: /"/, end: /"/, @@ -37,6 +37,7 @@ var _javascript = function(hljs) { begin: / dvc [a-z-]+/, lexemes: '[a-z-]+', keywords: { + // eslint-disable-next-line @typescript-eslint/camelcase built_in: 'help dvc init add checkout run pull push fetch status repro ' + 'remove move gc config remote metrics install root lock ' + @@ -54,10 +55,8 @@ var _javascript = function(hljs) { } } -var _javascript2 = _interopRequireDefault(_javascript) - -function _interopRequireDefault(obj) { +function interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj } } -exports.default = _javascript2.default +exports.default = interopRequireDefault(lang).default diff --git a/src/components/GithubLine/index.js b/src/components/GithubLine/index.js index 8094c93da4..08d82b8dde 100644 --- a/src/components/GithubLine/index.js +++ b/src/components/GithubLine/index.js @@ -11,7 +11,7 @@ export default function GithubLine() { useEffect(() => { fetch(api).then(res => { - res.json().then(({ stargazers_count }) => setCount(stargazers_count)) + res.json().then(data => setCount(data.stargazers_count)) }) }, [count, setCount]) diff --git a/src/components/LearnMore/styles.js b/src/components/LearnMore/styles.js index b285633553..2754437009 100644 --- a/src/components/LearnMore/styles.js +++ b/src/components/LearnMore/styles.js @@ -24,7 +24,7 @@ export const bounce = keyframes` } ` -export const bounce_mobile = keyframes` +export const bounceMobile = keyframes` 0%, 30%, 50%, 70%, 100% { transform: translateY(0); } @@ -44,8 +44,8 @@ export const Icon = styled.div` will-change: transform; animation: ${bounce} 3s infinite; - ${media.phone`animation: ${bounce_mobile} 3s infinite;`}; - ${media.phablet`animation: ${bounce_mobile} 3s infinite;`}; + ${media.phone`animation: ${bounceMobile} 3s infinite;`}; + ${media.phablet`animation: ${bounceMobile} 3s infinite;`}; ` export const Caption = styled.p` diff --git a/src/components/Video/index.js b/src/components/Video/index.js index 4608295614..63df5d1016 100644 --- a/src/components/Video/index.js +++ b/src/components/Video/index.js @@ -52,11 +52,8 @@ export default class Video extends Component { watch = () => { logEvent('button', 'video') this.setState({ watching: true }) - this.play() } - play = () => {} - onPause = () => { this.setState({ watching: false }) } diff --git a/src/typings.ts b/src/typings.ts new file mode 100644 index 0000000000..4ca841c123 --- /dev/null +++ b/src/typings.ts @@ -0,0 +1,23 @@ +declare module '*.png' { + type IPNG = string + + const png: IPNG + export = png +} + +declare module '*.css' { + interface IClassNames { + [className: string]: string + } + const classNames: IClassNames + export = classNames +} + +declare module '*.svg' { + interface IReactSVGR { + default: string + ReactComponent: React.StatelessComponent> + } + const svg: IReactSVGR + export = svg +} diff --git a/src/utils/redirects.js b/src/utils/redirects.js index 521ccbd21e..e05c6a08c8 100644 --- a/src/utils/redirects.js +++ b/src/utils/redirects.js @@ -3,15 +3,15 @@ let redirects = require('../../redirects-list.json') const processRedirectString = redirectString => { - let [regex, replace, code = 301] = redirectString.split(/\s+/g) - const matchPathname = /^\^?\//.test(regex) - regex = new RegExp(regex) - code = Number(code) + const redirectParts = redirectString.split(/\s+/g) + const matchPathname = /^\^?\//.test(redirectParts[0]) + const regex = new RegExp(redirectParts[0]) + return { regex, matchPathname, - replace, - code + replace: redirectParts[1], + code: Number(redirectParts[2] || 301) } } diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000000..c68db1c3d7 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "lib": ["dom", "es2015", "es2017"], + "jsx": "react", + "sourceMap": true, + "strict": true, + "noImplicitAny": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "allowSyntheticDefaultImports": true, + "allowJs": true + }, + "include": ["./src/**/*", "./middleware/**/*", "./*.js"] +} diff --git a/yarn.lock b/yarn.lock index e8f9761b64..3f0bcc66c7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -25,7 +25,7 @@ invariant "^2.2.4" semver "^5.5.0" -"@babel/core@^7.1.0", "@babel/core@^7.7.7", "@babel/core@^7.8.7": +"@babel/core@^7.1.0", "@babel/core@^7.7.7": version "7.9.0" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.9.0.tgz#ac977b538b77e132ff706f3b8a4dbad09c03c56e" integrity sha512-kWc7L0fw1xwvI0zi8OKVBuxRVefwGOrKSQMvrQ3dW+bIIavBY3/NpXmpjMy7bQnLgwgzWQZ8TlM57YHpHNHz4w== @@ -47,7 +47,48 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.4.0", "@babel/generator@^7.9.0": +"@babel/core@^7.8.7": + version "7.8.7" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.7.tgz#b69017d221ccdeb203145ae9da269d72cf102f3b" + integrity sha512-rBlqF3Yko9cynC5CCFy6+K/w2N+Sq/ff2BPy+Krp7rHlABIr5epbA7OxVeKoMHB39LZOp1UY5SuLjy6uWi35yA== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/generator" "^7.8.7" + "@babel/helpers" "^7.8.4" + "@babel/parser" "^7.8.7" + "@babel/template" "^7.8.6" + "@babel/traverse" "^7.8.6" + "@babel/types" "^7.8.7" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.1" + json5 "^2.1.0" + lodash "^4.17.13" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.5.0" + +"@babel/generator@^7.4.0": + version "7.7.7" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.7.7.tgz#859ac733c44c74148e1a72980a64ec84b85f4f45" + integrity sha512-/AOIBpHh/JU1l0ZFS4kiRCBnLi6OTHzh0RPk3h9isBxkkqELtQNFi1Vr/tiG9p1yfoUdKVwISuXWQR+hwwM4VQ== + dependencies: + "@babel/types" "^7.7.4" + jsesc "^2.5.1" + lodash "^4.17.13" + source-map "^0.5.0" + +"@babel/generator@^7.8.6", "@babel/generator@^7.8.7": + version "7.8.8" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.8.tgz#cdcd58caab730834cee9eeadb729e833b625da3e" + integrity sha512-HKyUVu69cZoclptr8t8U5b6sx6zoWjh8jiUhnuj3MpZuKT2dJ8zPTuiy31luq32swhI0SpwItCIlU8XW7BZeJg== + dependencies: + "@babel/types" "^7.8.7" + jsesc "^2.5.1" + lodash "^4.17.13" + source-map "^0.5.0" + +"@babel/generator@^7.9.0": version "7.9.0" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.9.0.tgz#0f67adea4ec39dad6e63345f70eec33014d78c89" integrity sha512-onl4Oy46oGCzymOXtKMQpI7VXtCbTSHK1kqBydZ6AmzuNcacEVqGk9tZtAS+48IA9IstZcDCgIg8hQKnb7suRw== @@ -57,7 +98,14 @@ lodash "^4.17.13" source-map "^0.5.0" -"@babel/helper-annotate-as-pure@^7.0.0", "@babel/helper-annotate-as-pure@^7.8.3": +"@babel/helper-annotate-as-pure@^7.0.0": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.7.4.tgz#bb3faf1e74b74bd547e867e48f551fa6b098b6ce" + integrity sha512-2BQmQgECKzYKFPpiycoF9tlb5HA4lrVyAmLLVK177EcQAqjVLciUb2/R+n1boQ9y5ENV3uz2ZqiNw7QMBBw1Og== + dependencies: + "@babel/types" "^7.7.4" + +"@babel/helper-annotate-as-pure@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.8.3.tgz#60bc0bc657f63a0924ff9a4b4a0b24a13cf4deee" integrity sha512-6o+mJrZBxOoEX77Ezv9zwW7WV8DdluouRKNY/IR5u/YTMuKHgugHOzYWlYvYLpLA9nPsQCAAASpCIbjI9Mv+Uw== @@ -267,7 +315,7 @@ "@babel/traverse" "^7.8.3" "@babel/types" "^7.8.3" -"@babel/helpers@^7.9.0": +"@babel/helpers@^7.8.4", "@babel/helpers@^7.9.0": version "7.9.2" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.9.2.tgz#b42a81a811f1e7313b88cba8adc66b3d9ae6c09f" integrity sha512-JwLvzlXVPjO8eU9c/wF9/zOIN7X6h8DYf7mG4CiFRZRvZNKEF5dQ3H3V+ASkHoIB3mWhatgl5ONhyqHRI6MppA== @@ -285,11 +333,21 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.7.0", "@babel/parser@^7.8.6", "@babel/parser@^7.8.8", "@babel/parser@^7.9.0": +"@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.7.0", "@babel/parser@^7.8.8", "@babel/parser@^7.9.0": version "7.9.2" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.9.2.tgz#4e767f424b479c514077544484d1f9bdba7f1158" integrity sha512-2jyvKdoOS1aWAFL2rjJZmamyDDkPCx/AAz4/Wh1Dfxvw8qqnOvek/ZlHQ2noO/o8JpnXa/WiUUFOv48meBKkpA== +"@babel/parser@^7.7.4", "@babel/parser@^7.8.3": + version "7.9.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.9.3.tgz#043a5fc2ad8b7ea9facddc4e802a1f0f25da7255" + integrity sha512-E6SpIDJZ0cZAKoCNk+qSDd0ChfTnpiJN9FfNf3RZ20dzwA2vL2oq5IX1XTVT+4vDmRlta2nGk5HGMMskJAR+4A== + +"@babel/parser@^7.8.6", "@babel/parser@^7.8.7": + version "7.8.8" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.8.tgz#4c3b7ce36db37e0629be1f0d50a571d2f86f6cd4" + integrity sha512-mO5GWzBPsPf6865iIbzNE0AvkKF3NE+2S3eRUpE+FE07BOAkXh6G+GW/Pj01hhXjve1WScbaIO4UlY1JKeqCcA== + "@babel/plugin-proposal-async-generator-functions@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.8.3.tgz#bad329c670b382589721b27540c7d288601c6e6f" @@ -441,6 +499,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" +"@babel/plugin-syntax-typescript@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.8.3.tgz#c1f659dda97711a569cef75275f7e15dcaa6cabc" + integrity sha512-GO1MQ/SGGGoiEXY0e0bSpHimJvxqB7lktLLIq2pv8xG7WZ8IMEle74jIe1FhprHBWjwjZtXHkycDLZXIWM5Wfg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-transform-arrow-functions@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.8.3.tgz#82776c2ed0cd9e1a49956daeb896024c9473b8b6" @@ -730,6 +795,15 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" +"@babel/plugin-transform-typescript@^7.8.3": + version "7.8.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.8.7.tgz#48bccff331108a7b3a28c3a4adc89e036dc3efda" + integrity sha512-7O0UsPQVNKqpHeHLpfvOG4uXmlw+MOxYvUv6Otc9uH5SYMIxvF6eBdjkWvC3f9G+VXe0RsNExyAQBeTRug/wqQ== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-typescript" "^7.8.3" + "@babel/plugin-transform-unicode-regex@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.8.3.tgz#0cef36e3ba73e5c57273effb182f46b91a1ecaad" @@ -835,6 +909,14 @@ "@babel/plugin-transform-react-jsx-self" "^7.9.0" "@babel/plugin-transform-react-jsx-source" "^7.9.0" +"@babel/preset-typescript@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.8.3.tgz#90af8690121beecd9a75d0cc26c6be39d1595d13" + integrity sha512-qee5LgPGui9zQ0jR1TeU5/fP9L+ovoArklEqY12ek8P/wV5ZeM/VYSQYwICeoT6FfpJTekG9Ilay5PhwsOpMHA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-transform-typescript" "^7.8.3" + "@babel/runtime-corejs3@^7.8.3": version "7.9.2" resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.9.2.tgz#26fe4aa77e9f1ecef9b776559bbb8e84d34284b7" @@ -843,14 +925,39 @@ core-js-pure "^3.0.0" regenerator-runtime "^0.13.4" -"@babel/runtime@^7.1.2", "@babel/runtime@^7.4.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7": +"@babel/runtime@^7.1.2", "@babel/runtime@^7.4.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4": version "7.9.2" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.9.2.tgz#d90df0583a3a252f09aaa619665367bae518db06" integrity sha512-NE2DtOdufG7R5vnfQUTehdTfNycfUANEtCa9PssN9O/xmTzP4E08UI797ixaei6hBEVL9BI/PsdJS5x7mWoB9Q== dependencies: regenerator-runtime "^0.13.4" -"@babel/template@^7.4.0", "@babel/template@^7.8.3", "@babel/template@^7.8.6": +"@babel/runtime@^7.8.7": + version "7.8.7" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.8.7.tgz#8fefce9802db54881ba59f90bb28719b4996324d" + integrity sha512-+AATMUFppJDw6aiR5NVPHqIQBlV/Pj8wY/EZH+lmvRdUo9xBaz/rF3alAwFJQavvKfeOlPE7oaaDHVbcySbCsg== + dependencies: + regenerator-runtime "^0.13.4" + +"@babel/template@^7.4.0": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.7.4.tgz#428a7d9eecffe27deac0a98e23bf8e3675d2a77b" + integrity sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw== + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/parser" "^7.7.4" + "@babel/types" "^7.7.4" + +"@babel/template@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.3.tgz#e02ad04fe262a657809327f578056ca15fd4d1b8" + integrity sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/parser" "^7.8.3" + "@babel/types" "^7.8.3" + +"@babel/template@^7.8.6": version "7.8.6" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.6.tgz#86b22af15f828dfb086474f964dcc3e39c43ce2b" integrity sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg== @@ -859,7 +966,7 @@ "@babel/parser" "^7.8.6" "@babel/types" "^7.8.6" -"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.7.0", "@babel/traverse@^7.8.3", "@babel/traverse@^7.8.6", "@babel/traverse@^7.9.0": +"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.7.0", "@babel/traverse@^7.8.3", "@babel/traverse@^7.9.0": version "7.9.0" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.9.0.tgz#d3882c2830e513f4fe4cec9fe76ea1cc78747892" integrity sha512-jAZQj0+kn4WTHO5dUZkZKhbFrqZE7K5LAQ5JysMnmvGij+wOdr+8lWqPeW0BcF4wFwrEXXtdGO7wcV6YPJcf3w== @@ -874,7 +981,31 @@ globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.7.0", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.8.7", "@babel/types@^7.9.0": +"@babel/traverse@^7.8.6": + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.6.tgz#acfe0c64e1cd991b3e32eae813a6eb564954b5ff" + integrity sha512-2B8l0db/DPi8iinITKuo7cbPznLCEk0kCxDoB9/N6gGNg/gxOXiR/IcymAFPiBwk5w6TtQ27w4wpElgp9btR9A== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/generator" "^7.8.6" + "@babel/helper-function-name" "^7.8.3" + "@babel/helper-split-export-declaration" "^7.8.3" + "@babel/parser" "^7.8.6" + "@babel/types" "^7.8.6" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.13" + +"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.7.4.tgz#516570d539e44ddf308c07569c258ff94fde9193" + integrity sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA== + dependencies: + esutils "^2.0.2" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + +"@babel/types@^7.4.4", "@babel/types@^7.7.0", "@babel/types@^7.8.3", "@babel/types@^7.9.0": version "7.9.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.0.tgz#00b064c3df83ad32b2dbf5ff07312b15c7f1efb5" integrity sha512-BS9JKfXkzzJl8RluW4JGknzpiUV7ZrvTayM6yfqLTVBEnFtyowVIOu6rqxRd5cVO6yGoWf4T8u8dgK9oB+GCng== @@ -883,6 +1014,15 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" +"@babel/types@^7.8.6", "@babel/types@^7.8.7": + version "7.8.7" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.7.tgz#1fc9729e1acbb2337d5b6977a63979b4819f5d1d" + integrity sha512-k2TreEHxFA4CjGkL+GYjRyx35W0Mr7DP5+9q6WMkyKXB+904bYmG40syjMFV0oLlhhFCwWl0vA0DyzTDkwAiJw== + dependencies: + esutils "^2.0.2" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + "@cnakazawa/watch@^1.0.3": version "1.0.4" resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.4.tgz#f864ae85004d0fcab6f50be9141c4da368d1656a" @@ -1375,6 +1515,14 @@ resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.5.tgz#527d20ef68571a4af02ed74350164e7a67544860" integrity sha512-wLD/Aq2VggCJXSjxEwrMafIP51Z+13H78nXIX0ABEuIGhmB5sNGbR113MOKo+yfw+RDo1ZU3DM6yfnnRF/+ouw== +"@types/hoist-non-react-statics@*": + version "3.3.1" + resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz#1124aafe5118cb591977aeb1ceaaed1070eb039f" + integrity sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA== + dependencies: + "@types/react" "*" + hoist-non-react-statics "^3.3.0" + "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0": version "2.0.1" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff" @@ -1462,10 +1610,18 @@ "@types/history" "*" "@types/react" "*" +"@types/react-native@*": + version "0.0.0" + uid "" + +"@types/react-native@link:./.tmp-empty-package": + version "0.0.0" + uid "" + "@types/react@*": - version "16.9.25" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.25.tgz#6ae2159b40138c792058a23c3c04fd3db49e929e" - integrity sha512-Dlj2V72cfYLPNscIG3/SMUOzhzj7GK3bpSrfefwt2YT9GLynvLCCZjbhyF6VsT0q0+aRACRX03TDJGb7cA0cqg== + version "16.9.24" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.24.tgz#9896c3ce0cf0d67beb3f9a35049b4a37679de30d" + integrity sha512-SoAlUP6XkRlGEWK0Jb4fMPt98CptLHmRYxxXQGIGbfM4Xyppbo0n7NmX/u6mlOyCnIeDViAanZ6dTVHI29U1Ig== dependencies: "@types/prop-types" "*" csstype "^2.2.0" @@ -1483,6 +1639,16 @@ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e" integrity sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw== +"@types/styled-components@^5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@types/styled-components/-/styled-components-5.0.1.tgz#44d210b0a0218a70df998d1a8e1f69c82d9cc68b" + integrity sha512-1yRYO1dAE2MGEuYKF1yQFeMdoyerIQn6ZDnFFkxZamcs3rn8RQVn98edPsTROAxbTz81tqnVN4BJ3Qs1cm/tKg== + dependencies: + "@types/hoist-non-react-statics" "*" + "@types/react" "*" + "@types/react-native" "*" + csstype "^2.2.0" + "@types/tmp@^0.0.33": version "0.0.33" resolved "https://registry.yarnpkg.com/@types/tmp/-/tmp-0.0.33.tgz#1073c4bc824754ae3d10cfab88ab0237ba964e4d" @@ -1500,6 +1666,14 @@ dependencies: vfile-message "*" +"@types/vfile-message@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@types/vfile-message/-/vfile-message-1.0.1.tgz#e1e9895cc6b36c462d4244e64e6d0b6eaf65355a" + integrity sha512-mlGER3Aqmq7bqR1tTTIVHq8KSAFFRyGbrxuM8C/H82g6k7r2fS+IMEkIu3D7JHzG10NvPdR8DNx0jr0pwpp4dA== + dependencies: + "@types/node" "*" + "@types/unist" "*" + "@types/vfile@^3.0.0": version "3.0.2" resolved "https://registry.yarnpkg.com/@types/vfile/-/vfile-3.0.2.tgz#19c18cd232df11ce6fa6ad80259bc86c366b09b9" @@ -2325,6 +2499,11 @@ babel-plugin-macros@^2.8.0: cosmiconfig "^6.0.0" resolve "^1.12.0" +babel-plugin-remove-graphql-queries@^2.7.26: + version "2.7.26" + resolved "https://registry.yarnpkg.com/babel-plugin-remove-graphql-queries/-/babel-plugin-remove-graphql-queries-2.7.26.tgz#81c8a24bb244798df12437a0aa92e496d673acc9" + integrity sha512-W54KrgluCcMCLq9lCtZBYzmG3Q4X0zN+mE4RNigbZhrXA6oj54Jz2tKrSW3eW3Sw3TeGsT4oGSQd8JIWyKIhqw== + babel-plugin-remove-graphql-queries@^2.8.0: version "2.8.0" resolved "https://registry.yarnpkg.com/babel-plugin-remove-graphql-queries/-/babel-plugin-remove-graphql-queries-2.8.0.tgz#d600e75e48da2a38bc7a373dc9898c9f67245e10" @@ -5665,6 +5844,15 @@ gatsby-cli@^2.11.0: ink "^2.7.1" ink-spinner "^3.0.1" +gatsby-core-utils@^1.0.34: + version "1.0.34" + resolved "https://registry.yarnpkg.com/gatsby-core-utils/-/gatsby-core-utils-1.0.34.tgz#beaa3e460ab48036a7e40ecfc18636eaa1963d51" + integrity sha512-CVuUQTVY+0X7vAqFnDeRT0ZkN0tUXvk6GLvUqfmoOzBvX9HphiR0VTi1tEYrsc5DSaz7Oyhr0vdp8j/e96rH1w== + dependencies: + ci-info "2.0.0" + configstore "^5.0.1" + node-object-hash "^2.0.0" + gatsby-core-utils@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/gatsby-core-utils/-/gatsby-core-utils-1.1.0.tgz#bbc62ed9ec3f4d379215b346d1837423d3a32f2e" @@ -5773,6 +5961,19 @@ gatsby-plugin-styled-components@^3.1.19: dependencies: "@babel/runtime" "^7.8.7" +gatsby-plugin-typescript@^2.2.5: + version "2.2.5" + resolved "https://registry.yarnpkg.com/gatsby-plugin-typescript/-/gatsby-plugin-typescript-2.2.5.tgz#60d136ed9ce02dc05054f987934bfee1b0cca97e" + integrity sha512-C17SW9tW08xUDl6K6niwY0FUi4INMVb5n29+6QwMGJw4Nxrztt3l99C6rKGR4qogsNjNEW0T/xRp2ehuHY/9rw== + dependencies: + "@babel/core" "^7.8.7" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.8.3" + "@babel/plugin-proposal-numeric-separator" "^7.8.3" + "@babel/plugin-proposal-optional-chaining" "^7.8.3" + "@babel/preset-typescript" "^7.8.3" + "@babel/runtime" "^7.8.7" + babel-plugin-remove-graphql-queries "^2.7.26" + gatsby-plugin-webpack-bundle-analyzer@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/gatsby-plugin-webpack-bundle-analyzer/-/gatsby-plugin-webpack-bundle-analyzer-1.0.5.tgz#1e47b152cccbc5cbd74415cf70a659f5b5274fb5" @@ -5887,14 +6088,14 @@ gatsby-telemetry@^1.2.0: stack-utils "1.0.2" uuid "3.4.0" -gatsby-transformer-remark@^2.6.53: - version "2.7.0" - resolved "https://registry.yarnpkg.com/gatsby-transformer-remark/-/gatsby-transformer-remark-2.7.0.tgz#6f0f4ca26abc927bfda4807aa0d468b2e8b919b0" - integrity sha512-OyJ5j2uXb4wPyodFEH3aY7m0bgQ4CiMiW1wKRpLSqsm7odxbhEBCxsTcVAwqJ7z57gGTpL9UdIXH/I0F0TJR8g== +gatsby-transformer-remark@^2.6.59: + version "2.6.59" + resolved "https://registry.yarnpkg.com/gatsby-transformer-remark/-/gatsby-transformer-remark-2.6.59.tgz#be819502251fa13d2017119826483e3cfd04e899" + integrity sha512-EL2S85aMtJadVsgKRI7hUZIaW4z5i4lLHXnivveEytu05f+GLnPKmBJB82n4LIRo6p+ebSLGx8Iql+pgy41WIQ== dependencies: "@babel/runtime" "^7.8.7" bluebird "^3.7.2" - gatsby-core-utils "^1.1.0" + gatsby-core-utils "^1.0.34" gray-matter "^4.0.2" hast-util-raw "^4.0.0" hast-util-to-html "^4.0.1" @@ -8306,7 +8507,7 @@ json5@^1.0.1: dependencies: minimist "^1.2.0" -json5@^2.1.2: +json5@^2.1.0, json5@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.2.tgz#43ef1f0af9835dd624751a6b7fa48874fb2d608e" integrity sha512-MoUOQ4WdiN3yxhm7NEVJSJrieAo5hNSLQ5sj05OTRHPL9HOBy8u4Bu88jsC1jvqAdN+E1bJmsUcZH+1HQxliqQ== @@ -11173,7 +11374,7 @@ react-collapse@^5.0.1: resolved "https://registry.yarnpkg.com/react-collapse/-/react-collapse-5.0.1.tgz#f763b7207aee73baa1ff778b2d0b4ffb49d900a0" integrity sha512-cN2tkxBWizhPQ2JHfe0aUSJtmMthKA17NZkTElpiQ2snQAAi1hssXZ2fv88rAPNNvG5ss4t0PbOZT0TIl9Lk3Q== -react-collapsible@^2.6.2: +react-collapsible@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/react-collapsible/-/react-collapsible-2.7.0.tgz#d95111bfbea3c01adc7898c5895b191360f71e94" integrity sha512-uS6cFyJ2WR0F0xfCjmJ3TGwH+no/JOs8cDKNTPMWKWSJdosmHPCk8io4ZrDyz5dKJmSI5X2T5eJqnasawe6wew== @@ -13582,6 +13783,11 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= +typescript@^3.8.3: + version "3.8.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061" + integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== + unc-path-regex@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" @@ -13818,10 +14024,10 @@ unist-util-visit-parents@^3.0.0: "@types/unist" "^2.0.0" unist-util-is "^4.0.0" -unist-util-visit@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-2.0.1.tgz#b4e1c1cb414250c6b3cb386b8e461d79312108ae" - integrity sha512-bEDa5S/O8WRDeI1mLaMoKuFFi89AjF+UAoMNxO+bbVdo06q+53Vhq4iiv1PenL6Rx1ZxIpXIzqZoc5HD2I1oMA== +unist-util-visit@2.0.2, unist-util-visit@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-2.0.2.tgz#3843782a517de3d2357b4c193b24af2d9366afb7" + integrity sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ== dependencies: "@types/unist" "^2.0.0" unist-util-is "^4.0.0" @@ -13834,15 +14040,6 @@ unist-util-visit@^1.0.0, unist-util-visit@^1.1.0, unist-util-visit@^1.1.3, unist dependencies: unist-util-visit-parents "^2.0.0" -unist-util-visit@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-2.0.2.tgz#3843782a517de3d2357b4c193b24af2d9366afb7" - integrity sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ== - dependencies: - "@types/unist" "^2.0.0" - unist-util-is "^4.0.0" - unist-util-visit-parents "^3.0.0" - universal-user-agent@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-4.0.1.tgz#fd8d6cb773a679a709e967ef8288a31fcc03e557"