From 8522546a8a1985973cc8804cb5170b01da81e231 Mon Sep 17 00:00:00 2001 From: Ward Bell Date: Wed, 17 Jan 2018 15:22:08 -0800 Subject: [PATCH] build(aio): upgrade sample `package.json` files to jasmine@~2.8.0 (#20165) - Update tooling to support revised testing guide (PR #20697). - Require jasmine upgrade for examples that use marble testing. - Copy `cli/package.json` to `testing/` and add `jasmine-marbles`. - Resolve merge conflicts created by `NgModules` guides. PR Close #20165 --- .../customizer/package-json/testing.json | 5 +- .../shared/boilerplate/cli/package.json | 4 +- .../shared/boilerplate/i18n/package.json | 4 +- .../shared/boilerplate/testing/package.json | 51 +++++++++++++++++++ .../shared/boilerplate/universal/package.json | 4 +- aio/tools/examples/shared/package.json | 7 +-- aio/tools/examples/shared/yarn.lock | 48 ++++------------- 7 files changed, 73 insertions(+), 50 deletions(-) create mode 100644 aio/tools/examples/shared/boilerplate/testing/package.json diff --git a/aio/tools/example-zipper/customizer/package-json/testing.json b/aio/tools/example-zipper/customizer/package-json/testing.json index ca5fc2be05..92f1609f1a 100644 --- a/aio/tools/example-zipper/customizer/package-json/testing.json +++ b/aio/tools/example-zipper/customizer/package-json/testing.json @@ -7,12 +7,11 @@ { "name": "lint", "command": "ng lint" }, { "name": "e2e", "command": "ng e2e" } ], - "dependencies": [ - "web-animations-js" - ], + "dependencies": [], "devDependencies": [ "@angular/cli", "@types/jasminewd2", + "jasmine-spec-reporter", "karma-coverage-istanbul-reporter", "ts-node" ] diff --git a/aio/tools/examples/shared/boilerplate/cli/package.json b/aio/tools/examples/shared/boilerplate/cli/package.json index cf519b8216..96491ab5e8 100644 --- a/aio/tools/examples/shared/boilerplate/cli/package.json +++ b/aio/tools/examples/shared/boilerplate/cli/package.json @@ -30,11 +30,11 @@ "@angular/cli": "1.5.4", "@angular/compiler-cli": "^5.0.0", "@angular/language-service": "^5.0.0", - "@types/jasmine": "~2.5.53", + "@types/jasmine": "~2.8.0", "@types/jasminewd2": "~2.0.2", "@types/node": "~6.0.60", "codelyzer": "^4.0.1", - "jasmine-core": "~2.6.2", + "jasmine-core": "~2.8.0", "jasmine-spec-reporter": "~4.1.0", "karma": "~1.7.0", "karma-chrome-launcher": "~2.1.1", diff --git a/aio/tools/examples/shared/boilerplate/i18n/package.json b/aio/tools/examples/shared/boilerplate/i18n/package.json index c25c97f413..74ab803af8 100644 --- a/aio/tools/examples/shared/boilerplate/i18n/package.json +++ b/aio/tools/examples/shared/boilerplate/i18n/package.json @@ -32,11 +32,11 @@ "@angular/cli": "1.5.0", "@angular/compiler-cli": "^5.0.0", "@angular/language-service": "^5.0.0", - "@types/jasmine": "~2.5.53", + "@types/jasmine": "~2.8.0", "@types/jasminewd2": "~2.0.2", "@types/node": "~6.0.60", "codelyzer": "~3.2.0", - "jasmine-core": "~2.6.2", + "jasmine-core": "~2.8.0", "jasmine-spec-reporter": "~4.1.0", "karma": "~1.7.0", "karma-chrome-launcher": "~2.1.1", diff --git a/aio/tools/examples/shared/boilerplate/testing/package.json b/aio/tools/examples/shared/boilerplate/testing/package.json new file mode 100644 index 0000000000..823c452b9e --- /dev/null +++ b/aio/tools/examples/shared/boilerplate/testing/package.json @@ -0,0 +1,51 @@ +{ + "name": "angular.io-example", + "version": "0.0.0", + "license": "MIT", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build", + "test": "ng test", + "lint": "ng lint", + "e2e": "ng e2e" + }, + "private": true, + "dependencies": { + "@angular/animations": "^5.0.0", + "@angular/common": "^5.0.0", + "@angular/compiler": "^5.0.0", + "@angular/core": "^5.0.0", + "@angular/forms": "^5.0.0", + "@angular/http": "^5.0.0", + "@angular/platform-browser": "^5.0.0", + "@angular/platform-browser-dynamic": "^5.0.0", + "@angular/router": "^5.0.0", + "angular-in-memory-web-api": "~0.5.0", + "core-js": "^2.4.1", + "rxjs": "^5.5.2", + "zone.js": "^0.8.14" + }, + "devDependencies": { + "@angular/cli": "1.5.4", + "@angular/compiler-cli": "^5.0.0", + "@angular/language-service": "^5.0.0", + "@types/jasmine": "~2.8.0", + "@types/jasminewd2": "~2.0.2", + "@types/node": "~6.0.60", + "codelyzer": "^4.0.1", + "jasmine-core": "~2.8.0", + "jasmine-marbles": "~2.8.0", + "jasmine-spec-reporter": "~4.1.0", + "karma": "~1.7.0", + "karma-chrome-launcher": "~2.1.1", + "karma-cli": "~1.0.1", + "karma-coverage-istanbul-reporter": "^1.2.1", + "karma-jasmine": "~1.1.0", + "karma-jasmine-html-reporter": "^0.2.2", + "protractor": "~5.1.2", + "ts-node": "~3.2.0", + "tslint": "~5.7.0", + "typescript": "~2.4.2" + } +} diff --git a/aio/tools/examples/shared/boilerplate/universal/package.json b/aio/tools/examples/shared/boilerplate/universal/package.json index 01c10ae7b3..220f17dacb 100644 --- a/aio/tools/examples/shared/boilerplate/universal/package.json +++ b/aio/tools/examples/shared/boilerplate/universal/package.json @@ -39,11 +39,11 @@ "@angular/cli": "1.5.0", "@angular/compiler-cli": "^4.2.4", "@angular/language-service": "^4.2.4", - "@types/jasmine": "~2.5.53", + "@types/jasmine": "~2.8.0", "@types/jasminewd2": "~2.0.2", "@types/node": "~6.0.60", "codelyzer": "~3.1.1", - "jasmine-core": "~2.6.2", + "jasmine-core": "~2.8.0", "jasmine-spec-reporter": "~4.1.0", "karma": "~1.7.0", "karma-chrome-launcher": "~2.1.1", diff --git a/aio/tools/examples/shared/package.json b/aio/tools/examples/shared/package.json index 5974a1787c..5648fef9a5 100644 --- a/aio/tools/examples/shared/package.json +++ b/aio/tools/examples/shared/package.json @@ -52,7 +52,7 @@ "@types/angular-route": "^1.3.2", "@types/angular-sanitize": "^1.3.3", "@types/express": "^4.0.35", - "@types/jasmine": "~2.5.53", + "@types/jasmine": "~2.8.0", "@types/jasminewd2": "^2.0.3", "@types/node": "^6.0.45", "canonical-path": "0.0.2", @@ -64,8 +64,9 @@ "html-loader": "^0.4.3", "html-webpack-plugin": "^2.16.1", "http-server": "^0.9.0", - "jasmine": "~2.4.1", - "jasmine-core": "~2.4.1", + "jasmine": "~2.8.0", + "jasmine-core": "~2.8.0", + "jasmine-marbles":"^0.2.0", "jasmine-spec-reporter": "^4.2.1", "karma": "^1.3.0", "karma-chrome-launcher": "^2.0.0", diff --git a/aio/tools/examples/shared/yarn.lock b/aio/tools/examples/shared/yarn.lock index 76bfb0e364..aa932399f6 100644 --- a/aio/tools/examples/shared/yarn.lock +++ b/aio/tools/examples/shared/yarn.lock @@ -267,9 +267,9 @@ version "2.6.2" resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-2.6.2.tgz#6e6d4cb183cd55c7a1ad6270bced10fdd5367a3c" -"@types/jasmine@~2.5.53": - version "2.5.54" - resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-2.5.54.tgz#a6b5f2ae2afb6e0307774e8c7c608e037d491c63" +"@types/jasmine@~2.8.0": + version "2.8.4" + resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-2.8.4.tgz#5528fb5e53f1b27594f81f18debb7eab8dc532cb" "@types/jasminewd2@^2.0.3": version "2.0.3" @@ -2738,13 +2738,6 @@ glob@7.0.x: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^3.2.11: - version "3.2.11" - resolved "https://registry.yarnpkg.com/glob/-/glob-3.2.11.tgz#4a973f635b9190f715d10987d5c00fd2815ebe3d" - dependencies: - inherits "2" - minimatch "0.3" - glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@~7.1.1: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" @@ -3519,21 +3512,23 @@ istanbul-reports@^1.1.3: dependencies: handlebars "^4.0.3" -jasmine-core@~2.4.0, jasmine-core@~2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.4.1.tgz#6f83ab3a0f16951722ce07d206c773d57cc838be" - jasmine-core@~2.8.0: version "2.8.0" resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.8.0.tgz#bcc979ae1f9fd05701e45e52e65d3a5d63f1a24e" +jasmine-marbles@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/jasmine-marbles/-/jasmine-marbles-0.2.0.tgz#b893d8508b75790b634876d3a1bea1345d65c156" + dependencies: + lodash "^4.5.0" + jasmine-spec-reporter@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/jasmine-spec-reporter/-/jasmine-spec-reporter-4.2.1.tgz#1d632aec0341670ad324f92ba84b4b32b35e9e22" dependencies: colors "1.1.2" -jasmine@^2.5.3: +jasmine@^2.5.3, jasmine@~2.8.0: version "2.8.0" resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-2.8.0.tgz#6b089c0a11576b1f16df11b80146d91d4e8b8a3e" dependencies: @@ -3541,14 +3536,6 @@ jasmine@^2.5.3: glob "^7.0.6" jasmine-core "~2.8.0" -jasmine@~2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-2.4.1.tgz#9016dda453213d27ac6d43dc4ea97315a189085e" - dependencies: - exit "^0.1.2" - glob "^3.2.11" - jasmine-core "~2.4.0" - jasminewd2@^2.1.0: version "2.2.0" resolved "https://registry.yarnpkg.com/jasminewd2/-/jasminewd2-2.2.0.tgz#e37cf0b17f199cce23bea71b2039395246b4ec4e" @@ -3940,10 +3927,6 @@ lower-case@^1.1.1: version "1.1.4" resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" -lru-cache@2: - version "2.7.3" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952" - lru-cache@2.2.x: version "2.2.4" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.2.4.tgz#6c658619becf14031d0d0b594b16042ce4dc063d" @@ -4105,13 +4088,6 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" -minimatch@0.3: - version "0.3.0" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.3.0.tgz#275d8edaac4f1bb3326472089e7949c8394699dd" - dependencies: - lru-cache "2" - sigmund "~1.0.0" - "minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4, minimatch@~3.0.2: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" @@ -5831,10 +5807,6 @@ shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" -sigmund@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" - signal-exit@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"