Skip to content

Commit 75d88c9

Browse files
Merge branch '26_1_rxjs_remove' of https://github.com/GoodDayForSurf/DevExtreme into 26_1_remove_rxjs
2 parents 031d232 + 378ec64 commit 75d88c9

File tree

2,484 files changed

+51733
-31269
lines changed

Some content is hidden

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

2,484 files changed

+51733
-31269
lines changed

.env

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Nx 18 enables using plugins to infer targets by default
22
# This is disabled for existing workspaces to maintain compatibility
33
# For more info, see: https://nx.dev/concepts/inferred-tasks
4-
NX_ADD_PLUGINS=false
4+
NX_ADD_PLUGINS=false
5+
NX_SKIP_NX_CACHE=true

.github/CODEOWNERS

Lines changed: 143 additions & 148 deletions
Large diffs are not rendered by default.

.github/actions/run-qunit-tests/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ runs:
4242
# - name: Setup Chrome
4343
# uses: ./.github/actions/setup-chrome-headless-shell
4444
# with:
45-
# chrome-version: '141.0.7390.122'
45+
# chrome-version: '145.0.7632.67'
4646

4747
# - name: Use Node.js
4848
# uses: actions/setup-node@v4
@@ -77,9 +77,9 @@ runs:
7777
path: |
7878
${{ env.STORE_PATH }}
7979
.nx/cache
80-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
80+
key: ${{ runner.os }}-pnpm-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
8181
restore-keys: |
82-
${{ runner.os }}-pnpm-store
82+
${{ runner.os }}-pnpm-cache
8383
8484
- name: Install dependencies
8585
shell: bash

.github/copilot-instructions.md

Lines changed: 71 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
- **Languages:** TypeScript, JavaScript, SCSS, C# (.NET for test runner)
1111
- **Package Manager:** pnpm 9.15.4 (specified in package.json)
1212
- **Node Version:** 20.x (required by CI)
13-
- **Build System:** Gulp + Nx + custom build scripts
13+
- **Build System:** Gulp + Nx + custom build scripts + custom Nx executors (via `devextreme-nx-infra-plugin`)
1414
- **Test Frameworks:** QUnit, Jest, TestCafe, Karma (Angular)
1515

