Commit Graph
684 Commits
Author SHA1 Message Date
xazukx b5c8277ac9 Fix rename test 2025-06-19 18:18:24 -06:00
xazukx c1de25aa1d Add test for a renamed variant. 2025-06-10 12:32:11 -06:00
xazukx 836e3606fe Update documentation for typescript enums. 2025-06-10 12:20:39 -06:00
xazukx b9f212886b Add ability to create native typescript enums instead of unions. 2025-06-10 12:00:10 -06:00
NyxCode 3bd4124bd1 release v11.0.1 (#417) 2025-06-05 07:13:17 +02:00
NyxCode dc2892f441 fix regression: #[ts(optional)] incompatible with #[ts(type = ...)] (#416) 2025-06-04 08:47:33 -03:00
NyxCode a7b73a50f8 release v11.0.0 (#413) 2025-06-03 18:00:07 +02:00
6075bd1bc3 Handle serde(skip_serializing_if) + serde(default) (#393)
* `skip_serializing_if` assumes that object’s field may not exist

* update implementation to match the two special-cases mentioned

* fix comment

* update README.md

* Run cargo +nightly fmt to attempt to resolve merge conflict

* update changelog

* fix typo in emitted compiler errors

* add missing functionality to test, add TODOs

* implement #[ts(optional)] for tuple structs

* avoid triggering TS1257

* implement override

* adjust docs, add one more test

* adjust docs

* clarify comment on optional::apply

* typo

---------

Co-authored-by: Moritz Bischof <moritz.bischof1@gmail.com>
Co-authored-by: gustavo-shigueo <gustavo.gsmn@gmail.com>
2025-06-03 17:34:23 +02:00
Gustavo Shigueo 5a448a25be Allow #[ts(flatten)] for fields of type HashMap (#406)
* Add test

* Implement inline_flattened

* Update changelog

* Add missing comma

* Update HashMap flattenning

* Update test
2025-06-03 13:48:34 +02:00
NyxCode 0dbaa5efab Allow arbitrary expressions in #[doc] (#411) 2025-05-30 11:58:10 -03:00
Gustavo Shigueo 315bed8f3f Remove duplicate validation (#404)
* Remove duplicated validation of struct attributes

* Fix clippy warnings

* Revert MSRV break
2025-05-30 00:17:43 +02:00
NyxCode 40b82771c8 Allow arbitrary expressions in #[ts(export_to)] (#399) 2025-04-04 18:17:03 -03:00
NyxCode f64db436e8 Allow arbitrary expressions in top-level #[ts(rename)] (#398) 2025-04-04 15:07:41 -03:00
Gustavo Shigueo 6b234149fb Merge same path imports (#392) 2025-04-03 12:00:05 -03:00
Gustavo Shigueo 7b7ec40669 Handle serde fail gracefully (#389) 2025-04-03 11:50:10 -03:00
Gustavo Shigueo ee2240db94 Prevent naming collisions with <T as crate::TS> (#386) 2025-03-06 17:55:08 -03:00
Gustavo Shigueo 594fa3027a Fix top level #[ts(as = "...")] dependency list (#385) 2025-03-06 17:07:23 -03:00
ValiuchenkoVladyslav ccb1b14229 remove lazy_static (#373) 2025-02-22 12:54:49 -03:00
Gustavo Shigueo 278dd37c45 Add MSRV test to CI (#381) 2025-02-22 12:20:15 -03:00
Gustavo ShigueoandNyxCode ad0f22917e Add #[ts(optional)] to struct (#366)
* Parse #[ts(optional_fields)] on structs
* compile-time checked `#[ts(optional)]` (#367)
* #[ts(type)] overrides #[ts(optional_fields)]
* Make #[ts(type)] and #[ts(optional)] incompatible
* Update MSRV

---------

Co-authored-by: NyxCode <moritz.bischof1@gmail.com>
2025-02-21 09:19:05 -03:00
NyxCode 0ba56be43a Release v10.1 (#372)
* prepare v10.1

* cargo update

* bump thiserror to v2
2024-12-01 15:49:48 +01:00
Gustavo Shigueo 64382968c5 Fix empty struct tagged enum variant (#371) 2024-11-25 13:24:21 -03:00
Sebastian Martinez 93aec35cef Fix typo in docs for #[ts(rename_all_fields)] (#368) 2024-11-13 09:23:32 -03:00
Gustavo Shigueo 0ff3c816ed Add generated type to README (#365) 2024-11-03 11:25:15 -03:00
Dessalines 592898a764 Add cargo test export_bindings to README (#363) 2024-11-03 11:11:21 -03:00
Joris Kleiber 4aea173270 feat: add support for tokio (#353) 2024-10-10 08:42:10 -03:00
NyxCode 5504e9f9bf include null in serde_json::Value (#359) 2024-10-08 08:08:07 -03:00
Guillaume Deconinck 51a7a87a54 feat(serde-json-impl): handle bool for serde_json::Value (#358) 2024-10-07 14:26:18 +02:00
Moritz Bischof a05cd36679 release v10.0 2024-09-19 21:46:02 +02:00
escritorio-gustavoandGustavo Shigueo 9763ca0195 Support #[ts(as = "...")] and #[ts(type = "...")] on enum variants (#284)
Co-authored-by: Gustavo Shigueo <gustavo.gsmn@gmail.com>
2024-09-16 16:57:57 -03:00
Gustavo Shigueo 6651d920cb Fix smol_str-impl feature name in lib.rs 2024-09-07 15:13:21 -03:00
Gustavo Shigueo fb47428d23 Fix smol_str-impl feature name in test 2024-09-07 14:28:03 -03:00
Gustavo Shigueo 61a6d6a1fd Fix smol_str-impl feature name 2024-09-07 14:25:34 -03:00
Corvin Paul 7577aca5d2 feature: support smol_str (#350) 2024-09-07 10:44:20 -03:00
Gustavo Shigueo 78591a2831 Always use forward slash on import paths (#346) 2024-08-09 08:43:22 -03:00
escritorio-gustavoandgustavo-shigueo 5cbc7405d8 feat: Allow multiple types to set #[ts(export_to = "...")] to the same file (#316)
---------

Co-authored-by: gustavo-shigueo <gustavo.gsmn@gmail.com>
2024-08-01 18:15:19 -03:00
Gustavo Shigueo 5c3b8c9457 Fix error in internally tagged enums with flattened fields (#344) 2024-07-27 12:19:47 -03:00
gustavo-shigueo 7ee0cbc570 Update CHANGELOG 2024-07-25 15:41:25 -03:00
gustavo-shigueo 61f1c9c663 Run cargo fmt 2024-07-25 15:34:02 -03:00
Gustavo Shigueo e08161c790 Fix JSDoc formatting for Rust block comments (#342) 2024-07-25 15:20:38 -03:00
Shaun Hamiltonandgustavo-shigueo e268437ffd feat: add bson ObjectId impl (#340)
Co-authored-by: gustavo-shigueo <gustavo.gsmn@gmail.com>
2024-07-24 12:45:54 -03:00
Gustavo Shigueo 68f2f2252a Change HashMap to export mapped types (#339) 2024-07-05 14:47:18 -03:00
NyxCode af15ff92d7 Allow for flattening of generic parameters (#336) 2024-06-28 02:07:52 +02:00
NyxCode 96487d4afa Merge pull request #331 from Aleph-Alpha/release-v9
Release v9.0.0
2024-06-20 19:04:19 +02:00
Moritz Bischof c7c8ff329d Release v9.0.0 2024-06-20 18:58:50 +02:00
Moritz Bischof c9615f6601 update lockfile 2024-06-20 18:56:58 +02:00
Moritz Bischof 743e715f8e prepare release for 9.0.0 2024-06-20 18:54:28 +02:00
escritorio-gustavo be0349d5fb bug: Fix issue with absolute paths (#323) 2024-06-04 14:08:19 -03:00
Luc Perkins f898578d80 Insert newline at end of generated files (#321) 2024-05-22 17:59:41 -03:00
NyxCode badbac08e6 Testing with --no-default-features didnt seem to work in CI (#319) 2024-05-20 08:36:36 -03:00