Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: Intl definition provider for yaml & json #334

Conversation

godric3
Copy link

@godric3 godric3 commented Nov 6, 2021

Basic go to functionality for translations.

  • web-worker -> checked with fetch and no errors
  • dependencies:
    • changed js-yaml (38.8kB) -> yaml (95.6kB )
    • added json-to-ast (32.2kB)

@codecov
Copy link

codecov bot commented Nov 6, 2021

Codecov Report

Merging #334 (19594ed) into component-context-info-origin (99b360b) will increase coverage by 0.97%.
The diff coverage is 95.89%.

Impacted file tree graph

@@                        Coverage Diff                        @@
##           component-context-info-origin     #334      +/-   ##
=================================================================
+ Coverage                          69.98%   70.95%   +0.97%     
=================================================================
  Files                                 46       48       +2     
  Lines                               3968     4046      +78     
  Branches                             834      857      +23     
=================================================================
+ Hits                                2777     2871      +94     
+ Misses                              1188     1172      -16     
  Partials                               3        3              
Impacted Files Coverage Δ
.../completion-provider/script-completion-provider.ts 76.74% <66.66%> (-0.76%) ⬇️
src/utils/ast-helpers.ts 81.81% <90.00%> (+0.37%) ⬆️
src/builtin-addons/core/intl-utils.ts 96.03% <96.03%> (ø)
...rc/builtin-addons/core/intl-completion-provider.ts 96.66% <100.00%> (+3.64%) ⬆️
...rc/builtin-addons/core/intl-definition-provider.ts 100.00% <100.00%> (ø)
...ompletion-provider/template-completion-provider.ts 93.26% <100.00%> (+0.06%) ⬆️
src/utils/builtin-addons-initializer.ts 93.54% <100.00%> (+0.44%) ⬆️
...uiltin-addons/core/template-definition-provider.ts 76.63% <0.00%> (+4.09%) ⬆️
src/template-linter.ts 44.00% <0.00%> (+5.60%) ⬆️

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 411723e...19594ed. Read the comment docs.

@lifeart
Copy link
Owner

lifeart commented Nov 6, 2021

Wow, @godric3 thank you for this commitment!

Few comments here:

  • could you check possibilities of usage - https://www.npmjs.com/package/json-parse-ast? (5kb)
  • could we have "bad" test cases (with invalid JSON & Yaml) to be sure we not fail on errors
  • could we have multilang test cases? (few languages, and definitions should contain references to different files)

@godric3
Copy link
Author

godric3 commented Nov 6, 2021

Told you I wish to contribute more ;) In intl topic I also think about hover provider, and maybe renaming functionality

  • json-parse-ast -> will check
  • more tests -> sure!

@godric3 godric3 force-pushed the intl-definition-provider branch from 12a27b9 to 96b4f9b Compare November 7, 2021 13:29
@lifeart lifeart changed the title Intl definition provider feat: Intl definition provider for yaml & json Nov 7, 2021
@lifeart lifeart merged commit 96e53e6 into lifeart:component-context-info-origin Nov 7, 2021
lifeart pushed a commit that referenced this pull request Nov 7, 2021
# [2.5.0](v2.4.2...v2.5.0) (2021-11-07)

### Features

* Intl definition provider for yaml & json ([#334](#334)) ([96e53e6](96e53e6))
@lifeart
Copy link
Owner

lifeart commented Nov 7, 2021

@godric3 thank you for contribution! uELS 2.5.0 published, VSCode extension: 3.0.9 published

image

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants