-
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 pull request #45 from gjsify/master
Moved type definition generation to new TypeDefinitionGenerator
- Loading branch information
Showing
146 changed files
with
19,087 additions
and
4,734 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
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 @@ | ||
export default { | ||
modules: ['Gtk-3.0'], | ||
girDirectories: ['./vala-girs/gir-1.0'], | ||
prettify: true, | ||
pretty: false, | ||
ignore: [], | ||
} |
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 @@ | ||
export default { | ||
modules: ['Gtk-4.0'], | ||
girDirectories: ['./vala-girs/gir-1.0'], | ||
prettify: true, | ||
pretty: false, | ||
ignore: [], | ||
} |
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 @@ | ||
export default { | ||
modules: ['Gtk-3.0', 'Soup-2.4', 'GtkSource-3.0', 'WebKit2-4.0', 'AppIndicator3-0.1', 'Gda-5.0', 'Notify-0.7'], | ||
ignoreConflicts: true, | ||
prettify: true, | ||
pretty: false, | ||
ignore: [] | ||
} |
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,5 +1,6 @@ | ||
export default { | ||
modules: ['RygelCore-2.4', 'RygelRenderer-2.4'], | ||
modules: ['RygelCore-2.6', 'RygelRenderer-2.6'], | ||
girDirectories: ['./vala-girs/gir-1.0'], | ||
pretty: false, | ||
ignore: [], | ||
} |
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 |
---|---|---|
@@ -0,0 +1,139 @@ | ||
## TODO | ||
- Refactor Ava test | ||
|
||
# v2.0.0 | ||
- The browser example now uses ESM for Gjs and Node.js | ||
- Upgrade all dependencies to latest | ||
- [node-gtk] don't add $obj parameter in connect() method either, thanks to @peat-psuwit | ||
- [node-gtk] Fixed Return types, see #46 | ||
- New and simpler patch format | ||
- Replaced `ESLint` with `prettier` for prettify output, this fixes #29 | ||
- New `doc` command for future implementation | ||
- New class `HtmlDocGenerator` this is not implemented yet, but can serve as a template for a future implementation | ||
- Fix type `Uint8Array` (should not be `Uint8Array[]`) | ||
- CI: Run Gjs CLI examples to test working bindings | ||
- The generated types now contain a note that they are automatically generated with `ts-for-gir` | ||
- Split option `exportDefault` to `useNamespace` and `moduleType` to specify `ESM` or `CommonJS` module generation | ||
- Fix VSCode debugging configuration to work with ESM | ||
- Debugging information added to README.md | ||
- Moved all signature generations to new TypeDefinitionGenerator | ||
- The utility functions are no longer static members of a class | ||
- Fixed a bug in the `forEachInterface` method, which caused that not all inherited methods were implemented anymore (slipped in with the last PR) | ||
- Added this CHANGELOG.md | ||
|
||
# 17 Jan 2022 | ||
- All types in vala-gir can now be built and validated without errors, this can be tested with `npm run test:girs:all`, this test is now also executed with github actions | ||
- Switch to ESM for ts-for-gir itself | ||
- Replaced `oclif` with `yargs` for CLI parsing (`yargs` has ESM Support, `oclif` not) | ||
- Improved @realh's Gjs ESM support | ||
- Improved types based on [gobject-introspection/docs/gir-1.2.rnc](https://gitlab.gnome.org/GNOME/gobject-introspection/-/blob/master/docs/gir-1.2.rnc) and [gi.ts/parser/src/xml.ts](https://gitlab.gnome.org/ewlsh/gi.ts/-/blob/master/packages/parser/src/xml.ts) | ||
- Changed `examples/Gjs/builder` example to use the Gjs ESM feature using `gi://` imports | ||
- Version conflicts in Gir modules fixed, now multiple versions of the same module name can be generated | ||
- Made the source code more readable in some places, this mainly affects places where an array was returned, here a more meaningful tuple / object is now returned | ||
- Dependencies updated | ||
- It is now possible to build all gir modules from the vala-girs repository. | ||
- Some older girs are missing in the vala-girs repository, they are now included in this repository | ||
- Added some new examples | ||
|
||
## Breaking Changes | ||
- Node.js minimum version is now 16 for ESM support | ||
- The config files must now also be in ESM format, if they are not in json format: | ||
|
||
|
||
See PR [#44](https://github.com/sammydre/ts-for-gjs/pull/44) | ||
# 5 Jan 2022 | ||
- Fix error type | ||
|
||
See PR [#43](https://github.com/sammydre/ts-for-gjs/pull/43) | ||
|
||
# 1 Aug 2021 | ||
- Add support for ES modules using default exports | ||
|
||
See PR [#41](https://github.com/sammydre/ts-for-gjs/pull/41) | ||
|
||
# 14 Jan 2021 | ||
- Use /usr/local/share when on Darwin systems | ||
|
||
See PR [#39](https://github.com/sammydre/ts-for-gjs/pull/39) | ||
|
||
# 21 Apr 2021 | ||
- Missing quote in generate example | ||
|
||
See PR [#38](https://github.com/sammydre/ts-for-gjs/pull/38) | ||
|
||
# 13 Dec 2020 | ||
- Use qualified names in circular dependency check (fixes #28) | ||
- Fixed type transformations for arrays of bytes | ||
- Add support for inline callback types | ||
- Expose instance parameters of class methods | ||
- Add CI / action tests using Github workflow | ||
|
||
See PR [#30](https://github.com/sammydre/ts-for-gjs/pull/30), [#31](https://github.com/sammydre/ts-for-gjs/pull/31), [#34](https://github.com/sammydre/ts-for-gjs/pull/34), [#36](https://github.com/sammydre/ts-for-gjs/pull/36) and [#37](https://github.com/sammydre/ts-for-gjs/pull/37) | ||
|
||
# 16 Oct 2020 | ||
- Improved types and also use more types in test data | ||
- Fixed test npm run build:test:girs | ||
- Upgrade dependencies (With the upgrade of eslint some new automatic formatting has been added which increases the PR) | ||
- Added tests to README.md | ||
- Added version to fix | ||
- Add versions property type to imports.gi for gobject-introspection classes #25 | ||
- Added src to NPM module to fix | ||
- Is it possible to use ts-for-gjs as dev dependency #20 | ||
- Split method exportObjectInternal in more methods to make it more readable | ||
- Improved debugging by log the full error when an error occurs | ||
- Some improvements taken from @realh `s fork | ||
|
||
See PR [#27](https://github.com/sammydre/ts-for-gjs/pull/27) | ||
|
||
# 10 Oct 2020 | ||
- Add ts-node as devDep to fix running in-tree | ||
- improve typing for cast.ts | ||
|
||
See PR [#22](https://github.com/sammydre/ts-for-gjs/pull/22) and [#23](https://github.com/sammydre/ts-for-gjs/pull/23) | ||
|
||
# 7 Mar 2020 | ||
- Moved CLI specific code to `cli.ts` | ||
- Add a new `TemplateProcessor` class to generate definitions from templates to reduce the GirModule class | ||
- Add a new `Transformation` class to transform methods, enums, etc for the specific environment (gjs or node) | ||
- Convert string templates to ejs templates | ||
- Because there are now more source files, I have moved them all to `src/` | ||
- The compiled source files now in `lib/` | ||
- I have moved the dependencies loading to `module-loader.ts` | ||
- I have moved the file parser to `module-loader.ts` | ||
- I have moved the cli specific to `./src/commands/*` and `./src/config` | ||
- All types now in `./src/types`, each type / interface in his own file | ||
- Added `bin/bin.js`, required to use ts-for-gir as a cl tool by npm | ||
- Added **ESLint** with the **Prettier** plugin, I tried to keep the code style (for example, there is a rule to not use semicolon's). | ||
- ESLint and Prettier are also used to validate and auto format the generated template files. | ||
- I've changed the default output dir to `@types/` to make it easier to generate type definitions in other projects without having to specify the output path each time | ||
- The output path now contains subfolder's for `Gjs` and / or `node-gtk` (the directory name `node-gtk` is required to get typescript automatically working with `import * as gi from 'node-gtk'`) | ||
- There is now a new option called `--build-type` which can be `"lib"` or `"types"`, `"lib"` is the default for generating types for `Gjs` and the way it was before. I added "types" for node-gtk and generates the types e.g. as you would publish them on DefinitelyTyped. | ||
- Source maps are now also generated, which simplify debugging, Zhe IDE can now points directly to the typescript files e.g. at a breakpoint | ||
- Updated dependencies | ||
- Replaced [commander.js](https://github.com/tj/commander.js/) with [oclif](https://github.com/oclif/oclif) because `commander.js` was a difficult to use with multiple arguments | ||
- Added wild card support for module names to load (e.g. Gtk*) | ||
- Ask which module version should be used if several are found | ||
- It can now be specified which modules should be ignored | ||
- A config can now be created in which the cli options are available (e.g. the modules that should be ignored) | ||
- Added new reserved keywords for functions, class names, etc | ||
- Fixed data type errors | ||
- Added a new list | ||
|
||
See PR [#19](https://github.com/sammydre/ts-for-gjs/pull/19) | ||
|
||
|
||
# 19 Jul 2019 | ||
- Export symbols used by registerClass | ||
|
||
See PR [#16](https://github.com/sammydre/ts-for-gjs/pull/16) | ||
|
||
# 14 Jul 2019 | ||
- Add GObject signal connect methods | ||
- Fix GType and add $gtype properties | ||
|
||
See PR [#14](https://github.com/sammydre/ts-for-gjs/pull/14) and [#15](https://github.com/sammydre/ts-for-gjs/pull/15) | ||
|
||
# 2 Jul 2019 | ||
- Fix return value of signal connect methods | ||
|
||
See PR [#10](https://github.com/sammydre/ts-for-gjs/pull/10) |
Oops, something went wrong.