Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 28b86d2

Browse files
committed
Merge branch 'main' into compress-new
1 parent 7e8512b commit 28b86d2

File tree

51 files changed

+5486
-3560
lines changed

Some content is hidden

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

51 files changed

+5486
-3560
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
node_modules
2+
.yarn

.eslintrc.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@
6161
"rules": {
6262
"@typescript-eslint/ban-ts-comment": "warn",
6363
"@typescript-eslint/no-inferrable-types": "warn",
64-
"@typescript-eslint/ban-types": "warn",
6564
"@typescript-eslint/no-empty-interface": "warn",
6665
"@typescript-eslint/no-empty-function": "warn",
6766
"@typescript-eslint/no-unused-vars": "warn",
6867
"@typescript-eslint/no-explicit-any": "warn",
68+
"@typescript-eslint/no-unsafe-function-type": "off",
6969
"prefer-rest-params": "warn",
7070
"no-prototype-builtins": "warn",
7171
"no-empty": "warn",
@@ -75,9 +75,7 @@
7575
"selector": "typeParameter",
7676
"format": ["PascalCase"]
7777
}
78-
],
79-
"@typescript-eslint/no-extra-semi": "error",
80-
"no-extra-semi": "off"
78+
]
8179
}
8280
},
8381
{
@@ -88,9 +86,7 @@
8886
"plugin:@nx/javascript"
8987
],
9088
"rules": {
91-
"@typescript-eslint/no-non-null-assertion": "off",
92-
"@typescript-eslint/no-extra-semi": "error",
93-
"no-extra-semi": "off"
89+
"@typescript-eslint/no-non-null-assertion": "off"
9490
}
9591
}
9692
]

.github/actions/setup/action.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@ runs:
99
using: composite
1010
steps:
1111
# Requires git checkout with fetch depth 0
12-
- name: Derive appropriate SHAs for base and head for `nx affected` commands
13-
uses: nrwl/nx-set-shas@v4
1412

1513
- name: Use Node.js
16-
uses: actions/setup-node@v3
14+
uses: actions/setup-node@v4
1715
with:
1816
node-version: ${{ inputs.node-version }}
1917
cache: 'yarn'

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

Lines changed: 21 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -23,56 +23,19 @@ env:
2323
NODE_OPTIONS: --max-old-space-size=6144
2424
docs-name: docs
2525
docs-path: dist/apps/docs
26-
NX_CLOUD_DISTRIBUTED_EXECUTION: true # this enables DTE
27-
NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT: 4 # expected number of agents
2826
NX_BRANCH: ${{ github.event.number || github.ref_name }}
2927

30-
jobs:
31-
dte_agents:
32-
name: DTE Agent ${{ matrix.agent }}
33-
runs-on: ubuntu-latest
34-
timeout-minutes: 20
35-
36-
# The Free GitHub plan has a limit of 20 concurrent jobs on Ubuntu images
37-
# Reference: https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration
38-
# If we need to, we can optimize for 2 simultaneous workflow runs:
39-
# 2 x 1 main job = 2 concurrent jobs
40-
# 2 x 9 agent jobs = 18 concurrent jobs
41-
# Total = 20 concurrent jobs
42-
#
43-
# However, we don't have many projects or targets in this workspace, so we
44-
# lower the number of agents to reduce spent compute time.
45-
strategy:
46-
matrix:
47-
# Must match the argument passed to `nx-cloud --agent-count` in the dte_coordinator job
48-
agent: [1, 2, 3, 4]
49-
50-
steps:
51-
- name: Checkout all commits
52-
uses: actions/checkout@v3
53-
54-
- name: Set up dependencies
55-
uses: ./.github/actions/setup
28+
permissions:
29+
actions: read
30+
contents: read
5631

57-
- name: Start Nx Cloud DTE Agent
58-
run: yarn nx-cloud start-agent
59-
env:
60-
NX_AGENT_NAME: ${{ matrix.agent }}
61-
62-
# We're using Nx Cloud for Distributed Task Execution
63-
# Reference: https://nx.dev/using-nx/dte
64-
#
65-
# The coordinator outputs the combination of task outputs from the agents,
66-
# both terminal and file outputs
67-
dte_coordinator:
68-
name: DTE Coordinator
32+
jobs:
33+
main:
34+
name: Main CI
6935
runs-on: ubuntu-latest
70-
env:
71-
NX_CLOUD_DISTRIBUTED_EXECUTION: true
72-
NX_DISTRIBUTED_TASK_EXECUTION: true
7336

