-
Notifications
You must be signed in to change notification settings - Fork 3.9k
📦 Update dependency esbuild to v0.11.19 #34147
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
📦 Update dependency esbuild to v0.11.19 #34147
Conversation
a44aba5
to
2d70937
Compare
2d70937
to
7130544
Compare
c0fb189
to
cfd5302
Compare
96ec28c
to
54f1fa0
Compare
Nice find @samouri! When I applied it (9a2e97c), the transformation error moved from Do either of you remember how to get |
9a2e97c
to
879ff95
Compare
@rsimha: I'll try to fix this tomorrow. Justin discovered it in the previous thread. The issue is that we are converting to
|
Hey @rsimha! These files were changed:
|
9aaf12f
to
2aa6272
Compare
Unit tests ✅ , looks like there are issues with integ. Will investigate now |
solution |
Thanks for ushering this upgrade through, @samouri! |
* 📦 Update dependency @types/node to v14.14.44 (ampproject#34219) * 📦 Update dependency eslint-plugin-jsdoc to v33.1.0 (ampproject#34225) * 📦 Update dependency puppeteer to v9.1.1 (ampproject#34226) * 🐛 amp-youtube 1.0: forward mute method (ampproject#34221) Previous oversight. * ✅ Validator rules for amp-vimeo 1.0 (ampproject#34199) * ✨ added support for consent for Taboola amp-analytics (ampproject#34166) * added support for consent for Taboola amp-analytics * fixed the consent substitution variable name * fixed the consent substitution name * fixed unit tests * Types: fix all type parse errors and ensure no new ones crop up (ampproject#34105) * Types: fix all type parse errors * self nits * run prettier * fix a new parse error, make low-bar target * Update panning-media-docs (ampproject#34236) * resources: rename V1 to R1, to clear up ambiguity (ampproject#34227) * allow http and relative for amp-story-page-attachment (ampproject#34234) * ♻️ Types: opt for null shorthand (ampproject#34233) * types: shorthand for |null * a few more * fix test * 📦 Update core dependencies (ampproject#34146) Co-authored-by: Raghu Simha <[email protected]> * ♻️ Enable type-checking src/polyfills in CI (ampproject#34239) * Clean up directory globs * Move src/core srcs+externs to const arrays * Exclude fetch/get-bounding-client-rect for now * Provide extern for promise-pjs polyfill * Fix types and add comments in abort-controller * Fix types and add comments in intersection-observer-stub * Remove @Suppress {checkTypes} from promise * Fix @this type for document.contains() polyfill * Remove unneeded typecast to unknown * Fix types and add comments in resize-observer-stub * Fix types and add comments in custom-elements * Add ! * Fix types in get-bounding-client-rect * Add more ! * Lint fixes * Allow custom-element.externs.js to use window * Revert no-op JSDoc changes * Remove connected callback externs and typecast instead * Clean up typedefs for observer stubs * Fix typo * Dedupe typedef * 🐛 amp-brightcove: improve autoplay handling (ampproject#34207) Following an update to the Brightcove Player's AMP support plugin, this update makes sure autoplay is handled correctly in all cases. - Removes any autoplay query param, including the interim autoplay=false - Distinguishes play messages sent through postmessage which are autoplay requests * ♻️📖 Provide a Storybook wrapper to execute video actions (ampproject#34222) Extract a wrapper to add video action buttons to an AMP Storybook. https://user-images.githubusercontent.com/254946/117086191-c4e6d700-ad00-11eb-95ff-f9e3b51caf2b.png * [bento][npm] Add package.json for all bento components with npm definition (ampproject#34087) * Add package.json for all bento components with npm definition * Add newline at end of file * Fix indentation * Newline at end of file * Fix newline * Add recently published timeago, update NPM definitions * Remove package for render, sidebar, twitter which are not published * Update version for amp-timeago package * ♻️ Name amp-ima-video methods uniformly for Bento (ampproject#34246) Rename `postMessage` method names so that they're uniform with `VideoIframe`'s. This simplifies the upcoming Bento implementation. * Remove consent storage limit for viewer (ampproject#34054) * 🐛 Fix bad type (ampproject#34254) * Noticed these changes while refactoring on another branch (ampproject#34250) * update amp-script console error to mention data-ampdevmode (ampproject#34235) * ♻️ Move `imaVideo.js` so it can be owned by Bento and Components (ampproject#34247) * ♻️ 📖 Global dep-check rule for Bento video (ampproject#34252) We can more simply allow `extensions/**` files to import specific files from `amp-video/1.0`. It should be ok in any case. * 🏗 runtime: allow for iterator polyfill (ampproject#34249) * runtime: allow for iterator polyfill * Empty commit * lint! * Bento: Prepare Twitter Preact implementation (ampproject#34194) * Do not override user given height until message gives one * Support tweetid directly * Support bootstrap directly * Add unit tests * Support momentid directly * Add Storybook samples for additional options * Use Sinon syntax for spying on setter * Log output when onError set (ampproject#34259) * ✅ ♻️ `<amp-ima-video>` test is not an AMP element test (ampproject#34230) The existing file `test-amp-ima-video.js` is a misnomer since it does not actually test the `<amp-ima-video>` element, only what it loads inside the frame. Accordingly, rename `test-amp-ima-video.js` as `test-ima-video-internal.js`. Also remove stubs specific to the AMP runtime, since it doesn't run inside the iframe. * 🚀 Remove Error classification (ampproject#34257) * Remove Error classification * Left over let declaration * Remove jse error field * 🏗 amp-subscriptions* owners update (ampproject#34261) * Update OWNERS * Update OWNERS * SwG Release 5/5/21 (ampproject#34238) * 🏗️ Simplify enabling npm bundle for components (ampproject#34262) * Simplify enabling npm bundle * %s/const/let/ * 🏗 Add `wg-components` as bundle size approver of dist.3p/ (ampproject#34267) * ♻️ refactor: move builtin components to their own folders (ampproject#34237) * refactor: move builtin components to their own folders. organization++ * fix imports / and references in md files. * closure glob include * ✨ [Amp story] Add `amp-story-page-outlink` component (ampproject#34171) * Fix conflicts. * Advancement, test and comment. * querySelector * Fix conflicts. * Validator, component and template. * Fix merge conflicts. * Remove duplicate code. * Outlink validator rule. * Alphabetize * amp-twitter: Add Storybook samples (ampproject#34273) * Add comprehensive Storybook samples for amp-twitter * Add deleted and invalid tweet-id cases * Name exported functions in PascalCase * 📖 Update LTS release docs to indicate supported AMP flavors (ampproject#34258) * Update lts-release.md * Update lts-release.md * 📦 Update dependency mocha to v8.4.0 (ampproject#34270) * 🏗 Disable JSDoc requirement on Storybook files (ampproject#34255) Disable `require-jsdoc` since it auto-fixes, and we don't need JSDoc in these locations. We preserve the following rules since they ensure correctness, like type-check already does. jsdoc/check-param-names jsdoc/check-tag-names jsdoc/check-types jsdoc/require-param jsdoc/require-param-name jsdoc/require-param-type jsdoc/require-returns jsdoc/require-returns-type * 📦 Update dependency google-closure-compiler to v20210505 (ampproject#34269) * 📦 Update dependency @ampproject/worker-dom to v0.29.3 (ampproject#34242) * 📦 Update core devDependencies (ampproject#34240) * 🖍 [Amp story] [Page attachments] Style adjustments (ampproject#34275) * SVG edit * SVG adjustment. * Drop shadows. * Prevent clipping of decenders. Drop shadow. * ♻️ [bento][amp-stream-gallery] Split component files for NPM Packaging (ampproject#34208) * Split amp-stream-gallery * Rename jss and type files * Review comments * Add package.json file * Fix indentation * Update npm and latest version in config * Update dependency config * Update zindex doc * Update npm definition * [bento][amp-sidebar] SSR compatible design for Sidebar Toolbar (ampproject#34158) * SSR compatible design for Toolbar * Various code review comments from Caroline * Additional review comments * Review comments * Remove unused import * Add sanitation * Update sanitization method * Update return type for helper function * Remove truthiness checks that are redundant * Add unit tests * ♻️ 🏗 Fix type errors in runtime-test-base (ampproject#34161) * fix types in runtime-test-base * ♻️ 🏗 Create proxy for kleur/colors to expand typing. (ampproject#34243) * references to kleur/colors now pass through build-system/common/colors Co-authored-by: Raghu Simha <[email protected]> * update babel.config * 📦 Update com_googlesource_code_re2 commit hash to aa45633 (ampproject#34290) * Check video duration when setting AutoAdvance default (ampproject#34153) * Handle AutoAdvance duration * Update extensions/amp-story/1.0/amp-story-page.js Co-authored-by: Enrique Marroquin <[email protected]> * Update extensions/amp-story/1.0/page-advancement.js Co-authored-by: Enrique Marroquin <[email protected]> Co-authored-by: Gabriel Majoulet <[email protected]> Co-authored-by: Enrique Marroquin <[email protected]> * 📦 Update dependency postcss-import to v14.0.2 (ampproject#34297) * 📦 Update dependency eslint to v7.26.0 (ampproject#34289) * ❄️ Skip flaky stories tests (ampproject#34303) * 🏗 Improve usability of `describes` by making it configurable (ampproject#34286) * 📦 Update dependency postcss to v8.2.15 (ampproject#34301) * ✅ Validator rules for amp-video-iframe 1.0 (ampproject#34200) * amp-twitter:1.0 - Allow binding to data-tweetid and other configuration attrs (ampproject#34296) * Add Storybooks for mutation * Reload iframe when context (via name) changes * Add unit test * PascalCase * Named vars in test * 🚮 Remove unused font from examples (ampproject#34309) * 🚮 Remove unused font from examples * Remove CSS uses without <link> * update validator files * ✨ Add parameter to configure amp-story-player animation (ampproject#34204) * added animation options * Removed animation from behaviordef * Added newline on player * Added documentation on options * Use next to toggle animation * Use transitionend * Using classes for CSS * Reverted requestAnimationFrame promise * Added tests * Apply suggestions from code review Co-authored-by: Enrique Marroquin <[email protected]> * Use true instead of property Co-authored-by: Enrique Marroquin <[email protected]> Co-authored-by: Enrique Marroquin <[email protected]> * 🐛 [amp-lightbox-gallery] Use declared amp-carousel extension to build carousel (ampproject#34292) * init * nit * Get reference to win. (ampproject#34299) * ♻️ `<amp-ima-video>`: Serialize children (ampproject#34229) `<amp-ima-video>` takes children like: ``` <amp-ima-video> <source data-foo="bar" src="src" /> <track src="src" /> </amp-ima-video> ``` These were previously serialized as HTML on `buildCallback` to be pass to the iframe to (unsafely) write onto `innerHTML`: ``` <amp-ima-video data-child-elements='<source data-foo="bar" src="src" /><track src="src" />' ></amp-ima-video> ``` To prepare for a Bento implementation, we serialize into a JSON format that a Preact component can build more simply and safely: ``` [ ["SOURCE", {"data-foo": "bar", "src": "src"}], ["TRACK", {"src": "src"}] ] ``` This change only affects the interface between the `<amp-ima-video>` element and its own proxy `<iframe>`. It does not affect anything author-facing since they will continue to write children `<source>` and `<track>` elements as such. * 📦 Update dependency eslint-plugin-jsdoc to v34 (ampproject#34304) * 🏗✅ Sandbox all unit and integration tests (ampproject#34305) * Bento: Assign placeholder and fallback elements to service slot (ampproject#34310) * Pass placeholder and fallback to shadow * Add unit test * Type annotation * Remove auto import * 📦 Update linting devDependencies (ampproject#34288) Co-authored-by: Raghu Simha <[email protected]> * 📦 Update dependency esbuild to v0.11.19 (ampproject#34147) * 📦 Update dependency esbuild to v0.11.19 * Add workaround for evanw/esbuild#1202 * Hack: leave .mjs as esm * cleanup * experiment with excluding all of node_modules instead of just .mjs files. * update comment * nit:hoist Co-authored-by: Raghu Simha <[email protected]> Co-authored-by: Jake Fried <[email protected]> * Update tests of updateTimeDelay to be more fuzzy (ampproject#34313) * 📦 Update dependency esbuild to v0.11.20 (ampproject#34322) * 🐛✨ [amp-ad] [amp-auto-ads] Firstimpression.io: more debug options, (ampproject#34170) * FirstImpression.io: debug parameters also as query search parameters * FirstImpression.io: use pageViewId64, more debug options * 🏗 Sandbox `describes.repeated` and get rid of the global `window.sandbox` (ampproject#34329) * amp-render a11y (ampproject#34320) * 🐛 [Amp story] [Page attachments] [Outlink] Split outlink codepaths for open attachment (ampproject#34330) * Split outlink codepaths. * Lint. * ♻️ Modernize some core code (ampproject#34280) * Use null coalesce and deferred * Use for...of instead of forEach * Simplify Deferred class * Tweak Observable to use removeItem, for..of, ?? * Fix typo * %s/break/continue/ * ✨ Text fragments support on amp viewer (ampproject#34074) * Initialize Logs in web-push's helper frame endpoint (ampproject#34326) * Find existing element by attr not tagName (ampproject#34325) * cl/372175665 amp-vimeo: prioritize v0.1 over v1.0 in tagspec ordering (ampproject#34339) * Add unit tests for amp-facebook-comments:0.1 (ampproject#34331) * Add unit tests for amp-facebook-comments * Fix unit tests in 1.0 * Lint * Let GitHub Actions write package jsons for bento (ampproject#34311) * wnode script * error handle * log * move files * pr comments * 🏗 Add OWNERS for `src/preact` (ampproject#34298) * Create OWNERS file for src/preact * Add jridgewell * carolineliu -> caroqliu * 📦 Update com_googlesource_code_re2 commit hash to bc42365 (ampproject#34341) * Add additional wording to tests (ampproject#34334) Closes ampproject#34260 Adds additional language around using `_top` in swipe up links (opening the link in the parent window for viewers). (Follow up for ampproject#34030) * 📦 Update dependency eslint-plugin-jsdoc to v34.0.2 (ampproject#34336) * 📦 Update dependency jest-progress-bar-reporter to v1.0.21 (ampproject#34338) * 📦 Update babel devDependencies to v7.14.2 (ampproject#34344) * 📦 Update core devDependencies (ampproject#34353) * Solve dumb CC type inference bug (ampproject#34355) * Upgrade Preact to 10.5.13 (ampproject#30043) * Upgrade Preact to 10.4.8 * update preact to latest Co-authored-by: Jake Fried <[email protected]> * ♻️ Start updating assertions to use core/assert instead of src/log (ampproject#34284) * Prefix user/dev assert fns * Update renamed imports * Update imports to drop "pure" * Update src/utils assert imports * Update src/{polyfills,preact,purifier,web-worker} assert imports * Update src/{inabox,amp-story-player} assert imports * Fix merge breakage * Fix merge breakage * 🏗♻️ Refactor and simplify initialization / clean up of unit and integration tests (ampproject#34346) * ♻️ Provide core `tryCallback` helper (ampproject#34348) * Provide tryCallback helper * Import shared helper where relevant * Remove spread param * Fix missing import * Update src/core/error.js Co-authored-by: Justin Ridgewell <[email protected]> * Update src/core/error.js Co-authored-by: Justin Ridgewell <[email protected]> * Update src/core/error.js Co-authored-by: Justin Ridgewell <[email protected]> * ♻️ Clean up extern typedefs (ampproject#34345) * Un-extern AssertionFunction typedef * Un-extern Timestamp * Move UnlistenDef to function.extern.js * %s/Timestamp/TimestampDef/ for linter * Fix typo * Fix log type decl * ♻️ Modernize polyfills (ampproject#34342) * dedupe rethrowAsync * modernize fetch polyfill * modernize custom-elements polyfill * modernize polyfill stubs * modernize object-assign polyfill * update straggler * Fix typo * typecast elements_ * Revert changes to fetch polyfill * Revert changes to fetch object-assign * Clean up stub types by removing nullability * Update polyfill stub tests * Fix test change * ♻️ Consolidating more core type helpers (ampproject#34253) * Move time.js types into src/core/types/date * Move finite-state-machine to core/data-structures * Make core/types/string a submodule * Move base64 and bytes tests with core * Move curve.js to core/data-structures * Make src/core/function a submodule * Update dep-check and conformance configs for string.js * Fix legacy tests * Move tests for exponential backoff * Standardize data structures tests * Update test file structure * Make curve map side-effect-free * Use map and isString helpers * Tweak test names * Fix import * Fix types * Update imports of finite-state-machine * Update imports of bytes and base64 * Update imports of curve * Update imports of exponential-backoff * make lerp static * make getPointX/Y static * make solvePositionFromXValue static * make Bezier fully static * Use Bezier not static this * Fix typo * Use static solver in Curves map * Fix type decls * tweak comments * Remove unused import * Fix imports from merge * Move normtimedef to curve * ♻️ Simplify rendering <amp-ima-video> with CSS and static templates (ampproject#34248) Use static templates and standalone CSS to simplify how we render a modify `<amp-ima-video>`'s internal tree. This change is unrelated to the Bento effort. Communication between iframe and host is intact. * Update npm definition and package file for publishing (ampproject#34333) * 🐛Fix lint error in test-ima-video-internal.js (ampproject#34365) * amp-script: sandboxed implies nodom (ampproject#34025) * ✨ [amp-render] `placeholder` and `fallback` support (ampproject#34294) * 📦 Update com_google_googletest commit hash to 662fe38 (ampproject#34373) * ✅ Add unit tests for amp-facebook-like (ampproject#34361) * Add unit tests for amp-facebook-like * Lint * fix layout bug (ampproject#34360) * 📖 Pressboard vendor updates (ampproject#34188) Update Pressboard analytics config and documentation link. * ✨ amp-auto-ads extension: Denakop (ampproject#34215) * feat: Custom style * Revert "feat: Custom style" This reverts commit 2e886ec. * feat: Add custom style * test: Change tests * fix: Fix lint issues * feat: Custom style * Revert "feat: Custom style" This reverts commit 2e886ec. * feat: Add custom style * test: Change tests * fix: Fix lint issues * Revert "fix: Fix lint issues" This reverts commit 386df3f. * fix: Fix lint issues * Forbid private properties inside BaseElement (ampproject#34376) This fixes a cross binary issue with private properties being mangled to, ie., `lc` inside `BaseElement` base class. The issue is that a subclass extending it in another binary (eg, `amp-a4a`) can reuse that mangled name for something entirely different, because Closure isn't aware of what the base class is at that point. * SwG release 0.1.22.165 (ampproject#34352) * SwG release 0.1.22.165 * unbreaks amp test * ✅ Add unit tests for amp-facebook-page (ampproject#34351) * Add unit tests for amp-facebook-page * Move amp-facebook-page test to correct location * 📖 Disable deadlink checking for Infoline (ampproject#34384) * 📦 Update dependency esbuild to v0.11.21 (ampproject#34381) * 📦 Update linting devDependencies (ampproject#34377) * 🚮 Clean up obsolete npm resolutions (ampproject#34388) * ♻️ 🏗 Fix typing in the build-system (ampproject#34162) * fix type errors * make suggested changes * Update build-system/test-configs/jscodeshift/index.js Co-authored-by: Raghu Simha <[email protected]> * Update build-system/tasks/serve.js * add empty passing check to visual-diff tests when they are not needed (ampproject#34371) * Remove FunctionalTestController, make ControllerPromise extend Promise (ampproject#33844) * remove functionaltestcontroller, rename functional-test-controller file * rename functional-test-types to e2e-types Co-authored-by: Enrique Marroquin <[email protected]> * ✅ [Story player] Fix animation unit test flakiness (ampproject#34382) * added animation options * Removed animation from behaviordef * Added newline on player * Added documentation on options * Use next to toggle animation * Use transitionend * Using classes for CSS * Reverted requestAnimationFrame promise * Added tests * Apply suggestions from code review Co-authored-by: Enrique Marroquin <[email protected]> * Use true instead of property Co-authored-by: Enrique Marroquin <[email protected]> * Removed trailing whitespace * Fixed linting * Wait for transitionend Co-authored-by: Enrique Marroquin <[email protected]> * 🏗 Switch AMP's main bug template to a yaml-based form (ampproject#34393) * Adding Blue Triangle to amp-analytics list✨ (ampproject#34012) * added blue triangle AMP integration info * fixed minor nitpicks for AMP integration * added client ID instead of random substring for guid and session id * added new lines at end of file * amp prettify command changes * Revert "amp prettify command changes" This reverts commit 1c489b2. * reverted last changed, only have the needed changes * got rid of not needed extra url params * changed to endpoint from base * remove question mark * made sure web vitals were present, changed format of client id in vendor example * more changes * 🏗 Allow Performance WG to manage check-types (ampproject#34395) * Allow Performance WG to manage check-types * Lint fixes * Fix nits in ampproject#34376 (ampproject#34392) * 📦 Update dependency karma-esbuild to v2.2.0 (ampproject#34396) * ♻️ Extract json helpers to core/types/object/json (ampproject#34367) * Make types/object submodule * Update path in presubmit/lint configs * Move json externs * Move json to core * Shift generic helpers from json to object * Fix test files * Fix types excluding json * Fix types in json * Clean up and remove dupe code * Update imports of json * Remove newlines between imports * Fix dep-check-config * Null chaining for [] and () * Typo * Fix callback * Expand AMP issue template intro text (ampproject#34397) * ♻️ Enable passing type-checking on src/experiments and src/examiner (ampproject#34394) * mv src/experiments.js -> src/experiments/index.js * Make src/experiments pass type-checking * Allow use of window in extern files * Remove unused import * Allow AMP_CONFIG in extern * Modernize experiments code * Enable passing type-checking on src/examiner + modernize * Use assert via logger * un-hoist * Clean up extra type annotations * Fix tests passing object instead of array * 📖 Convert feature request issue template to a form (ampproject#34398) * PubMatic OpenWrap to pass consent strings (ampproject#34403) * use storyNextUp (ampproject#34285) * 📖 Improve references to the AMP plugin for WordPress in bug report template (ampproject#34401) * Improve references to the AMP plugin for WordPress * Fix text to fit on one line and apply to FR template Co-authored-by: Raghu Simha <[email protected]> * 📖 Consolidate all AMP documentation in `docs/` (ampproject#34047) * 📦 Update dependency geckodriver to v2 (ampproject#34404) * 📦 Update linting devDependencies (ampproject#34409) * 📖 Move AMP documentation from `spec/` to `docs/spec/` (ampproject#34160) * 🚮 [Story bookend] Disabled bookend and related tests (ampproject#34354) * Disabled bookend and related tests * Removed checks to bookend * Linted * Made bookend an alias of social-share * Removed bookend test since it's not showing * Removed bookend tests * Fixed linting * Cleanup * Fixed linting again * Removed visual tests * Fixed test * 📦 Update dependency open to v8.0.9 (ampproject#34408) * 📦 Update dependency esbuild to v0.11.23 (ampproject#34407) Co-authored-by: Raghu Simha <[email protected]> * ♻️ [bento][amp-base-carousel] Split component files for NPM Packaging (ampproject#34283) * Initial commit for base-carousel conversion * Additional updates * Add npm files * Update z-index doc * Update z-index * 📦 Update dependency rollup to v2.48.0 (ampproject#34410) * ♻️ Enable passing type-checking on src/context (ampproject#34387) * enable src-context type-check target * Fix type errors in src/context * export ContextPropDef * for...of in scan * clean up scheduler types * Update ContextPropDef in subscriber * update types in index * update types in index * update types in contextprops * update types and for...of in node * Drastically narrow types in values * Add DEP template type to contextpropdef * type-narrow subscriber * Clean up scheduler type decl * use templates in scan * Update index prop and setter types * Allow subscriber ID template type * Add deps template arg for contextprops * Add SID for return type * Assert non-null subscriber IDs * Code review tweak * Remove template type from static function * forEach -> for..of * Revert forEach changes to Maps * 🐛 amp-ima-video: Fix pause button jamming on autoplay (ampproject#34307) When autoplaying a video with a preroll ad, the pause button will not work the first time. This is because we haven't tracked the `PlayerState`. This change keeps track of `PlayerState` on ad events, as meant initially. * ♻️ Start moving URL helpers into core (ampproject#34399) * Move query string parsing into core * Update dep-check config * Move query string parsing helper tests * Fix typo * Restore deleted forbidden-terms rule * Update single imports of helpers * Update multi-imports of url helpers * Fix straggler imports * Lint fixes * 🐛 [Story devtools] Toggle devtools on mjs build (ampproject#34372) * IsDevelopmentMode * return boolean jsdoc * Use include since we polyfill Co-authored-by: Ryan Cebulko <[email protected]> * Removed useless comment Co-authored-by: Ryan Cebulko <[email protected]> * 🚮 [Story bookend] Remove bookend extended code (ampproject#34343) * Started removing bookend * Finished removing bookend from files * Fixed linting * Updated validation tests * Updated validation tests 2 * Removed bookend strings * Disabled bookend and related tests * Removed checks to bookend * Linted * Made bookend an alias of social-share * Removed bookend test since it's not showing * Removed bookend tests * Fixed linting * Cleanup * Fixed linting again * Removed visual tests * Fixed test * Fixed test * Fixed request service tests * Fixed visual tests * Bring back validation tests for bookend * persist playing state on config (ampproject#34356) * Fix invisible merge conflict (ampproject#34420) * cl/373617376 Make the process of auto-generating validator.pb.go compatible with protoc v3.16.0. (ampproject#34428) Co-authored-by: Michael Rybak <[email protected]> * 📖 Migrate `Intent-to-*` issue templates to yaml forms (ampproject#34431) * Use validator_wasm.js as default validator (ampproject#34213) * 📖 Delete the manual error report issue template (ampproject#34435) * 📦 Update validator devDependencies to eb6e927 (ampproject#34436) * 📦 Update dependency esbuild to v0.12.1 (ampproject#34421) * 📦 Update babel devDependencies to v7.14.3 (ampproject#34418) * ✅ [Story video] Add e2e tests for Bitrate Manager (ampproject#33660) * Created e2e test * Added tests * Fixed e2e tests * Removed comment * Removed unused import * Addede e2es * Moved field to html * More work on e2e * Added load unload fixture * Fixed tests * Added more tests and cleaned up hooks * Added multiple sources on first videos to test flexible-bitrate * Changed e2es to work * Removed whitespaces * Adding cache fetch test * Add e2e fixture to disallowlist for validate * fixed host_url in e2e * Updated tests * Changed order of test conditions for consistency * Update extensions/amp-video/0.1/test-e2e/test-amp-video-flexible-bitrate.js * Update extensions/amp-video/0.1/test-e2e/test-amp-video-flexible-bitrate.js Co-authored-by: Gabriel Majoulet <[email protected]> * 📖 Migrate the release tracker template to a yaml form (ampproject#34440) * 📦 Update dependency @types/node to v14.17.0 (ampproject#34429) * 📦 Update dependency eslint-plugin-jsdoc to v34.8.2 (ampproject#34415) * Check if documentHeight has changed after all elements initially built (ampproject#34434) * SwG release 0.1.22.166 (ampproject#34444) * ✨[amp-form] allow `form` attributes for form elements outside of `amp-form` (ampproject#33095) * Init * init * handler => service * Tests * ServiceForDoc no promise * Validator, WeakMap of Array, nits * Update build-system/test-configs/forbidden-terms.js Co-authored-by: Alan Orozco <[email protected]> * Update extensions/amp-form/0.1/amp-form.js Co-authored-by: Alan Orozco <[email protected]> * Update extensions/amp-form/0.1/amp-form.js Co-authored-by: Alan Orozco <[email protected]> * Account for amp-selectors (in and out) * fix test * Update build-system/test-configs/forbidden-terms.js Co-authored-by: Raghu Simha <[email protected]> Co-authored-by: Alan Orozco <[email protected]> Co-authored-by: Raghu Simha <[email protected]> * Add adoptedCallback to work around Firefox Native CE bug (ampproject#34455) See https://output.jsbin.com/yuwojok/29/quiet for a working demo of the bug. When we construct a CustomElement in one document, then insert it into another document (as we do with A4A ads), Firefox incorrectly resets the prototype of our CE instance to `HTMLElement.prototype`. Luckily, we can fix this by listening for the `adoptedCallback`, which fires just after Firefox resets the prototype. If we detect a broken prototype chain, we can correct it before any other code can notice. See https://output.jsbin.com/datajos/5/quiet for a demo of the fix. * ✨ Update npm amphtml-validator to v1.0.35 (ampproject#34454) * Update npm amphtml-validator to v1.0.35 * Update readme * ♻️ Cleaning up Log error code in preparation for core (ampproject#34458) * Move core/error.js -> core/error/index.js * Move user error helpers to error-message-helpers * Move error-message-helpers to error/message-helpers * spread args in log where slicing * Use loglevel enum in msg_ * Add TODO * string.includes Co-authored-by: Justin Ridgewell <[email protected]> * Update src/core/error/message-helpers.js Co-authored-by: Justin Ridgewell <[email protected]> * 📦 Update com_google_googletest commit hash to aa9b44a (ampproject#34452) * ♻️ Create plain `<img>` placeholders (ampproject#34379) Where extensions would previously create `<amp-img>` placeholders, now create a plain `<img>` element with `loading="lazy"` * remove brotli check as these files do not exist on cdn anymore (ampproject#34457) * remove brotli check as these files do not exist on cdn anymore * prettier * ♻️ Support img element (ampproject#34028) * Allow IMG so long as it contains a loading attribute * Make width and height mandatory * Move method from within AMP.BaseElement to src/core/dom since it must act on native elements and extended AMP elements now * Update validator output * Mid way stopping point on amp-lightbox-gallery cloneLightboxableElement_ * Lightbox gallery now supports image elements * Use Sets instead of objects * PR feedback on name of utility and usage of other utilities * lightbox had a bad reference * Spy on the right thing now * Remove validator changes for a later step * Carriage returns at the end of the out files for the validator * Updated carriage returns at end of files * Update comments * Move auto lightbox to loadPromise * Remove Set in amp-auto-lightbox * Remove set in amp-image-lightbox * Remove logic specific to amp-img for the img path * Additional fixes for Set usage * test for supporting img on amp-image-lightbox * Add tests for propagate attributes helper and fix usage in iframe-video * Additional fixes for propagateAttributes from AMPElements * Bad merge * pass ampdoc in Criteria so its not obtained from an HTMLElement * change order of arguments to reduce test rewriting for Criteria * Fix types in propagate attributes * Prettier formatting * different prettier versions * update core utility with improved typing from below * Address part of Alans feedback * types * remove toLowerCase on tagName * Test changes from PR feedback (and applied elsewhere in the file) * Add support for native HTMLImageElements to amp-image-slider * Add test using HTMLImageElements * Revert changes to gestures for a later PR * Continued progress, pan zoom works and lightbox gallery is underway * LayoutScheduled for amp-carousel 0.1 when unlayout happening * Remove image support for amp-image-viewer for a future PR * Image Viewer no longer needs to exclude itself from using loadPromise directly * Remove console logging for carousel debugging: * Remove breaks in parsing of children for amp-image-slider * No need to provide an empty array for the Set constructor * Remaining console * Nit * Remove more intermediary state changes * Naming nit * prettier formatting in test * support loading indicator and no-loading attribute (ampproject#34467) * 📦 Update dependency amphtml-validator to v1.0.35 (ampproject#34472) * 📖 Migrate the cherry-pick request template to a yaml form (ampproject#34463) * 📦 Update build-system devDependencies (ampproject#34231) * 📖 Assorted issue and PR template fixes (ampproject#34473) * amp-list: Support diffable with single-item (ampproject#33249) * Revert "Revert "amp-list: Fix Bind.rescan vs. diffing race condition (ampproject#32650)" (ampproject#33232)" This reverts commit 60adca7. * Support diffable with single-item. * Fix test. * Fix lint. * 📦 Update com_googlesource_code_re2 commit hash to 4244cd1 (ampproject#34476) * ✨Update amp-analytics provider bluetriangle.json to change the triggers and transport (ampproject#34423) * added blue triangle AMP integration info * fixed minor nitpicks for AMP integration * added client ID instead of random substring for guid and session id * added new lines at end of file * amp prettify command changes * Revert "amp prettify command changes" This reverts commit 1c489b2. * reverted last changed, only have the needed changes * got rid of not needed extra url params * changed to endpoint from base * remove question mark * made sure web vitals were present, changed format of client id in vendor example * more changes * changed blue triangle trigger to ini-load, added test variable to vendors example page, changed blue triangle transport to xhrpost * 📦 Update com_google_googletest commit hash to 9741c42 (ampproject#34483) * 🏗 Enable VSCode auto-formatting and prettier checks for `.yml` files (ampproject#34478) * [Amp story] [Page attachments] [Outlink] Remove open attachment delay and animation (ampproject#34477) * Remove open attachment delay. * Revise preview animation duration. * 📦 Update linting devDependencies (ampproject#34474) * 📦 Update subpackage devDependencies (ampproject#34486) * 📦 Update dependency eslint-plugin-jsdoc to v35 (ampproject#34494) * 📖 amp-animation: Clarify prefers-reduced-motion (ampproject#34442) * Adding Tail as rtc vendor (ampproject#34481) * 🖍 Prevent native `img` elements from being styled by `ampshared.css` (ampproject#34482) * Prevent `[width][height][sizes]` selectors from inadvertently matching `img` elements * Allow `height` and `width` on `amp-img > img (transformed)` * Unlaunch auto-ads-no-insertion-above holdback experiment (ampproject#34425) * ✅ [AMP Story] [Page attachments] Update visual tests for new UIs (ampproject#34223) * visual tests * make pages look same * nit * revert nit * remove references to inline-dark-theme visual test * adding images and extra tests * moving tests for v2 to a diff file * documenting v2 tests * adding cover id * adding snapshots and experiment * change IDs * adding js test navigation * adding js test navigation * formatting * edit tests * format * format * format * adding next page * adding next page * adding rest of pages * lint * testing adding active on openAttachmentEl * changing selector * typo * adding important * Improve targeting of img in remote-content. * Refactor go to page Removes tap simulation to navigate to page. Removes timeout. Improves selector to be sure page is visible. * Use same interactive tests for desktop. * Remove desktop.js JS can be re-used for desktop and mobile. Co-authored-by: Philip Bell <[email protected]> * ✨Use WebAssembly validator for chrome extension (ampproject#34502) * Use WebAssembly validator for chrome extension * Use es5 for popup.html * Init wasm before polymer code * 🏗 Move default PR template to `.github` directory (ampproject#34506) * 🏗 Consolidate glob expansion while determining build targets (ampproject#34509) * 📦 Update dependency @percy/core to v1.0.0-beta.51 (ampproject#34508) * Use isModeDevelopment for validator integration (ampproject#34503) * Use isModeDevelopment * fix test failures * update related test * 🏗 ♻️ Fix ALMOST all type issues in /build-system (ampproject#34438) * patched all fixable type errors Co-authored-by: Raghu Simha <[email protected]> * 📦 Update dependency esbuild to v0.12.2 (ampproject#34518) * 📖 Add bug report fields for OSs and Devices (ampproject#34522) * 📖 Use `n/a` instead of `/all` in the OS and device fields (ampproject#34524) * 🏗 Enable a lint rule to auto-sort destructure keys (ampproject#34523) * Added attributes to adpushup amp-ad (ampproject#34459) Added data-jsontargeting and data-extras attributes to adpushup amp-ad vendor integration Co-authored-by: Rahul Ranjan <[email protected]> * 🏗 Update build-system subpackages before checking types (ampproject#34525) * 🏗 Include dotfiles while expanding globs during the CI check for valid URLs (ampproject#34510) * 📦 Update com_google_googletest commit hash to a3460d1 (ampproject#34530) * ✨ [bento][npm] Support react modules in NPM Bento components (ampproject#34528) * Updates for react npm * Ignore eslint rule * add amp-onerror validation for v0.js or v0.mjs (ampproject#34531) * Sync for validator/cpp/engine (ampproject#34534) * Don't populate spec_file_revision field in ValidationResult. The field is deprecated. PiperOrigin-RevId: 373462878 * Delete ParsedValidatorRules::SpecFileRevision(). PiperOrigin-RevId: 373688076 * Allow i-amphtml-layout-awaiting-size class in FLUID layout PiperOrigin-RevId: 375586004 Co-authored-by: Googler <[email protected]> Co-authored-by: Justin Ridgewell <[email protected]> * cl/375586004 Allow i-amphtml-layout-awaiting-size class in FLUID layout (ampproject#34533) Co-authored-by: Justin Ridgewell <[email protected]> * Sync for validator/cpp/htmlparser (ampproject#34536) * Fix out of memory errors for a particular fuzzer test case which end up in parsing entire contents of a binary blob as attributes. Defined a flag for maximum attributes a node may contain. This value is reasonably large to cover all real world documents. PiperOrigin-RevId: 375586875 * Update CONTRIBUTING.md * Update README.md * Update amp4ads-parse-css.h * Add missing dependency Co-authored-by: Amaltas Bohra <[email protected]> * 🐛 [Amp story] [Page attachments] [Outlink] Open remote from light dom (ampproject#34535) * Element child * Revert regression * Trigger click from light dom * Revert. * revert * revert * Revert * Ramp up 3p vendor splitting to 50% (ampproject#34468) * 🏗 Automate bento publishing with a GitHub Action (ampproject#34430) * Skip "should render correctly" (ampproject#34541) * 🏗 Don't type-check server transform output (ampproject#34537) * ✨ [amp-render] validator changes (ampproject#34366) * 📦 Update core devDependencies (ampproject#34451) * ✨ [amp-render] documentation (ampproject#34391) * 📖 Make a few bug report fields optional (ampproject#34547) * 📦 Update dependency esbuild to v0.12.3 (ampproject#34555) * 📦 Update dependency core-js to v3.13.0 (ampproject#34538) * 🏗 Auto-format dev dashboard tests (ampproject#34546) * cl/375855105 Extract AMP Cache Domain validation, part 1 (ampproject#34558) Co-authored-by: honeybadgerdontcare <[email protected]> * ♻️ Migrate math and some DOM logic into core w/ type-checking (ampproject#34550) * Move utils/dom-fingerprint to core/dom/fingerprint * Fix imports in fingerprint.js * Move utils/date to core/dom/parse-date-attributes * Improve types in parse-date-attributes * Move utils/dom-based-weakref to core/dom/weakref * Update test names * Add __AMP_WEAKREF_ID extern * Move math, id-gen, layout-rect to core/math * Update types for layout-rect * Move get-html into core/dom * Move isFiniteNumber into core/types * Move document-ready to core * Move web-components to core/dom * Fix types in web-components * Move dom streaming helpers to core/dom/stream * Update imports of dom-fingerprint * Update imports of parseDateAttrs * Update (only) import of DomBasedWeakRef * Update imports of math helpers * Update imports of get-html * Update imports of isFiniteNumber * Update imports of document-ready * Update imports of web-components * Update imports of dom stream helpers * Update forbidden-terms * Not nullable type * Launch flexible-bitrate experiment to 10%. (ampproject#34549) * 🏗 Skip NPM checks while type-checking build-system (ampproject#34557) * Sync for validator/cpp/engine (ampproject#34560) * Add SSR support for FLUID layout PiperOrigin-RevId: 375756231 * Extract AMP Cache Domain validation, part 1 Adds method isAmpCacheDomain_ (JS) / IsAmpCacheDomain (C++) PiperOrigin-RevId: 375855105 Co-authored-by: Justin Ridgewell <[email protected]> Co-authored-by: honeybadgerdontcare <[email protected]> * 📦 Update dependency rollup to v2.50.1 (ampproject#34519) * 🏗 Add check-build-system to pr-checks (ampproject#34544) * add check-build-system to pr checks * fix more type errors * disable incremental builds Co-authored-by: Raghu Simha <[email protected]> * Add unit tests (ampproject#34563) * 📦 Update core devDependencies (ampproject#34561) * Track flexible-bitrate experiment through CSI pipeline. (ampproject#34548) * ✨ [bento][npm] Update file naming from mjs to module (ampproject#34568) * Update file naming from mjs to module * import exports should be in alphabetical order * Rename helper function * (nit) Replace NPM with npm (ampproject#34573) * 🏗 Optimize linting during PR builds (ampproject#34567) * ♿ [amp-render] a11y change (ampproject#34540) * 📦 Update dependency @sinonjs/fake-timers to v7.1.1 (ampproject#34578) * 📦 Update dependency rollup to v2.50.2 (ampproject#34579) * 📦 Update dependency @types/eslint to v7.2.12 (ampproject#34574) * Facebook: Render embedded type via `data-embed-as` versus element `tagName` (ampproject#34312) * Switch based on data-embed-as versus tag name * Update tests * Update FacebookComments * Allow dependency on enum * Remove staticProps * Update all the tests * Remove dupe * Import userAssert * Allow dependency on enum * 📦 Update dependency esbuild to v0.12.4 (ampproject#34576) * ✨ Supports locale options for localeString in amp-date-display. (ampproject#34359) * ✨ Supports locale options for localeString in amp-date-display. * Allow user to customize locale options for localeString, the options setting is same as [Date.toLocaleString](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString#syntax) parameter. * [amp-date-display] Moves localeOptions from json type to data-options-*. * [amp-date-display] Tests and content imporvements. - Added invalid test cases. - Throws user error if invalid data-options-* param is provided. - Updated data-options-* readme doc. - Added new lines to .out validator files. - Applied reviewer suggestions. * 🏗📖 Clean up AMP setup documentation + infrastructure (ampproject#34582) * Don't block Story render on a fallback media load. (ampproject#34583) * 🏗 Update bento package.json template (ampproject#34584) * 📖 Add explanatory text to the LTS and cherry-pick sections of the release tracker (ampproject#34575) * Run through all actions for each distFlavor in `amp release` before the next (ampproject#34569) Co-authored-by: Raghu Simha <[email protected]> * 🏗 Make new typecheck targets simpler (ampproject#34559) * Remove the need to explicitly specify extern globs * Add clarifying comment * Allow type-check target to just be a list of globs * Update type * More explanatory comments * More comments * Video cache for amp-video[src]. (ampproject#34570) * Video cache for amp-video[src]. * Update extensions/amp-video/0.1/video-cache.js Co-authored-by: Justin Ridgewell <[email protected]> * Update extensions/amp-video/0.1/video-cache.js * Import iterateCursor. * Reviews. Co-authored-by: Justin Ridgewell <[email protected]> * 🐛 Bug fix allowing set height and fixing Ad position (ampproject#34092) * allowing add data-attributes * using dataset for shorter code * fixing error use of style to style elements is forbidden * fixing default attribute values * removing sizes * allowing use min height * fixing banner alignment * fixing test * fixing prettier validation * fixing prettier validation * SwG Release 0.1.22.167 (ampproject#34572) * 🏗 Automatically write react.js files for bento components when publishing (ampproject#34586) * update node script * lint * pr comments * lint * Lazy load AMP cache URL and make it optional. (ampproject#34588) * Revert "♻️ Support img element (ampproject#34028)" (ampproject#34589) This reverts commit 5a0936f. * 🏗 Enforce JSDoc across `build-system/` for complete type-checking (ampproject#34591) * Minimum duration for auto-advance-after. (ampproject#34592) * Fix time based auto-advance-after. (ampproject#34598) * Add missing bundles entry for amp-iframely (ampproject#34602) * 🐛 [no-signing] fix ads using amp-gwd-animation (ampproject#34593) Co-authored-by: WhiteSource Renovate <[email protected]> Co-authored-by: Alan Orozco <[email protected]> Co-authored-by: udaya-m-taboola <[email protected]> Co-authored-by: Jake Fried <[email protected]> Co-authored-by: Philip Bell <[email protected]> Co-authored-by: honeybadgerdontcare <[email protected]> Co-authored-by: Raghu Simha <[email protected]> Co-authored-by: Ryan Cebulko <[email protected]> Co-authored-by: mister-ben <[email protected]> Co-authored-by: Kevin Dwan <[email protected]> Co-authored-by: Micajuine Ho <[email protected]> Co-authored-by: Kristofer Baxter <[email protected]> Co-authored-by: patrick kettner <[email protected]> Co-authored-by: Caroline Liu <[email protected]> Co-authored-by: John Pettitt <[email protected]> Co-authored-by: Elijah Soria <[email protected]> Co-authored-by: Jon Newmuis <[email protected]> Co-authored-by: Riley Jones <[email protected]> Co-authored-by: Zach P <[email protected]> Co-authored-by: Gabriel Majoulet <[email protected]> Co-authored-by: Enrique Marroquin <[email protected]> Co-authored-by: Matias Szylkowski <[email protected]> Co-authored-by: Zer0Divis0r <[email protected]> Co-authored-by: dmanek <[email protected]> Co-authored-by: Justin Ridgewell <[email protected]> Co-authored-by: Esther Kim <[email protected]> Co-authored-by: Dima Voytenko <[email protected]> Co-authored-by: Justin Ridgewell <[email protected]> Co-authored-by: Caleb Cordry <[email protected]> Co-authored-by: Tiam <[email protected]> Co-authored-by: Edmilson Silva <[email protected]> Co-authored-by: henel677 <[email protected]> Co-authored-by: AdrianPerry <[email protected]> Co-authored-by: Harshad Mane <[email protected]> Co-authored-by: Weston Ruter <[email protected]> Co-authored-by: Allan Banaag <[email protected]> Co-authored-by: Michael Rybak <[email protected]> Co-authored-by: Boxiao Cao <[email protected]> Co-authored-by: qidonna <[email protected]> Co-authored-by: William Chou <[email protected]> Co-authored-by: dulpneto <[email protected]> Co-authored-by: Shihua Zheng <[email protected]> Co-authored-by: Raksha Muthukumar <[email protected]> Co-authored-by: Philip Bell <[email protected]> Co-authored-by: madan-mayank <[email protected]> Co-authored-by: Rahul Ranjan <[email protected]> Co-authored-by: Googler <[email protected]> Co-authored-by: Amaltas Bohra <[email protected]> Co-authored-by: honeybadgerdontcare <[email protected]> Co-authored-by: Gabriel Majoulet <[email protected]> Co-authored-by: Jingfei <[email protected]> Co-authored-by: Daniel Rozenberg <[email protected]> Co-authored-by: Pablo <[email protected]> Co-authored-by: Chris Antaki <[email protected]>
* 🐛 amp-youtube 1.0: forward mute method (ampproject#34221) Previous oversight. * ✅ Validator rules for amp-vimeo 1.0 (ampproject#34199) * ✨ added support for consent for Taboola amp-analytics (ampproject#34166) * added support for consent for Taboola amp-analytics * fixed the consent substitution variable name * fixed the consent substitution name * fixed unit tests * Types: fix all type parse errors and ensure no new ones crop up (ampproject#34105) * Types: fix all type parse errors * self nits * run prettier * fix a new parse error, make low-bar target * Update panning-media-docs (ampproject#34236) * resources: rename V1 to R1, to clear up ambiguity (ampproject#34227) * allow http and relative for amp-story-page-attachment (ampproject#34234) * ♻️ Types: opt for null shorthand (ampproject#34233) * types: shorthand for |null * a few more * fix test * 📦 Update core dependencies (ampproject#34146) Co-authored-by: Raghu Simha <[email protected]> * ♻️ Enable type-checking src/polyfills in CI (ampproject#34239) * Clean up directory globs * Move src/core srcs+externs to const arrays * Exclude fetch/get-bounding-client-rect for now * Provide extern for promise-pjs polyfill * Fix types and add comments in abort-controller * Fix types and add comments in intersection-observer-stub * Remove @Suppress {checkTypes} from promise * Fix @this type for document.contains() polyfill * Remove unneeded typecast to unknown * Fix types and add comments in resize-observer-stub * Fix types and add comments in custom-elements * Add ! * Fix types in get-bounding-client-rect * Add more ! * Lint fixes * Allow custom-element.externs.js to use window * Revert no-op JSDoc changes * Remove connected callback externs and typecast instead * Clean up typedefs for observer stubs * Fix typo * Dedupe typedef * 🐛 amp-brightcove: improve autoplay handling (ampproject#34207) Following an update to the Brightcove Player's AMP support plugin, this update makes sure autoplay is handled correctly in all cases. - Removes any autoplay query param, including the interim autoplay=false - Distinguishes play messages sent through postmessage which are autoplay requests * ♻️📖 Provide a Storybook wrapper to execute video actions (ampproject#34222) Extract a wrapper to add video action buttons to an AMP Storybook. https://user-images.githubusercontent.com/254946/117086191-c4e6d700-ad00-11eb-95ff-f9e3b51caf2b.png * [bento][npm] Add package.json for all bento components with npm definition (ampproject#34087) * Add package.json for all bento components with npm definition * Add newline at end of file * Fix indentation * Newline at end of file * Fix newline * Add recently published timeago, update NPM definitions * Remove package for render, sidebar, twitter which are not published * Update version for amp-timeago package * ♻️ Name amp-ima-video methods uniformly for Bento (ampproject#34246) Rename `postMessage` method names so that they're uniform with `VideoIframe`'s. This simplifies the upcoming Bento implementation. * Remove consent storage limit for viewer (ampproject#34054) * 🐛 Fix bad type (ampproject#34254) * Noticed these changes while refactoring on another branch (ampproject#34250) * update amp-script console error to mention data-ampdevmode (ampproject#34235) * ♻️ Move `imaVideo.js` so it can be owned by Bento and Components (ampproject#34247) * ♻️ 📖 Global dep-check rule for Bento video (ampproject#34252) We can more simply allow `extensions/**` files to import specific files from `amp-video/1.0`. It should be ok in any case. * 🏗 runtime: allow for iterator polyfill (ampproject#34249) * runtime: allow for iterator polyfill * Empty commit * lint! * Bento: Prepare Twitter Preact implementation (ampproject#34194) * Do not override user given height until message gives one * Support tweetid directly * Support bootstrap directly * Add unit tests * Support momentid directly * Add Storybook samples for additional options * Use Sinon syntax for spying on setter * Log output when onError set (ampproject#34259) * ✅ ♻️ `<amp-ima-video>` test is not an AMP element test (ampproject#34230) The existing file `test-amp-ima-video.js` is a misnomer since it does not actually test the `<amp-ima-video>` element, only what it loads inside the frame. Accordingly, rename `test-amp-ima-video.js` as `test-ima-video-internal.js`. Also remove stubs specific to the AMP runtime, since it doesn't run inside the iframe. * 🚀 Remove Error classification (ampproject#34257) * Remove Error classification * Left over let declaration * Remove jse error field * 🏗 amp-subscriptions* owners update (ampproject#34261) * Update OWNERS * Update OWNERS * SwG Release 5/5/21 (ampproject#34238) * 🏗️ Simplify enabling npm bundle for components (ampproject#34262) * Simplify enabling npm bundle * %s/const/let/ * 🏗 Add `wg-components` as bundle size approver of dist.3p/ (ampproject#34267) * ♻️ refactor: move builtin components to their own folders (ampproject#34237) * refactor: move builtin components to their own folders. organization++ * fix imports / and references in md files. * closure glob include * ✨ [Amp story] Add `amp-story-page-outlink` component (ampproject#34171) * Fix conflicts. * Advancement, test and comment. * querySelector * Fix conflicts. * Validator, component and template. * Fix merge conflicts. * Remove duplicate code. * Outlink validator rule. * Alphabetize * amp-twitter: Add Storybook samples (ampproject#34273) * Add comprehensive Storybook samples for amp-twitter * Add deleted and invalid tweet-id cases * Name exported functions in PascalCase * 📖 Update LTS release docs to indicate supported AMP flavors (ampproject#34258) * Update lts-release.md * Update lts-release.md * 📦 Update dependency mocha to v8.4.0 (ampproject#34270) * 🏗 Disable JSDoc requirement on Storybook files (ampproject#34255) Disable `require-jsdoc` since it auto-fixes, and we don't need JSDoc in these locations. We preserve the following rules since they ensure correctness, like type-check already does. jsdoc/check-param-names jsdoc/check-tag-names jsdoc/check-types jsdoc/require-param jsdoc/require-param-name jsdoc/require-param-type jsdoc/require-returns jsdoc/require-returns-type * 📦 Update dependency google-closure-compiler to v20210505 (ampproject#34269) * 📦 Update dependency @ampproject/worker-dom to v0.29.3 (ampproject#34242) * 📦 Update core devDependencies (ampproject#34240) * 🖍 [Amp story] [Page attachments] Style adjustments (ampproject#34275) * SVG edit * SVG adjustment. * Drop shadows. * Prevent clipping of decenders. Drop shadow. * ♻️ [bento][amp-stream-gallery] Split component files for NPM Packaging (ampproject#34208) * Split amp-stream-gallery * Rename jss and type files * Review comments * Add package.json file * Fix indentation * Update npm and latest version in config * Update dependency config * Update zindex doc * Update npm definition * [bento][amp-sidebar] SSR compatible design for Sidebar Toolbar (ampproject#34158) * SSR compatible design for Toolbar * Various code review comments from Caroline * Additional review comments * Review comments * Remove unused import * Add sanitation * Update sanitization method * Update return type for helper function * Remove truthiness checks that are redundant * Add unit tests * ♻️ 🏗 Fix type errors in runtime-test-base (ampproject#34161) * fix types in runtime-test-base * ♻️ 🏗 Create proxy for kleur/colors to expand typing. (ampproject#34243) * references to kleur/colors now pass through build-system/common/colors Co-authored-by: Raghu Simha <[email protected]> * update babel.config * 📦 Update com_googlesource_code_re2 commit hash to aa45633 (ampproject#34290) * Check video duration when setting AutoAdvance default (ampproject#34153) * Handle AutoAdvance duration * Update extensions/amp-story/1.0/amp-story-page.js Co-authored-by: Enrique Marroquin <[email protected]> * Update extensions/amp-story/1.0/page-advancement.js Co-authored-by: Enrique Marroquin <[email protected]> Co-authored-by: Gabriel Majoulet <[email protected]> Co-authored-by: Enrique Marroquin <[email protected]> * 📦 Update dependency postcss-import to v14.0.2 (ampproject#34297) * 📦 Update dependency eslint to v7.26.0 (ampproject#34289) * ❄️ Skip flaky stories tests (ampproject#34303) * 🏗 Improve usability of `describes` by making it configurable (ampproject#34286) * 📦 Update dependency postcss to v8.2.15 (ampproject#34301) * ✅ Validator rules for amp-video-iframe 1.0 (ampproject#34200) * amp-twitter:1.0 - Allow binding to data-tweetid and other configuration attrs (ampproject#34296) * Add Storybooks for mutation * Reload iframe when context (via name) changes * Add unit test * PascalCase * Named vars in test * 🚮 Remove unused font from examples (ampproject#34309) * 🚮 Remove unused font from examples * Remove CSS uses without <link> * update validator files * ✨ Add parameter to configure amp-story-player animation (ampproject#34204) * added animation options * Removed animation from behaviordef * Added newline on player * Added documentation on options * Use next to toggle animation * Use transitionend * Using classes for CSS * Reverted requestAnimationFrame promise * Added tests * Apply suggestions from code review Co-authored-by: Enrique Marroquin <[email protected]> * Use true instead of property Co-authored-by: Enrique Marroquin <[email protected]> Co-authored-by: Enrique Marroquin <[email protected]> * 🐛 [amp-lightbox-gallery] Use declared amp-carousel extension to build carousel (ampproject#34292) * init * nit * Get reference to win. (ampproject#34299) * ♻️ `<amp-ima-video>`: Serialize children (ampproject#34229) `<amp-ima-video>` takes children like: ``` <amp-ima-video> <source data-foo="bar" src="src" /> <track src="src" /> </amp-ima-video> ``` These were previously serialized as HTML on `buildCallback` to be pass to the iframe to (unsafely) write onto `innerHTML`: ``` <amp-ima-video data-child-elements='<source data-foo="bar" src="src" /><track src="src" />' ></amp-ima-video> ``` To prepare for a Bento implementation, we serialize into a JSON format that a Preact component can build more simply and safely: ``` [ ["SOURCE", {"data-foo": "bar", "src": "src"}], ["TRACK", {"src": "src"}] ] ``` This change only affects the interface between the `<amp-ima-video>` element and its own proxy `<iframe>`. It does not affect anything author-facing since they will continue to write children `<source>` and `<track>` elements as such. * 📦 Update dependency eslint-plugin-jsdoc to v34 (ampproject#34304) * 🏗✅ Sandbox all unit and integration tests (ampproject#34305) * Bento: Assign placeholder and fallback elements to service slot (ampproject#34310) * Pass placeholder and fallback to shadow * Add unit test * Type annotation * Remove auto import * 📦 Update linting devDependencies (ampproject#34288) Co-authored-by: Raghu Simha <[email protected]> * 📦 Update dependency esbuild to v0.11.19 (ampproject#34147) * 📦 Update dependency esbuild to v0.11.19 * Add workaround for evanw/esbuild#1202 * Hack: leave .mjs as esm * cleanup * experiment with excluding all of node_modules instead of just .mjs files. * update comment * nit:hoist Co-authored-by: Raghu Simha <[email protected]> Co-authored-by: Jake Fried <[email protected]> * Update tests of updateTimeDelay to be more fuzzy (ampproject#34313) * 📦 Update dependency esbuild to v0.11.20 (ampproject#34322) * 🐛✨ [amp-ad] [amp-auto-ads] Firstimpression.io: more debug options, (ampproject#34170) * FirstImpression.io: debug parameters also as query search parameters * FirstImpression.io: use pageViewId64, more debug options * 🏗 Sandbox `describes.repeated` and get rid of the global `window.sandbox` (ampproject#34329) * amp-render a11y (ampproject#34320) * 🐛 [Amp story] [Page attachments] [Outlink] Split outlink codepaths for open attachment (ampproject#34330) * Split outlink codepaths. * Lint. * ♻️ Modernize some core code (ampproject#34280) * Use null coalesce and deferred * Use for...of instead of forEach * Simplify Deferred class * Tweak Observable to use removeItem, for..of, ?? * Fix typo * %s/break/continue/ * ✨ Text fragments support on amp viewer (ampproject#34074) * Initialize Logs in web-push's helper frame endpoint (ampproject#34326) * Find existing element by attr not tagName (ampproject#34325) * cl/372175665 amp-vimeo: prioritize v0.1 over v1.0 in tagspec ordering (ampproject#34339) * Add unit tests for amp-facebook-comments:0.1 (ampproject#34331) * Add unit tests for amp-facebook-comments * Fix unit tests in 1.0 * Lint * Let GitHub Actions write package jsons for bento (ampproject#34311) * wnode script * error handle * log * move files * pr comments * 🏗 Add OWNERS for `src/preact` (ampproject#34298) * Create OWNERS file for src/preact * Add jridgewell * carolineliu -> caroqliu * 📦 Update com_googlesource_code_re2 commit hash to bc42365 (ampproject#34341) * Add additional wording to tests (ampproject#34334) Closes ampproject#34260 Adds additional language around using `_top` in swipe up links (opening the link in the parent window for viewers). (Follow up for ampproject#34030) * 📦 Update dependency eslint-plugin-jsdoc to v34.0.2 (ampproject#34336) * 📦 Update dependency jest-progress-bar-reporter to v1.0.21 (ampproject#34338) * 📦 Update babel devDependencies to v7.14.2 (ampproject#34344) * 📦 Update core devDependencies (ampproject#34353) * Solve dumb CC type inference bug (ampproject#34355) * Upgrade Preact to 10.5.13 (ampproject#30043) * Upgrade Preact to 10.4.8 * update preact to latest Co-authored-by: Jake Fried <[email protected]> * ♻️ Start updating assertions to use core/assert instead of src/log (ampproject#34284) * Prefix user/dev assert fns * Update renamed imports * Update imports to drop "pure" * Update src/utils assert imports * Update src/{polyfills,preact,purifier,web-worker} assert imports * Update src/{inabox,amp-story-player} assert imports * Fix merge breakage * Fix merge breakage * 🏗♻️ Refactor and simplify initialization / clean up of unit and integration tests (ampproject#34346) * ♻️ Provide core `tryCallback` helper (ampproject#34348) * Provide tryCallback helper * Import shared helper where relevant * Remove spread param * Fix missing import * Update src/core/error.js Co-authored-by: Justin Ridgewell <[email protected]> * Update src/core/error.js Co-authored-by: Justin Ridgewell <[email protected]> * Update src/core/error.js Co-authored-by: Justin Ridgewell <[email protected]> * ♻️ Clean up extern typedefs (ampproject#34345) * Un-extern AssertionFunction typedef * Un-extern Timestamp * Move UnlistenDef to function.extern.js * %s/Timestamp/TimestampDef/ for linter * Fix typo * Fix log type decl * ♻️ Modernize polyfills (ampproject#34342) * dedupe rethrowAsync * modernize fetch polyfill * modernize custom-elements polyfill * modernize polyfill stubs * modernize object-assign polyfill * update straggler * Fix typo * typecast elements_ * Revert changes to fetch polyfill * Revert changes to fetch object-assign * Clean up stub types by removing nullability * Update polyfill stub tests * Fix test change * ♻️ Consolidating more core type helpers (ampproject#34253) * Move time.js types into src/core/types/date * Move finite-state-machine to core/data-structures * Make core/types/string a submodule * Move base64 and bytes tests with core * Move curve.js to core/data-structures * Make src/core/function a submodule * Update dep-check and conformance configs for string.js * Fix legacy tests * Move tests for exponential backoff * Standardize data structures tests * Update test file structure * Make curve map side-effect-free * Use map and isString helpers * Tweak test names * Fix import * Fix types * Update imports of finite-state-machine * Update imports of bytes and base64 * Update imports of curve * Update imports of exponential-backoff * make lerp static * make getPointX/Y static * make solvePositionFromXValue static * make Bezier fully static * Use Bezier not static this * Fix typo * Use static solver in Curves map * Fix type decls * tweak comments * Remove unused import * Fix imports from merge * Move normtimedef to curve * ♻️ Simplify rendering <amp-ima-video> with CSS and static templates (ampproject#34248) Use static templates and standalone CSS to simplify how we render a modify `<amp-ima-video>`'s internal tree. This change is unrelated to the Bento effort. Communication between iframe and host is intact. * Update npm definition and package file for publishing (ampproject#34333) * 🐛Fix lint error in test-ima-video-internal.js (ampproject#34365) * amp-script: sandboxed implies nodom (ampproject#34025) * ✨ [amp-render] `placeholder` and `fallback` support (ampproject#34294) * 📦 Update com_google_googletest commit hash to 662fe38 (ampproject#34373) * ✅ Add unit tests for amp-facebook-like (ampproject#34361) * Add unit tests for amp-facebook-like * Lint * fix layout bug (ampproject#34360) * 📖 Pressboard vendor updates (ampproject#34188) Update Pressboard analytics config and documentation link. * ✨ amp-auto-ads extension: Denakop (ampproject#34215) * feat: Custom style * Revert "feat: Custom style" This reverts commit 2e886ec. * feat: Add custom style * test: Change tests * fix: Fix lint issues * feat: Custom style * Revert "feat: Custom style" This reverts commit 2e886ec. * feat: Add custom style * test: Change tests * fix: Fix lint issues * Revert "fix: Fix lint issues" This reverts commit 386df3f. * fix: Fix lint issues * Forbid private properties inside BaseElement (ampproject#34376) This fixes a cross binary issue with private properties being mangled to, ie., `lc` inside `BaseElement` base class. The issue is that a subclass extending it in another binary (eg, `amp-a4a`) can reuse that mangled name for something entirely different, because Closure isn't aware of what the base class is at that point. * SwG release 0.1.22.165 (ampproject#34352) * SwG release 0.1.22.165 * unbreaks amp test * ✅ Add unit tests for amp-facebook-page (ampproject#34351) * Add unit tests for amp-facebook-page * Move amp-facebook-page test to correct location * 📖 Disable deadlink checking for Infoline (ampproject#34384) * 📦 Update dependency esbuild to v0.11.21 (ampproject#34381) * 📦 Update linting devDependencies (ampproject#34377) * 🚮 Clean up obsolete npm resolutions (ampproject#34388) * ♻️ 🏗 Fix typing in the build-system (ampproject#34162) * fix type errors * make suggested changes * Update build-system/test-configs/jscodeshift/index.js Co-authored-by: Raghu Simha <[email protected]> * Update build-system/tasks/serve.js * add empty passing check to visual-diff tests when they are not needed (ampproject#34371) * Remove FunctionalTestController, make ControllerPromise extend Promise (ampproject#33844) * remove functionaltestcontroller, rename functional-test-controller file * rename functional-test-types to e2e-types Co-authored-by: Enrique Marroquin <[email protected]> * ✅ [Story player] Fix animation unit test flakiness (ampproject#34382) * added animation options * Removed animation from behaviordef * Added newline on player * Added documentation on options * Use next to toggle animation * Use transitionend * Using classes for CSS * Reverted requestAnimationFrame promise * Added tests * Apply suggestions from code review Co-authored-by: Enrique Marroquin <[email protected]> * Use true instead of property Co-authored-by: Enrique Marroquin <[email protected]> * Removed trailing whitespace * Fixed linting * Wait for transitionend Co-authored-by: Enrique Marroquin <[email protected]> * 🏗 Switch AMP's main bug template to a yaml-based form (ampproject#34393) * Adding Blue Triangle to amp-analytics list✨ (ampproject#34012) * added blue triangle AMP integration info * fixed minor nitpicks for AMP integration * added client ID instead of random substring for guid and session id * added new lines at end of file * amp prettify command changes * Revert "amp prettify command changes" This reverts commit 1c489b2. * reverted last changed, only have the needed changes * got rid of not needed extra url params * changed to endpoint from base * remove question mark * made sure web vitals were present, changed format of client id in vendor example * more changes * 🏗 Allow Performance WG to manage check-types (ampproject#34395) * Allow Performance WG to manage check-types * Lint fixes * Fix nits in ampproject#34376 (ampproject#34392) * 📦 Update dependency karma-esbuild to v2.2.0 (ampproject#34396) * ♻️ Extract json helpers to core/types/object/json (ampproject#34367) * Make types/object submodule * Update path in presubmit/lint configs * Move json externs * Move json to core * Shift generic helpers from json to object * Fix test files * Fix types excluding json * Fix types in json * Clean up and remove dupe code * Update imports of json * Remove newlines between imports * Fix dep-check-config * Null chaining for [] and () * Typo * Fix callback * Expand AMP issue template intro text (ampproject#34397) * ♻️ Enable passing type-checking on src/experiments and src/examiner (ampproject#34394) * mv src/experiments.js -> src/experiments/index.js * Make src/experiments pass type-checking * Allow use of window in extern files * Remove unused import * Allow AMP_CONFIG in extern * Modernize experiments code * Enable passing type-checking on src/examiner + modernize * Use assert via logger * un-hoist * Clean up extra type annotations * Fix tests passing object instead of array * 📖 Convert feature request issue template to a form (ampproject#34398) * PubMatic OpenWrap to pass consent strings (ampproject#34403) * use storyNextUp (ampproject#34285) * 📖 Improve references to the AMP plugin for WordPress in bug report template (ampproject#34401) * Improve references to the AMP plugin for WordPress * Fix text to fit on one line and apply to FR template Co-authored-by: Raghu Simha <[email protected]> * 📖 Consolidate all AMP documentation in `docs/` (ampproject#34047) * 📦 Update dependency geckodriver to v2 (ampproject#34404) * 📦 Update linting devDependencies (ampproject#34409) * 📖 Move AMP documentation from `spec/` to `docs/spec/` (ampproject#34160) * 🚮 [Story bookend] Disabled bookend and related tests (ampproject#34354) * Disabled bookend and related tests * Removed checks to bookend * Linted * Made bookend an alias of social-share * Removed bookend test since it's not showing * Removed bookend tests * Fixed linting * Cleanup * Fixed linting again * Removed visual tests * Fixed test * 📦 Update dependency open to v8.0.9 (ampproject#34408) * 📦 Update dependency esbuild to v0.11.23 (ampproject#34407) Co-authored-by: Raghu Simha <[email protected]> * ♻️ [bento][amp-base-carousel] Split component files for NPM Packaging (ampproject#34283) * Initial commit for base-carousel conversion * Additional updates * Add npm files * Update z-index doc * Update z-index * 📦 Update dependency rollup to v2.48.0 (ampproject#34410) * ♻️ Enable passing type-checking on src/context (ampproject#34387) * enable src-context type-check target * Fix type errors in src/context * export ContextPropDef * for...of in scan * clean up scheduler types * Update ContextPropDef in subscriber * update types in index * update types in index * update types in contextprops * update types and for...of in node * Drastically narrow types in values * Add DEP template type to contextpropdef * type-narrow subscriber * Clean up scheduler type decl * use templates in scan * Update index prop and setter types * Allow subscriber ID template type * Add deps template arg for contextprops * Add SID for return type * Assert non-null subscriber IDs * Code review tweak * Remove template type from static function * forEach -> for..of * Revert forEach changes to Maps * 🐛 amp-ima-video: Fix pause button jamming on autoplay (ampproject#34307) When autoplaying a video with a preroll ad, the pause button will not work the first time. This is because we haven't tracked the `PlayerState`. This change keeps track of `PlayerState` on ad events, as meant initially. * ♻️ Start moving URL helpers into core (ampproject#34399) * Move query string parsing into core * Update dep-check config * Move query string parsing helper tests * Fix typo * Restore deleted forbidden-terms rule * Update single imports of helpers * Update multi-imports of url helpers * Fix straggler imports * Lint fixes * 🐛 [Story devtools] Toggle devtools on mjs build (ampproject#34372) * IsDevelopmentMode * return boolean jsdoc * Use include since we polyfill Co-authored-by: Ryan Cebulko <[email protected]> * Removed useless comment Co-authored-by: Ryan Cebulko <[email protected]> * 🚮 [Story bookend] Remove bookend extended code (ampproject#34343) * Started removing bookend * Finished removing bookend from files * Fixed linting * Updated validation tests * Updated validation tests 2 * Removed bookend strings * Disabled bookend and related tests * Removed checks to bookend * Linted * Made bookend an alias of social-share * Removed bookend test since it's not showing * Removed bookend tests * Fixed linting * Cleanup * Fixed linting again * Removed visual tests * Fixed test * Fixed test * Fixed request service tests * Fixed visual tests * Bring back validation tests for bookend * persist playing state on config (ampproject#34356) * Fix invisible merge conflict (ampproject#34420) * cl/373617376 Make the process of auto-generating validator.pb.go compatible with protoc v3.16.0. (ampproject#34428) Co-authored-by: Michael Rybak <[email protected]> * 📖 Migrate `Intent-to-*` issue templates to yaml forms (ampproject#34431) * Use validator_wasm.js as default validator (ampproject#34213) * 📖 Delete the manual error report issue template (ampproject#34435) * 📦 Update validator devDependencies to eb6e927 (ampproject#34436) * 📦 Update dependency esbuild to v0.12.1 (ampproject#34421) * 📦 Update babel devDependencies to v7.14.3 (ampproject#34418) * ✅ [Story video] Add e2e tests for Bitrate Manager (ampproject#33660) * Created e2e test * Added tests * Fixed e2e tests * Removed comment * Removed unused import * Addede e2es * Moved field to html * More work on e2e * Added load unload fixture * Fixed tests * Added more tests and cleaned up hooks * Added multiple sources on first videos to test flexible-bitrate * Changed e2es to work * Removed whitespaces * Adding cache fetch test * Add e2e fixture to disallowlist for validate * fixed host_url in e2e * Updated tests * Changed order of test conditions for consistency * Update extensions/amp-video/0.1/test-e2e/test-amp-video-flexible-bitrate.js * Update extensions/amp-video/0.1/test-e2e/test-amp-video-flexible-bitrate.js Co-authored-by: Gabriel Majoulet <[email protected]> * 📖 Migrate the release tracker template to a yaml form (ampproject#34440) * 📦 Update dependency @types/node to v14.17.0 (ampproject#34429) * 📦 Update dependency eslint-plugin-jsdoc to v34.8.2 (ampproject#34415) * Check if documentHeight has changed after all elements initially built (ampproject#34434) * SwG release 0.1.22.166 (ampproject#34444) * ✨[amp-form] allow `form` attributes for form elements outside of `amp-form` (ampproject#33095) * Init * init * handler => service * Tests * ServiceForDoc no promise * Validator, WeakMap of Array, nits * Update build-system/test-configs/forbidden-terms.js Co-authored-by: Alan Orozco <[email protected]> * Update extensions/amp-form/0.1/amp-form.js Co-authored-by: Alan Orozco <[email protected]> * Update extensions/amp-form/0.1/amp-form.js Co-authored-by: Alan Orozco <[email protected]> * Account for amp-selectors (in and out) * fix test * Update build-system/test-configs/forbidden-terms.js Co-authored-by: Raghu Simha <[email protected]> Co-authored-by: Alan Orozco <[email protected]> Co-authored-by: Raghu Simha <[email protected]> * Add adoptedCallback to work around Firefox Native CE bug (ampproject#34455) See https://output.jsbin.com/yuwojok/29/quiet for a working demo of the bug. When we construct a CustomElement in one document, then insert it into another document (as we do with A4A ads), Firefox incorrectly resets the prototype of our CE instance to `HTMLElement.prototype`. Luckily, we can fix this by listening for the `adoptedCallback`, which fires just after Firefox resets the prototype. If we detect a broken prototype chain, we can correct it before any other code can notice. See https://output.jsbin.com/datajos/5/quiet for a demo of the fix. * ✨ Update npm amphtml-validator to v1.0.35 (ampproject#34454) * Update npm amphtml-validator to v1.0.35 * Update readme * ♻️ Cleaning up Log error code in preparation for core (ampproject#34458) * Move core/error.js -> core/error/index.js * Move user error helpers to error-message-helpers * Move error-message-helpers to error/message-helpers * spread args in log where slicing * Use loglevel enum in msg_ * Add TODO * string.includes Co-authored-by: Justin Ridgewell <[email protected]> * Update src/core/error/message-helpers.js Co-authored-by: Justin Ridgewell <[email protected]> * 📦 Update com_google_googletest commit hash to aa9b44a (ampproject#34452) * ♻️ Create plain `<img>` placeholders (ampproject#34379) Where extensions would previously create `<amp-img>` placeholders, now create a plain `<img>` element with `loading="lazy"` * remove brotli check as these files do not exist on cdn anymore (ampproject#34457) * remove brotli check as these files do not exist on cdn anymore * prettier * ♻️ Support img element (ampproject#34028) * Allow IMG so long as it contains a loading attribute * Make width and height mandatory * Move method from within AMP.BaseElement to src/core/dom since it must act on native elements and extended AMP elements now * Update validator output * Mid way stopping point on amp-lightbox-gallery cloneLightboxableElement_ * Lightbox gallery now supports image elements * Use Sets instead of objects * PR feedback on name of utility and usage of other utilities * lightbox had a bad reference * Spy on the right thing now * Remove validator changes for a later step * Carriage returns at the end of the out files for the validator * Updated carriage returns at end of files * Update comments * Move auto lightbox to loadPromise * Remove Set in amp-auto-lightbox * Remove set in amp-image-lightbox * Remove logic specific to amp-img for the img path * Additional fixes for Set usage * test for supporting img on amp-image-lightbox * Add tests for propagate attributes helper and fix usage in iframe-video * Additional fixes for propagateAttributes from AMPElements * Bad merge * pass ampdoc in Criteria so its not obtained from an HTMLElement * change order of arguments to reduce test rewriting for Criteria * Fix types in propagate attributes * Prettier formatting * different prettier versions * update core utility with improved typing from below * Address part of Alans feedback * types * remove toLowerCase on tagName * Test changes from PR feedback (and applied elsewhere in the file) * Add support for native HTMLImageElements to amp-image-slider * Add test using HTMLImageElements * Revert changes to gestures for a later PR * Continued progress, pan zoom works and lightbox gallery is underway * LayoutScheduled for amp-carousel 0.1 when unlayout happening * Remove image support for amp-image-viewer for a future PR * Image Viewer no longer needs to exclude itself from using loadPromise directly * Remove console logging for carousel debugging: * Remove breaks in parsing of children for amp-image-slider * No need to provide an empty array for the Set constructor * Remaining console * Nit * Remove more intermediary state changes * Naming nit * prettier formatting in test * support loading indicator and no-loading attribute (ampproject#34467) * 📦 Update dependency amphtml-validator to v1.0.35 (ampproject#34472) * 📖 Migrate the cherry-pick request template to a yaml form (ampproject#34463) * 📦 Update build-system devDependencies (ampproject#34231) * 📖 Assorted issue and PR template fixes (ampproject#34473) * amp-list: Support diffable with single-item (ampproject#33249) * Revert "Revert "amp-list: Fix Bind.rescan vs. diffing race condition (ampproject#32650)" (ampproject#33232)" This reverts commit 60adca7. * Support diffable with single-item. * Fix test. * Fix lint. * 📦 Update com_googlesource_code_re2 commit hash to 4244cd1 (ampproject#34476) * ✨Update amp-analytics provider bluetriangle.json to change the triggers and transport (ampproject#34423) * added blue triangle AMP integration info * fixed minor nitpicks for AMP integration * added client ID instead of random substring for guid and session id * added new lines at end of file * amp prettify command changes * Revert "amp prettify command changes" This reverts commit 1c489b2. * reverted last changed, only have the needed changes * got rid of not needed extra url params * changed to endpoint from base * remove question mark * made sure web vitals were present, changed format of client id in vendor example * more changes * changed blue triangle trigger to ini-load, added test variable to vendors example page, changed blue triangle transport to xhrpost * 📦 Update com_google_googletest commit hash to 9741c42 (ampproject#34483) * 🏗 Enable VSCode auto-formatting and prettier checks for `.yml` files (ampproject#34478) * [Amp story] [Page attachments] [Outlink] Remove open attachment delay and animation (ampproject#34477) * Remove open attachment delay. * Revise preview animation duration. * 📦 Update linting devDependencies (ampproject#34474) * 📦 Update subpackage devDependencies (ampproject#34486) * 📦 Update dependency eslint-plugin-jsdoc to v35 (ampproject#34494) * 📖 amp-animation: Clarify prefers-reduced-motion (ampproject#34442) * Adding Tail as rtc vendor (ampproject#34481) * 🖍 Prevent native `img` elements from being styled by `ampshared.css` (ampproject#34482) * Prevent `[width][height][sizes]` selectors from inadvertently matching `img` elements * Allow `height` and `width` on `amp-img > img (transformed)` * Unlaunch auto-ads-no-insertion-above holdback experiment (ampproject#34425) * ✅ [AMP Story] [Page attachments] Update visual tests for new UIs (ampproject#34223) * visual tests * make pages look same * nit * revert nit * remove references to inline-dark-theme visual test * adding images and extra tests * moving tests for v2 to a diff file * documenting v2 tests * adding cover id * adding snapshots and experiment * change IDs * adding js test navigation * adding js test navigation * formatting * edit tests * format * format * format * adding next page * adding next page * adding rest of pages * lint * testing adding active on openAttachmentEl * changing selector * typo * adding important * Improve targeting of img in remote-content. * Refactor go to page Removes tap simulation to navigate to page. Removes timeout. Improves selector to be sure page is visible. * Use same interactive tests for desktop. * Remove desktop.js JS can be re-used for desktop and mobile. Co-authored-by: Philip Bell <[email protected]> * ✨Use WebAssembly validator for chrome extension (ampproject#34502) * Use WebAssembly validator for chrome extension * Use es5 for popup.html * Init wasm before polymer code * 🏗 Move default PR template to `.github` directory (ampproject#34506) * 🏗 Consolidate glob expansion while determining build targets (ampproject#34509) * 📦 Update dependency @percy/core to v1.0.0-beta.51 (ampproject#34508) * Use isModeDevelopment for validator integration (ampproject#34503) * Use isModeDevelopment * fix test failures * update related test * 🏗 ♻️ Fix ALMOST all type issues in /build-system (ampproject#34438) * patched all fixable type errors Co-authored-by: Raghu Simha <[email protected]> * 📦 Update dependency esbuild to v0.12.2 (ampproject#34518) * 📖 Add bug report fields for OSs and Devices (ampproject#34522) * 📖 Use `n/a` instead of `/all` in the OS and device fields (ampproject#34524) * 🏗 Enable a lint rule to auto-sort destructure keys (ampproject#34523) * Added attributes to adpushup amp-ad (ampproject#34459) Added data-jsontargeting and data-extras attributes to adpushup amp-ad vendor integration Co-authored-by: Rahul Ranjan <[email protected]> * 🏗 Update build-system subpackages before checking types (ampproject#34525) * 🏗 Include dotfiles while expanding globs during the CI check for valid URLs (ampproject#34510) * 📦 Update com_google_googletest commit hash to a3460d1 (ampproject#34530) * ✨ [bento][npm] Support react modules in NPM Bento components (ampproject#34528) * Updates for react npm * Ignore eslint rule * add amp-onerror validation for v0.js or v0.mjs (ampproject#34531) * Sync for validator/cpp/engine (ampproject#34534) * Don't populate spec_file_revision field in ValidationResult. The field is deprecated. PiperOrigin-RevId: 373462878 * Delete ParsedValidatorRules::SpecFileRevision(). PiperOrigin-RevId: 373688076 * Allow i-amphtml-layout-awaiting-size class in FLUID layout PiperOrigin-RevId: 375586004 Co-authored-by: Googler <[email protected]> Co-authored-by: Justin Ridgewell <[email protected]> * cl/375586004 Allow i-amphtml-layout-awaiting-size class in FLUID layout (ampproject#34533) Co-authored-by: Justin Ridgewell <[email protected]> * Sync for validator/cpp/htmlparser (ampproject#34536) * Fix out of memory errors for a particular fuzzer test case which end up in parsing entire contents of a binary blob as attributes. Defined a flag for maximum attributes a node may contain. This value is reasonably large to cover all real world documents. PiperOrigin-RevId: 375586875 * Update CONTRIBUTING.md * Update README.md * Update amp4ads-parse-css.h * Add missing dependency Co-authored-by: Amaltas Bohra <[email protected]> * 🐛 [Amp story] [Page attachments] [Outlink] Open remote from light dom (ampproject#34535) * Element child * Revert regression * Trigger click from light dom * Revert. * revert * revert * Revert * Ramp up 3p vendor splitting to 50% (ampproject#34468) * 🏗 Automate bento publishing with a GitHub Action (ampproject#34430) * Skip "should render correctly" (ampproject#34541) * 🏗 Don't type-check server transform output (ampproject#34537) * ✨ [amp-render] validator changes (ampproject#34366) * 📦 Update core devDependencies (ampproject#34451) * ✨ [amp-render] documentation (ampproject#34391) * 📖 Make a few bug report fields optional (ampproject#34547) * 📦 Update dependency esbuild to v0.12.3 (ampproject#34555) * 📦 Update dependency core-js to v3.13.0 (ampproject#34538) * 🏗 Auto-format dev dashboard tests (ampproject#34546) * cl/375855105 Extract AMP Cache Domain validation, part 1 (ampproject#34558) Co-authored-by: honeybadgerdontcare <[email protected]> * ♻️ Migrate math and some DOM logic into core w/ type-checking (ampproject#34550) * Move utils/dom-fingerprint to core/dom/fingerprint * Fix imports in fingerprint.js * Move utils/date to core/dom/parse-date-attributes * Improve types in parse-date-attributes * Move utils/dom-based-weakref to core/dom/weakref * Update test names * Add __AMP_WEAKREF_ID extern * Move math, id-gen, layout-rect to core/math * Update types for layout-rect * Move get-html into core/dom * Move isFiniteNumber into core/types * Move document-ready to core * Move web-components to core/dom * Fix types in web-components * Move dom streaming helpers to core/dom/stream * Update imports of dom-fingerprint * Update imports of parseDateAttrs * Update (only) import of DomBasedWeakRef * Update imports of math helpers * Update imports of get-html * Update imports of isFiniteNumber * Update imports of document-ready * Update imports of web-components * Update imports of dom stream helpers * Update forbidden-terms * Not nullable type * Launch flexible-bitrate experiment to 10%. (ampproject#34549) * 🏗 Skip NPM checks while type-checking build-system (ampproject#34557) * Sync for validator/cpp/engine (ampproject#34560) * Add SSR support for FLUID layout PiperOrigin-RevId: 375756231 * Extract AMP Cache Domain validation, part 1 Adds method isAmpCacheDomain_ (JS) / IsAmpCacheDomain (C++) PiperOrigin-RevId: 375855105 Co-authored-by: Justin Ridgewell <[email protected]> Co-authored-by: honeybadgerdontcare <[email protected]> * 📦 Update dependency rollup to v2.50.1 (ampproject#34519) * 🏗 Add check-build-system to pr-checks (ampproject#34544) * add check-build-system to pr checks * fix more type errors * disable incremental builds Co-authored-by: Raghu Simha <[email protected]> * Add unit tests (ampproject#34563) * 📦 Update core devDependencies (ampproject#34561) * Track flexible-bitrate experiment through CSI pipeline. (ampproject#34548) * ✨ [bento][npm] Update file naming from mjs to module (ampproject#34568) * Update file naming from mjs to module * import exports should be in alphabetical order * Rename helper function * (nit) Replace NPM with npm (ampproject#34573) * 🏗 Optimize linting during PR builds (ampproject#34567) * ♿ [amp-render] a11y change (ampproject#34540) * 📦 Update dependency @sinonjs/fake-timers to v7.1.1 (ampproject#34578) * 📦 Update dependency rollup to v2.50.2 (ampproject#34579) * 📦 Update dependency @types/eslint to v7.2.12 (ampproject#34574) * Facebook: Render embedded type via `data-embed-as` versus element `tagName` (ampproject#34312) * Switch based on data-embed-as versus tag name * Update tests * Update FacebookComments * Allow dependency on enum * Remove staticProps * Update all the tests * Remove dupe * Import userAssert * Allow dependency on enum * 📦 Update dependency esbuild to v0.12.4 (ampproject#34576) * ✨ Supports locale options for localeString in amp-date-display. (ampproject#34359) * ✨ Supports locale options for localeString in amp-date-display. * Allow user to customize locale options for localeString, the options setting is same as [Date.toLocaleString](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString#syntax) parameter. * [amp-date-display] Moves localeOptions from json type to data-options-*. * [amp-date-display] Tests and content imporvements. - Added invalid test cases. - Throws user error if invalid data-options-* param is provided. - Updated data-options-* readme doc. - Added new lines to .out validator files. - Applied reviewer suggestions. * 🏗📖 Clean up AMP setup documentation + infrastructure (ampproject#34582) * Don't block Story render on a fallback media load. (ampproject#34583) * 🏗 Update bento package.json template (ampproject#34584) * 📖 Add explanatory text to the LTS and cherry-pick sections of the release tracker (ampproject#34575) * Run through all actions for each distFlavor in `amp release` before the next (ampproject#34569) Co-authored-by: Raghu Simha <[email protected]> * 🏗 Make new typecheck targets simpler (ampproject#34559) * Remove the need to explicitly specify extern globs * Add clarifying comment * Allow type-check target to just be a list of globs * Update type * More explanatory comments * More comments * Video cache for amp-video[src]. (ampproject#34570) * Video cache for amp-video[src]. * Update extensions/amp-video/0.1/video-cache.js Co-authored-by: Justin Ridgewell <[email protected]> * Update extensions/amp-video/0.1/video-cache.js * Import iterateCursor. * Reviews. Co-authored-by: Justin Ridgewell <[email protected]> * 🐛 Bug fix allowing set height and fixing Ad position (ampproject#34092) * allowing add data-attributes * using dataset for shorter code * fixing error use of style to style elements is forbidden * fixing default attribute values * removing sizes * allowing use min height * fixing banner alignment * fixing test * fixing prettier validation * fixing prettier validation * SwG Release 0.1.22.167 (ampproject#34572) * 🏗 Automatically write react.js files for bento components when publishing (ampproject#34586) * update node script * lint * pr comments * lint * Lazy load AMP cache URL and make it optional. (ampproject#34588) * Revert "♻️ Support img element (ampproject#34028)" (ampproject#34589) This reverts commit 5a0936f. * 🏗 Enforce JSDoc across `build-system/` for complete type-checking (ampproject#34591) * Minimum duration for auto-advance-after. (ampproject#34592) * Fix time based auto-advance-after. (ampproject#34598) * Add missing bundles entry for amp-iframely (ampproject#34602) * 🐛 [no-signing] fix ads using amp-gwd-animation (ampproject#34593) * Add teads test stack * FOR-3929: Migrate a.teads.tv to s8t.teads.tv in amphtml E2E tooling * fix testing Co-authored-by: Alan Orozco <[email protected]> Co-authored-by: udaya-m-taboola <[email protected]> Co-authored-by: Jake Fried <[email protected]> Co-authored-by: Philip Bell <[email protected]> Co-authored-by: honeybadgerdontcare <[email protected]> Co-authored-by: WhiteSource Renovate <[email protected]> Co-authored-by: Raghu Simha <[email protected]> Co-authored-by: Ryan Cebulko <[email protected]> Co-authored-by: mister-ben <[email protected]> Co-authored-by: Kevin Dwan <[email protected]> Co-authored-by: Micajuine Ho <[email protected]> Co-authored-by: Kristofer Baxter <[email protected]> Co-authored-by: patrick kettner <[email protected]> Co-authored-by: Caroline Liu <[email protected]> Co-authored-by: John Pettitt <[email protected]> Co-authored-by: Elijah Soria <[email protected]> Co-authored-by: Jon Newmuis <[email protected]> Co-authored-by: Riley Jones <[email protected]> Co-authored-by: Zach P <[email protected]> Co-authored-by: Gabriel Majoulet <[email protected]> Co-authored-by: Enrique Marroquin <[email protected]> Co-authored-by: Matias Szylkowski <[email protected]> Co-authored-by: Zer0Divis0r <[email protected]> Co-authored-by: dmanek <[email protected]> Co-authored-by: Justin Ridgewell <[email protected]> Co-authored-by: Esther Kim <[email protected]> Co-authored-by: Dima Voytenko <[email protected]> Co-authored-by: Justin Ridgewell <[email protected]> Co-authored-by: Caleb Cordry <[email protected]> Co-authored-by: Tiam <[email protected]> Co-authored-by: Edmilson Silva <[email protected]> Co-authored-by: henel677 <[email protected]> Co-authored-by: AdrianPerry <[email protected]> Co-authored-by: Harshad Mane <[email protected]> Co-authored-by: Weston Ruter <[email protected]> Co-authored-by: Allan Banaag <[email protected]> Co-authored-by: Michael Rybak <[email protected]> Co-authored-by: Boxiao Cao <[email protected]> Co-authored-by: qidonna <[email protected]> Co-authored-by: William Chou <[email protected]> Co-authored-by: dulpneto <[email protected]> Co-authored-by: Shihua Zheng <[email protected]> Co-authored-by: Raksha Muthukumar <[email protected]> Co-authored-by: Philip Bell <[email protected]> Co-authored-by: madan-mayank <[email protected]> Co-authored-by: Rahul Ranjan <[email protected]> Co-authored-by: Googler <[email protected]> Co-authored-by: Amaltas Bohra <[email protected]> Co-authored-by: honeybadgerdontcare <[email protected]> Co-authored-by: Gabriel Majoulet <[email protected]> Co-authored-by: Jingfei <[email protected]> Co-authored-by: Daniel Rozenberg <[email protected]> Co-authored-by: Pablo <[email protected]> Co-authored-by: Chris Antaki <[email protected]> Co-authored-by: RonanDrouglazet <[email protected]>
* 🐛 amp-youtube 1.0: forward mute method (ampproject#34221) Previous oversight. * ✅ Validator rules for amp-vimeo 1.0 (ampproject#34199) * ✨ added support for consent for Taboola amp-analytics (ampproject#34166) * added support for consent for Taboola amp-analytics * fixed the consent substitution variable name * fixed the consent substitution name * fixed unit tests * Types: fix all type parse errors and ensure no new ones crop up (ampproject#34105) * Types: fix all type parse errors * self nits * run prettier * fix a new parse error, make low-bar target * Update panning-media-docs (ampproject#34236) * resources: rename V1 to R1, to clear up ambiguity (ampproject#34227) * allow http and relative for amp-story-page-attachment (ampproject#34234) * ♻️ Types: opt for null shorthand (ampproject#34233) * types: shorthand for |null * a few more * fix test * 📦 Update core dependencies (ampproject#34146) Co-authored-by: Raghu Simha <[email protected]> * ♻️ Enable type-checking src/polyfills in CI (ampproject#34239) * Clean up directory globs * Move src/core srcs+externs to const arrays * Exclude fetch/get-bounding-client-rect for now * Provide extern for promise-pjs polyfill * Fix types and add comments in abort-controller * Fix types and add comments in intersection-observer-stub * Remove @Suppress {checkTypes} from promise * Fix @this type for document.contains() polyfill * Remove unneeded typecast to unknown * Fix types and add comments in resize-observer-stub * Fix types and add comments in custom-elements * Add ! * Fix types in get-bounding-client-rect * Add more ! * Lint fixes * Allow custom-element.externs.js to use window * Revert no-op JSDoc changes * Remove connected callback externs and typecast instead * Clean up typedefs for observer stubs * Fix typo * Dedupe typedef * 🐛 amp-brightcove: improve autoplay handling (ampproject#34207) Following an update to the Brightcove Player's AMP support plugin, this update makes sure autoplay is handled correctly in all cases. - Removes any autoplay query param, including the interim autoplay=false - Distinguishes play messages sent through postmessage which are autoplay requests * ♻️📖 Provide a Storybook wrapper to execute video actions (ampproject#34222) Extract a wrapper to add video action buttons to an AMP Storybook. https://user-images.githubusercontent.com/254946/117086191-c4e6d700-ad00-11eb-95ff-f9e3b51caf2b.png * [bento][npm] Add package.json for all bento components with npm definition (ampproject#34087) * Add package.json for all bento components with npm definition * Add newline at end of file * Fix indentation * Newline at end of file * Fix newline * Add recently published timeago, update NPM definitions * Remove package for render, sidebar, twitter which are not published * Update version for amp-timeago package * ♻️ Name amp-ima-video methods uniformly for Bento (ampproject#34246) Rename `postMessage` method names so that they're uniform with `VideoIframe`'s. This simplifies the upcoming Bento implementation. * Remove consent storage limit for viewer (ampproject#34054) * 🐛 Fix bad type (ampproject#34254) * Noticed these changes while refactoring on another branch (ampproject#34250) * update amp-script console error to mention data-ampdevmode (ampproject#34235) * ♻️ Move `imaVideo.js` so it can be owned by Bento and Components (ampproject#34247) * ♻️ 📖 Global dep-check rule for Bento video (ampproject#34252) We can more simply allow `extensions/**` files to import specific files from `amp-video/1.0`. It should be ok in any case. * 🏗 runtime: allow for iterator polyfill (ampproject#34249) * runtime: allow for iterator polyfill * Empty commit * lint! * Bento: Prepare Twitter Preact implementation (ampproject#34194) * Do not override user given height until message gives one * Support tweetid directly * Support bootstrap directly * Add unit tests * Support momentid directly * Add Storybook samples for additional options * Use Sinon syntax for spying on setter * Log output when onError set (ampproject#34259) * ✅ ♻️ `<amp-ima-video>` test is not an AMP element test (ampproject#34230) The existing file `test-amp-ima-video.js` is a misnomer since it does not actually test the `<amp-ima-video>` element, only what it loads inside the frame. Accordingly, rename `test-amp-ima-video.js` as `test-ima-video-internal.js`. Also remove stubs specific to the AMP runtime, since it doesn't run inside the iframe. * 🚀 Remove Error classification (ampproject#34257) * Remove Error classification * Left over let declaration * Remove jse error field * 🏗 amp-subscriptions* owners update (ampproject#34261) * Update OWNERS * Update OWNERS * SwG Release 5/5/21 (ampproject#34238) * 🏗️ Simplify enabling npm bundle for components (ampproject#34262) * Simplify enabling npm bundle * %s/const/let/ * 🏗 Add `wg-components` as bundle size approver of dist.3p/ (ampproject#34267) * ♻️ refactor: move builtin components to their own folders (ampproject#34237) * refactor: move builtin components to their own folders. organization++ * fix imports / and references in md files. * closure glob include * ✨ [Amp story] Add `amp-story-page-outlink` component (ampproject#34171) * Fix conflicts. * Advancement, test and comment. * querySelector * Fix conflicts. * Validator, component and template. * Fix merge conflicts. * Remove duplicate code. * Outlink validator rule. * Alphabetize * amp-twitter: Add Storybook samples (ampproject#34273) * Add comprehensive Storybook samples for amp-twitter * Add deleted and invalid tweet-id cases * Name exported functions in PascalCase * 📖 Update LTS release docs to indicate supported AMP flavors (ampproject#34258) * Update lts-release.md * Update lts-release.md * 📦 Update dependency mocha to v8.4.0 (ampproject#34270) * 🏗 Disable JSDoc requirement on Storybook files (ampproject#34255) Disable `require-jsdoc` since it auto-fixes, and we don't need JSDoc in these locations. We preserve the following rules since they ensure correctness, like type-check already does. jsdoc/check-param-names jsdoc/check-tag-names jsdoc/check-types jsdoc/require-param jsdoc/require-param-name jsdoc/require-param-type jsdoc/require-returns jsdoc/require-returns-type * 📦 Update dependency google-closure-compiler to v20210505 (ampproject#34269) * 📦 Update dependency @ampproject/worker-dom to v0.29.3 (ampproject#34242) * 📦 Update core devDependencies (ampproject#34240) * 🖍 [Amp story] [Page attachments] Style adjustments (ampproject#34275) * SVG edit * SVG adjustment. * Drop shadows. * Prevent clipping of decenders. Drop shadow. * ♻️ [bento][amp-stream-gallery] Split component files for NPM Packaging (ampproject#34208) * Split amp-stream-gallery * Rename jss and type files * Review comments * Add package.json file * Fix indentation * Update npm and latest version in config * Update dependency config * Update zindex doc * Update npm definition * [bento][amp-sidebar] SSR compatible design for Sidebar Toolbar (ampproject#34158) * SSR compatible design for Toolbar * Various code review comments from Caroline * Additional review comments * Review comments * Remove unused import * Add sanitation * Update sanitization method * Update return type for helper function * Remove truthiness checks that are redundant * Add unit tests * ♻️ 🏗 Fix type errors in runtime-test-base (ampproject#34161) * fix types in runtime-test-base * ♻️ 🏗 Create proxy for kleur/colors to expand typing. (ampproject#34243) * references to kleur/colors now pass through build-system/common/colors Co-authored-by: Raghu Simha <[email protected]> * update babel.config * 📦 Update com_googlesource_code_re2 commit hash to aa45633 (ampproject#34290) * Check video duration when setting AutoAdvance default (ampproject#34153) * Handle AutoAdvance duration * Update extensions/amp-story/1.0/amp-story-page.js Co-authored-by: Enrique Marroquin <[email protected]> * Update extensions/amp-story/1.0/page-advancement.js Co-authored-by: Enrique Marroquin <[email protected]> Co-authored-by: Gabriel Majoulet <[email protected]> Co-authored-by: Enrique Marroquin <[email protected]> * 📦 Update dependency postcss-import to v14.0.2 (ampproject#34297) * 📦 Update dependency eslint to v7.26.0 (ampproject#34289) * ❄️ Skip flaky stories tests (ampproject#34303) * 🏗 Improve usability of `describes` by making it configurable (ampproject#34286) * 📦 Update dependency postcss to v8.2.15 (ampproject#34301) * ✅ Validator rules for amp-video-iframe 1.0 (ampproject#34200) * amp-twitter:1.0 - Allow binding to data-tweetid and other configuration attrs (ampproject#34296) * Add Storybooks for mutation * Reload iframe when context (via name) changes * Add unit test * PascalCase * Named vars in test * 🚮 Remove unused font from examples (ampproject#34309) * 🚮 Remove unused font from examples * Remove CSS uses without <link> * update validator files * ✨ Add parameter to configure amp-story-player animation (ampproject#34204) * added animation options * Removed animation from behaviordef * Added newline on player * Added documentation on options * Use next to toggle animation * Use transitionend * Using classes for CSS * Reverted requestAnimationFrame promise * Added tests * Apply suggestions from code review Co-authored-by: Enrique Marroquin <[email protected]> * Use true instead of property Co-authored-by: Enrique Marroquin <[email protected]> Co-authored-by: Enrique Marroquin <[email protected]> * 🐛 [amp-lightbox-gallery] Use declared amp-carousel extension to build carousel (ampproject#34292) * init * nit * Get reference to win. (ampproject#34299) * ♻️ `<amp-ima-video>`: Serialize children (ampproject#34229) `<amp-ima-video>` takes children like: ``` <amp-ima-video> <source data-foo="bar" src="src" /> <track src="src" /> </amp-ima-video> ``` These were previously serialized as HTML on `buildCallback` to be pass to the iframe to (unsafely) write onto `innerHTML`: ``` <amp-ima-video data-child-elements='<source data-foo="bar" src="src" /><track src="src" />' ></amp-ima-video> ``` To prepare for a Bento implementation, we serialize into a JSON format that a Preact component can build more simply and safely: ``` [ ["SOURCE", {"data-foo": "bar", "src": "src"}], ["TRACK", {"src": "src"}] ] ``` This change only affects the interface between the `<amp-ima-video>` element and its own proxy `<iframe>`. It does not affect anything author-facing since they will continue to write children `<source>` and `<track>` elements as such. * 📦 Update dependency eslint-plugin-jsdoc to v34 (ampproject#34304) * 🏗✅ Sandbox all unit and integration tests (ampproject#34305) * Bento: Assign placeholder and fallback elements to service slot (ampproject#34310) * Pass placeholder and fallback to shadow * Add unit test * Type annotation * Remove auto import * 📦 Update linting devDependencies (ampproject#34288) Co-authored-by: Raghu Simha <[email protected]> * 📦 Update dependency esbuild to v0.11.19 (ampproject#34147) * 📦 Update dependency esbuild to v0.11.19 * Add workaround for evanw/esbuild#1202 * Hack: leave .mjs as esm * cleanup * experiment with excluding all of node_modules instead of just .mjs files. * update comment * nit:hoist Co-authored-by: Raghu Simha <[email protected]> Co-authored-by: Jake Fried <[email protected]> * Update tests of updateTimeDelay to be more fuzzy (ampproject#34313) * 📦 Update dependency esbuild to v0.11.20 (ampproject#34322) * 🐛✨ [amp-ad] [amp-auto-ads] Firstimpression.io: more debug options, (ampproject#34170) * FirstImpression.io: debug parameters also as query search parameters * FirstImpression.io: use pageViewId64, more debug options * 🏗 Sandbox `describes.repeated` and get rid of the global `window.sandbox` (ampproject#34329) * amp-render a11y (ampproject#34320) * 🐛 [Amp story] [Page attachments] [Outlink] Split outlink codepaths for open attachment (ampproject#34330) * Split outlink codepaths. * Lint. * ♻️ Modernize some core code (ampproject#34280) * Use null coalesce and deferred * Use for...of instead of forEach * Simplify Deferred class * Tweak Observable to use removeItem, for..of, ?? * Fix typo * %s/break/continue/ * ✨ Text fragments support on amp viewer (ampproject#34074) * Initialize Logs in web-push's helper frame endpoint (ampproject#34326) * Find existing element by attr not tagName (ampproject#34325) * cl/372175665 amp-vimeo: prioritize v0.1 over v1.0 in tagspec ordering (ampproject#34339) * Add unit tests for amp-facebook-comments:0.1 (ampproject#34331) * Add unit tests for amp-facebook-comments * Fix unit tests in 1.0 * Lint * Let GitHub Actions write package jsons for bento (ampproject#34311) * wnode script * error handle * log * move files * pr comments * 🏗 Add OWNERS for `src/preact` (ampproject#34298) * Create OWNERS file for src/preact * Add jridgewell * carolineliu -> caroqliu * 📦 Update com_googlesource_code_re2 commit hash to bc42365 (ampproject#34341) * Add additional wording to tests (ampproject#34334) Closes ampproject#34260 Adds additional language around using `_top` in swipe up links (opening the link in the parent window for viewers). (Follow up for ampproject#34030) * 📦 Update dependency eslint-plugin-jsdoc to v34.0.2 (ampproject#34336) * 📦 Update dependency jest-progress-bar-reporter to v1.0.21 (ampproject#34338) * 📦 Update babel devDependencies to v7.14.2 (ampproject#34344) * 📦 Update core devDependencies (ampproject#34353) * Solve dumb CC type inference bug (ampproject#34355) * Upgrade Preact to 10.5.13 (ampproject#30043) * Upgrade Preact to 10.4.8 * update preact to latest Co-authored-by: Jake Fried <[email protected]> * ♻️ Start updating assertions to use core/assert instead of src/log (ampproject#34284) * Prefix user/dev assert fns * Update renamed imports * Update imports to drop "pure" * Update src/utils assert imports * Update src/{polyfills,preact,purifier,web-worker} assert imports * Update src/{inabox,amp-story-player} assert imports * Fix merge breakage * Fix merge breakage * 🏗♻️ Refactor and simplify initialization / clean up of unit and integration tests (ampproject#34346) * ♻️ Provide core `tryCallback` helper (ampproject#34348) * Provide tryCallback helper * Import shared helper where relevant * Remove spread param * Fix missing import * Update src/core/error.js Co-authored-by: Justin Ridgewell <[email protected]> * Update src/core/error.js Co-authored-by: Justin Ridgewell <[email protected]> * Update src/core/error.js Co-authored-by: Justin Ridgewell <[email protected]> * ♻️ Clean up extern typedefs (ampproject#34345) * Un-extern AssertionFunction typedef * Un-extern Timestamp * Move UnlistenDef to function.extern.js * %s/Timestamp/TimestampDef/ for linter * Fix typo * Fix log type decl * ♻️ Modernize polyfills (ampproject#34342) * dedupe rethrowAsync * modernize fetch polyfill * modernize custom-elements polyfill * modernize polyfill stubs * modernize object-assign polyfill * update straggler * Fix typo * typecast elements_ * Revert changes to fetch polyfill * Revert changes to fetch object-assign * Clean up stub types by removing nullability * Update polyfill stub tests * Fix test change * ♻️ Consolidating more core type helpers (ampproject#34253) * Move time.js types into src/core/types/date * Move finite-state-machine to core/data-structures * Make core/types/string a submodule * Move base64 and bytes tests with core * Move curve.js to core/data-structures * Make src/core/function a submodule * Update dep-check and conformance configs for string.js * Fix legacy tests * Move tests for exponential backoff * Standardize data structures tests * Update test file structure * Make curve map side-effect-free * Use map and isString helpers * Tweak test names * Fix import * Fix types * Update imports of finite-state-machine * Update imports of bytes and base64 * Update imports of curve * Update imports of exponential-backoff * make lerp static * make getPointX/Y static * make solvePositionFromXValue static * make Bezier fully static * Use Bezier not static this * Fix typo * Use static solver in Curves map * Fix type decls * tweak comments * Remove unused import * Fix imports from merge * Move normtimedef to curve * ♻️ Simplify rendering <amp-ima-video> with CSS and static templates (ampproject#34248) Use static templates and standalone CSS to simplify how we render a modify `<amp-ima-video>`'s internal tree. This change is unrelated to the Bento effort. Communication between iframe and host is intact. * Update npm definition and package file for publishing (ampproject#34333) * 🐛Fix lint error in test-ima-video-internal.js (ampproject#34365) * amp-script: sandboxed implies nodom (ampproject#34025) * ✨ [amp-render] `placeholder` and `fallback` support (ampproject#34294) * 📦 Update com_google_googletest commit hash to 662fe38 (ampproject#34373) * ✅ Add unit tests for amp-facebook-like (ampproject#34361) * Add unit tests for amp-facebook-like * Lint * fix layout bug (ampproject#34360) * 📖 Pressboard vendor updates (ampproject#34188) Update Pressboard analytics config and documentation link. * ✨ amp-auto-ads extension: Denakop (ampproject#34215) * feat: Custom style * Revert "feat: Custom style" This reverts commit 2e886ec. * feat: Add custom style * test: Change tests * fix: Fix lint issues * feat: Custom style * Revert "feat: Custom style" This reverts commit 2e886ec. * feat: Add custom style * test: Change tests * fix: Fix lint issues * Revert "fix: Fix lint issues" This reverts commit 386df3f. * fix: Fix lint issues * Forbid private properties inside BaseElement (ampproject#34376) This fixes a cross binary issue with private properties being mangled to, ie., `lc` inside `BaseElement` base class. The issue is that a subclass extending it in another binary (eg, `amp-a4a`) can reuse that mangled name for something entirely different, because Closure isn't aware of what the base class is at that point. * SwG release 0.1.22.165 (ampproject#34352) * SwG release 0.1.22.165 * unbreaks amp test * ✅ Add unit tests for amp-facebook-page (ampproject#34351) * Add unit tests for amp-facebook-page * Move amp-facebook-page test to correct location * 📖 Disable deadlink checking for Infoline (ampproject#34384) * 📦 Update dependency esbuild to v0.11.21 (ampproject#34381) * 📦 Update linting devDependencies (ampproject#34377) * 🚮 Clean up obsolete npm resolutions (ampproject#34388) * ♻️ 🏗 Fix typing in the build-system (ampproject#34162) * fix type errors * make suggested changes * Update build-system/test-configs/jscodeshift/index.js Co-authored-by: Raghu Simha <[email protected]> * Update build-system/tasks/serve.js * add empty passing check to visual-diff tests when they are not needed (ampproject#34371) * Remove FunctionalTestController, make ControllerPromise extend Promise (ampproject#33844) * remove functionaltestcontroller, rename functional-test-controller file * rename functional-test-types to e2e-types Co-authored-by: Enrique Marroquin <[email protected]> * ✅ [Story player] Fix animation unit test flakiness (ampproject#34382) * added animation options * Removed animation from behaviordef * Added newline on player * Added documentation on options * Use next to toggle animation * Use transitionend * Using classes for CSS * Reverted requestAnimationFrame promise * Added tests * Apply suggestions from code review Co-authored-by: Enrique Marroquin <[email protected]> * Use true instead of property Co-authored-by: Enrique Marroquin <[email protected]> * Removed trailing whitespace * Fixed linting * Wait for transitionend Co-authored-by: Enrique Marroquin <[email protected]> * 🏗 Switch AMP's main bug template to a yaml-based form (ampproject#34393) * Adding Blue Triangle to amp-analytics list✨ (ampproject#34012) * added blue triangle AMP integration info * fixed minor nitpicks for AMP integration * added client ID instead of random substring for guid and session id * added new lines at end of file * amp prettify command changes * Revert "amp prettify command changes" This reverts commit 1c489b2. * reverted last changed, only have the needed changes * got rid of not needed extra url params * changed to endpoint from base * remove question mark * made sure web vitals were present, changed format of client id in vendor example * more changes * 🏗 Allow Performance WG to manage check-types (ampproject#34395) * Allow Performance WG to manage check-types * Lint fixes * Fix nits in ampproject#34376 (ampproject#34392) * 📦 Update dependency karma-esbuild to v2.2.0 (ampproject#34396) * ♻️ Extract json helpers to core/types/object/json (ampproject#34367) * Make types/object submodule * Update path in presubmit/lint configs * Move json externs * Move json to core * Shift generic helpers from json to object * Fix test files * Fix types excluding json * Fix types in json * Clean up and remove dupe code * Update imports of json * Remove newlines between imports * Fix dep-check-config * Null chaining for [] and () * Typo * Fix callback * Expand AMP issue template intro text (ampproject#34397) * ♻️ Enable passing type-checking on src/experiments and src/examiner (ampproject#34394) * mv src/experiments.js -> src/experiments/index.js * Make src/experiments pass type-checking * Allow use of window in extern files * Remove unused import * Allow AMP_CONFIG in extern * Modernize experiments code * Enable passing type-checking on src/examiner + modernize * Use assert via logger * un-hoist * Clean up extra type annotations * Fix tests passing object instead of array * 📖 Convert feature request issue template to a form (ampproject#34398) * PubMatic OpenWrap to pass consent strings (ampproject#34403) * use storyNextUp (ampproject#34285) * 📖 Improve references to the AMP plugin for WordPress in bug report template (ampproject#34401) * Improve references to the AMP plugin for WordPress * Fix text to fit on one line and apply to FR template Co-authored-by: Raghu Simha <[email protected]> * 📖 Consolidate all AMP documentation in `docs/` (ampproject#34047) * 📦 Update dependency geckodriver to v2 (ampproject#34404) * 📦 Update linting devDependencies (ampproject#34409) * 📖 Move AMP documentation from `spec/` to `docs/spec/` (ampproject#34160) * 🚮 [Story bookend] Disabled bookend and related tests (ampproject#34354) * Disabled bookend and related tests * Removed checks to bookend * Linted * Made bookend an alias of social-share * Removed bookend test since it's not showing * Removed bookend tests * Fixed linting * Cleanup * Fixed linting again * Removed visual tests * Fixed test * 📦 Update dependency open to v8.0.9 (ampproject#34408) * 📦 Update dependency esbuild to v0.11.23 (ampproject#34407) Co-authored-by: Raghu Simha <[email protected]> * ♻️ [bento][amp-base-carousel] Split component files for NPM Packaging (ampproject#34283) * Initial commit for base-carousel conversion * Additional updates * Add npm files * Update z-index doc * Update z-index * 📦 Update dependency rollup to v2.48.0 (ampproject#34410) * ♻️ Enable passing type-checking on src/context (ampproject#34387) * enable src-context type-check target * Fix type errors in src/context * export ContextPropDef * for...of in scan * clean up scheduler types * Update ContextPropDef in subscriber * update types in index * update types in index * update types in contextprops * update types and for...of in node * Drastically narrow types in values * Add DEP template type to contextpropdef * type-narrow subscriber * Clean up scheduler type decl * use templates in scan * Update index prop and setter types * Allow subscriber ID template type * Add deps template arg for contextprops * Add SID for return type * Assert non-null subscriber IDs * Code review tweak * Remove template type from static function * forEach -> for..of * Revert forEach changes to Maps * 🐛 amp-ima-video: Fix pause button jamming on autoplay (ampproject#34307) When autoplaying a video with a preroll ad, the pause button will not work the first time. This is because we haven't tracked the `PlayerState`. This change keeps track of `PlayerState` on ad events, as meant initially. * ♻️ Start moving URL helpers into core (ampproject#34399) * Move query string parsing into core * Update dep-check config * Move query string parsing helper tests * Fix typo * Restore deleted forbidden-terms rule * Update single imports of helpers * Update multi-imports of url helpers * Fix straggler imports * Lint fixes * 🐛 [Story devtools] Toggle devtools on mjs build (ampproject#34372) * IsDevelopmentMode * return boolean jsdoc * Use include since we polyfill Co-authored-by: Ryan Cebulko <[email protected]> * Removed useless comment Co-authored-by: Ryan Cebulko <[email protected]> * 🚮 [Story bookend] Remove bookend extended code (ampproject#34343) * Started removing bookend * Finished removing bookend from files * Fixed linting * Updated validation tests * Updated validation tests 2 * Removed bookend strings * Disabled bookend and related tests * Removed checks to bookend * Linted * Made bookend an alias of social-share * Removed bookend test since it's not showing * Removed bookend tests * Fixed linting * Cleanup * Fixed linting again * Removed visual tests * Fixed test * Fixed test * Fixed request service tests * Fixed visual tests * Bring back validation tests for bookend * persist playing state on config (ampproject#34356) * Fix invisible merge conflict (ampproject#34420) * cl/373617376 Make the process of auto-generating validator.pb.go compatible with protoc v3.16.0. (ampproject#34428) Co-authored-by: Michael Rybak <[email protected]> * 📖 Migrate `Intent-to-*` issue templates to yaml forms (ampproject#34431) * Use validator_wasm.js as default validator (ampproject#34213) * 📖 Delete the manual error report issue template (ampproject#34435) * 📦 Update validator devDependencies to eb6e927 (ampproject#34436) * 📦 Update dependency esbuild to v0.12.1 (ampproject#34421) * 📦 Update babel devDependencies to v7.14.3 (ampproject#34418) * ✅ [Story video] Add e2e tests for Bitrate Manager (ampproject#33660) * Created e2e test * Added tests * Fixed e2e tests * Removed comment * Removed unused import * Addede e2es * Moved field to html * More work on e2e * Added load unload fixture * Fixed tests * Added more tests and cleaned up hooks * Added multiple sources on first videos to test flexible-bitrate * Changed e2es to work * Removed whitespaces * Adding cache fetch test * Add e2e fixture to disallowlist for validate * fixed host_url in e2e * Updated tests * Changed order of test conditions for consistency * Update extensions/amp-video/0.1/test-e2e/test-amp-video-flexible-bitrate.js * Update extensions/amp-video/0.1/test-e2e/test-amp-video-flexible-bitrate.js Co-authored-by: Gabriel Majoulet <[email protected]> * 📖 Migrate the release tracker template to a yaml form (ampproject#34440) * 📦 Update dependency @types/node to v14.17.0 (ampproject#34429) * 📦 Update dependency eslint-plugin-jsdoc to v34.8.2 (ampproject#34415) * Check if documentHeight has changed after all elements initially built (ampproject#34434) * SwG release 0.1.22.166 (ampproject#34444) * ✨[amp-form] allow `form` attributes for form elements outside of `amp-form` (ampproject#33095) * Init * init * handler => service * Tests * ServiceForDoc no promise * Validator, WeakMap of Array, nits * Update build-system/test-configs/forbidden-terms.js Co-authored-by: Alan Orozco <[email protected]> * Update extensions/amp-form/0.1/amp-form.js Co-authored-by: Alan Orozco <[email protected]> * Update extensions/amp-form/0.1/amp-form.js Co-authored-by: Alan Orozco <[email protected]> * Account for amp-selectors (in and out) * fix test * Update build-system/test-configs/forbidden-terms.js Co-authored-by: Raghu Simha <[email protected]> Co-authored-by: Alan Orozco <[email protected]> Co-authored-by: Raghu Simha <[email protected]> * Add adoptedCallback to work around Firefox Native CE bug (ampproject#34455) See https://output.jsbin.com/yuwojok/29/quiet for a working demo of the bug. When we construct a CustomElement in one document, then insert it into another document (as we do with A4A ads), Firefox incorrectly resets the prototype of our CE instance to `HTMLElement.prototype`. Luckily, we can fix this by listening for the `adoptedCallback`, which fires just after Firefox resets the prototype. If we detect a broken prototype chain, we can correct it before any other code can notice. See https://output.jsbin.com/datajos/5/quiet for a demo of the fix. * ✨ Update npm amphtml-validator to v1.0.35 (ampproject#34454) * Update npm amphtml-validator to v1.0.35 * Update readme * ♻️ Cleaning up Log error code in preparation for core (ampproject#34458) * Move core/error.js -> core/error/index.js * Move user error helpers to error-message-helpers * Move error-message-helpers to error/message-helpers * spread args in log where slicing * Use loglevel enum in msg_ * Add TODO * string.includes Co-authored-by: Justin Ridgewell <[email protected]> * Update src/core/error/message-helpers.js Co-authored-by: Justin Ridgewell <[email protected]> * 📦 Update com_google_googletest commit hash to aa9b44a (ampproject#34452) * ♻️ Create plain `<img>` placeholders (ampproject#34379) Where extensions would previously create `<amp-img>` placeholders, now create a plain `<img>` element with `loading="lazy"` * remove brotli check as these files do not exist on cdn anymore (ampproject#34457) * remove brotli check as these files do not exist on cdn anymore * prettier * ♻️ Support img element (ampproject#34028) * Allow IMG so long as it contains a loading attribute * Make width and height mandatory * Move method from within AMP.BaseElement to src/core/dom since it must act on native elements and extended AMP elements now * Update validator output * Mid way stopping point on amp-lightbox-gallery cloneLightboxableElement_ * Lightbox gallery now supports image elements * Use Sets instead of objects * PR feedback on name of utility and usage of other utilities * lightbox had a bad reference * Spy on the right thing now * Remove validator changes for a later step * Carriage returns at the end of the out files for the validator * Updated carriage returns at end of files * Update comments * Move auto lightbox to loadPromise * Remove Set in amp-auto-lightbox * Remove set in amp-image-lightbox * Remove logic specific to amp-img for the img path * Additional fixes for Set usage * test for supporting img on amp-image-lightbox * Add tests for propagate attributes helper and fix usage in iframe-video * Additional fixes for propagateAttributes from AMPElements * Bad merge * pass ampdoc in Criteria so its not obtained from an HTMLElement * change order of arguments to reduce test rewriting for Criteria * Fix types in propagate attributes * Prettier formatting * different prettier versions * update core utility with improved typing from below * Address part of Alans feedback * types * remove toLowerCase on tagName * Test changes from PR feedback (and applied elsewhere in the file) * Add support for native HTMLImageElements to amp-image-slider * Add test using HTMLImageElements * Revert changes to gestures for a later PR * Continued progress, pan zoom works and lightbox gallery is underway * LayoutScheduled for amp-carousel 0.1 when unlayout happening * Remove image support for amp-image-viewer for a future PR * Image Viewer no longer needs to exclude itself from using loadPromise directly * Remove console logging for carousel debugging: * Remove breaks in parsing of children for amp-image-slider * No need to provide an empty array for the Set constructor * Remaining console * Nit * Remove more intermediary state changes * Naming nit * prettier formatting in test * support loading indicator and no-loading attribute (ampproject#34467) * 📦 Update dependency amphtml-validator to v1.0.35 (ampproject#34472) * 📖 Migrate the cherry-pick request template to a yaml form (ampproject#34463) * 📦 Update build-system devDependencies (ampproject#34231) * 📖 Assorted issue and PR template fixes (ampproject#34473) * amp-list: Support diffable with single-item (ampproject#33249) * Revert "Revert "amp-list: Fix Bind.rescan vs. diffing race condition (ampproject#32650)" (ampproject#33232)" This reverts commit 60adca7. * Support diffable with single-item. * Fix test. * Fix lint. * 📦 Update com_googlesource_code_re2 commit hash to 4244cd1 (ampproject#34476) * ✨Update amp-analytics provider bluetriangle.json to change the triggers and transport (ampproject#34423) * added blue triangle AMP integration info * fixed minor nitpicks for AMP integration * added client ID instead of random substring for guid and session id * added new lines at end of file * amp prettify command changes * Revert "amp prettify command changes" This reverts commit 1c489b2. * reverted last changed, only have the needed changes * got rid of not needed extra url params * changed to endpoint from base * remove question mark * made sure web vitals were present, changed format of client id in vendor example * more changes * changed blue triangle trigger to ini-load, added test variable to vendors example page, changed blue triangle transport to xhrpost * 📦 Update com_google_googletest commit hash to 9741c42 (ampproject#34483) * 🏗 Enable VSCode auto-formatting and prettier checks for `.yml` files (ampproject#34478) * [Amp story] [Page attachments] [Outlink] Remove open attachment delay and animation (ampproject#34477) * Remove open attachment delay. * Revise preview animation duration. * 📦 Update linting devDependencies (ampproject#34474) * 📦 Update subpackage devDependencies (ampproject#34486) * 📦 Update dependency eslint-plugin-jsdoc to v35 (ampproject#34494) * 📖 amp-animation: Clarify prefers-reduced-motion (ampproject#34442) * Adding Tail as rtc vendor (ampproject#34481) * 🖍 Prevent native `img` elements from being styled by `ampshared.css` (ampproject#34482) * Prevent `[width][height][sizes]` selectors from inadvertently matching `img` elements * Allow `height` and `width` on `amp-img > img (transformed)` * Unlaunch auto-ads-no-insertion-above holdback experiment (ampproject#34425) * ✅ [AMP Story] [Page attachments] Update visual tests for new UIs (ampproject#34223) * visual tests * make pages look same * nit * revert nit * remove references to inline-dark-theme visual test * adding images and extra tests * moving tests for v2 to a diff file * documenting v2 tests * adding cover id * adding snapshots and experiment * change IDs * adding js test navigation * adding js test navigation * formatting * edit tests * format * format * format * adding next page * adding next page * adding rest of pages * lint * testing adding active on openAttachmentEl * changing selector * typo * adding important * Improve targeting of img in remote-content. * Refactor go to page Removes tap simulation to navigate to page. Removes timeout. Improves selector to be sure page is visible. * Use same interactive tests for desktop. * Remove desktop.js JS can be re-used for desktop and mobile. Co-authored-by: Philip Bell <[email protected]> * ✨Use WebAssembly validator for chrome extension (ampproject#34502) * Use WebAssembly validator for chrome extension * Use es5 for popup.html * Init wasm before polymer code * 🏗 Move default PR template to `.github` directory (ampproject#34506) * 🏗 Consolidate glob expansion while determining build targets (ampproject#34509) * 📦 Update dependency @percy/core to v1.0.0-beta.51 (ampproject#34508) * Use isModeDevelopment for validator integration (ampproject#34503) * Use isModeDevelopment * fix test failures * update related test * 🏗 ♻️ Fix ALMOST all type issues in /build-system (ampproject#34438) * patched all fixable type errors Co-authored-by: Raghu Simha <[email protected]> * 📦 Update dependency esbuild to v0.12.2 (ampproject#34518) * 📖 Add bug report fields for OSs and Devices (ampproject#34522) * 📖 Use `n/a` instead of `/all` in the OS and device fields (ampproject#34524) * 🏗 Enable a lint rule to auto-sort destructure keys (ampproject#34523) * Added attributes to adpushup amp-ad (ampproject#34459) Added data-jsontargeting and data-extras attributes to adpushup amp-ad vendor integration Co-authored-by: Rahul Ranjan <[email protected]> * 🏗 Update build-system subpackages before checking types (ampproject#34525) * 🏗 Include dotfiles while expanding globs during the CI check for valid URLs (ampproject#34510) * 📦 Update com_google_googletest commit hash to a3460d1 (ampproject#34530) * ✨ [bento][npm] Support react modules in NPM Bento components (ampproject#34528) * Updates for react npm * Ignore eslint rule * add amp-onerror validation for v0.js or v0.mjs (ampproject#34531) * Sync for validator/cpp/engine (ampproject#34534) * Don't populate spec_file_revision field in ValidationResult. The field is deprecated. PiperOrigin-RevId: 373462878 * Delete ParsedValidatorRules::SpecFileRevision(). PiperOrigin-RevId: 373688076 * Allow i-amphtml-layout-awaiting-size class in FLUID layout PiperOrigin-RevId: 375586004 Co-authored-by: Googler <[email protected]> Co-authored-by: Justin Ridgewell <[email protected]> * cl/375586004 Allow i-amphtml-layout-awaiting-size class in FLUID layout (ampproject#34533) Co-authored-by: Justin Ridgewell <[email protected]> * Sync for validator/cpp/htmlparser (ampproject#34536) * Fix out of memory errors for a particular fuzzer test case which end up in parsing entire contents of a binary blob as attributes. Defined a flag for maximum attributes a node may contain. This value is reasonably large to cover all real world documents. PiperOrigin-RevId: 375586875 * Update CONTRIBUTING.md * Update README.md * Update amp4ads-parse-css.h * Add missing dependency Co-authored-by: Amaltas Bohra <[email protected]> * 🐛 [Amp story] [Page attachments] [Outlink] Open remote from light dom (ampproject#34535) * Element child * Revert regression * Trigger click from light dom * Revert. * revert * revert * Revert * Ramp up 3p vendor splitting to 50% (ampproject#34468) * 🏗 Automate bento publishing with a GitHub Action (ampproject#34430) * Skip "should render correctly" (ampproject#34541) * 🏗 Don't type-check server transform output (ampproject#34537) * ✨ [amp-render] validator changes (ampproject#34366) * 📦 Update core devDependencies (ampproject#34451) * ✨ [amp-render] documentation (ampproject#34391) * 📖 Make a few bug report fields optional (ampproject#34547) * 📦 Update dependency esbuild to v0.12.3 (ampproject#34555) * 📦 Update dependency core-js to v3.13.0 (ampproject#34538) * 🏗 Auto-format dev dashboard tests (ampproject#34546) * cl/375855105 Extract AMP Cache Domain validation, part 1 (ampproject#34558) Co-authored-by: honeybadgerdontcare <[email protected]> * ♻️ Migrate math and some DOM logic into core w/ type-checking (ampproject#34550) * Move utils/dom-fingerprint to core/dom/fingerprint * Fix imports in fingerprint.js * Move utils/date to core/dom/parse-date-attributes * Improve types in parse-date-attributes * Move utils/dom-based-weakref to core/dom/weakref * Update test names * Add __AMP_WEAKREF_ID extern * Move math, id-gen, layout-rect to core/math * Update types for layout-rect * Move get-html into core/dom * Move isFiniteNumber into core/types * Move document-ready to core * Move web-components to core/dom * Fix types in web-components * Move dom streaming helpers to core/dom/stream * Update imports of dom-fingerprint * Update imports of parseDateAttrs * Update (only) import of DomBasedWeakRef * Update imports of math helpers * Update imports of get-html * Update imports of isFiniteNumber * Update imports of document-ready * Update imports of web-components * Update imports of dom stream helpers * Update forbidden-terms * Not nullable type * Launch flexible-bitrate experiment to 10%. (ampproject#34549) * 🏗 Skip NPM checks while type-checking build-system (ampproject#34557) * Sync for validator/cpp/engine (ampproject#34560) * Add SSR support for FLUID layout PiperOrigin-RevId: 375756231 * Extract AMP Cache Domain validation, part 1 Adds method isAmpCacheDomain_ (JS) / IsAmpCacheDomain (C++) PiperOrigin-RevId: 375855105 Co-authored-by: Justin Ridgewell <[email protected]> Co-authored-by: honeybadgerdontcare <[email protected]> * 📦 Update dependency rollup to v2.50.1 (ampproject#34519) * 🏗 Add check-build-system to pr-checks (ampproject#34544) * add check-build-system to pr checks * fix more type errors * disable incremental builds Co-authored-by: Raghu Simha <[email protected]> * Add unit tests (ampproject#34563) * 📦 Update core devDependencies (ampproject#34561) * Track flexible-bitrate experiment through CSI pipeline. (ampproject#34548) * ✨ [bento][npm] Update file naming from mjs to module (ampproject#34568) * Update file naming from mjs to module * import exports should be in alphabetical order * Rename helper function * (nit) Replace NPM with npm (ampproject#34573) * 🏗 Optimize linting during PR builds (ampproject#34567) * ♿ [amp-render] a11y change (ampproject#34540) * 📦 Update dependency @sinonjs/fake-timers to v7.1.1 (ampproject#34578) * 📦 Update dependency rollup to v2.50.2 (ampproject#34579) * 📦 Update dependency @types/eslint to v7.2.12 (ampproject#34574) * Facebook: Render embedded type via `data-embed-as` versus element `tagName` (ampproject#34312) * Switch based on data-embed-as versus tag name * Update tests * Update FacebookComments * Allow dependency on enum * Remove staticProps * Update all the tests * Remove dupe * Import userAssert * Allow dependency on enum * 📦 Update dependency esbuild to v0.12.4 (ampproject#34576) * ✨ Supports locale options for localeString in amp-date-display. (ampproject#34359) * ✨ Supports locale options for localeString in amp-date-display. * Allow user to customize locale options for localeString, the options setting is same as [Date.toLocaleString](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString#syntax) parameter. * [amp-date-display] Moves localeOptions from json type to data-options-*. * [amp-date-display] Tests and content imporvements. - Added invalid test cases. - Throws user error if invalid data-options-* param is provided. - Updated data-options-* readme doc. - Added new lines to .out validator files. - Applied reviewer suggestions. * 🏗📖 Clean up AMP setup documentation + infrastructure (ampproject#34582) * Don't block Story render on a fallback media load. (ampproject#34583) * 🏗 Update bento package.json template (ampproject#34584) * 📖 Add explanatory text to the LTS and cherry-pick sections of the release tracker (ampproject#34575) * Run through all actions for each distFlavor in `amp release` before the next (ampproject#34569) Co-authored-by: Raghu Simha <[email protected]> * 🏗 Make new typecheck targets simpler (ampproject#34559) * Remove the need to explicitly specify extern globs * Add clarifying comment * Allow type-check target to just be a list of globs * Update type * More explanatory comments * More comments * Video cache for amp-video[src]. (ampproject#34570) * Video cache for amp-video[src]. * Update extensions/amp-video/0.1/video-cache.js Co-authored-by: Justin Ridgewell <[email protected]> * Update extensions/amp-video/0.1/video-cache.js * Import iterateCursor. * Reviews. Co-authored-by: Justin Ridgewell <[email protected]> * 🐛 Bug fix allowing set height and fixing Ad position (ampproject#34092) * allowing add data-attributes * using dataset for shorter code * fixing error use of style to style elements is forbidden * fixing default attribute values * removing sizes * allowing use min height * fixing banner alignment * fixing test * fixing prettier validation * fixing prettier validation * SwG Release 0.1.22.167 (ampproject#34572) * 🏗 Automatically write react.js files for bento components when publishing (ampproject#34586) * update node script * lint * pr comments * lint * Lazy load AMP cache URL and make it optional. (ampproject#34588) * Revert "♻️ Support img element (ampproject#34028)" (ampproject#34589) This reverts commit 5a0936f. * 🏗 Enforce JSDoc across `build-system/` for complete type-checking (ampproject#34591) * Minimum duration for auto-advance-after. (ampproject#34592) * Fix time based auto-advance-after. (ampproject#34598) * Add missing bundles entry for amp-iframely (ampproject#34602) * 🐛 [no-signing] fix ads using amp-gwd-animation (ampproject#34593) * Add teads test stack * FOR-3929: Migrate a.teads.tv to s8t.teads.tv in amphtml E2E tooling * fix testing Co-authored-by: Alan Orozco <[email protected]> Co-authored-by: udaya-m-taboola <[email protected]> Co-authored-by: Jake Fried <[email protected]> Co-authored-by: Philip Bell <[email protected]> Co-authored-by: honeybadgerdontcare <[email protected]> Co-authored-by: WhiteSource Renovate <[email protected]> Co-authored-by: Raghu Simha <[email protected]> Co-authored-by: Ryan Cebulko <[email protected]> Co-authored-by: mister-ben <[email protected]> Co-authored-by: Kevin Dwan <[email protected]> Co-authored-by: Micajuine Ho <[email protected]> Co-authored-by: Kristofer Baxter <[email protected]> Co-authored-by: patrick kettner <[email protected]> Co-authored-by: Caroline Liu <[email protected]> Co-authored-by: John Pettitt <[email protected]> Co-authored-by: Elijah Soria <[email protected]> Co-authored-by: Jon Newmuis <[email protected]> Co-authored-by: Riley Jones <[email protected]> Co-authored-by: Zach P <[email protected]> Co-authored-by: Gabriel Majoulet <[email protected]> Co-authored-by: Enrique Marroquin <[email protected]> Co-authored-by: Matias Szylkowski <[email protected]> Co-authored-by: Zer0Divis0r <[email protected]> Co-authored-by: dmanek <[email protected]> Co-authored-by: Justin Ridgewell <[email protected]> Co-authored-by: Esther Kim <[email protected]> Co-authored-by: Dima Voytenko <[email protected]> Co-authored-by: Justin Ridgewell <[email protected]> Co-authored-by: Caleb Cordry <[email protected]> Co-authored-by: Tiam <[email protected]> Co-authored-by: Edmilson Silva <[email protected]> Co-authored-by: henel677 <[email protected]> Co-authored-by: AdrianPerry <[email protected]> Co-authored-by: Harshad Mane <[email protected]> Co-authored-by: Weston Ruter <[email protected]> Co-authored-by: Allan Banaag <[email protected]> Co-authored-by: Michael Rybak <[email protected]> Co-authored-by: Boxiao Cao <[email protected]> Co-authored-by: qidonna <[email protected]> Co-authored-by: William Chou <[email protected]> Co-authored-by: dulpneto <[email protected]> Co-authored-by: Shihua Zheng <[email protected]> Co-authored-by: Raksha Muthukumar <[email protected]> Co-authored-by: Philip Bell <[email protected]> Co-authored-by: madan-mayank <[email protected]> Co-authored-by: Rahul Ranjan <[email protected]> Co-authored-by: Googler <[email protected]> Co-authored-by: Amaltas Bohra <[email protected]> Co-authored-by: honeybadgerdontcare <[email protected]> Co-authored-by: Gabriel Majoulet <[email protected]> Co-authored-by: Jingfei <[email protected]> Co-authored-by: Daniel Rozenberg <[email protected]> Co-authored-by: Pablo <[email protected]> Co-authored-by: Chris Antaki <[email protected]> Co-authored-by: RonanDrouglazet <[email protected]>
* 📦 Update dependency esbuild to v0.11.19 * Add workaround for evanw/esbuild#1202 * Hack: leave .mjs as esm * cleanup * experiment with excluding all of node_modules instead of just .mjs files. * update comment * nit:hoist Co-authored-by: Raghu Simha <[email protected]> Co-authored-by: Jake Fried <[email protected]>
This PR contains the following updates:
0.9.7
->0.11.19
How to resolve breaking changes
This PR may introduce breaking changes that require manual intervention. In such cases, you will need to check out this branch, fix the cause of the breakage, and commit the fix to ensure a green CI build. To check out and update this PR, follow the steps below:
Release Notes
evanw/esbuild
v0.11.19
Compare Source
Allow esbuild to be restarted in Deno (#1238)
The esbuild API for Deno has an extra function called
stop()
that doesn't exist in esbuild's API for node. This is because Deno doesn't provide a way to stop esbuild automatically, so callingstop()
is required to allow Deno to exit. However, once stopped the esbuild API could not be restarted.With this release, you can now continue to use esbuild after calling
stop()
. This will restart esbuild's API and means that you will need to callstop()
again for Deno to be able to exit. This feature was contributed by @lucacasonato.Fix code splitting edge case (#1252)
This release fixes an edge case where bundling with code splitting enabled generated incorrect code if multiple ESM entry points re-exported the same re-exported symbol from a CommonJS file. In this case the cross-chunk symbol dependency should be the variable that holds the return value from the
require()
call instead of the original ESM namedimport
clause item. When this bug occurred, the generated ESM code contained an export and import for a symbol that didn't exist, which caused a module initialization error. This case should now work correctly.Fix code generation with
declare
class fields (#1242)This fixes a bug with TypeScript code that uses
declare
on a class field and yourtsconfig.json
file has"useDefineForClassFields": true
. Fields marked asdeclare
should not be defined in the generated code, but they were incorrectly being declared asundefined
. These fields are now correctly omitted from the generated code.Annotate module wrapper functions in debug builds (#1236)
Sometimes esbuild needs to wrap certain modules in a function when bundling. This is done both for lazy evaluation and for CommonJS modules that use a top-level
return
statement. Previously these functions were all anonymous, so stack traces for errors thrown during initialization looked like this:This release adds names to these anonymous functions when minification is disabled. The above stack trace now looks like this:
This is similar to Webpack's development-mode behavior:
These descriptive function names will additionally be available when using a profiler such as the one included in the "Performance" tab in Chrome Developer Tools. Previously all functions were named
(anonymous)
which made it difficult to investigate performance issues during bundle initialization.Add CSS minification for more cases
The following CSS minification cases are now supported:
The CSS
margin
property family is now minified including combining themargin-top
,margin-right
,margin-bottom
, andmargin-left
properties into a singlemargin
property.The CSS
padding
property family is now minified including combining thepadding-top
,padding-right
,padding-bottom
, andpadding-left
properties into a singlepadding
property.The CSS
border-radius
property family is now minified including combining theborder-top-left-radius
,border-top-right-radius
,border-bottom-right-radius
, andborder-bottom-left-radius
properties into a singleborder-radius
property.The four special pseudo-elements
::before
,::after
,::first-line
, and::first-letter
are allowed to be parsed with one:
for legacy reasons, so the::
is now converted to:
for these pseudo-elements.Duplicate CSS rules are now deduplicated. Only the last rule is kept, since that's the only one that has any effect. This applies for both top-level rules and nested rules.
Preserve quotes around properties when minification is disabled (#1251)
Previously the parser did not distinguish between unquoted and quoted properties, since there is no semantic difference. However, some tools such as Google Closure Compiler with "advanced mode" enabled attach their own semantic meaning to quoted properties, and processing code intended for Google Closure Compiler's advanced mode with esbuild was changing those semantics. The distinction between unquoted and quoted properties is now made in the following cases:
The parser will now preserve the quoted properties in these cases as long as
--minify-syntax
is not enabled. This does not mean that esbuild is officially supporting Google Closure Compiler's advanced mode, just that quoted properties are now preserved when the AST is pretty-printed. Google Closure Compiler's advanced mode accepts a language that shares syntax with JavaScript but that deviates from JavaScript semantics and there could potentially be other situations where preprocessing code intended for Google Closure Compiler's advanced mode with esbuild first causes it to break. If that happens, that is not a bug with esbuild.v0.11.18
Compare Source
Add support for OpenBSD on x86-64 (#1235)
Someone has asked for OpenBSD to be supported on x86-64. It should now be supported starting with this release.
Fix an incorrect warning about top-level
this
This was introduced in the previous release, and happens when using a top-level
async
arrow function with a compilation target that doesn't support it. The reason is that doing this generates a shim that preserves the value ofthis
. However, this warning message is confusing because there is not necessarily anythis
present in the source code. The warning message has been removed in this case. Now it should only show up ifthis
is actually present in the source code.v0.11.17
Compare Source
Fix building with a large
stdin
string with Deno (#1219)When I did the initial port of esbuild's node-based API to Deno, I didn't realize that Deno's
write(bytes)
function doesn't actually write the provided bytes. Instead it may only write some of those bytes and needs to be repeatedly called again until it writes everything. This meant that calling esbuild's Deno-based API could hang if the API request was large enough, which can happen in practice when using thestdin
string feature. Thewrite
API is now called in a loop so these hangs in Deno should now be fixed.Add a warning about replacing
this
withundefined
in ESM code (#1225)There is existing JavaScript code that sometimes references top-level
this
as a way to access the global scope. However, top-levelthis
is actually specified to beundefined
inside of ECMAScript module code, which makes referencing top-levelthis
inside ESM code useless. This issue can come up when the existing JavaScript code is adapted for ESM by addingimport
and/orexport
. All top-level references tothis
are replaced withundefined
when bundling to make sure ECMAScript module behavior is emulated correctly regardless of the environment in which the resulting code is run.With this release, esbuild will now warn about this when bundling:
This warning is not unique to esbuild. Rollup also already has a similar warning:
Allow a string literal as a JSX fragment (#1217)
TypeScript's JSX implementation allows you to configure a custom JSX factory and a custom JSX fragment, but requires that they are both valid JavaScript identifier member expression chains. Since esbuild's JSX implementation is based on TypeScript, esbuild has the same requirement. So
React.createElement
is a valid JSX factory value but['React', 'createElement']
is not.However, the Mithril framework has decided to use
"["
as a JSX fragment, which is not a valid JavaScript identifier member expression chain. This meant that using Mithril with esbuild required a workaround. In this release, esbuild now lets you use a string literal as a custom JSX fragment. It should now be easier to use esbuild's JSX implementation with libraries such as Mithril.Fix
metafile
inonEnd
withwatch
mode enabled (#1186)This release fixes a bug where the
metafile
property was incorrectly undefined inside pluginonEnd
callbacks ifwatch
mode is enabled for all builds after the first build. Themetafile
property was accidentally being set after callingonEnd
instead of before.v0.11.16
Compare Source
Fix TypeScript
enum
edge case (#1198)In TypeScript, you can reference the inner closure variable in an
enum
within the inner closure by name:The TypeScript compiler generates the following code for this case:
However, TypeScript also lets you declare an
enum
value with the same name as the inner closure variable. In that case, the value "shadows" the declaration of the inner closure variable:The TypeScript compiler generates the following code for this case:
Previously esbuild reported a duplicate variable declaration error in the second case due to the collision between the
enum
value and the inner closure variable with the same name. With this release, the shadowing is now handled correctly.Parse the
@-moz-document
CSS rule (#1203)This feature has been removed from the web because it's actively harmful, at least according to this discussion. However, there is one exception where
@-moz-document url-prefix() {
is accepted by Firefox to basically be an "if Firefox" conditional rule. Because of this, esbuild now parses the@-moz-document
CSS rule. This should result in better pretty-printing and minification and no more warning when this rule is used.Fix syntax error in TypeScript-specific speculative arrow function parsing (#1211)
Because of grammar ambiguities, expressions that start with a parenthesis are parsed using what's called a "cover grammar" that is a super-position of both a parenthesized expression and an arrow function parameter list. In JavaScript, the cover grammar is unambiguously an arrow function if and only if the following token is a
=>
token.But in TypeScript, the expression is still ambiguously a parenthesized expression or an arrow function if the following token is a
:
since it may be the second half of the?:
operator or a return type annotation. This requires speculatively attempting to reduce the cover grammar to an arrow function parameter list.However, when doing this esbuild eagerly reported an error if a default argument was encountered and the target is
es5
(esbuild doesn't support lowering default arguments to ES5). This is problematic in the following TypeScript code since the parenthesized code turns out to not be an arrow function parameter list:Previously this code incorrectly generated an error since
hover = 2
was incorrectly eagerly validated as a default argument. With this release, the reporting of the default argument error when targetinges5
is now done lazily and only when it's determined that the parenthesized code should actually be interpreted as an arrow function parameter list.Further changes to the behavior of the
browser
field (#1209)This release includes some changes to how the
browser
field inpackage.json
is interpreted to better match how Browserify, Webpack, Parcel, and Rollup behave. The interpretation of this map in esbuild is intended to be applied if and only if it's applied by any one of these bundlers. However, there were some cases where esbuild applied the mapping and none of the other bundlers did, which could lead to build failures. These cases have been added to my growing list ofbrowser
field test cases and esbuild's behavior should now be consistent with other bundlers again.Avoid placing a
super()
call inside areturn
statement (#1208)When minification is enabled, an expression followed by a return statement (e.g.
a(); return b
) is merged into a single statement (e.g.return a(), b
). This is done because it sometimes results in smaller code. If the return statement is the only statement in a block and the block is in a single-statement context, the block can be removed which saves a few characters.Previously esbuild applied this rule to calls to
super()
inside of constructors. Doing that broke esbuild's class lowering transform that tries to insert class field initializers after thesuper()
call. This transform isn't robust and only scans the top-level statement list inside the constructor, so inserting thesuper()
call inside of thereturn
statement means class field initializers were inserted before thesuper()
call instead of after. This could lead to run-time crashes due to initialization failure.With this release, top-level calls to
super()
will no longer be placed insidereturn
statements (in addition to various other kinds of statements such asthrow
, which are now also handled). This should avoid class field initializers being inserted before thesuper()
call.Fix a bug with
onEnd
and watch mode (#1186)This release fixes a bug where
onEnd
plugin callbacks only worked with watch mode when anonRebuild
watch mode callback was present. NowonEnd
callbacks should fire even if there is noonRebuild
callback.Fix an edge case with minified export names and code splitting (#1201)
The names of symbols imported from other chunks were previously not considered for renaming during minified name assignment. This could cause a syntax error due to a name collision when two symbols have the same original name. This was just an oversight and has been fixed, so symbols imported from other chunks should now be renamed when minification is enabled.
Provide a friendly error message when you forget
async
(#1216)If the parser hits a parse error inside a non-asynchronous function or arrow expression and the previous token is
await
, esbuild will now report a friendly error about a missingasync
keyword instead of reporting the parse error. This behavior matches other JavaScript parsers including TypeScript, Babel, and V8.The previous error looked like this:
The error now looks like this:
v0.11.15
Compare Source
Provide options for how to handle legal comments (#919)
A "legal comment" is considered to be any comment that contains
@license
or@preserve
or that starts with//!
or/*!
. These comments are preserved in output files by esbuild since that follows the intent of the original authors of the code.However, some people want to remove the automatically-generated license information before they distribute their code. To facilitate this, esbuild now provides several options for how to handle legal comments (via
--legal-comments=
in the CLI andlegalComments
in the JS API):none
: Do not preserve any legal commentsinline
: Preserve all statement-level legal commentseof
: Move all statement-level legal comments to the end of the filelinked
: Move all statement-level legal comments to a.LEGAL.txt
file and link to them with a commentexternal
: Move all statement-level legal comments to a.LEGAL.txt
file but to not link to themThe default behavior is
eof
when bundling andinline
otherwise.Add
onStart
andonEnd
callbacks to the plugin APIPlugins can now register callbacks to run when a build is started and ended:
One benefit of
onStart
andonEnd
is that they are run for all builds including rebuilds (relevant for incremental mode, watch mode, or serve mode), so they should be a good place to do work related to the build lifecycle.More details:
build.onStart()
You should not use an
onStart
callback for initialization since it can be run multiple times. If you want to initialize something, just put your plugin initialization code directly inside thesetup
function instead.The
onStart
callback can beasync
and can return a promise. However, the build does not wait for the promise to be resolved before starting, so a slowonStart
callback will not necessarily slow down the build. AllonStart
callbacks are also run concurrently, not consecutively. The returned promise is purely for error reporting, and matters when theonStart
callback needs to do an asynchronous operation that may fail. If your plugin needs to wait for an asynchronous task inonStart
to complete before anyonResolve
oronLoad
callbacks are run, you will need to have youronResolve
oronLoad
callbacks block on that task fromonStart
.Note that
onStart
callbacks do not have the ability to mutatebuild.initialOptions
. The initial options can only be modified within thesetup
function and are consumed once thesetup
function returns. All rebuilds use the same initial options so the initial options are never re-consumed, and modifications tobuild.initialOptions
that are done withinonStart
are ignored.build.onEnd()
All
onEnd
callbacks are run in serial and each callback is given access to the final build result. It can modify the build result before returning and can delay the end of the build by returning a promise. If you want to be able to inspect the build graph, you should setbuild.initialOptions.metafile = true
and the build graph will be returned as themetafile
property on the build result object.v0.11.14
Compare Source
Implement arbitrary module namespace identifiers
This introduces new JavaScript syntax:
The proposal for this feature appears to not be going through the regular TC39 process. It is being done as a subtle direct pull request instead. It seems appropriate for esbuild to support this feature since it has been implemented in V8 and has now shipped in Chrome 90 and node 16.
According to the proposal, this feature is intended to improve interop with non-JavaScript languages which use exports that aren't valid JavaScript identifiers such as
Foo::~Foo
. In particular, WebAssembly allows any valid UTF-8 string as to be used as an export alias.This feature was actually already partially possible in previous versions of JavaScript via the computed property syntax:
However, doing this is very un-ergonomic and exporting something as an arbitrary name is impossible outside of
export * from
. So this proposal is designed to fully fill out the possibility matrix and make arbitrary alias names a proper first-class feature.Implement more accurate
sideEffects
behavior from Webpack (#1184)This release adds support for the implicit
**/
prefix that must be added to paths in thesideEffects
array inpackage.json
if the path does not contain/
. Another way of saying this is ifpackage.json
contains asideEffects
array with a string that doesn't contain a/
then it should be treated as a file name instead of a path. Previously esbuild treated all strings in this array as paths, which does not match how Webpack behaves. The result of this meant that esbuild could consider files to have no side effects while Webpack would consider the same files to have side effects. This bug should now be fixed.v0.11.13
Compare Source
Implement ergonomic brand checks for private fields
This introduces new JavaScript syntax:
The TC39 proposal for this feature is currently at stage 3 but has already been shipped in Chrome 91 and has also landed in Firefox. It seems reasonably inevitable given that it's already shipping and that it's a very simple feature, so it seems appropriate to add this feature to esbuild.
Add the
--allow-overwrite
flag (#1152)This is a new flag that allows output files to overwrite input files. It's not enabled by default because doing so means overwriting your source code, which can lead to data loss if your code is not checked in. But supporting this makes certain workflows easier by avoiding the need for a temporary directory so doing this is now supported.
Minify property accesses on object literals (#1166)
The code
{a: {b: 1}}.a.b
will now be minified to1
. This optimization is relatively complex and hard to do safely. Here are some tricky cases that are correctly handled:Improve arrow function parsing edge cases
There are now more situations where arrow expressions are not allowed. This improves esbuild's alignment with the JavaScript specification. Some examples of cases that were previously allowed but that are now no longer allowed:
v0.11.12
Compare Source
Fix a bug where
-0
and0
were collapsed to the same value (#1159)Previously esbuild would collapse
Object.is(x ? 0 : -0, -0)
intoObject.is((x, 0), -0)
during minification, which is incorrect. The IEEE floating-point value-0
is a different bit pattern than0
and while they both compare equal, the difference is detectable in a few scenarios such as when usingObject.is()
. The minification transformation now checks for-0
vs.0
and no longer has this bug. This fix was contributed by @rtsao.Match the TypeScript compiler's output in a strange edge case (#1158)
With this release, esbuild's TypeScript-to-JavaScript transform will no longer omit the namespace in this case:
This was previously omitted because TypeScript omits empty namespaces, and the namespace was considered empty because the
export declare function
statement isn't "real":The TypeScript compiler compiles the above code into the following:
Notice how
Something.Print
is never called, and what appears to be a reference to thePrint
symbol on the namespaceSomething
is actually a reference to the global variablePrint
. I can only assume this is a bug in TypeScript, but it's important to replicate this behavior inside esbuild for TypeScript compatibility.The TypeScript-to-JavaScript transform in esbuild has been updated to match the TypeScript compiler's output in both of these cases.
Separate the
debug
log level intodebug
andverbose
You can now use
--log-level=debug
to get some additional information that might indicate some problems with your build, but that has a high-enough false-positive rate that it isn't appropriate for warnings, which are on by default. Enabling thedebug
log level no longer generates a torrent of debug information like it did in the past; that behavior is now reserved for theverbose
log level instead.v0.11.11
Compare Source
Initial support for Deno (#936)
You can now use esbuild in the Deno JavaScript environment via esbuild's official Deno package. Using it looks something like this:
It has basically the same API as esbuild's npm package with one addition: you need to call
stop()
when you're done because unlike node, Deno doesn't provide the necessary APIs to allow Deno to exit while esbuild's internal child process is still running.Remove warnings about non-bundled use of
require
andimport
(#1153, #1142, #1132, #1045, #812, #661, #574, #512, #495, #480, #453, #410, #80)Previously esbuild had warnings when bundling about uses of
require
andimport
that are not of the formrequire(<string literal>)
orimport(<string literal>)
. These warnings existed because the bundling process must be able to statically-analyze all dynamic imports to determine which files must be included. Here are some real-world examples of cases that esbuild doesn't statically analyze:From
mongoose
:From
moment
:From
logform
:All of these dynamic imports will not be bundled (i.e. they will be left as-is) and will crash at run-time if they are evaluated. Some of these crashes are ok since the code paths may have error handling or the code paths may never be used. Other crashes are not ok because the crash will actually be hit.
The warning from esbuild existed to let you know that esbuild is aware that it's generating a potentially broken bundle. If you discover that your bundle is broken, it's nice to have a warning from esbuild to point out where the problem is. And it was just a warning so the build process still finishes and successfully generates output files. If you didn't want to see the warning, it was easy to turn it off via
--log-level=error
.However, there have been quite a few complaints about this warning. Some people seem to not understand the difference between a warning and an error, and think the build has failed even though output files were generated. Other people do not want to see the warning but also do not want to enable
--log-level=error
.This release removes this warning for both
require
andimport
. Now when you try to bundle code with esbuild that contains dynamic imports not of the formrequire(<string literal>)
orimport(<string literal>)
, esbuild will just silently generate a potentially broken bundle. This may affect people coming from other bundlers that support certain forms of dynamic imports that are not compatible with esbuild such as the Webpack-specific dynamicimport()
with pattern matching.v0.11.10
Compare Source
Provide more information about
exports
map import failures if possible (#1143)Node has a new feature where you can add an
exports
map to yourpackage.json
file to control how external import paths map to the files in your package. You can change which paths map to which files as well as make it impossible to import certain files (i.e. the files are private).If path resolution fails due to an
exports
map and the failure is not related to import conditions, esbuild's current error message for this just says that the import isn't possible:This error message matches the error that node itself throws. However, the message could be improved in the case where someone is trying to import a file using its file system path and that path is actually exported by the package, just under a different export path. This case comes up a lot when using TypeScript because the TypeScript compiler (and therefore the Visual Studio Code IDE) still doesn't support package
exports
.With this release, esbuild will now do a reverse lookup of the file system path using the
exports
map to determine what the correct import path should be:Hopefully this should enable people encountering this issue to fix the problem themselves.
v0.11.9
Compare Source
Fix escaping of non-BMP characters in property names (#977)
Property names in object literals do not have to be quoted if the property is a valid JavaScript identifier. This is defined as starting with a character in the
ID_Start
Unicode category and ending with zero or more characters in theID_Continue
Unicode category. However, esbuild had a bug where non-BMP characters (i.e. characters encoded using two UTF-16 code units instead of one) were always checked againstID_Continue
instead ofID_Start
because they included a code unit that wasn't at the start. This could result in invalid JavaScript being generated when using--charset=utf8
becauseID_Continue
is a superset ofID_Start
and contains some characters that are not valid at the start of an identifier. This bug has been fixed.Be maximally liberal in the interpretation of the
browser
field (#740)The
browser
field inpackage.json
is an informal convention followed by browser-specific bundlers that allows package authors to substitute certain node-specific import paths with alternative browser-specific import paths. It doesn't have a rigorous specification and the canonical description of the feature doesn't include any tests. As a result, each bundler implements this feature differently. I have tried to create a survey of how different bundlers interpret thebrowser
field and the results are very inconsistent.This release attempts to change esbuild to support the union of the behavior of all other bundlers. That way if people have the
browser
field working with some other bundler and they switch to esbuild, thebrowser
field shouldn't ever suddenly stop working. This seemed like the most principled approach to take in this situation.The drawback of this approach is that it means the
browser
field may start working when switching to esbuild when it was previously not working. This could cause bugs, but I consider this to be a problem with the package (i.e. not using a more well-supported form of thebrowser
field), not a problem with esbuild itself.v0.11.8
Compare Source
Fix hash calculation for code splitting and dynamic imports (#1076)
The hash included in the file name of each output file is intended to change if and only if anything relevant to the content of that output file changes. It includes:
The contents of the file with the paths of other output files omitted
The output path of the file the final hash omitted
Some information about the input files involved in that output file
The contents of the associated source map, if there is one
All of the information above for all transitive dependencies found by following
import
statementsHowever, this didn't include dynamic
import()
expressions due to an oversight. With this release, dynamicimport()
expressions are now also counted as transitive dependencies. This fixes an issue where the content of an output file could change without its hash also changing. As a side effect of this change, dynamic imports inside output files of other output files are now listed in the metadata file if themetafile
setting is enabled.Refactor the internal module graph representation
This release changes a large amount of code relating to esbuild's internal module graph. The changes are mostly organizational and help consolidate most of the logic around maintaining various module graph invariants into a separate file where it's easier to audit. The Go language doesn't have great abstraction capabilities (e.g. no zero-cost iterators) so the enforcement of this new abstraction is unfortunately done by convention instead of by the compiler, and there is currently still some code that bypasses the abstraction. But it's better than it was before.
Another relevant change was moving a number of special cases that happened during the tree shaking traversal into the graph itself instead. Previously there were quite a few implicit dependency rules that were checked in specific places, which was hard to follow. Encoding these special case constraints into the graph itself makes the problem easier to reason about and should hopefully make the code more regular and robust.
Finally, this set of changes brings back full support for the
sideEffects
annotation inpackage.json
. It was previously disabled when code splitting was active as a temporary measure due to the discovery of some bugs in that scenario. But I believe these bugs have been resolved now that tree shaking and code splitting are done in separate passes (see the previous release for more information).v0.11.7
Compare Source
Fix incorrect chunk reference with code splitting, css, and dynamic imports (#1125)
This release fixes a bug where when you use code splitting, CSS imports in JS, and dynamic imports all combined, the dynamic import incorrectly references the sibling CSS chunk for the dynamic import instead of the primary JS chunk. In this scenario the entry point file corresponds to two different output chunks (one for CSS and one for JS) and the wrong chunk was being picked. This bug has been fixed.
Split apart tree shaking and code splitting (#1123)
The original code splitting algorithm allowed for files to be split apart and for different parts of the same file to end up in different chunks based on which entry points needed which parts. This was done at the same time as tree shaking by essentially performing tree shaking multiple times, once per entry point, and tracking which entry points each file part is live in. Each file part that is live in at least one entry point was then assigned to a code splitting chunk with all of the other code that is live in the same set of entry points. This ensures that entry points only import code that they will use (i.e. no code will be downloaded by an entry point that is guaranteed to not be used).
This file-splitting feature has been removed because it doesn't work well with the recently-added top-level await JavaScript syntax, which has complex evaluation order rules that operate at file boundaries. File parts now have a single boolean flag for whether they are live or not instead of a set of flags that track which entry points that part is reachable from (reachability is still tracked at the file level).
However, this change appears to have introduced some subtly incorrect behavior with code splitting because there is now an implicit dependency in the import graph between adjacent parts within the same file even if the two parts are unrelated and don't reference each other. This is due to the fact each entry point that references one part pulls in the file (but not the whole file, only the parts that are live in at least one entry point). So liveness must be fully computed first before code splitting is computed.
This release splits apart tree shaking and code splitting into two separate passes, which fixes certain cases where two generated code splitting chunks ended up each importing symbols from the other and causing a cycle. There should hopefully no longer be cycles in generated code splitting chunks.
Make
this
work in static class fields in TypeScript filesCurrently
this
is mis-compiled in static fields in TypeScript files if theuseDefineForClassFields
setting intsconfig.json
isfalse
(the default value):This is currently compiled into the code below, which is incorrect because it changes the value of
this
(it's supposed to refer toFoo
):This was an intentionally unhandled case because the TypeScript compiler doesn't handle this either (esbuild's currently incorrect output matches the output from the TypeScript compiler, which is also currently incorrect). However, the TypeScript compiler might fix their output at some point in which case esbuild's behavior would become problematic.
So this release now generates the correct output:
Presumably the TypeScript compiler will be fixed to also generate something like this in the future. If you're wondering why esbuild generates the extra
_Foo
variable, it's defensive code to handle the possibility of the class being reassigned, since class declarations are not constants:We can't just move the initializer containing
Foo.foo
outside of the class body because in JavaScript, the class name is shadowed inside the class body by a special hidden constant that is equal to the class object. Even if the class is reassigned later, references to that shadowing symbol within the class body should still refer to the original class object.Various fixes for private class members (#1131)
This release fixes multiple issues with esbuild's handling of the
#private
syntax. Previously there could be scenarios where references tothis.#private
could be moved outside of the class body, which would cause them to become invalid (since the#private
name is only available within the class body). One such case is when TypeScript'suseDefineForClassFields
setting has the valuefalse
(which is the default value), which causes class field initializers to be replaced with assignment expressions to avoid using "define" semantics:Previously this was turned into the following code, which is incorrect because
Foo.#foo
was moved outside of the class body:This is now handled by converting the private field syntax into normal JavaScript that emulates it with a
WeakMap
instead.This conversion is fairly conservative to make sure certain edge cases are covered, so this release may unfortunately convert more private fields than previous releases, even when the target is
esnext
. It should be possible to improve this transformation in future releases so that this happens less often while still preserving correctness.v0.11.6
Compare Source
Fix an incorrect minification transformation (#1121)
This release removes an incorrect substitution rule in esbuild's peephole optimizer, which is run when minification is enabled. The incorrect rule transformed
if(a && falsy)
intoif(a, falsy)
which is equivalent iffalsy
has no side effects (such as the literalfalse
). However, the rule didn't check that the expression is side-effect free first which could result in miscompiled code. I have removed the rule instead of modifying it to check for the lack of side effects first because while the code is slightly smaller, it may also be more expensive at run-time which is undesirable. The size savings are also very insignificant.Change how
NODE_PATH
works to match node (#1117)Node searches for packages in nearby
node_modules
directories, but it also allows you to inject extra directories to search for packages in using theNODE_PATH
environment variable. This is supported when using esbuild's CLI as well as via thenodePaths
option when using esbuild's API.Node's module resolution algorithm is well-documented, and esbuild's path resolution is designed to follow it. The full algorithm is here: https://nodejs.org/api/modules.html#modules_all_together. However, it appears that the documented algorithm is incorrect with regard to
NODE_PATH
. The documentation saysNODE_PATH
directories should take precedence overnode_modules
directories, and so that's how esbuild worked. However, in practice node actually does it the other way around.Starting with this release, esbuild will now allow
node_modules
directories to take precedence overNODE_PATH
directories. This is a deviation from the published algorithm.Provide a better error message for incorrectly-quoted JSX attributes (#959, #1115)
People sometimes try to use the output of
JSON.stringify()
as a JSX attribute when automatically-generating JSX code. Doing so is incorrect because JSX strings work like XML instead of like JS (since JSX is XML-in-JS). Specifically, using a backslash before a quote does not cause it to be escaped:It's not just esbuild; Babel and TypeScript also treat this as a syntax error. All of these JSX parsers are just following the JSX specification. This has come up twice now so it could be worth having a dedicated error message. Previously esbuild had a generic syntax error like this:
Now esbuild will provide more information if it detects this case:
v0.11.5
Compare Source
Add support for the
override
keyword in TypeScript 4.3 (#1105)The latest version of TypeScript (now in beta) adds a new keyword called
override
that can be used on class members. You can read more about this feature in Microsoft's blog post about TypeScript 4.3. It looks like this:With this release, esbuild will now ignore the
override
keyword when parsing TypeScript code instead of treating this keyword as a syntax error, which means esbuild can now support TypeScript 4.3 syntax. This change was contributed by @g-plane.Allow
async
pluginsetup
functionsWith this release, you can now return a promise from your plugin's
setup
function to delay the start of the build:This is useful if your plugin needs to do something asynchronous before the build starts. For example, you may need some asynchronous information before modifying the
initialOptions
object, which must be done before the build starts for the modifications to take effect.Add some optimizations around hashing
This release contains two optimizations to the hashes used in output file names:
Hash generation now happens in parallel with other work, and other work only blocks on the hash computation if the hash ends up being needed (which is only if
[hash]
is included in--entry-names=
, and potentially--chunk-names=
if it's relevant). This is a performance improvement because--entry-names=
does not include[hash]
in the default case, so bundling time no longer always includes hashing time.The hashing algorithm has been changed from SHA1 to xxHash (specifically this Go implementation) which means the hashing step is around 6x faster than before. Thanks to @Jarred-Sumner for the suggestion.
Disable tree shaking annotations when code splitting is active (#1070, #1081)
Support for Webpack's
"sideEffects": false
annotation inpackage.json
is now disabled when code splitting is enabled and there is more than one entryConfiguration
📅 Schedule: "after 12am every weekday" in timezone America/Los_Angeles.
🚦 Automerge: Enabled.
♻️ Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.