Without this awesome ? operator, we would have to write this instead: let x = foo != null & foo != undefined ? foo : true If foo is null or undefined, then x will be set to true (i.e., the fallback value), and we could set it to anything we like. The idea is to be able to define a fallback value in case something is null or undefined. If you haven't heard about this operator, then let me give you a quick explanation. And this is awesome! That operator has been supported in TypeScript since version 3.7. The Angular team is still busy evaluating the feedback collected through the RFC, so we'll probably know more later this year.Īnyways give Cypress a try if you haven't already, you won't be disappointed! By the way, I keep recommending everyone to start using Nrwl NX, a wonderful solution that includes support for Angular, React, Next.js, Cypress, and a lot more -) Nullish coalescingĪngular 12 includes support for using the nullish coalescing operator in Angular templates. The timeline is important for teams/projects that have invested a lot of time and energy writing e2e tests with Protractor. You can find more details in the RFC, it's an interesting read. Evolving Protractor now would require too much effort and induce a ton of breaking changes. Long story short, maintaining Protractor doesn't make much sense for the Angular team. Another benefit of the current de-facto e2e testing tools is that they're framework-agnostic, which is very valuable. Tools like Cypress for example provide a much better developer experience than Protractor, leverage the modern standards, and even support cross-browser testing (among other powerful capabilities). Solutions like Cypress, Playwright, Puppeteer have gained a lot of (well-deserved) popularity. We now have the WebDriver API, async and await (even top-level await, woah). Of course, a lot of things have evolved since then. Protractor brought an innovative solution by wrapping selenium-webdriver, and provided a way to control the execution flow. This means that the ng e2e command should continue to be supported in the future.Īs explained in the announcement, back in 2013 when Protractor was created, WebDriver was not a standard, and end-to-end (e2e) tests were hard to write, and a nightmare to maintain. Instead, the Angular CLI will provide options to use other solutions like Cypress, WebdriverIO, or TestCafe. In April, the Angular team has announced plans to end the support of Protractor at the end of 2022.Īs of Angular 12, Protractor won't be included by default in new projects. There's also an excellent article about Ivy over there. Anyways, the path forward is to migrate all the things to Ivy asap -)Īs a side note, if you're not familiar with the internals of Angular, then check out the following videos.ĭeep Dive into the Angular Compiler by Alex Rickabaugh: Library authors probably can't migrate to Ivy too fast, but they should clearly push reluctant users to upgrade. Last but not least, libraries that rely on View Engine can't depend on Ivy ones. Second, until a majority of the ecosystem has moved on, the Angular team will have to keep View Engine around, which is problematic for a number of reasons. This is why it is crucial for the Angular ecosystem to migrate to Ivy as soon as possible. Like me, you've probably noticed that ngcc takes a lot of time to execute, and has a very negative impact on developer experience. What ngccdoes is compile libraries that rely on View Engine so that Ivy can consume those. : es2015 as esm2015, it's ngcc doing its job. In case you didn't know, ngcc is the small process that runs after you create an Angular project or install dependencies. A few weeks ago, Minko Gechev has published an article to explain that in detail. Finally, Ivy is now the default for new library projects.Īt this point, library authors can still rely on View Engine thanks to ngcc (the compatibility compiler of Angular), but it's really time for them to evaluate whether they can migrate their libraries to Ivy or not. Also, it won't be possible to create new applications using View Engine. It will be removed in a future major release. With Angular 12, the old View Engine is now officially deprecated. Since Angular 9, Ivy has been the default for new projects, and the ecosystem is slowly migrating to it. The Angular team has been working on Ivy (the new compilation & rendering pipeline) since 2018. Here, I'll dig much deeper into the release notes. If you're just looking for the bird-eye view, then check out the official release announcement. I’ll also highlight what’s changed around Angular, just like I did with my previous articles about Angular 11 and Angular 10. In this article, I’ll go over (almost) everything noteworthy in this brand new release.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |