WordPress/gutenberg

Update and de-duplicate Caniuse data routinely, at least for releases

開放

#33,344 建立於 2021年7月11日

 (18 則留言) (2 個反應) (0 位負責人)JavaScript (3,893 個分叉)batch import
Good First IssueNeeds Dev[Type] Build Toolingnpm Packages

倉庫指標

星標
 (9,607 顆星)
PR 合併指標
 (平均合併 12天 18小時) (30 天內合併 509 個 PR)

描述

What problem does this address?

Currently Caniuse Data is apparently not updated and de-duplicated routinely which can lead to multiple different versions of the data being used across different dependencies:

See for example the current version for WordPress 5.7:

https://github.com/WordPress/gutenberg/blob/wp/5.7/package-lock.json https://github.com/WordPress/gutenberg/blob/bc1c2608b705f479f95c4fa1ade52fd8ad30e0fe/package-lock.json

(Unfortunately I can't link to the exact line due to the size of the file but if you search for the exact string "caniuse-lite": { inside https://raw.githubusercontent.com/WordPress/gutenberg/bc1c2608b705f479f95c4fa1ade52fd8ad30e0fe/package-lock.json you'll see that 4 different versions of the caniuse-lite data are used)

Among other things this makes it hard to do things like do isolated rebuilds of block CSS.

In any case doing this is also what the browserslist package recommends.

What is your proposed solution?

  • Either integrate automated runs of npx browserslist@latest --update-db into the build process.
  • Or do something similar that doesn't update but only de-duplicates caniuse-lite based on the above browserslist script.

In any case there should only ever be one specific version of caniuse-lite used across all packages at all time.

貢獻者指南