In registry.ts, globalThis is incorrectly polyfilled, which causes it to choose a different global instead of an already-present globalThis.
Namely, the act of declaring var globalThis shadows the actual globalThis, causing globalThis to be undefined within the IIFE.
This becomes an issue in node.js server-side rendering environments where window is polyfilled, and node's globalThis has different functions than window does.
Suggested fixes:
Rename the variable to something else, or
Just use globalThis without attempting to polyfill. LTS versions of node support it, and versions as far back as v12 (released in 2019).
In [registry.ts](https://git.vdb.to/cerc-io/registry-sdk/src/commit/f93a29785704e8c154a4256e8afd6143a8b7efea/src/proto/cerc/registry/v1/registry.ts#L1165-L1171), globalThis is incorrectly polyfilled, which causes it to choose a different global instead of an already-present `globalThis`.
Namely, the act of declaring `var globalThis` shadows the actual `globalThis`, causing `globalThis` to be undefined within the IIFE.
This becomes an issue in node.js server-side rendering environments where `window` is polyfilled, and node's `globalThis` has different functions than `window` does.
Suggested fixes:
1. Rename the variable to something else, or
2. Just use `globalThis` without attempting to polyfill. LTS versions of node support it, and versions as far back as v12 (released in 2019).
> re-opening b/c this patch needs to be applied to main. cut patch release to unblock progress on snowball
Handled in #25
Included in release [v0.2.7](https://git.vdb.to/cerc-io/registry-sdk/releases/tag/v0.2.7)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
In registry.ts, globalThis is incorrectly polyfilled, which causes it to choose a different global instead of an already-present
globalThis.Namely, the act of declaring
var globalThisshadows the actualglobalThis, causingglobalThisto be undefined within the IIFE.This becomes an issue in node.js server-side rendering environments where
windowis polyfilled, and node'sglobalThishas different functions thanwindowdoes.Suggested fixes:
globalThiswithout attempting to polyfill. LTS versions of node support it, and versions as far back as v12 (released in 2019).See this code example for an illustration of the issue.
re-opening b/c this patch needs to be applied to main. cut patch release to unblock progress on snowball
Handled in #25
Included in release v0.2.7