Skip to content

Commit 3ce2a7c

Browse files
author
v.potekhin
committed
feat: update Angular to 12
1 parent dae8c9d commit 3ce2a7c

35 files changed

+33756
-41158
lines changed

.eslintrc.js

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/**
2+
* @type {import('eslint').Linter.Config}
3+
*/
4+
module.exports = {
5+
root: true,
6+
extends: [
7+
'@tinkoff/eslint-config-angular',
8+
'@tinkoff/eslint-config-angular/html',
9+
'@tinkoff/eslint-config-angular/rxjs',
10+
'@tinkoff/eslint-config-angular/imports',
11+
'@tinkoff/eslint-config-angular/promise',
12+
'@tinkoff/eslint-config-angular/file-progress',
13+
'@tinkoff/eslint-config-angular/line-statements',
14+
'@tinkoff/eslint-config-angular/member-ordering',
15+
'@tinkoff/eslint-config-angular/decorator-position',
16+
'@tinkoff/eslint-config-angular/experimental',
17+
'@tinkoff/eslint-config-angular/function-return-type',
18+
],
19+
rules: {
20+
'@typescript-eslint/prefer-nullish-coalescing': 'off',
21+
'@typescript-eslint/member-ordering': 'off',
22+
},
23+
ignorePatterns: [
24+
'projects/**/test.ts',
25+
'*.json',
26+
'*.less',
27+
'*.md',
28+
'*.js',
29+
'*.spec.ts',
30+
],
31+
parser: '@typescript-eslint/parser',
32+
parserOptions: {
33+
ecmaVersion: 2020,
34+
sourceType: 'module',
35+
project: [require.resolve('./tsconfig.eslint.json')],
36+
},
37+
env: {
38+
jest: true,
39+
},
40+
};

.github/PULL_REQUEST_TEMPLATE.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## PR Checklist
2+
3+
## PR Type
4+
5+
What kind of change does this PR introduce?
6+
7+
- [ ] Bugfix
8+
- [ ] Feature
9+
- [ ] Refactoring
10+
- [ ] Code style update
11+
- [ ] Build or CI related changes
12+
- [ ] Documentation content changes
13+
14+
## What is the current behavior?
15+
16+
Closes # <!-- link to a relevant issue. -->
17+
18+
## What is the new behavior?
19+
20+
## Does this PR introduce a breaking change?
21+
22+
- [ ] Yes
23+
- [ ] No

.github/actions/nodejs/action.yml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Action for Node.js
2+
description: Node.js setup cache
3+
4+
inputs:
5+
node-version:
6+
description: Node.js version
7+
required: false
8+
default: 16.20
9+
10+
runs:
11+
using: composite
12+
steps:
13+
- name: Use Node.js ${{ inputs.node-version }}
14+
uses: actions/setup-node@v3
15+
with:
16+
node-version: ${{ inputs.node-version }}
17+
registry-url: 'https://registry.npmjs.org'
18+
19+
- name: Restore node_modules from cache
20+
id: cache-node-modules
21+
uses: actions/cache@v3
22+
with:
23+
path: |
24+
**/node_modules
25+
!**/node_modules/.cache
26+
key: modules-cache__nodejs-${{ inputs.node-version }}__${{ hashfiles('**/package-lock.json') }}
27+
28+
- name: Restore from cache of builds
29+
id: build-cache
30+
if: steps.cache-node-modules.outputs.cache-hit == 'true'
31+
uses: actions/cache@v3
32+
with:
33+
path: |
34+
**/node_modules/.cache
35+
key: builds-cache-hash__${{ hashFiles('**/package-lock.json') }}-${{ github.ref }}
36+
restore-keys: builds-cache__nodejs-${{ inputs.node-version }}__${{ hashFiles('**/package-lock.json') }}
37+
38+
- name: Restore from global NPM cache
39+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
40+
uses: actions/cache@v3
41+
with:
42+
path: ~/.npm
43+
key: npm-cache__nodejs-${{ inputs.node-version }}__${{ hashFiles('**/package-lock.json') }}
44+
restore-keys: npm-cache-hash__
45+
46+
- run: npm ci
47+
env:
48+
CYPRESS_CACHE_FOLDER: ./node_modules/cache-cypress
49+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
50+
shell: bash
51+
52+
- name: environment
53+
shell: bash
54+
run: |
55+
node -v
56+
npm -v

