@girs/cloudproviders-0.3 0.3.0-4.0.0-beta.2 → 0.3.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/cloudproviders-0.3)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for CloudProviders-0.3, generated from library version 0.3.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.2.
8
+ GJS TypeScript type definitions for CloudProviders-0.3, generated from library version 0.3.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 CloudProviders from '@girs/cloudproviders-0.3';
23
23
  ```
24
24
 
25
- Or if you prefer CommonJS, you can also use this:
26
- ```ts
27
- const CloudProviders = require('@girs/cloudproviders-0.3');
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 CloudProviders = imports.gi.CloudProviders;
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).
@@ -14,7 +14,6 @@ import './cloudproviders-0.3-ambient.d.ts';
14
14
  import type Gio from '@girs/gio-2.0';
15
15
  import type GObject from '@girs/gobject-2.0';
16
16
  import type GLib from '@girs/glib-2.0';
17
- import type GModule from '@girs/gmodule-2.0';
18
17
 
19
18
  export namespace CloudProviders {
20
19
  enum AccountStatus {
@@ -823,7 +822,7 @@ export namespace CloudProviders {
823
822
  * static void
824
823
  * my_object_class_init (MyObjectClass *klass)
825
824
  * {
826
- * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
825
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
827
826
  * 0, 100,
828
827
  * 50,
829
828
  * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
@@ -1282,7 +1281,7 @@ export namespace CloudProviders {
1282
1281
  * static void
1283
1282
  * my_object_class_init (MyObjectClass *klass)
1284
1283
  * {
1285
- * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
1284
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
1286
1285
  * 0, 100,
1287
1286
  * 50,
1288
1287
  * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
@@ -2005,7 +2004,7 @@ export namespace CloudProviders {
2005
2004
  * static void
2006
2005
  * my_object_class_init (MyObjectClass *klass)
2007
2006
  * {
2008
- * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
2007
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
2009
2008
  * 0, 100,
2010
2009
  * 50,
2011
2010
  * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
@@ -2445,7 +2444,7 @@ export namespace CloudProviders {
2445
2444
  * static void
2446
2445
  * my_object_class_init (MyObjectClass *klass)
2447
2446
  * {
2448
- * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
2447
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
2449
2448
  * 0, 100,
2450
2449
  * 50,
2451
2450
  * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
@@ -2898,7 +2897,7 @@ export namespace CloudProviders {
2898
2897
  * static void
2899
2898
  * my_object_class_init (MyObjectClass *klass)
2900
2899
  * {
2901
- * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
2900
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
2902
2901
  * 0, 100,
2903
2902
  * 50,
2904
2903
  * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
@@ -3604,7 +3603,7 @@ export namespace CloudProviders {
3604
3603
  * static void
3605
3604
  * my_object_class_init (MyObjectClass *klass)
3606
3605
  * {
3607
- * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
3606
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
3608
3607
  * 0, 100,
3609
3608
  * 50,
3610
3609
  * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
@@ -4028,7 +4027,7 @@ export namespace CloudProviders {
4028
4027
  * static void
4029
4028
  * my_object_class_init (MyObjectClass *klass)
4030
4029
  * {
4031
- * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
4030
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
4032
4031
  * 0, 100,
4033
4032
  * 50,
4034
4033
  * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/cloudproviders-0.3",
3
- "version": "0.3.0-4.0.0-beta.2",
3
+ "version": "0.3.0-4.0.0-beta.3",
4
4
  "description": "GJS TypeScript type definitions for CloudProviders-0.3, generated from library version 0.3.0",
5
5
  "type": "module",
6
6
  "module": "cloudproviders-0.3.js",
@@ -26,11 +26,10 @@
26
26
  "test": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit cloudproviders-0.3.d.ts"
27
27
  },
28
28
  "dependencies": {
29
- "@girs/gio-2.0": "^2.80.0-4.0.0-beta.2",
30
- "@girs/gjs": "^4.0.0-beta.2",
31
- "@girs/glib-2.0": "^2.80.0-4.0.0-beta.2",
32
- "@girs/gmodule-2.0": "^2.0.0-4.0.0-beta.2",
33
- "@girs/gobject-2.0": "^2.80.0-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/gobject-2.0": "^2.80.0-4.0.0-beta.3"
34
33
  },
35
34
  "devDependencies": {
36
35
  "typescript": "*"