@girs/gdata-0.0 0.19.0-4.0.0-beta.2 → 0.19.0-4.0.0-beta.3
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/README.md +1 -19
- package/gdata-0.0.d.ts +23 -24
- package/package.json +9 -10
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
GJS TypeScript type definitions for GData-0.0, generated from library version 0.19.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.
|
|
8
|
+
GJS TypeScript type definitions for GData-0.0, generated from library version 0.19.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.3.
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
## Install
|
|
@@ -22,11 +22,6 @@ You can import this package into your project like this:
|
|
|
22
22
|
import GData from '@girs/gdata-0.0';
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
Or if you prefer CommonJS, you can also use this:
|
|
26
|
-
```ts
|
|
27
|
-
const GData = require('@girs/gdata-0.0');
|
|
28
|
-
```
|
|
29
|
-
|
|
30
25
|
### Ambient Modules
|
|
31
26
|
|
|
32
27
|
You can also use [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules) to import this module like you would do this in JavaScript.
|
|
@@ -81,19 +76,6 @@ Now you have also type support for this, too:
|
|
|
81
76
|
const GData = imports.gi.GData;
|
|
82
77
|
```
|
|
83
78
|
|
|
84
|
-
|
|
85
|
-
### ESM vs. CommonJS
|
|
86
|
-
|
|
87
|
-
GJS supports two different import syntaxes. The new modern ESM syntax and the old global imports syntax.
|
|
88
|
-
|
|
89
|
-
In TypeScript projects for GJS and GNOME Shell extensions, you have the flexibility to use `ESM` syntax and then decide the import syntax for your bundled file. If your bundler is configured to use `CommonJS`, it will convert to the GJS-specific global imports syntax, like `const moduleName = imports.gi[moduleName]`. This is different from the traditional `require` syntax seen in Node.js. The global imports syntax is chosen because it aligns with the CommonJS format supported by NPM, which is used for the generated type definitions and this package.
|
|
90
|
-
|
|
91
|
-
On the other hand, if you configure your bundler to use ESM, it will retain the ESM import syntax. It's crucial to ensure that your bundler is set up to correctly translate and bundle these imports into either CommonJS or ESM format, depending on your project's requirements.
|
|
92
|
-
|
|
93
|
-
This approach is particularly important due to the `@girs` types, which include both `*.cjs `files, using the GJS global imports syntax, and `*.js` files, which utilize the ESM syntax. By appropriately setting up your bundler, you can control which syntax—CommonJS or ESM—is used in your project. The choice of CommonJS in this context is also due to the similarity between the GJS-specific global imports and CommonJS syntax, allowing for easier management and bundling in these specific types of projects.
|
|
94
|
-
|
|
95
|
-
Since GNOME Shell 45, you should only use ESM, even for GNOME Shell extensions. Before that, extensions had to use the global import syntax, unlike normal GJS applications, where ESM has been available for some time.
|
|
96
|
-
|
|
97
79
|
### Bundle
|
|
98
80
|
|
|
99
81
|
Depending on your project configuration, it is recommended to use a bundler like [esbuild](https://esbuild.github.io/). You can find examples using different bundlers [here](https://github.com/gjsify/ts-for-gir/tree/main/examples).
|
package/gdata-0.0.d.ts
CHANGED
|
@@ -16,7 +16,6 @@ import type Soup from '@girs/soup-2.4';
|
|
|
16
16
|
import type Gio from '@girs/gio-2.0';
|
|
17
17
|
import type GObject from '@girs/gobject-2.0';
|
|
18
18
|
import type GLib from '@girs/glib-2.0';
|
|
19
|
-
import type GModule from '@girs/gmodule-2.0';
|
|
20
19
|
import type Json from '@girs/json-1.0';
|
|
21
20
|
import type Goa from '@girs/goa-1.0';
|
|
22
21
|
|
|
@@ -1813,7 +1812,7 @@ export namespace GData {
|
|
|
1813
1812
|
* static void
|
|
1814
1813
|
* my_object_class_init (MyObjectClass *klass)
|
|
1815
1814
|
* {
|
|
1816
|
-
* properties[PROP_FOO] = g_param_spec_int ("foo",
|
|
1815
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
1817
1816
|
* 0, 100,
|
|
1818
1817
|
* 50,
|
|
1819
1818
|
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
@@ -4132,7 +4131,7 @@ export namespace GData {
|
|
|
4132
4131
|
* static void
|
|
4133
4132
|
* my_object_class_init (MyObjectClass *klass)
|
|
4134
4133
|
* {
|
|
4135
|
-
* properties[PROP_FOO] = g_param_spec_int ("foo",
|
|
4134
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
4136
4135
|
* 0, 100,
|
|
4137
4136
|
* 50,
|
|
4138
4137
|
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
@@ -6730,7 +6729,7 @@ export namespace GData {
|
|
|
6730
6729
|
* static void
|
|
6731
6730
|
* my_object_class_init (MyObjectClass *klass)
|
|
6732
6731
|
* {
|
|
6733
|
-
* properties[PROP_FOO] = g_param_spec_int ("foo",
|
|
6732
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
6734
6733
|
* 0, 100,
|
|
6735
6734
|
* 50,
|
|
6736
6735
|
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
@@ -8874,7 +8873,7 @@ export namespace GData {
|
|
|
8874
8873
|
* static void
|
|
8875
8874
|
* my_object_class_init (MyObjectClass *klass)
|
|
8876
8875
|
* {
|
|
8877
|
-
* properties[PROP_FOO] = g_param_spec_int ("foo",
|
|
8876
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
8878
8877
|
* 0, 100,
|
|
8879
8878
|
* 50,
|
|
8880
8879
|
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
@@ -9912,7 +9911,7 @@ export namespace GData {
|
|
|
9912
9911
|
* static void
|
|
9913
9912
|
* my_object_class_init (MyObjectClass *klass)
|
|
9914
9913
|
* {
|
|
9915
|
-
* properties[PROP_FOO] = g_param_spec_int ("foo",
|
|
9914
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
9916
9915
|
* 0, 100,
|
|
9917
9916
|
* 50,
|
|
9918
9917
|
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
@@ -10488,7 +10487,7 @@ export namespace GData {
|
|
|
10488
10487
|
* static void
|
|
10489
10488
|
* my_object_class_init (MyObjectClass *klass)
|
|
10490
10489
|
* {
|
|
10491
|
-
* properties[PROP_FOO] = g_param_spec_int ("foo",
|
|
10490
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
10492
10491
|
* 0, 100,
|
|
10493
10492
|
* 50,
|
|
10494
10493
|
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
@@ -11006,7 +11005,7 @@ export namespace GData {
|
|
|
11006
11005
|
* static void
|
|
11007
11006
|
* my_object_class_init (MyObjectClass *klass)
|
|
11008
11007
|
* {
|
|
11009
|
-
* properties[PROP_FOO] = g_param_spec_int ("foo",
|
|
11008
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
11010
11009
|
* 0, 100,
|
|
11011
11010
|
* 50,
|
|
11012
11011
|
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
@@ -11606,7 +11605,7 @@ export namespace GData {
|
|
|
11606
11605
|
* static void
|
|
11607
11606
|
* my_object_class_init (MyObjectClass *klass)
|
|
11608
11607
|
* {
|
|
11609
|
-
* properties[PROP_FOO] = g_param_spec_int ("foo",
|
|
11608
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
11610
11609
|
* 0, 100,
|
|
11611
11610
|
* 50,
|
|
11612
11611
|
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
@@ -12132,7 +12131,7 @@ export namespace GData {
|
|
|
12132
12131
|
* static void
|
|
12133
12132
|
* my_object_class_init (MyObjectClass *klass)
|
|
12134
12133
|
* {
|
|
12135
|
-
* properties[PROP_FOO] = g_param_spec_int ("foo",
|
|
12134
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
12136
12135
|
* 0, 100,
|
|
12137
12136
|
* 50,
|
|
12138
12137
|
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
@@ -12648,7 +12647,7 @@ export namespace GData {
|
|
|
12648
12647
|
* static void
|
|
12649
12648
|
* my_object_class_init (MyObjectClass *klass)
|
|
12650
12649
|
* {
|
|
12651
|
-
* properties[PROP_FOO] = g_param_spec_int ("foo",
|
|
12650
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
12652
12651
|
* 0, 100,
|
|
12653
12652
|
* 50,
|
|
12654
12653
|
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
@@ -13198,7 +13197,7 @@ export namespace GData {
|
|
|
13198
13197
|
* static void
|
|
13199
13198
|
* my_object_class_init (MyObjectClass *klass)
|
|
13200
13199
|
* {
|
|
13201
|
-
* properties[PROP_FOO] = g_param_spec_int ("foo",
|
|
13200
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
13202
13201
|
* 0, 100,
|
|
13203
13202
|
* 50,
|
|
13204
13203
|
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
@@ -13812,7 +13811,7 @@ export namespace GData {
|
|
|
13812
13811
|
* static void
|
|
13813
13812
|
* my_object_class_init (MyObjectClass *klass)
|
|
13814
13813
|
* {
|
|
13815
|
-
* properties[PROP_FOO] = g_param_spec_int ("foo",
|
|
13814
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
13816
13815
|
* 0, 100,
|
|
13817
13816
|
* 50,
|
|
13818
13817
|
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
@@ -14330,7 +14329,7 @@ export namespace GData {
|
|
|
14330
14329
|
* static void
|
|
14331
14330
|
* my_object_class_init (MyObjectClass *klass)
|
|
14332
14331
|
* {
|
|
14333
|
-
* properties[PROP_FOO] = g_param_spec_int ("foo",
|
|
14332
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
14334
14333
|
* 0, 100,
|
|
14335
14334
|
* 50,
|
|
14336
14335
|
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
@@ -15131,7 +15130,7 @@ export namespace GData {
|
|
|
15131
15130
|
* static void
|
|
15132
15131
|
* my_object_class_init (MyObjectClass *klass)
|
|
15133
15132
|
* {
|
|
15134
|
-
* properties[PROP_FOO] = g_param_spec_int ("foo",
|
|
15133
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
15135
15134
|
* 0, 100,
|
|
15136
15135
|
* 50,
|
|
15137
15136
|
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
@@ -15626,7 +15625,7 @@ export namespace GData {
|
|
|
15626
15625
|
* static void
|
|
15627
15626
|
* my_object_class_init (MyObjectClass *klass)
|
|
15628
15627
|
* {
|
|
15629
|
-
* properties[PROP_FOO] = g_param_spec_int ("foo",
|
|
15628
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
15630
15629
|
* 0, 100,
|
|
15631
15630
|
* 50,
|
|
15632
15631
|
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
@@ -16151,7 +16150,7 @@ export namespace GData {
|
|
|
16151
16150
|
* static void
|
|
16152
16151
|
* my_object_class_init (MyObjectClass *klass)
|
|
16153
16152
|
* {
|
|
16154
|
-
* properties[PROP_FOO] = g_param_spec_int ("foo",
|
|
16153
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
16155
16154
|
* 0, 100,
|
|
16156
16155
|
* 50,
|
|
16157
16156
|
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
@@ -16632,7 +16631,7 @@ export namespace GData {
|
|
|
16632
16631
|
* static void
|
|
16633
16632
|
* my_object_class_init (MyObjectClass *klass)
|
|
16634
16633
|
* {
|
|
16635
|
-
* properties[PROP_FOO] = g_param_spec_int ("foo",
|
|
16634
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
16636
16635
|
* 0, 100,
|
|
16637
16636
|
* 50,
|
|
16638
16637
|
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
@@ -17126,7 +17125,7 @@ export namespace GData {
|
|
|
17126
17125
|
* static void
|
|
17127
17126
|
* my_object_class_init (MyObjectClass *klass)
|
|
17128
17127
|
* {
|
|
17129
|
-
* properties[PROP_FOO] = g_param_spec_int ("foo",
|
|
17128
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
17130
17129
|
* 0, 100,
|
|
17131
17130
|
* 50,
|
|
17132
17131
|
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
@@ -17564,7 +17563,7 @@ export namespace GData {
|
|
|
17564
17563
|
* static void
|
|
17565
17564
|
* my_object_class_init (MyObjectClass *klass)
|
|
17566
17565
|
* {
|
|
17567
|
-
* properties[PROP_FOO] = g_param_spec_int ("foo",
|
|
17566
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
17568
17567
|
* 0, 100,
|
|
17569
17568
|
* 50,
|
|
17570
17569
|
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
@@ -18135,7 +18134,7 @@ export namespace GData {
|
|
|
18135
18134
|
* static void
|
|
18136
18135
|
* my_object_class_init (MyObjectClass *klass)
|
|
18137
18136
|
* {
|
|
18138
|
-
* properties[PROP_FOO] = g_param_spec_int ("foo",
|
|
18137
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
18139
18138
|
* 0, 100,
|
|
18140
18139
|
* 50,
|
|
18141
18140
|
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
@@ -18685,7 +18684,7 @@ export namespace GData {
|
|
|
18685
18684
|
* static void
|
|
18686
18685
|
* my_object_class_init (MyObjectClass *klass)
|
|
18687
18686
|
* {
|
|
18688
|
-
* properties[PROP_FOO] = g_param_spec_int ("foo",
|
|
18687
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
18689
18688
|
* 0, 100,
|
|
18690
18689
|
* 50,
|
|
18691
18690
|
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
@@ -19955,7 +19954,7 @@ export namespace GData {
|
|
|
19955
19954
|
* static void
|
|
19956
19955
|
* my_object_class_init (MyObjectClass *klass)
|
|
19957
19956
|
* {
|
|
19958
|
-
* properties[PROP_FOO] = g_param_spec_int ("foo",
|
|
19957
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
19959
19958
|
* 0, 100,
|
|
19960
19959
|
* 50,
|
|
19961
19960
|
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
@@ -23805,7 +23804,7 @@ export namespace GData {
|
|
|
23805
23804
|
* static void
|
|
23806
23805
|
* my_object_class_init (MyObjectClass *klass)
|
|
23807
23806
|
* {
|
|
23808
|
-
* properties[PROP_FOO] = g_param_spec_int ("foo",
|
|
23807
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
23809
23808
|
* 0, 100,
|
|
23810
23809
|
* 50,
|
|
23811
23810
|
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/gdata-0.0",
|
|
3
|
-
"version": "0.19.0-4.0.0-beta.
|
|
3
|
+
"version": "0.19.0-4.0.0-beta.3",
|
|
4
4
|
"description": "GJS TypeScript type definitions for GData-0.0, generated from library version 0.19.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "gdata-0.0.js",
|
|
@@ -26,15 +26,14 @@
|
|
|
26
26
|
"test": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit gdata-0.0.d.ts"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@girs/gio-2.0": "^2.80.0-4.0.0-beta.
|
|
30
|
-
"@girs/gjs": "^4.0.0-beta.
|
|
31
|
-
"@girs/glib-2.0": "^2.80.0-4.0.0-beta.
|
|
32
|
-
"@girs/
|
|
33
|
-
"@girs/
|
|
34
|
-
"@girs/
|
|
35
|
-
"@girs/
|
|
36
|
-
"@girs/
|
|
37
|
-
"@girs/soup-2.4": "^2.74.3-4.0.0-beta.2"
|
|
29
|
+
"@girs/gio-2.0": "^2.80.0-4.0.0-beta.3",
|
|
30
|
+
"@girs/gjs": "^4.0.0-beta.3",
|
|
31
|
+
"@girs/glib-2.0": "^2.80.0-4.0.0-beta.3",
|
|
32
|
+
"@girs/goa-1.0": "^3.49.0-4.0.0-beta.3",
|
|
33
|
+
"@girs/gobject-2.0": "^2.80.0-4.0.0-beta.3",
|
|
34
|
+
"@girs/json-1.0": "^1.8.0-4.0.0-beta.3",
|
|
35
|
+
"@girs/libxml2-2.0": "^2.0.0-4.0.0-beta.3",
|
|
36
|
+
"@girs/soup-2.4": "^2.74.3-4.0.0-beta.3"
|
|
38
37
|
},
|
|
39
38
|
"devDependencies": {
|
|
40
39
|
"typescript": "*"
|