Skip to content

Commit

Permalink
docs: replace last instances of "v8" with "modular"
Browse files Browse the repository at this point in the history
v8 of what? users reported this as confusing, we will use "modular"
or "namespaced" everywhere
  • Loading branch information
mikehardy committed Feb 8, 2025
1 parent 684081b commit 2833ca8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/migrating-to-v22.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ next: /typescript

# Switching off warning logs

You may notice an influx of console warning logs as we continue deprecating all existing namespaced API. If you would like to switch these logs off, you may set the following global property to `true` anywhere before you initialize Firebase.
You may notice a lot of console warning logs as we deprecate the existing namespaced API. If you would like to switch these logs off, you may set the following global property to `true` anywhere before you initialize Firebase.

```js
globalThis.RNFB_SILENCE_V8_DEPRECATION_WARNINGS = true;
globalThis.RNFB_SILENCE_MODULAR_DEPRECATION_WARNINGS = true;
```

# Migrating to React Native modular API
Expand Down
12 changes: 6 additions & 6 deletions packages/app/lib/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ const mapOfDeprecationReplacements = {
},
};

const v8deprecationMessage =
const modularDeprecationMessage =
'This method is deprecated (as well as all React Native Firebase namespaced API) and will be removed in the next major release ' +
'as part of move to match Firebase Web modular SDK API. Please see migration guide for more details: https://rnfirebase.io/migrating-to-v22';

Expand All @@ -226,7 +226,7 @@ export function deprecationConsoleWarning(nameSpace, methodName, instanceName, i
if (instanceMap && deprecatedMethod) {
const message = createMessage(nameSpace, methodName, instanceName);

if (!globalThis.RNFB_SILENCE_V8_DEPRECATION_WARNINGS) {
if (!globalThis.RNFB_SILENCE_MODULAR_DEPRECATION_WARNINGS) {
// eslint-disable-next-line no-console
console.warn(message);
}
Expand All @@ -253,9 +253,9 @@ export function createMessage(
const replacementMethodName = instance[methodName];

if (replacementMethodName !== NO_REPLACEMENT) {
return v8deprecationMessage + ` Please use \`${replacementMethodName}\` instead.`;
return modularDeprecationMessage + ` Please use \`${replacementMethodName}\` instead.`;
} else {
return v8deprecationMessage;
return modularDeprecationMessage;
}
}
}
Expand Down Expand Up @@ -363,12 +363,12 @@ export function warnIfNotModularCall(args, replacementMethodName = '') {
}
}

let message = v8deprecationMessage;
let message = modularDeprecationMessage;
if (replacementMethodName.length > 0) {
message += ` Please use \`${replacementMethodName}\` instead.`;
}

if (!globalThis.RNFB_SILENCE_V8_DEPRECATION_WARNINGS) {
if (!globalThis.RNFB_SILENCE_MODULAR_DEPRECATION_WARNINGS) {
// eslint-disable-next-line no-console
console.warn(message);
}
Expand Down

0 comments on commit 2833ca8

Please sign in to comment.