Skip to content

Commit b1b2396

Browse files
vlio20Vlad Ioffe
andauthored
upgrading to ng 13 (#565)
* upgrading to ng 13 * updating packages * more packages updates * pkg update * removing core-js * lock update * lock update * changing ts * ts update * fixng imports * fixing build * adding change log * rc1 * demo working with new stracture * moving tsconfig outside * fixing moment issue * fixing lint * trying to fix unit tests * another unit test fix * another unit test fix * fixing prod lib build * version bump * preps for 13.0.0 version * clearing readme file * collapsing moment * final version bump * changing releas process * trying increasing number of e2e runners Co-authored-by: Vlad Ioffe <[email protected]>
1 parent 94a2b3c commit b1b2396

File tree

145 files changed

+12337
-18259
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+12337
-18259
lines changed

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ jobs:
4343
run: npm run build:demo
4444

4545
- name: run build prod
46-
run: npm run build:prod
46+
run: npm run build:lib

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
.settings/
2020

2121
# misc
22+
/.angular/cache
2223
/.sass-cache
2324
/connect.lock
2425
/coverage/*

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
# [13.0.0] (2021-12-22)
5+
6+
### Improvements
7+
- Update to Angular 13 ([565](https://github.com/vlio20/angular-datepicker/pull/565)) closes [#564](https://github.com/vlio20/angular-datepicker/issues/564)
8+
49
<a name="12.0.4"></a>
510
# [12.0.4] (2021-11-04)
611

@@ -21,6 +26,9 @@ All notable changes to this project will be documented in this file.
2126
### Improvements
2227
- Update to Angular 11 ([7be883b](https://github.com/vlio20/angular-datepicker/commit/7be883b)) closes [#525](https://github.com/vlio20/angular-datepicker/issues/525)
2328

29+
### Breaking changes
30+
- Moved Moment to be a pear dependency
31+
2432
<a name="10.11.10"></a>
2533
# [10.0.1] (2020-11-10)
2634

ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Make sure to add **all the information needed to understand the bug** so that someone can help. If the info is missing we'll add the 'Needs more information' label and close the issue until there is enough information.
22

33
- [ ] Provide a **minimal code snippet**, please make sure it is well formatted.
4-
- [ ] Provide a **stackblitz** demo / [stackblitz](https://stackblitz.com/) example that reproduces the bug.
4+
- [ ] Provide a **stackblitz** demo / [stackblitz](https://stackblitz.com/edit/angular-srgmj3) example that reproduces the bug.
55
- [ ] Provide **screenshots** where appropriate
66
- [ ] What's the **version** of Angular you're using?
77
- [ ] Does this occur on specific browser?

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Date Picker
22
This is a configurable date-picker build for Angular applications.
3-
Supports latest (Angular 12) version. For older versions please checkout the CHANGELOG.md file.
3+
Supports latest (Angular 13) version. For older versions please checkout the CHANGELOG.md file.
44

55
[DEMO](https://vlio20.github.io/angular-datepicker/)
66

angular.json

Lines changed: 49 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": 1,
44
"newProjectRoot": "projects",
55
"projects": {
6-
"ng2-date-picker": {
6+
"ng2-date-picker-demo": {
77
"root": "",
88
"sourceRoot": "src",
99
"projectType": "application",
@@ -14,7 +14,7 @@
1414
"outputPath": "dist",
1515
"index": "src/index.html",
1616
"main": "src/main.ts",
17-
"tsConfig": "src/tsconfig.app.json",
17+
"tsConfig": "tsconfig.app.json",
1818
"polyfills": "src/polyfills.ts",
1919
"assets": [
2020
"src/assets",
@@ -59,18 +59,18 @@
5959
"serve": {
6060
"builder": "@angular-devkit/build-angular:dev-server",
6161
"options": {
62-
"browserTarget": "ng2-date-picker:build"
62+
"browserTarget": "ng2-date-picker-demo:build"
6363
},
6464
"configurations": {
6565
"production": {
66-
"browserTarget": "ng2-date-picker:build:production"
66+
"browserTarget": "ng2-date-picker-demo:build:production"
6767
}
6868
}
6969
},
7070
"extract-i18n": {
7171
"builder": "@angular-devkit/build-angular:extract-i18n",
7272
"options": {
73-
"browserTarget": "ng2-date-picker:build"
73+
"browserTarget": "ng2-date-picker-demo:build"
7474
}
7575
},
7676
"test": {
@@ -79,7 +79,7 @@
7979
"main": "src/test.ts",
8080
"karmaConfig": "./karma.conf.js",
8181
"polyfills": "src/polyfills.ts",
82-
"tsConfig": "src/tsconfig.spec.json",
82+
"tsConfig": "tsconfig.spec.json",
8383
"scripts": [],
8484
"styles": [
8585
"src/styles.less"
@@ -101,7 +101,7 @@
101101
}
102102
}
103103
},
104-
"ng2-date-picker-e2e": {
104+
"ng2-date-picker-demo-e2e": {
105105
"root": "",
106106
"sourceRoot": "e2e",
107107
"projectType": "application",
@@ -110,7 +110,7 @@
110110
"builder": "@angular-devkit/build-angular:protractor",
111111
"options": {
112112
"protractorConfig": "./protractor.conf.js",
113-
"devServerTarget": "ng2-date-picker:serve"
113+
"devServerTarget": "ng2-date-picker-demo:serve"
114114
}
115115
},
116116
"lint": {
@@ -123,9 +123,49 @@
123123
}
124124
}
125125
}
126+
},
127+
"ng2-date-picker": {
128+
"projectType": "library",
129+
"root": "projects/ng2-date-picker",
130+
"sourceRoot": "projects/ng2-date-picker/src",
131+
"prefix": "dp",
132+
"architect": {
133+
"build": {
134+
"builder": "@angular-devkit/build-angular:ng-packagr",
135+
"options": {
136+
"project": "projects/ng2-date-picker/ng-package.json"
137+
},
138+
"configurations": {
139+
"production": {
140+
"tsConfig": "projects/ng2-date-picker/tsconfig.lib.prod.json"
141+
},
142+
"development": {
143+
"tsConfig": "projects/ng2-date-picker/tsconfig.lib.json"
144+
}
145+
},
146+
"defaultConfiguration": "production"
147+
},
148+
"test": {
149+
"builder": "@angular-devkit/build-angular:karma",
150+
"options": {
151+
"main": "projects/ng2-date-picker/src/test.ts",
152+
"tsConfig": "projects/ng2-date-picker/tsconfig.spec.json",
153+
"karmaConfig": "projects/ng2-date-picker/karma.conf.js"
154+
}
155+
},
156+
"lint": {
157+
"builder": "@angular-eslint/builder:lint",
158+
"options": {
159+
"lintFilePatterns": [
160+
"projects/ng2-date-picker/**/*.ts",
161+
"projects/ng2-date-picker/**/*.html"
162+
]
163+
}
164+
}
165+
}
126166
}
127167
},
128-
"defaultProject": "ng2-date-picker",
168+
"defaultProject": "ng2-date-picker-demo",
129169
"schematics": {
130170
"@schematics/angular:component": {
131171
"prefix": "dp",

karma.conf.js

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Karma configuration file, see link for more information
2-
// https://karma-runner.github.io/0.13/config/configuration-file.html
2+
// https://karma-runner.github.io/1.0/config/configuration-file.html
33

44
module.exports = function (config) {
55
config.set({
@@ -9,40 +9,36 @@ module.exports = function (config) {
99
require('karma-jasmine'),
1010
require('karma-chrome-launcher'),
1111
require('karma-jasmine-html-reporter'),
12-
require('karma-coverage-istanbul-reporter'),
12+
require('karma-coverage'),
1313
require('@angular-devkit/build-angular/plugins/karma')
1414
],
15-
client:{
15+
client: {
16+
jasmine: {
17+
// you can add configuration options for Jasmine here
18+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19+
// for example, you can disable the random execution with `random: false`
20+
// or set a specific seed with `seed: 4321`
21+
},
1622
clearContext: false // leave Jasmine Spec Runner output visible in browser
1723
},
18-
files: [
19-
20-
],
21-
preprocessors: {
22-
23-
},
24-
mime: {
25-
'text/x-typescript': ['ts','tsx']
24+
jasmineHtmlReporter: {
25+
suppressAll: true // removes the duplicated traces
2626
},
27-
coverageIstanbulReporter: {
28-
dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ],
29-
fixWebpackSourcePaths: true
27+
coverageReporter: {
28+
dir: require('path').join(__dirname, '../../coverage/my-lib'),
29+
subdir: '.',
30+
reporters: [
31+
{ type: 'html' },
32+
{ type: 'text-summary' }
33+
]
3034
},
31-
32-
reporters: config.angularCli && config.angularCli.codeCoverage
33-
? ['progress', 'coverage-istanbul']
34-
: ['progress', 'kjhtml'],
35+
reporters: ['progress', 'kjhtml'],
3536
port: 9876,
3637
colors: true,
3738
logLevel: config.LOG_INFO,
3839
autoWatch: true,
3940
browsers: ['Chrome'],
4041
singleRun: false,
41-
customLaunchers: {
42-
ChromeHeadlessCustom: {
43-
base: 'ChromeHeadless',
44-
flags: ['--no-sandbox', '--disable-gpu']
45-
}
46-
},
42+
restartOnFileChange: true
4743
});
4844
};

0 commit comments

Comments
 (0)