@girs/restextras-0.7 0.7.0-3.2.4 → 0.7.0-3.2.6

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/restextras-0.7)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for RestExtras-0.7, generated from library version 0.7.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.4.
8
+ GJS TypeScript type definitions for RestExtras-0.7, generated from library version 0.7.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.6.
9
9
 
10
10
  This extra package provides Facebook and Flickr support.
11
11
 
@@ -82,6 +82,19 @@ Now you have also type support for this, too:
82
82
  const RestExtras = imports.gi.RestExtras;
83
83
  ```
84
84
 
85
+
86
+ ### ESM vs. CommonJS
87
+
88
+ GJS supports two different import syntaxes. The new modern ESM syntax and the old global imports syntax.
89
+
90
+ 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.
91
+
92
+ 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.
93
+
94
+ 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.
95
+
96
+ 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.
97
+
85
98
  ### Bundle
86
99
 
87
100
  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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/restextras-0.7",
3
- "version": "0.7.0-3.2.4",
3
+ "version": "0.7.0-3.2.6",
4
4
  "description": "GJS TypeScript type definitions for RestExtras-0.7, generated from library version 0.7.0",
5
5
  "type": "module",
6
6
  "module": "restextras-0.7.js",
@@ -25,13 +25,13 @@
25
25
  "test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit restextras-0.7.d.cts"
26
26
  },
27
27
  "dependencies": {
28
- "@girs/gio-2.0": "^2.78.0-3.2.4",
29
- "@girs/gjs": "^3.2.4",
30
- "@girs/glib-2.0": "^2.78.0-3.2.4",
31
- "@girs/gobject-2.0": "^2.78.0-3.2.4",
32
- "@girs/libxml2-2.0": "^2.0.0-3.2.4",
33
- "@girs/rest-0.7": "^0.7.0-3.2.4",
34
- "@girs/soup-2.4": "^2.74.3-3.2.4"
28
+ "@girs/gio-2.0": "^2.78.0-3.2.6",
29
+ "@girs/gjs": "^3.2.6",
30
+ "@girs/glib-2.0": "^2.78.0-3.2.6",
31
+ "@girs/gobject-2.0": "^2.78.0-3.2.6",
32
+ "@girs/libxml2-2.0": "^2.0.0-3.2.6",
33
+ "@girs/rest-0.7": "^0.7.0-3.2.6",
34
+ "@girs/soup-2.4": "^2.74.3-3.2.6"
35
35
  },
36
36
  "devDependencies": {
37
37
  "typescript": "*"
@@ -1,9 +1,12 @@
1
1
 
2
-
3
2
  declare module 'gi://RestExtras?version=0.7' {
4
3
  import RestExtras07 from '@girs/restextras-0.7';
5
4
  export default RestExtras07;
6
5
  }
7
6
 
7
+ declare module 'gi://RestExtras' {
8
+ import RestExtras07 from '@girs/restextras-0.7';
9
+ export default RestExtras07;
10
+ }
8
11
 
9
12
 
@@ -1,5 +1,4 @@
1
1
 
2
-
3
2
  import RestExtras07 from '@girs/restextras-0.7';
4
3
 
5
4
  declare global {
@@ -33,6 +33,8 @@ export module FlickrProxy {
33
33
  api_key?: string | null
34
34
  shared_secret?: string | null
35
35
  token?: string | null
36
+ apiKey?: string | null
37
+ sharedSecret?: string | null
36
38
  }
37
39
 
38
40
  }
@@ -42,7 +44,9 @@ export interface FlickrProxy {
42
44
  // Own properties of RestExtras-0.7.RestExtras.FlickrProxy
43
45
 
44
46
  readonly api_key: string | null
47
+ readonly apiKey: string | null
45
48
  readonly shared_secret: string | null
49
+ readonly sharedSecret: string | null
46
50
  token: string | null
47
51
 
48
52
  // Own fields of RestExtras-0.7.RestExtras.FlickrProxy
@@ -249,6 +253,8 @@ export module LastfmProxy {
249
253
  api_key?: string | null
250
254
  secret?: string | null
251
255
  session_key?: string | null
256
+ apiKey?: string | null
257
+ sessionKey?: string | null
252
258
  }
253
259
 
254
260
  }
@@ -258,8 +264,10 @@ export interface LastfmProxy {
258
264
  // Own properties of RestExtras-0.7.RestExtras.LastfmProxy
259
265
 
260
266
  readonly api_key: string | null
267
+ readonly apiKey: string | null
261
268
  readonly secret: string | null
262
269
  session_key: string | null
270
+ sessionKey: string | null
263
271
 
264
272
  // Own fields of RestExtras-0.7.RestExtras.LastfmProxy
265
273
 
@@ -428,6 +436,8 @@ export module YoutubeProxy {
428
436
 
429
437
  developer_key?: string | null
430
438
  user_auth?: string | null
439
+ developerKey?: string | null
440
+ userAuth?: string | null
431
441
  }
432
442
 
433
443
  }
@@ -437,7 +447,9 @@ export interface YoutubeProxy {
437
447
  // Own properties of RestExtras-0.7.RestExtras.YoutubeProxy
438
448
 
439
449
  readonly developer_key: string | null
450
+ readonly developerKey: string | null
440
451
  user_auth: string | null
452
+ userAuth: string | null
441
453
 
442
454
  // Own fields of RestExtras-0.7.RestExtras.YoutubeProxy
443
455
 
@@ -35,6 +35,8 @@ module FlickrProxy {
35
35
  api_key?: string | null
36
36
  shared_secret?: string | null
37
37
  token?: string | null
38
+ apiKey?: string | null
39
+ sharedSecret?: string | null
38
40
  }
39
41
 
40
42
  }
@@ -44,7 +46,9 @@ interface FlickrProxy {
44
46
  // Own properties of RestExtras-0.7.RestExtras.FlickrProxy
45
47
 
46
48
  readonly api_key: string | null
49
+ readonly apiKey: string | null
47
50
  readonly shared_secret: string | null
51
+ readonly sharedSecret: string | null
48
52
  token: string | null
49
53
 
50
54
  // Own fields of RestExtras-0.7.RestExtras.FlickrProxy
@@ -251,6 +255,8 @@ module LastfmProxy {
251
255
  api_key?: string | null
252
256
  secret?: string | null
253
257
  session_key?: string | null
258
+ apiKey?: string | null
259
+ sessionKey?: string | null
254
260
  }
255
261
 
256
262
  }
@@ -260,8 +266,10 @@ interface LastfmProxy {
260
266
  // Own properties of RestExtras-0.7.RestExtras.LastfmProxy
261
267
 
262
268
  readonly api_key: string | null
269
+ readonly apiKey: string | null
263
270
  readonly secret: string | null
264
271
  session_key: string | null
272
+ sessionKey: string | null
265
273
 
266
274
  // Own fields of RestExtras-0.7.RestExtras.LastfmProxy
267
275
 
@@ -430,6 +438,8 @@ module YoutubeProxy {
430
438
 
431
439
  developer_key?: string | null
432
440
  user_auth?: string | null
441
+ developerKey?: string | null
442
+ userAuth?: string | null
433
443
  }
434
444
 
435
445
  }
@@ -439,7 +449,9 @@ interface YoutubeProxy {
439
449
  // Own properties of RestExtras-0.7.RestExtras.YoutubeProxy
440
450
 
441
451
  readonly developer_key: string | null
452
+ readonly developerKey: string | null
442
453
  user_auth: string | null
454
+ userAuth: string | null
443
455
 
444
456
  // Own fields of RestExtras-0.7.RestExtras.YoutubeProxy
445
457