diff --git a/.clang-format b/.config/.clang-format similarity index 100% rename from .clang-format rename to .config/.clang-format diff --git a/.eslintrc b/.config/.eslintrc similarity index 57% rename from .eslintrc rename to .config/.eslintrc index bea19fed..bb87ea98 100644 --- a/.eslintrc +++ b/.config/.eslintrc @@ -1,6 +1,7 @@ { "extends": ["@react-native-community"], "rules": { - "no-console": "error" + "no-console": "error", + "quotes": "off" } } diff --git a/tsconfig.base.json b/.config/tsconfig.base.json similarity index 92% rename from tsconfig.base.json rename to .config/tsconfig.base.json index 3b1415ca..a5ee591d 100644 --- a/tsconfig.base.json +++ b/.config/tsconfig.base.json @@ -1,5 +1,7 @@ { - "exclude": ["node_modules"], + "exclude": [ + "../node_modules" + ], "compilerOptions": { "noFallthroughCasesInSwitch": true, "noImplicitOverride": true, diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md similarity index 100% rename from CONTRIBUTING.md rename to .github/CONTRIBUTING.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1155f600..e935d64d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,7 @@ jobs: strategy: matrix: test-name: [lint, ts] + workspace: [default-storage-backend, core] steps: - name: Checkout uses: actions/checkout@v3 @@ -23,7 +24,7 @@ jobs: run: yarn - name: Run test ${{ matrix.test-name }} run: yarn test:${{ matrix.test-name }} - working-directory: packages/default-storage-backend + working-directory: packages/${{ matrix.workspace }} android: name: Android runs-on: ubuntu-22.04 diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 46c3901b..00000000 --- a/.prettierrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "tabWidth": 2, - "semi": true, - "singleQuote": true, - "bracketSpacing": true, - "parser": "typescript" -} diff --git a/README.md b/README.md index 915fb341..be4e0deb 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Head over to [documentation](https://react-native-async-storage.github.io/async- ## Contribution Pull requests are welcome. Please open an issue first to discuss what you would like to change. -See the [CONTRIBUTING](CONTRIBUTING.md) file for more information. +See the [CONTRIBUTING](.github/CONTRIBUTING.md) file for more information. ## License diff --git a/package.json b/package.json index b91634fc..658d950f 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "devDependencies": { "@react-native-community/eslint-config": "3.2.0", "eslint": "8.26.0", - "prettier": "2.5.1", + "prettier": "2.8.8", "typescript": "4.9.5" }, "resolutions": { diff --git a/packages/core/.eslintrc b/packages/core/.eslintrc index 5e998f81..3178779f 100644 --- a/packages/core/.eslintrc +++ b/packages/core/.eslintrc @@ -1,3 +1,3 @@ { - "extends": "../../.eslintrc" + "extends": "../../.config/.eslintrc" } diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json index 82987efd..aff25780 100644 --- a/packages/core/tsconfig.json +++ b/packages/core/tsconfig.json @@ -1,4 +1,4 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../.config/tsconfig.base.json", "include": ["./src/**/*"] } diff --git a/packages/default-storage-backend/.eslintrc b/packages/default-storage-backend/.eslintrc index eb688d6b..610f6bae 100644 --- a/packages/default-storage-backend/.eslintrc +++ b/packages/default-storage-backend/.eslintrc @@ -1,6 +1,6 @@ { "extends": [ - "../../.eslintrc", + "../../.config/.eslintrc", "plugin:wdio/recommended" ], "plugins": ["wdio"], diff --git a/packages/default-storage-backend/example/__tests__/android.conf.ts b/packages/default-storage-backend/example/__tests__/android.conf.ts index 095110e6..b71a1621 100644 --- a/packages/default-storage-backend/example/__tests__/android.conf.ts +++ b/packages/default-storage-backend/example/__tests__/android.conf.ts @@ -1,18 +1,18 @@ -import { config as commonConfig } from './common.conf'; +import { config as commonConfig } from "./common.conf"; export const config: WebdriverIO.Config = { ...commonConfig, capabilities: [ { - platformName: 'Android', + platformName: "Android", maxInstances: 1, - 'appium:deviceName': 'Android Emulator', - 'appium:app': - 'example/android/app/build/outputs/apk/release/app-release.apk', - 'appium:automationName': 'UiAutomator2', - 'appium:newCommandTimeout': 240, - 'appium:appWaitActivity': - 'com.microsoft.reacttestapp.component.ComponentActivity', + "appium:deviceName": "Android Emulator", + "appium:app": + "example/android/app/build/outputs/apk/release/app-release.apk", + "appium:automationName": "UiAutomator2", + "appium:newCommandTimeout": 240, + "appium:appWaitActivity": + "com.microsoft.reacttestapp.component.ComponentActivity", }, ], }; diff --git a/packages/default-storage-backend/example/__tests__/asyncstorage.spec.ts b/packages/default-storage-backend/example/__tests__/asyncstorage.spec.ts index 147581ee..02d66ada 100644 --- a/packages/default-storage-backend/example/__tests__/asyncstorage.spec.ts +++ b/packages/default-storage-backend/example/__tests__/asyncstorage.spec.ts @@ -1,35 +1,35 @@ -import { commands as cmd } from './commands'; -import testCases from '../examples/tests'; +import { commands as cmd } from "./commands"; +import testCases from "../examples/tests"; -describe('Async Storage functional tests', () => { - it('should be visible', async () => { +describe("Async Storage functional tests", () => { + it("should be visible", async () => { // wait until content loads, as android's waitForSelectorTimeout setting does not seem to work await new Promise((r) => setTimeout(r, 3000)); - const el = await cmd.elementByLabel('functional-view'); + const el = await cmd.elementByLabel("functional-view"); await expect(await el.isExisting()).toEqual(true); }); const testNames = Object.keys(testCases); - describe('storing / reading values', () => { + describe("storing / reading values", () => { for (const name of testNames) { it(name, async () => { const el = await cmd.elementByLabel(`test:${name}`); - await expect(await el.getText()).toEqual('Pass'); + await expect(await el.getText()).toEqual("Pass"); }); } }); - describe('storing / reading values with delegate', () => { + describe("storing / reading values with delegate", () => { for (const currentName of testNames) { - const name = currentName + ' with delegate'; + const name = currentName + " with delegate"; it(name, async () => { const el = await cmd.elementByLabel(`test:${name}`); const label = await el.getText(); - if (label === 'Skip') { + if (label === "Skip") { return; } - expect(label).toEqual('Pass'); + expect(label).toEqual("Pass"); }); } }); diff --git a/packages/default-storage-backend/example/__tests__/commands.ts b/packages/default-storage-backend/example/__tests__/commands.ts index 5026cdb9..ee1fdf00 100644 --- a/packages/default-storage-backend/example/__tests__/commands.ts +++ b/packages/default-storage-backend/example/__tests__/commands.ts @@ -1,5 +1,5 @@ -const testAppId = 'com.microsoft.ReactTestApp'; -import { browser } from '@wdio/globals'; +const testAppId = "com.microsoft.ReactTestApp"; +import { browser } from "@wdio/globals"; export const commands = { restartApp: async () => { diff --git a/packages/default-storage-backend/example/__tests__/common.conf.ts b/packages/default-storage-backend/example/__tests__/common.conf.ts index b501750b..fe93317c 100644 --- a/packages/default-storage-backend/example/__tests__/common.conf.ts +++ b/packages/default-storage-backend/example/__tests__/common.conf.ts @@ -1,37 +1,37 @@ export const config: WebdriverIO.Config = { - runner: 'local', + runner: "local", autoCompileOpts: { autoCompile: true, tsNodeOpts: { transpileOnly: true, - project: '../../tsconfig.all.json', + project: "../../tsconfig.all.json", }, }, capabilities: [], connectionRetryTimeout: 180000, waitforTimeout: 90000, - framework: 'mocha', - reporters: ['spec'], + framework: "mocha", + reporters: ["spec"], mochaOpts: { - ui: 'bdd', + ui: "bdd", /** * NOTE: This has been increased for more stable Appium Native app * tests because they can take a bit longer. */ timeout: 5 * 60 * 1000, // 5min }, - specs: ['./asyncstorage.spec.ts'], + specs: ["./asyncstorage.spec.ts"], services: [ [ - 'appium', + "appium", { - command: 'appium', + command: "appium", args: { // This is needed to tell Appium that we can execute local ADB commands // and to automatically download the latest version of ChromeDriver relaxedSecurity: true, - address: '127.0.0.1', - 'callback-port': 4723, + address: "127.0.0.1", + "callback-port": 4723, port: 4723, }, }, diff --git a/packages/default-storage-backend/example/__tests__/ios.conf.ts b/packages/default-storage-backend/example/__tests__/ios.conf.ts index 97f7752e..73cd96e2 100644 --- a/packages/default-storage-backend/example/__tests__/ios.conf.ts +++ b/packages/default-storage-backend/example/__tests__/ios.conf.ts @@ -1,15 +1,15 @@ -import { config as commonConfig } from './common.conf'; +import { config as commonConfig } from "./common.conf"; export const config: WebdriverIO.Config = { ...commonConfig, capabilities: [ { - platformName: 'iOS', - 'appium:platformVersion': '16.4', - 'appium:deviceName': 'iPhone 14', - 'appium:automationName': 'XCUITest', - 'appium:app': - 'example/ios/build/Build/Products/Release-iphonesimulator/ReactTestApp.app', + platformName: "iOS", + "appium:platformVersion": "16.4", + "appium:deviceName": "iPhone 14", + "appium:automationName": "XCUITest", + "appium:app": + "example/ios/build/Build/Products/Release-iphonesimulator/ReactTestApp.app", }, ], }; diff --git a/packages/default-storage-backend/example/examples/tests.ts b/packages/default-storage-backend/example/examples/tests.ts index ed73cc2c..e3d0f022 100644 --- a/packages/default-storage-backend/example/examples/tests.ts +++ b/packages/default-storage-backend/example/examples/tests.ts @@ -2,47 +2,47 @@ export type TestValue = string | Record; export type TestStep = | { - command: 'merge' | 'set'; + command: "merge" | "set"; key: string; value: TestValue; expected?: TestValue | null; } | { - command: 'remove'; + command: "remove"; key: string; }; const tests: Record = { - 'Should store value in AsyncStorage': [ - { command: 'set', key: 'a', value: '0' }, - { command: 'set', key: 'a', value: '10' }, - { command: 'set', key: 'a', value: '20' }, - { command: 'set', key: 'a', value: '30' }, - { command: 'set', key: 'a', value: '40' }, + "Should store value in AsyncStorage": [ + { command: "set", key: "a", value: "0" }, + { command: "set", key: "a", value: "10" }, + { command: "set", key: "a", value: "20" }, + { command: "set", key: "a", value: "30" }, + { command: "set", key: "a", value: "40" }, ], - 'Should clear item': [ - { command: 'set', key: 'a', value: '42' }, - { command: 'remove', key: 'a' }, + "Should clear item": [ + { command: "set", key: "a", value: "42" }, + { command: "remove", key: "a" }, ], - 'Should merge items': [ + "Should merge items": [ { - command: 'set', - key: 'a', + command: "set", + key: "a", value: { - name: 'Jerry', - age: '21', - eyesColor: 'blue', - shoeSize: '9', + name: "Jerry", + age: "21", + eyesColor: "blue", + shoeSize: "9", }, }, { - command: 'merge', - key: 'a', + command: "merge", + key: "a", value: { - name: 'Sarah', - age: '23', - eyesColor: 'green', - shoeSize: '10', + name: "Sarah", + age: "23", + eyesColor: "green", + shoeSize: "10", }, }, ], diff --git a/packages/default-storage-backend/example/index.ts b/packages/default-storage-backend/example/index.ts index 691b7798..111ce7e5 100644 --- a/packages/default-storage-backend/example/index.ts +++ b/packages/default-storage-backend/example/index.ts @@ -5,13 +5,13 @@ * LICENSE file in the root directory of this source tree. */ -import { AppRegistry, Platform } from 'react-native'; -import App from './App'; -import { name as appName } from './app.json'; +import { AppRegistry, Platform } from "react-native"; +import App from "./App"; +import { name as appName } from "./app.json"; AppRegistry.registerComponent(appName, () => App); -if (Platform.OS === 'web') { - const rootTag = document.getElementById('root'); +if (Platform.OS === "web") { + const rootTag = document.getElementById("root"); AppRegistry.runApplication(appName, { rootTag }); } diff --git a/packages/default-storage-backend/ios/RNCAsyncStorage.h b/packages/default-storage-backend/ios/RNCAsyncStorage.h index 1743c3bd..38e5178f 100644 --- a/packages/default-storage-backend/ios/RNCAsyncStorage.h +++ b/packages/default-storage-backend/ios/RNCAsyncStorage.h @@ -29,11 +29,12 @@ */ @interface RNCAsyncStorage : NSObject < #ifdef RCT_NEW_ARCH_ENABLED - NativeAsyncStorageModuleSpec + NativeAsyncStorageModuleSpec #else - RCTBridgeModule + RCTBridgeModule #endif - , RCTInvalidating> + , + RCTInvalidating> @property (nonatomic, weak, nullable) id delegate; diff --git a/packages/default-storage-backend/ios/RNCAsyncStorage.mm b/packages/default-storage-backend/ios/RNCAsyncStorage.mm index 508494a0..342c5ce2 100644 --- a/packages/default-storage-backend/ios/RNCAsyncStorage.mm +++ b/packages/default-storage-backend/ios/RNCAsyncStorage.mm @@ -899,7 +899,7 @@ - (BOOL)_passthroughDelegate - (std::shared_ptr)getTurboModule: (const facebook::react::ObjCTurboModule::InitParams &)params { - return std::make_shared(params); + return std::make_shared(params); } #endif diff --git a/packages/default-storage-backend/jest/async-storage-mock.js b/packages/default-storage-backend/jest/async-storage-mock.js index 2de5c932..ea311bf4 100644 --- a/packages/default-storage-backend/jest/async-storage-mock.js +++ b/packages/default-storage-backend/jest/async-storage-mock.js @@ -1,6 +1,6 @@ /* eslint-disable no-undef */ -const merge = require('merge-options').bind({ +const merge = require("merge-options").bind({ concatArrays: true, ignoreUndefined: true, }); diff --git a/packages/default-storage-backend/package.json b/packages/default-storage-backend/package.json index 7ba83bc1..f0cabed8 100644 --- a/packages/default-storage-backend/package.json +++ b/packages/default-storage-backend/package.json @@ -38,7 +38,7 @@ }, "scripts": { "format": "concurrently yarn:format:*", - "format:c": "clang-format -i $(git ls-files '*.cpp' '*.h' '*.m' '*.mm')", + "format:c": "clang-format -i $(git ls-files '*.cpp' '*.h' '*.m' '*.mm') --style file:../../.config/.clang-format", "format:js": "prettier --write $(git ls-files '*.js' '*.json' '*.md' '*.ts' '*.tsx' '*.yml')", "prepare": "bob build", "start": "react-native start", @@ -90,7 +90,7 @@ "eslint-plugin-wdio": "^8.8.7", "expo": "^48.0.0", "lodash": "^4.17.21", - "prettier": "2.5.1", + "prettier": "2.8.8", "react": "18.2.0", "react-dom": "^18.2.0", "react-native": "^0.71.0", diff --git a/packages/default-storage-backend/src/AsyncStorage.native.ts b/packages/default-storage-backend/src/AsyncStorage.native.ts index 2b4175fc..d7cbaf97 100644 --- a/packages/default-storage-backend/src/AsyncStorage.native.ts +++ b/packages/default-storage-backend/src/AsyncStorage.native.ts @@ -10,14 +10,14 @@ import { checkValidInput, convertError, convertErrors, -} from './helpers'; -import RCTAsyncStorage from './RCTAsyncStorage'; +} from "./helpers"; +import RCTAsyncStorage from "./RCTAsyncStorage"; import type { AsyncStorageStatic, ErrorLike, KeyValuePair, MultiRequest, -} from './types'; +} from "./types"; if (!RCTAsyncStorage) { throw new Error(`[@RNC/AsyncStorage]: NativeModule: AsyncStorage is null. diff --git a/packages/default-storage-backend/src/AsyncStorage.ts b/packages/default-storage-backend/src/AsyncStorage.ts index a14a75c7..805253d4 100644 --- a/packages/default-storage-backend/src/AsyncStorage.ts +++ b/packages/default-storage-backend/src/AsyncStorage.ts @@ -7,12 +7,12 @@ */ // @ts-ignore Cannot find module 'merge-options' or its corresponding type declarations -import mergeOptions from 'merge-options'; +import mergeOptions from "merge-options"; import type { AsyncStorageStatic, MultiCallback, MultiGetCallback, -} from './types'; +} from "./types"; const merge = mergeOptions.bind({ concatArrays: true, @@ -112,7 +112,7 @@ const AsyncStorage: AsyncStorageStatic = { const numberOfKeys = window.localStorage.length; const keys: string[] = []; for (let i = 0; i < numberOfKeys; i += 1) { - const key = window.localStorage.key(i) || ''; + const key = window.localStorage.key(i) || ""; keys.push(key); } return keys; diff --git a/packages/default-storage-backend/src/NativeAsyncStorageModule.ts b/packages/default-storage-backend/src/NativeAsyncStorageModule.ts index a57af4ed..699cc553 100644 --- a/packages/default-storage-backend/src/NativeAsyncStorageModule.ts +++ b/packages/default-storage-backend/src/NativeAsyncStorageModule.ts @@ -1,4 +1,4 @@ -import { TurboModuleRegistry, TurboModule } from 'react-native'; +import { TurboModuleRegistry, TurboModule } from "react-native"; export interface Spec extends TurboModule { multiGet: ( @@ -23,4 +23,4 @@ export interface Spec extends TurboModule { clear: (callback: (error?: Object[]) => void) => void; } -export default TurboModuleRegistry.get('RNCAsyncStorage'); +export default TurboModuleRegistry.get("RNCAsyncStorage"); diff --git a/packages/default-storage-backend/src/RCTAsyncStorage.ts b/packages/default-storage-backend/src/RCTAsyncStorage.ts index 88292a07..3a3bcc69 100644 --- a/packages/default-storage-backend/src/RCTAsyncStorage.ts +++ b/packages/default-storage-backend/src/RCTAsyncStorage.ts @@ -1,27 +1,27 @@ // @ts-ignore Module '"react-native"' has no exported member 'TurboModuleRegistry'. -import { NativeModules, TurboModuleRegistry } from 'react-native'; -import { shouldFallbackToLegacyNativeModule } from './shouldFallbackToLegacyNativeModule'; +import { NativeModules, TurboModuleRegistry } from "react-native"; +import { shouldFallbackToLegacyNativeModule } from "./shouldFallbackToLegacyNativeModule"; // TurboModuleRegistry falls back to NativeModules so we don't have to try go // assign NativeModules' counterparts if TurboModuleRegistry would resolve // with undefined. let RCTAsyncStorage = TurboModuleRegistry - ? TurboModuleRegistry.get('PlatformLocalStorage') || // Support for external modules, like react-native-windows - TurboModuleRegistry.get('RNC_AsyncSQLiteDBStorage') || - TurboModuleRegistry.get('RNCAsyncStorage') - : NativeModules['PlatformLocalStorage'] || // Support for external modules, like react-native-windows - NativeModules['RNC_AsyncSQLiteDBStorage'] || - NativeModules['RNCAsyncStorage']; + ? TurboModuleRegistry.get("PlatformLocalStorage") || // Support for external modules, like react-native-windows + TurboModuleRegistry.get("RNC_AsyncSQLiteDBStorage") || + TurboModuleRegistry.get("RNCAsyncStorage") + : NativeModules["PlatformLocalStorage"] || // Support for external modules, like react-native-windows + NativeModules["RNC_AsyncSQLiteDBStorage"] || + NativeModules["RNCAsyncStorage"]; if (!RCTAsyncStorage && shouldFallbackToLegacyNativeModule()) { if (TurboModuleRegistry) { RCTAsyncStorage = - TurboModuleRegistry.get('AsyncSQLiteDBStorage') || - TurboModuleRegistry.get('AsyncLocalStorage'); + TurboModuleRegistry.get("AsyncSQLiteDBStorage") || + TurboModuleRegistry.get("AsyncLocalStorage"); } else { RCTAsyncStorage = - NativeModules['AsyncSQLiteDBStorage'] || - NativeModules['AsyncLocalStorage']; + NativeModules["AsyncSQLiteDBStorage"] || + NativeModules["AsyncLocalStorage"]; } } diff --git a/packages/default-storage-backend/src/helpers.ts b/packages/default-storage-backend/src/helpers.ts index 7798bee6..3e304b9f 100644 --- a/packages/default-storage-backend/src/helpers.ts +++ b/packages/default-storage-backend/src/helpers.ts @@ -1,4 +1,4 @@ -import type { ErrorLike } from './types'; +import type { ErrorLike } from "./types"; export function checkValidArgs(keyValuePairs: unknown[], callback: unknown) { if ( @@ -7,19 +7,19 @@ export function checkValidArgs(keyValuePairs: unknown[], callback: unknown) { !Array.isArray(keyValuePairs[0]) ) { throw new Error( - '[AsyncStorage] Expected array of key-value pairs as first argument to multiSet' + "[AsyncStorage] Expected array of key-value pairs as first argument to multiSet" ); } - if (callback && typeof callback !== 'function') { + if (callback && typeof callback !== "function") { if (Array.isArray(callback)) { throw new Error( - '[AsyncStorage] Expected function as second argument to multiSet. Did you forget to wrap key-value pairs in an array for the first argument?' + "[AsyncStorage] Expected function as second argument to multiSet. Did you forget to wrap key-value pairs in an array for the first argument?" ); } throw new Error( - '[AsyncStorage] Expected function as second argument to multiSet' + "[AsyncStorage] Expected function as second argument to multiSet" ); } } @@ -27,14 +27,14 @@ export function checkValidArgs(keyValuePairs: unknown[], callback: unknown) { export function checkValidInput(...input: unknown[]) { const [key, value] = input; - if (typeof key !== 'string') { + if (typeof key !== "string") { // eslint-disable-next-line no-console console.warn( `[AsyncStorage] Using ${typeof key} type for key is not supported. This can lead to unexpected behavior/errors. Use string instead.\nKey passed: ${key}\n` ); } - if (input.length > 1 && typeof value !== 'string') { + if (input.length > 1 && typeof value !== "string") { if (value == null) { throw new Error( `[AsyncStorage] Passing null/undefined as value is not supported. If you want to remove value, Use .removeItem method instead.\nPassed value: ${value}\nPassed key: ${key}\n` diff --git a/packages/default-storage-backend/src/hooks.ts b/packages/default-storage-backend/src/hooks.ts index 170b4e69..f430f536 100644 --- a/packages/default-storage-backend/src/hooks.ts +++ b/packages/default-storage-backend/src/hooks.ts @@ -1,5 +1,5 @@ -import AsyncStorage from './AsyncStorage'; -import type { AsyncStorageHook } from './types'; +import AsyncStorage from "./AsyncStorage"; +import type { AsyncStorageHook } from "./types"; export function useAsyncStorage(key: string): AsyncStorageHook { return { diff --git a/packages/default-storage-backend/src/index.ts b/packages/default-storage-backend/src/index.ts index d45caae4..d38cb3b3 100644 --- a/packages/default-storage-backend/src/index.ts +++ b/packages/default-storage-backend/src/index.ts @@ -1,7 +1,7 @@ -import AsyncStorage from './AsyncStorage'; +import AsyncStorage from "./AsyncStorage"; -export { useAsyncStorage } from './hooks'; +export { useAsyncStorage } from "./hooks"; -export type { AsyncStorageStatic } from './types'; +export type { AsyncStorageStatic } from "./types"; export default AsyncStorage; diff --git a/packages/default-storage-backend/src/shouldFallbackToLegacyNativeModule.ts b/packages/default-storage-backend/src/shouldFallbackToLegacyNativeModule.ts index 9e6ebc4d..db53e0fe 100644 --- a/packages/default-storage-backend/src/shouldFallbackToLegacyNativeModule.ts +++ b/packages/default-storage-backend/src/shouldFallbackToLegacyNativeModule.ts @@ -1,8 +1,8 @@ -import { NativeModules } from 'react-native'; +import { NativeModules } from "react-native"; export function shouldFallbackToLegacyNativeModule(): boolean { const expoConstants = - NativeModules['NativeUnimoduleProxy']?.modulesConstants?.ExponentConstants; + NativeModules["NativeUnimoduleProxy"]?.modulesConstants?.ExponentConstants; if (expoConstants) { /** @@ -24,7 +24,7 @@ export function shouldFallbackToLegacyNativeModule(): boolean { */ if ( isLegacySdkVersion || - ['storeClient', 'standalone'].includes(expoConstants.executionEnvironment) + ["storeClient", "standalone"].includes(expoConstants.executionEnvironment) ) { return true; } diff --git a/packages/default-storage-backend/tsconfig.build.json b/packages/default-storage-backend/tsconfig.build.json index a0b43515..9ed6c0c1 100644 --- a/packages/default-storage-backend/tsconfig.build.json +++ b/packages/default-storage-backend/tsconfig.build.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../.config/tsconfig.base.json", "include": [ "src" ] diff --git a/yarn.lock b/yarn.lock index 4252cab2..32019460 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5135,7 +5135,7 @@ __metadata: expo: ^48.0.0 lodash: ^4.17.21 merge-options: ^3.0.4 - prettier: 2.5.1 + prettier: 2.8.8 react: 18.2.0 react-dom: ^18.2.0 react-native: ^0.71.0 @@ -5170,7 +5170,7 @@ __metadata: dependencies: "@react-native-community/eslint-config": 3.2.0 eslint: 8.26.0 - prettier: 2.5.1 + prettier: 2.8.8 typescript: 4.9.5 languageName: unknown linkType: soft @@ -20077,12 +20077,12 @@ __metadata: languageName: node linkType: hard -"prettier@npm:2.5.1": - version: 2.5.1 - resolution: "prettier@npm:2.5.1" +"prettier@npm:2.8.8": + version: 2.8.8 + resolution: "prettier@npm:2.8.8" bin: prettier: bin-prettier.js - checksum: 21b9408476ea1c544b0e45d51ceb94a84789ff92095abb710942d780c862d0daebdb29972d47f6b4d0f7ebbfb0ffbf56cc2cfa3e3e9d1cca54864af185b15b66 + checksum: b49e409431bf129dd89238d64299ba80717b57ff5a6d1c1a8b1a28b590d998a34e083fa13573bc732bb8d2305becb4c9a4407f8486c81fa7d55100eb08263cf8 languageName: node linkType: hard