Skip to content

Migration from React Native repo #1

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

Merged
merged 83 commits into from
Feb 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
db0aba4
[ReactNative] s/ReactKit/React/g
tadeuzagallo Mar 26, 2015
ddd2bce
Updates from Thu 26 Mar
vjeux Mar 26, 2015
8e7eca4
Fix a crash in RCTAsyncLocalStorage when the value is not a string.
janicduplessis Mar 31, 2015
768e2c2
Updates from Tue 31 Mar
vjeux Apr 1, 2015
a76cc63
Added non-class-scanning-based approach fror registering js methods
nicklockwood Apr 8, 2015
a9fbac9
[React Native] RCT_EXPORT lvl.2
Apr 8, 2015
1b6988b
Updates from Thu 9 Apr
vjeux Apr 9, 2015
0a14824
Merge branch 'oss-sync/master' into HEAD
vjeux Apr 15, 2015
e077b34
Implemented thread control for exported methods
nicklockwood Apr 18, 2015
408718e
Updates from Fri 24 Apr
sahrens Apr 24, 2015
0579fa1
[ReactNative] Implement merge functionality for AsyncStorage
sahrens Jun 3, 2015
b808ba2
[ReactNative] Use RCTNullIfNill and (id)kCFNull
tadeuzagallo Jun 12, 2015
61249b1
[ReactNative] Use RCTNullIfNill and (id)kCFNull
tadeuzagallo Jun 12, 2015
9b8f637
Updates from Mon 15 Jun
tadeuzagallo Jun 15, 2015
cd1fe89
[RN Events] clear disk cache on logout
sahrens Jun 18, 2015
9021c69
Fixed AsyncLocalStorage bug
nicklockwood Jun 22, 2015
16b4789
Fixed async local storage
nicklockwood Jun 23, 2015
cfc8e22
Updates from Wed 24 Jun
frantic Jun 24, 2015
e5ade77
Remove isValid from RCTInvalidating
javache Aug 14, 2015
951692c
Convert alloc/init to new to please linter
nicklockwood Aug 17, 2015
2c2a308
Ran Convert > To Modern Objective C Syntax
nicklockwood Aug 24, 2015
ea7f6b4
Updates from Tue 25 Aug
Aug 25, 2015
eec09e6
Release React Native for Android
Sep 14, 2015
71da896
AsyncStorage improvements
andreicoman11 Sep 24, 2015
64b09ff
Fix SQL errors caused by huge operations
andreicoman11 Sep 24, 2015
302c542
Protect against SQLiteFullExceptions
andreicoman11 Oct 6, 2015
d44081c
Improved AsyncLocalStorage performance
nicklockwood Oct 20, 2015
fcec61d
Clear cache entry when calling multiRemove
nicklockwood Oct 20, 2015
7158c97
Add storage module to fb
andreicoman11 Oct 27, 2015
276f329
Merged the JS implementations of AsyncStorage, as there seem to be no…
nicklockwood Oct 27, 2015
5a4adca
Backed out D2540626
nicklockwood Oct 28, 2015
e59c23f
Fix AsyncStorage error multiplexing
sahrens Oct 28, 2015
3776a34
Added lightweight generic annotations
nicklockwood Nov 3, 2015
59f7ee4
No `NSError *` over the bridge
voideanvalue Nov 5, 2015
8e95b2d
Improved AsyncStorage merge function
nicklockwood Nov 11, 2015
35f8ea1
Added in-memory cache for AsyncLocalStorage
nicklockwood Nov 14, 2015
b1fa8ae
Make ReactDatabaseSupplier use application context
lexs Nov 24, 2015
0f29b3b
Implement efficient DiskCache.clear()
milend Nov 25, 2015
cceacee
Revert 3770f061c832 for further investigation
milend Nov 25, 2015
d9e4119
Fix errors uncovered by v0.19.0
gabelevi Dec 2, 2015
bc738da
Batch AsyncStorage.multiGet calls
milend Dec 3, 2015
813c82d
Replaced RegExp method parser with recursive descent
nicklockwood Dec 10, 2015
5dba2e5
Make it possible to set DB size
andreicoman11 Dec 14, 2015
22eca3d
Increased RCTInlineValueThreshold for asynclocalstorage
nicklockwood Jan 5, 2016
c6ed617
multiGet breaking test and fix
mvayngrib Feb 6, 2016
fd2eeca
add examples that demonstrate how to use mergeItem, multiMerge, multi…
geirman Mar 15, 2016
189dedf
Increase RN devtools retry timeout
javache Apr 1, 2016
946be99
Update AsyncStorage.js
kushal Apr 11, 2016
99853c6
change undeclared variable to intended value
taelimoh May 26, 2016
fe19441
Update AsyncStorage doc
Jun 24, 2016
91e820a
Automated changes to remove implicit capture of self in blocks: Libra…
Jul 7, 2016
a51f50b
update AsyncStorage.js documentation
arielelkin Jul 15, 2016
ef51360
Auto-fix lint errors
davidaurelio Aug 9, 2016
ee40d2c
Convert modules to use @ReactModule instead of getName()
aaronechiu Aug 11, 2016
d5456d2
Reverted commit D3334273
aaronechiu Aug 12, 2016
d3a2db4
Add wrapper class for async storage
Aug 18, 2016
fbaef6c
covert RNFeedPackage and it's modules to use @ReactModule and @ReactM…
aaronechiu Sep 2, 2016
6bc3d64
Apple TV support 1: existing Objective C code should compile for tvOS
douglowder Sep 27, 2016
51bb218
Enforcing semi-colon consistency between dev and release modes when c…
dcaspi Nov 16, 2016
59f0c6a
Move all header imports to "<React/..>"
javache Nov 23, 2016
999c9ce
result in RCTAsyncStorage.multiGet could be null.
Dec 16, 2016
029128e
strip off RK/RCT prefix from NativeModules
aaronechiu Jan 31, 2017
d682652
inline a bunch of NativeModule requires
aaronechiu Feb 18, 2017
3851124
correctly order ASyncStorage
aaronechiu Feb 21, 2017
e15d5f9
Delay module creation on call for constants when module has none
Apr 10, 2017
432f7cd
Find hasConstant status via preprocessing
Apr 13, 2017
0869a5e
Remove SetBuilder
javache Jun 14, 2017
8ce25d5
always pass key parameter to RCTReadFile
fromcelticpark Sep 28, 2017
c674b2a
Migrate additional docs to the new format
hramos Nov 20, 2017
207a382
Update license headers for MIT license
sophiebits Feb 17, 2018
396bae3
Fix ESLint warnings using 'yarn lint --fix'
draperunner Feb 22, 2018
f006a7e
Remove @providesModule from all modules
rubennorte Apr 25, 2018
fb51e6b
Convert react-native-github/Libraries to let/const
elicwhite May 10, 2018
35731af
Prettier React Native Libraries
elicwhite May 11, 2018
353c95a
make AsyncStorage serially execute requests (#18522)
Jul 30, 2018
75557f1
Update copyright headers to yearless format
hramos Sep 11, 2018
f2fbfc3
Use static constants instead of strings when referring to View Manage…
axe-fb Nov 9, 2018
42655c7
Expose AsyncLocalStorage get/set methods (#18454)
ejmartin504 Jan 29, 2019
92e9984
Always write the manifest in multiRemove (#18613)
esprehn Jan 29, 2019
7f5ffb0
Keep commit history
Feb 8, 2019
6e8fb2a
Merge migration branch
krizzu Feb 8, 2019
044a2aa
Module scaffolding
Feb 9, 2019
429f700
Merge pull request #2 from Krizzu/module_scaffold
krizzu Feb 10, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
290 changes: 290 additions & 0 deletions .eslintrc

Large diffs are not rendered by default.

90 changes: 90 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
[ignore]
; This flowconfig is forked by platform - the only difference between them is which suffix is ignored.
.*/*[.]android.js
;.*/*[.]ios.js

; Ignore templates for 'react-native init'
.*/local-cli/templates/.*

; Ignore the Dangerfile
node_modules/react-native/bots/dangerfile.js

; Ignore "BUCK" generated dirs
node_modules/react-native/\.buckd/

; Ignore unexpected extra "@providesModule"
.*/node_modules/.*/node_modules/fbjs/.*

; Ignore duplicate module providers
; For RN Apps installed via npm, "Libraries" folder is inside
; "node_modules/react-native" but in the source repo it is in the root
.*/Libraries/react-native/React.js

; Ignore polyfills
.*/Libraries/polyfills/.*

; Ignore metro
.*/node_modules/metro/.*

; Ignore "config-chain"'s test folder - it has a corrupt JSON file that's tripping flow
.*/node_modules/config-chain/test/*.

; These should not be required directly
; require from fbjs/lib instead: require('fbjs/lib/invariant')
.*/node_modules/invariant/.*
.*/node_modules/warning/.*

[include]

[libs]
node_modules/react-native/Libraries/react-native/react-native-interface.js
node_modules/react-native/flow/
node_modules/react-native/flow-github/

[lints]

[options]
emoji=true

esproposal.optional_chaining=enable
esproposal.nullish_coalescing=enable

module.system=haste
module.system.haste.use_name_reducers=true
# keep the following in sync with server/haste/hasteImpl.js
# get basename
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
# strip .js or .js.flow suffix
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
# strip platform suffix
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
module.system.haste.paths.blacklist=.*/__tests__/.*
module.system.haste.paths.blacklist=.*/__mocks__/.*
module.system.haste.paths.whitelist=<PROJECT_ROOT>/js/.*
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/RNTester/.*
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/IntegrationTests/.*
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*

munge_underscores=true

module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
# Support the library import in examples
module.name_mapper='^\@react-native-community/async-storage$' -> '<PROJECT_ROOT>/lib/AsyncStorage.js'

suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*[react_native\\(_android\\)?_oss|react_native\\(_android\\)?_fb][a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*[react_native\\(_android\\)?_oss|react_native\\(_android\\)?_fb][a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError

[strict]

[version]
^0.86.0
48 changes: 48 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@

# OSX
#
.DS_Store

# node.js
#
node_modules/
npm-debug.log
yarn-error.log


# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace


# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml

# BUCK
buck-out/
\.buckd/
*.keystore

# Editor config
.vscode
85 changes: 85 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# JS
node_modules
yarn.lock

# Project files
CONTRIBUTING.md
CODE_OF_CONDUCT.md
README.md

# Config files
.babelrc
babel.config.js
.editorconfig
.eslintrc
.flowconfig
.watchmanconfig
jsconfig.json
.npmrc
.gitattributes
.circleci
*.coverage.json
.opensource
.circleci
.eslintignore
codecov.yml

# Example
example/

# Android
android/*/build/
android/gradlew
android/build
android/gradlew.bat
android/gradle/
android/com_crashlytics_export_strings.xml
android/local.properties
android/.gradle/
android/.signing/
android/.idea/gradle.xml
android/.idea/libraries/
android/.idea/workspace.xml
android/.idea/tasks.xml
android/.idea/.name
android/.idea/compiler.xml
android/.idea/copyright/profiles_settings.xml
android/.idea/encodings.xml
android/.idea/misc.xml
android/.idea/modules.xml
android/.idea/scopes/scope_settings.xml
android/.idea/vcs.xml
android/*.iml
android/.settings

# iOS
ios/*.xcodeproj/xcuserdata
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
*.xcuserstate
project.xcworkspace/
xcuserdata/

# Misc
.DS_Store
.DS_Store?
*.DS_Store
coverage.android.json
coverage.ios.json
coverage
npm-debug.log
.github
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.dbandroid/gradle
docs
.idea
tests/
bin/test.js
codorials
.vscode
.nyc_output
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"requirePragma": true,
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": false,
"jsxBracketSameLine": true,
"parser": "flow"
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2015-present, Facebook, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,24 @@
# react-native-async-storage

Asynchronous, persistent, key-value storage system for React Native.

## Getting started


### Install

`yarn add @react-native-community/async-storage`

or

`npm install @react-native-community/async-storage --save`


### Link

`react-native link @react-native-community/async-storage`

## Usage

ToDo

40 changes: 40 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

buildscript {
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}

def getExtOrDefault(name) {
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['RNAsyncStorage_' + name]
}

def getExtOrIntegerDefault(name) {
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties['RNAsyncStorage_' + name]).toInteger()
}

apply plugin: 'com.android.library'

android {
compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')
buildToolsVersion getExtOrDefault('buildToolsVersion')

defaultConfig {
minSdkVersion getExtOrIntegerDefault('minSdkVersion')
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
}
}

repositories {
mavenCentral()
}

dependencies {
api 'com.facebook.react:react-native:+'
}

4 changes: 4 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
RNAsyncStorage_compileSdkVersion=28
RNAsyncStorage_buildToolsVersion=28.0.3
RNAsyncStorage_targetSdkVersion=28
RNAsyncStorage_minSdkVersion=19
6 changes: 6 additions & 0 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.reactnativecommunity.asyncstorage">

</manifest>

Loading