-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dependabot/npm_and_yarn/rollup-4.22.4
- Loading branch information
Showing
238 changed files
with
109,757 additions
and
195,946 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import gtk4PackagesConfig from './.ts-for-gir.gtk4.rc.js'; | ||
import allPackagesConfig from './.ts-for-gir.packages-all.rc.js'; | ||
|
||
export default { | ||
...gtk4PackagesConfig, | ||
package: true, | ||
...allPackagesConfig, | ||
modules: ['Gtk-4.0', 'Adw-1.0'], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
725 changes: 367 additions & 358 deletions
725
.yarn/releases/yarn-4.5.0.cjs → .yarn/releases/yarn-4.5.1.cjs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@ts-for-gir-example/adw-1-hello-example", | ||
"version": "4.0.0-beta.16", | ||
"version": "4.0.0-beta.18", | ||
"description": "Simple GJS Typescript hello-world example using Libadwaita", | ||
"type": "module", | ||
"private": true, | ||
|
@@ -18,8 +18,8 @@ | |
"author": "Pascal Garber <[email protected]>", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"typescript": "^5.6.2", | ||
"vite": "^5.4.6" | ||
"typescript": "^5.6.3", | ||
"vite": "^5.4.10" | ||
}, | ||
"dependencies": { | ||
"@girs/adw-1": "workspace:^", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@ts-for-gir-example/cairo-surfaces-tsc", | ||
"version": "4.0.0-beta.16", | ||
"version": "4.0.0-beta.18", | ||
"description": "Simple cairo-surfaces GJS example", | ||
"type": "module", | ||
"private": true, | ||
|
@@ -18,7 +18,7 @@ | |
"author": "Pascal Garber <[email protected]>", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"typescript": "^5.6.2" | ||
"typescript": "^5.6.3" | ||
}, | ||
"dependencies": { | ||
"@girs/gjs": "workspace:^" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@ts-for-gir-example/console-tsc", | ||
"version": "4.0.0-beta.16", | ||
"version": "4.0.0-beta.18", | ||
"description": "Simple console example", | ||
"type": "module", | ||
"private": true, | ||
|
@@ -18,7 +18,7 @@ | |
"author": "Pascal Garber <[email protected]>", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"typescript": "^5.6.2" | ||
"typescript": "^5.6.3" | ||
}, | ||
"dependencies": { | ||
"@girs/gjs": "workspace:^" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import GLib from 'gi://GLib' | ||
import Gio from 'gi://Gio' | ||
|
||
// Example demonstrating promisified async file operations | ||
|
||
// Promisify Gio.File operations | ||
Gio._promisify(Gio.File.prototype, 'enumerate_children_async', 'enumerate_children_finish') | ||
Gio._promisify(Gio.FileEnumerator.prototype, 'next_files_async', 'next_files_finish') | ||
Gio._promisify(Gio.File.prototype, 'load_contents_async', 'load_contents_finish') | ||
|
||
async function main() { | ||
try { | ||
const dir = Gio.File.new_for_path('.') | ||
|
||
// Test load_contents_async behavior | ||
console.log('\nTesting load_contents_async:') | ||
const thisFile = Gio.File.new_for_path('main.ts') | ||
const contents = await thisFile.load_contents_async(null) | ||
// contents is [Uint8Array, string], not [boolean, Uint8Array, string] | ||
console.log('Number of returned items:', contents.length) | ||
console.log( | ||
'Types of returned items:', | ||
contents.map((item) => typeof item), | ||
) | ||
console.log('Content preview:', new TextDecoder().decode(contents[0]).slice(0, 50)) | ||
|
||
// List directory contents asynchronously | ||
const enumerator = await dir.enumerate_children_async( | ||
'standard::*', | ||
Gio.FileQueryInfoFlags.NONE, | ||
GLib.PRIORITY_DEFAULT, | ||
null, | ||
) | ||
|
||
while (true) { | ||
// Get next files asynchronously | ||
const files = await enumerator.next_files_async( | ||
10, // Number of files to fetch | ||
GLib.PRIORITY_DEFAULT, | ||
null, | ||
) | ||
|
||
if (!files.length) { | ||
break | ||
} | ||
|
||
// Process each file info | ||
for (const info of files) { | ||
const name = info.get_name() | ||
const type = info.get_file_type() | ||
const size = info.get_size() | ||
|
||
console.log(`${name} (${type === Gio.FileType.DIRECTORY ? 'Directory' : 'File'}, ${size} bytes)`) | ||
} | ||
} | ||
} catch (error) { | ||
console.error('Error:', error) | ||
} | ||
|
||
// Required to properly terminate the program | ||
mainLoop.quit() | ||
} | ||
|
||
// Create main loop | ||
const mainLoop = new GLib.MainLoop(null, false) | ||
|
||
// Start async operation | ||
main() | ||
|
||
// Run main loop | ||
mainLoop.run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "@ts-for-gir-example/gio-2-async", | ||
"version": "4.0.0-beta.18", | ||
"description": "Example demonstrating promisified GIO async operations", | ||
"type": "module", | ||
"private": true, | ||
"scripts": { | ||
"build:app": "tsc", | ||
"build": "yarn build:app", | ||
"start:app": "gjs -m dist/main.js", | ||
"start": "yarn build && yarn start:app", | ||
"validate": "yarn validate:types", | ||
"validate:types": "tsc --noEmit", | ||
"clear": "rm -rf dist" | ||
}, | ||
"devDependencies": { | ||
"typescript": "^5.6.3" | ||
}, | ||
"dependencies": { | ||
"@girs/gio-2.0": "workspace:^", | ||
"@girs/gjs": "workspace:^" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"compilerOptions": { | ||
"lib": ["ESNext"], | ||
"types": ["@girs/gjs", "@girs/gjs/dom", "@girs/gio-2.0"], | ||
"target": "ESNext", | ||
"module": "ESNext", | ||
"moduleResolution": "bundler", | ||
"strict": true, | ||
"noImplicitAny": true, | ||
"strictNullChecks": true, | ||
"noImplicitThis": true, | ||
"alwaysStrict": true, | ||
"outDir": "./dist" | ||
}, | ||
"files": [ | ||
"main.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@ts-for-gir-example/gio-2-cat-example", | ||
"version": "4.0.0-beta.16", | ||
"version": "4.0.0-beta.18", | ||
"description": "Simple GJS Gtk 3 example app that shows how to use Gio-2.0 to read a file from the local file system", | ||
"main": "index.js", | ||
"type": "module", | ||
|
@@ -19,8 +19,8 @@ | |
"author": "Pascal Garber <[email protected]>", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"esbuild": "^0.23.1", | ||
"typescript": "^5.6.2" | ||
"esbuild": "^0.24.0", | ||
"typescript": "^5.6.3" | ||
}, | ||
"dependencies": { | ||
"@girs/gio-2.0": "workspace:^", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@ts-for-gir-example/gio-2-dbus-example", | ||
"version": "4.0.0-beta.16", | ||
"version": "4.0.0-beta.18", | ||
"description": "GJS example showing how to build a DBus server/client", | ||
"main": "index.js", | ||
"type": "module", | ||
|
@@ -21,8 +21,8 @@ | |
"author": "Pascal Garber <[email protected]>", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"esbuild": "^0.23.1", | ||
"typescript": "^5.6.2" | ||
"esbuild": "^0.24.0", | ||
"typescript": "^5.6.3" | ||
}, | ||
"dependencies": { | ||
"@girs/gio-2.0": "workspace:^", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@ts-for-gir-example/gio-2-list-model-example", | ||
"version": "4.0.0-beta.16", | ||
"version": "4.0.0-beta.18", | ||
"description": "An example of implementing the GListModel interface in GJS", | ||
"main": "index.js", | ||
"type": "module", | ||
|
@@ -19,8 +19,8 @@ | |
"author": "Pascal Garber <[email protected]>", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"esbuild": "^0.23.1", | ||
"typescript": "^5.6.2" | ||
"esbuild": "^0.24.0", | ||
"typescript": "^5.6.3" | ||
}, | ||
"dependencies": { | ||
"@girs/gio-2.0": "workspace:^", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@ts-for-gir-example/glib-2-variant-example", | ||
"version": "4.0.0-beta.16", | ||
"version": "4.0.0-beta.18", | ||
"description": "ts-for-gir GVariant example based on https://gjs.guide/guides/glib/gvariant.html", | ||
"type": "module", | ||
"private": true, | ||
|
@@ -18,8 +18,8 @@ | |
"author": "Pascal Garber <[email protected]>", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"esbuild": "^0.23.1", | ||
"typescript": "^5.6.2" | ||
"esbuild": "^0.24.0", | ||
"typescript": "^5.6.3" | ||
}, | ||
"dependencies": { | ||
"@girs/gio-2.0": "workspace:^", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.