@girs/appstream-1.0 0.16.1-3.2.4 → 0.16.1-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 +14 -1
- package/appstream-1.0-ambient.d.ts +0 -1
- package/appstream-1.0-import.d.ts +0 -1
- package/appstream-1.0.d.cts +28 -0
- package/appstream-1.0.d.ts +28 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
GJS TypeScript type definitions for AppStream-1.0, generated from library version 0.16.1 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.
|
|
8
|
+
GJS TypeScript type definitions for AppStream-1.0, generated from library version 0.16.1 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.6.
|
|
9
9
|
|
|
10
10
|
AppStream is a cross-distro effort for enhancing the way we interact with the software repositories provided by the distribution by standardizing sets of additional metadata.
|
|
11
11
|
|
|
@@ -82,6 +82,19 @@ Now you have also type support for this, too:
|
|
|
82
82
|
const AppStream = imports.gi.AppStream;
|
|
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/appstream-1.0.d.cts
CHANGED
|
@@ -2930,6 +2930,18 @@ export module Component {
|
|
|
2930
2930
|
* the summary
|
|
2931
2931
|
*/
|
|
2932
2932
|
summary?: string | null
|
|
2933
|
+
/**
|
|
2934
|
+
* the developer name
|
|
2935
|
+
*/
|
|
2936
|
+
developerName?: string | null
|
|
2937
|
+
/**
|
|
2938
|
+
* the project group
|
|
2939
|
+
*/
|
|
2940
|
+
projectGroup?: string | null
|
|
2941
|
+
/**
|
|
2942
|
+
* the project license
|
|
2943
|
+
*/
|
|
2944
|
+
projectLicense?: string | null
|
|
2933
2945
|
}
|
|
2934
2946
|
|
|
2935
2947
|
}
|
|
@@ -2950,6 +2962,10 @@ export interface Component {
|
|
|
2950
2962
|
* the developer name
|
|
2951
2963
|
*/
|
|
2952
2964
|
developer_name: string | null
|
|
2965
|
+
/**
|
|
2966
|
+
* the developer name
|
|
2967
|
+
*/
|
|
2968
|
+
developerName: string | null
|
|
2953
2969
|
/**
|
|
2954
2970
|
* hash map of icon urls and sizes
|
|
2955
2971
|
*/
|
|
@@ -2978,10 +2994,18 @@ export interface Component {
|
|
|
2978
2994
|
* the project group
|
|
2979
2995
|
*/
|
|
2980
2996
|
project_group: string | null
|
|
2997
|
+
/**
|
|
2998
|
+
* the project group
|
|
2999
|
+
*/
|
|
3000
|
+
projectGroup: string | null
|
|
2981
3001
|
/**
|
|
2982
3002
|
* the project license
|
|
2983
3003
|
*/
|
|
2984
3004
|
project_license: string | null
|
|
3005
|
+
/**
|
|
3006
|
+
* the project license
|
|
3007
|
+
*/
|
|
3008
|
+
projectLicense: string | null
|
|
2985
3009
|
/**
|
|
2986
3010
|
* An array of #AsScreenshot instances
|
|
2987
3011
|
*/
|
|
@@ -5616,6 +5640,8 @@ export module Review {
|
|
|
5616
5640
|
reviewer_name?: string | null
|
|
5617
5641
|
summary?: string | null
|
|
5618
5642
|
version?: string | null
|
|
5643
|
+
reviewerId?: string | null
|
|
5644
|
+
reviewerName?: string | null
|
|
5619
5645
|
}
|
|
5620
5646
|
|
|
5621
5647
|
}
|
|
@@ -5636,7 +5662,9 @@ export interface Review {
|
|
|
5636
5662
|
priority: number
|
|
5637
5663
|
rating: number
|
|
5638
5664
|
reviewer_id: string | null
|
|
5665
|
+
reviewerId: string | null
|
|
5639
5666
|
reviewer_name: string | null
|
|
5667
|
+
reviewerName: string | null
|
|
5640
5668
|
summary: string | null
|
|
5641
5669
|
version: string | null
|
|
5642
5670
|
|
package/appstream-1.0.d.ts
CHANGED
|
@@ -2932,6 +2932,18 @@ module Component {
|
|
|
2932
2932
|
* the summary
|
|
2933
2933
|
*/
|
|
2934
2934
|
summary?: string | null
|
|
2935
|
+
/**
|
|
2936
|
+
* the developer name
|
|
2937
|
+
*/
|
|
2938
|
+
developerName?: string | null
|
|
2939
|
+
/**
|
|
2940
|
+
* the project group
|
|
2941
|
+
*/
|
|
2942
|
+
projectGroup?: string | null
|
|
2943
|
+
/**
|
|
2944
|
+
* the project license
|
|
2945
|
+
*/
|
|
2946
|
+
projectLicense?: string | null
|
|
2935
2947
|
}
|
|
2936
2948
|
|
|
2937
2949
|
}
|
|
@@ -2952,6 +2964,10 @@ interface Component {
|
|
|
2952
2964
|
* the developer name
|
|
2953
2965
|
*/
|
|
2954
2966
|
developer_name: string | null
|
|
2967
|
+
/**
|
|
2968
|
+
* the developer name
|
|
2969
|
+
*/
|
|
2970
|
+
developerName: string | null
|
|
2955
2971
|
/**
|
|
2956
2972
|
* hash map of icon urls and sizes
|
|
2957
2973
|
*/
|
|
@@ -2980,10 +2996,18 @@ interface Component {
|
|
|
2980
2996
|
* the project group
|
|
2981
2997
|
*/
|
|
2982
2998
|
project_group: string | null
|
|
2999
|
+
/**
|
|
3000
|
+
* the project group
|
|
3001
|
+
*/
|
|
3002
|
+
projectGroup: string | null
|
|
2983
3003
|
/**
|
|
2984
3004
|
* the project license
|
|
2985
3005
|
*/
|
|
2986
3006
|
project_license: string | null
|
|
3007
|
+
/**
|
|
3008
|
+
* the project license
|
|
3009
|
+
*/
|
|
3010
|
+
projectLicense: string | null
|
|
2987
3011
|
/**
|
|
2988
3012
|
* An array of #AsScreenshot instances
|
|
2989
3013
|
*/
|
|
@@ -5618,6 +5642,8 @@ module Review {
|
|
|
5618
5642
|
reviewer_name?: string | null
|
|
5619
5643
|
summary?: string | null
|
|
5620
5644
|
version?: string | null
|
|
5645
|
+
reviewerId?: string | null
|
|
5646
|
+
reviewerName?: string | null
|
|
5621
5647
|
}
|
|
5622
5648
|
|
|
5623
5649
|
}
|
|
@@ -5638,7 +5664,9 @@ interface Review {
|
|
|
5638
5664
|
priority: number
|
|
5639
5665
|
rating: number
|
|
5640
5666
|
reviewer_id: string | null
|
|
5667
|
+
reviewerId: string | null
|
|
5641
5668
|
reviewer_name: string | null
|
|
5669
|
+
reviewerName: string | null
|
|
5642
5670
|
summary: string | null
|
|
5643
5671
|
version: string | null
|
|
5644
5672
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/appstream-1.0",
|
|
3
|
-
"version": "0.16.1-3.2.
|
|
3
|
+
"version": "0.16.1-3.2.6",
|
|
4
4
|
"description": "GJS TypeScript type definitions for AppStream-1.0, generated from library version 0.16.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "appstream-1.0.js",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit appstream-1.0.d.cts"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@girs/gio-2.0": "^2.78.0-3.2.
|
|
29
|
-
"@girs/gjs": "^3.2.
|
|
30
|
-
"@girs/glib-2.0": "^2.78.0-3.2.
|
|
31
|
-
"@girs/gobject-2.0": "^2.78.0-3.2.
|
|
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
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"typescript": "*"
|