Skip to content

Commit

Permalink
Fix a few minor spelling mistakes (#2209)
Browse files Browse the repository at this point in the history
  • Loading branch information
parlough authored Sep 11, 2023
1 parent 158223b commit f0656b4
Show file tree
Hide file tree
Showing 23 changed files with 53 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/changelog_reminder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
10 changes: 5 additions & 5 deletions dwds/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion dwds/debug_extension/web/background.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
Expand Down
4 changes: 2 additions & 2 deletions dwds/debug_extension_mv3/tool/build_extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
30 changes: 15 additions & 15 deletions dwds/debug_extension_mv3/web/storage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -58,7 +58,7 @@ Future<bool> setStorageObject<T>({
value is String ? value : jsonEncode(serializers.serialize(value));
final storageObj = <String, String>{storageKey: json};
final completer = Completer<bool>();
final storageArea = _getStorageArea(type.persistance);
final storageArea = _getStorageArea(type.persistence);
storageArea.set(
jsify(storageObj),
allowInterop(() {
Expand All @@ -75,7 +75,7 @@ Future<bool> setStorageObject<T>({
Future<T?> fetchStorageObject<T>({required StorageObject type, int? tabId}) {
final storageKey = _createStorageKey(type, tabId);
final completer = Completer<T?>();
final storageArea = _getStorageArea(type.persistance);
final storageArea = _getStorageArea(type.persistence);
storageArea.get(
[storageKey],
allowInterop((Object? storageObj) {
Expand Down Expand Up @@ -105,7 +105,7 @@ Future<T?> fetchStorageObject<T>({required StorageObject type, int? tabId}) {
Future<bool> removeStorageObject<T>({required StorageObject type, int? tabId}) {
final storageKey = _createStorageKey(type, tabId);
final completer = Completer<bool>();
final storageArea = _getStorageArea(type.persistance);
final storageArea = _getStorageArea(type.persistence);
storageArea.remove(
[storageKey],
allowInterop(() {
Expand Down Expand Up @@ -144,14 +144,14 @@ void interceptStorageChange<T>({
}
}

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;
}
}
Expand Down
4 changes: 2 additions & 2 deletions dwds/lib/data/extension_request.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion dwds/lib/src/debugging/classes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion dwds/lib/src/debugging/execution_context.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<int> _contexts;

Expand Down
2 changes: 1 addition & 1 deletion dwds/lib/src/events.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion dwds/lib/src/handlers/injector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
10 changes: 5 additions & 5 deletions dwds/lib/src/handlers/socket_connections.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<SocketConnection> get connections;
FutureOr<Response> 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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions dwds/test/chrome_proxy_service_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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', ''),
Expand Down
2 changes: 1 addition & 1 deletion dwds/test/events_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ void main() {
});
});

group('getSripts', () {
group('getScripts', () {
late VmServiceInterface service;
late String isolateId;

Expand Down
2 changes: 1 addition & 1 deletion dwds/test/load_strategy_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
6 changes: 3 additions & 3 deletions dwds/test/puppeteer/extension_common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -989,7 +989,7 @@ Future<ElementHandle?> _getPanelElement(
}

Future<void> _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;
Expand Down
2 changes: 1 addition & 1 deletion dwds/test/puppeteer/lifeline_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions dwds/test/puppeteer/test_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion dwds/web/reloader/manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion dwds/web/reloader/restarter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool> restart({String? runId});
}
4 changes: 2 additions & 2 deletions frontend_server_client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test_common/lib/logging.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ StreamSubscription<LogRecord>? _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.
Expand Down
2 changes: 1 addition & 1 deletion webdev/test/configuration_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<InvalidConfiguration>()));
Expand Down
2 changes: 1 addition & 1 deletion webdev/test/integration_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit f0656b4

Please sign in to comment.