Skip to content

Commit

Permalink
Revert ng and ts update (#25962)
Browse files Browse the repository at this point in the history
  • Loading branch information
dxvladislavvolkov authored Nov 6, 2023
1 parent 44a3e66 commit 7f45386
Show file tree
Hide file tree
Showing 32 changed files with 7,165 additions and 4,460 deletions.
11,391 changes: 7,048 additions & 4,343 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"shx": "0.3.4",
"source-map": "0.7.4",
"ts-node": "^10.9.1",
"typescript": "^4.9.5"
"typescript": "~4.2.4"
},
"pre-commit": [
"lint-staged",
Expand Down
2 changes: 1 addition & 1 deletion packages/devextreme-angular/build.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ module.exports = {
srcFilesPattern: '**/*.ts',
tsTestSrc: ['tests/src/**/*.spec.ts', 'tests/src/**/component-names.ts'],
testsPath: 'tests/dist',
sourcesGlobs: ['src/**/*.*', './package.json', './ng-package.json'],
sourcesGlobs: ['src/**/*.*', './package.json'],
tsSourcesGlob: 'src/**/*.ts',
outputPath: 'dist'
},
Expand Down
19 changes: 4 additions & 15 deletions packages/devextreme-angular/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ gulp.task('build.ngc', function() {

return ngPackagr
.ngPackagr()
.forProject(path.join(config.outputPath, 'ng-package.json'))
.forProject(path.join(config.outputPath, 'package.json'))
.withTsConfig('tsconfig.lib.json')
.build()
});
Expand Down Expand Up @@ -160,22 +160,13 @@ gulp.task('npm.pack', gulp.series(
(cb) => {
argv.withDescriptions ? exec('npm --prefix ../../ run angular:inject-descriptions', (err) => cb(err)) : cb();
},
(cb) => { exec('npm pack', { cwd: buildConfig.npm.distPath }, (err) => cb(err)) },
() => { return gulp.src(buildConfig.npm.distPath)
.pipe(gulp.dest('./node_modules/devextreme-angular')); }
(cb) => { exec('npm pack', { cwd: buildConfig.npm.distPath }, (err) => cb(err)) }
));

gulp.task('copy.source', function() {
var npmConfig = buildConfig.npm;
return gulp.src(`${path.join(npmConfig.distPath, '/**/*.*')}`)
.pipe(gulp.dest('./node_modules/devextreme-angular'));
});

//------------Main------------

var buildTask = gulp.series(
'build.components',
'copy.source'
'build.components'
);

gulp.task('build', buildTask);
Expand Down Expand Up @@ -250,9 +241,7 @@ gulp.task('test.components.server.debug', function(done) {
new karmaServer(config, done).start();
});

gulp.task('run.tests', gulp.series('test.components.client'));

// gulp.task('run.tests', gulp.series('test.components.client', 'test.components.server'));
gulp.task('run.tests', gulp.series('test.components.server', 'test.components.client'));

gulp.task('test', gulp.series('build', 'run.tests'));

Expand Down
10 changes: 0 additions & 10 deletions packages/devextreme-angular/ng-package.json

This file was deleted.

36 changes: 23 additions & 13 deletions packages/devextreme-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
"devextreme": "~23.2.0"
},
"devDependencies": {
"@angular/animations": "~15.2.10",
"@angular/common": "~15.2.10",
"@angular/compiler": "~15.2.10",
"@angular/compiler-cli": "~15.2.10",
"@angular/core": "^15.2.10",
"@angular/forms": "~15.2.10",
"@angular/platform-browser": "~15.2.10",
"@angular/platform-browser-dynamic": "~15.2.10",
"@angular/platform-server": "~15.2.10",
"@angular/animations": "~12.2.17",
"@angular/common": "~12.2.17",
"@angular/compiler": "~12.2.17",
"@angular/compiler-cli": "~12.2.17",
"@angular/core": "~12.2.17",
"@angular/forms": "~12.2.17",
"@angular/platform-browser": "~12.2.17",
"@angular/platform-browser-dynamic": "~12.2.17",
"@angular/platform-server": "~12.2.17",
"@types/jasmine": "2.8.19",
"@types/node": "~20.8.0",
"codelyzer": "6.0.2",
Expand All @@ -49,11 +49,11 @@
"karma-jasmine": "^5.1.0",
"karma-junit-reporter": "^2.0.1",
"karma-webpack": "^5.0.0",
"ng-packagr": "^15.2.2",
"ng-packagr": "12.2.7",
"puppeteer": "^19.11.1",
"rxjs": "^6.6.7",
"stream-browserify": "^3.0.0",
"typescript": "^4.9.5",
"typescript": "~4.2.3",
"webpack": "^5.88.2",
"yargs": "^6.6.0",
"zone.js": "^0.11.8"
Expand All @@ -65,9 +65,19 @@
"devexpress"
],
"dependencies": {
"@angular-devkit/schematics": "15.2.10",
"@angular-devkit/schematics": "^12.2.18",
"devextreme-schematics": "*",
"inferno-server": "7.4.11"
},
"schematics": "./schematics/collection.json"
"schematics": "./schematics/collection.json",
"ngPackage": {
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"lib": {
"entryFile": "index.ts"
},
"dest": "../npm/dist",
"whitelistedNonPeerDependencies": [
"."
]
}
}
5 changes: 0 additions & 5 deletions packages/devextreme-angular/src/core/ng-package.json