1616
## Critical Setup Requirements
@@ -70,6 +70,8 @@ pnpm install --frozen-lockfile
7070
devextreme-themebuilder/ # Theme builder package
7171
devextreme-metadata/ # Metadata generation for wrappers
7272
devextreme-monorepo-tools/ # Internal tooling
73+
nx-infra-plugin/ # Custom Nx executors for build automation
74+
workflows/ # Cross-package NX build orchestration (all:build-dev, all:build-testing)
7375
testcafe-models/ # TestCafe page object models
7476
7577
/apps/
@@ -150,20 +152,70 @@ pnpm run clean
150152
```
151153

152154
**Build process includes:**
153-
1. Localization generation
155+
1. Localization generation (via `devextreme-nx-infra-plugin:localization` executor)
154156
2. Component generation (Renovation architecture)
155-
3. Transpilation (Babel)
156-
4. Bundle creation (Webpack)
157-
5. TypeScript declarations
157+
3. Transpilation (via native NX executors: `babel-transform` for JS, `build-typescript` for TS)
158+
4. Bundle creation (Webpack via `devextreme-nx-infra-plugin:bundle` executor) - `bundle:debug` and `bundle:prod` targets
159+
5. TypeScript declarations - `build:declarations` target
158160
6. SCSS compilation (from devextreme-scss)
159-
7. NPM package preparation
161+
7. NPM package preparation - `build:npm` target
162+
163+
**Granular Nx build targets (can be run individually):**
164+
```bash
165+
pnpx nx build:localization devextreme # Generate localization files
166+
pnpx nx build:transpile devextreme # Transpile source code
167+
pnpx nx bundle:debug devextreme # Create debug bundle
168+
pnpx nx bundle:prod devextreme # Create production bundle
169+
pnpx nx build:npm devextreme # Prepare NPM packages
170+
```
171+
172+
**Build with testing configuration (for CI):**
173+
```bash
174+
pnpx nx build devextreme -c=testing
175+
```
160176

161177
**Important environment variables:**
162178
- `DEVEXTREME_TEST_CI=true` - Enables test mode (skips building npm package)
163179
- `BUILD_ESM_PACKAGE=true` - Builds ESM modules (skips building npm package)
164180
- `BUILD_TESTCAFE=true` - Builds for TestCafe tests
165181
- `BUILD_TEST_INTERNAL_PACKAGE=true` - Builds internal test package
166182

183+
## Custom Nx Executors (nx-infra-plugin)
184+
185+
The `packages/nx-infra-plugin` provides custom Nx executors for build automation:
186+
187+
| Executor | Description |
188+
|----------|-------------|
189+
| `add-license-headers` | Adds DevExtreme license headers to compiled files with version information |
190+
| `babel-transform` | Transforms JS/TS files using Babel with configurable presets, debug block removal, and extension renaming |
191+
| `build-angular-library` | Builds Angular libraries using ng-packagr programmatically |
192+
| `build-typescript` | Compiles TypeScript to CJS or ESM modules with configurable output format, tsconfig, and path alias resolution |
193+
| `bundle` | Bundles JavaScript files using webpack with debug or production mode, supporting multiple entry points and license validation |
194+
| `clean` | Removes directories and files with support for exclusion patterns |
195+
| `concatenate-files` | Concatenates files with optional content extraction via regex, header/footer, and find/replace transforms |
196+
| `copy-files` | Copies files and directories to specified destinations with glob pattern support |
197+
| `create-dual-mode-manifest` | Generates package.json files for dual-mode (ESM + CJS) support with main, module, typings, and sideEffects |
198+
| `generate-component-names` | Generates TypeScript file with component name constants for test automation |
199+
| `generate-components` | Generates framework components (React/Vue/Angular) from DevExtreme metadata |
200+
| `karma-multi-env` | Runs Karma tests across multiple Angular environments (client, server, hydration) |
201+
| `localization` | Generates CLDR data and compiles localization message files from JSON to JavaScript |
202+
| `pack-npm` | Creates npm packages using `pnpm pack` for distribution |
203+
| `prepare-package-json` | Creates distribution-ready package.json with cleaned dependencies for npm publishing |
204+
| `prepare-submodules` | Creates package.json entry points for submodule exports |
205+
206+
**Example executor usage in project.json:**
207+
```json
208+
{
209+
"build:localization:generate": {
210+
"executor": "devextreme-nx-infra-plugin:localization",
211+
"options": {
212+
"messagesDir": "./js/localization/messages",
213+
"cldrDataOutputDir": "./js/__internal/core/localization/cldr-data"
214+
}
215+
}
216+
}
217+
```
218+
167219
## Testing
168220

169221
### Test Types and Commands
@@ -348,8 +400,8 @@ pnpm run lint-ts -- --fix
348400
- `packages/devextreme-react/src/**/*` (except templates)
349401
- `packages/devextreme-vue/src/**/*` (except templates)
350402
- `packages/devextreme/js/renovation/**/*.j.tsx`
351-
- `packages/devextreme/js/common/core/localization/default_messages.js`
352-
- `packages/devextreme/js/common/core/localization/cldr-data/**/*`
403+
- `packages/devextreme/js/__internal/core/localization/default_messages.ts`
404+
- `packages/devextreme/js/__internal/core/localization/cldr-data/**/*`
353405

354406
**Source files (EDIT THESE):**
355407
- `packages/devextreme/js/**/*.js` (core logic)
@@ -378,13 +430,15 @@ pnpm run lint-ts -- --fix
378430
## Key Facts
379431

380432
- **Nx is used for task orchestration** - prefer `pnpx nx` commands over direct npm scripts
433+
- **Custom Nx executors** - `devextreme-nx-infra-plugin` provides specialized executors for localization, file operations, and build tasks
381434
- **Frozen lockfile is mandatory** - CI will fail without it
382435
- **Build artifacts are in gitignore** - never commit `artifacts/` directories
383436
- **Wrappers are generated** - modify generators, not generated code
384437
- **Multiple test frameworks** - QUnit (legacy), Jest (new), TestCafe (E2E)
385438
- **Monorepo uses pnpm workspaces** - dependencies are hoisted
386439
- **CI uses custom runners** - `devextreme-shr2` for most jobs, `ubuntu-latest` for some
387440
- **Timeouts are strict** - optimize for speed, use caching
441+
- **Granular build caching** - individual build steps have proper Nx caching for faster rebuilds
388442

389443
## Quick Reference
390444

@@ -398,6 +452,14 @@ pnpm run all:build-dev
398452
# Build (prod)
399453
pnpm run all:build
400454

455+
# Build with testing configuration (for CI)
456+
pnpx nx build devextreme -c=testing
457+
458+
# Build specific targets
459+
pnpx nx build:localization devextreme
460+
pnpx nx build:transpile devextreme
461+
pnpx nx bundle:debug devextreme
462+
401463
# Test
402464
pnpx nx run-many -t test
403465
pnpm run test-jest # From devextreme package
@@ -411,6 +473,7 @@ pnpm run regenerate-all
411473

412474
# Clean
413475
pnpm run clean # From devextreme package
476+
pnpx nx clean:artifacts devextreme # Clean build artifacts only
414477

415478
# Run demos
416479
pnpm run webserver # From root, then visit localhost:8080

.github/workflows/build_all.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ on:
1414
default: false
1515
type: boolean
1616

17+
env:
18+
NX_CLOUD_ACCESS_TOKEN: ${{ github.ref_name == github.event.repository.default_branch && secrets.NX_CLOUD_ACCESS_TOKEN || '' }}
19+
NX_SKIP_NX_CACHE: ${{ contains(github.event.pull_request.labels.*.name, 'skip-cache') && 'true' || 'false' }}
20+
1721
jobs:
1822
build:
1923
runs-on: devextreme-shr2
@@ -39,12 +43,10 @@ jobs:
3943
- uses: actions/cache@v4
4044
name: Setup pnpm cache
4145
with:
42-
path: |
43-
${{ env.STORE_PATH }}
44-
.nx/cache
45-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
46+
path: ${{ env.STORE_PATH }}
47+
key: ${{ runner.os }}-pnpm-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
4648
restore-keys: |
47-
${{ runner.os }}-pnpm-store
49+
${{ runner.os }}-pnpm-cache
4850
4951
- name: Install dependencies
5052
run: pnpm install --frozen-lockfile

.github/workflows/codeql.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,10 @@ jobs:
3333
- uses: actions/cache@v4
3434
name: Setup pnpm cache
3535
with:
36-
path: |
37-
${{ env.STORE_PATH }}
38-
.nx/cache
39-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
36+
path: ${{ env.STORE_PATH }}
37+
key: ${{ runner.os }}-pnpm-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
4038
restore-keys: |
41-
${{ runner.os }}-pnpm-store
39+
${{ runner.os }}-pnpm-cache
4240
4341
- name: Install dependencies
4442
run: pnpm install --frozen-lockfile

.github/workflows/default_workflow.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
- "[0-9][0-9]_[0-9]"
1414

1515
env:
16-
NX_SKIP_NX_CACHE: ${{ (github.event_name != 'pull_request' || contains( github.event.pull_request.labels.*.name, 'skip-cache')) && 'true' || 'false' }}
16+
NX_SKIP_NX_CACHE: ${{ contains(github.event.pull_request.labels.*.name, 'skip-cache') && 'true' || 'false' }}
1717

1818
jobs:
1919
main:
@@ -42,12 +42,10 @@ jobs:
4242
- uses: actions/cache@v4
4343
name: Setup pnpm cache
4444
with:
45-
path: |
46-
${{ env.STORE_PATH }}
47-
.nx/cache
48-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
45+
path: ${{ env.STORE_PATH }}
46+
key: ${{ runner.os }}-pnpm-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
4947
restore-keys: |
50-
${{ runner.os }}-pnpm-store
48+
${{ runner.os }}-pnpm-cache
5149
5250
- name: Install dependencies
5351
run: pnpm install --frozen-lockfile
@@ -56,6 +54,7 @@ jobs:
5654
run: >
5755
pnpx nx run-many
5856
-t lint,test
57+
-c ci
5958
--exclude
6059
devextreme
6160
devextreme-themebuilder

.github/workflows/demos_unit_tests.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,10 @@ jobs:
5555
- uses: actions/cache@v4
5656
name: Setup pnpm cache
5757
with:
58-
path: |
59-
${{ env.STORE_PATH }}
60-
.nx/cache
61-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
58+
path: ${{ env.STORE_PATH }}
59+
key: ${{ runner.os }}-pnpm-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
6260
restore-keys: |
63-
${{ runner.os }}-pnpm-store
61+
${{ runner.os }}-pnpm-cache
6462
6563
- name: Install dependencies
6664
run: pnpm install --frozen-lockfile

.github/workflows/health-check.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Health Check
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- 26_1
8+
9+
jobs:
10+
invoke:
11+
name: Invoke
12+
uses: DevExpress/github-actions/.github/workflows/repository-check.yml@repo-check/latest

.github/workflows/lint.yml

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ on:
1212
branches: [26_1]
1313

1414
env:
15-
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_TOKEN }}
16-
NX_SKIP_NX_CACHE: ${{ (github.event_name != 'pull_request' || contains( github.event.pull_request.labels.*.name, 'skip-cache')) && 'true' || 'false' }}
15+
NX_SKIP_NX_CACHE: ${{ contains(github.event.pull_request.labels.*.name, 'skip-cache') && 'true' || 'false' }}
1716

1817
jobs:
1918
TS:
@@ -40,12 +39,10 @@ jobs:
4039
- uses: actions/cache@v4
4140
name: Setup pnpm cache
4241
with:
43-
path: |
44-
${{ env.STORE_PATH }}
45-
.nx/cache
46-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
42+
path: ${{ env.STORE_PATH }}
43+
key: ${{ runner.os }}-pnpm-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
4744
restore-keys: |
48-
${{ runner.os }}-pnpm-store
45+
${{ runner.os }}-pnpm-cache
4946
5047
- name: Install dependencies
5148
run: pnpm install --frozen-lockfile
@@ -96,12 +93,10 @@ jobs:
9693
- uses: actions/cache@v4
9794
name: Setup pnpm cache
9895
with:
99-
path: |
100-
${{ env.STORE_PATH }}
101-
.nx/cache
102-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
96+
path: ${{ env.STORE_PATH }}
97+
key: ${{ runner.os }}-pnpm-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
10398
restore-keys: |
104-
${{ runner.os }}-pnpm-store
99+
${{ runner.os }}-pnpm-cache
105100
106101
- name: Install dependencies
107102
run: pnpm install --frozen-lockfile
@@ -140,12 +135,10 @@ jobs:
140135
- uses: actions/cache@v4
141136
name: Setup pnpm cache
142137
with:
143-
path: |
144-
${{ env.STORE_PATH }}
145-
.nx/cache
146-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
138+
path: ${{ env.STORE_PATH }}
139+
key: ${{ runner.os }}-pnpm-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
147140
restore-keys: |
148-
${{ runner.os }}-pnpm-store
141+
${{ runner.os }}-pnpm-cache
149142
150143
- name: Install dependencies
151144
run: pnpm install --frozen-lockfile
@@ -178,12 +171,10 @@ jobs:
178171
- uses: actions/cache@v4
179172
name: Setup pnpm cache
180173
with:
181-
path: |
182-
${{ env.STORE_PATH }}
183-
.nx/cache
184-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
174+
path: ${{ env.STORE_PATH }}
175+
key: ${{ runner.os }}-pnpm-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
185176
restore-keys: |
186-
${{ runner.os }}-pnpm-store
177+
${{ runner.os }}-pnpm-cache
187178
188179
- name: Install dependencies
189180
run: pnpm install --frozen-lockfile
@@ -227,12 +218,10 @@ jobs:
227218
- uses: actions/cache@v4
228219
name: Setup pnpm cache
229220
with:
230-
path: |
231-
${{ env.STORE_PATH }}
232-
.nx/cache
233-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
221+
path: ${{ env.STORE_PATH }}
222+
key: ${{ runner.os }}-pnpm-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
234223
restore-keys: |
235-
${{ runner.os }}-pnpm-store
224+
${{ runner.os }}-pnpm-cache
236225
237226
- name: Install dependencies
238227
run: pnpm install --frozen-lockfile

0 commit comments

Comments
 (0)