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

Bump angular dependencies #9825

Merged
merged 6 commits into from
Jun 3, 2019
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
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ env:
- JHI_DISABLE_WEBPACK_LOGS=true
- JHI_E2E_HEADLESS=true
- JHI_SCRIPTS=$TRAVIS_BUILD_DIR/test-integration/scripts
- NG_CLI_ANALYTICS="false"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vishal423 : can you explain me what is it plz ? Maybe we need to add this to Azure Pipelines too ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Angular CLI added an analytics feature (like us), this env variable prevents from sending data usage to the CLI project.
I don't think we need to add it into our pipeline as we don't rely on the angular CLI to build our application.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In absence of this option, Travis builds got stuck in the post-install scripts (failed build logs @ https://travis-ci.org/jhipster/generator-jhipster/builds/539685496). I haven't noticed this issue on the Azure build pipleines (not sure why such discrepancy).

matrix:
- JHI_APP=ngx-default JHI_PROFILE=prod JHI_PROTRACTOR=1 JHI_ENTITY=sql JHI_SONAR=1
- JHI_APP=ngx-psql-es-noi18n-mapsid JHI_PROFILE=prod JHI_PROTRACTOR=1 JHI_ENTITY=sqlfull
Expand Down
86 changes: 43 additions & 43 deletions generators/client/templates/angular/package.json.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -27,129 +27,129 @@
"node_modules"
],
"dependencies": {
"@angular/common": "7.2.12",
"@angular/compiler": "7.2.12",
"@angular/core": "7.2.12",
"@angular/forms": "7.2.12",
"@angular/platform-browser": "7.2.12",
"@angular/platform-browser-dynamic": "7.2.12",
"@angular/router": "7.2.12",
"@fortawesome/angular-fontawesome": "0.3.0",
"@fortawesome/fontawesome-svg-core": "1.2.17",
"@fortawesome/free-solid-svg-icons": "5.8.1",
"@ng-bootstrap/ng-bootstrap": "4.1.1",
"@angular/common": "8.0.0",
"@angular/compiler": "8.0.0",
"@angular/core": "8.0.0",
"@angular/forms": "8.0.0",
"@angular/platform-browser": "8.0.0",
"@angular/platform-browser-dynamic": "8.0.0",
"@angular/router": "8.0.0",
"@fortawesome/angular-fontawesome": "0.4.0",
"@fortawesome/fontawesome-svg-core": "1.2.18",
"@fortawesome/free-solid-svg-icons": "5.8.2",
"@ng-bootstrap/ng-bootstrap": "4.1.3",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In v4.2, date objects are not being considered as valid (validations inbuilt into ng-bootstrap and introduced in v4.2). There is an open issue to track this: ng-bootstrap/ng-bootstrap#3215

Reverting to version before that works fine.

"@ngx-translate/core": "11.0.1",
"@ngx-translate/http-loader": "4.0.0",
"bootstrap": "4.3.1",
<%_ if (clientTheme !== 'none') { _%>
"bootswatch": "4.3.1",
<%_ } _%>
"core-js": "2.6.5",
"core-js": "3.1.3",
"moment": "2.24.0",
"ng-jhipster": "0.9.3",
"ngx-cookie": "4.0.2",
"ngx-infinite-scroll": "7.1.0",
"ngx-webstorage": "3.0.2",
"rxjs": "6.4.0",
"ngx-webstorage": "4.0.0",
"rxjs": "6.5.2",
"swagger-ui": "2.2.10",
<%_ if (websocket === 'spring-websocket') { _%>
"sockjs-client": "1.3.0",
"webstomp-client": "1.2.6",
<%_ } _%>
"tslib": "1.9.3",
"zone.js": "0.8.29"
"zone.js": "0.9.1"
},
"devDependencies": {
"@angular/cli": "7.3.8",
"@angular/compiler-cli": "7.2.12",
"@ngtools/webpack": "7.3.8",
"@angular/cli": "8.0.0",
"@angular/compiler-cli": "8.0.0",
"@ngtools/webpack": "8.0.0",
<%_ if (protractorTests) { _%>
"@types/chai": "4.1.7",
"@types/chai-string": "1.4.1",
<%_ } _%>
"@types/jest": "24.0.11",
"@types/jest": "24.0.13",
<%_ if (protractorTests) { _%>
"@types/mocha": "5.2.6",
<%_ } _%>
"@types/node": "10.12.27",
<%_ if (protractorTests) { _%>
"@types/selenium-webdriver": "3.0.15",
"@types/selenium-webdriver": "4.0.0",
<%_ } _%>
"angular-router-loader": "0.8.5",
"angular2-template-loader": "0.6.2",
"autoprefixer": "9.5.0",
"autoprefixer": "9.5.1",
"base-href-webpack-plugin": "2.0.0",
"browser-sync": "2.26.5",
"browser-sync-webpack-plugin": "2.2.2",
"cache-loader": "2.0.1",
"cache-loader": "3.0.1",
<%_ if (protractorTests) { _%>
"chai": "4.2.0",
"chai-as-promised": "7.1.1",
"chai-string": "1.5.0",
<%_ } _%>
"codelyzer": "5.0.0",
"copy-webpack-plugin": "5.0.2",
"codelyzer": "5.0.1",
"copy-webpack-plugin": "5.0.3",
"css-loader": "2.1.1",
"file-loader": "3.0.1",
"fork-ts-checker-webpack-plugin": "1.0.1",
"fork-ts-checker-webpack-plugin": "1.3.4",
"friendly-errors-webpack-plugin": "1.7.0",
"generator-jhipster": "<%= packagejs.version %>",
"html-loader": "0.5.5",
"html-webpack-plugin": "3.2.0",
<%_ if (!skipCommitHook) { _%>
"husky": "1.3.1",
"husky": "2.3.0",
<%_ } _%>
"jest": "24.7.1",
"jest-junit": "6.3.0",
"jest-preset-angular": "7.0.1",
"jest": "24.8.0",
"jest-junit": "6.4.0",
"jest-preset-angular": "7.1.1",
"jest-sonar-reporter": "2.0.0",
<%_ if (!skipCommitHook) { _%>
"lint-staged": "8.1.5",
"lint-staged": "8.1.7",
<%_ } _%>
<%_ if (enableTranslation) { _%>
"merge-jsons-webpack-plugin": "1.0.18",
"merge-jsons-webpack-plugin": "1.0.19",
<%_ } _%>
"mini-css-extract-plugin": "0.5.0",
"mini-css-extract-plugin": "0.7.0",
<%_ if (protractorTests) { _%>
"mocha": "6.1.4",
<%_ } _%>
"moment-locales-webpack-plugin": "1.0.7",
"optimize-css-assets-webpack-plugin": "5.0.1",
"postcss-loader": "3.0.0",
"prettier": "1.16.4",
"prettier": "1.17.1",
<%_ if (protractorTests) { _%>
"protractor": "5.4.2",
<%_ } _%>
"reflect-metadata": "0.1.13",
"rimraf": "2.6.3",
"sass": "1.17.4",
"sass": "1.20.1",
"sass-loader": "7.1.0",
"simple-progress-webpack-plugin": "1.1.2",
"style-loader": "0.23.1",
"terser-webpack-plugin": "1.2.3",
"terser-webpack-plugin": "1.3.0",
"thread-loader": "2.1.2",
"to-string-loader": "1.1.5",
"ts-loader": "5.3.3",
"ts-loader": "6.0.1",
<%_ if (protractorTests) { _%>
"ts-node": "8.0.3",
"ts-node": "8.2.0",
<%_ } _%>
"tslint": "5.15.0",
"tslint": "5.16.0",
"tslint-config-prettier": "1.18.0",
"tslint-loader": "3.5.4",
"typescript": "3.2.4",
"typescript": "3.4.5",
<%_ otherModules.forEach(module => { _%>
"<%= module.name %>": "<%= module.version %>",
<%_ }); _%>
<%_ if (protractorTests) { _%>
"webdriver-manager": "12.1.4",
<%_ } _%>
"webpack": "4.29.6",
"webpack-cli": "3.3.0",
"webpack-dev-server": "3.2.1",
"webpack": "4.32.2",
"webpack-cli": "3.3.2",
"webpack-dev-server": "3.4.1",
"webpack-merge": "4.2.1",
"webpack-notifier": "1.7.0",
"webpack-visualizer-plugin": "0.1.11",
"workbox-webpack-plugin": "3.6.3",
"workbox-webpack-plugin": "4.3.1",
"write-file-webpack-plugin": "4.5.0"<% if (buildTool === 'maven') { %>,
"xml2js": "0.4.19"
<%_ } _%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
See the License for the specific language governing permissions and
limitations under the License.
-%>
import 'core-js/es7/reflect';
import 'core-js/proposals/reflect-metadata';
import 'zone.js/dist/zone';
require('../manifest.webapp');
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
const mock = () => {
let storage = {};
return {
getItem: key => (key in storage ? storage[key] : null),
setItem: (key, value) => (storage[key] = value || ''),
removeItem: key => delete storage[key],
clear: () => (storage = {})
};
};

Object.defineProperty(window, 'localStorage', { value: mock() });
Object.defineProperty(window, 'sessionStorage', { value: mock() });
vishal423 marked this conversation as resolved.
Show resolved Hide resolved
Object.defineProperty(window, 'getComputedStyle', {
value: () => ['-webkit-appearance']
});
Original file line number Diff line number Diff line change
Expand Up @@ -313,28 +313,28 @@ describe('Component Tests', () => {
it('should call refresh on init', () => {
// GIVEN
spyOn(service, 'checkHealth').and.returnValue(of(new HttpResponse()));
spyOn(service, 'transformHealthData').and.returnValue(of({data: 'test'}));
spyOn(service, 'transformHealthData').and.returnValue({ data: 'test' });

// WHEN
comp.ngOnInit()

// THEN
expect(service.checkHealth).toHaveBeenCalled();
expect(service.transformHealthData).toHaveBeenCalled();
expect(comp.healthData.value).toEqual({data: 'test'});
expect(comp.healthData).toEqual({data: 'test'});
});
it('should handle a 503 on refreshing health data', () => {
// GIVEN
spyOn(service, 'checkHealth').and.returnValue(throwError(new HttpErrorResponse({status: 503, error: 'Mail down'})));
spyOn(service, 'transformHealthData').and.returnValue(of({health: 'down'}));
spyOn(service, 'transformHealthData').and.returnValue({ health: 'down' });

// WHEN
comp.refresh();

// THEN
expect(service.checkHealth).toHaveBeenCalled();
expect(service.transformHealthData).toHaveBeenCalled();
expect(comp.healthData.value).toEqual({health: 'down'});
expect(comp.healthData).toEqual({health: 'down'});
});
});
});
Expand Down