@gjsify/resolve-npm 0.64.3-next.258 → 0.64.3-next.260

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -43,6 +43,7 @@ export const GJS_GLOBALS_GROUPS = {
43
43
  'navigator',
44
44
  ],
45
45
  web: [
46
+ 'self',
46
47
  'fetch',
47
48
  'Headers',
48
49
  'Request',
@@ -166,6 +167,14 @@ export const GJS_GLOBALS_MAP = {
166
167
  // --- FormData ----------------------------------------------------------
167
168
  FormData: '@gjsify/web-globals/register/formdata',
168
169
 
170
+ // --- self --------------------------------------------------------------
171
+ // GJS defines `window` as an alias of the global but not `self`, the other half of the same
172
+ // web-platform identity. A UMD bundle built with webpack's `globalObject: 'self'` reads it
173
+ // with no guard (`}(self, …)`, e.g. joi's browser build) and dies at import. A register, not
174
+ // a define: a define would flip every `typeof self` guard in the bundle and would rewrite the
175
+ // target of a bare `self = …` (see the register's own note and ADR 0079).
176
+ self: '@gjsify/web-globals/register/self',
177
+
169
178
  // --- WHATWG Streams (granular register subpaths) ------------------------
170
179
  ReadableStream: 'web-streams/register/readable',
171
180
  ReadableStreamBYOBReader: 'web-streams/register/readable',
@@ -400,6 +409,7 @@ export const GJS_GI_BACKED_REGISTERS = {
400
409
  */
401
410
  export const BROWSER_NATIVE_IDENTS = new Set([
402
411
  // Web group — all browser-native
412
+ 'self',
403
413
  'fetch',
404
414
  'Headers',
405
415
  'Request',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/resolve-npm",
3
- "version": "0.64.3-next.258",
3
+ "version": "0.64.3-next.260",
4
4
  "description": "Resolve NPM package aliases",
5
5
  "type": "module",
6
6
  "main": "lib/index.mjs",
@@ -44,5 +44,5 @@
44
44
  "gjsify": {
45
45
  "tier": 1
46
46
  },
47
- "gitHead": "6d2fc430ffaa180a765c59d33c8fa1d5b410b364"
47
+ "gitHead": "886de21be840429ce043cdbf8195172530e230d4"
48
48
  }