Skip to content

Commit 12a571b

Browse files
committed
Merge branch 'main' of https://github.com/rx-angular/rx-angular into rx-strategy-provider-docs
2 parents a1526ef + 59956b3 commit 12a571b

File tree

388 files changed

+3937
-2201
lines changed

Some content is hidden

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

388 files changed

+3937
-2201
lines changed

.eslintrc.json

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,20 @@
1313
"allow": [],
1414
"depConstraints": [
1515
{
16-
"sourceTag": "*",
16+
"sourceTag": "type:app",
1717
"onlyDependOnLibsWithTags": ["*"]
18+
},
19+
{
20+
"sourceTag": "template",
21+
"onlyDependOnLibsWithTags": ["type:test-util", "cdk"]
22+
},
23+
{
24+
"sourceTag": "state",
25+
"onlyDependOnLibsWithTags": ["type:test-util", "cdk"]
26+
},
27+
{
28+
"sourceTag": "cdk",
29+
"onlyDependOnLibsWithTags": ["type:test-util"]
1830
}
1931
]
2032
}
@@ -23,16 +35,37 @@
2335
},
2436
{
2537
"files": ["*.ts", "*.tsx"],
26-
"extends": ["plugin:@nrwl/nx/typescript"],
38+
"extends": [
39+
"prettier",
40+
"eslint:recommended",
41+
"plugin:@nrwl/nx/typescript",
42+
"plugin:@angular-eslint/recommended",
43+
"plugin:@typescript-eslint/recommended"
44+
],
2745
"parserOptions": {
2846
"project": "./tsconfig.*?.json"
2947
},
30-
"rules": {}
48+
"rules": {
49+
"@typescript-eslint/ban-ts-comment": "warn",
50+
"@typescript-eslint/no-inferrable-types": "warn",
51+
"@typescript-eslint/ban-types": "warn",
52+
"@typescript-eslint/no-empty-interface": "warn",
53+
"@typescript-eslint/no-empty-function": "warn",
54+
"prefer-rest-params": "warn",
55+
"no-prototype-builtins": "warn",
56+
"no-empty": "warn"
57+
}
3158
},
3259
{
3360
"files": ["*.js", "*.jsx"],
34-
"extends": ["plugin:@nrwl/nx/javascript"],
35-
"rules": {}
61+
"extends": [
62+
"prettier",
63+
"plugin:@angular-eslint/template/recommended",
64+
"plugin:@nrwl/nx/javascript"
65+
],
66+
"rules": {
67+
"@typescript-eslint/no-non-null-assertion": "off"
68+
}
3669
}
3770
]
3871
}

.github/actions/setup/action.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Setup
2+
description: Setup Node.js, cache and install dependencies
3+
inputs:
4+
node-version:
5+
description: Node.js version
6+
required: false
7+
default: '14'
8+
runs:
9+
using: composite
10+
steps:
11+
- name: Checkout all commits
12+
uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Derive appropriate SHAs for base and head for `nx affected` commands
17+
uses: nrwl/nx-set-shas@v2
18+
19+
- name: Use Node.js
20+
uses: actions/setup-node@v2
21+
with:
22+
node-version: ${{ inputs.node-version }}
23+
24+
- uses: actions/cache@v2
25+
id: yarn-cache
26+
with:
27+
path: |
28+
node_modules
29+
~/.cache/Cypress
30+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
31+
restore-keys: |
32+
${{ runner.os }}-yarn-
33+
34+
- name: Install dependencies
35+
if: steps.yarn-cache.outputs.cache-hit != 'true'
36+
shell: bash
37+
run: yarn --frozen-lockfile --no-progress --non-interactive --prefer-offline
38+
env:
39+
HUSKY_SKIP_INSTALL: 'true'