This file was deleted.

7 changes: 7 additions & 0 deletions packages/devextreme-angular/src/core/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"ngPackage": {
"lib": {
"entryFile": "index.ts"
}
}
}
5 changes: 0 additions & 5 deletions packages/devextreme-angular/src/server/ng-package.json

This file was deleted.

7 changes: 7 additions & 0 deletions packages/devextreme-angular/src/server/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"ngPackage": {
"lib": {
"entryFile": "index.ts"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* tslint:disable:component-selector */

import {
Component,
ElementRef,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* tslint:disable:component-selector */

import {
Component,
ElementRef,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* tslint:disable:component-selector */

import {
Component,
ElementRef,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* tslint:disable:component-selector */

import {
Component,
ElementRef,
Expand Down
6 changes: 3 additions & 3 deletions packages/devextreme-angular/tests/src/ui/chart.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* tslint:disable:component-selector */

import {
Component,
ViewChild
Expand All @@ -13,7 +14,6 @@ import {
import {
DxChartModule, DxChartComponent, DxScrollViewModule
} from 'devextreme-angular';

import dxChart from 'devextreme/viz/chart';

@Component({
Expand All @@ -25,12 +25,12 @@ class TestContainerComponent {
label: 'label1'
}];
@ViewChild(DxChartComponent) chart: DxChartComponent;
dataSource: any[] = [];
dataSource = [];
disposed = false;
commonSeriesSettings = {
argumentField: undefined
};
seriesAsArray: any[] = [];
seriesAsArray = [];
seriesAsObject = {
valueField: undefined
};
Expand Down
11 changes: 6 additions & 5 deletions packages/devextreme-angular/tests/src/ui/data-grid.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* tslint:disable:component-selector */

import {
Component,
ViewChildren,
Expand Down Expand Up @@ -183,8 +184,8 @@ describe('DxDataGrid', () => {
if (typeof column === 'string') {
fail();
} else {
expect(column?.columns?.length).toBe(1);
expect(column?.columns?.[0]['dataField']).toBe('Field');
expect(column.columns.length).toBe(1);
expect(column.columns[0]['dataField']).toBe('Field');
}
});

Expand Down Expand Up @@ -235,11 +236,11 @@ describe('DxDataGrid', () => {
jasmine.clock().tick(101);
let testComponent = fixture.componentInstance;
const instance = testComponent.innerWidgets.last.instance;
expect(instance?.option('columnChooser')?.enabled).toBe(true);
expect(instance.option('columnChooser').enabled).toBe(true);

testComponent.showComponent = false;
fixture.detectChanges();
expect(instance?.option('columnChooser')?.enabled).toBe(false);
expect(instance.option('columnChooser').enabled).toBe(false);
jasmine.clock().uninstall();
});

Expand Down Expand Up @@ -510,7 +511,7 @@ describe('Nested DxDataGrid', () => {
setTimeout(() => {
let instance = fixture.componentInstance.innerWidgets.first.instance;
let element = instance.element().querySelector('.my-template');
expect(element?.textContent).toBe('String');
expect(element.textContent).toBe('String');
done();
}, 1000);
});
Expand Down
3 changes: 2 additions & 1 deletion packages/devextreme-angular/tests/src/ui/events.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* tslint:disable:component-selector */

import {
Component, NgZone
} from '@angular/core';
Expand Down Expand Up @@ -75,7 +76,7 @@ describe('events', () => {

const element = fixture.nativeElement.querySelector('.elem');
let counter = 0;
fixture?.ngZone?.runOutsideAngular(() => {
fixture.ngZone.runOutsideAngular(() => {
on(element, 'click', () => {
expect(NgZone.isInAngularZone()).toBe(true);
counter++;
Expand Down
3 changes: 2 additions & 1 deletion packages/devextreme-angular/tests/src/ui/form.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* tslint:disable:component-selector */

import {
Component,
ViewChild
Expand Down Expand Up @@ -133,7 +134,7 @@ describe('DxForm', () => {
let instance = getWidget(fixture);
let input = instance.element().querySelector('input');
input.value = 'test value';
input?.dispatchEvent(new Event('change'));
input.dispatchEvent(new Event('change'));

expect(document.getElementById('text').innerText.trim()).toBe('test value');
fixture.autoDetectChanges(false);
Expand Down
Loading

0 comments on commit 7f45386

Please sign in to comment.