7437
steps:
75-
- uses: actions/checkout@v3
38+
- uses: actions/checkout@v4
7639
name: Checkout [Pull Request]
7740
if: ${{ github.event_name == 'pull_request' }}
7841
with:
@@ -81,53 +44,27 @@ jobs:
8144
# We need to fetch all branches and commits so that Nx affected has a base to compare against.
8245
fetch-depth: 0
8346

84-
- uses: actions/checkout@v3
47+
- uses: actions/checkout@v4
8548
name: Checkout [Default Branch]
8649
if: ${{ github.event_name != 'pull_request' }}
8750
with:
8851
# We need to fetch all branches and commits so that Nx affected has a base to compare against.
8952
fetch-depth: 0
9053

91-
- name: Set up dependencies
92-
uses: ./.github/actions/setup
54+
- name: Derive appropriate SHAs for base and head for `nx affected` commands
55+
uses: nrwl/nx-set-shas@v4
9356

9457
- name: Initialize the Nx Cloud distributed CI run
95-
run: yarn nx-cloud start-ci-run
58+
run: npx nx-cloud start-ci-run --distribute-on="./nx/workflows/dynamic-changesets.yml" --stop-agents-after="e2e" --require-explicit-completion
59+
60+
- name: Set up dependencies
61+
uses: ./.github/actions/setup
9662

9763
- name: Run commands in parallel
9864
run: |
99-
pids=()
100-
# list of commands to be run on main has env flag NX_CLOUD_DISTRIBUTED_EXECUTION set to false
101-
NX_CLOUD_DISTRIBUTED_EXECUTION=false yarn nx-cloud record -- yarn nx format:check & pids+=($!)
102-
103-
# list of commands to be run on agents
104-
yarn nx affected -t lint --parallel=3 &
105-
pids+=($!)
106-
107-
yarn nx affected -t test --parallel=3 &
108-
pids+=($!)
109-
110-
yarn nx affected -t build --exclude=docs --parallel=3 &
111-
pids+=($!)
112-
113-
yarn nx affected -t e2e --parallel=1 &
114-
pids+=($!)
115-
116-
yarn nx affected -t component-test --parallel=1 &
117-
pids+=($!)
118-
119-
# run all commands in parallel and bail if one of them fails
120-
for pid in ${pids[*]}; do
121-
if ! wait $pid; then
122-
exit 1
123-
fi
124-
done
125-
126-
exit 0
127-
128-
- name: Stop Nx Cloud DTE agents
129-
if: ${{ always() }}
130-
run: yarn nx-cloud stop-all-agents
65+
npx nx-cloud record -- npx nx format:check
66+
npx nx affected -t lint build test component-test e2e --parallel=4 --exclude=docs
67+
npx nx-cloud complete-ci-run
13168
13269
# Upload coverage reports to Codecov
13370
- name: Upload coverage
@@ -142,27 +79,21 @@ jobs:
14279
build-docs:
14380
name: Build docs
14481
runs-on: ubuntu-latest
145-
permissions:
146-
actions: read
147-
contents: read
14882

14983
steps:
15084
- name: Checkout all commits
151-
uses: actions/checkout@v3
85+
uses: actions/checkout@v4
15286
with:
15387
fetch-depth: 0
15488
- name: Set up dependencies
15589
uses: ./.github/actions/setup
15690

15791
- name: Build docs
158-
env:
159-
NX_CLOUD_DISTRIBUTED_EXECUTION: false
160-
NX_DISTRIBUTED_TASK_EXECUTION: false
16192
run: yarn nx build docs
16293

16394
- name: '[Merge] Upload docs'
16495
if: github.ref == 'refs/heads/main'
165-
uses: actions/upload-artifact@v3
96+
uses: actions/upload-artifact@v4
16697
with:
16798
name: ${{ env.docs-name }}
16899
path: ${{ env.docs-path }}
@@ -186,13 +117,13 @@ jobs:
186117

187118
steps:
188119
- name: Download docs
189-
uses: actions/download-artifact@v3
120+
uses: actions/download-artifact@v4
190121
with:
191122
name: ${{ env.docs-name }}
192123
path: ${{ env.docs-path }}
193124

