@girs/grl-0.1 0.1.0-3.2.4 → 0.1.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/grl-0.1)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for Grl-0.1, generated from library version 0.1.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.4.
8
+ GJS TypeScript type definitions for Grl-0.1, generated from library version 0.1.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 Grl = imports.gi.Grl;
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,9 +1,12 @@
1
1
 
2
-
3
2
  declare module 'gi://Grl?version=0.1' {
4
3
  import Grl01 from '@girs/grl-0.1';
5
4
  export default Grl01;
6
5
  }
7
6
 
7
+ declare module 'gi://Grl' {
8
+ import Grl01 from '@girs/grl-0.1';
9
+ export default Grl01;
10
+ }
8
11
 
9
12
 
@@ -1,5 +1,4 @@
1
1
 
2
-
3
2
  import Grl01 from '@girs/grl-0.1';
4
3
 
5
4
  declare global {
package/grl-0.1.d.cts CHANGED
@@ -1590,6 +1590,11 @@ export module MediaSource {
1590
1590
  * bigger than a certain threshold into smaller queries.
1591
1591
  */
1592
1592
  auto_split_threshold?: number | null
1593
+ /**
1594
+ * Transparently split queries with count requests
1595
+ * bigger than a certain threshold into smaller queries.
1596
+ */
1597
+ autoSplitThreshold?: number | null
1593
1598
  }
1594
1599
 
1595
1600
  }
@@ -1603,6 +1608,11 @@ export interface MediaSource {
1603
1608
  * bigger than a certain threshold into smaller queries.
1604
1609
  */
1605
1610
  auto_split_threshold: number
1611
+ /**
1612
+ * Transparently split queries with count requests
1613
+ * bigger than a certain threshold into smaller queries.
1614
+ */
1615
+ autoSplitThreshold: number
1606
1616
 
1607
1617
  // Own fields of Grl-0.1.Grl.MediaSource
1608
1618
 
@@ -2171,6 +2181,18 @@ export module MetadataSource {
2171
2181
  * The name of the source.
2172
2182
  */
2173
2183
  source_name?: string | null
2184
+ /**
2185
+ * A description of the source
2186
+ */
2187
+ sourceDesc?: string | null
2188
+ /**
2189
+ * The identifier of the source.
2190
+ */
2191
+ sourceId?: string | null
2192
+ /**
2193
+ * The name of the source.
2194
+ */
2195
+ sourceName?: string | null
2174
2196
  }
2175
2197
 
2176
2198
  }
@@ -2183,14 +2205,26 @@ export interface MetadataSource {
2183
2205
  * A description of the source
2184
2206
  */
2185
2207
  source_desc: string
2208
+ /**
2209
+ * A description of the source
2210
+ */
2211
+ sourceDesc: string
2186
2212
  /**
2187
2213
  * The identifier of the source.
2188
2214
  */
2189
2215
  source_id: string
2216
+ /**
2217
+ * The identifier of the source.
2218
+ */
2219
+ sourceId: string
2190
2220
  /**
2191
2221
  * The name of the source.
2192
2222
  */
2193
2223
  source_name: string
2224
+ /**
2225
+ * The name of the source.
2226
+ */
2227
+ sourceName: string
2194
2228
 
2195
2229
  // Own fields of Grl-0.1.Grl.MetadataSource
2196
2230
 
package/grl-0.1.d.ts CHANGED
@@ -1592,6 +1592,11 @@ module MediaSource {
1592
1592
  * bigger than a certain threshold into smaller queries.
1593
1593
  */
1594
1594
  auto_split_threshold?: number | null
1595
+ /**
1596
+ * Transparently split queries with count requests
1597
+ * bigger than a certain threshold into smaller queries.
1598
+ */
1599
+ autoSplitThreshold?: number | null
1595
1600
  }
1596
1601
 
1597
1602
  }
@@ -1605,6 +1610,11 @@ interface MediaSource {
1605
1610
  * bigger than a certain threshold into smaller queries.
1606
1611
  */
1607
1612
  auto_split_threshold: number
1613
+ /**
1614
+ * Transparently split queries with count requests
1615
+ * bigger than a certain threshold into smaller queries.
1616
+ */
1617
+ autoSplitThreshold: number
1608
1618
 
1609
1619
  // Own fields of Grl-0.1.Grl.MediaSource
1610
1620
 
@@ -2173,6 +2183,18 @@ module MetadataSource {
2173
2183
  * The name of the source.
2174
2184
  */
2175
2185
  source_name?: string | null
2186
+ /**
2187
+ * A description of the source
2188
+ */
2189
+ sourceDesc?: string | null
2190
+ /**
2191
+ * The identifier of the source.
2192
+ */
2193
+ sourceId?: string | null
2194
+ /**
2195
+ * The name of the source.
2196
+ */
2197
+ sourceName?: string | null
2176
2198
  }
2177
2199
 
2178
2200
  }
@@ -2185,14 +2207,26 @@ interface MetadataSource {
2185
2207
  * A description of the source
2186
2208
  */
2187
2209
  source_desc: string
2210
+ /**
2211
+ * A description of the source
2212
+ */
2213
+ sourceDesc: string
2188
2214
  /**
2189
2215
  * The identifier of the source.
2190
2216
  */
2191
2217
  source_id: string
2218
+ /**
2219
+ * The identifier of the source.
2220
+ */
2221
+ sourceId: string
2192
2222
  /**
2193
2223
  * The name of the source.
2194
2224
  */
2195
2225
  source_name: string
2226
+ /**
2227
+ * The name of the source.
2228
+ */
2229
+ sourceName: string
2196
2230
 
2197
2231
  // Own fields of Grl-0.1.Grl.MetadataSource
2198
2232
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/grl-0.1",
3
- "version": "0.1.0-3.2.4",
3
+ "version": "0.1.0-3.2.6",
4
4
  "description": "GJS TypeScript type definitions for Grl-0.1, generated from library version 0.1.0",
5
5
  "type": "module",
6
6
  "module": "grl-0.1.js",
@@ -25,10 +25,10 @@
25
25
  "test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit grl-0.1.d.cts"
26
26
  },
27
27
  "dependencies": {
28
- "@girs/gjs": "^3.2.4",
29
- "@girs/glib-2.0": "^2.78.0-3.2.4",
30
- "@girs/gmodule-2.0": "^2.0.0-3.2.4",
31
- "@girs/gobject-2.0": "^2.78.0-3.2.4"
28
+ "@girs/gjs": "^3.2.6",
29
+ "@girs/glib-2.0": "^2.78.0-3.2.6",
30
+ "@girs/gmodule-2.0": "^2.0.0-3.2.6",
31
+ "@girs/gobject-2.0": "^2.78.0-3.2.6"
32
32
  },
33
33
  "devDependencies": {
34
34
  "typescript": "*"