Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spelling #8280

Merged
merged 159 commits into from
Jul 18, 2024
Merged

Spelling #8280

merged 159 commits into from
Jul 18, 2024

Conversation

jsoref
Copy link
Contributor

@jsoref jsoref commented May 30, 2024

Discussion

Fixes #8279

Testing

  • Make sure all existing tests in the repository pass after your change. -- They do (although, many of them required fixes in Fix workflows for forks #8275 for me to validate)
  • If you fixed a bug or added a feature, add a new test to cover your code. -- This can be done by applying a variant of jsoref@spell-check, but I'd prefer to leave that outside the scope of this PR

API Changes

I believe there's one API change included:
jsoref@10eacae

I've included it in the hopes that it isn't an API and, thus, can be changed. If it's an API and can't be changed, it's trivial for me to drop it (just as I'm more than happy to drop any other changes).

Copy link

changeset-bot bot commented May 30, 2024

🦋 Changeset detected

Latest commit: 8433b90

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 36 packages
Name Type
@firebase/installations-compat Patch
@firebase/remote-config-compat Patch
@firebase/installations-types Patch
@firebase/remote-config-types Patch
@firebase/performance-compat Patch
@firebase/rules-unit-testing Patch
@firebase/webchannel-wrapper Patch
@firebase/performance-types Patch
@firebase/analytics-compat Patch
@firebase/app-check-compat Patch
@firebase/firestore-compat Patch
@firebase/functions-compat Patch
@firebase/messaging-compat Patch
@firebase/database-compat Patch
@firebase/database-types Patch
@firebase/storage-compat Patch
@firebase/installations Patch
@firebase/remote-config Patch
@firebase/auth-compat Patch
@firebase/performance Patch
@firebase/app-compat Patch
@firebase/analytics Patch
@firebase/app-check Patch
@firebase/component Patch
@firebase/firestore Patch
@firebase/functions Patch
@firebase/messaging Patch
@firebase/database Patch
firebase Patch
@firebase/template Patch
@firebase/vertexai-preview Patch
@firebase/storage Patch
@firebase/logger Patch
@firebase/auth Patch
@firebase/util Patch
@firebase/app Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@@ -38,7 +38,7 @@ export declare class DataSnapshot
| [child(path)](./database.datasnapshot.md#datasnapshotchild) | | Gets another <code>DataSnapshot</code> for the location at the specified relative path.<!-- -->Passing a relative path to the <code>child()</code> method of a DataSnapshot returns another <code>DataSnapshot</code> for the location at the specified relative path. The relative path can either be a simple child name (for example, "ada") or a deeper, slash-separated path (for example, "ada/name/first"). If the child location has no data, an empty <code>DataSnapshot</code> (that is, a <code>DataSnapshot</code> whose value is <code>null</code>) is returned. |
| [exists()](./database.datasnapshot.md#datasnapshotexists) | | Returns true if this <code>DataSnapshot</code> contains any data. It is slightly more efficient than using <code>snapshot.val() !== null</code>. |
| [exportVal()](./database.datasnapshot.md#datasnapshotexportval) | | Exports the entire contents of the DataSnapshot as a JavaScript object.<!-- -->The <code>exportVal()</code> method is similar to <code>val()</code>, except priority information is included (if available), making it suitable for backing up your data. |
| [forEach(action)](./database.datasnapshot.md#datasnapshotforeach) | | Enumerates the top-level children in the <code>IteratedDataSnapshot</code>.<!-- -->Because of the way JavaScript objects work, the ordering of data in the JavaScript object returned by <code>val()</code> is not guaranteed to match the ordering on the server nor the ordering of <code>onChildAdded()</code> events. That is where <code>forEach()</code> comes in handy. It guarantees the children of a <code>DataSnapshot</code> will be iterated in their query order.<!-- -->If no explicit <code>orderBy*()</code> method is used, results are returned ordered by key (unless priorities are used, in which case, results are returned by priority). |
| [forEach(action)](./database.datasnapshot.md#datasnapshotforeach) | | Enumerates the top-level children in the <code>IteratedDataSnapshot</code>.<!-- -->Because of the way JavaScript objects work, the ordering of data in the JavaScript object returned by <code>val()</code> is neither guaranteed to match the ordering on the server nor the ordering of <code>onChildAdded()</code> events. That is where <code>forEach()</code> comes in handy. It guarantees the children of a <code>DataSnapshot</code> will be iterated in their query order.<!-- -->If no explicit <code>orderBy*()</code> method is used, results are returned ordered by key (unless priorities are used, in which case, results are returned by priority). |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy to drop any of my proposed changes.

neither/nor is the generally recommended way to write this, and as this is documentation, using it seems reasonable.

.github/ISSUE_TEMPLATE/bug_report_v2.yaml Show resolved Hide resolved
@@ -2598,7 +2598,7 @@ export declare type OrderByDirection = 'desc' | 'asc';

## PartialWithFieldValue

Similar to Typescript's `Partial<T>`<!-- -->, but allows nested fields to be omitted and FieldValues to be passed in as property values.
Similar to TypeScript's `Partial<T>`<!-- -->, but allows nested fields to be omitted and FieldValues to be passed in as property values.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

brand

@@ -10,7 +10,7 @@
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or ied.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generally, lawyers get annoyed by changes to licenses...

A peer suggested that someone did a global search and replace s/impl//. -- I believe they're correct.

packages/app-compat/src/public-types.ts Show resolved Hide resolved
packages/firebase/compat/rollup.config.js Outdated Show resolved Hide resolved
packages/performance/src/services/perf_logger.ts Outdated Show resolved Hide resolved
@@ -518,7 +518,7 @@ ul.tsd-descriptions.active > .tsd-description.fade-out { -webkit-animation: fade
ul.tsd-descriptions h4, ul.tsd-descriptions .tsd-index-panel h3, .tsd-index-panel ul.tsd-descriptions h3 { font-size: 16px; margin: 1em 0 0.5em 0; }

ul.tsd-parameters, ul.tsd-type-parameters { list-style: square; margin: 0; padding-left: 20px; }
ul.tsd-parameters > li.tsd-parameter-siganture, ul.tsd-type-parameters > li.tsd-parameter-siganture { list-style: none; margin-left: -20px; }
ul.tsd-parameters > li.tsd-parameter-signature, ul.tsd-type-parameters > li.tsd-parameter-signature { list-style: none; margin-left: -20px; }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

notable

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's unclear if this CSS class name change was also made in the corresponding HTML. If not, maybe revert this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no sign of that typo in html https://github.com/search?q=repo%3Afirebase%2Ffirebase-js-sdk%20%22siganture%22&type=code

Or the attribute for that matter? https://github.com/search?q=repo%3Afirebase%2Ffirebase-js-sdk+%22tsd-parameter%22&type=code

It appears to be from something else that isn't used here..
https://github.com/search?q=repo%3Aangular-redux%2Fstore%20%22tsd-parameter-siganture%22&type=code

Happy to drop. I'll probably try to send a PR to them at some point...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-snasphot_listener_source.test.ts
+snapshot_listener_source.test.ts

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-inheritence.input.d.ts
+inheritance.input.d.ts

@dlarocque dlarocque requested a review from egilmorez May 31, 2024 18:34
Copy link
Contributor

@egilmorez egilmorez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a super useful effort that I enthusiasticallyt endorse (could the same tooling be used on similar TypeScript source, like the Cloud Functions reference?), but wow – over 200 files is a lot to review at once, for a human. Next time around, would be great to break it down into categories of some kind, like proper naming issues (Github> GitHub), misspellings of nouns, misspellings of verbs, whatever.

Also, for some of the more sophisticated errata, we may need to tweak the algorithm to prevent the neither/nor errors that I picked out. Hope I didn't miss any similar things ( placement of "only" often causes similar issues).

docs-devsite/database.datasnapshot.md Outdated Show resolved Hide resolved
docs-devsite/vertexai-preview.chatsession.md Outdated Show resolved Hide resolved
packages/auth/src/api/index.test.ts Outdated Show resolved Hide resolved
packages/database/src/api/Reference_impl.ts Outdated Show resolved Hide resolved
packages/vertexai/src/methods/chat-session.ts Outdated Show resolved Hide resolved
@jsoref
Copy link
Contributor Author

jsoref commented Jun 24, 2024

The changes are all manual (more or less), and anything that isn't a simple replacement is very manual (especially things like neither).

Splitting is more or less possible -- it's easy for me to group commits together, or split by directory. It's fairly painful for me to split by part of speech if a word is used in more than one part of speech (and gets prohibitive as the word count grows -- it's error prone, and as a human, I make mistakes like everyone else), but it's certainly not a problem for me to peel off individual commits or group commits together into separate PRs -- I just need direction. For smaller repositories, I can split by "code" vs "comment" -- although I really don't like to do it as it isn't particularly safe -- it's much cleaner to split by directory or possibly file extension.

The only thing that's fully automated is identifying potential problems. I can certainly run the tooling on any repository if people are interested. Sometimes I rely on Google Sheets for word corrections, although of late, I've just been using Google Chrome suggestions.

Copy link
Contributor

@egilmorez egilmorez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think jsoref fixed or backed out content related to my neither/nor suggestions (not easy to immediately discover that due to the massive size of this PR), so I think I'm happy to approve. Thanks!

@jsoref
Copy link
Contributor Author

jsoref commented Jun 28, 2024

Do I need to worry about the changeset bot?

Note that https://github.com/firebase/firebase-js-sdk/actions/runs/9639724064/job/26582355096?pr=8280 is failing (I can't remember the state of this, I split most other CI failures into other PRs...)

Copy link
Contributor

@MarkDuckworth MarkDuckworth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with comments. I reviewed packages/firestore and other top-level folders outside of packages/.

.github/ISSUE_TEMPLATE/bug_report_v2.yaml Show resolved Hide resolved
@@ -518,7 +518,7 @@ ul.tsd-descriptions.active > .tsd-description.fade-out { -webkit-animation: fade
ul.tsd-descriptions h4, ul.tsd-descriptions .tsd-index-panel h3, .tsd-index-panel ul.tsd-descriptions h3 { font-size: 16px; margin: 1em 0 0.5em 0; }

ul.tsd-parameters, ul.tsd-type-parameters { list-style: square; margin: 0; padding-left: 20px; }
ul.tsd-parameters > li.tsd-parameter-siganture, ul.tsd-type-parameters > li.tsd-parameter-siganture { list-style: none; margin-left: -20px; }
ul.tsd-parameters > li.tsd-parameter-signature, ul.tsd-type-parameters > li.tsd-parameter-signature { list-style: none; margin-left: -20px; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's unclear if this CSS class name change was also made in the corresponding HTML. If not, maybe revert this?

Copy link
Contributor

@DellaBitta DellaBitta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jsoref, thanks for the PR!

Could you add a changeset (run yarn changeset) and mark all packages with code changes as patch with the note Fixed typos in documentation and in some internal variables and parameters. ?

Also looks like you have a format error. Could your run the following commands:

yarn format
yarn docgen:all

You might need to merge the main branch into your branch because there were some changes to the documentation script a few weeks ago.

packages/auth-compat/CHANGELOG.md Show resolved Hide resolved
packages/app-compat/src/public-types.ts Show resolved Hide resolved
packages/performance/src/services/perf_logger.ts Outdated Show resolved Hide resolved
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
jsoref added 19 commits July 16, 2024 11:31
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
@jsoref
Copy link
Contributor Author

jsoref commented Jul 16, 2024

@DellaBitta: I can't get yarn to cooperate

jsoref@jsoref-mbp firebase-js-sdk % node --version
v20.11.0
jsoref@jsoref-mbp firebase-js-sdk % yarnYN0000: · Yarn 4.2.1YN0000:  Resolution stepYN0001:  Error: closure-net@https://github.com/google/closure-net.git#commit=0412666e8f29b8ae69decb1fdc7ead635a5cf43e: Manifest not found
    at AE.find (/Users/jsoref/.yarn/releases/yarn-4.2.1.cjs:140:120021)
    at async /Users/jsoref/.yarn/releases/yarn-4.2.1.cjs:520:11979
    at async Object.xZe (/Users/jsoref/.yarn/releases/yarn-4.2.1.cjs:140:53847)
    at async I2.resolve (/Users/jsoref/.yarn/releases/yarn-4.2.1.cjs:520:11940)
    at async Dd.resolve (/Users/jsoref/.yarn/releases/yarn-4.2.1.cjs:141:1451)
    at async Dd.resolve (/Users/jsoref/.yarn/releases/yarn-4.2.1.cjs:141:1451)
    at async /Users/jsoref/.yarn/releases/yarn-4.2.1.cjs:210:7249
    at async Ky (/Users/jsoref/.yarn/releases/yarn-4.2.1.cjs:140:53910)
    at async ne (/Users/jsoref/.yarn/releases/yarn-4.2.1.cjs:210:7231)
    at async Promise.allSettled (index 1)YN0000:  Completed in 0s 873msYN0000: · Failed with errors in 0s 883ms

I've given permission to push into my branch...

@DellaBitta DellaBitta requested a review from a team as a code owner July 18, 2024 15:07
@DellaBitta
Copy link
Contributor

Done! Waiting for CI to execute now.

@DellaBitta DellaBitta merged commit 025f2a1 into firebase:master Jul 18, 2024
36 of 39 checks passed
@jsoref jsoref deleted the spelling branch July 18, 2024 21:19
tom-andersen pushed a commit that referenced this pull request Jul 24, 2024
Numerous fixes to spelling across the SDK.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

firebase-js-sdk has typos
4 participants