@girs/icalglib-3.0 3.0.0-3.2.4 → 3.0.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/icalglib-3.0)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for ICalGLib-3.0, generated from library version 3.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.4.
8
+ GJS TypeScript type definitions for ICalGLib-3.0, generated from library version 3.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.6.
9
9
 
10
10
  Implementation of the iCalendar protocols and protocol data units. The iCalendar specification describes how calendar clients can communicate with calendar servers so users can store their calendar data and arrange meetings with other users.
11
11
 
@@ -82,6 +82,19 @@ Now you have also type support for this, too:
82
82
  const ICalGLib = imports.gi.ICalGLib;
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).
@@ -1,5 +1,4 @@
1
1
 
2
-
3
2
  declare module 'gi://ICalGLib?version=3.0' {
4
3
  import ICalGLib30 from '@girs/icalglib-3.0';
5
4
  export default ICalGLib30;
@@ -1,5 +1,4 @@
1
1
 
2
-
3
2
  import ICalGLib30 from '@girs/icalglib-3.0';
4
3
 
5
4
  declare global {
@@ -2040,6 +2040,20 @@ export module Object {
2040
2040
  * responsible for a free of the native libical structure.
2041
2041
  */
2042
2042
  owner?: GObject.Object | null
2043
+ /**
2044
+ * Whether free the native libical structure on #ICalObject's finalize even
2045
+ * if the object has set an owner.
2046
+ */
2047
+ alwaysDestroy?: boolean | null
2048
+ /**
2049
+ * Whether the native libical structure is from a global shared memory.
2050
+ * If TRUE, then it is not freed on #ICalObject's finalize.
2051
+ */
2052
+ isGlobalMemory?: boolean | null
2053
+ /**
2054
+ * GDestroyNotify function to use to destroy the native libical pointer.
2055
+ */
2056
+ nativeDestroyFunc?: any | null
2043
2057
  }
2044
2058
 
2045
2059
  }
@@ -2053,11 +2067,21 @@ export interface Object {
2053
2067
  * if the object has set an owner.
2054
2068
  */
2055
2069
  always_destroy: boolean
2070
+ /**
2071
+ * Whether free the native libical structure on #ICalObject's finalize even
2072
+ * if the object has set an owner.
2073
+ */
2074
+ alwaysDestroy: boolean
2056
2075
  /**
2057
2076
  * Whether the native libical structure is from a global shared memory.
2058
2077
  * If TRUE, then it is not freed on #ICalObject's finalize.
2059
2078
  */
2060
2079
  readonly is_global_memory: boolean
2080
+ /**
2081
+ * Whether the native libical structure is from a global shared memory.
2082
+ * If TRUE, then it is not freed on #ICalObject's finalize.
2083
+ */
2084
+ readonly isGlobalMemory: boolean
2061
2085
  /**
2062
2086
  * The native libical structure for this ICalObject.
2063
2087
  */
@@ -2066,6 +2090,10 @@ export interface Object {
2066
2090
  * GDestroyNotify function to use to destroy the native libical pointer.
2067
2091
  */
2068
2092
  native_destroy_func: any
2093
+ /**
2094
+ * GDestroyNotify function to use to destroy the native libical pointer.
2095
+ */
2096
+ nativeDestroyFunc: any
2069
2097
  /**
2070
2098
  * Owner of the native libical structure. If set, then it is
2071
2099
  * responsible for a free of the native libical structure.
package/icalglib-3.0.d.ts CHANGED
@@ -2042,6 +2042,20 @@ module Object {
2042
2042
  * responsible for a free of the native libical structure.
2043
2043
  */
2044
2044
  owner?: GObject.Object | null
2045
+ /**
2046
+ * Whether free the native libical structure on #ICalObject's finalize even
2047
+ * if the object has set an owner.
2048
+ */
2049
+ alwaysDestroy?: boolean | null
2050
+ /**
2051
+ * Whether the native libical structure is from a global shared memory.
2052
+ * If TRUE, then it is not freed on #ICalObject's finalize.
2053
+ */
2054
+ isGlobalMemory?: boolean | null
2055
+ /**
2056
+ * GDestroyNotify function to use to destroy the native libical pointer.
2057
+ */
2058
+ nativeDestroyFunc?: any | null
2045
2059
  }
2046
2060
 
2047
2061
  }
@@ -2055,11 +2069,21 @@ interface Object {
2055
2069
  * if the object has set an owner.
2056
2070
  */
2057
2071
  always_destroy: boolean
2072
+ /**
2073
+ * Whether free the native libical structure on #ICalObject's finalize even
2074
+ * if the object has set an owner.
2075
+ */
2076
+ alwaysDestroy: boolean
2058
2077
  /**
2059
2078
  * Whether the native libical structure is from a global shared memory.
2060
2079
  * If TRUE, then it is not freed on #ICalObject's finalize.
2061
2080
  */
2062
2081
  readonly is_global_memory: boolean
2082
+ /**
2083
+ * Whether the native libical structure is from a global shared memory.
2084
+ * If TRUE, then it is not freed on #ICalObject's finalize.
2085
+ */
2086
+ readonly isGlobalMemory: boolean
2063
2087
  /**
2064
2088
  * The native libical structure for this ICalObject.
2065
2089
  */
@@ -2068,6 +2092,10 @@ interface Object {
2068
2092
  * GDestroyNotify function to use to destroy the native libical pointer.
2069
2093
  */
2070
2094
  native_destroy_func: any
2095
+ /**
2096
+ * GDestroyNotify function to use to destroy the native libical pointer.
2097
+ */
2098
+ nativeDestroyFunc: any
2071
2099
  /**
2072
2100
  * Owner of the native libical structure. If set, then it is
2073
2101
  * responsible for a free of the native libical structure.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/icalglib-3.0",
3
- "version": "3.0.0-3.2.4",
3
+ "version": "3.0.0-3.2.6",
4
4
  "description": "GJS TypeScript type definitions for ICalGLib-3.0, generated from library version 3.0.0",
5
5
  "type": "module",
6
6
  "module": "icalglib-3.0.js",
@@ -25,9 +25,9 @@
25
25
  "test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit icalglib-3.0.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/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/gobject-2.0": "^2.78.0-3.2.6"
31
31
  },
32
32
  "devDependencies": {
33
33
  "typescript": "*"