194125
- name: Set up GitHub Pages
195-
uses: actions/configure-pages@v2
126+
uses: actions/configure-pages@v4
196127

197128
- name: Upload docs to GitHub Pages
198129
uses: actions/upload-pages-artifact@v1

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,5 @@ Thumbs.db
5353
.angular
5454

5555
.nx/cache
56+
.nx/workspace-data
5657
migrations.json

.nx/workflows/dynamic-changesets.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
distribute-on:
2+
small-changeset: 3 linux-large-js
3+
medium-changeset: 3 linux-large-js
4+
large-changeset: 4 linux-large-js

.prettierignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ CHANGELOG.md
99

1010
.angular
1111

12-
/.nx/cache
12+
.yarn
13+
/.nx/cache
14+
/.nx/workspace-data
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
diff --git a/src/executors/browser/executor.js b/src/executors/browser/executor.js
2+
index b8d8b074e4d9565be6cb399f733b80fd9f500215..6e46f96c52f9b82c4b44762c7133a6b2241768ef 100644
3+
--- a/src/executors/browser/executor.js
4+
+++ b/src/executors/browser/executor.js
5+
@@ -7,7 +7,7 @@ const path_1 = require("path");
6+
function runExecutor(options, context) {
7+
var _a;
8+
return tslib_1.__asyncGenerator(this, arguments, function* runExecutor_1() {
9+
- const projectRoot = path.join(context.root, context.workspace.projects[(_a = context.projectName) !== null && _a !== void 0 ? _a : ''].root);
10+
+ const projectRoot = path.join(context.root, context.projectsConfigurations.projects[(_a = context.projectName) !== null && _a !== void 0 ? _a : ''].root);
11+
try {
12+
yield tslib_1.__await((0, lib_1.build)(projectRoot, {
13+
bundleAnalyzer: options.bundleAnalyzer,
14+
diff --git a/src/executors/dev-server/executor.js b/src/executors/dev-server/executor.js
15+
index e9e7867cfde26eb2e1c68079ddcf494f957c3417..1ccaf1f06702090da39b1d1541412027558067dd 100644
16+
--- a/src/executors/dev-server/executor.js
17+
+++ b/src/executors/dev-server/executor.js
18+
@@ -6,7 +6,7 @@ const path = require("path");
19+
function runExecutor(options, context) {
20+
var _a;
21+
return tslib_1.__asyncGenerator(this, arguments, function* runExecutor_1() {
22+
- const projectRoot = path.join(context.root, context.workspace.projects[(_a = context.projectName) !== null && _a !== void 0 ? _a : ''].root);
23+
+ const projectRoot = path.join(context.root, context.projectsConfigurations.projects[(_a = context.projectName) !== null && _a !== void 0 ? _a : ''].root);
24+
const port = options.port.toString();
25+
yield tslib_1.__await((0, lib_1.start)(projectRoot, {
26+
port,

apps/demos/src/app/features/template/rx-virtual-for/rx-virtual-for.menu.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,8 @@ export const RX_VIRTUAL_FOR_MENU_ITEMS = [
2323
label: 'Crazy Update',
2424
link: 'crazy-update',
2525
},
26+
{
27+
label: 'Scroll To',
28+
link: 'scroll-to',
29+
},
2630
];

apps/demos/src/app/features/template/rx-virtual-for/virtual-rendering/virtual-for-experiments.module.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import { VirtualForMonkeyTestComponent } from './virtual-for-monkey-test.compone
2727
import { VirtualForReverseInfiniteScrollComponent } from './virtual-for-reverse-infinite-scroll.component';
2828
import { VirtualForScrollWindowDemoComponent } from './virtual-for-scroll-window-demo.component';
2929
import { VirtualForCustomScrollableDemoComponent } from './virtual-for-scrollable-demo.component';
30+
import { VirtualForScrollToDemoComponent } from './virtual-for-scrollto-demo.component';
3031

3132
@NgModule({
3233
imports: [
@@ -60,6 +61,10 @@ import { VirtualForCustomScrollableDemoComponent } from './virtual-for-scrollabl
6061
path: 'crazy-update',
6162
component: VirtualForCrazyUpdateComponent,
6263
},
64+
{
65+
path: 'scroll-to',
66+
component: VirtualForScrollToDemoComponent,
67+
},
6368
]),
6469
ValueProvidersModule,
6570
RxLet,

0 commit comments

Comments
 (0)