.github/workflows/build.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Build
2+
on:
3+
pull_request:
4+
push:
5+
branches: [master]
6+
7+
jobs:
8+
build-packages:
9+
name: Packages
10+
if: ${{ !contains(github.head_ref, 'release/') }}
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Setup Node.js and Cache
15+
uses: ./.github/actions/nodejs
16+
17+
- name: Build packages
18+
run: npm run build
19+
20+
concurrency:
21+
group: build-${{ github.head_ref }}
22+
cancel-in-progress: true

.github/workflows/lint.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Lint
2+
on: [pull_request]
3+
4+
jobs:
5+
lint:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v3
9+
- name: Setup Node.js and Cache
10+
uses: ./.github/actions/nodejs
11+
12+
- name: Lint check
13+
run: |
14+
npm run typecheck
15+
npm run format -- --check
16+
npm run lint
17+
18+
concurrency:
19+
group: lint-${{ github.head_ref }}
20+
cancel-in-progress: true

.github/workflows/test.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Tests
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
tests:
11+
if: ${{ !contains(github.head_ref, 'release/') }}
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Setup Node.js and Cache
16+
uses: ./.github/actions/nodejs
17+
18+
- name: Run tests
19+
run: npm run test
20+
21+
concurrency:
22+
group: test-${{ github.head_ref }}
23+
cancel-in-progress: true

.travis.yml

-6
This file was deleted.

CHANGELOG.md

+16-10
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,28 @@
11
# Changelog
22

