Migrate ng2-cookies to ngx-cookie-service
ProprietaryReplaces the unmaintained ng2-cookies with ngx-cookie-service, which writes cookies the same way. An injected CookieService or UnmanagedCookieService becomes ngx-cookie-service's CookieService, and a call on the Cookie object goes through a CookieService field of the Angular class it is in, which inject(CookieService) provides where the class has none (Angular 14 and later). Calls that no such field can serve, such as those in a function outside a class or in a static method, are flagged for a hand migration. Only projects on Angular 9 to 22, the majors ngx-cookie-service has a release for, are migrated, as their package.json resolves or declares @angular/core within one major.
org. openrewrite. angular. ng2cookies. MigrateNg2CookiesToNgxCookieServicemod run . --recipe= org. openrewrite. angular. ng2cookies. MigrateNg2CookiesToNgxCookieServiceInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.