.github/poc/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ jobs:
2727
uses: actions/setup-node@v1
2828
with:
2929
node-version: ${{ matrix.node-version }}
30-
- run: git fetch --no-tags --prune --depth=5 origin master
30+
- run: git fetch --no-tags --prune --depth=5 origin main
3131
- name: set Environment Variables
3232
id: release
3333
run: |
3434
VERSION=$(node --eval="process.stdout.write(require('./libs/state/package.json').version)") # e.g. 2.4.2
3535
NEW_VERSION=$(node --eval="process.stdout.write(?)")
36-
if [ $REPOSITORY = "master" ]; then IS_PRE='false'; else IS_PRE='true'; fi
37-
if [ $REPOSITORY = "master" ]; then POSTFIX='' ; else POSTFIX='PRE'; fi
36+
if [ $REPOSITORY = "main" ]; then IS_PRE='false'; else IS_PRE='true'; fi
37+
if [ $REPOSITORY = "main" ]; then POSTFIX='' ; else POSTFIX='PRE'; fi
3838
RELEASEBODY=$(awk -v RS='Release ' '/'$VERSION':(.*)/')
3939
RELEASEBODY="${RELEASEBODY//'%'/'%25'}"
4040
RELEASEBODY="${RELEASEBODY//$'\n'/'%0A'}"

.github/workflows/build-and-test.yml

Lines changed: 48 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,85 @@
1-
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3-
41
name: rx-angular CI
52

63
on:
74
push:
8-
branches: [ master ]
5+
branches: [main]
96
pull_request:
10-
branches: [ master ]
7+
branches: [main]
118
env:
12-
node-version: 14.x
139
NX_CLOUD_DISTRIBUTED_EXECUTION: true
1410
NX_DISTRIBUTED_TASK_EXECUTION: true
1511
NX_VERBOSE_LOGGING: false
1612

1713
jobs:
1814
agents:
1915
runs-on: ubuntu-latest
16+
2017
name: Agent 1
2118
timeout-minutes: 20
19+
2220
strategy:
2321
matrix:
24-
agent: [ 1, 2, 3 ]
22+
agent: [1, 2, 3]
23+
2524
steps:
2625
- uses: actions/checkout@v2
27-
28-
- name: Set up Node.js ${{ env.node-version }}
29-
uses: actions/setup-node@v2
30-
with:
31-
node-version: ${{ env.node-version }}
32-
33-
- uses: actions/cache@v2
34-
id: yarn-cache
35-
with:
36-
path: |
37-
node_modules
38-
~/.cache/Cypress
39-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
40-
restore-keys: |
41-
${{ runner.os }}-yarn-
42-
43-
- name: Install dependencies
44-
if: steps.yarn-cache.outputs.cache-hit != 'true'
45-
env:
46-
HUSKY_SKIP_INSTALL: 'true'
47-
run: yarn --frozen-lockfile --no-progress --non-interactive
26+
- uses: ./.github/actions/setup
4827

4928
- name: Start Nx Agent ${{ matrix.agent }}
50-
run: npx nx-cloud start-agent
51-
build:
29+
run: yarn nx-cloud start-agent
5230

31+
build:
5332
runs-on: ubuntu-latest
54-
steps:
55-
- uses: actions/checkout@v2
56-
name: Checkout [master]
57-
if: github.ref == 'refs/heads/master'
58-
with:
59-
fetch-depth: 0
6033

34+
steps:
6135
- uses: actions/checkout@v2
62-
name: Checkout [pr]
63-
if: github.ref != 'refs/heads/master'
64-
with:
65-
ref: ${{ github.event.pull_request.head.ref }}
66-
repository: ${{github.event.pull_request.head.repo.full_name}}
67-
fetch-depth: 0
68-
69-
- name: Derive appropriate SHAs for base and head for `nx affected` commands
70-
uses: nrwl/nx-set-shas@v2
71-
with:
72-
main-branch-name: 'master'
36+
- uses: ./.github/actions/setup
7337

