-
Notifications
You must be signed in to change notification settings - Fork 523
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
Changes from all commits
db8f1c7
de7189f
375ce5b
e516d15
625883a
9ec38d5
9883067
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
6 | ||
8 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 commentThe 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. |
||
export function sortTraces(traces: Trace[], sortBy: string) { | ||
const comparator = comparators[sortBy] || comparators[LONGEST_FIRST]; | ||
traces.sort(comparator); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright (c) 2019 Uber Technologies, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
const proxy = require('http-proxy-middleware'); | ||
|
||
module.exports = function setupProxy(app) { | ||
app.use( | ||
proxy('/api', { | ||
target: 'http://localhost:16686', | ||
logLevel: 'silent', | ||
secure: false, | ||
changeOrigin: true, | ||
ws: true, | ||
xfwd: true, | ||
}) | ||
); | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,9 +27,10 @@ it('toFloatPrecision() should work for greater-than-0 numbers', () => { | |
|
||
it('toFloatPrecision() should work for less-than-0 numbers', () => { | ||
expect(numberUtils.toFloatPrecision(0.24, 1)).toBe(0.2); | ||
expect(numberUtils.toFloatPrecision(-0.026, 1)).toBe(0); | ||
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 commentThe 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)).toBeCloseTo(0); | ||
}); | ||
|
||
it('toFloatPrecision() should work for e-notation numbers', () => { | ||
|
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.