Skip to content

Releases: gjsify/ts-for-gir

v4.0.0-beta.2

05 Apr 21:33
265e064
Compare
Choose a tag to compare
v4.0.0-beta.2 Pre-release
Pre-release

TS for GIR ❤️ gi.ts

We are thrilled to announce the first beta release of new TypeScript bindings for GNOME! These bindings combine the efforts of ts-for-gir and gi.ts into a unified project under the gjsify organization. Since we announced this effort at GUADEC 2023, @JumpLink and @ewlsh have been working continuously to identify areas for improvement in the bindings and how best to merge these two sprawling codebases. This fusion marks a significant milestone in our journey towards enhancing the TypeScript ecosystem for GJS and GObject-based libraries. Our collaboration shows the power of community-driven development and the remarkable achievements that can be realized when we join forces towards a common objective 🤝

We have also removed some features, such as support for Node.js and CommonJS. Types for Node.js can still be generated via v3.x.x, and we are open to contributions in this area. However, there has been limited feedback from the community so far, leading us to focus on GJS for the time being. Furthermore, ESM represents the future and has already become the standard within GJS. This move also enables us to publish types on https://jsr.io/, a runtime-independent JavaScript and TypeScript open-source package registry created by the makers of Deno, where CommonJS is not allowed.

The new bindings have been published on NPM with the next tag and are ready for testing. We've tried to minimize breaking changes whereever possible and hopefully with new, advanced types the bindings just "work" 😊

We're excited to see what the future holds for JavaScript and TypeScript in GNOME!

What's Changed

  • gi.ts rework & merge by @ewlsh in #144
  • Infrastructure adjustments
  • Adapt codebase to use the @gi.ts/parser
  • Examples adapted
  • Many try and error commits 😅

Breaking changes

  • Removed CommonJS support
  • Removed Node.js support

New Contributors

Full Changelog: v3.3.0...v4.0.0-beta.2

v3.3.0

26 Mar 19:35
dfc22cc
Compare
Choose a tag to compare

ts-for-git logo

TypeScript type definition generator for GObject introspection GIR files

What's Changed

  • Upgrade dependencies
  • Replaced xml2js with fast-xml-parser (Backport from gi.ts merge branch)
  • Upgrade gir files for GNOME 46

Full Changelog: v3.2.8...v3.3.0

v3.2.8

17 Feb 06:43
Compare
Choose a tag to compare

What's Changed

  • Upgrade dependencies
  • Update examples and removed deprecated function calls like byteArray.toString()
  • Add dom.js, ambient.js and node-ambient.js to allow importing there type definitions in the codebase with a bundler
  • Update TSDoc documentation for system
  • node-gtk: Add new gtk-4-application example
  • node-gtk: Uses snake_case for property names at constructor, fixes #131

Breaking Changes

  • Removed support for additional underscore properties (next to lowerCamelCase) in the generated types, if this causes problems please let us know, then we will undo it again

Full Changelog: v3.2.7...v3.2.8

v3.2.7

01 Jan 19:19
e96433c
Compare
Choose a tag to compare

3.2.7

  • Upgrade dependencies
  • Add type for import.meta.url, see #142
  • C type const is readonly in typescript
  • Constants are not nullable, fixes #141

3.2.6

  • Upgrade dependencies
  • Generate camel cased property accessors, see #138
  • Add runAsync override for GLib.MainLoop, see #130

3.2.5

  • Upgrade dependencies
  • Allow ambient modules without version for NPM packages, see #139
  • Add information about ESM and CommonJS modules to README.md for NPM packages

3.2.4

  • Upgrade dependencies
  • Add instruction to install GnomeBluetooth-3.0.gir on Fedora
  • Add more *.gir files to ./girs directory

3.2.3

  • Upgrade dependencies
  • Upgrade gir files

3.2.1

  • TypeDoc: Only include main entry point
  • Upgrade dependencies

New Contributors

Full Changelog: v3.2.0...v3.2.7

v3.2.0

23 Jun 16:54
Compare
Choose a tag to compare
  • Improved TypeDoc support for TypeDoc 0.24.x of the generated NPM packages
  • Upgrade dependencies
  • Upgrade gir files

v3.1.0

12 Jun 08:54
Compare
Choose a tag to compare
  • Upgrade dependencies
  • Move conflicting global GJS types to dom.d.ts for optional import

Breaking Changes

Move conflicting global GJS types to dom.d.ts, allowing you to optionally import them in your project. By doing so, you have the flexibility to choose whether or not to include these types based on your specific needs. This resolves the conflict between the GJS and DOM types and provides you with more control over managing the type definitions.

To use the previous behavior and include the conflicting GJS types, you can import both ./@types/gjs.d.ts and ./@types/dom.d.ts in your code.

Alternatively, if you are using the NPM packages, you can import the following:

  • @girs/gjs: This package provides the GJS types.
  • @girs/gjs/dom: This package provides the conflicting DOM types.

Please update your imports accordingly based on your chosen approach.

v3.0.4

05 Jun 14:01
Compare
Choose a tag to compare
  • Update badges on README template files
  • Node-gtk: Readd gobject signal method, fixes #126

v3.0.3

04 Jun 19:47
Compare
Choose a tag to compare
  • NPM package Yarn workspace support is optional now, see #124
  • Upgrade all dependencies (except xml2js, see #125)
  • Parse app version from package.json
  • Moved templates, packages.xml, package-data-parser.ts and template-processor.ts from @ts-for-gir/lib to @ts-for-gir/generator-typescript
  • Cleanup yarn scripts in ./package.json

v3.0.1

22 May 18:32
Compare
Choose a tag to compare

Add missing packages.xml to @ts-for-gir/lib

v3.0.0

22 May 18:00
d5822e5
Compare
Choose a tag to compare

🎉 ts-for-gir v3.0.0 is here! 🚀

This stable release brings exciting new features and improvements to ts-for-gir.

Highlights

  • Support for generating NPM packages for each module, making it easier to manage and use the type definitions.
  • New CLI options to generate NPM packages and customize the package scope name.
  • Improved documentation with detailed explanations of the new CLI options.
  • Enhanced package structure with separate folders for each package, along with individual package.json files.
  • Compatibility updates for GNOME Shell extensions, including a dedicated NPM package for GNOME Shell types.
  • Expanded support for ambient modules.
  • Generation of both CommonJS and ESM modules.
  • Breaking changes to improve file naming conventions and folder structure.
  • The pre-generated NPM packages can be found on gjsify/types

Changelog

  • Add support to generate a package for each type we can publish on NPM, see #106
  • Add a new CLI option to generate NPM packages
  • Add a new CLI option to change the NPM package scope name
  • Documentation for the new CLI options
  • Generate a package.json for each package
  • One folder for each package
  • New example
  • Add dependencies to each package.json
  • Package names in lower case
  • Separate package names for node-gtk types
  • Package directory and file names in lower case
  • Parse library versions
  • Add a README.md for each NPM package
  • Different README.md for node-gtk NPM packages
  • Add an test to CI
  • Fix tsconfig.alias.json
  • Add support for ambient modules
  • Documentation for ambient modules
  • Generate both CJS and ESM modules
  • Add node-gtk to the peer dependencies to the node-gtk NPM packages
  • Remove destination environment directory
  • Separate README.md for the main NPM packages (@gir/gjs and @gir/node-gtk)
  • Generate and publish the new NPM packages
  • Provide system and gettext as ESM, see #114
  • Include only desired types (instead of all existing ones)
  • Add repository and homepage to package.json
  • Updated Documentation for the new NPM packages
  • Move the GNOME Shell type definitions to a NPM package and make use of the new generated NPM packages