Skip to content

Commit e2849df

Browse files
committed
feat: New API with full backward compatibility (react-native-netinfo#84)
See the README for full details. BREAKING CHANGE
1 parent e72c5a0 commit e2849df

File tree

75 files changed

+2846
-1381
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+2846
-1381
lines changed

.circleci/config.yml

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: 2.1
22

33
orbs:
4-
rn: react-native-community/react-native@1.0.0
4+
rn: react-native-community/react-native@1.2.0
55

66
jobs:
77
checkout_code:
@@ -20,21 +20,12 @@ jobs:
2020
- run:
2121
name: Lint JS Code (ESLint)
2222
command: yarn run validate:eslint
23-
- run:
24-
name: Flow
25-
command: yarn run validate:flow
2623
- run:
2724
name: TypeScript
2825
command: yarn run validate:typescript
2926
- run:
3027
name: Jest
3128
command: yarn run test:jest
32-
- run:
33-
name: Build Android JavaScript Bundle
34-
command: yarn run test:detox:android:bundle:release
35-
- run:
36-
name: Build iOS JavaScript Bundle
37-
command: yarn run test:detox:ios:bundle:release
3829
publish:
3930
executor: rn/linux_js
4031
steps:
@@ -58,17 +49,19 @@ workflows:
5849
build_type: debug
5950
requires:
6051
- analyse
61-
- rn/android_build:
62-
name: build_android_release
63-
project_path: "example/android"
64-
build_type: release
65-
requires:
66-
- analyse
52+
# Disabled until we can get a handle on the memory issues
53+
# - rn/android_build:
54+
# name: build_android_release
55+
# project_path: "example/android"
56+
# build_type: release
57+
# requires:
58+
# - analyse
6759
- rn/android_test:
68-
detox_configuration: "android.emu.release"
60+
start_metro: true
61+
detox_configuration: "android.emu.debug"
6962
detox_loglevel: "trace"
7063
requires:
71-
- build_android_release
64+
- build_android_debug
7265
- rn/ios_build_and_test:
7366
project_path: "example/ios/NetInfoExample.xcodeproj"
7467
derived_data_path: "example/ios/build"

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ typings
22
node_modules
33
example/android-bundle.js
44
example/ios-bundle.js
5+
6+
# generated by bob
7+
lib/

.eslintrc.js

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,46 @@
1-
module.exports = { extends: "@react-native-community" };
1+
/**
2+
* Copyright (c) Facebook, Inc. and its affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @format
8+
*/
9+
10+
const typescriptEslintRecommended = require('@typescript-eslint/eslint-plugin/dist/configs/recommended.json');
11+
const typescriptEslintPrettier = require('eslint-config-prettier/@typescript-eslint');
12+
13+
module.exports = {
14+
extends: ['@react-native-community'],
15+
overrides: [
16+
{
17+
files: ['*.ts', '*.tsx'],
18+
// Apply the recommended Typescript defaults and the prettier overrides to all Typescript files
19+
rules: Object.assign(
20+
typescriptEslintRecommended.rules,
21+
typescriptEslintPrettier.rules,
22+
{
23+
'@typescript-eslint/explicit-member-accessibility': 'off',
24+
},
25+
),
26+
},
27+
{
28+
files: ['example/**/*.ts', 'example/**/*.tsx'],
29+
rules: {
30+
// Turn off rules which are useless and annoying for the example files files
31+
'@typescript-eslint/explicit-function-return-type': 'off',
32+
'react-native/no-inline-styles': 'off',
33+
},
34+
},
35+
{
36+
files: ['**/__tests__/**/*.ts', '**/*.spec.ts'],
37+
env: {
38+
jest: true,
39+
},
40+
rules: {
41+
// Turn off rules which are useless and annoying for unit test files
42+
'@typescript-eslint/explicit-function-return-type': 'off',
43+
},
44+
},
45+
],
46+
};

.flowconfig

Lines changed: 0 additions & 93 deletions
This file was deleted.

.prettierrc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@
33
"singleQuote": true,
44
"trailingComma": "all",
55
"bracketSpacing": false,
6-
"jsxBracketSameLine": true,
7-
"parser": "flow"
8-
}
6+
"jsxBracketSameLine": true
7+
}

0 commit comments

Comments
 (0)