diff --git a/bin/utils/dart-keywords/README.md b/bin/utils/dart-keywords/README.md index 2873e00dbe1..2d14a81b61d 100644 --- a/bin/utils/dart-keywords/README.md +++ b/bin/utils/dart-keywords/README.md @@ -11,10 +11,7 @@ The last Dart version that was used to generate the keywords can be found in `da ## What does the shellscript do? -1. compile a dart app - - `dart2native save-dart-keywords.dart` - 1. run the dart app - - `./save-dart-keywords.exe` + - `dart run save-dart-keywords.dart` 1. the output is `dart-keywords.txt` and `dart-version.txt` diff --git a/bin/utils/dart-keywords/dart-version.txt b/bin/utils/dart-keywords/dart-version.txt index 81b2d0d2cd6..d580ed2666a 100644 --- a/bin/utils/dart-keywords/dart-version.txt +++ b/bin/utils/dart-keywords/dart-version.txt @@ -1 +1 @@ -Dart VM version: 2.7.0-dev.0.0 (Tue Nov 5 12:57:33 2019 +0100) on "macos_x64" +Dart SDK version: 3.3.0 (stable) (Tue Feb 13 10:25:19 2024 +0000) on "macos_arm64" diff --git a/bin/utils/dart-keywords/pubspec.lock b/bin/utils/dart-keywords/pubspec.lock index f01fb3f2efb..62299e22a52 100644 --- a/bin/utils/dart-keywords/pubspec.lock +++ b/bin/utils/dart-keywords/pubspec.lock @@ -5,190 +5,145 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - url: "https://pub.dartlang.org" + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" + url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "67.0.0" analyzer: dependency: "direct main" description: name: analyzer - url: "https://pub.dartlang.org" + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" + url: "https://pub.dev" source: hosted - version: "0.39.1" - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "1.5.2" + version: "6.4.1" async: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" source: hosted - version: "2.4.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.2" + version: "2.11.0" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" source: hosted - version: "1.14.12" + version: "1.18.0" convert: dependency: transitive description: name: convert - url: "https://pub.dartlang.org" + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "3.1.1" crypto: dependency: transitive description: name: crypto - url: "https://pub.dartlang.org" + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" source: hosted - version: "2.1.3" - csslib: + version: "3.0.3" + file: dependency: transitive description: - name: csslib - url: "https://pub.dartlang.org" + name: file + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + url: "https://pub.dev" source: hosted - version: "0.16.1" - front_end: - dependency: transitive - description: - name: front_end - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.29" + version: "7.0.0" glob: dependency: transitive description: name: glob - url: "https://pub.dartlang.org" + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" source: hosted - version: "1.2.0" - html: - dependency: transitive - description: - name: html - url: "https://pub.dartlang.org" - source: hosted - version: "0.14.0+3" - js: - dependency: transitive - description: - name: js - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.1+1" - kernel: - dependency: transitive - description: - name: kernel - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.29" + version: "2.1.2" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + url: "https://pub.dev" source: hosted - version: "1.1.8" - node_interop: - dependency: transitive - description: - name: node_interop - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.3" - node_io: - dependency: transitive - description: - name: node_io - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1+2" + version: "1.12.0" package_config: dependency: transitive description: name: package_config - url: "https://pub.dartlang.org" + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "2.1.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" source: hosted - version: "1.6.4" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0+1" + version: "1.9.0" pub_semver: dependency: transitive description: name: pub_semver - url: "https://pub.dartlang.org" + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" source: hosted - version: "1.4.2" + version: "2.1.4" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" source: hosted - version: "1.5.5" + version: "1.10.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.2.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.1" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" source: hosted - version: "1.1.6" + version: "1.3.2" watcher: dependency: transitive description: name: watcher - url: "https://pub.dartlang.org" + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" source: hosted - version: "0.9.7+12" + version: "1.1.0" yaml: dependency: transitive description: name: yaml - url: "https://pub.dartlang.org" + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "3.1.2" sdks: - dart: ">=2.6.0 <3.0.0" + dart: ">=3.0.0 <4.0.0" diff --git a/bin/utils/dart-keywords/pubspec.yaml b/bin/utils/dart-keywords/pubspec.yaml index addb9924168..51e99b0ee94 100644 --- a/bin/utils/dart-keywords/pubspec.yaml +++ b/bin/utils/dart-keywords/pubspec.yaml @@ -4,7 +4,7 @@ description: Use the Dart SDK to generate Dart keywords. version: 1.0.0+1 environment: - sdk: ">=2.6.0 <3.0.0" + sdk: ">=3.0.0 <4.0.0" dependencies: analyzer: diff --git a/bin/utils/dart-keywords/save-dart-keywords.dart b/bin/utils/dart-keywords/save-dart-keywords.dart index 4ad6908a3d5..c48de13d376 100644 --- a/bin/utils/dart-keywords/save-dart-keywords.dart +++ b/bin/utils/dart-keywords/save-dart-keywords.dart @@ -4,13 +4,8 @@ import 'package:analyzer/dart/ast/token.dart'; main() { // save keywords to a text file - final txtFile = File( + final output = File( '../../../modules/openapi-generator/src/main/resources/dart/dart-keywords.txt'); - String txtString = ''; - for (String keyword in Keyword.keywords.keys.toList()) { - txtString += keyword + '\n'; - } - txtString = - txtString.substring(0, txtString.length - 1); // remove last newline - txtFile.writeAsStringSync(txtString); + final keywords = Keyword.keywords.keys.join('\n'); + output.writeAsStringSync(keywords); } diff --git a/bin/utils/dart-keywords/save_dart_keywords.sh b/bin/utils/dart-keywords/save_dart_keywords.sh index 4211200c8e5..5cb1e40173f 100755 --- a/bin/utils/dart-keywords/save_dart_keywords.sh +++ b/bin/utils/dart-keywords/save_dart_keywords.sh @@ -1,3 +1,2 @@ -dart2native save-dart-keywords.dart -./save-dart-keywords.exe -dart --version &> dart-version.txt \ No newline at end of file +dart run save-dart-keywords.dart +dart --version &> dart-version.txt diff --git a/docs/generators/dart-dio.md b/docs/generators/dart-dio.md index 644631f6272..a8d6607f1dc 100644 --- a/docs/generators/dart-dio.md +++ b/docs/generators/dart-dio.md @@ -70,7 +70,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl