Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to toggle between package.json support + further cleanups from the gi.ts merge #176

Merged
merged 33 commits into from
Jul 19, 2024

Conversation

JumpLink
Copy link
Collaborator

@JumpLink JumpLink commented Jul 15, 2024

  • Renamed CLI argument packageYarn to workspace as other package managers such as PNPM also support this protocol
  • Ambient module definitions are now always generated with and without versions prefix (previously this was only the case for the latest versions). I think this makes sense, as care should be taken not to use the same library in different versions anyway. If this is needed anyway, it can be prevented with the new generate option onlyVersionPrefix. This fixes Allow all versions to be imported without a version string (e.g. gi://Gtk instead of gi://Gtk?version=4.0) in Finalise the ts-for-gir and gi.ts fusion #158 and possibly Create an import for the latest version in *-ambient.d.ts #174
  • A index.d.ts file are now created for each module with which everything for the module (ambient module, imports.gi and namespace) can be imported
  • Synchronous methods removed that existed twice for the asynchronous variant, this was originally criticised in copy command #162
  • Support for type generation without package.json support to fix The buildType option doesn't work yet. #168 and Add gi.d.ts index file #173, for this there is a new cli agrument package to be able to toggle between package.json support. package.json support is disabled by default.

@JumpLink JumpLink requested a review from ewlsh July 15, 2024 11:32
@ewlsh
Copy link
Collaborator

ewlsh commented Jul 17, 2024

Taking a look...

@JumpLink
Copy link
Collaborator Author

JumpLink commented Jul 17, 2024

@ewlsh Some in the GNOME community want the types to work without package.json and NPM.

I think for types without package.json support it is easier to generate all gir types in a single file, because in Ambient modules no relative imports are allowed and without package.json support only relative imports are possible. I will try that next.

@JumpLink JumpLink changed the title WIP Allow to toggle between package.json support Jul 18, 2024
@JumpLink JumpLink marked this pull request as ready for review July 19, 2024 05:52
@JumpLink JumpLink changed the title Allow to toggle between package.json support Allow to toggle between package.json support + further cleanups from the gi.ts merge Jul 19, 2024
@JumpLink JumpLink merged commit 199bb13 into main Jul 19, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The buildType option doesn't work yet.
2 participants