Skip to content

Commit

Permalink
Migrate mobx-react as package
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel K committed Nov 6, 2020
1 parent 7defd13 commit 50b4eb5
Show file tree
Hide file tree
Showing 57 changed files with 6,161 additions and 91 deletions.
14 changes: 11 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ jobs:
steps:
- attach_workspace:
at: .
- run: yarn mobx build test
- run: yarn lint
- run: yarn test -i
- run: yarn mobx test:types
- run: yarn mobx-react test:types

mobx:
executor: node-executor
Expand All @@ -46,13 +45,22 @@ jobs:
- store_artifacts:
path: packages/mobx/perf_report
destination: mobx-perf
mobx-react:
executor: node-executor
steps:
- attach_workspace:
at: .
- run: yarn mobx build test
- run: yarn mobx test:size

workflows:
version: 2
test-all:
main:
jobs:
- install
- test:
requires: [install]
- mobx:
requires: [install]
- mobx-react:
requires: [install]
9 changes: 5 additions & 4 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: ["push", "pull_request"]

jobs:
mobx:
name: MobX Coverage
name: Packages coverage
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
Expand All @@ -21,12 +21,13 @@ jobs:
- name: Install Dependencies
run: yarn --frozen-lockfile --ignore-scripts

- name: Build mobx
run: yarn mobx build --target test

- name: Run Coverage
run: yarn mobx test:coverage
run: yarn coverage

- name: Upload to coveralls
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./packages/mobx/coverage/lcov.info
base-path: packages/mobx
3 changes: 2 additions & 1 deletion jest.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ module.exports = function buildConfig(packageDirectory, pkgConfig) {
},
testRegex: "__tests__/.*\\.(j|t)sx?$",
coverageDirectory: "<rootDir>/coverage/",
collectCoverageFrom: ["<rootDir>/packages/*/src/**/*.{ts,tsx}"],
coverageReporters: ["lcov", "text"],
collectCoverageFrom: ["<rootDir>/src/**/*.{ts,tsx}", "!**/node_modules/**"],
displayName: packageName,
...pkgConfig
}
Expand Down
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ const buildConfig = require("./jest.base.config")

module.exports = buildConfig(__dirname, {
projects: ["<rootDir>/packages/*/jest.config.js"]
// collectCoverageFrom: ["<rootDir>/packages/*/src/**/*.{ts,tsx}"]
})
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
],
"scripts": {
"test": "jest",
"coverage": "jest --coverage",
"lint": "eslint packages/*/src/**/*",
"prettier": "prettier --write **/*.{js,ts,md}",
"release": "yarn changeset publish",
"mobx": "yarn workspace mobx",
"mobx-react": "yarn workspace mobx-react",
"mobx-undecorate": "yarn workspace mobx-undecorate",
"docs:build": "yarn --cwd website build",
"docs:start": "yarn --cwd website start",
Expand All @@ -33,7 +35,9 @@
"import-size": "^1.0.2",
"iterall": "^1.3.0",
"jest": "^26.6.2",
"jest-mock-console": "^1.0.1",
"lint-staged": "^10.1.7",
"minimist": "^1.2.5",
"mkdirp": "1.0.4",
"prettier": "^2.0.5",
"pretty-quick": "3.1.0",
Expand All @@ -47,5 +51,5 @@
"hooks": {
"pre-commit": "pretty-quick --staged"
}
}
}
}
6 changes: 6 additions & 0 deletions packages/mobx-react/.browserlistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"targets": {
"chrome": "58",
"ie": "9"
}
}
632 changes: 632 additions & 0 deletions packages/mobx-react/CHANGELOG.md

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions packages/mobx-react/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2015 Michel Weststrate

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.
Loading

0 comments on commit 50b4eb5

Please sign in to comment.