Skip to content

Commit

Permalink
feat: update to angular 16 (#442)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: requires angular 16
  • Loading branch information
scttcper authored May 15, 2023
1 parent ef8b0c0 commit d969113
Show file tree
Hide file tree
Showing 13 changed files with 3,166 additions and 1,699 deletions.
47 changes: 0 additions & 47 deletions .circleci/config.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
coverage:
range: "50..100"
status:
project: no
project: false
patch: false
comment:
require_changes: true
Expand Down
44 changes: 18 additions & 26 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,35 @@
{
"root": true,
"ignorePatterns": ["projects/**/*"],
"ignorePatterns": [
"projects/**/*"
],
"overrides": [
{
"files": ["*.ts"],
"files": [
"*.ts"
],
"parserOptions": {
"project": ["tsconfig.json"],
"project": [
"tsconfig.json",
"e2e/tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/ng-cli-compat",
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/component-class-suffix": "off",
"@angular-eslint/component-selector": [
"off",
{
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
],
"@angular-eslint/directive-class-suffix": "off",
"@angular-eslint/directive-selector": [
"off",
{
"type": "attribute",
"prefix": "app",
"style": "camelCase"
}
],
"@typescript-eslint/no-explicit-any": "error"
"@angular-eslint/component-class-suffix": "off"
}
},
{
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended"],
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {}
}
]
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

on:
push:
branches:
- master
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
- run: npm ci
- name: lint
run: npm run lint
- run: npm run build
- name: test
run: npm run test:ci
- name: coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}

publish:
needs: build
runs-on: ubuntu-latest
if: github.ref_name == 'master'
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
- run: npm ci
- run: npm run build
- name: release
run: cd dist && npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
20
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

[npm-image]: https://img.shields.io/npm/v/ng2-adsense.svg
[npm-url]: https://npmjs.org/package/ng2-adsense
[circle-img]: https://circleci.com/gh/scttcper/ng2-adsense.svg?style=svg
[circle-url]: https://circleci.com/gh/scttcper/ng2-adsense
[coverage-img]: https://codecov.io/gh/scttcper/ng2-adsense/branch/master/graph/badge.svg
[coverage-url]: https://codecov.io/gh/scttcper/ng2-adsense

Expand All @@ -29,7 +27,8 @@ Latest version available for each version of Angular
| 9.1.0 | 10.x 11.x |
| 10.1.0 | 12.x 13.x |
| 11.0.0 | 14.x |
| current | >=15 |
| 12.0.0 | 15.x |
| current | >=16 |

## Use

Expand Down
6 changes: 3 additions & 3 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ module.exports = function (config) {
autoWatch: true,
browsers: ['Chrome'],
customLaunchers: {
ChromeCI: {
base: `${process.env['TRAVIS'] ? 'ChromeHeadless' : 'Chrome'}`,
flags: process.env['TRAVIS'] ? ['--no-sandbox'] : [],
ChromeHeadlessCustom: {
base: 'ChromeHeadless',
flags: ['--no-sandbox', '--disable-gpu'],
},
},
singleRun: false,
Expand Down
Loading

0 comments on commit d969113

Please sign in to comment.