74-
- name: Set up Node.js ${{ env.node-version }}
75-
uses: actions/setup-node@v2
76-
with:
77-
node-version: ${{ env.node-version }}
78-
79-
- uses: actions/cache@v2
80-
id: yarn-cache
81-
with:
82-
path: |
83-
node_modules
84-
~/.cache/Cypress
85-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
86-
restore-keys: |
87-
${{ runner.os }}-yarn-
88-
89-
- name: Install dependencies
90-
if: steps.yarn-cache.outputs.cache-hit != 'true'
91-
env:
92-
HUSKY_SKIP_INSTALL: 'true'
93-
run: yarn --frozen-lockfile --no-progress --non-interactive
94-
95-
- run: npx nx-cloud start-ci-run
38+
- run: yarn nx-cloud start-ci-run
9639

9740
- name: Run Affected lint
9841
run: yarn nx affected:lint --parallel --maxParallel=3
9942

10043
- name: Run Affected test
101-
run: yarn nx affected:test --parallel --maxParallel=2
44+
run: yarn nx affected:test --parallel --maxParallel=3
45+
46+
- name: Run Affected e2e
47+
run: yarn nx affected:e2e
10248

103-
- name: Run SSR e2e
104-
run: yarn nx run ssr-e2e:e2e --headless
10549
# don't run build in parallel, can cause dead locks
10650
- name: Run Affected build
107-
run: yarn nx affected:build
51+
run: yarn nx affected:build --parallel=false
10852

10953
- run: yarn nx-cloud stop-all-agents
11054

111-
- name: Tag main branch if all jobs succeed
112-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
113-
uses: nrwl/nx-tag-successful-ci-run@v1
55+
build-docs:
56+
runs-on: ubuntu-latest
57+
58+
if: github.ref == 'refs/heads/main'
59+
60+
needs: [build]
61+
62+
steps:
63+
- uses: actions/checkout@v2
64+
- uses: ./.github/actions/setup
65+
66+
# @Notice: temporary skip Nx cloud for this job as it's hanging indefinitely in the CI.
67+
# - run: yarn nx-cloud start-ci-run
68+
69+
- run: NX_CLOUD_DISTRIBUTED_EXECUTION=false yarn nx run-many --projects=state,template,cdk --target=build-docs --parallel --maxParallel=3
70+
- run: NX_CLOUD_DISTRIBUTED_EXECUTION=false yarn nx build demos --prod
71+
72+
# @Notice: temporary skip Nx cloud for this job as it's hanging indefinitely in the CI.
73+
# - run: yarn nx-cloud stop-all-agents
74+
75+
- uses: EndBug/add-and-commit@v4
76+
with:
77+
add: 'docs/*'
78+
author_name: Github Action
79+
message: 'chore(docs): update GitHub pages'
80+
# Name of the branch to use, if different from the one that triggered the workflow
81+
# Default: the branch that triggered the workflow (from GITHUB_REF)
82+
ref: 'github-pages'
83+
env:
84+
# This is necessary in order to push a commit to the repo
85+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ master ]
16+
branches: [ main ]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ master ]
19+
branches: [ main ]
2020
schedule:
2121
- cron: '37 11 * * 2'
2222

.github/workflows/docs.yml

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +0,0 @@
1-
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3-
4-
name: Build Docs
5-
6-
on:
7-
push:
8-
branches:
9-
- master
10-
11-
jobs:
12-
build-docs:
13-
14-
runs-on: ubuntu-latest
15-
16-
strategy:
17-
matrix:
18-
node-version: [12.x]
19-
20-
steps:
21-
- uses: actions/checkout@v2
22-
with:
23-
ref: ${{ github.event.pull_request.head.ref }}
24-
fetch-depth: 0
25-
- name: Use Node.js ${{ matrix.node-version }}
26-
uses: actions/setup-node@v1
27-
with:
28-
node-version: ${{ matrix.node-version }}
29-
- run: git fetch --no-tags --prune --depth=5 origin master
30-
- run: npm install --frozen-lockfile --non-interactive
31-
- run: npm run build-docs-page
32-
- run: npm run nx build demos --prod
33-
- uses: EndBug/add-and-commit@v4 # You can change this to use a specific version
34-
with:
35-
add: 'docs/*'
36-
force: true
37-
author_name: Github Action
38-
message: 'chore(docs): GitHub pages generation'
39-
# Whether to use the --force option on `git add`, in order to bypass eventual gitignores
40-
# Default: false
41-
#force: true
42-
# Name of the branch to use, if different from the one that triggered the workflow
43-
# Default: the branch that triggered the workflow (from GITHUB_REF)
44-
ref: 'github-pages'
45-
env:
46-
# This is necessary in order to push a commit to the repo
47-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged

