Skip to content

Polyfill WeakRef #34025

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

Merged
merged 1 commit into from
Mar 26, 2025
Merged

Polyfill WeakRef #34025

merged 1 commit into from
Mar 26, 2025

Conversation

wxiaoguang
Copy link
Contributor

Fix #33407

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 26, 2025
@wxiaoguang
Copy link
Contributor Author

Have tested it:

image

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Mar 26, 2025
@silverwind
Copy link
Member

I compared with https://github.com/jaenster/weakref-pollyfill/blob/master/src/index.js and implementation seems pretty much the same.

@wxiaoguang
Copy link
Contributor Author

wxiaoguang commented Mar 26, 2025

Yes, our code is less that that one because we do not need to handle other environments.

And actually most browsers have builtin WeakRef support, and most polyfill packages are inactive for many years, I just don't want to introduce another stale dependency ......

@silverwind
Copy link
Member

Yeah, no need for a dependency for such simple polyfills.

@wxiaoguang wxiaoguang added the backport/v1.23 This PR should be backported to Gitea 1.23 label Mar 26, 2025
@wxiaoguang wxiaoguang added this to the 1.24.0 milestone Mar 26, 2025
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 26, 2025
@wxiaoguang wxiaoguang merged commit d70be9d into go-gitea:main Mar 26, 2025
26 checks passed
@wxiaoguang wxiaoguang deleted the fix-weakref branch March 26, 2025 15:56
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request Mar 26, 2025
@GiteaBot GiteaBot added the backport/done All backports for this PR have been created label Mar 26, 2025
wxiaoguang added a commit that referenced this pull request Mar 26, 2025
Backport #34025 by wxiaoguang

Fix #33407

Co-authored-by: wxiaoguang <[email protected]>
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 27, 2025
* giteaofficial/main:
  [skip ci] Updated translations via Crowdin
  Download actions job logs from API (go-gitea#33858)
  Fail mirroring more gracefully (go-gitea#34002)
  Fix dropdown module accessing (go-gitea#34026)
  Polyfill WeakRef (go-gitea#34025)
  Fix dropdown delegating and some UI problems (go-gitea#34014)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/done All backports for this PR have been created backport/v1.23 This PR should be backported to Gitea 1.23 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WeakRef usage (not always supported and not recommended)
4 participants