Skip to content
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

build: add Angular 17 support & update packages #477

Merged
merged 24 commits into from
Nov 26, 2023
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
0667f77
build: update packages and switch to npm
Yberion Nov 12, 2023
39d0074
refactor: add new nx cache folder to .gitignore
Yberion Nov 12, 2023
c7c80ec
build: update packages with nx migrate command
Yberion Nov 12, 2023
c540d23
build: fix tsconfigs across the repo
Yberion Nov 17, 2023
ee888a6
build: update packages
Yberion Nov 17, 2023
d893bb2
build: update to 17.2.0-beta.0
Yberion Nov 17, 2023
d3d0c5a
build: apply nx migrations
Yberion Nov 17, 2023
fe437b0
refactor: format repo
Yberion Nov 17, 2023
93c9533
feat(ngu-carousel-example): migrate to control-flow
Yberion Nov 18, 2023
4ae09b5
refactor(ngu-carousel-example): remove cypress as there is already ng…
Yberion Nov 17, 2023
a6c4c1e
refactor(ngu-carousel-example): fix lint
Yberion Nov 17, 2023
a0b3e9f
test(ngu-carousel-example): fix tests
Yberion Nov 17, 2023
4cc54dc
build(ngu-carousel): remove deprecated options
Yberion Nov 17, 2023
c1a2240
fix(ngu-carousel): add missing cypress tsconfig for eslint
Yberion Nov 17, 2023
b566492
build(ngu-carousel-example): update current ssr setup
Yberion Nov 18, 2023
574b279
refactor(ngu-carousel-example): cleanup polyfills
Yberion Nov 18, 2023
bef7874
ci: update node versions and actions and switch to npm
Yberion Nov 18, 2023
caf721a
build(ngu-carousel): bump versions for Angular 17
Yberion Nov 18, 2023
e1ac32c
build(ngu-carousel): bump to version 9.0.0
Yberion Nov 18, 2023
754b3e4
test(ngu-carousel): remove core-js as it should not be used anymore
Yberion Nov 18, 2023
f69cae0
test(ngu-carousel-example): more polyfills cleanup
Yberion Nov 18, 2023
811c78f
test(ngu-carousel): polyfills cleanup
Yberion Nov 18, 2023
aed6a7c
refactor(ngu-carousel-example): update control flow usage
Yberion Nov 26, 2023
6bb752b
docs(ngu-carousel): compatibility array
Yberion Nov 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ jobs:

strategy:
matrix:
node-version: ['16', '18']
node-version: ['18.13.0', '20']

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn
run: npm ci
- name: Build
run: |
yarn nx run-many --target=build --all
npx nx run-many --target=build --all
env:
CI: true
18 changes: 9 additions & 9 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,26 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- run: yarn
node-version: 18.13.0
- run: npm ci

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 18.13.0
registry-url: https://registry.npmjs.org/
scope: '@ngu'
- name: Build and Publish
run: |
yarn install
yarn nx run-many --target=build --all
npm ci
npx nx run-many --target=build --all
cd dist/libs/ngu/carousel
npm publish --access=public
shell: bash
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ chrome-profiler-events*.json
.history/*

# misc
/.angular/cache
.angular
/.sass-cache
/connect.lock
/coverage
Expand All @@ -41,6 +41,7 @@ yarn-error.log
testem.log
/typings
**/reports
.nx

# System Files
.DS_Store
Expand Down
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
package.json
*.yml

/.nx/cache
.angular
55 changes: 28 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
[![npm version](https://badge.fury.io/js/%40ngu%2Fcarousel.svg)](https://badge.fury.io/js/%40ngu%2Fcarousel)

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->

[![All Contributors](https://img.shields.io/badge/all_contributors-16-orange.svg?style=flat-square)](#contributors-)

<!-- ALL-CONTRIBUTORS-BADGE:END -->

Angular Universal carousel
Expand All @@ -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

Expand All @@ -49,13 +52,13 @@ import {

@NgModule({
imports: [
NguCarousel,
NguTileComponent,
NguCarousel,
NguCarouselDefDirective,
NguCarouselNextDirective,
NguCarouselPrevDirective,
NguItemComponent
NguCarousel,
NguTileComponent,
NguCarousel,
NguCarouselDefDirective,
NguCarouselNextDirective,
NguCarouselPrevDirective,
NguItemComponent
]
})
export class AppModule {}
Expand All @@ -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:
Expand Down
7 changes: 6 additions & 1 deletion apps/ngu-carousel-e2e/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset';

export default defineConfig({
e2e: {
...nxE2EPreset(__dirname),
...nxE2EPreset(__dirname, {
devServerTargets: {
default: 'ngu-carousel-example:serve:development',
production: 'ngu-carousel-example:serve:production'
}
}),
/**
* TODO(@nx/cypress): In Cypress v12,the testIsolation option is turned on by default.
* This can cause tests to start breaking where not indended.
Expand Down
15 changes: 1 addition & 14 deletions apps/ngu-carousel-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,8 @@
"sourceRoot": "apps/ngu-carousel-e2e/src",
"projectType": "application",
"targets": {
"e2e": {
"executor": "@nx/cypress:cypress",
"options": {
"cypressConfig": "apps/ngu-carousel-e2e/cypress.config.ts",
"devServerTarget": "ngu-carousel-example:serve:development",
"testingType": "e2e"
},
"configurations": {
"production": {
"devServerTarget": "ngu-carousel-example:serve:production"
}
}
},
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/ngu-carousel-e2e/**/*.{js,ts}"]
Expand Down
3 changes: 0 additions & 3 deletions apps/ngu-carousel-example/cypress.config.ts

This file was deleted.

5 changes: 0 additions & 5 deletions apps/ngu-carousel-example/cypress/fixtures/example.json

This file was deleted.

32 changes: 0 additions & 32 deletions apps/ngu-carousel-example/cypress/support/commands.ts

This file was deleted.

12 changes: 0 additions & 12 deletions apps/ngu-carousel-example/cypress/support/component-index.html

This file was deleted.

17 changes: 0 additions & 17 deletions apps/ngu-carousel-example/cypress/support/component.ts

This file was deleted.

17 changes: 0 additions & 17 deletions apps/ngu-carousel-example/cypress/tsconfig.cy.json

This file was deleted.

Loading