Skip to content

Commit

Permalink
feat!: update to Angular 15 (#184)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Templates now use Injector from the outlet as a fallback
  • Loading branch information
vladimirpotekhin committed Dec 6, 2023
1 parent 8dabbe9 commit 3cad831
Show file tree
Hide file tree
Showing 56 changed files with 27,153 additions and 23,485 deletions.
26 changes: 26 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* @type {import('eslint').Linter.Config}
*/
module.exports = {
root: true,
extends: ['plugin:@taiga-ui/experience/all'],
overrides: [
{
files: ['*.ts'],
rules: {
'@typescript-eslint/quotes': ['error', 'single'],
'@taiga-ui/experience/prefer-inject-decorator': 'off',
'@taiga-ui/experience/no-typeof': 'off',
'@typescript-eslint/consistent-type-assertions': 'off',
'no-restricted-syntax': 'off', // TODO
'unicorn/filename-case': 'off',
},
},
{
files: ['*'],
rules: {
'no-irregular-whitespace': 'off',
},
},
],
};
21 changes: 21 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
codecov:
branch: main
notify:
require_ci_to_pass: no

coverage:
# This value is used to customize the visible color range in Codecov.
# The first number represents the red, and the second represents green.
# You can change the range of colors by adjusting this configuration.
range: 50..100 # by default 70..100
round: down
precision: 2

# Disable codecov/patch check
status:
project:
default:
enabled: false
patch:
default:
enabled: false
45 changes: 22 additions & 23 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,43 @@ import {Config} from 'jest';
import {resolve} from 'path';
import {pathsToModuleNameMapper} from 'ts-jest';

process.env.TZ = `Europe/Moscow`;
process.env.FORCE_COLOR = `true`;
process.env.TS_JEST_DISABLE_VER_CHECKER = `true`;
process.env.TZ = 'Europe/Moscow';
process.env.FORCE_COLOR = 'true';
process.env.TS_JEST_DISABLE_VER_CHECKER = 'true';

const {compilerOptions} = require(resolve(__dirname, `tsconfig.json`));
const {compilerOptions} = require(resolve(__dirname, 'tsconfig.json'));

const config: Config = {
rootDir: __dirname,
preset: `jest-preset-angular`,
testEnvironment: `jsdom`,
preset: 'jest-preset-angular',
testEnvironment: 'jsdom',
globals: {
'ts-jest': {
tsconfig: resolve(__dirname, `tsconfig.spec.json`),
tsconfig: resolve(__dirname, 'tsconfig.spec.json'),
isolatedModules: true,
},
},
extensionsToTreatAsEsm: [`.ts`],
setupFilesAfterEnv: [`<rootDir>/setup-jest.ts`],
transform: {'^.+\\.(ts|js|mjs|html|svg)$': `jest-preset-angular`},
testMatch: [`<rootDir>/projects/**/*.spec.ts`],
testPathIgnorePatterns: [`/node_modules/`, `/schematics/`],
coverageDirectory: `<rootDir>/coverage`,
extensionsToTreatAsEsm: ['.ts'],
setupFilesAfterEnv: ['<rootDir>/setup-jest.ts'],
transform: {'^.+\\.(ts|js|mjs|html|svg)$': 'jest-preset-angular'},
testMatch: ['<rootDir>/projects/**/*.spec.ts'],
testPathIgnorePatterns: ['/node_modules/', '/schematics/'],
coverageDirectory: '<rootDir>/coverage',
collectCoverageFrom: [
`**/ng-polymorpheus/**/*.ts`,
`!**/ng-polymorpheus/**/*.spec.ts`,
`!**/jest.config.ts`,
'**/ng-polymorpheus/**/*.ts',
'!**/ng-polymorpheus/**/*.spec.ts',
'!**/jest.config.ts',
],
coveragePathIgnorePatterns: [`node_modules`, `schematics`, `.spec.ts`],
coveragePathIgnorePatterns: ['node_modules', 'schematics', '.spec.ts'],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
prefix: `<rootDir>/${compilerOptions.baseUrl}/`
.replace(/\.\//g, `/`)
.replace(/\/\/+/g, `/`),
.replace(/\.\//g, '/')
.replace(/\/\/+/g, '/'),
}),
modulePathIgnorePatterns: [`dist/`],
cacheDirectory: `<rootDir>/node_modules/.cache/jest`,
reporters: [`default`],
modulePathIgnorePatterns: ['dist/'],
cacheDirectory: '<rootDir>/node_modules/.cache/jest',
reporters: ['default'],
collectCoverage: true,
verbose: true,
};

export default config;
Loading

0 comments on commit 3cad831

Please sign in to comment.