Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

Commit

Permalink
feat: compatibility update for angular v8
Browse files Browse the repository at this point in the history
  • Loading branch information
Pascal Iske committed Jun 14, 2019
1 parent faad95c commit 6c22381
Show file tree
Hide file tree
Showing 13 changed files with 879 additions and 745 deletions.
3 changes: 3 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
> 0.5%
last 2 versions
not dead
4 changes: 2 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"tsConfig": "tsconfig.app.json",
"es5BrowserSupport": true,
"assets": [
{
Expand Down Expand Up @@ -87,7 +87,7 @@
"options": {
"fix": true,
"tsConfig": [
"src/tsconfig.app.json"
"tsconfig.app.json"
],
"exclude": [
"**/node_modules/**"
Expand Down
37 changes: 18 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"private": true,
"scripts": {
"ng": "ng",
"postinstall": "ts-node storybook-patch.ts",
"postinstall": "node storybook-patch.js",
"postbuild": "yarn run build-scss && yarn run copy-metadata",
"start": "ng serve form-elements-demo",
"build": "ng build --prod",
Expand All @@ -40,15 +40,14 @@
]
},
"dependencies": {
"@angular/animations": "^7.2.14",
"@angular/common": "^7.2.14",
"@angular/compiler": "^7.2.14",
"@angular/core": "^7.2.14",
"@angular/forms": "^7.2.14",
"@angular/http": "^7.2.14",
"@angular/platform-browser": "^7.2.14",
"@angular/platform-browser-dynamic": "^7.2.14",
"@angular/router": "^7.2.14",
"@angular/animations": "^8.0.1",
"@angular/common": "^8.0.1",
"@angular/compiler": "^8.0.1",
"@angular/core": "^8.0.1",
"@angular/forms": "^8.0.1",
"@angular/platform-browser": "^8.0.1",
"@angular/platform-browser-dynamic": "^8.0.1",
"@angular/router": "^8.0.1",
"@fortawesome/angular-fontawesome": "^0.4.0",
"@fortawesome/fontawesome-svg-core": "^1.2.19",
"@fortawesome/free-brands-svg-icons": "^5.9.0",
Expand All @@ -57,14 +56,14 @@
"@pascaliske/html-helpers": "^1.5.1",
"core-js": "^2.6.5",
"rxjs": "^6.5.2",
"zone.js": "^0.8.29"
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.13.8",
"@angular-devkit/build-ng-packagr": "~0.13.8",
"@angular/cli": "^7.3.8",
"@angular/compiler-cli": "^7.2.14",
"@angular/language-service": "^8.0.0",
"@angular-devkit/build-angular": "~0.800.0",
"@angular-devkit/build-ng-packagr": "~0.800.0",
"@angular/cli": "^8.0.3",
"@angular/compiler-cli": "^8.0.1",
"@angular/language-service": "^8.0.1",
"@babel/core": "^7.4.5",
"@commitlint/cli": "^8.0.0",
"@commitlint/config-conventional": "^8.0.0",
Expand All @@ -82,12 +81,12 @@
"@types/webpack-env": "^1.13.9",
"babel-loader": "^8.0.6",
"chalk": "^2.4.2",
"codelyzer": "~5.1.0",
"codelyzer": "^5.0.1",
"flatpickr": "4.6.1",
"fuzzysearch": "^1.0.3",
"husky": "^2.4.1",
"lint-staged": "^8.2.0",
"ng-packagr": "^5.3.0",
"ng-packagr": "^5.1.0",
"prettier": "^1.17.0",
"scss-bundle": "^2.5.1",
"standard-changelog": "^2.0.11",
Expand All @@ -97,6 +96,6 @@
"tslib": "^1.10.0",
"tslint": "~5.17.0",
"tslint-config-prettier": "^1.18.0",
"typescript": "~3.2.2"
"typescript": "~3.4.5"
}
}
8 changes: 4 additions & 4 deletions projects/form-elements/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
"access": "public"
},
"peerDependencies": {
"@angular/common": "^6.0.0 || ^7.0.0",
"@angular/core": "^6.0.0 || ^7.0.0",
"@angular/forms": "^6.0.0 || ^7.0.0",
"@angular/http": "^6.0.0 || ^7.0.0",
"@angular/common": "^7.0.0 || ^8.0.0",
"@angular/core": "^7.0.0 || ^8.0.0",
"@angular/forms": "^7.0.0 || ^8.0.0",
"@angular/http": "^7.0.0 || ^8.0.0",
"@pascaliske/html-helpers": "^1.2.1",
"flatpickr": "^4.6.1",
"fuzzysearch": "^1.0.3",
Expand Down
2 changes: 1 addition & 1 deletion projects/form-elements/src/lib/f-date/f-date.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { ModuleOptions, OPTIONS } from '../options'
export class FDateComponent extends FInputComponent implements AfterViewInit, OnDestroy {
public static readonly cmpName: string = 'FDateComponent'

@ViewChild('inputRef')
@ViewChild('inputRef', { static: true })
public inputRef: ElementRef

private instance: flatpickr.Instance
Expand Down
4 changes: 2 additions & 2 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<cmp-f-form [fg]="fg" (submit)="submit($event)">
<form [formGroup]="fg" (submit)="submit($event)">
<cmp-f-row [layout]="'1-1'">
<cmp-f-column>
<cmp-f-date [fc]="fc" [label]="'Date Input'" [name]="'date'"></cmp-f-date>
Expand Down Expand Up @@ -47,4 +47,4 @@
<cmp-f-checkbox [label]="'Checkbox Label'" [name]="'checkbox'"></cmp-f-checkbox>
</cmp-f-column>
</cmp-f-row>
</cmp-f-form>
</form>
9 changes: 0 additions & 9 deletions src/browserslist

This file was deleted.

17 changes: 0 additions & 17 deletions src/tslint.json

This file was deleted.

12 changes: 6 additions & 6 deletions storybook-patch.ts → storybook-patch.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#!/usr/bin/env ts-node

import { readFile, writeFile } from 'fs'
import { join, dirname } from 'path'
import { promisify } from 'util'
import chalk from 'chalk'
#!/usr/bin/env node
const { readFile, writeFile } = require('fs')
const { join, dirname } = require('path')
const { promisify } = require('util')
const chalk = require('chalk')

/* tslint:disable:max-line-length */
const SEARCH = `
Expand Down Expand Up @@ -34,6 +33,7 @@ async function execute() {
if (!contents.includes(SEARCH)) {
console.warn(
chalk.yellow(
// tslint:disable-next-line
'@storybook/angular was not patched as their source code changed or the patch is already applied.',
),
)
Expand Down
3 changes: 1 addition & 2 deletions src/tsconfig.app.json → tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"extends": "../tsconfig.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"module": "es2015",
"types": []
},
"exclude": [
Expand Down
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"downlevelIteration": true,
"module": "esnext",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
Expand All @@ -11,7 +13,7 @@
"esModuleInterop": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"target": "es5",
"target": "es2015",
"typeRoots": [
"node_modules/@types",
"typings.d.ts"
Expand Down
8 changes: 4 additions & 4 deletions tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,12 @@
"check-type"
],
"no-output-on-prefix": true,
"use-input-property-decorator": true,
"use-output-property-decorator": true,
"use-host-property-decorator": true,
"no-inputs-metadata-property": true,
"no-outputs-metadata-property": true,
"no-host-metadata-property": true,
"no-input-rename": true,
"no-output-rename": true,
"use-life-cycle-interface": true,
"use-lifecycle-interface": true,
"use-pipe-transform-interface": true,
"component-class-suffix": true,
"directive-class-suffix": true
Expand Down
Loading

0 comments on commit 6c22381

Please sign in to comment.