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

Refactor template handling #220

Merged
merged 1 commit into from
Jul 29, 2020
Merged

Refactor template handling #220

merged 1 commit into from
Jul 29, 2020

Conversation

tripodsan
Copy link
Contributor

@tripodsan tripodsan commented Jul 22, 2020

BREAKING CHANGE:

  • The templateLoader and scriptResolver are now 2 separate functions that can be set on the compiler
  • The Runtime.template() has an extra argument 'id' that specifies the group (script) the template is defined.

fixes #216 #208

@tripodsan tripodsan marked this pull request as draft July 22, 2020 08:55
tripodsan added a commit that referenced this pull request Jul 24, 2020
fixes #220, fixes #216

BREAKING CHANGE: - The templateLoader and templateResolver are now 2
                   separate functions that can be set on the compiler

                 - The Runtime.template() has an extra argument 'id'
                   that specifies the group the template is defined.
@github-actions
Copy link

This PR will trigger a major release when merged.

@tripodsan tripodsan changed the title chore(test): adding tests for use in template element Refactor template handling Jul 24, 2020
@codecov
Copy link

codecov bot commented Jul 24, 2020

Codecov Report

Merging #220 into master will increase coverage by 0.05%.
The diff coverage is 98.78%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #220      +/-   ##
==========================================
+ Coverage   83.68%   83.74%   +0.05%     
==========================================
  Files          86       87       +1     
  Lines        3818     3844      +26     
==========================================
+ Hits         3195     3219      +24     
- Misses        623      625       +2     
Impacted Files Coverage Δ
src/compiler/ScriptResolver.js 94.44% <94.44%> (ø)
src/compiler/Compiler.js 98.10% <100.00%> (-1.23%) ⬇️
src/compiler/DomHandler.js 100.00% <100.00%> (ø)
src/compiler/JSCodeGenVisitor.js 97.91% <100.00%> (+0.04%) ⬆️
src/compiler/TemplateLoader.js 100.00% <100.00%> (+5.00%) ⬆️
src/parser/commands/CommandStream.js 96.00% <100.00%> (ø)
src/parser/commands/FileReference.js 100.00% <100.00%> (ø)
src/parser/commands/FunctionBlock.js 91.66% <100.00%> (+2.77%) ⬆️
src/parser/plugins/TemplatePlugin.js 90.90% <100.00%> (ø)
src/parser/plugins/UsePlugin.js 91.66% <100.00%> (ø)
... and 2 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 c9cf02d...cd46ad3. Read the comment docs.

@tripodsan tripodsan marked this pull request as ready for review July 24, 2020 12:37
fixes #220, fixes #216

BREAKING CHANGE: - The templateLoader and scriptResolver are now 2
                   separate functions that can be set on the compiler

                 - The Runtime.template() has an extra argument 'id'
                   that specifies the group (script) the template is
                   defined.
@tripodsan tripodsan merged commit b64729b into master Jul 29, 2020
@tripodsan tripodsan deleted the use-in-template branch July 29, 2020 06:58
adobe-bot pushed a commit that referenced this pull request Jul 29, 2020
# [5.0.0](v4.6.2...v5.0.0) (2020-07-29)

### Bug Fixes

* **compiler:** refactor template resolution ([#220](#220)) ([b64729b](b64729b)), closes [#216](#216)
* **element:** data-sly-element should default to existing tag if not allowed ([#228](#228)) ([3f457ba](3f457ba)), closes [#223](#223)
* **uri:** undefined uri ([#229](#229)) ([3dc23b7](3dc23b7)), closes [#221](#221) [#222](#222)

### BREAKING CHANGES

* **compiler:** - The templateLoader and scriptResolver are now 2
                   separate functions that can be set on the compiler

                 - The Runtime.template() has an extra argument 'id'
                   that specifies the group (script) the template is
                   defined.
@adobe-bot
Copy link

🎉 This PR is included in version 5.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

Recursive template calls not finding template
2 participants