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

Ng17 #87

Merged
merged 10 commits into from
Dec 13, 2023
Merged

Ng17 #87

Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
"createDefaultProgram": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ on:

jobs:
build:
environment: production
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Use Node.js
- name: Use Node.js 20
uses: actions/setup-node@master
with:
node-version: 18
node-version: 20
registry-url: 'https://registry.npmjs.org'

- name: Cache node modules
Expand Down Expand Up @@ -59,7 +60,7 @@ jobs:
- name: Use GPR
uses: actions/setup-node@master
with:
node-version: 18
node-version: 20
registry-url: https://npm.pkg.github.com/
scope: '@bartholomej'

Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ on: [push]

jobs:
test:
environment: develop
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Use Node.js 18
- name: Use Node.js 20
uses: actions/setup-node@master
with:
node-version: 18
node-version: 20

- name: Cache node modules
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx pretty-quick --staged
npx lint-staged
4 changes: 4 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"*.{ts,ts,html}": ["eslint --fix"],
"*.{json,css,scss,md,ts,html}": ["prettier --write"]
}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
20
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"[typescript]": {
"editor.codeActionsOnSave": {
"source.organizeImports": true
"source.organizeImports": "explicit"
}
}
}
}
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
> No dependencies.
> **Pure Angular!**

> ✓ Angular 16, Ivy and Angular Universal (SSR) compatible
> ✓ **Angular 17**, Angular Universal (**SSR**) a **Standalone Components** compatible

Just hit the button to smoothly scroll back to the top of the page. [Here's the demo.](http://bartholomej.github.io/ngx-scrolltop/)

Expand All @@ -25,7 +25,7 @@ Just hit the button to smoothly scroll back to the top of the page. [Here's the
- Smoothly animated
- a11y ready
- Highly customizable [options](#options)...
- Angular 16: Pure IVY support
- Angular 17
- [Angular 5+ compatible](#compatibility)

![Demo animation](https://github.com/bartholomej/material-scrollTop/blob/master/demo/images/material-scrolltop-animation.gif?raw=true)
Expand All @@ -40,7 +40,7 @@ Or play with it live on [stackblitz.com/edit/ngx-scrolltop](https://stackblitz.c

### Automatically (recommended) 🚀

> Not using latest version of Angular?
> You're not using the latest version of Angular?
> [See our Angular compatibility instructions…](#compatibility)

```bash
Expand All @@ -57,8 +57,6 @@ Via **yarn** or **npm**

```bash
npm install ngx-scrolltop --save # for lastest Angular only! See our compatibility table

# npm install ngx-scrolltop@2 --save # for Angular 5 – 11
```

### Setup (manually)
Expand All @@ -81,19 +79,20 @@ export class AppModule { }

### Compatibility

Since `ngx-scrolltop` `v3`, the library is compiled with IVY and fully supports Angular12+ (you can't use this with older Angular version anymore!)

If you still need to use it with an older version of Angular, then use version 2, which is still available: `ng add ngx-scrolltop@2`

| Angular version | ngx-scrolltop | Install |
| --------------- | ------------- | ----------------------------- |
| ng16 | v6.x.x | `ng add ngx-scrolltop@latest` |
| ng15 | v6.x.x | `ng add ngx-scrolltop@latest` |
| ng17 | v7.x.x | `ng add ngx-scrolltop@latest` |
| ng16 | v6.x.x | `ng add ngx-scrolltop@6` |
| ng15 | v6.x.x | `ng add ngx-scrolltop@6` |
| ng14 | v4.x.x | `ng add ngx-scrolltop@4` |
| ng13 | v4.x.x | `ng add ngx-scrolltop@4` |
| ng12 | v4.x.x | `ng add ngx-scrolltop@4` |
| ng5 – ng11 | v2.x.x | `ng add ngx-scrolltop@2` |

Note: Since `ngx-scrolltop` `v3`, the library is compiled with IVY and fully supports Angular12+ (you can't use this with older Angular version anymore!)

If you still need to use it with an older version of Angular, then use version 2, which is still available: `ng add ngx-scrolltop@2`

## Usage

### Component way (default)
Expand Down
6 changes: 3 additions & 3 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,18 @@
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "demo:build"
"buildTarget": "demo:build"
},
"configurations": {
"production": {
"browserTarget": "demo:build:production"
"buildTarget": "demo:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "demo:build"
"buildTarget": "demo:build"
}
},
"test": {
Expand Down
77 changes: 39 additions & 38 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,69 +16,69 @@
"deploy:ghpages": "yarn build && yarn build:demo && ngh --dir=dist/demo",
"publish:npmjs": "npm run syncprojects && npm run build && npm publish --folder dist/ngx-scrolltop",
"publish:next": "yarn && yarn syncprojects && yarn build && yarn build:schematics && yarn test --configuration=ci && cd dist/ngx-scrolltop && npm publish --tag next",
"gpr:setup": "yarn ts-node --project scripts/tsconfig.ts-node.json scripts/gpr-setup",
"gpr:setup": "yarn tsx scripts/gpr-setup",
"test": "ng test",
"lint": "ng lint",
"tslint-fix": "tslint --fix -p tsconfig.json",
"e2e": "ng e2e",
"create:version": "yarn ts-node --project scripts/tsconfig.ts-node.json scripts/create-version",
"create:version": "yarn tsx scripts/create-version",
"postinstall": "yarn create:version",
"syncprojects": "yarn ts-node --project scripts/tsconfig.ts-node.json scripts/sync-projects",
"syncprojects": "yarn tsx scripts/sync-projects",
"version": "npm run syncprojects && git add ./projects/ngx-scrolltop/",
"postversion": "git push && git push --follow-tags",
"release:patch": "git checkout master && npm version patch -m \"chore(update): patch release %s 🐛 \"",
"release:minor": "git checkout master && npm version minor -m \"chore(update): release %s 🚀\"",
"release:major": "git checkout master && npm version major -m \"chore(update): major release %s 💥 \""
},
"dependencies": {
"@angular/animations": "^16.0.0",
"@angular/common": "^16.0.0",
"@angular/compiler": "^16.0.0",
"@angular/core": "^16.0.0",
"@angular/forms": "^16.0.0",
"@angular/platform-browser": "^16.0.0",
"@angular/platform-browser-dynamic": "^16.0.0",
"@angular/router": "^16.0.0",
"@angular/animations": "^17.0.6",
"@angular/common": "^17.0.6",
"@angular/compiler": "^17.0.6",
"@angular/core": "^17.0.6",
"@angular/forms": "^17.0.6",
"@angular/platform-browser": "^17.0.6",
"@angular/platform-browser-dynamic": "^17.0.6",
"@angular/router": "^17.0.6",
"rxjs": "^7.4.0",
"seamless-scroll-polyfill": "^2.3.4",
"tslib": "^2.3.1",
"zone.js": "~0.13.0"
"zone.js": "~0.14.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "^16.0.0",
"@angular-devkit/schematics": "^16.0.0",
"@angular-devkit/schematics-cli": "^16.0.0",
"@angular-eslint/builder": "16.0.1",
"@angular-eslint/eslint-plugin": "16.0.1",
"@angular-eslint/eslint-plugin-template": "16.0.1",
"@angular-eslint/schematics": "16.0.1",
"@angular-eslint/template-parser": "16.0.1",
"@angular/cli": "^16.0.0",
"@angular/compiler-cli": "^16.0.0",
"@angular/language-service": "^16.0.0",
"@types/fs-extra": "^11.0.1",
"@types/jasmine": "~4.3.1",
"@types/jasminewd2": "~2.0.10",
"@types/node": "^18.14.2",
"@typescript-eslint/eslint-plugin": "^5.59.2",
"@typescript-eslint/parser": "^5.59.2",
"eslint": "^8.39.0",
"fs-extra": "^11.1.1",
"@angular-devkit/build-angular": "^17.0.7",
"@angular-devkit/schematics": "^17.0.7",
"@angular-devkit/schematics-cli": "^17.0.7",
"@angular-eslint/builder": "17.1.1",
"@angular-eslint/eslint-plugin": "17.1.1",
"@angular-eslint/eslint-plugin-template": "17.1.1",
"@angular-eslint/schematics": "17.1.1",
"@angular-eslint/template-parser": "17.1.1",
"@angular/cli": "^17.0.7",
"@angular/compiler-cli": "^17.0.6",
"@angular/language-service": "^17.0.6",
"@types/fs-extra": "^11.0.4",
"@types/jasmine": "~5.1.4",
"@types/jasminewd2": "~2.0.13",
"@types/node": "^20.10.4",
"@typescript-eslint/eslint-plugin": "6.14.0",
"@typescript-eslint/parser": "6.14.0",
"eslint": "^8.54.0",
"fs-extra": "^11.2.0",
"husky": "^8.0.3",
"jasmine-core": "~4.6.0",
"jasmine-core": "~5.1.1",
"jasmine-spec-reporter": "~7.0.0",
"karma": "~6.4.2",
"karma-chrome-launcher": "~3.2.0",
"karma-coverage-istanbul-reporter": "~3.0.3",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "^2.0.0",
"ng-packagr": "^16.0.0",
"prettier": "^2.8.8",
"pretty-quick": "^3.1.3",
"karma-jasmine-html-reporter": "^2.1.0",
"lint-staged": "^15.2.0",
"ng-packagr": "^17.0.2",
"prettier": "^3.1.0",
"protractor": "~7.0.0",
"ts-node": "~10.9.1",
"tslint-config-prettier": "^1.18.0",
"typescript": "~5.0.4"
"tsx": "^4.6.2",
"typescript": "~5.2.2"
},
"homepage": "https://github.com/bartholomej/ngx-scrolltop",
"license": "MIT",
Expand Down Expand Up @@ -107,6 +107,7 @@
"angular14",
"angular15",
"angular16",
"angular17",
"smooth",
"esm",
"sass"
Expand Down
18 changes: 13 additions & 5 deletions projects/demo/.browserslistrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.

# For additional information regarding the format and rule options, please see:

# https://github.com/browserslist/browserslist#queries

# For the full list of supported browsers by the Angular framework, please see:

# https://angular.io/guide/browser-support

# You can see what browsers were selected by your queries by running:
# npx browserslist

> 0.5%
last 2 versions
# npx browserslist

last 2 Chrome versions
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.
21 changes: 10 additions & 11 deletions projects/ngx-scrolltop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
> No dependencies.
> **Pure Angular!**

> ✓ Angular 16, Ivy and Angular Universal (SSR) compatible
> ✓ **Angular 17**, Angular Universal (**SSR**) a **Standalone Components** compatible

Just hit the button to smoothly scroll back to the top of the page. [Here's the demo.](http://bartholomej.github.io/ngx-scrolltop/)

Expand All @@ -25,7 +25,7 @@ Just hit the button to smoothly scroll back to the top of the page. [Here's the
- Smoothly animated
- a11y ready
- Highly customizable [options](#options)...
- Angular 16: Pure IVY support
- Angular 17
- [Angular 5+ compatible](#compatibility)

![Demo animation](https://github.com/bartholomej/material-scrollTop/blob/master/demo/images/material-scrolltop-animation.gif?raw=true)
Expand All @@ -40,7 +40,7 @@ Or play with it live on [stackblitz.com/edit/ngx-scrolltop](https://stackblitz.c

### Automatically (recommended) 🚀

> Not using latest version of Angular?
> You're not using the latest version of Angular?
> [See our Angular compatibility instructions…](#compatibility)

```bash
Expand All @@ -57,8 +57,6 @@ Via **yarn** or **npm**

```bash
npm install ngx-scrolltop --save # for lastest Angular only! See our compatibility table

# npm install ngx-scrolltop@2 --save # for Angular 5 – 11
```

### Setup (manually)
Expand All @@ -81,19 +79,20 @@ export class AppModule { }

### Compatibility

Since `ngx-scrolltop` `v3`, the library is compiled with IVY and fully supports Angular12+ (you can't use this with older Angular version anymore!)

If you still need to use it with an older version of Angular, then use version 2, which is still available: `ng add ngx-scrolltop@2`

| Angular version | ngx-scrolltop | Install |
| --------------- | ------------- | ----------------------------- |
| ng16 | v6.x.x | `ng add ngx-scrolltop@latest` |
| ng15 | v6.x.x | `ng add ngx-scrolltop@latest` |
| ng17 | v7.x.x | `ng add ngx-scrolltop@latest` |
| ng16 | v6.x.x | `ng add ngx-scrolltop@6` |
| ng15 | v6.x.x | `ng add ngx-scrolltop@6` |
| ng14 | v4.x.x | `ng add ngx-scrolltop@4` |
| ng13 | v4.x.x | `ng add ngx-scrolltop@4` |
| ng12 | v4.x.x | `ng add ngx-scrolltop@4` |
| ng5 – ng11 | v2.x.x | `ng add ngx-scrolltop@2` |

Note: Since `ngx-scrolltop` `v3`, the library is compiled with IVY and fully supports Angular12+ (you can't use this with older Angular version anymore!)

If you still need to use it with an older version of Angular, then use version 2, which is still available: `ng add ngx-scrolltop@2`

## Usage

### Component way (default)
Expand Down
5 changes: 3 additions & 2 deletions projects/ngx-scrolltop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"description": "Lightweight, Material Design inspired button for scroll-to-top of the page. No dependencies. Pure Angular!",
"author": "Lukas Bartak <[email protected]> (https://github.com/bartholomej)",
"peerDependencies": {
"@angular/common": ">=15 <17",
"@angular/core": ">=15 <17"
"@angular/common": ">=16 <18",
"@angular/core": ">=16 <18"
},
"dependencies": {
"seamless-scroll-polyfill": "2.3.4"
Expand Down Expand Up @@ -34,6 +34,7 @@
"angular14",
"angular15",
"angular16",
"angular17",
"smooth",
"esm",
"sass"
Expand Down
Loading