-
Notifications
You must be signed in to change notification settings - Fork 507
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
[Deps] Upgrade history package to 5.x #2531
Comments
@yurishkuro can you describe in details like what should excalty waht outcome you want ? |
The desired outcome is that we don't have a stale dependency - we either upgrade to the latest version or if the dependency is deprecated altogether we find something else that is maintained. |
@yurishkuro, after updating the history version to 5.x, how can I check if it is compatible with this repository and passes all the tests? |
You run the tests, npm run test, npm run lint. We already know that it's not compatible, the automated upgrade is failing CI. |
As I searched on Google to find an alternative to History.js, I discovered that no direct alternatives are available. Therefore, I prefer to resolve the test cases that were filed instead. |
If it is unmaintained it's not enough to fix the tests, we need to actively get rid of it. |
But fixing the test can be a first step. |
@yurishkuro sure , will PR very soon. |
I upgraded to 5.X and tested it, two test cases failing one for the console.log
{
"index": 1,
"action": "PUSH",
"location": {
"pathname": "/trace/MOCK-TRACE-ID",
"search": "",
"hash": "",
"state": null,
"key": "8kaa6msa"
}
}
at Object.log (src/components/App/TraceIDSearchInput.test.js:50:13)
console.log
{
"index": 0,
"action": "POP",
"location": {
"pathname": "/",
"search": "",
"hash": "",
"state": null,
"key": "jxeeyogw"
}
}
at Object.log (src/components/App/TraceIDSearchInput.test.js:57:13)
● <TraceIDSearchInput /> › does not push to history on falsy input value
expect(received).toEqual(expected) // deep equality
Expected: 1
Received: undefined
57 | console.log(JSON.stringify(history, null, 2));
58 | expect(history.action).toEqual('POP');
> 59 | expect(history.length).toEqual(1);
| ^
60 | });
61 | });
62 |
at Object.toEqual (src/components/App/TraceIDSearchInput.test.js:59:28)
(node:17363) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
FAIL src/components/App/index.test.js
● JaegerUIApp › does not explode
expect(received).toMatchSnapshot()
Snapshot name: `JaegerUIApp does not explode 1`
- Snapshot - 4
+ Received + 6
as we clearly see the history.length is undefined so test are failing test reference link/code jaeger-ui/packages/jaeger-ui/src/components/App/TraceIDSearchInput.test.js Lines 43 to 58 in c28adbb
jaeger-ui/packages/jaeger-ui/src/components/App/index.test.js Lines 20 to 25 in c28adbb
|
Some functionality has been deprecated in that library, we need to understand what the replacement is, and whether it is compatible with the modern React at all.
The text was updated successfully, but these errors were encountered: