Skip to content
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 babel version #2659

Merged
merged 5 commits into from
Jul 15, 2019
Merged

Conversation

tacigar
Copy link
Member

@tacigar tacigar commented Jul 13, 2019

Update babel version to babel 7.

@codefromthecrypt
Copy link
Member

any motivation for this, except keeping current?

chrome: '67',
safari: '11.1',
},
useBuiltIns: 'usage',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useBuiltIns option configures how @babel/preset-env handles polyfills.

Please see:

safari: '11.1',
},
useBuiltIns: 'usage',
corejs: 3,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If useBuiltIns options is specified, corejs options should be specified.
3 is corejs version which we use.

Please see:

@@ -0,0 +1,18 @@
const presets = [
[
'@babel/env',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use shorthand name (whole name is @babel/preset-env).

Please see:

corejs: 3,
},
],
'@babel/react',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is shorthand name too.
Whole name is @babel/preset-react.

@@ -88,6 +88,7 @@
"react-virtualized": "^9.21.1",
"redux": "^4.0.0",
"redux-thunk": "^2.3.0",
"regenerator-runtime": "^0.13.2",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -68,8 +68,8 @@
"@material-ui/core": "^4.1.1",
"@material-ui/pickers": "^3.1.1",
"@material-ui/styles": "^4.1.1",
"babel-polyfill": "^6.26.0",
Copy link
Member Author

@tacigar tacigar Jul 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@babel/polyfill (babel-polyfill) is deprecated.
Please see the top of this page (https://babeljs.io/docs/en/babel-polyfill)

@@ -18,8 +18,6 @@ import App from './components/App';

import '../scss/main.scss';

require('babel-polyfill');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need import polyfill modules anymore.
Babel will do it automatically.

@tacigar
Copy link
Member Author

tacigar commented Jul 13, 2019

Keeping current is main motivation.
And avoiding to import unused polyfill modules and reducing the amount of code are my motivation too.

@codefromthecrypt
Copy link
Member

messages like this from travis


[ERROR]     /home/travis/build/openzipkin/zipkin/zipkin-lens/src/components/MiniTimeline/MiniTimelineGraph.test.js: Unexpected token (23:6)

@tacigar
Copy link
Member Author

tacigar commented Jul 14, 2019

I changed the babel config file from .baberc to babel.config.js.
But Jest did not read the new config file due to cache...
This is the cause of the above error.

I tried to test with --ci option.

@codefromthecrypt
Copy link
Member

codefromthecrypt commented Jul 14, 2019 via email

@tacigar
Copy link
Member Author

tacigar commented Jul 14, 2019

Ah, I see.
But test seems success now.

[ERROR] PASS src/zipkin/span-row.test.js
[ERROR] PASS src/zipkin/span-cleaner.test.js
[ERROR] PASS src/zipkin/trace.test.js
[ERROR] PASS src/zipkin/clock-skew.test.js
[ERROR] PASS src/zipkin/span-node.test.js
[ERROR] PASS src/components/DiscoverPage/api.test.js
[ERROR] PASS src/reducers/global-search.test.js
[ERROR] PASS src/components/App/SidebarMenuItem.test.js
[ERROR] PASS src/reducers/traces.test.js
[ERROR] PASS src/reducers/dependencies.test.js
[ERROR] PASS src/reducers/trace.test.js
[ERROR] PASS src/actions/traces-action.test.js
[ERROR] PASS src/actions/global-search-action.test.js
[ERROR] PASS src/actions/trace-action.test.js
[ERROR] PASS src/components/GlobalSearch/util.test.js
[ERROR] PASS src/actions/dependencies-action.test.js
[ERROR] PASS src/components/Browser/BrowserResults.test.js
[ERROR] PASS src/reducers/remote-services.test.js
[ERROR] PASS src/components/MiniTimeline/MiniTimeline.test.js
[ERROR] PASS src/components/App/Sidebar.test.js
[ERROR] PASS src/components/MiniTimeline/MiniTimelineSlider.test.js
[ERROR] PASS src/actions/remote-services-action.test.js
[ERROR] PASS src/reducers/spans.test.js
[ERROR] PASS src/components/App/App.test.js
[ERROR] PASS src/components/Browser/sorting.test.js
[ERROR] PASS src/components/MiniTimeline/MiniTimelineLabel.test.js
[ERROR] PASS src/util/trace.test.js
[ERROR] PASS src/actions/spans-action.test.js
[ERROR] PASS src/reducers/autocomplete-values.test.js
[ERROR] PASS src/reducers/autocomplete-keys.test.js
[ERROR] PASS src/reducers/services.test.js
[ERROR] PASS src/actions/autocomplete-values-action.test.js
[ERROR] PASS src/components/Browser/TraceSummary/TraceSummary.test.js
[ERROR] PASS src/actions/autocomplete-keys-action.test.js
[ERROR] PASS src/actions/services-action.test.js
[ERROR] PASS src/components/MiniTimeline/util.test.js
[ERROR] PASS src/components/Browser/Browser.test.js
[ERROR] PASS src/components/DiscoverPage/TraceIdSearchInput.test.js
[ERROR] PASS src/components/Browser/TraceSummary/TraceSummaryUpperBar.test.js
[ERROR] PASS src/actions/trace-viewer.test.js
[ERROR] PASS src/components/App/Layout.test.js
[ERROR] PASS src/components/Browser/TraceSummary/TraceSummaryBar.test.js
[ERROR] PASS src/components/Browser/TraceSummary/TraceSummaryButtons.test.js
[ERROR] PASS src/components/Browser/BrowserHeader.test.js
[ERROR] PASS src/components/MiniTimeline/MiniTimelineTimeMarkers.test.js
[ERROR] PASS src/components/MiniTimeline/MiniTimelineGraph.test.js
[ERROR] 
[ERROR] Test Suites: 46 passed, 46 total
[ERROR] Tests:       264 passed, 264 total
[ERROR] Snapshots:   0 total
[ERROR] Time:        17.383s
[ERROR] Ran all test suites.

The reason why log is ERROR is the spec of frontend-maven-plugin.

eirslett/frontend-maven-plugin#584

"@fortawesome/fontawesome-free": "^5.4.1",
"babel-core": "^6.26.3",
"babel-core": "^7.0.0-bridge.0",
Copy link
Member Author

@tacigar tacigar Jul 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tacigar tacigar added techdebt ui Zipkin UI labels Jul 14, 2019
@tacigar
Copy link
Member Author

tacigar commented Jul 14, 2019

PTAL 🙇

@codefromthecrypt codefromthecrypt merged commit ea4cd5f into openzipkin:master Jul 15, 2019
@codefromthecrypt
Copy link
Member

thank you!

@tacigar tacigar deleted the tacigar/update-babel branch August 3, 2019 16:38
abesto pushed a commit to abesto/zipkin that referenced this pull request Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants