-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: add Angular 17 support & update packages (#477)
Hello @santoshyadavdev, This PR fixes #476. What I did: - I couldn't use `yarn` at all this time, I switched to `npm` (even after everything was updated with `npm` and switching back to `yarn`) - I updated all packages to latest versions (except `jasmine-core`) - The nx cache is now located in the root folder of the repo, I added `.nx` in `.gitignore` - There was some problem with how the tsconfigs were done, I fixed all of them (it was causing problems with nx migrations) - I applied the migrations from nx - I migrated `ngu-carousel-example` to use the new control-flow - I did not update the `README.md` - I removed the cypress component testing config from `ngu-carousel-example` as it was more or less useless - I fixed errors found by the linter - I fixed unit tests - I removed `updateBuildableProjectDepsInPackageJson` from `ngu-carousel` as it was deprecated - removing it keeps the same behavior as if it was enable, that's what we want - I added missing `tsconfig.json` (cypress) in the `.eslintrc.json` of `ngu-carousel` - I updated the current SSR setup - I first tried to migrate the new `application` builder, but it was not working properly with modules. ~~I will investigate later if it comes from `nx` or the `Angular CLI`~~ (thanks @JeanMeche for his help) - Could be related to angular/angular#52998 - As said in https://riegler.fr/blog/2023-10-13-v17-builders: - `An interesting point to note is that if either 'ssr' or 'prerender' are set to 'true' in the configuration file, the pages served with 'ng serve' will be generated server side.` - This was not working, that's one of the reason I kept the same setup with `ssr-dev-server` & co. - I already did the migration to `browser-esbuild` when I migrated to `Angular 16`, so it is already using esbuild. - Another reason is that `ng serve` using the ssr is not using `server.ts` (which should not affect this repo, but let's play it safe), track angular/angular-cli#26323 - I cleaned `polyfills` usage - I updated the `CI` setup - Angular supports node starting version `18.13.0`, the CI now runs on `['18.13.0', '20']` - Updated to `actions/checkout@v4` & `actions/setup-node@v4` - Updated to use `npm` - I bumped `ngu-carousel` for `Angular 17` - I bumped `ngu-carousel` to `9.0.0` and I updated `README.md` TODO on your side: - Release a new major version `9.0.0` - Close branches related to package update Tell me if everything looks ok for you. Have a nice day.
- Loading branch information
Showing
49 changed files
with
31,657 additions
and
15,782 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
package.json | ||
*.yml | ||
|
||
/.nx/cache | ||
.angular |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,9 @@ | |
[](https://badge.fury.io/js/%40ngu%2Fcarousel) | ||
|
||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --> | ||
|
||
[](#contributors-) | ||
|
||
<!-- ALL-CONTRIBUTORS-BADGE:END --> | ||
|
||
Angular Universal carousel | ||
|
@@ -22,17 +24,18 @@ Demo available [Here](https://ngu-carousel.netlify.app) | |
|
||
`ngu-carousel` supports touch actions and requires `hammerjs` to be installed before the `ngu-carousel` is installed. | ||
|
||
| Angular Version | ngu-carousel Version | | ||
| --------------- | ----------------------------------- | | ||
| Angular >= 16 standalone | `npm i --save @ngu/carousel@latest` | | ||
| Angular >= 16 | `npm i --save @ngu/[email protected]` | | ||
| Angular >= 15 | `npm i --save @ngu/[email protected]` | | ||
| Angular >= 14 | `npm i --save @ngu/[email protected]` | | ||
| Angular >= 13 | `npm i --save @ngu/[email protected]` | | ||
| Angular >= 12 | `npm i --save @ngu/[email protected]` | | ||
| Angular >= 10 | `npm i --save @ngu/[email protected]` | | ||
| Angular = 9 | `npm i --save @ngu/[email protected]` | | ||
| Angular < 9 | `npm i --save @ngu/[email protected]` | | ||
| Angular Version | ngu-carousel Version | | ||
| ------------------------ | -------------------------------------------- | | ||
| Angular >= 17 | `npm i --save @ngu/carousel@carousel@latest` | | ||
| Angular >= 16 standalone | `npm i --save @ngu/[email protected]` | | ||
| Angular >= 16 | `npm i --save @ngu/[email protected]` | | ||
| Angular >= 15 | `npm i --save @ngu/[email protected]` | | ||
| Angular >= 14 | `npm i --save @ngu/[email protected]` | | ||
| Angular >= 13 | `npm i --save @ngu/[email protected]` | | ||
| Angular >= 12 | `npm i --save @ngu/[email protected]` | | ||
| Angular >= 10 | `npm i --save @ngu/[email protected]` | | ||
| Angular = 9 | `npm i --save @ngu/[email protected]` | | ||
| Angular < 9 | `npm i --save @ngu/[email protected]` | | ||
|
||
## Usage | ||
|
||
|
@@ -49,13 +52,13 @@ import { | |
|
||
@NgModule({ | ||
imports: [ | ||
NguCarousel, | ||
NguTileComponent, | ||
NguCarousel, | ||
NguCarouselDefDirective, | ||
NguCarouselNextDirective, | ||
NguCarouselPrevDirective, | ||
NguItemComponent | ||
NguCarousel, | ||
NguTileComponent, | ||
NguCarousel, | ||
NguCarouselDefDirective, | ||
NguCarouselNextDirective, | ||
NguCarouselPrevDirective, | ||
NguItemComponent | ||
] | ||
}) | ||
export class AppModule {} | ||
|
@@ -64,19 +67,17 @@ OR | |
|
||
@Component({ | ||
imports: [ | ||
NguCarousel, | ||
NguTileComponent, | ||
NguCarousel, | ||
NguCarouselDefDirective, | ||
NguCarouselNextDirective, | ||
NguCarouselPrevDirective, | ||
NguItemComponent | ||
NguCarousel, | ||
NguTileComponent, | ||
NguCarousel, | ||
NguCarouselDefDirective, | ||
NguCarouselNextDirective, | ||
NguCarouselPrevDirective, | ||
NguItemComponent | ||
], | ||
standalone: true | ||
}) | ||
export class AppComponent {} | ||
|
||
|
||
``` | ||
|
||
2. Then use in your component: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
apps/ngu-carousel-example/cypress/support/component-index.html
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.