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

Switched to named imports #629

Merged
merged 3 commits into from
Nov 6, 2019
Merged

Switched to named imports #629

merged 3 commits into from
Nov 6, 2019

Conversation

radekmie
Copy link
Contributor

@radekmie radekmie commented Nov 4, 2019

While working on #624 I've found two problems:

  • Themes importing uniforms package were importing certain files. This resulted in the website project importing ES6 build, but files inside were importing ES5 build of the core package.
  • Docusaurus is using ES6 bundle, but it transpiles classes anyway (and in a different way than our ES5 build).

To fix both I've changed all the inter-package imports (both in sources and tests) to named ones. It allows the bundler to choose which build to include. In general, we should start to encourage such a way of importing now, as our ES6 build is already there.

Then I've encountered a problem with core-js in Docusaurus, so I've updated it as well. To preserve current sidebar behavior I've added sidebarCollapsible: false.

One more, not related issue: uniforms-material was not exporting wrapField as a named export.

@radekmie radekmie added the Type: Feature New features and feature requests label Nov 4, 2019
@radekmie radekmie requested a review from kestarumper November 4, 2019 14:33
@codecov
Copy link

codecov bot commented Nov 4, 2019

Codecov Report

Merging #629 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #629   +/-   ##
======================================
  Coverage    99.6%   99.6%           
======================================
  Files         163     163           
  Lines        1782    1782           
  Branches      547     547           
======================================
  Hits         1775    1775           
  Misses          1       1           
  Partials        6       6
Impacted Files Coverage Δ
packages/uniforms-material/src/DateField.tsx 100% <ø> (ø) ⬆️
packages/uniforms-bootstrap4/src/NestField.tsx 100% <ø> (ø) ⬆️
packages/uniforms-bootstrap4/src/wrapField.tsx 100% <ø> (ø) ⬆️
packages/uniforms-bootstrap4/src/LongTextField.tsx 100% <ø> (ø) ⬆️
packages/uniforms-antd/src/QuickForm.tsx 100% <ø> (ø) ⬆️
packages/uniforms-antd/src/ListAddField.tsx 100% <ø> (ø) ⬆️
packages/uniforms-material/src/ErrorsField.tsx 100% <ø> (ø) ⬆️
packages/uniforms-bootstrap4/src/ErrorField.tsx 100% <ø> (ø) ⬆️
packages/uniforms-semantic/src/QuickForm.tsx 100% <ø> (ø) ⬆️
packages/uniforms-semantic/src/ListDelField.tsx 100% <ø> (ø) ⬆️
... and 124 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9af068a...187bc2d. Read the comment docs.

@radekmie radekmie merged commit 20e05fe into master Nov 6, 2019
@radekmie radekmie deleted the named-imports branch November 6, 2019 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature New features and feature requests
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants