@girs/edatabook-1.2 1.2.0-3.2.4 → 1.2.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/edatabook-1.2)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for EDataBook-1.2, generated from library version 1.2.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.4.
8
+ GJS TypeScript type definitions for EDataBook-1.2, generated from library version 1.2.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.6.
9
9
 
10
10
 
11
11
  ## Install
@@ -81,6 +81,19 @@ Now you have also type support for this, too:
81
81
  const EDataBook = imports.gi.EDataBook;
82
82
  ```
83
83
 
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
+
84
97
  ### Bundle
85
98
 
86
99
  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).
@@ -1,5 +1,4 @@
1
1
 
2
-
3
2
  declare module 'gi://EDataBook?version=1.2' {
4
3
  import EDataBook12 from '@girs/edatabook-1.2';
5
4
  export default EDataBook12;
@@ -1,5 +1,4 @@
1
1
 
2
-
3
2
  import EDataBook12 from '@girs/edatabook-1.2';
4
3
 
5
4
  declare global {
@@ -525,6 +525,7 @@ export module BookBackend {
525
525
  cache_dir?: string | null
526
526
  registry?: EDataServer.SourceRegistry | null
527
527
  writable?: boolean | null
528
+ cacheDir?: string | null
528
529
  }
529
530
 
530
531
  }
@@ -534,7 +535,9 @@ export interface BookBackend {
534
535
  // Own properties of EDataBook-1.2.EDataBook.BookBackend
535
536
 
536
537
  cache_dir: string | null
538
+ cacheDir: string | null
537
539
  readonly proxy_resolver: Gio.ProxyResolver
540
+ readonly proxyResolver: Gio.ProxyResolver
538
541
  readonly registry: EDataServer.SourceRegistry
539
542
  writable: boolean
540
543
 
@@ -3760,6 +3763,7 @@ export module DataBook {
3760
3763
  backend?: BookBackend | null
3761
3764
  connection?: Gio.DBusConnection | null
3762
3765
  object_path?: string | null
3766
+ objectPath?: string | null
3763
3767
  }
3764
3768
 
3765
3769
  }
@@ -3771,6 +3775,7 @@ export interface DataBook extends Gio.Initable {
3771
3775
  readonly backend: BookBackend
3772
3776
  readonly connection: Gio.DBusConnection
3773
3777
  readonly object_path: string | null
3778
+ readonly objectPath: string | null
3774
3779
 
3775
3780
  // Owm methods of EDataBook-1.2.EDataBook.DataBook
3776
3781
 
@@ -4162,6 +4167,7 @@ export module DataBookCursorCache {
4162
4167
 
4163
4168
  book_cache?: BookCache | null
4164
4169
  cursor?: any | null
4170
+ bookCache?: BookCache | null
4165
4171
  }
4166
4172
 
4167
4173
  }
@@ -4171,6 +4177,7 @@ export interface DataBookCursorCache {
4171
4177
  // Own properties of EDataBook-1.2.EDataBook.DataBookCursorCache
4172
4178
 
4173
4179
  readonly book_cache: BookCache
4180
+ readonly bookCache: BookCache
4174
4181
  readonly cursor: any
4175
4182
 
4176
4183
  // Class property signals of EDataBook-1.2.EDataBook.DataBookCursorCache
@@ -4252,6 +4259,7 @@ export module DataBookCursorSqlite {
4252
4259
  cursor?: any | null
4253
4260
  ebsql?: BookSqlite | null
4254
4261
  revision_key?: string | null
4262
+ revisionKey?: string | null
4255
4263
  }
4256
4264
 
4257
4265
  }
@@ -4263,6 +4271,7 @@ export interface DataBookCursorSqlite {
4263
4271
  readonly cursor: any
4264
4272
  readonly ebsql: BookSqlite
4265
4273
  readonly revision_key: string | null
4274
+ readonly revisionKey: string | null
4266
4275
 
4267
4276
  // Class property signals of EDataBook-1.2.EDataBook.DataBookCursorSqlite
4268
4277
 
@@ -4495,6 +4504,8 @@ export module DataBookView {
4495
4504
  n_total?: number | null
4496
4505
  object_path?: string | null
4497
4506
  sexp?: BookBackendSExp | null
4507
+ nTotal?: number | null
4508
+ objectPath?: string | null
4498
4509
  }
4499
4510
 
4500
4511
  }
@@ -4507,7 +4518,9 @@ export interface DataBookView extends Gio.Initable {
4507
4518
  readonly connection: Gio.DBusConnection
4508
4519
  indices: any
4509
4520
  n_total: number
4521
+ nTotal: number
4510
4522
  readonly object_path: string | null
4523
+ readonly objectPath: string | null
4511
4524
  readonly sexp: BookBackendSExp
4512
4525
 
4513
4526
  // Own fields of EDataBook-1.2.EDataBook.DataBookView
@@ -527,6 +527,7 @@ module BookBackend {
527
527
  cache_dir?: string | null
528
528
  registry?: EDataServer.SourceRegistry | null
529
529
  writable?: boolean | null
530
+ cacheDir?: string | null
530
531
  }
531
532
 
532
533
  }
@@ -536,7 +537,9 @@ interface BookBackend {
536
537
  // Own properties of EDataBook-1.2.EDataBook.BookBackend
537
538
 
538
539
  cache_dir: string | null
540
+ cacheDir: string | null
539
541
  readonly proxy_resolver: Gio.ProxyResolver
542
+ readonly proxyResolver: Gio.ProxyResolver
540
543
  readonly registry: EDataServer.SourceRegistry
541
544
  writable: boolean
542
545
 
@@ -3762,6 +3765,7 @@ module DataBook {
3762
3765
  backend?: BookBackend | null
3763
3766
  connection?: Gio.DBusConnection | null
3764
3767
  object_path?: string | null
3768
+ objectPath?: string | null
3765
3769
  }
3766
3770
 
3767
3771
  }
@@ -3773,6 +3777,7 @@ interface DataBook extends Gio.Initable {
3773
3777
  readonly backend: BookBackend
3774
3778
  readonly connection: Gio.DBusConnection
3775
3779
  readonly object_path: string | null
3780
+ readonly objectPath: string | null
3776
3781
 
3777
3782
  // Owm methods of EDataBook-1.2.EDataBook.DataBook
3778
3783
 
@@ -4164,6 +4169,7 @@ module DataBookCursorCache {
4164
4169
 
4165
4170
  book_cache?: BookCache | null
4166
4171
  cursor?: any | null
4172
+ bookCache?: BookCache | null
4167
4173
  }
4168
4174
 
4169
4175
  }
@@ -4173,6 +4179,7 @@ interface DataBookCursorCache {
4173
4179
  // Own properties of EDataBook-1.2.EDataBook.DataBookCursorCache
4174
4180
 
4175
4181
  readonly book_cache: BookCache
4182
+ readonly bookCache: BookCache
4176
4183
  readonly cursor: any
4177
4184
 
4178
4185
  // Class property signals of EDataBook-1.2.EDataBook.DataBookCursorCache
@@ -4254,6 +4261,7 @@ module DataBookCursorSqlite {
4254
4261
  cursor?: any | null
4255
4262
  ebsql?: BookSqlite | null
4256
4263
  revision_key?: string | null
4264
+ revisionKey?: string | null
4257
4265
  }
4258
4266
 
4259
4267
  }
@@ -4265,6 +4273,7 @@ interface DataBookCursorSqlite {
4265
4273
  readonly cursor: any
4266
4274
  readonly ebsql: BookSqlite
4267
4275
  readonly revision_key: string | null
4276
+ readonly revisionKey: string | null
4268
4277
 
4269
4278
  // Class property signals of EDataBook-1.2.EDataBook.DataBookCursorSqlite
4270
4279
 
@@ -4497,6 +4506,8 @@ module DataBookView {
4497
4506
  n_total?: number | null
4498
4507
  object_path?: string | null
4499
4508
  sexp?: BookBackendSExp | null
4509
+ nTotal?: number | null
4510
+ objectPath?: string | null
4500
4511
  }
4501
4512
 
4502
4513
  }
@@ -4509,7 +4520,9 @@ interface DataBookView extends Gio.Initable {
4509
4520
  readonly connection: Gio.DBusConnection
4510
4521
  indices: any
4511
4522
  n_total: number
4523
+ nTotal: number
4512
4524
  readonly object_path: string | null
4525
+ readonly objectPath: string | null
4513
4526
  readonly sexp: BookBackendSExp
4514
4527
 
4515
4528
  // Own fields of EDataBook-1.2.EDataBook.DataBookView
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/edatabook-1.2",
3
- "version": "1.2.0-3.2.4",
3
+ "version": "1.2.0-3.2.6",
4
4
  "description": "GJS TypeScript type definitions for EDataBook-1.2, generated from library version 1.2.0",
5
5
  "type": "module",
6
6
  "module": "edatabook-1.2.js",
@@ -25,17 +25,17 @@
25
25
  "test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit edatabook-1.2.d.cts"
26
26
  },
27
27
  "dependencies": {
28
- "@girs/camel-1.2": "^1.2.0-3.2.4",
29
- "@girs/ebackend-1.2": "^1.2.0-3.2.4",
30
- "@girs/ebookcontacts-1.2": "^1.2.0-3.2.4",
31
- "@girs/edataserver-1.2": "^1.2.0-3.2.4",
32
- "@girs/gio-2.0": "^2.78.0-3.2.4",
33
- "@girs/gjs": "^3.2.4",
34
- "@girs/glib-2.0": "^2.78.0-3.2.4",
35
- "@girs/gobject-2.0": "^2.78.0-3.2.4",
36
- "@girs/json-1.0": "^1.7.1-3.2.4",
37
- "@girs/libxml2-2.0": "^2.0.0-3.2.4",
38
- "@girs/soup-3.0": "^3.4.4-3.2.4"
28
+ "@girs/camel-1.2": "^1.2.0-3.2.6",
29
+ "@girs/ebackend-1.2": "^1.2.0-3.2.6",
30
+ "@girs/ebookcontacts-1.2": "^1.2.0-3.2.6",
31
+ "@girs/edataserver-1.2": "^1.2.0-3.2.6",
32
+ "@girs/gio-2.0": "^2.78.0-3.2.6",
33
+ "@girs/gjs": "^3.2.6",
34
+ "@girs/glib-2.0": "^2.78.0-3.2.6",
35
+ "@girs/gobject-2.0": "^2.78.0-3.2.6",
36
+ "@girs/json-1.0": "^1.7.1-3.2.6",
37
+ "@girs/libxml2-2.0": "^2.0.0-3.2.6",
38
+ "@girs/soup-3.0": "^3.4.4-3.2.6"
39
39
  },
40
40
  "devDependencies": {
41
41
  "typescript": "*"