-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat(material/ng-update): add migration for hammerjs in version 9 #17369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/material/schematics/ng-update/upgrade-rules/hammer-gestures-v9/gesture-config.template
Show resolved
Hide resolved
ea56863
to
609a374
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall, just a few small comments
src/material/schematics/ng-update/test-cases/v9/hammer-migration-v9.spec.ts
Show resolved
Hide resolved
src/material/schematics/ng-update/upgrade-rules/hammer-gestures-v9/cli-workspace.ts
Outdated
Show resolved
Hide resolved
src/material/schematics/ng-update/upgrade-rules/hammer-gestures-v9/gesture-config.template
Show resolved
Hide resolved
src/material/schematics/ng-update/upgrade-rules/hammer-gestures-v9/hammer-gestures-rule.ts
Outdated
Show resolved
Hide resolved
46908af
to
c15de55
Compare
@jelbourn Addressed the feedback. |
Also FYI: just tried this against diff --git a/package.json b/package.json
index cc1568f..f131c7b 100644
--- a/package.json
+++ b/package.json
@@ -114,7 +114,6 @@
"core-js": "3.3.0",
"d3": "5.10.1",
"file-saver": "2.0.2",
- "hammerjs": "2.0.8",
"highlight.js": "^9.15.8",
"js-yaml": "3.13.1",
"ng2-ace-editor": "0.3.9",
@@ -192,4 +191,4 @@
"node": ">=10.9.0",
"npm": ">=6.0.0"
}
-}
+}
\ No newline at end of file
diff --git a/src/app/frontend/index.module.ts b/src/app/frontend/index.module.ts
index b6e0341..fa5e7a0 100644
--- a/src/app/frontend/index.module.ts
+++ b/src/app/frontend/index.module.ts
@@ -14,7 +14,7 @@
import {HttpClientModule} from '@angular/common/http';
import {ErrorHandler, NgModule} from '@angular/core';
-import {BrowserModule, HAMMER_GESTURE_CONFIG} from '@angular/platform-browser';
+import { BrowserModule } from '@angular/platform-browser';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {RouterModule} from '@angular/router';
import {ChromeModule} from './chrome/module';
@@ -23,7 +23,6 @@ import {GlobalErrorHandler} from './error/handler';
import {RootComponent} from './index.component';
import {routes} from './index.routing';
import {LoginModule} from './login/module';
-import {GestureConfig} from '@angular/material/core';
@NgModule({
imports: [
@@ -40,7 +39,6 @@ import {GestureConfig} from '@angular/material/core';
],
providers: [
{provide: ErrorHandler, useClass: GlobalErrorHandler},
- {provide: HAMMER_GESTURE_CONFIG, useClass: GestureConfig},
],
declarations: [RootComponent],
bootstrap: [RootComponent],
diff --git a/src/app/frontend/polyfills.ts b/src/app/frontend/polyfills.ts
index 0500080..38510dd 100644
--- a/src/app/frontend/polyfills.ts
+++ b/src/app/frontend/polyfills.ts
@@ -20,14 +20,9 @@
// IE10 and IE11 requires the following for the Reflect API.
import 'core-js/es/reflect';
-import 'hammerjs';
-
// Required to support Web Animations `@angular/platform-browser/animations`:
import 'web-animations-js';
-// Required to support Angular Material animations.
-import 'hammerjs';
-
// Zone JS is required by default for Angular itself.
import 'zone.js/dist/zone';
|
c15de55
to
a461ce1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
@jelbourn This would be up for an initial review. I realize that the actual migration file is still quite big.. but I tried to already move things out as much as possible. I'm sure we can do better, but it will probably also complicate the sharing of analysis data if we split it into multiple classes.
Also, stuff like the
ImportManager
could technically go into some shared utilities once we figured out where these things should live.