@gjsify/domparser 0.4.31 → 0.4.32
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.
- package/globals.mjs +9 -0
- package/package.json +16 -6
package/globals.mjs
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-exports native DOMParser global for use in browser builds.
|
|
3
|
+
* On any browser, `DOMParser` is a native global.
|
|
4
|
+
*
|
|
5
|
+
* Node has no `DOMParser` native — `@gjsify/domparser`'s `runtimes.node`
|
|
6
|
+
* is "polyfill", so the bundler routes Node-target imports to the package's
|
|
7
|
+
* own polyfill at `lib/esm/index.js` and never reaches this file.
|
|
8
|
+
*/
|
|
9
|
+
export const DOMParser = globalThis.DOMParser;
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/domparser",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.32",
|
|
4
4
|
"description": "DOMParser for GJS — self-contained XML parser with minimal DOM (querySelector, getAttribute, children)",
|
|
5
5
|
"module": "lib/esm/index.js",
|
|
6
6
|
"types": "lib/types/index.d.ts",
|
|
7
7
|
"files": [
|
|
8
|
-
"lib"
|
|
8
|
+
"lib",
|
|
9
|
+
"globals.mjs"
|
|
9
10
|
],
|
|
10
11
|
"type": "module",
|
|
11
12
|
"exports": {
|
|
@@ -16,10 +17,12 @@
|
|
|
16
17
|
"./register": {
|
|
17
18
|
"types": "./lib/types/register.d.ts",
|
|
18
19
|
"default": "./lib/esm/register.js"
|
|
19
|
-
}
|
|
20
|
+
},
|
|
21
|
+
"./globals": "./globals.mjs"
|
|
20
22
|
},
|
|
21
23
|
"sideEffects": [
|
|
22
|
-
"./lib/esm/register.js"
|
|
24
|
+
"./lib/esm/register.js",
|
|
25
|
+
"./globals.mjs"
|
|
23
26
|
],
|
|
24
27
|
"scripts": {
|
|
25
28
|
"clear": "rm -rf lib tsconfig.tsbuildinfo tsconfig.types.tsbuildinfo test.gjs.mjs test.node.mjs || exit 0",
|
|
@@ -43,9 +46,16 @@
|
|
|
43
46
|
"web-api"
|
|
44
47
|
],
|
|
45
48
|
"devDependencies": {
|
|
46
|
-
"@gjsify/cli": "^0.4.
|
|
47
|
-
"@gjsify/unit": "^0.4.
|
|
49
|
+
"@gjsify/cli": "^0.4.32",
|
|
50
|
+
"@gjsify/unit": "^0.4.32",
|
|
48
51
|
"@types/node": "^25.9.1",
|
|
49
52
|
"typescript": "^6.0.3"
|
|
53
|
+
},
|
|
54
|
+
"gjsify": {
|
|
55
|
+
"runtimes": {
|
|
56
|
+
"gjs": "polyfill",
|
|
57
|
+
"node": "polyfill",
|
|
58
|
+
"browser": "native"
|
|
59
|
+
}
|
|
50
60
|
}
|
|
51
61
|
}
|