1313// limitations under the License.
1414
1515import 'dart:io' show Directory, File;
16- import 'package:path/path.dart' show joinAll;
16+ import 'package:path/path.dart' show basename, joinAll;
1717import 'package:yaml/yaml.dart' show YamlMap, loadYaml;
1818
1919Future <void > main () async {
@@ -23,7 +23,7 @@ Future<void> main() async {
2323 // Find all packages with _web directories
2424 await for (final packageDir in packagesDir.list ()) {
2525 if (packageDir is Directory ) {
26- final packageName = packageDir.path. split ( '/' ).last ;
26+ final packageName = basename ( packageDir.path) ;
2727 final webDir = Directory (joinAll ([packageDir.path, '${packageName }_web' ]));
2828
2929 if (await webDir.exists ()) {
@@ -77,7 +77,8 @@ Future<void> _generateVersionFile(String packageName) async {
7777 print ('Processing $webPackageName version $currentVersion ' );
7878
7979 // Create the version file content
80- final fileContent = '''// Copyright 2025 Google LLC
80+ final fileContent = '''
81+ // Copyright 2025 Google LLC
8182//
8283// Licensed under the Apache License, Version 2.0 (the "License");
8384// you may not use this file except in compliance with the License.
0 commit comments