From 2504a244caf97e0a565d90892c28f4ea55a8fdfb Mon Sep 17 00:00:00 2001 From: David Date: Tue, 2 Apr 2024 16:55:12 +0200 Subject: [PATCH 1/4] Bump dependencies, to support latest analyzer --- crimson_test/pubspec.lock | 144 ++++++++++++++++++++------------------ crimson_test/pubspec.yaml | 16 ++--- pubspec.lock | 94 +++++++++++++------------ pubspec.yaml | 10 +-- 4 files changed, 140 insertions(+), 124 deletions(-) diff --git a/crimson_test/pubspec.lock b/crimson_test/pubspec.lock index 5c48cac..4e800d9 100644 --- a/crimson_test/pubspec.lock +++ b/crimson_test/pubspec.lock @@ -5,18 +5,18 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" url: "https://pub.dev" source: hosted - version: "61.0.0" + version: "67.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562 + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" url: "https://pub.dev" source: hosted - version: "5.13.0" + version: "6.4.1" args: dependency: transitive description: @@ -45,10 +45,10 @@ packages: dependency: transitive description: name: build - sha256: "43865b79fbb78532e4bff7c33087aa43b1d488c4fdef014eaef568af6d8016dc" + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.1" build_config: dependency: transitive description: @@ -61,34 +61,34 @@ packages: dependency: transitive description: name: build_daemon - sha256: "5f02d73eb2ba16483e693f80bee4f088563a820e47d1027d4cdfe62b5bb43e65" + sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.0.1" build_resolvers: dependency: transitive description: name: build_resolvers - sha256: db49b8609ef8c81cca2b310618c3017c00f03a92af44c04d310b907b2d692d95 + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.4.2" build_runner: dependency: "direct main" description: name: build_runner - sha256: "5e1929ad37d48bd382b124266cb8e521de5548d406a45a5ae6656c13dab73e37" + sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" url: "https://pub.dev" source: hosted - version: "2.4.5" + version: "2.4.9" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: "6d6ee4276b1c5f34f21fdf39425202712d2be82019983d52f351c94aafbc2c41" + sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" url: "https://pub.dev" source: hosted - version: "7.2.10" + version: "7.3.0" built_collection: dependency: transitive description: @@ -101,10 +101,10 @@ packages: dependency: transitive description: name: built_value - sha256: "598a2a682e2a7a90f08ba39c0aaa9374c5112340f0a2e275f61b59389543d166" + sha256: fedde275e0a6b798c3296963c5cd224e3e1b55d0e478d5b7e65e6b540f363a0e url: "https://pub.dev" source: hosted - version: "8.6.1" + version: "8.9.1" checked_yaml: dependency: transitive description: @@ -125,18 +125,18 @@ packages: dependency: transitive description: name: code_builder - sha256: "4ad01d6e56db961d29661561effde45e519939fdaeb46c351275b182eac70189" + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 url: "https://pub.dev" source: hosted - version: "4.5.0" + version: "4.10.0" collection: dependency: transitive description: name: collection - sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.17.2" + version: "1.18.0" convert: dependency: transitive description: @@ -149,17 +149,17 @@ packages: dependency: transitive description: name: coverage - sha256: "2fb815080e44a09b85e0f2ca8a820b15053982b2e714b59267719e8a9ff17097" + sha256: "8acabb8306b57a409bf4c83522065672ee13179297a6bb0cb9ead73948df7c76" url: "https://pub.dev" source: hosted - version: "1.6.3" + version: "1.7.2" crimson: dependency: "direct main" description: path: ".." relative: true source: path - version: "0.3.1" + version: "0.4.0" crypto: dependency: transitive description: @@ -172,18 +172,18 @@ packages: dependency: "direct main" description: name: dart_json_mapper - sha256: e53c6ef117b3315edb73fb2e3c7b492977add1eb5755e83a1841affdaf40959d + sha256: fe6033901157b77e217688b995e1090d37bc38dddb288ca54f217efa5dffed85 url: "https://pub.dev" source: hosted - version: "2.2.7+1" + version: "2.2.12+1" dart_style: dependency: transitive description: name: dart_style - sha256: f4f1f73ab3fd2afcbcca165ee601fe980d966af6a21b5970c6c9376955c528ad + sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.6" file: dependency: transitive description: @@ -204,26 +204,26 @@ packages: dependency: "direct main" description: name: freezed - sha256: a9520490532087cf38bf3f7de478ab6ebeb5f68bb1eb2641546d92719b224445 + sha256: "57247f692f35f068cae297549a46a9a097100685c6780fe67177503eea5ed4e5" url: "https://pub.dev" source: hosted - version: "2.3.5" + version: "2.4.7" freezed_annotation: dependency: "direct main" description: name: freezed_annotation - sha256: aeac15850ef1b38ee368d4c53ba9a847e900bb2c53a4db3f6881cbb3cb684338 + sha256: c3fd9336eb55a38cc1bbd79ab17573113a8deccd0ecbbf926cca3c62803b5c2d url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.4.1" frontend_server_client: dependency: transitive description: name: frontend_server_client - sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "4.0.0" glob: dependency: transitive description: @@ -260,10 +260,10 @@ packages: dependency: "direct main" description: name: intl - sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.17.0" + version: "0.19.0" io: dependency: transitive description: @@ -276,10 +276,10 @@ packages: dependency: transitive description: name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf url: "https://pub.dev" source: hosted - version: "0.6.7" + version: "0.7.1" json_annotation: dependency: transitive description: @@ -292,10 +292,10 @@ packages: dependency: "direct main" description: name: json_serializable - sha256: "61a60716544392a82726dd0fa1dd6f5f1fd32aec66422b6e229e7b90d52325c4" + sha256: aa1f5a8912615733e0fdc7a02af03308933c93235bdc8d50d0b0c8a8ccb0b969 url: "https://pub.dev" source: hosted - version: "6.7.0" + version: "6.7.1" logging: dependency: transitive description: @@ -308,26 +308,26 @@ packages: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" meta: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.12.0" mime: dependency: transitive description: name: mime - sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.5" node_preamble: dependency: transitive description: @@ -348,10 +348,10 @@ packages: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" pool: dependency: transitive description: @@ -380,10 +380,10 @@ packages: dependency: transitive description: name: reflectable - sha256: "775388897bfce5b1d0386b7160706367b565cdc72b5870bc6a198d0f7be1aa0b" + sha256: cdc1a278a2e9769abafaf9ba54ce1fd3432b2a38360e14b87ea6344f715340de url: "https://pub.dev" source: hosted - version: "4.0.5" + version: "4.0.6" shelf: dependency: transitive description: @@ -420,18 +420,18 @@ packages: dependency: transitive description: name: source_gen - sha256: "373f96cf5a8744bc9816c1ff41cf5391bbdbe3d7a96fe98c622b6738a8a7bd33" + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.5.0" source_helper: dependency: transitive description: name: source_helper - sha256: "3b67aade1d52416149c633ba1bb36df44d97c6b51830c2198e934e3fca87ca1f" + sha256: "6adebc0006c37dd63fe05bca0a929b99f06402fc95aa35bf36d67f5c06de01fd" url: "https://pub.dev" source: hosted - version: "1.3.3" + version: "1.3.4" source_map_stack_trace: dependency: transitive description: @@ -460,10 +460,10 @@ packages: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.11.1" stream_channel: dependency: transitive description: @@ -500,26 +500,26 @@ packages: dependency: "direct main" description: name: test - sha256: "67ec5684c7a19b2aba91d2831f3d305a6fd8e1504629c5818f8d64478abf4f38" + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" url: "https://pub.dev" source: hosted - version: "1.24.4" + version: "1.25.2" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" test_core: dependency: transitive description: name: test_core - sha256: "6b753899253c38ca0523bb0eccff3934ec83d011705dae717c61ecf209e333c9" + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" url: "https://pub.dev" source: hosted - version: "0.5.4" + version: "0.6.0" timing: dependency: transitive description: @@ -540,10 +540,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b8c67f5fa3897b122cf60fe9ff314f7b0ef71eab25c5f8b771480bc338f48823 + sha256: a75f83f14ad81d5fe4b3319710b90dec37da0e22612326b696c9e1b8f34bbf48 url: "https://pub.dev" source: hosted - version: "11.7.2" + version: "14.2.0" watcher: dependency: transitive description: @@ -552,22 +552,30 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" + web: + dependency: transitive + description: + name: web + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + url: "https://pub.dev" + source: hosted + version: "0.5.1" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + sha256: "1d8e795e2a8b3730c41b8a98a2dff2e0fb57ae6f0764a1c46ec5915387d257b2" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.4" webkit_inspection_protocol: dependency: transitive description: name: webkit_inspection_protocol - sha256: "67d3a8b6c79e1987d19d848b0892e582dbb0c66c57cc1fef58a177dd2aa2823d" + sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" yaml: dependency: transitive description: @@ -577,4 +585,4 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.0.0 <4.0.0" + dart: ">=3.3.0 <4.0.0" diff --git a/crimson_test/pubspec.yaml b/crimson_test/pubspec.yaml index a53dcec..5695035 100644 --- a/crimson_test/pubspec.yaml +++ b/crimson_test/pubspec.yaml @@ -2,15 +2,15 @@ name: crimson_test publish_to: none environment: - sdk: ">=2.18.4 <3.0.0" + sdk: ">=2.18.4 <4.0.0" dependencies: crimson: path: ../ - intl: ^0.17.0 - json_serializable: ^6.5.4 - build_runner: ^2.1.4 - test: ^1.22.1 - freezed_annotation: ^2.2.0 - dart_json_mapper: ^2.2.7 - freezed: ^2.3.2 + intl: ^0.19.0 + json_serializable: ^6.7.0 + build_runner: ^2.4.7 + test: ^1.24.4 + freezed_annotation: ^2.4.0 + dart_json_mapper: ^2.2.10 + freezed: ^2.4.0 diff --git a/pubspec.lock b/pubspec.lock index 3d075c3..6209d5e 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,18 +5,18 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" url: "https://pub.dev" source: hosted - version: "61.0.0" + version: "67.0.0" analyzer: dependency: "direct main" description: name: analyzer - sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562 + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" url: "https://pub.dev" source: hosted - version: "5.13.0" + version: "6.4.1" args: dependency: transitive description: @@ -45,18 +45,18 @@ packages: dependency: "direct main" description: name: build - sha256: "43865b79fbb78532e4bff7c33087aa43b1d488c4fdef014eaef568af6d8016dc" + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.1" collection: dependency: transitive description: name: collection - sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.17.2" + version: "1.18.0" convert: dependency: transitive description: @@ -69,10 +69,10 @@ packages: dependency: transitive description: name: coverage - sha256: "2fb815080e44a09b85e0f2ca8a820b15053982b2e714b59267719e8a9ff17097" + sha256: "8acabb8306b57a409bf4c83522065672ee13179297a6bb0cb9ead73948df7c76" url: "https://pub.dev" source: hosted - version: "1.6.3" + version: "1.7.2" crypto: dependency: transitive description: @@ -85,10 +85,10 @@ packages: dependency: transitive description: name: dart_style - sha256: f4f1f73ab3fd2afcbcca165ee601fe980d966af6a21b5970c6c9376955c528ad + sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.6" file: dependency: transitive description: @@ -101,10 +101,10 @@ packages: dependency: transitive description: name: frontend_server_client - sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "4.0.0" glob: dependency: transitive description: @@ -141,10 +141,10 @@ packages: dependency: transitive description: name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf url: "https://pub.dev" source: hosted - version: "0.6.7" + version: "0.7.1" logging: dependency: transitive description: @@ -157,26 +157,26 @@ packages: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" meta: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.12.0" mime: dependency: transitive description: name: mime - sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.5" node_preamble: dependency: transitive description: @@ -197,10 +197,10 @@ packages: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" pool: dependency: transitive description: @@ -253,10 +253,10 @@ packages: dependency: "direct main" description: name: source_gen - sha256: "373f96cf5a8744bc9816c1ff41cf5391bbdbe3d7a96fe98c622b6738a8a7bd33" + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.5.0" source_map_stack_trace: dependency: transitive description: @@ -285,10 +285,10 @@ packages: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.11.1" stream_channel: dependency: transitive description: @@ -317,26 +317,26 @@ packages: dependency: "direct dev" description: name: test - sha256: "67ec5684c7a19b2aba91d2831f3d305a6fd8e1504629c5818f8d64478abf4f38" + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" url: "https://pub.dev" source: hosted - version: "1.24.4" + version: "1.25.2" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" test_core: dependency: transitive description: name: test_core - sha256: "6b753899253c38ca0523bb0eccff3934ec83d011705dae717c61ecf209e333c9" + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" url: "https://pub.dev" source: hosted - version: "0.5.4" + version: "0.6.0" typed_data: dependency: transitive description: @@ -349,18 +349,18 @@ packages: dependency: "direct dev" description: name: very_good_analysis - sha256: "4815adc7ded57657038d2bb2a7f332c50e3c8152f7d3c6acf8f6b7c0cc81e5e2" + sha256: "9ae7f3a3bd5764fb021b335ca28a34f040cd0ab6eec00a1b213b445dae58a4b8" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "5.1.0" vm_service: dependency: transitive description: name: vm_service - sha256: b8c67f5fa3897b122cf60fe9ff314f7b0ef71eab25c5f8b771480bc338f48823 + sha256: a75f83f14ad81d5fe4b3319710b90dec37da0e22612326b696c9e1b8f34bbf48 url: "https://pub.dev" source: hosted - version: "11.7.2" + version: "14.2.0" watcher: dependency: transitive description: @@ -369,22 +369,30 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" + web: + dependency: transitive + description: + name: web + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + url: "https://pub.dev" + source: hosted + version: "0.5.1" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + sha256: "1d8e795e2a8b3730c41b8a98a2dff2e0fb57ae6f0764a1c46ec5915387d257b2" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.4" webkit_inspection_protocol: dependency: transitive description: name: webkit_inspection_protocol - sha256: "67d3a8b6c79e1987d19d848b0892e582dbb0c66c57cc1fef58a177dd2aa2823d" + sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" yaml: dependency: transitive description: @@ -394,4 +402,4 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.0.0 <4.0.0" + dart: ">=3.3.0 <4.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 50c4d30..467d82f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,16 +1,16 @@ name: crimson description: Fast, efficient and easy-to-use JSON parser and serializer for Dart. repository: https://github.com/simc/crimson -version: 0.3.1 +version: 0.4.0 environment: sdk: ">=3.0.0 <4.0.0" dependencies: - analyzer: ^5.13.0 + analyzer: ^6.0.0 build: ^2.4.0 - source_gen: ^1.3.2 + source_gen: ^1.4.0 dev_dependencies: - test: ^1.16.0 - very_good_analysis: ^3.1.0 + test: ^1.24.4 + very_good_analysis: ^5.1.0 From 21f5c20ccab28dc57e72d84957ae581f3dbe22ef Mon Sep 17 00:00:00 2001 From: David Date: Tue, 2 Apr 2024 16:55:34 +0200 Subject: [PATCH 2/4] fix freezed support --- lib/src/generator/from_factory.dart | 19 +++++++++++++++---- lib/src/generator/util.dart | 8 +++++++- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/lib/src/generator/from_factory.dart b/lib/src/generator/from_factory.dart index f18cf91..7a88b97 100644 --- a/lib/src/generator/from_factory.dart +++ b/lib/src/generator/from_factory.dart @@ -3,10 +3,21 @@ import 'package:crimson/src/generator/util.dart'; /// @nodoc String generateFromFactory(ClassElement element) { - if (element.hasFromConstructor('fromJson', 'Uint8List')) { - return _generateExtension(element, 'Json'); - } else if (element.hasFromConstructor('fromBytes', 'Uint8List')) { - return _generateExtension(element, 'Bytes'); + var ele = element; + // check originalClass for freezed + if (element.displayName.startsWith(r'_$') && + element.displayName.endsWith('Impl')) { + final interface = element.interfaces + .firstWhere((e) => e.element.displayName == '_${element.cleanName}'); + final originalClass = interface.interfaces + .firstWhere((e) => e.element.displayName == element.cleanName); + ele = originalClass.element as ClassElement; + } + + if (ele.hasFromConstructor('fromJson', 'Uint8List')) { + return _generateExtension(ele, 'Json'); + } else if (ele.hasFromConstructor('fromBytes', 'Uint8List')) { + return _generateExtension(ele, 'Bytes'); } else { return ''; } diff --git a/lib/src/generator/util.dart b/lib/src/generator/util.dart index 722b3eb..eeeaa35 100644 --- a/lib/src/generator/util.dart +++ b/lib/src/generator/util.dart @@ -16,7 +16,13 @@ const TypeChecker _convertChecker = TypeChecker.fromRuntime(JsonConvert); extension ClassElementX on ClassElement { String get cleanName { // hack to fix freezed names - return displayName.replaceFirst(r'_$_', ''); + if (displayName.startsWith(r'_$') && displayName.endsWith('Impl')) { + return displayName + .substring(0, name.length - 4) // remove Impl + .replaceFirst(r'_$', ''); // remove _$ + } + + return displayName; } List get allAccessors { From 6abc01c1e3de50716bd24d37ca4c0319f2bc2baa Mon Sep 17 00:00:00 2001 From: David Date: Tue, 2 Apr 2024 17:05:42 +0200 Subject: [PATCH 3/4] fix lints require_trailing_commas, unnecessary_breaks, unnecessary_cast --- crimson_test/test/crimson_test.dart | 2 +- crimson_test/test/pointer_test.dart | 2 +- lib/src/crimson.dart | 12 ------------ lib/src/crimson_writer.dart | 7 ------- lib/src/generator/util.dart | 2 +- 5 files changed, 3 insertions(+), 22 deletions(-) diff --git a/crimson_test/test/crimson_test.dart b/crimson_test/test/crimson_test.dart index c54ac66..d65299d 100644 --- a/crimson_test/test/crimson_test.dart +++ b/crimson_test/test/crimson_test.dart @@ -51,7 +51,7 @@ void main() { } void testJsonRead(String json) { - final crimson = Crimson(utf8.encode(json) as Uint8List); + final crimson = Crimson(utf8.encode(json)); final crimsonResult = crimson.read(); final jsonResult = jsonDecode(json); expect(crimsonResult, equals(jsonResult, 1000)); diff --git a/crimson_test/test/pointer_test.dart b/crimson_test/test/pointer_test.dart index 11bcd4c..80e0475 100644 --- a/crimson_test/test/pointer_test.dart +++ b/crimson_test/test/pointer_test.dart @@ -85,7 +85,7 @@ class PointerTest { } Uint8List bytes(Map json) { - return utf8.encode(jsonEncode(json)) as Uint8List; + return utf8.encode(jsonEncode(json)); } const rfcJson = { diff --git a/lib/src/crimson.dart b/lib/src/crimson.dart index da13239..2ed23e3 100644 --- a/lib/src/crimson.dart +++ b/lib/src/crimson.dart @@ -67,22 +67,16 @@ class Crimson { switch (buffer[_offset++]) { case tokenDoubleQuote: _skipString(); - break; case tokenT: _offset += 3; - break; case tokenF: _offset += 4; - break; case tokenN: _offset += 3; - break; case tokenLBracket: skipPartialArray(); - break; case tokenLBrace: skipPartialObject(); - break; default: _skipNumber(); break; @@ -145,10 +139,8 @@ class Crimson { _offset = i; _skipString(); i = _offset; - break; case tokenLBracket: // If open symbol, increase level level++; - break; case tokenRBracket: // If close symbol, decrease level level--; // If we have returned to the original level, we're done @@ -156,7 +148,6 @@ class Crimson { _offset = i; return; } - break; } } } @@ -171,10 +162,8 @@ class Crimson { _offset = i; _skipString(); i = _offset; - break; case tokenLBrace: // If open symbol, increase level level++; - break; case tokenRBrace: // If close symbol, decrease level level--; @@ -183,7 +172,6 @@ class Crimson { _offset = i; return; } - break; } } } diff --git a/lib/src/crimson_writer.dart b/lib/src/crimson_writer.dart index 297ccef..2ba506b 100644 --- a/lib/src/crimson_writer.dart +++ b/lib/src/crimson_writer.dart @@ -56,31 +56,24 @@ class CrimsonWriter { case tokenDoubleQuote: _buffer[offset++] = tokenBackslash; _buffer[offset++] = tokenDoubleQuote; - break; case tokenBackslash: _buffer[offset++] = tokenBackslash; _buffer[offset++] = tokenBackslash; - break; case tokenBackspace: _buffer[offset++] = tokenBackslash; _buffer[offset++] = tokenB; - break; case tokenFormFeed: _buffer[offset++] = tokenBackslash; _buffer[offset++] = tokenF; - break; case tokenLineFeed: _buffer[offset++] = tokenBackslash; _buffer[offset++] = tokenN; - break; case tokenCarriageReturn: _buffer[offset++] = tokenBackslash; _buffer[offset++] = tokenR; - break; case tokenTab: _buffer[offset++] = tokenBackslash; _buffer[offset++] = tokenT; - break; default: _buffer[offset++] = tokenBackslash; _buffer[offset++] = tokenU; diff --git a/lib/src/generator/util.dart b/lib/src/generator/util.dart index eeeaa35..14b402b 100644 --- a/lib/src/generator/util.dart +++ b/lib/src/generator/util.dart @@ -31,7 +31,7 @@ extension ClassElementX on ClassElement { ...accessors.map((e) => e.variable), for (final supertype in allSupertypes) ...[ if (!supertype.isDartCoreObject) - ...supertype.accessors.map((e) => e.variable) + ...supertype.accessors.map((e) => e.variable), ], ] .where( From 84788612e5176998fe6341d90d00e6aa8d6bb3d6 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 2 Apr 2024 17:10:48 +0200 Subject: [PATCH 4/4] Add changelog entry --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fcfd338..6a996de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 0.4.0 + +- Bump dependencies, to support latest analyzer +- Fixed support for freezed classes and from factories + # 0.3.1 - Bump dependencies @@ -33,7 +38,7 @@ # 0.1.1 - Fixed edge cases -- Added verfication of data types +- Added verification of data types - Minor performance improvements # 0.1.0