-
Notifications
You must be signed in to change notification settings - Fork 472
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
Nullish coalescing operator (??) in dist in 8.18.0 #1169
Comments
It seems to be related to last kcd-scripts updates. Could @kentcdodds check it? |
refer testing-library/dom-testing-library#1169 (cherry picked from commit 40f6a34)
@kentcdodds This is quite important, probably breaking the build of a lot of people... |
@rmoralp @sneridagh It can't be because the latest changes in dom-testing-library/package.json Line 59 in ab8182c
|
It's because of Cypress... no kcd-scripts involved... |
Since I can't assign this ticket to a team, I'll ping @testing-library/dom to look into this |
I'm on it. Will pin kcd-scripts. Future updates to tooling need a more thorough audit |
@MichaelDeBoey @eps1lon The culprit is in |
@eps1lon Pinning |
That is not the culprit. The culprit is that we introduced syntax (nullish coalescing) in a minor release. However, we still support Node.js 12 which does not support nullish coalescing. The minor release should've been a major release with a proper changelog (drop support for Node.js 12). |
We need to pin some build dependency. But we do need to pin since previous releases did produce correct builds. But since we have no lockfile, a new build used newer build tooling that no longer compiled away nullish coalescing. kcd-scripts is the start point of that depencency tree that needs to be pinned since it's responsible for bundling. |
@eps1lon +1, I meant my culprit, what caused my projects to fail :) |
@eps1lon I double checked, and our builds run on 16: And failed anyways... clueless about what could it be. For reference: |
oh, of course it does not run on Node... is webpack cypress who tries to load it. |
We previously always transpiled targetting whatever Browserlist returned in its default preset. However, this is a pretty weak API contract to have. I'm pinning the supported versions to the ones returned by the default preset used in 8.17.x (last known good release) + Node.js 12 (since kcd-scripts mistakes the |
🎉 This fix is included in version 8.18.1 🎉: https://unpkg.com/browse/@testing-library/[email protected]/dist/@testing-library/dom.esm.js The release is available on: |
Thanks a lot @eps1lon ! |
I can confirm it works now without pinning. |
…18181) * perf: initialise field map when initialising meta (cherry picked from commit df8399f) * perf: simpler, faster meta cache (cherry picked from commit 6c6a969) * fix: ensure error is thrown (cherry picked from commit b529c27) * refactor: drop _allow_dict support This is not required anymore since we store full doc anyway. Also since they share same cache key calling get_cached_value and get_cached_doc can end up doing duplicate / double work. (cherry picked from commit abd0187) * fix: pickle doc objects directly This seems to be missed out and causes performance regression in IRL usage when get_doc is called on cached doc already. (cherry picked from commit bcb5fe9) * test: basic perf test for rps on get_list (cherry picked from commit c28ddcc) * build: pin testing-library/dom temporarily refer testing-library/dom-testing-library#1169 (cherry picked from commit 40f6a34) * chore: semantic changes to document caching code * fix: drop Meta cache during update Revert "fix: drop Meta cache during update" (#18186) * Revert "fix: drop Meta cache during update (#18182)" This reverts commit 656f6df. * fix: replace meta cache keys Old keys stored different types of data `dict` changing key to indicate change in type. * perf: cache `FormMeta` directly (#18165) * perf: cache `FormMeta` directly * perf: check if `dt` is table, use `db.get_value` instead of `get_all` Co-authored-by: Sagar Vora <[email protected]> Co-authored-by: Ankush Menat <[email protected]>
…8164) (frappe#18181) * perf: initialise field map when initialising meta (cherry picked from commit df8399f) * perf: simpler, faster meta cache (cherry picked from commit 6c6a969) * fix: ensure error is thrown (cherry picked from commit b529c27) * refactor: drop _allow_dict support This is not required anymore since we store full doc anyway. Also since they share same cache key calling get_cached_value and get_cached_doc can end up doing duplicate / double work. (cherry picked from commit abd0187) * fix: pickle doc objects directly This seems to be missed out and causes performance regression in IRL usage when get_doc is called on cached doc already. (cherry picked from commit bcb5fe9) * test: basic perf test for rps on get_list (cherry picked from commit c28ddcc) * build: pin testing-library/dom temporarily refer testing-library/dom-testing-library#1169 (cherry picked from commit 40f6a34) * chore: semantic changes to document caching code * fix: drop Meta cache during update Revert "fix: drop Meta cache during update" (frappe#18186) * Revert "fix: drop Meta cache during update (frappe#18182)" This reverts commit 656f6df. * fix: replace meta cache keys Old keys stored different types of data `dict` changing key to indicate change in type. * perf: cache `FormMeta` directly (frappe#18165) * perf: cache `FormMeta` directly * perf: check if `dt` is table, use `db.get_value` instead of `get_all` Co-authored-by: Sagar Vora <[email protected]> Co-authored-by: Ankush Menat <[email protected]>
…8164) (frappe#18181) * perf: initialise field map when initialising meta (cherry picked from commit df8399f) * perf: simpler, faster meta cache (cherry picked from commit 6c6a969) * fix: ensure error is thrown (cherry picked from commit b529c27) * refactor: drop _allow_dict support This is not required anymore since we store full doc anyway. Also since they share same cache key calling get_cached_value and get_cached_doc can end up doing duplicate / double work. (cherry picked from commit abd0187) * fix: pickle doc objects directly This seems to be missed out and causes performance regression in IRL usage when get_doc is called on cached doc already. (cherry picked from commit bcb5fe9) * test: basic perf test for rps on get_list (cherry picked from commit c28ddcc) * build: pin testing-library/dom temporarily refer testing-library/dom-testing-library#1169 (cherry picked from commit 40f6a34) * chore: semantic changes to document caching code * fix: drop Meta cache during update Revert "fix: drop Meta cache during update" (frappe#18186) * Revert "fix: drop Meta cache during update (frappe#18182)" This reverts commit 656f6df. * fix: replace meta cache keys Old keys stored different types of data `dict` changing key to indicate change in type. * perf: cache `FormMeta` directly (frappe#18165) * perf: cache `FormMeta` directly * perf: check if `dt` is table, use `db.get_value` instead of `get_all` Co-authored-by: Sagar Vora <[email protected]> Co-authored-by: Ankush Menat <[email protected]>
@testing-library/[email protected] has a nullish coalescing operator in the distributed build in the file

dist/@testing-library/dom.esm.js
.This results in only Node.js 14 and up being able to execute this code and in errors in Cypress 9.1.0:
Check here, 8.17.1, lines 409 to 413: https://unpkg.com/browse/@testing-library/[email protected]/dist/@testing-library/dom.esm.js
And in 8.18.0, lines 428 to 430: https://unpkg.com/browse/@testing-library/[email protected]/dist/@testing-library/dom.esm.js
The text was updated successfully, but these errors were encountered: