Skip to content

Update types generator to use correct variable/function names. #1166

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

Merged
merged 5 commits into from
Nov 3, 2021

Conversation

Hyperkid123
Copy link
Member

Fixes #1165

Description
Functions and constants had incorrect type name casing resulting in missing TS types when using named exports. For example:

// results in TS error that the module does not exist
import { useFieldApi } from '@data-driven-forms/react-form-renderer'
// the type was named but that function does not exist
import { UseFieldApi } from '@data-driven-forms/react-form-renderer'

Changes

  • the default re-export name is based on the actual variable/function name instead of automatically converting everything to CamelCase. If the script is unable to extract the correct name, it will fall back to CamelCase conversion.

  • fixed some invalid type definitions

  • Yarn build passes

  • Yarn lint passes

  • Yarn test passes

  • Correct commit message

    • format fix|feat({scope}): {description}
    • i.e. fix(pf3): wizard correctly handles next button
    • fix will release a new _._.X version
    • feat will release a new _.X._ version (use when you introduce new features)
      • we want to avoid any breaking changes, please contact us, if there is no way how to avoid them
    • scope: package
    • if you update the documentation or tests, do not use this format
      • i.e. Fix button on documenation example page

cc @steverhoades

@Hyperkid123 Hyperkid123 added bug Something isn't working Technical debt common labels Nov 3, 2021
@Hyperkid123 Hyperkid123 requested a review from rvsia November 3, 2021 09:41
@DataDrivenFormsBot
Copy link

A new version (fix) will be released: v3.15.6 [DataDrivenFormsBot]

@codecov
Copy link

codecov bot commented Nov 3, 2021

Codecov Report

Merging #1166 (a69ea1e) into master (c1380d2) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1166   +/-   ##
=======================================
  Coverage   94.90%   94.90%           
=======================================
  Files         209      209           
  Lines        3571     3571           
  Branches     1237     1237           
=======================================
  Hits         3389     3389           
  Misses        182      182           

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 c1380d2...a69ea1e. Read the comment docs.

@Hyperkid123 Hyperkid123 changed the title Add missing renderer typings Update types generator to use correct variable/function names. Nov 3, 2021
Copy link
Contributor

@rvsia rvsia left a comment

Choose a reason for hiding this comment

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

🏆

@rvsia rvsia merged commit 872ed53 into master Nov 3, 2021
@rvsia rvsia deleted the add-missing-renderer-typings branch January 10, 2022 13:14
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.

Relative imports can cause issues during builds.
3 participants