-
Notifications
You must be signed in to change notification settings - Fork 483
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
Update create-react-app to 2.1.2 #302
Conversation
could we not separate prettier formatting to a different PR? |
what is CRA 2 ? |
CRA is create-react-app, and CRA 2 is version >= 2. We can separate the prettier formatting into a separate PR, I was thinking having separate commits is sufficient distinction. |
once merged it will be squashed into one commit, which will be difficult to review if needed later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aside from question about ^
in package.json everything else is super minor and/or pre-existing. also CI error
"react-scripts": "^1.0.11", | ||
"react-app-rewire-less": "2.1.3", | ||
"react-app-rewired": "2.0.2-next.0", | ||
"react-scripts": "2.1.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems as though nearly everything in the package.json that wasn't touched has a ^
(except antd, plexus (which may not matter because it uses the relative path?), and u-basscss). Is there a rule on when to use exact version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lately, I've been going for exact, but it's not a big deal as we're using a yarn.lock
file. Seems more important when publishing npm packages.
packages/jaeger-ui/package.json
Outdated
@@ -96,5 +86,6 @@ | |||
"!src/utils/test/**/*.js", | |||
"!src/demo/**/*.js" | |||
] | |||
} | |||
}, | |||
"browserslist": [">0.2%", "not dead", "not ie <= 11", "not op_mini all"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to have such a permissive list? if so, should we have separate builds for more modern browsers so that the builds can leverage more recent browser changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I increased to 0.5%:
and_chr 70
and_uc 11.8
-android 4.4.3-4.4.4
-android 4.2-4.3
chrome 70
chrome 69
-chrome 68
-chrome 67
-chrome 63
chrome 49
edge 17
firefox 63
-firefox 52
ios_saf 12.0-12.1
ios_saf 11.3-11.4
ios_saf 11.0-11.2
-ios_saf 10.3
-ios_saf 10.0-10.2
-ios_saf 9.3
opera 56
safari 12
-safari 11.1
-safari 10.1
samsung 4
this._startIndexDrawn = 2 ** 20; | ||
this._endIndexDrawn = -(2 ** 20); | ||
// eslint-disable-next-line no-bitwise | ||
this._startIndexDrawn = 1 << 20; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason to use this specific number? or should we use Number.MAX_SAFE_INTEGER
?
expect(numberUtils.toFloatPrecision(0.51, 1)).toBe(0.5); | ||
expect(numberUtils.toFloatPrecision(-0.307, 2)).toBe(-0.31); | ||
// Had an issue with expect(-0).toBe(0) failing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could the expected value be updated then? expect(numberUtils.toFloatPrecision(-0.026, 1)).toBe(-0)
?
value: new Date(), | ||
message: 'vertex w a string key that has spaces', | ||
}, | ||
}, | ||
{ | ||
key: 1, | ||
label: 'Key is the number 1Key is the number 1Key', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pre-existing: is there a reason this key is this way? seems odd but nbd
Requires changes from PR #346 which are published as react-app-rewired@2.0.2-next.0 timarney/react-app-rewired#346 Signed-off-by: Joe Farro <joef@uber.com>
e2d8b4a
to
db8f1c7
Compare
Signed-off-by: Joe Farro <joef@uber.com>
Make sure the ./packages/jaeger-ui uses the ./.eslintrc. Make sure all tests are run in pre-commit hook. CRA is now failing builds in CI if there are any webpack build warnings: https://github.com/facebook/create-react-app/blob/73e3d0ebf1f2834e1c8c41d3a25ae5e0e99e6f14/packages/react-scripts/scripts/build.js#L171-L184 Signed-off-by: Joe Farro <joef@uber.com>
Signed-off-by: Joe Farro <joef@uber.com>
Codecov Report
@@ Coverage Diff @@
## master #302 +/- ##
==========================================
- Coverage 82.52% 82.45% -0.07%
==========================================
Files 141 140 -1
Lines 3153 3152 -1
Branches 654 651 -3
==========================================
- Hits 2602 2599 -3
- Misses 437 442 +5
+ Partials 114 111 -3
Continue to review full report at Codecov.
|
Signed-off-by: Joe Farro <joef@uber.com>
Avoid issue yarnpkg/yarn#6300 Signed-off-by: Joe Farro <joef@uber.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me
@@ -32,6 +32,7 @@ const comparators = { | |||
* @param {Trace[]} traces The `Trace` array to sort. | |||
* @param {string} sortBy A sort specification, see ./order-by.js. | |||
*/ | |||
// eslint-disable-next-line import/prefer-default-export |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw this come up while working, maybe we should disable this rule? In order to make mocks and spies in tests easier, I found it beneficial to only default export react components. utils and what not do not need to be default exported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it only comes up when there is only one export in a file.
Signed-off-by: Joe Farro <joef@uber.com>
* WIP upgrade to create-react-app v2.1.2 Requires changes from PR jaegertracing#346 which are published as react-app-rewired@2.0.2-next.0 timarney/react-app-rewired#346 Signed-off-by: Joe Farro <joef@uber.com> * Use node 8, less liberal browser support, fix test Signed-off-by: Joe Farro <joef@uber.com> * Use eslintrc, fix CI build, fix pre-commit hook Make sure the ./packages/jaeger-ui uses the ./.eslintrc. Make sure all tests are run in pre-commit hook. CRA is now failing builds in CI if there are any webpack build warnings: https://github.com/facebook/create-react-app/blob/73e3d0ebf1f2834e1c8c41d3a25ae5e0e99e6f14/packages/react-scripts/scripts/build.js#L171-L184 Signed-off-by: Joe Farro <joef@uber.com> * Skip react-vis.css format check, fail-fast in CI Signed-off-by: Joe Farro <joef@uber.com> * Don't collect coverage from dev proxy setup Signed-off-by: Joe Farro <joef@uber.com> * Upgrade react-app-rewired to 2.0.1 Avoid issue yarnpkg/yarn#6300 Signed-off-by: Joe Farro <joef@uber.com> * Cleanup npm packages in packages/jaeger-ui Signed-off-by: Joe Farro <joef@uber.com> Signed-off-by: Everett Ross <reverett@uber.com>
* WIP upgrade to create-react-app v2.1.2 Requires changes from PR jaegertracing#346 which are published as react-app-rewired@2.0.2-next.0 timarney/react-app-rewired#346 Signed-off-by: Joe Farro <joef@uber.com> * Use node 8, less liberal browser support, fix test Signed-off-by: Joe Farro <joef@uber.com> * Use eslintrc, fix CI build, fix pre-commit hook Make sure the ./packages/jaeger-ui uses the ./.eslintrc. Make sure all tests are run in pre-commit hook. CRA is now failing builds in CI if there are any webpack build warnings: https://github.com/facebook/create-react-app/blob/73e3d0ebf1f2834e1c8c41d3a25ae5e0e99e6f14/packages/react-scripts/scripts/build.js#L171-L184 Signed-off-by: Joe Farro <joef@uber.com> * Skip react-vis.css format check, fail-fast in CI Signed-off-by: Joe Farro <joef@uber.com> * Don't collect coverage from dev proxy setup Signed-off-by: Joe Farro <joef@uber.com> * Upgrade react-app-rewired to 2.0.1 Avoid issue yarnpkg/yarn#6300 Signed-off-by: Joe Farro <joef@uber.com> * Cleanup npm packages in packages/jaeger-ui Signed-off-by: Joe Farro <joef@uber.com> Signed-off-by: vvvprabhakar <vvvprabhakar@gmail.com>
* WIP upgrade to create-react-app v2.1.2 Requires changes from PR jaegertracing#346 which are published as react-app-rewired@2.0.2-next.0 timarney/react-app-rewired#346 Signed-off-by: Joe Farro <joef@uber.com> * Use node 8, less liberal browser support, fix test Signed-off-by: Joe Farro <joef@uber.com> * Use eslintrc, fix CI build, fix pre-commit hook Make sure the ./packages/jaeger-ui uses the ./.eslintrc. Make sure all tests are run in pre-commit hook. CRA is now failing builds in CI if there are any webpack build warnings: https://github.com/facebook/create-react-app/blob/73e3d0ebf1f2834e1c8c41d3a25ae5e0e99e6f14/packages/react-scripts/scripts/build.js#L171-L184 Signed-off-by: Joe Farro <joef@uber.com> * Skip react-vis.css format check, fail-fast in CI Signed-off-by: Joe Farro <joef@uber.com> * Don't collect coverage from dev proxy setup Signed-off-by: Joe Farro <joef@uber.com> * Upgrade react-app-rewired to 2.0.1 Avoid issue yarnpkg/yarn#6300 Signed-off-by: Joe Farro <joef@uber.com> * Cleanup npm packages in packages/jaeger-ui Signed-off-by: Joe Farro <joef@uber.com> Signed-off-by: Everett Ross <reverett@uber.com> Signed-off-by: vvvprabhakar <vvvprabhakar@gmail.com>
Update create-react-app to 2.1.2 from 1.x.
Involved updating react-app-rewired: timarney/react-app-rewired#346.
More than a few files are changed due to prettier formatting. The first commit is the changes necessary to update to 2.1.2.