@girs/builder-1.0 1.0.0-4.0.0-beta.2 → 1.0.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 CHANGED
@@ -5,7 +5,7 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/builder-1.0)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for Builder-1.0, generated from library version 1.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.2.
8
+ GJS TypeScript type definitions for Builder-1.0, generated from library version 1.0.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 Builder from '@girs/builder-1.0';
23
23
  ```
24
24
 
25
- Or if you prefer CommonJS, you can also use this:
26
- ```ts
27
- const Builder = require('@girs/builder-1.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 Builder = imports.gi.Builder;
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/builder-1.0.d.ts CHANGED
@@ -289,7 +289,7 @@ export namespace Builder {
289
289
  * static void
290
290
  * my_object_class_init (MyObjectClass *klass)
291
291
  * {
292
- * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
292
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
293
293
  * 0, 100,
294
294
  * 50,
295
295
  * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
@@ -681,7 +681,7 @@ export namespace Builder {
681
681
  * static void
682
682
  * my_object_class_init (MyObjectClass *klass)
683
683
  * {
684
- * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
684
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
685
685
  * 0, 100,
686
686
  * 50,
687
687
  * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
@@ -1301,7 +1301,7 @@ export namespace Builder {
1301
1301
  * static void
1302
1302
  * my_object_class_init (MyObjectClass *klass)
1303
1303
  * {
1304
- * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
1304
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
1305
1305
  * 0, 100,
1306
1306
  * 50,
1307
1307
  * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
@@ -2070,7 +2070,7 @@ export namespace Builder {
2070
2070
  * static void
2071
2071
  * my_object_class_init (MyObjectClass *klass)
2072
2072
  * {
2073
- * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
2073
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
2074
2074
  * 0, 100,
2075
2075
  * 50,
2076
2076
  * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
@@ -2469,7 +2469,7 @@ export namespace Builder {
2469
2469
  * static void
2470
2470
  * my_object_class_init (MyObjectClass *klass)
2471
2471
  * {
2472
- * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
2472
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
2473
2473
  * 0, 100,
2474
2474
  * 50,
2475
2475
  * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
@@ -2895,7 +2895,7 @@ export namespace Builder {
2895
2895
  * static void
2896
2896
  * my_object_class_init (MyObjectClass *klass)
2897
2897
  * {
2898
- * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
2898
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
2899
2899
  * 0, 100,
2900
2900
  * 50,
2901
2901
  * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
@@ -3906,7 +3906,7 @@ export namespace Builder {
3906
3906
  * static void
3907
3907
  * my_object_class_init (MyObjectClass *klass)
3908
3908
  * {
3909
- * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
3909
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
3910
3910
  * 0, 100,
3911
3911
  * 50,
3912
3912
  * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/builder-1.0",
3
- "version": "1.0.0-4.0.0-beta.2",
3
+ "version": "1.0.0-4.0.0-beta.3",
4
4
  "description": "GJS TypeScript type definitions for Builder-1.0, generated from library version 1.0.0",
5
5
  "type": "module",
6
6
  "module": "builder-1.0.js",
@@ -26,27 +26,27 @@
26
26
  "test": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit builder-1.0.d.ts"
27
27
  },
28
28
  "dependencies": {
29
- "@girs/atk-1.0": "^2.52.0-4.0.0-beta.2",
30
- "@girs/cairo-1.0": "^1.0.0-4.0.0-beta.2",
31
- "@girs/dazzle-1.0": "^3.44.0-4.0.0-beta.2",
32
- "@girs/freetype2-2.0": "^2.0.0-4.0.0-beta.2",
33
- "@girs/gdk-3.0": "^3.24.41-4.0.0-beta.2",
34
- "@girs/gdkpixbuf-2.0": "^2.0.0-4.0.0-beta.2",
35
- "@girs/gio-2.0": "^2.80.0-4.0.0-beta.2",
36
- "@girs/girepository-2.0": "^1.80.0-4.0.0-beta.2",
37
- "@girs/gjs": "^4.0.0-beta.2",
38
- "@girs/glib-2.0": "^2.80.0-4.0.0-beta.2",
39
- "@girs/gmodule-2.0": "^2.0.0-4.0.0-beta.2",
40
- "@girs/gobject-2.0": "^2.80.0-4.0.0-beta.2",
41
- "@girs/gtk-3.0": "^3.24.41-4.0.0-beta.2",
42
- "@girs/gtksource-3.0": "^3.0.0-4.0.0-beta.2",
43
- "@girs/harfbuzz-0.0": "^8.3.1-4.0.0-beta.2",
44
- "@girs/ide-1.0": "^1.0.0-4.0.0-beta.2",
45
- "@girs/json-1.0": "^1.7.1-4.0.0-beta.2",
46
- "@girs/pango-1.0": "^1.51.2-4.0.0-beta.2",
47
- "@girs/peas-1.0": "^1.0.0-4.0.0-beta.2",
48
- "@girs/template-1.0": "^3.36.2-4.0.0-beta.2",
49
- "@girs/xlib-2.0": "^2.0.0-4.0.0-beta.2"
29
+ "@girs/atk-1.0": "^2.52.0-4.0.0-beta.3",
30
+ "@girs/cairo-1.0": "^1.0.0-4.0.0-beta.3",
31
+ "@girs/dazzle-1.0": "^3.44.0-4.0.0-beta.3",
32
+ "@girs/freetype2-2.0": "^2.0.0-4.0.0-beta.3",
33
+ "@girs/gdk-3.0": "^3.24.41-4.0.0-beta.3",
34
+ "@girs/gdkpixbuf-2.0": "^2.0.0-4.0.0-beta.3",
35
+ "@girs/gio-2.0": "^2.80.0-4.0.0-beta.3",
36
+ "@girs/girepository-2.0": "^1.80.0-4.0.0-beta.3",
37
+ "@girs/gjs": "^4.0.0-beta.3",
38
+ "@girs/glib-2.0": "^2.80.0-4.0.0-beta.3",
39
+ "@girs/gmodule-2.0": "^2.0.0-4.0.0-beta.3",
40
+ "@girs/gobject-2.0": "^2.80.0-4.0.0-beta.3",
41
+ "@girs/gtk-3.0": "^3.24.41-4.0.0-beta.3",
42
+ "@girs/gtksource-3.0": "^3.0.0-4.0.0-beta.3",
43
+ "@girs/harfbuzz-0.0": "^8.3.1-4.0.0-beta.3",
44
+ "@girs/ide-1.0": "^1.0.0-4.0.0-beta.3",
45
+ "@girs/json-1.0": "^1.8.0-4.0.0-beta.3",
46
+ "@girs/pango-1.0": "^1.51.0-4.0.0-beta.3",
47
+ "@girs/peas-1.0": "^1.0.0-4.0.0-beta.3",
48
+ "@girs/template-1.0": "^3.36.2-4.0.0-beta.3",
49
+ "@girs/xlib-2.0": "^2.0.0-4.0.0-beta.3"
50
50
  },
51
51
  "devDependencies": {
52
52
  "typescript": "*"