Skip to content

Commit

Permalink
Merge pull request #167 from GetStream/vishal/fixing-example-apps
Browse files Browse the repository at this point in the history
v1.0.0
  • Loading branch information
vishalnarkhede authored Jan 11, 2021
2 parents 434bff1 + 95edb5d commit 0d3e891
Show file tree
Hide file tree
Showing 319 changed files with 17,220 additions and 28,770 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"presets": ["@babel/preset-env", "@babel/preset-react", "@babel/flow"],
"presets": ["@babel/preset-env", "@babel/preset-react"],
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-transform-runtime",
Expand Down
5 changes: 0 additions & 5 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
**/*{.,-}min.js
node_modules/
/lib/
/example/lib/
/examples/one/
/native-example/lib/
/native-package/lib/
/expo-package/lib/
/flow-typed/
build
dist
/docs/
Expand Down
125 changes: 84 additions & 41 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,67 +1,110 @@
{
"plugins": ["babel", "markdown"],
"env": {
"browser": true,
"es6": true
},
"extends": [
"eslint:recommended",
"plugin:flowtype/recommended",
"plugin:react/recommended",
"plugin:jest/recommended"
],
"parser": "babel-eslint",
"parserOptions": {
"ecmaFeatures": {
"modules": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": ["babel", "markdown"],
"rules": {
"no-console": 0,
"no-mixed-spaces-and-tabs": 1,
"array-callback-return": 2,
"arrow-body-style": 2,
"comma-dangle": 0,
"no-unused-vars": 1,
"eqeqeq": [2, "smart"],
"no-useless-concat": 2,
"babel/no-invalid-this": 2,
"default-case": 2,
"eqeqeq": [2, "smart"],
"jest/expect-expect": 0,
"jest/no-conditional-expect": 0,
"jsx-quotes": ["error", "prefer-single"],
"linebreak-style": [2, "unix"],
"no-console": 0,
"no-mixed-spaces-and-tabs": 1,
"no-self-compare": 2,
"prefer-const": 1,
"no-underscore-dangle": [2, { "allowAfterThis": true }],
"no-unused-vars": [1, { "ignoreRestSiblings": true }],
"no-useless-concat": 2,
"no-var": 2,
"object-shorthand": 1,
"babel/no-invalid-this": 2,
"array-callback-return": 2,
"valid-typeof": 2,
"arrow-body-style": 2,
"require-await": 2,
"prefer-const": 1,
"react/prop-types": 0,
"no-var": 2,
"linebreak-style": [2, "unix"],
"require-await": 2,
"semi": [1, "always"],
"flowtype/require-valid-file-annotation": [
0,
"always",
{
"annotationStyle": "line"
}
],
"flowtype/generic-spacing": 0,
"flowtype/space-after-type-colon": 0
"valid-typeof": 2
},
"env": {
"es6": true,
"browser": true,
"commonjs": true,
"mocha": true
},
"globals": {
"process": true
},
"parser": "babel-eslint",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2018,
"ecmaFeatures": {
"modules": true
"settings": {
"import/resolver": {
"babel-module": {},
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"],
"paths": ["src"]
}
},
"react": {
"pragma": "React",
"version": "detect"
}
},
"overrides": [
{
"files": ["*.md"],
"rules": {
"no-undef": 0,
"react/jsx-no-undef": 0,
"react/react-in-jsx-scope": 0,
"semi": 0,
"no-undef": 0
"semi": 0
}
},
{
"env": {
"es6": true,
"browser": true
},
"files": ["**/*.ts", "**/*.tsx"],
"parserOptions": {
"ecmaFeatures": {
"modules": true,
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": ["babel", "markdown", "prettier", "react"],
"rules": {
"react-hooks/exhaustive-deps": 0,
"react-native/no-inline-styles": 0,
"array-callback-return": 2,
"arrow-body-style": 2,
"comma-dangle": 0,
"babel/no-invalid-this": 2,
"default-case": 2,
"eqeqeq": [2, "smart"],
"linebreak-style": [2, "unix"],
"jsx-quotes": ["error", "prefer-single"],
"no-console": 0,
"no-mixed-spaces-and-tabs": 1,
"no-self-compare": 2,
"no-shadow": 0,
"no-underscore-dangle": [2, { "allowAfterThis": true }],
"no-unused-vars": [1, { "ignoreRestSiblings": true }],
"no-useless-concat": 2,
"no-var": 2,
"object-shorthand": 1,
"prefer-const": 1,
"react/prop-types": 0,
"require-await": 2,
"semi": [1, "always"],
"valid-typeof": 2
}
}
]
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: build

on:
push:
branches:
- vishal/fixing-example-apps
- master
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node: [10, 12, 14]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
with:
node-version: ${{ matrix.node }}

- name: Get yarn cache directory path
id: yarn-cache-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@master
id: yarn-cache
with:
path: ${{ steps.yarn-cache-path.outputs.dir }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: yarn-

- name: Install dependencies
run: yarn install

- name: Lint and Test with ${{ matrix.node }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
yarn lint
yarn docs
yarn validate-translations
13 changes: 3 additions & 10 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
{
"singleQuote": true,
"trailingComma": "all",
"arrowParens": "always",
"jsxSingleQuote": true,
"singleQuote": true,
"tabWidth": 2,
"overrides": [
{
"files": "*.ts",
"options": {
"trailingComma": "all"
}
}
]
"trailingComma": "all"
}
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

29 changes: 27 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,34 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
## 1.0.0-rc.1 - 2021-01-11

Nothing yet
- Added support for Expo 40 and react-native 0.63
- Removed [flow types](https://flow.org/) and added traditional [`PropTypes`](https://reactjs.org/docs/typechecking-with-proptypes.html)
- Upgrade to `[email protected]`
- Cleanup around examples

Removed following existing examples:

- example
- examples/one
- native-example

Added new examples:

- examples/expo (Expo 40)
- examples/native (RN 0.63.x)

- Replace `react-native-image-picker` with [`react-native-image-crop-picker`](https://github.com/ivpusic/react-native-image-crop-picker) to allow compression.

- Fixed pending issues:
- https://github.com/GetStream/react-native-activity-feed/issues/156
- https://github.com/GetStream/react-native-activity-feed/issues/154
- https://github.com/GetStream/react-native-activity-feed/issues/152
- https://github.com/GetStream/react-native-activity-feed/issues/126
- https://github.com/GetStream/react-native-activity-feed/issues/99
- https://github.com/GetStream/react-native-activity-feed/issues/160
- https://github.com/GetStream/react-native-activity-feed/issues/165

## 0.9.1 - 2020-03-31

Expand Down
37 changes: 37 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
.PHONY: netlify
.PHONY: example-build example-deps

EXAMPLES_PATH = examples
EXAMPLES = expo native
EXAMPLES_APPS = $(addprefix $(EXAMPLES_PATH)/,$(EXAMPLES))
EXAMPLES_APPS_DEPS = $(addsuffix /node_modules/installed_dependencies,$(EXAMPLES_APPS))

WRAPPER_PACKAGES = native-package expo-package
WRAPPER_PACKAGES_DEPS = $(addsuffix /node_modules/installed_dependencies,$(WRAPPER_PACKAGES))

SOURCES = $(filter(%$(EXAMPLES_PATH)/, $(wildcard *.js) $(wildcard */*.js) $(wildcard */*.scss) $(wildcard */*.png) $(wildcard */*.html) $(wildcard ../client/*/*.js) $(wildcard ../client/*.js))
LIB_SOURCES = $(wildcard *.js) $(wildcard */*.js) $(wildcard */*.scss) $(wildcard */*.png) $(wildcard */*.html) $(wildcard ../client/*/*.js) $(wildcard ../client/*.js)

example-deps: $(EXAMPLES_APPS_DEPS)

$(EXAMPLES_APPS_DEPS): %/node_modules/installed_dependencies: %/yarn.lock %/package.json $(SOURCES) $(WRAPPER_PACKAGES_DEPS)
cd $* && yarn install
touch $@

$(WRAPPER_PACKAGES_DEPS): %/node_modules/installed_dependencies: %/yarn.lock %/package.json $(SOURCES) node_modules/installed_dependencies
cd $* && yarn install
touch $@

node_modules/installed_dependencies: yarn.lock package.json
yarn install
touch $@

dist/built: $(LIB_SOURCES) node_modules/installed_dependencies
yarn build
touch $@ q

clean:
rm -rf $(addsuffix /node_modules,$(EXAMPLES_APPS)) || true
rm -rf $(addsuffix /node_modules,$(WRAPPER_PACKAGES)) || true
rm -rf dist || true
rm -rf node_modules || true
Loading

0 comments on commit 0d3e891

Please sign in to comment.