.vscode/extensions.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"recommendations": [
33
"nrwl.angular-console",
44
"angular.ng-template",
5-
"ms-vscode.vscode-typescript-tslint-plugin",
65
"esbenp.prettier-vscode",
76
"firsttris.vscode-jest-runner"
87
]

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ yarn
1919
You can start developing and then run tests for the affected target:
2020

2121
```sh
22-
yarn nx affected:test --base=master
22+
yarn nx affected:test
2323
```
2424

2525
Either you can run all tests for all targets:

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
# RxAngular ![rx-angular CI](https://github.com/rx-angular/rx-angular/workflows/rx-angular%20CI/badge.svg?branch=master)
1+
# RxAngular ![rx-angular CI](https://github.com/rx-angular/rx-angular/workflows/rx-angular%20CI/badge.svg?branch=main)
22

33
RxAngular offers a comprehensive toolset for handling fully reactive Angular applications with the main focus on runtime
44
performance and template rendering.
55

66
RxAngular is divided into different packages:
77

8-
- [📦@rx-angular/cdk](https://github.com/rx-angular/rx-angular/tree/master/libs/cdk/README.md)
9-
- [📦@rx-angular/state](https://github.com/rx-angular/rx-angular/tree/master/libs/state/README.md)
10-
- [📦@rx-angular/template](https://github.com/rx-angular/rx-angular/tree/master/libs/template/README.md)
8+
- [📦@rx-angular/cdk](https://github.com/rx-angular/rx-angular/tree/main/libs/cdk/README.md)
9+
- [📦@rx-angular/state](https://github.com/rx-angular/rx-angular/tree/main/libs/state/README.md)
10+
- [📦@rx-angular/template](https://github.com/rx-angular/rx-angular/tree/main/libs/template/README.md)
1111

1212
Used together, you get a powerful tool for developing high-performance angular applications with or without NgZone.
1313

1414
This repository holds a set of helpers to create **fully reactive** as well as **fully zone-less** applications.
1515

16-
[![rx-angular logo](https://raw.githubusercontent.com/rx-angular/rx-angular/master/docs/images/rx-angular_logo.png)](https://www.rx-angular.io/)
16+
[![rx-angular logo](https://raw.githubusercontent.com/rx-angular/rx-angular/main/docs/images/rx-angular_logo.png)](https://www.rx-angular.io/)
1717
## Links
1818

1919
- [📚 Official docs](https://www.rx-angular.io/)
@@ -23,9 +23,9 @@ This repository holds a set of helpers to create **fully reactive** as well as *
2323

2424
Find details in the linked readme files below for installation and setup instructions, examples and resources.
2525

26-
- [📦@rx-angular/cdk](https://github.com/rx-angular/rx-angular/tree/master/libs/cdk/README.md) - Component Development Kit
27-
- [📦@rx-angular/state](https://github.com/rx-angular/rx-angular/tree/master/libs/state/README.md) - Imperative&Reactive Component State-Management
28-
- [📦@rx-angular/template](https://github.com/rx-angular/rx-angular/tree/master/libs/template/README.md) - High-Performance Reactive Rendering
26+
- [📦@rx-angular/cdk](https://github.com/rx-angular/rx-angular/tree/main/libs/cdk/README.md) - Component Development Kit
27+
- [📦@rx-angular/state](https://github.com/rx-angular/rx-angular/tree/main/libs/state/README.md) - Imperative&Reactive Component State-Management
28+
- [📦@rx-angular/template](https://github.com/rx-angular/rx-angular/tree/main/libs/template/README.md) - High-Performance Reactive Rendering
2929

3030
## Browsers support
3131

0 commit comments

Comments
 (0)