Skip to content

Commit

Permalink
feat: update Angular to 12
Browse files Browse the repository at this point in the history
  • Loading branch information
v.potekhin committed Jul 13, 2023
1 parent dae8c9d commit 77231d4
Show file tree
Hide file tree
Showing 35 changed files with 33,755 additions and 41,157 deletions.
40 changes: 40 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
* @type {import('eslint').Linter.Config}
*/
module.exports = {
root: true,
extends: [
'@tinkoff/eslint-config-angular',
'@tinkoff/eslint-config-angular/html',
'@tinkoff/eslint-config-angular/rxjs',
'@tinkoff/eslint-config-angular/imports',
'@tinkoff/eslint-config-angular/promise',
'@tinkoff/eslint-config-angular/file-progress',
'@tinkoff/eslint-config-angular/line-statements',
'@tinkoff/eslint-config-angular/member-ordering',
'@tinkoff/eslint-config-angular/decorator-position',
'@tinkoff/eslint-config-angular/experimental',
'@tinkoff/eslint-config-angular/function-return-type',
],
rules: {
'@typescript-eslint/prefer-nullish-coalescing': 'off',
'@typescript-eslint/member-ordering': 'off',
},
ignorePatterns: [
'projects/**/test.ts',
'*.json',
'*.less',
'*.md',
'*.js',
'*.spec.ts',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
project: [require.resolve('./tsconfig.eslint.json')],
},
env: {
jest: true,
},
};
23 changes: 23 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## PR Checklist

## PR Type

What kind of change does this PR introduce?

- [ ] Bugfix
- [ ] Feature
- [ ] Refactoring
- [ ] Code style update
- [ ] Build or CI related changes
- [ ] Documentation content changes

## What is the current behavior?

Closes # <!-- link to a relevant issue. -->

## What is the new behavior?

## Does this PR introduce a breaking change?

- [ ] Yes
- [ ] No
56 changes: 56 additions & 0 deletions .github/actions/nodejs/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Action for Node.js
description: Node.js setup cache

inputs:
node-version:
description: Node.js version
required: false
default: 16.20

runs:
using: composite
steps:
- name: Use Node.js ${{ inputs.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node-version }}
registry-url: 'https://registry.npmjs.org'

- name: Restore node_modules from cache
id: cache-node-modules
uses: actions/cache@v3
with:
path: |
**/node_modules
!**/node_modules/.cache
key: modules-cache__nodejs-${{ inputs.node-version }}__${{ hashfiles('**/package-lock.json') }}

- name: Restore from cache of builds
id: build-cache
if: steps.cache-node-modules.outputs.cache-hit == 'true'
uses: actions/cache@v3
with:
path: |
**/node_modules/.cache
key: builds-cache-hash__${{ hashFiles('**/package-lock.json') }}-${{ github.ref }}
restore-keys: builds-cache__nodejs-${{ inputs.node-version }}__${{ hashFiles('**/package-lock.json') }}

- name: Restore from global NPM cache
if: steps.cache-node-modules.outputs.cache-hit != 'true'
uses: actions/cache@v3
with:
path: ~/.npm
key: npm-cache__nodejs-${{ inputs.node-version }}__${{ hashFiles('**/package-lock.json') }}
restore-keys: npm-cache-hash__

- run: npm ci
env:
CYPRESS_CACHE_FOLDER: ./node_modules/cache-cypress
if: steps.cache-node-modules.outputs.cache-hit != 'true'
shell: bash

- name: environment
shell: bash
run: |
node -v
npm -v
22 changes: 22 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build
on:
pull_request:
push:
branches: [master]

jobs:
build-packages:
name: Packages
if: ${{ !contains(github.head_ref, 'release/') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js and Cache
uses: ./.github/actions/nodejs

- name: Build packages
run: npm run build

concurrency:
group: build-${{ github.head_ref }}
cancel-in-progress: true
20 changes: 20 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Lint
on: [pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js and Cache
uses: ./.github/actions/nodejs

- name: Lint check
run: |
npm run typecheck
npm run format -- --check
npm run lint
concurrency:
group: lint-${{ github.head_ref }}
cancel-in-progress: true
23 changes: 23 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Tests

on:
pull_request:
push:
branches:
- master

jobs:
tests:
if: ${{ !contains(github.head_ref, 'release/') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js and Cache
uses: ./.github/actions/nodejs

- name: Run tests
run: npm run test

concurrency:
group: test-${{ github.head_ref }}
cancel-in-progress: true
6 changes: 0 additions & 6 deletions .travis.yml

This file was deleted.

26 changes: 16 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
# Changelog

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.
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.

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


### Bug Fixes

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

# 1.1.0 (2019-03-13)


### Features

* **travis:** add build step ([c40aaf9](https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor/commit/c40aaf9))
* **travis:** add travis integration ([a72102e](https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor/commit/a72102e))
* **travis:** link MAINTAIN.md inside README.md and add comments to scripts ([74cc813](https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor/commit/74cc813))
* **travis:** remove old node builds ([367358b](https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor/commit/367358b))
* **travis:** update license ([b9ea68b](https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor/commit/b9ea68b))
* **travis:** use spaces not tabs ([d6a9e30](https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor/commit/d6a9e30))
- **travis:** add build step
([c40aaf9](https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor/commit/c40aaf9))
- **travis:** add travis integration
([a72102e](https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor/commit/a72102e))
- **travis:** link MAINTAIN.md inside README.md and add comments to scripts
([74cc813](https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor/commit/74cc813))
- **travis:** remove old node builds
([367358b](https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor/commit/367358b))
- **travis:** update license
([b9ea68b](https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor/commit/b9ea68b))
- **travis:** use spaces not tabs
([d6a9e30](https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor/commit/d6a9e30))
81 changes: 33 additions & 48 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,75 +2,60 @@

## Our Pledge

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

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:
Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take
appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits,
issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any
contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

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

## Enforcement

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

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent
repercussions as determined by other members of the project's leadership.

## Attribution

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

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

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq
1 change: 1 addition & 0 deletions MAINTAIN.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ to push new tag to the repository and then do
cd ./dist/angular-contenteditable-accessor
npm publish --access=public
```

to publish new version to `npm`.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Tinkoff ControlValueAccessor for contenteditable elements

[![Build](https://travis-ci.org/TinkoffCreditSystems/angular-contenteditable-accessor.svg?branch=master)](https://travis-ci.org/TinkoffCreditSystems/angular-contenteditable-accessor)
[![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)
[![npm version](https://img.shields.io/npm/v/@tinkoff/angular-contenteditable-accessor.svg)](https://www.npmjs.com/package/@tinkoff/angular-contenteditable-accessor)

> 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_.
> 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_.
## Install

Expand Down
Loading

0 comments on commit 77231d4

Please sign in to comment.