From 769a36c44300ce33822b0aeed6335471ca9ceb72 Mon Sep 17 00:00:00 2001 From: Michael Prentice Date: Sun, 6 Jun 2021 21:17:54 -0400 Subject: [PATCH] fix(stack-blitz-tests): revert enabling Ivy as it broke harness examples - remove tslint and codelyzer from examples - update jasmine dependencies - remove unused material-module.ts from test assets - add jasmine-core to package.json in stack-blitz-tests/ - disable `noImplicitAny` in stack-blitz-tests' tsconfig.spec.json since `jasmine-core/lib/jasmine-core/jasmine.js` imported in `test/jasemine-setup.ts` is not compatible Fixes #997 --- package.json | 4 +- .../shared/stack-blitz/stack-blitz-writer.ts | 8 +- src/assets/stack-blitz-tests/package.json | 5 +- .../src/app/material-module.ts | 94 ------------- src/assets/stack-blitz-tests/tsconfig.json | 2 +- .../stack-blitz-tests/tsconfig.spec.json | 1 + src/assets/stack-blitz-tests/tslint.json | 131 ------------------ src/assets/stack-blitz/package.json | 2 - src/assets/stack-blitz/tslint.json | 131 ------------------ yarn.lock | 13 +- 10 files changed, 18 insertions(+), 373 deletions(-) delete mode 100644 src/assets/stack-blitz-tests/src/app/material-module.ts delete mode 100644 src/assets/stack-blitz-tests/tslint.json delete mode 100644 src/assets/stack-blitz/tslint.json diff --git a/package.json b/package.json index cbb0234c9..dbb74c2d0 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "@angular/cli": "^12.1.0", "@angular/compiler-cli": "^12.1.0", "@types/imagemin": "^7.0.0", - "@types/jasmine": "^3.6.6", + "@types/jasmine": "^3.7.7", "@types/node": "^14.14.22", "@types/shelljs": "~0.8.8", "@typescript-eslint/eslint-plugin": "4.16.1", @@ -81,7 +81,7 @@ "firebase-tools": "^9.10.2", "imagemin": "^7.0.1", "imagemin-pngquant": "^9.0.2", - "jasmine-core": "^3.6.0", + "jasmine-core": "^3.7.1", "jasmine-spec-reporter": "^6.0.0", "karma": "~6.3.2", "karma-chrome-launcher": "^3.1.0", diff --git a/src/app/shared/stack-blitz/stack-blitz-writer.ts b/src/app/shared/stack-blitz/stack-blitz-writer.ts index 064b63bcc..b786c2ddd 100644 --- a/src/app/shared/stack-blitz/stack-blitz-writer.ts +++ b/src/app/shared/stack-blitz/stack-blitz-writer.ts @@ -31,7 +31,6 @@ const TEMPLATE_FILES = [ 'tsconfig.json', 'tsconfig.app.json', 'tsconfig.spec.json', - 'tslint.json', 'src/index.html', 'src/styles.scss', 'src/polyfills.ts', @@ -50,12 +49,11 @@ const TEST_TEMPLATE_FILES = [ 'tsconfig.json', 'tsconfig.app.json', 'tsconfig.spec.json', - 'tslint.json', 'src/index.html', 'src/styles.scss', 'src/polyfills.ts', 'src/main.ts', - 'src/test/jasmine-setup.ts', + 'src/test/jasmine-setup.ts' ]; const TAGS: string[] = ['angular', 'material', 'example']; @@ -91,8 +89,8 @@ const testDependencies = { '@angular/platform-browser': angularVersion, '@angular/platform-browser-dynamic': angularVersion, '@angular/router': angularVersion, - '@types/jasmine': '^3.6.6', - 'jasmine-core': '^3.6.0', + '@types/jasmine': '^3.7.7', + 'jasmine-core': '^3.7.1', 'moment': '^2.29.1', 'rxjs': '^6.6.7', 'tslib': '^2.2.0', diff --git a/src/assets/stack-blitz-tests/package.json b/src/assets/stack-blitz-tests/package.json index 3587a43ef..371ea5c9b 100644 --- a/src/assets/stack-blitz-tests/package.json +++ b/src/assets/stack-blitz-tests/package.json @@ -33,11 +33,10 @@ "@angular/compiler-cli": "^12.0.0", "@angular/language-service": "^12.0.0", "@angular/localize": "^12.0.0", - "@types/jasmine": "^3.6.6", + "@types/jasmine": "^3.7.7", "@types/node": "^14.14.22", - "codelyzer": "^6.0.1", + "jasmine-core": "^3.7.1", "ts-node": "^8.10.2", - "tslint": "~6.1.2", "typescript": "~4.2.3" } } diff --git a/src/assets/stack-blitz-tests/src/app/material-module.ts b/src/assets/stack-blitz-tests/src/app/material-module.ts deleted file mode 100644 index 8bc7128f2..000000000 --- a/src/assets/stack-blitz-tests/src/app/material-module.ts +++ /dev/null @@ -1,94 +0,0 @@ -import {NgModule} from '@angular/core'; -import {A11yModule} from '@angular/cdk/a11y'; -import {ClipboardModule} from '@angular/cdk/clipboard'; -import {DragDropModule} from '@angular/cdk/drag-drop'; -import {PortalModule} from '@angular/cdk/portal'; -import {ScrollingModule} from '@angular/cdk/scrolling'; -import {CdkStepperModule} from '@angular/cdk/stepper'; -import {CdkTableModule} from '@angular/cdk/table'; -import {CdkTreeModule} from '@angular/cdk/tree'; -import {MatAutocompleteModule} from '@angular/material/autocomplete'; -import {MatBadgeModule} from '@angular/material/badge'; -import {MatBottomSheetModule} from '@angular/material/bottom-sheet'; -import {MatButtonModule} from '@angular/material/button'; -import {MatButtonToggleModule} from '@angular/material/button-toggle'; -import {MatCardModule} from '@angular/material/card'; -import {MatCheckboxModule} from '@angular/material/checkbox'; -import {MatChipsModule} from '@angular/material/chips'; -import {MatStepperModule} from '@angular/material/stepper'; -import {MatDatepickerModule} from '@angular/material/datepicker'; -import {MatDialogModule} from '@angular/material/dialog'; -import {MatDividerModule} from '@angular/material/divider'; -import {MatExpansionModule} from '@angular/material/expansion'; -import {MatGridListModule} from '@angular/material/grid-list'; -import {MatIconModule} from '@angular/material/icon'; -import {MatInputModule} from '@angular/material/input'; -import {MatListModule} from '@angular/material/list'; -import {MatMenuModule} from '@angular/material/menu'; -import {MatNativeDateModule, MatRippleModule} from '@angular/material/core'; -import {MatPaginatorModule} from '@angular/material/paginator'; -import {MatProgressBarModule} from '@angular/material/progress-bar'; -import {MatProgressSpinnerModule} from '@angular/material/progress-spinner'; -import {MatRadioModule} from '@angular/material/radio'; -import {MatSelectModule} from '@angular/material/select'; -import {MatSidenavModule} from '@angular/material/sidenav'; -import {MatSliderModule} from '@angular/material/slider'; -import {MatSlideToggleModule} from '@angular/material/slide-toggle'; -import {MatSnackBarModule} from '@angular/material/snack-bar'; -import {MatSortModule} from '@angular/material/sort'; -import {MatTableModule} from '@angular/material/table'; -import {MatTabsModule} from '@angular/material/tabs'; -import {MatToolbarModule} from '@angular/material/toolbar'; -import {MatTooltipModule} from '@angular/material/tooltip'; -import {MatTreeModule} from '@angular/material/tree'; -import {OverlayModule} from '@angular/cdk/overlay'; - -@NgModule({ - exports: [ - A11yModule, - ClipboardModule, - CdkStepperModule, - CdkTableModule, - CdkTreeModule, - DragDropModule, - MatAutocompleteModule, - MatBadgeModule, - MatBottomSheetModule, - MatButtonModule, - MatButtonToggleModule, - MatCardModule, - MatCheckboxModule, - MatChipsModule, - MatStepperModule, - MatDatepickerModule, - MatDialogModule, - MatDividerModule, - MatExpansionModule, - MatGridListModule, - MatIconModule, - MatInputModule, - MatListModule, - MatMenuModule, - MatNativeDateModule, - MatPaginatorModule, - MatProgressBarModule, - MatProgressSpinnerModule, - MatRadioModule, - MatRippleModule, - MatSelectModule, - MatSidenavModule, - MatSliderModule, - MatSlideToggleModule, - MatSnackBarModule, - MatSortModule, - MatTableModule, - MatTabsModule, - MatToolbarModule, - MatTooltipModule, - MatTreeModule, - OverlayModule, - PortalModule, - ScrollingModule, - ] -}) -export class DemoMaterialModule {} diff --git a/src/assets/stack-blitz-tests/tsconfig.json b/src/assets/stack-blitz-tests/tsconfig.json index 41f9a7c59..1849a9a3c 100644 --- a/src/assets/stack-blitz-tests/tsconfig.json +++ b/src/assets/stack-blitz-tests/tsconfig.json @@ -36,6 +36,6 @@ "strictInjectionParameters": true, "strictInputAccessModifiers": true, "strictTemplates": true, - "enableIvy": true + "enableIvy": false } } diff --git a/src/assets/stack-blitz-tests/tsconfig.spec.json b/src/assets/stack-blitz-tests/tsconfig.spec.json index 6400fde7d..509378642 100644 --- a/src/assets/stack-blitz-tests/tsconfig.spec.json +++ b/src/assets/stack-blitz-tests/tsconfig.spec.json @@ -2,6 +2,7 @@ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "./out-tsc/spec", + "noImplicitAny": false, "types": [ "jasmine", "node" diff --git a/src/assets/stack-blitz-tests/tslint.json b/src/assets/stack-blitz-tests/tslint.json deleted file mode 100644 index 6ddb6b293..000000000 --- a/src/assets/stack-blitz-tests/tslint.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "rulesDirectory": [ - "node_modules/codelyzer" - ], - "rules": { - "arrow-return-shorthand": true, - "callable-types": true, - "class-name": true, - "comment-format": [ - true, - "check-space" - ], - "curly": true, - "deprecation": { - "severity": "warn" - }, - "eofline": true, - "forin": true, - "import-blacklist": [ - true, - "rxjs/Rx" - ], - "import-spacing": true, - "indent": [ - true, - "spaces" - ], - "interface-over-type-literal": true, - "label-position": true, - "max-line-length": [ - true, - 140 - ], - "member-access": false, - "member-ordering": [ - true, - { - "order": [ - "static-field", - "instance-field", - "static-method", - "instance-method" - ] - } - ], - "no-arg": true, - "no-bitwise": true, - "no-console": [ - true, - "debug", - "info", - "time", - "timeEnd", - "trace" - ], - "no-construct": true, - "no-debugger": true, - "no-duplicate-super": true, - "no-empty": false, - "no-empty-interface": true, - "no-eval": true, - "no-inferrable-types": [ - true, - "ignore-params" - ], - "no-misused-new": true, - "no-non-null-assertion": true, - "no-redundant-jsdoc": true, - "no-shadowed-variable": true, - "no-string-literal": false, - "no-string-throw": true, - "no-switch-case-fall-through": true, - "no-trailing-whitespace": true, - "no-unnecessary-initializer": true, - "no-unused-expression": true, - "no-use-before-declare": true, - "no-var-keyword": true, - "object-literal-sort-keys": false, - "one-line": [ - true, - "check-open-brace", - "check-catch", - "check-else", - "check-whitespace" - ], - "prefer-const": true, - "quotemark": [ - true, - "single" - ], - "radix": true, - "semicolon": [ - true, - "always" - ], - "triple-equals": [ - true, - "allow-null-check" - ], - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } - ], - "unified-signatures": true, - "variable-name": false, - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-type" - ], - "no-output-on-prefix": true, - "use-input-property-decorator": true, - "use-output-property-decorator": true, - "use-host-property-decorator": true, - "no-input-rename": true, - "no-output-rename": true, - "use-life-cycle-interface": true, - "use-pipe-transform-interface": true, - "component-class-suffix": true, - "directive-class-suffix": true - } -} diff --git a/src/assets/stack-blitz/package.json b/src/assets/stack-blitz/package.json index e8f8d5307..8094333f9 100644 --- a/src/assets/stack-blitz/package.json +++ b/src/assets/stack-blitz/package.json @@ -34,9 +34,7 @@ "@angular/language-service": "^12.0.0", "@angular/localize": "^12.0.0", "@types/node": "^14.14.22", - "codelyzer": "^6.0.1", "ts-node": "^8.10.2", - "tslint": "~6.1.3", "typescript": "~4.2.3" } } diff --git a/src/assets/stack-blitz/tslint.json b/src/assets/stack-blitz/tslint.json deleted file mode 100644 index 6ddb6b293..000000000 --- a/src/assets/stack-blitz/tslint.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "rulesDirectory": [ - "node_modules/codelyzer" - ], - "rules": { - "arrow-return-shorthand": true, - "callable-types": true, - "class-name": true, - "comment-format": [ - true, - "check-space" - ], - "curly": true, - "deprecation": { - "severity": "warn" - }, - "eofline": true, - "forin": true, - "import-blacklist": [ - true, - "rxjs/Rx" - ], - "import-spacing": true, - "indent": [ - true, - "spaces" - ], - "interface-over-type-literal": true, - "label-position": true, - "max-line-length": [ - true, - 140 - ], - "member-access": false, - "member-ordering": [ - true, - { - "order": [ - "static-field", - "instance-field", - "static-method", - "instance-method" - ] - } - ], - "no-arg": true, - "no-bitwise": true, - "no-console": [ - true, - "debug", - "info", - "time", - "timeEnd", - "trace" - ], - "no-construct": true, - "no-debugger": true, - "no-duplicate-super": true, - "no-empty": false, - "no-empty-interface": true, - "no-eval": true, - "no-inferrable-types": [ - true, - "ignore-params" - ], - "no-misused-new": true, - "no-non-null-assertion": true, - "no-redundant-jsdoc": true, - "no-shadowed-variable": true, - "no-string-literal": false, - "no-string-throw": true, - "no-switch-case-fall-through": true, - "no-trailing-whitespace": true, - "no-unnecessary-initializer": true, - "no-unused-expression": true, - "no-use-before-declare": true, - "no-var-keyword": true, - "object-literal-sort-keys": false, - "one-line": [ - true, - "check-open-brace", - "check-catch", - "check-else", - "check-whitespace" - ], - "prefer-const": true, - "quotemark": [ - true, - "single" - ], - "radix": true, - "semicolon": [ - true, - "always" - ], - "triple-equals": [ - true, - "allow-null-check" - ], - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } - ], - "unified-signatures": true, - "variable-name": false, - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-type" - ], - "no-output-on-prefix": true, - "use-input-property-decorator": true, - "use-output-property-decorator": true, - "use-host-property-decorator": true, - "no-input-rename": true, - "no-output-rename": true, - "use-life-cycle-interface": true, - "use-pipe-transform-interface": true, - "component-class-suffix": true, - "directive-class-suffix": true - } -} diff --git a/yarn.lock b/yarn.lock index 3aacda5c3..0fe492605 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2651,10 +2651,10 @@ dependencies: "@types/node" "*" -"@types/jasmine@^3.6.6": - version "3.6.6" - resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-3.6.6.tgz#4c0415f6198b2c643d895789f8c6d20436c1eddc" - integrity sha512-kgl+oYOLCBt41iba8cetp+QPOqDAaTJnHtVPCE7JzYmda4juglRBLX35opVcANc7TLA/Lp0DEnajbUNnyxGC+Q== +"@types/jasmine@^3.7.7": + version "3.7.7" + resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-3.7.7.tgz#56718af036be3c9f86eca560a22e39440b2b0784" + integrity sha512-yZzGe1d1T0y+imXDZ79F030nn8qbmiwpWKCZKvKN0KbTzwXAVYShUxkIxu1ba+vhIdabTGVGCfbtZC0oOam8TQ== "@types/json-schema@*", "@types/json-schema@^7.0.3": version "7.0.7" @@ -8276,6 +8276,11 @@ jasmine-core@^3.6.0: resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-3.6.0.tgz#491f3bb23941799c353ceb7a45b38a950ebc5a20" integrity sha512-8uQYa7zJN8hq9z+g8z1bqCfdC8eoDAeVnM5sfqs7KHv9/ifoJ500m018fpFc7RDaO6SWCLCXwo/wPSNcdYTgcw== +jasmine-core@^3.7.1: + version "3.7.1" + resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-3.7.1.tgz#0401327f6249eac993d47bbfa18d4e8efacfb561" + integrity sha512-DH3oYDS/AUvvr22+xUBW62m1Xoy7tUlY1tsxKEJvl5JeJ7q8zd1K5bUwiOxdH+erj6l2vAMM3hV25Xs9/WrmuQ== + jasmine-core@~2.8.0: version "2.8.0" resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.8.0.tgz#bcc979ae1f9fd05701e45e52e65d3a5d63f1a24e"