@gjsify/url 0.4.35 → 0.4.37
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 +15 -0
- package/package.json +27 -10
package/globals.mjs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-exports native `URL` and `URLSearchParams` globals for Node.js / browser builds.
|
|
3
|
+
*
|
|
4
|
+
* On Node, `URL` and `URLSearchParams` have been stable globals since v10.0 (2018).
|
|
5
|
+
* On browsers they have been native for over a decade (WHATWG URL standard).
|
|
6
|
+
*
|
|
7
|
+
* The dynamic resolver in `@gjsify/resolve-npm/runtime-aliases.mjs` routes
|
|
8
|
+
* `@gjsify/url` here when `package.json#gjsify.runtimes` declares the
|
|
9
|
+
* non-GJS slot as `"native"`. On GJS, consumers fall through to the polyfill
|
|
10
|
+
* at `lib/esm/index.js` (which wraps `GLib.Uri`).
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export const URL = globalThis.URL;
|
|
14
|
+
export const URLSearchParams = globalThis.URLSearchParams;
|
|
15
|
+
export default { URL, URLSearchParams };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/url",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.37",
|
|
4
4
|
"description": "Node.js url module for Gjs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -9,10 +9,15 @@
|
|
|
9
9
|
".": {
|
|
10
10
|
"types": "./lib/types/index.d.ts",
|
|
11
11
|
"default": "./lib/esm/index.js"
|
|
12
|
-
}
|
|
12
|
+
},
|
|
13
|
+
"./globals": "./globals.mjs"
|
|
13
14
|
},
|
|
14
15
|
"files": [
|
|
15
|
-
"lib"
|
|
16
|
+
"lib",
|
|
17
|
+
"globals.mjs"
|
|
18
|
+
],
|
|
19
|
+
"sideEffects": [
|
|
20
|
+
"./globals.mjs"
|
|
16
21
|
],
|
|
17
22
|
"scripts": {
|
|
18
23
|
"clear": "rm -rf lib tsconfig.tsbuildinfo tsconfig.types.tsbuildinfo test.gjs.mjs test.node.mjs || exit 0",
|
|
@@ -23,6 +28,7 @@
|
|
|
23
28
|
"build:test": "gjsify run build:test:gjs && gjsify run build:test:node",
|
|
24
29
|
"build:test:gjs": "gjsify build src/test.ts --app gjs --outfile test.gjs.mjs",
|
|
25
30
|
"build:test:node": "gjsify build src/test.ts --app node --outfile test.node.mjs",
|
|
31
|
+
"build:test:browser": "gjsify build src/test.browser.mts --app browser --outfile dist/test.browser.mjs",
|
|
26
32
|
"test": "gjsify run build:gjsify && gjsify run build:test && gjsify run test:node && gjsify run test:gjs",
|
|
27
33
|
"test:gjs": "gjsify run test.gjs.mjs",
|
|
28
34
|
"test:node": "node test.node.mjs"
|
|
@@ -33,19 +39,30 @@
|
|
|
33
39
|
"fs"
|
|
34
40
|
],
|
|
35
41
|
"dependencies": {
|
|
36
|
-
"@girs/glib-2.0": "2.88.0-4.0.
|
|
42
|
+
"@girs/glib-2.0": "2.88.0-4.0.4"
|
|
37
43
|
},
|
|
38
44
|
"devDependencies": {
|
|
39
|
-
"@gjsify/cli": "^0.4.
|
|
40
|
-
"@gjsify/unit": "^0.4.
|
|
45
|
+
"@gjsify/cli": "^0.4.37",
|
|
46
|
+
"@gjsify/unit": "^0.4.37",
|
|
41
47
|
"@types/node": "^25.9.1",
|
|
42
|
-
"typescript": "^
|
|
48
|
+
"typescript": "^5.9.3"
|
|
43
49
|
},
|
|
44
50
|
"gjsify": {
|
|
45
51
|
"runtimes": {
|
|
46
52
|
"gjs": "polyfill",
|
|
47
|
-
"node": "
|
|
48
|
-
"browser": "
|
|
53
|
+
"node": "native",
|
|
54
|
+
"browser": "native",
|
|
55
|
+
"nativescript": "none"
|
|
49
56
|
}
|
|
50
|
-
}
|
|
57
|
+
},
|
|
58
|
+
"license": "MIT",
|
|
59
|
+
"repository": {
|
|
60
|
+
"type": "git",
|
|
61
|
+
"url": "git+https://github.com/gjsify/gjsify.git",
|
|
62
|
+
"directory": "packages/node/url"
|
|
63
|
+
},
|
|
64
|
+
"bugs": {
|
|
65
|
+
"url": "https://github.com/gjsify/gjsify/issues"
|
|
66
|
+
},
|
|
67
|
+
"homepage": "https://github.com/gjsify/gjsify/tree/main/packages/node/url#readme"
|
|
51
68
|
}
|