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(text-binding): always evaluate expressions in strict mode #1801

Merged
merged 7 commits into from
Jul 17, 2023

Conversation

bigopon
Copy link
Member

@bigopon bigopon commented Jul 17, 2023

📖 Description

Currently all bindings are evaluating expressions in strict mode, and have proved to be working fine for applications migrating from v1. Text binding (content binding), however, was not using this strict by default mode as there could be some bug regards to how null/undefined are handled.
This exception creates a discrepancy that is hard to explain, also there's not a lot of benefits doing this. Remove this behavior.

This open the way for us to remove non-strict mode in expression evaluation, as optional syntaxes are already supported. Though this will be another follow up PR.

Closes #1769 #1798

@codecov
Copy link

codecov bot commented Jul 17, 2023

Codecov Report

Merging #1801 (318c779) into master (a1ca36d) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1801   +/-   ##
=======================================
  Coverage   88.51%   88.51%           
=======================================
  Files         248      248           
  Lines       22352    22352           
  Branches     5199     5200    +1     
=======================================
  Hits        19785    19785           
  Misses       2567     2567           
Impacted Files Coverage Δ
packages/runtime-html/src/binding/attribute.ts 94.80% <ø> (ø)
packages/runtime-html/src/binding/let-binding.ts 88.37% <ø> (ø)
...kages/runtime-html/src/binding/listener-binding.ts 91.11% <ø> (ø)
...kages/runtime-html/src/binding/property-binding.ts 96.42% <ø> (ø)
packages/runtime-html/src/binding/ref-binding.ts 91.30% <ø> (ø)
...ackages/runtime-html/src/binding/spread-binding.ts 83.60% <ø> (ø)
packages/runtime-html/src/renderer.ts 89.18% <ø> (ø)
...ckages/runtime-html/src/binding/content-binding.ts 94.31% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@bigopon bigopon merged commit 15acfee into master Jul 17, 2023
28 checks passed
@bigopon bigopon deleted the chore/cleanup-10 branch July 17, 2023 12:28
AureliaEffect pushed a commit that referenced this pull request Jul 24, 2023
**Features:**

* **compose:** passthrough bindings + support containerless (#1792) ([e8e39a9](e8e39a9))
* **template:** access global (#1790) ([2486b58](2486b58))

**Bug Fixes:**

* **router-lite:** handling slash in parameter value (#1805) ([3fbb698](3fbb698))
* **au-slot:** correctly prepare resources for slotted view (#1802) ([bf1ca4c](bf1ca4c))
* **router-lite:** e2e build ([a1ca36d](a1ca36d))

**Refactorings:**

* **ref:** deprecate view-model.ref and introduce component.ref (#1803) ([97e8dad](97e8dad))
* **text-binding:** always evaluate expressions in strict mode (#1801) ([15acfee](15acfee))
* **router-lite:** query in fragment when using useUrlFragmentHash option (#1794) ([a1ca36d](a1ca36d))
* ***:** bindable property -> name (#1783) ([ca0eda7](ca0eda7))
* **router-lite:** optimize object creation (#1782) ([c1ef0a3](c1ef0a3))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Support Nullish coalescing in templating
1 participant