Skip to content

Commit 748b8c1

Browse files
authored
Feature/add support for angular 13 (#46)
* chore: update dependencies * fix: lint issues * fix: rollback to node 12 * feat: add support for Angular v13.0 * feat: create new build files * docs: update the docs
1 parent 22ba00f commit 748b8c1

File tree

17 files changed

+4085
-2956
lines changed

17 files changed

+4085
-2956
lines changed

.eslintrc.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
"rules": {
1111
"eslint-comments/no-use": "off",
1212
"import/no-namespace": "off",
13+
"i18n-text/no-en": "off",
14+
"sort-imports": "off",
1315
"no-unused-vars": "off",
1416
"@typescript-eslint/no-unused-vars": "error",
1517
"@typescript-eslint/explicit-member-accessibility": [

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ jobs:
4141

4242
- uses: ./
4343
with:
44-
angular-version: 12.2.x
44+
angular-version: 13.0.x
4545
root-path: ./e2e

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx commitlint --edit "$1"

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn lint-staged && yarn lint

.husky/pre-push

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
5+
branch="$(git rev-parse --abbrev-ref HEAD)"
6+
remote_branch="$(git for-each-ref --format='%(upstream:short)' "$(git symbolic-ref -q HEAD)")"
7+
8+
9+
if [ "$branch" = "main" ] || [ "$remote_branch" = "origin/main" ]; then
10+
echo "You can't commit directly to main branch"
11+
exit 1
12+
else
13+
yarn test
14+
fi

.lintstagedrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"src/**/*.+(js|json|ts|tsx)": [
3+
"eslint"
4+
],
5+
"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}": [
6+
"prettier --write"
7+
]
8+
}

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
- 12.0.x
5757
- 12.1.x
5858
- 12.2.x
59+
- 13.0.x
5960

6061
steps:
6162
- uses: actions/checkout@v2
@@ -99,6 +100,7 @@ At the moment this actions supports a limited set of Angular versions listed bel
99100
- 12.0.x
100101
- 12.1.x
101102
- 12.2.x
103+
- 13.0.x
102104

103105
### Managed packages
104106

__tests__/get-angular-version.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe(getAngularVersions.name, () => {
2121
test('throws error when the version is not supported', () => {
2222
try {
2323
getAngularVersions('3.0.x');
24-
} catch (error) {
24+
} catch (error: any) {
2525
expect(error.message).toBe('Angular version 3.0.x is not supported');
2626
}
2727
});

0 commit comments

Comments
 (0)