From f0656b4a72f67568d1d718a4bcb3ff698ab436d4 Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Mon, 11 Sep 2023 11:53:45 -0500 Subject: [PATCH] Fix a few minor spelling mistakes (#2209) --- .github/workflows/changelog_reminder.yml | 2 +- dwds/CONTRIBUTING.md | 10 +++---- dwds/debug_extension/web/background.dart | 2 +- .../tool/build_extension.dart | 4 +-- dwds/debug_extension_mv3/web/storage.dart | 30 +++++++++---------- dwds/lib/data/extension_request.dart | 4 +-- dwds/lib/src/debugging/classes.dart | 2 +- dwds/lib/src/debugging/execution_context.dart | 2 +- dwds/lib/src/events.dart | 2 +- dwds/lib/src/handlers/injector.dart | 2 +- dwds/lib/src/handlers/socket_connections.dart | 10 +++---- dwds/test/chrome_proxy_service_test.dart | 6 ++-- dwds/test/events_test.dart | 2 +- dwds/test/load_strategy_test.dart | 2 +- dwds/test/puppeteer/extension_common.dart | 6 ++-- dwds/test/puppeteer/lifeline_test.dart | 2 +- dwds/test/puppeteer/test_utils.dart | 4 +-- dwds/web/reloader/manager.dart | 2 +- dwds/web/reloader/restarter.dart | 2 +- frontend_server_client/README.md | 4 +-- test_common/lib/logging.dart | 2 +- webdev/test/configuration_test.dart | 2 +- webdev/test/integration_test.dart | 2 +- 23 files changed, 53 insertions(+), 53 deletions(-) diff --git a/.github/workflows/changelog_reminder.yml b/.github/workflows/changelog_reminder.yml index a9b75b410..c13f4d4d8 100644 --- a/.github/workflows/changelog_reminder.yml +++ b/.github/workflows/changelog_reminder.yml @@ -14,7 +14,7 @@ jobs: name: Maybe prevent submission runs-on: ubuntu-latest steps: - - name: Checkout repositiory + - name: Checkout repository uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac - name: Check changed files run: | diff --git a/dwds/CONTRIBUTING.md b/dwds/CONTRIBUTING.md index 4aaa4988a..90f741dc1 100644 --- a/dwds/CONTRIBUTING.md +++ b/dwds/CONTRIBUTING.md @@ -67,8 +67,8 @@ the example app and connect to DWDS. - If DWDS / Webdev was just released, then you will need to update the version in the `CHANGELOG`, and the `pubspec.yaml` file as well (eg, https://github.com/dart-lang/webdev/pull/1462) -- For any directories you’ve touched, `run dart run build_runner` build to check - in the any file that should be built. This will make sure the integration +- For any directories you’ve touched, run `dart run build_runner build` to + check in any file that should be built. This will make sure the integration tests are run against the built files. ## Release steps @@ -127,7 +127,7 @@ you need to: > > This is so that we don’t need to support older versions of the SDK and test > against them, therefore every time the Dart SDK is bumped to a new major or -> minor version, DWDS and Webdev’s min Dart SDK constraint needs to to be +> minor version, DWDS and Webdev’s min Dart SDK constraint needs to be > changed and DWDS and Webdev have to be released. Since DWDS is dependent on > DDC and the runtime API, if we had a looser min constraint we would need to > run tests for all earlier stable releases of the SDK that match the @@ -146,7 +146,7 @@ DWDS in Flutter. 1. Create a branch off the release that needs a hotfix: - a. In the Github UI's + a. In the GitHub UI's [commit history view](https://github.com/dart-lang/webdev/commits/master), find the commit that prepared the release of DWDS that you would like to hotfix. @@ -177,7 +177,7 @@ DWDS in Flutter. 1. Make the fix: - a. You can now make the change you would like to hotfix. From the Github UI, + a. You can now make the change you would like to hotfix. From the GitHub UI, open a PR to merge your change into the branch you created in step #3, **not** `master`. See https://github.com/dart-lang/webdev/pull/1867 as an example. diff --git a/dwds/debug_extension/web/background.dart b/dwds/debug_extension/web/background.dart index 2ce13b51e..68533b191 100644 --- a/dwds/debug_extension/web/background.dart +++ b/dwds/debug_extension/web/background.dart @@ -39,7 +39,7 @@ const _notADartAppAlert = 'No Dart application detected.' // Extensions allowed for cross-extension communication. // // This is only used to forward outgoing messages, as incoming messages are -// restricted by `externally_connectable` in the extension manijest.json. +// restricted by `externally_connectable` in the extension manifest.json. const _allowedExtensions = { 'nbkbficgbembimioedhceniahniffgpl', // AngularDart DevTools }; diff --git a/dwds/debug_extension_mv3/tool/build_extension.dart b/dwds/debug_extension_mv3/tool/build_extension.dart index 32e1a2692..5226e346e 100644 --- a/dwds/debug_extension_mv3/tool/build_extension.dart +++ b/dwds/debug_extension_mv3/tool/build_extension.dart @@ -4,8 +4,8 @@ // INSTRUCTIONS: -// Builds the unminifed dart2js extension (see DDC issue: -// see DDC issue: https://github.com/dart-lang/sdk/issues/49869). +// Builds the unminified dart2js extension (see DDC issue: +// https://github.com/dart-lang/sdk/issues/49869). // Run from the extension root directory: // - For dev: dart run tool/build_extension.dart diff --git a/dwds/debug_extension_mv3/web/storage.dart b/dwds/debug_extension_mv3/web/storage.dart index faaccc0cc..3281783cc 100644 --- a/dwds/debug_extension_mv3/web/storage.dart +++ b/dwds/debug_extension_mv3/web/storage.dart @@ -24,25 +24,25 @@ enum StorageObject { isAuthenticated, multipleAppsDetected; - Persistance get persistance { + Persistence get persistence { switch (this) { case StorageObject.debugInfo: - return Persistance.sessionOnly; + return Persistence.sessionOnly; case StorageObject.devToolsOpener: - return Persistance.acrossSessions; + return Persistence.acrossSessions; case StorageObject.devToolsUri: - return Persistance.sessionOnly; + return Persistence.sessionOnly; case StorageObject.encodedUri: - return Persistance.sessionOnly; + return Persistence.sessionOnly; case StorageObject.isAuthenticated: - return Persistance.sessionOnly; + return Persistence.sessionOnly; case StorageObject.multipleAppsDetected: - return Persistance.sessionOnly; + return Persistence.sessionOnly; } } } -enum Persistance { +enum Persistence { sessionOnly, acrossSessions; } @@ -58,7 +58,7 @@ Future setStorageObject({ value is String ? value : jsonEncode(serializers.serialize(value)); final storageObj = {storageKey: json}; final completer = Completer(); - final storageArea = _getStorageArea(type.persistance); + final storageArea = _getStorageArea(type.persistence); storageArea.set( jsify(storageObj), allowInterop(() { @@ -75,7 +75,7 @@ Future setStorageObject({ Future fetchStorageObject({required StorageObject type, int? tabId}) { final storageKey = _createStorageKey(type, tabId); final completer = Completer(); - final storageArea = _getStorageArea(type.persistance); + final storageArea = _getStorageArea(type.persistence); storageArea.get( [storageKey], allowInterop((Object? storageObj) { @@ -105,7 +105,7 @@ Future fetchStorageObject({required StorageObject type, int? tabId}) { Future removeStorageObject({required StorageObject type, int? tabId}) { final storageKey = _createStorageKey(type, tabId); final completer = Completer(); - final storageArea = _getStorageArea(type.persistance); + final storageArea = _getStorageArea(type.persistence); storageArea.remove( [storageKey], allowInterop(() { @@ -144,14 +144,14 @@ void interceptStorageChange({ } } -StorageArea _getStorageArea(Persistance persistance) { +StorageArea _getStorageArea(Persistence persistence) { // MV2 extensions don't have access to session storage: if (!isMV3) return chrome.storage.local; - switch (persistance) { - case Persistance.acrossSessions: + switch (persistence) { + case Persistence.acrossSessions: return chrome.storage.local; - case Persistance.sessionOnly: + case Persistence.sessionOnly: return chrome.storage.session; } } diff --git a/dwds/lib/data/extension_request.dart b/dwds/lib/data/extension_request.dart index c212a2541..c31014fd4 100644 --- a/dwds/lib/data/extension_request.dart +++ b/dwds/lib/data/extension_request.dart @@ -26,7 +26,7 @@ abstract class ExtensionRequest String get command; - /// Contains JSON-encoded parameters, if avaiable. + /// Contains JSON-encoded parameters, if available. String? get commandParams; } @@ -49,7 +49,7 @@ abstract class ExtensionResponse /// Contains a JSON-encoded payload. String get result; - /// Contains an error, if avaiable. + /// Contains an error, if available. String? get error; } diff --git a/dwds/lib/src/debugging/classes.dart b/dwds/lib/src/debugging/classes.dart index 1cd7da567..cf24e079f 100644 --- a/dwds/lib/src/debugging/classes.dart +++ b/dwds/lib/src/debugging/classes.dart @@ -60,7 +60,7 @@ class ClassHelper extends Domain { final classRef = classRefFor(libraryId, splitId.last); clazz = await _constructClass(libraryRef, classRef); if (clazz == null) { - throw Exception('Could not contruct class: $classRef'); + throw Exception('Could not construct class: $classRef'); } return _classes[objectId] = clazz; } diff --git a/dwds/lib/src/debugging/execution_context.dart b/dwds/lib/src/debugging/execution_context.dart index 4a1ecc438..a65e582a6 100644 --- a/dwds/lib/src/debugging/execution_context.dart +++ b/dwds/lib/src/debugging/execution_context.dart @@ -20,7 +20,7 @@ class RemoteDebuggerExecutionContext extends ExecutionContext { /// Contexts that may contain a Dart application. /// - /// Context can be null if an error has occured and we cannot detect + /// Context can be null if an error has occurred and we cannot detect /// and parse the context ID. late StreamQueue _contexts; diff --git a/dwds/lib/src/events.dart b/dwds/lib/src/events.dart index 0081060db..98a624732 100644 --- a/dwds/lib/src/events.dart +++ b/dwds/lib/src/events.dart @@ -15,7 +15,7 @@ class DwdsStats { DateTime? _devToolsStart; DateTime? get devToolsStart => _devToolsStart; - /// Records and returns weither the debugger is ready. + /// Records and returns whether the debugger is ready. bool _isFirstDebuggerReady = true; bool get isFirstDebuggerReady { final wasReady = _isFirstDebuggerReady; diff --git a/dwds/lib/src/handlers/injector.dart b/dwds/lib/src/handlers/injector.dart index 1213df3ab..a8dc6b570 100644 --- a/dwds/lib/src/handlers/injector.dart +++ b/dwds/lib/src/handlers/injector.dart @@ -77,7 +77,7 @@ class DwdsInjector { } else if (request.url.path.endsWith(bootstrapJsExtension)) { final ifNoneMatch = request.headers[HttpHeaders.ifNoneMatchHeader]; if (ifNoneMatch != null) { - // Disable caching of the inner hander by manually modifying the + // Disable caching of the inner handler by manually modifying the // if-none-match header before forwarding the request. request = request.change( headers: { diff --git a/dwds/lib/src/handlers/socket_connections.dart b/dwds/lib/src/handlers/socket_connections.dart index 34d9e45c0..8caea4362 100644 --- a/dwds/lib/src/handlers/socket_connections.dart +++ b/dwds/lib/src/handlers/socket_connections.dart @@ -24,14 +24,14 @@ abstract class SocketConnection { void shutdown(); } -/// A handler that accepts (transport-agnostic) bidirection socket connections. +/// A handler that accepts (transport-agnostic) bidirectional socket connections. abstract class SocketHandler { StreamQueue get connections; FutureOr handler(Request request); void shutdown(); } -/// An implemenation of [SocketConnection] that users server-sent events (SSE) +/// An implementation of [SocketConnection] that users server-sent events (SSE) /// and HTTP POSTS for bidirectional communication by wrapping an [SseConnection]. class SseSocketConnection extends SocketConnection { final SseConnection _connection; @@ -48,7 +48,7 @@ class SseSocketConnection extends SocketConnection { void shutdown() => _connection.shutdown(); } -/// An implemenation of [SocketHandler] that accepts server-sent events (SSE) +/// An implementation of [SocketHandler] that accepts server-sent events (SSE) /// connections and wraps them in an [SseSocketConnection]. class SseSocketHandler extends SocketHandler { final SseHandler _sseHandler; @@ -75,7 +75,7 @@ class SseSocketHandler extends SocketHandler { void shutdown() => _sseHandler.shutdown(); } -/// An implemenation of [SocketConnection] that uses WebSockets for communication +/// An implementation of [SocketConnection] that uses WebSockets for communication /// by wrapping [WebSocketChannel]. class WebSocketConnection extends SocketConnection { final WebSocketChannel _channel; @@ -94,7 +94,7 @@ class WebSocketConnection extends SocketConnection { void shutdown() => _channel.sink.close(); } -/// An implemenation of [SocketHandler] that accepts WebSocket connections and +/// An implementation of [SocketHandler] that accepts WebSocket connections and /// wraps them in a [WebSocketConnection]. class WebSocketSocketHandler extends SocketHandler { late Handler _handler; diff --git a/dwds/test/chrome_proxy_service_test.dart b/dwds/test/chrome_proxy_service_test.dart index 7db11ad2e..63b1de556 100644 --- a/dwds/test/chrome_proxy_service_test.dart +++ b/dwds/test/chrome_proxy_service_test.dart @@ -1232,10 +1232,10 @@ void main() { hasLength(1), ); - // Containts a known script. + // Contains a known script. expect(scriptUris, contains('package:path/path.dart')); - // Containts part files as well. + // Contains part files as well. expect(scriptUris, contains(endsWith('part.dart'))); expect( scriptUris, @@ -1979,7 +1979,7 @@ void main() { skip: 'https://github.com/dart-lang/webdev/issues/1584', ); - test('registerservice', () async { + test('registerService', () async { final service = context.service; await expectLater( service.registerService('ext.foo.bar', ''), diff --git a/dwds/test/events_test.dart b/dwds/test/events_test.dart index 342c11a6c..af0ca94ba 100644 --- a/dwds/test/events_test.dart +++ b/dwds/test/events_test.dart @@ -370,7 +370,7 @@ void main() { }); }); - group('getSripts', () { + group('getScripts', () { late VmServiceInterface service; late String isolateId; diff --git a/dwds/test/load_strategy_test.dart b/dwds/test/load_strategy_test.dart index 8e5833e9b..4d61291fc 100644 --- a/dwds/test/load_strategy_test.dart +++ b/dwds/test/load_strategy_test.dart @@ -33,7 +33,7 @@ void main() { () { final strategy = FakeStrategy(FakeAssetReader()); - test('defaults to "./dart_tool/packageconfig.json"', () { + test('defaults to "./dart_tool/package_config.json"', () { expect( p.split(strategy.packageConfigPath).join('/'), endsWith('_testSound/.dart_tool/package_config.json'), diff --git a/dwds/test/puppeteer/extension_common.dart b/dwds/test/puppeteer/extension_common.dart index 478095adf..b9182df2e 100644 --- a/dwds/test/puppeteer/extension_common.dart +++ b/dwds/test/puppeteer/extension_common.dart @@ -360,7 +360,7 @@ void testAll({ backgroundPage: backgroundPage, ); await workerEvalDelay(); - // There should now be a warning notificiation: + // There should now be a warning notification: chromeNotifications = await evaluate( _getNotifications(), worker: worker, @@ -386,7 +386,7 @@ void testAll({ worker: worker, backgroundPage: backgroundPage, ); - // There should now be a warning notificiation: + // There should now be a warning notification: final chromeNotifications = await evaluate( _getNotifications(), worker: worker, @@ -989,7 +989,7 @@ Future _getPanelElement( } Future _tabLeft(Page chromeDevToolsPage) async { - // TODO(elliette): Detect which enviroment we are OS we are running + // TODO(elliette): Detect which environment we are OS we are running // in and update modifier key accordingly. Meta key for MacOs and // Ctrl key for Linux/Windows. final modifierKey = Key.meta; diff --git a/dwds/test/puppeteer/lifeline_test.dart b/dwds/test/puppeteer/lifeline_test.dart index f58e277c0..50dc7558d 100644 --- a/dwds/test/puppeteer/lifeline_test.dart +++ b/dwds/test/puppeteer/lifeline_test.dart @@ -55,7 +55,7 @@ void main() async { connectionCount++; } }); - // Click on the Dart Debug Extension icon to intiate a debug session: + // Click on the Dart Debug Extension icon to initiate a debug session: await clickOnExtensionIcon(worker: worker, backgroundPage: null); final connectedToPort = await portConnectionFuture; // Verify that we have connected to the port: diff --git a/dwds/test/puppeteer/test_utils.dart b/dwds/test/puppeteer/test_utils.dart index 5b762c8d3..db556ad53 100644 --- a/dwds/test/puppeteer/test_utils.dart +++ b/dwds/test/puppeteer/test_utils.dart @@ -192,8 +192,8 @@ void _saveConsoleMsg({ required String msg, }) { if (msg.isEmpty) return; - final consiseMsg = msg.startsWith('JSHandle:') ? msg.substring(9) : msg; - final formatted = 'console.$type: $consiseMsg'; + final conciseMsg = msg.startsWith('JSHandle:') ? msg.substring(9) : msg; + final formatted = 'console.$type: $conciseMsg'; switch (source) { case ConsoleSource.background: _backgroundLogs.add(formatted); diff --git a/dwds/web/reloader/manager.dart b/dwds/web/reloader/manager.dart index adb8e37bb..225841e57 100644 --- a/dwds/web/reloader/manager.dart +++ b/dwds/web/reloader/manager.dart @@ -17,7 +17,7 @@ class ReloadingManager { ReloadingManager(this._client, this._restarter); - /// Attemps to perform a hot restart and returns whether it was successful or + /// Attempts to perform a hot restart and returns whether it was successful or /// not. /// /// [runId] is used to hot restart code in the browser for all apps that diff --git a/dwds/web/reloader/restarter.dart b/dwds/web/reloader/restarter.dart index d0483f70e..e1f7f0b09 100644 --- a/dwds/web/reloader/restarter.dart +++ b/dwds/web/reloader/restarter.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. abstract class Restarter { - /// Attemps to perform a hot restart and returns whether it was successful or + /// Attempts to perform a hot restart and returns whether it was successful or /// not. Future restart({String? runId}); } diff --git a/frontend_server_client/README.md b/frontend_server_client/README.md index ea38a06a7..e18c0979e 100644 --- a/frontend_server_client/README.md +++ b/frontend_server_client/README.md @@ -23,9 +23,9 @@ version solve. ### Working with dev SDK releases -By default when you do a pub get/upgrade, a constraint like `<2.9.0` will +By default, when you do a pub get/upgrade, a constraint like `<2.9.0` will actually allow dev releases of `2.9.0` if the current SDK is a dev release. It -emits a warning when it does this, but will happily alow it. +emits a warning when it does this, but will happily allow it. - This means that we don't have to publish versions that explicitly allow dev releases. We will be notified of breakages by our bots if a dev release does diff --git a/test_common/lib/logging.dart b/test_common/lib/logging.dart index 9c851e4c2..e729e361e 100644 --- a/test_common/lib/logging.dart +++ b/test_common/lib/logging.dart @@ -17,7 +17,7 @@ StreamSubscription? _loggerSub; /// If [debug] is false, messages are stored and reported on test failure. /// If [debug] is true, messages are always printed to the console. /// -/// Note that the logwriter uses [printOnFailure] that stores the messages +/// Note that the [LogWriter] uses [printOnFailure] that stores the messages /// on the current zone. As a result, [setCurrentLogWriter] needs to be set /// in both `setUpAll` and `setUp` to store messages for the same zone as the /// failure in order to report all stored messages on that failure. diff --git a/webdev/test/configuration_test.dart b/webdev/test/configuration_test.dart index 4bfdcb87e..bd3540918 100644 --- a/webdev/test/configuration_test.dart +++ b/webdev/test/configuration_test.dart @@ -78,7 +78,7 @@ void main() { }); test( - 'must not provide debug related configuartion when enableInjectedClient ' + 'must not provide debug related configuration when enableInjectedClient ' 'is false', () { expect(() => Configuration(enableInjectedClient: false, debug: true), throwsA(isA())); diff --git a/webdev/test/integration_test.dart b/webdev/test/integration_test.dart index 7035997f8..b2e2a110c 100644 --- a/webdev/test/integration_test.dart +++ b/webdev/test/integration_test.dart @@ -22,7 +22,7 @@ void main() { setUpAll(testRunner.setUpAll); tearDownAll(testRunner.tearDownAll); - test('non-existant commands create errors', () async { + test('non-existent commands create errors', () async { var process = await testRunner.runWebDev(['monkey']); await expectLater(