@girs/atk-1.0
Advanced tools
Comparing version 2.50.0-3.2.4 to 2.50.0-3.2.5
declare module 'gi://Atk?version=1.0' { | ||
@@ -4,0 +3,0 @@ import Atk10 from '@girs/atk-1.0'; |
import Atk10 from '@girs/atk-1.0'; | ||
@@ -4,0 +3,0 @@ |
{ | ||
"name": "@girs/atk-1.0", | ||
"version": "2.50.0-3.2.4", | ||
"version": "2.50.0-3.2.5", | ||
"description": "GJS TypeScript type definitions for Atk-1.0, generated from library version 2.50.0", | ||
@@ -28,5 +28,5 @@ "type": "module", | ||
"dependencies": { | ||
"@girs/gjs": "^3.2.4", | ||
"@girs/glib-2.0": "^2.78.0-3.2.4", | ||
"@girs/gobject-2.0": "^2.78.0-3.2.4" | ||
"@girs/gjs": "^3.2.5", | ||
"@girs/glib-2.0": "^2.78.0-3.2.5", | ||
"@girs/gobject-2.0": "^2.78.0-3.2.5" | ||
}, | ||
@@ -33,0 +33,0 @@ "devDependencies": { |
@@ -8,3 +8,3 @@ | ||
GJS TypeScript type definitions for Atk-1.0, generated from library version 2.50.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.4. | ||
GJS TypeScript type definitions for Atk-1.0, generated from library version 2.50.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.5. | ||
@@ -86,2 +86,15 @@ ATK provides the set of accessibility interfaces that are implemented by other toolkits and applications. Using the ATK interfaces, accessibility tools have full access to view and control running applications. | ||
### ESM vs. CommonJS | ||
GJS supports two different import syntaxes. The new modern ESM syntax and the old global imports syntax. | ||
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. | ||
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. | ||
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. | ||
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. | ||
### Bundle | ||
@@ -88,0 +101,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
697464
106
Updated@girs/gjs@^3.2.5
Updated@girs/glib-2.0@^2.78.0-3.2.5