3-
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
3+
All notable changes to this project will be documented in this file. See
4+
[standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
45

56
## [1.2.0](https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor/compare/v1.1.0...v1.2.0) (2021-07-27)
67

7-
88
### Bug Fixes
99

10-
* **directive:** fix for non-string values ([38ac555](https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor/commit/38ac5555dbadbb1d432840301b7593a72f2c4f52))
10+
- **directive:** fix for non-string values
11+
([38ac555](https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor/commit/38ac5555dbadbb1d432840301b7593a72f2c4f52))
1112

1213
# 1.1.0 (2019-03-13)
1314

14-
1515
### Features
1616

17-
* **travis:** add build step ([c40aaf9](https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor/commit/c40aaf9))
18-
* **travis:** add travis integration ([a72102e](https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor/commit/a72102e))
19-
* **travis:** link MAINTAIN.md inside README.md and add comments to scripts ([74cc813](https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor/commit/74cc813))
20-
* **travis:** remove old node builds ([367358b](https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor/commit/367358b))
21-
* **travis:** update license ([b9ea68b](https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor/commit/b9ea68b))
22-
* **travis:** use spaces not tabs ([d6a9e30](https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor/commit/d6a9e30))
17+
- **travis:** add build step
18+
([c40aaf9](https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor/commit/c40aaf9))
19+
- **travis:** add travis integration
20+
([a72102e](https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor/commit/a72102e))
21+
- **travis:** link MAINTAIN.md inside README.md and add comments to scripts
22+
([74cc813](https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor/commit/74cc813))
23+
- **travis:** remove old node builds
24+
([367358b](https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor/commit/367358b))
25+
- **travis:** update license
26+
([b9ea68b](https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor/commit/b9ea68b))
27+
- **travis:** use spaces not tabs
28+
([d6a9e30](https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor/commit/d6a9e30))

CODE_OF_CONDUCT.md

+33-48
Original file line numberDiff line numberDiff line change
@@ -2,75 +2,60 @@
22

33
## Our Pledge
44

5-
In the interest of fostering an open and welcoming environment, we as
6-
contributors and maintainers pledge to making participation in our project and
7-
our community a harassment-free experience for everyone, regardless of age, body
8-
size, disability, ethnicity, sex characteristics, gender identity and expression,
9-
level of experience, education, socio-economic status, nationality, personal
10-
appearance, race, religion, or sexual identity and orientation.
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making
6+
participation in our project and our community a harassment-free experience for everyone, regardless of age, body size,
7+
disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education,
8+
socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
119

1210
## Our Standards
1311

14-
Examples of behavior that contributes to creating a positive environment
15-
include:
12+
Examples of behavior that contributes to creating a positive environment include:
1613

17-
* Using welcoming and inclusive language
18-
* Being respectful of differing viewpoints and experiences
19-
* Gracefully accepting constructive criticism
20-
* Focusing on what is best for the community
21-
* Showing empathy towards other community members
14+
- Using welcoming and inclusive language
15+
- Being respectful of differing viewpoints and experiences
16+
- Gracefully accepting constructive criticism
17+
- Focusing on what is best for the community
18+
- Showing empathy towards other community members
2219

2320
Examples of unacceptable behavior by participants include:
2421

25-
* The use of sexualized language or imagery and unwelcome sexual attention or
26-
advances
27-
* Trolling, insulting/derogatory comments, and personal or political attacks
28-
* Public or private harassment
29-
* Publishing others' private information, such as a physical or electronic
30-
address, without explicit permission
31-
* Other conduct which could reasonably be considered inappropriate in a
32-
professional setting
22+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
23+
- Trolling, insulting/derogatory comments, and personal or political attacks
24+
- Public or private harassment
25+
- Publishing others' private information, such as a physical or electronic address, without explicit permission
26+
- Other conduct which could reasonably be considered inappropriate in a professional setting
3327

3428
## Our Responsibilities
3529

36-
Project maintainers are responsible for clarifying the standards of acceptable
37-
behavior and are expected to take appropriate and fair corrective action in
38-
response to any instances of unacceptable behavior.
30+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take
31+
appropriate and fair corrective action in response to any instances of unacceptable behavior.
3932

40-
Project maintainers have the right and responsibility to remove, edit, or
41-
reject comments, commits, code, wiki edits, issues, and other contributions
42-
that are not aligned to this Code of Conduct, or to ban temporarily or
43-
permanently any contributor for other behaviors that they deem inappropriate,
44-
threatening, offensive, or harmful.
33+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits,
34+
issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any
35+
contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
4536

4637
## Scope
4738

48-
This Code of Conduct applies both within project spaces and in public spaces
49-
when an individual is representing the project or its community. Examples of
50-
representing a project or community include using an official project e-mail
51-
address, posting via an official social media account, or acting as an appointed
52-
representative at an online or offline event. Representation of a project may be
53-
further defined and clarified by project maintainers.
39+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the
40+
project or its community. Examples of representing a project or community include using an official project e-mail
41+
address, posting via an official social media account, or acting as an appointed representative at an online or offline
42+
event. Representation of a project may be further defined and clarified by project maintainers.
5443

5544
## Enforcement
5645

57-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58-
reported by contacting the project team at opensource@tinkoff.ru. All
59-
complaints will be reviewed and investigated and will result in a response that
60-
is deemed necessary and appropriate to the circumstances. The project team is
61-
obligated to maintain confidentiality with regard to the reporter of an incident.
62-
Further details of specific enforcement policies may be posted separately.
46+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at
47+
opensource@tinkoff.ru. All complaints will be reviewed and investigated and will result in a response that is deemed
48+
necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to
49+
the reporter of an incident. Further details of specific enforcement policies may be posted separately.
6350

64-
Project maintainers who do not follow or enforce the Code of Conduct in good
65-
faith may face temporary or permanent repercussions as determined by other
66-
members of the project's leadership.
51+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent
52+
repercussions as determined by other members of the project's leadership.
6753

6854
## Attribution
6955

70-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71-
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
56+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at
57+
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
7258

7359
[homepage]: https://www.contributor-covenant.org
7460

75-
For answers to common questions about this code of conduct, see
76-
https://www.contributor-covenant.org/faq
61+
For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq

MAINTAIN.md

+1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ to push new tag to the repository and then do
1818
cd ./dist/angular-contenteditable-accessor
1919
npm publish --access=public
2020
```
21+
2122
to publish new version to `npm`.

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Tinkoff ControlValueAccessor for contenteditable elements
2+
23
[![Build](https://travis-ci.org/TinkoffCreditSystems/angular-contenteditable-accessor.svg?branch=master)](https://travis-ci.org/TinkoffCreditSystems/angular-contenteditable-accessor)
34
[![Coverage Status](https://coveralls.io/repos/github/TinkoffCreditSystems/angular-contenteditable-accessor/badge.svg?branch=master)](https://coveralls.io/github/TinkoffCreditSystems/angular-contenteditable-accessor?branch=master)
45
[![npm version](https://img.shields.io/npm/v/@tinkoff/angular-contenteditable-accessor.svg)](https://www.npmjs.com/package/@tinkoff/angular-contenteditable-accessor)
56

6-
> This accessor allows you to use Angular forms with contenteditable elements with ease. It has zero dependencies, other than Angular itself as peer and works with Angular 4+ in all modern browsers, including _Internet Explorer 11_.
7+
> This accessor allows you to use Angular forms with contenteditable elements with ease. It has zero dependencies, other
8+
> than Angular itself as peer and works with Angular 4+ in all modern browsers, including _Internet Explorer 11_.
79
810
## Install
911

0 commit comments

Comments
 (0)