Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update to angular13 + update all other deps #68

Merged
merged 1 commit into from
Feb 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"project": [
"tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "app",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
]
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {}
}
]
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.angular/cache
node_modules
npm-debug.log
.idea
Expand Down
83 changes: 46 additions & 37 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,22 @@
"styles": [
"src/styles.css"
],
"scripts": []
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
Expand All @@ -38,25 +50,27 @@
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
}
}
},
"development": {}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "test-count-up:build"
},
"options": {},
"configurations": {
"production": {
"browserTarget": "test-count-up:build:production"
},
"development": {
"browserTarget": "test-count-up:build:development"
}
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
Expand All @@ -82,14 +96,11 @@
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
}
}
Expand All @@ -102,23 +113,17 @@
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "test-count-up:serve"
"protractorConfig": "e2e/protractor.conf.js"
},
"configurations": {
"production": {
"devServerTarget": "test-count-up:serve:production"
},
"development": {
"devServerTarget": "test-count-up:serve:development"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
}
},
"defaultConfiguration": "development"
}
}
},
Expand All @@ -129,11 +134,18 @@
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "projects/count-up/tsconfig.lib.json",
"project": "projects/count-up/ng-package.json"
}
},
"configurations": {
"production": {
"tsConfig": "projects/count-up/tsconfig.lib.prod.json"
},
"development": {}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
Expand All @@ -144,14 +156,11 @@
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": [
"projects/count-up/tsconfig.lib.json",
"projects/count-up/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
"lintFilePatterns": [
"projects/count-up/**/*.ts",
"projects/count-up/**/*.html"
]
}
}
Expand Down
18 changes: 13 additions & 5 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
// https://github.com/thymikee/jest-preset-angular#brief-explanation-of-config
const esModules = ["ngx-countup", ".*\\.mjs"].join("|");

module.exports = {
preset: 'jest-preset-angular',
roots: ['src'],
setupFilesAfterEnv: ['<rootDir>/src/setup-jest.ts'],
preset: "jest-preset-angular",
roots: ["src"],
setupFilesAfterEnv: ["<rootDir>/src/setup-jest.ts"],
globalSetup: "jest-preset-angular/global-setup",
transform: {
'^.+\\.(js|ts|tsx)$': 'ts-jest'
"^.+\\.(ts|js|html)$": "jest-preset-angular",
},
transformIgnorePatterns: [`/node_modules/(?!${esModules})`],
globals: {
"ts-jest": {
tsconfig: "<rootDir>/src/tsconfig.spec.json",
},
},
transformIgnorePatterns: ['node_modules/(?!countup.js)']
};
70 changes: 37 additions & 33 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build --prod",
"build": "ng build --configuration production",
"build:countup": "ng-packagr -p projects/count-up/ng-package.json",
"pack:countup": "cd dist/count-up && yarn pack && cd ../..",
"package:countup": "yarn build:countup && yarn pack:countup",
Expand All @@ -19,40 +19,44 @@
},
"private": true,
"dependencies": {
"@angular/cdk": "~8.0.0",
"@angular/common": "~8.2.14",
"@angular/compiler": "~8.2.14",
"@angular/core": "~8.2.14",
"@angular/forms": "~8.2.14",
"@angular/platform-browser": "~8.2.14",
"@angular/platform-browser-dynamic": "~8.2.14",
"@angular/router": "~8.2.14",
"@briebug/jest-schematic": "^1.6.0",
"countup.js": "^2.0.4",
"@angular/common": "~13.2.2",
"@angular/compiler": "~13.2.2",
"@angular/core": "~13.2.2",
"@angular/forms": "~13.2.2",
"@angular/platform-browser": "~13.2.2",
"@angular/platform-browser-dynamic": "~13.2.2",
"@angular/router": "~13.2.2",
"@briebug/jest-schematic": "^4.0.0",
"countup.js": "^2.0.8",
"ngx-countup": "^7.3.0",
"rxjs": "~6.5.2",
"zone.js": "~0.9.1"
"rxjs": "~7.5.4",
"tslib": "^2.0.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.803.9",
"@angular-devkit/build-ng-packagr": "~0.803.21",
"@angular/cli": "~8.3.9",
"@angular/compiler-cli": "~8.2.9",
"@angular/language-service": "~8.2.9",
"@types/jasmine": "~3.3.13",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~12.0.4",
"codelyzer": "~5.0.1",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"jest": "^24.7.1",
"jest-preset-angular": "7.1.1",
"ng-packagr": "^5.4.0",
"protractor": "~5.4.0",
"ts-node": "~8.2.0",
"tsickle": ">=0.29.0",
"tslib": "^1.9.0",
"tslint": "~5.17.0",
"typescript": "~3.5.3"
"@angular-devkit/build-angular": "~13.2.3",
"@angular-eslint/builder": "13.0.1",
"@angular-eslint/eslint-plugin": "13.0.1",
"@angular-eslint/eslint-plugin-template": "13.0.1",
"@angular-eslint/schematics": "13.0.1",
"@angular-eslint/template-parser": "13.0.1",
"@angular/cli": "~13.2.3",
"@angular/compiler-cli": "~13.2.2",
"@angular/language-service": "~13.2.2",
"@types/jasmine": "~3.10.3",
"@types/jasminewd2": "~2.0.10",
"@types/node": "^17.0.17",
"@typescript-eslint/eslint-plugin": "5.11.0",
"@typescript-eslint/parser": "5.11.0",
"eslint": "^8.2.0",
"jasmine-core": "~4.0.0",
"jasmine-spec-reporter": "~7.0.0",
"jest": "^27.5.1",
"jest-preset-angular": "11.1.0",
"ng-packagr": "^13.2.1",
"protractor": "~7.0.0",
"ts-node": "~10.5.0",
"tslint": "~6.1.0",
"typescript": "~4.5.5"
}
}
44 changes: 44 additions & 0 deletions projects/count-up/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"extends": "../../.eslintrc.json",
"ignorePatterns": [
"!**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"project": [
"projects/count-up/tsconfig.lib.json",
"projects/count-up/tsconfig.spec.json"
],
"createDefaultProgram": true
},
"rules": {
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "countUp",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "countUp",
"style": "kebab-case"
}
]
}
},
{
"files": [
"*.html"
],
"rules": {}
}
]
}
2 changes: 1 addition & 1 deletion projects/count-up/ng-package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/count-up",
"whitelistedNonPeerDependencies": [
"allowedNonPeerDependencies": [
"countup.js"
],
"lib": {
Expand Down
7 changes: 4 additions & 3 deletions projects/count-up/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
},
"homepage": "http://inorganik.github.io/countUp.js",
"peerDependencies": {
"@angular/common": ">=7.0.0",
"@angular/core": ">=7.0.0"
"@angular/common": ">=13.0.0",
"@angular/core": ">=13.0.0"
},
"dependencies": {
"countup.js": "^2.0.5"
"countup.js": "^2.0.8",
"tslib": "^2.0.0"
},
"devDependencies": {}
}
1 change: 1 addition & 0 deletions projects/count-up/src/lib/count-up.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export class CountUpDirective implements OnChanges {

@Input() options: CountUpOptions = {};
@Input() reanimateOnClick = true;
// eslint-disable-next-line @angular-eslint/no-output-native
@Output() complete = new EventEmitter<void>();

// Re-animate if preference is set.
Expand Down
Loading