Skip to content

♻️ Simplify log/assert code and use core assert#34061

Merged
rcebulko merged 4 commits intoampproject:mainfrom
rcebulko:no-assoc-el
Apr 28, 2021
Merged

♻️ Simplify log/assert code and use core assert#34061
rcebulko merged 4 commits intoampproject:mainfrom
rcebulko:no-assoc-el

Conversation

@rcebulko
Copy link
Copy Markdown
Contributor

Moves detection of error.associatedElement from log#prepareError_ to error-reporting where it is used. Simplifies log#assert method in preparation for adding type assertion helpres to core.

@amp-owners-bot amp-owners-bot bot requested a review from dvoytenko April 28, 2021 17:16
@amp-owners-bot
Copy link
Copy Markdown

Hey @jridgewell! These files were changed:

src/core/assert.js

@rcebulko rcebulko requested review from samouri and removed request for dvoytenko April 28, 2021 17:17
Copy link
Copy Markdown
Contributor Author

@rcebulko rcebulko left a comment

Choose a reason for hiding this comment

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

OWNERS bump

@rcebulko rcebulko merged commit 8d97947 into ampproject:main Apr 28, 2021
@rcebulko rcebulko deleted the no-assoc-el branch April 28, 2021 21:11
rochapablo pushed a commit to rochapablo/amphtml that referenced this pull request Aug 30, 2021
* Report error in core if reporting fn defined

* Use base assertion fn directly in log

* Move associatedElement from log to error reporting

* Use concat in apply
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

I2I: src/core directory with no runtime dependencies Tracking Issue: restricted paths eslint allowlist

3 participants