Merge pull request #234 from pybricks/dlech

update react-i18n package
This commit is contained in:
David Lechner
2021-01-08 20:59:06 -06:00
committed by GitHub
10 changed files with 145 additions and 59 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ jobs:
steps:
- uses: actions/setup-node@v1
with:
node-version: '10.x'
node-version: '12.x'
registry-url: 'https://npm.pkg.github.com'
- uses: actions/checkout@v2
- run: yarn install
+1 -1
View File
@@ -15,7 +15,7 @@ jobs:
steps:
- uses: actions/setup-node@v1
with:
node-version: '10.x'
node-version: '12.x'
registry-url: 'https://npm.pkg.github.com'
- uses: actions/checkout@v2
- run: yarn install
+1 -1
View File
@@ -1 +1 @@
nodejs 10.21.0
nodejs 12.18.3
+1 -1
View File
@@ -40,7 +40,7 @@ These are the required software tools you need to install on your computer.
### Node.js
We are using [Node.js][node] v10.x. We recommend using a tool such as [asdf][asdf]
We are using [Node.js][node] v12.x. We recommend using a tool such as [asdf][asdf]
or [nvm][nvm] if you need to install more than one version of Node.js.
[node]: https://nodejs.org/en/
+54
View File
@@ -0,0 +1,54 @@
// https://github.com/gsoft-inc/craco/blob/master/packages/craco/README.md#configuration
const { getLoader, getLoaders, loaderByName } = require('@craco/craco');
module.exports = {
webpack: {
configure: {
resolve: {
// need 'esnext' first to avoid compile errors
mainFields: ['esnext', 'browser', 'module', 'main'],
},
},
},
plugins: [
{
plugin: {
overrideWebpackConfig: ({
webpackConfig,
cracoConfig,
pluginOptions,
context: { env, paths },
}) => {
// add .esnext file extension for @shopify/*
webpackConfig.resolve.extensions = [
'.web.esnext',
'.esnext',
...webpackConfig.resolve.extensions,
];
const babelLoaders = getLoaders(
webpackConfig,
loaderByName('babel-loader'),
);
babelLoaders.matches[0].loader.test = /\.(esnext|js|mjs|jsx|ts|tsx)$/;
babelLoaders.matches[1].loader.test = /\.(esnext|js|mjs)$/;
const fileLoader = getLoader(
webpackConfig,
loaderByName('file-loader'),
);
fileLoader.match.loader.exclude = [
/\.(esnext|js|mjs|jsx|ts|tsx)$/,
/\.html$/,
/\.json$/,
];
return webpackConfig;
},
},
options: {},
},
],
};
+6 -5
View File
@@ -4,9 +4,10 @@
"private": true,
"dependencies": {
"@blueprintjs/core": "^3.36.0",
"@craco/craco": "^6.0.0",
"@pybricks/firmware": "4.3.0",
"@pybricks/mpy-cross-v5": "^1.1.0",
"@shopify/react-i18n": "^5.0.0",
"@shopify/react-i18n": "^5.2.0",
"@testing-library/dom": "^7.29.2",
"@testing-library/jest-dom": "^5.11.8",
"@testing-library/react": "^11.2.3",
@@ -43,10 +44,10 @@
},
"scripts": {
"prepare": "mkdirp public/static/js && ncp node_modules/@pybricks/mpy-cross-v5/build/mpy-cross.wasm src/sagas/mpy-cross.emcwasm",
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=./test/env.js",
"coverage": "react-scripts test --env=./test/env.js --coverage --watchAll=false",
"start": "craco start",
"build": "craco build",
"test": "craco test --env=./test/env.js",
"coverage": "craco test --env=./test/env.js --coverage --watchAll=false",
"coverage:html": "yarn coverage --coverageReporters html",
"eject": "react-scripts eject",
"lint": "tsc --noEmit && eslint \"*/**/*.{js,ts,tsx}\" --quiet --fix"
+9 -3
View File
@@ -1,9 +1,15 @@
// SPDX-License-Identifier: MIT
// Copyright (c) 2020 The Pybricks Authors
import { Button, Hotkey, Hotkeys, Intent, Position, Tooltip } from '@blueprintjs/core';
// importing this way due to https://github.com/palantir/blueprint/issues/3604
import { HotkeysTarget } from '@blueprintjs/core/lib/esnext/components/hotkeys/hotkeysTarget';
import {
Button,
Hotkey,
Hotkeys,
HotkeysTarget,
Intent,
Position,
Tooltip,
} from '@blueprintjs/core';
import { WithI18nProps, withI18n } from '@shopify/react-i18n';
import React from 'react';
import { TooltipId } from './button-i18n';
+7 -3
View File
@@ -1,9 +1,13 @@
// SPDX-License-Identifier: MIT
// Copyright (c) 2020 The Pybricks Authors
import { Menu, MenuDivider, MenuItem, ResizeSensor } from '@blueprintjs/core';
// importing this way due to https://github.com/palantir/blueprint/issues/3891
import { ContextMenuTarget } from '@blueprintjs/core/lib/esnext/components/context-menu/contextMenuTarget';
import {
ContextMenuTarget,
Menu,
MenuDivider,
MenuItem,
ResizeSensor,
} from '@blueprintjs/core';
import { WithI18nProps, withI18n } from '@shopify/react-i18n';
import { Ace, config } from 'ace-builds';
import React from 'react';
+7 -3
View File
@@ -1,9 +1,13 @@
// SPDX-License-Identifier: MIT
// Copyright (c) 2020 The Pybricks Authors
import { Menu, MenuDivider, MenuItem, ResizeSensor } from '@blueprintjs/core';
// importing this way due to https://github.com/palantir/blueprint/issues/3891
import { ContextMenuTarget } from '@blueprintjs/core/lib/esnext/components/context-menu/contextMenuTarget';
import {
ContextMenuTarget,
Menu,
MenuDivider,
MenuItem,
ResizeSensor,
} from '@blueprintjs/core';
import { WithI18nProps, withI18n } from '@shopify/react-i18n';
import React from 'react';
import { connect } from 'react-redux';
+58 -41
View File
@@ -1163,6 +1163,16 @@
exec-sh "^0.3.2"
minimist "^1.2.0"
"@craco/craco@^6.0.0":
version "6.0.0"
resolved "https://registry.yarnpkg.com/@craco/craco/-/craco-6.0.0.tgz#f4e66e82f5bc77671dc0a5e839c3269e2414fe0f"
integrity sha512-NSgcGqTlQ+XTBJ/AhE0ngdfab5xIyx/06yrRPkvDH02V90ejrL6bSM54k3+h3OjGE/SO7nmF1MqfFwemPo8kVw==
dependencies:
cross-spawn "^7.0.0"
lodash "^4.17.15"
semver "^7.3.2"
webpack-merge "^4.2.2"
"@csstools/convert-colors@^1.4.0":
version "1.4.0"
resolved "https://registry.yarnpkg.com/@csstools/convert-colors/-/convert-colors-1.4.0.tgz#ad495dc41b12e75d588c6db8b9834f08fa131eb7"
@@ -1558,62 +1568,62 @@
estree-walker "^1.0.1"
picomatch "^2.2.2"
"@shopify/dates@^0.4.3":
version "0.4.3"
resolved "https://registry.yarnpkg.com/@shopify/dates/-/dates-0.4.3.tgz#6b068b25db419b0911f95890c153082844bbb89a"
integrity sha512-wL8dzk9u9o0H8AKiqQSIqLD77ww2mPtLAC8HiVb+I+sYEW8hoLmqW0JGAIcBgdL4Pyybc6XSQwvdfQM27XvP0g==
"@shopify/dates@^0.5.0":
version "0.5.0"
resolved "https://registry.yarnpkg.com/@shopify/dates/-/dates-0.5.0.tgz#a3a28bcc381ecb04b2251e832af16503f6b7e2c4"
integrity sha512-oDEyuqeVqFljPRAcbQlaEZ08j2oBN3OGVtG905MYhgQ4GUMTnCkp5jMXEqRxmawwuYGmnaeyQMMsDF4bUoajDg==
dependencies:
"@shopify/decorators" "^1.1.13"
"@shopify/decorators" "^1.2.0"
tslib "^1.14.1"
"@shopify/decorators@^1.1.13":
version "1.1.13"
resolved "https://registry.yarnpkg.com/@shopify/decorators/-/decorators-1.1.13.tgz#61efc503d3ea068fd47f83d33d152bf554ee4efe"
integrity sha512-Ky99a1jv0xc9kYLlK/wYD+1LrdcjL0uFSUn6ZnJplXoCdm/5lv+d4h6A3w2wSlNgS0hIWnx480sFjKmkzRoORg==
"@shopify/decorators@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@shopify/decorators/-/decorators-1.2.0.tgz#8d464d2378a2cb768fc57b5a9fc826d0d859d153"
integrity sha512-KjiE612ErFcZQ40TMQJVo/LLcjuU+BQT/vRJrZVJlxLXAjxzmwRd3oCL7KMQrpDCfDWGr2b3OigK3ldXWoh+vA==
dependencies:
"@shopify/function-enhancers" "^1.0.11"
"@shopify/function-enhancers" "^1.1.0"
tslib "^1.14.1"
"@shopify/function-enhancers@^1.0.11":
version "1.0.11"
resolved "https://registry.yarnpkg.com/@shopify/function-enhancers/-/function-enhancers-1.0.11.tgz#5ea80d055aa61618cda40c215c424a3b053f2c4e"
integrity sha512-VMV5iReVL2CHrqLGMmJg5eueiFySiiSx3plU2/IywjaOMi2bDQFo+juRXYuPtBloclKuwHoc4L7BGliQGH8zaA==
"@shopify/function-enhancers@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@shopify/function-enhancers/-/function-enhancers-1.1.0.tgz#3c42b78edd59f8cb6fe85408ca39fc92f3e5dad3"
integrity sha512-wIrGDa5aRiOr8E3JT3+8svkBskFE7NjGCzLo/Tu7SA5t5spgxTqF85J/ilbSPFnOsvBO/teeDIVKClFtGSlkhw==
dependencies:
tslib "^1.14.1"
"@shopify/i18n@^0.1.12":
version "0.1.12"
resolved "https://registry.yarnpkg.com/@shopify/i18n/-/i18n-0.1.12.tgz#e4bb51f0b0eb1a15c1924c64d83f92a8e17dbdff"
integrity sha512-EgXkE9kNhGlSuo7s5sEivRuFg3TfnDyMVjOXexAfCInF9Grwm5hhpCriMdbxYz/GkSlODp9cETTebyVGL0IM9A==
"@shopify/i18n@^0.2.0":
version "0.2.0"
resolved "https://registry.yarnpkg.com/@shopify/i18n/-/i18n-0.2.0.tgz#9d892b2bbb1ac519345a5eede43f0d030aa0bf0f"
integrity sha512-nWXLEhu1/nCoyuz9itx79R+yrVjU6a+Zbsm7FYP1koSSTaQEKMOPwdfEgtB2y65/PKmjmXwg3p+TIMHONzVI2g==
dependencies:
tslib "^1.14.1"
"@shopify/react-effect@^3.2.13":
version "3.2.13"
resolved "https://registry.yarnpkg.com/@shopify/react-effect/-/react-effect-3.2.13.tgz#95ff8ff089ceee049941001cd1a9a1c3627ef63f"
integrity sha512-KzRpKUzrATwrNMb+JrYWI52j6UDGFcGYDe+bXr8XQxJaU8H8umxn5t9zk4OLUoMf1yoUn98OrAShDsg6ZayI3g==
"@shopify/react-effect@^3.3.0":
version "3.3.0"
resolved "https://registry.yarnpkg.com/@shopify/react-effect/-/react-effect-3.3.0.tgz#9538ee55e5e9b20831a70744071be17d2b317228"
integrity sha512-Mnm/CXLY2/1Vc3or9KMJYrdK3nDmxZx/l1oc1u3bbtB8HhkUcbQWjxBip5dyNBv6R5Gp42Cg28q+F+fn7Sziww==
dependencies:
tslib "^1.14.1"
"@shopify/react-hooks@^1.11.2":
version "1.11.2"
resolved "https://registry.yarnpkg.com/@shopify/react-hooks/-/react-hooks-1.11.2.tgz#216421d52abc94c5c8e5b8821ff7800da6949110"
integrity sha512-KVbBxdOXcShtj+PJrfq5FW0T6DkqXkt3Q4YKf3NlGrBB0vprrN71Zs4MAyUhCqJp1B7qfKM8dgHcikmIxtDp4Q==
"@shopify/react-hooks@^1.12.0":
version "1.12.0"
resolved "https://registry.yarnpkg.com/@shopify/react-hooks/-/react-hooks-1.12.0.tgz#b31e7eb3c1a1eaa8f20a1473b0def619f90cb462"
integrity sha512-j8c9J0alSt0/NcuPg1K5L57GO8rYfbskulqFrsCv4gCYVgEVPyJd3DqKaErxcY9kYzDEKfEDI2+hIAiR3Uiqsw==
dependencies:
tslib "^1.14.1"
"@shopify/react-i18n@^5.0.0":
version "5.1.4"
resolved "https://registry.yarnpkg.com/@shopify/react-i18n/-/react-i18n-5.1.4.tgz#fd3c7f9246540a6f0955952a8da4e7d3c5f0aa23"
integrity sha512-wtNJurv2CaahHv14VxlLTiFwRMwmdQ07QwtKePGngVr4WDwmNYRTbknV4UP/S+x7TgozVFjhRKp5T/4rUI4EnQ==
"@shopify/react-i18n@^5.2.0":
version "5.2.0"
resolved "https://registry.yarnpkg.com/@shopify/react-i18n/-/react-i18n-5.2.0.tgz#2612296e2df6af95e4616f9358daa04084f49b00"
integrity sha512-l4TZ1A5x+zAuv1ytkJOmdRZ+tIRBxyzkpdacaYrleVJjmgCERHwuE5DMfM0WnyMzngUhd3BPAY0iC2LGqcN+uw==
dependencies:
"@shopify/dates" "^0.4.3"
"@shopify/decorators" "^1.1.13"
"@shopify/function-enhancers" "^1.0.11"
"@shopify/i18n" "^0.1.12"
"@shopify/react-effect" "^3.2.13"
"@shopify/react-hooks" "^1.11.2"
"@shopify/useful-types" "^2.2.1"
"@shopify/dates" "^0.5.0"
"@shopify/decorators" "^1.2.0"
"@shopify/function-enhancers" "^1.1.0"
"@shopify/i18n" "^0.2.0"
"@shopify/react-effect" "^3.3.0"
"@shopify/react-hooks" "^1.12.0"
"@shopify/useful-types" "^2.3.0"
"@types/hoist-non-react-statics" "^3.0.1"
change-case "^3.1.0"
glob "^7.1.4"
@@ -1627,10 +1637,10 @@
"@babel/traverse" "^7.0.0"
fs-extra "^8.1.0"
"@shopify/useful-types@^2.2.1":
version "2.2.1"
resolved "https://registry.yarnpkg.com/@shopify/useful-types/-/useful-types-2.2.1.tgz#187fe009123e560e2eed6f4d375fb53248a33b0d"
integrity sha512-I0mZqYHjZY4+CONy0z+awtpKDY3E6OcnSnMAmMuEANCgNow86vtB4cYJb/udJX+znNj7yKfzdp3iG531lD7aFA==
"@shopify/useful-types@^2.3.0":
version "2.3.0"
resolved "https://registry.yarnpkg.com/@shopify/useful-types/-/useful-types-2.3.0.tgz#d14376eb9da2c45ffbb3849cb3be2da98c7ef1c0"
integrity sha512-T5FuS/hNFTxS18kpB3Z8fTwaM0q7fkXPpZLpV6fug5pHw1dFiuCTvidBUDALJJyCRJ5mONQc2m2bQt8MGvn90A==
dependencies:
tslib "^1.14.1"
@@ -12475,6 +12485,13 @@ webpack-manifest-plugin@2.2.0:
object.entries "^1.1.0"
tapable "^1.0.0"
webpack-merge@^4.2.2:
version "4.2.2"
resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.2.2.tgz#a27c52ea783d1398afd2087f547d7b9d2f43634d"
integrity sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g==
dependencies:
lodash "^4.17.15"
webpack-sources@^1.1.0, webpack-sources@^1.3.0, webpack-sources@^1.4.0, webpack-sources@^1.4.1, webpack-sources@^1.4.3:
version "1.4.3"
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933"