From 28d806535f044a24ad08ea55e0316bf765bb6789 Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Fri, 16 Aug 2019 08:24:28 +0100 Subject: [PATCH 001/818] fix RELEASE.md issue --- RELEASE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE.md b/RELEASE.md index ae70719bb5..93edbfe82c 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -44,7 +44,7 @@ Follow these steps if you're releasing a new minor or major version (e.g. from ` # Switch to "release" branch and reset it to "origin/beta" git checkout -B release --track origin/beta -# Merge any unmerged changes from "origin/release" back in +# Merge any unreleased changes from "origin/release" back in git merge origin/release # ... do the stable release ... From 7ea2430de575eaeba3f3edd01481d2ad40983d8b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 20 Aug 2019 15:45:02 +0000 Subject: [PATCH 002/818] Bump rimraf from 2.6.3 to 3.0.0 Bumps [rimraf](https://github.com/isaacs/rimraf) from 2.6.3 to 3.0.0. - [Release notes](https://github.com/isaacs/rimraf/releases) - [Commits](https://github.com/isaacs/rimraf/compare/v2.6.3...v3.0.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 2842419c26..dd15481c36 100644 --- a/package.json +++ b/package.json @@ -151,7 +151,7 @@ "nock": "^10.0.6", "nyc": "^14.1.0", "prettier": "1.17.0", - "rimraf": "^2.6.3", + "rimraf": "^3.0.0", "strip-ansi": "^5.2.0", "supertest": "^4.0.2", "testdouble": "^3.12.2", diff --git a/yarn.lock b/yarn.lock index 6e7ea4751c..0114fab333 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6423,6 +6423,13 @@ rimraf@2.6.3, rimraf@^2.1.4, rimraf@^2.2.8, rimraf@^2.3.4, rimraf@^2.4.1, rimraf dependencies: glob "^7.1.3" +rimraf@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.0.tgz#614176d4b3010b75e5c390eb0ee96f6dc0cebb9b" + integrity sha512-NDGVxTsjqfunkds7CqsOiEnxln4Bo7Nddl3XhS4pXg5OzwkLqJ971ZVAAnB+DDLnF76N+VnDEiBHaVV8I06SUg== + dependencies: + glob "^7.1.3" + rsvp@^3.0.14, rsvp@^3.0.17, rsvp@^3.0.18, rsvp@^3.0.21: version "3.6.2" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-3.6.2.tgz#2e96491599a96cde1b515d5674a8f7a91452926a" From 9cbbeb66ea3f40d4446a27ae6dbb83f83418b1e2 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 20 Aug 2019 15:45:33 +0000 Subject: [PATCH 003/818] Bump markdown-it from 9.0.1 to 9.1.0 Bumps [markdown-it](https://github.com/markdown-it/markdown-it) from 9.0.1 to 9.1.0. - [Release notes](https://github.com/markdown-it/markdown-it/releases) - [Changelog](https://github.com/markdown-it/markdown-it/blob/master/CHANGELOG.md) - [Commits](https://github.com/markdown-it/markdown-it/compare/9.0.1...9.1.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index dd15481c36..0187d8e315 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "json-stable-stringify": "^1.0.1", "leek": "0.0.24", "lodash.template": "^4.5.0", - "markdown-it": "^9.0.1", + "markdown-it": "^9.1.0", "markdown-it-terminal": "0.1.0", "minimatch": "^3.0.4", "morgan": "^1.9.1", diff --git a/yarn.lock b/yarn.lock index 0114fab333..424241904d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4893,10 +4893,10 @@ markdown-it@^8.0.0, markdown-it@^8.3.1: mdurl "^1.0.1" uc.micro "^1.0.5" -markdown-it@^9.0.1: - version "9.0.1" - resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-9.0.1.tgz#aafe363c43718720b6575fd10625cde6e4ff2d47" - integrity sha512-XC9dMBHg28Xi7y5dPuLjM61upIGPJG8AiHNHYqIaXER2KNnn7eKnM5/sF0ImNnyoV224Ogn9b1Pck8VH4k0bxw== +markdown-it@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-9.1.0.tgz#df9601c168568704d554b1fff9af0c5b561168d9" + integrity sha512-xHKG4C8iPriyfu/jc2hsCC045fKrMQ0VexX2F1FGYiRxDxqMB2aAhF8WauJ3fltn2kb90moGBkiiEdooGIg55w== dependencies: argparse "^1.0.7" entities "~1.1.1" From 04e1c3c84919e87d98f3ab7d08688d97ac3283a8 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 20 Aug 2019 15:46:46 +0000 Subject: [PATCH 004/818] Bump @octokit/rest from 16.28.6 to 16.28.7 Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 16.28.6 to 16.28.7. - [Release notes](https://github.com/octokit/rest.js/releases) - [Commits](https://github.com/octokit/rest.js/compare/v16.28.6...v16.28.7) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 0187d8e315..48cfcb3171 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,7 @@ "yam": "^1.0.0" }, "devDependencies": { - "@octokit/rest": "^16.28.6", + "@octokit/rest": "^16.28.7", "broccoli-plugin": "^2.1.0", "broccoli-test-helper": "^2.0.0", "chai": "^4.2.0", diff --git a/yarn.lock b/yarn.lock index 424241904d..4e4ad32f4c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -207,10 +207,10 @@ once "^1.4.0" universal-user-agent "^2.1.0" -"@octokit/rest@^16.28.6": - version "16.28.6" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.28.6.tgz#9e73104077c9c06cf3b1628603b4b0c55a117809" - integrity sha512-ERfzS6g6ZNPJkEUclxLenr+UEncbymCe//IBrWWdp59nslYDeJboq07Ue9brX05Uv0+SY3kwA33cdiVBVPAOMQ== +"@octokit/rest@^16.28.7": + version "16.28.7" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.28.7.tgz#a2c2db5b318da84144beba82d19c1a9dbdb1a1fa" + integrity sha512-cznFSLEhh22XD3XeqJw51OLSfyL2fcFKUO+v2Ep9MTAFfFLS1cK1Zwd1yEgQJmJoDnj4/vv3+fGGZweG+xsbIA== dependencies: "@octokit/request" "^5.0.0" "@octokit/request-error" "^1.0.2" From 498d89d3ce4f0de87805bfb0e979becc3404ad94 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 20 Aug 2019 20:02:11 +0000 Subject: [PATCH 005/818] Bump testdouble from 3.12.2 to 3.12.3 Bumps [testdouble](https://github.com/testdouble/testdouble.js) from 3.12.2 to 3.12.3. - [Release notes](https://github.com/testdouble/testdouble.js/releases) - [Changelog](https://github.com/testdouble/testdouble.js/blob/master/CHANGELOG.md) - [Commits](https://github.com/testdouble/testdouble.js/compare/v3.12.2...v3.12.3) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 48cfcb3171..f94337ecf6 100644 --- a/package.json +++ b/package.json @@ -154,7 +154,7 @@ "rimraf": "^3.0.0", "strip-ansi": "^5.2.0", "supertest": "^4.0.2", - "testdouble": "^3.12.2", + "testdouble": "^3.12.3", "websocket": "^1.0.29", "which": "1.3.1", "yuidoc-ember-cli-theme": "^1.0.4", diff --git a/yarn.lock b/yarn.lock index 4e4ad32f4c..d31aa1885d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7117,10 +7117,10 @@ test-exclude@^5.2.3: read-pkg-up "^4.0.0" require-main-filename "^2.0.0" -testdouble@^3.12.2, testdouble@^3.2.6: - version "3.12.2" - resolved "https://registry.yarnpkg.com/testdouble/-/testdouble-3.12.2.tgz#a70c11cc83f1396a91f120cf8d0a3037aeb83f37" - integrity sha512-+K1+JZZZUYFkeiIbNWDUVpyTrtYzNLHc8nRXADCvQ70913DA/xGgRkE+mWEbyZQTBRH5c5aVR4YjXvCY4hnT3w== +testdouble@^3.12.3, testdouble@^3.2.6: + version "3.12.3" + resolved "https://registry.yarnpkg.com/testdouble/-/testdouble-3.12.3.tgz#ddf1f299541e990a1630b607234cb357c3a025a5" + integrity sha512-OSiuFH8Ag4A2dLXDoR5PU5NUtcSrV4jOfrMc9b+t8PPxMRyphMGSv23iAn1gJkkU/nL0n3yjOnKlbxDt7dpMYg== dependencies: lodash "^4.17.14" quibble "^0.5.6" From a08fac9ece844600b5c3c4ac4e5ebe7bb322746e Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 20 Aug 2019 23:16:19 +0000 Subject: [PATCH 006/818] Bump broccoli from 3.1.2 to 3.2.0 Bumps [broccoli](https://github.com/broccolijs/broccoli) from 3.1.2 to 3.2.0. - [Release notes](https://github.com/broccolijs/broccoli/releases) - [Changelog](https://github.com/broccolijs/broccoli/blob/master/CHANGELOG.md) - [Commits](https://github.com/broccolijs/broccoli/compare/v3.1.2...3.2.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 37 ++++++++++++++++--------------------- 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index f94337ecf6..07cbe7d7c9 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "babel-plugin-module-resolver": "^3.2.0", "bower-config": "^1.4.1", "bower-endpoint-parser": "0.2.2", - "broccoli": "^3.1.2", + "broccoli": "^3.2.0", "broccoli-amd-funnel": "^2.0.1", "broccoli-babel-transpiler": "^7.2.0", "broccoli-builder": "^0.18.14", diff --git a/yarn.lock b/yarn.lock index d31aa1885d..022847183a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1025,10 +1025,10 @@ broccoli-node-info@1.1.0, broccoli-node-info@^1.1.0: resolved "https://registry.yarnpkg.com/broccoli-node-info/-/broccoli-node-info-1.1.0.tgz#3aa2e31e07e5bdb516dd25214f7c45ba1c459412" integrity sha1-OqLjHgflvbUW3SUhT3xFuhxFlBI= -broccoli-node-info@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/broccoli-node-info/-/broccoli-node-info-2.0.0.tgz#652a7940ede40630b84ad009c6236f4bc548b556" - integrity sha512-xfnzPYdf8Uu3mfhEPkh3CX1suGHNNW4k3f730llzr4Dl7UXvI5T8RUb7X04BSvJfvqYTekM/JTmYrjB01WAsCg== +broccoli-node-info@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/broccoli-node-info/-/broccoli-node-info-2.1.0.tgz#ca84560e8570ff78565bea1699866ddbf58ad644" + integrity sha512-l6qDuboJThHfRVVWQVaTs++bFdrFTP0gJXgsWenczc1PavRVUmL1Eyb2swTAXXMpDOnr2zhNOBLx4w9AxkqbPQ== broccoli-persistent-filter@^1.1.6: version "1.4.6" @@ -1163,13 +1163,13 @@ broccoli@^2.0.0: underscore.string "^3.2.2" watch-detector "^0.1.0" -broccoli@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/broccoli/-/broccoli-3.1.2.tgz#31a8758aa087a26d62f1dab65c1d0af87cbced73" - integrity sha512-lSQB5sReBO1yPnWvQEqrAtLomK1BB1lsFQjc/whszK9j37v0tvvuCOeHX40x7iw3D2V4CyiBrYUUPY4pBjwdzA== +broccoli@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/broccoli/-/broccoli-3.2.0.tgz#6b5a89b8d6d0c733d39aa23ac5b43d85f56fafab" + integrity sha512-n58yqAbV2Zbg+HXmBGBOUoDOgbCM0hMJtqvnPDF89Jwk3ZBVhD5/UKW0diY6l3DbB5+j92NCDQVd9HqO+WYFYA== dependencies: ansi-html "^0.0.7" - broccoli-node-info "^2.0.0" + broccoli-node-info "^2.1.0" broccoli-slow-trees "^3.0.1" broccoli-source "^1.1.0" commander "^2.15.1" @@ -1180,6 +1180,7 @@ broccoli@^3.1.2: handlebars "^4.0.11" heimdalljs "^0.2.6" heimdalljs-logger "^0.1.9" + https "^1.0.0" mime-types "^2.1.19" promise.prototype.finally "^3.1.0" resolve-path "^1.4.0" @@ -1736,18 +1737,7 @@ console-control-strings@^1.0.0, console-control-strings@~1.1.0: resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= -console-ui@^3.0.4: - version "3.1.0" - resolved "https://registry.yarnpkg.com/console-ui/-/console-ui-3.1.0.tgz#cf74b01150c1034de729165180d848194880a179" - integrity sha512-OqPjE8pNAe9xWp1o4igdH8YrXl359ovUaYzS2avCdgVSWc9tJq5SYIw7893ybhfhGwrI6aljdHALoE9+gNaHMA== - dependencies: - chalk "^2.1.0" - inquirer "^6" - json-stable-stringify "^1.0.1" - ora "^3.4.0" - through2 "^3.0.1" - -console-ui@^3.1.1: +console-ui@^3.0.4, console-ui@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/console-ui/-/console-ui-3.1.1.tgz#681a0414e8b0a23ed679d0a2802e39d920801171" integrity sha512-22y+uk4AGq9quz6kofKQjkeCIAm86+MTxT/RZMFm8fMArP2lAkzxjUjNyrw7S6wXnnB+qRnC+/2ANMTke68RTQ== @@ -3633,6 +3623,11 @@ http-signature@~0.10.0: assert-plus "^0.1.5" ctype "0.5.3" +https@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/https/-/https-1.0.0.tgz#3c37c7ae1a8eeb966904a2ad1e975a194b7ed3a4" + integrity sha1-PDfHrhqO65ZpBKKtHpdaGUt+06Q= + iconv-lite@0.4.24, iconv-lite@^0.4.13, iconv-lite@^0.4.24, iconv-lite@^0.4.4: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" From de912de4415895166f71d6d889b19b012c513a1a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2019 09:35:51 +0000 Subject: [PATCH 007/818] Bump eslint-config-prettier from 6.0.0 to 6.1.0 Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.0.0 to 6.1.0. - [Release notes](https://github.com/prettier/eslint-config-prettier/releases) - [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-config-prettier/compare/v6.0.0...v6.1.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 07cbe7d7c9..2e047041ce 100644 --- a/package.json +++ b/package.json @@ -140,7 +140,7 @@ "ember-cli-blueprint-test-helpers": "^0.19.2", "ember-cli-internal-test-helpers": "^0.9.1", "eslint": "^5.16.0", - "eslint-config-prettier": "^6.0.0", + "eslint-config-prettier": "^6.1.0", "eslint-plugin-chai-expect": "^2.0.1", "eslint-plugin-mocha": "^6.0.0", "eslint-plugin-node": "^9.0.1", diff --git a/yarn.lock b/yarn.lock index 022847183a..458f8df8c0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2361,10 +2361,10 @@ escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1 resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= -eslint-config-prettier@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.0.0.tgz#f429a53bde9fc7660e6353910fd996d6284d3c25" - integrity sha512-vDrcCFE3+2ixNT5H83g28bO/uYAwibJxerXPj+E7op4qzBCsAV36QfvdAyVOoNxKAH2Os/e01T/2x++V0LPukA== +eslint-config-prettier@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.1.0.tgz#e6f678ba367fbd1273998d5510f76f004e9dce7b" + integrity sha512-k9fny9sPjIBQ2ftFTesJV21Rg4R/7a7t7LCtZVrYQiHEp8Nnuk3EGaDmsKSAnsPj0BYcgB2zxzHa2NTkIxcOLg== dependencies: get-stdin "^6.0.0" From 8373ed3114f3c851e309629525b8f0d0e6a73950 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2019 09:35:55 +0000 Subject: [PATCH 008/818] Bump uuid from 3.3.2 to 3.3.3 Bumps [uuid](https://github.com/kelektiv/node-uuid) from 3.3.2 to 3.3.3. - [Release notes](https://github.com/kelektiv/node-uuid/releases) - [Changelog](https://github.com/kelektiv/node-uuid/blob/master/CHANGELOG.md) - [Commits](https://github.com/kelektiv/node-uuid/compare/v3.3.2...v3.3.3) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 2e047041ce..7245334e1a 100644 --- a/package.json +++ b/package.json @@ -124,7 +124,7 @@ "testem": "^2.17.0", "tiny-lr": "^1.1.1", "tree-sync": "^1.4.0", - "uuid": "^3.3.2", + "uuid": "^3.3.3", "walk-sync": "^2.0.2", "watch-detector": "^0.1.0", "yam": "^1.0.0" diff --git a/yarn.lock b/yarn.lock index 458f8df8c0..c9c164d05e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7555,10 +7555,10 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= -uuid@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" - integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== +uuid@^3.3.2, uuid@^3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866" + integrity sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ== v8flags@^3.0.1: version "3.1.3" From dd522d90ad14088071e9d2d55d9d65f7e9d0acaa Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2019 09:36:03 +0000 Subject: [PATCH 009/818] Bump testdouble from 3.12.3 to 3.12.4 Bumps [testdouble](https://github.com/testdouble/testdouble.js) from 3.12.3 to 3.12.4. - [Release notes](https://github.com/testdouble/testdouble.js/releases) - [Changelog](https://github.com/testdouble/testdouble.js/blob/master/CHANGELOG.md) - [Commits](https://github.com/testdouble/testdouble.js/compare/v3.12.3...v3.12.4) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 7245334e1a..ee8564b155 100644 --- a/package.json +++ b/package.json @@ -154,7 +154,7 @@ "rimraf": "^3.0.0", "strip-ansi": "^5.2.0", "supertest": "^4.0.2", - "testdouble": "^3.12.3", + "testdouble": "^3.12.4", "websocket": "^1.0.29", "which": "1.3.1", "yuidoc-ember-cli-theme": "^1.0.4", diff --git a/yarn.lock b/yarn.lock index c9c164d05e..ec1de5c5ee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4772,7 +4772,7 @@ lodash.values@~2.3.0: dependencies: lodash.keys "~2.3.0" -lodash@^4.0.0, lodash@^4.16.1, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.5: +lodash@^4.0.0, lodash@^4.16.1, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.5: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== @@ -7112,12 +7112,12 @@ test-exclude@^5.2.3: read-pkg-up "^4.0.0" require-main-filename "^2.0.0" -testdouble@^3.12.3, testdouble@^3.2.6: - version "3.12.3" - resolved "https://registry.yarnpkg.com/testdouble/-/testdouble-3.12.3.tgz#ddf1f299541e990a1630b607234cb357c3a025a5" - integrity sha512-OSiuFH8Ag4A2dLXDoR5PU5NUtcSrV4jOfrMc9b+t8PPxMRyphMGSv23iAn1gJkkU/nL0n3yjOnKlbxDt7dpMYg== +testdouble@^3.12.4, testdouble@^3.2.6: + version "3.12.4" + resolved "https://registry.yarnpkg.com/testdouble/-/testdouble-3.12.4.tgz#c8b30a62077212c10c2e05dc4105610d28013df4" + integrity sha512-Ake1UjvG6XKYUrVGyNv52xg5lQM079dTQW8/F8GWuE1lbC1NRmkUgtgLrsRr+7SPQZZhIhZp6lHUWXMMBvSHEw== dependencies: - lodash "^4.17.14" + lodash "^4.17.15" quibble "^0.5.6" stringify-object-es5 "^2.5.0" theredoc "^1.0.0" From a785ad1522cdc76ee5591ca2b3777b50a5c86c9c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 22 Aug 2019 09:00:00 +0000 Subject: [PATCH 010/818] Bump npm-package-arg from 6.1.0 to 6.1.1 Bumps [npm-package-arg](https://github.com/npm/npm-package-arg) from 6.1.0 to 6.1.1. - [Release notes](https://github.com/npm/npm-package-arg/releases) - [Changelog](https://github.com/npm/npm-package-arg/blob/latest/CHANGELOG.md) - [Commits](https://github.com/npm/npm-package-arg/compare/v6.1.0...v6.1.1) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index ee8564b155..cc8f8e0245 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "minimatch": "^3.0.4", "morgan": "^1.9.1", "nopt": "^3.0.6", - "npm-package-arg": "^6.1.0", + "npm-package-arg": "^6.1.1", "p-defer": "^3.0.0", "portfinder": "^1.0.21", "promise-map-series": "^0.2.3", diff --git a/yarn.lock b/yarn.lock index ec1de5c5ee..7c73ff1017 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3569,10 +3569,10 @@ homedir-polyfill@^1.0.1: dependencies: parse-passwd "^1.0.0" -hosted-git-info@^2.1.4, hosted-git-info@^2.6.0: - version "2.7.1" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" - integrity sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w== +hosted-git-info@^2.1.4, hosted-git-info@^2.7.1: + version "2.8.4" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.4.tgz#44119abaf4bc64692a16ace34700fed9c03e2546" + integrity sha512-pzXIvANXEFrc5oFFXRMkbLPQ2rXRoDERwDLyrcUxGhaZhgP54BBSl9Oheh7Vv0T090cszWBxPjkQQ5Sq1PbBRQ== http-cache-semantics@3.8.1: version "3.8.1" @@ -5369,14 +5369,14 @@ npm-bundled@^1.0.1: resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.6.tgz#e7ba9aadcef962bb61248f91721cd932b3fe6bdd" integrity sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g== -npm-package-arg@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.0.tgz#15ae1e2758a5027efb4c250554b85a737db7fcc1" - integrity sha512-zYbhP2k9DbJhA0Z3HKUePUgdB1x7MfIfKssC+WLPFMKTBZKpZh5m13PgexJjCq6KW7j17r0jHWcCpxEqnnncSA== +npm-package-arg@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.1.tgz#02168cb0a49a2b75bf988a28698de7b529df5cb7" + integrity sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg== dependencies: - hosted-git-info "^2.6.0" + hosted-git-info "^2.7.1" osenv "^0.1.5" - semver "^5.5.0" + semver "^5.6.0" validate-npm-package-name "^3.0.0" npm-packlist@^1.1.6: From 0de30f833ee76198a5261b4797bb3bc7feca7ba2 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 23 Aug 2019 09:20:10 +0000 Subject: [PATCH 011/818] Bump eslint-plugin-mocha from 6.0.0 to 6.1.0 Bumps [eslint-plugin-mocha](https://github.com/lo1tuma/eslint-plugin-mocha) from 6.0.0 to 6.1.0. - [Release notes](https://github.com/lo1tuma/eslint-plugin-mocha/releases) - [Changelog](https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/CHANGELOG.md) - [Commits](https://github.com/lo1tuma/eslint-plugin-mocha/compare/6.0.0...6.1.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index cc8f8e0245..06aa516aed 100644 --- a/package.json +++ b/package.json @@ -142,7 +142,7 @@ "eslint": "^5.16.0", "eslint-config-prettier": "^6.1.0", "eslint-plugin-chai-expect": "^2.0.1", - "eslint-plugin-mocha": "^6.0.0", + "eslint-plugin-mocha": "^6.1.0", "eslint-plugin-node": "^9.0.1", "eslint-plugin-prettier": "^3.0.1", "fixturify": "^1.2.0", diff --git a/yarn.lock b/yarn.lock index 7c73ff1017..bd1f6943bd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2381,10 +2381,10 @@ eslint-plugin-es@^1.4.0: eslint-utils "^1.3.0" regexpp "^2.0.1" -eslint-plugin-mocha@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-6.0.0.tgz#0a2af057280962e9deab929361141865b2b8a761" - integrity sha512-Qgy1q64cTKqiHiYP3ZPAcMlEoPejeM7GLKDs2pvYG/fXbVDYDJw7ELlHlbn3147SL9+cPSqat7uCCbbNmVpc1g== +eslint-plugin-mocha@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-6.1.0.tgz#4950ceea8e51b1f4265116c0d03d0cbae86d0a6f" + integrity sha512-EQj355rhaSGOLP6WH9P9xu+0Xuy+G5dZUuRTlLPNpICw5x0zrqK+uxQZvMVKWO9zOJA4PDVR1XHO0rm9wbOLuA== dependencies: ramda "^0.26.1" From 3ce2dd9b5c1f8aaa64564935520e5479fa09e4e2 Mon Sep 17 00:00:00 2001 From: Emilio Santelises Date: Fri, 16 Aug 2019 17:48:40 -0400 Subject: [PATCH 012/818] [Modernize] tests/acceptance/in-repo-addon-generate-test.js Epic: #8511 --- .../acceptance/in-repo-addon-generate-test.js | 50 ++++++++----------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/tests/acceptance/in-repo-addon-generate-test.js b/tests/acceptance/in-repo-addon-generate-test.js index c008fbdc23..6d712399b0 100644 --- a/tests/acceptance/in-repo-addon-generate-test.js +++ b/tests/acceptance/in-repo-addon-generate-test.js @@ -1,11 +1,11 @@ 'use strict'; -const RSVP = require('rsvp'); +const util = require('util'); const ember = require('../helpers/ember'); const fs = require('fs-extra'); const path = require('path'); -let outputFile = RSVP.denodeify(fs.outputFile); -let remove = RSVP.denodeify(fs.remove); +let outputFile = util.promisify(fs.outputFile); +let remove = util.promisify(fs.remove); let root = process.cwd(); let tmproot = path.join(root, 'tmp'); const Blueprint = require('../../lib/models/blueprint'); @@ -27,10 +27,9 @@ describe('Acceptance: ember generate in-repo-addon', function() { BlueprintNpmTask.restoreNPM(Blueprint); }); - beforeEach(function() { - return mkTmpDirIn(tmproot).then(function(tmpdir) { - process.chdir(tmpdir); - }); + beforeEach(async function() { + const tmpdir = await mkTmpDirIn(tmproot); + return process.chdir(tmpdir); }); afterEach(function() { @@ -42,31 +41,26 @@ describe('Acceptance: ember generate in-repo-addon', function() { return ember(['init', '--name=my-app', '--skip-npm', '--skip-bower']); } - function initInRepoAddon() { - return initApp().then(function() { - return ember(['generate', 'in-repo-addon', 'my-addon']); - }); + async function initInRepoAddon() { + await initApp(); + return ember(['generate', 'in-repo-addon', 'my-addon']); } - it('in-repo-addon blueprint foo inside alternate path', function() { + it('in-repo-addon blueprint foo inside alternate path', async function() { // build an app with an in-repo addon in a non-standard path - return ( - initApp() - .then(() => ember(['generate', 'in-repo-addon', './non-lib/other-thing'])) - // generate in project blueprint to allow easier testing of in-repo generation - .then(() => outputFile('blueprints/foo/files/__root__/foos/__name__.js', '/* whoah, empty foo! */')) - // confirm that we can generate into the non-lib path - .then(() => - ember(['generate', 'foo', 'bar', '--in-repo-addon=other-thing']).then(function() { - expect(file('non-lib/other-thing/addon/foos/bar.js')).to.exist; - }) - ) - ); + await initApp(); + await ember(['generate', 'in-repo-addon', './non-lib/other-thing']); + // generate in project blueprint to allow easier testing of in-repo generation + await outputFile('blueprints/foo/files/__root__/foos/__name__.js', '/* whoah, empty foo! */'); + // confirm that we can generate into the non-lib path + await ember(['generate', 'foo', 'bar', '--in-repo-addon=other-thing']); + + expect(file('non-lib/other-thing/addon/foos/bar.js')).to.exist; }); - it('in-repo-addon adds path to lib', function() { - return initInRepoAddon().then(function() { - expect(file('package.json')).to.contain('lib/my-addon'); - }); + it('in-repo-addon adds path to lib', async function() { + await initInRepoAddon(); + + expect(file('package.json')).to.contain('lib/my-addon'); }); }); From a675c22e37710bcf89fb271741c6d9d5fbfaaace Mon Sep 17 00:00:00 2001 From: Emilio Santelises Date: Fri, 16 Aug 2019 19:33:02 -0400 Subject: [PATCH 013/818] [Modernize] tests/integration/models/blueprint-test.js --- tests/integration/models/blueprint-test.js | 668 ++++++++++----------- 1 file changed, 314 insertions(+), 354 deletions(-) diff --git a/tests/integration/models/blueprint-test.js b/tests/integration/models/blueprint-test.js index 013d272999..5c30677b34 100644 --- a/tests/integration/models/blueprint-test.js +++ b/tests/integration/models/blueprint-test.js @@ -8,7 +8,8 @@ const expect = require('chai').expect; const path = require('path'); const glob = require('glob'); const walkSync = require('walk-sync'); -const RSVP = require('rsvp'); +const util = require('util'); + const EOL = require('os').EOL; let root = process.cwd(); let tmproot = path.join(root, 'tmp'); @@ -17,8 +18,7 @@ const mkTmpDirIn = require('../../../lib/utilities/mk-tmp-dir-in'); const td = require('testdouble'); const Blueprint = require('../../../lib/models/blueprint'); -const Promise = RSVP.Promise; -const remove = RSVP.denodeify(fs.remove); +const remove = util.promisify(fs.remove); let localsCalled; let normalizeEntityNameCalled; @@ -243,181 +243,170 @@ describe('Blueprint', function() { let options; let tmpdir; - beforeEach(function() { - return mkTmpDirIn(tmproot).then(function(dir) { - tmpdir = dir; - blueprint = new InstrumentedBasicBlueprint(basicBlueprint); - ui = new MockUI(); - td.replace(ui, 'prompt'); - - project = new MockProject(); - options = { - ui, - project, - target: tmpdir, - }; - }); + beforeEach(async function() { + const dir = await mkTmpDirIn(tmproot); + tmpdir = dir; + blueprint = new InstrumentedBasicBlueprint(basicBlueprint); + ui = new MockUI(); + td.replace(ui, 'prompt'); + + project = new MockProject(); + options = { + ui, + project, + target: tmpdir, + }; }); afterEach(function() { return remove(tmproot); }); - it('installs basic files', function() { + it('installs basic files', async function() { expect(!!blueprint).to.equal(true); - return blueprint.install(options).then(function() { - let actualFiles = walkSync(tmpdir).sort(); - let output = ui.output.trim().split(EOL); + await blueprint.install(options); + + let actualFiles = walkSync(tmpdir).sort(); + let output = ui.output.trim().split(EOL); + + expect(output.shift()).to.match(/^installing/); + expect(output.shift()).to.match(/create.* .ember-cli/); + expect(output.shift()).to.match(/create.* .gitignore/); + expect(output.shift()).to.match(/create.* app[/\\]basics[/\\]mock-project.txt/); + expect(output.shift()).to.match(/create.* bar/); + expect(output.shift()).to.match(/create.* file-to-remove.txt/); + expect(output.shift()).to.match(/create.* foo.txt/); + expect(output.shift()).to.match(/create.* test.txt/); + expect(output.length).to.equal(0); + expect(actualFiles).to.deep.equal(basicBlueprintFiles); + expect(() => { + fs.readFile(path.join(tmpdir, 'test.txt'), 'utf-8', function(err, content) { + if (err) { + throw 'error'; + } + expect(content).to.match(/I AM TESTY/); + }); + }).not.to.throw(); + }); - expect(output.shift()).to.match(/^installing/); - expect(output.shift()).to.match(/create.* .ember-cli/); - expect(output.shift()).to.match(/create.* .gitignore/); - expect(output.shift()).to.match(/create.* app[/\\]basics[/\\]mock-project.txt/); - expect(output.shift()).to.match(/create.* bar/); - expect(output.shift()).to.match(/create.* file-to-remove.txt/); - expect(output.shift()).to.match(/create.* foo.txt/); - expect(output.shift()).to.match(/create.* test.txt/); - expect(output.length).to.equal(0); + it('re-installing identical files', async function() { + await blueprint.install(options); - expect(actualFiles).to.deep.equal(basicBlueprintFiles); + let output = ui.output.trim().split(EOL); + ui.output = ''; - expect(() => { - fs.readFile(path.join(tmpdir, 'test.txt'), 'utf-8', function(err, content) { - if (err) { - throw 'error'; - } - expect(content).to.match(/I AM TESTY/); - }); - }).not.to.throw(); - }); - }); + expect(output.shift()).to.match(/^installing/); + expect(output.shift()).to.match(/create.* .ember-cli/); + expect(output.shift()).to.match(/create.* .gitignore/); + expect(output.shift()).to.match(/create.* app[/\\]basics[/\\]mock-project.txt/); + expect(output.shift()).to.match(/create.* bar/); + expect(output.shift()).to.match(/create.* file-to-remove.txt/); + expect(output.shift()).to.match(/create.* foo.txt/); + expect(output.shift()).to.match(/create.* test.txt/); + expect(output.length).to.equal(0); - it('re-installing identical files', function() { - return blueprint - .install(options) - .then(function() { - let output = ui.output.trim().split(EOL); - ui.output = ''; - - expect(output.shift()).to.match(/^installing/); - expect(output.shift()).to.match(/create.* .ember-cli/); - expect(output.shift()).to.match(/create.* .gitignore/); - expect(output.shift()).to.match(/create.* app[/\\]basics[/\\]mock-project.txt/); - expect(output.shift()).to.match(/create.* bar/); - expect(output.shift()).to.match(/create.* file-to-remove.txt/); - expect(output.shift()).to.match(/create.* foo.txt/); - expect(output.shift()).to.match(/create.* test.txt/); - expect(output.length).to.equal(0); - - return blueprint.install(options); - }) - .then(function() { - let actualFiles = walkSync(tmpdir).sort(); - let output = ui.output.trim().split(EOL); - - expect(output.shift()).to.match(/^installing/); - expect(output.shift()).to.match(/identical.* .ember-cli/); - expect(output.shift()).to.match(/identical.* .gitignore/); - expect(output.shift()).to.match(/identical.* app[/\\]basics[/\\]mock-project.txt/); - expect(output.shift()).to.match(/identical.* bar/); - expect(output.shift()).to.match(/identical.* file-to-remove.txt/); - expect(output.shift()).to.match(/identical.* foo.txt/); - expect(output.shift()).to.match(/identical.* test.txt/); - expect(output.length).to.equal(0); - - expect(actualFiles).to.deep.equal(basicBlueprintFiles); - }); + await blueprint.install(options); + + let actualFiles = walkSync(tmpdir).sort(); + output = ui.output.trim().split(EOL); + + expect(output.shift()).to.match(/^installing/); + expect(output.shift()).to.match(/identical.* .ember-cli/); + expect(output.shift()).to.match(/identical.* .gitignore/); + expect(output.shift()).to.match(/identical.* app[/\\]basics[/\\]mock-project.txt/); + expect(output.shift()).to.match(/identical.* bar/); + expect(output.shift()).to.match(/identical.* file-to-remove.txt/); + expect(output.shift()).to.match(/identical.* foo.txt/); + expect(output.shift()).to.match(/identical.* test.txt/); + expect(output.length).to.equal(0); + + expect(actualFiles).to.deep.equal(basicBlueprintFiles); }); - it('re-installing conflicting files', function() { + it('re-installing conflicting files', async function() { td.when(ui.prompt(td.matchers.anything())).thenReturn( Promise.resolve({ answer: 'skip' }), Promise.resolve({ answer: 'overwrite' }) ); - return blueprint - .install(options) - .then(function() { - let output = ui.output.trim().split(EOL); - ui.output = ''; - - expect(output.shift()).to.match(/^installing/); - expect(output.shift()).to.match(/create.* .ember-cli/); - expect(output.shift()).to.match(/create.* .gitignore/); - expect(output.shift()).to.match(/create.* app[/\\]basics[/\\]mock-project.txt/); - expect(output.shift()).to.match(/create.* bar/); - expect(output.shift()).to.match(/create.* file-to-remove.txt/); - expect(output.shift()).to.match(/create.* foo.txt/); - expect(output.shift()).to.match(/create.* test.txt/); - expect(output.length).to.equal(0); - - let blueprintNew = Blueprint.lookup(basicNewBlueprint); - - return blueprintNew.install(options); - }) - .then(function() { - td.verify(ui.prompt(td.matchers.anything()), { times: 2 }); - - let actualFiles = walkSync(tmpdir).sort(); - // Prompts contain \n EOL - // Split output on \n since it will have the same affect as spliting on OS specific EOL - let output = ui.output.trim().split('\n'); - expect(output.shift()).to.match(/^installing/); - expect(output.shift()).to.match(/identical.* \.ember-cli/); - expect(output.shift()).to.match(/identical.* \.gitignore/); - expect(output.shift()).to.match(/skip.* foo.txt/); - expect(output.shift()).to.match(/overwrite.* test.txt/); - expect(output.shift()).to.match(/remove.* file-to-remove.txt/); - expect(output.length).to.equal(0); - - expect(actualFiles).to.deep.equal(basicBlueprintFilesAfterBasic2); - }); + await blueprint.install(options); + + let output = ui.output.trim().split(EOL); + ui.output = ''; + + expect(output.shift()).to.match(/^installing/); + expect(output.shift()).to.match(/create.* .ember-cli/); + expect(output.shift()).to.match(/create.* .gitignore/); + expect(output.shift()).to.match(/create.* app[/\\]basics[/\\]mock-project.txt/); + expect(output.shift()).to.match(/create.* bar/); + expect(output.shift()).to.match(/create.* file-to-remove.txt/); + expect(output.shift()).to.match(/create.* foo.txt/); + expect(output.shift()).to.match(/create.* test.txt/); + expect(output.length).to.equal(0); + + let blueprintNew = Blueprint.lookup(basicNewBlueprint); + + await blueprintNew.install(options); + + td.verify(ui.prompt(td.matchers.anything()), { times: 2 }); + + let actualFiles = walkSync(tmpdir).sort(); + // Prompts contain \n EOL + // Split output on \n since it will have the same affect as spliting on OS specific EOL + output = ui.output.trim().split('\n'); + expect(output.shift()).to.match(/^installing/); + expect(output.shift()).to.match(/identical.* \.ember-cli/); + expect(output.shift()).to.match(/identical.* \.gitignore/); + expect(output.shift()).to.match(/skip.* foo.txt/); + expect(output.shift()).to.match(/overwrite.* test.txt/); + expect(output.shift()).to.match(/remove.* file-to-remove.txt/); + expect(output.length).to.equal(0); + + expect(actualFiles).to.deep.equal(basicBlueprintFilesAfterBasic2); }); - it('installs path globPattern file', function() { + it('installs path globPattern file', async function() { options.targetFiles = ['foo.txt']; - return blueprint.install(options).then(function() { - let actualFiles = walkSync(tmpdir).sort(); - let globFiles = glob - .sync('**/foo.txt', { - cwd: tmpdir, - dot: true, - mark: true, - strict: true, - }) - .sort(); - let output = ui.output.trim().split(EOL); + await blueprint.install(options); + let actualFiles = walkSync(tmpdir).sort(); + let globFiles = glob + .sync('**/foo.txt', { + cwd: tmpdir, + dot: true, + mark: true, + strict: true, + }) + .sort(); + let output = ui.output.trim().split(EOL); - expect(output.shift()).to.match(/^installing/); - expect(output.shift()).to.match(/create.* foo.txt/); - expect(output.length).to.equal(0); + expect(output.shift()).to.match(/^installing/); + expect(output.shift()).to.match(/create.* foo.txt/); + expect(output.length).to.equal(0); - expect(actualFiles).to.deep.equal(globFiles); - }); + expect(actualFiles).to.deep.equal(globFiles); }); - it('installs multiple globPattern files', function() { + it('installs multiple globPattern files', async function() { options.targetFiles = ['foo.txt', 'test.txt']; - return blueprint.install(options).then(function() { - let actualFiles = walkSync(tmpdir).sort(); - let globFiles = glob - .sync(path.join('**', '*.txt'), { - cwd: tmpdir, - dot: true, - mark: true, - strict: true, - }) - .sort(); - let output = ui.output.trim().split(EOL); + await blueprint.install(options); + let actualFiles = walkSync(tmpdir).sort(); + let globFiles = glob + .sync(path.join('**', '*.txt'), { + cwd: tmpdir, + dot: true, + mark: true, + strict: true, + }) + .sort(); + let output = ui.output.trim().split(EOL); - expect(output.shift()).to.match(/^installing/); - expect(output.shift()).to.match(/create.* foo.txt/); - expect(output.shift()).to.match(/create.* test.txt/); - expect(output.length).to.equal(0); + expect(output.shift()).to.match(/^installing/); + expect(output.shift()).to.match(/create.* foo.txt/); + expect(output.shift()).to.match(/create.* test.txt/); + expect(output.length).to.equal(0); - expect(actualFiles).to.deep.equal(globFiles); - }); + expect(actualFiles).to.deep.equal(globFiles); }); describe('called on an existing project', function() { @@ -425,46 +414,42 @@ describe('Blueprint', function() { Blueprint.ignoredUpdateFiles.push('foo.txt'); }); - it('ignores files in ignoredUpdateFiles', function() { + it('ignores files in ignoredUpdateFiles', async function() { td.when(ui.prompt(), { ignoreExtraArgs: true }).thenReturn(Promise.resolve({ answer: 'skip' })); + await blueprint.install(options); + + let output = ui.output.trim().split(EOL); + ui.output = ''; - return blueprint - .install(options) - .then(function() { - let output = ui.output.trim().split(EOL); - ui.output = ''; - - expect(output.shift()).to.match(/^installing/); - expect(output.shift()).to.match(/create.* .ember-cli/); - expect(output.shift()).to.match(/create.* .gitignore/); - expect(output.shift()).to.match(/create.* app[/\\]basics[/\\]mock-project.txt/); - expect(output.shift()).to.match(/create.* bar/); - expect(output.shift()).to.match(/create.* file-to-remove.txt/); - expect(output.shift()).to.match(/create.* foo.txt/); - expect(output.shift()).to.match(/create.* test.txt/); - expect(output.length).to.equal(0); - - let blueprintNew = new Blueprint(basicNewBlueprint); - - options.project.isEmberCLIProject = function() { - return true; - }; - - return blueprintNew.install(options); - }) - .then(function() { - let actualFiles = walkSync(tmpdir).sort(); - // Prompts contain \n EOL - // Split output on \n since it will have the same affect as spliting on OS specific EOL - let output = ui.output.trim().split('\n'); - expect(output.shift()).to.match(/^installing/); - expect(output.shift()).to.match(/identical.* \.ember-cli/); - expect(output.shift()).to.match(/identical.* \.gitignore/); - expect(output.shift()).to.match(/skip.* test.txt/); - expect(output.length).to.equal(0); - - expect(actualFiles).to.deep.equal(basicBlueprintFiles); - }); + expect(output.shift()).to.match(/^installing/); + expect(output.shift()).to.match(/create.* .ember-cli/); + expect(output.shift()).to.match(/create.* .gitignore/); + expect(output.shift()).to.match(/create.* app[/\\]basics[/\\]mock-project.txt/); + expect(output.shift()).to.match(/create.* bar/); + expect(output.shift()).to.match(/create.* file-to-remove.txt/); + expect(output.shift()).to.match(/create.* foo.txt/); + expect(output.shift()).to.match(/create.* test.txt/); + expect(output.length).to.equal(0); + + let blueprintNew = new Blueprint(basicNewBlueprint); + + options.project.isEmberCLIProject = function() { + return true; + }; + + await blueprintNew.install(options); + + let actualFiles = walkSync(tmpdir).sort(); + // Prompts contain \n EOL + // Split output on \n since it will have the same affect as spliting on OS specific EOL + output = ui.output.trim().split('\n'); + expect(output.shift()).to.match(/^installing/); + expect(output.shift()).to.match(/identical.* \.ember-cli/); + expect(output.shift()).to.match(/identical.* \.gitignore/); + expect(output.shift()).to.match(/skip.* test.txt/); + expect(output.length).to.equal(0); + + expect(actualFiles).to.deep.equal(basicBlueprintFiles); }); }); @@ -473,47 +458,43 @@ describe('Blueprint', function() { Blueprint.ignoredUpdateFiles.push('foo.txt'); }); - it('does not ignores files in ignoredUpdateFiles', function() { + it('does not ignores files in ignoredUpdateFiles', async function() { td.when(ui.prompt(), { ignoreExtraArgs: true }).thenReturn(Promise.resolve({ answer: 'skip' })); + await blueprint.install(options); + + let output = ui.output.trim().split(EOL); + ui.output = ''; + + expect(output.shift()).to.match(/^installing/); + expect(output.shift()).to.match(/create.* .ember-cli/); + expect(output.shift()).to.match(/create.* .gitignore/); + expect(output.shift()).to.match(/create.* app[/\\]basics[/\\]mock-project.txt/); + expect(output.shift()).to.match(/create.* bar/); + expect(output.shift()).to.match(/create.* file-to-remove.txt/); + expect(output.shift()).to.match(/create.* foo.txt/); + expect(output.shift()).to.match(/create.* test.txt/); + expect(output.length).to.equal(0); + + let blueprintNew = new Blueprint(basicNewBlueprint); + + options.project.isEmberCLIProject = function() { + return false; + }; + + await blueprintNew.install(options); - return blueprint - .install(options) - .then(function() { - let output = ui.output.trim().split(EOL); - ui.output = ''; - - expect(output.shift()).to.match(/^installing/); - expect(output.shift()).to.match(/create.* .ember-cli/); - expect(output.shift()).to.match(/create.* .gitignore/); - expect(output.shift()).to.match(/create.* app[/\\]basics[/\\]mock-project.txt/); - expect(output.shift()).to.match(/create.* bar/); - expect(output.shift()).to.match(/create.* file-to-remove.txt/); - expect(output.shift()).to.match(/create.* foo.txt/); - expect(output.shift()).to.match(/create.* test.txt/); - expect(output.length).to.equal(0); - - let blueprintNew = new Blueprint(basicNewBlueprint); - - options.project.isEmberCLIProject = function() { - return false; - }; - - return blueprintNew.install(options); - }) - .then(function() { - let actualFiles = walkSync(tmpdir).sort(); - // Prompts contain \n EOL - // Split output on \n since it will have the same affect as spliting on OS specific EOL - let output = ui.output.trim().split('\n'); - expect(output.shift()).to.match(/^installing/); - expect(output.shift()).to.match(/identical.* \.ember-cli/); - expect(output.shift()).to.match(/identical.* \.gitignore/); - expect(output.shift()).to.match(/skip.* foo.txt/); - expect(output.shift()).to.match(/skip.* test.txt/); - expect(output.length).to.equal(0); - - expect(actualFiles).to.deep.equal(basicBlueprintFiles); - }); + let actualFiles = walkSync(tmpdir).sort(); + // Prompts contain \n EOL + // Split output on \n since it will have the same affect as spliting on OS specific EOL + output = ui.output.trim().split('\n'); + expect(output.shift()).to.match(/^installing/); + expect(output.shift()).to.match(/identical.* \.ember-cli/); + expect(output.shift()).to.match(/identical.* \.gitignore/); + expect(output.shift()).to.match(/skip.* foo.txt/); + expect(output.shift()).to.match(/skip.* test.txt/); + expect(output.length).to.equal(0); + + expect(actualFiles).to.deep.equal(basicBlueprintFiles); }); }); @@ -560,18 +541,17 @@ describe('Blueprint', function() { blueprint.install(options); }); - it('normalizeEntityName hook can modify the entity name', function() { + it('normalizeEntityName hook can modify the entity name', async function() { blueprint.normalizeEntityName = function() { return 'foo'; }; options.entity = { name: 'bar' }; - return blueprint.install(options).then(function() { - let actualFiles = walkSync(tmpdir).sort(); + await blueprint.install(options); + let actualFiles = walkSync(tmpdir).sort(); - expect(actualFiles).to.contain('app/basics/foo.txt'); - expect(actualFiles).to.not.contain('app/basics/mock-project.txt'); - }); + expect(actualFiles).to.contain('app/basics/foo.txt'); + expect(actualFiles).to.not.contain('app/basics/mock-project.txt'); }); it('calls normalizeEntityName before locals hook is called', function(done) { @@ -586,19 +566,18 @@ describe('Blueprint', function() { blueprint.install(options); }); - it('calls appropriate hooks with correct arguments', function() { + it('calls appropriate hooks with correct arguments', async function() { options.entity = { name: 'foo' }; - return blueprint.install(options).then(function() { - expect(localsCalled).to.be.true; - expect(normalizeEntityNameCalled).to.be.true; - expect(fileMapTokensCalled).to.be.true; - expect(filesPathCalled).to.be.true; - expect(beforeInstallCalled).to.be.true; - expect(afterInstallCalled).to.be.true; - expect(beforeUninstallCalled).to.be.false; - expect(afterUninstallCalled).to.be.false; - }); + await blueprint.install(options); + expect(localsCalled).to.be.true; + expect(normalizeEntityNameCalled).to.be.true; + expect(fileMapTokensCalled).to.be.true; + expect(filesPathCalled).to.be.true; + expect(beforeInstallCalled).to.be.true; + expect(afterInstallCalled).to.be.true; + expect(beforeUninstallCalled).to.be.false; + expect(afterUninstallCalled).to.be.false; }); it("doesn't throw when running uninstall without installing first", function() { @@ -619,82 +598,75 @@ describe('Blueprint', function() { options.ui = ui; } - beforeEach(function() { - return mkTmpDirIn(tmproot) - .then(function(dir) { - tmpdir = dir; - blueprint = new BasicBlueprintClass(basicBlueprint); - project = new MockProject(); - options = { - project, - target: tmpdir, - }; - refreshUI(); - return blueprint.install(options); - }) - .then(refreshUI); + beforeEach(async function() { + let dir = await mkTmpDirIn(tmproot); + + tmpdir = dir; + blueprint = new BasicBlueprintClass(basicBlueprint); + project = new MockProject(); + options = { + project, + target: tmpdir, + }; + refreshUI(); + + await blueprint.install(options); + refreshUI(); }); afterEach(function() { return remove(tmproot); }); - it('uninstalls basic files', function() { + it('uninstalls basic files', async function() { expect(!!blueprint).to.equal(true); - return blueprint.uninstall(options).then(function() { - let actualFiles = walkSync(tmpdir); - let output = ui.output.trim().split(EOL); + await blueprint.uninstall(options); + let actualFiles = walkSync(tmpdir); + let output = ui.output.trim().split(EOL); - expect(output.shift()).to.match(/^uninstalling/); - expect(output.shift()).to.match(/remove.* .ember-cli/); - expect(output.shift()).to.match(/remove.* .gitignore/); - expect(output.shift()).to.match(/remove.* app[/\\]basics[/\\]mock-project.txt/); - expect(output.shift()).to.match(/remove.* bar/); - expect(output.shift()).to.match(/remove.* file-to-remove.txt/); - expect(output.shift()).to.match(/remove.* foo.txt/); - expect(output.shift()).to.match(/remove.* test.txt/); - expect(output.length).to.equal(0); + expect(output.shift()).to.match(/^uninstalling/); + expect(output.shift()).to.match(/remove.* .ember-cli/); + expect(output.shift()).to.match(/remove.* .gitignore/); + expect(output.shift()).to.match(/remove.* app[/\\]basics[/\\]mock-project.txt/); + expect(output.shift()).to.match(/remove.* bar/); + expect(output.shift()).to.match(/remove.* file-to-remove.txt/); + expect(output.shift()).to.match(/remove.* foo.txt/); + expect(output.shift()).to.match(/remove.* test.txt/); + expect(output.length).to.equal(0); - expect(actualFiles.length).to.equal(0); + expect(actualFiles.length).to.equal(0); - fs.exists(path.join(tmpdir, 'test.txt'), function(exists) { - expect(exists).to.be.false; - }); + fs.exists(path.join(tmpdir, 'test.txt'), function(exists) { + expect(exists).to.be.false; }); }); - it("uninstall doesn't remove non-empty folders", function() { + it("uninstall doesn't remove non-empty folders", async function() { options.entity = { name: 'foo' }; - return blueprint - .install(options) - .then(function() { - let actualFiles = walkSync(tmpdir); + await blueprint.install(options); + let actualFiles = walkSync(tmpdir); - expect(actualFiles).to.contain('app/basics/foo.txt'); - expect(actualFiles).to.contain('app/basics/mock-project.txt'); + expect(actualFiles).to.contain('app/basics/foo.txt'); + expect(actualFiles).to.contain('app/basics/mock-project.txt'); - return blueprint.uninstall(options); - }) - .then(function() { - let actualFiles = walkSync(tmpdir); + await blueprint.uninstall(options); + actualFiles = walkSync(tmpdir); - expect(actualFiles).to.not.contain('app/basics/foo.txt'); - expect(actualFiles).to.contain('app/basics/mock-project.txt'); - }); + expect(actualFiles).to.not.contain('app/basics/foo.txt'); + expect(actualFiles).to.contain('app/basics/mock-project.txt'); }); - it("uninstall doesn't log remove messages when file does not exist", function() { + it("uninstall doesn't log remove messages when file does not exist", async function() { options.entity = { name: 'does-not-exist' }; - return blueprint.uninstall(options).then(function() { - let output = ui.output.trim().split(EOL); - expect(output.shift()).to.match(/^uninstalling/); - expect(output.shift()).to.match(/remove.* .ember-cli/); - expect(output.shift()).to.match(/remove.* .gitignore/); - expect(output.shift()).to.not.match(/remove.* app[/\\]basics[/\\]does-not-exist.txt/); - }); + await blueprint.uninstall(options); + let output = ui.output.trim().split(EOL); + expect(output.shift()).to.match(/^uninstalling/); + expect(output.shift()).to.match(/remove.* .ember-cli/); + expect(output.shift()).to.match(/remove.* .gitignore/); + expect(output.shift()).to.not.match(/remove.* app[/\\]basics[/\\]does-not-exist.txt/); }); }); @@ -710,37 +682,34 @@ describe('Blueprint', function() { options.ui = ui; } - beforeEach(function() { - return mkTmpDirIn(tmproot) - .then(function(dir) { - tmpdir = dir; - blueprint = new InstrumentedBasicBlueprint(basicBlueprint); - project = new MockProject(); - options = { - project, - target: tmpdir, - }; - refreshUI(); - - return blueprint.install(options).then(resetCalled); - }) - .then(refreshUI); + beforeEach(async function() { + let dir = await mkTmpDirIn(tmproot); + tmpdir = dir; + blueprint = new InstrumentedBasicBlueprint(basicBlueprint); + project = new MockProject(); + options = { + project, + target: tmpdir, + }; + refreshUI(); + await blueprint.install(options); + await resetCalled(); + refreshUI(); }); - it('calls appropriate hooks with correct arguments', function() { + it('calls appropriate hooks with correct arguments', async function() { options.entity = { name: 'foo' }; - return blueprint.uninstall(options).then(function() { - expect(localsCalled).to.be.true; - expect(normalizeEntityNameCalled).to.be.true; - expect(fileMapTokensCalled).to.be.true; - expect(filesPathCalled).to.be.true; - expect(beforeUninstallCalled).to.be.true; - expect(afterUninstallCalled).to.be.true; + await blueprint.uninstall(options); + expect(localsCalled).to.be.true; + expect(normalizeEntityNameCalled).to.be.true; + expect(fileMapTokensCalled).to.be.true; + expect(filesPathCalled).to.be.true; + expect(beforeUninstallCalled).to.be.true; + expect(afterUninstallCalled).to.be.true; - expect(beforeInstallCalled).to.be.false; - expect(afterInstallCalled).to.be.false; - }); + expect(beforeInstallCalled).to.be.false; + expect(afterInstallCalled).to.be.false; }); }); @@ -1427,18 +1396,17 @@ describe('Blueprint', function() { let tmpdir; let project; - beforeEach(function() { - return mkTmpDirIn(tmproot).then(function(dir) { - tmpdir = dir; - blueprint = new Blueprint(basicBlueprint); - project = new MockProject(); - // normally provided by `install`, but mocked here for testing - project.root = tmpdir; - blueprint.project = project; - project.blueprintLookupPaths = function() { - return [fixtureBlueprints]; - }; - }); + beforeEach(async function() { + let dir = await mkTmpDirIn(tmproot); + tmpdir = dir; + blueprint = new Blueprint(basicBlueprint); + project = new MockProject(); + // normally provided by `install`, but mocked here for testing + project.root = tmpdir; + blueprint.project = project; + project.blueprintLookupPaths = function() { + return [fixtureBlueprints]; + }; }); afterEach(function() { @@ -1622,12 +1590,10 @@ describe('Blueprint', function() { }; }); - it('should return a default object if no custom options are passed', function() { - result = blueprint._locals(options); + it('should return a default object if no custom options are passed', async function() { + result = await blueprint._locals(options); - result.then(function(locals) { - expect(locals).to.eql(expectation); - }); + expect(result).to.deep.include(expectation); }); it('it should call the locals method with the correct arguments', function() { @@ -1664,7 +1630,7 @@ describe('Blueprint', function() { blueprint._locals(options); }); - it('should use the options.entity.name as its moduleName if its value is defined', function() { + it('should use the options.entity.name as its moduleName if its value is defined', async function() { options.entity = { name: 'foo', }; @@ -1674,39 +1640,33 @@ describe('Blueprint', function() { expectation.dasherizedModuleName = 'foo'; expectation.decamelizedModuleName = 'foo'; - result = blueprint._locals(options); + result = await blueprint._locals(options); - result.then(function(locals) { - expect(locals).to.eql(expectation); - }); + expect(result).to.deep.include(expectation); }); - it('should update its fileMap values to match the generateFileMap result', function() { + it('should update its fileMap values to match the generateFileMap result', async function() { blueprint.generateFileMap = function() { return { foo: 'bar' }; }; expectation.fileMap = { foo: 'bar' }; - result = blueprint._locals(options); + result = await blueprint._locals(options); - result.then(function(locals) { - expect(locals).to.eql(expectation); - }); + expect(result).to.deep.include(expectation); }); - it('should return an object containing custom local values', function() { + it('should return an object containing custom local values', async function() { blueprint.locals = function() { return { foo: 'bar' }; }; expectation.foo = 'bar'; - result = blueprint._locals(options); + result = await blueprint._locals(options); - result.then(function(locals) { - expect(locals).to.eql(expectation); - }); + expect(result).to.deep.include(expectation); }); }); }); From f221eee43934792da0337c7de24a95896f070d61 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2019 09:47:48 +0000 Subject: [PATCH 014/818] Bump promise.prototype.finally from 3.1.0 to 3.1.1 Bumps [promise.prototype.finally](https://github.com/es-shims/Promise.prototype.finally) from 3.1.0 to 3.1.1. - [Release notes](https://github.com/es-shims/Promise.prototype.finally/releases) - [Changelog](https://github.com/es-shims/Promise.prototype.finally/blob/master/CHANGELOG.md) - [Commits](https://github.com/es-shims/Promise.prototype.finally/compare/v3.1.0...v3.1.1) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 06aa516aed..bc5e56adf6 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "p-defer": "^3.0.0", "portfinder": "^1.0.21", "promise-map-series": "^0.2.3", - "promise.prototype.finally": "^3.1.0", + "promise.prototype.finally": "^3.1.1", "quick-temp": "^0.1.8", "resolve": "^1.12.0", "resolve-package-path": "^1.2.7", diff --git a/yarn.lock b/yarn.lock index bd1f6943bd..7773bb99e6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1994,7 +1994,7 @@ defaults@^1.0.3: dependencies: clone "^1.0.2" -define-properties@^1.1.2: +define-properties@^1.1.2, define-properties@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== @@ -2289,7 +2289,7 @@ error@^7.0.0: string-template "~0.2.1" xtend "~4.0.0" -es-abstract@^1.5.1, es-abstract@^1.9.0: +es-abstract@^1.13.0, es-abstract@^1.5.1: version "1.13.0" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9" integrity sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg== @@ -6002,13 +6002,13 @@ promise-map-series@^0.2.1, promise-map-series@^0.2.3: dependencies: rsvp "^3.0.14" -promise.prototype.finally@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/promise.prototype.finally/-/promise.prototype.finally-3.1.0.tgz#66f161b1643636e50e7cf201dc1b84a857f3864e" - integrity sha512-7p/K2f6dI+dM8yjRQEGrTQs5hTQixUAdOGpMEA3+pVxpX5oHKRSKAXyLw9Q9HUWDTdwtoo39dSHGQtN90HcEwQ== +promise.prototype.finally@^3.1.0, promise.prototype.finally@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/promise.prototype.finally/-/promise.prototype.finally-3.1.1.tgz#cb279d3a5020ca6403b3d92357f8e22d50ed92aa" + integrity sha512-gnt8tThx0heJoI3Ms8a/JdkYBVhYP/wv+T7yQimR+kdOEJL21xTFbiJhMRqnSPcr54UVvMbsscDk2w+ivyaLPw== dependencies: - define-properties "^1.1.2" - es-abstract "^1.9.0" + define-properties "^1.1.3" + es-abstract "^1.13.0" function-bind "^1.1.1" propagate@^1.0.0: From 2e41b65dcc24f9703f9d168b971777abf6fc545a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2019 11:32:04 +0000 Subject: [PATCH 015/818] Bump portfinder from 1.0.21 to 1.0.23 Bumps [portfinder](https://github.com/indexzero/node-portfinder) from 1.0.21 to 1.0.23. - [Release notes](https://github.com/indexzero/node-portfinder/releases) - [Commits](https://github.com/indexzero/node-portfinder/compare/v1.0.21...v1.0.23) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index bc5e56adf6..2746201628 100644 --- a/package.json +++ b/package.json @@ -108,7 +108,7 @@ "nopt": "^3.0.6", "npm-package-arg": "^6.1.1", "p-defer": "^3.0.0", - "portfinder": "^1.0.21", + "portfinder": "^1.0.23", "promise-map-series": "^0.2.3", "promise.prototype.finally": "^3.1.1", "quick-temp": "^0.1.8", diff --git a/yarn.lock b/yarn.lock index 7773bb99e6..b8548e800f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5927,10 +5927,10 @@ pkg-up@^2.0.0: dependencies: find-up "^2.1.0" -portfinder@^1.0.21: - version "1.0.21" - resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.21.tgz#60e1397b95ac170749db70034ece306b9a27e324" - integrity sha512-ESabpDCzmBS3ekHbmpAIiESq3udRsCBGiBZLsC+HgBKv2ezb0R4oG+7RnYEVZ/ZCfhel5Tx3UzdNWA0Lox2QCA== +portfinder@^1.0.23: + version "1.0.23" + resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.23.tgz#894db4bcc5daf02b6614517ce89cd21a38226b82" + integrity sha512-B729mL/uLklxtxuiJKfQ84WPxNw5a7Yhx3geQZdcA4GjNjZSTSSMMWyoennMVnTWSmAR0lMdzWYN0JLnHrg1KQ== dependencies: async "^1.5.2" debug "^2.2.0" From 2ccdc17fd87d7e0cce22aa440e22c00beb72a0ad Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2019 19:30:45 +0000 Subject: [PATCH 016/818] [Security] Bump eslint-utils from 1.3.1 to 1.4.2 Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.3.1 to 1.4.2. **This update includes a security fix.** - [Release notes](https://github.com/mysticatea/eslint-utils/releases) - [Commits](https://github.com/mysticatea/eslint-utils/compare/v1.3.1...v1.4.2) Signed-off-by: dependabot-preview[bot] --- yarn.lock | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/yarn.lock b/yarn.lock index b8548e800f..571ccb9e0a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2416,14 +2416,16 @@ eslint-scope@^4.0.3: estraverse "^4.1.1" eslint-utils@^1.3.0, eslint-utils@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.3.1.tgz#9a851ba89ee7c460346f97cf8939c7298827e512" - integrity sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q== + version "1.4.2" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.2.tgz#166a5180ef6ab7eb462f162fd0e6f2463d7309ab" + integrity sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q== + dependencies: + eslint-visitor-keys "^1.0.0" eslint-visitor-keys@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" - integrity sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ== + version "1.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" + integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== eslint@^5.16.0: version "5.16.0" From 271e28ac3ca3250de6296ecffa4438496bd63b6d Mon Sep 17 00:00:00 2001 From: Jonathan Johnson Date: Tue, 27 Aug 2019 22:20:22 -0700 Subject: [PATCH 017/818] Clarify installation error message Making this message a bit more action oriented is friendlier to new users. --- lib/models/command.js | 4 +++- tests/unit/commands/generate-test.js | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/models/command.js b/lib/models/command.js index 5547521f16..eedfacbad1 100644 --- a/lib/models/command.js +++ b/lib/models/command.js @@ -293,7 +293,9 @@ let Command = CoreObject.extend({ if (isYarnProject(this.project.root)) { installInstuction = '`yarn install`'; } - throw new SilentError(`node_modules appears empty, you may need to run ${installInstuction}`); + throw new SilentError( + `Required packages are missing, run ${installInstuction} from this directory to install them.` + ); } } diff --git a/tests/unit/commands/generate-test.js b/tests/unit/commands/generate-test.js index c8d3dfeaae..bce9ca7989 100644 --- a/tests/unit/commands/generate-test.js +++ b/tests/unit/commands/generate-test.js @@ -67,7 +67,9 @@ describe('generate command', function() { }; return expect(command.validateAndRun(['controller', 'foo'])).to.be.rejected.then(reason => { - expect(reason.message).to.eql('node_modules appears empty, you may need to run `npm install`'); + expect(reason.message).to.eql( + 'Required packages are missing, run `npm install` from this directory to install them.' + ); }); }); }); @@ -78,7 +80,9 @@ describe('generate command', function() { }; return expect(command.validateAndRun(['controller', 'foo'])).to.be.rejected.then(reason => { - expect(reason.message).to.eql('node_modules appears empty, you may need to run `yarn install`'); + expect(reason.message).to.eql( + 'Required packages are missing, run `yarn install` from this directory to install them.' + ); }); }); From 515a26638d985c4fb77129c9fb828f4ed3a1d650 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2019 09:10:11 +0000 Subject: [PATCH 018/818] Bump @octokit/rest from 16.28.7 to 16.28.8 Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 16.28.7 to 16.28.8. - [Release notes](https://github.com/octokit/rest.js/releases) - [Commits](https://github.com/octokit/rest.js/compare/v16.28.7...v16.28.8) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 2746201628..ba486df032 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,7 @@ "yam": "^1.0.0" }, "devDependencies": { - "@octokit/rest": "^16.28.7", + "@octokit/rest": "^16.28.8", "broccoli-plugin": "^2.1.0", "broccoli-test-helper": "^2.0.0", "chai": "^4.2.0", diff --git a/yarn.lock b/yarn.lock index 571ccb9e0a..c8410bb257 100644 --- a/yarn.lock +++ b/yarn.lock @@ -207,10 +207,10 @@ once "^1.4.0" universal-user-agent "^2.1.0" -"@octokit/rest@^16.28.7": - version "16.28.7" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.28.7.tgz#a2c2db5b318da84144beba82d19c1a9dbdb1a1fa" - integrity sha512-cznFSLEhh22XD3XeqJw51OLSfyL2fcFKUO+v2Ep9MTAFfFLS1cK1Zwd1yEgQJmJoDnj4/vv3+fGGZweG+xsbIA== +"@octokit/rest@^16.28.8": + version "16.28.8" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.28.8.tgz#9b57829084892a67654eaac075e1860bdd4b9419" + integrity sha512-FouTTcLdT++gwgKVnBN8CEVeFvY/OKzeaoH/L9LBvZhbjUotLthFWAdKa8WeOMt5x7Rs7uvBpu7IdcrtRD3wBA== dependencies: "@octokit/request" "^5.0.0" "@octokit/request-error" "^1.0.2" @@ -224,7 +224,6 @@ octokit-pagination-methods "^1.1.0" once "^1.4.0" universal-user-agent "^3.0.0" - url-template "^2.0.8" "@sindresorhus/is@^0.7.0": version "0.7.0" From 92fece55b1e116a6fc7c7ec3c14a57d44f87f6ab Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2019 10:58:52 +0000 Subject: [PATCH 019/818] Bump broccoli-plugin from 2.1.0 to 3.0.0 Bumps [broccoli-plugin](https://github.com/broccolijs/broccoli-plugin) from 2.1.0 to 3.0.0. - [Release notes](https://github.com/broccolijs/broccoli-plugin/releases) - [Changelog](https://github.com/broccolijs/broccoli-plugin/blob/master/CHANGELOG.md) - [Commits](https://github.com/broccolijs/broccoli-plugin/compare/2.1.0...3.0.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index ba486df032..4123b7f6ce 100644 --- a/package.json +++ b/package.json @@ -131,7 +131,7 @@ }, "devDependencies": { "@octokit/rest": "^16.28.8", - "broccoli-plugin": "^2.1.0", + "broccoli-plugin": "^3.0.0", "broccoli-test-helper": "^2.0.0", "chai": "^4.2.0", "chai-as-promised": "^7.1.1", diff --git a/yarn.lock b/yarn.lock index c8410bb257..9a5ada560c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1019,6 +1019,11 @@ broccoli-module-unification-reexporter@^1.0.0: mkdirp "^0.5.1" walk-sync "^0.3.2" +broccoli-node-api@^1.6.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/broccoli-node-api/-/broccoli-node-api-1.7.0.tgz#391aa6edecd2a42c63c111b4162956b2fa288cb6" + integrity sha512-QIqLSVJWJUVOhclmkmypJJH9u9s/aWH4+FH6Q6Ju5l+Io4dtwqdPUNmDfw40o6sxhbZHhqGujDJuHTML1wG8Yw== + broccoli-node-info@1.1.0, broccoli-node-info@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/broccoli-node-info/-/broccoli-node-info-1.1.0.tgz#3aa2e31e07e5bdb516dd25214f7c45ba1c459412" @@ -1088,6 +1093,17 @@ broccoli-plugin@^2.1.0: rimraf "^2.3.4" symlink-or-copy "^1.1.8" +broccoli-plugin@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/broccoli-plugin/-/broccoli-plugin-3.0.0.tgz#516f2b550ffa2bb111bf54c1afb4bd0b2f02065b" + integrity sha512-aEtobBvzAlUIAaY5z+LwW2W3IJ9pruJtrT571CyfjoDFTGa8LZx0qjQG97Z7Guk5YzuxDoDNlM3hGsgBnnReTw== + dependencies: + broccoli-node-api "^1.6.0" + promise-map-series "^0.2.1" + quick-temp "^0.1.3" + rimraf "^2.3.4" + symlink-or-copy "^1.1.8" + broccoli-slow-trees@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/broccoli-slow-trees/-/broccoli-slow-trees-3.0.1.tgz#9bf2a9e2f8eb3ed3a3f2abdde988da437ccdc9b4" From b13b2ead5709f1e60c5b34411ac7b5fa630cdf8a Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Tue, 3 Sep 2019 10:05:10 -0400 Subject: [PATCH 020/818] Issue deprecation when enabling MODULE_UNIFICATION flag. MODULE_UNIFICATION has always required using canary versions of Ember and ember-cli. `ember-source` has disabled the feature completely so that apps can no longer enable the feature at all. This implements a basic system for ember-cli to tell folks that were leveraging that experiment that we will be removing support from ember-cli. This will _likely_ be removed in ember-cli@3.17 (after the next LTS release). --- lib/experiments/index.js | 23 +++++++++++++++++++- tests/unit/experiments-test.js | 38 ++++++++++++++++++++++++++++++++-- 2 files changed, 58 insertions(+), 3 deletions(-) diff --git a/lib/experiments/index.js b/lib/experiments/index.js index 135b02ad12..760be99c55 100644 --- a/lib/experiments/index.js +++ b/lib/experiments/index.js @@ -1,5 +1,6 @@ 'use strict'; +const chalk = require('chalk'); const availableExperiments = Object.freeze([ 'PACKAGER', 'MODULE_UNIFICATION', @@ -8,7 +9,9 @@ const availableExperiments = Object.freeze([ 'BROCCOLI_WATCHER', ]); +const deprecatedExperiments = Object.freeze(['MODULE_UNIFICATION']); const enabledExperiments = Object.freeze(['SYSTEM_TEMP']); +const deprecatedExperimentsDeprecationsIssued = []; function isExperimentEnabled(experimentName) { if (!availableExperiments.includes(experimentName)) { @@ -21,6 +24,19 @@ function isExperimentEnabled(experimentName) { let experimentEnvironmentVariable = `EMBER_CLI_${experimentName}`; let experimentValue = process.env[experimentEnvironmentVariable]; + + if (deprecatedExperiments.includes(experimentName)) { + let deprecationPreviouslyIssued = deprecatedExperimentsDeprecationsIssued.includes(experimentName); + let isSpecifiedByUser = experimentValue !== undefined; + + if (!deprecationPreviouslyIssued && isSpecifiedByUser) { + console.warn( + chalk.yellow(`The ${experimentName} experiment in ember-cli has been deprecated and will be removed.`) + ); + deprecatedExperimentsDeprecationsIssued.push(experimentName); + } + } + if (enabledExperiments.includes(experimentName)) { return experimentValue !== 'false'; } else { @@ -28,4 +44,9 @@ function isExperimentEnabled(experimentName) { } } -module.exports = { isExperimentEnabled }; +module.exports = { + isExperimentEnabled, + + // exported for testing purposes + _deprecatedExperimentsDeprecationsIssued: deprecatedExperimentsDeprecationsIssued, +}; diff --git a/tests/unit/experiments-test.js b/tests/unit/experiments-test.js index 086e5751be..b8a29f2df6 100644 --- a/tests/unit/experiments-test.js +++ b/tests/unit/experiments-test.js @@ -1,7 +1,8 @@ 'use strict'; +const chalk = require('chalk'); const expect = require('chai').expect; -const { isExperimentEnabled } = require('../../lib/experiments'); +const { isExperimentEnabled, _deprecatedExperimentsDeprecationsIssued } = require('../../lib/experiments'); function resetProcessEnv(originalProcessEnv) { for (let key in process.env) { @@ -19,9 +20,11 @@ function resetProcessEnv(originalProcessEnv) { } } +const ORIGINAL_CONSOLE = Object.assign({}, console); + describe('experiments', function() { describe('isExperimentEnabled', function() { - let originalProcessEnv; + let originalProcessEnv, warnings; beforeEach(function() { originalProcessEnv = Object.assign({}, process.env); @@ -33,10 +36,15 @@ describe('experiments', function() { delete process.env.EMBER_CLI_PACKAGER; delete process.env.EMBER_CLI_DELAYED_TRANSPILATION; delete process.env.EMBER_CLI_SYSTEM_TEMP; + + warnings = []; + console.warn = warning => warnings.push(warning); }); afterEach(function() { resetProcessEnv(originalProcessEnv); + Object.assign(console, ORIGINAL_CONSOLE); + _deprecatedExperimentsDeprecationsIssued.length = 0; }); it('should return true for all experiments when `EMBER_CLI_ENABLE_ALL_EXPERIMENTS` is set', function() { @@ -45,25 +53,51 @@ describe('experiments', function() { expect(isExperimentEnabled('PACKAGER')).to.be.true; expect(isExperimentEnabled('SYSTEM_TEMP')).to.be.true; expect(isExperimentEnabled('DELAYED_TRANSPILATION')).to.be.true; + + expect(warnings).to.deep.equal([]); }); it('should have SYSTEM_TEMP disabled when environment flag is present', function() { process.env.EMBER_CLI_SYSTEM_TEMP = 'false'; expect(isExperimentEnabled('SYSTEM_TEMP')).to.be.false; + + expect(warnings).to.deep.equal([]); }); it('setting an already disabled feature to false does not enable it', function() { process.env.EMBER_CLI_PACKAGER = 'false'; expect(isExperimentEnabled('PACKAGER')).to.be.false; + + expect(warnings).to.deep.equal([]); }); it('should have MODULE_UNIFICATION disabled by default', function() { expect(isExperimentEnabled('MODULE_UNIFICATION')).to.be.false; + + expect(warnings).to.deep.equal([]); }); it('should have MODULE_UNIFICATION enabled when environment variable is set', function() { process.env.EMBER_CLI_MODULE_UNIFICATION = 'true'; expect(isExperimentEnabled('MODULE_UNIFICATION')).to.be.true; + + expect(warnings).to.deep.equal([ + chalk.yellow(`The MODULE_UNIFICATION experiment in ember-cli has been deprecated and will be removed.`), + ]); + }); + + it('only emits deprecation warnings once', function() { + process.env.EMBER_CLI_MODULE_UNIFICATION = 'true'; + expect(isExperimentEnabled('MODULE_UNIFICATION')).to.be.true; + + expect(warnings).to.deep.equal([ + chalk.yellow(`The MODULE_UNIFICATION experiment in ember-cli has been deprecated and will be removed.`), + ]); + + warnings = []; + expect(isExperimentEnabled('MODULE_UNIFICATION')).to.be.true; + + expect(warnings).to.deep.equal([]); }); }); }); From 23f464922359f7911838f9a84677b027e29b513f Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2019 18:38:08 +0000 Subject: [PATCH 021/818] Bump eslint-plugin-node from 9.1.0 to 9.2.0 Bumps [eslint-plugin-node](https://github.com/mysticatea/eslint-plugin-node) from 9.1.0 to 9.2.0. - [Release notes](https://github.com/mysticatea/eslint-plugin-node/releases) - [Commits](https://github.com/mysticatea/eslint-plugin-node/compare/v9.1.0...v9.2.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 4123b7f6ce..490c073bb8 100644 --- a/package.json +++ b/package.json @@ -143,7 +143,7 @@ "eslint-config-prettier": "^6.1.0", "eslint-plugin-chai-expect": "^2.0.1", "eslint-plugin-mocha": "^6.1.0", - "eslint-plugin-node": "^9.0.1", + "eslint-plugin-node": "^9.2.0", "eslint-plugin-prettier": "^3.0.1", "fixturify": "^1.2.0", "fixturify-project": "^1.9.0", diff --git a/yarn.lock b/yarn.lock index 9a5ada560c..e62f934095 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2388,12 +2388,12 @@ eslint-plugin-chai-expect@^2.0.1: resolved "https://registry.yarnpkg.com/eslint-plugin-chai-expect/-/eslint-plugin-chai-expect-2.0.1.tgz#0f9267745feafa723b8ec1bb151c073df5558f60" integrity sha512-HiFoh9F9grVdVQEIwADwPA7SlcGZcsm9gdzZGDoH2SeUoUmYrUuq1cQmfjyOfqRpFOL6qlhcz5nZW2ppTH9ZlQ== -eslint-plugin-es@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-1.4.0.tgz#475f65bb20c993fc10e8c8fe77d1d60068072da6" - integrity sha512-XfFmgFdIUDgvaRAlaXUkxrRg5JSADoRC8IkKLc/cISeR3yHVMefFHQZpcyXXEUUPHfy5DwviBcrfqlyqEwlQVw== +eslint-plugin-es@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-1.4.1.tgz#12acae0f4953e76ba444bfd1b2271081ac620998" + integrity sha512-5fa/gR2yR3NxQf+UXkeLeP8FBBl6tSgdrAz1+cF84v1FMM4twGwQoqTnn+QxFLcPOrF4pdKEJKDB/q9GoyJrCA== dependencies: - eslint-utils "^1.3.0" + eslint-utils "^1.4.2" regexpp "^2.0.1" eslint-plugin-mocha@^6.1.0: @@ -2403,13 +2403,13 @@ eslint-plugin-mocha@^6.1.0: dependencies: ramda "^0.26.1" -eslint-plugin-node@^9.0.1: - version "9.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-9.1.0.tgz#f2fd88509a31ec69db6e9606d76dabc5adc1b91a" - integrity sha512-ZwQYGm6EoV2cfLpE1wxJWsfnKUIXfM/KM09/TlorkukgCAwmkgajEJnPCmyzoFPQQkmvo5DrW/nyKutNIw36Mw== +eslint-plugin-node@^9.2.0: + version "9.2.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-9.2.0.tgz#b1911f111002d366c5954a6d96d3cd5bf2a3036a" + integrity sha512-2abNmzAH/JpxI4gEOwd6K8wZIodK3BmHbTxz4s79OIYwwIt2gkpEXlAouJXu4H1c9ySTnRso0tsuthSOZbUMlA== dependencies: - eslint-plugin-es "^1.4.0" - eslint-utils "^1.3.1" + eslint-plugin-es "^1.4.1" + eslint-utils "^1.4.2" ignore "^5.1.1" minimatch "^3.0.4" resolve "^1.10.1" @@ -2430,7 +2430,7 @@ eslint-scope@^4.0.3: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-utils@^1.3.0, eslint-utils@^1.3.1: +eslint-utils@^1.3.1, eslint-utils@^1.4.2: version "1.4.2" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.2.tgz#166a5180ef6ab7eb462f162fd0e6f2463d7309ab" integrity sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q== From 902e3b0c331ae85ae2168a6898e0078297e79647 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2019 09:42:27 +0000 Subject: [PATCH 022/818] Bump eslint-config-prettier from 6.1.0 to 6.2.0 Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.1.0 to 6.2.0. - [Release notes](https://github.com/prettier/eslint-config-prettier/releases) - [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-config-prettier/compare/v6.1.0...v6.2.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 490c073bb8..3206a57f01 100644 --- a/package.json +++ b/package.json @@ -140,7 +140,7 @@ "ember-cli-blueprint-test-helpers": "^0.19.2", "ember-cli-internal-test-helpers": "^0.9.1", "eslint": "^5.16.0", - "eslint-config-prettier": "^6.1.0", + "eslint-config-prettier": "^6.2.0", "eslint-plugin-chai-expect": "^2.0.1", "eslint-plugin-mocha": "^6.1.0", "eslint-plugin-node": "^9.2.0", diff --git a/yarn.lock b/yarn.lock index e62f934095..f81f36aa7a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2376,10 +2376,10 @@ escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1 resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= -eslint-config-prettier@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.1.0.tgz#e6f678ba367fbd1273998d5510f76f004e9dce7b" - integrity sha512-k9fny9sPjIBQ2ftFTesJV21Rg4R/7a7t7LCtZVrYQiHEp8Nnuk3EGaDmsKSAnsPj0BYcgB2zxzHa2NTkIxcOLg== +eslint-config-prettier@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.2.0.tgz#80e0b8714e3f6868c4ac2a25fbf39c02e73527a7" + integrity sha512-VLsgK/D+S/FEsda7Um1+N8FThec6LqE3vhcMyp8mlmto97y3fGf3DX7byJexGuOb1QY0Z/zz222U5t+xSfcZDQ== dependencies: get-stdin "^6.0.0" From 7ff6d2c82848d8df3847ee99ed3d1b0054961ba9 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2019 09:43:07 +0000 Subject: [PATCH 023/818] Bump @octokit/rest from 16.28.8 to 16.28.9 Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 16.28.8 to 16.28.9. - [Release notes](https://github.com/octokit/rest.js/releases) - [Commits](https://github.com/octokit/rest.js/compare/v16.28.8...v16.28.9) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 3206a57f01..d51be85da0 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,7 @@ "yam": "^1.0.0" }, "devDependencies": { - "@octokit/rest": "^16.28.8", + "@octokit/rest": "^16.28.9", "broccoli-plugin": "^3.0.0", "broccoli-test-helper": "^2.0.0", "chai": "^4.2.0", diff --git a/yarn.lock b/yarn.lock index f81f36aa7a..5bd6f8835d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -207,10 +207,10 @@ once "^1.4.0" universal-user-agent "^2.1.0" -"@octokit/rest@^16.28.8": - version "16.28.8" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.28.8.tgz#9b57829084892a67654eaac075e1860bdd4b9419" - integrity sha512-FouTTcLdT++gwgKVnBN8CEVeFvY/OKzeaoH/L9LBvZhbjUotLthFWAdKa8WeOMt5x7Rs7uvBpu7IdcrtRD3wBA== +"@octokit/rest@^16.28.9": + version "16.28.9" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.28.9.tgz#ac8c5f3ff305e9e0a0989a5245e4286f057a95d7" + integrity sha512-IKGnX+Tvzt7XHhs8f4ajqxyJvYAMNX5nWfoJm4CQj8LZToMiaJgutf5KxxpxoC3y5w7JTJpW5rnWnF4TsIvCLA== dependencies: "@octokit/request" "^5.0.0" "@octokit/request-error" "^1.0.2" @@ -223,7 +223,7 @@ lodash.uniq "^4.5.0" octokit-pagination-methods "^1.1.0" once "^1.4.0" - universal-user-agent "^3.0.0" + universal-user-agent "^4.0.0" "@sindresorhus/is@^0.7.0": version "0.7.0" @@ -5640,7 +5640,7 @@ os-locale@^3.0.0, os-locale@^3.1.0: lcid "^2.0.0" mem "^4.0.0" -os-name@^3.0.0: +os-name@^3.0.0, os-name@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/os-name/-/os-name-3.1.0.tgz#dec19d966296e1cd62d701a5a66ee1ddeae70801" integrity sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg== @@ -7486,12 +7486,12 @@ universal-user-agent@^2.1.0: dependencies: os-name "^3.0.0" -universal-user-agent@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-3.0.0.tgz#4cc88d68097bffd7ac42e3b7c903e7481424b4b9" - integrity sha512-T3siHThqoj5X0benA5H0qcDnrKGXzU8TKoX15x/tQHw1hQBvIEBHjxQ2klizYsqBOO/Q+WuxoQUihadeeqDnoA== +universal-user-agent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-4.0.0.tgz#27da2ec87e32769619f68a14996465ea1cb9df16" + integrity sha512-eM8knLpev67iBDizr/YtqkJsF3GK8gzDc6st/WKzrTuPtcsOKW/0IdL4cnMBsU69pOx0otavLWBDGTwg+dB0aA== dependencies: - os-name "^3.0.0" + os-name "^3.1.0" universalify@^0.1.0: version "0.1.2" From 89145d17ce9a541b3e0755e0c4c14409cf8419b6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2019 09:39:16 +0000 Subject: [PATCH 024/818] Bump nock from 10.0.6 to 11.3.1 Bumps [nock](https://github.com/nock/nock) from 10.0.6 to 11.3.1. - [Release notes](https://github.com/nock/nock/releases) - [Changelog](https://github.com/nock/nock/blob/master/CHANGELOG.md) - [Commits](https://github.com/nock/nock/compare/v10.0.6...v11.3.1) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 30 +++++++++++------------------- 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index d51be85da0..b80b6ab3f3 100644 --- a/package.json +++ b/package.json @@ -148,7 +148,7 @@ "fixturify": "^1.2.0", "fixturify-project": "^1.9.0", "mocha": "^6.2.0", - "nock": "^10.0.6", + "nock": "^11.3.1", "nyc": "^14.1.0", "prettier": "1.17.0", "rimraf": "^3.0.0", diff --git a/yarn.lock b/yarn.lock index 5bd6f8835d..7135b2852f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1963,11 +1963,6 @@ deep-eql@^3.0.1: dependencies: type-detect "^4.0.0" -deep-equal@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" - integrity sha1-9dJgKStmDghO/0zbyfCK0yR0SLU= - deep-extend@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" @@ -4789,7 +4784,7 @@ lodash.values@~2.3.0: dependencies: lodash.keys "~2.3.0" -lodash@^4.0.0, lodash@^4.16.1, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.5: +lodash@^4.0.0, lodash@^4.16.1, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== @@ -5258,20 +5253,17 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -nock@^10.0.6: - version "10.0.6" - resolved "https://registry.yarnpkg.com/nock/-/nock-10.0.6.tgz#e6d90ee7a68b8cfc2ab7f6127e7d99aa7d13d111" - integrity sha512-b47OWj1qf/LqSQYnmokNWM8D88KvUl2y7jT0567NB3ZBAZFz2bWp2PC81Xn7u8F2/vJxzkzNZybnemeFa7AZ2w== +nock@^11.3.1: + version "11.3.1" + resolved "https://registry.yarnpkg.com/nock/-/nock-11.3.1.tgz#3bafe0820a60f0900b948d31ab92b38ea6917b06" + integrity sha512-fsFRKNoH6R6hQuaasbAS5vmy4ujVaqKOb/9NCFP0TkhwbH1e5bPN8bn37FCIF9/0ZhayBrClUmSbN6Rm61+WSg== dependencies: chai "^4.1.2" debug "^4.1.0" - deep-equal "^1.0.0" json-stringify-safe "^5.0.1" - lodash "^4.17.5" + lodash "^4.17.13" mkdirp "^0.5.0" - propagate "^1.0.0" - qs "^6.5.1" - semver "^5.5.0" + propagate "^2.0.0" node-environment-flags@1.0.5: version "1.0.5" @@ -6028,10 +6020,10 @@ promise.prototype.finally@^3.1.0, promise.prototype.finally@^3.1.1: es-abstract "^1.13.0" function-bind "^1.1.1" -propagate@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/propagate/-/propagate-1.0.0.tgz#00c2daeedda20e87e3782b344adba1cddd6ad709" - integrity sha1-AMLa7t2iDofjeCs0Stuhzd1q1wk= +propagate@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/propagate/-/propagate-2.0.1.tgz#40cdedab18085c792334e64f0ac17256d38f9a45" + integrity sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag== proxy-addr@~2.0.5: version "2.0.5" From edfa43476eddd5dad69c546b0a1cda5919ac5dc3 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2019 09:40:22 +0000 Subject: [PATCH 025/818] Bump eslint-plugin-node from 9.2.0 to 10.0.0 Bumps [eslint-plugin-node](https://github.com/mysticatea/eslint-plugin-node) from 9.2.0 to 10.0.0. - [Release notes](https://github.com/mysticatea/eslint-plugin-node/releases) - [Commits](https://github.com/mysticatea/eslint-plugin-node/compare/v9.2.0...v10.0.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 25 +++++++++++++++---------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index d51be85da0..501ac67773 100644 --- a/package.json +++ b/package.json @@ -143,7 +143,7 @@ "eslint-config-prettier": "^6.2.0", "eslint-plugin-chai-expect": "^2.0.1", "eslint-plugin-mocha": "^6.1.0", - "eslint-plugin-node": "^9.2.0", + "eslint-plugin-node": "^10.0.0", "eslint-plugin-prettier": "^3.0.1", "fixturify": "^1.2.0", "fixturify-project": "^1.9.0", diff --git a/yarn.lock b/yarn.lock index 5bd6f8835d..4dbfadf8f9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2388,13 +2388,13 @@ eslint-plugin-chai-expect@^2.0.1: resolved "https://registry.yarnpkg.com/eslint-plugin-chai-expect/-/eslint-plugin-chai-expect-2.0.1.tgz#0f9267745feafa723b8ec1bb151c073df5558f60" integrity sha512-HiFoh9F9grVdVQEIwADwPA7SlcGZcsm9gdzZGDoH2SeUoUmYrUuq1cQmfjyOfqRpFOL6qlhcz5nZW2ppTH9ZlQ== -eslint-plugin-es@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-1.4.1.tgz#12acae0f4953e76ba444bfd1b2271081ac620998" - integrity sha512-5fa/gR2yR3NxQf+UXkeLeP8FBBl6tSgdrAz1+cF84v1FMM4twGwQoqTnn+QxFLcPOrF4pdKEJKDB/q9GoyJrCA== +eslint-plugin-es@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-2.0.0.tgz#0f5f5da5f18aa21989feebe8a73eadefb3432976" + integrity sha512-f6fceVtg27BR02EYnBhgWLFQfK6bN4Ll0nQFrBHOlCsAyxeZkn0NHns5O0YZOPrV1B3ramd6cgFwaoFLcSkwEQ== dependencies: eslint-utils "^1.4.2" - regexpp "^2.0.1" + regexpp "^3.0.0" eslint-plugin-mocha@^6.1.0: version "6.1.0" @@ -2403,12 +2403,12 @@ eslint-plugin-mocha@^6.1.0: dependencies: ramda "^0.26.1" -eslint-plugin-node@^9.2.0: - version "9.2.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-9.2.0.tgz#b1911f111002d366c5954a6d96d3cd5bf2a3036a" - integrity sha512-2abNmzAH/JpxI4gEOwd6K8wZIodK3BmHbTxz4s79OIYwwIt2gkpEXlAouJXu4H1c9ySTnRso0tsuthSOZbUMlA== +eslint-plugin-node@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-10.0.0.tgz#fd1adbc7a300cf7eb6ac55cf4b0b6fc6e577f5a6" + integrity sha512-1CSyM/QCjs6PXaT18+zuAXsjXGIGo5Rw630rSKwokSs2jrYURQc4R5JZpoanNCqwNmepg+0eZ9L7YiRUJb8jiQ== dependencies: - eslint-plugin-es "^1.4.1" + eslint-plugin-es "^2.0.0" eslint-utils "^1.4.2" ignore "^5.1.1" minimatch "^3.0.4" @@ -6262,6 +6262,11 @@ regexpp@^2.0.1: resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== +regexpp@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.0.0.tgz#dd63982ee3300e67b41c1956f850aa680d9d330e" + integrity sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g== + release-zalgo@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/release-zalgo/-/release-zalgo-1.0.0.tgz#09700b7e5074329739330e535c5a90fb67851730" From bf3c12dc019f0e9d4dbec73582e02aa453592459 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 6 Sep 2019 08:55:35 +0000 Subject: [PATCH 026/818] Bump nock from 11.3.1 to 11.3.3 Bumps [nock](https://github.com/nock/nock) from 11.3.1 to 11.3.3. - [Release notes](https://github.com/nock/nock/releases) - [Changelog](https://github.com/nock/nock/blob/master/CHANGELOG.md) - [Commits](https://github.com/nock/nock/compare/v11.3.1...v11.3.3) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 8116b51641..152f7cd8ba 100644 --- a/package.json +++ b/package.json @@ -148,7 +148,7 @@ "fixturify": "^1.2.0", "fixturify-project": "^1.9.0", "mocha": "^6.2.0", - "nock": "^11.3.1", + "nock": "^11.3.3", "nyc": "^14.1.0", "prettier": "1.17.0", "rimraf": "^3.0.0", diff --git a/yarn.lock b/yarn.lock index 708bfd8023..ab11ca24e6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5253,10 +5253,10 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -nock@^11.3.1: - version "11.3.1" - resolved "https://registry.yarnpkg.com/nock/-/nock-11.3.1.tgz#3bafe0820a60f0900b948d31ab92b38ea6917b06" - integrity sha512-fsFRKNoH6R6hQuaasbAS5vmy4ujVaqKOb/9NCFP0TkhwbH1e5bPN8bn37FCIF9/0ZhayBrClUmSbN6Rm61+WSg== +nock@^11.3.3: + version "11.3.3" + resolved "https://registry.yarnpkg.com/nock/-/nock-11.3.3.tgz#f4553d87ac8e501d7a995a50df7e24857f879f58" + integrity sha512-SrRux5onbWf2ItpmietnLYis+C2QYF08hAo9wv/3QLqaLJVHBSVBTL0EvlD8Hjrm7lTH4vExTzr9gQUsPqy5Cg== dependencies: chai "^4.1.2" debug "^4.1.0" From e870072c0f348819a5c77d8fedac4eb61df4f7d1 Mon Sep 17 00:00:00 2001 From: Cyrille David Date: Fri, 6 Sep 2019 23:46:58 +0200 Subject: [PATCH 027/818] CI: Remove deprecated exp. from ALL_EXPERIMENTS --- lib/experiments/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/experiments/index.js b/lib/experiments/index.js index 760be99c55..84708df0fb 100644 --- a/lib/experiments/index.js +++ b/lib/experiments/index.js @@ -18,6 +18,10 @@ function isExperimentEnabled(experimentName) { return false; } + if (process.env.EMBER_CLI_ENABLE_ALL_EXPERIMENTS && deprecatedExperiments.includes(experimentName)) { + return false; + } + if (process.env.EMBER_CLI_ENABLE_ALL_EXPERIMENTS) { return true; } From f3ddb4cd7da15677975c30dbc727451392a21ca9 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sat, 7 Sep 2019 17:57:33 -0400 Subject: [PATCH 028/818] Update watch-detector to 1.0.0. --- package.json | 2 +- yarn.lock | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 152f7cd8ba..2f68e13baf 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ "tree-sync": "^1.4.0", "uuid": "^3.3.3", "walk-sync": "^2.0.2", - "watch-detector": "^0.1.0", + "watch-detector": "^1.0.0", "yam": "^1.0.0" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index ab11ca24e6..26427c55e6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7258,6 +7258,13 @@ tmp@0.0.33, tmp@^0.0.33: dependencies: os-tmpdir "~1.0.2" +tmp@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.1.0.tgz#ee434a4e22543082e294ba6201dcc6eafefa2877" + integrity sha512-J7Z2K08jbGcdA1kkQpJSqLF6T0tdQqpR2pnSUXsIchbPdTI9v3e85cLW0d6WDhwuAleOV71j2xWs8qMPfK7nKw== + dependencies: + rimraf "^2.6.3" + tmpl@1.0.x: version "1.0.4" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" @@ -7698,6 +7705,16 @@ watch-detector@^0.1.0: semver "^5.4.1" silent-error "^1.1.0" +watch-detector@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/watch-detector/-/watch-detector-1.0.0.tgz#c7b722d8695fee9ab6071e0f38f258e6adb22609" + integrity sha512-siywMl3fXK30Tlpu/dUBHhlpxhQmHdguZ8OIb813eU9lrVmmsJa9k0+n1HtJ+7p3SzFCPq2XbmR3GUYpPC3TBA== + dependencies: + heimdalljs-logger "^0.1.10" + semver "^6.3.0" + silent-error "^1.1.1" + tmp "^0.1.0" + wcwidth@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" From 755ff27d0c6dbb1ca066578a4a4980489cbdfa5b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2019 11:39:34 +0000 Subject: [PATCH 029/818] Bump @babel/core from 7.5.5 to 7.6.0 Bumps [@babel/core](https://github.com/babel/babel) from 7.5.5 to 7.6.0. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) - [Commits](https://github.com/babel/babel/compare/v7.5.5...v7.6.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 86 ++++++++++++++++++++++++++-------------------------- 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/package.json b/package.json index 2f68e13baf..7fa732075e 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "test:debug": "node debug tests/runner" }, "dependencies": { - "@babel/core": "^7.5.5", + "@babel/core": "^7.6.0", "@babel/plugin-transform-modules-amd": "^7.5.0", "amd-name-resolver": "^1.3.1", "babel-plugin-module-resolver": "^3.2.0", diff --git a/yarn.lock b/yarn.lock index 26427c55e6..401b6c563e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,18 +9,18 @@ dependencies: "@babel/highlight" "^7.0.0" -"@babel/core@^7.3.3", "@babel/core@^7.3.4", "@babel/core@^7.5.5": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.5.5.tgz#17b2686ef0d6bc58f963dddd68ab669755582c30" - integrity sha512-i4qoSr2KTtce0DmkuuQBV4AuQgGPUcPXMr9L5MyYAtk06z068lQ10a4O009fe5OB/DfNV+h+qqT7ddNV8UnRjg== +"@babel/core@^7.3.3", "@babel/core@^7.3.4", "@babel/core@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.6.0.tgz#9b00f73554edd67bebc86df8303ef678be3d7b48" + integrity sha512-FuRhDRtsd6IptKpHXAa+4WPZYY2ZzgowkbLBecEDDSje1X/apG7jQM33or3NdOmjXBKWGOg4JmSiRfUfuTtHXw== dependencies: "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.5.5" - "@babel/helpers" "^7.5.5" - "@babel/parser" "^7.5.5" - "@babel/template" "^7.4.4" - "@babel/traverse" "^7.5.5" - "@babel/types" "^7.5.5" + "@babel/generator" "^7.6.0" + "@babel/helpers" "^7.6.0" + "@babel/parser" "^7.6.0" + "@babel/template" "^7.6.0" + "@babel/traverse" "^7.6.0" + "@babel/types" "^7.6.0" convert-source-map "^1.1.0" debug "^4.1.0" json5 "^2.1.0" @@ -29,12 +29,12 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.4.0", "@babel/generator@^7.5.5": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.5.5.tgz#873a7f936a3c89491b43536d12245b626664e3cf" - integrity sha512-ETI/4vyTSxTzGnU2c49XHv2zhExkv9JHLTwDAFz85kmcwuShvYG2H08FwgIguQf4JC75CBnXAUM5PqeF4fj0nQ== +"@babel/generator@^7.4.0", "@babel/generator@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.6.0.tgz#e2c21efbfd3293ad819a2359b448f002bfdfda56" + integrity sha512-Ms8Mo7YBdMMn1BYuNtKuP/z0TgEIhbcyB8HVR6PPNYp4P61lMsABiS4A3VG1qznjXVCf3r+fVHhm4efTYVsySA== dependencies: - "@babel/types" "^7.5.5" + "@babel/types" "^7.6.0" jsesc "^2.5.1" lodash "^4.17.13" source-map "^0.5.0" @@ -95,14 +95,14 @@ dependencies: "@babel/types" "^7.4.4" -"@babel/helpers@^7.5.5": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.5.5.tgz#63908d2a73942229d1e6685bc2a0e730dde3b75e" - integrity sha512-nRq2BUhxZFnfEn/ciJuhklHvFOqjJUD5wpx+1bxUF2axL9C+v4DE/dmp5sT2dKnpOs4orZWzpAZqlCy8QqE/7g== +"@babel/helpers@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.6.0.tgz#21961d16c6a3c3ab597325c34c465c0887d31c6e" + integrity sha512-W9kao7OBleOjfXtFGgArGRX6eCP0UEcA2ZWEWNkJdRZnHhW4eEbeswbG3EwaRsnQUAEGWYgMq1HsIXuNNNy2eQ== dependencies: - "@babel/template" "^7.4.4" - "@babel/traverse" "^7.5.5" - "@babel/types" "^7.5.5" + "@babel/template" "^7.6.0" + "@babel/traverse" "^7.6.0" + "@babel/types" "^7.6.0" "@babel/highlight@^7.0.0": version "7.0.0" @@ -113,10 +113,10 @@ esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.4.3", "@babel/parser@^7.4.4", "@babel/parser@^7.5.5": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.5.5.tgz#02f077ac8817d3df4a832ef59de67565e71cca4b" - integrity sha512-E5BN68cqR7dhKan1SfqgPGhQ178bkVKpXTPEXnFJBrEt8/DKRZlybmy+IgYLTeN7tp1R5Ccmbm2rBk17sHYU3g== +"@babel/parser@^7.4.3", "@babel/parser@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.6.0.tgz#3e05d0647432a8326cb28d0de03895ae5a57f39b" + integrity sha512-+o2q111WEx4srBs7L9eJmcwi655eD8sXniLqMB93TBK9GrNzGrxDWSjiqz2hLU0Ha8MTXFIP0yd9fNdP+m43ZQ== "@babel/plugin-transform-modules-amd@^7.5.0": version "7.5.0" @@ -135,34 +135,34 @@ core-js "^2.6.5" regenerator-runtime "^0.13.2" -"@babel/template@^7.1.0", "@babel/template@^7.4.0", "@babel/template@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.4.4.tgz#f4b88d1225689a08f5bc3a17483545be9e4ed237" - integrity sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw== +"@babel/template@^7.1.0", "@babel/template@^7.4.0", "@babel/template@^7.4.4", "@babel/template@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.6.0.tgz#7f0159c7f5012230dad64cca42ec9bdb5c9536e6" + integrity sha512-5AEH2EXD8euCk446b7edmgFdub/qfH1SN6Nii3+fyXP807QRx9Q73A2N5hNwRRslC2H9sNzaFhsPubkS4L8oNQ== dependencies: "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.4.4" - "@babel/types" "^7.4.4" + "@babel/parser" "^7.6.0" + "@babel/types" "^7.6.0" -"@babel/traverse@^7.4.3", "@babel/traverse@^7.5.5": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.5.5.tgz#f664f8f368ed32988cd648da9f72d5ca70f165bb" - integrity sha512-MqB0782whsfffYfSjH4TM+LMjrJnhCNEDMDIjeTpl+ASaUvxcjoiVCo/sM1GhS1pHOXYfWVCYneLjMckuUxDaQ== +"@babel/traverse@^7.4.3", "@babel/traverse@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.6.0.tgz#389391d510f79be7ce2ddd6717be66d3fed4b516" + integrity sha512-93t52SaOBgml/xY74lsmt7xOR4ufYvhb5c5qiM6lu4J/dWGMAfAh6eKw4PjLes6DI6nQgearoxnFJk60YchpvQ== dependencies: "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.5.5" + "@babel/generator" "^7.6.0" "@babel/helper-function-name" "^7.1.0" "@babel/helper-split-export-declaration" "^7.4.4" - "@babel/parser" "^7.5.5" - "@babel/types" "^7.5.5" + "@babel/parser" "^7.6.0" + "@babel/types" "^7.6.0" debug "^4.1.0" globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.0.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.5.5": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.5.5.tgz#97b9f728e182785909aa4ab56264f090a028d18a" - integrity sha512-s63F9nJioLqOlW3UkyMd+BYhXt44YuaFm/VV0VwuteqjYwRrObkU7ra9pY4wAJR3oXi8hJrMcrcJdO/HH33vtw== +"@babel/types@^7.0.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.6.0": + version "7.6.1" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.6.1.tgz#53abf3308add3ac2a2884d539151c57c4b3ac648" + integrity sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g== dependencies: esutils "^2.0.2" lodash "^4.17.13" From 8c4160304765477f972e3e9782c43e61e3badf9a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 12 Sep 2019 09:29:25 +0000 Subject: [PATCH 030/818] Bump eslint-plugin-mocha from 6.1.0 to 6.1.1 Bumps [eslint-plugin-mocha](https://github.com/lo1tuma/eslint-plugin-mocha) from 6.1.0 to 6.1.1. - [Release notes](https://github.com/lo1tuma/eslint-plugin-mocha/releases) - [Changelog](https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/CHANGELOG.md) - [Commits](https://github.com/lo1tuma/eslint-plugin-mocha/compare/6.1.0...6.1.1) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 7fa732075e..8f46aa606b 100644 --- a/package.json +++ b/package.json @@ -142,7 +142,7 @@ "eslint": "^5.16.0", "eslint-config-prettier": "^6.2.0", "eslint-plugin-chai-expect": "^2.0.1", - "eslint-plugin-mocha": "^6.1.0", + "eslint-plugin-mocha": "^6.1.1", "eslint-plugin-node": "^10.0.0", "eslint-plugin-prettier": "^3.0.1", "fixturify": "^1.2.0", diff --git a/yarn.lock b/yarn.lock index 401b6c563e..438768b12a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2391,10 +2391,10 @@ eslint-plugin-es@^2.0.0: eslint-utils "^1.4.2" regexpp "^3.0.0" -eslint-plugin-mocha@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-6.1.0.tgz#4950ceea8e51b1f4265116c0d03d0cbae86d0a6f" - integrity sha512-EQj355rhaSGOLP6WH9P9xu+0Xuy+G5dZUuRTlLPNpICw5x0zrqK+uxQZvMVKWO9zOJA4PDVR1XHO0rm9wbOLuA== +eslint-plugin-mocha@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-6.1.1.tgz#5a036f2f806e1a5fb7d19f7538ebeff3afb15377" + integrity sha512-p/otruG425jRYDa28HjbBYYXoFNzq3Qp++gn5dbE44Kz4NvmIsSUKSV1T+RLYUcZOcdJKKAftXbaqkHFqReKoA== dependencies: ramda "^0.26.1" From 8db88def9967a62d04500d8ffee72ab114d35248 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 12 Sep 2019 11:16:11 +0000 Subject: [PATCH 031/818] Bump eslint-config-prettier from 6.2.0 to 6.3.0 Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.2.0 to 6.3.0. - [Release notes](https://github.com/prettier/eslint-config-prettier/releases) - [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-config-prettier/compare/v6.2.0...v6.3.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 8f46aa606b..d49778e228 100644 --- a/package.json +++ b/package.json @@ -140,7 +140,7 @@ "ember-cli-blueprint-test-helpers": "^0.19.2", "ember-cli-internal-test-helpers": "^0.9.1", "eslint": "^5.16.0", - "eslint-config-prettier": "^6.2.0", + "eslint-config-prettier": "^6.3.0", "eslint-plugin-chai-expect": "^2.0.1", "eslint-plugin-mocha": "^6.1.1", "eslint-plugin-node": "^10.0.0", diff --git a/yarn.lock b/yarn.lock index 438768b12a..bd072c26a7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2371,10 +2371,10 @@ escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1 resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= -eslint-config-prettier@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.2.0.tgz#80e0b8714e3f6868c4ac2a25fbf39c02e73527a7" - integrity sha512-VLsgK/D+S/FEsda7Um1+N8FThec6LqE3vhcMyp8mlmto97y3fGf3DX7byJexGuOb1QY0Z/zz222U5t+xSfcZDQ== +eslint-config-prettier@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.3.0.tgz#e73b48e59dc49d950843f3eb96d519e2248286a3" + integrity sha512-EWaGjlDAZRzVFveh2Jsglcere2KK5CJBhkNSa1xs3KfMUGdRiT7lG089eqPdvlzWHpAqaekubOsOMu8W8Yk71A== dependencies: get-stdin "^6.0.0" From 28140ea32946ba813e6b6fff9210a8936f53e4a2 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 13 Sep 2019 09:37:29 +0000 Subject: [PATCH 032/818] Bump fixturify-project from 1.9.0 to 1.9.1 Bumps [fixturify-project](https://github.com/stefanpenner/node-fixturify-project) from 1.9.0 to 1.9.1. - [Release notes](https://github.com/stefanpenner/node-fixturify-project/releases) - [Commits](https://github.com/stefanpenner/node-fixturify-project/compare/v1.9.0...v1.9.1) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index d49778e228..94ee6ebd30 100644 --- a/package.json +++ b/package.json @@ -146,7 +146,7 @@ "eslint-plugin-node": "^10.0.0", "eslint-plugin-prettier": "^3.0.1", "fixturify": "^1.2.0", - "fixturify-project": "^1.9.0", + "fixturify-project": "^1.9.1", "mocha": "^6.2.0", "nock": "^11.3.3", "nyc": "^14.1.0", diff --git a/yarn.lock b/yarn.lock index bd072c26a7..ae63748670 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2878,10 +2878,10 @@ fireworm@^0.7.0: lodash.flatten "^3.0.2" minimatch "^3.0.2" -fixturify-project@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/fixturify-project/-/fixturify-project-1.9.0.tgz#f90f19dabe6dbaae3f3ab48b6a11ca2ea9b4e1a2" - integrity sha512-SWGkkNxON/wAGoQfUTJOEddhJLfVusUKqJ+NAIdkuTGpg68VSaN2h/biAgLqr/ElUje+Hp5reZeY/z0XKfFJtA== +fixturify-project@^1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/fixturify-project/-/fixturify-project-1.9.1.tgz#64cdf6fd763a8f8975170e1d9d3bbadea0778680" + integrity sha512-KyzFWPWMitlZFDrC6lluvr/UGkJg0ExucR5ubN9uLAHWsGmwghofA8CT5chFJCy5aMWx/SNxYpTygPKaZFERIg== dependencies: fixturify "^1.2.0" tmp "^0.0.33" From ab9d040336f0422ccbde3a9a5d51559f9707942e Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 13 Sep 2019 09:37:57 +0000 Subject: [PATCH 033/818] Bump filesize from 4.1.2 to 4.2.0 Bumps [filesize](https://github.com/avoidwork/filesize.js) from 4.1.2 to 4.2.0. - [Release notes](https://github.com/avoidwork/filesize.js/releases) - [Commits](https://github.com/avoidwork/filesize.js/compare/4.1.2...4.2.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 94ee6ebd30..e57981c628 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "execa": "^1.0.0", "exit": "^0.1.2", "express": "^4.16.4", - "filesize": "^4.1.2", + "filesize": "^4.2.0", "find-up": "^4.1.0", "find-yarn-workspace-root": "^1.2.1", "fs-extra": "^8.1.0", diff --git a/yarn.lock b/yarn.lock index ae63748670..8904844664 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2748,10 +2748,10 @@ file-entry-cache@^5.0.1: dependencies: flat-cache "^2.0.1" -filesize@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/filesize/-/filesize-4.1.2.tgz#fcd570af1353cea97897be64f56183adb995994b" - integrity sha512-iSWteWtfNcrWQTkQw8ble2bnonSl7YJImsn9OZKpE2E4IHhXI78eASpDYUljXZZdYj36QsEKjOs/CsiDqmKMJw== +filesize@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/filesize/-/filesize-4.2.0.tgz#a8c989a179ca3a895cc32eab4abc64ebf6d34d44" + integrity sha512-bdS2UP98MZzLyTZzhuSH5ctAWyDt81n5xMti9BSdmgPXjjENLDz5Bmbk2R7ATVw/HRysZzWA2JIPgcSAOimWpw== fill-range@^4.0.0: version "4.0.0" From d6bbe8923178c8d76f664e9f68b73220c6606dfb Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2019 11:43:48 +0000 Subject: [PATCH 034/818] Bump websocket from 1.0.29 to 1.0.30 Bumps [websocket](https://github.com/theturtle32/WebSocket-Node) from 1.0.29 to 1.0.30. - [Release notes](https://github.com/theturtle32/WebSocket-Node/releases) - [Changelog](https://github.com/theturtle32/WebSocket-Node/blob/master/CHANGELOG.md) - [Commits](https://github.com/theturtle32/WebSocket-Node/compare/v1.0.29...v1.0.30) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 1199 ++------------------------------------------------ 2 files changed, 38 insertions(+), 1163 deletions(-) diff --git a/package.json b/package.json index e57981c628..04d1ba2554 100644 --- a/package.json +++ b/package.json @@ -155,7 +155,7 @@ "strip-ansi": "^5.2.0", "supertest": "^4.0.2", "testdouble": "^3.12.4", - "websocket": "^1.0.29", + "websocket": "^1.0.30", "which": "1.3.1", "yuidoc-ember-cli-theme": "^1.0.4", "yuidocjs": "0.10.2" diff --git a/yarn.lock b/yarn.lock index 8904844664..4d2b036949 100644 --- a/yarn.lock +++ b/yarn.lock @@ -335,25 +335,11 @@ ansi-colors@3.2.3: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== -ansi-colors@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-1.1.0.tgz#6374b4dd5d4718ff3ce27a671a3b1cad077132a9" - integrity sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA== - dependencies: - ansi-wrap "^0.1.0" - ansi-escapes@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== -ansi-gray@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ansi-gray/-/ansi-gray-0.1.1.tgz#2962cf54ec9792c48510a3deb524436861ef7251" - integrity sha1-KWLPVOyXksSFEKPetSRDaGHvclE= - dependencies: - ansi-wrap "0.1.0" - ansi-html@^0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e" @@ -386,11 +372,6 @@ ansi-styles@^3.0.0, ansi-styles@^3.2.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansi-wrap@0.1.0, ansi-wrap@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" - integrity sha1-qCJQ3bABXponyoLoLqYDu/pF768= - ansicolors@~0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.2.1.tgz#be089599097b74a5c9c4a84a0cdbcdb62bd87aef" @@ -404,13 +385,6 @@ anymatch@^2.0.0: micromatch "^3.1.4" normalize-path "^2.1.1" -append-buffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/append-buffer/-/append-buffer-1.0.2.tgz#d8220cf466081525efea50614f3de6514dfa58f1" - integrity sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE= - dependencies: - buffer-equal "^1.0.0" - append-transform@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab" @@ -448,35 +422,16 @@ arr-diff@^4.0.0: resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= -arr-filter@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/arr-filter/-/arr-filter-1.1.2.tgz#43fdddd091e8ef11aa4c45d9cdc18e2dff1711ee" - integrity sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4= - dependencies: - make-iterator "^1.0.0" - -arr-flatten@^1.0.1, arr-flatten@^1.1.0: +arr-flatten@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== -arr-map@^2.0.0, arr-map@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/arr-map/-/arr-map-2.0.2.tgz#3a77345ffc1cf35e2a91825601f9e58f2e24cac4" - integrity sha1-Onc0X/wc814qkYJWAfnljy4kysQ= - dependencies: - make-iterator "^1.0.0" - arr-union@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= -array-each@^1.0.0, array-each@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/array-each/-/array-each-1.0.1.tgz#a794af0c05ab1752846ee753a1f211a05ba0c44f" - integrity sha1-p5SvDAWrF1KEbudTofIRoFugxE8= - array-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" @@ -487,35 +442,6 @@ array-flatten@1.1.1: resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= -array-initial@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/array-initial/-/array-initial-1.1.0.tgz#2fa74b26739371c3947bd7a7adc73be334b3d795" - integrity sha1-L6dLJnOTccOUe9enrcc74zSz15U= - dependencies: - array-slice "^1.0.0" - is-number "^4.0.0" - -array-last@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/array-last/-/array-last-1.3.0.tgz#7aa77073fec565ddab2493f5f88185f404a9d336" - integrity sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg== - dependencies: - is-number "^4.0.0" - -array-slice@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-1.1.0.tgz#e368ea15f89bc7069f7ffb89aec3a6c7d4ac22d4" - integrity sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w== - -array-sort@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-sort/-/array-sort-1.0.0.tgz#e4c05356453f56f53512a7d1d6123f2c54c0a88a" - integrity sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg== - dependencies: - default-compare "^1.0.0" - get-value "^2.0.6" - kind-of "^5.0.2" - array-to-error@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/array-to-error/-/array-to-error-1.1.1.tgz#d68812926d14097a205579a667eeaf1856a44c07" @@ -576,21 +502,6 @@ async-disk-cache@^1.2.1: rsvp "^3.0.18" username-sync "^1.0.2" -async-done@^1.2.0, async-done@^1.2.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/async-done/-/async-done-1.3.2.tgz#5e15aa729962a4b07414f528a88cdf18e0b290a2" - integrity sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.2" - process-nextick-args "^2.0.0" - stream-exhaust "^1.0.1" - -async-each@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" - integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== - async-limiter@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" @@ -604,13 +515,6 @@ async-promise-queue@^1.0.3: async "^2.4.1" debug "^2.6.8" -async-settle@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/async-settle/-/async-settle-1.0.0.tgz#1d0a914bb02575bec8a8f3a74e5080f72b2c0c6b" - integrity sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs= - dependencies: - async-done "^1.2.2" - async@^1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" @@ -671,21 +575,6 @@ babel-plugin-module-resolver@^3.2.0: reselect "^3.0.1" resolve "^1.4.0" -bach@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/bach/-/bach-1.2.0.tgz#4b3ce96bf27134f79a1b414a51c14e34c3bd9880" - integrity sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA= - dependencies: - arr-filter "^1.1.1" - arr-flatten "^1.0.1" - arr-map "^2.0.0" - array-each "^1.0.0" - array-initial "^1.0.0" - array-last "^1.1.1" - async-done "^1.2.2" - async-settle "^1.0.0" - now-and-later "^2.0.0" - backbone@^1.1.2: version "1.4.0" resolved "https://registry.yarnpkg.com/backbone/-/backbone-1.4.0.tgz#54db4de9df7c3811c3f032f34749a4cd27f3bd12" @@ -745,11 +634,6 @@ better-assert@~1.0.0: dependencies: callsite "1.0.0" -binary-extensions@^1.0.0: - version "1.13.1" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" - integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== - "binaryextensions@1 || 2": version "2.1.2" resolved "https://registry.yarnpkg.com/binaryextensions/-/binaryextensions-2.1.2.tgz#c83c3d74233ba7674e4f313cb2a2b70f54e94b7c" @@ -827,7 +711,7 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -braces@^2.3.1, braces@^2.3.2: +braces@^2.3.1: version "2.3.2" resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== @@ -1236,21 +1120,11 @@ buffer-alloc@^1.2.0: buffer-alloc-unsafe "^1.1.0" buffer-fill "^1.0.0" -buffer-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-equal/-/buffer-equal-1.0.0.tgz#59616b498304d556abd466966b22eeda3eca5fbe" - integrity sha1-WWFrSYME1Var1GaWayLu2j7KX74= - buffer-fill@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" integrity sha1-+PeLdniYiO858gXNY39o5wISKyw= -buffer-from@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" - integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== - builtins@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" @@ -1326,11 +1200,6 @@ callsites@^3.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -camelcase@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" - integrity sha1-MvxLn82vhF/N9+c7uXysImHwqwo= - camelcase@^5.0.0: version "5.3.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" @@ -1437,30 +1306,6 @@ check-error@^1.0.2: resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= -chokidar@^2.0.0: - version "2.1.6" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.6.tgz#b6cad653a929e244ce8a834244164d241fa954c5" - integrity sha512-V2jUo67OKkc6ySiRpJrjlpJKl9kDuG+Xb8VgsGzb+aEouhgS1D0weyPU4lEzdAcsCAvrih2J2BqyXqHWvVLw5g== - dependencies: - anymatch "^2.0.0" - async-each "^1.0.1" - braces "^2.3.2" - glob-parent "^3.1.0" - inherits "^2.0.3" - is-binary-path "^1.0.0" - is-glob "^4.0.0" - normalize-path "^3.0.0" - path-is-absolute "^1.0.0" - readdirp "^2.2.1" - upath "^1.1.1" - optionalDependencies: - fsevents "^1.2.7" - -chownr@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494" - integrity sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g== - ci-info@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" @@ -1527,15 +1372,6 @@ cli-width@^2.0.0: resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= -cliui@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" - integrity sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi "^2.0.0" - cliui@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" @@ -1554,11 +1390,6 @@ cliui@^5.0.0: strip-ansi "^5.2.0" wrap-ansi "^5.1.0" -clone-buffer@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58" - integrity sha1-4+JbIHrE5wGvch4staFnksrD3Fg= - clone-response@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" @@ -1566,30 +1397,16 @@ clone-response@1.0.2: dependencies: mimic-response "^1.0.0" -clone-stats@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680" - integrity sha1-s3gt/4u1R04Yuba/D9/ngvh3doA= - clone@^1.0.2: version "1.0.4" resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= -clone@^2.1.1, clone@^2.1.2: +clone@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= -cloneable-readable@^1.0.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/cloneable-readable/-/cloneable-readable-1.1.3.tgz#120a00cb053bfb63a222e709f9683ea2e11d8cec" - integrity sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ== - dependencies: - inherits "^2.0.1" - process-nextick-args "^2.0.0" - readable-stream "^2.3.5" - co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" @@ -1600,15 +1417,6 @@ code-point-at@^1.0.0: resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= -collection-map@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/collection-map/-/collection-map-1.0.0.tgz#aea0f06f8d26c780c2b75494385544b2255af18c" - integrity sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw= - dependencies: - arr-map "^2.0.2" - for-own "^1.0.0" - make-iterator "^1.0.0" - collection-visit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" @@ -1629,11 +1437,6 @@ color-name@1.1.3: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= -color-support@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" - integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== - colors@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" @@ -1715,16 +1518,6 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -concat-stream@^1.6.0: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - configstore@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/configstore/-/configstore-5.0.0.tgz#37de662c7a49b5fe8dbcf8f6f5818d2d81ed852b" @@ -1787,7 +1580,7 @@ continuable-cache@^0.3.1: resolved "https://registry.yarnpkg.com/continuable-cache/-/continuable-cache-0.3.1.tgz#bd727a7faed77e71ff3985ac93351a912733ad0f" integrity sha1-vXJ6f67XfnH/OYWskzUakSczrQ8= -convert-source-map@^1.1.0, convert-source-map@^1.5.0, convert-source-map@^1.6.0: +convert-source-map@^1.1.0, convert-source-map@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" integrity sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A== @@ -1819,14 +1612,6 @@ copy-descriptor@^0.1.0: resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= -copy-props@^2.0.1: - version "2.0.4" - resolved "https://registry.yarnpkg.com/copy-props/-/copy-props-2.0.4.tgz#93bb1cadfafd31da5bb8a9d4b41f471ec3a72dfe" - integrity sha512-7cjuUME+p+S3HZlbllgsn2CDwS+5eCCX16qBgNC4jgSTf49qR1VKy/Zhl400m0IQXl/bPGEVqncgUUMjrr4s8A== - dependencies: - each-props "^1.3.0" - is-plain-object "^2.0.1" - core-js@^2.6.5: version "2.6.9" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.9.tgz#6b4b214620c834152e179323727fc19741b084f2" @@ -1891,14 +1676,6 @@ ctype@0.5.3: resolved "https://registry.yarnpkg.com/ctype/-/ctype-0.5.3.tgz#82c18c2461f74114ef16c135224ad0b9144ca12f" integrity sha1-gsGMJGH3QRTvFsE1IkrQuRRMoS8= -d@1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" - integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== - dependencies: - es5-ext "^0.10.50" - type "^1.0.1" - dag-map@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/dag-map/-/dag-map-2.0.2.tgz#9714b472de82a1843de2fba9b6876938cab44c68" @@ -1932,7 +1709,7 @@ debug@~3.1.0: dependencies: ms "2.0.0" -decamelize@^1.1.1, decamelize@^1.2.0: +decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= @@ -1963,11 +1740,6 @@ deep-eql@^3.0.1: dependencies: type-detect "^4.0.0" -deep-extend@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" - integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== - deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" @@ -1978,13 +1750,6 @@ deepmerge@3.2.0: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-3.2.0.tgz#58ef463a57c08d376547f8869fdc5bcee957f44e" integrity sha512-6+LuZGU7QCNUnAJyX8cIrlzoEgggTM6B7mm+znKOX4t5ltluT9KLjN6g61ECMS0LTsLW7yDpNoxhix5FZcrIow== -default-compare@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/default-compare/-/default-compare-1.0.0.tgz#cb61131844ad84d84788fb68fd01681ca7781a2f" - integrity sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ== - dependencies: - kind-of "^5.0.2" - default-require-extensions@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-2.0.0.tgz#f5f8fbb18a7d6d50b21f641f649ebb522cfe24f7" @@ -1992,11 +1757,6 @@ default-require-extensions@^2.0.0: dependencies: strip-bom "^3.0.0" -default-resolution@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/default-resolution/-/default-resolution-2.0.0.tgz#bcb82baa72ad79b426a76732f1a81ad6df26d684" - integrity sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ= - defaults@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" @@ -2073,11 +1833,6 @@ detect-indent@^5.0.0: resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" integrity sha1-OHHMCmoALow+Wzz38zYmRnXwa50= -detect-libc@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" - integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= - diff@3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" @@ -2107,24 +1862,6 @@ duplexer3@^0.1.4: resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= -duplexify@^3.6.0: - version "3.7.1" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" - integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== - dependencies: - end-of-stream "^1.0.0" - inherits "^2.0.1" - readable-stream "^2.0.0" - stream-shift "^1.0.0" - -each-props@^1.3.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/each-props/-/each-props-1.3.2.tgz#ea45a414d16dd5cfa419b1a81720d5ca06892333" - integrity sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA== - dependencies: - is-plain-object "^2.0.1" - object.defaults "^1.1.0" - editions@^1.1.1: version "1.3.4" resolved "https://registry.yarnpkg.com/editions/-/editions-1.3.4.tgz#3662cb592347c3168eb8e498a0ff73271d67f50b" @@ -2227,7 +1964,7 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= -end-of-stream@^1.0.0, end-of-stream@^1.1.0: +end-of-stream@^1.1.0: version "1.4.1" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" integrity sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q== @@ -2284,7 +2021,7 @@ entities@~1.1.1: resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== -error-ex@^1.2.0, error-ex@^1.3.1: +error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== @@ -2320,47 +2057,11 @@ es-to-primitive@^1.2.0: is-date-object "^1.0.1" is-symbol "^1.0.2" -es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@~0.10.14: - version "0.10.50" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.50.tgz#6d0e23a0abdb27018e5ac4fd09b412bc5517a778" - integrity sha512-KMzZTPBkeQV/JcSQhI5/z6d9VWJ3EnQ194USTUwIYZ2ZbpN8+SGXQKt1h68EX44+qt+Fzr8DO17vnxrw7c3agw== - dependencies: - es6-iterator "~2.0.3" - es6-symbol "~3.1.1" - next-tick "^1.0.0" - es6-error@^4.0.1: version "4.1.1" resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d" integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg== -es6-iterator@^2.0.1, es6-iterator@^2.0.3, es6-iterator@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" - integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= - dependencies: - d "1" - es5-ext "^0.10.35" - es6-symbol "^3.1.1" - -es6-symbol@^3.1.1, es6-symbol@~3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" - integrity sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc= - dependencies: - d "1" - es5-ext "~0.10.14" - -es6-weak-map@^2.0.1: - version "2.0.3" - resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.3.tgz#b6da1f16cc2cc0d9be43e6bdbfc5e7dfcdf31d53" - integrity sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA== - dependencies: - d "1" - es5-ext "^0.10.46" - es6-iterator "^2.0.3" - es6-symbol "^3.1.1" - escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -2669,16 +2370,6 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" -fancy-log@^1.3.2: - version "1.3.3" - resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.3.tgz#dbc19154f558690150a23953a0adbd035be45fc7" - integrity sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw== - dependencies: - ansi-gray "^0.1.1" - color-support "^1.1.3" - parse-node-version "^1.0.0" - time-stamp "^1.0.0" - fast-deep-equal@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" @@ -2805,14 +2496,6 @@ find-up@3.0.0, find-up@^3.0.0: dependencies: locate-path "^3.0.0" -find-up@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" - integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= - dependencies: - path-exists "^2.0.0" - pinkie-promise "^2.0.0" - find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" @@ -2846,27 +2529,6 @@ findup-sync@^2.0.0: micromatch "^3.0.4" resolve-dir "^1.0.1" -findup-sync@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-3.0.0.tgz#17b108f9ee512dfb7a5c7f3c8b27ea9e1a9c08d1" - integrity sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg== - dependencies: - detect-file "^1.0.0" - is-glob "^4.0.0" - micromatch "^3.0.4" - resolve-dir "^1.0.1" - -fined@^1.0.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/fined/-/fined-1.2.0.tgz#d00beccf1aa2b475d16d423b0238b713a2c4a37b" - integrity sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng== - dependencies: - expand-tilde "^2.0.2" - is-plain-object "^2.0.3" - object.defaults "^1.1.0" - object.pick "^1.2.0" - parse-filepath "^1.0.1" - fireworm@^0.7.0: version "0.7.1" resolved "https://registry.yarnpkg.com/fireworm/-/fireworm-0.7.1.tgz#ccf20f7941f108883fcddb99383dbe6e1861c758" @@ -2905,11 +2567,6 @@ fixturify@^1.2.0: fs-extra "^7.0.1" matcher-collection "^2.0.0" -flagged-respawn@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-1.0.1.tgz#e7de6f1279ddd9ca9aac8a5971d618606b3aab41" - integrity sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q== - flat-cache@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" @@ -2931,14 +2588,6 @@ flatted@^2.0.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.0.tgz#55122b6536ea496b4b44893ee2608141d10d9916" integrity sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg== -flush-write-stream@^1.0.2: - version "1.1.1" - resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" - integrity sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w== - dependencies: - inherits "^2.0.3" - readable-stream "^2.3.6" - follow-redirects@^1.0.0: version "1.7.0" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.7.0.tgz#489ebc198dc0e7f64167bd23b03c4c19b5784c76" @@ -2946,18 +2595,11 @@ follow-redirects@^1.0.0: dependencies: debug "^3.2.6" -for-in@^1.0.1, for-in@^1.0.2: +for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= -for-own@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-1.0.0.tgz#c63332f415cedc4b04dbfe70cf836494c53cb44b" - integrity sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs= - dependencies: - for-in "^1.0.1" - foreground-child@^1.5.6: version "1.5.6" resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-1.5.6.tgz#4fd71ad2dfde96789b980a5c0a295937cb2f5ce9" @@ -3076,21 +2718,6 @@ fs-extra@^8.0.1, fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" -fs-minipass@^1.2.5: - version "1.2.6" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.6.tgz#2c5cc30ded81282bfe8a0d7c7c1853ddeb102c07" - integrity sha512-crhvyXcMejjv3Z5d2Fa9sf5xLYVCF5O1c71QxbVnbLsmYMBEvDAftewesN/HhY03YRoA7zOMxjNGrF5svGaaeQ== - dependencies: - minipass "^2.2.1" - -fs-mkdirp-stream@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz#0b7815fc3201c6a69e14db98ce098c16935259eb" - integrity sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes= - dependencies: - graceful-fs "^4.1.11" - through2 "^2.0.3" - fs-sync@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/fs-sync/-/fs-sync-1.0.6.tgz#13f1d33a82edf441805fcc7cf6fabe246936166d" @@ -3139,14 +2766,6 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -fsevents@^1.2.7: - version "1.2.9" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.9.tgz#3f5ed66583ccd6f400b5a00db6f7e861363e388f" - integrity sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw== - dependencies: - nan "^2.12.1" - node-pre-gyp "^0.12.0" - function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" @@ -3218,42 +2837,6 @@ git-repo-info@^2.1.0: resolved "https://registry.yarnpkg.com/git-repo-info/-/git-repo-info-2.1.0.tgz#13d1f753c75bc2994432e65a71e35377ff563813" integrity sha512-+kigfDB7j3W80f74BoOUX+lKOmf4pR3/i2Ww6baKTCPe2hD4FRdjhV3s4P5Dy0Tak1uY1891QhKoYNtnyX2VvA== -glob-parent@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" - integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= - dependencies: - is-glob "^3.1.0" - path-dirname "^1.0.0" - -glob-stream@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-6.1.0.tgz#7045c99413b3eb94888d83ab46d0b404cc7bdde4" - integrity sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ= - dependencies: - extend "^3.0.0" - glob "^7.1.1" - glob-parent "^3.1.0" - is-negated-glob "^1.0.0" - ordered-read-streams "^1.0.0" - pumpify "^1.3.5" - readable-stream "^2.1.5" - remove-trailing-separator "^1.0.1" - to-absolute-glob "^2.0.0" - unique-stream "^2.0.2" - -glob-watcher@^5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/glob-watcher/-/glob-watcher-5.0.3.tgz#88a8abf1c4d131eb93928994bc4a593c2e5dd626" - integrity sha512-8tWsULNEPHKQ2MR4zXuzSmqbdyV5PtwwCaWSGQ1WwHsJ07ilNeN1JB8ntxhckbnpSHaf9dXFUHzIWvm1I13dsg== - dependencies: - anymatch "^2.0.0" - async-done "^1.2.0" - chokidar "^2.0.0" - is-negated-glob "^1.0.0" - just-debounce "^1.0.0" - object.defaults "^1.1.0" - glob@7.1.3: version "7.1.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" @@ -3277,7 +2860,7 @@ glob@^5.0.10: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.4, glob@^7.1.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: +glob@^7.0.4, glob@^7.1.0, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: version "7.1.4" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== @@ -3314,13 +2897,6 @@ globals@^11.1.0, globals@^11.7.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -glogg@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.2.tgz#2d7dd702beda22eb3bffadf880696da6d846313f" - integrity sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA== - dependencies: - sparkles "^1.0.0" - got@^8.0.1: version "8.3.2" resolved "https://registry.yarnpkg.com/got/-/got-8.3.2.tgz#1d23f64390e97f776cac52e5b936e5f514d2e937" @@ -3344,7 +2920,7 @@ got@^8.0.1: url-parse-lax "^3.0.0" url-to-options "^1.0.1" -graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0: +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.0.tgz#8d8fdc73977cb04104721cb53666c1ca64cd328b" integrity sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg== @@ -3364,47 +2940,6 @@ growly@^1.3.0: resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= -gulp-cli@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/gulp-cli/-/gulp-cli-2.2.0.tgz#5533126eeb7fe415a7e3e84a297d334d5cf70ebc" - integrity sha512-rGs3bVYHdyJpLqR0TUBnlcZ1O5O++Zs4bA0ajm+zr3WFCfiSLjGwoCBqFs18wzN+ZxahT9DkOK5nDf26iDsWjA== - dependencies: - ansi-colors "^1.0.1" - archy "^1.0.0" - array-sort "^1.0.0" - color-support "^1.1.3" - concat-stream "^1.6.0" - copy-props "^2.0.1" - fancy-log "^1.3.2" - gulplog "^1.0.0" - interpret "^1.1.0" - isobject "^3.0.1" - liftoff "^3.1.0" - matchdep "^2.0.0" - mute-stdout "^1.0.0" - pretty-hrtime "^1.0.0" - replace-homedir "^1.0.0" - semver-greatest-satisfied-range "^1.1.0" - v8flags "^3.0.1" - yargs "^7.1.0" - -gulp@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/gulp/-/gulp-4.0.2.tgz#543651070fd0f6ab0a0650c6a3e6ff5a7cb09caa" - integrity sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA== - dependencies: - glob-watcher "^5.0.3" - gulp-cli "^2.2.0" - undertaker "^1.2.1" - vinyl-fs "^3.0.0" - -gulplog@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/gulplog/-/gulplog-1.0.0.tgz#e28c4d45d05ecbbed818363ce8f9c5926229ffe5" - integrity sha1-4oxNRdBey77YGDY86PnFkmIp/+U= - dependencies: - glogg "^1.0.0" - handlebars@^4.0.11, handlebars@^4.0.4, handlebars@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.1.2.tgz#b6b37c1ced0306b221e094fc7aca3ec23b131b67" @@ -3640,20 +3175,13 @@ https@^1.0.0: resolved "https://registry.yarnpkg.com/https/-/https-1.0.0.tgz#3c37c7ae1a8eeb966904a2ad1e975a194b7ed3a4" integrity sha1-PDfHrhqO65ZpBKKtHpdaGUt+06Q= -iconv-lite@0.4.24, iconv-lite@^0.4.13, iconv-lite@^0.4.24, iconv-lite@^0.4.4: +iconv-lite@0.4.24, iconv-lite@^0.4.13, iconv-lite@^0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== dependencies: safer-buffer ">= 2.1.2 < 3" -ignore-walk@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" - integrity sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ== - dependencies: - minimatch "^3.0.4" - ignore@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" @@ -3700,7 +3228,7 @@ inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, i resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= -ini@^1.3.4, ini@~1.3.0: +ini@^1.3.4: version "1.3.5" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== @@ -3735,11 +3263,6 @@ inquirer@^6, inquirer@^6.2.2: strip-ansi "^5.1.0" through "^2.3.6" -interpret@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296" - integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw== - into-stream@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-3.1.0.tgz#96fb0a936c12babd6ff1752a17d05616abd094c6" @@ -3748,11 +3271,6 @@ into-stream@^3.1.0: from2 "^2.1.1" p-is-promise "^1.1.0" -invert-kv@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" - integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= - invert-kv@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" @@ -3768,14 +3286,6 @@ ipaddr.js@1.9.0: resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.0.tgz#37df74e430a0e47550fe54a2defe30d8acd95f65" integrity sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA== -is-absolute@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-1.0.0.tgz#395e1ae84b11f26ad1795e73c17378e48a301576" - integrity sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA== - dependencies: - is-relative "^1.0.0" - is-windows "^1.0.1" - is-accessor-descriptor@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" @@ -3795,13 +3305,6 @@ is-arrayish@^0.2.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= -is-binary-path@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" - integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= - dependencies: - binary-extensions "^1.0.0" - is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" @@ -3866,7 +3369,7 @@ is-extendable@^1.0.1: dependencies: is-plain-object "^2.0.4" -is-extglob@^2.1.0, is-extglob@^2.1.1: +is-extglob@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= @@ -3895,18 +3398,6 @@ is-glob@^3.1.0: dependencies: is-extglob "^2.1.0" -is-glob@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" - integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== - dependencies: - is-extglob "^2.1.1" - -is-negated-glob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-negated-glob/-/is-negated-glob-1.0.0.tgz#6910bca5da8c95e784b5751b976cf5a10fee36d2" - integrity sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI= - is-number@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" @@ -3914,11 +3405,6 @@ is-number@^3.0.0: dependencies: kind-of "^3.0.2" -is-number@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" - integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== - is-obj@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" @@ -3965,13 +3451,6 @@ is-regexp@^1.0.0: resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" integrity sha1-/S2INUXEa6xaYz57mgnof6LLUGk= -is-relative@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-1.0.0.tgz#a1bb6935ce8c5dba1e8b9754b9b2dcc020e2260d" - integrity sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA== - dependencies: - is-unc-path "^1.0.0" - is-retry-allowed@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34" @@ -4001,23 +3480,6 @@ is-typedarray@^1.0.0: resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= -is-unc-path@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-1.0.0.tgz#d731e8898ed090a12c352ad2eaed5095ad322c9d" - integrity sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ== - dependencies: - unc-path-regex "^0.1.2" - -is-utf8@^0.2.0, is-utf8@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" - integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= - -is-valid-glob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-1.0.0.tgz#29bf3eff701be2d4d315dbacc39bc39fe8f601aa" - integrity sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao= - is-windows@^1.0.1, is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" @@ -4227,11 +3689,6 @@ jsonify@~0.0.0: resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= -just-debounce@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/just-debounce/-/just-debounce-1.0.0.tgz#87fccfaeffc0b68cd19d55f6722943f929ea35ea" - integrity sha1-h/zPrv/AtozRnVX2cilD+SnqNeo= - keyv@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.0.0.tgz#44923ba39e68b12a7cec7df6c3268c031f2ef373" @@ -4253,7 +3710,7 @@ kind-of@^4.0.0: dependencies: is-buffer "^1.1.5" -kind-of@^5.0.0, kind-of@^5.0.2: +kind-of@^5.0.0: version "5.1.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== @@ -4270,28 +3727,6 @@ klaw@^1.0.0: optionalDependencies: graceful-fs "^4.1.9" -last-run@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/last-run/-/last-run-1.1.1.tgz#45b96942c17b1c79c772198259ba943bebf8ca5b" - integrity sha1-RblpQsF7HHnHchmCWbqUO+v4yls= - dependencies: - default-resolution "^2.0.0" - es6-weak-map "^2.0.1" - -lazystream@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" - integrity sha1-9plf4PggOS9hOWvolGJAe7dxaOQ= - dependencies: - readable-stream "^2.0.5" - -lcid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" - integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= - dependencies: - invert-kv "^1.0.0" - lcid@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" @@ -4299,13 +3734,6 @@ lcid@^2.0.0: dependencies: invert-kv "^2.0.0" -lead@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lead/-/lead-1.0.0.tgz#6f14f99a37be3a9dd784f5495690e5903466ee42" - integrity sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI= - dependencies: - flush-write-stream "^1.0.2" - leek@0.0.24: version "0.0.24" resolved "https://registry.yarnpkg.com/leek/-/leek-0.0.24.tgz#e400e57f0e60d8ef2bd4d068dc428a54345dbcda" @@ -4323,20 +3751,6 @@ levn@^0.3.0, levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" -liftoff@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/liftoff/-/liftoff-3.1.0.tgz#c9ba6081f908670607ee79062d700df062c52ed3" - integrity sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog== - dependencies: - extend "^3.0.0" - findup-sync "^3.0.0" - fined "^1.0.1" - flagged-respawn "^1.0.0" - is-plain-object "^2.0.4" - object.map "^1.0.0" - rechoir "^0.6.2" - resolve "^1.1.7" - linkify-it@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-2.1.0.tgz#c4caf38a6cd7ac2212ef3c7d2bde30a91561f9db" @@ -4356,17 +3770,6 @@ livereload-js@^2.3.0: resolved "https://registry.yarnpkg.com/livereload-js/-/livereload-js-2.4.0.tgz#447c31cf1ea9ab52fc20db615c5ddf678f78009c" integrity sha512-XPQH8Z2GDP/Hwz2PCDrh2mth4yFejwA1OZ/81Ti3LgKyhDcEjsSsqFWZojHG0va/duGd+WyosY7eXLDoOyqcPw== -load-json-file@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" - integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - pinkie-promise "^2.0.0" - strip-bom "^2.0.0" - load-json-file@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" @@ -4834,13 +4237,6 @@ make-dir@^3.0.0: dependencies: semver "^6.0.0" -make-iterator@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/make-iterator/-/make-iterator-1.0.1.tgz#29b33f312aa8f547c4a5e490f56afcec99133ad6" - integrity sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw== - dependencies: - kind-of "^6.0.2" - makeerror@1.0.x: version "1.0.11" resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" @@ -4855,7 +4251,7 @@ map-age-cleaner@^0.1.1: dependencies: p-defer "^1.0.0" -map-cache@^0.2.0, map-cache@^0.2.2: +map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= @@ -4911,16 +4307,6 @@ markdown-it@^9.1.0: mdurl "^1.0.1" uc.micro "^1.0.5" -matchdep@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/matchdep/-/matchdep-2.0.0.tgz#c6f34834a0d8dbc3b37c27ee8bbcb27c7775582e" - integrity sha1-xvNINKDY28OzfCfui7yyfHd1WC4= - dependencies: - findup-sync "^2.0.0" - micromatch "^3.0.4" - resolve "^1.4.0" - stack-trace "0.0.10" - matcher-collection@^1.0.0, matcher-collection@^1.0.4, matcher-collection@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/matcher-collection/-/matcher-collection-1.1.2.tgz#1076f506f10ca85897b53d14ef54f90a5c426838" @@ -5004,7 +4390,7 @@ methods@^1.1.1, methods@^1.1.2, methods@~1.1.2: resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= -micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4: +micromatch@^3.0.4, micromatch@^3.1.4: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== @@ -5087,7 +4473,7 @@ minimist@~0.0.1: resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= -minipass@^2.2.0, minipass@^2.2.1, minipass@^2.3.5: +minipass@^2.2.0: version "2.3.5" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848" integrity sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA== @@ -5095,13 +4481,6 @@ minipass@^2.2.0, minipass@^2.2.1, minipass@^2.3.5: safe-buffer "^5.1.2" yallist "^3.0.0" -minizlib@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.1.tgz#dd27ea6136243c7c880684e8672bb3a45fd9b614" - integrity sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA== - dependencies: - minipass "^2.2.1" - mixin-deep@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" @@ -5182,17 +4561,12 @@ mustache@^3.0.0: resolved "https://registry.yarnpkg.com/mustache/-/mustache-3.0.1.tgz#873855f23aa8a95b150fb96d9836edbc5a1d248a" integrity sha512-jFI/4UVRsRYdUbuDTKT7KzfOp7FiD5WzYmmwNwXyUVypC0xjoTL78Fqc0jHUPIvvGD+6DQSPHIt1NE7D1ArsqA== -mute-stdout@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mute-stdout/-/mute-stdout-1.0.1.tgz#acb0300eb4de23a7ddeec014e3e96044b3472331" - integrity sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg== - mute-stream@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= -nan@^2.11.0, nan@^2.12.1: +nan@^2.14.0: version "2.14.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== @@ -5219,15 +4593,6 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= -needle@^2.2.1: - version "2.4.0" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.4.0.tgz#6833e74975c444642590e15a750288c5f939b57c" - integrity sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg== - dependencies: - debug "^3.2.6" - iconv-lite "^0.4.4" - sax "^1.2.4" - negotiator@0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" @@ -5243,11 +4608,6 @@ nested-error-stacks@^2.0.0: resolved "https://registry.yarnpkg.com/nested-error-stacks/-/nested-error-stacks-2.1.0.tgz#0fbdcf3e13fe4994781280524f8b96b0cdff9c61" integrity sha512-AO81vsIO1k1sM4Zrd6Hu7regmJN1NSiAja10gc4bX3F0wd+9rQmcuHQaHVQCYIEC8iFXnE+mavh23GOt7wBgug== -next-tick@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" - integrity sha1-yobR/ogoFpsBICCOPchCS524NCw= - nice-try@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" @@ -5299,22 +4659,6 @@ node-notifier@^5.0.1: shellwords "^0.1.1" which "^1.3.0" -node-pre-gyp@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz#39ba4bb1439da030295f899e3b520b7785766149" - integrity sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A== - dependencies: - detect-libc "^1.0.2" - mkdirp "^0.5.1" - needle "^2.2.1" - nopt "^4.0.1" - npm-packlist "^1.1.6" - npmlog "^4.0.2" - rc "^1.2.7" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^4" - node-uuid@~1.4.0: version "1.4.8" resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.8.tgz#b040eb0923968afabf8d32fb1f17f1167fdab907" @@ -5327,14 +4671,6 @@ nopt@^3.0.6: dependencies: abbrev "1" -nopt@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" - integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00= - dependencies: - abbrev "1" - osenv "^0.1.4" - normalize-package-data@^2.3.2: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" @@ -5352,11 +4688,6 @@ normalize-path@^2.1.1: dependencies: remove-trailing-separator "^1.0.1" -normalize-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - normalize-url@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-2.0.1.tgz#835a9da1551fa26f70e92329069a23aa6574d7e6" @@ -5366,18 +4697,6 @@ normalize-url@2.0.1: query-string "^5.0.1" sort-keys "^2.0.0" -now-and-later@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/now-and-later/-/now-and-later-2.0.1.tgz#8e579c8685764a7cc02cb680380e94f43ccb1f7c" - integrity sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ== - dependencies: - once "^1.3.2" - -npm-bundled@^1.0.1: - version "1.0.6" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.6.tgz#e7ba9aadcef962bb61248f91721cd932b3fe6bdd" - integrity sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g== - npm-package-arg@^6.1.1: version "6.1.1" resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.1.tgz#02168cb0a49a2b75bf988a28698de7b529df5cb7" @@ -5388,14 +4707,6 @@ npm-package-arg@^6.1.1: semver "^5.6.0" validate-npm-package-name "^3.0.0" -npm-packlist@^1.1.6: - version "1.4.2" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.2.tgz#a9d63153d4fb0547e6d4342e4102ba6c3bd2b2c7" - integrity sha512-pyJclkNoBBckB6K/XPcMp8fP60MaqSZBPQVsNY7Yyc9VP1TUnPMYwck5YaBejf0L7xYr8f4l16+IENeZ0by+yw== - dependencies: - ignore-walk "^3.0.1" - npm-bundled "^1.0.1" - npm-run-path@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" @@ -5403,7 +4714,7 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" -npmlog@^4.0.0, npmlog@^4.0.2: +npmlog@^4.0.0: version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== @@ -5490,7 +4801,7 @@ object-visit@^1.0.0: dependencies: isobject "^3.0.0" -object.assign@4.1.0, object.assign@^4.0.4, object.assign@^4.1.0: +object.assign@4.1.0, object.assign@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== @@ -5500,16 +4811,6 @@ object.assign@4.1.0, object.assign@^4.0.4, object.assign@^4.1.0: has-symbols "^1.0.0" object-keys "^1.0.11" -object.defaults@^1.0.0, object.defaults@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/object.defaults/-/object.defaults-1.1.0.tgz#3a7f868334b407dea06da16d88d5cd29e435fecf" - integrity sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8= - dependencies: - array-each "^1.0.1" - array-slice "^1.0.0" - for-own "^1.0.0" - isobject "^3.0.0" - object.getownpropertydescriptors@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" @@ -5518,29 +4819,13 @@ object.getownpropertydescriptors@^2.0.3: define-properties "^1.1.2" es-abstract "^1.5.1" -object.map@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object.map/-/object.map-1.0.1.tgz#cf83e59dc8fcc0ad5f4250e1f78b3b81bd801d37" - integrity sha1-z4Plncj8wK1fQlDh94s7gb2AHTc= - dependencies: - for-own "^1.0.0" - make-iterator "^1.0.0" - -object.pick@^1.2.0, object.pick@^1.3.0: +object.pick@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= dependencies: isobject "^3.0.1" -object.reduce@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object.reduce/-/object.reduce-1.0.1.tgz#6fe348f2ac7fa0f95ca621226599096825bb03ad" - integrity sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60= - dependencies: - for-own "^1.0.0" - make-iterator "^1.0.0" - octokit-pagination-methods@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz#cf472edc9d551055f9ef73f6e42b4dbb4c80bea4" @@ -5558,7 +4843,7 @@ on-headers@~1.0.1, on-headers@~1.0.2: resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== -once@^1.3.0, once@^1.3.1, once@^1.3.2, once@^1.4.0: +once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= @@ -5604,25 +4889,11 @@ ora@^3.4.0: strip-ansi "^5.2.0" wcwidth "^1.0.1" -ordered-read-streams@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz#77c0cb37c41525d64166d990ffad7ec6a0e1363e" - integrity sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4= - dependencies: - readable-stream "^2.0.1" - os-homedir@^1.0.0, os-homedir@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= -os-locale@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" - integrity sha1-IPnxeuKe00XoveWDsT0gCYA8FNk= - dependencies: - lcid "^1.0.0" - os-locale@^3.0.0, os-locale@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" @@ -5645,7 +4916,7 @@ os-tmpdir@^1.0.0, os-tmpdir@~1.0.1, os-tmpdir@~1.0.2: resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= -osenv@^0.1.0, osenv@^0.1.3, osenv@^0.1.4, osenv@^0.1.5: +osenv@^0.1.0, osenv@^0.1.3, osenv@^0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== @@ -5752,22 +5023,6 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -parse-filepath@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.2.tgz#a632127f53aaf3d15876f5872f3ffac763d6c891" - integrity sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE= - dependencies: - is-absolute "^1.0.0" - map-cache "^0.2.0" - path-root "^0.1.1" - -parse-json@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" - integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= - dependencies: - error-ex "^1.2.0" - parse-json@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" @@ -5776,11 +5031,6 @@ parse-json@^4.0.0: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" -parse-node-version@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parse-node-version/-/parse-node-version-1.0.1.tgz#e2b5dbede00e7fa9bc363607f53327e8b073189b" - integrity sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA== - parse-passwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" @@ -5810,18 +5060,6 @@ pascalcase@^0.1.1: resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= -path-dirname@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" - integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= - -path-exists@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" - integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= - dependencies: - pinkie-promise "^2.0.0" - path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" @@ -5874,15 +5112,6 @@ path-to-regexp@0.1.7: resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= -path-type@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" - integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= - dependencies: - graceful-fs "^4.1.2" - pify "^2.0.0" - pinkie-promise "^2.0.0" - path-type@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" @@ -5895,11 +5124,6 @@ pathval@^1.1.0: resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" integrity sha1-uULm1L3mUwBe9rcTYd74cn0GReA= -pify@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= - pify@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" @@ -5972,21 +5196,11 @@ prettier@1.17.0: resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.17.0.tgz#53b303676eed22cc14a9f0cec09b477b3026c008" integrity sha512-sXe5lSt2WQlCbydGETgfm1YBShgOX4HxQkFPvbxkcwgDvGDeqVau8h+12+lmSVlP3rHPz0oavfddSZg/q+Szjw== -pretty-hrtime@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" - integrity sha1-t+PqQkNaTJsnWdmeDyAesZWALuE= - printf@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/printf/-/printf-0.5.1.tgz#e0466788260859ed153006dc6867f09ddf240cf3" integrity sha512-UaE/jO0hNsrvPGQEb4LyNzcrJv9Z00tsreBduOSxMtrebvoUhxiEJ4YCHX8YHf6akwfKsC2Gyv5zv47UXhMiLg== -process-nextick-args@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - process-nextick-args@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" @@ -6043,14 +5257,6 @@ psl@^1.1.28: resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.32.tgz#3f132717cf2f9c169724b2b6caf373cf694198db" integrity sha512-MHACAkHpihU/REGGPLj4sEfc/XKW2bheigvHO1dUqjaKigMp1C8+WLQYRGgeKFMsw5PMfegZcaN8IDXK/cD0+g== -pump@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" - integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - pump@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" @@ -6059,15 +5265,6 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" -pumpify@^1.3.5: - version "1.5.1" - resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" - integrity sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ== - dependencies: - duplexify "^3.6.0" - inherits "^2.0.3" - pump "^2.0.0" - punycode@^2.1.0, punycode@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" @@ -6137,24 +5334,6 @@ raw-body@~1.1.0: bytes "1" string_decoder "0.10" -rc@^1.2.7: - version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" - integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== - dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - -read-pkg-up@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" - integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= - dependencies: - find-up "^1.0.0" - read-pkg "^1.0.0" - read-pkg-up@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-4.0.0.tgz#1b221c6088ba7799601c808f91161c66e58f8978" @@ -6163,15 +5342,6 @@ read-pkg-up@^4.0.0: find-up "^3.0.0" read-pkg "^3.0.0" -read-pkg@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" - integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= - dependencies: - load-json-file "^1.0.0" - normalize-package-data "^2.3.2" - path-type "^1.0.0" - read-pkg@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" @@ -6190,7 +5360,7 @@ read-pkg@^3.0.0: string_decoder "^1.1.1" util-deprecate "^1.0.1" -readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: +readable-stream@^2.0.0, readable-stream@^2.0.6, readable-stream@^2.3.5: version "2.3.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== @@ -6213,22 +5383,6 @@ readable-stream@~1.0.2: isarray "0.0.1" string_decoder "~0.10.x" -readdirp@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" - integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== - dependencies: - graceful-fs "^4.1.11" - micromatch "^3.1.10" - readable-stream "^2.0.2" - -rechoir@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" - integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= - dependencies: - resolve "^1.1.6" - redeyed@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/redeyed/-/redeyed-1.0.1.tgz#e96c193b40c0816b00aec842698e61185e55498a" @@ -6266,24 +5420,7 @@ release-zalgo@^1.0.0: dependencies: es6-error "^4.0.1" -remove-bom-buffer@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz#c2bf1e377520d324f623892e33c10cac2c252b53" - integrity sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ== - dependencies: - is-buffer "^1.1.5" - is-utf8 "^0.2.1" - -remove-bom-stream@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz#05f1a593f16e42e1fb90ebf59de8e569525f9523" - integrity sha1-BfGlk/FuQuH7kOv1nejlaVJflSM= - dependencies: - remove-bom-buffer "^3.0.0" - safe-buffer "^5.1.0" - through2 "^2.0.3" - -remove-trailing-separator@^1.0.1, remove-trailing-separator@^1.1.0: +remove-trailing-separator@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= @@ -6298,20 +5435,6 @@ repeat-string@^1.6.1: resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= -replace-ext@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" - integrity sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs= - -replace-homedir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/replace-homedir/-/replace-homedir-1.0.0.tgz#e87f6d513b928dde808260c12be7fec6ff6e798c" - integrity sha1-6H9tUTuSjd6AgmDBK+f+xv9ueYw= - dependencies: - homedir-polyfill "^1.0.1" - is-absolute "^1.0.0" - remove-trailing-separator "^1.1.0" - request@~2.40.0: version "2.40.0" resolved "https://registry.yarnpkg.com/request/-/request-2.40.0.tgz#4dd670f696f1e6e842e66b4b5e839301ab9beb67" @@ -6370,13 +5493,6 @@ resolve-from@^4.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== -resolve-options@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/resolve-options/-/resolve-options-1.1.0.tgz#32bb9e39c06d67338dc9378c0d6d6074566ad131" - integrity sha1-MrueOcBtZzONyTeMDW1gdFZq0TE= - dependencies: - value-or-function "^3.0.0" - resolve-package-path@^1.0.11, resolve-package-path@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/resolve-package-path/-/resolve-package-path-1.2.7.tgz#2a7bc37ad96865e239330e3102c31322847e652e" @@ -6398,7 +5514,7 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.3.2, resolve@^1.4.0: +resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.3.2, resolve@^1.4.0: version "1.12.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.12.0.tgz#3fc644a35c84a48554609ff26ec52b66fa577df6" integrity sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w== @@ -6468,7 +5584,7 @@ rxjs@^6.4.0: dependencies: tslib "^1.9.0" -safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== @@ -6505,19 +5621,7 @@ sane@^4.0.0, sane@^4.1.0: minimist "^1.1.1" walker "~1.0.5" -sax@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" - integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== - -semver-greatest-satisfied-range@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz#13e8c2658ab9691cb0cd71093240280d36f77a5b" - integrity sha1-E+jCZYq5aRywzXEJMkAoDTb3els= - dependencies: - sver-compat "^1.5.0" - -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0: +"semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0: version "5.7.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== @@ -6787,11 +5891,6 @@ sourcemap-validator@^1.1.0: lodash.template "~2.3.x" source-map "~0.1.x" -sparkles@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.1.tgz#008db65edce6c50eec0c5e228e1945061dd0437c" - integrity sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw== - spawn-args@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/spawn-args/-/spawn-args-0.2.0.tgz#fb7d0bd1d70fd4316bd9e3dec389e65f9d6361bb" @@ -6852,11 +5951,6 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= -stack-trace@0.0.10: - version "0.0.10" - resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" - integrity sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA= - static-extend@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" @@ -6870,16 +5964,6 @@ static-extend@^0.1.1: resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= -stream-exhaust@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/stream-exhaust/-/stream-exhaust-1.0.2.tgz#acdac8da59ef2bc1e17a2c0ccf6c320d120e555d" - integrity sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw== - -stream-shift@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" - integrity sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI= - strict-uri-encode@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" @@ -6890,7 +5974,7 @@ string-template@~0.2.1: resolved "https://registry.yarnpkg.com/string-template/-/string-template-0.2.1.tgz#42932e598a352d01fc22ec3367d9d84eec6c9add" integrity sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0= -string-width@^1.0.1, string-width@^1.0.2: +string-width@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= @@ -6969,13 +6053,6 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" -strip-bom@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" - integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= - dependencies: - is-utf8 "^0.2.0" - strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" @@ -6986,7 +6063,7 @@ strip-eof@^1.0.0: resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= -strip-json-comments@2.0.1, strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: +strip-json-comments@2.0.1, strip-json-comments@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= @@ -7053,14 +6130,6 @@ supports-color@^6.1.0: dependencies: has-flag "^3.0.0" -sver-compat@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/sver-compat/-/sver-compat-1.5.0.tgz#3cf87dfeb4d07b4a3f14827bc186b3fd0c645cd8" - integrity sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg= - dependencies: - es6-iterator "^2.0.1" - es6-symbol "^3.1.1" - symlink-or-copy@^1.0.0, symlink-or-copy@^1.0.1, symlink-or-copy@^1.1.8, symlink-or-copy@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/symlink-or-copy/-/symlink-or-copy-1.2.0.tgz#5d49108e2ab824a34069b68974486c290020b393" @@ -7096,19 +6165,6 @@ tap-parser@^7.0.0: js-yaml "^3.2.7" minipass "^2.2.0" -tar@^4: - version "4.4.10" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.10.tgz#946b2810b9a5e0b26140cf78bea6b0b0d689eba1" - integrity sha512-g2SVs5QIxvo6OLp0GudTqEf05maawKUxXru104iaayWA09551tFCTI8f1Asb4lPfkBr91k07iL4c11XO3/b0tA== - dependencies: - chownr "^1.1.1" - fs-minipass "^1.2.5" - minipass "^2.3.5" - minizlib "^1.2.1" - mkdirp "^0.5.0" - safe-buffer "^5.1.2" - yallist "^3.0.3" - temp@0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/temp/-/temp-0.9.0.tgz#61391795a11bd9738d4c4d7f55f012cb8f55edaa" @@ -7186,22 +6242,6 @@ theredoc@^1.0.0: resolved "https://registry.yarnpkg.com/theredoc/-/theredoc-1.0.0.tgz#bcace376af6feb1873efbdd0f91ed026570ff062" integrity sha512-KU3SA3TjRRM932jpNfD3u4Ec3bSvedyo5ITPI7zgWYnKep7BwQQaxlhI9qbO+lKJoRnoAbEVfMcAHRuKVYikDA== -through2-filter@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-3.0.0.tgz#700e786df2367c2c88cd8aa5be4cf9c1e7831254" - integrity sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA== - dependencies: - through2 "~2.0.0" - xtend "~4.0.0" - -through2@^2.0.0, through2@^2.0.3, through2@~2.0.0: - version "2.0.5" - resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" - integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== - dependencies: - readable-stream "~2.3.6" - xtend "~4.0.1" - through2@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.1.tgz#39276e713c3302edf9e388dd9c812dd3b825bd5a" @@ -7214,11 +6254,6 @@ through@^2.3.6, through@^2.3.8: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= -time-stamp@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3" - integrity sha1-dkpaEa9QVhkhsTPztE5hhofg9cM= - timed-out@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" @@ -7270,14 +6305,6 @@ tmpl@1.0.x: resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE= -to-absolute-glob@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz#1865f43d9e74b0822db9f145b78cff7d0f7c849b" - integrity sha1-GGX0PZ50sIItufFFt4z/fQ98hJs= - dependencies: - is-absolute "^1.0.0" - is-negated-glob "^1.0.0" - to-array@0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/to-array/-/to-array-0.1.4.tgz#17e6c11f73dd4f3d74cda7a4ff3238e9ad9bf890" @@ -7313,13 +6340,6 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" -to-through@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-through/-/to-through-2.0.0.tgz#fc92adaba072647bc0b67d6b03664aa195093af6" - integrity sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY= - dependencies: - through2 "^2.0.3" - toidentifier@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" @@ -7390,11 +6410,6 @@ type-is@~1.6.17, type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" -type@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/type/-/type-1.0.1.tgz#084c9a17fcc9151a2cdb1459905c2e45e4bb7d61" - integrity sha512-MAM5dBMJCJNKs9E7JXo4CXRAansRfG0nlJxW7Wf6GZzSOvH31zClSaHdIMWLehe/EGMBkqeC55rrkaOr5Oo7Nw== - typedarray-to-buffer@^3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" @@ -7402,11 +6417,6 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= - uc.micro@^1.0.0, uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" @@ -7420,11 +6430,6 @@ uglify-js@^3.1.4: commander "~2.20.0" source-map "~0.6.1" -unc-path-regex@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" - integrity sha1-5z3T17DXxe2G+6xrCufYxqadUPo= - underscore.string@^3.2.2, underscore.string@~3.3.4: version "3.3.5" resolved "https://registry.yarnpkg.com/underscore.string/-/underscore.string-3.3.5.tgz#fc2ad255b8bd309e239cbc5816fd23a9b7ea4023" @@ -7438,26 +6443,6 @@ underscore@>=1.8.3: resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== -undertaker-registry@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/undertaker-registry/-/undertaker-registry-1.0.1.tgz#5e4bda308e4a8a2ae584f9b9a4359a499825cc50" - integrity sha1-XkvaMI5KiirlhPm5pDWaSZglzFA= - -undertaker@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/undertaker/-/undertaker-1.2.1.tgz#701662ff8ce358715324dfd492a4f036055dfe4b" - integrity sha512-71WxIzDkgYk9ZS+spIB8iZXchFhAdEo2YU8xYqBYJ39DIUIqziK78ftm26eecoIY49X0J2MLhG4hr18Yp6/CMA== - dependencies: - arr-flatten "^1.0.1" - arr-map "^2.0.0" - bach "^1.0.0" - collection-map "^1.0.0" - es6-weak-map "^2.0.1" - last-run "^1.1.0" - object.defaults "^1.0.0" - object.reduce "^1.0.0" - undertaker-registry "^1.0.0" - union-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" @@ -7468,14 +6453,6 @@ union-value@^1.0.0: is-extendable "^0.1.1" set-value "^0.4.3" -unique-stream@^2.0.2: - version "2.3.1" - resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-2.3.1.tgz#c65d110e9a4adf9a6c5948b28053d9a8d04cbeac" - integrity sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A== - dependencies: - json-stable-stringify-without-jsonify "^1.0.1" - through2-filter "^3.0.0" - unique-string@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-2.0.0.tgz#39c6451f81afb2749de2b233e3f7c5e8843bd89d" @@ -7522,11 +6499,6 @@ untildify@^2.1.0: dependencies: os-homedir "^1.0.0" -upath@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.2.tgz#3db658600edaeeccbe6db5e684d67ee8c2acd068" - integrity sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q== - uri-js@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" @@ -7581,13 +6553,6 @@ uuid@^3.3.2, uuid@^3.3.3: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866" integrity sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ== -v8flags@^3.0.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-3.1.3.tgz#fc9dc23521ca20c5433f81cc4eb9b3033bb105d8" - integrity sha512-amh9CCg3ZxkzQ48Mhcb8iX7xpAfYJgePHxWMQCBWECpOSqJUXgY26ncA61UTV0BkPqfhcy6mzwCIoP4ygxpW8w== - dependencies: - homedir-polyfill "^1.0.1" - validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" @@ -7603,64 +6568,11 @@ validate-npm-package-name@^3.0.0: dependencies: builtins "^1.0.3" -value-or-function@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/value-or-function/-/value-or-function-3.0.0.tgz#1c243a50b595c1be54a754bfece8563b9ff8d813" - integrity sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM= - vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= -vinyl-fs@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-3.0.3.tgz#c85849405f67428feabbbd5c5dbdd64f47d31bc7" - integrity sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng== - dependencies: - fs-mkdirp-stream "^1.0.0" - glob-stream "^6.1.0" - graceful-fs "^4.0.0" - is-valid-glob "^1.0.0" - lazystream "^1.0.0" - lead "^1.0.0" - object.assign "^4.0.4" - pumpify "^1.3.5" - readable-stream "^2.3.3" - remove-bom-buffer "^3.0.0" - remove-bom-stream "^1.2.0" - resolve-options "^1.1.0" - through2 "^2.0.0" - to-through "^2.0.0" - value-or-function "^3.0.0" - vinyl "^2.0.0" - vinyl-sourcemap "^1.1.0" - -vinyl-sourcemap@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz#92a800593a38703a8cdb11d8b300ad4be63b3e16" - integrity sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY= - dependencies: - append-buffer "^1.0.2" - convert-source-map "^1.5.0" - graceful-fs "^4.1.6" - normalize-path "^2.1.1" - now-and-later "^2.0.0" - remove-bom-buffer "^3.0.0" - vinyl "^2.0.0" - -vinyl@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.2.0.tgz#d85b07da96e458d25b2ffe19fece9f2caa13ed86" - integrity sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg== - dependencies: - clone "^2.1.1" - clone-buffer "^1.0.0" - clone-stats "^1.0.0" - cloneable-readable "^1.0.0" - remove-trailing-separator "^1.0.1" - replace-ext "^1.0.0" - walk-sync@^0.3.0, walk-sync@^0.3.1, walk-sync@^0.3.2, walk-sync@^0.3.3: version "0.3.4" resolved "https://registry.yarnpkg.com/walk-sync/-/walk-sync-0.3.4.tgz#cf78486cc567d3a96b5b2237c6108017a5ffb9a4" @@ -7735,22 +6647,16 @@ websocket-extensions@>=0.1.1: resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29" integrity sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg== -websocket@^1.0.29: - version "1.0.29" - resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.29.tgz#3f83e49d3279657c58b02a22d90749c806101b98" - integrity sha512-WhU8jKXC8sTh6ocLSqpZRlOKMNYGwUvjA5+XcIgIk/G3JCaDfkZUr0zA19sVSxJ0TEvm0i5IBzr54RZC4vzW7g== +websocket@^1.0.30: + version "1.0.30" + resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.30.tgz#91d3bd00c3d43e916f0cf962f8f8c451bb0b2373" + integrity sha512-aO6klgaTdSMkhfl5VVJzD5fm+Srhh5jLYbS15+OiI1sN6h/RU/XW6WN9J1uVIpUKNmsTvT3Hs35XAFjn9NMfOw== dependencies: debug "^2.2.0" - gulp "^4.0.2" - nan "^2.11.0" + nan "^2.14.0" typedarray-to-buffer "^3.1.5" yaeti "^0.0.6" -which-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" - integrity sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8= - which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" @@ -7866,16 +6772,11 @@ xmlhttprequest-ssl@~1.5.4: resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz#c2876b06168aadc40e57d97e81191ac8f4398b3e" integrity sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4= -xtend@^4.0.0, xtend@~4.0.0, xtend@~4.0.1: +xtend@^4.0.0, xtend@~4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= -y18n@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" - integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= - "y18n@^3.2.1 || ^4.0.0", y18n@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" @@ -7891,7 +6792,7 @@ yallist@^2.1.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= -yallist@^3.0.0, yallist@^3.0.3: +yallist@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== @@ -7928,13 +6829,6 @@ yargs-parser@^13.0.0, yargs-parser@^13.1.0: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" - integrity sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo= - dependencies: - camelcase "^3.0.0" - yargs-unparser@1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.5.0.tgz#f2bb2a7e83cbc87bb95c8e572828a06c9add6e0d" @@ -7996,25 +6890,6 @@ yargs@^13.2.2: y18n "^4.0.0" yargs-parser "^13.1.0" -yargs@^7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8" - integrity sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg= - dependencies: - camelcase "^3.0.0" - cliui "^3.2.0" - decamelize "^1.1.1" - get-caller-file "^1.0.1" - os-locale "^1.4.0" - read-pkg-up "^1.0.1" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^1.0.2" - which-module "^1.0.0" - y18n "^3.2.1" - yargs-parser "^5.0.0" - yeast@0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419" From 3efa8bbcdf1cd61516b0df5dda7974f5fe50dbfb Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 18 Sep 2019 09:52:38 +0000 Subject: [PATCH 035/818] Bump eslint-plugin-prettier from 3.1.0 to 3.1.1 Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 3.1.0 to 3.1.1. - [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases) - [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v3.1.0...v3.1.1) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 04d1ba2554..24da20135b 100644 --- a/package.json +++ b/package.json @@ -144,7 +144,7 @@ "eslint-plugin-chai-expect": "^2.0.1", "eslint-plugin-mocha": "^6.1.1", "eslint-plugin-node": "^10.0.0", - "eslint-plugin-prettier": "^3.0.1", + "eslint-plugin-prettier": "^3.1.1", "fixturify": "^1.2.0", "fixturify-project": "^1.9.1", "mocha": "^6.2.0", diff --git a/yarn.lock b/yarn.lock index 4d2b036949..219868b6fd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2111,10 +2111,10 @@ eslint-plugin-node@^10.0.0: resolve "^1.10.1" semver "^6.1.0" -eslint-plugin-prettier@^3.0.1: - version "3.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.0.tgz#8695188f95daa93b0dc54b249347ca3b79c4686d" - integrity sha512-XWX2yVuwVNLOUhQijAkXz+rMPPoCr7WFiAl8ig6I7Xn+pPVhDhzg4DxHpmbeb0iqjO9UronEA3Tb09ChnFVHHA== +eslint-plugin-prettier@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.1.tgz#507b8562410d02a03f0ddc949c616f877852f2ba" + integrity sha512-A+TZuHZ0KU0cnn56/9mfR7/KjUJ9QNVXUhwvRFSR7PGPe0zQR6PTkmyqg1AtUUEOzTqeRsUwyKFh0oVZKVCrtA== dependencies: prettier-linter-helpers "^1.0.0" From 1d8706a757e69ba8a1827a5c0f93283356fe84ea Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 19 Sep 2019 09:02:25 +0000 Subject: [PATCH 036/818] Bump http-proxy from 1.17.0 to 1.18.0 Bumps [http-proxy](https://github.com/http-party/node-http-proxy) from 1.17.0 to 1.18.0. - [Release notes](https://github.com/http-party/node-http-proxy/releases) - [Changelog](https://github.com/http-party/node-http-proxy/blob/master/CHANGELOG.md) - [Commits](https://github.com/http-party/node-http-proxy/compare/1.17.0...1.18.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 24da20135b..ad7f58cf6a 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,7 @@ "heimdalljs-fs-monitor": "^0.2.3", "heimdalljs-graph": "^0.3.5", "heimdalljs-logger": "^0.1.10", - "http-proxy": "^1.17.0", + "http-proxy": "^1.18.0", "inflection": "^1.12.0", "is-git-url": "^1.0.0", "isbinaryfile": "^3.0.3", diff --git a/yarn.lock b/yarn.lock index 219868b6fd..c8ad3ba2a7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2233,10 +2233,10 @@ etag@~1.8.1: resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= -eventemitter3@^3.0.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" - integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== +eventemitter3@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.0.tgz#d65176163887ee59f386d64c82610b696a4a74eb" + integrity sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg== events-to-array@^1.0.1: version "1.1.2" @@ -3152,12 +3152,12 @@ http-parser-js@>=0.4.0: resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.0.tgz#d65edbede84349d0dc30320815a15d39cc3cbbd8" integrity sha512-cZdEF7r4gfRIq7ezX9J0T+kQmJNOub71dWbgAXVHDct80TKP4MCETtZQ31xyv38UwgzkWPYF/Xc0ge55dW9Z9w== -http-proxy@^1.13.1, http-proxy@^1.17.0: - version "1.17.0" - resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.17.0.tgz#7ad38494658f84605e2f6db4436df410f4e5be9a" - integrity sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g== +http-proxy@^1.13.1, http-proxy@^1.18.0: + version "1.18.0" + resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.0.tgz#dbe55f63e75a347db7f3d99974f2692a314a6a3a" + integrity sha512-84I2iJM/n1d4Hdgc6y2+qY5mDaz2PUVjlg9znE9byl+q0uC3DeByqBGReQu5tpLK0TAqTIXScRUV+dg7+bUPpQ== dependencies: - eventemitter3 "^3.0.0" + eventemitter3 "^4.0.0" follow-redirects "^1.0.0" requires-port "^1.0.0" From 4edba59213deddf56a525210152a7248316b10e0 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 20 Sep 2019 09:30:24 +0000 Subject: [PATCH 037/818] Bump @octokit/rest from 16.28.9 to 16.29.0 Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 16.28.9 to 16.29.0. - [Release notes](https://github.com/octokit/rest.js/releases) - [Commits](https://github.com/octokit/rest.js/compare/v16.28.9...v16.29.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index ad7f58cf6a..f42f174873 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,7 @@ "yam": "^1.0.0" }, "devDependencies": { - "@octokit/rest": "^16.28.9", + "@octokit/rest": "^16.29.0", "broccoli-plugin": "^3.0.0", "broccoli-test-helper": "^2.0.0", "chai": "^4.2.0", diff --git a/yarn.lock b/yarn.lock index c8ad3ba2a7..5ea30fc22b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -207,10 +207,10 @@ once "^1.4.0" universal-user-agent "^2.1.0" -"@octokit/rest@^16.28.9": - version "16.28.9" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.28.9.tgz#ac8c5f3ff305e9e0a0989a5245e4286f057a95d7" - integrity sha512-IKGnX+Tvzt7XHhs8f4ajqxyJvYAMNX5nWfoJm4CQj8LZToMiaJgutf5KxxpxoC3y5w7JTJpW5rnWnF4TsIvCLA== +"@octokit/rest@^16.29.0": + version "16.29.0" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.29.0.tgz#5bbbfc818a44bb9ab32bee72cc0acc32e4556058" + integrity sha512-t01+Hz6sUJx2/HzY4KSgmST5n7KcTYr8i6+UwqS6TkgyjyA6YmeTxVhZrQUobEXaDdQFxs1dRhh1hgmOo6OF9Q== dependencies: "@octokit/request" "^5.0.0" "@octokit/request-error" "^1.0.2" From 015d40ffcbfacc55701508a119d299893a3363ac Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2019 11:02:59 +0000 Subject: [PATCH 038/818] Bump nock from 11.3.3 to 11.3.5 Bumps [nock](https://github.com/nock/nock) from 11.3.3 to 11.3.5. - [Release notes](https://github.com/nock/nock/releases) - [Changelog](https://github.com/nock/nock/blob/master/CHANGELOG.md) - [Commits](https://github.com/nock/nock/compare/v11.3.3...v11.3.5) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index f42f174873..d348a1236f 100644 --- a/package.json +++ b/package.json @@ -148,7 +148,7 @@ "fixturify": "^1.2.0", "fixturify-project": "^1.9.1", "mocha": "^6.2.0", - "nock": "^11.3.3", + "nock": "^11.3.5", "nyc": "^14.1.0", "prettier": "1.17.0", "rimraf": "^3.0.0", diff --git a/yarn.lock b/yarn.lock index 5ea30fc22b..6085ddbaa7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4613,10 +4613,10 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -nock@^11.3.3: - version "11.3.3" - resolved "https://registry.yarnpkg.com/nock/-/nock-11.3.3.tgz#f4553d87ac8e501d7a995a50df7e24857f879f58" - integrity sha512-SrRux5onbWf2ItpmietnLYis+C2QYF08hAo9wv/3QLqaLJVHBSVBTL0EvlD8Hjrm7lTH4vExTzr9gQUsPqy5Cg== +nock@^11.3.5: + version "11.3.5" + resolved "https://registry.yarnpkg.com/nock/-/nock-11.3.5.tgz#f2c7b4b672a04c35342593b6bfd821497881199c" + integrity sha512-6WGeZcWc3RExkBcMSYSrUm/5YukDo52m/jhwniQyrnuiCnKRljBwwje9vTwJyEi4J6m2bq0Aj6C1vzuM6iuaeg== dependencies: chai "^4.1.2" debug "^4.1.0" From 9a50bd4109886b074edb3b1d9df762ff5df8dff9 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 24 Sep 2019 10:18:38 +0000 Subject: [PATCH 039/818] Bump @octokit/rest from 16.29.0 to 16.30.1 Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 16.29.0 to 16.30.1. - [Release notes](https://github.com/octokit/rest.js/releases) - [Commits](https://github.com/octokit/rest.js/compare/v16.29.0...v16.30.1) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index f1b4d8aa75..6314c9f45c 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,7 @@ "yam": "^1.0.0" }, "devDependencies": { - "@octokit/rest": "^16.29.0", + "@octokit/rest": "^16.30.1", "broccoli-plugin": "^3.0.0", "broccoli-test-helper": "^2.0.0", "chai": "^4.2.0", diff --git a/yarn.lock b/yarn.lock index 6eaa7869c7..bce558a608 100644 --- a/yarn.lock +++ b/yarn.lock @@ -207,10 +207,10 @@ once "^1.4.0" universal-user-agent "^2.1.0" -"@octokit/rest@^16.29.0": - version "16.29.0" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.29.0.tgz#5bbbfc818a44bb9ab32bee72cc0acc32e4556058" - integrity sha512-t01+Hz6sUJx2/HzY4KSgmST5n7KcTYr8i6+UwqS6TkgyjyA6YmeTxVhZrQUobEXaDdQFxs1dRhh1hgmOo6OF9Q== +"@octokit/rest@^16.30.1": + version "16.30.1" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.30.1.tgz#03e6dfb93e9a9cd2b3bacb95c49a8c7923f42ad0" + integrity sha512-1n2QzTbbaBXNLpx7WHlcsSMdJvxSdKmerXQm+bMYlKDbQM19uq446ZpGs7Ynq5SsdLj1usIfgJ9gJf4LtcWkDw== dependencies: "@octokit/request" "^5.0.0" "@octokit/request-error" "^1.0.2" From dffc6dfa98b96d0e92e22a43e1481393fc0378c1 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 24 Sep 2019 10:19:51 +0000 Subject: [PATCH 040/818] Bump @babel/core from 7.6.0 to 7.6.2 Bumps [@babel/core](https://github.com/babel/babel) from 7.6.0 to 7.6.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) - [Commits](https://github.com/babel/babel/compare/v7.6.0...v7.6.2) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 60 +++++++++++++++++++++++----------------------------- 2 files changed, 28 insertions(+), 34 deletions(-) diff --git a/package.json b/package.json index 6314c9f45c..8443c93e87 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "test:debug": "node debug tests/runner" }, "dependencies": { - "@babel/core": "^7.6.0", + "@babel/core": "^7.6.2", "@babel/plugin-transform-modules-amd": "^7.5.0", "amd-name-resolver": "^1.3.1", "babel-plugin-module-resolver": "^3.2.0", diff --git a/yarn.lock b/yarn.lock index bce558a608..eef0ba2d1a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,17 +9,17 @@ dependencies: "@babel/highlight" "^7.0.0" -"@babel/core@^7.3.3", "@babel/core@^7.3.4", "@babel/core@^7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.6.0.tgz#9b00f73554edd67bebc86df8303ef678be3d7b48" - integrity sha512-FuRhDRtsd6IptKpHXAa+4WPZYY2ZzgowkbLBecEDDSje1X/apG7jQM33or3NdOmjXBKWGOg4JmSiRfUfuTtHXw== +"@babel/core@^7.3.3", "@babel/core@^7.3.4", "@babel/core@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.6.2.tgz#069a776e8d5e9eefff76236bc8845566bd31dd91" + integrity sha512-l8zto/fuoZIbncm+01p8zPSDZu/VuuJhAfA7d/AbzM09WR7iVhavvfNDYCNpo1VvLk6E6xgAoP9P+/EMJHuRkQ== dependencies: "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.6.0" - "@babel/helpers" "^7.6.0" - "@babel/parser" "^7.6.0" + "@babel/generator" "^7.6.2" + "@babel/helpers" "^7.6.2" + "@babel/parser" "^7.6.2" "@babel/template" "^7.6.0" - "@babel/traverse" "^7.6.0" + "@babel/traverse" "^7.6.2" "@babel/types" "^7.6.0" convert-source-map "^1.1.0" debug "^4.1.0" @@ -29,16 +29,15 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.4.0", "@babel/generator@^7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.6.0.tgz#e2c21efbfd3293ad819a2359b448f002bfdfda56" - integrity sha512-Ms8Mo7YBdMMn1BYuNtKuP/z0TgEIhbcyB8HVR6PPNYp4P61lMsABiS4A3VG1qznjXVCf3r+fVHhm4efTYVsySA== +"@babel/generator@^7.4.0", "@babel/generator@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.6.2.tgz#dac8a3c2df118334c2a29ff3446da1636a8f8c03" + integrity sha512-j8iHaIW4gGPnViaIHI7e9t/Hl8qLjERI6DcV9kEpAIDJsAOrcnXqRS7t+QbhL76pwbtqP+QCQLL0z1CyVmtjjQ== dependencies: "@babel/types" "^7.6.0" jsesc "^2.5.1" lodash "^4.17.13" source-map "^0.5.0" - trim-right "^1.0.1" "@babel/helper-function-name@^7.1.0": version "7.1.0" @@ -95,13 +94,13 @@ dependencies: "@babel/types" "^7.4.4" -"@babel/helpers@^7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.6.0.tgz#21961d16c6a3c3ab597325c34c465c0887d31c6e" - integrity sha512-W9kao7OBleOjfXtFGgArGRX6eCP0UEcA2ZWEWNkJdRZnHhW4eEbeswbG3EwaRsnQUAEGWYgMq1HsIXuNNNy2eQ== +"@babel/helpers@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.6.2.tgz#681ffe489ea4dcc55f23ce469e58e59c1c045153" + integrity sha512-3/bAUL8zZxYs1cdX2ilEE0WobqbCmKWr/889lf2SS0PpDcpEIY8pb1CCyz0pEcX3pEb+MCbks1jIokz2xLtGTA== dependencies: "@babel/template" "^7.6.0" - "@babel/traverse" "^7.6.0" + "@babel/traverse" "^7.6.2" "@babel/types" "^7.6.0" "@babel/highlight@^7.0.0": @@ -113,10 +112,10 @@ esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.4.3", "@babel/parser@^7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.6.0.tgz#3e05d0647432a8326cb28d0de03895ae5a57f39b" - integrity sha512-+o2q111WEx4srBs7L9eJmcwi655eD8sXniLqMB93TBK9GrNzGrxDWSjiqz2hLU0Ha8MTXFIP0yd9fNdP+m43ZQ== +"@babel/parser@^7.4.3", "@babel/parser@^7.6.0", "@babel/parser@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.6.2.tgz#205e9c95e16ba3b8b96090677a67c9d6075b70a1" + integrity sha512-mdFqWrSPCmikBoaBYMuBulzTIKuXVPtEISFbRRVNwMWpCms/hmE2kRq0bblUHaNRKrjRlmVbx1sDHmjmRgD2Xg== "@babel/plugin-transform-modules-amd@^7.5.0": version "7.5.0" @@ -144,16 +143,16 @@ "@babel/parser" "^7.6.0" "@babel/types" "^7.6.0" -"@babel/traverse@^7.4.3", "@babel/traverse@^7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.6.0.tgz#389391d510f79be7ce2ddd6717be66d3fed4b516" - integrity sha512-93t52SaOBgml/xY74lsmt7xOR4ufYvhb5c5qiM6lu4J/dWGMAfAh6eKw4PjLes6DI6nQgearoxnFJk60YchpvQ== +"@babel/traverse@^7.4.3", "@babel/traverse@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.6.2.tgz#b0e2bfd401d339ce0e6c05690206d1e11502ce2c" + integrity sha512-8fRE76xNwNttVEF2TwxJDGBLWthUkHWSldmfuBzVRmEDWOtu4XdINTgN7TDWzuLg4bbeIMLvfMFD9we5YcWkRQ== dependencies: "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.6.0" + "@babel/generator" "^7.6.2" "@babel/helper-function-name" "^7.1.0" "@babel/helper-split-export-declaration" "^7.4.4" - "@babel/parser" "^7.6.0" + "@babel/parser" "^7.6.2" "@babel/types" "^7.6.0" debug "^4.1.0" globals "^11.1.0" @@ -6378,11 +6377,6 @@ tree-sync@^2.0.0: quick-temp "^0.1.5" walk-sync "^0.3.3" -trim-right@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" - integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= - tslib@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" From 4f2ef074f9f6e3e2ad66bd042b8839260766c6d5 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 23 Sep 2019 23:00:20 -0400 Subject: [PATCH 041/818] Update ember-resolver to 5.3.0. Primarily adds support for component colocation. --- blueprints/app/files/package.json | 2 +- tests/fixtures/addon/npm/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/npm/package.json | 2 +- tests/fixtures/app/yarn/package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index cce76765dd..d2ec6c4d9c 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -38,7 +38,7 @@ "ember-load-initializers": "^2.1.0", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.5.1", - "ember-resolver": "^5.2.1", + "ember-resolver": "^5.3.0", "ember-source": "~3.13.0<% if (welcome) { %>", "ember-welcome-page": "^4.0.0<% } %>", "eslint-plugin-ember": "^7.1.0", diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index cebe387916..58e43045f3 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -41,7 +41,7 @@ "ember-load-initializers": "^2.1.0", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.5.1", - "ember-resolver": "^5.2.1", + "ember-resolver": "^5.3.0", "ember-source": "~3.13.0", "ember-source-channel-url": "^2.0.1", "ember-try": "^1.2.1", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 1089f0d331..1228d436b5 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -41,7 +41,7 @@ "ember-load-initializers": "^2.1.0", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.5.1", - "ember-resolver": "^5.2.1", + "ember-resolver": "^5.3.0", "ember-source": "~3.13.0", "ember-source-channel-url": "^2.0.1", "ember-try": "^1.2.1", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 0f4524bed5..162ca5641f 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -38,7 +38,7 @@ "ember-load-initializers": "^2.1.0", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.5.1", - "ember-resolver": "^5.2.1", + "ember-resolver": "^5.3.0", "ember-source": "~3.13.0", "eslint-plugin-ember": "^7.1.0", "eslint-plugin-node": "^10.0.0", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 37f4d0046b..63686d491a 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -38,7 +38,7 @@ "ember-load-initializers": "^2.1.0", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.5.1", - "ember-resolver": "^5.2.1", + "ember-resolver": "^5.3.0", "ember-source": "~3.13.0", "ember-welcome-page": "^4.0.0", "eslint-plugin-ember": "^7.1.0", From b9bad7502f298db6eef58c71d64b71df5f5e7720 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 25 Sep 2019 09:50:42 -0400 Subject: [PATCH 042/818] Add 3.13.0 to CHANGELOG. --- CHANGELOG.md | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc45f87021..dd19dc2ba2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,15 +1,20 @@ # ember-cli Changelog - -## v3.13.0-beta.1 - #### Blueprint Changes -- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.12.0...v3.13.0-beta.1) -- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.12.0...v3.13.0-beta.1) +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.12.0...v3.13.0) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.12.0...v3.13.0) -#### Community Contributions +- [#8797](https://github.com/ember-cli/ember-cli/pull/8797) Update heimdalljs-fs-monitor to 0.2.3. [@rwjblue](https://github.com/rwjblue) +- [#8798](https://github.com/ember-cli/ember-cli/pull/8798) Update blueprint reference for ember-source to 3.13.0-beta.2. [@rwjblue](https://github.com/rwjblue) +- [#8814](https://github.com/ember-cli/ember-cli/pull/8814) Drop Node 11 from CI. [@rwjblue](https://github.com/rwjblue) +- [#8816](https://github.com/ember-cli/ember-cli/pull/8816) Update app and addon blueprints to latest version of packages. [@rwjblue](https://github.com/rwjblue) +- [#8834](https://github.com/ember-cli/ember-cli/pull/8834) Ensure addon tree is scoped to addon name before compiling templates. [@rwjblue](https://github.com/rwjblue) +- [fd7268b59ddcddca849762a4923c14655da47188](https://github.com/ember-cli/ember-cli/commit/fd7268b59ddcddca849762a4923c14655da47188) Update watch-detector to 1.0.0. [@rwjblue](https://github.com/rwjblue) +- [#8850](https://github.com/ember-cli/ember-cli/pull/8850) Update broccoli dependencies/devDependencies to latest. [@rwjblue](https://github.com/rwjblue) +- [#8851](https://github.com/ember-cli/ember-cli/pull/8851) Update Ember ecosystem packages to latest version. [@rwjblue](https://github.com/rwjblue) +- [#8853](https://github.com/ember-cli/ember-cli/pull/8853) Update ember-resolver to 5.3.0. [@rwjblue](https://github.com/rwjblue) - [#8642](https://github.com/ember-cli/ember-cli/pull/8642) Use system temp for ember test [@ef4](https://github.com/ef4) - [#8650](https://github.com/ember-cli/ember-cli/pull/8650) [BUGFIX] reset resolve-package-path caches in PackageInfoCache._clear() [@jamescdavis](https://github.com/jamescdavis) - [#8633](https://github.com/ember-cli/ember-cli/pull/8633) Refactor template build pipeline to enable co-located templates. [@rwjblue](https://github.com/rwjblue) @@ -18,10 +23,10 @@ - [#8678](https://github.com/ember-cli/ember-cli/pull/8678) give ember-cli a progress indicator [@stefanpenner](https://github.com/stefanpenner) - [#8588](https://github.com/ember-cli/ember-cli/pull/8588) [dx] Detail app / addon creation messages [@dcyriller](https://github.com/dcyriller) - [#8687](https://github.com/ember-cli/ember-cli/pull/8687) Add .git directory to npmignore [@rwwagner90](https://github.com/rwwagner90) -- [#8701](https://github.com/ember-cli/ember-cli/pull/8701) Close #8589 addon templates were detected, but no template compilers … [@haochuan](https://github.com/haochuan) +- [#8701](https://github.com/ember-cli/ember-cli/pull/8701) Add ember-cli-htmlbars to default addon dependencies [@haochuan](https://github.com/haochuan) - [#8747](https://github.com/ember-cli/ember-cli/pull/8747) Update Windows documentation link [@loganrosen](https://github.com/loganrosen) - [#8772](https://github.com/ember-cli/ember-cli/pull/8772) fix typos :) [@aspala](https://github.com/aspala) -- [#8564](https://github.com/ember-cli/ember-cli/pull/8564) Adds babel-eslint as the default ESlint parser [@pzuraq/feat](https://github.com/pzuraq/feat) +- [#8564](https://github.com/ember-cli/ember-cli/pull/8564) Adds babel-eslint as the default ESlint parser [@pzuraq](https://github.com/pzuraq) Thank you to all who took the time to contribute! From c8fe4dfd7424547917a8e51d84905ba357432921 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 25 Sep 2019 09:52:31 -0400 Subject: [PATCH 043/818] Release v3.13.0. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8443c93e87..1fbad09131 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.13.0-beta.1", + "version": "3.13.0", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From ee120c4ab0c117972241581b23c0e958fc5e7181 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 25 Sep 2019 11:21:41 -0400 Subject: [PATCH 044/818] Update ember-source version to ~3.14.0-beta.1. --- blueprints/app/files/package.json | 2 +- tests/fixtures/addon/npm/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/npm/package.json | 2 +- tests/fixtures/app/yarn/package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index d2ec6c4d9c..38cf2a81e6 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -39,7 +39,7 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.5.1", "ember-resolver": "^5.3.0", - "ember-source": "~3.13.0<% if (welcome) { %>", + "ember-source": "~3.14.0-beta.1<% if (welcome) { %>", "ember-welcome-page": "^4.0.0<% } %>", "eslint-plugin-ember": "^7.1.0", "eslint-plugin-node": "^10.0.0", diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index 58e43045f3..3845151d20 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -42,7 +42,7 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.5.1", "ember-resolver": "^5.3.0", - "ember-source": "~3.13.0", + "ember-source": "~3.14.0-beta.1", "ember-source-channel-url": "^2.0.1", "ember-try": "^1.2.1", "eslint-plugin-ember": "^7.1.0", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 1228d436b5..d7d5a0f6da 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -42,7 +42,7 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.5.1", "ember-resolver": "^5.3.0", - "ember-source": "~3.13.0", + "ember-source": "~3.14.0-beta.1", "ember-source-channel-url": "^2.0.1", "ember-try": "^1.2.1", "ember-welcome-page": "^4.0.0", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 162ca5641f..e92cd5750f 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -39,7 +39,7 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.5.1", "ember-resolver": "^5.3.0", - "ember-source": "~3.13.0", + "ember-source": "~3.14.0-beta.1", "eslint-plugin-ember": "^7.1.0", "eslint-plugin-node": "^10.0.0", "loader.js": "^4.7.0", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 63686d491a..2598334cc0 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -39,7 +39,7 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.5.1", "ember-resolver": "^5.3.0", - "ember-source": "~3.13.0", + "ember-source": "~3.14.0-beta.1", "ember-welcome-page": "^4.0.0", "eslint-plugin-ember": "^7.1.0", "eslint-plugin-node": "^10.0.0", From 54a97f0db9545fda58f621e5ed49d692311a7f5f Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 25 Sep 2019 11:25:05 -0400 Subject: [PATCH 045/818] Set optional features appropriately for Octane. --- .../addon/files/config/optional-features.json | 5 ++- .../app/files/config/optional-features.json | 5 ++- tests/acceptance/brocfile-smoke-test-slow.js | 34 +++++++++---------- 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/blueprints/addon/files/config/optional-features.json b/blueprints/addon/files/config/optional-features.json index b1902623ae..b26286e2ec 100644 --- a/blueprints/addon/files/config/optional-features.json +++ b/blueprints/addon/files/config/optional-features.json @@ -1,3 +1,6 @@ { - "jquery-integration": false + "application-template-wrapper": false, + "default-async-observers": true, + "jquery-integration": false, + "template-only-glimmer-components": true } diff --git a/blueprints/app/files/config/optional-features.json b/blueprints/app/files/config/optional-features.json index b1902623ae..b26286e2ec 100644 --- a/blueprints/app/files/config/optional-features.json +++ b/blueprints/app/files/config/optional-features.json @@ -1,3 +1,6 @@ { - "jquery-integration": false + "application-template-wrapper": false, + "default-async-observers": true, + "jquery-integration": false, + "template-only-glimmer-components": true } diff --git a/tests/acceptance/brocfile-smoke-test-slow.js b/tests/acceptance/brocfile-smoke-test-slow.js index d4cb1f0cfb..9129e6d60e 100644 --- a/tests/acceptance/brocfile-smoke-test-slow.js +++ b/tests/acceptance/brocfile-smoke-test-slow.js @@ -41,23 +41,6 @@ describe('Acceptance: brocfile-smoke-test', function() { expect(dir(appRoot)).to.not.exist; }); - it( - 'a custom EmberENV in config/environment.js is used for window.EmberENV', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/custom-ember-env'); - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - let vendorContents = fs.readFileSync(path.join('dist', 'assets', 'vendor.js'), { - encoding: 'utf8', - }); - - // Changes in ember-optional-features 0.7.0 cause all defined values in optional-features.json - // to end up in EmberENV. jquery-integration is explicitly defined for non MU apps - let expected = 'window.EmberENV = {"asdflkmawejf":";jlnu3yr23","_JQUERY_INTEGRATION":false};'; - expect(vendorContents).to.contain(expected, 'EmberENV should be in assets/vendor.js'); - }) - ); - it( 'a custom environment config can be used in Brocfile.js', co.wrap(function*() { @@ -75,6 +58,23 @@ describe('Acceptance: brocfile-smoke-test', function() { yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); }) ); + + it( + 'a custom EmberENV in config/environment.js is used for window.EmberENV', + co.wrap(function*() { + yield copyFixtureFiles('brocfile-tests/custom-ember-env'); + yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let vendorContents = fs.readFileSync(path.join('dist', 'assets', 'vendor.js'), { + encoding: 'utf8', + }); + + // Changes in config/optional-features.json end up being set in EmberENV + let expected = + 'window.EmberENV = {"asdflkmawejf":";jlnu3yr23","_APPLICATION_TEMPLATE_WRAPPER":false,"_DEFAULT_ASYNC_OBSERVERS":true,"_JQUERY_INTEGRATION":false,"_TEMPLATE_ONLY_GLIMMER_COMPONENTS":true};'; + expect(vendorContents).to.contain(expected, 'EmberENV should be in assets/vendor.js'); + }) + ); } it( From a279ce7b342e432293e3708554284968652f5e1c Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 25 Sep 2019 11:28:23 -0400 Subject: [PATCH 046/818] Add @ember/edition-utils to new app / addon blueprints. --- blueprints/app/files/package.json | 1 + tests/fixtures/addon/npm/package.json | 1 + tests/fixtures/addon/yarn/package.json | 1 + tests/fixtures/app/npm/package.json | 1 + tests/fixtures/app/yarn/package.json | 1 + 5 files changed, 5 insertions(+) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 38cf2a81e6..706fa19bbf 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -18,6 +18,7 @@ "test": "ember test" }, "devDependencies": { + "@ember/edition-utils": "^1.1.1", "@ember/optional-features": "^1.0.0", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index 3845151d20..e844c61497 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -25,6 +25,7 @@ "ember-cli-htmlbars": "^4.0.0" }, "devDependencies": { + "@ember/edition-utils": "^1.1.1", "@ember/optional-features": "^1.0.0", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index d7d5a0f6da..b54ca7c804 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -25,6 +25,7 @@ "ember-cli-htmlbars": "^4.0.0" }, "devDependencies": { + "@ember/edition-utils": "^1.1.1", "@ember/optional-features": "^1.0.0", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index e92cd5750f..47eb645755 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -18,6 +18,7 @@ "test": "ember test" }, "devDependencies": { + "@ember/edition-utils": "^1.1.1", "@ember/optional-features": "^1.0.0", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 2598334cc0..9adc181ca8 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -18,6 +18,7 @@ "test": "ember test" }, "devDependencies": { + "@ember/edition-utils": "^1.1.1", "@ember/optional-features": "^1.0.0", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", From 5761762ea82ad96bde4b6e2bd4721fcb116daca2 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 25 Sep 2019 11:33:21 -0400 Subject: [PATCH 047/818] Move .ember-cli to .ember-cli.js Add `setEdition('octane')` to 3.14 blueprint and ensure that each test properly resets the edition flag. --- blueprints/app/files/{.ember-cli => .ember-cli.js} | 10 +++++++--- blueprints/app/files/.eslintrc.js | 1 + package.json | 1 + tests/fixtures/addon/.eslintrc.js | 1 + tests/fixtures/app/.eslintrc.js | 1 + tests/runner.js | 6 ++++++ yarn.lock | 5 +++++ 7 files changed, 22 insertions(+), 3 deletions(-) rename blueprints/app/files/{.ember-cli => .ember-cli.js} (65%) diff --git a/blueprints/app/files/.ember-cli b/blueprints/app/files/.ember-cli.js similarity index 65% rename from blueprints/app/files/.ember-cli rename to blueprints/app/files/.ember-cli.js index ee64cfed2a..5e5e1489aa 100644 --- a/blueprints/app/files/.ember-cli +++ b/blueprints/app/files/.ember-cli.js @@ -1,9 +1,13 @@ -{ +const { setEdition } = require('@ember/edition-utils'); + +setEdition('octane'); + +module.exports = { /** Ember CLI sends analytics information by default. The data is completely anonymous, but there are times when you might want to disable this behavior. Setting `disableAnalytics` to true will prevent any data from being sent. */ - "disableAnalytics": false -} + disableAnalytics: false +}; diff --git a/blueprints/app/files/.eslintrc.js b/blueprints/app/files/.eslintrc.js index c5c5557f08..27a975d71e 100644 --- a/blueprints/app/files/.eslintrc.js +++ b/blueprints/app/files/.eslintrc.js @@ -22,6 +22,7 @@ module.exports = { // node files { files: [ + '.ember-cli.js', '.eslintrc.js', '.template-lintrc.js', 'ember-cli-build.js',<% if (blueprint !== 'app') { %> diff --git a/package.json b/package.json index 1fbad09131..c931075f64 100644 --- a/package.json +++ b/package.json @@ -130,6 +130,7 @@ "yam": "^1.0.0" }, "devDependencies": { + "@ember/edition-utils": "^1.1.1", "@octokit/rest": "^16.30.1", "broccoli-plugin": "^3.0.0", "broccoli-test-helper": "^2.0.0", diff --git a/tests/fixtures/addon/.eslintrc.js b/tests/fixtures/addon/.eslintrc.js index d43fd96b4e..ae411fb34e 100644 --- a/tests/fixtures/addon/.eslintrc.js +++ b/tests/fixtures/addon/.eslintrc.js @@ -22,6 +22,7 @@ module.exports = { // node files { files: [ + '.ember-cli.js', '.eslintrc.js', '.template-lintrc.js', 'ember-cli-build.js', diff --git a/tests/fixtures/app/.eslintrc.js b/tests/fixtures/app/.eslintrc.js index 3500e4a6d1..df7e0b0e95 100644 --- a/tests/fixtures/app/.eslintrc.js +++ b/tests/fixtures/app/.eslintrc.js @@ -22,6 +22,7 @@ module.exports = { // node files { files: [ + '.ember-cli.js', '.eslintrc.js', '.template-lintrc.js', 'ember-cli-build.js', diff --git a/tests/runner.js b/tests/runner.js index 6025be20da..3d563bb518 100644 --- a/tests/runner.js +++ b/tests/runner.js @@ -47,6 +47,12 @@ function addFiles(mocha, files) { files.forEach(mocha.addFile.bind(mocha)); } +// ensure that the specified edition is unset after each test +const { clearEdition } = require('@ember/edition-utils'); +mocha.suite.afterEach(function() { + clearEdition(); +}); + function runMocha() { console.time('Mocha Tests Running Time'); mocha.run(failures => { diff --git a/yarn.lock b/yarn.lock index eef0ba2d1a..ac26e9eb01 100644 --- a/yarn.lock +++ b/yarn.lock @@ -175,6 +175,11 @@ exec-sh "^0.3.2" minimist "^1.2.0" +"@ember/edition-utils@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@ember/edition-utils/-/edition-utils-1.1.1.tgz#d5732c3da593f202e6e1ac6dbee56a758242403f" + integrity sha512-GEhri78jdQp/xxPpM6z08KlB0wrHfnfrJ9dmQk7JeQ4XCiMzXsJci7yooQgg/IcTKCM/PxE/IkGCQAo80adMkw== + "@octokit/endpoint@^5.1.0": version "5.1.4" resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-5.1.4.tgz#e6bb3ceda8923fdc9703ded78c9acc28eff88c06" From e7d6881aebaaa1d88b85091c97d27acd1b572ba4 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 25 Sep 2019 12:21:32 -0400 Subject: [PATCH 048/818] Update ember-data to ~3.14.0-beta.0. --- blueprints/app/files/package.json | 2 +- tests/fixtures/app/npm/package.json | 2 +- tests/fixtures/app/yarn/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 706fa19bbf..ee821a4663 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -33,7 +33,7 @@ "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", - "ember-data": "~3.13.0", + "ember-data": "~3.14.0-beta.0", "ember-export-application-global": "^2.0.0", "ember-fetch": "^6.7.0", "ember-load-initializers": "^2.1.0", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 47eb645755..76d83fc137 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -33,7 +33,7 @@ "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", - "ember-data": "~3.13.0", + "ember-data": "~3.14.0-beta.0", "ember-export-application-global": "^2.0.0", "ember-fetch": "^6.7.0", "ember-load-initializers": "^2.1.0", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 9adc181ca8..c5af5d1ea8 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -33,7 +33,7 @@ "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", - "ember-data": "~3.13.0", + "ember-data": "~3.14.0-beta.0", "ember-export-application-global": "^2.0.0", "ember-fetch": "^6.7.0", "ember-load-initializers": "^2.1.0", From 89d3a653298d54c18991620a5ddb460c47f4ec4f Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 25 Sep 2019 15:24:37 -0400 Subject: [PATCH 049/818] Update ember-cli-htmlbars to 4.0.1. This prevents an issue when there are no files at all inside the tree passed to template transpilation. --- blueprints/app/files/package.json | 2 +- tests/fixtures/addon/npm/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/npm/package.json | 2 +- tests/fixtures/app/yarn/package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index ee821a4663..21435b2bf5 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -27,7 +27,7 @@ "ember-cli-babel": "^7.11.1", "ember-cli-dependency-checker": "^3.1.0", "ember-cli-eslint": "^5.1.0", - "ember-cli-htmlbars": "^4.0.0", + "ember-cli-htmlbars": "^4.0.1", "ember-cli-htmlbars-inline-precompile": "^3.0.0", "ember-cli-inject-live-reload": "^2.0.1", "ember-cli-sri": "^2.1.1", diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index e844c61497..3244e5db48 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "ember-cli-babel": "^7.11.1", - "ember-cli-htmlbars": "^4.0.0" + "ember-cli-htmlbars": "^4.0.1" }, "devDependencies": { "@ember/edition-utils": "^1.1.1", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index b54ca7c804..5f8d3ad46a 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "ember-cli-babel": "^7.11.1", - "ember-cli-htmlbars": "^4.0.0" + "ember-cli-htmlbars": "^4.0.1" }, "devDependencies": { "@ember/edition-utils": "^1.1.1", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 76d83fc137..7b73d3fa07 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -27,7 +27,7 @@ "ember-cli-babel": "^7.11.1", "ember-cli-dependency-checker": "^3.1.0", "ember-cli-eslint": "^5.1.0", - "ember-cli-htmlbars": "^4.0.0", + "ember-cli-htmlbars": "^4.0.1", "ember-cli-htmlbars-inline-precompile": "^3.0.0", "ember-cli-inject-live-reload": "^2.0.1", "ember-cli-sri": "^2.1.1", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index c5af5d1ea8..774dc41ae2 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -27,7 +27,7 @@ "ember-cli-babel": "^7.11.1", "ember-cli-dependency-checker": "^3.1.0", "ember-cli-eslint": "^5.1.0", - "ember-cli-htmlbars": "^4.0.0", + "ember-cli-htmlbars": "^4.0.1", "ember-cli-htmlbars-inline-precompile": "^3.0.0", "ember-cli-inject-live-reload": "^2.0.1", "ember-cli-sri": "^2.1.1", From 70b7c8b429742e2b4933e1d6aa2f6b821fce6f12 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 25 Sep 2019 16:23:06 -0400 Subject: [PATCH 050/818] Add v3.14.0-beta.1 to CHANGELOG. --- CHANGELOG.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd19dc2ba2..32a9fce32b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # ember-cli Changelog + +## v3.14.0-beta.1 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.13.0...v3.14.0-beta.1) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.13.0...v3.14.0-beta.1) + + +- [#8812](https://github.com/ember-cli/ember-cli/pull/8812) Clarify installation error message [@jrjohnson](https://github.com/jrjohnson) +- [#8820](https://github.com/ember-cli/ember-cli/pull/8820) Issue deprecation when enabling MODULE_UNIFICATION flag. [@rwjblue](https://github.com/rwjblue) +- [#8830](https://github.com/ember-cli/ember-cli/pull/8830) CI: Remove deprecated exp. from ALL_EXPERIMENTS [@dcyriller](https://github.com/dcyriller) +- [#8856](https://github.com/ember-cli/ember-cli/pull/8856) Prepare for first Octane beta. [@rwjblue](https://github.com/rwjblue) + +Thank you to all who took the time to contribute! + +## v3.13.0 + #### Blueprint Changes - [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.12.0...v3.13.0) From c61bffa79594b729de369c9fe6fe8361054c12c8 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 25 Sep 2019 16:23:35 -0400 Subject: [PATCH 051/818] Release v3.14.0-beta.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c931075f64..53ce3ceb52 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.13.0", + "version": "3.14.0-beta.1", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From aa095109d9aa6ad7f046b9ca17e949e4700bbbbc Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 25 Sep 2019 16:58:37 -0400 Subject: [PATCH 052/818] Fixup changelog. [ci skip] --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 182c4f502f..5acca2d714 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.13.0...v3.14.0-beta.1) - [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.13.0...v3.14.0-beta.1) +#### Changelog - [#8812](https://github.com/ember-cli/ember-cli/pull/8812) Clarify installation error message [@jrjohnson](https://github.com/jrjohnson) - [#8820](https://github.com/ember-cli/ember-cli/pull/8820) Issue deprecation when enabling MODULE_UNIFICATION flag. [@rwjblue](https://github.com/rwjblue) @@ -22,6 +23,7 @@ Thank you to all who took the time to contribute! - [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.12.0...v3.13.0) - [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.12.0...v3.13.0) +#### Changelog - [#8797](https://github.com/ember-cli/ember-cli/pull/8797) Update heimdalljs-fs-monitor to 0.2.3. [@rwjblue](https://github.com/rwjblue) - [#8798](https://github.com/ember-cli/ember-cli/pull/8798) Update blueprint reference for ember-source to 3.13.0-beta.2. [@rwjblue](https://github.com/rwjblue) From 3f195e265559e85fa8db1e12f0b7071836895c72 Mon Sep 17 00:00:00 2001 From: Cyrille David Date: Thu, 5 Sep 2019 13:55:27 +0200 Subject: [PATCH 053/818] blueprints(new + addon): Deactivate MU version `EMBER_CLI_MODULE_UNIFICATION=true ember new my-app` and `EMBER_CLI_MODULE_UNIFICATION=true ember addon my-addon` will create regular app / addon. --- lib/commands/new.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/lib/commands/new.js b/lib/commands/new.js index 571309a62c..767ef49ea1 100644 --- a/lib/commands/new.js +++ b/lib/commands/new.js @@ -9,7 +9,6 @@ const SilentError = require('silent-error'); const validProjectName = require('../utilities/valid-project-name'); const normalizeBlueprint = require('../utilities/normalize-blueprint-option'); const mergeBlueprintOptions = require('../utilities/merge-blueprint-options'); -const { isExperimentEnabled } = require('../experiments'); const rmdir = RSVP.denodeify(fs.remove); const Promise = RSVP.Promise; @@ -41,14 +40,6 @@ module.exports = Command.extend({ beforeRun: mergeBlueprintOptions, run(commandOptions, rawArgs) { - if (isExperimentEnabled('MODULE_UNIFICATION')) { - if (commandOptions.blueprint === 'app') { - commandOptions.blueprint = 'module-unification-app'; - } else if (commandOptions.blueprint === 'addon') { - commandOptions.blueprint = 'module-unification-addon'; - } - } - let packageName = rawArgs[0], message; From 1821858ae85afcf9fa4b4e19edd70bf26e9ee6b8 Mon Sep 17 00:00:00 2001 From: Cyrille David Date: Thu, 5 Sep 2019 13:57:25 +0200 Subject: [PATCH 054/818] blueprints(new + addon): Remove MU files --- .../files/.editorconfig | 20 ------- .../module-unification-addon/files/.ember-cli | 9 --- .../files/.eslintrc.js | 54 ----------------- .../files/.travis.yml | 42 -------------- .../files/CONTRIBUTING.md | 26 --------- .../module-unification-addon/files/LICENSE.md | 9 --- .../module-unification-addon/files/README.md | 38 ------------ .../files/addon-config/ember-try.js | 57 ------------------ .../files/addon-config/environment.js | 5 -- .../files/addon-src/.gitkeep | 0 .../files/ember-cli-build.js | 18 ------ .../module-unification-addon/files/index.js | 5 -- .../module-unification-addon/files/npmignore | 30 ---------- .../files/tests/dummy/.gitkeep | 0 .../files/tests/index.html | 33 ----------- .../files/tests/test-helper.js | 8 --- .../files/vendor/.gitkeep | 0 blueprints/module-unification-addon/index.js | 21 ------- .../files/.editorconfig | 20 ------- .../module-unification-app/files/.ember-cli | 9 --- .../files/.eslintignore | 20 ------- .../module-unification-app/files/.eslintrc.js | 51 ---------------- .../files/.template-lintrc.js | 5 -- .../module-unification-app/files/.travis.yml | 34 ----------- .../files/.watchmanconfig | 3 - .../module-unification-app/files/README.md | 58 ------------------- .../files/config/environment.js | 57 ------------------ .../files/config/optional-features.json | 3 - .../files/config/targets.js | 8 --- .../files/ember-cli-build.js | 24 -------- .../module-unification-app/files/gitignore | 25 -------- .../module-unification-app/files/package.json | 52 ----------------- .../files/public/robots.txt | 3 - .../module-unification-app/files/src/main.js | 19 ------ .../files/src/resolver.js | 13 ----- .../files/src/router.js | 11 ---- .../files/src/ui/components/.gitkeep | 0 .../files/src/ui/index.html | 25 -------- .../src/ui/routes/application/template.hbs | 6 -- .../files/src/ui/styles/app.css | 0 .../module-unification-app/files/testem.js | 23 -------- .../files/tests/acceptance/.gitkeep | 0 .../files/tests/index.html | 33 ----------- .../files/tests/test-helper.js | 8 --- .../files/vendor/.gitkeep | 0 blueprints/module-unification-app/index.js | 35 ----------- 46 files changed, 920 deletions(-) delete mode 100644 blueprints/module-unification-addon/files/.editorconfig delete mode 100644 blueprints/module-unification-addon/files/.ember-cli delete mode 100644 blueprints/module-unification-addon/files/.eslintrc.js delete mode 100644 blueprints/module-unification-addon/files/.travis.yml delete mode 100644 blueprints/module-unification-addon/files/CONTRIBUTING.md delete mode 100644 blueprints/module-unification-addon/files/LICENSE.md delete mode 100644 blueprints/module-unification-addon/files/README.md delete mode 100644 blueprints/module-unification-addon/files/addon-config/ember-try.js delete mode 100644 blueprints/module-unification-addon/files/addon-config/environment.js delete mode 100644 blueprints/module-unification-addon/files/addon-src/.gitkeep delete mode 100644 blueprints/module-unification-addon/files/ember-cli-build.js delete mode 100644 blueprints/module-unification-addon/files/index.js delete mode 100644 blueprints/module-unification-addon/files/npmignore delete mode 100644 blueprints/module-unification-addon/files/tests/dummy/.gitkeep delete mode 100644 blueprints/module-unification-addon/files/tests/index.html delete mode 100644 blueprints/module-unification-addon/files/tests/test-helper.js delete mode 100644 blueprints/module-unification-addon/files/vendor/.gitkeep delete mode 100644 blueprints/module-unification-addon/index.js delete mode 100644 blueprints/module-unification-app/files/.editorconfig delete mode 100644 blueprints/module-unification-app/files/.ember-cli delete mode 100644 blueprints/module-unification-app/files/.eslintignore delete mode 100644 blueprints/module-unification-app/files/.eslintrc.js delete mode 100644 blueprints/module-unification-app/files/.template-lintrc.js delete mode 100644 blueprints/module-unification-app/files/.travis.yml delete mode 100644 blueprints/module-unification-app/files/.watchmanconfig delete mode 100644 blueprints/module-unification-app/files/README.md delete mode 100644 blueprints/module-unification-app/files/config/environment.js delete mode 100644 blueprints/module-unification-app/files/config/optional-features.json delete mode 100644 blueprints/module-unification-app/files/config/targets.js delete mode 100644 blueprints/module-unification-app/files/ember-cli-build.js delete mode 100644 blueprints/module-unification-app/files/gitignore delete mode 100644 blueprints/module-unification-app/files/package.json delete mode 100644 blueprints/module-unification-app/files/public/robots.txt delete mode 100644 blueprints/module-unification-app/files/src/main.js delete mode 100644 blueprints/module-unification-app/files/src/resolver.js delete mode 100644 blueprints/module-unification-app/files/src/router.js delete mode 100644 blueprints/module-unification-app/files/src/ui/components/.gitkeep delete mode 100644 blueprints/module-unification-app/files/src/ui/index.html delete mode 100644 blueprints/module-unification-app/files/src/ui/routes/application/template.hbs delete mode 100644 blueprints/module-unification-app/files/src/ui/styles/app.css delete mode 100644 blueprints/module-unification-app/files/testem.js delete mode 100644 blueprints/module-unification-app/files/tests/acceptance/.gitkeep delete mode 100644 blueprints/module-unification-app/files/tests/index.html delete mode 100644 blueprints/module-unification-app/files/tests/test-helper.js delete mode 100644 blueprints/module-unification-app/files/vendor/.gitkeep delete mode 100644 blueprints/module-unification-app/index.js diff --git a/blueprints/module-unification-addon/files/.editorconfig b/blueprints/module-unification-addon/files/.editorconfig deleted file mode 100644 index 219985c228..0000000000 --- a/blueprints/module-unification-addon/files/.editorconfig +++ /dev/null @@ -1,20 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# editorconfig.org - -root = true - - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 2 - -[*.hbs] -insert_final_newline = false - -[*.{diff,md}] -trim_trailing_whitespace = false diff --git a/blueprints/module-unification-addon/files/.ember-cli b/blueprints/module-unification-addon/files/.ember-cli deleted file mode 100644 index ee64cfed2a..0000000000 --- a/blueprints/module-unification-addon/files/.ember-cli +++ /dev/null @@ -1,9 +0,0 @@ -{ - /** - Ember CLI sends analytics information by default. The data is completely - anonymous, but there are times when you might want to disable this behavior. - - Setting `disableAnalytics` to true will prevent any data from being sent. - */ - "disableAnalytics": false -} diff --git a/blueprints/module-unification-addon/files/.eslintrc.js b/blueprints/module-unification-addon/files/.eslintrc.js deleted file mode 100644 index 657ee6fd51..0000000000 --- a/blueprints/module-unification-addon/files/.eslintrc.js +++ /dev/null @@ -1,54 +0,0 @@ -module.exports = { - root: true, - parser: 'babel-eslint', - parserOptions: { - ecmaVersion: 2018, - sourceType: 'module' - }, - plugins: [ - 'ember' - ], - extends: [ - 'eslint:recommended', - 'plugin:ember/recommended' - ], - env: { - browser: true - }, - rules: { - }, - overrides: [ - // node files - { - files: [ - '.eslintrc.js', - '.template-lintrc.js', - 'ember-cli-build.js', - 'index.js', - 'testem.js', - 'blueprints/*/index.js', - 'config/**/*.js', - 'tests/dummy/config/**/*.js' - ], - excludedFiles: [ - 'src/**', - 'tests/dummy/app/**' - ], - parserOptions: { - sourceType: 'script' - }, - env: { - browser: false, - node: true - }, - plugins: ['node'], - rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, { - // add your custom rules and overrides for node files here - - // this can be removed once the following is fixed - // https://github.com/mysticatea/eslint-plugin-node/issues/77 - 'node/no-unpublished-require': 'off' - }) - } - ] -}; diff --git a/blueprints/module-unification-addon/files/.travis.yml b/blueprints/module-unification-addon/files/.travis.yml deleted file mode 100644 index 1bad18f943..0000000000 --- a/blueprints/module-unification-addon/files/.travis.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -language: node_js -node_js: - # we recommend testing addons with the same minimum supported node version as Ember CLI - # so that your addon works for all apps - - "8" - -sudo: false -dist: trusty - -addons: - chrome: stable - -cache: - directories: - - $HOME/.npm - -env: - global: - # See https://git.io/vdao3 for details. - - JOBS=1 - matrix: - # we recommend new addons test the current and previous LTS - # as well as latest stable release (bonus points to beta/canary) - - EMBER_TRY_SCENARIO=ember-lts-3.4 - - EMBER_TRY_SCENARIO=ember-lts-3.8 - - EMBER_TRY_SCENARIO=ember-release - - EMBER_TRY_SCENARIO=ember-beta - - EMBER_TRY_SCENARIO=ember-canary - - EMBER_TRY_SCENARIO=ember-default - -matrix: - fast_finish: true - allow_failures: - - env: EMBER_TRY_SCENARIO=ember-canary - -script: - - npm run lint:hbs - - npm run lint:js - # Usually, it's ok to finish the test scenario without reverting - # to the addon's original dependency state, skipping "cleanup". - - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup diff --git a/blueprints/module-unification-addon/files/CONTRIBUTING.md b/blueprints/module-unification-addon/files/CONTRIBUTING.md deleted file mode 100644 index 7a36e49be8..0000000000 --- a/blueprints/module-unification-addon/files/CONTRIBUTING.md +++ /dev/null @@ -1,26 +0,0 @@ -# How To Contribute - -## Installation - -* `git clone ` -* `cd <%= addonName %>` -* `<% if (yarn) { %>yarn<% } else { %>npm<% } %> install` - -## Linting - -* `<% if (yarn) { %>yarn lint:hbs<% } else { %>npm run lint:hbs<% } %>` -* `<% if (yarn) { %>yarn lint:js<% } else { %>npm run lint:js<% } %>` -* `<% if (yarn) { %>yarn lint:js --fix<% } else { %>npm run lint:js -- --fix<% } %>` - -## Running tests - -* `ember test` – Runs the test suite on the current Ember version -* `ember test --server` – Runs the test suite in "watch mode" -* `ember try:each` – Runs the test suite against multiple Ember versions - -## Running the dummy application - -* `ember serve` -* Visit the dummy application at [http://localhost:4200](http://localhost:4200). - -For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/). \ No newline at end of file diff --git a/blueprints/module-unification-addon/files/LICENSE.md b/blueprints/module-unification-addon/files/LICENSE.md deleted file mode 100644 index f5799851dc..0000000000 --- a/blueprints/module-unification-addon/files/LICENSE.md +++ /dev/null @@ -1,9 +0,0 @@ -The MIT License (MIT) - -Copyright (c) <%= year %> - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/blueprints/module-unification-addon/files/README.md b/blueprints/module-unification-addon/files/README.md deleted file mode 100644 index 3c8113c5bb..0000000000 --- a/blueprints/module-unification-addon/files/README.md +++ /dev/null @@ -1,38 +0,0 @@ -<%= addonName %> -============================================================================== - -[Short description of the addon.] - - -Compatibility ------------------------------------------------------------------------------- - -* Ember.js v3.4 or above -* Ember CLI v2.13 or above -* Node.js v8 or above - - -Installation ------------------------------------------------------------------------------- - -``` -ember install <%= addonName %> -``` - - -Usage ------------------------------------------------------------------------------- - -[Longer description of how to use the addon in apps.] - - -Contributing ------------------------------------------------------------------------------- - -See the [Contributing](CONTRIBUTING.md) guide for details. - - -License ------------------------------------------------------------------------------- - -This project is licensed under the [MIT License](LICENSE.md). diff --git a/blueprints/module-unification-addon/files/addon-config/ember-try.js b/blueprints/module-unification-addon/files/addon-config/ember-try.js deleted file mode 100644 index c98bf42a4d..0000000000 --- a/blueprints/module-unification-addon/files/addon-config/ember-try.js +++ /dev/null @@ -1,57 +0,0 @@ -'use strict'; - -const getChannelURL = require('ember-source-channel-url'); - -module.exports = async function() { - return { - <% if (yarn) { %>useYarn: true, - <% } %>scenarios: [ - { - name: 'ember-lts-3.4', - npm: { - devDependencies: { - 'ember-source': '~3.4.0' - } - } - }, - { - name: 'ember-lts-3.8', - npm: { - devDependencies: { - 'ember-source': '~3.8.0' - } - } - }, - { - name: 'ember-release', - npm: { - devDependencies: { - 'ember-source': await getChannelURL('release') - } - } - }, - { - name: 'ember-beta', - npm: { - devDependencies: { - 'ember-source': await getChannelURL('beta') - } - } - }, - { - name: 'ember-canary', - npm: { - devDependencies: { - 'ember-source': await getChannelURL('canary') - } - } - }, - { - name: 'ember-default', - npm: { - devDependencies: {} - } - } - ] - }; -}; diff --git a/blueprints/module-unification-addon/files/addon-config/environment.js b/blueprints/module-unification-addon/files/addon-config/environment.js deleted file mode 100644 index 0dfaed4728..0000000000 --- a/blueprints/module-unification-addon/files/addon-config/environment.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -module.exports = function(/* environment, appConfig */) { - return { }; -}; diff --git a/blueprints/module-unification-addon/files/addon-src/.gitkeep b/blueprints/module-unification-addon/files/addon-src/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/blueprints/module-unification-addon/files/ember-cli-build.js b/blueprints/module-unification-addon/files/ember-cli-build.js deleted file mode 100644 index ba0649dc93..0000000000 --- a/blueprints/module-unification-addon/files/ember-cli-build.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); - -module.exports = function (defaults) { - let app = new EmberAddon(defaults, { - // Add options here - }); - - /* - This build file specifies the options for the dummy test app of this - addon, located in `/tests/dummy` - This build file does *not* influence how the addon or the app using it - behave. You most likely want to be modifying `./index.js` or app's build file - */ - - return app.toTree(); -}; diff --git a/blueprints/module-unification-addon/files/index.js b/blueprints/module-unification-addon/files/index.js deleted file mode 100644 index 2e1d1d8d5f..0000000000 --- a/blueprints/module-unification-addon/files/index.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -module.exports = { - name: require('./package').name -}; diff --git a/blueprints/module-unification-addon/files/npmignore b/blueprints/module-unification-addon/files/npmignore deleted file mode 100644 index 0b609faf1a..0000000000 --- a/blueprints/module-unification-addon/files/npmignore +++ /dev/null @@ -1,30 +0,0 @@ -# compiled output -/dist/ -/tmp/ - -# dependencies -/bower_components/ - -# misc -/.bowerrc -/.editorconfig -/.ember-cli -/.env* -/.eslintignore -/.eslintrc.js -/.gitignore -/.watchmanconfig -/.travis.yml -/bower.json -/config/ember-try.js -/CONTRIBUTING.md -/ember-cli-build.js -/testem.js -/tests/ -/yarn.lock -.gitkeep - -# ember-try -/.node_modules.ember-try/ -/bower.json.ember-try -/package.json.ember-try diff --git a/blueprints/module-unification-addon/files/tests/dummy/.gitkeep b/blueprints/module-unification-addon/files/tests/dummy/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/blueprints/module-unification-addon/files/tests/index.html b/blueprints/module-unification-addon/files/tests/index.html deleted file mode 100644 index 5209b85232..0000000000 --- a/blueprints/module-unification-addon/files/tests/index.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - Dummy Tests - - - - {{content-for "head"}} - {{content-for "test-head"}} - - - - - - {{content-for "head-footer"}} - {{content-for "test-head-footer"}} - - - {{content-for "body"}} - {{content-for "test-body"}} - - - - - - - - {{content-for "body-footer"}} - {{content-for "test-body-footer"}} - - diff --git a/blueprints/module-unification-addon/files/tests/test-helper.js b/blueprints/module-unification-addon/files/tests/test-helper.js deleted file mode 100644 index 007bd6e506..0000000000 --- a/blueprints/module-unification-addon/files/tests/test-helper.js +++ /dev/null @@ -1,8 +0,0 @@ -import Application from '../src/main'; -import config from '../config/environment'; -import { setApplication } from '@ember/test-helpers'; -import { start } from 'ember-qunit'; - -setApplication(Application.create(config.APP)); - -start(); diff --git a/blueprints/module-unification-addon/files/vendor/.gitkeep b/blueprints/module-unification-addon/files/vendor/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/blueprints/module-unification-addon/index.js b/blueprints/module-unification-addon/index.js deleted file mode 100644 index 40c0855a29..0000000000 --- a/blueprints/module-unification-addon/index.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; -const addonBlueprint = require('../addon'); -const getURLFor = require('ember-source-channel-url'); - -module.exports = Object.assign({}, addonBlueprint, { - description: 'Generates an Ember addon with a module unification layout.', - appBlueprintName: 'module-unification-app', - - fileMap: Object.assign({}, addonBlueprint.fileMap, { - '^src.*': 'tests/dummy/:path', - '^addon-src/.gitkeep': 'src/.gitkeep', - }), - - locals(options) { - return getURLFor('canary').then(url => { - let result = addonBlueprint.locals(options); - result.emberCanaryVersion = url; - return result; - }); - }, -}); diff --git a/blueprints/module-unification-app/files/.editorconfig b/blueprints/module-unification-app/files/.editorconfig deleted file mode 100644 index 219985c228..0000000000 --- a/blueprints/module-unification-app/files/.editorconfig +++ /dev/null @@ -1,20 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# editorconfig.org - -root = true - - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 2 - -[*.hbs] -insert_final_newline = false - -[*.{diff,md}] -trim_trailing_whitespace = false diff --git a/blueprints/module-unification-app/files/.ember-cli b/blueprints/module-unification-app/files/.ember-cli deleted file mode 100644 index ee64cfed2a..0000000000 --- a/blueprints/module-unification-app/files/.ember-cli +++ /dev/null @@ -1,9 +0,0 @@ -{ - /** - Ember CLI sends analytics information by default. The data is completely - anonymous, but there are times when you might want to disable this behavior. - - Setting `disableAnalytics` to true will prevent any data from being sent. - */ - "disableAnalytics": false -} diff --git a/blueprints/module-unification-app/files/.eslintignore b/blueprints/module-unification-app/files/.eslintignore deleted file mode 100644 index 72df373072..0000000000 --- a/blueprints/module-unification-app/files/.eslintignore +++ /dev/null @@ -1,20 +0,0 @@ -# unconventional js -/blueprints/*/files/ -/vendor/ - -# compiled output -/dist/ -/tmp/ - -# dependencies -/bower_components/ -/node_modules/ - -# misc -/coverage/ -!.* - -# ember-try -/.node_modules.ember-try/ -/bower.json.ember-try -/package.json.ember-try diff --git a/blueprints/module-unification-app/files/.eslintrc.js b/blueprints/module-unification-app/files/.eslintrc.js deleted file mode 100644 index bb2c27ecb0..0000000000 --- a/blueprints/module-unification-app/files/.eslintrc.js +++ /dev/null @@ -1,51 +0,0 @@ -module.exports = { - root: true, - parser: 'babel-eslint', - parserOptions: { - ecmaVersion: 2018, - sourceType: 'module' - }, - plugins: [ - 'ember' - ], - extends: [ - 'eslint:recommended', - 'plugin:ember/recommended' - ], - env: { - browser: true - }, - rules: { - 'ember/no-jquery': 'error' - }, - overrides: [ - // node files - { - files: [ - '.eslintrc.js', - '.template-lintrc.js', - 'ember-cli-build.js', - 'index.js', - 'testem.js', - 'blueprints/*/index.js', - 'config/**/*.js', - 'tests/dummy/config/**/*.js' - ], - parserOptions: { - sourceType: 'script' - }, - env: { - browser: false, - node: true - }, - plugins: ['node'], - rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, { - // add your custom rules and overrides for node files here - - // this can be removed once the following is fixed - // https://github.com/mysticatea/eslint-plugin-node/issues/77 - 'node/no-unpublished-require': 'off' - }) - } - ] -}; diff --git a/blueprints/module-unification-app/files/.template-lintrc.js b/blueprints/module-unification-app/files/.template-lintrc.js deleted file mode 100644 index b45e96ffdd..0000000000 --- a/blueprints/module-unification-app/files/.template-lintrc.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -module.exports = { - extends: 'recommended' -}; diff --git a/blueprints/module-unification-app/files/.travis.yml b/blueprints/module-unification-app/files/.travis.yml deleted file mode 100644 index 25dc4c779b..0000000000 --- a/blueprints/module-unification-app/files/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ ---- -language: node_js -node_js: - - "8" - -sudo: false -dist: trusty - -addons: - chrome: stable -<% if (yarn) { %> -cache: - yarn: true -<% } else { %> -cache: - directories: - - $HOME/.npm -<% } %> -env: - global: - # See https://git.io/vdao3 for details. - - JOBS=1 -<% if (yarn) { %> -before_install: - - curl -o- -L https://yarnpkg.com/install.sh | bash - - export PATH=$HOME/.yarn/bin:$PATH - -install: - - yarn install --non-interactive -<% } %> -script: - - <% if (yarn) { %>yarn<% } else { %>npm run<% } %> lint:hbs - - <% if (yarn) { %>yarn<% } else { %>npm run<% } %> lint:js - - <% if (yarn) { %>yarn<% } else { %>npm<% } %> test diff --git a/blueprints/module-unification-app/files/.watchmanconfig b/blueprints/module-unification-app/files/.watchmanconfig deleted file mode 100644 index e7834e3e4f..0000000000 --- a/blueprints/module-unification-app/files/.watchmanconfig +++ /dev/null @@ -1,3 +0,0 @@ -{ - "ignore_dirs": ["tmp", "dist"] -} diff --git a/blueprints/module-unification-app/files/README.md b/blueprints/module-unification-app/files/README.md deleted file mode 100644 index a970428ca9..0000000000 --- a/blueprints/module-unification-app/files/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# <%= name %> - -This README outlines the details of collaborating on this Ember application. -A short introduction of this app could easily go here. - -## Prerequisites - -You will need the following things properly installed on your computer. - -* [Git](https://git-scm.com/) -* [Node.js](https://nodejs.org/)<% if (yarn) { %> -* [Yarn](https://yarnpkg.com/)<% } else { %> (with npm)<% } %> -* [Ember CLI](https://ember-cli.com/) -* [Google Chrome](https://google.com/chrome/) - -## Installation - -* `git clone ` this repository -* `cd <%= name %>` -* `<% if (yarn) { %>yarn<% } else { %>npm<% } %> install` - -## Running / Development - -* `ember serve` -* Visit your app at [http://localhost:4200](http://localhost:4200). -* Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests). - -### Code Generators - -Make use of the many generators for code, try `ember help generate` for more details - -### Running Tests - -* `ember test` -* `ember test --server` - -### Linting - -* `<% if (yarn) { %>yarn lint:hbs<% } else { %>npm run lint:hbs<% } %>` -* `<% if (yarn) { %>yarn lint:js<% } else { %>npm run lint:js<% } %>` -* `<% if (yarn) { %>yarn lint:js --fix<% } else { %>npm run lint:js -- --fix<% } %>` - -### Building - -* `ember build` (development) -* `ember build --environment production` (production) - -### Deploying - -Specify what it takes to deploy your app. - -## Further Reading / Useful Links - -* [ember.js](https://emberjs.com/) -* [ember-cli](https://ember-cli.com/) -* Development Browser Extensions - * [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi) - * [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/) diff --git a/blueprints/module-unification-app/files/config/environment.js b/blueprints/module-unification-app/files/config/environment.js deleted file mode 100644 index 6184d7d5da..0000000000 --- a/blueprints/module-unification-app/files/config/environment.js +++ /dev/null @@ -1,57 +0,0 @@ -'use strict'; - -module.exports = function(environment) { - let ENV = { - 'ember-resolver': { - features: { - EMBER_RESOLVER_MODULE_UNIFICATION: true - } - }, - modulePrefix: '<%= modulePrefix %>', - environment, - rootURL: '/', - locationType: 'auto', - EmberENV: { - FEATURES: { - // Here you can enable experimental features on an ember canary build - // e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true - EMBER_MODULE_UNIFICATION: true - }, - EXTEND_PROTOTYPES: { - // Prevent Ember Data from overriding Date.parse. - Date: false - } - }, - - APP: { - // Here you can pass flags/options to your application instance - // when it is created - } - }; - - if (environment === 'development') { - // ENV.APP.LOG_RESOLVER = true; - // ENV.APP.LOG_ACTIVE_GENERATION = true; - // ENV.APP.LOG_TRANSITIONS = true; - // ENV.APP.LOG_TRANSITIONS_INTERNAL = true; - // ENV.APP.LOG_VIEW_LOOKUPS = true; - } - - if (environment === 'test') { - // Testem prefers this... - ENV.locationType = 'none'; - - // keep test console output quieter - ENV.APP.LOG_ACTIVE_GENERATION = false; - ENV.APP.LOG_VIEW_LOOKUPS = false; - - ENV.APP.rootElement = '#ember-testing'; - ENV.APP.autoboot = false; - } - - if (environment === 'production') { - // here you can enable a production-specific feature - } - - return ENV; -}; diff --git a/blueprints/module-unification-app/files/config/optional-features.json b/blueprints/module-unification-app/files/config/optional-features.json deleted file mode 100644 index b1902623ae..0000000000 --- a/blueprints/module-unification-app/files/config/optional-features.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "jquery-integration": false -} diff --git a/blueprints/module-unification-app/files/config/targets.js b/blueprints/module-unification-app/files/config/targets.js deleted file mode 100644 index 1a7647d06b..0000000000 --- a/blueprints/module-unification-app/files/config/targets.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - browsers: [ - 'ie 11', - 'last 1 Chrome versions', - 'last 1 Firefox versions', - 'last 1 Safari versions' - ] -}; diff --git a/blueprints/module-unification-app/files/ember-cli-build.js b/blueprints/module-unification-app/files/ember-cli-build.js deleted file mode 100644 index d690a2531e..0000000000 --- a/blueprints/module-unification-app/files/ember-cli-build.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; - -const EmberApp = require('ember-cli/lib/broccoli/ember-app'); - -module.exports = function(defaults) { - let app = new EmberApp(defaults, { - // Add options here - }); - - // Use `app.import` to add additional libraries to the generated - // output files. - // - // If you need to use different assets in different - // environments, specify an object as the first parameter. That - // object's keys should be the environment name and the values - // should be the asset to use in that environment. - // - // If the library that you are including contains AMD or ES6 - // modules that you would like to import into your application - // please specify an object with the list of modules as keys - // along with the exports of each module as its value. - - return app.toTree(); -}; diff --git a/blueprints/module-unification-app/files/gitignore b/blueprints/module-unification-app/files/gitignore deleted file mode 100644 index c40a1b2aba..0000000000 --- a/blueprints/module-unification-app/files/gitignore +++ /dev/null @@ -1,25 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# compiled output -/dist/ -/tmp/ - -# dependencies -/bower_components/ -/node_modules/ - -# misc -/.env* -/.pnp* -/.sass-cache -/connect.lock -/coverage/ -/libpeerconnection.log -/npm-debug.log* -/testem.log -/yarn-error.log - -# ember-try -/.node_modules.ember-try/ -/bower.json.ember-try -/package.json.ember-try diff --git a/blueprints/module-unification-app/files/package.json b/blueprints/module-unification-app/files/package.json deleted file mode 100644 index a776590ccb..0000000000 --- a/blueprints/module-unification-app/files/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "<%= name %>", - "version": "0.0.0", - "private": true, - "description": "Small description for <%= name %> goes here", - "repository": "", - "license": "MIT", - "author": "", - "directories": { - "doc": "doc", - "test": "tests" - }, - "scripts": { - "build": "ember build", - "lint:hbs": "ember-template-lint .", - "lint:js": "eslint .", - "start": "ember serve", - "test": "ember test" - }, - "devDependencies": { - "@ember/optional-features": "^0.7.0", - "babel-eslint": "^10.0.3", - "broccoli-asset-rev": "^3.0.0", - "ember-cli": "github:ember-cli/ember-cli", - "ember-cli-app-version": "^3.2.0", - "ember-cli-babel": "^7.11.0", - "ember-cli-dependency-checker": "^3.1.0", - "ember-cli-eslint": "^5.1.0", - "ember-cli-htmlbars": "^3.1.0", - "ember-cli-htmlbars-inline-precompile": "^3.0.0", - "ember-cli-inject-live-reload": "^2.0.1", - "ember-cli-sri": "^2.1.1", - "ember-cli-template-lint": "^1.0.0-beta.3", - "ember-cli-uglify": "^3.0.0", - "ember-data": "~3.13.0-beta.0", - "ember-export-application-global": "^2.0.0", - "ember-fetch": "^6.7.0", - "ember-load-initializers": "^2.1.0", - "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^4.5.1", - "ember-resolver": "^5.2.1", - "ember-source": "<%= emberCanaryVersion %><% if (welcome) { %>", - "ember-welcome-page": "^4.0.0<% } %>", - "eslint-plugin-ember": "^7.0.0", - "eslint-plugin-node": "^9.2.0", - "loader.js": "^4.7.0", - "qunit-dom": "^0.9.0" - }, - "engines": { - "node": "8.* || >= 10.*" - } -} diff --git a/blueprints/module-unification-app/files/public/robots.txt b/blueprints/module-unification-app/files/public/robots.txt deleted file mode 100644 index f5916452e5..0000000000 --- a/blueprints/module-unification-app/files/public/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# http://www.robotstxt.org -User-agent: * -Disallow: diff --git a/blueprints/module-unification-app/files/src/main.js b/blueprints/module-unification-app/files/src/main.js deleted file mode 100644 index 84b092ff19..0000000000 --- a/blueprints/module-unification-app/files/src/main.js +++ /dev/null @@ -1,19 +0,0 @@ -import Application from "@ember/application"; -import Resolver from "./resolver"; -import loadInitializers from "ember-load-initializers"; -import config from "../config/environment"; - -const App = Application.extend({ - modulePrefix: config.modulePrefix, - podModulePrefix: config.podModulePrefix, - Resolver -}); - -loadInitializers(App, config.modulePrefix + "/src/init"); - -/* - * This line is added to support initializers in the `app/` directory - */ -loadInitializers(App, config.modulePrefix); - -export default App; diff --git a/blueprints/module-unification-app/files/src/resolver.js b/blueprints/module-unification-app/files/src/resolver.js deleted file mode 100644 index f0b8a1ccea..0000000000 --- a/blueprints/module-unification-app/files/src/resolver.js +++ /dev/null @@ -1,13 +0,0 @@ -import Resolver from 'ember-resolver/resolvers/fallback'; -import buildResolverConfig from 'ember-resolver/ember-config'; -import config from '../config/environment'; - -let moduleConfig = buildResolverConfig(config.modulePrefix); -/* - * If your application has custom types and collections, modify moduleConfig here - * to add support for them. - */ - -export default Resolver.extend({ - config: moduleConfig -}); diff --git a/blueprints/module-unification-app/files/src/router.js b/blueprints/module-unification-app/files/src/router.js deleted file mode 100644 index 7f2298b0dc..0000000000 --- a/blueprints/module-unification-app/files/src/router.js +++ /dev/null @@ -1,11 +0,0 @@ -import EmberRouter from "@ember/routing/router"; -import config from "../config/environment"; - -const Router = EmberRouter.extend({ - location: config.locationType, - rootURL: config.rootURL -}); - -Router.map(function() {}); - -export default Router; diff --git a/blueprints/module-unification-app/files/src/ui/components/.gitkeep b/blueprints/module-unification-app/files/src/ui/components/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/blueprints/module-unification-app/files/src/ui/index.html b/blueprints/module-unification-app/files/src/ui/index.html deleted file mode 100644 index 2567509b55..0000000000 --- a/blueprints/module-unification-app/files/src/ui/index.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - <%= name %> - - - - {{content-for "head"}} - - - - - {{content-for "head-footer"}} - - - {{content-for "body"}} - - - - - {{content-for "body-footer"}} - - diff --git a/blueprints/module-unification-app/files/src/ui/routes/application/template.hbs b/blueprints/module-unification-app/files/src/ui/routes/application/template.hbs deleted file mode 100644 index e7e67e966a..0000000000 --- a/blueprints/module-unification-app/files/src/ui/routes/application/template.hbs +++ /dev/null @@ -1,6 +0,0 @@ -<% if (welcome) { %>{{!-- The following component displays Ember's default welcome message. --}} - -{{!-- Feel free to remove this! --}} -<% } else { %>

Welcome to Ember

-<% } %> -{{outlet}} \ No newline at end of file diff --git a/blueprints/module-unification-app/files/src/ui/styles/app.css b/blueprints/module-unification-app/files/src/ui/styles/app.css deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/blueprints/module-unification-app/files/testem.js b/blueprints/module-unification-app/files/testem.js deleted file mode 100644 index 96589a75d2..0000000000 --- a/blueprints/module-unification-app/files/testem.js +++ /dev/null @@ -1,23 +0,0 @@ -module.exports = { - test_page: 'tests/index.html?hidepassed', - disable_watching: true, - launch_in_ci: [ - 'Chrome' - ], - launch_in_dev: [ - 'Chrome' - ], - browser_args: { - Chrome: { - mode: 'ci', - args: [ - // --no-sandbox is needed when running Chrome inside a container - process.env.TRAVIS ? '--no-sandbox' : null, - - '--headless', - '--remote-debugging-port=0', - '--window-size=1440,900' - ].filter(Boolean) - } - } -}; diff --git a/blueprints/module-unification-app/files/tests/acceptance/.gitkeep b/blueprints/module-unification-app/files/tests/acceptance/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/blueprints/module-unification-app/files/tests/index.html b/blueprints/module-unification-app/files/tests/index.html deleted file mode 100644 index 140695b91b..0000000000 --- a/blueprints/module-unification-app/files/tests/index.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - <%= namespace %> Tests - - - - {{content-for "head"}} - {{content-for "test-head"}} - - - - - - {{content-for "head-footer"}} - {{content-for "test-head-footer"}} - - - {{content-for "body"}} - {{content-for "test-body"}} - - - - - - - - {{content-for "body-footer"}} - {{content-for "test-body-footer"}} - - diff --git a/blueprints/module-unification-app/files/tests/test-helper.js b/blueprints/module-unification-app/files/tests/test-helper.js deleted file mode 100644 index 007bd6e506..0000000000 --- a/blueprints/module-unification-app/files/tests/test-helper.js +++ /dev/null @@ -1,8 +0,0 @@ -import Application from '../src/main'; -import config from '../config/environment'; -import { setApplication } from '@ember/test-helpers'; -import { start } from 'ember-qunit'; - -setApplication(Application.create(config.APP)); - -start(); diff --git a/blueprints/module-unification-app/files/vendor/.gitkeep b/blueprints/module-unification-app/files/vendor/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/blueprints/module-unification-app/index.js b/blueprints/module-unification-app/index.js deleted file mode 100644 index 5148990a02..0000000000 --- a/blueprints/module-unification-app/index.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -const stringUtil = require('ember-cli-string-utils'); -const getURLFor = require('ember-source-channel-url'); - -module.exports = { - description: 'Generates an Ember application with a module unification layout.', - - filesToRemove: [], - - locals(options) { - let entity = options.entity; - let rawName = entity.name; - let name = stringUtil.dasherize(rawName); - let namespace = stringUtil.classify(rawName); - - return getURLFor('canary').then(url => ({ - name, - modulePrefix: name, - namespace, - emberCLIVersion: require('../../package').version, - emberCanaryVersion: url, - yarn: options.yarn, - welcome: options.welcome, - })); - }, - - fileMapTokens(options) { - return { - __component__() { - return options.locals.component; - }, - }; - }, -}; From f82d4765959a943b90d5c2d5087bc5046ff0a8e2 Mon Sep 17 00:00:00 2001 From: Cyrille David Date: Thu, 5 Sep 2019 18:17:07 +0200 Subject: [PATCH 055/818] blueprints(custom *-addon): Remove MU specific code --- lib/tasks/generate-from-blueprint.js | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/lib/tasks/generate-from-blueprint.js b/lib/tasks/generate-from-blueprint.js index ef6bb08689..ae8f9d29a2 100644 --- a/lib/tasks/generate-from-blueprint.js +++ b/lib/tasks/generate-from-blueprint.js @@ -14,24 +14,20 @@ class GenerateTask extends Task { run(options) { let name = options.args[0]; - let isNotModuleUnification = !this.project.isModuleUnification(); let noAddonBlueprint = ['mixin', 'blueprint-test']; let mainBlueprint = this.lookupBlueprint(name, options.ignoreMissingMain); let testBlueprint = this.lookupBlueprint(`${name}-test`, true); // lookup custom addon blueprint - let addonBlueprint; - if (isNotModuleUnification) { - addonBlueprint = this.lookupBlueprint(`${name}-addon`, true); + let addonBlueprint = this.lookupBlueprint(`${name}-addon`, true); - // otherwise, use default addon-import - if (noAddonBlueprint.indexOf(name) < 0 && !addonBlueprint && options.args[1]) { - let mainBlueprintSupportsAddon = mainBlueprint && mainBlueprint.supportsAddon() && isNotModuleUnification; + // otherwise, use default addon-import + if (noAddonBlueprint.indexOf(name) < 0 && !addonBlueprint && options.args[1]) { + let mainBlueprintSupportsAddon = mainBlueprint && mainBlueprint.supportsAddon(); - if (mainBlueprintSupportsAddon) { - addonBlueprint = this.lookupBlueprint('addon-import', true); - } + if (mainBlueprintSupportsAddon) { + addonBlueprint = this.lookupBlueprint('addon-import', true); } } From b80b791a13d6df2bdb7514442693d0eba139203c Mon Sep 17 00:00:00 2001 From: Cyrille David Date: Fri, 6 Sep 2019 10:50:12 +0200 Subject: [PATCH 056/818] tests(blueprints): Remove MU blueprints --- tests/acceptance/addon-generate-test.js | 44 +------ tests/acceptance/new-test.js | 124 +++++-------------- tests/acceptance/smoke-test-slow.js | 102 ++++++++------- tests/fixtures/help/generate-with-addon.txt | 4 - tests/fixtures/help/generate.txt | 4 - tests/fixtures/help/help.js | 14 --- tests/fixtures/help/with-addon-blueprints.js | 14 --- tests/fixtures/help/with-addon-commands.js | 14 --- tests/unit/blueprints/in-repo-addon-test.js | 15 +-- tests/unit/commands/addon-test.js | 4 +- tests/unit/commands/new-test.js | 4 +- 11 files changed, 89 insertions(+), 254 deletions(-) diff --git a/tests/acceptance/addon-generate-test.js b/tests/acceptance/addon-generate-test.js index 9b8466dfac..b2aee78f2e 100644 --- a/tests/acceptance/addon-generate-test.js +++ b/tests/acceptance/addon-generate-test.js @@ -6,7 +6,6 @@ const ember = require('../helpers/ember'); const path = require('path'); const fs = require('fs-extra'); let outputFile = RSVP.denodeify(fs.outputFile); -let ensureDir = RSVP.denodeify(fs.ensureDir); let remove = RSVP.denodeify(fs.remove); let root = process.cwd(); let tmproot = path.join(root, 'tmp'); @@ -77,24 +76,7 @@ describe('Acceptance: ember generate in-addon', function() { }) ); - if (isExperimentEnabled('MODULE_UNIFICATION')) { - it( - 'does not run the `addon-import` blueprint from a module unification addon', - co.wrap(function*() { - yield initAddon('my-addon'); - yield ensureDir('src'); - - yield outputFile( - 'blueprints/service/files/__root__/__path__/__name__.js', - "import Service from '@ember/service';\n" + 'export default Service.extend({ });\n' - ); - - yield ember(['generate', 'service', 'session']); - - expect(file('app/services/session.js')).to.not.exist; - }) - ); - } else { + if (!isExperimentEnabled('MODULE_UNIFICATION')) { it( 'runs the `addon-import` blueprint from a classic addon', co.wrap(function*() { @@ -112,29 +94,7 @@ describe('Acceptance: ember generate in-addon', function() { ); } - if (isExperimentEnabled('MODULE_UNIFICATION')) { - it( - 'skips a custom "*-addon" blueprint from a module unification addon', - co.wrap(function*() { - yield initAddon('my-addon'); - yield ensureDir('src'); - - yield outputFile( - 'blueprints/service/files/__root__/__path__/__name__.js', - "import Service from '@ember/service';\n" + 'export default Service.extend({ });\n' - ); - - yield outputFile( - 'blueprints/service-addon/files/app/services/session.js', - "export { default } from 'somewhere';\n" - ); - - yield ember(['generate', 'service', 'session']); - - expect(file('app/services/session.js')).to.not.exist; - }) - ); - } else { + if (!isExperimentEnabled('MODULE_UNIFICATION')) { it( 'runs a custom "*-addon" blueprint from a classic addon', co.wrap(function*() { diff --git a/tests/acceptance/new-test.js b/tests/acceptance/new-test.js index faf7e9e2ba..1f84254e05 100644 --- a/tests/acceptance/new-test.js +++ b/tests/acceptance/new-test.js @@ -19,8 +19,6 @@ let file = chai.file; let dir = chai.dir; const forEach = require('ember-cli-lodash-subset').forEach; const assertVersionLock = require('../helpers/assert-version-lock'); -const { isExperimentEnabled } = require('../../lib/experiments'); -const getURLFor = require('ember-source-channel-url'); let tmpDir = './tmp/new-test'; @@ -64,13 +62,6 @@ describe('Acceptance: ember new', function() { ); } - function confirmBlueprintedApp() { - if (isExperimentEnabled('MODULE_UNIFICATION')) { - return confirmBlueprintedForDir('blueprints/module-unification-app'); - } - return confirmBlueprintedForDir('blueprints/app'); - } - it( 'ember new adds ember-welcome-page by default', co.wrap(function*() { @@ -78,11 +69,7 @@ describe('Acceptance: ember new', function() { expect(file('package.json')).to.match(/"ember-welcome-page"/); - const filePath = isExperimentEnabled('MODULE_UNIFICATION') - ? 'src/ui/routes/application/template.hbs' - : 'app/templates/application.hbs'; - - expect(file(filePath)).to.contain(''); + expect(file('app/templates/application.hbs')).to.contain(''); }) ); @@ -93,23 +80,7 @@ describe('Acceptance: ember new', function() { expect(file('package.json')).not.to.match(/"ember-welcome-page"/); - const filePath = isExperimentEnabled('MODULE_UNIFICATION') - ? 'src/ui/routes/application/template.hbs' - : 'app/templates/application.hbs'; - - expect(file(filePath)).to.contain('Welcome to Ember'); - }) - ); - - it( - 'ember new module-unification-app', - co.wrap(function*() { - yield ember(['new', 'foo', '--blueprint', 'module-unification-app', '--skip-npm', '--skip-bower']); - confirmBlueprintedForDir('blueprints/module-unification-app'); - - expect(dir('tests/unit')).to.not.exist; - expect(dir('tests/integration')).to.not.exist; - expect(dir('tests/acceptance')).to.exist; + expect(file('app/templates/application.hbs')).to.contain('Welcome to Ember'); }) ); @@ -127,7 +98,7 @@ describe('Acceptance: ember new', function() { co.wrap(function*() { yield ember(['new', 'foo', '--skip-npm', '--skip-bower']); - confirmBlueprintedApp(); + confirmBlueprintedForDir('blueprints/app'); }) ); @@ -210,7 +181,7 @@ describe('Acceptance: ember new', function() { expect(error.name).to.equal('SilentError'); expect(error.message).to.equal(`You cannot use the ${chalk.green('new')} command inside an ember-cli project.`); - confirmBlueprintedApp(); + confirmBlueprintedForDir('blueprints/app'); }) ); @@ -388,28 +359,16 @@ describe('Acceptance: ember new', function() { ); describe('verify fixtures', function() { - let emberCanaryVersion; - if (isExperimentEnabled('MODULE_UNIFICATION')) { - before(function() { - return getURLFor('canary').then(function(url) { - emberCanaryVersion = url; - }); - }); - } - function checkEslintConfig(fixturePath) { expect(file('.eslintrc.js')).to.equal(file(path.join(__dirname, '../fixtures', fixturePath, '.eslintrc.js'))); } function checkPackageJson(fixtureName) { - let currentVersion = isExperimentEnabled('MODULE_UNIFICATION') - ? 'github:ember-cli/ember-cli' - : require('../../package').version; + let currentVersion = require('../../package').version; let fixturePath = path.join(__dirname, '../fixtures', fixtureName, 'package.json'); let fixtureContents = fs .readFileSync(fixturePath, { encoding: 'utf-8' }) - .replace('<%= emberCLIVersion %>', currentVersion) - .replace('<%= emberCanaryVersion %>', emberCanaryVersion); + .replace('<%= emberCLIVersion %>', currentVersion); expect(file('package.json')).to.equal(fixtureContents); } @@ -419,13 +378,10 @@ describe('Acceptance: ember new', function() { co.wrap(function*() { yield ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--no-welcome']); - let namespace = isExperimentEnabled('MODULE_UNIFICATION') ? 'module-unification-app' : 'app'; - let applicationTemplate = isExperimentEnabled('MODULE_UNIFICATION') - ? 'src/ui/routes/application/template.hbs' - : 'app/templates/application.hbs'; + let namespace = 'app'; let fixturePath = `${namespace}/npm`; - [applicationTemplate, '.travis.yml', 'README.md'].forEach(filePath => { + ['app/templates/application.hbs', '.travis.yml', 'README.md'].forEach(filePath => { expect(file(filePath)).to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath))); }); @@ -441,13 +397,9 @@ describe('Acceptance: ember new', function() { co.wrap(function*() { yield ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--yarn']); - let namespace = isExperimentEnabled('MODULE_UNIFICATION') ? 'module-unification-app' : 'app'; - let applicationTemplate = isExperimentEnabled('MODULE_UNIFICATION') - ? 'src/ui/routes/application/template.hbs' - : 'app/templates/application.hbs'; - let fixturePath = `${namespace}/yarn`; + let fixturePath = 'app/yarn'; - [applicationTemplate, '.travis.yml', 'README.md'].forEach(filePath => { + ['app/templates/application.hbs', '.travis.yml', 'README.md'].forEach(filePath => { expect(file(filePath)).to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath))); }); @@ -460,17 +412,17 @@ describe('Acceptance: ember new', function() { co.wrap(function*() { yield ember(['addon', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--yarn', '--welcome']); - let namespace = isExperimentEnabled('MODULE_UNIFICATION') ? 'module-unification-addon' : 'addon'; - let applicationTemplate = isExperimentEnabled('MODULE_UNIFICATION') - ? 'tests/dummy/src/ui/routes/application/template.hbs' - : 'tests/dummy/app/templates/application.hbs'; - let fixturePath = `${namespace}/yarn`; + let fixturePath = 'addon/yarn'; - ['config/ember-try.js', applicationTemplate, '.travis.yml', 'README.md', 'CONTRIBUTING.md'].forEach( - filePath => { - expect(file(filePath)).to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath))); - } - ); + [ + 'config/ember-try.js', + 'tests/dummy/app/templates/application.hbs', + '.travis.yml', + 'README.md', + 'CONTRIBUTING.md', + ].forEach(filePath => { + expect(file(filePath)).to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath))); + }); checkPackageJson(fixturePath); }) @@ -481,17 +433,18 @@ describe('Acceptance: ember new', function() { co.wrap(function*() { yield ember(['addon', 'foo', '--skip-npm', '--skip-bower', '--skip-git']); - let namespace = isExperimentEnabled('MODULE_UNIFICATION') ? 'module-unification-addon' : 'addon'; - let applicationTemplate = isExperimentEnabled('MODULE_UNIFICATION') - ? 'tests/dummy/src/ui/routes/application/template.hbs' - : 'tests/dummy/app/templates/application.hbs'; + let namespace = 'addon'; let fixturePath = `${namespace}/npm`; - ['config/ember-try.js', applicationTemplate, '.travis.yml', 'README.md', 'CONTRIBUTING.md'].forEach( - filePath => { - expect(file(filePath)).to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath))); - } - ); + [ + 'config/ember-try.js', + 'tests/dummy/app/templates/application.hbs', + '.travis.yml', + 'README.md', + 'CONTRIBUTING.md', + ].forEach(filePath => { + expect(file(filePath)).to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath))); + }); checkPackageJson(fixturePath); @@ -499,23 +452,6 @@ describe('Acceptance: ember new', function() { checkEslintConfig(namespace); }) ); - - if (isExperimentEnabled('MODULE_UNIFICATION')) { - it( - 'EMBER_CLI_MODULE_UNIFICATION: ember addon foo works', - co.wrap(function*() { - yield ember(['addon', 'foo', '--skip-npm', '--skip-bower']); - - // TODO: This test could be now removed because addon content is tested above - // - // the fixture files are now out of sync because - // this only tests file count and names, not contents - let expectedFiles = walkSync(path.join(__dirname, '../fixtures', 'module-unification-addon/yarn')); - let actualFiles = walkSync('.'); - expect(actualFiles).to.deep.equal(expectedFiles); - }) - ); - } }); describe('verify dependencies', function() { diff --git a/tests/acceptance/smoke-test-slow.js b/tests/acceptance/smoke-test-slow.js index 57010f7f0b..2ba11a6515 100644 --- a/tests/acceptance/smoke-test-slow.js +++ b/tests/acceptance/smoke-test-slow.js @@ -47,37 +47,33 @@ describe('Acceptance: smoke-test', function() { return runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); }); - it('ember new foo, make sure addon template overwrites', async function() { - await ember(['generate', 'template', 'foo']); - await ember(['generate', 'in-repo-addon', 'my-addon']); - - // this should work, but generating a template in an addon/in-repo-addon doesn't - // do the right thing: update once https://github.com/ember-cli/ember-cli/issues/5687 - // is fixed - //return ember(['generate', 'template', 'foo', '--in-repo-addon=my-addon']); - - // temporary work around - let templatePath, packageJsonPath; - if (isExperimentEnabled('MODULE_UNIFICATION')) { - templatePath = path.join('packages', 'my-addon', 'src', 'ui', 'routes', 'foo.hbs'); - packageJsonPath = path.join('packages', 'my-addon', 'package.json'); - } else { - templatePath = path.join('lib', 'my-addon', 'app', 'templates', 'foo.hbs'); - packageJsonPath = path.join('lib', 'my-addon', 'package.json'); - } + if (!isExperimentEnabled('MODULE_UNIFICATION')) { + it('ember new foo, make sure addon template overwrites', async function() { + await ember(['generate', 'template', 'foo']); + await ember(['generate', 'in-repo-addon', 'my-addon']); - fs.mkdirsSync(path.dirname(templatePath)); - fs.writeFileSync(templatePath, 'Hi, Mom!', { encoding: 'utf8' }); + // this should work, but generating a template in an addon/in-repo-addon doesn't + // do the right thing: update once https://github.com/ember-cli/ember-cli/issues/5687 + // is fixed + //return ember(['generate', 'template', 'foo', '--in-repo-addon=my-addon']); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.dependencies = packageJson.dependencies || {}; - packageJson.dependencies['ember-cli-htmlbars'] = '*'; + // temporary work around + let templatePath = path.join('lib', 'my-addon', 'app', 'templates', 'foo.hbs'); + let packageJsonPath = path.join('lib', 'my-addon', 'package.json'); - fs.writeJsonSync(packageJsonPath, packageJson); + fs.mkdirsSync(path.dirname(templatePath)); + fs.writeFileSync(templatePath, 'Hi, Mom!', { encoding: 'utf8' }); - let result = await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - expect(result.code).to.equal(0); - }); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.dependencies = packageJson.dependencies || {}; + packageJson.dependencies['ember-cli-htmlbars'] = '*'; + + fs.writeJsonSync(packageJsonPath, packageJson); + + let result = await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + expect(result.code).to.equal(0); + }); + } it('ember test still runs when a JavaScript testem config exists', async function() { await copyFixtureFiles('smoke-tests/js-testem-config'); @@ -238,33 +234,35 @@ describe('Acceptance: smoke-test', function() { expect(result.code).to.not.equal(0, `expected exit code to be non-zero, but got ${result.code}`); }); - it('ember build generates instrumentation files when viz is enabled', async function() { - process.env.BROCCOLI_VIZ = '1'; - - try { - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', { - env: { - BROCCOLI_VIZ: '1', - }, - }); - } finally { - delete process.env.BROCCOLI_VIZ; - } + if (!isExperimentEnabled('MODULE_UNIFICATION')) { + it('ember build generates instrumentation files when viz is enabled', async function() { + process.env.BROCCOLI_VIZ = '1'; + + try { + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', { + env: { + BROCCOLI_VIZ: '1', + }, + }); + } finally { + delete process.env.BROCCOLI_VIZ; + } - [ - 'instrumentation.build.0.json', - 'instrumentation.command.json', - 'instrumentation.init.json', - 'instrumentation.shutdown.json', - ].forEach(instrumentationFile => { - expect(fs.existsSync(instrumentationFile)).to.equal(true); + [ + 'instrumentation.build.0.json', + 'instrumentation.command.json', + 'instrumentation.init.json', + 'instrumentation.shutdown.json', + ].forEach(instrumentationFile => { + expect(fs.existsSync(instrumentationFile)).to.equal(true); - let json = fs.readJsonSync(instrumentationFile); - expect(Object.keys(json)).to.eql(['summary', 'nodes']); + let json = fs.readJsonSync(instrumentationFile); + expect(Object.keys(json)).to.eql(['summary', 'nodes']); - expect(Array.isArray(json.nodes)).to.equal(true); + expect(Array.isArray(json.nodes)).to.equal(true); + }); }); - }); + } it.skip('ember new foo, build --watch development, and verify rebuilt after change', async function() { let touched = false; @@ -445,9 +443,7 @@ describe('Acceptance: smoke-test', function() { await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'generate', 'component', 'foo-bar'); - let filePath = isExperimentEnabled('MODULE_UNIFICATION') - ? 'src/ui/components/new-path/foo-bar/component.js' - : 'app/components/new-path/foo-bar.js'; + let filePath = 'app/components/new-path/foo-bar.js'; // because we're overriding, the fileMapTokens is default, sans 'component' expect(file(filePath)).to.contain('generated component successfully'); diff --git a/tests/fixtures/help/generate-with-addon.txt b/tests/fixtures/help/generate-with-addon.txt index 550f599ae2..bb5fc0565c 100644 --- a/tests/fixtures/help/generate-with-addon.txt +++ b/tests/fixtures/help/generate-with-addon.txt @@ -45,10 +45,6 @@ ember generate \u001b[33m\u001b[39m \u001b[36m\u001b[39m \u001b[90mThe blueprint for addon in repo ember-cli addons.\u001b[39m lib \u001b[33m\u001b[39m \u001b[90mGenerates a lib directory for in-repo addons.\u001b[39m - module-unification-addon \u001b[33m\u001b[39m - \u001b[90mGenerates an Ember addon with a module unification layout.\u001b[39m - module-unification-app \u001b[33m\u001b[39m - \u001b[90mGenerates an Ember application with a module unification layout.\u001b[39m packages \u001b[33m\u001b[39m \u001b[90mGenerates a packages directory for module unification in-repo addons.\u001b[39m server \u001b[33m\u001b[39m diff --git a/tests/fixtures/help/generate.txt b/tests/fixtures/help/generate.txt index 70600d79f1..084867308c 100644 --- a/tests/fixtures/help/generate.txt +++ b/tests/fixtures/help/generate.txt @@ -17,10 +17,6 @@ \u001b[90mThe blueprint for addon in repo ember-cli addons.\u001b[39m lib \u001b[33m\u001b[39m \u001b[90mGenerates a lib directory for in-repo addons.\u001b[39m - module-unification-addon \u001b[33m\u001b[39m - \u001b[90mGenerates an Ember addon with a module unification layout.\u001b[39m - module-unification-app \u001b[33m\u001b[39m - \u001b[90mGenerates an Ember application with a module unification layout.\u001b[39m packages \u001b[33m\u001b[39m \u001b[90mGenerates a packages directory for module unification in-repo addons.\u001b[39m server \u001b[33m\u001b[39m diff --git a/tests/fixtures/help/help.js b/tests/fixtures/help/help.js index 1fb60fd621..3311b16fa3 100644 --- a/tests/fixtures/help/help.js +++ b/tests/fixtures/help/help.js @@ -317,20 +317,6 @@ module.exports = { anonymousOptions: ['name'], overridden: false }, - { - name: 'module-unification-addon', - description: 'Generates an Ember addon with a module unification layout.', - availableOptions: [], - anonymousOptions: ['name'], - overridden: false - }, - { - name: 'module-unification-app', - description: 'Generates an Ember application with a module unification layout.', - availableOptions: [], - anonymousOptions: ['name'], - overridden: false - }, { name: 'packages', description: 'Generates a packages directory for module unification in-repo addons.', diff --git a/tests/fixtures/help/with-addon-blueprints.js b/tests/fixtures/help/with-addon-blueprints.js index f998775d6e..c37c3ac71c 100644 --- a/tests/fixtures/help/with-addon-blueprints.js +++ b/tests/fixtures/help/with-addon-blueprints.js @@ -349,20 +349,6 @@ module.exports = { anonymousOptions: ['name'], overridden: false }, - { - name: 'module-unification-addon', - description: 'Generates an Ember addon with a module unification layout.', - availableOptions: [], - anonymousOptions: ['name'], - overridden: false - }, - { - name: 'module-unification-app', - description: 'Generates an Ember application with a module unification layout.', - availableOptions: [], - anonymousOptions: ['name'], - overridden: false - }, { name: 'packages', description: 'Generates a packages directory for module unification in-repo addons.', diff --git a/tests/fixtures/help/with-addon-commands.js b/tests/fixtures/help/with-addon-commands.js index 4251ef1bda..43f0de03a6 100644 --- a/tests/fixtures/help/with-addon-commands.js +++ b/tests/fixtures/help/with-addon-commands.js @@ -317,20 +317,6 @@ module.exports = { anonymousOptions: ['name'], overridden: false }, - { - name: 'module-unification-addon', - description: 'Generates an Ember addon with a module unification layout.', - availableOptions: [], - anonymousOptions: ['name'], - overridden: false - }, - { - name: 'module-unification-app', - description: 'Generates an Ember application with a module unification layout.', - availableOptions: [], - anonymousOptions: ['name'], - overridden: false - }, { name: 'packages', description: 'Generates a packages directory for module unification in-repo addons.', diff --git a/tests/unit/blueprints/in-repo-addon-test.js b/tests/unit/blueprints/in-repo-addon-test.js index c0ca1be2a0..291928b1c5 100644 --- a/tests/unit/blueprints/in-repo-addon-test.js +++ b/tests/unit/blueprints/in-repo-addon-test.js @@ -11,7 +11,6 @@ const td = require('testdouble'); const expect = require('ember-cli-blueprint-test-helpers/chai').expect; const file = require('ember-cli-blueprint-test-helpers/chai').file; -const { isExperimentEnabled } = require('../../../lib/experiments'); describe('Acceptance: ember generate and destroy in-repo-addon', function() { setupTestHooks(this, { @@ -21,8 +20,6 @@ describe('Acceptance: ember generate and destroy in-repo-addon', function() { it('in-repo-addon fooBar', function() { let args = ['in-repo-addon', 'fooBar']; - const path = isExperimentEnabled('MODULE_UNIFICATION') ? 'packages' : 'lib'; - return emberNew() .then(function() { expect(fs.readJsonSync('package.json')['ember-addon']).to.be.undefined; @@ -31,24 +28,24 @@ describe('Acceptance: ember generate and destroy in-repo-addon', function() { return emberGenerate(args); }) .then(function() { - expect(file(`${path}/foo-bar/package.json`)).to.exist; - expect(file(`${path}/foo-bar/index.js`)).to.exist; + expect(file('lib/foo-bar/package.json')).to.exist; + expect(file('lib/foo-bar/index.js')).to.exist; - expect(fs.readJsonSync(`${path}/foo-bar/package.json`)).to.deep.equal({ + expect(fs.readJsonSync('lib/foo-bar/package.json')).to.deep.equal({ name: 'foo-bar', keywords: ['ember-addon'], }); expect(fs.readJsonSync('package.json')['ember-addon']).to.deep.equal({ - paths: [`${path}/foo-bar`], + paths: ['lib/foo-bar'], }); }) .then(function() { return emberDestroy(args); }) .then(function() { - expect(file(`${path}/foo-bar/package.json`)).to.not.exist; - expect(file(`${path}/foo-bar/index.js`)).to.not.exist; + expect(file('lib/foo-bar/package.json')).to.not.exist; + expect(file('lib/foo-bar/index.js')).to.not.exist; expect(fs.readJsonSync('package.json')['ember-addon']['paths']).to.be.undefined; }); diff --git a/tests/unit/commands/addon-test.js b/tests/unit/commands/addon-test.js index 4cf4f69aac..c58f1dce72 100644 --- a/tests/unit/commands/addon-test.js +++ b/tests/unit/commands/addon-test.js @@ -5,7 +5,6 @@ const commandOptions = require('../../factories/command-options'); const map = require('ember-cli-lodash-subset').map; const AddonCommand = require('../../../lib/commands/addon'); const Blueprint = require('../../../lib/models/blueprint'); -const { isExperimentEnabled } = require('../../../lib/experiments'); const td = require('testdouble'); describe('addon command', function() { @@ -73,10 +72,9 @@ describe('addon command', function() { }); it("doesn't allow to create an addon when the name is a period", function() { - let blueprintName = isExperimentEnabled('MODULE_UNIFICATION') ? 'module-unification-addon' : 'addon'; return expect(command.validateAndRun(['.'])).to.be.rejected.then(error => { expect(error.message).to.equal( - `Trying to generate an ${blueprintName} structure in this directory? Use \`ember init\` instead.` + `Trying to generate an addon structure in this directory? Use \`ember init\` instead.` ); }); }); diff --git a/tests/unit/commands/new-test.js b/tests/unit/commands/new-test.js index 3a60b65ff8..f2ba9d8e32 100644 --- a/tests/unit/commands/new-test.js +++ b/tests/unit/commands/new-test.js @@ -8,7 +8,6 @@ const Promise = require('rsvp').Promise; const Blueprint = require('../../../lib/models/blueprint'); const Command = require('../../../lib/models/command'); const Task = require('../../../lib/models/task'); -const { isExperimentEnabled } = require('../../../lib/experiments'); const td = require('testdouble'); describe('new command', function() { @@ -78,10 +77,9 @@ describe('new command', function() { }); it('shows a suggestion messages when the application name is a period', function() { - let blueprintName = isExperimentEnabled('MODULE_UNIFICATION') ? 'module-unification-app' : 'application'; return expect(command.validateAndRun(['.'])).to.be.rejected.then(error => { expect(error.message).to.equal( - `Trying to generate an ${blueprintName} structure in this directory? Use \`ember init\` instead.` + `Trying to generate an application structure in this directory? Use \`ember init\` instead.` ); }); }); From 5e4bc5fc5cf86d47b98e3bd2fb3767e475a1abb4 Mon Sep 17 00:00:00 2001 From: Cyrille David Date: Fri, 6 Sep 2019 19:11:19 +0200 Subject: [PATCH 057/818] Skip some acceptance tests in MU test suite All acceptance tests that run such a before hook: ``` before(function() { return createTestTargets(appName); }); ``` are now skipped when EMBER_CLI_MODULE_UNIFICATION is set to true. Indeed, the `createTestTargets` helper runs under the hood the `addon` blueprint. As this blueprint do not generate a MU file structure anymore, the tests need to be skipped. --- tests/acceptance/addon-smoke-test-slow.js | 171 ++-- tests/acceptance/brocfile-smoke-test-slow.js | 783 +++++++++--------- .../nested-addons-smoke-test-slow.js | 75 +- .../preprocessor-smoke-test-slow.js | 217 ++--- tests/acceptance/smoke-test-slow.js | 591 ++++++------- 5 files changed, 895 insertions(+), 942 deletions(-) diff --git a/tests/acceptance/addon-smoke-test-slow.js b/tests/acceptance/addon-smoke-test-slow.js index f98b5cec9e..7901690585 100644 --- a/tests/acceptance/addon-smoke-test-slow.js +++ b/tests/acceptance/addon-smoke-test-slow.js @@ -51,110 +51,30 @@ describe('Acceptance: addon-smoke-test', function() { delete process.env.JOBS; }); - it('generates package.json with proper metadata', function() { - let packageContents = fs.readJsonSync('package.json'); - - expect(packageContents.name).to.equal(addonName); - expect(packageContents.private).to.be.an('undefined'); - expect(packageContents.keywords).to.deep.equal(['ember-addon']); - expect(packageContents['ember-addon']).to.deep.equal({ configPath: 'tests/dummy/config' }); - }); - - (isExperimentEnabled('MODULE_UNIFICATION') ? it.skip : it)('ember addon foo, clean from scratch', function() { - return ember(['test']); - }); - - it( - 'works in most common scenarios for an example addon', - co.wrap(function*() { - let fixtureFile = isExperimentEnabled('MODULE_UNIFICATION') ? 'kitchen-sink-mu' : 'kitchen-sink'; - yield copyFixtureFiles(`addon/${fixtureFile}`); - - let packageJsonPath = path.join(addonRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - - expect(packageJson.devDependencies['ember-source']).to.not.be.empty; - - packageJson.dependencies = packageJson.dependencies || {}; - // add HTMLBars for templates (generators do this automatically when components/templates are added) - packageJson.dependencies['ember-cli-htmlbars'] = 'latest'; - - fs.writeJsonSync(packageJsonPath, packageJson); - - let result = yield runCommand('node_modules/ember-cli/bin/ember', 'build'); - - expect(result.code).to.eql(0); - let contents; - - let indexPath = path.join(addonRoot, 'dist', 'index.html'); - contents = fs.readFileSync(indexPath, { encoding: 'utf8' }); - expect(contents).to.contain('"SOME AWESOME STUFF"'); - - let cssPath = path.join(addonRoot, 'dist', 'assets', 'vendor.css'); - contents = fs.readFileSync(cssPath, { encoding: 'utf8' }); - expect(contents).to.contain('addon/styles/app.css is present'); - - let robotsPath = path.join(addonRoot, 'dist', 'robots.txt'); - contents = fs.readFileSync(robotsPath, { encoding: 'utf8' }); - expect(contents).to.contain('tests/dummy/public/robots.txt is present'); - - result = yield runCommand('node_modules/ember-cli/bin/ember', 'test'); + if (!isExperimentEnabled('MODULE_UNIFICATION')) { + it('generates package.json with proper metadata', function() { + let packageContents = fs.readJsonSync('package.json'); + + expect(packageContents.name).to.equal(addonName); + expect(packageContents.private).to.be.an('undefined'); + expect(packageContents.keywords).to.deep.equal(['ember-addon']); + expect(packageContents['ember-addon']).to.deep.equal({ configPath: 'tests/dummy/config' }); + }); - expect(result.code).to.eql(0); - }) - ); + it('ember addon foo, clean from scratch', function() { + return ember(['test']); + }); - it( - 'npm pack does not include unnecessary files', - co.wrap(function*() { - let handleError = function(error, commandName) { - if (error.code === 'ENOENT') { - console.warn(chalk.yellow(` Your system does not provide ${commandName} -> Skipped this test.`)); - } else { - throw new Error(error); - } - }; - - try { - yield npmPack(); - } catch (error) { - return handleError(error, 'npm'); - } - - let output; - try { - output = yield tar(); - } catch (error) { - return handleError(error, 'tar'); - } - - let unnecessaryFiles = [ - '.gitkeep', - '.travis.yml', - '.editorconfig', - 'testem.js', - '.ember-cli', - 'bower.json', - '.bowerrc', - ]; - - let unnecessaryFolders = ['tests/', 'bower_components/']; - - let outputFiles = output.split('\n'); - expect(outputFiles).to.not.contain(unnecessaryFiles); - expect(outputFiles).to.not.contain(unnecessaryFolders); - }) - ); - - if (isExperimentEnabled('MODULE_UNIFICATION')) { it( - 'can run a MU unit test with a relative import', + 'works in most common scenarios for an example addon', co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/mu-unit-test-with-relative-import'); + yield copyFixtureFiles('addon/kitchen-sink'); let packageJsonPath = path.join(addonRoot, 'package.json'); let packageJson = fs.readJsonSync(packageJsonPath); + expect(packageJson.devDependencies['ember-source']).to.not.be.empty; + packageJson.dependencies = packageJson.dependencies || {}; // add HTMLBars for templates (generators do this automatically when components/templates are added) packageJson.dependencies['ember-cli-htmlbars'] = 'latest'; @@ -162,18 +82,69 @@ describe('Acceptance: addon-smoke-test', function() { fs.writeJsonSync(packageJsonPath, packageJson); let result = yield runCommand('node_modules/ember-cli/bin/ember', 'build'); + expect(result.code).to.eql(0); + let contents; - let appFileContents = fs.readFileSync(path.join(addonRoot, 'dist', 'assets', 'tests.js'), { - encoding: 'utf8', - }); + let indexPath = path.join(addonRoot, 'dist', 'index.html'); + contents = fs.readFileSync(indexPath, { encoding: 'utf8' }); + expect(contents).to.contain('"SOME AWESOME STUFF"'); - expect(appFileContents).to.include('Unit | Utility | string'); + let cssPath = path.join(addonRoot, 'dist', 'assets', 'vendor.css'); + contents = fs.readFileSync(cssPath, { encoding: 'utf8' }); + expect(contents).to.contain('addon/styles/app.css is present'); + + let robotsPath = path.join(addonRoot, 'dist', 'robots.txt'); + contents = fs.readFileSync(robotsPath, { encoding: 'utf8' }); + expect(contents).to.contain('tests/dummy/public/robots.txt is present'); result = yield runCommand('node_modules/ember-cli/bin/ember', 'test'); + expect(result.code).to.eql(0); }) ); + + it( + 'npm pack does not include unnecessary files', + co.wrap(function*() { + let handleError = function(error, commandName) { + if (error.code === 'ENOENT') { + console.warn(chalk.yellow(` Your system does not provide ${commandName} -> Skipped this test.`)); + } else { + throw new Error(error); + } + }; + + try { + yield npmPack(); + } catch (error) { + return handleError(error, 'npm'); + } + + let output; + try { + output = yield tar(); + } catch (error) { + return handleError(error, 'tar'); + } + + let unnecessaryFiles = [ + '.gitkeep', + '.travis.yml', + '.editorconfig', + 'testem.js', + '.ember-cli', + 'bower.json', + '.bowerrc', + ]; + + let unnecessaryFolders = ['tests/', 'bower_components/']; + + let outputFiles = output.split('\n'); + expect(outputFiles).to.not.contain(unnecessaryFiles); + expect(outputFiles).to.not.contain(unnecessaryFolders); + }) + ); } }); diff --git a/tests/acceptance/brocfile-smoke-test-slow.js b/tests/acceptance/brocfile-smoke-test-slow.js index 9129e6d60e..080a87ebb1 100644 --- a/tests/acceptance/brocfile-smoke-test-slow.js +++ b/tests/acceptance/brocfile-smoke-test-slow.js @@ -41,15 +41,32 @@ describe('Acceptance: brocfile-smoke-test', function() { expect(dir(appRoot)).to.not.exist; }); - it( - 'a custom environment config can be used in Brocfile.js', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/custom-environment-config'); - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); - }) - ); - if (!isExperimentEnabled('MODULE_UNIFICATION')) { + it( + 'a custom EmberENV in config/environment.js is used for window.EmberENV', + co.wrap(function*() { + yield copyFixtureFiles('brocfile-tests/custom-ember-env'); + yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let vendorContents = fs.readFileSync(path.join('dist', 'assets', 'vendor.js'), { + encoding: 'utf8', + }); + + // Changes in config/optional-features.json end up being set in EmberENV + let expected = + 'window.EmberENV = {"asdflkmawejf":";jlnu3yr23","_APPLICATION_TEMPLATE_WRAPPER":false,"_DEFAULT_ASYNC_OBSERVERS":true,"_JQUERY_INTEGRATION":false,"_TEMPLATE_ONLY_GLIMMER_COMPONENTS":true};'; + expect(vendorContents).to.contain(expected, 'EmberENV should be in assets/vendor.js'); + }) + ); + + it( + 'a custom environment config can be used in Brocfile.js', + co.wrap(function*() { + yield copyFixtureFiles('brocfile-tests/custom-environment-config'); + yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); + }) + ); + it( 'without app/templates', co.wrap(function*() { @@ -60,147 +77,122 @@ describe('Acceptance: brocfile-smoke-test', function() { ); it( - 'a custom EmberENV in config/environment.js is used for window.EmberENV', + 'strips app/styles or app/templates from JS', co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/custom-ember-env'); + yield copyFixtureFiles('brocfile-tests/styles-and-templates-stripped'); yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - let vendorContents = fs.readFileSync(path.join('dist', 'assets', 'vendor.js'), { + let appFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', `${appName}.js`), { encoding: 'utf8', }); - // Changes in config/optional-features.json end up being set in EmberENV - let expected = - 'window.EmberENV = {"asdflkmawejf":";jlnu3yr23","_APPLICATION_TEMPLATE_WRAPPER":false,"_DEFAULT_ASYNC_OBSERVERS":true,"_JQUERY_INTEGRATION":false,"_TEMPLATE_ONLY_GLIMMER_COMPONENTS":true};'; - expect(vendorContents).to.contain(expected, 'EmberENV should be in assets/vendor.js'); + expect(appFileContents).to.include('//app/templates-stuff.js'); + expect(appFileContents).to.include('//app/styles-manager.js'); }) ); - } - it( - 'strips app/styles or app/templates from JS', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/styles-and-templates-stripped'); - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - let appFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', `${appName}.js`), { - encoding: 'utf8', - }); - - expect(appFileContents).to.include('//app/templates-stuff.js'); - expect(appFileContents).to.include('//app/styles-manager.js'); - }) - ); - - it( - 'should throw if no build file is found', - co.wrap(function*() { - fs.removeSync('./ember-cli-build.js'); - try { + it( + 'should throw if no build file is found', + co.wrap(function*() { + fs.removeSync('./ember-cli-build.js'); + try { + yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + } catch (err) { + expect(err.code).to.eql(1); + } + }) + ); + + it( + 'using autoRun: true', + co.wrap(function*() { + yield copyFixtureFiles('brocfile-tests/auto-run-true'); yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - } catch (err) { - expect(err.code).to.eql(1); - } - }) - ); - - it( - 'using autoRun: true', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/auto-run-true'); - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - let appFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', `${appName}.js`), { - encoding: 'utf8', - }); - const regex = isExperimentEnabled('MODULE_UNIFICATION') - ? /\/main"\)\["default"\]\.create\(/ - : /\/app"\)\["default"\]\.create\(/; - expect(appFileContents).to.match(regex); - }) - ); - - it( - 'using autoRun: false', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/auto-run-false'); - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - let appFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', `${appName}.js`), { - encoding: 'utf8', - }); - - const regex = isExperimentEnabled('MODULE_UNIFICATION') - ? /\/main"\)\["default"\]\.create\(/ - : /\/app"\)\["default"\]\.create\(/; - expect(appFileContents).to.not.match(regex); - }) - ); - - it( - 'app.import works properly with test tree files', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/app-test-import'); - - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-test-addon'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); - - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - let subjectFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'test-support.js'), { - encoding: 'utf8', - }); - - expect(subjectFileContents).to.contain('// File for test tree imported and added via postprocessTree()'); - }) - ); - - it( - 'app.import works properly with non-js/css files', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/app-import'); - - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-random-addon'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); - - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - let subjectFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'file-to-import.txt'), { - encoding: 'utf8', - }); - - expect(subjectFileContents).to.equal('EXAMPLE TEXT FILE CONTENT\n'); - }) - ); - - it( - 'addons can have a public tree that is merged and returned namespaced by default', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/public-tree'); - - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-random-addon'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); - - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - let subjectFileContents = fs.readFileSync( - path.join(appRoot, 'dist', 'ember-random-addon', 'some-root-file.txt'), - { + + let appFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', `${appName}.js`), { encoding: 'utf8', - } - ); + }); + expect(appFileContents).to.match(/\/app"\)\["default"\]\.create\(/); + }) + ); - expect(subjectFileContents).to.equal('ROOT FILE\n'); - }) - ); + it( + 'using autoRun: false', + co.wrap(function*() { + yield copyFixtureFiles('brocfile-tests/auto-run-false'); + yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let appFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', `${appName}.js`), { + encoding: 'utf8', + }); + + expect(appFileContents).to.not.match(/\/app"\)\["default"\]\.create\(/); + }) + ); + + it( + 'app.import works properly with test tree files', + co.wrap(function*() { + yield copyFixtureFiles('brocfile-tests/app-test-import'); + + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-test-addon'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); + + yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let subjectFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'test-support.js'), { + encoding: 'utf8', + }); + + expect(subjectFileContents).to.contain('// File for test tree imported and added via postprocessTree()'); + }) + ); + + it( + 'app.import works properly with non-js/css files', + co.wrap(function*() { + yield copyFixtureFiles('brocfile-tests/app-import'); + + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-random-addon'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); + + yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let subjectFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'file-to-import.txt'), { + encoding: 'utf8', + }); + + expect(subjectFileContents).to.equal('EXAMPLE TEXT FILE CONTENT\n'); + }) + ); + + it( + 'addons can have a public tree that is merged and returned namespaced by default', + co.wrap(function*() { + yield copyFixtureFiles('brocfile-tests/public-tree'); + + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-random-addon'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); + + yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let subjectFileContents = fs.readFileSync( + path.join(appRoot, 'dist', 'ember-random-addon', 'some-root-file.txt'), + { + encoding: 'utf8', + } + ); + + expect(subjectFileContents).to.equal('ROOT FILE\n'); + }) + ); - if (!isExperimentEnabled('MODULE_UNIFICATION')) { it( 'using pods based templates', co.wrap(function*() { @@ -236,288 +228,261 @@ describe('Acceptance: brocfile-smoke-test', function() { expect(error.output.join('')).to.include('Error: No tests matched the filter "jshint"'); }) ); - } - it( - 'multiple css files in styles/ are output when a preprocessor is not used', - co.wrap(function*() { - let fixtureFolder = isExperimentEnabled('MODULE_UNIFICATION') ? 'multiple-css-files-mu' : 'multiple-css-files'; - yield copyFixtureFiles(`brocfile-tests/${fixtureFolder}`); - - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - let files = ['/assets/some-cool-app.css', '/assets/other.css']; - - let basePath = path.join(appRoot, 'dist'); - files.forEach(function(f) { - expect(file(path.join(basePath, f))).to.exist; - }); - }) - ); - - it( - 'specifying custom output paths works properly', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/custom-output-paths'); - - let themeCSSPath; - if (isExperimentEnabled('MODULE_UNIFICATION')) { - themeCSSPath = path.join(appRoot, 'src', 'ui', 'styles', 'theme.css'); - } else { - themeCSSPath = path.join(appRoot, 'app', 'styles', 'theme.css'); - } - fs.writeFileSync(themeCSSPath, 'html, body { margin: 20%; }'); - - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - let files = [ - '/css/app.css', - '/css/theme/a.css', - '/js/app.js', - '/css/vendor.css', - '/js/vendor.js', - '/css/test-support.css', - '/js/test-support.js', - '/my-app.html', - ]; - - let basePath = path.join(appRoot, 'dist'); - files.forEach(function(f) { - expect(file(path.join(basePath, f))).to.exist; - }); - }) - ); - - it( - 'specifying outputFile results in an explicitly generated assets', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/app-import-output-file'); - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - let files = ['/assets/output-file.js', '/assets/output-file.css', '/assets/vendor.css', '/assets/vendor.js']; - - let basePath = path.join(appRoot, 'dist'); - files.forEach(function(f) { - expect(file(path.join(basePath, f))).to.exist; - }); - }) - ); - - it( - 'can use transformation to turn anonymous AMD into named AMD', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/app-import-anonymous-amd'); - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - let outputJS = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'output.js'), { - encoding: 'utf8', - }); - - (function() { - let defineCount = 0; - // eslint-disable-next-line no-unused-vars - function define(name, deps, factory) { - expect(name).to.equal('hello-world'); - expect(deps).to.deep.equal([]); - expect(factory()()).to.equal('Hello World'); - defineCount++; - } - /* eslint-disable no-eval */ - eval(outputJS); - /* eslint-enable no-eval */ - expect(defineCount).to.eql(1); - })(); - }) - ); - - it( - 'can do amd transform from addon', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/app-import-custom-transform'); - - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-transform-addon'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); - - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - let addonOutputJs = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'addon-output.js'), { - encoding: 'utf8', - }); - - (function() { - let defineCount = 0; - // eslint-disable-next-line no-unused-vars - function define(name, deps, factory) { - expect(name).to.equal('addon-vendor'); - expect(deps).to.deep.equal([]); - expect(factory()()).to.equal('Hello World'); - defineCount++; - } - /* eslint-disable no-eval */ - eval(addonOutputJs); - /* eslint-enable no-eval */ - expect(defineCount).to.eql(1); - })(); - }) - ); - - it( - 'can use transformation to turn library into custom transformation', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/app-import-custom-transform'); - - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-transform-addon'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); - - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - let outputJS = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'output.js'), { - encoding: 'utf8', - }); - - expect(outputJS).to.be.equal( - 'if (typeof FastBoot === \'undefined\') { window.hello = "hello world"; }//# sourceMappingURL=output.map\n' - ); - }) - ); - - // skipped because of potentially broken assertion that should be fixed correctly at a later point - it.skip( - 'specifying partial `outputPaths` hash deep merges options correctly', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/custom-output-paths'); - - let themeCSSPath = path.join(appRoot, 'app', 'styles', 'theme.css'); - fs.writeFileSync(themeCSSPath, 'html, body { margin: 20%; }'); - - let brocfilePath = path.join(appRoot, 'ember-cli-build.js'); - let brocfile = fs.readFileSync(brocfilePath, 'utf8'); - - // remove outputPaths.app.js option - brocfile = brocfile.replace(/js: '\/js\/app.js'/, ''); - // remove outputPaths.app.css.app option - brocfile = brocfile.replace(/'app': '\/css\/app\.css',/, ''); - - fs.writeFileSync(brocfilePath, brocfile, 'utf8'); - - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - let files = [ - '/css/theme/a.css', - '/assets/some-cool-app.js', - '/css/vendor.css', - '/js/vendor.js', - '/css/test-support.css', - '/js/test-support.js', - ]; - - let basePath = path.join(appRoot, 'dist'); - files.forEach(function(f) { - expect(file(path.join(basePath, f))).to.exist; - }); - - expect(file(path.join(basePath, '/assets/some-cool-app.css'))).to.not.exist; - }) - ); - - it( - 'multiple paths can be CSS preprocessed', - co.wrap(function*() { - let fixtureFolder = isExperimentEnabled('MODULE_UNIFICATION') ? 'multiple-sass-files-mu' : 'multiple-sass-files'; - yield copyFixtureFiles(`brocfile-tests/${fixtureFolder}`); - - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-cli-sass'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); - - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - expect(file('dist/assets/main.css')).to.equal( - 'body { background: black; }\n', - 'main.css contains correct content' - ); - - expect(file('dist/assets/theme/a.css')).to.equal( - '.theme { color: red; }\n', - 'theme/a.css contains correct content' - ); - }) - ); - - it( - 'app.css is output to .css by default', - co.wrap(function*() { - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - expect(file(`dist/assets/${appName}.css`)).to.exist; - }) - ); - - // for backwards compat. - it( - 'app.scss is output to .css by default', - co.wrap(function*() { - let fixtureFolder = isExperimentEnabled('MODULE_UNIFICATION') ? 'multiple-sass-files-mu' : 'multiple-sass-files'; - yield copyFixtureFiles(`brocfile-tests/${fixtureFolder}`); - - let brocfilePath = path.join(appRoot, 'ember-cli-build.js'); - let brocfile = fs.readFileSync(brocfilePath, 'utf8'); - - // remove custom preprocessCss paths, use app.scss instead - brocfile = brocfile.replace(/outputPaths.*/, ''); - - fs.writeFileSync(brocfilePath, brocfile, 'utf8'); - - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-cli-sass'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); - - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - expect(file(`dist/assets/${appName}.css`)).to.equal('body { background: green; }\n'); - }) - ); - - it( - 'additional trees can be passed to the app', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/additional-trees'); - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', { verbose: true }); - - let files = [ - '/assets/custom-output-file.js', - '/assets/custom-output-file.css', - '/assets/vendor.css', - '/assets/vendor.js', - ]; - - let basePath = path.join(appRoot, 'dist'); - files.forEach(function(f) { - expect(file(path.join(basePath, f))).to.exist; - }); - }) - ); - - if (isExperimentEnabled('MODULE_UNIFICATION')) { it( - 'can run a MU unit test with a relative import', + 'multiple css files in styles/ are output when a preprocessor is not used', + co.wrap(function*() { + yield copyFixtureFiles('brocfile-tests/multiple-css-files'); + + yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let files = ['/assets/some-cool-app.css', '/assets/other.css']; + + let basePath = path.join(appRoot, 'dist'); + files.forEach(function(f) { + expect(file(path.join(basePath, f))).to.exist; + }); + }) + ); + + it( + 'specifying custom output paths works properly', co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/mu-unit-test-with-relative-import'); + yield copyFixtureFiles('brocfile-tests/custom-output-paths'); + + let themeCSSPath = path.join(appRoot, 'app', 'styles', 'theme.css'); + fs.writeFileSync(themeCSSPath, 'html, body { margin: 20%; }'); + + yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let files = [ + '/css/app.css', + '/css/theme/a.css', + '/js/app.js', + '/css/vendor.css', + '/js/vendor.js', + '/css/test-support.css', + '/js/test-support.js', + '/my-app.html', + ]; + + let basePath = path.join(appRoot, 'dist'); + files.forEach(function(f) { + expect(file(path.join(basePath, f))).to.exist; + }); + }) + ); + + it( + 'specifying outputFile results in an explicitly generated assets', + co.wrap(function*() { + yield copyFixtureFiles('brocfile-tests/app-import-output-file'); + yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let files = ['/assets/output-file.js', '/assets/output-file.css', '/assets/vendor.css', '/assets/vendor.js']; + + let basePath = path.join(appRoot, 'dist'); + files.forEach(function(f) { + expect(file(path.join(basePath, f))).to.exist; + }); + }) + ); + + it( + 'can use transformation to turn anonymous AMD into named AMD', + co.wrap(function*() { + yield copyFixtureFiles('brocfile-tests/app-import-anonymous-amd'); + yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let outputJS = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'output.js'), { + encoding: 'utf8', + }); + + (function() { + let defineCount = 0; + // eslint-disable-next-line no-unused-vars + function define(name, deps, factory) { + expect(name).to.equal('hello-world'); + expect(deps).to.deep.equal([]); + expect(factory()()).to.equal('Hello World'); + defineCount++; + } + /* eslint-disable no-eval */ + eval(outputJS); + /* eslint-enable no-eval */ + expect(defineCount).to.eql(1); + })(); + }) + ); + + it( + 'can do amd transform from addon', + co.wrap(function*() { + yield copyFixtureFiles('brocfile-tests/app-import-custom-transform'); + + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-transform-addon'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); + + yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let addonOutputJs = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'addon-output.js'), { + encoding: 'utf8', + }); + + (function() { + let defineCount = 0; + // eslint-disable-next-line no-unused-vars + function define(name, deps, factory) { + expect(name).to.equal('addon-vendor'); + expect(deps).to.deep.equal([]); + expect(factory()()).to.equal('Hello World'); + defineCount++; + } + /* eslint-disable no-eval */ + eval(addonOutputJs); + /* eslint-enable no-eval */ + expect(defineCount).to.eql(1); + })(); + }) + ); + + it( + 'can use transformation to turn library into custom transformation', + co.wrap(function*() { + yield copyFixtureFiles('brocfile-tests/app-import-custom-transform'); + + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-transform-addon'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); + yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - let appFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'tests.js'), { + let outputJS = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'output.js'), { encoding: 'utf8', }); - expect(appFileContents).to.include('Unit | Utility | string'); + expect(outputJS).to.be.equal( + 'if (typeof FastBoot === \'undefined\') { window.hello = "hello world"; }//# sourceMappingURL=output.map\n' + ); + }) + ); + + // skipped because of potentially broken assertion that should be fixed correctly at a later point + it.skip( + 'specifying partial `outputPaths` hash deep merges options correctly', + co.wrap(function*() { + yield copyFixtureFiles('brocfile-tests/custom-output-paths'); + + let themeCSSPath = path.join(appRoot, 'app', 'styles', 'theme.css'); + fs.writeFileSync(themeCSSPath, 'html, body { margin: 20%; }'); + + let brocfilePath = path.join(appRoot, 'ember-cli-build.js'); + let brocfile = fs.readFileSync(brocfilePath, 'utf8'); - let result = yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); - expect(result.code).to.eql(0); + // remove outputPaths.app.js option + brocfile = brocfile.replace(/js: '\/js\/app.js'/, ''); + // remove outputPaths.app.css.app option + brocfile = brocfile.replace(/'app': '\/css\/app\.css',/, ''); + + fs.writeFileSync(brocfilePath, brocfile, 'utf8'); + + yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let files = [ + '/css/theme/a.css', + '/assets/some-cool-app.js', + '/css/vendor.css', + '/js/vendor.js', + '/css/test-support.css', + '/js/test-support.js', + ]; + + let basePath = path.join(appRoot, 'dist'); + files.forEach(function(f) { + expect(file(path.join(basePath, f))).to.exist; + }); + + expect(file(path.join(basePath, '/assets/some-cool-app.css'))).to.not.exist; + }) + ); + + it( + 'multiple paths can be CSS preprocessed', + co.wrap(function*() { + yield copyFixtureFiles('brocfile-tests/multiple-sass-files'); + + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-cli-sass'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); + + yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + expect(file('dist/assets/main.css')).to.equal( + 'body { background: black; }\n', + 'main.css contains correct content' + ); + + expect(file('dist/assets/theme/a.css')).to.equal( + '.theme { color: red; }\n', + 'theme/a.css contains correct content' + ); + }) + ); + + it( + 'app.css is output to .css by default', + co.wrap(function*() { + yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + expect(file(`dist/assets/${appName}.css`)).to.exist; + }) + ); + + // for backwards compat. + it( + 'app.scss is output to .css by default', + co.wrap(function*() { + yield copyFixtureFiles('brocfile-tests/multiple-sass-files'); + + let brocfilePath = path.join(appRoot, 'ember-cli-build.js'); + let brocfile = fs.readFileSync(brocfilePath, 'utf8'); + + // remove custom preprocessCss paths, use app.scss instead + brocfile = brocfile.replace(/outputPaths.*/, ''); + + fs.writeFileSync(brocfilePath, brocfile, 'utf8'); + + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-cli-sass'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); + + yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + expect(file(`dist/assets/${appName}.css`)).to.equal('body { background: green; }\n'); + }) + ); + + it( + 'additional trees can be passed to the app', + co.wrap(function*() { + yield copyFixtureFiles('brocfile-tests/additional-trees'); + yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', { verbose: true }); + + let files = [ + '/assets/custom-output-file.js', + '/assets/custom-output-file.css', + '/assets/vendor.css', + '/assets/vendor.js', + ]; + + let basePath = path.join(appRoot, 'dist'); + files.forEach(function(f) { + expect(file(path.join(basePath, f))).to.exist; + }); }) ); } diff --git a/tests/acceptance/nested-addons-smoke-test-slow.js b/tests/acceptance/nested-addons-smoke-test-slow.js index a84ffe7436..b9a1b1a79f 100644 --- a/tests/acceptance/nested-addons-smoke-test-slow.js +++ b/tests/acceptance/nested-addons-smoke-test-slow.js @@ -4,6 +4,7 @@ const co = require('co'); const path = require('path'); const fs = require('fs-extra'); +const { isExperimentEnabled } = require('../../lib/experiments'); const runCommand = require('../helpers/run-command'); const acceptance = require('../helpers/acceptance'); const copyFixtureFiles = require('../helpers/copy-fixture-files'); @@ -38,40 +39,42 @@ describe('Acceptance: nested-addons-smoke-test', function() { expect(dir(appRoot)).to.not.exist; }); - it( - 'addons with nested addons compile correctly', - co.wrap(function*() { - yield copyFixtureFiles('addon/with-nested-addons'); - - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-top-addon'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); - - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - expect(file('dist/assets/vendor.js')).to.contain('INNER_ADDON_IMPORT_WITH_APP_IMPORT'); - expect(file('dist/assets/vendor.js')).to.contain('INNER_ADDON_IMPORT_WITH_THIS_IMPORT'); - - // RAW comments should have been converted to PREPROCESSED by - // tests/fixtures/addon/with-nested-addons/node_modules/ember-top-addon/node_modules/preprocesstree-addon - // then from PREPROCESSED to POSTPROCESSED by - // tests/fixtures/addon/with-nested-addons/node_modules/ember-top-addon/node_modules/postprocesstree-addon - expect(file('dist/assets/vendor.js')).to.contain( - 'POSTPROCESSED node_modules/ember-top-addon/addon/templates/application.hbs' - ); - expect(file('dist/assets/vendor.js')).to.contain('POSTPROCESSED node_modules/ember-top-addon/addon/index.js'); - expect(file('dist/assets/vendor.css')).to.contain( - 'POSTPROCESSED node_modules/ember-top-addon/addon/styles/app.css' - ); - - // the pre/post process tree hooks above should *not* have changed RAW's in the current app - expect(file('dist/assets/some-cool-app.js')).to.contain('RAW app/foo.js'); - - // should *not* have changed RAW's in sibling addons - expect(file('dist/assets/vendor.js')).to.contain( - 'RAW node_modules/ember-top-addon/node_modules/ember-inner-addon/addon/index.js' - ); - }) - ); + if (!isExperimentEnabled('MODULE_UNIFICATION')) { + it( + 'addons with nested addons compile correctly', + co.wrap(function*() { + yield copyFixtureFiles('addon/with-nested-addons'); + + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-top-addon'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); + + yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + expect(file('dist/assets/vendor.js')).to.contain('INNER_ADDON_IMPORT_WITH_APP_IMPORT'); + expect(file('dist/assets/vendor.js')).to.contain('INNER_ADDON_IMPORT_WITH_THIS_IMPORT'); + + // RAW comments should have been converted to PREPROCESSED by + // tests/fixtures/addon/with-nested-addons/node_modules/ember-top-addon/node_modules/preprocesstree-addon + // then from PREPROCESSED to POSTPROCESSED by + // tests/fixtures/addon/with-nested-addons/node_modules/ember-top-addon/node_modules/postprocesstree-addon + expect(file('dist/assets/vendor.js')).to.contain( + 'POSTPROCESSED node_modules/ember-top-addon/addon/templates/application.hbs' + ); + expect(file('dist/assets/vendor.js')).to.contain('POSTPROCESSED node_modules/ember-top-addon/addon/index.js'); + expect(file('dist/assets/vendor.css')).to.contain( + 'POSTPROCESSED node_modules/ember-top-addon/addon/styles/app.css' + ); + + // the pre/post process tree hooks above should *not* have changed RAW's in the current app + expect(file('dist/assets/some-cool-app.js')).to.contain('RAW app/foo.js'); + + // should *not* have changed RAW's in sibling addons + expect(file('dist/assets/vendor.js')).to.contain( + 'RAW node_modules/ember-top-addon/node_modules/ember-inner-addon/addon/index.js' + ); + }) + ); + } }); diff --git a/tests/acceptance/preprocessor-smoke-test-slow.js b/tests/acceptance/preprocessor-smoke-test-slow.js index afcec08ad8..d30af3b652 100644 --- a/tests/acceptance/preprocessor-smoke-test-slow.js +++ b/tests/acceptance/preprocessor-smoke-test-slow.js @@ -21,8 +21,6 @@ let dir = chai.dir; let appName = 'some-cool-app'; let appRoot; -let fixturePrefix = isExperimentEnabled('MODULE_UNIFICATION') ? 'mu-app' : 'app'; - describe('Acceptance: preprocessor-smoke-test', function() { this.timeout(360000); @@ -41,92 +39,93 @@ describe('Acceptance: preprocessor-smoke-test', function() { expect(dir(appRoot)).to.not.exist; }); - it( - 'addons with standard preprocessors compile correctly', - co.wrap(function*() { - yield copyFixtureFiles(`preprocessor-tests/${fixturePrefix}-with-addon-with-preprocessors`); - - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-cli-sass'] = 'latest'; - packageJson.devDependencies['ember-cool-addon'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); - - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - expect(file('dist/assets/some-cool-app.css')).to.contain('app styles included'); - expect(file('dist/assets/vendor.css')).to.contain('addon styles included'); - }) - ); - - it( - 'addon registry entries are added in the proper order', - co.wrap(function*() { - yield copyFixtureFiles(`preprocessor-tests/${fixturePrefix}-registry-ordering`); - - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['first-dummy-preprocessor'] = 'latest'; - packageJson.devDependencies['second-dummy-preprocessor'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); - - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - expect(file('dist/assets/some-cool-app.js')) - .to.contain('replacedByPreprocessor', 'token should have been replaced in app bundle') - .to.not.contain('__SECOND_PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should not be contained') - .to.not.contain('__FIRST_PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should not be contained'); - }) - ); - - it( - 'addons without preprocessors compile correctly', - co.wrap(function*() { - yield copyFixtureFiles(`preprocessor-tests/${fixturePrefix}-with-addon-without-preprocessors`); - - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-cli-sass'] = 'latest'; - packageJson.devDependencies['ember-cool-addon'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); - - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - expect(file('dist/assets/some-cool-app.css')).to.contain('app styles included'); - expect(file('dist/assets/vendor.css')).to.contain('addon styles included'); - }) - ); - - /* + if (!isExperimentEnabled('MODULE_UNIFICATION')) { + it( + 'addons with standard preprocessors compile correctly', + co.wrap(function*() { + yield copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors`); + + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-cli-sass'] = 'latest'; + packageJson.devDependencies['ember-cool-addon'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); + + yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + expect(file('dist/assets/some-cool-app.css')).to.contain('app styles included'); + expect(file('dist/assets/vendor.css')).to.contain('addon styles included'); + }) + ); + + it( + 'addon registry entries are added in the proper order', + co.wrap(function*() { + yield copyFixtureFiles(`preprocessor-tests/app-registry-ordering`); + + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['first-dummy-preprocessor'] = 'latest'; + packageJson.devDependencies['second-dummy-preprocessor'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); + + yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + expect(file('dist/assets/some-cool-app.js')) + .to.contain('replacedByPreprocessor', 'token should have been replaced in app bundle') + .to.not.contain('__SECOND_PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should not be contained') + .to.not.contain('__FIRST_PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should not be contained'); + }) + ); + + it( + 'addons without preprocessors compile correctly', + co.wrap(function*() { + yield copyFixtureFiles(`preprocessor-tests/app-with-addon-without-preprocessors`); + + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-cli-sass'] = 'latest'; + packageJson.devDependencies['ember-cool-addon'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); + + yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + expect(file('dist/assets/some-cool-app.css')).to.contain('app styles included'); + expect(file('dist/assets/vendor.css')).to.contain('addon styles included'); + }) + ); + + /* [ app ] -> [ addon ] -> [ preprocessor addon ] | | | |--- preprocessor applies to this | |-- preprocessor should not apply to this */ - it( - 'addons depending on preprocessor addon preprocesses addon but not app', - co.wrap(function*() { - yield copyFixtureFiles(`preprocessor-tests/${fixturePrefix}-with-addon-with-preprocessors-2`); + it( + 'addons depending on preprocessor addon preprocesses addon but not app', + co.wrap(function*() { + yield copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors-2`); - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-cool-addon'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-cool-addon'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - expect(file('dist/assets/some-cool-app.js')) - .to.contain('__PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should not have been replaced in app bundle') - .to.not.contain('replacedByPreprocessor', 'token should not have been replaced in app bundle'); + expect(file('dist/assets/some-cool-app.js')) + .to.contain('__PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should not have been replaced in app bundle') + .to.not.contain('replacedByPreprocessor', 'token should not have been replaced in app bundle'); - expect(file('dist/assets/vendor.js')) - .to.contain('replacedByPreprocessor', 'token should have been replaced in vendor bundle') - .to.not.contain('__PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should have been replaced in vendor bundle'); - }) - ); + expect(file('dist/assets/vendor.js')) + .to.contain('replacedByPreprocessor', 'token should have been replaced in vendor bundle') + .to.not.contain('__PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should have been replaced in vendor bundle'); + }) + ); - /* + /* [ app ] -> [ addon ] -> [ addon ] -> [ preprocessor addon ] | | | | | |--- preprocessor applies to this @@ -135,34 +134,38 @@ describe('Acceptance: preprocessor-smoke-test', function() { | |-- preprocessor should not apply to this */ - it( - 'addon N levels deep depending on preprocessor preprocesses that parent addon only', - co.wrap(function*() { - yield copyFixtureFiles(`preprocessor-tests/${fixturePrefix}-with-addon-with-preprocessors-3`); - - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-shallow-addon'] = 'latest'; - - fs.writeJsonSync(packageJsonPath, packageJson); - - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - expect(file('dist/assets/some-cool-app.js')) - .to.contain('__PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should not have been replaced in app bundle') - .to.not.contain('replacedByPreprocessor', 'token should not have been replaced in app bundle'); - - expect(file('dist/assets/vendor.js')) - .to.contain('deep: "replacedByPreprocessor"', 'token should have been replaced in deep component') - .to.contain( - 'shallow: __PREPROCESSOR_REPLACEMENT_TOKEN__', - 'token should not have been replaced in shallow component' - ) - .to.not.contain('deep: __PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should have been replaced in deep component') - .to.not.contain( - 'shallow: "replacedByPreprocessor"', - 'token should not have been replaced in shallow component' - ); - }) - ); + it( + 'addon N levels deep depending on preprocessor preprocesses that parent addon only', + co.wrap(function*() { + yield copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors-3`); + + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-shallow-addon'] = 'latest'; + + fs.writeJsonSync(packageJsonPath, packageJson); + + yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + expect(file('dist/assets/some-cool-app.js')) + .to.contain('__PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should not have been replaced in app bundle') + .to.not.contain('replacedByPreprocessor', 'token should not have been replaced in app bundle'); + + expect(file('dist/assets/vendor.js')) + .to.contain('deep: "replacedByPreprocessor"', 'token should have been replaced in deep component') + .to.contain( + 'shallow: __PREPROCESSOR_REPLACEMENT_TOKEN__', + 'token should not have been replaced in shallow component' + ) + .to.not.contain( + 'deep: __PREPROCESSOR_REPLACEMENT_TOKEN__', + 'token should have been replaced in deep component' + ) + .to.not.contain( + 'shallow: "replacedByPreprocessor"', + 'token should not have been replaced in shallow component' + ); + }) + ); + } }); diff --git a/tests/acceptance/smoke-test-slow.js b/tests/acceptance/smoke-test-slow.js index 2ba11a6515..33118d4ab7 100644 --- a/tests/acceptance/smoke-test-slow.js +++ b/tests/acceptance/smoke-test-slow.js @@ -73,168 +73,169 @@ describe('Acceptance: smoke-test', function() { let result = await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); expect(result.code).to.equal(0); }); - } - it('ember test still runs when a JavaScript testem config exists', async function() { - await copyFixtureFiles('smoke-tests/js-testem-config'); + it('ember test still runs when a JavaScript testem config exists', async function() { + await copyFixtureFiles('smoke-tests/js-testem-config'); - let result = await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); + let result = await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); - let exitCode = result.code; - let output = result.output.join(EOL); + let exitCode = result.code; + let output = result.output.join(EOL); - expect(exitCode).to.eql(0); - expect(output).to.include('***CUSTOM_TESTEM_JS**'); - }); + expect(exitCode).to.eql(0); + expect(output).to.include('***CUSTOM_TESTEM_JS**'); + }); - it('eslint passes after running ember new', async function() { - let result = await runCommand(path.join('.', 'node_modules', 'eslint', 'bin', 'eslint.js'), appRoot); + it('eslint passes after running ember new', async function() { + let result = await runCommand(path.join('.', 'node_modules', 'eslint', 'bin', 'eslint.js'), appRoot); - let exitCode = result.code; + let exitCode = result.code; - expect(exitCode).to.equal(0, 'exit code should be 0 for passing tests'); - expect(result.output).to.be.empty; - }); + expect(exitCode).to.equal(0, 'exit code should be 0 for passing tests'); + expect(result.output).to.be.empty; + }); - // there is a bug in here when running the entire suite on Travis - // when run in isolation, it passes - // here is the error: - // test-support-80f2fe63fae0c44478fe0f8af73200a7.js contains the fingerprint (2871106928f813936fdd64f4d16005ac): expected 'test-support-80f2fe63fae0c44478fe0f8af73200a7.js' to include '2871106928f813936fdd64f4d16005ac' - it.skip('ember new foo, build production and verify fingerprint', async function() { - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--environment=production'); + // there is a bug in here when running the entire suite on Travis + // when run in isolation, it passes + // here is the error: + // test-support-80f2fe63fae0c44478fe0f8af73200a7.js contains the fingerprint (2871106928f813936fdd64f4d16005ac): expected 'test-support-80f2fe63fae0c44478fe0f8af73200a7.js' to include '2871106928f813936fdd64f4d16005ac' + it.skip('ember new foo, build production and verify fingerprint', async function() { + await runCommand( + path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), + 'build', + '--environment=production' + ); - let dirPath = path.join(appRoot, 'dist', 'assets'); - let dir = fs.readdirSync(dirPath); - let files = []; + let dirPath = path.join(appRoot, 'dist', 'assets'); + let dir = fs.readdirSync(dirPath); + let files = []; - dir.forEach(function(filepath) { - if (filepath === '.gitkeep') { - return; - } + dir.forEach(function(filepath) { + if (filepath === '.gitkeep') { + return; + } - files.push(filepath); + files.push(filepath); - let file = fs.readFileSync(path.join(dirPath, filepath), { encoding: null }); + let file = fs.readFileSync(path.join(dirPath, filepath), { encoding: null }); - let md5 = crypto.createHash('md5'); - md5.update(file); - let hex = md5.digest('hex'); + let md5 = crypto.createHash('md5'); + md5.update(file); + let hex = md5.digest('hex'); - expect(filepath).to.contain(hex, `${filepath} contains the fingerprint (${hex})`); - }); + expect(filepath).to.contain(hex, `${filepath} contains the fingerprint (${hex})`); + }); - let indexHtml = file('dist/index.html'); - files.forEach(function(filename) { - expect(indexHtml).to.contain(filename); + let indexHtml = file('dist/index.html'); + files.forEach(function(filename) { + expect(indexHtml).to.contain(filename); + }); }); - }); - it('ember test --environment=production', async function() { - await copyFixtureFiles('smoke-tests/passing-test'); + it('ember test --environment=production', async function() { + await copyFixtureFiles('smoke-tests/passing-test'); - let result = await runCommand( - path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), - 'test', - '--environment=production' - ); + let result = await runCommand( + path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), + 'test', + '--environment=production' + ); - let exitCode = result.code; - let output = result.output.join(EOL); + let exitCode = result.code; + let output = result.output.join(EOL); - expect(exitCode).to.equal(0, 'exit code should be 0 for passing tests'); - expect(output).to.match(/ESLint/, 'ESLint should be run on production assets'); - expect(output).to.match(/fail\s+0/, 'no failures'); - expect(output).to.match(/pass\s+\d+/, 'many passing'); - }); + expect(exitCode).to.equal(0, 'exit code should be 0 for passing tests'); + expect(output).to.match(/ESLint/, 'ESLint should be run on production assets'); + expect(output).to.match(/fail\s+0/, 'no failures'); + expect(output).to.match(/pass\s+\d+/, 'many passing'); + }); - it('ember test --path with previous build', async function() { - let originalWrite = process.stdout.write; - let output = []; + it('ember test --path with previous build', async function() { + let originalWrite = process.stdout.write; + let output = []; - await copyFixtureFiles('smoke-tests/passing-test'); + await copyFixtureFiles('smoke-tests/passing-test'); - // TODO: Change to using ember() helper once it properly saves build artifacts - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + // TODO: Change to using ember() helper once it properly saves build artifacts + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - // TODO: Figure out how to get this to write into the MockUI - process.stdout.write = (function() { - return function() { - output.push(arguments[0]); - }; - })(originalWrite); + // TODO: Figure out how to get this to write into the MockUI + process.stdout.write = (function() { + return function() { + output.push(arguments[0]); + }; + })(originalWrite); - let result; - try { - result = await ember(['test', '--path=dist']); - } finally { - process.stdout.write = originalWrite; - } + let result; + try { + result = await ember(['test', '--path=dist']); + } finally { + process.stdout.write = originalWrite; + } - expect(result.exitCode).to.equal(0, 'exit code should be 0 for passing tests'); + expect(result.exitCode).to.equal(0, 'exit code should be 0 for passing tests'); - output = output.join(EOL); + output = output.join(EOL); - expect(output).to.match(/fail\s+0/, 'no failures'); - expect(output).to.match(/pass\s+\d+/, 'many passing'); - }); + expect(output).to.match(/fail\s+0/, 'no failures'); + expect(output).to.match(/pass\s+\d+/, 'many passing'); + }); - it('ember test wasm', async function() { - let originalWrite = process.stdout.write; - let output = []; + it('ember test wasm', async function() { + let originalWrite = process.stdout.write; + let output = []; - await copyFixtureFiles('smoke-tests/serve-wasm'); + await copyFixtureFiles('smoke-tests/serve-wasm'); - // TODO: Change to using ember() helper once it properly saves build artifacts - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + // TODO: Change to using ember() helper once it properly saves build artifacts + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - // TODO: Figure out how to get this to write into the MockUI - process.stdout.write = (function() { - return function() { - output.push(arguments[0]); - }; - })(originalWrite); + // TODO: Figure out how to get this to write into the MockUI + process.stdout.write = (function() { + return function() { + output.push(arguments[0]); + }; + })(originalWrite); - let result; - try { - result = await ember(['test', '--path=dist']); - } finally { - process.stdout.write = originalWrite; - } + let result; + try { + result = await ember(['test', '--path=dist']); + } finally { + process.stdout.write = originalWrite; + } - expect(result.exitCode).to.equal(0, 'exit code should be 0 for passing tests'); + expect(result.exitCode).to.equal(0, 'exit code should be 0 for passing tests'); - output = output.join(EOL); + output = output.join(EOL); - expect(output).to.match(/fail\s+0/, 'no failures'); - expect(output).to.match(/pass\s+\d+/, 'many passing'); - }); + expect(output).to.match(/fail\s+0/, 'no failures'); + expect(output).to.match(/pass\s+\d+/, 'many passing'); + }); - it('ember new foo, build development, and verify generated files', async function() { - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + it('ember new foo, build development, and verify generated files', async function() { + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - let dirPath = path.join(appRoot, 'dist'); - let paths = walkSync(dirPath); + let dirPath = path.join(appRoot, 'dist'); + let paths = walkSync(dirPath); - expect(paths).to.have.length.below(24, `expected fewer than 24 files in dist, found ${paths.length}`); - }); + expect(paths).to.have.length.below(24, `expected fewer than 24 files in dist, found ${paths.length}`); + }); - it('ember build exits with non-zero code when build fails', async function() { - let rootPath = isExperimentEnabled('MODULE_UNIFICATION') ? 'src' : 'app'; - let appJsPath = path.join(appRoot, rootPath, 'app.js'); + it('ember build exits with non-zero code when build fails', async function() { + let appJsPath = path.join(appRoot, 'app', 'app.js'); - let result = await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - expect(result.code).to.equal(0, `expected exit code to be zero, but got ${result.code}`); + let result = await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + expect(result.code).to.equal(0, `expected exit code to be zero, but got ${result.code}`); - // add something broken to the project to make build fail - fs.appendFileSync(appJsPath, '{(syntaxError>$@}{'); + // add something broken to the project to make build fail + fs.appendFileSync(appJsPath, '{(syntaxError>$@}{'); - result = await expect(runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build')).to.be - .rejected; + result = await expect(runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build')).to.be + .rejected; - expect(result.code).to.not.equal(0, `expected exit code to be non-zero, but got ${result.code}`); - }); + expect(result.code).to.not.equal(0, `expected exit code to be non-zero, but got ${result.code}`); + }); - if (!isExperimentEnabled('MODULE_UNIFICATION')) { it('ember build generates instrumentation files when viz is enabled', async function() { process.env.BROCCOLI_VIZ = '1'; @@ -262,208 +263,218 @@ describe('Acceptance: smoke-test', function() { expect(Array.isArray(json.nodes)).to.equal(true); }); }); - } - it.skip('ember new foo, build --watch development, and verify rebuilt after change', async function() { - let touched = false; - let appJsPath = path.join(appRoot, 'app', 'app.js'); - let builtJsPath = path.join(appRoot, 'dist', 'assets', 'some-cool-app.js'); - let text = 'anotuhaonteuhanothunaothanoteh'; - let line = `console.log("${text}");`; - - try { - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--watch', { - onOutput(string, child) { - if (touched) { - if (string.match(/Build successful/)) { - // build after change to app.js - let contents = fs.readFileSync(builtJsPath).toString(); - expect(contents).to.contain(text, 'must contain changed line after rebuild'); - killCliProcess(child); - } - } else if (string.match(/Build successful/)) { - // first build - touched = true; - fs.appendFileSync(appJsPath, line); - } - }, - }); - } catch (error) { - // swallowing because of SIGINT - } - }); + it.skip('ember new foo, build --watch development, and verify rebuilt after change', async function() { + let touched = false; + let appJsPath = path.join(appRoot, 'app', 'app.js'); + let builtJsPath = path.join(appRoot, 'dist', 'assets', 'some-cool-app.js'); + let text = 'anotuhaonteuhanothunaothanoteh'; + let line = `console.log("${text}");`; - it.skip('ember new foo, build --watch development, and verify rebuilt after multiple changes', async function() { - let buildCount = 0; - let touched = false; - let appJsPath = path.join(appRoot, 'app', 'app.js'); - let builtJsPath = path.join(appRoot, 'dist', 'assets', 'some-cool-app.js'); - let firstText = 'anotuhaonteuhanothunaothanoteh'; - let firstLine = `console.log("${firstText}");`; - let secondText = 'aahsldfjlwioruoiiononociwewqwr'; - let secondLine = `console.log("${secondText}");`; - - try { - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--watch', { - onOutput(string, child) { - if (buildCount === 0) { - if (string.match(/Build successful/)) { + try { + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--watch', { + onOutput(string, child) { + if (touched) { + if (string.match(/Build successful/)) { + // build after change to app.js + let contents = fs.readFileSync(builtJsPath).toString(); + expect(contents).to.contain(text, 'must contain changed line after rebuild'); + killCliProcess(child); + } + } else if (string.match(/Build successful/)) { // first build touched = true; - buildCount = 1; - fs.appendFileSync(appJsPath, firstLine); + fs.appendFileSync(appJsPath, line); } - } else if (buildCount === 1) { - if (string.match(/Build successful/)) { - // second build - touched = true; - buildCount = 2; - fs.appendFileSync(appJsPath, secondLine); + }, + }); + } catch (error) { + // swallowing because of SIGINT + } + }); + + it.skip('ember new foo, build --watch development, and verify rebuilt after multiple changes', async function() { + let buildCount = 0; + let touched = false; + let appJsPath = path.join(appRoot, 'app', 'app.js'); + let builtJsPath = path.join(appRoot, 'dist', 'assets', 'some-cool-app.js'); + let firstText = 'anotuhaonteuhanothunaothanoteh'; + let firstLine = `console.log("${firstText}");`; + let secondText = 'aahsldfjlwioruoiiononociwewqwr'; + let secondLine = `console.log("${secondText}");`; + + try { + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--watch', { + onOutput(string, child) { + if (buildCount === 0) { + if (string.match(/Build successful/)) { + // first build + touched = true; + buildCount = 1; + fs.appendFileSync(appJsPath, firstLine); + } + } else if (buildCount === 1) { + if (string.match(/Build successful/)) { + // second build + touched = true; + buildCount = 2; + fs.appendFileSync(appJsPath, secondLine); + } + } else if (touched && buildCount === 2) { + if (string.match(/Build successful/)) { + // build after change to app.js + let contents = fs.readFileSync(builtJsPath).toString(); + expect(contents).to.contain(secondText, 'must contain second changed line after rebuild'); + killCliProcess(child); + } } - } else if (touched && buildCount === 2) { + }, + }); + } catch (error) { + // swallowing because of SIGINT + } + }); + + it.skip('ember new foo, server, SIGINT clears tmp/', async function() { + let result = await runCommand( + path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), + 'server', + '--port=54323', + '--live-reload=false', + { + onOutput(string, child) { if (string.match(/Build successful/)) { - // build after change to app.js - let contents = fs.readFileSync(builtJsPath).toString(); - expect(contents).to.contain(secondText, 'must contain second changed line after rebuild'); killCliProcess(child); } - } - }, - }); - } catch (error) { - // swallowing because of SIGINT - } - }); - - it.skip('ember new foo, server, SIGINT clears tmp/', async function() { - let result = await runCommand( - path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), - 'server', - '--port=54323', - '--live-reload=false', - { - onOutput(string, child) { - if (string.match(/Build successful/)) { - killCliProcess(child); - } - }, - } - ); + }, + } + ); - expect(result.code, 'should be zero exit code').to.equal(0); + expect(result.code, 'should be zero exit code').to.equal(0); - let dirPath = path.join(appRoot, 'tmp'); + let dirPath = path.join(appRoot, 'tmp'); - // before broccoli2, various addons used tmp/ in the project. - // With broccoli2 that should not exist, they should be using os.tmpdir(). - // So we'll just check for "if tmp/ is there, are the contents correct?" - if (fs.existsSync(dirPath)) { - let dir = fs.readdirSync(dirPath).filter(file => file !== '.metadata_never_index'); - expect(dir.length, `${dirPath} should be empty`).to.equal(0); - } - }); + // before broccoli2, various addons used tmp/ in the project. + // With broccoli2 that should not exist, they should be using os.tmpdir(). + // So we'll just check for "if tmp/ is there, are the contents correct?" + if (fs.existsSync(dirPath)) { + let dir = fs.readdirSync(dirPath).filter(file => file !== '.metadata_never_index'); + expect(dir.length, `${dirPath} should be empty`).to.equal(0); + } + }); - it('ember new foo, test, SIGINT exits with error and clears tmp/', async function() { - let result = await expect( - runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test', '--test-port=25522', { - onOutput(string, child) { - // wait for the first passed test and then exit - if (string.match(/^ok /)) { - killCliProcess(child); - } - }, - }) - ).to.be.rejected; - - expect(result.code, 'should be error exit code').to.not.equal(0); - - let dirPath = path.join(appRoot, 'tmp'); - - // before broccoli2, various addons used tmp/ in the project. - // With broccoli2 that should not exist, they should be using os.tmpdir(). - // So we'll just check for "if tmp/ is there, are the contents correct?" - if (fs.existsSync(dirPath)) { - let dir = fs.readdirSync(dirPath).filter(file => file !== '.metadata_never_index'); - expect(dir.length, `${dirPath} should be empty`).to.equal(0); - } - }); + it('ember new foo, test, SIGINT exits with error and clears tmp/', async function() { + let result = await expect( + runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test', '--test-port=25522', { + onOutput(string, child) { + // wait for the first passed test and then exit + if (string.match(/^ok /)) { + killCliProcess(child); + } + }, + }) + ).to.be.rejected; - it('ember new foo, build production and verify css files are concatenated', async function() { - await copyFixtureFiles(isExperimentEnabled('MODULE_UNIFICATION') ? 'with-styles-mu' : 'with-styles'); + expect(result.code, 'should be error exit code').to.not.equal(0); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--environment=production'); + let dirPath = path.join(appRoot, 'tmp'); - let dirPath = path.join(appRoot, 'dist', 'assets'); - let dir = fs.readdirSync(dirPath); - let cssNameRE = new RegExp(`${appName}-([a-f0-9]+)\\.css`, 'i'); - dir.forEach(function(filepath) { - if (cssNameRE.test(filepath)) { - expect(file(`dist/assets/${filepath}`)) - .to.contain('.some-weird-selector') - .to.contain('.some-even-weirder-selector'); + // before broccoli2, various addons used tmp/ in the project. + // With broccoli2 that should not exist, they should be using os.tmpdir(). + // So we'll just check for "if tmp/ is there, are the contents correct?" + if (fs.existsSync(dirPath)) { + let dir = fs.readdirSync(dirPath).filter(file => file !== '.metadata_never_index'); + expect(dir.length, `${dirPath} should be empty`).to.equal(0); } }); - }); - it('ember new foo, build production and verify css files are minified', async function() { - await copyFixtureFiles( - isExperimentEnabled('MODULE_UNIFICATION') ? 'with-unminified-styles-mu' : 'with-unminified-styles' - ); - - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--environment=production'); + it('ember new foo, build production and verify css files are concatenated', async function() { + await copyFixtureFiles('with-styles'); + + await runCommand( + path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), + 'build', + '--environment=production' + ); + + let dirPath = path.join(appRoot, 'dist', 'assets'); + let dir = fs.readdirSync(dirPath); + let cssNameRE = new RegExp(`${appName}-([a-f0-9]+)\\.css`, 'i'); + dir.forEach(function(filepath) { + if (cssNameRE.test(filepath)) { + expect(file(`dist/assets/${filepath}`)) + .to.contain('.some-weird-selector') + .to.contain('.some-even-weirder-selector'); + } + }); + }); - let dirPath = path.join(appRoot, 'dist', 'assets'); - let dir = fs.readdirSync(dirPath); - let cssNameRE = new RegExp(`${appName}-([a-f0-9]+)\\.css`, 'i'); - dir.forEach(function(filepath) { - if (cssNameRE.test(filepath)) { - let contents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', filepath), { encoding: 'utf8' }); - expect(contents).to.match(/^\S+$/, 'css file is minified'); - } + it('ember new foo, build production and verify css files are minified', async function() { + await copyFixtureFiles('with-unminified-styles'); + + await runCommand( + path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), + 'build', + '--environment=production' + ); + + let dirPath = path.join(appRoot, 'dist', 'assets'); + let dir = fs.readdirSync(dirPath); + let cssNameRE = new RegExp(`${appName}-([a-f0-9]+)\\.css`, 'i'); + dir.forEach(function(filepath) { + if (cssNameRE.test(filepath)) { + let contents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', filepath), { encoding: 'utf8' }); + expect(contents).to.match(/^\S+$/, 'css file is minified'); + } + }); }); - }); - it('ember new foo, build production and verify single "use strict";', async function() { - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--environment=production'); - - let dirPath = path.join(appRoot, 'dist', 'assets'); - let dir = fs.readdirSync(dirPath); - let appNameRE = new RegExp(`${appName}-([a-f0-9]+)\\.js`, 'i'); - dir.forEach(function(filepath) { - if (appNameRE.test(filepath)) { - let contents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', filepath), { encoding: 'utf8' }); - let count = (contents.match(/(["'])use strict\1;/g) || []).length; - expect(count).to.equal(1); - } + it('ember new foo, build production and verify single "use strict";', async function() { + await runCommand( + path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), + 'build', + '--environment=production' + ); + + let dirPath = path.join(appRoot, 'dist', 'assets'); + let dir = fs.readdirSync(dirPath); + let appNameRE = new RegExp(`${appName}-([a-f0-9]+)\\.js`, 'i'); + dir.forEach(function(filepath) { + if (appNameRE.test(filepath)) { + let contents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', filepath), { encoding: 'utf8' }); + let count = (contents.match(/(["'])use strict\1;/g) || []).length; + expect(count).to.equal(1); + } + }); }); - }); - it('ember can override and reuse the built-in blueprints', async function() { - await copyFixtureFiles('addon/with-blueprint-override'); + it('ember can override and reuse the built-in blueprints', async function() { + await copyFixtureFiles('addon/with-blueprint-override'); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'generate', 'component', 'foo-bar'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'generate', 'component', 'foo-bar'); - let filePath = 'app/components/new-path/foo-bar.js'; + let filePath = 'app/components/new-path/foo-bar.js'; - // because we're overriding, the fileMapTokens is default, sans 'component' - expect(file(filePath)).to.contain('generated component successfully'); - }); + // because we're overriding, the fileMapTokens is default, sans 'component' + expect(file(filePath)).to.contain('generated component successfully'); + }); - it('template linting works properly for pods and classic structured templates', async function() { - await copyFixtureFiles('smoke-tests/with-template-failing-linting'); + it('template linting works properly for pods and classic structured templates', async function() { + await copyFixtureFiles('smoke-tests/with-template-failing-linting'); - let packageJsonPath = 'package.json'; - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies = packageJson.devDependencies || {}; - packageJson.devDependencies['fake-template-linter'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); + let packageJsonPath = 'package.json'; + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies = packageJson.devDependencies || {}; + packageJson.devDependencies['fake-template-linter'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); - let result = await expect(runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test')).to.be - .rejected; + let result = await expect(runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test')).to.be + .rejected; - let output = result.output.join(EOL); - expect(output).to.match(/TemplateLint:/, 'ran template linter'); - expect(output).to.match(/fail\s+2/, 'two templates failed linting'); - expect(result.code).to.equal(1); - }); + let output = result.output.join(EOL); + expect(output).to.match(/TemplateLint:/, 'ran template linter'); + expect(output).to.match(/fail\s+2/, 'two templates failed linting'); + expect(result.code).to.equal(1); + }); + } }); From c40be1ab1e1a431669dfa06065c71dc33c412524 Mon Sep 17 00:00:00 2001 From: Cyrille David Date: Fri, 6 Sep 2019 19:23:19 +0200 Subject: [PATCH 058/818] cleanup: Remove MU fixtures --- .../addon-test-support/helper.js | 3 - tests/fixtures/addon/kitchen-sink-mu/index.js | 9 --- .../ui/components/basic-thing/component.js | 6 -- .../ui/components/basic-thing/template.hbs | 3 - .../kitchen-sink-mu/src/ui/styles/app.css | 1 - .../tests/acceptance/main-test.js | 23 ------- .../tests/dummy/public/robots.txt | 1 - .../ui/components/second-thing/component.js | 5 -- .../src/ui/routes/application/template.hbs | 2 - .../src/ui/styles/app.css | 0 .../src/ui/styles/other.css | 0 .../multiple-sass-files-mu/ember-cli-build.js | 10 ---- .../node_modules/broccoli-sass/index.js | 41 ------------- .../node_modules/broccoli-sass/package.json | 5 -- .../node_modules/ember-cli-sass/index.js | 37 ------------ .../node_modules/ember-cli-sass/package.json | 12 ---- .../src/ui/styles/app.scss | 1 - .../src/ui/styles/main.scss | 1 - .../src/ui/styles/theme/a.scss | 1 - .../module-unification-addon/.eslintrc.js | 54 ----------------- .../npm/.editorconfig | 20 ------- .../module-unification-addon/npm/.ember-cli | 9 --- .../npm/.eslintignore | 1 - .../module-unification-addon/npm/.eslintrc.js | 50 ---------------- .../module-unification-addon/npm/.gitignore | 0 .../module-unification-addon/npm/.npmignore | 0 .../npm/.template-lintrc.js | 5 -- .../module-unification-addon/npm/.travis.yml | 42 ------------- .../npm/.watchmanconfig | 3 - .../npm/CONTRIBUTING.md | 26 -------- .../module-unification-addon/npm/LICENSE.md | 9 --- .../module-unification-addon/npm/README.md | 38 ------------ .../npm/config/ember-try.js | 56 ----------------- .../npm/config/environment.js | 5 -- .../npm/ember-cli-build.js | 18 ------ .../module-unification-addon/npm/index.js | 5 -- .../module-unification-addon/npm/package.json | 59 ------------------ .../module-unification-addon/npm/src/.gitkeep | 0 .../module-unification-addon/npm/testem.js | 23 ------- .../npm/tests/acceptance/.gitkeep | 0 .../npm/tests/dummy/.gitkeep | 0 .../npm/tests/dummy/config/environment.js | 56 ----------------- .../npm/tests/dummy/config/targets.js | 8 --- .../npm/tests/dummy/public/robots.txt | 3 - .../npm/tests/dummy/src/main.js | 19 ------ .../npm/tests/dummy/src/resolver.js | 13 ---- .../npm/tests/dummy/src/router.js | 11 ---- .../tests/dummy/src/ui/components/.gitkeep | 0 .../npm/tests/dummy/src/ui/index.html | 25 -------- .../src/ui/routes/application/template.hbs | 3 - .../npm/tests/dummy/src/ui/styles/app.css | 0 .../npm/tests/index.html | 33 ---------- .../npm/tests/test-helper.js | 8 --- .../npm/vendor/.gitkeep | 0 .../yarn/.editorconfig | 20 ------- .../module-unification-addon/yarn/.ember-cli | 9 --- .../yarn/.eslintignore | 1 - .../yarn/.eslintrc.js | 50 ---------------- .../module-unification-addon/yarn/.gitignore | 0 .../module-unification-addon/yarn/.npmignore | 0 .../yarn/.template-lintrc.js | 5 -- .../module-unification-addon/yarn/.travis.yml | 42 ------------- .../yarn/.watchmanconfig | 3 - .../yarn/CONTRIBUTING.md | 26 -------- .../module-unification-addon/yarn/LICENSE.md | 9 --- .../module-unification-addon/yarn/README.md | 38 ------------ .../yarn/config/ember-try.js | 57 ------------------ .../yarn/config/environment.js | 5 -- .../yarn/ember-cli-build.js | 18 ------ .../module-unification-addon/yarn/index.js | 5 -- .../yarn/package.json | 60 ------------------- .../yarn/src/.gitkeep | 0 .../module-unification-addon/yarn/testem.js | 23 ------- .../yarn/tests/acceptance/.gitkeep | 0 .../yarn/tests/dummy/.gitkeep | 0 .../yarn/tests/dummy/config/environment.js | 56 ----------------- .../tests/dummy/config/optional-features.json | 3 - .../yarn/tests/dummy/config/targets.js | 8 --- .../yarn/tests/dummy/public/robots.txt | 3 - .../yarn/tests/dummy/src/main.js | 19 ------ .../yarn/tests/dummy/src/resolver.js | 13 ---- .../yarn/tests/dummy/src/router.js | 11 ---- .../tests/dummy/src/ui/components/.gitkeep | 0 .../yarn/tests/dummy/src/ui/index.html | 25 -------- .../src/ui/routes/application/template.hbs | 5 -- .../yarn/tests/dummy/src/ui/styles/app.css | 0 .../yarn/tests/index.html | 33 ---------- .../yarn/tests/test-helper.js | 8 --- .../yarn/vendor/.gitkeep | 0 .../module-unification-app/.eslintrc.js | 51 ---------------- .../module-unification-app/npm/.travis.yml | 24 -------- .../module-unification-app/npm/README.md | 57 ------------------ .../module-unification-app/npm/package.json | 51 ---------------- .../src/ui/routes/application/template.hbs | 3 - .../module-unification-app/yarn/.travis.yml | 30 ---------- .../module-unification-app/yarn/README.md | 58 ------------------ .../module-unification-app/yarn/package.json | 52 ---------------- .../src/ui/routes/application/template.hbs | 5 -- .../with-styles-mu/src/ui/styles/app.css | 2 - .../src/ui/styles/some-other-styles.css | 1 - .../src/ui/styles/some-styles.css | 1 - .../src/ui/styles/app.css | 18 ------ 102 files changed, 1671 deletions(-) delete mode 100644 tests/fixtures/addon/kitchen-sink-mu/addon-test-support/helper.js delete mode 100644 tests/fixtures/addon/kitchen-sink-mu/index.js delete mode 100644 tests/fixtures/addon/kitchen-sink-mu/src/ui/components/basic-thing/component.js delete mode 100644 tests/fixtures/addon/kitchen-sink-mu/src/ui/components/basic-thing/template.hbs delete mode 100644 tests/fixtures/addon/kitchen-sink-mu/src/ui/styles/app.css delete mode 100644 tests/fixtures/addon/kitchen-sink-mu/tests/acceptance/main-test.js delete mode 100644 tests/fixtures/addon/kitchen-sink-mu/tests/dummy/public/robots.txt delete mode 100644 tests/fixtures/addon/kitchen-sink-mu/tests/dummy/src/ui/components/second-thing/component.js delete mode 100644 tests/fixtures/addon/kitchen-sink-mu/tests/dummy/src/ui/routes/application/template.hbs delete mode 100644 tests/fixtures/brocfile-tests/multiple-css-files-mu/src/ui/styles/app.css delete mode 100644 tests/fixtures/brocfile-tests/multiple-css-files-mu/src/ui/styles/other.css delete mode 100644 tests/fixtures/brocfile-tests/multiple-sass-files-mu/ember-cli-build.js delete mode 100644 tests/fixtures/brocfile-tests/multiple-sass-files-mu/node_modules/broccoli-sass/index.js delete mode 100644 tests/fixtures/brocfile-tests/multiple-sass-files-mu/node_modules/broccoli-sass/package.json delete mode 100644 tests/fixtures/brocfile-tests/multiple-sass-files-mu/node_modules/ember-cli-sass/index.js delete mode 100644 tests/fixtures/brocfile-tests/multiple-sass-files-mu/node_modules/ember-cli-sass/package.json delete mode 100644 tests/fixtures/brocfile-tests/multiple-sass-files-mu/src/ui/styles/app.scss delete mode 100644 tests/fixtures/brocfile-tests/multiple-sass-files-mu/src/ui/styles/main.scss delete mode 100644 tests/fixtures/brocfile-tests/multiple-sass-files-mu/src/ui/styles/theme/a.scss delete mode 100644 tests/fixtures/module-unification-addon/.eslintrc.js delete mode 100644 tests/fixtures/module-unification-addon/npm/.editorconfig delete mode 100644 tests/fixtures/module-unification-addon/npm/.ember-cli delete mode 100644 tests/fixtures/module-unification-addon/npm/.eslintignore delete mode 100644 tests/fixtures/module-unification-addon/npm/.eslintrc.js delete mode 100644 tests/fixtures/module-unification-addon/npm/.gitignore delete mode 100644 tests/fixtures/module-unification-addon/npm/.npmignore delete mode 100644 tests/fixtures/module-unification-addon/npm/.template-lintrc.js delete mode 100644 tests/fixtures/module-unification-addon/npm/.travis.yml delete mode 100644 tests/fixtures/module-unification-addon/npm/.watchmanconfig delete mode 100644 tests/fixtures/module-unification-addon/npm/CONTRIBUTING.md delete mode 100644 tests/fixtures/module-unification-addon/npm/LICENSE.md delete mode 100644 tests/fixtures/module-unification-addon/npm/README.md delete mode 100644 tests/fixtures/module-unification-addon/npm/config/ember-try.js delete mode 100644 tests/fixtures/module-unification-addon/npm/config/environment.js delete mode 100644 tests/fixtures/module-unification-addon/npm/ember-cli-build.js delete mode 100644 tests/fixtures/module-unification-addon/npm/index.js delete mode 100644 tests/fixtures/module-unification-addon/npm/package.json delete mode 100644 tests/fixtures/module-unification-addon/npm/src/.gitkeep delete mode 100644 tests/fixtures/module-unification-addon/npm/testem.js delete mode 100644 tests/fixtures/module-unification-addon/npm/tests/acceptance/.gitkeep delete mode 100644 tests/fixtures/module-unification-addon/npm/tests/dummy/.gitkeep delete mode 100644 tests/fixtures/module-unification-addon/npm/tests/dummy/config/environment.js delete mode 100644 tests/fixtures/module-unification-addon/npm/tests/dummy/config/targets.js delete mode 100644 tests/fixtures/module-unification-addon/npm/tests/dummy/public/robots.txt delete mode 100644 tests/fixtures/module-unification-addon/npm/tests/dummy/src/main.js delete mode 100644 tests/fixtures/module-unification-addon/npm/tests/dummy/src/resolver.js delete mode 100644 tests/fixtures/module-unification-addon/npm/tests/dummy/src/router.js delete mode 100644 tests/fixtures/module-unification-addon/npm/tests/dummy/src/ui/components/.gitkeep delete mode 100644 tests/fixtures/module-unification-addon/npm/tests/dummy/src/ui/index.html delete mode 100644 tests/fixtures/module-unification-addon/npm/tests/dummy/src/ui/routes/application/template.hbs delete mode 100644 tests/fixtures/module-unification-addon/npm/tests/dummy/src/ui/styles/app.css delete mode 100644 tests/fixtures/module-unification-addon/npm/tests/index.html delete mode 100644 tests/fixtures/module-unification-addon/npm/tests/test-helper.js delete mode 100644 tests/fixtures/module-unification-addon/npm/vendor/.gitkeep delete mode 100644 tests/fixtures/module-unification-addon/yarn/.editorconfig delete mode 100644 tests/fixtures/module-unification-addon/yarn/.ember-cli delete mode 100644 tests/fixtures/module-unification-addon/yarn/.eslintignore delete mode 100644 tests/fixtures/module-unification-addon/yarn/.eslintrc.js delete mode 100644 tests/fixtures/module-unification-addon/yarn/.gitignore delete mode 100644 tests/fixtures/module-unification-addon/yarn/.npmignore delete mode 100644 tests/fixtures/module-unification-addon/yarn/.template-lintrc.js delete mode 100644 tests/fixtures/module-unification-addon/yarn/.travis.yml delete mode 100644 tests/fixtures/module-unification-addon/yarn/.watchmanconfig delete mode 100644 tests/fixtures/module-unification-addon/yarn/CONTRIBUTING.md delete mode 100644 tests/fixtures/module-unification-addon/yarn/LICENSE.md delete mode 100644 tests/fixtures/module-unification-addon/yarn/README.md delete mode 100644 tests/fixtures/module-unification-addon/yarn/config/ember-try.js delete mode 100644 tests/fixtures/module-unification-addon/yarn/config/environment.js delete mode 100644 tests/fixtures/module-unification-addon/yarn/ember-cli-build.js delete mode 100644 tests/fixtures/module-unification-addon/yarn/index.js delete mode 100644 tests/fixtures/module-unification-addon/yarn/package.json delete mode 100644 tests/fixtures/module-unification-addon/yarn/src/.gitkeep delete mode 100644 tests/fixtures/module-unification-addon/yarn/testem.js delete mode 100644 tests/fixtures/module-unification-addon/yarn/tests/acceptance/.gitkeep delete mode 100644 tests/fixtures/module-unification-addon/yarn/tests/dummy/.gitkeep delete mode 100644 tests/fixtures/module-unification-addon/yarn/tests/dummy/config/environment.js delete mode 100644 tests/fixtures/module-unification-addon/yarn/tests/dummy/config/optional-features.json delete mode 100644 tests/fixtures/module-unification-addon/yarn/tests/dummy/config/targets.js delete mode 100644 tests/fixtures/module-unification-addon/yarn/tests/dummy/public/robots.txt delete mode 100644 tests/fixtures/module-unification-addon/yarn/tests/dummy/src/main.js delete mode 100644 tests/fixtures/module-unification-addon/yarn/tests/dummy/src/resolver.js delete mode 100644 tests/fixtures/module-unification-addon/yarn/tests/dummy/src/router.js delete mode 100644 tests/fixtures/module-unification-addon/yarn/tests/dummy/src/ui/components/.gitkeep delete mode 100644 tests/fixtures/module-unification-addon/yarn/tests/dummy/src/ui/index.html delete mode 100644 tests/fixtures/module-unification-addon/yarn/tests/dummy/src/ui/routes/application/template.hbs delete mode 100644 tests/fixtures/module-unification-addon/yarn/tests/dummy/src/ui/styles/app.css delete mode 100644 tests/fixtures/module-unification-addon/yarn/tests/index.html delete mode 100644 tests/fixtures/module-unification-addon/yarn/tests/test-helper.js delete mode 100644 tests/fixtures/module-unification-addon/yarn/vendor/.gitkeep delete mode 100644 tests/fixtures/module-unification-app/.eslintrc.js delete mode 100644 tests/fixtures/module-unification-app/npm/.travis.yml delete mode 100644 tests/fixtures/module-unification-app/npm/README.md delete mode 100644 tests/fixtures/module-unification-app/npm/package.json delete mode 100644 tests/fixtures/module-unification-app/npm/src/ui/routes/application/template.hbs delete mode 100644 tests/fixtures/module-unification-app/yarn/.travis.yml delete mode 100644 tests/fixtures/module-unification-app/yarn/README.md delete mode 100644 tests/fixtures/module-unification-app/yarn/package.json delete mode 100644 tests/fixtures/module-unification-app/yarn/src/ui/routes/application/template.hbs delete mode 100644 tests/fixtures/with-styles-mu/src/ui/styles/app.css delete mode 100644 tests/fixtures/with-styles-mu/src/ui/styles/some-other-styles.css delete mode 100644 tests/fixtures/with-styles-mu/src/ui/styles/some-styles.css delete mode 100644 tests/fixtures/with-unminified-styles-mu/src/ui/styles/app.css diff --git a/tests/fixtures/addon/kitchen-sink-mu/addon-test-support/helper.js b/tests/fixtures/addon/kitchen-sink-mu/addon-test-support/helper.js deleted file mode 100644 index 259c58832a..0000000000 --- a/tests/fixtures/addon/kitchen-sink-mu/addon-test-support/helper.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function truthyHelper() { - return true; -} diff --git a/tests/fixtures/addon/kitchen-sink-mu/index.js b/tests/fixtures/addon/kitchen-sink-mu/index.js deleted file mode 100644 index f5a8aad507..0000000000 --- a/tests/fixtures/addon/kitchen-sink-mu/index.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = { - name: require('./package').name, - - contentFor(type, config) { - if (type === 'head') { - return '"SOME AWESOME STUFF"'; - } - } -}; diff --git a/tests/fixtures/addon/kitchen-sink-mu/src/ui/components/basic-thing/component.js b/tests/fixtures/addon/kitchen-sink-mu/src/ui/components/basic-thing/component.js deleted file mode 100644 index 9d49a792ea..0000000000 --- a/tests/fixtures/addon/kitchen-sink-mu/src/ui/components/basic-thing/component.js +++ /dev/null @@ -1,6 +0,0 @@ -import template from './template'; -import Component from '@ember/component'; - -export default Component.extend({ - layout: template -}); \ No newline at end of file diff --git a/tests/fixtures/addon/kitchen-sink-mu/src/ui/components/basic-thing/template.hbs b/tests/fixtures/addon/kitchen-sink-mu/src/ui/components/basic-thing/template.hbs deleted file mode 100644 index 8c0ab5bfed..0000000000 --- a/tests/fixtures/addon/kitchen-sink-mu/src/ui/components/basic-thing/template.hbs +++ /dev/null @@ -1,3 +0,0 @@ -
- {{yield}} -
diff --git a/tests/fixtures/addon/kitchen-sink-mu/src/ui/styles/app.css b/tests/fixtures/addon/kitchen-sink-mu/src/ui/styles/app.css deleted file mode 100644 index 441f327ae2..0000000000 --- a/tests/fixtures/addon/kitchen-sink-mu/src/ui/styles/app.css +++ /dev/null @@ -1 +0,0 @@ -/* addon/styles/app.css is present */ diff --git a/tests/fixtures/addon/kitchen-sink-mu/tests/acceptance/main-test.js b/tests/fixtures/addon/kitchen-sink-mu/tests/acceptance/main-test.js deleted file mode 100644 index 1d9ab59bf4..0000000000 --- a/tests/fixtures/addon/kitchen-sink-mu/tests/acceptance/main-test.js +++ /dev/null @@ -1,23 +0,0 @@ -import { setupApplicationTest } from 'ember-qunit'; -import { visit } from '@ember/test-helpers'; -import truthyHelper from 'some-cool-addon/test-support/helper'; -import { module, test } from 'qunit'; - -module('Acceptance', function(hooks) { - setupApplicationTest(hooks); - - test('renders properly', async function(assert) { - await visit('/'); - - var element = this.element.querySelector('.basic-thing'); - assert.equal(element.textContent.trim(), 'WOOT!!'); - assert.ok(truthyHelper(), 'addon-test-support helper'); - }); - - test('renders imported component', async function(assert) { - await visit('/'); - - var element = this.element.querySelector('.second-thing'); - assert.equal(element.textContent.trim(), 'SECOND!!'); - }); -}); diff --git a/tests/fixtures/addon/kitchen-sink-mu/tests/dummy/public/robots.txt b/tests/fixtures/addon/kitchen-sink-mu/tests/dummy/public/robots.txt deleted file mode 100644 index 5062e4180f..0000000000 --- a/tests/fixtures/addon/kitchen-sink-mu/tests/dummy/public/robots.txt +++ /dev/null @@ -1 +0,0 @@ -# tests/dummy/public/robots.txt is present \ No newline at end of file diff --git a/tests/fixtures/addon/kitchen-sink-mu/tests/dummy/src/ui/components/second-thing/component.js b/tests/fixtures/addon/kitchen-sink-mu/tests/dummy/src/ui/components/second-thing/component.js deleted file mode 100644 index ae81d6883f..0000000000 --- a/tests/fixtures/addon/kitchen-sink-mu/tests/dummy/src/ui/components/second-thing/component.js +++ /dev/null @@ -1,5 +0,0 @@ -import BasicThing from 'some-cool-addon/src/ui/components/basic-thing/component'; - -export default BasicThing.extend({ - classNames: ['second-thing'] -}); diff --git a/tests/fixtures/addon/kitchen-sink-mu/tests/dummy/src/ui/routes/application/template.hbs b/tests/fixtures/addon/kitchen-sink-mu/tests/dummy/src/ui/routes/application/template.hbs deleted file mode 100644 index 885261e680..0000000000 --- a/tests/fixtures/addon/kitchen-sink-mu/tests/dummy/src/ui/routes/application/template.hbs +++ /dev/null @@ -1,2 +0,0 @@ -{{#basic-thing}}WOOT!!{{/basic-thing}} -{{#second-thing}}SECOND!!{{/second-thing}} diff --git a/tests/fixtures/brocfile-tests/multiple-css-files-mu/src/ui/styles/app.css b/tests/fixtures/brocfile-tests/multiple-css-files-mu/src/ui/styles/app.css deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/fixtures/brocfile-tests/multiple-css-files-mu/src/ui/styles/other.css b/tests/fixtures/brocfile-tests/multiple-css-files-mu/src/ui/styles/other.css deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/fixtures/brocfile-tests/multiple-sass-files-mu/ember-cli-build.js b/tests/fixtures/brocfile-tests/multiple-sass-files-mu/ember-cli-build.js deleted file mode 100644 index b49e140169..0000000000 --- a/tests/fixtures/brocfile-tests/multiple-sass-files-mu/ember-cli-build.js +++ /dev/null @@ -1,10 +0,0 @@ -const EmberApp = require('ember-cli/lib/broccoli/ember-app'); - -module.exports = function(defaults) { - var app = new EmberApp(defaults, { - name: require('./package.json').name, - outputPaths: { app: { css: { 'main': '/assets/main.css', 'theme/a': '/assets/theme/a.css' } } } - }); - - return app.toTree(); -}; diff --git a/tests/fixtures/brocfile-tests/multiple-sass-files-mu/node_modules/broccoli-sass/index.js b/tests/fixtures/brocfile-tests/multiple-sass-files-mu/node_modules/broccoli-sass/index.js deleted file mode 100644 index 20d9dd22ec..0000000000 --- a/tests/fixtures/brocfile-tests/multiple-sass-files-mu/node_modules/broccoli-sass/index.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -const fs = require('fs'); -const path = require('path'); -const Plugin = require('broccoli-plugin'); - -function copyPreserveSync (src, dest) { - var srcStats = fs.statSync(src); - if (srcStats.isFile()) { - var destDir = path.dirname(dest); - var dirs = []; - while (destDir && !fs.existsSync(destDir)) { - dirs.unshift(destDir); - destDir = path.dirname(destDir); - } - dirs.forEach(function (dir) { - fs.mkdirSync(dir); - }); - var content = fs.readFileSync(src); - fs.writeFileSync(dest, content, { flag: 'wx' }); - fs.utimesSync(dest, srcStats.atime, srcStats.mtime); - } else { - throw new Error('Unexpected file type for ' + src); - } -} - -module.exports = SassCompiler; -SassCompiler.prototype = Object.create(Plugin.prototype); -SassCompiler.prototype.constructor = SassCompiler; -function SassCompiler (inputNodes, inputFile, outputFile, options) { - if (!(this instanceof SassCompiler)) return new SassCompiler(inputNodes, inputFile, outputFile, options); - Plugin.call(this, inputNodes); - this.inputFile = inputFile; - this.outputFile = outputFile; -} - -SassCompiler.prototype.build = function () { - copyPreserveSync( - path.join(this.inputPaths[0], this.inputFile), - path.join(this.outputPath, this.outputFile)); -}; diff --git a/tests/fixtures/brocfile-tests/multiple-sass-files-mu/node_modules/broccoli-sass/package.json b/tests/fixtures/brocfile-tests/multiple-sass-files-mu/node_modules/broccoli-sass/package.json deleted file mode 100644 index 0bf9181a28..0000000000 --- a/tests/fixtures/brocfile-tests/multiple-sass-files-mu/node_modules/broccoli-sass/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "broccoli-sass", - "private": true, - "version": "1.0.0" -} diff --git a/tests/fixtures/brocfile-tests/multiple-sass-files-mu/node_modules/ember-cli-sass/index.js b/tests/fixtures/brocfile-tests/multiple-sass-files-mu/node_modules/ember-cli-sass/index.js deleted file mode 100644 index 0af2c4cf95..0000000000 --- a/tests/fixtures/brocfile-tests/multiple-sass-files-mu/node_modules/ember-cli-sass/index.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -const path = require('path'); -const mergeTrees = require('broccoli-merge-trees'); -const SassCompiler = require('../broccoli-sass'); - -function SASSPlugin() { - this.name = 'ember-cli-sass'; - this.ext = ['scss', 'sass']; -} - -SASSPlugin.prototype.toTree = function(tree, inputPath, outputPath, inputOptions) { - var options = inputOptions; - - var inputTrees = [tree]; - if (options.includePaths) { - inputTrees = inputTrees.concat(options.includePaths); - } - - var ext = options.extension || 'scss'; - var paths = options.outputPaths; - var trees = Object.keys(paths).map(function(file) { - var input = path.join(inputPath, file + '.' + ext); - var output = paths[file]; - return new SassCompiler(inputTrees, input, output, options); - }); - - return mergeTrees(trees); -}; - -module.exports = { - name: require('./package').name, - - setupPreprocessorRegistry(type, registry) { - registry.add('css', new SASSPlugin()); - }, -}; diff --git a/tests/fixtures/brocfile-tests/multiple-sass-files-mu/node_modules/ember-cli-sass/package.json b/tests/fixtures/brocfile-tests/multiple-sass-files-mu/node_modules/ember-cli-sass/package.json deleted file mode 100644 index 4076438315..0000000000 --- a/tests/fixtures/brocfile-tests/multiple-sass-files-mu/node_modules/ember-cli-sass/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "ember-cli-sass", - "private": true, - "version": "1.0.0", - "main": "index.js", - "keywords": [ - "ember-addon" - ], - "dependencies": { - "broccoli-sass": "latest" - } -} diff --git a/tests/fixtures/brocfile-tests/multiple-sass-files-mu/src/ui/styles/app.scss b/tests/fixtures/brocfile-tests/multiple-sass-files-mu/src/ui/styles/app.scss deleted file mode 100644 index 56af6df5a4..0000000000 --- a/tests/fixtures/brocfile-tests/multiple-sass-files-mu/src/ui/styles/app.scss +++ /dev/null @@ -1 +0,0 @@ -body { background: green; } diff --git a/tests/fixtures/brocfile-tests/multiple-sass-files-mu/src/ui/styles/main.scss b/tests/fixtures/brocfile-tests/multiple-sass-files-mu/src/ui/styles/main.scss deleted file mode 100644 index c08d072353..0000000000 --- a/tests/fixtures/brocfile-tests/multiple-sass-files-mu/src/ui/styles/main.scss +++ /dev/null @@ -1 +0,0 @@ -body { background: black; } diff --git a/tests/fixtures/brocfile-tests/multiple-sass-files-mu/src/ui/styles/theme/a.scss b/tests/fixtures/brocfile-tests/multiple-sass-files-mu/src/ui/styles/theme/a.scss deleted file mode 100644 index dab2ff7985..0000000000 --- a/tests/fixtures/brocfile-tests/multiple-sass-files-mu/src/ui/styles/theme/a.scss +++ /dev/null @@ -1 +0,0 @@ -.theme { color: red; } diff --git a/tests/fixtures/module-unification-addon/.eslintrc.js b/tests/fixtures/module-unification-addon/.eslintrc.js deleted file mode 100644 index 657ee6fd51..0000000000 --- a/tests/fixtures/module-unification-addon/.eslintrc.js +++ /dev/null @@ -1,54 +0,0 @@ -module.exports = { - root: true, - parser: 'babel-eslint', - parserOptions: { - ecmaVersion: 2018, - sourceType: 'module' - }, - plugins: [ - 'ember' - ], - extends: [ - 'eslint:recommended', - 'plugin:ember/recommended' - ], - env: { - browser: true - }, - rules: { - }, - overrides: [ - // node files - { - files: [ - '.eslintrc.js', - '.template-lintrc.js', - 'ember-cli-build.js', - 'index.js', - 'testem.js', - 'blueprints/*/index.js', - 'config/**/*.js', - 'tests/dummy/config/**/*.js' - ], - excludedFiles: [ - 'src/**', - 'tests/dummy/app/**' - ], - parserOptions: { - sourceType: 'script' - }, - env: { - browser: false, - node: true - }, - plugins: ['node'], - rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, { - // add your custom rules and overrides for node files here - - // this can be removed once the following is fixed - // https://github.com/mysticatea/eslint-plugin-node/issues/77 - 'node/no-unpublished-require': 'off' - }) - } - ] -}; diff --git a/tests/fixtures/module-unification-addon/npm/.editorconfig b/tests/fixtures/module-unification-addon/npm/.editorconfig deleted file mode 100644 index 219985c228..0000000000 --- a/tests/fixtures/module-unification-addon/npm/.editorconfig +++ /dev/null @@ -1,20 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# editorconfig.org - -root = true - - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 2 - -[*.hbs] -insert_final_newline = false - -[*.{diff,md}] -trim_trailing_whitespace = false diff --git a/tests/fixtures/module-unification-addon/npm/.ember-cli b/tests/fixtures/module-unification-addon/npm/.ember-cli deleted file mode 100644 index ee64cfed2a..0000000000 --- a/tests/fixtures/module-unification-addon/npm/.ember-cli +++ /dev/null @@ -1,9 +0,0 @@ -{ - /** - Ember CLI sends analytics information by default. The data is completely - anonymous, but there are times when you might want to disable this behavior. - - Setting `disableAnalytics` to true will prevent any data from being sent. - */ - "disableAnalytics": false -} diff --git a/tests/fixtures/module-unification-addon/npm/.eslintignore b/tests/fixtures/module-unification-addon/npm/.eslintignore deleted file mode 100644 index 9f2dd3ba02..0000000000 --- a/tests/fixtures/module-unification-addon/npm/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -!.* diff --git a/tests/fixtures/module-unification-addon/npm/.eslintrc.js b/tests/fixtures/module-unification-addon/npm/.eslintrc.js deleted file mode 100644 index 43c0e36b3c..0000000000 --- a/tests/fixtures/module-unification-addon/npm/.eslintrc.js +++ /dev/null @@ -1,50 +0,0 @@ -module.exports = { - root: true, - parser: 'babel-eslint', - parserOptions: { - ecmaVersion: 2018, - sourceType: 'module' - }, - plugins: [ - 'ember' - ], - extends: [ - 'eslint:recommended', - 'plugin:ember/recommended' - ], - env: { - browser: true - }, - rules: { - }, - overrides: [ - // node files - { - files: [ - '.eslintrc.js', - '.template-lintrc.js', - 'ember-cli-build.js', - 'index.js', - 'testem.js', - 'blueprints/*/index.js', - 'config/**/*.js', - 'tests/dummy/config/**/*.js' - ], - excludedFiles: [ - 'src/**', - 'tests/dummy/app/**' - ], - parserOptions: { - sourceType: 'script' - }, - env: { - browser: false, - node: true - }, - plugins: ['node'], - rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, { - // add your custom rules and overrides for node files here - }) - } - ] -}; diff --git a/tests/fixtures/module-unification-addon/npm/.gitignore b/tests/fixtures/module-unification-addon/npm/.gitignore deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/fixtures/module-unification-addon/npm/.npmignore b/tests/fixtures/module-unification-addon/npm/.npmignore deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/fixtures/module-unification-addon/npm/.template-lintrc.js b/tests/fixtures/module-unification-addon/npm/.template-lintrc.js deleted file mode 100644 index 3f204f3fad..0000000000 --- a/tests/fixtures/module-unification-addon/npm/.template-lintrc.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -module.exports = { - extends: 'recommended' -} diff --git a/tests/fixtures/module-unification-addon/npm/.travis.yml b/tests/fixtures/module-unification-addon/npm/.travis.yml deleted file mode 100644 index 1bad18f943..0000000000 --- a/tests/fixtures/module-unification-addon/npm/.travis.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -language: node_js -node_js: - # we recommend testing addons with the same minimum supported node version as Ember CLI - # so that your addon works for all apps - - "8" - -sudo: false -dist: trusty - -addons: - chrome: stable - -cache: - directories: - - $HOME/.npm - -env: - global: - # See https://git.io/vdao3 for details. - - JOBS=1 - matrix: - # we recommend new addons test the current and previous LTS - # as well as latest stable release (bonus points to beta/canary) - - EMBER_TRY_SCENARIO=ember-lts-3.4 - - EMBER_TRY_SCENARIO=ember-lts-3.8 - - EMBER_TRY_SCENARIO=ember-release - - EMBER_TRY_SCENARIO=ember-beta - - EMBER_TRY_SCENARIO=ember-canary - - EMBER_TRY_SCENARIO=ember-default - -matrix: - fast_finish: true - allow_failures: - - env: EMBER_TRY_SCENARIO=ember-canary - -script: - - npm run lint:hbs - - npm run lint:js - # Usually, it's ok to finish the test scenario without reverting - # to the addon's original dependency state, skipping "cleanup". - - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup diff --git a/tests/fixtures/module-unification-addon/npm/.watchmanconfig b/tests/fixtures/module-unification-addon/npm/.watchmanconfig deleted file mode 100644 index e7834e3e4f..0000000000 --- a/tests/fixtures/module-unification-addon/npm/.watchmanconfig +++ /dev/null @@ -1,3 +0,0 @@ -{ - "ignore_dirs": ["tmp", "dist"] -} diff --git a/tests/fixtures/module-unification-addon/npm/CONTRIBUTING.md b/tests/fixtures/module-unification-addon/npm/CONTRIBUTING.md deleted file mode 100644 index 8fc5b869d6..0000000000 --- a/tests/fixtures/module-unification-addon/npm/CONTRIBUTING.md +++ /dev/null @@ -1,26 +0,0 @@ -# How To Contribute - -## Installation - -* `git clone ` -* `cd foo` -* `npm install` - -## Linting - -* `npm run lint:hbs` -* `npm run lint:js` -* `npm run lint:js -- --fix` - -## Running tests - -* `ember test` – Runs the test suite on the current Ember version -* `ember test --server` – Runs the test suite in "watch mode" -* `ember try:each` – Runs the test suite against multiple Ember versions - -## Running the dummy application - -* `ember serve` -* Visit the dummy application at [http://localhost:4200](http://localhost:4200). - -For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/). \ No newline at end of file diff --git a/tests/fixtures/module-unification-addon/npm/LICENSE.md b/tests/fixtures/module-unification-addon/npm/LICENSE.md deleted file mode 100644 index 198f6dacf4..0000000000 --- a/tests/fixtures/module-unification-addon/npm/LICENSE.md +++ /dev/null @@ -1,9 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018 - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tests/fixtures/module-unification-addon/npm/README.md b/tests/fixtures/module-unification-addon/npm/README.md deleted file mode 100644 index 36bd8fd416..0000000000 --- a/tests/fixtures/module-unification-addon/npm/README.md +++ /dev/null @@ -1,38 +0,0 @@ -foo -============================================================================== - -[Short description of the addon.] - - -Compatibility ------------------------------------------------------------------------------- - -* Ember.js v3.4 or above -* Ember CLI v2.13 or above -* Node.js v8 or above - - -Installation ------------------------------------------------------------------------------- - -``` -ember install foo -``` - - -Usage ------------------------------------------------------------------------------- - -[Longer description of how to use the addon in apps.] - - -Contributing ------------------------------------------------------------------------------- - -See the [Contributing](CONTRIBUTING.md) guide for details. - - -License ------------------------------------------------------------------------------- - -This project is licensed under the [MIT License](LICENSE.md). diff --git a/tests/fixtures/module-unification-addon/npm/config/ember-try.js b/tests/fixtures/module-unification-addon/npm/config/ember-try.js deleted file mode 100644 index 4e1ece175e..0000000000 --- a/tests/fixtures/module-unification-addon/npm/config/ember-try.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - -const getChannelURL = require('ember-source-channel-url'); - -module.exports = async function() { - return { - scenarios: [ - { - name: 'ember-lts-3.4', - npm: { - devDependencies: { - 'ember-source': '~3.4.0' - } - } - }, - { - name: 'ember-lts-3.8', - npm: { - devDependencies: { - 'ember-source': '~3.8.0' - } - } - }, - { - name: 'ember-release', - npm: { - devDependencies: { - 'ember-source': await getChannelURL('release') - } - } - }, - { - name: 'ember-beta', - npm: { - devDependencies: { - 'ember-source': await getChannelURL('beta') - } - } - }, - { - name: 'ember-canary', - npm: { - devDependencies: { - 'ember-source': await getChannelURL('canary') - } - } - }, - { - name: 'ember-default', - npm: { - devDependencies: {} - } - } - ] - }; -}; diff --git a/tests/fixtures/module-unification-addon/npm/config/environment.js b/tests/fixtures/module-unification-addon/npm/config/environment.js deleted file mode 100644 index 0dfaed4728..0000000000 --- a/tests/fixtures/module-unification-addon/npm/config/environment.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -module.exports = function(/* environment, appConfig */) { - return { }; -}; diff --git a/tests/fixtures/module-unification-addon/npm/ember-cli-build.js b/tests/fixtures/module-unification-addon/npm/ember-cli-build.js deleted file mode 100644 index ba0649dc93..0000000000 --- a/tests/fixtures/module-unification-addon/npm/ember-cli-build.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); - -module.exports = function (defaults) { - let app = new EmberAddon(defaults, { - // Add options here - }); - - /* - This build file specifies the options for the dummy test app of this - addon, located in `/tests/dummy` - This build file does *not* influence how the addon or the app using it - behave. You most likely want to be modifying `./index.js` or app's build file - */ - - return app.toTree(); -}; diff --git a/tests/fixtures/module-unification-addon/npm/index.js b/tests/fixtures/module-unification-addon/npm/index.js deleted file mode 100644 index 2e1d1d8d5f..0000000000 --- a/tests/fixtures/module-unification-addon/npm/index.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -module.exports = { - name: require('./package').name -}; diff --git a/tests/fixtures/module-unification-addon/npm/package.json b/tests/fixtures/module-unification-addon/npm/package.json deleted file mode 100644 index a2aa2afe72..0000000000 --- a/tests/fixtures/module-unification-addon/npm/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "foo", - "version": "0.0.0", - "description": "Generates an Ember addon with a module unification layout.", - "keywords": [ - "ember-addon" - ], - "repository": "", - "license": "MIT", - "author": "", - "directories": { - "doc": "doc", - "test": "tests" - }, - "scripts": { - "build": "ember build", - "lint:hbs": "ember-template-lint .", - "lint:js": "eslint .", - "start": "ember serve", - "test": "ember test", - "test:all": "ember try:each" - }, - "dependencies": { - "ember-cli-babel": "^7.11.0", - "ember-cli-htmlbars": "^3.1.0" - }, - "devDependencies": { - "@ember/optional-features": "^0.7.0", - "babel-eslint": "^10.0.3", - "broccoli-asset-rev": "^3.0.0", - "ember-cli": "<%= emberCLIVersion %>", - "ember-cli-dependency-checker": "^3.1.0", - "ember-cli-eslint": "^5.1.0", - "ember-cli-htmlbars-inline-precompile": "^3.0.0", - "ember-cli-inject-live-reload": "^2.0.1", - "ember-cli-sri": "^2.1.1", - "ember-cli-template-lint": "^1.0.0-beta.3", - "ember-cli-uglify": "^3.0.0", - "ember-disable-prototype-extensions": "^1.1.3", - "ember-export-application-global": "^2.0.0", - "ember-load-initializers": "^2.1.0", - "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^4.5.1", - "ember-resolver": "^5.2.1", - "ember-source": "<%= emberCanaryVersion %>", - "ember-source-channel-url": "^2.0.1", - "ember-try": "^1.2.1", - "eslint-plugin-ember": "^7.0.0", - "eslint-plugin-node": "^9.2.0", - "loader.js": "^4.7.0", - "qunit-dom": "^0.9.0" - }, - "engines": { - "node": "8.* || >= 10.*" - }, - "ember-addon": { - "configPath": "tests/dummy/config" - } -} diff --git a/tests/fixtures/module-unification-addon/npm/src/.gitkeep b/tests/fixtures/module-unification-addon/npm/src/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/fixtures/module-unification-addon/npm/testem.js b/tests/fixtures/module-unification-addon/npm/testem.js deleted file mode 100644 index 96589a75d2..0000000000 --- a/tests/fixtures/module-unification-addon/npm/testem.js +++ /dev/null @@ -1,23 +0,0 @@ -module.exports = { - test_page: 'tests/index.html?hidepassed', - disable_watching: true, - launch_in_ci: [ - 'Chrome' - ], - launch_in_dev: [ - 'Chrome' - ], - browser_args: { - Chrome: { - mode: 'ci', - args: [ - // --no-sandbox is needed when running Chrome inside a container - process.env.TRAVIS ? '--no-sandbox' : null, - - '--headless', - '--remote-debugging-port=0', - '--window-size=1440,900' - ].filter(Boolean) - } - } -}; diff --git a/tests/fixtures/module-unification-addon/npm/tests/acceptance/.gitkeep b/tests/fixtures/module-unification-addon/npm/tests/acceptance/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/fixtures/module-unification-addon/npm/tests/dummy/.gitkeep b/tests/fixtures/module-unification-addon/npm/tests/dummy/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/fixtures/module-unification-addon/npm/tests/dummy/config/environment.js b/tests/fixtures/module-unification-addon/npm/tests/dummy/config/environment.js deleted file mode 100644 index 9d3feec603..0000000000 --- a/tests/fixtures/module-unification-addon/npm/tests/dummy/config/environment.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - -module.exports = function(environment) { - let ENV = { - 'ember-resolver': { - features: { - EMBER_RESOLVER_MODULE_UNIFICATION: true - } - }, - modulePrefix: 'dummy', - environment, - rootURL: '/', - locationType: 'auto', - EmberENV: { - FEATURES: { - // Here you can enable experimental features on an ember canary build - // e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true - EMBER_MODULE_UNIFICATION: true - }, - EXTEND_PROTOTYPES: { - // Prevent Ember Data from overriding Date.parse. - Date: false - } - }, - - APP: { - // Here you can pass flags/options to your application instance - // when it is created - } - }; - - if (environment === 'development') { - // ENV.APP.LOG_RESOLVER = true; - // ENV.APP.LOG_ACTIVE_GENERATION = true; - // ENV.APP.LOG_TRANSITIONS = true; - // ENV.APP.LOG_TRANSITIONS_INTERNAL = true; - // ENV.APP.LOG_VIEW_LOOKUPS = true; - } - - if (environment === 'test') { - // Testem prefers this... - ENV.locationType = 'none'; - - // keep test console output quieter - ENV.APP.LOG_ACTIVE_GENERATION = false; - ENV.APP.LOG_VIEW_LOOKUPS = false; - - ENV.APP.rootElement = '#ember-testing'; - } - - if (environment === 'production') { - // here you can enable a production-specific feature - } - - return ENV; -}; diff --git a/tests/fixtures/module-unification-addon/npm/tests/dummy/config/targets.js b/tests/fixtures/module-unification-addon/npm/tests/dummy/config/targets.js deleted file mode 100644 index 1a7647d06b..0000000000 --- a/tests/fixtures/module-unification-addon/npm/tests/dummy/config/targets.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - browsers: [ - 'ie 11', - 'last 1 Chrome versions', - 'last 1 Firefox versions', - 'last 1 Safari versions' - ] -}; diff --git a/tests/fixtures/module-unification-addon/npm/tests/dummy/public/robots.txt b/tests/fixtures/module-unification-addon/npm/tests/dummy/public/robots.txt deleted file mode 100644 index f5916452e5..0000000000 --- a/tests/fixtures/module-unification-addon/npm/tests/dummy/public/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# http://www.robotstxt.org -User-agent: * -Disallow: diff --git a/tests/fixtures/module-unification-addon/npm/tests/dummy/src/main.js b/tests/fixtures/module-unification-addon/npm/tests/dummy/src/main.js deleted file mode 100644 index 84b092ff19..0000000000 --- a/tests/fixtures/module-unification-addon/npm/tests/dummy/src/main.js +++ /dev/null @@ -1,19 +0,0 @@ -import Application from "@ember/application"; -import Resolver from "./resolver"; -import loadInitializers from "ember-load-initializers"; -import config from "../config/environment"; - -const App = Application.extend({ - modulePrefix: config.modulePrefix, - podModulePrefix: config.podModulePrefix, - Resolver -}); - -loadInitializers(App, config.modulePrefix + "/src/init"); - -/* - * This line is added to support initializers in the `app/` directory - */ -loadInitializers(App, config.modulePrefix); - -export default App; diff --git a/tests/fixtures/module-unification-addon/npm/tests/dummy/src/resolver.js b/tests/fixtures/module-unification-addon/npm/tests/dummy/src/resolver.js deleted file mode 100644 index f0b8a1ccea..0000000000 --- a/tests/fixtures/module-unification-addon/npm/tests/dummy/src/resolver.js +++ /dev/null @@ -1,13 +0,0 @@ -import Resolver from 'ember-resolver/resolvers/fallback'; -import buildResolverConfig from 'ember-resolver/ember-config'; -import config from '../config/environment'; - -let moduleConfig = buildResolverConfig(config.modulePrefix); -/* - * If your application has custom types and collections, modify moduleConfig here - * to add support for them. - */ - -export default Resolver.extend({ - config: moduleConfig -}); diff --git a/tests/fixtures/module-unification-addon/npm/tests/dummy/src/router.js b/tests/fixtures/module-unification-addon/npm/tests/dummy/src/router.js deleted file mode 100644 index 7f2298b0dc..0000000000 --- a/tests/fixtures/module-unification-addon/npm/tests/dummy/src/router.js +++ /dev/null @@ -1,11 +0,0 @@ -import EmberRouter from "@ember/routing/router"; -import config from "../config/environment"; - -const Router = EmberRouter.extend({ - location: config.locationType, - rootURL: config.rootURL -}); - -Router.map(function() {}); - -export default Router; diff --git a/tests/fixtures/module-unification-addon/npm/tests/dummy/src/ui/components/.gitkeep b/tests/fixtures/module-unification-addon/npm/tests/dummy/src/ui/components/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/fixtures/module-unification-addon/npm/tests/dummy/src/ui/index.html b/tests/fixtures/module-unification-addon/npm/tests/dummy/src/ui/index.html deleted file mode 100644 index e4e6c5d6e9..0000000000 --- a/tests/fixtures/module-unification-addon/npm/tests/dummy/src/ui/index.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - dummy - - - - {{content-for "head"}} - - - - - {{content-for "head-footer"}} - - - {{content-for "body"}} - - - - - {{content-for "body-footer"}} - - diff --git a/tests/fixtures/module-unification-addon/npm/tests/dummy/src/ui/routes/application/template.hbs b/tests/fixtures/module-unification-addon/npm/tests/dummy/src/ui/routes/application/template.hbs deleted file mode 100644 index 5230580f82..0000000000 --- a/tests/fixtures/module-unification-addon/npm/tests/dummy/src/ui/routes/application/template.hbs +++ /dev/null @@ -1,3 +0,0 @@ -

Welcome to Ember

- -{{outlet}} \ No newline at end of file diff --git a/tests/fixtures/module-unification-addon/npm/tests/dummy/src/ui/styles/app.css b/tests/fixtures/module-unification-addon/npm/tests/dummy/src/ui/styles/app.css deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/fixtures/module-unification-addon/npm/tests/index.html b/tests/fixtures/module-unification-addon/npm/tests/index.html deleted file mode 100644 index 5209b85232..0000000000 --- a/tests/fixtures/module-unification-addon/npm/tests/index.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - Dummy Tests - - - - {{content-for "head"}} - {{content-for "test-head"}} - - - - - - {{content-for "head-footer"}} - {{content-for "test-head-footer"}} - - - {{content-for "body"}} - {{content-for "test-body"}} - - - - - - - - {{content-for "body-footer"}} - {{content-for "test-body-footer"}} - - diff --git a/tests/fixtures/module-unification-addon/npm/tests/test-helper.js b/tests/fixtures/module-unification-addon/npm/tests/test-helper.js deleted file mode 100644 index 007bd6e506..0000000000 --- a/tests/fixtures/module-unification-addon/npm/tests/test-helper.js +++ /dev/null @@ -1,8 +0,0 @@ -import Application from '../src/main'; -import config from '../config/environment'; -import { setApplication } from '@ember/test-helpers'; -import { start } from 'ember-qunit'; - -setApplication(Application.create(config.APP)); - -start(); diff --git a/tests/fixtures/module-unification-addon/npm/vendor/.gitkeep b/tests/fixtures/module-unification-addon/npm/vendor/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/fixtures/module-unification-addon/yarn/.editorconfig b/tests/fixtures/module-unification-addon/yarn/.editorconfig deleted file mode 100644 index 219985c228..0000000000 --- a/tests/fixtures/module-unification-addon/yarn/.editorconfig +++ /dev/null @@ -1,20 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# editorconfig.org - -root = true - - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 2 - -[*.hbs] -insert_final_newline = false - -[*.{diff,md}] -trim_trailing_whitespace = false diff --git a/tests/fixtures/module-unification-addon/yarn/.ember-cli b/tests/fixtures/module-unification-addon/yarn/.ember-cli deleted file mode 100644 index ee64cfed2a..0000000000 --- a/tests/fixtures/module-unification-addon/yarn/.ember-cli +++ /dev/null @@ -1,9 +0,0 @@ -{ - /** - Ember CLI sends analytics information by default. The data is completely - anonymous, but there are times when you might want to disable this behavior. - - Setting `disableAnalytics` to true will prevent any data from being sent. - */ - "disableAnalytics": false -} diff --git a/tests/fixtures/module-unification-addon/yarn/.eslintignore b/tests/fixtures/module-unification-addon/yarn/.eslintignore deleted file mode 100644 index 9f2dd3ba02..0000000000 --- a/tests/fixtures/module-unification-addon/yarn/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -!.* diff --git a/tests/fixtures/module-unification-addon/yarn/.eslintrc.js b/tests/fixtures/module-unification-addon/yarn/.eslintrc.js deleted file mode 100644 index 43c0e36b3c..0000000000 --- a/tests/fixtures/module-unification-addon/yarn/.eslintrc.js +++ /dev/null @@ -1,50 +0,0 @@ -module.exports = { - root: true, - parser: 'babel-eslint', - parserOptions: { - ecmaVersion: 2018, - sourceType: 'module' - }, - plugins: [ - 'ember' - ], - extends: [ - 'eslint:recommended', - 'plugin:ember/recommended' - ], - env: { - browser: true - }, - rules: { - }, - overrides: [ - // node files - { - files: [ - '.eslintrc.js', - '.template-lintrc.js', - 'ember-cli-build.js', - 'index.js', - 'testem.js', - 'blueprints/*/index.js', - 'config/**/*.js', - 'tests/dummy/config/**/*.js' - ], - excludedFiles: [ - 'src/**', - 'tests/dummy/app/**' - ], - parserOptions: { - sourceType: 'script' - }, - env: { - browser: false, - node: true - }, - plugins: ['node'], - rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, { - // add your custom rules and overrides for node files here - }) - } - ] -}; diff --git a/tests/fixtures/module-unification-addon/yarn/.gitignore b/tests/fixtures/module-unification-addon/yarn/.gitignore deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/fixtures/module-unification-addon/yarn/.npmignore b/tests/fixtures/module-unification-addon/yarn/.npmignore deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/fixtures/module-unification-addon/yarn/.template-lintrc.js b/tests/fixtures/module-unification-addon/yarn/.template-lintrc.js deleted file mode 100644 index 3f204f3fad..0000000000 --- a/tests/fixtures/module-unification-addon/yarn/.template-lintrc.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -module.exports = { - extends: 'recommended' -} diff --git a/tests/fixtures/module-unification-addon/yarn/.travis.yml b/tests/fixtures/module-unification-addon/yarn/.travis.yml deleted file mode 100644 index 1bad18f943..0000000000 --- a/tests/fixtures/module-unification-addon/yarn/.travis.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -language: node_js -node_js: - # we recommend testing addons with the same minimum supported node version as Ember CLI - # so that your addon works for all apps - - "8" - -sudo: false -dist: trusty - -addons: - chrome: stable - -cache: - directories: - - $HOME/.npm - -env: - global: - # See https://git.io/vdao3 for details. - - JOBS=1 - matrix: - # we recommend new addons test the current and previous LTS - # as well as latest stable release (bonus points to beta/canary) - - EMBER_TRY_SCENARIO=ember-lts-3.4 - - EMBER_TRY_SCENARIO=ember-lts-3.8 - - EMBER_TRY_SCENARIO=ember-release - - EMBER_TRY_SCENARIO=ember-beta - - EMBER_TRY_SCENARIO=ember-canary - - EMBER_TRY_SCENARIO=ember-default - -matrix: - fast_finish: true - allow_failures: - - env: EMBER_TRY_SCENARIO=ember-canary - -script: - - npm run lint:hbs - - npm run lint:js - # Usually, it's ok to finish the test scenario without reverting - # to the addon's original dependency state, skipping "cleanup". - - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup diff --git a/tests/fixtures/module-unification-addon/yarn/.watchmanconfig b/tests/fixtures/module-unification-addon/yarn/.watchmanconfig deleted file mode 100644 index e7834e3e4f..0000000000 --- a/tests/fixtures/module-unification-addon/yarn/.watchmanconfig +++ /dev/null @@ -1,3 +0,0 @@ -{ - "ignore_dirs": ["tmp", "dist"] -} diff --git a/tests/fixtures/module-unification-addon/yarn/CONTRIBUTING.md b/tests/fixtures/module-unification-addon/yarn/CONTRIBUTING.md deleted file mode 100644 index 59e532958a..0000000000 --- a/tests/fixtures/module-unification-addon/yarn/CONTRIBUTING.md +++ /dev/null @@ -1,26 +0,0 @@ -# How To Contribute - -## Installation - -* `git clone ` -* `cd foo` -* `yarn install` - -## Linting - -* `yarn lint:hbs` -* `yarn lint:js` -* `yarn lint:js --fix` - -## Running tests - -* `ember test` – Runs the test suite on the current Ember version -* `ember test --server` – Runs the test suite in "watch mode" -* `ember try:each` – Runs the test suite against multiple Ember versions - -## Running the dummy application - -* `ember serve` -* Visit the dummy application at [http://localhost:4200](http://localhost:4200). - -For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/). \ No newline at end of file diff --git a/tests/fixtures/module-unification-addon/yarn/LICENSE.md b/tests/fixtures/module-unification-addon/yarn/LICENSE.md deleted file mode 100644 index 198f6dacf4..0000000000 --- a/tests/fixtures/module-unification-addon/yarn/LICENSE.md +++ /dev/null @@ -1,9 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018 - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tests/fixtures/module-unification-addon/yarn/README.md b/tests/fixtures/module-unification-addon/yarn/README.md deleted file mode 100644 index 36bd8fd416..0000000000 --- a/tests/fixtures/module-unification-addon/yarn/README.md +++ /dev/null @@ -1,38 +0,0 @@ -foo -============================================================================== - -[Short description of the addon.] - - -Compatibility ------------------------------------------------------------------------------- - -* Ember.js v3.4 or above -* Ember CLI v2.13 or above -* Node.js v8 or above - - -Installation ------------------------------------------------------------------------------- - -``` -ember install foo -``` - - -Usage ------------------------------------------------------------------------------- - -[Longer description of how to use the addon in apps.] - - -Contributing ------------------------------------------------------------------------------- - -See the [Contributing](CONTRIBUTING.md) guide for details. - - -License ------------------------------------------------------------------------------- - -This project is licensed under the [MIT License](LICENSE.md). diff --git a/tests/fixtures/module-unification-addon/yarn/config/ember-try.js b/tests/fixtures/module-unification-addon/yarn/config/ember-try.js deleted file mode 100644 index 2d304fdcbb..0000000000 --- a/tests/fixtures/module-unification-addon/yarn/config/ember-try.js +++ /dev/null @@ -1,57 +0,0 @@ -'use strict'; - -const getChannelURL = require('ember-source-channel-url'); - -module.exports = async function() { - return { - useYarn: true, - scenarios: [ - { - name: 'ember-lts-3.4', - npm: { - devDependencies: { - 'ember-source': '~3.4.0' - } - } - }, - { - name: 'ember-lts-3.8', - npm: { - devDependencies: { - 'ember-source': '~3.8.0' - } - } - }, - { - name: 'ember-release', - npm: { - devDependencies: { - 'ember-source': await getChannelURL('release') - } - } - }, - { - name: 'ember-beta', - npm: { - devDependencies: { - 'ember-source': await getChannelURL('beta') - } - } - }, - { - name: 'ember-canary', - npm: { - devDependencies: { - 'ember-source': await getChannelURL('canary') - } - } - }, - { - name: 'ember-default', - npm: { - devDependencies: {} - } - } - ] - }; -}; diff --git a/tests/fixtures/module-unification-addon/yarn/config/environment.js b/tests/fixtures/module-unification-addon/yarn/config/environment.js deleted file mode 100644 index 0dfaed4728..0000000000 --- a/tests/fixtures/module-unification-addon/yarn/config/environment.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -module.exports = function(/* environment, appConfig */) { - return { }; -}; diff --git a/tests/fixtures/module-unification-addon/yarn/ember-cli-build.js b/tests/fixtures/module-unification-addon/yarn/ember-cli-build.js deleted file mode 100644 index ba0649dc93..0000000000 --- a/tests/fixtures/module-unification-addon/yarn/ember-cli-build.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); - -module.exports = function (defaults) { - let app = new EmberAddon(defaults, { - // Add options here - }); - - /* - This build file specifies the options for the dummy test app of this - addon, located in `/tests/dummy` - This build file does *not* influence how the addon or the app using it - behave. You most likely want to be modifying `./index.js` or app's build file - */ - - return app.toTree(); -}; diff --git a/tests/fixtures/module-unification-addon/yarn/index.js b/tests/fixtures/module-unification-addon/yarn/index.js deleted file mode 100644 index 2e1d1d8d5f..0000000000 --- a/tests/fixtures/module-unification-addon/yarn/index.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -module.exports = { - name: require('./package').name -}; diff --git a/tests/fixtures/module-unification-addon/yarn/package.json b/tests/fixtures/module-unification-addon/yarn/package.json deleted file mode 100644 index ad5603aa1e..0000000000 --- a/tests/fixtures/module-unification-addon/yarn/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "foo", - "version": "0.0.0", - "description": "Generates an Ember addon with a module unification layout.", - "keywords": [ - "ember-addon" - ], - "repository": "", - "license": "MIT", - "author": "", - "directories": { - "doc": "doc", - "test": "tests" - }, - "scripts": { - "build": "ember build", - "lint:hbs": "ember-template-lint .", - "lint:js": "eslint .", - "start": "ember serve", - "test": "ember test", - "test:all": "ember try:each" - }, - "dependencies": { - "ember-cli-babel": "^7.11.0", - "ember-cli-htmlbars": "^3.1.0" - }, - "devDependencies": { - "@ember/optional-features": "^0.7.0", - "babel-eslint": "^10.0.3", - "broccoli-asset-rev": "^3.0.0", - "ember-cli": "<%= emberCLIVersion %>", - "ember-cli-dependency-checker": "^3.1.0", - "ember-cli-eslint": "^5.1.0", - "ember-cli-htmlbars-inline-precompile": "^3.0.0", - "ember-cli-inject-live-reload": "^2.0.1", - "ember-cli-sri": "^2.1.1", - "ember-cli-template-lint": "^1.0.0-beta.3", - "ember-cli-uglify": "^3.0.0", - "ember-disable-prototype-extensions": "^1.1.3", - "ember-export-application-global": "^2.0.0", - "ember-load-initializers": "^2.1.0", - "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^4.5.1", - "ember-resolver": "^5.2.1", - "ember-source": "<%= emberCanaryVersion %>", - "ember-source-channel-url": "^2.0.1", - "ember-try": "^1.2.1", - "ember-welcome-page": "^4.0.0", - "eslint-plugin-ember": "^7.0.0", - "eslint-plugin-node": "^9.2.0", - "loader.js": "^4.7.0", - "qunit-dom": "^0.9.0" - }, - "engines": { - "node": "8.* || >= 10.*" - }, - "ember-addon": { - "configPath": "tests/dummy/config" - } -} diff --git a/tests/fixtures/module-unification-addon/yarn/src/.gitkeep b/tests/fixtures/module-unification-addon/yarn/src/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/fixtures/module-unification-addon/yarn/testem.js b/tests/fixtures/module-unification-addon/yarn/testem.js deleted file mode 100644 index 96589a75d2..0000000000 --- a/tests/fixtures/module-unification-addon/yarn/testem.js +++ /dev/null @@ -1,23 +0,0 @@ -module.exports = { - test_page: 'tests/index.html?hidepassed', - disable_watching: true, - launch_in_ci: [ - 'Chrome' - ], - launch_in_dev: [ - 'Chrome' - ], - browser_args: { - Chrome: { - mode: 'ci', - args: [ - // --no-sandbox is needed when running Chrome inside a container - process.env.TRAVIS ? '--no-sandbox' : null, - - '--headless', - '--remote-debugging-port=0', - '--window-size=1440,900' - ].filter(Boolean) - } - } -}; diff --git a/tests/fixtures/module-unification-addon/yarn/tests/acceptance/.gitkeep b/tests/fixtures/module-unification-addon/yarn/tests/acceptance/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/fixtures/module-unification-addon/yarn/tests/dummy/.gitkeep b/tests/fixtures/module-unification-addon/yarn/tests/dummy/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/fixtures/module-unification-addon/yarn/tests/dummy/config/environment.js b/tests/fixtures/module-unification-addon/yarn/tests/dummy/config/environment.js deleted file mode 100644 index 9d3feec603..0000000000 --- a/tests/fixtures/module-unification-addon/yarn/tests/dummy/config/environment.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - -module.exports = function(environment) { - let ENV = { - 'ember-resolver': { - features: { - EMBER_RESOLVER_MODULE_UNIFICATION: true - } - }, - modulePrefix: 'dummy', - environment, - rootURL: '/', - locationType: 'auto', - EmberENV: { - FEATURES: { - // Here you can enable experimental features on an ember canary build - // e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true - EMBER_MODULE_UNIFICATION: true - }, - EXTEND_PROTOTYPES: { - // Prevent Ember Data from overriding Date.parse. - Date: false - } - }, - - APP: { - // Here you can pass flags/options to your application instance - // when it is created - } - }; - - if (environment === 'development') { - // ENV.APP.LOG_RESOLVER = true; - // ENV.APP.LOG_ACTIVE_GENERATION = true; - // ENV.APP.LOG_TRANSITIONS = true; - // ENV.APP.LOG_TRANSITIONS_INTERNAL = true; - // ENV.APP.LOG_VIEW_LOOKUPS = true; - } - - if (environment === 'test') { - // Testem prefers this... - ENV.locationType = 'none'; - - // keep test console output quieter - ENV.APP.LOG_ACTIVE_GENERATION = false; - ENV.APP.LOG_VIEW_LOOKUPS = false; - - ENV.APP.rootElement = '#ember-testing'; - } - - if (environment === 'production') { - // here you can enable a production-specific feature - } - - return ENV; -}; diff --git a/tests/fixtures/module-unification-addon/yarn/tests/dummy/config/optional-features.json b/tests/fixtures/module-unification-addon/yarn/tests/dummy/config/optional-features.json deleted file mode 100644 index b1902623ae..0000000000 --- a/tests/fixtures/module-unification-addon/yarn/tests/dummy/config/optional-features.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "jquery-integration": false -} diff --git a/tests/fixtures/module-unification-addon/yarn/tests/dummy/config/targets.js b/tests/fixtures/module-unification-addon/yarn/tests/dummy/config/targets.js deleted file mode 100644 index 1a7647d06b..0000000000 --- a/tests/fixtures/module-unification-addon/yarn/tests/dummy/config/targets.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - browsers: [ - 'ie 11', - 'last 1 Chrome versions', - 'last 1 Firefox versions', - 'last 1 Safari versions' - ] -}; diff --git a/tests/fixtures/module-unification-addon/yarn/tests/dummy/public/robots.txt b/tests/fixtures/module-unification-addon/yarn/tests/dummy/public/robots.txt deleted file mode 100644 index f5916452e5..0000000000 --- a/tests/fixtures/module-unification-addon/yarn/tests/dummy/public/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# http://www.robotstxt.org -User-agent: * -Disallow: diff --git a/tests/fixtures/module-unification-addon/yarn/tests/dummy/src/main.js b/tests/fixtures/module-unification-addon/yarn/tests/dummy/src/main.js deleted file mode 100644 index 84b092ff19..0000000000 --- a/tests/fixtures/module-unification-addon/yarn/tests/dummy/src/main.js +++ /dev/null @@ -1,19 +0,0 @@ -import Application from "@ember/application"; -import Resolver from "./resolver"; -import loadInitializers from "ember-load-initializers"; -import config from "../config/environment"; - -const App = Application.extend({ - modulePrefix: config.modulePrefix, - podModulePrefix: config.podModulePrefix, - Resolver -}); - -loadInitializers(App, config.modulePrefix + "/src/init"); - -/* - * This line is added to support initializers in the `app/` directory - */ -loadInitializers(App, config.modulePrefix); - -export default App; diff --git a/tests/fixtures/module-unification-addon/yarn/tests/dummy/src/resolver.js b/tests/fixtures/module-unification-addon/yarn/tests/dummy/src/resolver.js deleted file mode 100644 index f0b8a1ccea..0000000000 --- a/tests/fixtures/module-unification-addon/yarn/tests/dummy/src/resolver.js +++ /dev/null @@ -1,13 +0,0 @@ -import Resolver from 'ember-resolver/resolvers/fallback'; -import buildResolverConfig from 'ember-resolver/ember-config'; -import config from '../config/environment'; - -let moduleConfig = buildResolverConfig(config.modulePrefix); -/* - * If your application has custom types and collections, modify moduleConfig here - * to add support for them. - */ - -export default Resolver.extend({ - config: moduleConfig -}); diff --git a/tests/fixtures/module-unification-addon/yarn/tests/dummy/src/router.js b/tests/fixtures/module-unification-addon/yarn/tests/dummy/src/router.js deleted file mode 100644 index 7f2298b0dc..0000000000 --- a/tests/fixtures/module-unification-addon/yarn/tests/dummy/src/router.js +++ /dev/null @@ -1,11 +0,0 @@ -import EmberRouter from "@ember/routing/router"; -import config from "../config/environment"; - -const Router = EmberRouter.extend({ - location: config.locationType, - rootURL: config.rootURL -}); - -Router.map(function() {}); - -export default Router; diff --git a/tests/fixtures/module-unification-addon/yarn/tests/dummy/src/ui/components/.gitkeep b/tests/fixtures/module-unification-addon/yarn/tests/dummy/src/ui/components/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/fixtures/module-unification-addon/yarn/tests/dummy/src/ui/index.html b/tests/fixtures/module-unification-addon/yarn/tests/dummy/src/ui/index.html deleted file mode 100644 index e4e6c5d6e9..0000000000 --- a/tests/fixtures/module-unification-addon/yarn/tests/dummy/src/ui/index.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - dummy - - - - {{content-for "head"}} - - - - - {{content-for "head-footer"}} - - - {{content-for "body"}} - - - - - {{content-for "body-footer"}} - - diff --git a/tests/fixtures/module-unification-addon/yarn/tests/dummy/src/ui/routes/application/template.hbs b/tests/fixtures/module-unification-addon/yarn/tests/dummy/src/ui/routes/application/template.hbs deleted file mode 100644 index 7b1b1040fe..0000000000 --- a/tests/fixtures/module-unification-addon/yarn/tests/dummy/src/ui/routes/application/template.hbs +++ /dev/null @@ -1,5 +0,0 @@ -{{!-- The following component displays Ember's default welcome message. --}} - -{{!-- Feel free to remove this! --}} - -{{outlet}} \ No newline at end of file diff --git a/tests/fixtures/module-unification-addon/yarn/tests/dummy/src/ui/styles/app.css b/tests/fixtures/module-unification-addon/yarn/tests/dummy/src/ui/styles/app.css deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/fixtures/module-unification-addon/yarn/tests/index.html b/tests/fixtures/module-unification-addon/yarn/tests/index.html deleted file mode 100644 index 5209b85232..0000000000 --- a/tests/fixtures/module-unification-addon/yarn/tests/index.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - Dummy Tests - - - - {{content-for "head"}} - {{content-for "test-head"}} - - - - - - {{content-for "head-footer"}} - {{content-for "test-head-footer"}} - - - {{content-for "body"}} - {{content-for "test-body"}} - - - - - - - - {{content-for "body-footer"}} - {{content-for "test-body-footer"}} - - diff --git a/tests/fixtures/module-unification-addon/yarn/tests/test-helper.js b/tests/fixtures/module-unification-addon/yarn/tests/test-helper.js deleted file mode 100644 index 007bd6e506..0000000000 --- a/tests/fixtures/module-unification-addon/yarn/tests/test-helper.js +++ /dev/null @@ -1,8 +0,0 @@ -import Application from '../src/main'; -import config from '../config/environment'; -import { setApplication } from '@ember/test-helpers'; -import { start } from 'ember-qunit'; - -setApplication(Application.create(config.APP)); - -start(); diff --git a/tests/fixtures/module-unification-addon/yarn/vendor/.gitkeep b/tests/fixtures/module-unification-addon/yarn/vendor/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/fixtures/module-unification-app/.eslintrc.js b/tests/fixtures/module-unification-app/.eslintrc.js deleted file mode 100644 index bb2c27ecb0..0000000000 --- a/tests/fixtures/module-unification-app/.eslintrc.js +++ /dev/null @@ -1,51 +0,0 @@ -module.exports = { - root: true, - parser: 'babel-eslint', - parserOptions: { - ecmaVersion: 2018, - sourceType: 'module' - }, - plugins: [ - 'ember' - ], - extends: [ - 'eslint:recommended', - 'plugin:ember/recommended' - ], - env: { - browser: true - }, - rules: { - 'ember/no-jquery': 'error' - }, - overrides: [ - // node files - { - files: [ - '.eslintrc.js', - '.template-lintrc.js', - 'ember-cli-build.js', - 'index.js', - 'testem.js', - 'blueprints/*/index.js', - 'config/**/*.js', - 'tests/dummy/config/**/*.js' - ], - parserOptions: { - sourceType: 'script' - }, - env: { - browser: false, - node: true - }, - plugins: ['node'], - rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, { - // add your custom rules and overrides for node files here - - // this can be removed once the following is fixed - // https://github.com/mysticatea/eslint-plugin-node/issues/77 - 'node/no-unpublished-require': 'off' - }) - } - ] -}; diff --git a/tests/fixtures/module-unification-app/npm/.travis.yml b/tests/fixtures/module-unification-app/npm/.travis.yml deleted file mode 100644 index 1fe0f1fca7..0000000000 --- a/tests/fixtures/module-unification-app/npm/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -language: node_js -node_js: - - "8" - -sudo: false -dist: trusty - -addons: - chrome: stable - -cache: - directories: - - $HOME/.npm - -env: - global: - # See https://git.io/vdao3 for details. - - JOBS=1 - -script: - - npm run lint:hbs - - npm run lint:js - - npm test diff --git a/tests/fixtures/module-unification-app/npm/README.md b/tests/fixtures/module-unification-app/npm/README.md deleted file mode 100644 index c81ac108ab..0000000000 --- a/tests/fixtures/module-unification-app/npm/README.md +++ /dev/null @@ -1,57 +0,0 @@ -# foo - -This README outlines the details of collaborating on this Ember application. -A short introduction of this app could easily go here. - -## Prerequisites - -You will need the following things properly installed on your computer. - -* [Git](https://git-scm.com/) -* [Node.js](https://nodejs.org/) (with npm) -* [Ember CLI](https://ember-cli.com/) -* [Google Chrome](https://google.com/chrome/) - -## Installation - -* `git clone ` this repository -* `cd foo` -* `npm install` - -## Running / Development - -* `ember serve` -* Visit your app at [http://localhost:4200](http://localhost:4200). -* Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests). - -### Code Generators - -Make use of the many generators for code, try `ember help generate` for more details - -### Running Tests - -* `ember test` -* `ember test --server` - -### Linting - -* `npm run lint:hbs` -* `npm run lint:js` -* `npm run lint:js -- --fix` - -### Building - -* `ember build` (development) -* `ember build --environment production` (production) - -### Deploying - -Specify what it takes to deploy your app. - -## Further Reading / Useful Links - -* [ember.js](https://emberjs.com/) -* [ember-cli](https://ember-cli.com/) -* Development Browser Extensions - * [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi) - * [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/) diff --git a/tests/fixtures/module-unification-app/npm/package.json b/tests/fixtures/module-unification-app/npm/package.json deleted file mode 100644 index 78f27f985c..0000000000 --- a/tests/fixtures/module-unification-app/npm/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "foo", - "version": "0.0.0", - "private": true, - "description": "Small description for foo goes here", - "repository": "", - "license": "MIT", - "author": "", - "directories": { - "doc": "doc", - "test": "tests" - }, - "scripts": { - "build": "ember build", - "lint:hbs": "ember-template-lint .", - "lint:js": "eslint .", - "start": "ember serve", - "test": "ember test" - }, - "devDependencies": { - "@ember/optional-features": "^0.7.0", - "babel-eslint": "^10.0.3", - "broccoli-asset-rev": "^3.0.0", - "ember-cli": "github:ember-cli/ember-cli", - "ember-cli-app-version": "^3.2.0", - "ember-cli-babel": "^7.11.0", - "ember-cli-dependency-checker": "^3.1.0", - "ember-cli-eslint": "^5.1.0", - "ember-cli-htmlbars": "^3.1.0", - "ember-cli-htmlbars-inline-precompile": "^3.0.0", - "ember-cli-inject-live-reload": "^2.0.1", - "ember-cli-sri": "^2.1.1", - "ember-cli-template-lint": "^1.0.0-beta.3", - "ember-cli-uglify": "^3.0.0", - "ember-data": "~3.13.0-beta.0", - "ember-export-application-global": "^2.0.0", - "ember-fetch": "^6.7.0", - "ember-load-initializers": "^2.1.0", - "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^4.5.1", - "ember-resolver": "^5.2.1", - "ember-source": "<%= emberCanaryVersion %>", - "eslint-plugin-ember": "^7.0.0", - "eslint-plugin-node": "^9.2.0", - "loader.js": "^4.7.0", - "qunit-dom": "^0.9.0" - }, - "engines": { - "node": "8.* || >= 10.*" - } -} diff --git a/tests/fixtures/module-unification-app/npm/src/ui/routes/application/template.hbs b/tests/fixtures/module-unification-app/npm/src/ui/routes/application/template.hbs deleted file mode 100644 index 5230580f82..0000000000 --- a/tests/fixtures/module-unification-app/npm/src/ui/routes/application/template.hbs +++ /dev/null @@ -1,3 +0,0 @@ -

Welcome to Ember

- -{{outlet}} \ No newline at end of file diff --git a/tests/fixtures/module-unification-app/yarn/.travis.yml b/tests/fixtures/module-unification-app/yarn/.travis.yml deleted file mode 100644 index e8232192cb..0000000000 --- a/tests/fixtures/module-unification-app/yarn/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ ---- -language: node_js -node_js: - - "8" - -sudo: false -dist: trusty - -addons: - chrome: stable - -cache: - yarn: true - -env: - global: - # See https://git.io/vdao3 for details. - - JOBS=1 - -before_install: - - curl -o- -L https://yarnpkg.com/install.sh | bash - - export PATH=$HOME/.yarn/bin:$PATH - -install: - - yarn install --non-interactive - -script: - - yarn lint:hbs - - yarn lint:js - - yarn test diff --git a/tests/fixtures/module-unification-app/yarn/README.md b/tests/fixtures/module-unification-app/yarn/README.md deleted file mode 100644 index cce6022935..0000000000 --- a/tests/fixtures/module-unification-app/yarn/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# foo - -This README outlines the details of collaborating on this Ember application. -A short introduction of this app could easily go here. - -## Prerequisites - -You will need the following things properly installed on your computer. - -* [Git](https://git-scm.com/) -* [Node.js](https://nodejs.org/) -* [Yarn](https://yarnpkg.com/) -* [Ember CLI](https://ember-cli.com/) -* [Google Chrome](https://google.com/chrome/) - -## Installation - -* `git clone ` this repository -* `cd foo` -* `yarn install` - -## Running / Development - -* `ember serve` -* Visit your app at [http://localhost:4200](http://localhost:4200). -* Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests). - -### Code Generators - -Make use of the many generators for code, try `ember help generate` for more details - -### Running Tests - -* `ember test` -* `ember test --server` - -### Linting - -* `yarn lint:hbs` -* `yarn lint:js` -* `yarn lint:js --fix` - -### Building - -* `ember build` (development) -* `ember build --environment production` (production) - -### Deploying - -Specify what it takes to deploy your app. - -## Further Reading / Useful Links - -* [ember.js](https://emberjs.com/) -* [ember-cli](https://ember-cli.com/) -* Development Browser Extensions - * [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi) - * [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/) diff --git a/tests/fixtures/module-unification-app/yarn/package.json b/tests/fixtures/module-unification-app/yarn/package.json deleted file mode 100644 index 551bb10096..0000000000 --- a/tests/fixtures/module-unification-app/yarn/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "foo", - "version": "0.0.0", - "private": true, - "description": "Small description for foo goes here", - "repository": "", - "license": "MIT", - "author": "", - "directories": { - "doc": "doc", - "test": "tests" - }, - "scripts": { - "build": "ember build", - "lint:hbs": "ember-template-lint .", - "lint:js": "eslint .", - "start": "ember serve", - "test": "ember test" - }, - "devDependencies": { - "@ember/optional-features": "^0.7.0", - "babel-eslint": "^10.0.3", - "broccoli-asset-rev": "^3.0.0", - "ember-cli": "github:ember-cli/ember-cli", - "ember-cli-app-version": "^3.2.0", - "ember-cli-babel": "^7.11.0", - "ember-cli-dependency-checker": "^3.1.0", - "ember-cli-eslint": "^5.1.0", - "ember-cli-htmlbars": "^3.1.0", - "ember-cli-htmlbars-inline-precompile": "^3.0.0", - "ember-cli-inject-live-reload": "^2.0.1", - "ember-cli-sri": "^2.1.1", - "ember-cli-template-lint": "^1.0.0-beta.3", - "ember-cli-uglify": "^3.0.0", - "ember-data": "~3.13.0-beta.0", - "ember-export-application-global": "^2.0.0", - "ember-fetch": "^6.7.0", - "ember-load-initializers": "^2.1.0", - "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^4.5.1", - "ember-resolver": "^5.2.1", - "ember-source": "<%= emberCanaryVersion %>", - "ember-welcome-page": "^4.0.0", - "eslint-plugin-ember": "^7.0.0", - "eslint-plugin-node": "^9.2.0", - "loader.js": "^4.7.0", - "qunit-dom": "^0.9.0" - }, - "engines": { - "node": "8.* || >= 10.*" - } -} diff --git a/tests/fixtures/module-unification-app/yarn/src/ui/routes/application/template.hbs b/tests/fixtures/module-unification-app/yarn/src/ui/routes/application/template.hbs deleted file mode 100644 index 7b1b1040fe..0000000000 --- a/tests/fixtures/module-unification-app/yarn/src/ui/routes/application/template.hbs +++ /dev/null @@ -1,5 +0,0 @@ -{{!-- The following component displays Ember's default welcome message. --}} - -{{!-- Feel free to remove this! --}} - -{{outlet}} \ No newline at end of file diff --git a/tests/fixtures/with-styles-mu/src/ui/styles/app.css b/tests/fixtures/with-styles-mu/src/ui/styles/app.css deleted file mode 100644 index 5540de6636..0000000000 --- a/tests/fixtures/with-styles-mu/src/ui/styles/app.css +++ /dev/null @@ -1,2 +0,0 @@ -@import "some-styles.css"; -@import "some-other-styles.css"; diff --git a/tests/fixtures/with-styles-mu/src/ui/styles/some-other-styles.css b/tests/fixtures/with-styles-mu/src/ui/styles/some-other-styles.css deleted file mode 100644 index 19840f92e3..0000000000 --- a/tests/fixtures/with-styles-mu/src/ui/styles/some-other-styles.css +++ /dev/null @@ -1 +0,0 @@ -.some-even-weirder-selector{cursor: crosshair;} diff --git a/tests/fixtures/with-styles-mu/src/ui/styles/some-styles.css b/tests/fixtures/with-styles-mu/src/ui/styles/some-styles.css deleted file mode 100644 index ac8323bcba..0000000000 --- a/tests/fixtures/with-styles-mu/src/ui/styles/some-styles.css +++ /dev/null @@ -1 +0,0 @@ -.some-weird-selector{cursor: crosshair;} diff --git a/tests/fixtures/with-unminified-styles-mu/src/ui/styles/app.css b/tests/fixtures/with-unminified-styles-mu/src/ui/styles/app.css deleted file mode 100644 index b2cd1ce731..0000000000 --- a/tests/fixtures/with-unminified-styles-mu/src/ui/styles/app.css +++ /dev/null @@ -1,18 +0,0 @@ -html { - line-height: 1.15; - -webkit-text-size-adjust: 100%; -} - -body { - margin: 0; -} - -h1 { - font-size: 2em; -} - -hr { - box-sizing: content-box; - height: 0; - overflow: visible; -} From a7fc05733e54fb88d4b4cb6721866d7588120a98 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Thu, 26 Sep 2019 16:28:33 -0400 Subject: [PATCH 059/818] Ensure ember-template-lint uses octane preset. Main list of changes in the octane preset from `recommended`: Add --- * no-abstract-roles * no-action-modifiers * no-curly-component-invocation * no-element-event-actions * no-extra-mut-helper-argument * no-implicit-this * no-obsolete-elements * no-positive-tabindex * no-unnecessary-component-helper * require-iframe-title * require-valid-alt-text Remove ------ * block-indentation * img-alt-attributes * linebreak-style * no-unnecessary-concat * quotes * self-closing-void-elements Change Default Config --------------------- * link-rel-noopener -> `strict` config --- blueprints/app/files/.template-lintrc.js | 2 +- .../kitchen-sink/tests/dummy/app/templates/application.hbs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/blueprints/app/files/.template-lintrc.js b/blueprints/app/files/.template-lintrc.js index b45e96ffdd..f387370010 100644 --- a/blueprints/app/files/.template-lintrc.js +++ b/blueprints/app/files/.template-lintrc.js @@ -1,5 +1,5 @@ 'use strict'; module.exports = { - extends: 'recommended' + extends: 'octane' }; diff --git a/tests/fixtures/addon/kitchen-sink/tests/dummy/app/templates/application.hbs b/tests/fixtures/addon/kitchen-sink/tests/dummy/app/templates/application.hbs index 885261e680..50b5fd9f4e 100644 --- a/tests/fixtures/addon/kitchen-sink/tests/dummy/app/templates/application.hbs +++ b/tests/fixtures/addon/kitchen-sink/tests/dummy/app/templates/application.hbs @@ -1,2 +1,2 @@ -{{#basic-thing}}WOOT!!{{/basic-thing}} -{{#second-thing}}SECOND!!{{/second-thing}} +WOOT!! +SECOND!! From 7d911c6cd9f396bc4edd0f34be9ff022c2713bbc Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 27 Sep 2019 09:33:53 -0400 Subject: [PATCH 060/818] Add @glimmer/component to app/addon blueprints. --- blueprints/app/files/package.json | 1 + tests/fixtures/addon/npm/package.json | 1 + tests/fixtures/addon/yarn/package.json | 1 + tests/fixtures/app/npm/package.json | 1 + tests/fixtures/app/yarn/package.json | 1 + 5 files changed, 5 insertions(+) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 21435b2bf5..787cccf989 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -20,6 +20,7 @@ "devDependencies": { "@ember/edition-utils": "^1.1.1", "@ember/optional-features": "^1.0.0", + "@glimmer/component": "^0.14.0-alpha.13", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", "ember-cli": "~<%= emberCLIVersion %>", diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index 3244e5db48..6e0ac65cfb 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -27,6 +27,7 @@ "devDependencies": { "@ember/edition-utils": "^1.1.1", "@ember/optional-features": "^1.0.0", + "@glimmer/component": "^0.14.0-alpha.13", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", "ember-cli": "~<%= emberCLIVersion %>", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 5f8d3ad46a..6efbbdb2e3 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -27,6 +27,7 @@ "devDependencies": { "@ember/edition-utils": "^1.1.1", "@ember/optional-features": "^1.0.0", + "@glimmer/component": "^0.14.0-alpha.13", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", "ember-cli": "~<%= emberCLIVersion %>", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 7b73d3fa07..afb60dafee 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -20,6 +20,7 @@ "devDependencies": { "@ember/edition-utils": "^1.1.1", "@ember/optional-features": "^1.0.0", + "@glimmer/component": "^0.14.0-alpha.13", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", "ember-cli": "~<%= emberCLIVersion %>", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 774dc41ae2..2ddbd72ebd 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -20,6 +20,7 @@ "devDependencies": { "@ember/edition-utils": "^1.1.1", "@ember/optional-features": "^1.0.0", + "@glimmer/component": "^0.14.0-alpha.13", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", "ember-cli": "~<%= emberCLIVersion %>", From 72e6ae0e24e5aacdaab209f1418649a63f2d2332 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 27 Sep 2019 17:00:26 -0400 Subject: [PATCH 061/818] Add v3.14.0-beta.2 to CHANGELOG.md. --- CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3406b1ea91..3cebc75976 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # ember-cli Changelog + +## v3.14.0-beta.2 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.14.0-beta.1...v3.14.0-beta.2) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.14.0-beta.1...v3.14.0-beta.2) + + +- [#8853](https://github.com/ember-cli/ember-cli/pull/8853) Update ember-resolver to 5.3.0. [@rwjblue](https://github.com/rwjblue) +- [#8861](https://github.com/ember-cli/ember-cli/pull/8861) Octane related tweaks (add `@glimmer/component`, use ember-template-lint's `octane` preset) [@rwjblue](https://github.com/rwjblue) + +Thank you to all who took the time to contribute! + ## v3.14.0-beta.1 #### Blueprint Changes From f97ac7e1672b746f1304245ad71dc6d079591c6d Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 27 Sep 2019 17:00:53 -0400 Subject: [PATCH 062/818] Release v3.14.0-beta.2. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0c8f93724e..dcb3f6f7ad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.14.0-beta.1", + "version": "3.14.0-beta.2", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From f3fbf1d96b28aeeb480b5a0320d1e39acb6b904f Mon Sep 17 00:00:00 2001 From: Eric Kelly Date: Sat, 5 Oct 2019 10:40:20 -0700 Subject: [PATCH 063/818] blueprints: Fix ember-cli-htmlbars-inline-precompile deprecation - Drops `ember-cli-htmlbars-inline-precompile` from both app and addon blueprints - Bumps `ember-cli-htmlbars` from [4.0.1](https://github.com/ember-cli/ember-cli-htmlbars/releases/tag/v4.0.1) to [4.0.5](https://github.com/ember-cli/ember-cli-htmlbars/releases/tag/v4.0.5) Why? Currently, generating a new ember app or addon and running it will result in the following deprecation: ``` DEPRECATION: ember-cli-htmlbars-inline-precompile is no longer needed with ember-cli-htmlbars versions 4.0.0 and higher, please remove it from `/Users/eric/code/foo/package.json` ``` See https://github.com/ember-cli/ember-cli-htmlbars/pull/317 for more details. Steps to reproduce the current issue: ```bash npm install -g ember-cli ember new foo-app cd foo-app ember s ``` --- blueprints/app/files/package.json | 3 +-- tests/fixtures/addon/npm/package.json | 3 +-- tests/fixtures/addon/yarn/package.json | 3 +-- tests/fixtures/app/npm/package.json | 3 +-- tests/fixtures/app/yarn/package.json | 3 +-- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index d2ec6c4d9c..b9451ad8df 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -26,8 +26,7 @@ "ember-cli-babel": "^7.11.1", "ember-cli-dependency-checker": "^3.1.0", "ember-cli-eslint": "^5.1.0", - "ember-cli-htmlbars": "^4.0.0", - "ember-cli-htmlbars-inline-precompile": "^3.0.0", + "ember-cli-htmlbars": "^4.0.5", "ember-cli-inject-live-reload": "^2.0.1", "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index 58e43045f3..24ab9c13ce 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "ember-cli-babel": "^7.11.1", - "ember-cli-htmlbars": "^4.0.0" + "ember-cli-htmlbars": "^4.0.5" }, "devDependencies": { "@ember/optional-features": "^1.0.0", @@ -31,7 +31,6 @@ "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-dependency-checker": "^3.1.0", "ember-cli-eslint": "^5.1.0", - "ember-cli-htmlbars-inline-precompile": "^3.0.0", "ember-cli-inject-live-reload": "^2.0.1", "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 1228d436b5..30d4491131 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "ember-cli-babel": "^7.11.1", - "ember-cli-htmlbars": "^4.0.0" + "ember-cli-htmlbars": "^4.0.5" }, "devDependencies": { "@ember/optional-features": "^1.0.0", @@ -31,7 +31,6 @@ "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-dependency-checker": "^3.1.0", "ember-cli-eslint": "^5.1.0", - "ember-cli-htmlbars-inline-precompile": "^3.0.0", "ember-cli-inject-live-reload": "^2.0.1", "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 162ca5641f..1f67da5f8a 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -26,8 +26,7 @@ "ember-cli-babel": "^7.11.1", "ember-cli-dependency-checker": "^3.1.0", "ember-cli-eslint": "^5.1.0", - "ember-cli-htmlbars": "^4.0.0", - "ember-cli-htmlbars-inline-precompile": "^3.0.0", + "ember-cli-htmlbars": "^4.0.5", "ember-cli-inject-live-reload": "^2.0.1", "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 63686d491a..aa3dd5f719 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -26,8 +26,7 @@ "ember-cli-babel": "^7.11.1", "ember-cli-dependency-checker": "^3.1.0", "ember-cli-eslint": "^5.1.0", - "ember-cli-htmlbars": "^4.0.0", - "ember-cli-htmlbars-inline-precompile": "^3.0.0", + "ember-cli-htmlbars": "^4.0.5", "ember-cli-inject-live-reload": "^2.0.1", "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", From ea1a067e3549aaa49fa7c3d76baea00fa6a46ded Mon Sep 17 00:00:00 2001 From: Panman8201 Date: Thu, 3 Oct 2019 11:35:24 -0500 Subject: [PATCH 064/818] Sync app and addon blueprint from octane blueprints Diff'ed the output between the ember-cli addon blueprint with the octane addon blueprint. Only found a few slight differences, included in this commit. --- blueprints/addon/files/npmignore | 2 +- blueprints/app/files/.ember-cli.js | 2 ++ blueprints/app/files/app/app.js | 12 +++++------- blueprints/app/files/app/router.js | 10 ++++------ blueprints/app/files/package.json | 1 + tests/fixtures/addon/npm/package.json | 1 + tests/fixtures/addon/yarn/package.json | 1 + tests/fixtures/app/npm/package.json | 1 + tests/fixtures/app/yarn/package.json | 1 + .../pods-with-prefix-templates/app/app.js | 12 +++++------- tests/fixtures/brocfile-tests/query/app/app.js | 12 +++++------- 11 files changed, 27 insertions(+), 28 deletions(-) diff --git a/blueprints/addon/files/npmignore b/blueprints/addon/files/npmignore index bd09adff92..81cd0a6337 100644 --- a/blueprints/addon/files/npmignore +++ b/blueprints/addon/files/npmignore @@ -8,7 +8,7 @@ # misc /.bowerrc /.editorconfig -/.ember-cli +/.ember-cli.js /.env* /.eslintignore /.eslintrc.js diff --git a/blueprints/app/files/.ember-cli.js b/blueprints/app/files/.ember-cli.js index 5e5e1489aa..6be591bcd6 100644 --- a/blueprints/app/files/.ember-cli.js +++ b/blueprints/app/files/.ember-cli.js @@ -1,3 +1,5 @@ +'use strict'; + const { setEdition } = require('@ember/edition-utils'); setEdition('octane'); diff --git a/blueprints/app/files/app/app.js b/blueprints/app/files/app/app.js index b3b2bd677e..8df91db565 100644 --- a/blueprints/app/files/app/app.js +++ b/blueprints/app/files/app/app.js @@ -3,12 +3,10 @@ import Resolver from './resolver'; import loadInitializers from 'ember-load-initializers'; import config from './config/environment'; -const App = Application.extend({ - modulePrefix: config.modulePrefix, - podModulePrefix: config.podModulePrefix, - Resolver -}); +export default class App extends Application { + modulePrefix = config.modulePrefix; + podModulePrefix = config.podModulePrefix; + Resolver = Resolver; +} loadInitializers(App, config.modulePrefix); - -export default App; diff --git a/blueprints/app/files/app/router.js b/blueprints/app/files/app/router.js index d0bb00952f..224ca426a8 100644 --- a/blueprints/app/files/app/router.js +++ b/blueprints/app/files/app/router.js @@ -1,12 +1,10 @@ import EmberRouter from '@ember/routing/router'; import config from './config/environment'; -const Router = EmberRouter.extend({ - location: config.locationType, - rootURL: config.rootURL -}); +export default class Router extends EmberRouter { + location = config.locationType; + rootURL = config.rootURL; +} Router.map(function() { }); - -export default Router; diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 306d458374..ce6042bc07 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -23,6 +23,7 @@ "@glimmer/component": "^0.14.0-alpha.13", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", + "ember-auto-import": "^1.5.2", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^3.2.0", "ember-cli-babel": "^7.11.1", diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index ec6546e264..209727043f 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -30,6 +30,7 @@ "@glimmer/component": "^0.14.0-alpha.13", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", + "ember-auto-import": "^1.5.2", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-dependency-checker": "^3.1.0", "ember-cli-eslint": "^5.1.0", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index e241200ac7..0ddf3cb8f1 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -30,6 +30,7 @@ "@glimmer/component": "^0.14.0-alpha.13", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", + "ember-auto-import": "^1.5.2", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-dependency-checker": "^3.1.0", "ember-cli-eslint": "^5.1.0", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 9e47cb7ec9..815b857f8d 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -23,6 +23,7 @@ "@glimmer/component": "^0.14.0-alpha.13", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", + "ember-auto-import": "^1.5.2", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^3.2.0", "ember-cli-babel": "^7.11.1", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 5d019f2b72..5b6571a748 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -23,6 +23,7 @@ "@glimmer/component": "^0.14.0-alpha.13", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", + "ember-auto-import": "^1.5.2", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^3.2.0", "ember-cli-babel": "^7.11.1", diff --git a/tests/fixtures/brocfile-tests/pods-with-prefix-templates/app/app.js b/tests/fixtures/brocfile-tests/pods-with-prefix-templates/app/app.js index 886c8976c2..07328a0e65 100644 --- a/tests/fixtures/brocfile-tests/pods-with-prefix-templates/app/app.js +++ b/tests/fixtures/brocfile-tests/pods-with-prefix-templates/app/app.js @@ -2,12 +2,10 @@ import Application from '@ember/application'; import Resolver from 'ember-resolver'; import loadInitializers from 'ember-load-initializers'; -const App = Application.extend({ - modulePrefix: 'some-cool-app', - podModulePrefix: 'some-cool-app/pods', - Resolver: Resolver -}); +export default class App extends Application { + modulePrefix = 'some-cool-app'; + podModulePrefix = 'some-cool-app/pods'; + Resolver = Resolver; +} loadInitializers(App, 'some-cool-app'); - -export default App; diff --git a/tests/fixtures/brocfile-tests/query/app/app.js b/tests/fixtures/brocfile-tests/query/app/app.js index 0bf285d84d..9417e1509d 100644 --- a/tests/fixtures/brocfile-tests/query/app/app.js +++ b/tests/fixtures/brocfile-tests/query/app/app.js @@ -2,12 +2,10 @@ import Application from '@ember/application'; import Resolver from 'ember-resolver'; import loadInitializers from 'ember-load-initializers'; -const App = Application.extend({ - modulePrefix: 'query', - podModulePrefix: 'app/pods', - Resolver: Resolver -}); +export default class App extends Application { + modulePrefix = 'query'; + podModulePrefix = 'app/pods'; + Resolver = Resolver; +} loadInitializers(App, 'query'); - -export default App; From dda0bd510b7b8107f2bf917eff4396ebfd04a3ce Mon Sep 17 00:00:00 2001 From: Cyrille David Date: Wed, 9 Oct 2019 11:08:58 +0200 Subject: [PATCH 065/818] blueprints/init: Fix typo / simplify Get started --- lib/commands/init.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/commands/init.js b/lib/commands/init.js index 8e44e42b8f..dc47922494 100644 --- a/lib/commands/init.js +++ b/lib/commands/init.js @@ -112,7 +112,7 @@ module.exports = Command.extend({ this.ui.writeLine(''); this.ui.writeLine(prependEmoji('🎉', `Successfully created project ${chalk.yellow(projectName)}.`)); - this.ui.writeLine(prependEmoji('👉 ', 'We suggest you that you get started by typing:')); + this.ui.writeLine(prependEmoji('👉 ', 'Get started by typing:')); this.ui.writeLine(''); const command = `cd ${projectName}`; this.ui.writeLine(` ${chalk.gray('$')} ${chalk.cyan(command)}`); From 8a97b50ef04fee4bb60c5dade8d76f63e2e1ca2a Mon Sep 17 00:00:00 2001 From: "Quinn C. Hoyer" Date: Tue, 8 Oct 2019 14:20:40 -0800 Subject: [PATCH 066/818] Adds flag to throw for invalid addon locations This also surfaces the warning outside of the logger --- lib/models/package-info-cache/package-info.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/models/package-info-cache/package-info.js b/lib/models/package-info-cache/package-info.js index 148301b81b..b48de10eb1 100644 --- a/lib/models/package-info-cache/package-info.js +++ b/lib/models/package-info-cache/package-info.js @@ -346,21 +346,25 @@ class PackageInfo { if (invalidPackages.length > 0) { let typeName = this.project ? 'project' : 'addon'; - logger.info(''); - logger.info(`The 'package.json' file for the ${typeName} at ${this.realPath}`); + let msg = `The 'package.json' file for the ${typeName} at ${this.realPath}`; let relativePath; - if (invalidPackages.length === 1) { relativePath = path.relative(this.realPath, invalidPackages[0].realPath); - logger.info(` specifies an invalid, malformed or missing addon at relative path '${relativePath}'`); + msg = `${msg}\n specifies an invalid, malformed or missing addon at relative path '${relativePath}'`; } else { - logger.info(' specifies invalid, malformed or missing addons at relative paths'); + msg = `${msg}\n specifies invalid, malformed or missing addons at relative paths`; invalidPackages.forEach(packageInfo => { let relativePath = path.relative(this.realPath, packageInfo.realPath); - logger.info(` '${relativePath}'`); + msg = `${msg}\n '${relativePath}'`; }); } + + if (process.env.ERROR_ON_INVALID_ADDON) { + throw msg; + } else { + this.project.ui.writeWarnLine(msg); + } } } From f54b15c61646adaf5b415be8b3da468e2445d5e9 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2019 23:11:17 +0000 Subject: [PATCH 067/818] Bump portfinder from 1.0.23 to 1.0.25 Bumps [portfinder](https://github.com/indexzero/node-portfinder) from 1.0.23 to 1.0.25. - [Release notes](https://github.com/indexzero/node-portfinder/releases) - [Commits](https://github.com/indexzero/node-portfinder/compare/v1.0.23...v1.0.25) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 33 ++++++++++++++------------------- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index dcb3f6f7ad..8da1c85835 100644 --- a/package.json +++ b/package.json @@ -108,7 +108,7 @@ "nopt": "^3.0.6", "npm-package-arg": "^6.1.1", "p-defer": "^3.0.0", - "portfinder": "^1.0.23", + "portfinder": "^1.0.25", "promise-map-series": "^0.2.3", "promise.prototype.finally": "^3.1.1", "quick-temp": "^0.1.8", diff --git a/yarn.lock b/yarn.lock index 22c62755aa..b474bc23a4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -519,17 +519,12 @@ async-promise-queue@^1.0.3: async "^2.4.1" debug "^2.6.8" -async@^1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= - -async@^2.4.1: - version "2.6.2" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.2.tgz#18330ea7e6e313887f5d2f2a904bac6fe4dd5381" - integrity sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg== +async@^2.4.1, async@^2.6.2: + version "2.6.3" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" + integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== dependencies: - lodash "^4.17.11" + lodash "^4.17.14" async@~0.2.9: version "0.2.10" @@ -1694,7 +1689,7 @@ debug@2.6.9, debug@^2.1.0, debug@^2.1.1, debug@^2.1.3, debug@^2.2.0, debug@^2.3. dependencies: ms "2.0.0" -debug@3.2.6, debug@^3.0.1, debug@^3.1.0, debug@^3.2.6: +debug@3.2.6, debug@^3.0.1, debug@^3.1.0, debug@^3.1.1, debug@^3.2.6: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== @@ -4495,7 +4490,7 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1: +mkdirp@0.5.1, mkdirp@^0.5.0, mkdirp@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= @@ -5166,14 +5161,14 @@ pkg-up@^2.0.0: dependencies: find-up "^2.1.0" -portfinder@^1.0.23: - version "1.0.23" - resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.23.tgz#894db4bcc5daf02b6614517ce89cd21a38226b82" - integrity sha512-B729mL/uLklxtxuiJKfQ84WPxNw5a7Yhx3geQZdcA4GjNjZSTSSMMWyoennMVnTWSmAR0lMdzWYN0JLnHrg1KQ== +portfinder@^1.0.25: + version "1.0.25" + resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.25.tgz#254fd337ffba869f4b9d37edc298059cb4d35eca" + integrity sha512-6ElJnHBbxVA1XSLgBp7G1FiCkQdlqGzuF7DswL5tcea+E8UpuvPU7beVAjjRwCioTS9ZluNbu+ZyRvgTsmqEBg== dependencies: - async "^1.5.2" - debug "^2.2.0" - mkdirp "0.5.x" + async "^2.6.2" + debug "^3.1.1" + mkdirp "^0.5.1" posix-character-classes@^0.1.0: version "0.1.1" From 7741c96347a3ab58bc2f3b5f2db35047fb456ec5 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2019 22:58:22 +0000 Subject: [PATCH 068/818] Bump eslint-config-prettier from 6.3.0 to 6.4.0 Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.3.0 to 6.4.0. - [Release notes](https://github.com/prettier/eslint-config-prettier/releases) - [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-config-prettier/compare/v6.3.0...v6.4.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 8da1c85835..239abd8a73 100644 --- a/package.json +++ b/package.json @@ -141,7 +141,7 @@ "ember-cli-blueprint-test-helpers": "^0.19.2", "ember-cli-internal-test-helpers": "^0.9.1", "eslint": "^5.16.0", - "eslint-config-prettier": "^6.3.0", + "eslint-config-prettier": "^6.4.0", "eslint-plugin-chai-expect": "^2.0.1", "eslint-plugin-mocha": "^6.1.1", "eslint-plugin-node": "^10.0.0", diff --git a/yarn.lock b/yarn.lock index b474bc23a4..5391f3f9c8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2073,10 +2073,10 @@ escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1 resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= -eslint-config-prettier@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.3.0.tgz#e73b48e59dc49d950843f3eb96d519e2248286a3" - integrity sha512-EWaGjlDAZRzVFveh2Jsglcere2KK5CJBhkNSa1xs3KfMUGdRiT7lG089eqPdvlzWHpAqaekubOsOMu8W8Yk71A== +eslint-config-prettier@^6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.4.0.tgz#0a04f147e31d33c6c161b2dd0971418ac52d0477" + integrity sha512-YrKucoFdc7SEko5Sxe4r6ixqXPDP1tunGw91POeZTTRKItf/AMFYt/YLEQtZMkR2LVpAVhcAcZgcWpm1oGPW7w== dependencies: get-stdin "^6.0.0" From 0cead0daf24a94b9235b92121b3e936354135be7 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2019 00:28:08 +0000 Subject: [PATCH 069/818] Bump mocha from 6.2.0 to 6.2.1 Bumps [mocha](https://github.com/mochajs/mocha) from 6.2.0 to 6.2.1. - [Release notes](https://github.com/mochajs/mocha/releases) - [Changelog](https://github.com/mochajs/mocha/blob/v6.2.1/CHANGELOG.md) - [Commits](https://github.com/mochajs/mocha/compare/v6.2.0...v6.2.1) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 179 +++++++-------------------------------------------- 2 files changed, 25 insertions(+), 156 deletions(-) diff --git a/package.json b/package.json index 239abd8a73..3d452a33ab 100644 --- a/package.json +++ b/package.json @@ -148,7 +148,7 @@ "eslint-plugin-prettier": "^3.1.1", "fixturify": "^1.2.0", "fixturify-project": "^1.9.1", - "mocha": "^6.2.0", + "mocha": "^6.2.1", "nock": "^11.3.5", "nyc": "^14.1.0", "prettier": "1.17.0", diff --git a/yarn.lock b/yarn.lock index 5391f3f9c8..a1eb6fa3d7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1373,15 +1373,6 @@ cli-width@^2.0.0: resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= -cliui@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" - integrity sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ== - dependencies: - string-width "^2.1.1" - strip-ansi "^4.0.0" - wrap-ansi "^2.0.0" - cliui@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" @@ -2791,11 +2782,6 @@ gauge@~2.7.3: strip-ansi "^3.0.1" wide-align "^1.1.0" -get-caller-file@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" - integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== - get-caller-file@^2.0.1, get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" @@ -3272,11 +3258,6 @@ into-stream@^3.1.0: from2 "^2.1.1" p-is-promise "^1.1.0" -invert-kv@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" - integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== - ip-regex@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" @@ -3728,13 +3709,6 @@ klaw@^1.0.0: optionalDependencies: graceful-fs "^4.1.9" -lcid@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" - integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA== - dependencies: - invert-kv "^2.0.0" - leek@0.0.24: version "0.0.24" resolved "https://registry.yarnpkg.com/leek/-/leek-0.0.24.tgz#e400e57f0e60d8ef2bd4d068dc428a54345dbcda" @@ -4245,13 +4219,6 @@ makeerror@1.0.x: dependencies: tmpl "1.0.x" -map-age-cleaner@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" - integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== - dependencies: - p-defer "^1.0.0" - map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" @@ -4338,15 +4305,6 @@ media-typer@0.3.0: resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= -mem@^4.0.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" - integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w== - dependencies: - map-age-cleaner "^0.1.1" - mimic-fn "^2.0.0" - p-is-promise "^2.0.0" - memory-streams@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/memory-streams/-/memory-streams-0.1.3.tgz#d9b0017b4b87f1d92f55f2745c9caacb1dc93ceb" @@ -4442,11 +4400,6 @@ mimic-fn@^1.0.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== -mimic-fn@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - mimic-response@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" @@ -4502,10 +4455,10 @@ mktemp@~0.4.0: resolved "https://registry.yarnpkg.com/mktemp/-/mktemp-0.4.0.tgz#6d0515611c8a8c84e484aa2000129b98e981ff0b" integrity sha1-bQUVYRyKjITkhKogABKbmOmB/ws= -mocha@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-6.2.0.tgz#f896b642843445d1bb8bca60eabd9206b8916e56" - integrity sha512-qwfFgY+7EKAAUAdv7VYMZQknI7YJSGesxHyhn6qD52DV8UcSZs5XwCifcZGMVIE4a5fbmhvbotxC0DLQ0oKohQ== +mocha@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-6.2.1.tgz#da941c99437da9bac412097859ff99543969f94c" + integrity sha512-VCcWkLHwk79NYQc8cxhkmI8IigTIhsCwZ6RTxQsqK6go4UvEhzJkYuHm8B2YtlSxcYq2fY+ucr4JBwoD6ci80A== dependencies: ansi-colors "3.2.3" browser-stdout "1.3.1" @@ -4527,9 +4480,9 @@ mocha@^6.2.0: supports-color "6.0.0" which "1.3.1" wide-align "1.1.3" - yargs "13.2.2" - yargs-parser "13.0.0" - yargs-unparser "1.5.0" + yargs "13.3.0" + yargs-parser "13.1.1" + yargs-unparser "1.6.0" morgan@^1.9.1: version "1.9.1" @@ -4895,15 +4848,6 @@ os-homedir@^1.0.0, os-homedir@^1.0.1: resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= -os-locale@^3.0.0, os-locale@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" - integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== - dependencies: - execa "^1.0.0" - lcid "^2.0.0" - mem "^4.0.0" - os-name@^3.0.0, os-name@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/os-name/-/os-name-3.1.0.tgz#dec19d966296e1cd62d701a5a66ee1ddeae70801" @@ -4930,11 +4874,6 @@ p-cancelable@^0.4.0: resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.4.1.tgz#35f363d67d52081c8d9585e37bcceb7e0bbcb2a0" integrity sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ== -p-defer@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" - integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= - p-defer@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-3.0.0.tgz#d1dceb4ee9b2b604b1d94ffec83760175d4e6f83" @@ -4950,11 +4889,6 @@ p-is-promise@^1.1.0: resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-1.1.0.tgz#9c9456989e9f6588017b0434d56097675c3da05e" integrity sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4= -p-is-promise@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" - integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== - p-limit@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" @@ -5461,11 +5395,6 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= -require-main-filename@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" - integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= - require-main-filename@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" @@ -5984,7 +5913,7 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: +"string-width@^1.0.2 || 2", string-width@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== @@ -6724,14 +6653,6 @@ workerpool@^3.1.1: object-assign "4.1.1" rsvp "^4.8.4" -wrap-ansi@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" - integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" @@ -6799,7 +6720,7 @@ xtend@^4.0.0, xtend@~4.0.0: resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= -"y18n@^3.2.1 || ^4.0.0", y18n@^4.0.0: +y18n@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== @@ -6827,90 +6748,38 @@ yam@^1.0.0: fs-extra "^4.0.2" lodash.merge "^4.6.0" -yargs-parser@13.0.0: - version "13.0.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.0.0.tgz#3fc44f3e76a8bdb1cc3602e860108602e5ccde8b" - integrity sha512-w2LXjoL8oRdRQN+hOyppuXs+V/fVAYtpcrRxZuF7Kt/Oc+Jr2uAcVntaUTNT6w5ihoWfFDpNY8CPx1QskxZ/pw== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - -yargs-parser@^11.1.1: - version "11.1.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-11.1.1.tgz#879a0865973bca9f6bab5cbdf3b1c67ec7d3bcf4" - integrity sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - -yargs-parser@^13.0.0, yargs-parser@^13.1.0: - version "13.1.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.0.tgz#7016b6dd03e28e1418a510e258be4bff5a31138f" - integrity sha512-Yq+32PrijHRri0vVKQEm+ys8mbqWjLiwQkMFNXEENutzLPP0bE4Lcd4iA3OQY5HF+GD3xXxf0MEHb8E4/SA3AA== +yargs-parser@13.1.1, yargs-parser@^13.0.0, yargs-parser@^13.1.1: + version "13.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.1.tgz#d26058532aa06d365fe091f6a1fc06b2f7e5eca0" + integrity sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ== dependencies: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-unparser@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.5.0.tgz#f2bb2a7e83cbc87bb95c8e572828a06c9add6e0d" - integrity sha512-HK25qidFTCVuj/D1VfNiEndpLIeJN78aqgR23nL3y4N0U/91cOAzqfHlF8n2BvoNDcZmJKin3ddNSvOxSr8flw== +yargs-unparser@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" + integrity sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw== dependencies: flat "^4.1.0" - lodash "^4.17.11" - yargs "^12.0.5" - -yargs@13.2.2: - version "13.2.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.2.2.tgz#0c101f580ae95cea7f39d927e7770e3fdc97f993" - integrity sha512-WyEoxgyTD3w5XRpAQNYUB9ycVH/PQrToaTXdYXRdOXvEy1l19br+VJsc0vcO8PTGg5ro/l/GY7F/JMEBmI0BxA== - dependencies: - cliui "^4.0.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - os-locale "^3.1.0" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^13.0.0" - -yargs@^12.0.5: - version "12.0.5" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" - integrity sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw== - dependencies: - cliui "^4.0.0" - decamelize "^1.2.0" - find-up "^3.0.0" - get-caller-file "^1.0.1" - os-locale "^3.0.0" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^2.0.0" - which-module "^2.0.0" - y18n "^3.2.1 || ^4.0.0" - yargs-parser "^11.1.1" + lodash "^4.17.15" + yargs "^13.3.0" -yargs@^13.2.2: - version "13.2.4" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.2.4.tgz#0b562b794016eb9651b98bd37acf364aa5d6dc83" - integrity sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg== +yargs@13.3.0, yargs@^13.2.2, yargs@^13.3.0: + version "13.3.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.0.tgz#4c657a55e07e5f2cf947f8a366567c04a0dedc83" + integrity sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA== dependencies: cliui "^5.0.0" find-up "^3.0.0" get-caller-file "^2.0.1" - os-locale "^3.1.0" require-directory "^2.1.1" require-main-filename "^2.0.0" set-blocking "^2.0.0" string-width "^3.0.0" which-module "^2.0.0" y18n "^4.0.0" - yargs-parser "^13.1.0" + yargs-parser "^13.1.1" yeast@0.1.2: version "0.1.2" From 0f12dde5f900f45a2bd0f32c25173ac60bcb23bb Mon Sep 17 00:00:00 2001 From: Quinn Hoyer Date: Thu, 17 Oct 2019 07:48:22 -0800 Subject: [PATCH 070/818] Update lib/models/package-info-cache/package-info.js Prepend EMBER_CLI_ to flag name Co-Authored-By: Robert Jackson --- lib/models/package-info-cache/package-info.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/models/package-info-cache/package-info.js b/lib/models/package-info-cache/package-info.js index b48de10eb1..d2c383ad3a 100644 --- a/lib/models/package-info-cache/package-info.js +++ b/lib/models/package-info-cache/package-info.js @@ -360,7 +360,7 @@ class PackageInfo { }); } - if (process.env.ERROR_ON_INVALID_ADDON) { + if (process.env.EMBER_CLI_ERROR_ON_INVALID_ADDON) { throw msg; } else { this.project.ui.writeWarnLine(msg); From 688894577824ebb5d29695b78dfcba95a0e80a7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Huchet?= Date: Tue, 22 Oct 2019 13:37:17 +0200 Subject: [PATCH 071/818] typo --- docs/node-support.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/node-support.md b/docs/node-support.md index a16ae28f2a..c2eb309e89 100644 --- a/docs/node-support.md +++ b/docs/node-support.md @@ -38,6 +38,6 @@ Node.js](https://github.com/nodejs/LTS#lts_schedule). ## Release Process and Support Policy Ember and Ember CLI have committed to supporting the [Node.js LTS schedule](https://github.com/nodejs/LTS#lts-schedule) -for the `HEAD` of our `master` branch(es). This means that we will will drop support +for the `HEAD` of our `master` branch(es). This means that we will drop support per the [Node.js Release Working Group](https://github.com/nodejs/Release)'s schedule without a major version bump/change of ember-cli itself. From 67c3cafd3ca9e8d09c05567f6a6e71c08bde79e8 Mon Sep 17 00:00:00 2001 From: Chris Garrett Date: Wed, 23 Oct 2019 09:25:14 -0700 Subject: [PATCH 072/818] [BUGFIX] Don't reload the config for instrumentation We currently will reload the config to setup instrumentation, which can happen multiple times while the CLI is running. This sometimes results in failures when the CLI generates new applications that haven't installed `node_modules` yet, and in other cases. We really only need to load the config once, so this PR changes it so that we do. --- lib/models/instrumentation.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/models/instrumentation.js b/lib/models/instrumentation.js index e5f96115e0..4e5b946c0a 100644 --- a/lib/models/instrumentation.js +++ b/lib/models/instrumentation.js @@ -3,6 +3,7 @@ const fs = require('fs-extra'); const chalk = require('chalk'); const heimdallGraph = require('heimdalljs-graph'); +const getConfig = require('../utilities/get-config'); const utilsInstrumentation = require('../utilities/instrumentation'); const logger = require('heimdalljs-logger')('ember-cli:instrumentation'); const hwinfo = require('./hardware-info'); @@ -76,6 +77,8 @@ class Instrumentation { this._heimdall = null; + this.config = getConfig(); + if (!options.initInstrumentation && this.isEnabled()) { this.instrumentations.init = { token: null, @@ -236,7 +239,7 @@ class Instrumentation { } start(name) { - if (!instrumentationEnabled()) { + if (!instrumentationEnabled(this.config)) { return; } @@ -255,7 +258,7 @@ class Instrumentation { } stopAndReport(name) { - if (!instrumentationEnabled()) { + if (!instrumentationEnabled(this.config)) { return; } @@ -332,7 +335,5 @@ function totalTime(tree) { // exported for testing Instrumentation._enableFSMonitorIfInstrumentationEnabled = _enableFSMonitorIfInstrumentationEnabled; -Instrumentation._vizEnabled = vizEnabled(); -Instrumentation._instrumentationEnabled = instrumentationEnabled(); module.exports = Instrumentation; From b97709989ec38b75f2df4be6621db71a8b9875ae Mon Sep 17 00:00:00 2001 From: Chris Garrett Date: Wed, 23 Oct 2019 13:42:19 -0700 Subject: [PATCH 073/818] [BUGFIX] Include legacyDecorators eslint option by default Ember supports the legacy decorators proposal, which originally placed the decorators _before_ the export keywords. However, eslint now throws errors if this is used, which is inline with the stage 2 spec that was rejected. This enables the legacyDecorators flag in eslint to allow decorator placement anywhere. --- blueprints/app/files/.eslintrc.js | 5 ++++- tests/fixtures/addon/.eslintrc.js | 5 ++++- tests/fixtures/app/.eslintrc.js | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/blueprints/app/files/.eslintrc.js b/blueprints/app/files/.eslintrc.js index 27a975d71e..50ca175691 100644 --- a/blueprints/app/files/.eslintrc.js +++ b/blueprints/app/files/.eslintrc.js @@ -3,7 +3,10 @@ module.exports = { parser: 'babel-eslint', parserOptions: { ecmaVersion: 2018, - sourceType: 'module' + sourceType: 'module', + ecmaFeatures: { + legacyDecorators: true + } }, plugins: [ 'ember' diff --git a/tests/fixtures/addon/.eslintrc.js b/tests/fixtures/addon/.eslintrc.js index ae411fb34e..ef47d42180 100644 --- a/tests/fixtures/addon/.eslintrc.js +++ b/tests/fixtures/addon/.eslintrc.js @@ -3,7 +3,10 @@ module.exports = { parser: 'babel-eslint', parserOptions: { ecmaVersion: 2018, - sourceType: 'module' + sourceType: 'module', + ecmaFeatures: { + legacyDecorators: true + } }, plugins: [ 'ember' diff --git a/tests/fixtures/app/.eslintrc.js b/tests/fixtures/app/.eslintrc.js index df7e0b0e95..4e27160747 100644 --- a/tests/fixtures/app/.eslintrc.js +++ b/tests/fixtures/app/.eslintrc.js @@ -3,7 +3,10 @@ module.exports = { parser: 'babel-eslint', parserOptions: { ecmaVersion: 2018, - sourceType: 'module' + sourceType: 'module', + ecmaFeatures: { + legacyDecorators: true + } }, plugins: [ 'ember' From ab80aa37c6b80066a12e25baaffdfcafac6477f0 Mon Sep 17 00:00:00 2001 From: Florian Pichler Date: Thu, 31 Oct 2019 12:45:35 +0100 Subject: [PATCH 074/818] Use production environment by default Output from `npm run build` should be optimized by default to make sure people deploy optimized versions of Ember. This ensures that even newcomers or people comparing frameworks will compare the optimized versions and not the development builds. It also ensures that builds on serverless services will be optimized out of the box. --- blueprints/app/files/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index ce6042bc07..8e6dc00a2a 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -11,7 +11,7 @@ "test": "tests" }, "scripts": { - "build": "ember build", + "build": "ember build --environment=production", "lint:hbs": "ember-template-lint .", "lint:js": "eslint .", "start": "ember serve", From 0a45497161cead73065944a810b3b07dfa0aa6e1 Mon Sep 17 00:00:00 2001 From: Godfrey Chan Date: Wed, 23 Oct 2019 15:59:40 -0700 Subject: [PATCH 075/818] [BUGFIX] Merge with existing `EmberENV` This allows Ember Inspector or other code in `index.html` before the vendor script tag to set values in `EmberENV`. --- lib/broccoli/vendor-prefix.js | 9 ++++++++- tests/acceptance/brocfile-smoke-test-slow.js | 2 +- .../broccoli/default-packager/ember-cli-internal-test.js | 4 +++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/broccoli/vendor-prefix.js b/lib/broccoli/vendor-prefix.js index ea8843249f..e5f80de603 100644 --- a/lib/broccoli/vendor-prefix.js +++ b/lib/broccoli/vendor-prefix.js @@ -1,4 +1,11 @@ -window.EmberENV = {{EMBER_ENV}}; +window.EmberENV = (function(EmberENV, extra) { + for (var key in extra) { + EmberENV[key] = extra[key]; + } + + return EmberENV; +})(window.EmberENV || {}, {{EMBER_ENV}}); + var runningTests = false; {{content-for 'vendor-prefix'}} diff --git a/tests/acceptance/brocfile-smoke-test-slow.js b/tests/acceptance/brocfile-smoke-test-slow.js index d4cb1f0cfb..1b465ae062 100644 --- a/tests/acceptance/brocfile-smoke-test-slow.js +++ b/tests/acceptance/brocfile-smoke-test-slow.js @@ -53,7 +53,7 @@ describe('Acceptance: brocfile-smoke-test', function() { // Changes in ember-optional-features 0.7.0 cause all defined values in optional-features.json // to end up in EmberENV. jquery-integration is explicitly defined for non MU apps - let expected = 'window.EmberENV = {"asdflkmawejf":";jlnu3yr23","_JQUERY_INTEGRATION":false};'; + let expected = '(window.EmberENV || {}, {"asdflkmawejf":";jlnu3yr23","_JQUERY_INTEGRATION":false});'; expect(vendorContents).to.contain(expected, 'EmberENV should be in assets/vendor.js'); }) ); diff --git a/tests/unit/broccoli/default-packager/ember-cli-internal-test.js b/tests/unit/broccoli/default-packager/ember-cli-internal-test.js index 5ca8c9bd08..8e5bfc549c 100644 --- a/tests/unit/broccoli/default-packager/ember-cli-internal-test.js +++ b/tests/unit/broccoli/default-packager/ember-cli-internal-test.js @@ -156,7 +156,9 @@ describe('Default Packager: Ember CLI Internal', function() { 'runningTests = true;\n\nif (window.Testem) {\n window.Testem.hookIntoTestFramework();\n}' ); - expect(vendorPrefixFileContent).to.contain('window.EmberENV = {};\nvar runningTests = false;'); + expect(vendorPrefixFileContent).to.contain( + 'window.EmberENV = (function(EmberENV, extra) {\n for (var key in extra) {\n EmberENV[key] = extra[key];\n }\n\n return EmberENV;\n})(window.EmberENV || {}, {});\n\nvar runningTests = false;' + ); expect(vendorSuffixFileContent).to.equal(''); }) ); From 609671f391623f84d488ccfbde96babc2d407967 Mon Sep 17 00:00:00 2001 From: Florian Pichler Date: Fri, 1 Nov 2019 22:18:56 +0100 Subject: [PATCH 076/818] Use env production in test fixtures as well --- tests/fixtures/addon/npm/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/npm/package.json | 2 +- tests/fixtures/app/yarn/package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index 209727043f..04353836ce 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -13,7 +13,7 @@ "test": "tests" }, "scripts": { - "build": "ember build", + "build": "ember build --environment=production", "lint:hbs": "ember-template-lint .", "lint:js": "eslint .", "start": "ember serve", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 0ddf3cb8f1..5e8e305590 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -13,7 +13,7 @@ "test": "tests" }, "scripts": { - "build": "ember build", + "build": "ember build --environment=production", "lint:hbs": "ember-template-lint .", "lint:js": "eslint .", "start": "ember serve", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 815b857f8d..0d5498e578 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -11,7 +11,7 @@ "test": "tests" }, "scripts": { - "build": "ember build", + "build": "ember build --environment=production", "lint:hbs": "ember-template-lint .", "lint:js": "eslint .", "start": "ember serve", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 5b6571a748..b5ca0157c5 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -11,7 +11,7 @@ "test": "tests" }, "scripts": { - "build": "ember build", + "build": "ember build --environment=production", "lint:hbs": "ember-template-lint .", "lint:js": "eslint .", "start": "ember serve", From 097ab41516eb112a09f7ebaaeeab18bf34884011 Mon Sep 17 00:00:00 2001 From: sparshithNR Date: Mon, 4 Nov 2019 17:56:55 -0800 Subject: [PATCH 077/818] Enable broccoli memoization by default in Ember-CLI --- .travis.yml | 1 - lib/experiments/index.js | 12 +++------ lib/models/server-watcher.js | 5 ---- lib/models/watcher.js | 35 +++++++------------------ package.json | 1 - tests/unit/models/watcher-test.js | 43 ++++++++++++------------------- yarn.lock | 11 -------- 7 files changed, 29 insertions(+), 79 deletions(-) diff --git a/.travis.yml b/.travis.yml index dd36e4a243..497e5ca9b8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -55,7 +55,6 @@ jobs: - env: EMBER_CLI_MODULE_UNIFICATION=true - env: EMBER_CLI_DELAYED_TRANSPILATION=true - env: EMBER_CLI_SYSTEM_TEMP=false - - env: EMBER_CLI_BROCCOLI_WATCHER=true - stage: deploy name: Publish API Docs diff --git a/lib/experiments/index.js b/lib/experiments/index.js index 84708df0fb..933625952b 100644 --- a/lib/experiments/index.js +++ b/lib/experiments/index.js @@ -1,15 +1,9 @@ 'use strict'; const chalk = require('chalk'); -const availableExperiments = Object.freeze([ - 'PACKAGER', - 'MODULE_UNIFICATION', - 'DELAYED_TRANSPILATION', - 'SYSTEM_TEMP', - 'BROCCOLI_WATCHER', -]); - -const deprecatedExperiments = Object.freeze(['MODULE_UNIFICATION']); +const availableExperiments = Object.freeze(['PACKAGER', 'MODULE_UNIFICATION', 'DELAYED_TRANSPILATION', 'SYSTEM_TEMP']); + +const deprecatedExperiments = Object.freeze(['MODULE_UNIFICATION', 'BROCCOLI_WATCHER']); const enabledExperiments = Object.freeze(['SYSTEM_TEMP']); const deprecatedExperimentsDeprecationsIssued = []; diff --git a/lib/models/server-watcher.js b/lib/models/server-watcher.js index ff5db350d0..fe53c2e945 100644 --- a/lib/models/server-watcher.js +++ b/lib/models/server-watcher.js @@ -10,11 +10,6 @@ module.exports = class ServerWatcher extends Watcher { this.watcher.on('delete', this.didDelete.bind(this)); } - // This branch can be removed once BROCCOLI_WATCHER is enabled by default - constructWatcher(options) { - return this.constructBroccoliWatcher(options); - } - constructBroccoliWatcher(options) { return new (require('sane'))(this.watchedDir, options); } diff --git a/lib/models/watcher.js b/lib/models/watcher.js index 9ce6bab773..dbdbf0305b 100644 --- a/lib/models/watcher.js +++ b/lib/models/watcher.js @@ -4,7 +4,6 @@ const chalk = require('chalk'); const logger = require('heimdalljs-logger')('ember-cli:watcher'); const CoreObject = require('core-object'); const serveURL = require('../utilities/get-serve-url'); -const { isExperimentEnabled } = require('../experiments'); const printSlowTrees = require('broccoli-slow-trees'); const promiseFinally = require('promise.prototype.finally'); @@ -26,26 +25,16 @@ module.exports = class Watcher extends CoreObject { this.serving = _options.serving; - if (isExperimentEnabled('BROCCOLI_WATCHER')) { - this.watcher = this.watcher || this.constructBroccoliWatcher(options); + this.watcher = this.watcher || this.constructBroccoliWatcher(options); - this.setupBroccoliChangeEvent(); - this.watcher.on('buildStart', this._setupBroccoliWatcherBuild.bind(this)); - this.watcher.on('buildSuccess', this.didChange.bind(this)); - } else { - // This branch can be removed once BROCCOLI_WATCHER is enabled by default - this.watcher = this.watcher || this.constructWatcher(options); - this.watcher.on('change', this.didChange.bind(this)); - } + this.setupBroccoliChangeEvent(); + this.watcher.on('buildStart', this._setupBroccoliWatcherBuild.bind(this)); + this.watcher.on('buildSuccess', this.didChange.bind(this)); this.watcher.on('error', this.didError.bind(this)); this.serveURL = serveURL; } - constructWatcher(options) { - return new (require('ember-cli-broccoli-sane-watcher'))(this.builder, options); - } - constructBroccoliWatcher(options) { const { Watcher } = require('broccoli'); const { watchedSourceNodeWrappers } = this.builder.builder; @@ -109,9 +98,7 @@ module.exports = class Watcher extends CoreObject { didChange(results) { logger.info('didChange %o', results); - if (isExperimentEnabled('BROCCOLI_WATCHER')) { - results.totalTime = this._totalTime(results); - } + results.totalTime = this._totalTime(results); let totalTime = results.totalTime / 1e6; let message = chalk.green(`Build successful (${Math.round(totalTime)}ms)`); @@ -141,7 +128,7 @@ module.exports = class Watcher extends CoreObject { value: Number(totalTime), }); - if (isExperimentEnabled('BROCCOLI_WATCHER') && this.verbose) { + if (this.verbose) { printSlowTrees(results.graph.__heimdall__); } } @@ -162,16 +149,12 @@ module.exports = class Watcher extends CoreObject { } then() { - if (isExperimentEnabled('BROCCOLI_WATCHER')) { - return this.watcher.currentBuild.then.apply(this.watcher.currentBuild, arguments); - } - - return this.watcher.then.apply(this.watcher, arguments); + return this.watcher.currentBuild.then.apply(this.watcher.currentBuild, arguments); } on() { const args = arguments; - if (isExperimentEnabled('BROCCOLI_WATCHER') && args[0] === 'change' && !this.watchedDir) { + if (args[0] === 'change' && !this.watchedDir) { args[0] = 'buildSuccess'; } this.watcher.on.apply(this.watcher, args); @@ -179,7 +162,7 @@ module.exports = class Watcher extends CoreObject { off() { const args = arguments; - if (isExperimentEnabled('BROCCOLI_WATCHER') && args[0] === 'change' && !this.watchedDir) { + if (args[0] === 'change' && !this.watchedDir) { args[0] = 'buildSuccess'; } this.watcher.off.apply(this.watcher, args); diff --git a/package.json b/package.json index 3d452a33ab..c664bbfffe 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,6 @@ "core-object": "^3.1.5", "dag-map": "^2.0.2", "diff": "^4.0.1", - "ember-cli-broccoli-sane-watcher": "^3.0.0", "ember-cli-is-package-missing": "^1.0.0", "ember-cli-lodash-subset": "^2.0.1", "ember-cli-normalize-entity-name": "^1.0.0", diff --git a/tests/unit/models/watcher-test.js b/tests/unit/models/watcher-test.js index e882d08d5c..3dcb08ca45 100644 --- a/tests/unit/models/watcher-test.js +++ b/tests/unit/models/watcher-test.js @@ -4,14 +4,11 @@ const expect = require('chai').expect; const MockUI = require('console-ui/mock'); const MockAnalytics = require('../../helpers/mock-analytics'); -const MockWatcher = require('../../helpers/mock-watcher'); const MockBroccoliWatcher = require('../../helpers/mock-broccoli-watcher'); const Watcher = require('../../../lib/models/watcher'); const EOL = require('os').EOL; const chalk = require('chalk'); const BuildError = require('../../helpers/build-error'); -const { isExperimentEnabled } = require('../../../lib/experiments'); -const buildEvent = isExperimentEnabled('BROCCOLI_WATCHER') ? 'buildSuccess' : 'change'; describe('Watcher', function() { let ui; @@ -42,11 +39,7 @@ describe('Watcher', function() { ui = new MockUI(); analytics = new MockAnalytics(); - if (isExperimentEnabled('BROCCOLI_WATCHER')) { - watcher = new MockBroccoliWatcher(); - } else { - watcher = new MockWatcher(); - } + watcher = new MockBroccoliWatcher(); subject = new Watcher({ ui, @@ -95,26 +88,24 @@ describe('Watcher', function() { }); }); - if (isExperimentEnabled('BROCCOLI_WATCHER')) { - describe('underlining watcher properly logs change events', function() { - it('logs that the file was added', function() { - watcher.emit('change', 'add', 'foo.txt'); - expect(ui.output).to.equal(`file added foo.txt${EOL}`); - }); - it('logs that the file was changed', function() { - watcher.emit('change', 'change', 'foo.txt'); - expect(ui.output).to.equal(`file changed foo.txt${EOL}`); - }); - it('logs that the file was deleted', function() { - watcher.emit('change', 'delete', 'foo.txt'); - expect(ui.output).to.equal(`file deleted foo.txt${EOL}`); - }); + describe('underlining watcher properly logs change events', function() { + it('logs that the file was added', function() { + watcher.emit('change', 'add', 'foo.txt'); + expect(ui.output).to.equal(`file added foo.txt${EOL}`); }); - } + it('logs that the file was changed', function() { + watcher.emit('change', 'change', 'foo.txt'); + expect(ui.output).to.equal(`file changed foo.txt${EOL}`); + }); + it('logs that the file was deleted', function() { + watcher.emit('change', 'delete', 'foo.txt'); + expect(ui.output).to.equal(`file deleted foo.txt${EOL}`); + }); + }); - describe(`watcher:${buildEvent}`, function() { + describe(`watcher:buildSuccess`, function() { beforeEach(function() { - watcher.emit(buildEvent, mockResult); + watcher.emit(`buildSuccess`, mockResult); }); it('tracks events', function() { @@ -386,7 +377,7 @@ describe('Watcher', function() { stack: new Error().stack, }); - watcher.emit(buildEvent, mockResult); + watcher.emit(`buildSuccess`, mockResult); }); it('log that the build was green', function() { diff --git a/yarn.lock b/yarn.lock index a1eb6fa3d7..b4ee85b329 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1878,17 +1878,6 @@ ember-cli-blueprint-test-helpers@^0.19.2: testdouble "^3.2.6" tmp-sync "^1.0.0" -ember-cli-broccoli-sane-watcher@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ember-cli-broccoli-sane-watcher/-/ember-cli-broccoli-sane-watcher-3.0.0.tgz#dc1812c047e1ceec4413d3c41b51a9ffc61b4cfe" - integrity sha512-sLn+wy6FJpGMHtSwAGUjQK3nJFvw2b6H8bR2EgMIXxkUI3DYFLi6Xnyxm02XlMTcfTxF10yHFhHJe0O+PcJM7A== - dependencies: - broccoli-slow-trees "^3.0.1" - heimdalljs "^0.2.1" - heimdalljs-logger "^0.1.7" - rsvp "^3.0.18" - sane "^4.0.0" - ember-cli-internal-test-helpers@^0.9.1: version "0.9.1" resolved "https://registry.yarnpkg.com/ember-cli-internal-test-helpers/-/ember-cli-internal-test-helpers-0.9.1.tgz#d54a9124bb6408ceba83f049ba8479f4b96cdd19" From 9d3b0ff67de53e37b31b97bceecf4fca955b0fc4 Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Wed, 6 Nov 2019 10:00:51 +0000 Subject: [PATCH 078/818] restrict app Travis to master and PRs --- blueprints/app/files/.travis.yml | 4 ++++ tests/fixtures/app/npm/.travis.yml | 4 ++++ tests/fixtures/app/yarn/.travis.yml | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/blueprints/app/files/.travis.yml b/blueprints/app/files/.travis.yml index 25dc4c779b..f85d65a78a 100644 --- a/blueprints/app/files/.travis.yml +++ b/blueprints/app/files/.travis.yml @@ -20,6 +20,10 @@ env: global: # See https://git.io/vdao3 for details. - JOBS=1 + +branches: + only: + - master <% if (yarn) { %> before_install: - curl -o- -L https://yarnpkg.com/install.sh | bash diff --git a/tests/fixtures/app/npm/.travis.yml b/tests/fixtures/app/npm/.travis.yml index 1fe0f1fca7..abc5c88606 100644 --- a/tests/fixtures/app/npm/.travis.yml +++ b/tests/fixtures/app/npm/.travis.yml @@ -18,6 +18,10 @@ env: # See https://git.io/vdao3 for details. - JOBS=1 +branches: + only: + - master + script: - npm run lint:hbs - npm run lint:js diff --git a/tests/fixtures/app/yarn/.travis.yml b/tests/fixtures/app/yarn/.travis.yml index e8232192cb..eaab6fbbad 100644 --- a/tests/fixtures/app/yarn/.travis.yml +++ b/tests/fixtures/app/yarn/.travis.yml @@ -17,6 +17,10 @@ env: # See https://git.io/vdao3 for details. - JOBS=1 +branches: + only: + - master + before_install: - curl -o- -L https://yarnpkg.com/install.sh | bash - export PATH=$HOME/.yarn/bin:$PATH From 80f2e31260bf35758f87151373758ec73fd01b1c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 7 Nov 2019 08:31:57 +0000 Subject: [PATCH 079/818] Bump @babel/core from 7.6.2 to 7.7.2 Bumps [@babel/core](https://github.com/babel/babel) from 7.6.2 to 7.7.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) - [Commits](https://github.com/babel/babel/compare/v7.6.2...v7.7.2) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 131 +++++++++++++++++++++++++++------------------------ 2 files changed, 70 insertions(+), 63 deletions(-) diff --git a/package.json b/package.json index c664bbfffe..25f40e7ef2 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "test:debug": "node debug tests/runner" }, "dependencies": { - "@babel/core": "^7.6.2", + "@babel/core": "^7.7.2", "@babel/plugin-transform-modules-amd": "^7.5.0", "amd-name-resolver": "^1.3.1", "babel-plugin-module-resolver": "^3.2.0", diff --git a/yarn.lock b/yarn.lock index b4ee85b329..96e4b88083 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,19 +9,19 @@ dependencies: "@babel/highlight" "^7.0.0" -"@babel/core@^7.3.3", "@babel/core@^7.3.4", "@babel/core@^7.6.2": - version "7.6.2" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.6.2.tgz#069a776e8d5e9eefff76236bc8845566bd31dd91" - integrity sha512-l8zto/fuoZIbncm+01p8zPSDZu/VuuJhAfA7d/AbzM09WR7iVhavvfNDYCNpo1VvLk6E6xgAoP9P+/EMJHuRkQ== +"@babel/core@^7.3.3", "@babel/core@^7.3.4", "@babel/core@^7.7.2": + version "7.7.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.7.2.tgz#ea5b99693bcfc058116f42fa1dd54da412b29d91" + integrity sha512-eeD7VEZKfhK1KUXGiyPFettgF3m513f8FoBSWiQ1xTvl1RAopLs42Wp9+Ze911I6H0N9lNqJMDgoZT7gHsipeQ== dependencies: "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.6.2" - "@babel/helpers" "^7.6.2" - "@babel/parser" "^7.6.2" - "@babel/template" "^7.6.0" - "@babel/traverse" "^7.6.2" - "@babel/types" "^7.6.0" - convert-source-map "^1.1.0" + "@babel/generator" "^7.7.2" + "@babel/helpers" "^7.7.0" + "@babel/parser" "^7.7.2" + "@babel/template" "^7.7.0" + "@babel/traverse" "^7.7.2" + "@babel/types" "^7.7.2" + convert-source-map "^1.7.0" debug "^4.1.0" json5 "^2.1.0" lodash "^4.17.13" @@ -29,31 +29,31 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.4.0", "@babel/generator@^7.6.2": - version "7.6.2" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.6.2.tgz#dac8a3c2df118334c2a29ff3446da1636a8f8c03" - integrity sha512-j8iHaIW4gGPnViaIHI7e9t/Hl8qLjERI6DcV9kEpAIDJsAOrcnXqRS7t+QbhL76pwbtqP+QCQLL0z1CyVmtjjQ== +"@babel/generator@^7.4.0", "@babel/generator@^7.7.2": + version "7.7.2" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.7.2.tgz#2f4852d04131a5e17ea4f6645488b5da66ebf3af" + integrity sha512-WthSArvAjYLz4TcbKOi88me+KmDJdKSlfwwN8CnUYn9jBkzhq0ZEPuBfkAWIvjJ3AdEV1Cf/+eSQTnp3IDJKlQ== dependencies: - "@babel/types" "^7.6.0" + "@babel/types" "^7.7.2" jsesc "^2.5.1" lodash "^4.17.13" source-map "^0.5.0" -"@babel/helper-function-name@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz#a0ceb01685f73355d4360c1247f582bfafc8ff53" - integrity sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw== +"@babel/helper-function-name@^7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.7.0.tgz#44a5ad151cfff8ed2599c91682dda2ec2c8430a3" + integrity sha512-tDsJgMUAP00Ugv8O2aGEua5I2apkaQO7lBGUq1ocwN3G23JE5Dcq0uh3GvFTChPa4b40AWiAsLvCZOA2rdnQ7Q== dependencies: - "@babel/helper-get-function-arity" "^7.0.0" - "@babel/template" "^7.1.0" - "@babel/types" "^7.0.0" + "@babel/helper-get-function-arity" "^7.7.0" + "@babel/template" "^7.7.0" + "@babel/types" "^7.7.0" -"@babel/helper-get-function-arity@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3" - integrity sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ== +"@babel/helper-get-function-arity@^7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.0.tgz#c604886bc97287a1d1398092bc666bc3d7d7aa2d" + integrity sha512-tLdojOTz4vWcEnHWHCuPN5P85JLZWbm5Fx5ZsMEMPhF3Uoe3O7awrbM2nQ04bDOUToH/2tH/ezKEOR8zEYzqyw== dependencies: - "@babel/types" "^7.0.0" + "@babel/types" "^7.7.0" "@babel/helper-module-imports@^7.0.0": version "7.0.0" @@ -94,14 +94,21 @@ dependencies: "@babel/types" "^7.4.4" -"@babel/helpers@^7.6.2": - version "7.6.2" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.6.2.tgz#681ffe489ea4dcc55f23ce469e58e59c1c045153" - integrity sha512-3/bAUL8zZxYs1cdX2ilEE0WobqbCmKWr/889lf2SS0PpDcpEIY8pb1CCyz0pEcX3pEb+MCbks1jIokz2xLtGTA== +"@babel/helper-split-export-declaration@^7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.0.tgz#1365e74ea6c614deeb56ebffabd71006a0eb2300" + integrity sha512-HgYSI8rH08neWlAH3CcdkFg9qX9YsZysZI5GD8LjhQib/mM0jGOZOVkoUiiV2Hu978fRtjtsGsW6w0pKHUWtqA== dependencies: - "@babel/template" "^7.6.0" - "@babel/traverse" "^7.6.2" - "@babel/types" "^7.6.0" + "@babel/types" "^7.7.0" + +"@babel/helpers@^7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.7.0.tgz#359bb5ac3b4726f7c1fde0ec75f64b3f4275d60b" + integrity sha512-VnNwL4YOhbejHb7x/b5F39Zdg5vIQpUUNzJwx0ww1EcVRt41bbGRZWhAURrfY32T5zTT3qwNOQFWpn+P0i0a2g== + dependencies: + "@babel/template" "^7.7.0" + "@babel/traverse" "^7.7.0" + "@babel/types" "^7.7.0" "@babel/highlight@^7.0.0": version "7.0.0" @@ -112,10 +119,10 @@ esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.4.3", "@babel/parser@^7.6.0", "@babel/parser@^7.6.2": - version "7.6.2" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.6.2.tgz#205e9c95e16ba3b8b96090677a67c9d6075b70a1" - integrity sha512-mdFqWrSPCmikBoaBYMuBulzTIKuXVPtEISFbRRVNwMWpCms/hmE2kRq0bblUHaNRKrjRlmVbx1sDHmjmRgD2Xg== +"@babel/parser@^7.4.3", "@babel/parser@^7.7.0", "@babel/parser@^7.7.2": + version "7.7.2" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.7.2.tgz#ea8334dc77416bfd9473eb470fd00d8245b3943b" + integrity sha512-DDaR5e0g4ZTb9aP7cpSZLkACEBdoLGwJDWgHtBhrGX7Q1RjhdoMOfexICj5cqTAtpowjGQWfcvfnQG7G2kAB5w== "@babel/plugin-transform-modules-amd@^7.5.0": version "7.5.0" @@ -134,34 +141,34 @@ core-js "^2.6.5" regenerator-runtime "^0.13.2" -"@babel/template@^7.1.0", "@babel/template@^7.4.0", "@babel/template@^7.4.4", "@babel/template@^7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.6.0.tgz#7f0159c7f5012230dad64cca42ec9bdb5c9536e6" - integrity sha512-5AEH2EXD8euCk446b7edmgFdub/qfH1SN6Nii3+fyXP807QRx9Q73A2N5hNwRRslC2H9sNzaFhsPubkS4L8oNQ== +"@babel/template@^7.1.0", "@babel/template@^7.4.0", "@babel/template@^7.4.4", "@babel/template@^7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.7.0.tgz#4fadc1b8e734d97f56de39c77de76f2562e597d0" + integrity sha512-OKcwSYOW1mhWbnTBgQY5lvg1Fxg+VyfQGjcBduZFljfc044J5iDlnDSfhQ867O17XHiSCxYHUxHg2b7ryitbUQ== dependencies: "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.6.0" - "@babel/types" "^7.6.0" + "@babel/parser" "^7.7.0" + "@babel/types" "^7.7.0" -"@babel/traverse@^7.4.3", "@babel/traverse@^7.6.2": - version "7.6.2" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.6.2.tgz#b0e2bfd401d339ce0e6c05690206d1e11502ce2c" - integrity sha512-8fRE76xNwNttVEF2TwxJDGBLWthUkHWSldmfuBzVRmEDWOtu4XdINTgN7TDWzuLg4bbeIMLvfMFD9we5YcWkRQ== +"@babel/traverse@^7.4.3", "@babel/traverse@^7.7.0", "@babel/traverse@^7.7.2": + version "7.7.2" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.7.2.tgz#ef0a65e07a2f3c550967366b3d9b62a2dcbeae09" + integrity sha512-TM01cXib2+rgIZrGJOLaHV/iZUAxf4A0dt5auY6KNZ+cm6aschuJGqKJM3ROTt3raPUdIDk9siAufIFEleRwtw== dependencies: "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.6.2" - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.4.4" - "@babel/parser" "^7.6.2" - "@babel/types" "^7.6.0" + "@babel/generator" "^7.7.2" + "@babel/helper-function-name" "^7.7.0" + "@babel/helper-split-export-declaration" "^7.7.0" + "@babel/parser" "^7.7.2" + "@babel/types" "^7.7.2" debug "^4.1.0" globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.0.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.6.0": - version "7.6.1" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.6.1.tgz#53abf3308add3ac2a2884d539151c57c4b3ac648" - integrity sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g== +"@babel/types@^7.0.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.7.0", "@babel/types@^7.7.2": + version "7.7.2" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.7.2.tgz#550b82e5571dcd174af576e23f0adba7ffc683f7" + integrity sha512-YTf6PXoh3+eZgRCBzzP25Bugd2ngmpQVrk7kXX0i5N9BO7TFBtIgZYs7WtxtOGs8e6A4ZI7ECkbBCEHeXocvOA== dependencies: esutils "^2.0.2" lodash "^4.17.13" @@ -1572,10 +1579,10 @@ continuable-cache@^0.3.1: resolved "https://registry.yarnpkg.com/continuable-cache/-/continuable-cache-0.3.1.tgz#bd727a7faed77e71ff3985ac93351a912733ad0f" integrity sha1-vXJ6f67XfnH/OYWskzUakSczrQ8= -convert-source-map@^1.1.0, convert-source-map@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" - integrity sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A== +convert-source-map@^1.6.0, convert-source-map@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" + integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== dependencies: safe-buffer "~5.1.1" From 970ee1c619dcb80b309375fd30ff242b8936c7d2 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2019 08:25:58 +0000 Subject: [PATCH 080/818] Bump sort-package-json from 1.22.1 to 1.23.1 Bumps [sort-package-json](https://github.com/keithamus/sort-package-json) from 1.22.1 to 1.23.1. - [Release notes](https://github.com/keithamus/sort-package-json/releases) - [Commits](https://github.com/keithamus/sort-package-json/compare/v1.22.1...v1.23.1) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 27 ++++++++++++++------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 25f40e7ef2..2859ef52b2 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,7 @@ "sane": "^4.1.0", "semver": "^6.3.0", "silent-error": "^1.1.1", - "sort-package-json": "^1.22.1", + "sort-package-json": "^1.23.1", "symlink-or-copy": "^1.2.0", "temp": "0.9.0", "testem": "^2.17.0", diff --git a/yarn.lock b/yarn.lock index 96e4b88083..ffcfd491f4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1827,10 +1827,10 @@ detect-file@^1.0.0: resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7" integrity sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc= -detect-indent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" - integrity sha1-OHHMCmoALow+Wzz38zYmRnXwa50= +detect-indent@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-6.0.0.tgz#0abd0f549f69fc6659a254fe96786186b6f528fd" + integrity sha512-oSyFlqaTHCItVRGK5RmrmjB+CmaMOW7IaNA/kdxqhoa6d17j/5ce9O9eWXmV/KEdRwqpQA+Vqe8a8Bsybu4YnA== diff@3.5.0: version "3.5.0" @@ -2843,10 +2843,10 @@ glob@^5.0.10: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.4, glob@^7.1.0, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: - version "7.1.4" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" - integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== +glob@^7.0.4, glob@^7.1.0, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -5754,12 +5754,13 @@ sort-object-keys@^1.1.2: resolved "https://registry.yarnpkg.com/sort-object-keys/-/sort-object-keys-1.1.2.tgz#d3a6c48dc2ac97e6bc94367696e03f6d09d37952" integrity sha1-06bEjcKsl+a8lDZ2luA/bQnTeVI= -sort-package-json@^1.22.1: - version "1.22.1" - resolved "https://registry.yarnpkg.com/sort-package-json/-/sort-package-json-1.22.1.tgz#384ce7a098cd13be4109800d5ce2f0cf7826052e" - integrity sha512-uVINQraFQvnlzNHFnQOT4MYy0qonIEzKwhrI2yrTiQjNo5QF4h3ffrnCk7a95QAwoK/RdkO/w8W9tJIcaOWC7g== +sort-package-json@^1.23.1: + version "1.23.1" + resolved "https://registry.yarnpkg.com/sort-package-json/-/sort-package-json-1.23.1.tgz#7882349ad885ee6d82ff57af4184f9d6e9159e1d" + integrity sha512-dg6XChDHL+V1gPBLW4fDWsip5T94wpDVlowm8gxXsxQMxX2271zw8JM1RRbJSIrN80/UlwlRdBVkk2SuiuZ2cw== dependencies: - detect-indent "^5.0.0" + detect-indent "^6.0.0" + glob "^7.1.6" sort-object-keys "^1.1.2" source-map-resolve@^0.5.0: From 689ba77798514f843900f827eba9b6b0705f110c Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 8 Nov 2019 10:36:51 -0500 Subject: [PATCH 081/818] Revert changes made to enable "octane" as the default for ember new 3.14 will not be "octane", see the blog post for more details: https://blog.emberjs.com/2019/10/31/octane-release-update.html This rolls back octane specific changes that were made to the default app/addon blueprints. --- .../addon/files/config/optional-features.json | 5 +-- .../app/files/{.ember-cli.js => .ember-cli} | 12 ++----- blueprints/app/files/.eslintrc.js | 1 - blueprints/app/files/.template-lintrc.js | 2 +- .../app/files/config/optional-features.json | 5 +-- blueprints/app/files/package.json | 2 -- package.json | 1 - tests/acceptance/brocfile-smoke-test-slow.js | 34 +++++++++---------- tests/fixtures/addon/.eslintrc.js | 1 - .../tests/dummy/app/templates/application.hbs | 4 +-- tests/fixtures/addon/npm/package.json | 2 -- tests/fixtures/addon/yarn/package.json | 2 -- tests/fixtures/app/.eslintrc.js | 1 - tests/fixtures/app/npm/package.json | 2 -- tests/fixtures/app/yarn/package.json | 2 -- tests/runner.js | 6 ---- yarn.lock | 5 --- 17 files changed, 25 insertions(+), 62 deletions(-) rename blueprints/app/files/{.ember-cli.js => .ember-cli} (63%) diff --git a/blueprints/addon/files/config/optional-features.json b/blueprints/addon/files/config/optional-features.json index b26286e2ec..b1902623ae 100644 --- a/blueprints/addon/files/config/optional-features.json +++ b/blueprints/addon/files/config/optional-features.json @@ -1,6 +1,3 @@ { - "application-template-wrapper": false, - "default-async-observers": true, - "jquery-integration": false, - "template-only-glimmer-components": true + "jquery-integration": false } diff --git a/blueprints/app/files/.ember-cli.js b/blueprints/app/files/.ember-cli similarity index 63% rename from blueprints/app/files/.ember-cli.js rename to blueprints/app/files/.ember-cli index 6be591bcd6..ee64cfed2a 100644 --- a/blueprints/app/files/.ember-cli.js +++ b/blueprints/app/files/.ember-cli @@ -1,15 +1,9 @@ -'use strict'; - -const { setEdition } = require('@ember/edition-utils'); - -setEdition('octane'); - -module.exports = { +{ /** Ember CLI sends analytics information by default. The data is completely anonymous, but there are times when you might want to disable this behavior. Setting `disableAnalytics` to true will prevent any data from being sent. */ - disableAnalytics: false -}; + "disableAnalytics": false +} diff --git a/blueprints/app/files/.eslintrc.js b/blueprints/app/files/.eslintrc.js index 50ca175691..11921a10ba 100644 --- a/blueprints/app/files/.eslintrc.js +++ b/blueprints/app/files/.eslintrc.js @@ -25,7 +25,6 @@ module.exports = { // node files { files: [ - '.ember-cli.js', '.eslintrc.js', '.template-lintrc.js', 'ember-cli-build.js',<% if (blueprint !== 'app') { %> diff --git a/blueprints/app/files/.template-lintrc.js b/blueprints/app/files/.template-lintrc.js index f387370010..b45e96ffdd 100644 --- a/blueprints/app/files/.template-lintrc.js +++ b/blueprints/app/files/.template-lintrc.js @@ -1,5 +1,5 @@ 'use strict'; module.exports = { - extends: 'octane' + extends: 'recommended' }; diff --git a/blueprints/app/files/config/optional-features.json b/blueprints/app/files/config/optional-features.json index b26286e2ec..b1902623ae 100644 --- a/blueprints/app/files/config/optional-features.json +++ b/blueprints/app/files/config/optional-features.json @@ -1,6 +1,3 @@ { - "application-template-wrapper": false, - "default-async-observers": true, - "jquery-integration": false, - "template-only-glimmer-components": true + "jquery-integration": false } diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index ce6042bc07..a14c7d2e7e 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -18,9 +18,7 @@ "test": "ember test" }, "devDependencies": { - "@ember/edition-utils": "^1.1.1", "@ember/optional-features": "^1.0.0", - "@glimmer/component": "^0.14.0-alpha.13", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", "ember-auto-import": "^1.5.2", diff --git a/package.json b/package.json index dcb3f6f7ad..0bf0cba513 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,6 @@ "yam": "^1.0.0" }, "devDependencies": { - "@ember/edition-utils": "^1.1.1", "@octokit/rest": "^16.30.1", "broccoli-plugin": "^3.0.0", "broccoli-test-helper": "^2.0.0", diff --git a/tests/acceptance/brocfile-smoke-test-slow.js b/tests/acceptance/brocfile-smoke-test-slow.js index 9129e6d60e..d4cb1f0cfb 100644 --- a/tests/acceptance/brocfile-smoke-test-slow.js +++ b/tests/acceptance/brocfile-smoke-test-slow.js @@ -41,6 +41,23 @@ describe('Acceptance: brocfile-smoke-test', function() { expect(dir(appRoot)).to.not.exist; }); + it( + 'a custom EmberENV in config/environment.js is used for window.EmberENV', + co.wrap(function*() { + yield copyFixtureFiles('brocfile-tests/custom-ember-env'); + yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let vendorContents = fs.readFileSync(path.join('dist', 'assets', 'vendor.js'), { + encoding: 'utf8', + }); + + // Changes in ember-optional-features 0.7.0 cause all defined values in optional-features.json + // to end up in EmberENV. jquery-integration is explicitly defined for non MU apps + let expected = 'window.EmberENV = {"asdflkmawejf":";jlnu3yr23","_JQUERY_INTEGRATION":false};'; + expect(vendorContents).to.contain(expected, 'EmberENV should be in assets/vendor.js'); + }) + ); + it( 'a custom environment config can be used in Brocfile.js', co.wrap(function*() { @@ -58,23 +75,6 @@ describe('Acceptance: brocfile-smoke-test', function() { yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); }) ); - - it( - 'a custom EmberENV in config/environment.js is used for window.EmberENV', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/custom-ember-env'); - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - let vendorContents = fs.readFileSync(path.join('dist', 'assets', 'vendor.js'), { - encoding: 'utf8', - }); - - // Changes in config/optional-features.json end up being set in EmberENV - let expected = - 'window.EmberENV = {"asdflkmawejf":";jlnu3yr23","_APPLICATION_TEMPLATE_WRAPPER":false,"_DEFAULT_ASYNC_OBSERVERS":true,"_JQUERY_INTEGRATION":false,"_TEMPLATE_ONLY_GLIMMER_COMPONENTS":true};'; - expect(vendorContents).to.contain(expected, 'EmberENV should be in assets/vendor.js'); - }) - ); } it( diff --git a/tests/fixtures/addon/.eslintrc.js b/tests/fixtures/addon/.eslintrc.js index ef47d42180..c4b7c4129c 100644 --- a/tests/fixtures/addon/.eslintrc.js +++ b/tests/fixtures/addon/.eslintrc.js @@ -25,7 +25,6 @@ module.exports = { // node files { files: [ - '.ember-cli.js', '.eslintrc.js', '.template-lintrc.js', 'ember-cli-build.js', diff --git a/tests/fixtures/addon/kitchen-sink/tests/dummy/app/templates/application.hbs b/tests/fixtures/addon/kitchen-sink/tests/dummy/app/templates/application.hbs index 50b5fd9f4e..885261e680 100644 --- a/tests/fixtures/addon/kitchen-sink/tests/dummy/app/templates/application.hbs +++ b/tests/fixtures/addon/kitchen-sink/tests/dummy/app/templates/application.hbs @@ -1,2 +1,2 @@ -WOOT!! -SECOND!! +{{#basic-thing}}WOOT!!{{/basic-thing}} +{{#second-thing}}SECOND!!{{/second-thing}} diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index 209727043f..1fd70c867c 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -25,9 +25,7 @@ "ember-cli-htmlbars": "^4.0.5" }, "devDependencies": { - "@ember/edition-utils": "^1.1.1", "@ember/optional-features": "^1.0.0", - "@glimmer/component": "^0.14.0-alpha.13", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", "ember-auto-import": "^1.5.2", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 0ddf3cb8f1..35bc629a86 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -25,9 +25,7 @@ "ember-cli-htmlbars": "^4.0.5" }, "devDependencies": { - "@ember/edition-utils": "^1.1.1", "@ember/optional-features": "^1.0.0", - "@glimmer/component": "^0.14.0-alpha.13", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", "ember-auto-import": "^1.5.2", diff --git a/tests/fixtures/app/.eslintrc.js b/tests/fixtures/app/.eslintrc.js index 4e27160747..f2fa7e537b 100644 --- a/tests/fixtures/app/.eslintrc.js +++ b/tests/fixtures/app/.eslintrc.js @@ -25,7 +25,6 @@ module.exports = { // node files { files: [ - '.ember-cli.js', '.eslintrc.js', '.template-lintrc.js', 'ember-cli-build.js', diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 815b857f8d..b951120b04 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -18,9 +18,7 @@ "test": "ember test" }, "devDependencies": { - "@ember/edition-utils": "^1.1.1", "@ember/optional-features": "^1.0.0", - "@glimmer/component": "^0.14.0-alpha.13", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", "ember-auto-import": "^1.5.2", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 5b6571a748..210420d71d 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -18,9 +18,7 @@ "test": "ember test" }, "devDependencies": { - "@ember/edition-utils": "^1.1.1", "@ember/optional-features": "^1.0.0", - "@glimmer/component": "^0.14.0-alpha.13", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", "ember-auto-import": "^1.5.2", diff --git a/tests/runner.js b/tests/runner.js index 3d563bb518..6025be20da 100644 --- a/tests/runner.js +++ b/tests/runner.js @@ -47,12 +47,6 @@ function addFiles(mocha, files) { files.forEach(mocha.addFile.bind(mocha)); } -// ensure that the specified edition is unset after each test -const { clearEdition } = require('@ember/edition-utils'); -mocha.suite.afterEach(function() { - clearEdition(); -}); - function runMocha() { console.time('Mocha Tests Running Time'); mocha.run(failures => { diff --git a/yarn.lock b/yarn.lock index 22c62755aa..73820522ce 100644 --- a/yarn.lock +++ b/yarn.lock @@ -175,11 +175,6 @@ exec-sh "^0.3.2" minimist "^1.2.0" -"@ember/edition-utils@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@ember/edition-utils/-/edition-utils-1.1.1.tgz#d5732c3da593f202e6e1ac6dbee56a758242403f" - integrity sha512-GEhri78jdQp/xxPpM6z08KlB0wrHfnfrJ9dmQk7JeQ4XCiMzXsJci7yooQgg/IcTKCM/PxE/IkGCQAo80adMkw== - "@octokit/endpoint@^5.1.0": version "5.1.4" resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-5.1.4.tgz#e6bb3ceda8923fdc9703ded78c9acc28eff88c06" From bc341095a1a51eb6d6616128ab001c9882d83b10 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 8 Nov 2019 13:29:10 -0500 Subject: [PATCH 082/818] Update ember-source to 3.14.1. --- blueprints/app/files/package.json | 2 +- tests/fixtures/addon/npm/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/npm/package.json | 2 +- tests/fixtures/app/yarn/package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index a14c7d2e7e..7f6b8ffff3 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -39,7 +39,7 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.5.1", "ember-resolver": "^5.3.0", - "ember-source": "~3.14.0-beta.1<% if (welcome) { %>", + "ember-source": "~3.14.1<% if (welcome) { %>", "ember-welcome-page": "^4.0.0<% } %>", "eslint-plugin-ember": "^7.1.0", "eslint-plugin-node": "^10.0.0", diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index 1fd70c867c..96bf4def84 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -42,7 +42,7 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.5.1", "ember-resolver": "^5.3.0", - "ember-source": "~3.14.0-beta.1", + "ember-source": "~3.14.1", "ember-source-channel-url": "^2.0.1", "ember-try": "^1.2.1", "eslint-plugin-ember": "^7.1.0", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 35bc629a86..764713d630 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -42,7 +42,7 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.5.1", "ember-resolver": "^5.3.0", - "ember-source": "~3.14.0-beta.1", + "ember-source": "~3.14.1", "ember-source-channel-url": "^2.0.1", "ember-try": "^1.2.1", "ember-welcome-page": "^4.0.0", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index b951120b04..2394deb5aa 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -39,7 +39,7 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.5.1", "ember-resolver": "^5.3.0", - "ember-source": "~3.14.0-beta.1", + "ember-source": "~3.14.1", "eslint-plugin-ember": "^7.1.0", "eslint-plugin-node": "^10.0.0", "loader.js": "^4.7.0", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 210420d71d..c3ec53da29 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -39,7 +39,7 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.5.1", "ember-resolver": "^5.3.0", - "ember-source": "~3.14.0-beta.1", + "ember-source": "~3.14.1", "ember-welcome-page": "^4.0.0", "eslint-plugin-ember": "^7.1.0", "eslint-plugin-node": "^10.0.0", From 06d8868e5c67497eb02b01006501e1c081425424 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 8 Nov 2019 14:14:59 -0500 Subject: [PATCH 083/818] Update ember-data to 3.14.0 stable. --- blueprints/app/files/package.json | 2 +- tests/fixtures/app/npm/package.json | 2 +- tests/fixtures/app/yarn/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 7f6b8ffff3..5822cab2d6 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -32,7 +32,7 @@ "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", - "ember-data": "~3.14.0-beta.0", + "ember-data": "~3.14.0", "ember-export-application-global": "^2.0.0", "ember-fetch": "^6.7.0", "ember-load-initializers": "^2.1.0", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 2394deb5aa..8385337a19 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -32,7 +32,7 @@ "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", - "ember-data": "~3.14.0-beta.0", + "ember-data": "~3.14.0", "ember-export-application-global": "^2.0.0", "ember-fetch": "^6.7.0", "ember-load-initializers": "^2.1.0", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index c3ec53da29..c3bc9cfbed 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -32,7 +32,7 @@ "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", - "ember-data": "~3.14.0-beta.0", + "ember-data": "~3.14.0", "ember-export-application-global": "^2.0.0", "ember-fetch": "^6.7.0", "ember-load-initializers": "^2.1.0", From 0817d4f199b2e86552a3f8b476b5fbe669d98a37 Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Sat, 9 Nov 2019 19:18:44 +0000 Subject: [PATCH 084/818] give npm a floating deps test too --- blueprints/addon/files/.travis.yml | 13 +++++++------ tests/fixtures/addon/npm/.travis.yml | 4 ++++ tests/fixtures/addon/yarn/.travis.yml | 6 +++--- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/blueprints/addon/files/.travis.yml b/blueprints/addon/files/.travis.yml index e4a1ab6062..a124617a30 100644 --- a/blueprints/addon/files/.travis.yml +++ b/blueprints/addon/files/.travis.yml @@ -38,17 +38,18 @@ jobs: # runs linting and tests with current locked deps - stage: "Tests" - name: "Tests"<% if (yarn) { %> - install: - - yarn install --non-interactive<% } %> + name: "Tests" script: - <% if (yarn) { %>yarn lint:hbs<% } else { %>npm run lint:hbs<% } %> - <% if (yarn) { %>yarn lint:js<% } else { %>npm run lint:js<% } %> - - <% if (yarn) { %>yarn test<% } else { %>npm test<% } %><% if (yarn) { %> + - <% if (yarn) { %>yarn test<% } else { %>npm test<% } %> - name: "Floating Dependencies" + install:<% if (yarn) { %> + - yarn install --no-lockfile --non-interactive script: - - yarn test<% } %> + - yarn test<% } else { %> + - npm install --no-package-lock<% } %> # we recommend new addons test the current and previous LTS # as well as latest stable release (bonus points to beta/canary) @@ -65,7 +66,7 @@ before_install: - export PATH=$HOME/.yarn/bin:$PATH install: - - yarn install --no-lockfile --non-interactive + - yarn install --non-interactive <% } %> script: - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO diff --git a/tests/fixtures/addon/npm/.travis.yml b/tests/fixtures/addon/npm/.travis.yml index a45eb4a560..a19c80a85e 100644 --- a/tests/fixtures/addon/npm/.travis.yml +++ b/tests/fixtures/addon/npm/.travis.yml @@ -41,6 +41,10 @@ jobs: - npm run lint:js - npm test + - name: "Floating Dependencies" + install: + - npm install --no-package-lock + # we recommend new addons test the current and previous LTS # as well as latest stable release (bonus points to beta/canary) - stage: "Additional Tests" diff --git a/tests/fixtures/addon/yarn/.travis.yml b/tests/fixtures/addon/yarn/.travis.yml index ab3e592e53..5cf2b5e9b3 100644 --- a/tests/fixtures/addon/yarn/.travis.yml +++ b/tests/fixtures/addon/yarn/.travis.yml @@ -35,14 +35,14 @@ jobs: - stage: "Tests" name: "Tests" - install: - - yarn install --non-interactive script: - yarn lint:hbs - yarn lint:js - yarn test - name: "Floating Dependencies" + install: + - yarn install --no-lockfile --non-interactive script: - yarn test @@ -61,7 +61,7 @@ before_install: - export PATH=$HOME/.yarn/bin:$PATH install: - - yarn install --no-lockfile --non-interactive + - yarn install --non-interactive script: - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO From 6deaa910c4f7fca685e807484b9a2e8d555afcc0 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2019 11:26:52 +0000 Subject: [PATCH 085/818] Bump strip-ansi from 5.2.0 to 6.0.0 Bumps [strip-ansi](https://github.com/chalk/strip-ansi) from 5.2.0 to 6.0.0. - [Release notes](https://github.com/chalk/strip-ansi/releases) - [Commits](https://github.com/chalk/strip-ansi/compare/v5.2.0...v6.0.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 2859ef52b2..7af5e08498 100644 --- a/package.json +++ b/package.json @@ -152,7 +152,7 @@ "nyc": "^14.1.0", "prettier": "1.17.0", "rimraf": "^3.0.0", - "strip-ansi": "^5.2.0", + "strip-ansi": "^6.0.0", "supertest": "^4.0.2", "testdouble": "^3.12.4", "tmp": "^0.1.0", diff --git a/yarn.lock b/yarn.lock index ffcfd491f4..d80e572daa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -371,6 +371,11 @@ ansi-regex@^4.1.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== +ansi-regex@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" + integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== + ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" @@ -5980,6 +5985,13 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" +strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== + dependencies: + ansi-regex "^5.0.0" + strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" From c1d0070641069a9de7673484ed92b55a37b58506 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2019 11:26:44 +0000 Subject: [PATCH 086/818] Bump @octokit/rest from 16.30.1 to 16.35.0 Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 16.30.1 to 16.35.0. - [Release notes](https://github.com/octokit/rest.js/releases) - [Commits](https://github.com/octokit/rest.js/compare/v16.30.1...v16.35.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 67 ++++++++++++++++++++++++---------------------------- 2 files changed, 32 insertions(+), 37 deletions(-) diff --git a/package.json b/package.json index 2859ef52b2..f3857f3672 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,7 @@ }, "devDependencies": { "@ember/edition-utils": "^1.1.1", - "@octokit/rest": "^16.30.1", + "@octokit/rest": "^16.35.0", "broccoli-plugin": "^3.0.0", "broccoli-test-helper": "^2.0.0", "chai": "^4.2.0", diff --git a/yarn.lock b/yarn.lock index ffcfd491f4..471b31ebaa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -187,15 +187,14 @@ resolved "https://registry.yarnpkg.com/@ember/edition-utils/-/edition-utils-1.1.1.tgz#d5732c3da593f202e6e1ac6dbee56a758242403f" integrity sha512-GEhri78jdQp/xxPpM6z08KlB0wrHfnfrJ9dmQk7JeQ4XCiMzXsJci7yooQgg/IcTKCM/PxE/IkGCQAo80adMkw== -"@octokit/endpoint@^5.1.0": - version "5.1.4" - resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-5.1.4.tgz#e6bb3ceda8923fdc9703ded78c9acc28eff88c06" - integrity sha512-DypS8gbbcc9rlOCDW0wV9a+B18+ylduj6PpxeE+qa3IK1h5b0eW4CKj5pxxXWOZUYhEKwgOnh3+Q+Y/hx/bOPw== +"@octokit/endpoint@^5.5.0": + version "5.5.1" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-5.5.1.tgz#2eea81e110ca754ff2de11c79154ccab4ae16b3f" + integrity sha512-nBFhRUb5YzVTCX/iAK1MgQ4uWo89Gu0TH00qQHoYRCsE12dWcG1OiLd7v2EIo2+tpUKPMOQ62QFy9hy9Vg2ULg== dependencies: - deepmerge "3.2.0" + "@octokit/types" "^2.0.0" is-plain-object "^3.0.0" - universal-user-agent "^2.1.0" - url-template "^2.0.8" + universal-user-agent "^4.0.0" "@octokit/request-error@^1.0.1", "@octokit/request-error@^1.0.2": version "1.0.2" @@ -205,25 +204,26 @@ deprecation "^2.0.0" once "^1.4.0" -"@octokit/request@^5.0.0": - version "5.0.0" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.0.0.tgz#d044d6e049aaa0580f78249c688a78a3cfab758b" - integrity sha512-eAknm2Aq+/uQDLHUn7KHHpXB7A/NFfWgaVN+ZhC6mQlCNRzCv242eLYgt6cC4h2DZL7mM+QidS/UtZVwYvQXBw== +"@octokit/request@^5.2.0": + version "5.3.1" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.3.1.tgz#3a1ace45e6f88b1be4749c5da963b3a3b4a2f120" + integrity sha512-5/X0AL1ZgoU32fAepTfEoggFinO3rxsMLtzhlUX+RctLrusn/CApJuGFCd0v7GMFhF+8UiCsTTfsu7Fh1HnEJg== dependencies: - "@octokit/endpoint" "^5.1.0" + "@octokit/endpoint" "^5.5.0" "@octokit/request-error" "^1.0.1" + "@octokit/types" "^2.0.0" deprecation "^2.0.0" is-plain-object "^3.0.0" node-fetch "^2.3.0" once "^1.4.0" - universal-user-agent "^2.1.0" + universal-user-agent "^4.0.0" -"@octokit/rest@^16.30.1": - version "16.30.1" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.30.1.tgz#03e6dfb93e9a9cd2b3bacb95c49a8c7923f42ad0" - integrity sha512-1n2QzTbbaBXNLpx7WHlcsSMdJvxSdKmerXQm+bMYlKDbQM19uq446ZpGs7Ynq5SsdLj1usIfgJ9gJf4LtcWkDw== +"@octokit/rest@^16.35.0": + version "16.35.0" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.35.0.tgz#7ccc1f802f407d5b8eb21768c6deca44e7b4c0d8" + integrity sha512-9ShFqYWo0CLoGYhA1FdtdykJuMzS/9H6vSbbQWDX4pWr4p9v+15MsH/wpd/3fIU+tSxylaNO48+PIHqOkBRx3w== dependencies: - "@octokit/request" "^5.0.0" + "@octokit/request" "^5.2.0" "@octokit/request-error" "^1.0.2" atob-lite "^2.0.0" before-after-hook "^2.0.0" @@ -236,6 +236,13 @@ once "^1.4.0" universal-user-agent "^4.0.0" +"@octokit/types@^2.0.0": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-2.0.1.tgz#0caf0364e010296265621593ac9a37f40ef75dad" + integrity sha512-YDYgV6nCzdGdOm7wy43Ce8SQ3M5DMKegB8E5sTB/1xrxOdo2yS/KgUgML2N2ZGD621mkbdrAglwTyA4NDOlFFA== + dependencies: + "@types/node" ">= 8" + "@sindresorhus/is@^0.7.0": version "0.7.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd" @@ -272,6 +279,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-12.0.5.tgz#ac14404c33d1a789973c45379a67f7f7e58a01b9" integrity sha512-CFLSALoE+93+Hcb5pFjp0J1uMrrbLRe+L1+gFwerJ776R3TACSF0kTVRQ7AvRa7aFx70nqYHAc7wQPlt9kY2Mg== +"@types/node@>= 8": + version "12.12.7" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.7.tgz#01e4ea724d9e3bd50d90c11fd5980ba317d8fa11" + integrity sha512-E6Zn0rffhgd130zbCbAr/JdXfXkoOUFAKNs/rF8qnafSJ8KYaA/j3oz7dcwal+lYjLA7xvdd5J4wdYpCTlP8+w== + "@types/rimraf@^2.0.2": version "2.0.2" resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-2.0.2.tgz#7f0fc3cf0ff0ad2a99bb723ae1764f30acaf8b6e" @@ -1744,11 +1756,6 @@ deep-is@~0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= -deepmerge@3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-3.2.0.tgz#58ef463a57c08d376547f8869fdc5bcee957f44e" - integrity sha512-6+LuZGU7QCNUnAJyX8cIrlzoEgggTM6B7mm+znKOX4t5ltluT9KLjN6g61ECMS0LTsLW7yDpNoxhix5FZcrIow== - default-require-extensions@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-2.0.0.tgz#f5f8fbb18a7d6d50b21f641f649ebb522cfe24f7" @@ -4844,7 +4851,7 @@ os-homedir@^1.0.0, os-homedir@^1.0.1: resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= -os-name@^3.0.0, os-name@^3.1.0: +os-name@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/os-name/-/os-name-3.1.0.tgz#dec19d966296e1cd62d701a5a66ee1ddeae70801" integrity sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg== @@ -6403,13 +6410,6 @@ unique-string@^2.0.0: dependencies: crypto-random-string "^2.0.0" -universal-user-agent@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-2.1.0.tgz#5abfbcc036a1ba490cb941f8fd68c46d3669e8e4" - integrity sha512-8itiX7G05Tu3mGDTdNY2fB4KJ8MgZLS54RdG6PkkfwMAavrXu1mV/lls/GABx9O3Rw4PnTtasxrvbMQoBYY92Q== - dependencies: - os-name "^3.0.0" - universal-user-agent@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-4.0.0.tgz#27da2ec87e32769619f68a14996465ea1cb9df16" @@ -6461,11 +6461,6 @@ url-parse-lax@^3.0.0: dependencies: prepend-http "^2.0.0" -url-template@^2.0.8: - version "2.0.8" - resolved "https://registry.yarnpkg.com/url-template/-/url-template-2.0.8.tgz#fc565a3cccbff7730c775f5641f9555791439f21" - integrity sha1-/FZaPMy/93MMd19WQflVV5FDnyE= - url-to-options@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" From ec5ed5eae1cede3eb024498ab01eac0c5d73050e Mon Sep 17 00:00:00 2001 From: Kenneth Larsen Date: Thu, 14 Nov 2019 13:20:59 +0100 Subject: [PATCH 087/818] add application to invalid names --- lib/utilities/valid-project-name.js | 2 +- tests/unit/utilities/valid-project-name-test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/utilities/valid-project-name.js b/lib/utilities/valid-project-name.js index feaf251e60..5874b1e63b 100644 --- a/lib/utilities/valid-project-name.js +++ b/lib/utilities/valid-project-name.js @@ -22,7 +22,7 @@ function startsWithNumber(name) { * @return {Boolean} */ module.exports = function(name) { - let invalidProjectNames = ['test', 'ember', 'ember-cli', 'vendor', 'public', 'app']; + let invalidProjectNames = ['test', 'ember', 'ember-cli', 'vendor', 'public', 'app', 'application']; name = name.toLowerCase(); if (invalidProjectNames.indexOf(name) !== -1 || name.indexOf('.') !== -1 || startsWithNumber(name)) { diff --git a/tests/unit/utilities/valid-project-name-test.js b/tests/unit/utilities/valid-project-name-test.js index 9e9e27c1bf..7083f735d7 100644 --- a/tests/unit/utilities/valid-project-name-test.js +++ b/tests/unit/utilities/valid-project-name-test.js @@ -4,7 +4,7 @@ const validProjectName = require('../../../lib/utilities/valid-project-name'); const expect = require('chai').expect; describe('validate project name', function() { - ['app', 'public', '.', 'ember', 'so-cool.', 'vendor', 'test', '1234test'].forEach(name => { + ['app', 'public', '.', 'ember', 'so-cool.', 'vendor', 'test', '1234test', 'application'].forEach(name => { it(`'${name}' is an invalid name`, function() { expect(validProjectName(name)).to.not.be.ok; }); From e96402abd58c4585d50dc09817c9d273e53ce64e Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Thu, 14 Nov 2019 11:31:00 -0500 Subject: [PATCH 088/818] Add v3.13.2 to CHANGELOG.md. --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 552c617455..2643155b3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # ember-cli Changelog +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.13.1...v3.13.2) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.13.1...v3.13.2) + + +- [#8875](https://github.com/ember-cli/ember-cli/pull/8875) Fix ember-cli-htmlbars-inline-precompile deprecation [@HeroicEric](https://github.com/HeroicEric) +- [#8882](https://github.com/ember-cli/ember-cli/pull/8882) Simplify "Get started" message [@dcyriller](https://github.com/dcyriller) +- [#8901](https://github.com/ember-cli/ember-cli/pull/8901) Merge `config/environment.js`'s `EmberENV` configuration with any pre-existing `EmberENV` [@chancancode](https://github.com/chancancode) + +Thank you to all who took the time to contribute! ## v3.13.1 From 85f505e93fc897ea5dbec5971eee91a47907e822 Mon Sep 17 00:00:00 2001 From: vladucu Date: Thu, 14 Nov 2019 22:53:13 +0200 Subject: [PATCH 089/818] Fix few broken changelog links --- CHANGELOG.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cebc75976..b8e076ca47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -101,10 +101,10 @@ Thank you to all who took the time to contribute! - [#8662](https://github.com/ember-cli/ember-cli/pull/8662) use async/await in ember-try config [@kellyselden](https://github.com/kellyselden) - [#8664](https://github.com/ember-cli/ember-cli/pull/8664) fix README ember min version [@kellyselden](https://github.com/kellyselden) - [#8674](https://github.com/ember-cli/ember-cli/pull/8674) ensure we use Promise.prototype.finally polyfil for node 8 compat [@stefanpenner](https://github.com/stefanpenner) -- [#8675](https://github.com/stefanpenner/stefanpenner/pull/8675) [beta] Gather hardware information when creating instrumentation summaries. [@stefanpenner](https://github.com/stefanpenner) -- [#8679](https://github.com/stefanpenner/stefanpenner/pull/8679) Adding change logging for backwards compatibility [@thoov](https://github.com/thoov) -- [#8680](https://github.com/stefanpenner/stefanpenner/pull/8680) [Fixes #8677] ensure watcher parity [@stefanpenner](https://github.com/stefanpenner) -- [#8595](https://github.com/stefanpenner/stefanpenner/pull/8595) `Project#config` should use `EMBER_ENV` as default environment when none is passed in [@nlfurniss](https://github.com/nlfurniss) +- [#8675](https://github.com/ember-cli/ember-cli/pull/8675) [beta] Gather hardware information when creating instrumentation summaries. [@stefanpenner](https://github.com/stefanpenner) +- [#8679](https://github.com/ember-cli/ember-cli/pull/8679) Adding change logging for backwards compatibility [@thoov](https://github.com/thoov) +- [#8680](https://github.com/ember-cli/ember-cli/pull/8680) [Fixes #8677] ensure watcher parity [@stefanpenner](https://github.com/stefanpenner) +- [#8595](https://github.com/ember-cli/ember-cli/pull/8595) `Project#config` should use `EMBER_ENV` as default environment when none is passed in [@nlfurniss](https://github.com/nlfurniss) - [#8604](https://github.com/stefanpenner/ember-cli/pull/8604) CONTRIBUTING: Clarify the way to start working on the repo. [@MonsieurDart](https://github.com/MonsieurDart) - [#8621](https://github.com/ember-cli/ember-cli/pull/8621) project.findAddonByName was intended to be public [@stefanpenner](https://github.com/stefanpenner) - [#8697](https://github.com/ember-cli/ember-cli/pull/8697) Update to Broccoli 3.1. [@thoov](https://github.com/thoov) From 7d80dbf3a28f23044c1c7544db6f7ca3792185a3 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 15 Nov 2019 09:13:00 -0500 Subject: [PATCH 090/818] 3.13.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1fa6993d95..effc56a8fa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.13.1", + "version": "3.13.2", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From c4814a8da82d2b5d21dd1c5453fe0c1bc3d5dedc Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 15 Nov 2019 09:25:59 -0500 Subject: [PATCH 091/818] Add v3.14.0 to CHANGELOG.md. --- CHANGELOG.md | 44 ++++++++++++++++++++------------------------ 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee35fba6d0..61962a0d54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,44 +1,40 @@ # ember-cli Changelog + +## v3.14.0 + #### Blueprint Changes -- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.13.1...v3.13.2) -- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.13.1...v3.13.2) +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.13.2...v3.14.0) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.13.2...v3.14.0) - [#8875](https://github.com/ember-cli/ember-cli/pull/8875) Fix ember-cli-htmlbars-inline-precompile deprecation [@HeroicEric](https://github.com/HeroicEric) -- [#8882](https://github.com/ember-cli/ember-cli/pull/8882) Simplify "Get started" message [@dcyriller](https://github.com/dcyriller) +- [#8882](https://github.com/ember-cli/ember-cli/pull/8882) Simplify "Get started" message for `ember new` [@dcyriller](https://github.com/dcyriller) +- [#8899](https://github.com/ember-cli/ember-cli/pull/8899) Don't reload the config for instrumentation [@pzuraq](https://github.com/pzuraq) +- [#8900](https://github.com/ember-cli/ember-cli/pull/8900) Include `legacyDecorators` eslint option by default [@pzuraq](https://github.com/pzuraq) - [#8901](https://github.com/ember-cli/ember-cli/pull/8901) Merge `config/environment.js`'s `EmberENV` configuration with any pre-existing `EmberENV` [@chancancode](https://github.com/chancancode) +- [#8910](https://github.com/ember-cli/ember-cli/pull/8910) Update TravisCI config for `ember new` to restrict CI runs to `master` branch and pull requests [@kellyselden](https://github.com/kellyselden) +- [#8915](https://github.com/ember-cli/ember-cli/pull/8915) Revert changes made to enable "octane" as the default for `ember new` [@rwjblue](https://github.com/rwjblue) +- [#8916](https://github.com/ember-cli/ember-cli/pull/8916) Update ember-source and ember-data to 3.14.x [@rwjblue](https://github.com/rwjblue) +- [#8853](https://github.com/ember-cli/ember-cli/pull/8853) Update ember-resolver to 5.3.0. [@rwjblue](https://github.com/rwjblue) +- [#8812](https://github.com/ember-cli/ember-cli/pull/8812) Clarify installation error message [@jrjohnson](https://github.com/jrjohnson) +- [#8820](https://github.com/ember-cli/ember-cli/pull/8820) Issue deprecation when enabling MODULE_UNIFICATION flag. [@rwjblue](https://github.com/rwjblue) -Thank you to all who took the time to contribute! - -## v3.14.0-beta.2 +## v3.13.2 #### Blueprint Changes -- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.14.0-beta.1...v3.14.0-beta.2) -- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.14.0-beta.1...v3.14.0-beta.2) +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.13.1...v3.13.2) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.13.1...v3.13.2) -- [#8853](https://github.com/ember-cli/ember-cli/pull/8853) Update ember-resolver to 5.3.0. [@rwjblue](https://github.com/rwjblue) -- [#8861](https://github.com/ember-cli/ember-cli/pull/8861) Octane related tweaks (add `@glimmer/component`, use ember-template-lint's `octane` preset) [@rwjblue](https://github.com/rwjblue) +- [#8875](https://github.com/ember-cli/ember-cli/pull/8875) Fix ember-cli-htmlbars-inline-precompile deprecation [@HeroicEric](https://github.com/HeroicEric) +- [#8882](https://github.com/ember-cli/ember-cli/pull/8882) Simplify "Get started" message [@dcyriller](https://github.com/dcyriller) +- [#8901](https://github.com/ember-cli/ember-cli/pull/8901) Merge `config/environment.js`'s `EmberENV` configuration with any pre-existing `EmberENV` [@chancancode](https://github.com/chancancode) Thank you to all who took the time to contribute! -## v3.14.0-beta.1 - -#### Blueprint Changes - -- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.13.0...v3.14.0-beta.1) -- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.13.0...v3.14.0-beta.1) - -#### Changelog - -- [#8812](https://github.com/ember-cli/ember-cli/pull/8812) Clarify installation error message [@jrjohnson](https://github.com/jrjohnson) -- [#8820](https://github.com/ember-cli/ember-cli/pull/8820) Issue deprecation when enabling MODULE_UNIFICATION flag. [@rwjblue](https://github.com/rwjblue) -- [#8830](https://github.com/ember-cli/ember-cli/pull/8830) CI: Remove deprecated exp. from ALL_EXPERIMENTS [@dcyriller](https://github.com/dcyriller) -- [#8856](https://github.com/ember-cli/ember-cli/pull/8856) Prepare for first Octane beta. [@rwjblue](https://github.com/rwjblue) - ## v3.13.1 #### Blueprint Changes From b78e0cb6d6d0810e2098a54ef41ab1ccbb08e4bb Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 15 Nov 2019 09:28:58 -0500 Subject: [PATCH 092/818] 3.14.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0bf0cba513..722c3a6880 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.14.0-beta.2", + "version": "3.14.0", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From 96eb8ffab5c293272ae4368a02cdda3d3575bb4a Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 15 Nov 2019 09:42:36 -0500 Subject: [PATCH 093/818] Update to ember-source@3.15.0-beta.1. --- blueprints/app/files/package.json | 2 +- tests/fixtures/addon/npm/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/npm/package.json | 2 +- tests/fixtures/app/yarn/package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 5822cab2d6..4cab146d6d 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -39,7 +39,7 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.5.1", "ember-resolver": "^5.3.0", - "ember-source": "~3.14.1<% if (welcome) { %>", + "ember-source": "~3.15.0-beta.1<% if (welcome) { %>", "ember-welcome-page": "^4.0.0<% } %>", "eslint-plugin-ember": "^7.1.0", "eslint-plugin-node": "^10.0.0", diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index 96bf4def84..3337b762e5 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -42,7 +42,7 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.5.1", "ember-resolver": "^5.3.0", - "ember-source": "~3.14.1", + "ember-source": "~3.15.0-beta.1", "ember-source-channel-url": "^2.0.1", "ember-try": "^1.2.1", "eslint-plugin-ember": "^7.1.0", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 764713d630..9037b9817e 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -42,7 +42,7 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.5.1", "ember-resolver": "^5.3.0", - "ember-source": "~3.14.1", + "ember-source": "~3.15.0-beta.1", "ember-source-channel-url": "^2.0.1", "ember-try": "^1.2.1", "ember-welcome-page": "^4.0.0", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 8385337a19..4e51e01033 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -39,7 +39,7 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.5.1", "ember-resolver": "^5.3.0", - "ember-source": "~3.14.1", + "ember-source": "~3.15.0-beta.1", "eslint-plugin-ember": "^7.1.0", "eslint-plugin-node": "^10.0.0", "loader.js": "^4.7.0", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index c3bc9cfbed..b8b5952bfb 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -39,7 +39,7 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.5.1", "ember-resolver": "^5.3.0", - "ember-source": "~3.14.1", + "ember-source": "~3.15.0-beta.1", "ember-welcome-page": "^4.0.0", "eslint-plugin-ember": "^7.1.0", "eslint-plugin-node": "^10.0.0", From 5aec9e352594501423ec8c2a8bfaa8a45adb517b Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 15 Nov 2019 09:44:03 -0500 Subject: [PATCH 094/818] Update to ember-data 3.15.0-beta.0 --- blueprints/app/files/package.json | 2 +- tests/fixtures/app/npm/package.json | 2 +- tests/fixtures/app/yarn/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 4cab146d6d..734447c72b 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -32,7 +32,7 @@ "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", - "ember-data": "~3.14.0", + "ember-data": "~3.15.0-beta.0", "ember-export-application-global": "^2.0.0", "ember-fetch": "^6.7.0", "ember-load-initializers": "^2.1.0", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 4e51e01033..375302f800 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -32,7 +32,7 @@ "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", - "ember-data": "~3.14.0", + "ember-data": "~3.15.0-beta.0", "ember-export-application-global": "^2.0.0", "ember-fetch": "^6.7.0", "ember-load-initializers": "^2.1.0", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index b8b5952bfb..774ee5579f 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -32,7 +32,7 @@ "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", - "ember-data": "~3.14.0", + "ember-data": "~3.15.0-beta.0", "ember-export-application-global": "^2.0.0", "ember-fetch": "^6.7.0", "ember-load-initializers": "^2.1.0", From 2da2c11e3076aca476a489890bcb7c48f02e572e Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 15 Nov 2019 09:47:48 -0500 Subject: [PATCH 095/818] Add v3.15.0-beta.1 to CHANGELOG.md --- CHANGELOG.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 925589627a..5b023f9ae4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # ember-cli Changelog +## v3.15.0-beta.1 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.14.0...v3.15.0-beta.1) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.14.0...v3.15.0-beta.1) + + +- [#8827](https://github.com/ember-cli/ember-cli/pull/8827) Remove module-unification blueprints [@dcyriller](https://github.com/dcyriller) +- [#8878](https://github.com/ember-cli/ember-cli/pull/8878) Adds flag to throw an error for invalid addon locations [@tmquinn](https://github.com/tmquinn) +- [#8906](https://github.com/ember-cli/ember-cli/pull/8906) Enable broccoli memoization by default in Ember-CLI [@SparshithNR](https://github.com/SparshithNR) +- [#8917](https://github.com/ember-cli/ember-cli/pull/8917) Update CI configuration for applications using `npm` to run a "floating dependencies" test. [@kellyselden](https://github.com/kellyselden) +- [#8926](https://github.com/ember-cli/ember-cli/pull/8926) Add `application` to invalid names [@kennethlarsen](https://github.com/kennethlarsen) + +Thank you to all who took the time to contribute! ## v3.14.0 From 0f8987bac86004bf46518a49e2c7c0feed358395 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 15 Nov 2019 09:48:06 -0500 Subject: [PATCH 096/818] 3.15.0-beta.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 12e343e9ee..fc25530c56 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.14.0", + "version": "3.15.0-beta.1", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From e623456dd38f9c590e70510ef1db9e36207410d9 Mon Sep 17 00:00:00 2001 From: Sergey Astapov Date: Fri, 15 Nov 2019 14:32:23 -0500 Subject: [PATCH 097/818] Bump ember-cli's node engine support. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 12e343e9ee..1cd33d3386 100644 --- a/package.json +++ b/package.json @@ -162,7 +162,7 @@ "yuidocjs": "0.10.2" }, "engines": { - "node": "8.* || >= 10.*" + "node": "8.* || 10.* || >= 12" }, "trackingCode": "UA-49225444-1", "greenkeeper": { From c59e135c99773184cd56e0e3619016227a7426a2 Mon Sep 17 00:00:00 2001 From: Sergey Astapov Date: Fri, 15 Nov 2019 18:58:01 -0500 Subject: [PATCH 098/818] Add Node.js 13 to test matrix --- .travis.yml | 3 +++ appveyor.yml | 1 + 2 files changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 497e5ca9b8..079a2bd5aa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,6 +50,9 @@ jobs: after_success: - .travis/codecoverage.sh + - name: Node.js 13 + node_js: 13 + - env: EMBER_CLI_ENABLE_ALL_EXPERIMENTS=true - env: EMBER_CLI_PACKAGER=true - env: EMBER_CLI_MODULE_UNIFICATION=true diff --git a/appveyor.yml b/appveyor.yml index 3ce793d1b4..a30c3b0c16 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,6 +9,7 @@ environment: - nodejs_version: "8" - nodejs_version: "10" - nodejs_version: "12" + - nodejs_version: "13" matrix: fast_finish: true From 00a820e43e875dd554c27b619ebc9fa8c96a46ba Mon Sep 17 00:00:00 2001 From: Sergey Astapov Date: Fri, 15 Nov 2019 16:55:53 -0500 Subject: [PATCH 099/818] Update node support policy docs. * Drop 9 * Drop 11 * Add 12 * Add 13 --- docs/node-support.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/docs/node-support.md b/docs/node-support.md index c2eb309e89..50313a8886 100644 --- a/docs/node-support.md +++ b/docs/node-support.md @@ -8,11 +8,14 @@ | 0.12.x | 0.0.0 - 2.11.x | | 4.x | 1.13.9 - 3.1.x | | 5.x | 1.13.9 - 2.6.3 | -| 6.x | 2.9.0 - Current | +| 6.x | 2.9.0 - 3.9.x | | 7.x | 2.10.0 - 2.16.x | | 8.x | 2.13.3 - Current | -| 9.x | 2.16.2 - Current | +| 9.x | 2.16.2 - 3.2.x | | 10.x | 3.1.3 - Current | +| 11.x | 3.9.0 - 3.13.0 | +| 12.x | 3.10.0 - Current | +| 13.x | 3.15.0 - Current | ## Design @@ -26,14 +29,14 @@ Node.js](https://github.com/nodejs/LTS#lts_schedule). ## Current support: -* v6: Released as stable version then converted to LTS. - * Supported by ember-cli/ember-cli#master until: 2019-04-30. * v8: Released as stable version then converted to LTS. - * Supported by ember-cli/ember-cli#master until: 2019-12-31 -* v9: Released as stable (not an LTS) - * Supported by ember-cli/ember-cli#master until: 2018-07-01. + * Supported by ember-cli/ember-cli#master until: 2019-12-31. * v10: Released as stable version then converted to LTS. * Supported by ember-cli/ember-cli#master until: 2021-04-30. +* v12: Released as stable version then converted to LTS. + * Supported by ember-cli/ember-cli#master until: 2022-04-30. +* v13: Released as stable (not an LTS) + * Supported by ember-cli/ember-cli#master until: 2020-06-30. ## Release Process and Support Policy From 5605dbd789bd5c2d5ce51dd0c0c35a76c8d9c63f Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sun, 17 Nov 2019 11:31:53 -0500 Subject: [PATCH 100/818] Remove `app/resolver.js` in favor of importing in `app/app.js` The implementation of `app/resolver.js` was a simple re-export from `ember-resolver`, and we do not expect (or really want) folks to be modifying it. Why was it a separate module in the app then?!? This remvoes `app/resolver.js` in favor of importing from `ember-resolver` directly in `app/app.js`. --- blueprints/app/files/app/app.js | 2 +- blueprints/app/files/app/resolver.js | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) delete mode 100644 blueprints/app/files/app/resolver.js diff --git a/blueprints/app/files/app/app.js b/blueprints/app/files/app/app.js index 8df91db565..d8e2088b6b 100644 --- a/blueprints/app/files/app/app.js +++ b/blueprints/app/files/app/app.js @@ -1,5 +1,5 @@ import Application from '@ember/application'; -import Resolver from './resolver'; +import Resolver from 'ember-resolver'; import loadInitializers from 'ember-load-initializers'; import config from './config/environment'; diff --git a/blueprints/app/files/app/resolver.js b/blueprints/app/files/app/resolver.js deleted file mode 100644 index 2fb563d6c0..0000000000 --- a/blueprints/app/files/app/resolver.js +++ /dev/null @@ -1,3 +0,0 @@ -import Resolver from 'ember-resolver'; - -export default Resolver; From 211765636bbf0eede78c1fe3a6e37ec14d58b46b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2019 03:14:49 +0000 Subject: [PATCH 101/818] Bump testem from 2.17.0 to 3.0.1 Bumps [testem](https://github.com/testem/testem) from 2.17.0 to 3.0.1. - [Release notes](https://github.com/testem/testem/releases) - [Commits](https://github.com/testem/testem/compare/v2.17.0...v3.0.1) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 0cc3d5a0bd..e7a90edf88 100644 --- a/package.json +++ b/package.json @@ -120,7 +120,7 @@ "sort-package-json": "^1.23.1", "symlink-or-copy": "^1.2.0", "temp": "0.9.0", - "testem": "^2.17.0", + "testem": "^3.0.1", "tiny-lr": "^1.1.1", "tree-sync": "^2.0.0", "uuid": "^3.3.3", diff --git a/yarn.lock b/yarn.lock index 471b31ebaa..f2eae15d41 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6136,10 +6136,10 @@ testdouble@^3.2.6: stringify-object-es5 "^2.5.0" theredoc "^1.0.0" -testem@^2.17.0: - version "2.17.0" - resolved "https://registry.yarnpkg.com/testem/-/testem-2.17.0.tgz#1cb4a2a90524a088803dfe52fbf197a6fd73c883" - integrity sha512-PLkIlT523w5rTJPWwR4TL1EiAEa941ECV7d4pMqsB0YdnH+sCTz0loWMKCUSdhR+VijveAZ6anE/JHehE7KqMQ== +testem@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/testem/-/testem-3.0.1.tgz#93fbd93fd6a4dcd57bcd1ba506d22ed8f8cfcd21" + integrity sha512-2fgW8Zw+sbZDPxNdtGCH1qrzpFIG9nPdVAX/HlvBvishovOCIuRWrm/rz/FLiXp7NPOtB78Dj8QDQanoGk4+Ig== dependencies: backbone "^1.1.2" bluebird "^3.4.6" From 1804b62be38029b242792548f4a9e3886964535b Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Fri, 22 Nov 2019 15:55:03 +0000 Subject: [PATCH 102/818] fix npm pack test --- tests/acceptance/addon-smoke-test-slow.js | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/tests/acceptance/addon-smoke-test-slow.js b/tests/acceptance/addon-smoke-test-slow.js index f98b5cec9e..2c4e3a0c79 100644 --- a/tests/acceptance/addon-smoke-test-slow.js +++ b/tests/acceptance/addon-smoke-test-slow.js @@ -128,6 +128,8 @@ describe('Acceptance: addon-smoke-test', function() { return handleError(error, 'tar'); } + let necessaryFiles = ['package.json', 'index.js', 'LICENSE.md', 'README.md', 'config/environment.js']; + let unnecessaryFiles = [ '.gitkeep', '.travis.yml', @@ -138,11 +140,22 @@ describe('Acceptance: addon-smoke-test', function() { '.bowerrc', ]; - let unnecessaryFolders = ['tests/', 'bower_components/']; + let unnecessaryFolders = [/^tests\//, /^bower_components\//]; + + let outputFiles = output + .split('\n') + .filter(Boolean) + .map(f => f.replace(/^package\//, '')); + + expect(outputFiles, 'verify our assumptions about the output structure').to.include.members(necessaryFiles); - let outputFiles = output.split('\n'); - expect(outputFiles).to.not.contain(unnecessaryFiles); - expect(outputFiles).to.not.contain(unnecessaryFolders); + expect(outputFiles).to.not.have.members(unnecessaryFiles); + + for (let unnecessaryFolder of unnecessaryFolders) { + for (let outputFile of outputFiles) { + expect(outputFile).to.not.match(unnecessaryFolder); + } + } }) ); From ec6052e2318c055af38563390fae1a5eabfa8eb1 Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Fri, 22 Nov 2019 15:55:55 +0000 Subject: [PATCH 103/818] revert .ember-cli.js change because the file doesn't exist yet --- blueprints/addon/files/npmignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blueprints/addon/files/npmignore b/blueprints/addon/files/npmignore index 81cd0a6337..bd09adff92 100644 --- a/blueprints/addon/files/npmignore +++ b/blueprints/addon/files/npmignore @@ -8,7 +8,7 @@ # misc /.bowerrc /.editorconfig -/.ember-cli.js +/.ember-cli /.env* /.eslintignore /.eslintrc.js From d4b377c499583e98c802fd78fadefe9864efadee Mon Sep 17 00:00:00 2001 From: Thomas Wang Date: Mon, 15 Apr 2019 23:07:02 -0700 Subject: [PATCH 104/818] Modernize generate-from-blueprint.js --- lib/tasks/generate-from-blueprint.js | 67 +++++++++++++--------------- 1 file changed, 30 insertions(+), 37 deletions(-) diff --git a/lib/tasks/generate-from-blueprint.js b/lib/tasks/generate-from-blueprint.js index ae8f9d29a2..af939ab392 100644 --- a/lib/tasks/generate-from-blueprint.js +++ b/lib/tasks/generate-from-blueprint.js @@ -1,6 +1,5 @@ 'use strict'; -const Promise = require('rsvp').Promise; const Blueprint = require('../models/blueprint'); const Task = require('../models/task'); const parseOptions = require('../utilities/parse-options'); @@ -12,7 +11,7 @@ class GenerateTask extends Task { this.blueprintFunction = 'install'; } - run(options) { + async run(options) { let name = options.args[0]; let noAddonBlueprint = ['mixin', 'blueprint-test']; @@ -32,7 +31,7 @@ class GenerateTask extends Task { } if (options.ignoreMissingMain && !mainBlueprint) { - return Promise.resolve(); + return; } if (options.dummy) { @@ -62,40 +61,34 @@ class GenerateTask extends Task { blueprintOptions = merge(blueprintOptions, options || {}); - return mainBlueprint[this.blueprintFunction](blueprintOptions) - .then(() => { - if (!testBlueprint) { - return; - } - - if (testBlueprint.locals === Blueprint.prototype.locals) { - testBlueprint.locals = function(options) { - return mainBlueprint.locals(options); - }; - } - - let testBlueprintOptions = merge({}, blueprintOptions, { installingTest: true }); - - return testBlueprint[this.blueprintFunction](testBlueprintOptions); - }) - .then(() => { - if (!addonBlueprint || name.match(/-addon/)) { - return; - } - if (!this.project.isEmberCLIAddon() && blueprintOptions.inRepoAddon === null) { - return; - } - - if (addonBlueprint.locals === Blueprint.prototype.locals) { - addonBlueprint.locals = function(options) { - return mainBlueprint.locals(options); - }; - } - - let addonBlueprintOptions = merge({}, blueprintOptions, { installingAddon: true }); - - return addonBlueprint[this.blueprintFunction](addonBlueprintOptions); - }); + await mainBlueprint[this.blueprintFunction](blueprintOptions); + if (testBlueprint) { + if (testBlueprint.locals === Blueprint.prototype.locals) { + testBlueprint.locals = function(options) { + return mainBlueprint.locals(options); + }; + } + + let testBlueprintOptions = merge({}, blueprintOptions, { installingTest: true }); + await testBlueprint[this.blueprintFunction](testBlueprintOptions); + } + + if (!addonBlueprint || name.match(/-addon/)) { + return; + } + if (!this.project.isEmberCLIAddon() && blueprintOptions.inRepoAddon === null) { + return; + } + + if (addonBlueprint.locals === Blueprint.prototype.locals) { + addonBlueprint.locals = function(options) { + return mainBlueprint.locals(options); + }; + } + + let addonBlueprintOptions = merge({}, blueprintOptions, { installingAddon: true }); + + return addonBlueprint[this.blueprintFunction](addonBlueprintOptions); } lookupBlueprint(name, ignoreMissing) { From 1edb90a19a5767a9dfc54fe1dc0ba42a998e5067 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Nie=C5=BCurawski?= Date: Tue, 26 Nov 2019 10:49:10 +0100 Subject: [PATCH 105/818] Travis.yml: Remove deprecated `sudo: false` option --- blueprints/addon/files/.travis.yml | 1 - blueprints/app/files/.travis.yml | 1 - tests/fixtures/addon/npm/.travis.yml | 1 - tests/fixtures/addon/yarn/.travis.yml | 1 - tests/fixtures/app/npm/.travis.yml | 1 - tests/fixtures/app/yarn/.travis.yml | 1 - 6 files changed, 6 deletions(-) diff --git a/blueprints/addon/files/.travis.yml b/blueprints/addon/files/.travis.yml index a124617a30..86efbeec21 100644 --- a/blueprints/addon/files/.travis.yml +++ b/blueprints/addon/files/.travis.yml @@ -5,7 +5,6 @@ node_js: # so that your addon works for all apps - "8" -sudo: false dist: trusty addons: diff --git a/blueprints/app/files/.travis.yml b/blueprints/app/files/.travis.yml index f85d65a78a..cd094a3563 100644 --- a/blueprints/app/files/.travis.yml +++ b/blueprints/app/files/.travis.yml @@ -3,7 +3,6 @@ language: node_js node_js: - "8" -sudo: false dist: trusty addons: diff --git a/tests/fixtures/addon/npm/.travis.yml b/tests/fixtures/addon/npm/.travis.yml index a19c80a85e..b8434dec6d 100644 --- a/tests/fixtures/addon/npm/.travis.yml +++ b/tests/fixtures/addon/npm/.travis.yml @@ -5,7 +5,6 @@ node_js: # so that your addon works for all apps - "8" -sudo: false dist: trusty addons: diff --git a/tests/fixtures/addon/yarn/.travis.yml b/tests/fixtures/addon/yarn/.travis.yml index 5cf2b5e9b3..9e56574ba4 100644 --- a/tests/fixtures/addon/yarn/.travis.yml +++ b/tests/fixtures/addon/yarn/.travis.yml @@ -5,7 +5,6 @@ node_js: # so that your addon works for all apps - "8" -sudo: false dist: trusty addons: diff --git a/tests/fixtures/app/npm/.travis.yml b/tests/fixtures/app/npm/.travis.yml index abc5c88606..8339c408e1 100644 --- a/tests/fixtures/app/npm/.travis.yml +++ b/tests/fixtures/app/npm/.travis.yml @@ -3,7 +3,6 @@ language: node_js node_js: - "8" -sudo: false dist: trusty addons: diff --git a/tests/fixtures/app/yarn/.travis.yml b/tests/fixtures/app/yarn/.travis.yml index eaab6fbbad..b05f2ddbad 100644 --- a/tests/fixtures/app/yarn/.travis.yml +++ b/tests/fixtures/app/yarn/.travis.yml @@ -3,7 +3,6 @@ language: node_js node_js: - "8" -sudo: false dist: trusty addons: From a0ec0f470f886dc17c001917c03ae5f128ae08c2 Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Tue, 26 Nov 2019 10:53:47 +0000 Subject: [PATCH 106/818] fix floating deps test in npm --- blueprints/addon/files/.travis.yml | 6 +++--- tests/fixtures/addon/npm/.travis.yml | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/blueprints/addon/files/.travis.yml b/blueprints/addon/files/.travis.yml index a124617a30..a23598ce69 100644 --- a/blueprints/addon/files/.travis.yml +++ b/blueprints/addon/files/.travis.yml @@ -46,10 +46,10 @@ jobs: - name: "Floating Dependencies" install:<% if (yarn) { %> - - yarn install --no-lockfile --non-interactive - script: - - yarn test<% } else { %> + - yarn install --no-lockfile --non-interactive<% } else { %> - npm install --no-package-lock<% } %> + script: + - <% if (yarn) { %>yarn test<% } else { %>npm test<% } %> # we recommend new addons test the current and previous LTS # as well as latest stable release (bonus points to beta/canary) diff --git a/tests/fixtures/addon/npm/.travis.yml b/tests/fixtures/addon/npm/.travis.yml index a19c80a85e..45f6b8b71b 100644 --- a/tests/fixtures/addon/npm/.travis.yml +++ b/tests/fixtures/addon/npm/.travis.yml @@ -44,6 +44,8 @@ jobs: - name: "Floating Dependencies" install: - npm install --no-package-lock + script: + - npm test # we recommend new addons test the current and previous LTS # as well as latest stable release (bonus points to beta/canary) From d929eb85ce7f12b1d5275777d89f12058f9639d3 Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Tue, 26 Nov 2019 10:54:56 +0000 Subject: [PATCH 107/818] remove some duplication --- blueprints/addon/files/.travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/blueprints/addon/files/.travis.yml b/blueprints/addon/files/.travis.yml index a23598ce69..f394dc4acf 100644 --- a/blueprints/addon/files/.travis.yml +++ b/blueprints/addon/files/.travis.yml @@ -40,16 +40,16 @@ jobs: - stage: "Tests" name: "Tests" script: - - <% if (yarn) { %>yarn lint:hbs<% } else { %>npm run lint:hbs<% } %> - - <% if (yarn) { %>yarn lint:js<% } else { %>npm run lint:js<% } %> - - <% if (yarn) { %>yarn test<% } else { %>npm test<% } %> + - <% if (yarn) { %>yarn<% } else { %>npm run<% } %> lint:hbs + - <% if (yarn) { %>yarn<% } else { %>npm run<% } %> lint:js + - <% if (yarn) { %>yarn<% } else { %>npm<% } %> test - name: "Floating Dependencies" install:<% if (yarn) { %> - yarn install --no-lockfile --non-interactive<% } else { %> - npm install --no-package-lock<% } %> script: - - <% if (yarn) { %>yarn test<% } else { %>npm test<% } %> + - <% if (yarn) { %>yarn<% } else { %>npm<% } %> test # we recommend new addons test the current and previous LTS # as well as latest stable release (bonus points to beta/canary) From 4db099f9f16d46229389ba8bf640c93287b54a57 Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Tue, 26 Nov 2019 11:01:52 +0000 Subject: [PATCH 108/818] move floating deps into later stage --- blueprints/addon/files/.travis.yml | 7 +++---- tests/fixtures/addon/npm/.travis.yml | 7 +++---- tests/fixtures/addon/yarn/.travis.yml | 7 +++---- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/blueprints/addon/files/.travis.yml b/blueprints/addon/files/.travis.yml index f394dc4acf..636fa962d9 100644 --- a/blueprints/addon/files/.travis.yml +++ b/blueprints/addon/files/.travis.yml @@ -36,7 +36,6 @@ jobs: include: # runs linting and tests with current locked deps - - stage: "Tests" name: "Tests" script: @@ -44,7 +43,8 @@ jobs: - <% if (yarn) { %>yarn<% } else { %>npm run<% } %> lint:js - <% if (yarn) { %>yarn<% } else { %>npm<% } %> test - - name: "Floating Dependencies" + - stage: "Additional Tests" + name: "Floating Dependencies" install:<% if (yarn) { %> - yarn install --no-lockfile --non-interactive<% } else { %> - npm install --no-package-lock<% } %> @@ -53,8 +53,7 @@ jobs: # we recommend new addons test the current and previous LTS # as well as latest stable release (bonus points to beta/canary) - - stage: "Additional Tests" - env: EMBER_TRY_SCENARIO=ember-lts-3.4 + - env: EMBER_TRY_SCENARIO=ember-lts-3.4 - env: EMBER_TRY_SCENARIO=ember-lts-3.8 - env: EMBER_TRY_SCENARIO=ember-release - env: EMBER_TRY_SCENARIO=ember-beta diff --git a/tests/fixtures/addon/npm/.travis.yml b/tests/fixtures/addon/npm/.travis.yml index 45f6b8b71b..c1b82532d6 100644 --- a/tests/fixtures/addon/npm/.travis.yml +++ b/tests/fixtures/addon/npm/.travis.yml @@ -33,7 +33,6 @@ jobs: include: # runs linting and tests with current locked deps - - stage: "Tests" name: "Tests" script: @@ -41,7 +40,8 @@ jobs: - npm run lint:js - npm test - - name: "Floating Dependencies" + - stage: "Additional Tests" + name: "Floating Dependencies" install: - npm install --no-package-lock script: @@ -49,8 +49,7 @@ jobs: # we recommend new addons test the current and previous LTS # as well as latest stable release (bonus points to beta/canary) - - stage: "Additional Tests" - env: EMBER_TRY_SCENARIO=ember-lts-3.4 + - env: EMBER_TRY_SCENARIO=ember-lts-3.4 - env: EMBER_TRY_SCENARIO=ember-lts-3.8 - env: EMBER_TRY_SCENARIO=ember-release - env: EMBER_TRY_SCENARIO=ember-beta diff --git a/tests/fixtures/addon/yarn/.travis.yml b/tests/fixtures/addon/yarn/.travis.yml index 5cf2b5e9b3..3224cb57d0 100644 --- a/tests/fixtures/addon/yarn/.travis.yml +++ b/tests/fixtures/addon/yarn/.travis.yml @@ -32,7 +32,6 @@ jobs: include: # runs linting and tests with current locked deps - - stage: "Tests" name: "Tests" script: @@ -40,7 +39,8 @@ jobs: - yarn lint:js - yarn test - - name: "Floating Dependencies" + - stage: "Additional Tests" + name: "Floating Dependencies" install: - yarn install --no-lockfile --non-interactive script: @@ -48,8 +48,7 @@ jobs: # we recommend new addons test the current and previous LTS # as well as latest stable release (bonus points to beta/canary) - - stage: "Additional Tests" - env: EMBER_TRY_SCENARIO=ember-lts-3.4 + - env: EMBER_TRY_SCENARIO=ember-lts-3.4 - env: EMBER_TRY_SCENARIO=ember-lts-3.8 - env: EMBER_TRY_SCENARIO=ember-release - env: EMBER_TRY_SCENARIO=ember-beta From d3fa91affaf676cbaaba162bf7653dc0bb33d81e Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Tue, 26 Nov 2019 11:12:57 +0000 Subject: [PATCH 109/818] replace addon testing ember 3.4 for 3.12 --- blueprints/addon/files/.travis.yml | 4 ++-- blueprints/addon/files/README.md | 2 +- blueprints/addon/files/addon-config/ember-try.js | 8 ++++---- tests/fixtures/addon/npm/.travis.yml | 4 ++-- tests/fixtures/addon/npm/README.md | 2 +- tests/fixtures/addon/npm/config/ember-try.js | 8 ++++---- tests/fixtures/addon/yarn/.travis.yml | 4 ++-- tests/fixtures/addon/yarn/README.md | 2 +- tests/fixtures/addon/yarn/config/ember-try.js | 8 ++++---- 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/blueprints/addon/files/.travis.yml b/blueprints/addon/files/.travis.yml index e4a1ab6062..8a0d2277c9 100644 --- a/blueprints/addon/files/.travis.yml +++ b/blueprints/addon/files/.travis.yml @@ -53,8 +53,8 @@ jobs: # we recommend new addons test the current and previous LTS # as well as latest stable release (bonus points to beta/canary) - stage: "Additional Tests" - env: EMBER_TRY_SCENARIO=ember-lts-3.4 - - env: EMBER_TRY_SCENARIO=ember-lts-3.8 + env: EMBER_TRY_SCENARIO=ember-lts-3.8 + - env: EMBER_TRY_SCENARIO=ember-lts-3.12 - env: EMBER_TRY_SCENARIO=ember-release - env: EMBER_TRY_SCENARIO=ember-beta - env: EMBER_TRY_SCENARIO=ember-canary diff --git a/blueprints/addon/files/README.md b/blueprints/addon/files/README.md index 3c8113c5bb..8aa57ce247 100644 --- a/blueprints/addon/files/README.md +++ b/blueprints/addon/files/README.md @@ -7,7 +7,7 @@ Compatibility ------------------------------------------------------------------------------ -* Ember.js v3.4 or above +* Ember.js v3.8 or above * Ember CLI v2.13 or above * Node.js v8 or above diff --git a/blueprints/addon/files/addon-config/ember-try.js b/blueprints/addon/files/addon-config/ember-try.js index 17e3904195..614db394c1 100644 --- a/blueprints/addon/files/addon-config/ember-try.js +++ b/blueprints/addon/files/addon-config/ember-try.js @@ -7,18 +7,18 @@ module.exports = async function() { <% if (yarn) { %>useYarn: true, <% } %>scenarios: [ { - name: 'ember-lts-3.4', + name: 'ember-lts-3.8', npm: { devDependencies: { - 'ember-source': '~3.4.0' + 'ember-source': '~3.8.0' } } }, { - name: 'ember-lts-3.8', + name: 'ember-lts-3.12', npm: { devDependencies: { - 'ember-source': '~3.8.0' + 'ember-source': '~3.12.0' } } }, diff --git a/tests/fixtures/addon/npm/.travis.yml b/tests/fixtures/addon/npm/.travis.yml index a45eb4a560..5c52058ae6 100644 --- a/tests/fixtures/addon/npm/.travis.yml +++ b/tests/fixtures/addon/npm/.travis.yml @@ -44,8 +44,8 @@ jobs: # we recommend new addons test the current and previous LTS # as well as latest stable release (bonus points to beta/canary) - stage: "Additional Tests" - env: EMBER_TRY_SCENARIO=ember-lts-3.4 - - env: EMBER_TRY_SCENARIO=ember-lts-3.8 + env: EMBER_TRY_SCENARIO=ember-lts-3.8 + - env: EMBER_TRY_SCENARIO=ember-lts-3.12 - env: EMBER_TRY_SCENARIO=ember-release - env: EMBER_TRY_SCENARIO=ember-beta - env: EMBER_TRY_SCENARIO=ember-canary diff --git a/tests/fixtures/addon/npm/README.md b/tests/fixtures/addon/npm/README.md index 36bd8fd416..1ab7118acf 100644 --- a/tests/fixtures/addon/npm/README.md +++ b/tests/fixtures/addon/npm/README.md @@ -7,7 +7,7 @@ foo Compatibility ------------------------------------------------------------------------------ -* Ember.js v3.4 or above +* Ember.js v3.8 or above * Ember CLI v2.13 or above * Node.js v8 or above diff --git a/tests/fixtures/addon/npm/config/ember-try.js b/tests/fixtures/addon/npm/config/ember-try.js index b2a665182f..4ac1661824 100644 --- a/tests/fixtures/addon/npm/config/ember-try.js +++ b/tests/fixtures/addon/npm/config/ember-try.js @@ -6,18 +6,18 @@ module.exports = async function() { return { scenarios: [ { - name: 'ember-lts-3.4', + name: 'ember-lts-3.8', npm: { devDependencies: { - 'ember-source': '~3.4.0' + 'ember-source': '~3.8.0' } } }, { - name: 'ember-lts-3.8', + name: 'ember-lts-3.12', npm: { devDependencies: { - 'ember-source': '~3.8.0' + 'ember-source': '~3.12.0' } } }, diff --git a/tests/fixtures/addon/yarn/.travis.yml b/tests/fixtures/addon/yarn/.travis.yml index ab3e592e53..8b390693fb 100644 --- a/tests/fixtures/addon/yarn/.travis.yml +++ b/tests/fixtures/addon/yarn/.travis.yml @@ -49,8 +49,8 @@ jobs: # we recommend new addons test the current and previous LTS # as well as latest stable release (bonus points to beta/canary) - stage: "Additional Tests" - env: EMBER_TRY_SCENARIO=ember-lts-3.4 - - env: EMBER_TRY_SCENARIO=ember-lts-3.8 + env: EMBER_TRY_SCENARIO=ember-lts-3.8 + - env: EMBER_TRY_SCENARIO=ember-lts-3.12 - env: EMBER_TRY_SCENARIO=ember-release - env: EMBER_TRY_SCENARIO=ember-beta - env: EMBER_TRY_SCENARIO=ember-canary diff --git a/tests/fixtures/addon/yarn/README.md b/tests/fixtures/addon/yarn/README.md index 36bd8fd416..1ab7118acf 100644 --- a/tests/fixtures/addon/yarn/README.md +++ b/tests/fixtures/addon/yarn/README.md @@ -7,7 +7,7 @@ foo Compatibility ------------------------------------------------------------------------------ -* Ember.js v3.4 or above +* Ember.js v3.8 or above * Ember CLI v2.13 or above * Node.js v8 or above diff --git a/tests/fixtures/addon/yarn/config/ember-try.js b/tests/fixtures/addon/yarn/config/ember-try.js index c1d83d6f42..94f8e969a6 100644 --- a/tests/fixtures/addon/yarn/config/ember-try.js +++ b/tests/fixtures/addon/yarn/config/ember-try.js @@ -7,18 +7,18 @@ module.exports = async function() { useYarn: true, scenarios: [ { - name: 'ember-lts-3.4', + name: 'ember-lts-3.8', npm: { devDependencies: { - 'ember-source': '~3.4.0' + 'ember-source': '~3.8.0' } } }, { - name: 'ember-lts-3.8', + name: 'ember-lts-3.12', npm: { devDependencies: { - 'ember-source': '~3.8.0' + 'ember-source': '~3.12.0' } } }, From 1c74a91c2ab45ca31d9e72fe51685b0aa2d099ea Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Sun, 1 Dec 2019 18:50:33 +0100 Subject: [PATCH 110/818] Add GitHub Actions CI workflow --- .github/workflows/ci.yml | 109 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..f95355ac90 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,109 @@ +name: CI + +on: + push: + branches: + - master + - beta + - release + - next + - 'v*' + - 'release-*' + - 'lts-*' + pull_request: + schedule: + - cron: '0 3 * * *' # daily, at 3am + +jobs: + basic-tests: + name: Basic Tests + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 12.x + + - name: get yarn cache dir + id: yarn-cache + run: echo "::set-output name=dir::$(yarn cache dir)" + + - uses: actions/cache@v1 + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - run: yarn install + - run: yarn lint + - run: yarn test + + tests: + name: Node.js ${{ matrix.node-version }} + runs-on: ubuntu-latest + + needs: [basic-tests] + + strategy: + matrix: + node-version: [8.x, 10.x, 12.x] + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + - name: get yarn cache dir + id: yarn-cache + run: echo "::set-output name=dir::$(yarn cache dir)" + + - uses: actions/cache@v1 + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - run: yarn install + - run: yarn test:all + + feature-flags: + name: "Feature Flag: ${{ matrix.feature-flag }}" + runs-on: ubuntu-latest + + needs: [basic-tests] + + strategy: + matrix: + feature-flag: + - EMBER_CLI_ENABLE_ALL_EXPERIMENTS + - EMBER_CLI_PACKAGER + - EMBER_CLI_MODULE_UNIFICATION + - EMBER_CLI_DELAYED_TRANSPILATION + - EMBER_CLI_SYSTEM_TEMP= + - EMBER_CLI_BROCCOLI_WATCHER + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 12.x + + - name: get yarn cache dir + id: yarn-cache + run: echo "::set-output name=dir::$(yarn cache dir)" + + - uses: actions/cache@v1 + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - run: yarn install + - run: yarn test:all + env: + ${{ matrix.feature-flag }}: true From de6a395bddecfd0b92657cbf99efd379982c9832 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2019 04:37:13 +0000 Subject: [PATCH 111/818] Bump git-repo-info from 2.1.0 to 2.1.1 (#8950) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 001929b484..d995c45304 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "fs-extra": "^8.1.0", "fs-tree-diff": "^2.0.1", "get-caller-file": "^2.0.5", - "git-repo-info": "^2.1.0", + "git-repo-info": "^2.1.1", "glob": "^7.1.4", "heimdalljs": "^0.2.6", "heimdalljs-fs-monitor": "^0.2.3", diff --git a/yarn.lock b/yarn.lock index 1bde78b6a0..ee806faa7b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2827,10 +2827,10 @@ get-value@^2.0.3, get-value@^2.0.6: resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= -git-repo-info@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/git-repo-info/-/git-repo-info-2.1.0.tgz#13d1f753c75bc2994432e65a71e35377ff563813" - integrity sha512-+kigfDB7j3W80f74BoOUX+lKOmf4pR3/i2Ww6baKTCPe2hD4FRdjhV3s4P5Dy0Tak1uY1891QhKoYNtnyX2VvA== +git-repo-info@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/git-repo-info/-/git-repo-info-2.1.1.tgz#220ffed8cbae74ef8a80e3052f2ccb5179aed058" + integrity sha512-8aCohiDo4jwjOwma4FmYFd3i97urZulL8XL24nIPxuE+GZnfsAyy/g2Shqx6OjUiFKUXZM+Yy+KHnOmmA3FVcg== glob@7.1.3: version "7.1.3" From ace662e93acfc79f887b151f645e137b14936c87 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2019 06:00:28 +0000 Subject: [PATCH 112/818] Bump eslint-config-prettier from 6.4.0 to 6.7.0 (#8951) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index d995c45304..eef55f05d9 100644 --- a/package.json +++ b/package.json @@ -140,7 +140,7 @@ "ember-cli-blueprint-test-helpers": "^0.19.2", "ember-cli-internal-test-helpers": "^0.9.1", "eslint": "^5.16.0", - "eslint-config-prettier": "^6.4.0", + "eslint-config-prettier": "^6.7.0", "eslint-plugin-chai-expect": "^2.0.1", "eslint-plugin-mocha": "^6.1.1", "eslint-plugin-node": "^10.0.0", diff --git a/yarn.lock b/yarn.lock index ee806faa7b..f7d0fcc00f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2072,10 +2072,10 @@ escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1 resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= -eslint-config-prettier@^6.4.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.4.0.tgz#0a04f147e31d33c6c161b2dd0971418ac52d0477" - integrity sha512-YrKucoFdc7SEko5Sxe4r6ixqXPDP1tunGw91POeZTTRKItf/AMFYt/YLEQtZMkR2LVpAVhcAcZgcWpm1oGPW7w== +eslint-config-prettier@^6.7.0: + version "6.7.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.7.0.tgz#9a876952e12df2b284adbd3440994bf1f39dfbb9" + integrity sha512-FamQVKM3jjUVwhG4hEMnbtsq7xOIDm+SY5iBPfR8gKsJoAB2IQnNF+bk1+8Fy44Nq7PPJaLvkRxILYdJWoguKQ== dependencies: get-stdin "^6.0.0" From af7ff81e66bb382f5aa992be78598aa50e909dc2 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 3 Dec 2019 06:07:16 +0000 Subject: [PATCH 113/818] Bump broccoli-middleware from 2.1.0 to 2.1.1 (#8955) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index eef55f05d9..f6655d8375 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "broccoli-funnel": "^2.0.2", "broccoli-funnel-reducer": "^1.0.0", "broccoli-merge-trees": "^3.0.2", - "broccoli-middleware": "^2.1.0", + "broccoli-middleware": "^2.1.1", "broccoli-module-normalizer": "^1.3.0", "broccoli-module-unification-reexporter": "^1.0.0", "broccoli-slow-trees": "^3.0.1", diff --git a/yarn.lock b/yarn.lock index f7d0fcc00f..f3a2936618 100644 --- a/yarn.lock +++ b/yarn.lock @@ -897,10 +897,10 @@ broccoli-merge-trees@^3.0.1, broccoli-merge-trees@^3.0.2: broccoli-plugin "^1.3.0" merge-trees "^2.0.0" -broccoli-middleware@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/broccoli-middleware/-/broccoli-middleware-2.1.0.tgz#cbb458cb6360bdd79aa75a54057f10fe918157e6" - integrity sha512-ymuDaxQBKG51hKfAeDf8G0Y70rRSPS5Pu77u5HO0YsYTSSAjdZuYT2ALIlWTm+MFXYRQJIlMsqDdDNBzsvy0BQ== +broccoli-middleware@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/broccoli-middleware/-/broccoli-middleware-2.1.1.tgz#183635bbef4dc1241533ee001a162f013d776cb9" + integrity sha512-BK8aPhQpOLsHWiftrqXQr84XsvzUqeaN4PlCQOYg5yM0M+WKAHtX2WFXmicSQZOVgKDyh5aeoNTFkHjBAEBzwQ== dependencies: ansi-html "^0.0.7" handlebars "^4.0.4" From ca30f16bf5abe9a46f3726f715806621fb0df65c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Nie=C5=BCurawski?= Date: Tue, 26 Nov 2019 10:08:06 +0100 Subject: [PATCH 114/818] Travis.yml: use fast_finish instead of undocumented fail_fast --- blueprints/addon/files/.travis.yml | 2 +- tests/fixtures/addon/npm/.travis.yml | 2 +- tests/fixtures/addon/yarn/.travis.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/blueprints/addon/files/.travis.yml b/blueprints/addon/files/.travis.yml index 94a99847f4..f304fdc46a 100644 --- a/blueprints/addon/files/.travis.yml +++ b/blueprints/addon/files/.travis.yml @@ -29,7 +29,7 @@ branches: - /^v\d+\.\d+\.\d+/ jobs: - fail_fast: true + fast_finish: true allow_failures: - env: EMBER_TRY_SCENARIO=ember-canary diff --git a/tests/fixtures/addon/npm/.travis.yml b/tests/fixtures/addon/npm/.travis.yml index 9a5ca3dfe9..591494caeb 100644 --- a/tests/fixtures/addon/npm/.travis.yml +++ b/tests/fixtures/addon/npm/.travis.yml @@ -26,7 +26,7 @@ branches: - /^v\d+\.\d+\.\d+/ jobs: - fail_fast: true + fast_finish: true allow_failures: - env: EMBER_TRY_SCENARIO=ember-canary diff --git a/tests/fixtures/addon/yarn/.travis.yml b/tests/fixtures/addon/yarn/.travis.yml index 244783ddbe..0f5e4db21b 100644 --- a/tests/fixtures/addon/yarn/.travis.yml +++ b/tests/fixtures/addon/yarn/.travis.yml @@ -25,7 +25,7 @@ branches: - /^v\d+\.\d+\.\d+/ jobs: - fail_fast: true + fast_finish: true allow_failures: - env: EMBER_TRY_SCENARIO=ember-canary From 1652f93ed738168c9a0ce0b25e36063d5f99043c Mon Sep 17 00:00:00 2001 From: "Quinn C. Hoyer" Date: Tue, 5 Nov 2019 10:46:16 -0800 Subject: [PATCH 115/818] Supply a more universal .ui Addon packageInfos do not have a project. All packageInfos have a cache.ui --- lib/models/package-info-cache/package-info.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/models/package-info-cache/package-info.js b/lib/models/package-info-cache/package-info.js index d2c383ad3a..dca22a3645 100644 --- a/lib/models/package-info-cache/package-info.js +++ b/lib/models/package-info-cache/package-info.js @@ -363,7 +363,7 @@ class PackageInfo { if (process.env.EMBER_CLI_ERROR_ON_INVALID_ADDON) { throw msg; } else { - this.project.ui.writeWarnLine(msg); + this.cache.ui.writeWarnLine(msg); } } } From df46158dc37b92073ef38b82f1138796cc433ced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Buscht=C3=B6ns?= Date: Thu, 14 Nov 2019 17:54:07 +0100 Subject: [PATCH 116/818] feat(blueprint): allow cloning git repo with ref --- lib/tasks/install-blueprint.js | 19 ++++++++++++++++++- tests/acceptance/new-test.js | 18 ++++++++++++++++++ tests/unit/utilities/git-repo-test.js | 7 +++++++ 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/lib/tasks/install-blueprint.js b/lib/tasks/install-blueprint.js index b07a427920..2f35f75a64 100644 --- a/lib/tasks/install-blueprint.js +++ b/lib/tasks/install-blueprint.js @@ -108,7 +108,24 @@ class InstallBlueprintTask extends Task { _gitClone(source, destination) { logger.info(`Cloning from git (${source}) into "${destination}" ...`); - return execa('git', ['clone', source, destination]); + + let [, repo, ref] = /^(.+?)(?:\#([-\d\w._]+))?$/.exec(source); + + let args = [ + 'clone', + // We only care about the selected branch. (default: master) + '--single-branch', + // We're not interested in the full history. + '--depth', + '1', + ]; + + // Checkout the given ref. Can be branch, tag or commit sha. + if (ref) args.push('--branch', ref); + + args.push(repo, destination); + + return execa('git', args); } _npmInstall(cwd) { diff --git a/tests/acceptance/new-test.js b/tests/acceptance/new-test.js index 1f84254e05..22d48963e5 100644 --- a/tests/acceptance/new-test.js +++ b/tests/acceptance/new-test.js @@ -234,6 +234,24 @@ describe('Acceptance: ember new', function() { }) ); + it( + 'ember new with git blueprint and ref checks out the blueprint with the correct ref and uses it', + co.wrap(function*() { + this.timeout(20000); // relies on GH network stuff + + yield ember([ + 'new', + 'foo', + '--skip-npm', + '--skip-bower', + '--skip-git', + '--blueprint=https://github.com/buschtoens/app-blueprint-test.git#named-ref', + ]); + + expect(file('.named-ref')).to.exist; + }) + ); + it( 'ember new passes blueprint options through to blueprint', co.wrap(function*() { diff --git a/tests/unit/utilities/git-repo-test.js b/tests/unit/utilities/git-repo-test.js index 12df4c71d6..1448162d78 100644 --- a/tests/unit/utilities/git-repo-test.js +++ b/tests/unit/utilities/git-repo-test.js @@ -5,9 +5,16 @@ const expect = require('chai').expect; describe('is-git-url', function() { it('recognizes git-style urls in various formats', function() { + // without ref expect(isGitRepo('https://github.com/trek/app-blueprint-test.git')).to.be.ok; expect(isGitRepo('git@github.com:trek/app-blueprint-test.git')).to.be.ok; expect(isGitRepo('git+ssh://user@server/project.git')).to.be.ok; expect(isGitRepo('git+https://user@server/project.git')).to.be.ok; + + // with ref + expect(isGitRepo('https://github.com/trek/app-blueprint-test.git#named-ref')).to.be.ok; + expect(isGitRepo('git@github.com:trek/app-blueprint-test.git#named-ref')).to.be.ok; + expect(isGitRepo('git+ssh://user@server/project.git#named-ref')).to.be.ok; + expect(isGitRepo('git+https://user@server/project.git#named-ref')).to.be.ok; }); }); From d7d9237b1f146ae8f4da905c594f7b91bbcc9f8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Buscht=C3=B6ns?= Date: Thu, 14 Nov 2019 18:07:29 +0100 Subject: [PATCH 117/818] style(blueprint): fix linting issues --- lib/tasks/install-blueprint.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/tasks/install-blueprint.js b/lib/tasks/install-blueprint.js index 2f35f75a64..c3d2f8b5ae 100644 --- a/lib/tasks/install-blueprint.js +++ b/lib/tasks/install-blueprint.js @@ -109,7 +109,7 @@ class InstallBlueprintTask extends Task { _gitClone(source, destination) { logger.info(`Cloning from git (${source}) into "${destination}" ...`); - let [, repo, ref] = /^(.+?)(?:\#([-\d\w._]+))?$/.exec(source); + let [, repo, ref] = /^(.+?)(?:#([-\d\w._]+))?$/.exec(source); let args = [ 'clone', @@ -121,7 +121,9 @@ class InstallBlueprintTask extends Task { ]; // Checkout the given ref. Can be branch, tag or commit sha. - if (ref) args.push('--branch', ref); + if (ref) { + args.push('--branch', ref); + } args.push(repo, destination); From 92c354bacb13af1751dfc1c9e5482b1a9e02d7b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Buscht=C3=B6ns?= Date: Fri, 15 Nov 2019 02:07:44 +0100 Subject: [PATCH 118/818] test (blueprint): use official `app-blueprint-test` --- tests/acceptance/new-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/acceptance/new-test.js b/tests/acceptance/new-test.js index 22d48963e5..4718d111dd 100644 --- a/tests/acceptance/new-test.js +++ b/tests/acceptance/new-test.js @@ -245,7 +245,7 @@ describe('Acceptance: ember new', function() { '--skip-npm', '--skip-bower', '--skip-git', - '--blueprint=https://github.com/buschtoens/app-blueprint-test.git#named-ref', + '--blueprint=https://github.com/ember-cli/app-blueprint-test.git#named-ref', ]); expect(file('.named-ref')).to.exist; From 804ff0679be4c23a86c173f03b9f85bc59b0f76f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Buscht=C3=B6ns?= Date: Mon, 25 Nov 2019 16:57:26 +0100 Subject: [PATCH 119/818] feat(blueprint): resolve remote blueprints via package manager --- lib/tasks/install-blueprint.js | 94 +++++++++++++--------------------- 1 file changed, 36 insertions(+), 58 deletions(-) diff --git a/lib/tasks/install-blueprint.js b/lib/tasks/install-blueprint.js index c3d2f8b5ae..2fc43e788b 100644 --- a/lib/tasks/install-blueprint.js +++ b/lib/tasks/install-blueprint.js @@ -4,7 +4,6 @@ const fs = require('fs-extra'); const Blueprint = require('../models/blueprint'); const Task = require('../models/task'); const RSVP = require('rsvp'); -const isGitRepo = require('is-git-url'); const temp = require('temp'); const path = require('path'); const merge = require('ember-cli-lodash-subset').merge; @@ -54,19 +53,11 @@ class InstallBlueprintTask extends Task { name = name || 'app'; logger.info(`Resolving blueprint "${name}" ...`); - if (!isGitRepo(name)) { - return this._lookupBlueprint(name).catch(error => this._handleLookupFailure(name, error)); - } - - return this._createTempFolder().then(pathName => - this._gitClone(name, pathName) - .then(() => this._npmInstall(pathName)) - .then(() => this._loadBlueprintFromPath(pathName)) - ); + return this._lookupLocalBlueprint(name).catch(error => this._handleLocalLookupFailure(name, error)); } - _lookupBlueprint(name) { - logger.info(`Looking up blueprint "${name}" ...`); + _lookupLocalBlueprint(name) { + logger.info(`Looking up blueprint "${name}" locally...`); return RSVP.resolve().then(() => Blueprint.lookup(name, { paths: this.project.blueprintLookupPaths(), @@ -74,60 +65,55 @@ class InstallBlueprintTask extends Task { ); } - _handleLookupFailure(name, error) { - logger.info(`Blueprint lookup for "${name}" failed`); + _handleLocalLookupFailure(name, error) { + logger.info(`Local blueprint lookup for "${name}" failed`); - let parsed; + let packageDescriptor; try { - parsed = npa(name); + packageDescriptor = npa(name); } catch (err) { - logger.info(`"${name} is not a valid npm package name -> rethrowing original error`); + logger.info(`"${name} is not a valid npm package specifier -> rethrowing original error`); throw error; } - logger.info(`"${name} is a valid npm package name -> trying npm`); - return this._tryNpmBlueprint(parsed.name, parsed.fetchSpec); + logger.info(`"${name} is a valid npm package specifier -> trying npm`); + return this._tryRemoteBlueprint(packageDescriptor); } - _tryNpmBlueprint(nameWithoutVersion, version) { - return this._createTempFolder() - .then(pathName => - this._npmInstallModule(nameWithoutVersion, version, pathName).catch(error => - this._handleNpmInstallModuleError(error) - ) - ) - .then(modulePath => { - this._validateNpmModule(modulePath, nameWithoutVersion); - return this._loadBlueprintFromPath(modulePath); - }); + async _tryRemoteBlueprint(packageDescriptor) { + let tmpDir = await this._createTempFolder(); + let packageName = await this._createPackageJSON(tmpDir, packageDescriptor); + + try { + await this._npmInstall(tmpDir); + } catch (error) { + this._handleNpmInstallModuleError(error); // re-throws + } + + let blueprintPath = path.resolve(tmpDir, 'node_modules', packageName); + this._validateNpmModule(blueprintPath, packageName); + + return this._loadBlueprintFromPath(blueprintPath); } _createTempFolder() { return mkdirTemp('ember-cli'); } - _gitClone(source, destination) { - logger.info(`Cloning from git (${source}) into "${destination}" ...`); - - let [, repo, ref] = /^(.+?)(?:#([-\d\w._]+))?$/.exec(source); + async _createPackageJSON(tempProjectPath, descriptor) { + let packageName = descriptor.name || `ember-cli-blueprint-${Date.now()}`; + let specifier = descriptor.saveSpec || descriptor.fetchSpec; - let args = [ - 'clone', - // We only care about the selected branch. (default: master) - '--single-branch', - // We're not interested in the full history. - '--depth', - '1', - ]; - - // Checkout the given ref. Can be branch, tag or commit sha. - if (ref) { - args.push('--branch', ref); - } - - args.push(repo, destination); + await fs.writeFile( + path.resolve(tempProjectPath, 'package.json'), + JSON.stringify({ + dependencies: { + [packageName]: specifier, + }, + }) + ); - return execa('git', args); + return packageName; } _npmInstall(cwd) { @@ -137,14 +123,6 @@ class InstallBlueprintTask extends Task { return execa('npm', ['install'], { cwd }); } - _npmInstallModule(nameWithoutVersion, version, cwd) { - let module = `${nameWithoutVersion}@${version}`; - logger.info(`Running "npm install ${module}" in "${cwd}" ...`); - - this._copyNpmrc(cwd); - return execa('npm', ['install', module], { cwd }).then(() => path.join(cwd, 'node_modules', nameWithoutVersion)); - } - _handleNpmInstallModuleError(error) { let match = error.stderr && error.stderr.match(NOT_FOUND_REGEXP); if (match) { From cba3b50d269c7f6059cdfd994cee649134a6f52d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Buscht=C3=B6ns?= Date: Mon, 25 Nov 2019 17:03:02 +0100 Subject: [PATCH 120/818] test(blueprint): add git shorthand --- tests/acceptance/new-test.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/acceptance/new-test.js b/tests/acceptance/new-test.js index 4718d111dd..055fe423cd 100644 --- a/tests/acceptance/new-test.js +++ b/tests/acceptance/new-test.js @@ -252,6 +252,24 @@ describe('Acceptance: ember new', function() { }) ); + it( + 'ember new with shorthand git blueprint and ref checks out the blueprint with the correct ref and uses it', + co.wrap(function*() { + this.timeout(20000); // relies on GH network stuff + + yield ember([ + 'new', + 'foo', + '--skip-npm', + '--skip-bower', + '--skip-git', + '--blueprint=ember-cli/app-blueprint-test#named-ref', + ]); + + expect(file('.named-ref')).to.exist; + }) + ); + it( 'ember new passes blueprint options through to blueprint', co.wrap(function*() { From 243a24f5382255d1cb95fea6c2d5386832c8f224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Buscht=C3=B6ns?= Date: Wed, 27 Nov 2019 10:58:52 +0100 Subject: [PATCH 121/818] test(blueprint): remove `install-blueprint` unit test --- tests/unit/tasks/install-blueprint-test.js | 239 --------------------- 1 file changed, 239 deletions(-) delete mode 100644 tests/unit/tasks/install-blueprint-test.js diff --git a/tests/unit/tasks/install-blueprint-test.js b/tests/unit/tasks/install-blueprint-test.js deleted file mode 100644 index c9c7e854d9..0000000000 --- a/tests/unit/tasks/install-blueprint-test.js +++ /dev/null @@ -1,239 +0,0 @@ -'use strict'; - -const path = require('path'); -const fs = require('fs-extra'); -const td = require('testdouble'); -const SilentError = require('silent-error'); - -const expect = require('../../chai').expect; -const mkTmpDirIn = require('../../../lib/utilities/mk-tmp-dir-in'); -const InstallBlueprintTask = require('../../../lib/tasks/install-blueprint'); - -let root = path.join(__dirname, '../../..'); -let tmproot = path.join(root, 'tmp'); - -describe('InstallBlueprintTask', function() { - let task; - beforeEach(function() { - task = new InstallBlueprintTask(); - }); - - describe('_resolveBlueprint', function() { - beforeEach(function() { - task._lookupBlueprint = td.function(); - task._tryNpmBlueprint = td.function(); - task._createTempFolder = td.function(); - task._gitClone = td.function(); - task._npmInstall = td.function(); - task._loadBlueprintFromPath = td.function(); - - task._tempPath = '/tmp/foobar'; - td.when(task._createTempFolder()).thenResolve(task._tempPath); - }); - - it('resolves "foobar" by looking up the "foobar" blueprint locally', async function() { - let foobarBlueprint = { name: 'foobar blueprint' }; - td.when(task._lookupBlueprint('foobar')).thenResolve(foobarBlueprint); - - expect(await task._resolveBlueprint('foobar')).to.equal(foobarBlueprint); - }); - - it('rejects invalid npm package name "foo:bar"', async function() { - let error = new Error('foobar not found'); - td.when(task._lookupBlueprint('foo:bar')).thenReject(error); - - await expect(task._resolveBlueprint('foo:bar')).to.be.rejectedWith(error); - }); - - it('tries to resolve "foobar" as npm package as a fallback', async function() { - let error = new Error('foobar not found'); - td.when(task._lookupBlueprint('foobar')).thenReject(error); - - let foobarBlueprint = { name: 'foobar npm blueprint' }; - td.when(task._tryNpmBlueprint('foobar', 'latest')).thenResolve(foobarBlueprint); - - expect(await task._resolveBlueprint('foobar')).to.equal(foobarBlueprint); - }); - - it('tries to resolve "@foo/bar@1.2.3" as npm package with a scope and a version', async function() { - let error = new Error('@foo/bar@1.2.3 not found'); - td.when(task._lookupBlueprint('@foo/bar@1.2.3')).thenReject(error); - - let foobarBlueprint = { name: 'foobar npm blueprint' }; - td.when(task._tryNpmBlueprint('@foo/bar', '1.2.3')).thenResolve(foobarBlueprint); - - expect(await task._resolveBlueprint('@foo/bar@1.2.3')).to.equal(foobarBlueprint); - }); - - it('rejects if npm module resolution failed', async function() { - let error = new Error('foobar not found'); - td.when(task._lookupBlueprint('foobar')).thenReject(error); - - let npmError = new Error('npm failure'); - td.when(task._tryNpmBlueprint('foobar', 'latest')).thenReject(npmError); - - await expect(task._resolveBlueprint('foobar')).to.be.rejectedWith(npmError); - }); - - it( - 'resolves "https://github.com/ember-cli/app-blueprint-test.git" blueprint by cloning, ' + - 'installing dependencies and loading the blueprint', - async function() { - let url = 'https://github.com/ember-cli/app-blueprint-test.git'; - let gitBlueprint = { name: 'git blueprint' }; - td.when(task._gitClone(url, task._tempPath)).thenResolve(); - td.when(task._npmInstall(task._tempPath)).thenResolve(); - td.when(task._loadBlueprintFromPath(task._tempPath)).thenResolve(gitBlueprint); - - expect(await task._resolveBlueprint(url)).to.equal(gitBlueprint); - } - ); - - it('rejects if temp folder creation fails', async function() { - let url = 'https://github.com/ember-cli/app-blueprint-test.git'; - let error = new Error('temp folder creation failed'); - td.when(task._createTempFolder()).thenReject(error); - - await expect(task._resolveBlueprint(url)).to.be.rejectedWith(error); - }); - - it('rejects if "git clone" fails', function() { - let url = 'https://github.com/ember-cli/app-blueprint-test.git'; - let error = new Error('git clone failed'); - td.when(task._gitClone(url, task._tempPath)).thenReject(error); - - return expect(task._resolveBlueprint(url)).to.be.rejectedWith(error); - }); - - it('rejects if "npm install" fails', async function() { - let url = 'https://github.com/ember-cli/app-blueprint-test.git'; - let error = new Error('npm install failed'); - td.when(task._gitClone(url, task._tempPath)).thenResolve(); - td.when(task._npmInstall(task._tempPath)).thenReject(error); - - await expect(task._resolveBlueprint(url)).to.be.rejectedWith(error); - }); - - it('rejects if loading the blueprint fails', async function() { - let url = 'https://github.com/ember-cli/app-blueprint-test.git'; - let error = new Error('loading blueprint failed'); - td.when(task._gitClone(url, task._tempPath)).thenResolve(); - td.when(task._npmInstall(task._tempPath)).thenResolve(); - td.when(task._loadBlueprintFromPath(task._tempPath)).thenReject(error); - - await expect(task._resolveBlueprint(url)).to.be.rejectedWith(error); - }); - }); - - describe('_tryNpmBlueprint', function() { - beforeEach(async function() { - task._createTempFolder = td.function(); - task._npmInstallModule = td.function(); - task._validateNpmModule = td.function(); - task._loadBlueprintFromPath = td.function(); - - task._tempPath = '/tmp/foobar'; - td.when(task._createTempFolder()).thenResolve(task._tempPath); - - const tmpdir = await mkTmpDirIn(tmproot); - - task.project = { root: tmpdir }; - process.chdir(tmpdir); - }); - - afterEach(function() { - process.chdir(root); - return fs.remove(tmproot); - }); - - it('if .npmrc exists in the project root it copys it to tmp location', function() { - let dir = 'foo'; - - fs.writeFileSync(path.join(task.project.root, '.npmrc'), 'foo'); - - if (!fs.existsSync(dir)) { - fs.mkdirSync(dir); - } - - task._copyNpmrc(dir); - expect(fs.existsSync(path.join(task.project.root, dir, '.npmrc'))).to.be.true; - }); - - it('if .npmrc does not exists in the project root it is not copied', function() { - let dir = 'foo'; - - if (!fs.existsSync(dir)) { - fs.mkdirSync(dir); - } - - task._copyNpmrc(dir); - expect(fs.existsSync(path.join(task.project.root, dir, '.npmrc'))).to.be.false; - }); - - it('resolves with blueprint after successful "npm install"', async function() { - let modulePath = '/path/to/foobar'; - td.when(task._npmInstallModule('foobar', 'latest', task._tempPath)).thenResolve(modulePath); - - let foobarBlueprint = { name: 'foobar blueprint' }; - td.when(task._loadBlueprintFromPath(modulePath)).thenResolve(foobarBlueprint); - - expect(await task._tryNpmBlueprint('foobar', 'latest')).to.equal(foobarBlueprint); - }); - - it('resolves with blueprint after successful "npm install" with a scope and a version', async function() { - let modulePath = '/path/to/@foo/bar'; - td.when(task._npmInstallModule('@foo/bar', '1.2.3', task._tempPath)).thenResolve(modulePath); - - let foobarBlueprint = { name: '@foo/bar blueprint' }; - td.when(task._loadBlueprintFromPath(modulePath)).thenResolve(foobarBlueprint); - - expect(await task._tryNpmBlueprint('@foo/bar', '1.2.3')).to.equal(foobarBlueprint); - }); - - it('rejects with SilentError if npm module "foobar" could not be found', async function() { - let error = new Error(); - error.stderr = ` - npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/ember-cli-app-blueprint-tes - npm ERR! 404 - npm ERR! 404 'foobar' is not in the npm registry. - npm ERR! 404 You should bug the author to publish it (or use the name yourself!) - npm ERR! 404 - npm ERR! 404 Note that you can also install from a - npm ERR! 404 tarball, folder, http url, or git url.`; - - td.when(task._npmInstallModule('foobar', 'latest', task._tempPath)).thenReject(error); - - await expect(task._tryNpmBlueprint('foobar', 'latest')).to.be.rejectedWith( - SilentError, - `The package 'foobar' was not found in the npm registry.` - ); - }); - - it('rejects if "npm install" fails', async function() { - let error = new Error('npm install failed'); - td.when(task._npmInstallModule('foobar', 'latest', task._tempPath)).thenReject(error); - - await expect(task._tryNpmBlueprint('foobar', 'latest')).to.be.rejectedWith(error); - }); - - it('rejects if npm module validation fails', async function() { - let modulePath = '/path/to/foobar'; - td.when(task._npmInstallModule('foobar', 'latest', task._tempPath)).thenResolve(modulePath); - - let error = new Error('module validation failed'); - td.when(task._validateNpmModule(modulePath, 'foobar')).thenThrow(error); - - await expect(task._tryNpmBlueprint('foobar', 'latest')).to.be.rejectedWith(error); - }); - - it('rejects if loading blueprint fails', async function() { - let modulePath = '/path/to/foobar'; - td.when(task._npmInstallModule('foobar', 'latest', task._tempPath)).thenResolve(modulePath); - - let error = new Error('loading blueprint failed'); - td.when(task._loadBlueprintFromPath(modulePath)).thenReject(error); - - await expect(task._tryNpmBlueprint('foobar', 'latest')).to.be.rejectedWith(error); - }); - }); -}); From 7a0f9c1d74ccaeb6d20374b2e068a67c79580760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Buscht=C3=B6ns?= Date: Tue, 3 Dec 2019 16:41:55 +0100 Subject: [PATCH 122/818] refactor(blueprint): install blueprint via `npm install` command --- lib/tasks/install-blueprint.js | 59 +++++++++++++++++++++++++++------- 1 file changed, 48 insertions(+), 11 deletions(-) diff --git a/lib/tasks/install-blueprint.js b/lib/tasks/install-blueprint.js index 2fc43e788b..2ad74fdbc0 100644 --- a/lib/tasks/install-blueprint.js +++ b/lib/tasks/install-blueprint.js @@ -68,28 +68,28 @@ class InstallBlueprintTask extends Task { _handleLocalLookupFailure(name, error) { logger.info(`Local blueprint lookup for "${name}" failed`); - let packageDescriptor; try { - packageDescriptor = npa(name); + npa(name); } catch (err) { logger.info(`"${name} is not a valid npm package specifier -> rethrowing original error`); throw error; } logger.info(`"${name} is a valid npm package specifier -> trying npm`); - return this._tryRemoteBlueprint(packageDescriptor); + return this._tryRemoteBlueprint(name); } - async _tryRemoteBlueprint(packageDescriptor) { + async _tryRemoteBlueprint(name) { let tmpDir = await this._createTempFolder(); - let packageName = await this._createPackageJSON(tmpDir, packageDescriptor); + await this._createEmptyPackageJSON(tmpDir, name); try { - await this._npmInstall(tmpDir); + await this._npmInstall(tmpDir, name); } catch (error) { this._handleNpmInstallModuleError(error); // re-throws } + let packageName = await this._readSingleDependencyFromPackageJSON(tmpDir); let blueprintPath = path.resolve(tmpDir, 'node_modules', packageName); this._validateNpmModule(blueprintPath, packageName); @@ -100,12 +100,48 @@ class InstallBlueprintTask extends Task { return mkdirTemp('ember-cli'); } + _resolvePackageJSON(directoryPath) { + return path.resolve(directoryPath, 'package.json'); + } + + async _createEmptyPackageJSON(tempProjectPath, blueprintName) { + return fs.writeFile( + this._resolvePackageJSON(tempProjectPath), + JSON.stringify({ + name: 'ember-cli-blueprint-install-wrapper', + version: '0.0.0', + description: `This is a transient package used to fetch this blueprint: ${blueprintName}`, + license: 'UNLICENSED', + private: true, + dependencies: {}, + }) + ); + } + + async _readSingleDependencyFromPackageJSON(tempProjectPath) { + let packageJSON = JSON.parse(await fs.readFile(this._resolvePackageJSON(tempProjectPath), 'utf8')); + + if (!packageJSON.dependencies || typeof packageJSON.dependencies !== 'object') { + throw new SilentError(`The transient package.json at '${tempProjectPath}' is missing 'dependencies'.`); + } + + let dependencyNames = Object.keys(packageJSON.dependencies); + + if (dependencyNames.length !== 1) { + throw new SilentError( + `The transient package.json at '${tempProjectPath}' has more than one or no entries in 'dependencies'.` + ); + } + + return dependencyNames[0]; + } + async _createPackageJSON(tempProjectPath, descriptor) { let packageName = descriptor.name || `ember-cli-blueprint-${Date.now()}`; let specifier = descriptor.saveSpec || descriptor.fetchSpec; await fs.writeFile( - path.resolve(tempProjectPath, 'package.json'), + this._resolvePackageJSON(tempProjectPath), JSON.stringify({ dependencies: { [packageName]: specifier, @@ -116,11 +152,12 @@ class InstallBlueprintTask extends Task { return packageName; } - _npmInstall(cwd) { - logger.info(`Running "npm install" in "${cwd}" ...`); + _npmInstall(cwd, name) { + logger.info(`Running "npm install" for "${name}" in "${cwd}" ...`); this._copyNpmrc(cwd); - return execa('npm', ['install'], { cwd }); + + return execa('npm', ['install', '--no-package-lock', '--save', name], { cwd }); } _handleNpmInstallModuleError(error) { @@ -135,7 +172,7 @@ class InstallBlueprintTask extends Task { _validateNpmModule(modulePath, packageName) { logger.info(`Checking for "ember-blueprint" keyword in "${packageName}" module ...`); - let pkg = require(path.join(modulePath, 'package.json')); + let pkg = require(this._resolvePackageJSON(modulePath)); if (!pkg || !pkg.keywords || pkg.keywords.indexOf('ember-blueprint') === -1) { throw new SilentError(`The package '${packageName}' is not a valid Ember CLI blueprint.`); } From d19f08931e98ac61b6d116de1e72c6beacd607bb Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 4 Dec 2019 05:22:07 +0000 Subject: [PATCH 123/818] Bump nock from 11.3.5 to 11.7.0 (#8956) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index f6655d8375..0d4fef9a83 100644 --- a/package.json +++ b/package.json @@ -148,7 +148,7 @@ "fixturify": "^1.2.0", "fixturify-project": "^1.9.1", "mocha": "^6.2.1", - "nock": "^11.3.5", + "nock": "^11.7.0", "nyc": "^14.1.0", "prettier": "1.17.0", "rimraf": "^3.0.0", diff --git a/yarn.lock b/yarn.lock index f3a2936618..48bb34d037 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4575,10 +4575,10 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -nock@^11.3.5: - version "11.3.5" - resolved "https://registry.yarnpkg.com/nock/-/nock-11.3.5.tgz#f2c7b4b672a04c35342593b6bfd821497881199c" - integrity sha512-6WGeZcWc3RExkBcMSYSrUm/5YukDo52m/jhwniQyrnuiCnKRljBwwje9vTwJyEi4J6m2bq0Aj6C1vzuM6iuaeg== +nock@^11.7.0: + version "11.7.0" + resolved "https://registry.yarnpkg.com/nock/-/nock-11.7.0.tgz#5eaae8b8a55c0dfc014d05692c8cf3d31d61a342" + integrity sha512-7c1jhHew74C33OBeRYyQENT+YXQiejpwIrEjinh6dRurBae+Ei4QjeUaPlkptIF0ZacEiVCnw8dWaxqepkiihg== dependencies: chai "^4.1.2" debug "^4.1.0" From 796c3e481f8ce17c1262acb7b8533f1962534ceb Mon Sep 17 00:00:00 2001 From: "Quinn C. Hoyer" Date: Wed, 4 Dec 2019 09:16:01 -0900 Subject: [PATCH 124/818] Add 2 tests --- .../package-info-cache-test.js | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/tests/unit/models/package-info-cache/package-info-cache-test.js b/tests/unit/models/package-info-cache/package-info-cache-test.js index 5f58776ce2..3db6d8e31b 100644 --- a/tests/unit/models/package-info-cache/package-info-cache-test.js +++ b/tests/unit/models/package-info-cache/package-info-cache-test.js @@ -175,6 +175,47 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { }); describe('packageInfo', function() { + describe('project with invalid paths', function() { + let project, fixturifyProject; + beforeEach(function() { + // create a new ember-app + fixturifyProject = new FixturifyProject('simple-ember-app', '0.0.0', project => { + project.addAddon('ember-resolver', '^5.0.1'); + project.addAddon('ember-random-addon', 'latest'); + project.addAddon('loader.js', 'latest'); + project.addAddon('something-else', 'latest'); + project.addInRepoAddon('ember-super-button', 'latest', function(project) { + project.pkg['ember-addon'].paths = ['lib/herp-not-here']; + }); + project.addDevDependency('ember-cli', 'latest'); + project.addDevDependency('non-ember-thingy', 'latest'); + project.pkg['ember-addon'].paths.push('lib/no-such-path'); + }); + + fixturifyProject.writeSync(); + + project = fixturifyProject.buildProjectModel(Project); + }); + + afterEach(function() { + fixturifyProject.dispose(); + }); + + it('shows a warning with invalid ember-addon#path', function() { + project.discoverAddons(); + expect(project.cli.ui.output).to.include( + "specifies an invalid, malformed or missing addon at relative path 'lib/no-such-path'" + ); + }); + + it('throws an error with flag on', function() { + process.env.EMBER_CLI_ERROR_ON_INVALID_ADDON = 'true'; + expect(() => project.discoverAddons()).to.throw( + /specifies an invalid, malformed or missing addon at relative path 'lib\/no-such-path'/ + ); + delete process.env.EMBER_CLI_ERROR_ON_INVALID_ADDON; + }); + }); describe('valid project', function() { let project, fixturifyProject; before(function() { From 2c78d0a7b243b2597035bebbca68b75ca38c067f Mon Sep 17 00:00:00 2001 From: "Quinn C. Hoyer" Date: Wed, 4 Dec 2019 09:37:22 -0900 Subject: [PATCH 125/818] Move process.env cleanup to afterEach --- tests/unit/models/package-info-cache/package-info-cache-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/models/package-info-cache/package-info-cache-test.js b/tests/unit/models/package-info-cache/package-info-cache-test.js index 3db6d8e31b..84b803d8c2 100644 --- a/tests/unit/models/package-info-cache/package-info-cache-test.js +++ b/tests/unit/models/package-info-cache/package-info-cache-test.js @@ -199,6 +199,7 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { afterEach(function() { fixturifyProject.dispose(); + delete process.env.EMBER_CLI_ERROR_ON_INVALID_ADDON; }); it('shows a warning with invalid ember-addon#path', function() { @@ -213,7 +214,6 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { expect(() => project.discoverAddons()).to.throw( /specifies an invalid, malformed or missing addon at relative path 'lib\/no-such-path'/ ); - delete process.env.EMBER_CLI_ERROR_ON_INVALID_ADDON; }); }); describe('valid project', function() { From 7b689aafa7392f202de20ad1cf273531411a5190 Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Fri, 6 Dec 2019 18:20:00 -0700 Subject: [PATCH 126/818] [BUGFIX] non-scope directories without a package.json should not be considered a node_module Sometimes dependency management tooling may leave empty directories in node_modules. This is likely a bug in their implementation, but as it turns out the node resolution algorithm accounts for it, by simply not considering node_modules who do not have a package.json. --- lib/models/package-info-cache/index.js | 21 ++++++++++++------- .../package-info-cache-test.js | 21 ++++++++++++++++++- 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/lib/models/package-info-cache/index.js b/lib/models/package-info-cache/index.js index e032345bb0..3b8b340be2 100644 --- a/lib/models/package-info-cache/index.js +++ b/lib/models/package-info-cache/index.js @@ -636,18 +636,25 @@ class PackageInfoCache { logger.info('Creating new NodeModulesList instance for %o', realPath); nodeModulesList = new NodeModulesList(realPath, this); - let entries = fs.readdirSync(realPath); // should not fail because getRealDirectoryPath passed + const entries = fs.readdirSync(realPath).filter(fileName => { + if (fileName.startsWith('.') || fileName.startsWith('_')) { + // we explicitly want to ignore these, according to the + // definition of a valid package name. + return false; + } else if (fileName.startsWith('@')) { + return true; + } else if (!fs.existsSync(`${realPath}/${fileName}/package.json`)) { + // a node_module is only valid if it contains a package.json + return false; + } else { + return true; + } + }); // should not fail because getRealDirectoryPath passed entries.forEach(entryName => { // entries should be either a package or a scoping directory. I think // there can also be files, but we'll ignore those. - if (entryName.startsWith('.') || entryName.startsWith('_')) { - // we explicitly want to ignore these, according to the - // definition of a valid package name. - return; - } - let entryPath = path.join(realPath, entryName); if (getRealFilePath(entryPath)) { diff --git a/tests/unit/models/package-info-cache/package-info-cache-test.js b/tests/unit/models/package-info-cache/package-info-cache-test.js index 5648d608b6..cbe5fb9033 100644 --- a/tests/unit/models/package-info-cache/package-info-cache-test.js +++ b/tests/unit/models/package-info-cache/package-info-cache-test.js @@ -181,7 +181,18 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { // create a new ember-app fixturifyProject = new FixturifyProject('simple-ember-app', '0.0.0', project => { project.addAddon('ember-resolver', '^5.0.1'); - project.addAddon('ember-random-addon', 'latest'); + project.addAddon('ember-random-addon', 'latest', addon => { + addon.addAddon('other-nested-addon', 'latest', addon => { + addon.addAddon('ember-resolver', '*'); + addon.toJSON = function() { + const json = Object.getPrototypeOf(this).toJSON.call(this); + // here we introduce an empty folder in our node_modules. + json[this.name].node_modules['ember-resolver'] = {}; + return json; + }; + }); + }); + project.addAddon('loader.js', 'latest'); project.addAddon('something-else', 'latest'); @@ -202,6 +213,14 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { fixturifyProject.dispose(); }); + it('was able to find ember-resolver even if an empty directory was left', function() { + const emberResolver = project.findAddonByName('ember-resolver'); + const nestedEmberResolver = project.findAddonByName('ember-random-addon').addons[0].addons[0]; + expect(emberResolver.name).to.eql('ember-resolver'); + expect(nestedEmberResolver.name).to.eql('ember-resolver'); + expect(emberResolver.root).to.eql(nestedEmberResolver.root); + }); + it('has dependencies who have their mayHaveAddons correctly set', function() { expect(projectPackageInfo.devDependencyPackages['non-ember-thingy']).to.have.property('mayHaveAddons', false); expect(projectPackageInfo.devDependencyPackages['ember-cli']).to.have.property('mayHaveAddons', false); From af73e49a1f84aee14fade47f1755252e878dc33b Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 11 Dec 2019 09:23:12 -0500 Subject: [PATCH 127/818] Add v3.12.1 to CHANGELOG. --- CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54f4b03ba7..2185861a20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # ember-cli Changelog +## v3.12.1 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.12.0...v3.12.1) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.12.0...v3.12.1) + +#### Community Contributions + +- [#8797](https://github.com/ember-cli/ember-cli/pull/8797) Update heimdalljs-fs-monitor to 0.2.3. [@rwjblue](https://github.com/rwjblue) +- [#8959](https://github.com/ember-cli/ember-cli/pull/8959) Ensure `node_modules/*` directories without a `package.json` are not considered as part of the addon discovery process [@stefanpenner](https://github.com/stefanpenner) + +Thank you to all who took the time to contribute! + ## v3.12.0 #### Blueprint Changes From dbb08b145d2b0c9499ab55cf967c90761a0101ce Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 11 Dec 2019 09:24:14 -0500 Subject: [PATCH 128/818] Release v3.12.1. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 99a085d487..c40b187f01 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.12.0", + "version": "3.12.1", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From a51d80e8dc7cb1c2a8803b514803e26a5ffcac46 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 11 Dec 2019 12:45:28 -0500 Subject: [PATCH 129/818] Update config/optional-features.json for Octane. --- blueprints/addon/files/config/optional-features.json | 5 ++++- blueprints/app/files/config/optional-features.json | 5 ++++- tests/acceptance/brocfile-smoke-test-slow.js | 3 ++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/blueprints/addon/files/config/optional-features.json b/blueprints/addon/files/config/optional-features.json index b1902623ae..b26286e2ec 100644 --- a/blueprints/addon/files/config/optional-features.json +++ b/blueprints/addon/files/config/optional-features.json @@ -1,3 +1,6 @@ { - "jquery-integration": false + "application-template-wrapper": false, + "default-async-observers": true, + "jquery-integration": false, + "template-only-glimmer-components": true } diff --git a/blueprints/app/files/config/optional-features.json b/blueprints/app/files/config/optional-features.json index b1902623ae..b26286e2ec 100644 --- a/blueprints/app/files/config/optional-features.json +++ b/blueprints/app/files/config/optional-features.json @@ -1,3 +1,6 @@ { - "jquery-integration": false + "application-template-wrapper": false, + "default-async-observers": true, + "jquery-integration": false, + "template-only-glimmer-components": true } diff --git a/tests/acceptance/brocfile-smoke-test-slow.js b/tests/acceptance/brocfile-smoke-test-slow.js index d30a8ad5a5..f37d8cd883 100644 --- a/tests/acceptance/brocfile-smoke-test-slow.js +++ b/tests/acceptance/brocfile-smoke-test-slow.js @@ -53,7 +53,8 @@ describe('Acceptance: brocfile-smoke-test', function() { }); // Changes in config/optional-features.json end up being set in EmberENV - let expected = '(window.EmberENV || {}, {"asdflkmawejf":";jlnu3yr23","_JQUERY_INTEGRATION":false});'; + let expected = + '(window.EmberENV || {}, {"asdflkmawejf":";jlnu3yr23","_APPLICATION_TEMPLATE_WRAPPER":false,"_DEFAULT_ASYNC_OBSERVERS":true,"_JQUERY_INTEGRATION":false,"_TEMPLATE_ONLY_GLIMMER_COMPONENTS":true});'; expect(vendorContents).to.contain(expected, 'EmberENV should be in assets/vendor.js'); }) ); From e05d85e5886b66ff151f22fe778938b167ecdbe3 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 11 Dec 2019 12:46:13 -0500 Subject: [PATCH 130/818] Update `.template-lintrc.js` to use `octane` preset. --- blueprints/app/files/.template-lintrc.js | 2 +- .../kitchen-sink/tests/dummy/app/templates/application.hbs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/blueprints/app/files/.template-lintrc.js b/blueprints/app/files/.template-lintrc.js index b45e96ffdd..f387370010 100644 --- a/blueprints/app/files/.template-lintrc.js +++ b/blueprints/app/files/.template-lintrc.js @@ -1,5 +1,5 @@ 'use strict'; module.exports = { - extends: 'recommended' + extends: 'octane' }; diff --git a/tests/fixtures/addon/kitchen-sink/tests/dummy/app/templates/application.hbs b/tests/fixtures/addon/kitchen-sink/tests/dummy/app/templates/application.hbs index 885261e680..50b5fd9f4e 100644 --- a/tests/fixtures/addon/kitchen-sink/tests/dummy/app/templates/application.hbs +++ b/tests/fixtures/addon/kitchen-sink/tests/dummy/app/templates/application.hbs @@ -1,2 +1,2 @@ -{{#basic-thing}}WOOT!!{{/basic-thing}} -{{#second-thing}}SECOND!!{{/second-thing}} +WOOT!! +SECOND!! From 0aad024be88e61f6caf329f24a318037098f1514 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 11 Dec 2019 12:46:44 -0500 Subject: [PATCH 131/818] Add `@glimmer/component` to `app` and `addon` blueprints. --- blueprints/app/files/package.json | 1 + tests/fixtures/addon/npm/package.json | 1 + tests/fixtures/addon/yarn/package.json | 1 + tests/fixtures/app/npm/package.json | 1 + tests/fixtures/app/yarn/package.json | 1 + 5 files changed, 5 insertions(+) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 734447c72b..0d949cb2aa 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -19,6 +19,7 @@ }, "devDependencies": { "@ember/optional-features": "^1.0.0", + "@glimmer/component": "^1.0.0", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", "ember-auto-import": "^1.5.2", diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index 3337b762e5..1c6a098c7c 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -26,6 +26,7 @@ }, "devDependencies": { "@ember/optional-features": "^1.0.0", + "@glimmer/component": "^1.0.0", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", "ember-auto-import": "^1.5.2", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 9037b9817e..411cc5644c 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -26,6 +26,7 @@ }, "devDependencies": { "@ember/optional-features": "^1.0.0", + "@glimmer/component": "^1.0.0", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", "ember-auto-import": "^1.5.2", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 375302f800..0a15f4d1b4 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -19,6 +19,7 @@ }, "devDependencies": { "@ember/optional-features": "^1.0.0", + "@glimmer/component": "^1.0.0", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", "ember-auto-import": "^1.5.2", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 774ee5579f..19df64d356 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -19,6 +19,7 @@ }, "devDependencies": { "@ember/optional-features": "^1.0.0", + "@glimmer/component": "^1.0.0", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", "ember-auto-import": "^1.5.2", From 75260b3b794bb98a3d1720a0b2f77ee8befe0553 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 11 Dec 2019 14:31:30 -0500 Subject: [PATCH 132/818] Specify "octane" edition in package.json ala Ember RFC #558 --- blueprints/app/files/package.json | 3 +++ tests/fixtures/addon/npm/package.json | 3 +++ tests/fixtures/addon/yarn/package.json | 3 +++ tests/fixtures/app/npm/package.json | 3 +++ tests/fixtures/app/yarn/package.json | 3 +++ 5 files changed, 15 insertions(+) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 0d949cb2aa..8736a7767f 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -49,5 +49,8 @@ }, "engines": { "node": "8.* || >= 10.*" + }, + "ember": { + "edition": "octane" } } diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index 1c6a098c7c..b1d8e10b2a 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -54,6 +54,9 @@ "engines": { "node": "8.* || >= 10.*" }, + "ember": { + "edition": "octane" + }, "ember-addon": { "configPath": "tests/dummy/config" } diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 411cc5644c..839a4d2636 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -55,6 +55,9 @@ "engines": { "node": "8.* || >= 10.*" }, + "ember": { + "edition": "octane" + }, "ember-addon": { "configPath": "tests/dummy/config" } diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 0a15f4d1b4..31b4c2cc0a 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -48,5 +48,8 @@ }, "engines": { "node": "8.* || >= 10.*" + }, + "ember": { + "edition": "octane" } } diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 19df64d356..5c719ad401 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -49,5 +49,8 @@ }, "engines": { "node": "8.* || >= 10.*" + }, + "ember": { + "edition": "octane" } } From cf08fbd51c67f853be29f6cae430707176610a00 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 11 Dec 2019 16:56:33 -0500 Subject: [PATCH 133/818] Update minimum ember-try version to v1.4.0. This includes support for merging the `ember` property in `package.json` (based on RFC #558). --- blueprints/addon/index.js | 2 +- tests/fixtures/addon/npm/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/unit/blueprints/addon-test.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/blueprints/addon/index.js b/blueprints/addon/index.js index ba2796aa08..678575dab1 100644 --- a/blueprints/addon/index.js +++ b/blueprints/addon/index.js @@ -75,7 +75,7 @@ module.exports = { contents.devDependencies['ember-disable-prototype-extensions'] = '^1.1.3'; // add ember-try - contents.devDependencies['ember-try'] = '^1.2.1'; + contents.devDependencies['ember-try'] = '^1.4.0'; // add ember-source-channel-url contents.devDependencies['ember-source-channel-url'] = '^2.0.1'; diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index b1d8e10b2a..da4632843d 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -45,7 +45,7 @@ "ember-resolver": "^5.3.0", "ember-source": "~3.15.0-beta.1", "ember-source-channel-url": "^2.0.1", - "ember-try": "^1.2.1", + "ember-try": "^1.4.0", "eslint-plugin-ember": "^7.1.0", "eslint-plugin-node": "^10.0.0", "loader.js": "^4.7.0", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 839a4d2636..6940b3d970 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -45,7 +45,7 @@ "ember-resolver": "^5.3.0", "ember-source": "~3.15.0-beta.1", "ember-source-channel-url": "^2.0.1", - "ember-try": "^1.2.1", + "ember-try": "^1.4.0", "ember-welcome-page": "^4.0.0", "eslint-plugin-ember": "^7.1.0", "eslint-plugin-node": "^10.0.0", diff --git a/tests/unit/blueprints/addon-test.js b/tests/unit/blueprints/addon-test.js index 60dc9123ee..a4700ccfa4 100644 --- a/tests/unit/blueprints/addon-test.js +++ b/tests/unit/blueprints/addon-test.js @@ -82,7 +82,7 @@ describe('blueprint - addon', function() { "devDependencies": {\n\ "ember-disable-prototype-extensions": "^1.1.3",\n\ "ember-source-channel-url": "^2.0.1",\n\ - "ember-try": "^1.2.1"\n\ + "ember-try": "^1.4.0"\n\ },\n\ "ember-addon": {\n\ "configPath": "tests/dummy/config"\n\ From 70c95744e1075d70dbd3d28637d6dbdc5ca6e816 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 11 Dec 2019 17:04:30 -0500 Subject: [PATCH 134/818] Update ember-cli-htmlbars minimum version to 4.2.0. Supports colocation without octane opt-in. --- blueprints/app/files/package.json | 2 +- tests/fixtures/addon/npm/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/npm/package.json | 2 +- tests/fixtures/app/yarn/package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 8736a7767f..911c60d31a 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -28,7 +28,7 @@ "ember-cli-babel": "^7.11.1", "ember-cli-dependency-checker": "^3.1.0", "ember-cli-eslint": "^5.1.0", - "ember-cli-htmlbars": "^4.0.5", + "ember-cli-htmlbars": "^4.2.0", "ember-cli-inject-live-reload": "^2.0.1", "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index da4632843d..5233bcba3b 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "ember-cli-babel": "^7.11.1", - "ember-cli-htmlbars": "^4.0.5" + "ember-cli-htmlbars": "^4.2.0" }, "devDependencies": { "@ember/optional-features": "^1.0.0", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 6940b3d970..4f9b0aece7 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "ember-cli-babel": "^7.11.1", - "ember-cli-htmlbars": "^4.0.5" + "ember-cli-htmlbars": "^4.2.0" }, "devDependencies": { "@ember/optional-features": "^1.0.0", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 31b4c2cc0a..128673258a 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -28,7 +28,7 @@ "ember-cli-babel": "^7.11.1", "ember-cli-dependency-checker": "^3.1.0", "ember-cli-eslint": "^5.1.0", - "ember-cli-htmlbars": "^4.0.5", + "ember-cli-htmlbars": "^4.2.0", "ember-cli-inject-live-reload": "^2.0.1", "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 5c719ad401..d566f85e1e 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -28,7 +28,7 @@ "ember-cli-babel": "^7.11.1", "ember-cli-dependency-checker": "^3.1.0", "ember-cli-eslint": "^5.1.0", - "ember-cli-htmlbars": "^4.0.5", + "ember-cli-htmlbars": "^4.2.0", "ember-cli-inject-live-reload": "^2.0.1", "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", From fc9a6be635f5c073cada7c64559c7b0f2bdfc012 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 11 Dec 2019 18:17:32 -0500 Subject: [PATCH 135/818] Update minimum versions of application dependencies. --- blueprints/app/files/package.json | 22 +++++++++++----------- tests/fixtures/addon/npm/package.json | 20 ++++++++++---------- tests/fixtures/addon/yarn/package.json | 20 ++++++++++---------- tests/fixtures/app/npm/package.json | 22 +++++++++++----------- tests/fixtures/app/yarn/package.json | 22 +++++++++++----------- 5 files changed, 53 insertions(+), 53 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 911c60d31a..d2153774c3 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -18,15 +18,15 @@ "test": "ember test" }, "devDependencies": { - "@ember/optional-features": "^1.0.0", + "@ember/optional-features": "^1.1.0", "@glimmer/component": "^1.0.0", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.5.2", + "ember-auto-import": "^1.5.3", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^3.2.0", - "ember-cli-babel": "^7.11.1", - "ember-cli-dependency-checker": "^3.1.0", + "ember-cli-babel": "^7.13.0", + "ember-cli-dependency-checker": "^3.2.0", "ember-cli-eslint": "^5.1.0", "ember-cli-htmlbars": "^4.2.0", "ember-cli-inject-live-reload": "^2.0.1", @@ -34,18 +34,18 @@ "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", "ember-data": "~3.15.0-beta.0", - "ember-export-application-global": "^2.0.0", - "ember-fetch": "^6.7.0", - "ember-load-initializers": "^2.1.0", + "ember-export-application-global": "^2.0.1", + "ember-fetch": "^7.0.0", + "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^4.5.1", - "ember-resolver": "^5.3.0", + "ember-qunit": "^4.6.0", + "ember-resolver": "^6.0.0", "ember-source": "~3.15.0-beta.1<% if (welcome) { %>", "ember-welcome-page": "^4.0.0<% } %>", - "eslint-plugin-ember": "^7.1.0", + "eslint-plugin-ember": "^7.7.1", "eslint-plugin-node": "^10.0.0", "loader.js": "^4.7.0", - "qunit-dom": "^0.9.0" + "qunit-dom": "^0.9.2" }, "engines": { "node": "8.* || >= 10.*" diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index 5233bcba3b..3eef78c3fb 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -21,35 +21,35 @@ "test:all": "ember try:each" }, "dependencies": { - "ember-cli-babel": "^7.11.1", + "ember-cli-babel": "^7.13.0", "ember-cli-htmlbars": "^4.2.0" }, "devDependencies": { - "@ember/optional-features": "^1.0.0", + "@ember/optional-features": "^1.1.0", "@glimmer/component": "^1.0.0", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.5.2", + "ember-auto-import": "^1.5.3", "ember-cli": "~<%= emberCLIVersion %>", - "ember-cli-dependency-checker": "^3.1.0", + "ember-cli-dependency-checker": "^3.2.0", "ember-cli-eslint": "^5.1.0", "ember-cli-inject-live-reload": "^2.0.1", "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", "ember-disable-prototype-extensions": "^1.1.3", - "ember-export-application-global": "^2.0.0", - "ember-load-initializers": "^2.1.0", + "ember-export-application-global": "^2.0.1", + "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^4.5.1", - "ember-resolver": "^5.3.0", + "ember-qunit": "^4.6.0", + "ember-resolver": "^6.0.0", "ember-source": "~3.15.0-beta.1", "ember-source-channel-url": "^2.0.1", "ember-try": "^1.4.0", - "eslint-plugin-ember": "^7.1.0", + "eslint-plugin-ember": "^7.7.1", "eslint-plugin-node": "^10.0.0", "loader.js": "^4.7.0", - "qunit-dom": "^0.9.0" + "qunit-dom": "^0.9.2" }, "engines": { "node": "8.* || >= 10.*" diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 4f9b0aece7..1cb6865dac 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -21,36 +21,36 @@ "test:all": "ember try:each" }, "dependencies": { - "ember-cli-babel": "^7.11.1", + "ember-cli-babel": "^7.13.0", "ember-cli-htmlbars": "^4.2.0" }, "devDependencies": { - "@ember/optional-features": "^1.0.0", + "@ember/optional-features": "^1.1.0", "@glimmer/component": "^1.0.0", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.5.2", + "ember-auto-import": "^1.5.3", "ember-cli": "~<%= emberCLIVersion %>", - "ember-cli-dependency-checker": "^3.1.0", + "ember-cli-dependency-checker": "^3.2.0", "ember-cli-eslint": "^5.1.0", "ember-cli-inject-live-reload": "^2.0.1", "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", "ember-disable-prototype-extensions": "^1.1.3", - "ember-export-application-global": "^2.0.0", - "ember-load-initializers": "^2.1.0", + "ember-export-application-global": "^2.0.1", + "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^4.5.1", - "ember-resolver": "^5.3.0", + "ember-qunit": "^4.6.0", + "ember-resolver": "^6.0.0", "ember-source": "~3.15.0-beta.1", "ember-source-channel-url": "^2.0.1", "ember-try": "^1.4.0", "ember-welcome-page": "^4.0.0", - "eslint-plugin-ember": "^7.1.0", + "eslint-plugin-ember": "^7.7.1", "eslint-plugin-node": "^10.0.0", "loader.js": "^4.7.0", - "qunit-dom": "^0.9.0" + "qunit-dom": "^0.9.2" }, "engines": { "node": "8.* || >= 10.*" diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 128673258a..35ced4224d 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -18,15 +18,15 @@ "test": "ember test" }, "devDependencies": { - "@ember/optional-features": "^1.0.0", + "@ember/optional-features": "^1.1.0", "@glimmer/component": "^1.0.0", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.5.2", + "ember-auto-import": "^1.5.3", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^3.2.0", - "ember-cli-babel": "^7.11.1", - "ember-cli-dependency-checker": "^3.1.0", + "ember-cli-babel": "^7.13.0", + "ember-cli-dependency-checker": "^3.2.0", "ember-cli-eslint": "^5.1.0", "ember-cli-htmlbars": "^4.2.0", "ember-cli-inject-live-reload": "^2.0.1", @@ -34,17 +34,17 @@ "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", "ember-data": "~3.15.0-beta.0", - "ember-export-application-global": "^2.0.0", - "ember-fetch": "^6.7.0", - "ember-load-initializers": "^2.1.0", + "ember-export-application-global": "^2.0.1", + "ember-fetch": "^7.0.0", + "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^4.5.1", - "ember-resolver": "^5.3.0", + "ember-qunit": "^4.6.0", + "ember-resolver": "^6.0.0", "ember-source": "~3.15.0-beta.1", - "eslint-plugin-ember": "^7.1.0", + "eslint-plugin-ember": "^7.7.1", "eslint-plugin-node": "^10.0.0", "loader.js": "^4.7.0", - "qunit-dom": "^0.9.0" + "qunit-dom": "^0.9.2" }, "engines": { "node": "8.* || >= 10.*" diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index d566f85e1e..e2335ff08d 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -18,15 +18,15 @@ "test": "ember test" }, "devDependencies": { - "@ember/optional-features": "^1.0.0", + "@ember/optional-features": "^1.1.0", "@glimmer/component": "^1.0.0", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.5.2", + "ember-auto-import": "^1.5.3", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^3.2.0", - "ember-cli-babel": "^7.11.1", - "ember-cli-dependency-checker": "^3.1.0", + "ember-cli-babel": "^7.13.0", + "ember-cli-dependency-checker": "^3.2.0", "ember-cli-eslint": "^5.1.0", "ember-cli-htmlbars": "^4.2.0", "ember-cli-inject-live-reload": "^2.0.1", @@ -34,18 +34,18 @@ "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", "ember-data": "~3.15.0-beta.0", - "ember-export-application-global": "^2.0.0", - "ember-fetch": "^6.7.0", - "ember-load-initializers": "^2.1.0", + "ember-export-application-global": "^2.0.1", + "ember-fetch": "^7.0.0", + "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^4.5.1", - "ember-resolver": "^5.3.0", + "ember-qunit": "^4.6.0", + "ember-resolver": "^6.0.0", "ember-source": "~3.15.0-beta.1", "ember-welcome-page": "^4.0.0", - "eslint-plugin-ember": "^7.1.0", + "eslint-plugin-ember": "^7.7.1", "eslint-plugin-node": "^10.0.0", "loader.js": "^4.7.0", - "qunit-dom": "^0.9.0" + "qunit-dom": "^0.9.2" }, "engines": { "node": "8.* || >= 10.*" From cea054018a1a7afcbea5a2cdc131fd1c3fbe863a Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 11 Dec 2019 18:19:30 -0500 Subject: [PATCH 136/818] Update ember-source to 3.15.0. --- blueprints/app/files/package.json | 2 +- tests/fixtures/addon/npm/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/npm/package.json | 2 +- tests/fixtures/app/yarn/package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index d2153774c3..01a97f21ef 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -40,7 +40,7 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", "ember-resolver": "^6.0.0", - "ember-source": "~3.15.0-beta.1<% if (welcome) { %>", + "ember-source": "~3.15.0<% if (welcome) { %>", "ember-welcome-page": "^4.0.0<% } %>", "eslint-plugin-ember": "^7.7.1", "eslint-plugin-node": "^10.0.0", diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index 3eef78c3fb..16020af028 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -43,7 +43,7 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", "ember-resolver": "^6.0.0", - "ember-source": "~3.15.0-beta.1", + "ember-source": "~3.15.0", "ember-source-channel-url": "^2.0.1", "ember-try": "^1.4.0", "eslint-plugin-ember": "^7.7.1", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 1cb6865dac..6ec54c16d8 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -43,7 +43,7 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", "ember-resolver": "^6.0.0", - "ember-source": "~3.15.0-beta.1", + "ember-source": "~3.15.0", "ember-source-channel-url": "^2.0.1", "ember-try": "^1.4.0", "ember-welcome-page": "^4.0.0", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 35ced4224d..647c33b48b 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -40,7 +40,7 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", "ember-resolver": "^6.0.0", - "ember-source": "~3.15.0-beta.1", + "ember-source": "~3.15.0", "eslint-plugin-ember": "^7.7.1", "eslint-plugin-node": "^10.0.0", "loader.js": "^4.7.0", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index e2335ff08d..d893968595 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -40,7 +40,7 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", "ember-resolver": "^6.0.0", - "ember-source": "~3.15.0-beta.1", + "ember-source": "~3.15.0", "ember-welcome-page": "^4.0.0", "eslint-plugin-ember": "^7.7.1", "eslint-plugin-node": "^10.0.0", From d020e692b9a3f1666b76a51a6083aeb70e3c0660 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Thu, 12 Dec 2019 13:33:05 -0500 Subject: [PATCH 137/818] Add v3.15.0-beta.2 to CHANGELOG.md. --- CHANGELOG.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b6169fb86..b90577995f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,31 @@ # ember-cli Changelog +## v3.15.0-beta.2 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.15.0-beta.1...v3.15.0-beta.2) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.15.0-beta.1...v3.15.0-beta.2) + +#### Changelog + +- [#8933](https://github.com/ember-cli/ember-cli/pull/8933) Remove `app/resolver.js` in favor of importing in `app/app.js` [@rwjblue](https://github.com/rwjblue) +- [#8945](https://github.com/ember-cli/ember-cli/pull/8945) Fix issue with addon `.travis.yml` configuration when using `npm` [@kellyselden](https://github.com/kellyselden) +- [#8946](https://github.com/ember-cli/ember-cli/pull/8946) Drop testing of ember-source@3.4 in the addon blueprints ember-try config [@kellyselden](https://github.com/kellyselden) +- [#8946](https://github.com/ember-cli/ember-cli/pull/8946) Add testing of ember-source@3.12 in the addon blueprints ember-try config [@kellyselden](https://github.com/kellyselden) +- [#8959](https://github.com/ember-cli/ember-cli/pull/8959) Fix issue with addon discovery when npm/yarn leave empty directories in resolvable locations [@stefanpenner](https://github.com/stefanpenner) +- [#8949](https://github.com/ember-cli/ember-cli/pull/8949) Add GitHub Actions for CI [@Turbo87](https://github.com/Turbo87) +- [#8961](https://github.com/ember-cli/ember-cli/pull/8961) Prepare for Octane release in 3.15 [@rwjblue](https://github.com/rwjblue) + * Adds `ember` property to `package.json` to implement [emberjs/rfcs#558](https://github.com/emberjs/rfcs/pull/558) + * Adds `@glimmer/component@1.0.0` as a development dependency for both apps and addons + * Updates `ember-try` to at least 1.4.0 in order to support `config/ember-try.js` scenarios with `ember` `package.json` property (mentioned in emberjs/rfcs#558) + * Enables Octane related optional features + * Updates ember-template-lint configuration to use `octane` preset + * Update to ember-source@3.15 stable + * Updates all packages in the application blueprint to their latest version + +Thank you to all who took the time to contribute! + ## v3.15.0-beta.1 #### Blueprint Changes From b07977ed13694e56f74b60e53a12ed5043450f9f Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Thu, 12 Dec 2019 13:33:34 -0500 Subject: [PATCH 138/818] 3.15.0-beta.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fc25530c56..0b8988f3d4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.15.0-beta.1", + "version": "3.15.0-beta.2", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From 2a7dfc7fceb9381f511a02f3b959cf262e613b55 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Thu, 12 Dec 2019 13:39:57 -0500 Subject: [PATCH 139/818] 3.15.0-beta.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0b8988f3d4..175584a263 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.15.0-beta.2", + "version": "3.15.0-beta.3", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From 2d366f2debd3ed4384699f215b343557769fbf64 Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Sat, 14 Dec 2019 11:02:38 +0000 Subject: [PATCH 140/818] track ember-lts-3.16 in ember-try --- blueprints/addon/files/.travis.yml | 2 +- blueprints/addon/files/README.md | 2 +- blueprints/addon/files/addon-config/ember-try.js | 8 ++++---- tests/fixtures/addon/npm/.travis.yml | 2 +- tests/fixtures/addon/npm/README.md | 2 +- tests/fixtures/addon/npm/config/ember-try.js | 8 ++++---- tests/fixtures/addon/yarn/.travis.yml | 2 +- tests/fixtures/addon/yarn/README.md | 2 +- tests/fixtures/addon/yarn/config/ember-try.js | 8 ++++---- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/blueprints/addon/files/.travis.yml b/blueprints/addon/files/.travis.yml index f304fdc46a..d05c7f4aa5 100644 --- a/blueprints/addon/files/.travis.yml +++ b/blueprints/addon/files/.travis.yml @@ -52,8 +52,8 @@ jobs: # we recommend new addons test the current and previous LTS # as well as latest stable release (bonus points to beta/canary) - - env: EMBER_TRY_SCENARIO=ember-lts-3.8 - env: EMBER_TRY_SCENARIO=ember-lts-3.12 + - env: EMBER_TRY_SCENARIO=ember-lts-3.16 - env: EMBER_TRY_SCENARIO=ember-release - env: EMBER_TRY_SCENARIO=ember-beta - env: EMBER_TRY_SCENARIO=ember-canary diff --git a/blueprints/addon/files/README.md b/blueprints/addon/files/README.md index 8aa57ce247..44d6428a62 100644 --- a/blueprints/addon/files/README.md +++ b/blueprints/addon/files/README.md @@ -7,7 +7,7 @@ Compatibility ------------------------------------------------------------------------------ -* Ember.js v3.8 or above +* Ember.js v3.12 or above * Ember CLI v2.13 or above * Node.js v8 or above diff --git a/blueprints/addon/files/addon-config/ember-try.js b/blueprints/addon/files/addon-config/ember-try.js index 614db394c1..d6dc18c3c4 100644 --- a/blueprints/addon/files/addon-config/ember-try.js +++ b/blueprints/addon/files/addon-config/ember-try.js @@ -7,18 +7,18 @@ module.exports = async function() { <% if (yarn) { %>useYarn: true, <% } %>scenarios: [ { - name: 'ember-lts-3.8', + name: 'ember-lts-3.12', npm: { devDependencies: { - 'ember-source': '~3.8.0' + 'ember-source': '~3.12.0' } } }, { - name: 'ember-lts-3.12', + name: 'ember-lts-3.16', npm: { devDependencies: { - 'ember-source': '~3.12.0' + 'ember-source': '~3.16.0' } } }, diff --git a/tests/fixtures/addon/npm/.travis.yml b/tests/fixtures/addon/npm/.travis.yml index 591494caeb..cc9477266b 100644 --- a/tests/fixtures/addon/npm/.travis.yml +++ b/tests/fixtures/addon/npm/.travis.yml @@ -48,8 +48,8 @@ jobs: # we recommend new addons test the current and previous LTS # as well as latest stable release (bonus points to beta/canary) - - env: EMBER_TRY_SCENARIO=ember-lts-3.8 - env: EMBER_TRY_SCENARIO=ember-lts-3.12 + - env: EMBER_TRY_SCENARIO=ember-lts-3.16 - env: EMBER_TRY_SCENARIO=ember-release - env: EMBER_TRY_SCENARIO=ember-beta - env: EMBER_TRY_SCENARIO=ember-canary diff --git a/tests/fixtures/addon/npm/README.md b/tests/fixtures/addon/npm/README.md index 1ab7118acf..cf2820eadb 100644 --- a/tests/fixtures/addon/npm/README.md +++ b/tests/fixtures/addon/npm/README.md @@ -7,7 +7,7 @@ foo Compatibility ------------------------------------------------------------------------------ -* Ember.js v3.8 or above +* Ember.js v3.12 or above * Ember CLI v2.13 or above * Node.js v8 or above diff --git a/tests/fixtures/addon/npm/config/ember-try.js b/tests/fixtures/addon/npm/config/ember-try.js index 4ac1661824..78d2a7e29f 100644 --- a/tests/fixtures/addon/npm/config/ember-try.js +++ b/tests/fixtures/addon/npm/config/ember-try.js @@ -6,18 +6,18 @@ module.exports = async function() { return { scenarios: [ { - name: 'ember-lts-3.8', + name: 'ember-lts-3.12', npm: { devDependencies: { - 'ember-source': '~3.8.0' + 'ember-source': '~3.12.0' } } }, { - name: 'ember-lts-3.12', + name: 'ember-lts-3.16', npm: { devDependencies: { - 'ember-source': '~3.12.0' + 'ember-source': '~3.16.0' } } }, diff --git a/tests/fixtures/addon/yarn/.travis.yml b/tests/fixtures/addon/yarn/.travis.yml index 0f5e4db21b..173820fe9b 100644 --- a/tests/fixtures/addon/yarn/.travis.yml +++ b/tests/fixtures/addon/yarn/.travis.yml @@ -47,8 +47,8 @@ jobs: # we recommend new addons test the current and previous LTS # as well as latest stable release (bonus points to beta/canary) - - env: EMBER_TRY_SCENARIO=ember-lts-3.8 - env: EMBER_TRY_SCENARIO=ember-lts-3.12 + - env: EMBER_TRY_SCENARIO=ember-lts-3.16 - env: EMBER_TRY_SCENARIO=ember-release - env: EMBER_TRY_SCENARIO=ember-beta - env: EMBER_TRY_SCENARIO=ember-canary diff --git a/tests/fixtures/addon/yarn/README.md b/tests/fixtures/addon/yarn/README.md index 1ab7118acf..cf2820eadb 100644 --- a/tests/fixtures/addon/yarn/README.md +++ b/tests/fixtures/addon/yarn/README.md @@ -7,7 +7,7 @@ foo Compatibility ------------------------------------------------------------------------------ -* Ember.js v3.8 or above +* Ember.js v3.12 or above * Ember CLI v2.13 or above * Node.js v8 or above diff --git a/tests/fixtures/addon/yarn/config/ember-try.js b/tests/fixtures/addon/yarn/config/ember-try.js index 94f8e969a6..ae696f9a38 100644 --- a/tests/fixtures/addon/yarn/config/ember-try.js +++ b/tests/fixtures/addon/yarn/config/ember-try.js @@ -7,18 +7,18 @@ module.exports = async function() { useYarn: true, scenarios: [ { - name: 'ember-lts-3.8', + name: 'ember-lts-3.12', npm: { devDependencies: { - 'ember-source': '~3.8.0' + 'ember-source': '~3.12.0' } } }, { - name: 'ember-lts-3.12', + name: 'ember-lts-3.16', npm: { devDependencies: { - 'ember-source': '~3.12.0' + 'ember-source': '~3.16.0' } } }, From 6264f251884c2faf15c6f33d26fb2cb3db71ada3 Mon Sep 17 00:00:00 2001 From: Godfrey Chan Date: Sun, 15 Dec 2019 00:08:51 -0800 Subject: [PATCH 141/818] [BUGFIX beta] Remove `app/templates/components` Since co-location is now enabled by default, this folder is not needed anymore. --- blueprints/app/files/app/templates/components/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 blueprints/app/files/app/templates/components/.gitkeep diff --git a/blueprints/app/files/app/templates/components/.gitkeep b/blueprints/app/files/app/templates/components/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 From 9218beddfdc53f6e1cebc619a715dec42abcb625 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 18 Dec 2019 11:48:29 -0500 Subject: [PATCH 142/818] Remove usages of `co.wrap` in tests (in favor of `async`/`await`) This commit is the result of running these commands: ``` yarn remove co npx jscodeshift --transform https://raw.githubusercontent.com/albinekb/co-to-async/master/codemod.js tests/**/*.js yarn lint --fix ``` --- package.json | 1 - tests/acceptance/addon-dummy-generate-test.js | 389 +++---- tests/acceptance/addon-generate-test.js | 454 ++++---- tests/acceptance/addon-smoke-test-slow.js | 153 ++- tests/acceptance/brocfile-smoke-test-slow.js | 777 ++++++------- tests/acceptance/destroy-test.js | 120 +- tests/acceptance/generate-test.js | 613 +++++----- tests/acceptance/in-option-destroy-test.js | 25 +- tests/acceptance/init-test.js | 120 +- .../nested-addons-smoke-test-slow.js | 70 +- tests/acceptance/new-test.js | 715 +++++------- tests/acceptance/pods-destroy-test.js | 81 +- tests/acceptance/pods-generate-test.js | 559 +++++---- .../preprocessor-smoke-test-slow.js | 193 ++-- .../tests/acceptance/main-test.js | 4 +- .../tests/acceptance/main-test.js | 4 +- .../tests/integration/app-boots-test.js | 2 +- .../tests/integration/pods-template-test.js | 2 +- .../tests/integration/pods-template-test.js | 2 +- tests/unit/broccoli/addon/linting-test.js | 428 ++++--- tests/unit/broccoli/addon/module-name-test.js | 94 +- tests/unit/broccoli/builder-test.js | 37 +- .../additional-assets-test.js | 193 ++-- .../broccoli/default-packager/bower-test.js | 98 +- .../broccoli/default-packager/config-test.js | 158 ++- .../ember-cli-internal-test.js | 388 +++---- .../default-packager/external-test.js | 110 +- .../broccoli/default-packager/index-test.js | 342 +++--- .../default-packager/javascript-test.js | 542 ++++----- .../broccoli/default-packager/process-test.js | 217 ++-- .../broccoli/default-packager/public-test.js | 57 +- .../broccoli/default-packager/styles-test.js | 567 +++++---- .../default-packager/templates-test.js | 226 ++-- .../broccoli/default-packager/tests-test.js | 860 +++++++------- .../broccoli/default-packager/vendor-test.js | 63 +- tests/unit/broccoli/ember-app-test.js | 1023 ++++++++--------- .../ember-app/app-and-dependencies-test.js | 322 +++--- tests/unit/broccoli/ember-app/import-test.js | 261 ++--- tests/unit/settings-file/leek-options-test.js | 79 +- .../unit/tasks/server/express-server-test.js | 56 +- tests/unit/utilities/load-config-test.js | 43 +- yarn.lock | 5 - 42 files changed, 4834 insertions(+), 5619 deletions(-) diff --git a/package.json b/package.json index a78038456d..bf346a50b3 100644 --- a/package.json +++ b/package.json @@ -136,7 +136,6 @@ "chai": "^4.2.0", "chai-as-promised": "^7.1.1", "chai-files": "^1.4.0", - "co": "^4.6.0", "ember-cli-blueprint-test-helpers": "^0.19.2", "ember-cli-internal-test-helpers": "^0.9.1", "eslint": "^5.16.0", diff --git a/tests/acceptance/addon-dummy-generate-test.js b/tests/acceptance/addon-dummy-generate-test.js index f2a048fa2e..e5b113a8a4 100644 --- a/tests/acceptance/addon-dummy-generate-test.js +++ b/tests/acceptance/addon-dummy-generate-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const RSVP = require('rsvp'); const ember = require('../helpers/ember'); const fs = require('fs-extra'); @@ -27,12 +26,10 @@ describe('Acceptance: ember generate in-addon-dummy', function() { BlueprintNpmTask.restoreNPM(Blueprint); }); - beforeEach( - co.wrap(function*() { - let tmpdir = yield mkTmpDirIn(tmproot); - process.chdir(tmpdir); - }) - ); + beforeEach(async function() { + let tmpdir = await mkTmpDirIn(tmproot); + process.chdir(tmpdir); + }); afterEach(function() { process.chdir(root); @@ -57,210 +54,192 @@ describe('Acceptance: ember generate in-addon-dummy', function() { }); } - it( - 'dummy blueprint foo', - co.wrap(function*() { - yield generateInAddon(['blueprint', 'foo', '--dummy']); - - expect(file('blueprints/foo/index.js')).to.contain( - 'module.exports = {\n' + - " description: ''\n" + - '\n' + - ' // locals(options) {\n' + - ' // // Return custom template variables here.\n' + - ' // return {\n' + - ' // foo: options.entity.options.foo\n' + - ' // };\n' + - ' // }\n' + - '\n' + - ' // afterInstall(options) {\n' + - ' // // Perform extra work here.\n' + - ' // }\n' + - '};' - ); - }) - ); - - it( - 'dummy blueprint foo/bar', - co.wrap(function*() { - yield generateInAddon(['blueprint', 'foo/bar', '--dummy']); - - expect(file('blueprints/foo/bar/index.js')).to.contain( - 'module.exports = {\n' + - " description: ''\n" + - '\n' + - ' // locals(options) {\n' + - ' // // Return custom template variables here.\n' + - ' // return {\n' + - ' // foo: options.entity.options.foo\n' + - ' // };\n' + - ' // }\n' + - '\n' + - ' // afterInstall(options) {\n' + - ' // // Perform extra work here.\n' + - ' // }\n' + - '};' - ); - }) - ); - - it( - 'dummy http-mock foo', - co.wrap(function*() { - yield generateInAddon(['http-mock', 'foo', '--dummy']); + it('dummy blueprint foo', async function() { + await generateInAddon(['blueprint', 'foo', '--dummy']); + + expect(file('blueprints/foo/index.js')).to.contain( + 'module.exports = {\n' + + " description: ''\n" + + '\n' + + ' // locals(options) {\n' + + ' // // Return custom template variables here.\n' + + ' // return {\n' + + ' // foo: options.entity.options.foo\n' + + ' // };\n' + + ' // }\n' + + '\n' + + ' // afterInstall(options) {\n' + + ' // // Perform extra work here.\n' + + ' // }\n' + + '};' + ); + }); - expect(file('server/index.js')).to.contain('mocks.forEach(route => route(app));'); + it('dummy blueprint foo/bar', async function() { + await generateInAddon(['blueprint', 'foo/bar', '--dummy']); + + expect(file('blueprints/foo/bar/index.js')).to.contain( + 'module.exports = {\n' + + " description: ''\n" + + '\n' + + ' // locals(options) {\n' + + ' // // Return custom template variables here.\n' + + ' // return {\n' + + ' // foo: options.entity.options.foo\n' + + ' // };\n' + + ' // }\n' + + '\n' + + ' // afterInstall(options) {\n' + + ' // // Perform extra work here.\n' + + ' // }\n' + + '};' + ); + }); - expect(file('server/mocks/foo.js')).to.contain( - 'module.exports = function(app) {\n' + - " const express = require('express');\n" + - ' let fooRouter = express.Router();\n' + - '\n' + - " fooRouter.get('/', function(req, res) {\n" + - ' res.send({\n' + - " 'foo': []\n" + - ' });\n' + - ' });\n' + - '\n' + - " fooRouter.post('/', function(req, res) {\n" + - ' res.status(201).end();\n' + - ' });\n' + - '\n' + - " fooRouter.get('/:id', function(req, res) {\n" + - ' res.send({\n' + - " 'foo': {\n" + - ' id: req.params.id\n' + - ' }\n' + - ' });\n' + - ' });\n' + - '\n' + - " fooRouter.put('/:id', function(req, res) {\n" + - ' res.send({\n' + - " 'foo': {\n" + - ' id: req.params.id\n' + - ' }\n' + - ' });\n' + - ' });\n' + - '\n' + - " fooRouter.delete('/:id', function(req, res) {\n" + - ' res.status(204).end();\n' + - ' });\n' + - '\n' + - ' // The POST and PUT call will not contain a request body\n' + - ' // because the body-parser is not included by default.\n' + - ' // To use req.body, run:\n' + - '\n' + - ' // npm install --save-dev body-parser\n' + - '\n' + - ' // After installing, you need to `use` the body-parser for\n' + - ' // this mock uncommenting the following line:\n' + - ' //\n' + - " //app.use('/api/foo', require('body-parser').json());\n" + - " app.use('/api/foo', fooRouter);\n" + - '};\n' - ); + it('dummy http-mock foo', async function() { + await generateInAddon(['http-mock', 'foo', '--dummy']); + + expect(file('server/index.js')).to.contain('mocks.forEach(route => route(app));'); + + expect(file('server/mocks/foo.js')).to.contain( + 'module.exports = function(app) {\n' + + " const express = require('express');\n" + + ' let fooRouter = express.Router();\n' + + '\n' + + " fooRouter.get('/', function(req, res) {\n" + + ' res.send({\n' + + " 'foo': []\n" + + ' });\n' + + ' });\n' + + '\n' + + " fooRouter.post('/', function(req, res) {\n" + + ' res.status(201).end();\n' + + ' });\n' + + '\n' + + " fooRouter.get('/:id', function(req, res) {\n" + + ' res.send({\n' + + " 'foo': {\n" + + ' id: req.params.id\n' + + ' }\n' + + ' });\n' + + ' });\n' + + '\n' + + " fooRouter.put('/:id', function(req, res) {\n" + + ' res.send({\n' + + " 'foo': {\n" + + ' id: req.params.id\n' + + ' }\n' + + ' });\n' + + ' });\n' + + '\n' + + " fooRouter.delete('/:id', function(req, res) {\n" + + ' res.status(204).end();\n' + + ' });\n' + + '\n' + + ' // The POST and PUT call will not contain a request body\n' + + ' // because the body-parser is not included by default.\n' + + ' // To use req.body, run:\n' + + '\n' + + ' // npm install --save-dev body-parser\n' + + '\n' + + ' // After installing, you need to `use` the body-parser for\n' + + ' // this mock uncommenting the following line:\n' + + ' //\n' + + " //app.use('/api/foo', require('body-parser').json());\n" + + " app.use('/api/foo', fooRouter);\n" + + '};\n' + ); + + expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); + }); - expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); - }) - ); + it('dummy http-mock foo-bar', async function() { + await generateInAddon(['http-mock', 'foo-bar', '--dummy']); + + expect(file('server/index.js')).to.contain('mocks.forEach(route => route(app));'); + + expect(file('server/mocks/foo-bar.js')).to.contain( + 'module.exports = function(app) {\n' + + " const express = require('express');\n" + + ' let fooBarRouter = express.Router();\n' + + '\n' + + " fooBarRouter.get('/', function(req, res) {\n" + + ' res.send({\n' + + " 'foo-bar': []\n" + + ' });\n' + + ' });\n' + + '\n' + + " fooBarRouter.post('/', function(req, res) {\n" + + ' res.status(201).end();\n' + + ' });\n' + + '\n' + + " fooBarRouter.get('/:id', function(req, res) {\n" + + ' res.send({\n' + + " 'foo-bar': {\n" + + ' id: req.params.id\n' + + ' }\n' + + ' });\n' + + ' });\n' + + '\n' + + " fooBarRouter.put('/:id', function(req, res) {\n" + + ' res.send({\n' + + " 'foo-bar': {\n" + + ' id: req.params.id\n' + + ' }\n' + + ' });\n' + + ' });\n' + + '\n' + + " fooBarRouter.delete('/:id', function(req, res) {\n" + + ' res.status(204).end();\n' + + ' });\n' + + '\n' + + ' // The POST and PUT call will not contain a request body\n' + + ' // because the body-parser is not included by default.\n' + + ' // To use req.body, run:\n' + + '\n' + + ' // npm install --save-dev body-parser\n' + + '\n' + + ' // After installing, you need to `use` the body-parser for\n' + + ' // this mock uncommenting the following line:\n' + + ' //\n' + + " //app.use('/api/foo-bar', require('body-parser').json());\n" + + " app.use('/api/foo-bar', fooBarRouter);\n" + + '};\n' + ); + + expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); + }); - it( - 'dummy http-mock foo-bar', - co.wrap(function*() { - yield generateInAddon(['http-mock', 'foo-bar', '--dummy']); + it('dummy http-proxy foo', async function() { + await generateInAddon(['http-proxy', 'foo', 'http://localhost:5000', '--dummy']); - expect(file('server/index.js')).to.contain('mocks.forEach(route => route(app));'); + expect(file('server/index.js')).to.contain('proxies.forEach(route => route(app));'); - expect(file('server/mocks/foo-bar.js')).to.contain( + expect(file('server/proxies/foo.js')).to.contain( + "const proxyPath = '/foo';\n" + + '\n' + 'module.exports = function(app) {\n' + - " const express = require('express');\n" + - ' let fooBarRouter = express.Router();\n' + - '\n' + - " fooBarRouter.get('/', function(req, res) {\n" + - ' res.send({\n' + - " 'foo-bar': []\n" + - ' });\n' + - ' });\n' + - '\n' + - " fooBarRouter.post('/', function(req, res) {\n" + - ' res.status(201).end();\n' + - ' });\n' + - '\n' + - " fooBarRouter.get('/:id', function(req, res) {\n" + - ' res.send({\n' + - " 'foo-bar': {\n" + - ' id: req.params.id\n' + - ' }\n' + - ' });\n' + - ' });\n' + - '\n' + - " fooBarRouter.put('/:id', function(req, res) {\n" + - ' res.send({\n' + - " 'foo-bar': {\n" + - ' id: req.params.id\n' + - ' }\n' + - ' });\n' + - ' });\n' + - '\n' + - " fooBarRouter.delete('/:id', function(req, res) {\n" + - ' res.status(204).end();\n' + - ' });\n' + - '\n' + - ' // The POST and PUT call will not contain a request body\n' + - ' // because the body-parser is not included by default.\n' + - ' // To use req.body, run:\n' + - '\n' + - ' // npm install --save-dev body-parser\n' + - '\n' + - ' // After installing, you need to `use` the body-parser for\n' + - ' // this mock uncommenting the following line:\n' + - ' //\n' + - " //app.use('/api/foo-bar', require('body-parser').json());\n" + - " app.use('/api/foo-bar', fooBarRouter);\n" + - '};\n' - ); - - expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); - }) - ); - - it( - 'dummy http-proxy foo', - co.wrap(function*() { - yield generateInAddon(['http-proxy', 'foo', 'http://localhost:5000', '--dummy']); - - expect(file('server/index.js')).to.contain('proxies.forEach(route => route(app));'); - - expect(file('server/proxies/foo.js')).to.contain( - "const proxyPath = '/foo';\n" + - '\n' + - 'module.exports = function(app) {\n' + - ' // For options, see:\n' + - ' // https://github.com/nodejitsu/node-http-proxy\n' + - " let proxy = require('http-proxy').createProxyServer({});\n" + - '\n' + - " proxy.on('error', function(err, req) {\n" + - ' console.error(err, req.url);\n' + - ' });\n' + - '\n' + - ' app.use(proxyPath, function(req, res, next){\n' + - ' // include root path in proxied request\n' + - " req.url = proxyPath + '/' + req.url;\n" + - " proxy.web(req, res, { target: 'http://localhost:5000' });\n" + - ' });\n' + - '};' - ); - - expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); - }) - ); + ' // For options, see:\n' + + ' // https://github.com/nodejitsu/node-http-proxy\n' + + " let proxy = require('http-proxy').createProxyServer({});\n" + + '\n' + + " proxy.on('error', function(err, req) {\n" + + ' console.error(err, req.url);\n' + + ' });\n' + + '\n' + + ' app.use(proxyPath, function(req, res, next){\n' + + ' // include root path in proxied request\n' + + " req.url = proxyPath + '/' + req.url;\n" + + " proxy.web(req, res, { target: 'http://localhost:5000' });\n" + + ' });\n' + + '};' + ); + + expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); + }); - it( - 'dummy server', - co.wrap(function*() { - yield generateInAddon(['server', '--dummy']); - expect(file('server/index.js')).to.exist; - }) - ); + it('dummy server', async function() { + await generateInAddon(['server', '--dummy']); + expect(file('server/index.js')).to.exist; + }); }); diff --git a/tests/acceptance/addon-generate-test.js b/tests/acceptance/addon-generate-test.js index b2aee78f2e..0c00e89037 100644 --- a/tests/acceptance/addon-generate-test.js +++ b/tests/acceptance/addon-generate-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const RSVP = require('rsvp'); const ember = require('../helpers/ember'); const path = require('path'); @@ -29,12 +28,10 @@ describe('Acceptance: ember generate in-addon', function() { BlueprintNpmTask.restoreNPM(Blueprint); }); - beforeEach( - co.wrap(function*() { - let tmpdir = yield mkTmpDirIn(tmproot); - process.chdir(tmpdir); - }) - ); + beforeEach(async function() { + let tmpdir = await mkTmpDirIn(tmproot); + process.chdir(tmpdir); + }); afterEach(function() { process.chdir(root); @@ -64,263 +61,236 @@ describe('Acceptance: ember generate in-addon', function() { }); } - it( - 'in-addon addon-import cannot be called directly', - co.wrap(function*() { - try { - yield generateInAddon(['addon-import', 'foo']); - } catch (error) { - expect(error.name).to.equal('SilentError'); - expect(error.message).to.equal('You cannot call the addon-import blueprint directly.'); - } - }) - ); + it('in-addon addon-import cannot be called directly', async function() { + try { + await generateInAddon(['addon-import', 'foo']); + } catch (error) { + expect(error.name).to.equal('SilentError'); + expect(error.message).to.equal('You cannot call the addon-import blueprint directly.'); + } + }); if (!isExperimentEnabled('MODULE_UNIFICATION')) { - it( - 'runs the `addon-import` blueprint from a classic addon', - co.wrap(function*() { - yield initAddon('my-addon'); + it('runs the `addon-import` blueprint from a classic addon', async function() { + await initAddon('my-addon'); - yield outputFile( - 'blueprints/service/files/__root__/__path__/__name__.js', - "import Service from '@ember/service';\n" + 'export default Service.extend({ });\n' - ); + await outputFile( + 'blueprints/service/files/__root__/__path__/__name__.js', + "import Service from '@ember/service';\n" + 'export default Service.extend({ });\n' + ); - yield ember(['generate', 'service', 'session']); + await ember(['generate', 'service', 'session']); - expect(file('app/services/session.js')).to.exist; - }) - ); + expect(file('app/services/session.js')).to.exist; + }); } if (!isExperimentEnabled('MODULE_UNIFICATION')) { - it( - 'runs a custom "*-addon" blueprint from a classic addon', - co.wrap(function*() { - yield initAddon('my-addon'); + it('runs a custom "*-addon" blueprint from a classic addon', async function() { + await initAddon('my-addon'); - yield outputFile( - 'blueprints/service/files/__root__/__path__/__name__.js', - "import Service from '@ember/service';\n" + 'export default Service.extend({ });\n' - ); + await outputFile( + 'blueprints/service/files/__root__/__path__/__name__.js', + "import Service from '@ember/service';\n" + 'export default Service.extend({ });\n' + ); - yield outputFile( - 'blueprints/service-addon/files/app/services/session.js', - "export { default } from 'somewhere';\n" - ); + await outputFile( + 'blueprints/service-addon/files/app/services/session.js', + "export { default } from 'somewhere';\n" + ); - yield ember(['generate', 'service', 'session']); + await ember(['generate', 'service', 'session']); - expect(file('app/services/session.js')).to.exist; - }) - ); + expect(file('app/services/session.js')).to.exist; + }); } - it( - 'in-addon blueprint foo', - co.wrap(function*() { - yield generateInAddon(['blueprint', 'foo']); - - expect(file('blueprints/foo/index.js')).to.contain( - 'module.exports = {\n' + - " description: ''\n" + - '\n' + - ' // locals(options) {\n' + - ' // // Return custom template variables here.\n' + - ' // return {\n' + - ' // foo: options.entity.options.foo\n' + - ' // };\n' + - ' // }\n' + - '\n' + - ' // afterInstall(options) {\n' + - ' // // Perform extra work here.\n' + - ' // }\n' + - '};' - ); - }) - ); - - it( - 'in-addon blueprint foo/bar', - co.wrap(function*() { - yield generateInAddon(['blueprint', 'foo/bar']); - - expect(file('blueprints/foo/bar/index.js')).to.contain( - 'module.exports = {\n' + - " description: ''\n" + - '\n' + - ' // locals(options) {\n' + - ' // // Return custom template variables here.\n' + - ' // return {\n' + - ' // foo: options.entity.options.foo\n' + - ' // };\n' + - ' // }\n' + - '\n' + - ' // afterInstall(options) {\n' + - ' // // Perform extra work here.\n' + - ' // }\n' + - '};' - ); - }) - ); + it('in-addon blueprint foo', async function() { + await generateInAddon(['blueprint', 'foo']); + + expect(file('blueprints/foo/index.js')).to.contain( + 'module.exports = {\n' + + " description: ''\n" + + '\n' + + ' // locals(options) {\n' + + ' // // Return custom template variables here.\n' + + ' // return {\n' + + ' // foo: options.entity.options.foo\n' + + ' // };\n' + + ' // }\n' + + '\n' + + ' // afterInstall(options) {\n' + + ' // // Perform extra work here.\n' + + ' // }\n' + + '};' + ); + }); - it( - 'in-addon http-mock foo', - co.wrap(function*() { - yield generateInAddon(['http-mock', 'foo']); + it('in-addon blueprint foo/bar', async function() { + await generateInAddon(['blueprint', 'foo/bar']); + + expect(file('blueprints/foo/bar/index.js')).to.contain( + 'module.exports = {\n' + + " description: ''\n" + + '\n' + + ' // locals(options) {\n' + + ' // // Return custom template variables here.\n' + + ' // return {\n' + + ' // foo: options.entity.options.foo\n' + + ' // };\n' + + ' // }\n' + + '\n' + + ' // afterInstall(options) {\n' + + ' // // Perform extra work here.\n' + + ' // }\n' + + '};' + ); + }); - expect(file('server/index.js')).to.contain('mocks.forEach(route => route(app));'); + it('in-addon http-mock foo', async function() { + await generateInAddon(['http-mock', 'foo']); + + expect(file('server/index.js')).to.contain('mocks.forEach(route => route(app));'); + + expect(file('server/mocks/foo.js')).to.contain( + 'module.exports = function(app) {\n' + + " const express = require('express');\n" + + ' let fooRouter = express.Router();\n' + + '\n' + + " fooRouter.get('/', function(req, res) {\n" + + ' res.send({\n' + + " 'foo': []\n" + + ' });\n' + + ' });\n' + + '\n' + + " fooRouter.post('/', function(req, res) {\n" + + ' res.status(201).end();\n' + + ' });\n' + + '\n' + + " fooRouter.get('/:id', function(req, res) {\n" + + ' res.send({\n' + + " 'foo': {\n" + + ' id: req.params.id\n' + + ' }\n' + + ' });\n' + + ' });\n' + + '\n' + + " fooRouter.put('/:id', function(req, res) {\n" + + ' res.send({\n' + + " 'foo': {\n" + + ' id: req.params.id\n' + + ' }\n' + + ' });\n' + + ' });\n' + + '\n' + + " fooRouter.delete('/:id', function(req, res) {\n" + + ' res.status(204).end();\n' + + ' });\n' + + '\n' + + ' // The POST and PUT call will not contain a request body\n' + + ' // because the body-parser is not included by default.\n' + + ' // To use req.body, run:\n' + + '\n' + + ' // npm install --save-dev body-parser\n' + + '\n' + + ' // After installing, you need to `use` the body-parser for\n' + + ' // this mock uncommenting the following line:\n' + + ' //\n' + + " //app.use('/api/foo', require('body-parser').json());\n" + + " app.use('/api/foo', fooRouter);\n" + + '};' + ); - expect(file('server/mocks/foo.js')).to.contain( - 'module.exports = function(app) {\n' + - " const express = require('express');\n" + - ' let fooRouter = express.Router();\n' + - '\n' + - " fooRouter.get('/', function(req, res) {\n" + - ' res.send({\n' + - " 'foo': []\n" + - ' });\n' + - ' });\n' + - '\n' + - " fooRouter.post('/', function(req, res) {\n" + - ' res.status(201).end();\n' + - ' });\n' + - '\n' + - " fooRouter.get('/:id', function(req, res) {\n" + - ' res.send({\n' + - " 'foo': {\n" + - ' id: req.params.id\n' + - ' }\n' + - ' });\n' + - ' });\n' + - '\n' + - " fooRouter.put('/:id', function(req, res) {\n" + - ' res.send({\n' + - " 'foo': {\n" + - ' id: req.params.id\n' + - ' }\n' + - ' });\n' + - ' });\n' + - '\n' + - " fooRouter.delete('/:id', function(req, res) {\n" + - ' res.status(204).end();\n' + - ' });\n' + - '\n' + - ' // The POST and PUT call will not contain a request body\n' + - ' // because the body-parser is not included by default.\n' + - ' // To use req.body, run:\n' + - '\n' + - ' // npm install --save-dev body-parser\n' + - '\n' + - ' // After installing, you need to `use` the body-parser for\n' + - ' // this mock uncommenting the following line:\n' + - ' //\n' + - " //app.use('/api/foo', require('body-parser').json());\n" + - " app.use('/api/foo', fooRouter);\n" + - '};' - ); + expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); + }); + + it('in-addon http-mock foo-bar', async function() { + await generateInAddon(['http-mock', 'foo-bar']); + + expect(file('server/index.js')).to.contain('mocks.forEach(route => route(app));'); + + expect(file('server/mocks/foo-bar.js')).to.contain( + 'module.exports = function(app) {\n' + + " const express = require('express');\n" + + ' let fooBarRouter = express.Router();\n' + + '\n' + + " fooBarRouter.get('/', function(req, res) {\n" + + ' res.send({\n' + + " 'foo-bar': []\n" + + ' });\n' + + ' });\n' + + '\n' + + " fooBarRouter.post('/', function(req, res) {\n" + + ' res.status(201).end();\n' + + ' });\n' + + '\n' + + " fooBarRouter.get('/:id', function(req, res) {\n" + + ' res.send({\n' + + " 'foo-bar': {\n" + + ' id: req.params.id\n' + + ' }\n' + + ' });\n' + + ' });\n' + + '\n' + + " fooBarRouter.put('/:id', function(req, res) {\n" + + ' res.send({\n' + + " 'foo-bar': {\n" + + ' id: req.params.id\n' + + ' }\n' + + ' });\n' + + ' });\n' + + '\n' + + " fooBarRouter.delete('/:id', function(req, res) {\n" + + ' res.status(204).end();\n' + + ' });\n' + + '\n' + + ' // The POST and PUT call will not contain a request body\n' + + ' // because the body-parser is not included by default.\n' + + ' // To use req.body, run:\n' + + '\n' + + ' // npm install --save-dev body-parser\n' + + '\n' + + ' // After installing, you need to `use` the body-parser for\n' + + ' // this mock uncommenting the following line:\n' + + ' //\n' + + " //app.use('/api/foo-bar', require('body-parser').json());\n" + + " app.use('/api/foo-bar', fooBarRouter);\n" + + '};' + ); - expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); - }) - ); + expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); + }); - it( - 'in-addon http-mock foo-bar', - co.wrap(function*() { - yield generateInAddon(['http-mock', 'foo-bar']); + it('in-addon http-proxy foo', async function() { + await generateInAddon(['http-proxy', 'foo', 'http://localhost:5000']); - expect(file('server/index.js')).to.contain('mocks.forEach(route => route(app));'); + expect(file('server/index.js')).to.contain('proxies.forEach(route => route(app));'); - expect(file('server/mocks/foo-bar.js')).to.contain( + expect(file('server/proxies/foo.js')).to.contain( + "const proxyPath = '/foo';\n" + + '\n' + 'module.exports = function(app) {\n' + - " const express = require('express');\n" + - ' let fooBarRouter = express.Router();\n' + - '\n' + - " fooBarRouter.get('/', function(req, res) {\n" + - ' res.send({\n' + - " 'foo-bar': []\n" + - ' });\n' + - ' });\n' + - '\n' + - " fooBarRouter.post('/', function(req, res) {\n" + - ' res.status(201).end();\n' + - ' });\n' + - '\n' + - " fooBarRouter.get('/:id', function(req, res) {\n" + - ' res.send({\n' + - " 'foo-bar': {\n" + - ' id: req.params.id\n' + - ' }\n' + - ' });\n' + - ' });\n' + - '\n' + - " fooBarRouter.put('/:id', function(req, res) {\n" + - ' res.send({\n' + - " 'foo-bar': {\n" + - ' id: req.params.id\n' + - ' }\n' + - ' });\n' + - ' });\n' + - '\n' + - " fooBarRouter.delete('/:id', function(req, res) {\n" + - ' res.status(204).end();\n' + - ' });\n' + - '\n' + - ' // The POST and PUT call will not contain a request body\n' + - ' // because the body-parser is not included by default.\n' + - ' // To use req.body, run:\n' + - '\n' + - ' // npm install --save-dev body-parser\n' + - '\n' + - ' // After installing, you need to `use` the body-parser for\n' + - ' // this mock uncommenting the following line:\n' + - ' //\n' + - " //app.use('/api/foo-bar', require('body-parser').json());\n" + - " app.use('/api/foo-bar', fooBarRouter);\n" + - '};' - ); + ' // For options, see:\n' + + ' // https://github.com/nodejitsu/node-http-proxy\n' + + " let proxy = require('http-proxy').createProxyServer({});\n" + + '\n' + + " proxy.on('error', function(err, req) {\n" + + ' console.error(err, req.url);\n' + + ' });\n' + + '\n' + + ' app.use(proxyPath, function(req, res, next){\n' + + ' // include root path in proxied request\n' + + " req.url = proxyPath + '/' + req.url;\n" + + " proxy.web(req, res, { target: 'http://localhost:5000' });\n" + + ' });\n' + + '};' + ); - expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); - }) - ); - - it( - 'in-addon http-proxy foo', - co.wrap(function*() { - yield generateInAddon(['http-proxy', 'foo', 'http://localhost:5000']); - - expect(file('server/index.js')).to.contain('proxies.forEach(route => route(app));'); - - expect(file('server/proxies/foo.js')).to.contain( - "const proxyPath = '/foo';\n" + - '\n' + - 'module.exports = function(app) {\n' + - ' // For options, see:\n' + - ' // https://github.com/nodejitsu/node-http-proxy\n' + - " let proxy = require('http-proxy').createProxyServer({});\n" + - '\n' + - " proxy.on('error', function(err, req) {\n" + - ' console.error(err, req.url);\n' + - ' });\n' + - '\n' + - ' app.use(proxyPath, function(req, res, next){\n' + - ' // include root path in proxied request\n' + - " req.url = proxyPath + '/' + req.url;\n" + - " proxy.web(req, res, { target: 'http://localhost:5000' });\n" + - ' });\n' + - '};' - ); + expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); + }); - expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); - }) - ); - - it( - 'in-addon server', - co.wrap(function*() { - yield generateInAddon(['server']); - expect(file('server/index.js')).to.exist; - }) - ); + it('in-addon server', async function() { + await generateInAddon(['server']); + expect(file('server/index.js')).to.exist; + }); }); diff --git a/tests/acceptance/addon-smoke-test-slow.js b/tests/acceptance/addon-smoke-test-slow.js index 139e0d7c7a..415e584fa1 100644 --- a/tests/acceptance/addon-smoke-test-slow.js +++ b/tests/acceptance/addon-smoke-test-slow.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const Promise = require('rsvp').Promise; const path = require('path'); const fs = require('fs-extra'); @@ -65,99 +64,93 @@ describe('Acceptance: addon-smoke-test', function() { return ember(['test']); }); - it( - 'works in most common scenarios for an example addon', - co.wrap(function*() { - yield copyFixtureFiles('addon/kitchen-sink'); + it('works in most common scenarios for an example addon', async function() { + await copyFixtureFiles('addon/kitchen-sink'); - let packageJsonPath = path.join(addonRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); + let packageJsonPath = path.join(addonRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); - expect(packageJson.devDependencies['ember-source']).to.not.be.empty; + expect(packageJson.devDependencies['ember-source']).to.not.be.empty; - packageJson.dependencies = packageJson.dependencies || {}; - // add HTMLBars for templates (generators do this automatically when components/templates are added) - packageJson.dependencies['ember-cli-htmlbars'] = 'latest'; + packageJson.dependencies = packageJson.dependencies || {}; + // add HTMLBars for templates (generators do this automatically when components/templates are added) + packageJson.dependencies['ember-cli-htmlbars'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); + fs.writeJsonSync(packageJsonPath, packageJson); - let result = yield runCommand('node_modules/ember-cli/bin/ember', 'build'); + let result = await runCommand('node_modules/ember-cli/bin/ember', 'build'); - expect(result.code).to.eql(0); - let contents; + expect(result.code).to.eql(0); + let contents; - let indexPath = path.join(addonRoot, 'dist', 'index.html'); - contents = fs.readFileSync(indexPath, { encoding: 'utf8' }); - expect(contents).to.contain('"SOME AWESOME STUFF"'); + let indexPath = path.join(addonRoot, 'dist', 'index.html'); + contents = fs.readFileSync(indexPath, { encoding: 'utf8' }); + expect(contents).to.contain('"SOME AWESOME STUFF"'); - let cssPath = path.join(addonRoot, 'dist', 'assets', 'vendor.css'); - contents = fs.readFileSync(cssPath, { encoding: 'utf8' }); - expect(contents).to.contain('addon/styles/app.css is present'); + let cssPath = path.join(addonRoot, 'dist', 'assets', 'vendor.css'); + contents = fs.readFileSync(cssPath, { encoding: 'utf8' }); + expect(contents).to.contain('addon/styles/app.css is present'); - let robotsPath = path.join(addonRoot, 'dist', 'robots.txt'); - contents = fs.readFileSync(robotsPath, { encoding: 'utf8' }); - expect(contents).to.contain('tests/dummy/public/robots.txt is present'); + let robotsPath = path.join(addonRoot, 'dist', 'robots.txt'); + contents = fs.readFileSync(robotsPath, { encoding: 'utf8' }); + expect(contents).to.contain('tests/dummy/public/robots.txt is present'); - result = yield runCommand('node_modules/ember-cli/bin/ember', 'test'); + result = await runCommand('node_modules/ember-cli/bin/ember', 'test'); - expect(result.code).to.eql(0); - }) - ); - - it( - 'npm pack does not include unnecessary files', - co.wrap(function*() { - let handleError = function(error, commandName) { - if (error.code === 'ENOENT') { - console.warn(chalk.yellow(` Your system does not provide ${commandName} -> Skipped this test.`)); - } else { - throw new Error(error); - } - }; - - try { - yield npmPack(); - } catch (error) { - return handleError(error, 'npm'); - } + expect(result.code).to.eql(0); + }); - let output; - try { - output = yield tar(); - } catch (error) { - return handleError(error, 'tar'); + it('npm pack does not include unnecessary files', async function() { + let handleError = function(error, commandName) { + if (error.code === 'ENOENT') { + console.warn(chalk.yellow(` Your system does not provide ${commandName} -> Skipped this test.`)); + } else { + throw new Error(error); } - - let necessaryFiles = ['package.json', 'index.js', 'LICENSE.md', 'README.md', 'config/environment.js']; - - let unnecessaryFiles = [ - '.gitkeep', - '.travis.yml', - '.editorconfig', - 'testem.js', - '.ember-cli', - 'bower.json', - '.bowerrc', - ]; - - let unnecessaryFolders = [/^tests\//, /^bower_components\//]; - - let outputFiles = output - .split('\n') - .filter(Boolean) - .map(f => f.replace(/^package\//, '')); - - expect(outputFiles, 'verify our assumptions about the output structure').to.include.members(necessaryFiles); - - expect(outputFiles).to.not.have.members(unnecessaryFiles); - - for (let unnecessaryFolder of unnecessaryFolders) { - for (let outputFile of outputFiles) { - expect(outputFile).to.not.match(unnecessaryFolder); - } + }; + + try { + await npmPack(); + } catch (error) { + return handleError(error, 'npm'); + } + + let output; + try { + output = await tar(); + } catch (error) { + return handleError(error, 'tar'); + } + + let necessaryFiles = ['package.json', 'index.js', 'LICENSE.md', 'README.md', 'config/environment.js']; + + let unnecessaryFiles = [ + '.gitkeep', + '.travis.yml', + '.editorconfig', + 'testem.js', + '.ember-cli', + 'bower.json', + '.bowerrc', + ]; + + let unnecessaryFolders = [/^tests\//, /^bower_components\//]; + + let outputFiles = output + .split('\n') + .filter(Boolean) + .map(f => f.replace(/^package\//, '')); + + expect(outputFiles, 'verify our assumptions about the output structure').to.include.members(necessaryFiles); + + expect(outputFiles).to.not.have.members(unnecessaryFiles); + + for (let unnecessaryFolder of unnecessaryFolders) { + for (let outputFile of outputFiles) { + expect(outputFile).to.not.match(unnecessaryFolder); } - }) - ); + } + }); } }); diff --git a/tests/acceptance/brocfile-smoke-test-slow.js b/tests/acceptance/brocfile-smoke-test-slow.js index f37d8cd883..0141f65fd9 100644 --- a/tests/acceptance/brocfile-smoke-test-slow.js +++ b/tests/acceptance/brocfile-smoke-test-slow.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const RSVP = require('rsvp'); const path = require('path'); const fs = require('fs-extra'); @@ -42,448 +41,376 @@ describe('Acceptance: brocfile-smoke-test', function() { }); if (!isExperimentEnabled('MODULE_UNIFICATION')) { - it( - 'a custom EmberENV in config/environment.js is used for window.EmberENV', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/custom-ember-env'); - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + it('a custom EmberENV in config/environment.js is used for window.EmberENV', async function() { + await copyFixtureFiles('brocfile-tests/custom-ember-env'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let vendorContents = fs.readFileSync(path.join('dist', 'assets', 'vendor.js'), { + encoding: 'utf8', + }); + + // Changes in config/optional-features.json end up being set in EmberENV + let expected = + '(window.EmberENV || {}, {"asdflkmawejf":";jlnu3yr23","_APPLICATION_TEMPLATE_WRAPPER":false,"_DEFAULT_ASYNC_OBSERVERS":true,"_JQUERY_INTEGRATION":false,"_TEMPLATE_ONLY_GLIMMER_COMPONENTS":true});'; + expect(vendorContents).to.contain(expected, 'EmberENV should be in assets/vendor.js'); + }); + + it('a custom environment config can be used in Brocfile.js', async function() { + await copyFixtureFiles('brocfile-tests/custom-environment-config'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); + }); + + it('without app/templates', async function() { + await copyFixtureFiles('brocfile-tests/pods-templates'); + await remove(path.join(process.cwd(), 'app/templates')); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); + }); + + it('strips app/styles or app/templates from JS', async function() { + await copyFixtureFiles('brocfile-tests/styles-and-templates-stripped'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let appFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', `${appName}.js`), { + encoding: 'utf8', + }); + + expect(appFileContents).to.include('//app/templates-stuff.js'); + expect(appFileContents).to.include('//app/styles-manager.js'); + }); + + it('should throw if no build file is found', async function() { + fs.removeSync('./ember-cli-build.js'); + try { + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + } catch (err) { + expect(err.code).to.eql(1); + } + }); + + it('using autoRun: true', async function() { + await copyFixtureFiles('brocfile-tests/auto-run-true'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let appFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', `${appName}.js`), { + encoding: 'utf8', + }); + expect(appFileContents).to.match(/\/app"\)\["default"\]\.create\(/); + }); + + it('using autoRun: false', async function() { + await copyFixtureFiles('brocfile-tests/auto-run-false'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let appFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', `${appName}.js`), { + encoding: 'utf8', + }); + + expect(appFileContents).to.not.match(/\/app"\)\["default"\]\.create\(/); + }); + + it('app.import works properly with test tree files', async function() { + await copyFixtureFiles('brocfile-tests/app-test-import'); + + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-test-addon'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); + + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let subjectFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'test-support.js'), { + encoding: 'utf8', + }); + + expect(subjectFileContents).to.contain('// File for test tree imported and added via postprocessTree()'); + }); + + it('app.import works properly with non-js/css files', async function() { + await copyFixtureFiles('brocfile-tests/app-import'); + + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-random-addon'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); + + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let subjectFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'file-to-import.txt'), { + encoding: 'utf8', + }); + + expect(subjectFileContents).to.equal('EXAMPLE TEXT FILE CONTENT\n'); + }); + + it('addons can have a public tree that is merged and returned namespaced by default', async function() { + await copyFixtureFiles('brocfile-tests/public-tree'); - let vendorContents = fs.readFileSync(path.join('dist', 'assets', 'vendor.js'), { + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-random-addon'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); + + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let subjectFileContents = fs.readFileSync( + path.join(appRoot, 'dist', 'ember-random-addon', 'some-root-file.txt'), + { encoding: 'utf8', - }); - - // Changes in config/optional-features.json end up being set in EmberENV - let expected = - '(window.EmberENV || {}, {"asdflkmawejf":";jlnu3yr23","_APPLICATION_TEMPLATE_WRAPPER":false,"_DEFAULT_ASYNC_OBSERVERS":true,"_JQUERY_INTEGRATION":false,"_TEMPLATE_ONLY_GLIMMER_COMPONENTS":true});'; - expect(vendorContents).to.contain(expected, 'EmberENV should be in assets/vendor.js'); - }) - ); - - it( - 'a custom environment config can be used in Brocfile.js', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/custom-environment-config'); - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); - }) - ); - - it( - 'without app/templates', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/pods-templates'); - yield remove(path.join(process.cwd(), 'app/templates')); - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); - }) - ); - - it( - 'strips app/styles or app/templates from JS', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/styles-and-templates-stripped'); - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - let appFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', `${appName}.js`), { - encoding: 'utf8', - }); - - expect(appFileContents).to.include('//app/templates-stuff.js'); - expect(appFileContents).to.include('//app/styles-manager.js'); - }) - ); - - it( - 'should throw if no build file is found', - co.wrap(function*() { - fs.removeSync('./ember-cli-build.js'); - try { - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - } catch (err) { - expect(err.code).to.eql(1); } - }) - ); + ); + + expect(subjectFileContents).to.equal('ROOT FILE\n'); + }); + + it('using pods based templates', async function() { + await copyFixtureFiles('brocfile-tests/pods-templates'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); + }); + + it('using pods based templates with a podModulePrefix', async function() { + await copyFixtureFiles('brocfile-tests/pods-with-prefix-templates'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); + }); + + it('addon trees are not jshinted', async function() { + await copyFixtureFiles('brocfile-tests/jshint-addon'); + + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson['ember-addon'] = { + paths: ['./lib/ember-random-thing'], + }; + fs.writeJsonSync(packageJsonPath, packageJson); + + let ember = path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'); + + let error = await expect(runCommand(ember, 'test', '--filter=jshint')).to.eventually.be.rejected; + + expect(error.output.join('')).to.include('Error: No tests matched the filter "jshint"'); + }); + + it('multiple css files in styles/ are output when a preprocessor is not used', async function() { + await copyFixtureFiles('brocfile-tests/multiple-css-files'); + + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let files = ['/assets/some-cool-app.css', '/assets/other.css']; + + let basePath = path.join(appRoot, 'dist'); + files.forEach(function(f) { + expect(file(path.join(basePath, f))).to.exist; + }); + }); + + it('specifying custom output paths works properly', async function() { + await copyFixtureFiles('brocfile-tests/custom-output-paths'); + + let themeCSSPath = path.join(appRoot, 'app', 'styles', 'theme.css'); + fs.writeFileSync(themeCSSPath, 'html, body { margin: 20%; }'); + + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let files = [ + '/css/app.css', + '/css/theme/a.css', + '/js/app.js', + '/css/vendor.css', + '/js/vendor.js', + '/css/test-support.css', + '/js/test-support.js', + '/my-app.html', + ]; + + let basePath = path.join(appRoot, 'dist'); + files.forEach(function(f) { + expect(file(path.join(basePath, f))).to.exist; + }); + }); + + it('specifying outputFile results in an explicitly generated assets', async function() { + await copyFixtureFiles('brocfile-tests/app-import-output-file'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let files = ['/assets/output-file.js', '/assets/output-file.css', '/assets/vendor.css', '/assets/vendor.js']; + + let basePath = path.join(appRoot, 'dist'); + files.forEach(function(f) { + expect(file(path.join(basePath, f))).to.exist; + }); + }); + + it('can use transformation to turn anonymous AMD into named AMD', async function() { + await copyFixtureFiles('brocfile-tests/app-import-anonymous-amd'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let outputJS = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'output.js'), { + encoding: 'utf8', + }); + + (function() { + let defineCount = 0; + // eslint-disable-next-line no-unused-vars + function define(name, deps, factory) { + expect(name).to.equal('hello-world'); + expect(deps).to.deep.equal([]); + expect(factory()()).to.equal('Hello World'); + defineCount++; + } + /* eslint-disable no-eval */ + eval(outputJS); + /* eslint-enable no-eval */ + expect(defineCount).to.eql(1); + })(); + }); + + it('can do amd transform from addon', async function() { + await copyFixtureFiles('brocfile-tests/app-import-custom-transform'); + + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-transform-addon'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); + + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let addonOutputJs = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'addon-output.js'), { + encoding: 'utf8', + }); + + (function() { + let defineCount = 0; + // eslint-disable-next-line no-unused-vars + function define(name, deps, factory) { + expect(name).to.equal('addon-vendor'); + expect(deps).to.deep.equal([]); + expect(factory()()).to.equal('Hello World'); + defineCount++; + } + /* eslint-disable no-eval */ + eval(addonOutputJs); + /* eslint-enable no-eval */ + expect(defineCount).to.eql(1); + })(); + }); - it( - 'using autoRun: true', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/auto-run-true'); - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + it('can use transformation to turn library into custom transformation', async function() { + await copyFixtureFiles('brocfile-tests/app-import-custom-transform'); - let appFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', `${appName}.js`), { - encoding: 'utf8', - }); - expect(appFileContents).to.match(/\/app"\)\["default"\]\.create\(/); - }) - ); - - it( - 'using autoRun: false', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/auto-run-false'); - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - let appFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', `${appName}.js`), { - encoding: 'utf8', - }); + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-transform-addon'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); - expect(appFileContents).to.not.match(/\/app"\)\["default"\]\.create\(/); - }) - ); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - it( - 'app.import works properly with test tree files', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/app-test-import'); + let outputJS = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'output.js'), { + encoding: 'utf8', + }); - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-test-addon'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); + expect(outputJS).to.be.equal( + 'if (typeof FastBoot === \'undefined\') { window.hello = "hello world"; }//# sourceMappingURL=output.map\n' + ); + }); - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + // skipped because of potentially broken assertion that should be fixed correctly at a later point + it.skip('specifying partial `outputPaths` hash deep merges options correctly', async function() { + await copyFixtureFiles('brocfile-tests/custom-output-paths'); - let subjectFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'test-support.js'), { - encoding: 'utf8', - }); + let themeCSSPath = path.join(appRoot, 'app', 'styles', 'theme.css'); + fs.writeFileSync(themeCSSPath, 'html, body { margin: 20%; }'); - expect(subjectFileContents).to.contain('// File for test tree imported and added via postprocessTree()'); - }) - ); + let brocfilePath = path.join(appRoot, 'ember-cli-build.js'); + let brocfile = fs.readFileSync(brocfilePath, 'utf8'); - it( - 'app.import works properly with non-js/css files', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/app-import'); + // remove outputPaths.app.js option + brocfile = brocfile.replace(/js: '\/js\/app.js'/, ''); + // remove outputPaths.app.css.app option + brocfile = brocfile.replace(/'app': '\/css\/app\.css',/, ''); - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-random-addon'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); + fs.writeFileSync(brocfilePath, brocfile, 'utf8'); - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - let subjectFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'file-to-import.txt'), { - encoding: 'utf8', - }); - - expect(subjectFileContents).to.equal('EXAMPLE TEXT FILE CONTENT\n'); - }) - ); - - it( - 'addons can have a public tree that is merged and returned namespaced by default', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/public-tree'); - - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-random-addon'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); - - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - let subjectFileContents = fs.readFileSync( - path.join(appRoot, 'dist', 'ember-random-addon', 'some-root-file.txt'), - { - encoding: 'utf8', - } - ); - - expect(subjectFileContents).to.equal('ROOT FILE\n'); - }) - ); - - it( - 'using pods based templates', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/pods-templates'); - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); - }) - ); - - it( - 'using pods based templates with a podModulePrefix', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/pods-with-prefix-templates'); - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); - }) - ); - - it( - 'addon trees are not jshinted', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/jshint-addon'); - - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson['ember-addon'] = { - paths: ['./lib/ember-random-thing'], - }; - fs.writeJsonSync(packageJsonPath, packageJson); - - let ember = path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'); - - let error = yield expect(runCommand(ember, 'test', '--filter=jshint')).to.eventually.be.rejected; - - expect(error.output.join('')).to.include('Error: No tests matched the filter "jshint"'); - }) - ); - - it( - 'multiple css files in styles/ are output when a preprocessor is not used', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/multiple-css-files'); - - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - let files = ['/assets/some-cool-app.css', '/assets/other.css']; - - let basePath = path.join(appRoot, 'dist'); - files.forEach(function(f) { - expect(file(path.join(basePath, f))).to.exist; - }); - }) - ); - - it( - 'specifying custom output paths works properly', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/custom-output-paths'); - - let themeCSSPath = path.join(appRoot, 'app', 'styles', 'theme.css'); - fs.writeFileSync(themeCSSPath, 'html, body { margin: 20%; }'); - - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - let files = [ - '/css/app.css', - '/css/theme/a.css', - '/js/app.js', - '/css/vendor.css', - '/js/vendor.js', - '/css/test-support.css', - '/js/test-support.js', - '/my-app.html', - ]; - - let basePath = path.join(appRoot, 'dist'); - files.forEach(function(f) { - expect(file(path.join(basePath, f))).to.exist; - }); - }) - ); - - it( - 'specifying outputFile results in an explicitly generated assets', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/app-import-output-file'); - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - let files = ['/assets/output-file.js', '/assets/output-file.css', '/assets/vendor.css', '/assets/vendor.js']; - - let basePath = path.join(appRoot, 'dist'); - files.forEach(function(f) { - expect(file(path.join(basePath, f))).to.exist; - }); - }) - ); - - it( - 'can use transformation to turn anonymous AMD into named AMD', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/app-import-anonymous-amd'); - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - let outputJS = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'output.js'), { - encoding: 'utf8', - }); - - (function() { - let defineCount = 0; - // eslint-disable-next-line no-unused-vars - function define(name, deps, factory) { - expect(name).to.equal('hello-world'); - expect(deps).to.deep.equal([]); - expect(factory()()).to.equal('Hello World'); - defineCount++; - } - /* eslint-disable no-eval */ - eval(outputJS); - /* eslint-enable no-eval */ - expect(defineCount).to.eql(1); - })(); - }) - ); - - it( - 'can do amd transform from addon', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/app-import-custom-transform'); - - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-transform-addon'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); - - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - let addonOutputJs = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'addon-output.js'), { - encoding: 'utf8', - }); - - (function() { - let defineCount = 0; - // eslint-disable-next-line no-unused-vars - function define(name, deps, factory) { - expect(name).to.equal('addon-vendor'); - expect(deps).to.deep.equal([]); - expect(factory()()).to.equal('Hello World'); - defineCount++; - } - /* eslint-disable no-eval */ - eval(addonOutputJs); - /* eslint-enable no-eval */ - expect(defineCount).to.eql(1); - })(); - }) - ); - - it( - 'can use transformation to turn library into custom transformation', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/app-import-custom-transform'); - - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-transform-addon'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); - - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - let outputJS = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'output.js'), { - encoding: 'utf8', - }); + let files = [ + '/css/theme/a.css', + '/assets/some-cool-app.js', + '/css/vendor.css', + '/js/vendor.js', + '/css/test-support.css', + '/js/test-support.js', + ]; - expect(outputJS).to.be.equal( - 'if (typeof FastBoot === \'undefined\') { window.hello = "hello world"; }//# sourceMappingURL=output.map\n' - ); - }) - ); + let basePath = path.join(appRoot, 'dist'); + files.forEach(function(f) { + expect(file(path.join(basePath, f))).to.exist; + }); - // skipped because of potentially broken assertion that should be fixed correctly at a later point - it.skip( - 'specifying partial `outputPaths` hash deep merges options correctly', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/custom-output-paths'); - - let themeCSSPath = path.join(appRoot, 'app', 'styles', 'theme.css'); - fs.writeFileSync(themeCSSPath, 'html, body { margin: 20%; }'); - - let brocfilePath = path.join(appRoot, 'ember-cli-build.js'); - let brocfile = fs.readFileSync(brocfilePath, 'utf8'); - - // remove outputPaths.app.js option - brocfile = brocfile.replace(/js: '\/js\/app.js'/, ''); - // remove outputPaths.app.css.app option - brocfile = brocfile.replace(/'app': '\/css\/app\.css',/, ''); - - fs.writeFileSync(brocfilePath, brocfile, 'utf8'); - - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - let files = [ - '/css/theme/a.css', - '/assets/some-cool-app.js', - '/css/vendor.css', - '/js/vendor.js', - '/css/test-support.css', - '/js/test-support.js', - ]; - - let basePath = path.join(appRoot, 'dist'); - files.forEach(function(f) { - expect(file(path.join(basePath, f))).to.exist; - }); - - expect(file(path.join(basePath, '/assets/some-cool-app.css'))).to.not.exist; - }) - ); - - it( - 'multiple paths can be CSS preprocessed', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/multiple-sass-files'); - - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-cli-sass'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); - - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - expect(file('dist/assets/main.css')).to.equal( - 'body { background: black; }\n', - 'main.css contains correct content' - ); - - expect(file('dist/assets/theme/a.css')).to.equal( - '.theme { color: red; }\n', - 'theme/a.css contains correct content' - ); - }) - ); - - it( - 'app.css is output to .css by default', - co.wrap(function*() { - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - expect(file(`dist/assets/${appName}.css`)).to.exist; - }) - ); + expect(file(path.join(basePath, '/assets/some-cool-app.css'))).to.not.exist; + }); + + it('multiple paths can be CSS preprocessed', async function() { + await copyFixtureFiles('brocfile-tests/multiple-sass-files'); + + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-cli-sass'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); + + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + expect(file('dist/assets/main.css')).to.equal( + 'body { background: black; }\n', + 'main.css contains correct content' + ); + + expect(file('dist/assets/theme/a.css')).to.equal( + '.theme { color: red; }\n', + 'theme/a.css contains correct content' + ); + }); + + it('app.css is output to .css by default', async function() { + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + expect(file(`dist/assets/${appName}.css`)).to.exist; + }); // for backwards compat. - it( - 'app.scss is output to .css by default', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/multiple-sass-files'); - - let brocfilePath = path.join(appRoot, 'ember-cli-build.js'); - let brocfile = fs.readFileSync(brocfilePath, 'utf8'); - - // remove custom preprocessCss paths, use app.scss instead - brocfile = brocfile.replace(/outputPaths.*/, ''); - - fs.writeFileSync(brocfilePath, brocfile, 'utf8'); - - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-cli-sass'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); - - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - expect(file(`dist/assets/${appName}.css`)).to.equal('body { background: green; }\n'); - }) - ); - - it( - 'additional trees can be passed to the app', - co.wrap(function*() { - yield copyFixtureFiles('brocfile-tests/additional-trees'); - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', { verbose: true }); - - let files = [ - '/assets/custom-output-file.js', - '/assets/custom-output-file.css', - '/assets/vendor.css', - '/assets/vendor.js', - ]; - - let basePath = path.join(appRoot, 'dist'); - files.forEach(function(f) { - expect(file(path.join(basePath, f))).to.exist; - }); - }) - ); + it('app.scss is output to .css by default', async function() { + await copyFixtureFiles('brocfile-tests/multiple-sass-files'); + + let brocfilePath = path.join(appRoot, 'ember-cli-build.js'); + let brocfile = fs.readFileSync(brocfilePath, 'utf8'); + + // remove custom preprocessCss paths, use app.scss instead + brocfile = brocfile.replace(/outputPaths.*/, ''); + + fs.writeFileSync(brocfilePath, brocfile, 'utf8'); + + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-cli-sass'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); + + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + expect(file(`dist/assets/${appName}.css`)).to.equal('body { background: green; }\n'); + }); + + it('additional trees can be passed to the app', async function() { + await copyFixtureFiles('brocfile-tests/additional-trees'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', { verbose: true }); + + let files = [ + '/assets/custom-output-file.js', + '/assets/custom-output-file.css', + '/assets/vendor.css', + '/assets/vendor.js', + ]; + + let basePath = path.join(appRoot, 'dist'); + files.forEach(function(f) { + expect(file(path.join(basePath, f))).to.exist; + }); + }); } }); diff --git a/tests/acceptance/destroy-test.js b/tests/acceptance/destroy-test.js index d60cd5e726..55431653d9 100644 --- a/tests/acceptance/destroy-test.js +++ b/tests/acceptance/destroy-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const RSVP = require('rsvp'); const ember = require('../helpers/ember'); const fs = require('fs-extra'); @@ -30,12 +29,10 @@ describe('Acceptance: ember destroy', function() { BlueprintNpmTask.restoreNPM(Blueprint); }); - beforeEach( - co.wrap(function*() { - tmpdir = yield mkTmpDirIn(tmproot); - process.chdir(tmpdir); - }) - ); + beforeEach(async function() { + tmpdir = await mkTmpDirIn(tmproot); + process.chdir(tmpdir); + }); afterEach(function() { process.chdir(root); @@ -68,16 +65,16 @@ describe('Acceptance: ember destroy', function() { }); } - const assertDestroyAfterGenerate = co.wrap(function*(args, files) { - yield initApp(); + const assertDestroyAfterGenerate = async function(args, files) { + await initApp(); - yield generate(args); + await generate(args); assertFilesExist(files); - let result = yield destroy(args); + let result = await destroy(args); expect(result, 'destroy command did not exit with errorCode').to.be.an('object'); assertFilesNotExist(files); - }); + }; it('blueprint foo', function() { let commandArgs = ['blueprint', 'foo']; @@ -107,58 +104,49 @@ describe('Acceptance: ember destroy', function() { return assertDestroyAfterGenerate(commandArgs, files); }); - it( - 'deletes files generated using blueprints from the project directory', - co.wrap(function*() { - let commandArgs = ['foo', 'bar']; - let files = ['app/foos/bar.js']; - yield initApp(); - - yield outputFile( - 'blueprints/foo/files/app/foos/__name__.js', - "import Ember from 'ember';\n\n" + 'export default Ember.Object.extend({ foo: true });\n' - ); - - yield generate(commandArgs); - assertFilesExist(files); - - yield destroy(commandArgs); - assertFilesNotExist(files); - }) - ); - - it( - 'correctly identifies the root of the project', - co.wrap(function*() { - let commandArgs = ['controller', 'foo']; - let files = ['app/controllers/foo.js']; - yield initApp(); - - yield outputFile( - 'blueprints/controller/files/app/controllers/__name__.js', - "import Ember from 'ember';\n\n" + 'export default Ember.Controller.extend({ custom: true });\n' - ); - - yield generate(commandArgs); - assertFilesExist(files); - - process.chdir(path.join(tmpdir, 'app')); - yield destroy(commandArgs); - - process.chdir(tmpdir); - assertFilesNotExist(files); - }) - ); - - it( - 'http-mock does not remove server/', - co.wrap(function*() { - yield initApp(); - yield generate(['http-mock', 'foo']); - yield generate(['http-mock', 'bar']); - yield destroy(['http-mock', 'foo']); - - expect(file('server/index.js')).to.exist; - }) - ); + it('deletes files generated using blueprints from the project directory', async function() { + let commandArgs = ['foo', 'bar']; + let files = ['app/foos/bar.js']; + await initApp(); + + await outputFile( + 'blueprints/foo/files/app/foos/__name__.js', + "import Ember from 'ember';\n\n" + 'export default Ember.Object.extend({ foo: true });\n' + ); + + await generate(commandArgs); + assertFilesExist(files); + + await destroy(commandArgs); + assertFilesNotExist(files); + }); + + it('correctly identifies the root of the project', async function() { + let commandArgs = ['controller', 'foo']; + let files = ['app/controllers/foo.js']; + await initApp(); + + await outputFile( + 'blueprints/controller/files/app/controllers/__name__.js', + "import Ember from 'ember';\n\n" + 'export default Ember.Controller.extend({ custom: true });\n' + ); + + await generate(commandArgs); + assertFilesExist(files); + + process.chdir(path.join(tmpdir, 'app')); + await destroy(commandArgs); + + process.chdir(tmpdir); + assertFilesNotExist(files); + }); + + it('http-mock does not remove server/', async function() { + await initApp(); + await generate(['http-mock', 'foo']); + await generate(['http-mock', 'bar']); + await destroy(['http-mock', 'foo']); + + expect(file('server/index.js')).to.exist; + }); }); diff --git a/tests/acceptance/generate-test.js b/tests/acceptance/generate-test.js index 09c8d2dd89..497fb6fef7 100755 --- a/tests/acceptance/generate-test.js +++ b/tests/acceptance/generate-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const RSVP = require('rsvp'); const ember = require('../helpers/ember'); const fs = require('fs-extra'); @@ -32,12 +31,10 @@ describe('Acceptance: ember generate', function() { BlueprintNpmTask.restoreNPM(Blueprint); }); - beforeEach( - co.wrap(function*() { - tmpdir = yield mkTmpDirIn(tmproot); - process.chdir(tmpdir); - }) - ); + beforeEach(async function() { + tmpdir = await mkTmpDirIn(tmproot); + process.chdir(tmpdir); + }); afterEach(function() { process.chdir(root); @@ -62,324 +59,288 @@ describe('Acceptance: ember generate', function() { }); } - it( - 'blueprint foo', - co.wrap(function*() { - yield generate(['blueprint', 'foo']); - - expect(file('blueprints/foo/index.js')).to.contain( - 'module.exports = {\n' + - " description: ''\n" + - '\n' + - ' // locals(options) {\n' + - ' // // Return custom template variables here.\n' + - ' // return {\n' + - ' // foo: options.entity.options.foo\n' + - ' // };\n' + - ' // }\n' + - '\n' + - ' // afterInstall(options) {\n' + - ' // // Perform extra work here.\n' + - ' // }\n' + - '};' - ); - }) - ); - - it( - 'blueprint foo/bar', - co.wrap(function*() { - yield generate(['blueprint', 'foo/bar']); - - expect(file('blueprints/foo/bar/index.js')).to.contain( - 'module.exports = {\n' + - " description: ''\n" + - '\n' + - ' // locals(options) {\n' + - ' // // Return custom template variables here.\n' + - ' // return {\n' + - ' // foo: options.entity.options.foo\n' + - ' // };\n' + - ' // }\n' + - '\n' + - ' // afterInstall(options) {\n' + - ' // // Perform extra work here.\n' + - ' // }\n' + - '};' - ); - }) - ); - - it( - 'http-mock foo', - co.wrap(function*() { - yield generate(['http-mock', 'foo']); - - expect(file('server/index.js')).to.contain('mocks.forEach(route => route(app));'); - - expect(file('server/mocks/foo.js')).to.contain( - 'module.exports = function(app) {\n' + - " const express = require('express');\n" + - ' let fooRouter = express.Router();\n' + - '\n' + - " fooRouter.get('/', function(req, res) {\n" + - ' res.send({\n' + - " 'foo': []\n" + - ' });\n' + - ' });\n' + - '\n' + - " fooRouter.post('/', function(req, res) {\n" + - ' res.status(201).end();\n' + - ' });\n' + - '\n' + - " fooRouter.get('/:id', function(req, res) {\n" + - ' res.send({\n' + - " 'foo': {\n" + - ' id: req.params.id\n' + - ' }\n' + - ' });\n' + - ' });\n' + - '\n' + - " fooRouter.put('/:id', function(req, res) {\n" + - ' res.send({\n' + - " 'foo': {\n" + - ' id: req.params.id\n' + - ' }\n' + - ' });\n' + - ' });\n' + - '\n' + - " fooRouter.delete('/:id', function(req, res) {\n" + - ' res.status(204).end();\n' + - ' });\n' + - '\n' + - ' // The POST and PUT call will not contain a request body\n' + - ' // because the body-parser is not included by default.\n' + - ' // To use req.body, run:\n' + - '\n' + - ' // npm install --save-dev body-parser\n' + - '\n' + - ' // After installing, you need to `use` the body-parser for\n' + - ' // this mock uncommenting the following line:\n' + - ' //\n' + - " //app.use('/api/foo', require('body-parser').json());\n" + - " app.use('/api/foo', fooRouter);\n" + - '};' - ); - - expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); - }) - ); - - it( - 'http-mock foo-bar', - co.wrap(function*() { - yield generate(['http-mock', 'foo-bar']); - - expect(file('server/index.js')).to.contain('mocks.forEach(route => route(app));'); - - expect(file('server/mocks/foo-bar.js')).to.contain( + it('blueprint foo', async function() { + await generate(['blueprint', 'foo']); + + expect(file('blueprints/foo/index.js')).to.contain( + 'module.exports = {\n' + + " description: ''\n" + + '\n' + + ' // locals(options) {\n' + + ' // // Return custom template variables here.\n' + + ' // return {\n' + + ' // foo: options.entity.options.foo\n' + + ' // };\n' + + ' // }\n' + + '\n' + + ' // afterInstall(options) {\n' + + ' // // Perform extra work here.\n' + + ' // }\n' + + '};' + ); + }); + + it('blueprint foo/bar', async function() { + await generate(['blueprint', 'foo/bar']); + + expect(file('blueprints/foo/bar/index.js')).to.contain( + 'module.exports = {\n' + + " description: ''\n" + + '\n' + + ' // locals(options) {\n' + + ' // // Return custom template variables here.\n' + + ' // return {\n' + + ' // foo: options.entity.options.foo\n' + + ' // };\n' + + ' // }\n' + + '\n' + + ' // afterInstall(options) {\n' + + ' // // Perform extra work here.\n' + + ' // }\n' + + '};' + ); + }); + + it('http-mock foo', async function() { + await generate(['http-mock', 'foo']); + + expect(file('server/index.js')).to.contain('mocks.forEach(route => route(app));'); + + expect(file('server/mocks/foo.js')).to.contain( + 'module.exports = function(app) {\n' + + " const express = require('express');\n" + + ' let fooRouter = express.Router();\n' + + '\n' + + " fooRouter.get('/', function(req, res) {\n" + + ' res.send({\n' + + " 'foo': []\n" + + ' });\n' + + ' });\n' + + '\n' + + " fooRouter.post('/', function(req, res) {\n" + + ' res.status(201).end();\n' + + ' });\n' + + '\n' + + " fooRouter.get('/:id', function(req, res) {\n" + + ' res.send({\n' + + " 'foo': {\n" + + ' id: req.params.id\n' + + ' }\n' + + ' });\n' + + ' });\n' + + '\n' + + " fooRouter.put('/:id', function(req, res) {\n" + + ' res.send({\n' + + " 'foo': {\n" + + ' id: req.params.id\n' + + ' }\n' + + ' });\n' + + ' });\n' + + '\n' + + " fooRouter.delete('/:id', function(req, res) {\n" + + ' res.status(204).end();\n' + + ' });\n' + + '\n' + + ' // The POST and PUT call will not contain a request body\n' + + ' // because the body-parser is not included by default.\n' + + ' // To use req.body, run:\n' + + '\n' + + ' // npm install --save-dev body-parser\n' + + '\n' + + ' // After installing, you need to `use` the body-parser for\n' + + ' // this mock uncommenting the following line:\n' + + ' //\n' + + " //app.use('/api/foo', require('body-parser').json());\n" + + " app.use('/api/foo', fooRouter);\n" + + '};' + ); + + expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); + }); + + it('http-mock foo-bar', async function() { + await generate(['http-mock', 'foo-bar']); + + expect(file('server/index.js')).to.contain('mocks.forEach(route => route(app));'); + + expect(file('server/mocks/foo-bar.js')).to.contain( + 'module.exports = function(app) {\n' + + " const express = require('express');\n" + + ' let fooBarRouter = express.Router();\n' + + '\n' + + " fooBarRouter.get('/', function(req, res) {\n" + + ' res.send({\n' + + " 'foo-bar': []\n" + + ' });\n' + + ' });\n' + + '\n' + + " fooBarRouter.post('/', function(req, res) {\n" + + ' res.status(201).end();\n' + + ' });\n' + + '\n' + + " fooBarRouter.get('/:id', function(req, res) {\n" + + ' res.send({\n' + + " 'foo-bar': {\n" + + ' id: req.params.id\n' + + ' }\n' + + ' });\n' + + ' });\n' + + '\n' + + " fooBarRouter.put('/:id', function(req, res) {\n" + + ' res.send({\n' + + " 'foo-bar': {\n" + + ' id: req.params.id\n' + + ' }\n' + + ' });\n' + + ' });\n' + + '\n' + + " fooBarRouter.delete('/:id', function(req, res) {\n" + + ' res.status(204).end();\n' + + ' });\n' + + '\n' + + ' // The POST and PUT call will not contain a request body\n' + + ' // because the body-parser is not included by default.\n' + + ' // To use req.body, run:\n' + + '\n' + + ' // npm install --save-dev body-parser\n' + + '\n' + + ' // After installing, you need to `use` the body-parser for\n' + + ' // this mock uncommenting the following line:\n' + + ' //\n' + + " //app.use('/api/foo-bar', require('body-parser').json());\n" + + " app.use('/api/foo-bar', fooBarRouter);\n" + + '};' + ); + + expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); + }); + + it('http-proxy foo', async function() { + await generate(['http-proxy', 'foo', 'http://localhost:5000']); + + expect(file('server/index.js')).to.contain('proxies.forEach(route => route(app));'); + + expect(file('server/proxies/foo.js')).to.contain( + "const proxyPath = '/foo';\n" + + '\n' + 'module.exports = function(app) {\n' + - " const express = require('express');\n" + - ' let fooBarRouter = express.Router();\n' + - '\n' + - " fooBarRouter.get('/', function(req, res) {\n" + - ' res.send({\n' + - " 'foo-bar': []\n" + - ' });\n' + - ' });\n' + - '\n' + - " fooBarRouter.post('/', function(req, res) {\n" + - ' res.status(201).end();\n' + - ' });\n' + - '\n' + - " fooBarRouter.get('/:id', function(req, res) {\n" + - ' res.send({\n' + - " 'foo-bar': {\n" + - ' id: req.params.id\n' + - ' }\n' + - ' });\n' + - ' });\n' + - '\n' + - " fooBarRouter.put('/:id', function(req, res) {\n" + - ' res.send({\n' + - " 'foo-bar': {\n" + - ' id: req.params.id\n' + - ' }\n' + - ' });\n' + - ' });\n' + - '\n' + - " fooBarRouter.delete('/:id', function(req, res) {\n" + - ' res.status(204).end();\n' + - ' });\n' + - '\n' + - ' // The POST and PUT call will not contain a request body\n' + - ' // because the body-parser is not included by default.\n' + - ' // To use req.body, run:\n' + - '\n' + - ' // npm install --save-dev body-parser\n' + - '\n' + - ' // After installing, you need to `use` the body-parser for\n' + - ' // this mock uncommenting the following line:\n' + - ' //\n' + - " //app.use('/api/foo-bar', require('body-parser').json());\n" + - " app.use('/api/foo-bar', fooBarRouter);\n" + - '};' - ); - - expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); - }) - ); - - it( - 'http-proxy foo', - co.wrap(function*() { - yield generate(['http-proxy', 'foo', 'http://localhost:5000']); - - expect(file('server/index.js')).to.contain('proxies.forEach(route => route(app));'); - - expect(file('server/proxies/foo.js')).to.contain( - "const proxyPath = '/foo';\n" + - '\n' + - 'module.exports = function(app) {\n' + - ' // For options, see:\n' + - ' // https://github.com/nodejitsu/node-http-proxy\n' + - " let proxy = require('http-proxy').createProxyServer({});\n" + - '\n' + - " proxy.on('error', function(err, req) {\n" + - ' console.error(err, req.url);\n' + - ' });\n' + - '\n' + - ' app.use(proxyPath, function(req, res, next){\n' + - ' // include root path in proxied request\n' + - " req.url = proxyPath + '/' + req.url;\n" + - " proxy.web(req, res, { target: 'http://localhost:5000' });\n" + - ' });\n' + - '};' - ); - - expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); - }) - ); - - it( - 'uses blueprints from the project directory', - co.wrap(function*() { - yield initApp(); - - yield outputFile( - 'blueprints/foo/files/app/foos/__name__.js', - "import Ember from 'ember';\n" + 'export default Ember.Object.extend({ foo: true });\n' - ); - - yield ember(['generate', 'foo', 'bar']); - - expect(file('app/foos/bar.js')).to.contain('foo: true'); - }) - ); - - it( - 'allows custom blueprints to override built-ins', - co.wrap(function*() { - yield initApp(); - yield outputFile( - 'blueprints/controller/files/app/controllers/__name__.js', - "import Ember from 'ember';\n\n" + 'export default Ember.Controller.extend({ custom: true });\n' - ); - - yield ember(['generate', 'controller', 'foo']); - - expect(file('app/controllers/foo.js')).to.contain('custom: true'); - }) - ); - - it( - 'passes custom cli arguments to blueprint options', - co.wrap(function*() { - yield initApp(); - - yield outputFile( - 'blueprints/customblue/files/app/__name__.js', - 'Q: Can I has custom command? A: <%= hasCustomCommand %>' - ); - - yield outputFile( - 'blueprints/customblue/index.js', - 'module.exports = {\n' + - ' locals(options) {\n' + - ' var loc = {};\n' + - " loc.hasCustomCommand = (options.customCommand) ? 'Yes!' : 'No. :C';\n" + - ' return loc;\n' + - ' },\n' + - '};\n' - ); - - yield ember(['generate', 'customblue', 'foo', '--custom-command']); - - expect(file('app/foo.js')).to.contain('A: Yes!'); - }) - ); - - it( - 'correctly identifies the root of the project', - co.wrap(function*() { - yield initApp(); - - yield outputFile( - 'blueprints/controller/files/app/controllers/__name__.js', - "import Ember from 'ember';\n\n" + 'export default Ember.Controller.extend({ custom: true });\n' - ); - - process.chdir(path.join(tmpdir, 'app')); - yield ember(['generate', 'controller', 'foo']); - - process.chdir(tmpdir); - expect(file('app/controllers/foo.js')).to.contain('custom: true'); - }) - ); - - it( - 'server', - co.wrap(function*() { - yield generate(['server']); - expect(file('server/index.js')).to.exist; - }) - ); - - it( - 'lib', - co.wrap(function*() { - yield generate(['lib']); - expect(dir('lib')).to.exist; - }) - ); - - it( - 'custom blueprint availableOptions', - co.wrap(function*() { - yield initApp(); - yield ember(['generate', 'blueprint', 'foo']); - - replaceFile( - 'blueprints/foo/index.js', - 'module.exports = {', - 'module.exports = {\navailableOptions: [ \n' + - "{ name: 'foo',\ntype: String, \n" + - "values: ['one', 'two'],\n" + - "default: 'one',\n" + - "aliases: [ {'one': 'one'}, {'two': 'two'} ] } ],\n" + - 'locals(options) {\n' + - 'return { foo: options.foo };\n' + - '},' - ); - - yield outputFile( - 'blueprints/foo/files/app/foos/__name__.js', - "import Ember from 'ember';\n" + 'export default Ember.Object.extend({ foo: <%= foo %> });\n' - ); - - yield ember(['generate', 'foo', 'bar', '-two']); - - expect(file('app/foos/bar.js')).to.contain('export default Ember.Object.extend({ foo: two });'); - }) - ); + ' // For options, see:\n' + + ' // https://github.com/nodejitsu/node-http-proxy\n' + + " let proxy = require('http-proxy').createProxyServer({});\n" + + '\n' + + " proxy.on('error', function(err, req) {\n" + + ' console.error(err, req.url);\n' + + ' });\n' + + '\n' + + ' app.use(proxyPath, function(req, res, next){\n' + + ' // include root path in proxied request\n' + + " req.url = proxyPath + '/' + req.url;\n" + + " proxy.web(req, res, { target: 'http://localhost:5000' });\n" + + ' });\n' + + '};' + ); + + expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); + }); + + it('uses blueprints from the project directory', async function() { + await initApp(); + + await outputFile( + 'blueprints/foo/files/app/foos/__name__.js', + "import Ember from 'ember';\n" + 'export default Ember.Object.extend({ foo: true });\n' + ); + + await ember(['generate', 'foo', 'bar']); + + expect(file('app/foos/bar.js')).to.contain('foo: true'); + }); + + it('allows custom blueprints to override built-ins', async function() { + await initApp(); + await outputFile( + 'blueprints/controller/files/app/controllers/__name__.js', + "import Ember from 'ember';\n\n" + 'export default Ember.Controller.extend({ custom: true });\n' + ); + + await ember(['generate', 'controller', 'foo']); + + expect(file('app/controllers/foo.js')).to.contain('custom: true'); + }); + + it('passes custom cli arguments to blueprint options', async function() { + await initApp(); + + await outputFile( + 'blueprints/customblue/files/app/__name__.js', + 'Q: Can I has custom command? A: <%= hasCustomCommand %>' + ); + + await outputFile( + 'blueprints/customblue/index.js', + 'module.exports = {\n' + + ' locals(options) {\n' + + ' var loc = {};\n' + + " loc.hasCustomCommand = (options.customCommand) ? 'Yes!' : 'No. :C';\n" + + ' return loc;\n' + + ' },\n' + + '};\n' + ); + + await ember(['generate', 'customblue', 'foo', '--custom-command']); + + expect(file('app/foo.js')).to.contain('A: Yes!'); + }); + + it('correctly identifies the root of the project', async function() { + await initApp(); + + await outputFile( + 'blueprints/controller/files/app/controllers/__name__.js', + "import Ember from 'ember';\n\n" + 'export default Ember.Controller.extend({ custom: true });\n' + ); + + process.chdir(path.join(tmpdir, 'app')); + await ember(['generate', 'controller', 'foo']); + + process.chdir(tmpdir); + expect(file('app/controllers/foo.js')).to.contain('custom: true'); + }); + + it('server', async function() { + await generate(['server']); + expect(file('server/index.js')).to.exist; + }); + + it('lib', async function() { + await generate(['lib']); + expect(dir('lib')).to.exist; + }); + + it('custom blueprint availableOptions', async function() { + await initApp(); + await ember(['generate', 'blueprint', 'foo']); + + replaceFile( + 'blueprints/foo/index.js', + 'module.exports = {', + 'module.exports = {\navailableOptions: [ \n' + + "{ name: 'foo',\ntype: String, \n" + + "values: ['one', 'two'],\n" + + "default: 'one',\n" + + "aliases: [ {'one': 'one'}, {'two': 'two'} ] } ],\n" + + 'locals(options) {\n' + + 'return { foo: options.foo };\n' + + '},' + ); + + await outputFile( + 'blueprints/foo/files/app/foos/__name__.js', + "import Ember from 'ember';\n" + 'export default Ember.Object.extend({ foo: <%= foo %> });\n' + ); + + await ember(['generate', 'foo', 'bar', '-two']); + + expect(file('app/foos/bar.js')).to.contain('export default Ember.Object.extend({ foo: two });'); + }); }); diff --git a/tests/acceptance/in-option-destroy-test.js b/tests/acceptance/in-option-destroy-test.js index baaff9cbfb..7a9ebf8749 100644 --- a/tests/acceptance/in-option-destroy-test.js +++ b/tests/acceptance/in-option-destroy-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const RSVP = require('rsvp'); const ember = require('../helpers/ember'); const fs = require('fs-extra'); @@ -32,12 +31,10 @@ describe('Acceptance: ember destroy with --in option', function() { BlueprintNpmTask.restoreNPM(Blueprint); }); - beforeEach( - co.wrap(function*() { - tmpdir = yield mkTmpDirIn(tmproot); - process.chdir(tmpdir); - }) - ); + beforeEach(async function() { + tmpdir = await mkTmpDirIn(tmproot); + process.chdir(tmpdir); + }); afterEach(function() { this.timeout(10000); @@ -68,18 +65,18 @@ describe('Acceptance: ember destroy with --in option', function() { }); } - const assertDestroyAfterGenerate = co.wrap(function*(args, addonPath, files) { - yield initApp(); - yield generateUtils.inRepoAddon(addonPath); - yield generateUtils.tempBlueprint(); - yield generate(args); + const assertDestroyAfterGenerate = async function(args, addonPath, files) { + await initApp(); + await generateUtils.inRepoAddon(addonPath); + await generateUtils.tempBlueprint(); + await generate(args); assertFilesExist(files); - let result = yield destroy(args); + let result = await destroy(args); expect(result, 'destroy command did not exit with errorCode').to.be.an('object'); assertFilesNotExist(files); - }); + }; it('blueprint foo --in lib/other-thing', function() { let addonPath = './lib/other-thing'; diff --git a/tests/acceptance/init-test.js b/tests/acceptance/init-test.js index 3f439a7566..d9729c782d 100644 --- a/tests/acceptance/init-test.js +++ b/tests/acceptance/init-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const ember = require('../helpers/ember'); const walkSync = require('walk-sync'); const glob = require('glob'); @@ -27,14 +26,12 @@ let tmpPath = './tmp/init-test'; describe('Acceptance: ember init', function() { this.timeout(20000); - beforeEach( - co.wrap(function*() { - Blueprint.ignoredFiles = defaultIgnoredFiles; + beforeEach(async function() { + Blueprint.ignoredFiles = defaultIgnoredFiles; - yield tmp.setup(tmpPath); - process.chdir(tmpPath); - }) - ); + await tmp.setup(tmpPath); + process.chdir(tmpPath); + }); afterEach(function() { return tmp.teardown(tmpPath); @@ -108,92 +105,65 @@ describe('Acceptance: ember init', function() { }); } - it( - 'ember init', - co.wrap(function*() { - yield ember(['init', '--skip-npm', '--skip-bower']); + it('ember init', async function() { + await ember(['init', '--skip-npm', '--skip-bower']); - confirmBlueprinted(); - }) - ); + confirmBlueprinted(); + }); - it( - "init an already init'd folder", - co.wrap(function*() { - yield ember(['init', '--skip-npm', '--skip-bower']); + it("init an already init'd folder", async function() { + await ember(['init', '--skip-npm', '--skip-bower']); - yield ember(['init', '--skip-npm', '--skip-bower']); + await ember(['init', '--skip-npm', '--skip-bower']); - confirmBlueprinted(); - }) - ); + confirmBlueprinted(); + }); - it( - 'init a single file', - co.wrap(function*() { - yield ember(['init', 'app.js', '--skip-npm', '--skip-bower']); + it('init a single file', async function() { + await ember(['init', 'app.js', '--skip-npm', '--skip-bower']); - confirmGlobBlueprinted('app.js'); - }) - ); + confirmGlobBlueprinted('app.js'); + }); - it( - "init a single file on already init'd folder", - co.wrap(function*() { - yield ember(['init', '--skip-npm', '--skip-bower']); + it("init a single file on already init'd folder", async function() { + await ember(['init', '--skip-npm', '--skip-bower']); - yield ember(['init', 'app.js', '--skip-npm', '--skip-bower']); + await ember(['init', 'app.js', '--skip-npm', '--skip-bower']); - confirmBlueprinted(); - }) - ); + confirmBlueprinted(); + }); - it( - 'init multiple files by glob pattern', - co.wrap(function*() { - yield ember(['init', 'app/**', '--skip-npm', '--skip-bower']); + it('init multiple files by glob pattern', async function() { + await ember(['init', 'app/**', '--skip-npm', '--skip-bower']); - confirmGlobBlueprinted('app/**'); - }) - ); + confirmGlobBlueprinted('app/**'); + }); - it( - "init multiple files by glob pattern on already init'd folder", - co.wrap(function*() { - yield ember(['init', '--skip-npm', '--skip-bower']); + it("init multiple files by glob pattern on already init'd folder", async function() { + await ember(['init', '--skip-npm', '--skip-bower']); - yield ember(['init', 'app/**', '--skip-npm', '--skip-bower']); + await ember(['init', 'app/**', '--skip-npm', '--skip-bower']); - confirmBlueprinted(); - }) - ); + confirmBlueprinted(); + }); - it( - 'init multiple files by glob patterns', - co.wrap(function*() { - yield ember(['init', 'app/**', '{package,bower}.json', 'resolver.js', '--skip-npm', '--skip-bower']); + it('init multiple files by glob patterns', async function() { + await ember(['init', 'app/**', '{package,bower}.json', 'resolver.js', '--skip-npm', '--skip-bower']); - confirmGlobBlueprinted('{app/**,{package,bower}.json,resolver.js}'); - }) - ); + confirmGlobBlueprinted('{app/**,{package,bower}.json,resolver.js}'); + }); - it( - "init multiple files by glob patterns on already init'd folder", - co.wrap(function*() { - yield ember(['init', '--skip-npm', '--skip-bower']); + it("init multiple files by glob patterns on already init'd folder", async function() { + await ember(['init', '--skip-npm', '--skip-bower']); - yield ember(['init', 'app/**', '{package,bower}.json', 'resolver.js', '--skip-npm', '--skip-bower']); + await ember(['init', 'app/**', '{package,bower}.json', 'resolver.js', '--skip-npm', '--skip-bower']); - confirmBlueprinted(); - }) - ); + confirmBlueprinted(); + }); - it( - 'should not create .git folder', - co.wrap(function*() { - yield ember(['init', '--skip-npm', '--skip-bower']); + it('should not create .git folder', async function() { + await ember(['init', '--skip-npm', '--skip-bower']); - expect(dir('.git')).to.not.exist; - }) - ); + expect(dir('.git')).to.not.exist; + }); }); diff --git a/tests/acceptance/nested-addons-smoke-test-slow.js b/tests/acceptance/nested-addons-smoke-test-slow.js index b9a1b1a79f..92b6d56f10 100644 --- a/tests/acceptance/nested-addons-smoke-test-slow.js +++ b/tests/acceptance/nested-addons-smoke-test-slow.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const path = require('path'); const fs = require('fs-extra'); @@ -40,41 +39,38 @@ describe('Acceptance: nested-addons-smoke-test', function() { }); if (!isExperimentEnabled('MODULE_UNIFICATION')) { - it( - 'addons with nested addons compile correctly', - co.wrap(function*() { - yield copyFixtureFiles('addon/with-nested-addons'); - - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-top-addon'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); - - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - expect(file('dist/assets/vendor.js')).to.contain('INNER_ADDON_IMPORT_WITH_APP_IMPORT'); - expect(file('dist/assets/vendor.js')).to.contain('INNER_ADDON_IMPORT_WITH_THIS_IMPORT'); - - // RAW comments should have been converted to PREPROCESSED by - // tests/fixtures/addon/with-nested-addons/node_modules/ember-top-addon/node_modules/preprocesstree-addon - // then from PREPROCESSED to POSTPROCESSED by - // tests/fixtures/addon/with-nested-addons/node_modules/ember-top-addon/node_modules/postprocesstree-addon - expect(file('dist/assets/vendor.js')).to.contain( - 'POSTPROCESSED node_modules/ember-top-addon/addon/templates/application.hbs' - ); - expect(file('dist/assets/vendor.js')).to.contain('POSTPROCESSED node_modules/ember-top-addon/addon/index.js'); - expect(file('dist/assets/vendor.css')).to.contain( - 'POSTPROCESSED node_modules/ember-top-addon/addon/styles/app.css' - ); - - // the pre/post process tree hooks above should *not* have changed RAW's in the current app - expect(file('dist/assets/some-cool-app.js')).to.contain('RAW app/foo.js'); - - // should *not* have changed RAW's in sibling addons - expect(file('dist/assets/vendor.js')).to.contain( - 'RAW node_modules/ember-top-addon/node_modules/ember-inner-addon/addon/index.js' - ); - }) - ); + it('addons with nested addons compile correctly', async function() { + await copyFixtureFiles('addon/with-nested-addons'); + + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-top-addon'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); + + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + expect(file('dist/assets/vendor.js')).to.contain('INNER_ADDON_IMPORT_WITH_APP_IMPORT'); + expect(file('dist/assets/vendor.js')).to.contain('INNER_ADDON_IMPORT_WITH_THIS_IMPORT'); + + // RAW comments should have been converted to PREPROCESSED by + // tests/fixtures/addon/with-nested-addons/node_modules/ember-top-addon/node_modules/preprocesstree-addon + // then from PREPROCESSED to POSTPROCESSED by + // tests/fixtures/addon/with-nested-addons/node_modules/ember-top-addon/node_modules/postprocesstree-addon + expect(file('dist/assets/vendor.js')).to.contain( + 'POSTPROCESSED node_modules/ember-top-addon/addon/templates/application.hbs' + ); + expect(file('dist/assets/vendor.js')).to.contain('POSTPROCESSED node_modules/ember-top-addon/addon/index.js'); + expect(file('dist/assets/vendor.css')).to.contain( + 'POSTPROCESSED node_modules/ember-top-addon/addon/styles/app.css' + ); + + // the pre/post process tree hooks above should *not* have changed RAW's in the current app + expect(file('dist/assets/some-cool-app.js')).to.contain('RAW app/foo.js'); + + // should *not* have changed RAW's in sibling addons + expect(file('dist/assets/vendor.js')).to.contain( + 'RAW node_modules/ember-top-addon/node_modules/ember-inner-addon/addon/index.js' + ); + }); } }); diff --git a/tests/acceptance/new-test.js b/tests/acceptance/new-test.js index 055fe423cd..c674baa348 100644 --- a/tests/acceptance/new-test.js +++ b/tests/acceptance/new-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const fs = require('fs-extra'); const ember = require('../helpers/ember'); const walkSync = require('walk-sync'); @@ -26,13 +25,11 @@ describe('Acceptance: ember new', function() { this.timeout(10000); let ORIGINAL_PROCESS_ENV_CI; - beforeEach( - co.wrap(function*() { - yield tmp.setup(tmpDir); - process.chdir(tmpDir); - ORIGINAL_PROCESS_ENV_CI = process.env.CI; - }) - ); + beforeEach(async function() { + await tmp.setup(tmpDir); + process.chdir(tmpDir); + ORIGINAL_PROCESS_ENV_CI = process.env.CI; + }); afterEach(function() { if (ORIGINAL_PROCESS_ENV_CI === undefined) { @@ -62,337 +59,268 @@ describe('Acceptance: ember new', function() { ); } - it( - 'ember new adds ember-welcome-page by default', - co.wrap(function*() { - yield ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git']); - - expect(file('package.json')).to.match(/"ember-welcome-page"/); - - expect(file('app/templates/application.hbs')).to.contain(''); - }) - ); - - it( - 'ember new --no-welcome skips installation of ember-welcome-page', - co.wrap(function*() { - yield ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--no-welcome']); - - expect(file('package.json')).not.to.match(/"ember-welcome-page"/); - - expect(file('app/templates/application.hbs')).to.contain('Welcome to Ember'); - }) - ); - - it( - 'ember new npm blueprint with old version', - co.wrap(function*() { - yield ember(['new', 'foo', '--blueprint', '@glimmer/blueprint@0.6.4', '--skip-npm', '--skip-bower']); - - expect(dir('src')).to.exist; - }) - ); - - it( - 'ember new foo, where foo does not yet exist, works', - co.wrap(function*() { - yield ember(['new', 'foo', '--skip-npm', '--skip-bower']); - - confirmBlueprintedForDir('blueprints/app'); - }) - ); - - it( - 'ember new foo, blueprint targets match the default ember-cli targets', - co.wrap(function*() { - yield ember(['new', 'foo', '--skip-npm', '--skip-bower']); - - process.env.CI = true; - const defaultTargets = require('../../lib/utilities/default-targets').browsers; - const blueprintTargets = require(path.resolve('config/targets.js')).browsers; - expect(blueprintTargets).to.have.same.deep.members(defaultTargets); - }) - ); - - it( - 'ember new with empty app name fails with a warning', - co.wrap(function*() { - let err = yield expect(ember(['new', ''])).to.be.rejected; - - expect(err.name).to.equal('SilentError'); - expect(err.message).to.contain('The `ember new` command requires a name to be specified.'); - }) - ); - - it( - 'ember new without app name fails with a warning', - co.wrap(function*() { - let err = yield expect(ember(['new'])).to.be.rejected; - - expect(err.name).to.equal('SilentError'); - expect(err.message).to.contain('The `ember new` command requires a name to be specified.'); - }) - ); - - it( - 'ember new with app name creates new directory and has a dasherized package name', - co.wrap(function*() { - yield ember(['new', 'FooApp', '--skip-npm', '--skip-bower', '--skip-git']); - - expect(dir('FooApp')).to.not.exist; - expect(file('package.json')).to.exist; - - let pkgJson = fs.readJsonSync('package.json'); - expect(pkgJson.name).to.equal('foo-app'); - }) - ); - - it( - 'Can create new ember project in an existing empty directory', - co.wrap(function*() { - fs.mkdirsSync('bar'); - - yield ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--directory=bar']); - }) - ); - - it( - 'Cannot create new ember project in a populated directory', - co.wrap(function*() { - fs.mkdirsSync('bar'); - fs.writeFileSync(path.join('bar', 'package.json'), '{}'); - - let error = yield expect(ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--directory=bar'])).to - .be.rejected; - - expect(error.name).to.equal('SilentError'); - expect(error.message).to.equal("Directory 'bar' already exists."); - }) - ); - - it( - 'Cannot run ember new, inside of ember-cli project', - co.wrap(function*() { - yield ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git']); - - let error = yield expect(ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git'])).to.be.rejected; - - expect(dir('foo')).to.not.exist; - expect(error.name).to.equal('SilentError'); - expect(error.message).to.equal(`You cannot use the ${chalk.green('new')} command inside an ember-cli project.`); - - confirmBlueprintedForDir('blueprints/app'); - }) - ); - - it( - 'ember new with blueprint uses the specified blueprint directory with a relative path', - co.wrap(function*() { - fs.mkdirsSync('my_blueprint/files'); - fs.writeFileSync('my_blueprint/files/gitignore'); - - yield ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--blueprint=./my_blueprint']); - - confirmBlueprintedForDir(path.join(tmpDir, 'my_blueprint')); - }) - ); - - it( - 'ember new with blueprint uses the specified blueprint directory with an absolute path', - co.wrap(function*() { - fs.mkdirsSync('my_blueprint/files'); - fs.writeFileSync('my_blueprint/files/gitignore'); - - yield ember([ - 'new', - 'foo', - '--skip-npm', - '--skip-bower', - '--skip-git', - `--blueprint=${path.resolve(process.cwd(), 'my_blueprint')}`, - ]); - - confirmBlueprintedForDir(path.join(tmpDir, 'my_blueprint')); - }) - ); - - it( - 'ember new with git blueprint checks out the blueprint and uses it', - co.wrap(function*() { - this.timeout(20000); // relies on GH network stuff - - yield ember([ - 'new', - 'foo', - '--skip-npm', - '--skip-bower', - '--skip-git', - '--blueprint=https://github.com/ember-cli/app-blueprint-test.git', - ]); - - expect(file('.ember-cli')).to.exist; - }) - ); - - it( - 'ember new with git blueprint and ref checks out the blueprint with the correct ref and uses it', - co.wrap(function*() { - this.timeout(20000); // relies on GH network stuff - - yield ember([ - 'new', - 'foo', - '--skip-npm', - '--skip-bower', - '--skip-git', - '--blueprint=https://github.com/ember-cli/app-blueprint-test.git#named-ref', - ]); - - expect(file('.named-ref')).to.exist; - }) - ); - - it( - 'ember new with shorthand git blueprint and ref checks out the blueprint with the correct ref and uses it', - co.wrap(function*() { - this.timeout(20000); // relies on GH network stuff - - yield ember([ - 'new', - 'foo', - '--skip-npm', - '--skip-bower', - '--skip-git', - '--blueprint=ember-cli/app-blueprint-test#named-ref', - ]); - - expect(file('.named-ref')).to.exist; - }) - ); - - it( - 'ember new passes blueprint options through to blueprint', - co.wrap(function*() { - fs.mkdirsSync('my_blueprint/files'); - fs.writeFileSync( - 'my_blueprint/index.js', - [ - 'module.exports = {', - " availableOptions: [ { name: 'custom-option' } ],", - ' locals(options) {', - ' return {', - ' customOption: options.customOption', - ' };', - ' }', - '};', - ].join('\n') - ); - fs.writeFileSync('my_blueprint/files/gitignore', '<%= customOption %>'); - - yield ember([ - 'new', - 'foo', - '--skip-npm', - '--skip-bower', - '--skip-git', - '--blueprint=./my_blueprint', - '--custom-option=customValue', - ]); - - expect(file('.gitignore')).to.contain('customValue'); - }) - ); - - it( - 'ember new uses yarn when blueprint has yarn.lock', - co.wrap(function*() { - if (!hasGlobalYarn) { - this.skip(); - } - - fs.mkdirsSync('my_blueprint/files'); - fs.writeFileSync('my_blueprint/index.js', 'module.exports = {};'); - fs.writeFileSync('my_blueprint/files/package.json', '{ "name": "foo", "dependencies": { "fs-extra": "*" }}'); - fs.writeFileSync('my_blueprint/files/yarn.lock', ''); - - yield ember(['new', 'foo', '--skip-git', '--blueprint=./my_blueprint']); - - expect(file('yarn.lock')).to.not.be.empty; - expect(dir('node_modules/fs-extra')).to.not.be.empty; - }) - ); - - it( - 'ember new without skip-git flag creates .git dir', - co.wrap(function*() { - yield ember(['new', 'foo', '--skip-npm', '--skip-bower'], { - skipGit: false, - }); + it('ember new adds ember-welcome-page by default', async function() { + await ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git']); - expect(dir('.git')).to.exist; - }) - ); + expect(file('package.json')).to.match(/"ember-welcome-page"/); - it( - 'ember new cleans up after itself on error', - co.wrap(function*() { - fs.mkdirsSync('my_blueprint'); - fs.writeFileSync('my_blueprint/index.js', 'throw("this will break");'); + expect(file('app/templates/application.hbs')).to.contain(''); + }); - yield ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--blueprint=./my_blueprint']); + it('ember new --no-welcome skips installation of ember-welcome-page', async function() { + await ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--no-welcome']); - expect(dir('foo')).to.not.exist; - }) - ); + expect(file('package.json')).not.to.match(/"ember-welcome-page"/); - it( - 'ember new with --dry-run does not create new directory', - co.wrap(function*() { - yield ember(['new', 'foo', '--dry-run']); + expect(file('app/templates/application.hbs')).to.contain('Welcome to Ember'); + }); - expect(process.cwd()).to.not.match(/foo/, 'does not change cwd to foo in a dry run'); - expect(dir('foo')).to.not.exist; - expect(dir('.git')).to.not.exist; - }) - ); + it('ember new npm blueprint with old version', async function() { + await ember(['new', 'foo', '--blueprint', '@glimmer/blueprint@0.6.4', '--skip-npm', '--skip-bower']); - it( - 'ember new with --directory uses given directory name and has correct package name', - co.wrap(function*() { - let workdir = process.cwd(); + expect(dir('src')).to.exist; + }); - yield ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--directory=bar']); + it('ember new foo, where foo does not yet exist, works', async function() { + await ember(['new', 'foo', '--skip-npm', '--skip-bower']); - expect(dir(path.join(workdir, 'foo'))).to.not.exist; - expect(dir(path.join(workdir, 'bar'))).to.exist; + confirmBlueprintedForDir('blueprints/app'); + }); - let cwd = process.cwd(); - expect(cwd).to.not.match(/foo/, 'does not use app name for directory name'); - expect(cwd).to.match(/bar/, 'uses given directory name'); + it('ember new foo, blueprint targets match the default ember-cli targets', async function() { + await ember(['new', 'foo', '--skip-npm', '--skip-bower']); - let pkgJson = fs.readJsonSync('package.json'); - expect(pkgJson.name).to.equal('foo', 'uses app name for package name'); - }) - ); + process.env.CI = true; + const defaultTargets = require('../../lib/utilities/default-targets').browsers; + const blueprintTargets = require(path.resolve('config/targets.js')).browsers; + expect(blueprintTargets).to.have.same.deep.members(defaultTargets); + }); - it( - 'ember addon with --directory uses given directory name and has correct package name', - co.wrap(function*() { - let workdir = process.cwd(); + it('ember new with empty app name fails with a warning', async function() { + let err = await expect(ember(['new', ''])).to.be.rejected; - yield ember(['addon', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--directory=bar']); + expect(err.name).to.equal('SilentError'); + expect(err.message).to.contain('The `ember new` command requires a name to be specified.'); + }); + + it('ember new without app name fails with a warning', async function() { + let err = await expect(ember(['new'])).to.be.rejected; + + expect(err.name).to.equal('SilentError'); + expect(err.message).to.contain('The `ember new` command requires a name to be specified.'); + }); + + it('ember new with app name creates new directory and has a dasherized package name', async function() { + await ember(['new', 'FooApp', '--skip-npm', '--skip-bower', '--skip-git']); - expect(dir(path.join(workdir, 'foo'))).to.not.exist; - expect(dir(path.join(workdir, 'bar'))).to.exist; + expect(dir('FooApp')).to.not.exist; + expect(file('package.json')).to.exist; - let cwd = process.cwd(); - expect(cwd).to.not.match(/foo/, 'does not use addon name for directory name'); - expect(cwd).to.match(/bar/, 'uses given directory name'); + let pkgJson = fs.readJsonSync('package.json'); + expect(pkgJson.name).to.equal('foo-app'); + }); + + it('Can create new ember project in an existing empty directory', async function() { + fs.mkdirsSync('bar'); + + await ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--directory=bar']); + }); + + it('Cannot create new ember project in a populated directory', async function() { + fs.mkdirsSync('bar'); + fs.writeFileSync(path.join('bar', 'package.json'), '{}'); + + let error = await expect(ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--directory=bar'])).to.be + .rejected; + + expect(error.name).to.equal('SilentError'); + expect(error.message).to.equal("Directory 'bar' already exists."); + }); + + it('Cannot run ember new, inside of ember-cli project', async function() { + await ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git']); + + let error = await expect(ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git'])).to.be.rejected; + + expect(dir('foo')).to.not.exist; + expect(error.name).to.equal('SilentError'); + expect(error.message).to.equal(`You cannot use the ${chalk.green('new')} command inside an ember-cli project.`); + + confirmBlueprintedForDir('blueprints/app'); + }); - let pkgJson = fs.readJsonSync('package.json'); - expect(pkgJson.name).to.equal('foo', 'uses addon name for package name'); - }) - ); + it('ember new with blueprint uses the specified blueprint directory with a relative path', async function() { + fs.mkdirsSync('my_blueprint/files'); + fs.writeFileSync('my_blueprint/files/gitignore'); + + await ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--blueprint=./my_blueprint']); + + confirmBlueprintedForDir(path.join(tmpDir, 'my_blueprint')); + }); + + it('ember new with blueprint uses the specified blueprint directory with an absolute path', async function() { + fs.mkdirsSync('my_blueprint/files'); + fs.writeFileSync('my_blueprint/files/gitignore'); + + await ember([ + 'new', + 'foo', + '--skip-npm', + '--skip-bower', + '--skip-git', + `--blueprint=${path.resolve(process.cwd(), 'my_blueprint')}`, + ]); + + confirmBlueprintedForDir(path.join(tmpDir, 'my_blueprint')); + }); + + it('ember new with git blueprint checks out the blueprint and uses it', async function() { + this.timeout(20000); // relies on GH network stuff + + await ember([ + 'new', + 'foo', + '--skip-npm', + '--skip-bower', + '--skip-git', + '--blueprint=https://github.com/ember-cli/app-blueprint-test.git', + ]); + + expect(file('.ember-cli')).to.exist; + }); + + it('ember new with git blueprint and ref checks out the blueprint with the correct ref and uses it', async function() { + this.timeout(20000); // relies on GH network stuff + + await ember([ + 'new', + 'foo', + '--skip-npm', + '--skip-bower', + '--skip-git', + '--blueprint=https://github.com/ember-cli/app-blueprint-test.git#named-ref', + ]); + + expect(file('.named-ref')).to.exist; + }); + + it('ember new with shorthand git blueprint and ref checks out the blueprint with the correct ref and uses it', async function() { + this.timeout(20000); // relies on GH network stuff + + await ember([ + 'new', + 'foo', + '--skip-npm', + '--skip-bower', + '--skip-git', + '--blueprint=ember-cli/app-blueprint-test#named-ref', + ]); + + expect(file('.named-ref')).to.exist; + }); + + it('ember new passes blueprint options through to blueprint', async function() { + fs.mkdirsSync('my_blueprint/files'); + fs.writeFileSync( + 'my_blueprint/index.js', + [ + 'module.exports = {', + " availableOptions: [ { name: 'custom-option' } ],", + ' locals(options) {', + ' return {', + ' customOption: options.customOption', + ' };', + ' }', + '};', + ].join('\n') + ); + fs.writeFileSync('my_blueprint/files/gitignore', '<%= customOption %>'); + + await ember([ + 'new', + 'foo', + '--skip-npm', + '--skip-bower', + '--skip-git', + '--blueprint=./my_blueprint', + '--custom-option=customValue', + ]); + + expect(file('.gitignore')).to.contain('customValue'); + }); + + it('ember new uses yarn when blueprint has yarn.lock', async function() { + if (!hasGlobalYarn) { + this.skip(); + } + + fs.mkdirsSync('my_blueprint/files'); + fs.writeFileSync('my_blueprint/index.js', 'module.exports = {};'); + fs.writeFileSync('my_blueprint/files/package.json', '{ "name": "foo", "dependencies": { "fs-extra": "*" }}'); + fs.writeFileSync('my_blueprint/files/yarn.lock', ''); + + await ember(['new', 'foo', '--skip-git', '--blueprint=./my_blueprint']); + + expect(file('yarn.lock')).to.not.be.empty; + expect(dir('node_modules/fs-extra')).to.not.be.empty; + }); + + it('ember new without skip-git flag creates .git dir', async function() { + await ember(['new', 'foo', '--skip-npm', '--skip-bower'], { + skipGit: false, + }); + + expect(dir('.git')).to.exist; + }); + + it('ember new cleans up after itself on error', async function() { + fs.mkdirsSync('my_blueprint'); + fs.writeFileSync('my_blueprint/index.js', 'throw("this will break");'); + + await ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--blueprint=./my_blueprint']); + + expect(dir('foo')).to.not.exist; + }); + + it('ember new with --dry-run does not create new directory', async function() { + await ember(['new', 'foo', '--dry-run']); + + expect(process.cwd()).to.not.match(/foo/, 'does not change cwd to foo in a dry run'); + expect(dir('foo')).to.not.exist; + expect(dir('.git')).to.not.exist; + }); + + it('ember new with --directory uses given directory name and has correct package name', async function() { + let workdir = process.cwd(); + + await ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--directory=bar']); + + expect(dir(path.join(workdir, 'foo'))).to.not.exist; + expect(dir(path.join(workdir, 'bar'))).to.exist; + + let cwd = process.cwd(); + expect(cwd).to.not.match(/foo/, 'does not use app name for directory name'); + expect(cwd).to.match(/bar/, 'uses given directory name'); + + let pkgJson = fs.readJsonSync('package.json'); + expect(pkgJson.name).to.equal('foo', 'uses app name for package name'); + }); + + it('ember addon with --directory uses given directory name and has correct package name', async function() { + let workdir = process.cwd(); + + await ember(['addon', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--directory=bar']); + + expect(dir(path.join(workdir, 'foo'))).to.not.exist; + expect(dir(path.join(workdir, 'bar'))).to.exist; + + let cwd = process.cwd(); + expect(cwd).to.not.match(/foo/, 'does not use addon name for directory name'); + expect(cwd).to.match(/bar/, 'uses given directory name'); + + let pkgJson = fs.readJsonSync('package.json'); + expect(pkgJson.name).to.equal('foo', 'uses addon name for package name'); + }); describe('verify fixtures', function() { function checkEslintConfig(fixturePath) { @@ -409,98 +337,83 @@ describe('Acceptance: ember new', function() { expect(file('package.json')).to.equal(fixtureContents); } - it( - 'app + npm + !welcome', - co.wrap(function*() { - yield ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--no-welcome']); + it('app + npm + !welcome', async function() { + await ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--no-welcome']); - let namespace = 'app'; - let fixturePath = `${namespace}/npm`; + let namespace = 'app'; + let fixturePath = `${namespace}/npm`; - ['app/templates/application.hbs', '.travis.yml', 'README.md'].forEach(filePath => { - expect(file(filePath)).to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath))); - }); + ['app/templates/application.hbs', '.travis.yml', 'README.md'].forEach(filePath => { + expect(file(filePath)).to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath))); + }); - checkPackageJson(fixturePath); + checkPackageJson(fixturePath); - // option independent, but piggy-backing on an existing generate for speed - checkEslintConfig(namespace); - }) - ); + // option independent, but piggy-backing on an existing generate for speed + checkEslintConfig(namespace); + }); - it( - 'app + yarn + welcome', - co.wrap(function*() { - yield ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--yarn']); + it('app + yarn + welcome', async function() { + await ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--yarn']); - let fixturePath = 'app/yarn'; + let fixturePath = 'app/yarn'; - ['app/templates/application.hbs', '.travis.yml', 'README.md'].forEach(filePath => { - expect(file(filePath)).to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath))); - }); + ['app/templates/application.hbs', '.travis.yml', 'README.md'].forEach(filePath => { + expect(file(filePath)).to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath))); + }); - checkPackageJson(fixturePath); - }) - ); + checkPackageJson(fixturePath); + }); - it( - 'addon + yarn + welcome', - co.wrap(function*() { - yield ember(['addon', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--yarn', '--welcome']); - - let fixturePath = 'addon/yarn'; - - [ - 'config/ember-try.js', - 'tests/dummy/app/templates/application.hbs', - '.travis.yml', - 'README.md', - 'CONTRIBUTING.md', - ].forEach(filePath => { - expect(file(filePath)).to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath))); - }); - - checkPackageJson(fixturePath); - }) - ); + it('addon + yarn + welcome', async function() { + await ember(['addon', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--yarn', '--welcome']); - it( - 'addon + npm + !welcome', - co.wrap(function*() { - yield ember(['addon', 'foo', '--skip-npm', '--skip-bower', '--skip-git']); - - let namespace = 'addon'; - let fixturePath = `${namespace}/npm`; - - [ - 'config/ember-try.js', - 'tests/dummy/app/templates/application.hbs', - '.travis.yml', - 'README.md', - 'CONTRIBUTING.md', - ].forEach(filePath => { - expect(file(filePath)).to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath))); - }); - - checkPackageJson(fixturePath); - - // option independent, but piggy-backing on an existing generate for speed - checkEslintConfig(namespace); - }) - ); + let fixturePath = 'addon/yarn'; + + [ + 'config/ember-try.js', + 'tests/dummy/app/templates/application.hbs', + '.travis.yml', + 'README.md', + 'CONTRIBUTING.md', + ].forEach(filePath => { + expect(file(filePath)).to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath))); + }); + + checkPackageJson(fixturePath); + }); + + it('addon + npm + !welcome', async function() { + await ember(['addon', 'foo', '--skip-npm', '--skip-bower', '--skip-git']); + + let namespace = 'addon'; + let fixturePath = `${namespace}/npm`; + + [ + 'config/ember-try.js', + 'tests/dummy/app/templates/application.hbs', + '.travis.yml', + 'README.md', + 'CONTRIBUTING.md', + ].forEach(filePath => { + expect(file(filePath)).to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath))); + }); + + checkPackageJson(fixturePath); + + // option independent, but piggy-backing on an existing generate for speed + checkEslintConfig(namespace); + }); }); describe('verify dependencies', function() { - it( - 'are locked down for pre-1.0 versions', - co.wrap(function*() { - yield ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--yarn', '--welcome']); + it('are locked down for pre-1.0 versions', async function() { + await ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--yarn', '--welcome']); - let pkg = fs.readJsonSync('package.json'); + let pkg = fs.readJsonSync('package.json'); - assertVersionLock(pkg.dependencies); - assertVersionLock(pkg.devDependencies); - }) - ); + assertVersionLock(pkg.dependencies); + assertVersionLock(pkg.devDependencies); + }); }); }); diff --git a/tests/acceptance/pods-destroy-test.js b/tests/acceptance/pods-destroy-test.js index 488ac982f9..adaf675c14 100644 --- a/tests/acceptance/pods-destroy-test.js +++ b/tests/acceptance/pods-destroy-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const RSVP = require('rsvp'); const ember = require('../helpers/ember'); const fs = require('fs-extra'); @@ -32,12 +31,10 @@ describe('Acceptance: ember destroy pod', function() { BlueprintNpmTask.restoreNPM(Blueprint); }); - beforeEach( - co.wrap(function*() { - tmpdir = yield mkTmpDirIn(tmproot); - process.chdir(tmpdir); - }) - ); + beforeEach(async function() { + tmpdir = await mkTmpDirIn(tmproot); + process.chdir(tmpdir); + }); afterEach(function() { this.timeout(10000); @@ -72,27 +69,27 @@ describe('Acceptance: ember destroy pod', function() { }); } - const assertDestroyAfterGenerate = co.wrap(function*(args, files) { - yield initApp(); + const assertDestroyAfterGenerate = async function(args, files) { + await initApp(); replaceFile('config/environment.js', '(var|let|const) ENV = {', "$1 ENV = {\npodModulePrefix: 'app/pods', \n"); - yield generate(args); + await generate(args); assertFilesExist(files); - let result = yield destroy(args); + let result = await destroy(args); expect(result, 'destroy command did not exit with errorCode').to.be.an('object'); assertFilesNotExist(files); - }); + }; - const destroyAfterGenerate = co.wrap(function*(args) { - yield initApp(); + const destroyAfterGenerate = async function(args) { + await initApp(); replaceFile('config/environment.js', '(var|let|const) ENV = {', "$1 ENV = {\npodModulePrefix: 'app/pods', \n"); - yield generate(args); - return yield destroy(args); - }); + await generate(args); + return await destroy(args); + }; it('blueprint foo --pod', function() { let commandArgs = ['blueprint', 'foo', '--pod']; @@ -122,38 +119,32 @@ describe('Acceptance: ember destroy pod', function() { return assertDestroyAfterGenerate(commandArgs, files); }); - it( - 'deletes files generated using blueprints from the project directory', - co.wrap(function*() { - let commandArgs = ['foo', 'bar', '--pod']; - let files = ['app/foos/bar.js']; + it('deletes files generated using blueprints from the project directory', async function() { + let commandArgs = ['foo', 'bar', '--pod']; + let files = ['app/foos/bar.js']; - yield initApp(); + await initApp(); - yield outputFile( - 'blueprints/foo/files/app/foos/__name__.js', - "import Ember from 'ember';\n\n" + 'export default Ember.Object.extend({ foo: true });\n' - ); + await outputFile( + 'blueprints/foo/files/app/foos/__name__.js', + "import Ember from 'ember';\n\n" + 'export default Ember.Object.extend({ foo: true });\n' + ); - yield generate(commandArgs); - assertFilesExist(files); + await generate(commandArgs); + assertFilesExist(files); - yield destroy(commandArgs); - assertFilesNotExist(files); - }) - ); + await destroy(commandArgs); + assertFilesNotExist(files); + }); // Skip until podModulePrefix is deprecated - it.skip( - 'podModulePrefix deprecation warning', - co.wrap(function*() { - let result = yield destroyAfterGenerate(['controller', 'foo', '--pod']); - - expect(result.outputStream.join()).to.include( - '`podModulePrefix` is deprecated and will be' + - ' removed from future versions of ember-cli. Please move existing pods from' + - " 'app/pods/' to 'app/'." - ); - }) - ); + it.skip('podModulePrefix deprecation warning', async function() { + let result = await destroyAfterGenerate(['controller', 'foo', '--pod']); + + expect(result.outputStream.join()).to.include( + '`podModulePrefix` is deprecated and will be' + + ' removed from future versions of ember-cli. Please move existing pods from' + + " 'app/pods/' to 'app/'." + ); + }); }); diff --git a/tests/acceptance/pods-generate-test.js b/tests/acceptance/pods-generate-test.js index 7d06f73cbc..7cbe6d3bb2 100644 --- a/tests/acceptance/pods-generate-test.js +++ b/tests/acceptance/pods-generate-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const RSVP = require('rsvp'); const ember = require('../helpers/ember'); const replaceFile = require('ember-cli-internal-test-helpers/lib/helpers/file-utils').replaceFile; @@ -32,12 +31,10 @@ describe('Acceptance: ember generate pod', function() { BlueprintNpmTask.restoreNPM(Blueprint); }); - beforeEach( - co.wrap(function*() { - tmpdir = yield mkTmpDirIn(tmproot); - process.chdir(tmpdir); - }) - ); + beforeEach(async function() { + tmpdir = await mkTmpDirIn(tmproot); + process.chdir(tmpdir); + }); afterEach(function() { process.chdir(root); @@ -71,296 +68,266 @@ describe('Acceptance: ember generate pod', function() { }); } - it( - 'blueprint foo --pod', - co.wrap(function*() { - yield generate(['blueprint', 'foo', '--pod']); - - expect(file('blueprints/foo/index.js')).to.contain( - 'module.exports = {\n' + - " description: ''\n" + - '\n' + - ' // locals(options) {\n' + - ' // // Return custom template variables here.\n' + - ' // return {\n' + - ' // foo: options.entity.options.foo\n' + - ' // };\n' + - ' // }\n' + - '\n' + - ' // afterInstall(options) {\n' + - ' // // Perform extra work here.\n' + - ' // }\n' + - '};' - ); - }) - ); - - it( - 'blueprint foo/bar --pod', - co.wrap(function*() { - yield generate(['blueprint', 'foo/bar', '--pod']); - - expect(file('blueprints/foo/bar/index.js')).to.contain( - 'module.exports = {\n' + - " description: ''\n" + - '\n' + - ' // locals(options) {\n' + - ' // // Return custom template variables here.\n' + - ' // return {\n' + - ' // foo: options.entity.options.foo\n' + - ' // };\n' + - ' // }\n' + - '\n' + - ' // afterInstall(options) {\n' + - ' // // Perform extra work here.\n' + - ' // }\n' + - '};' - ); - }) - ); - - it( - 'http-mock foo --pod', - co.wrap(function*() { - yield generate(['http-mock', 'foo', '--pod']); - - expect(file('server/index.js')).to.contain('mocks.forEach(route => route(app));'); - - expect(file('server/mocks/foo.js')).to.contain( - 'module.exports = function(app) {\n' + - " const express = require('express');\n" + - ' let fooRouter = express.Router();\n' + - '\n' + - " fooRouter.get('/', function(req, res) {\n" + - ' res.send({\n' + - " 'foo': []\n" + - ' });\n' + - ' });\n' + - '\n' + - " fooRouter.post('/', function(req, res) {\n" + - ' res.status(201).end();\n' + - ' });\n' + - '\n' + - " fooRouter.get('/:id', function(req, res) {\n" + - ' res.send({\n' + - " 'foo': {\n" + - ' id: req.params.id\n' + - ' }\n' + - ' });\n' + - ' });\n' + - '\n' + - " fooRouter.put('/:id', function(req, res) {\n" + - ' res.send({\n' + - " 'foo': {\n" + - ' id: req.params.id\n' + - ' }\n' + - ' });\n' + - ' });\n' + - '\n' + - " fooRouter.delete('/:id', function(req, res) {\n" + - ' res.status(204).end();\n' + - ' });\n' + - '\n' + - ' // The POST and PUT call will not contain a request body\n' + - ' // because the body-parser is not included by default.\n' + - ' // To use req.body, run:\n' + - '\n' + - ' // npm install --save-dev body-parser\n' + - '\n' + - ' // After installing, you need to `use` the body-parser for\n' + - ' // this mock uncommenting the following line:\n' + - ' //\n' + - " //app.use('/api/foo', require('body-parser').json());\n" + - " app.use('/api/foo', fooRouter);\n" + - '};' - ); - - expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); - }) - ); - - it( - 'http-mock foo-bar --pod', - co.wrap(function*() { - yield generate(['http-mock', 'foo-bar', '--pod']); - - expect(file('server/index.js')).to.contain('mocks.forEach(route => route(app));'); - - expect(file('server/mocks/foo-bar.js')).to.contain( + it('blueprint foo --pod', async function() { + await generate(['blueprint', 'foo', '--pod']); + + expect(file('blueprints/foo/index.js')).to.contain( + 'module.exports = {\n' + + " description: ''\n" + + '\n' + + ' // locals(options) {\n' + + ' // // Return custom template variables here.\n' + + ' // return {\n' + + ' // foo: options.entity.options.foo\n' + + ' // };\n' + + ' // }\n' + + '\n' + + ' // afterInstall(options) {\n' + + ' // // Perform extra work here.\n' + + ' // }\n' + + '};' + ); + }); + + it('blueprint foo/bar --pod', async function() { + await generate(['blueprint', 'foo/bar', '--pod']); + + expect(file('blueprints/foo/bar/index.js')).to.contain( + 'module.exports = {\n' + + " description: ''\n" + + '\n' + + ' // locals(options) {\n' + + ' // // Return custom template variables here.\n' + + ' // return {\n' + + ' // foo: options.entity.options.foo\n' + + ' // };\n' + + ' // }\n' + + '\n' + + ' // afterInstall(options) {\n' + + ' // // Perform extra work here.\n' + + ' // }\n' + + '};' + ); + }); + + it('http-mock foo --pod', async function() { + await generate(['http-mock', 'foo', '--pod']); + + expect(file('server/index.js')).to.contain('mocks.forEach(route => route(app));'); + + expect(file('server/mocks/foo.js')).to.contain( + 'module.exports = function(app) {\n' + + " const express = require('express');\n" + + ' let fooRouter = express.Router();\n' + + '\n' + + " fooRouter.get('/', function(req, res) {\n" + + ' res.send({\n' + + " 'foo': []\n" + + ' });\n' + + ' });\n' + + '\n' + + " fooRouter.post('/', function(req, res) {\n" + + ' res.status(201).end();\n' + + ' });\n' + + '\n' + + " fooRouter.get('/:id', function(req, res) {\n" + + ' res.send({\n' + + " 'foo': {\n" + + ' id: req.params.id\n' + + ' }\n' + + ' });\n' + + ' });\n' + + '\n' + + " fooRouter.put('/:id', function(req, res) {\n" + + ' res.send({\n' + + " 'foo': {\n" + + ' id: req.params.id\n' + + ' }\n' + + ' });\n' + + ' });\n' + + '\n' + + " fooRouter.delete('/:id', function(req, res) {\n" + + ' res.status(204).end();\n' + + ' });\n' + + '\n' + + ' // The POST and PUT call will not contain a request body\n' + + ' // because the body-parser is not included by default.\n' + + ' // To use req.body, run:\n' + + '\n' + + ' // npm install --save-dev body-parser\n' + + '\n' + + ' // After installing, you need to `use` the body-parser for\n' + + ' // this mock uncommenting the following line:\n' + + ' //\n' + + " //app.use('/api/foo', require('body-parser').json());\n" + + " app.use('/api/foo', fooRouter);\n" + + '};' + ); + + expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); + }); + + it('http-mock foo-bar --pod', async function() { + await generate(['http-mock', 'foo-bar', '--pod']); + + expect(file('server/index.js')).to.contain('mocks.forEach(route => route(app));'); + + expect(file('server/mocks/foo-bar.js')).to.contain( + 'module.exports = function(app) {\n' + + " const express = require('express');\n" + + ' let fooBarRouter = express.Router();\n' + + '\n' + + " fooBarRouter.get('/', function(req, res) {\n" + + ' res.send({\n' + + " 'foo-bar': []\n" + + ' });\n' + + ' });\n' + + '\n' + + " fooBarRouter.post('/', function(req, res) {\n" + + ' res.status(201).end();\n' + + ' });\n' + + '\n' + + " fooBarRouter.get('/:id', function(req, res) {\n" + + ' res.send({\n' + + " 'foo-bar': {\n" + + ' id: req.params.id\n' + + ' }\n' + + ' });\n' + + ' });\n' + + '\n' + + " fooBarRouter.put('/:id', function(req, res) {\n" + + ' res.send({\n' + + " 'foo-bar': {\n" + + ' id: req.params.id\n' + + ' }\n' + + ' });\n' + + ' });\n' + + '\n' + + " fooBarRouter.delete('/:id', function(req, res) {\n" + + ' res.status(204).end();\n' + + ' });\n' + + '\n' + + ' // The POST and PUT call will not contain a request body\n' + + ' // because the body-parser is not included by default.\n' + + ' // To use req.body, run:\n' + + '\n' + + ' // npm install --save-dev body-parser\n' + + '\n' + + ' // After installing, you need to `use` the body-parser for\n' + + ' // this mock uncommenting the following line:\n' + + ' //\n' + + " //app.use('/api/foo-bar', require('body-parser').json());\n" + + " app.use('/api/foo-bar', fooBarRouter);\n" + + '};' + ); + + expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); + }); + + it('http-proxy foo --pod', async function() { + await generate(['http-proxy', 'foo', 'http://localhost:5000', '--pod']); + + expect(file('server/index.js')).to.contain('proxies.forEach(route => route(app));'); + + expect(file('server/proxies/foo.js')).to.contain( + "const proxyPath = '/foo';\n" + + '\n' + 'module.exports = function(app) {\n' + - " const express = require('express');\n" + - ' let fooBarRouter = express.Router();\n' + - '\n' + - " fooBarRouter.get('/', function(req, res) {\n" + - ' res.send({\n' + - " 'foo-bar': []\n" + - ' });\n' + - ' });\n' + - '\n' + - " fooBarRouter.post('/', function(req, res) {\n" + - ' res.status(201).end();\n' + - ' });\n' + - '\n' + - " fooBarRouter.get('/:id', function(req, res) {\n" + - ' res.send({\n' + - " 'foo-bar': {\n" + - ' id: req.params.id\n' + - ' }\n' + - ' });\n' + - ' });\n' + - '\n' + - " fooBarRouter.put('/:id', function(req, res) {\n" + - ' res.send({\n' + - " 'foo-bar': {\n" + - ' id: req.params.id\n' + - ' }\n' + - ' });\n' + - ' });\n' + - '\n' + - " fooBarRouter.delete('/:id', function(req, res) {\n" + - ' res.status(204).end();\n' + - ' });\n' + - '\n' + - ' // The POST and PUT call will not contain a request body\n' + - ' // because the body-parser is not included by default.\n' + - ' // To use req.body, run:\n' + - '\n' + - ' // npm install --save-dev body-parser\n' + - '\n' + - ' // After installing, you need to `use` the body-parser for\n' + - ' // this mock uncommenting the following line:\n' + - ' //\n' + - " //app.use('/api/foo-bar', require('body-parser').json());\n" + - " app.use('/api/foo-bar', fooBarRouter);\n" + - '};' - ); - - expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); - }) - ); - - it( - 'http-proxy foo --pod', - co.wrap(function*() { - yield generate(['http-proxy', 'foo', 'http://localhost:5000', '--pod']); - - expect(file('server/index.js')).to.contain('proxies.forEach(route => route(app));'); - - expect(file('server/proxies/foo.js')).to.contain( - "const proxyPath = '/foo';\n" + - '\n' + - 'module.exports = function(app) {\n' + - ' // For options, see:\n' + - ' // https://github.com/nodejitsu/node-http-proxy\n' + - " let proxy = require('http-proxy').createProxyServer({});\n" + - '\n' + - " proxy.on('error', function(err, req) {\n" + - ' console.error(err, req.url);\n' + - ' });\n' + - '\n' + - ' app.use(proxyPath, function(req, res, next){\n' + - ' // include root path in proxied request\n' + - " req.url = proxyPath + '/' + req.url;\n" + - " proxy.web(req, res, { target: 'http://localhost:5000' });\n" + - ' });\n' + - '};' - ); - - expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); - }) - ); - - it( - 'uses blueprints from the project directory', - co.wrap(function*() { - yield initApp(); - yield outputFile( - 'blueprints/foo/files/app/foos/__name__.js', - "import Ember from 'ember';\n" + 'export default Ember.Object.extend({ foo: true });\n' - ); - - yield ember(['generate', 'foo', 'bar', '--pod']); - - expect(file('app/foos/bar.js')).to.contain('foo: true'); - }) - ); - - it( - 'allows custom blueprints to override built-ins', - co.wrap(function*() { - yield initApp(); - yield outputFile( - 'blueprints/controller/files/app/__path__/__name__.js', - "import Ember from 'ember';\n\n" + 'export default Ember.Controller.extend({ custom: true });\n' - ); - - yield ember(['generate', 'controller', 'foo', '--pod']); - - expect(file('app/foo/controller.js')).to.contain('custom: true'); - }) - ); - - it( - 'passes custom cli arguments to blueprint options', - co.wrap(function*() { - yield initApp(); - yield outputFile( - 'blueprints/customblue/files/app/__name__.js', - 'Q: Can I has custom command? A: <%= hasCustomCommand %>' - ); - - yield outputFile( - 'blueprints/customblue/index.js', - 'module.exports = {\n' + - ' fileMapTokens(options) {\n' + - ' return {\n' + - ' __name__(options) {\n' + - ' return options.dasherizedModuleName;\n' + - ' }\n' + - ' };\n' + - ' },\n' + - ' locals(options) {\n' + - ' var loc = {};\n' + - " loc.hasCustomCommand = (options.customCommand) ? 'Yes!' : 'No. :C';\n" + - ' return loc;\n' + - ' },\n' + - '};\n' - ); - - yield ember(['generate', 'customblue', 'foo', '--custom-command', '--pod']); - - expect(file('app/foo.js')).to.contain('A: Yes!'); - }) - ); - - it( - 'correctly identifies the root of the project', - co.wrap(function*() { - yield initApp(); - yield outputFile( - 'blueprints/controller/files/app/__path__/__name__.js', - "import Ember from 'ember';\n\n" + 'export default Ember.Controller.extend({ custom: true });\n' - ); - - process.chdir(path.join(tmpdir, 'app')); - yield ember(['generate', 'controller', 'foo', '--pod']); - - process.chdir(tmpdir); - expect(file('app/foo/controller.js')).to.contain('custom: true'); - }) - ); + ' // For options, see:\n' + + ' // https://github.com/nodejitsu/node-http-proxy\n' + + " let proxy = require('http-proxy').createProxyServer({});\n" + + '\n' + + " proxy.on('error', function(err, req) {\n" + + ' console.error(err, req.url);\n' + + ' });\n' + + '\n' + + ' app.use(proxyPath, function(req, res, next){\n' + + ' // include root path in proxied request\n' + + " req.url = proxyPath + '/' + req.url;\n" + + " proxy.web(req, res, { target: 'http://localhost:5000' });\n" + + ' });\n' + + '};' + ); + + expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); + }); + + it('uses blueprints from the project directory', async function() { + await initApp(); + await outputFile( + 'blueprints/foo/files/app/foos/__name__.js', + "import Ember from 'ember';\n" + 'export default Ember.Object.extend({ foo: true });\n' + ); + + await ember(['generate', 'foo', 'bar', '--pod']); + + expect(file('app/foos/bar.js')).to.contain('foo: true'); + }); + + it('allows custom blueprints to override built-ins', async function() { + await initApp(); + await outputFile( + 'blueprints/controller/files/app/__path__/__name__.js', + "import Ember from 'ember';\n\n" + 'export default Ember.Controller.extend({ custom: true });\n' + ); + + await ember(['generate', 'controller', 'foo', '--pod']); + + expect(file('app/foo/controller.js')).to.contain('custom: true'); + }); + + it('passes custom cli arguments to blueprint options', async function() { + await initApp(); + await outputFile( + 'blueprints/customblue/files/app/__name__.js', + 'Q: Can I has custom command? A: <%= hasCustomCommand %>' + ); + + await outputFile( + 'blueprints/customblue/index.js', + 'module.exports = {\n' + + ' fileMapTokens(options) {\n' + + ' return {\n' + + ' __name__(options) {\n' + + ' return options.dasherizedModuleName;\n' + + ' }\n' + + ' };\n' + + ' },\n' + + ' locals(options) {\n' + + ' var loc = {};\n' + + " loc.hasCustomCommand = (options.customCommand) ? 'Yes!' : 'No. :C';\n" + + ' return loc;\n' + + ' },\n' + + '};\n' + ); + + await ember(['generate', 'customblue', 'foo', '--custom-command', '--pod']); + + expect(file('app/foo.js')).to.contain('A: Yes!'); + }); + + it('correctly identifies the root of the project', async function() { + await initApp(); + await outputFile( + 'blueprints/controller/files/app/__path__/__name__.js', + "import Ember from 'ember';\n\n" + 'export default Ember.Controller.extend({ custom: true });\n' + ); + + process.chdir(path.join(tmpdir, 'app')); + await ember(['generate', 'controller', 'foo', '--pod']); + + process.chdir(tmpdir); + expect(file('app/foo/controller.js')).to.contain('custom: true'); + }); // Skip until podModulePrefix is deprecated - it.skip( - 'podModulePrefix deprecation warning', - co.wrap(function*() { - let result = yield generateWithPrefix(['controller', 'foo', '--pod']); - - expect(result.outputStream.join()).to.include( - '`podModulePrefix` is deprecated and will be' + - ' removed from future versions of ember-cli. Please move existing pods from' + - " 'app/pods/' to 'app/'." - ); - }) - ); + it.skip('podModulePrefix deprecation warning', async function() { + let result = await generateWithPrefix(['controller', 'foo', '--pod']); + + expect(result.outputStream.join()).to.include( + '`podModulePrefix` is deprecated and will be' + + ' removed from future versions of ember-cli. Please move existing pods from' + + " 'app/pods/' to 'app/'." + ); + }); }); diff --git a/tests/acceptance/preprocessor-smoke-test-slow.js b/tests/acceptance/preprocessor-smoke-test-slow.js index d30af3b652..9930ae3e91 100644 --- a/tests/acceptance/preprocessor-smoke-test-slow.js +++ b/tests/acceptance/preprocessor-smoke-test-slow.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const path = require('path'); const fs = require('fs-extra'); @@ -40,61 +39,52 @@ describe('Acceptance: preprocessor-smoke-test', function() { }); if (!isExperimentEnabled('MODULE_UNIFICATION')) { - it( - 'addons with standard preprocessors compile correctly', - co.wrap(function*() { - yield copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors`); - - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-cli-sass'] = 'latest'; - packageJson.devDependencies['ember-cool-addon'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); - - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - expect(file('dist/assets/some-cool-app.css')).to.contain('app styles included'); - expect(file('dist/assets/vendor.css')).to.contain('addon styles included'); - }) - ); - - it( - 'addon registry entries are added in the proper order', - co.wrap(function*() { - yield copyFixtureFiles(`preprocessor-tests/app-registry-ordering`); - - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['first-dummy-preprocessor'] = 'latest'; - packageJson.devDependencies['second-dummy-preprocessor'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); - - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - expect(file('dist/assets/some-cool-app.js')) - .to.contain('replacedByPreprocessor', 'token should have been replaced in app bundle') - .to.not.contain('__SECOND_PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should not be contained') - .to.not.contain('__FIRST_PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should not be contained'); - }) - ); - - it( - 'addons without preprocessors compile correctly', - co.wrap(function*() { - yield copyFixtureFiles(`preprocessor-tests/app-with-addon-without-preprocessors`); - - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-cli-sass'] = 'latest'; - packageJson.devDependencies['ember-cool-addon'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); - - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - expect(file('dist/assets/some-cool-app.css')).to.contain('app styles included'); - expect(file('dist/assets/vendor.css')).to.contain('addon styles included'); - }) - ); + it('addons with standard preprocessors compile correctly', async function() { + await copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors`); + + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-cli-sass'] = 'latest'; + packageJson.devDependencies['ember-cool-addon'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); + + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + expect(file('dist/assets/some-cool-app.css')).to.contain('app styles included'); + expect(file('dist/assets/vendor.css')).to.contain('addon styles included'); + }); + + it('addon registry entries are added in the proper order', async function() { + await copyFixtureFiles(`preprocessor-tests/app-registry-ordering`); + + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['first-dummy-preprocessor'] = 'latest'; + packageJson.devDependencies['second-dummy-preprocessor'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); + + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + expect(file('dist/assets/some-cool-app.js')) + .to.contain('replacedByPreprocessor', 'token should have been replaced in app bundle') + .to.not.contain('__SECOND_PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should not be contained') + .to.not.contain('__FIRST_PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should not be contained'); + }); + + it('addons without preprocessors compile correctly', async function() { + await copyFixtureFiles(`preprocessor-tests/app-with-addon-without-preprocessors`); + + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-cli-sass'] = 'latest'; + packageJson.devDependencies['ember-cool-addon'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); + + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + expect(file('dist/assets/some-cool-app.css')).to.contain('app styles included'); + expect(file('dist/assets/vendor.css')).to.contain('addon styles included'); + }); /* [ app ] -> [ addon ] -> [ preprocessor addon ] @@ -103,27 +93,24 @@ describe('Acceptance: preprocessor-smoke-test', function() { | |-- preprocessor should not apply to this */ - it( - 'addons depending on preprocessor addon preprocesses addon but not app', - co.wrap(function*() { - yield copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors-2`); + it('addons depending on preprocessor addon preprocesses addon but not app', async function() { + await copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors-2`); - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-cool-addon'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-cool-addon'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - expect(file('dist/assets/some-cool-app.js')) - .to.contain('__PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should not have been replaced in app bundle') - .to.not.contain('replacedByPreprocessor', 'token should not have been replaced in app bundle'); + expect(file('dist/assets/some-cool-app.js')) + .to.contain('__PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should not have been replaced in app bundle') + .to.not.contain('replacedByPreprocessor', 'token should not have been replaced in app bundle'); - expect(file('dist/assets/vendor.js')) - .to.contain('replacedByPreprocessor', 'token should have been replaced in vendor bundle') - .to.not.contain('__PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should have been replaced in vendor bundle'); - }) - ); + expect(file('dist/assets/vendor.js')) + .to.contain('replacedByPreprocessor', 'token should have been replaced in vendor bundle') + .to.not.contain('__PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should have been replaced in vendor bundle'); + }); /* [ app ] -> [ addon ] -> [ addon ] -> [ preprocessor addon ] @@ -134,38 +121,32 @@ describe('Acceptance: preprocessor-smoke-test', function() { | |-- preprocessor should not apply to this */ - it( - 'addon N levels deep depending on preprocessor preprocesses that parent addon only', - co.wrap(function*() { - yield copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors-3`); - - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-shallow-addon'] = 'latest'; - - fs.writeJsonSync(packageJsonPath, packageJson); - - yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - expect(file('dist/assets/some-cool-app.js')) - .to.contain('__PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should not have been replaced in app bundle') - .to.not.contain('replacedByPreprocessor', 'token should not have been replaced in app bundle'); - - expect(file('dist/assets/vendor.js')) - .to.contain('deep: "replacedByPreprocessor"', 'token should have been replaced in deep component') - .to.contain( - 'shallow: __PREPROCESSOR_REPLACEMENT_TOKEN__', - 'token should not have been replaced in shallow component' - ) - .to.not.contain( - 'deep: __PREPROCESSOR_REPLACEMENT_TOKEN__', - 'token should have been replaced in deep component' - ) - .to.not.contain( - 'shallow: "replacedByPreprocessor"', - 'token should not have been replaced in shallow component' - ); - }) - ); + it('addon N levels deep depending on preprocessor preprocesses that parent addon only', async function() { + await copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors-3`); + + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-shallow-addon'] = 'latest'; + + fs.writeJsonSync(packageJsonPath, packageJson); + + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + expect(file('dist/assets/some-cool-app.js')) + .to.contain('__PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should not have been replaced in app bundle') + .to.not.contain('replacedByPreprocessor', 'token should not have been replaced in app bundle'); + + expect(file('dist/assets/vendor.js')) + .to.contain('deep: "replacedByPreprocessor"', 'token should have been replaced in deep component') + .to.contain( + 'shallow: __PREPROCESSOR_REPLACEMENT_TOKEN__', + 'token should not have been replaced in shallow component' + ) + .to.not.contain('deep: __PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should have been replaced in deep component') + .to.not.contain( + 'shallow: "replacedByPreprocessor"', + 'token should not have been replaced in shallow component' + ); + }); } }); diff --git a/tests/fixtures/addon/component-with-template/tests/acceptance/main-test.js b/tests/fixtures/addon/component-with-template/tests/acceptance/main-test.js index 88f6347bbe..4e9a95a804 100644 --- a/tests/fixtures/addon/component-with-template/tests/acceptance/main-test.js +++ b/tests/fixtures/addon/component-with-template/tests/acceptance/main-test.js @@ -6,14 +6,14 @@ import { module, test } from 'qunit'; module('Acceptance', function(hooks) { setupApplicationTest(hooks); - test('renders properly', async function(assert) { + test('renders properly', async function (assert) { await visit('/'); var element = this.element.querySelector('.basic-thing'); assert.equal(element.textContent.trim(), 'WOOT!!'); }); - test('renders imported component', async function(assert) { + test('renders imported component', async function (assert) { await visit('/'); var element = this.element.querySelector('.second-thing'); diff --git a/tests/fixtures/addon/kitchen-sink/tests/acceptance/main-test.js b/tests/fixtures/addon/kitchen-sink/tests/acceptance/main-test.js index 1d9ab59bf4..58e3387552 100644 --- a/tests/fixtures/addon/kitchen-sink/tests/acceptance/main-test.js +++ b/tests/fixtures/addon/kitchen-sink/tests/acceptance/main-test.js @@ -6,7 +6,7 @@ import { module, test } from 'qunit'; module('Acceptance', function(hooks) { setupApplicationTest(hooks); - test('renders properly', async function(assert) { + test('renders properly', async function (assert) { await visit('/'); var element = this.element.querySelector('.basic-thing'); @@ -14,7 +14,7 @@ module('Acceptance', function(hooks) { assert.ok(truthyHelper(), 'addon-test-support helper'); }); - test('renders imported component', async function(assert) { + test('renders imported component', async function (assert) { await visit('/'); var element = this.element.querySelector('.second-thing'); diff --git a/tests/fixtures/brocfile-tests/default-development/tests/integration/app-boots-test.js b/tests/fixtures/brocfile-tests/default-development/tests/integration/app-boots-test.js index 4de7473168..9534272ff3 100644 --- a/tests/fixtures/brocfile-tests/default-development/tests/integration/app-boots-test.js +++ b/tests/fixtures/brocfile-tests/default-development/tests/integration/app-boots-test.js @@ -6,7 +6,7 @@ import { module, test } from 'qunit'; module('default-development - Integration', function(hook) { setupApplicationTest(hooks); - test('renders properly', async function(assert) { + test('renders properly', async function (assert) { await visit('/'); var elements = this.element.querySelectorAll('.ember-view'); diff --git a/tests/fixtures/brocfile-tests/pods-templates/tests/integration/pods-template-test.js b/tests/fixtures/brocfile-tests/pods-templates/tests/integration/pods-template-test.js index 5169799ac1..442704ee90 100644 --- a/tests/fixtures/brocfile-tests/pods-templates/tests/integration/pods-template-test.js +++ b/tests/fixtures/brocfile-tests/pods-templates/tests/integration/pods-template-test.js @@ -5,7 +5,7 @@ import { module, test } from 'qunit'; module('pods based templates', function(hooks) { setupApplicationTest(hooks); - test('the application boots properly with pods based templates', async function(assert) { + test('the application boots properly with pods based templates', async function (assert) { assert.expect(1); await visit('/'); diff --git a/tests/fixtures/brocfile-tests/pods-with-prefix-templates/tests/integration/pods-template-test.js b/tests/fixtures/brocfile-tests/pods-with-prefix-templates/tests/integration/pods-template-test.js index 50a4e4adb6..8185900d00 100644 --- a/tests/fixtures/brocfile-tests/pods-with-prefix-templates/tests/integration/pods-template-test.js +++ b/tests/fixtures/brocfile-tests/pods-with-prefix-templates/tests/integration/pods-template-test.js @@ -5,7 +5,7 @@ import { module, test } from 'qunit'; module('pods based templates', function(hooks) { setupApplicationTest(hooks); - test('the application boots properly with pods based templates with a podModulePrefix set', async function(assert) { + test('the application boots properly with pods based templates with a podModulePrefix set', async function (assert) { assert.expect(1); await visit('/'); diff --git a/tests/unit/broccoli/addon/linting-test.js b/tests/unit/broccoli/addon/linting-test.js index e0e6f8d880..9ab050af68 100644 --- a/tests/unit/broccoli/addon/linting-test.js +++ b/tests/unit/broccoli/addon/linting-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const broccoliTestHelper = require('broccoli-test-helper'); const expect = require('chai').expect; @@ -14,236 +13,211 @@ const createTempDir = broccoliTestHelper.createTempDir; describe('Addon - linting', function() { let input, output, addon, lintTrees; - beforeEach( - co.wrap(function*() { - input = yield createTempDir(); - let MockAddon = Addon.extend({ - name: 'first', - root: input.path(), - }); - lintTrees = []; - let cli = new MockCLI(); - let pkg = { name: 'ember-app-test' }; - - let project = new Project(input.path(), pkg, cli.ui, cli); - project.addons = [ - { - name: 'fake-linter-addon', - lintTree(type, tree) { - lintTrees.push(tree); - }, - }, - ]; - - addon = new MockAddon(project, project); - }) - ); - - afterEach( - co.wrap(function*() { - yield input.dispose(); - yield output.dispose(); - }) - ); - - it( - 'calls lintTree on project addons for app directory', - co.wrap(function*() { - input.write({ - app: { - 'derp.js': '// slerpy', - }, - }); - - addon.jshintAddonTree(); - expect(lintTrees.length).to.equal(1); - - output = yield buildOutput(lintTrees[0]); - - expect(output.read()).to.deep.equal({ - app: { - 'derp.js': '// slerpy', - }, - }); - }) - ); - - it( - 'calls lintTree on project addons for addon directory', - co.wrap(function*() { - input.write({ - addon: { - 'derp.js': '// slerpy', - }, - }); - - addon.jshintAddonTree(); - expect(lintTrees.length).to.equal(2); - - output = yield buildOutput(lintTrees[0]); - - expect(output.read()).to.deep.equal({ - addon: { - 'derp.js': '// slerpy', - }, - }); - - yield output.dispose(); - - output = yield buildOutput(lintTrees[1]); - - expect(output.read()).to.deep.equal({ - addon: { - templates: {}, - }, - }); - }) - ); - - it( - 'calls lintTree on project addons for addon directory with only templates', - co.wrap(function*() { - input.write({ - addon: { - templates: { - 'foo.hbs': '{{huzzzah}}', - }, - }, - }); - - addon.jshintAddonTree(); - expect(lintTrees.length).to.equal(2); - - output = yield buildOutput(lintTrees[0]); - - expect(output.read()).to.deep.equal({}); - - yield output.dispose(); - - output = yield buildOutput(lintTrees[1]); + beforeEach(async function() { + input = await createTempDir(); + let MockAddon = Addon.extend({ + name: 'first', + root: input.path(), + }); + lintTrees = []; + let cli = new MockCLI(); + let pkg = { name: 'ember-app-test' }; + + let project = new Project(input.path(), pkg, cli.ui, cli); + project.addons = [ + { + name: 'fake-linter-addon', + lintTree(type, tree) { + lintTrees.push(tree); + }, + }, + ]; - expect(output.read()).to.deep.equal({ - addon: { - templates: { - 'foo.hbs': '{{huzzzah}}', - }, - }, - }); - }) - ); - - it( - 'calls lintTree on project addons for addon directory with templates', - co.wrap(function*() { - input.write({ - addon: { - 'derp.js': '// slerpy', - templates: { - 'foo.hbs': '{{huzzzah}}', - }, - }, - }); - - addon.jshintAddonTree(); - expect(lintTrees.length).to.equal(2); + addon = new MockAddon(project, project); + }); + + afterEach(async function() { + await input.dispose(); + await output.dispose(); + }); - output = yield buildOutput(lintTrees[0]); + it('calls lintTree on project addons for app directory', async function() { + input.write({ + app: { + 'derp.js': '// slerpy', + }, + }); - expect(output.read()).to.deep.equal({ - addon: { - 'derp.js': '// slerpy', - }, - }); + addon.jshintAddonTree(); + expect(lintTrees.length).to.equal(1); - yield output.dispose(); + output = await buildOutput(lintTrees[0]); - output = yield buildOutput(lintTrees[1]); + expect(output.read()).to.deep.equal({ + app: { + 'derp.js': '// slerpy', + }, + }); + }); + + it('calls lintTree on project addons for addon directory', async function() { + input.write({ + addon: { + 'derp.js': '// slerpy', + }, + }); - expect(output.read()).to.deep.equal({ - addon: { - templates: { - 'foo.hbs': '{{huzzzah}}', - }, - }, - }); - }) - ); - - it( - 'calls lintTree on project addons for addon-test-support directory', - co.wrap(function*() { - input.write({ - 'addon-test-support': { - 'derp.js': '// slerpy', - }, - }); - - addon.jshintAddonTree(); - expect(lintTrees.length).to.equal(1); - - output = yield buildOutput(lintTrees[0]); - - expect(output.read()).to.deep.equal({ - 'addon-test-support': { - 'derp.js': '// slerpy', - }, - }); - }) - ); - - it( - 'calls lintTree on project addons for test-support directory', - co.wrap(function*() { - input.write({ - 'test-support': { - 'derp.js': '// slerpy', - }, - }); - - addon.jshintAddonTree(); - expect(lintTrees.length).to.equal(1); - - output = yield buildOutput(lintTrees[0]); - - expect(output.read()).to.deep.equal({ - 'test-support': { - 'derp.js': '// slerpy', - }, - }); - }) - ); - - it( - 'calls lintTree for trees in an addon', - co.wrap(function*() { - addon.project.addons[0].lintTree = function(type, tree) { - return tree; - }; - let addonRootContents = { - app: { - 'app-foo.js': '// hoo-foo', - }, - addon: { - 'addon-bar.js': '// bar-dar', - templates: { - 'addon-templates-quux.hbs': '{{! quux-books }}', - }, - }, - 'addon-test-support': { - 'addon-test-support-baz.js': '// baz-jazz', - }, - 'test-support': { - 'test-support-qux.js': '// qux-bucks', - }, - }; - input.write(addonRootContents); - - output = yield buildOutput(addon.jshintAddonTree()); - expect(output.read()).to.deep.equal({ - first: { - tests: addonRootContents, - }, - }); - }) - ); + addon.jshintAddonTree(); + expect(lintTrees.length).to.equal(2); + + output = await buildOutput(lintTrees[0]); + + expect(output.read()).to.deep.equal({ + addon: { + 'derp.js': '// slerpy', + }, + }); + + await output.dispose(); + + output = await buildOutput(lintTrees[1]); + + expect(output.read()).to.deep.equal({ + addon: { + templates: {}, + }, + }); + }); + + it('calls lintTree on project addons for addon directory with only templates', async function() { + input.write({ + addon: { + templates: { + 'foo.hbs': '{{huzzzah}}', + }, + }, + }); + + addon.jshintAddonTree(); + expect(lintTrees.length).to.equal(2); + + output = await buildOutput(lintTrees[0]); + + expect(output.read()).to.deep.equal({}); + + await output.dispose(); + + output = await buildOutput(lintTrees[1]); + + expect(output.read()).to.deep.equal({ + addon: { + templates: { + 'foo.hbs': '{{huzzzah}}', + }, + }, + }); + }); + + it('calls lintTree on project addons for addon directory with templates', async function() { + input.write({ + addon: { + 'derp.js': '// slerpy', + templates: { + 'foo.hbs': '{{huzzzah}}', + }, + }, + }); + + addon.jshintAddonTree(); + expect(lintTrees.length).to.equal(2); + + output = await buildOutput(lintTrees[0]); + + expect(output.read()).to.deep.equal({ + addon: { + 'derp.js': '// slerpy', + }, + }); + + await output.dispose(); + + output = await buildOutput(lintTrees[1]); + + expect(output.read()).to.deep.equal({ + addon: { + templates: { + 'foo.hbs': '{{huzzzah}}', + }, + }, + }); + }); + + it('calls lintTree on project addons for addon-test-support directory', async function() { + input.write({ + 'addon-test-support': { + 'derp.js': '// slerpy', + }, + }); + + addon.jshintAddonTree(); + expect(lintTrees.length).to.equal(1); + + output = await buildOutput(lintTrees[0]); + + expect(output.read()).to.deep.equal({ + 'addon-test-support': { + 'derp.js': '// slerpy', + }, + }); + }); + + it('calls lintTree on project addons for test-support directory', async function() { + input.write({ + 'test-support': { + 'derp.js': '// slerpy', + }, + }); + + addon.jshintAddonTree(); + expect(lintTrees.length).to.equal(1); + + output = await buildOutput(lintTrees[0]); + + expect(output.read()).to.deep.equal({ + 'test-support': { + 'derp.js': '// slerpy', + }, + }); + }); + + it('calls lintTree for trees in an addon', async function() { + addon.project.addons[0].lintTree = function(type, tree) { + return tree; + }; + let addonRootContents = { + app: { + 'app-foo.js': '// hoo-foo', + }, + addon: { + 'addon-bar.js': '// bar-dar', + templates: { + 'addon-templates-quux.hbs': '{{! quux-books }}', + }, + }, + 'addon-test-support': { + 'addon-test-support-baz.js': '// baz-jazz', + }, + 'test-support': { + 'test-support-qux.js': '// qux-bucks', + }, + }; + input.write(addonRootContents); + + output = await buildOutput(addon.jshintAddonTree()); + expect(output.read()).to.deep.equal({ + first: { + tests: addonRootContents, + }, + }); + }); }); diff --git a/tests/unit/broccoli/addon/module-name-test.js b/tests/unit/broccoli/addon/module-name-test.js index f90b24bbaf..2cfb10799f 100644 --- a/tests/unit/broccoli/addon/module-name-test.js +++ b/tests/unit/broccoli/addon/module-name-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const path = require('path'); const broccoliTestHelper = require('broccoli-test-helper'); const expect = require('chai').expect; @@ -15,63 +14,56 @@ const createTempDir = broccoliTestHelper.createTempDir; describe('Addon - moduleName', function() { let input, output, addon; - beforeEach( - co.wrap(function*() { - input = yield createTempDir(); - let MockAddon = Addon.extend({ - root: input.path(), - name: 'fake-addon', - moduleName() { - return 'totes-not-fake-addon'; - }, - }); - let cli = new MockCLI(); - let pkg = { name: 'ember-app-test' }; - let project = new Project(input.path(), pkg, cli.ui, cli); + beforeEach(async function() { + input = await createTempDir(); + let MockAddon = Addon.extend({ + root: input.path(), + name: 'fake-addon', + moduleName() { + return 'totes-not-fake-addon'; + }, + }); + let cli = new MockCLI(); + let pkg = { name: 'ember-app-test' }; + let project = new Project(input.path(), pkg, cli.ui, cli); - addon = new MockAddon(project, project); + addon = new MockAddon(project, project); - // override the registry so it just returns the input for everything - // and doesn't whine about not finding template preprocessors - addon.registry.load = () => [ - { - toTree(t) { - return t; - }, + // override the registry so it just returns the input for everything + // and doesn't whine about not finding template preprocessors + addon.registry.load = () => [ + { + toTree(t) { + return t; }, - ]; - }) - ); + }, + ]; + }); - afterEach( - co.wrap(function*() { - yield input.dispose(); - yield output.dispose(); - }) - ); + afterEach(async function() { + await input.dispose(); + await output.dispose(); + }); - it( - 'uses the module name function', - co.wrap(function*() { - input.write({ - addon: { - 'herp.js': '// slerpy', - templates: { - 'derp.hbs': '', - }, + it('uses the module name function', async function() { + input.write({ + addon: { + 'herp.js': '// slerpy', + templates: { + 'derp.hbs': '', }, - }); + }, + }); - output = yield buildOutput(addon.treeForAddon(path.join(addon.root, '/addon'))); + output = await buildOutput(addon.treeForAddon(path.join(addon.root, '/addon'))); - expect(output.read()).to.deep.equal({ - 'totes-not-fake-addon': { - 'herp.js': '// slerpy', - templates: { - 'derp.hbs': '', - }, + expect(output.read()).to.deep.equal({ + 'totes-not-fake-addon': { + 'herp.js': '// slerpy', + templates: { + 'derp.hbs': '', }, - }); - }) - ); + }, + }); + }); }); diff --git a/tests/unit/broccoli/builder-test.js b/tests/unit/broccoli/builder-test.js index 4920ec6048..61db04b326 100644 --- a/tests/unit/broccoli/builder-test.js +++ b/tests/unit/broccoli/builder-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const broccoliTestHelper = require('broccoli-test-helper'); const expect = require('chai').expect; const ci = require('ci-info'); @@ -14,30 +13,26 @@ const ROOT = process.cwd(); describe('Builder - broccoli tests', function() { let projectRoot, builderOutputPath, output, project, builder; - beforeEach( - co.wrap(function*() { - projectRoot = yield createTempDir(); - builderOutputPath = yield createTempDir(); + beforeEach(async function() { + projectRoot = await createTempDir(); + builderOutputPath = await createTempDir(); - project = new MockProject({ root: projectRoot.path() }); - }) - ); + project = new MockProject({ root: projectRoot.path() }); + }); - afterEach( - co.wrap(function*() { - yield projectRoot.dispose(); - yield builderOutputPath.dispose(); - yield output.dispose(); + afterEach(async function() { + await projectRoot.dispose(); + await builderOutputPath.dispose(); + await output.dispose(); - // this is needed because lib/utilities/find-build-file.js does a - // `process.chdir` when it looks for the `ember-cli-build.js` - process.chdir(ROOT); - }) - ); + // this is needed because lib/utilities/find-build-file.js does a + // `process.chdir` when it looks for the `ember-cli-build.js` + process.chdir(ROOT); + }); (ci.APPVEYOR ? it.skip : it)( 'falls back to broccoli-builder@0.18 when legacy plugins exist in build', - co.wrap(function*() { + async function() { projectRoot.write({ 'ember-cli-build.js': ` const fs = require('fs'); @@ -91,7 +86,7 @@ describe('Builder - broccoli tests', function() { }); output = fromBuilder(builder); - yield output.build(); + await output.build(); expect(output.read()).to.deep.equal({ 'hello.txt': '// hello!', @@ -104,6 +99,6 @@ describe('Builder - broccoli tests', function() { expect(builder.ui.output).to.include( 'LegacyPlugin: The .read/.rebuild API is no longer supported as of Broccoli 1.0. Plugins must now derive from broccoli-plugin. https://github.com/broccolijs/broccoli/blob/master/docs/broccoli-1-0-plugin-api.md' ); - }) + } ); }); diff --git a/tests/unit/broccoli/default-packager/additional-assets-test.js b/tests/unit/broccoli/default-packager/additional-assets-test.js index 181a48f46c..8f034bd447 100644 --- a/tests/unit/broccoli/default-packager/additional-assets-test.js +++ b/tests/unit/broccoli/default-packager/additional-assets-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const expect = require('chai').expect; const Funnel = require('broccoli-funnel'); const DefaultPackager = require('../../../../lib/broccoli/default-packager'); @@ -59,121 +58,109 @@ describe('Default Packager: Additional Assets', function() { addons: [], }; - before( - co.wrap(function*() { - input = yield createTempDir(); - - input.write(MODULES); - }) - ); - - after( - co.wrap(function*() { - yield input.dispose(); - }) - ); - - afterEach( - co.wrap(function*() { - yield output.dispose(); - }) - ); - - it( - 'caches packaged javascript tree', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', - env: 'development', - - distPaths: { - appJsFile: '/assets/the-best-app-ever.js', - vendorJsFile: '/assets/vendor.js', - }, + before(async function() { + input = await createTempDir(); - registry: setupRegistryFor('template', function(tree) { - return new Funnel(tree, { - getDestinationPath(relativePath) { - return relativePath.replace(/hbs$/g, 'js'); - }, - }); - }), - - additionalAssetPaths: [ - { - src: 'vendor/font-awesome/fonts', - file: 'FontAwesome.otf', - dest: 'fonts', - }, - { - src: 'vendor/font-awesome/fonts', - file: 'FontAwesome.woff', - dest: 'fonts', + input.write(MODULES); + }); + + after(async function() { + await input.dispose(); + }); + + afterEach(async function() { + await output.dispose(); + }); + + it('caches packaged javascript tree', async function() { + let defaultPackager = new DefaultPackager({ + name: 'the-best-app-ever', + env: 'development', + + distPaths: { + appJsFile: '/assets/the-best-app-ever.js', + vendorJsFile: '/assets/vendor.js', + }, + + registry: setupRegistryFor('template', function(tree) { + return new Funnel(tree, { + getDestinationPath(relativePath) { + return relativePath.replace(/hbs$/g, 'js'); }, - ], + }); + }), + + additionalAssetPaths: [ + { + src: 'vendor/font-awesome/fonts', + file: 'FontAwesome.otf', + dest: 'fonts', + }, + { + src: 'vendor/font-awesome/fonts', + file: 'FontAwesome.woff', + dest: 'fonts', + }, + ], - project, - }); + project, + }); - expect(defaultPackager._cachedProcessedAdditionalAssets).to.equal(null); + expect(defaultPackager._cachedProcessedAdditionalAssets).to.equal(null); - output = yield buildOutput(defaultPackager.importAdditionalAssets(input.path())); + output = await buildOutput(defaultPackager.importAdditionalAssets(input.path())); - expect(defaultPackager._cachedProcessedAdditionalAssets).to.not.equal(null); - expect(defaultPackager._cachedProcessedAdditionalAssets._annotation).to.equal( - 'vendor/font-awesome/fonts/{FontAwesome.otf,FontAwesome.woff} => fonts/{FontAwesome.otf,FontAwesome.woff}' - ); - }) - ); + expect(defaultPackager._cachedProcessedAdditionalAssets).to.not.equal(null); + expect(defaultPackager._cachedProcessedAdditionalAssets._annotation).to.equal( + 'vendor/font-awesome/fonts/{FontAwesome.otf,FontAwesome.woff} => fonts/{FontAwesome.otf,FontAwesome.woff}' + ); + }); - it( - 'imports additional assets properly', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', - env: 'development', + it('imports additional assets properly', async function() { + let defaultPackager = new DefaultPackager({ + name: 'the-best-app-ever', + env: 'development', - distPaths: { - appJsFile: '/assets/the-best-app-ever.js', - vendorJsFile: '/assets/vendor.js', - }, + distPaths: { + appJsFile: '/assets/the-best-app-ever.js', + vendorJsFile: '/assets/vendor.js', + }, - registry: setupRegistryFor('template', function(tree) { - return new Funnel(tree, { - getDestinationPath(relativePath) { - return relativePath.replace(/hbs$/g, 'js'); - }, - }); - }), - - additionalAssetPaths: [ - { - src: 'vendor/font-awesome/fonts', - file: 'FontAwesome.otf', - dest: 'fonts', - }, - { - src: 'vendor/font-awesome/fonts', - file: 'FontAwesome.woff', - dest: 'fonts', + registry: setupRegistryFor('template', function(tree) { + return new Funnel(tree, { + getDestinationPath(relativePath) { + return relativePath.replace(/hbs$/g, 'js'); }, - ], + }); + }), + + additionalAssetPaths: [ + { + src: 'vendor/font-awesome/fonts', + file: 'FontAwesome.otf', + dest: 'fonts', + }, + { + src: 'vendor/font-awesome/fonts', + file: 'FontAwesome.woff', + dest: 'fonts', + }, + ], - project, - }); + project, + }); - expect(defaultPackager._cachedProcessedAdditionalAssets).to.equal(null); + expect(defaultPackager._cachedProcessedAdditionalAssets).to.equal(null); - output = yield buildOutput(defaultPackager.importAdditionalAssets(input.path())); + output = await buildOutput(defaultPackager.importAdditionalAssets(input.path())); - let outputFiles = output.read(); + let outputFiles = output.read(); - expect(outputFiles).to.deep.equal({ - fonts: { - 'FontAwesome.otf': '', - 'FontAwesome.woff': '', - }, - }); - }) - ); + expect(outputFiles).to.deep.equal({ + fonts: { + 'FontAwesome.otf': '', + 'FontAwesome.woff': '', + }, + }); + }); }); diff --git a/tests/unit/broccoli/default-packager/bower-test.js b/tests/unit/broccoli/default-packager/bower-test.js index 06c8589f53..07c3bca25c 100644 --- a/tests/unit/broccoli/default-packager/bower-test.js +++ b/tests/unit/broccoli/default-packager/bower-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const expect = require('chai').expect; const DefaultPackager = require('../../../../lib/broccoli/default-packager'); const broccoliTestHelper = require('broccoli-test-helper'); @@ -29,59 +28,46 @@ describe('Default Packager: Bower', function() { }, }; - before( - co.wrap(function*() { - input = yield createTempDir(); - - input.write(BOWER_PACKAGES); - }) - ); - - after( - co.wrap(function*() { - yield input.dispose(); - }) - ); - - it( - 'caches packaged bower tree', - co.wrap(function*() { - let defaultPackager = new DefaultPackager(); - - expect(defaultPackager._cachedBower).to.equal(null); - - yield buildOutput(defaultPackager.packageBower(input.path())); - - expect(defaultPackager._cachedBower).to.not.equal(null); - expect(defaultPackager._cachedBower._annotation).to.equal('Packaged Bower'); - }) - ); - - it( - 'packages bower files with default folder', - co.wrap(function*() { - let defaultPackager = new DefaultPackager(); - - let packagedBower = yield buildOutput(defaultPackager.packageBower(input.path())); - let output = packagedBower.read(); - - expect(output).to.deep.equal({ - bower_components: BOWER_PACKAGES, - }); - }) - ); - - it( - 'packages bower files with custom folder', - co.wrap(function*() { - let defaultPackager = new DefaultPackager(); - - let packagedBower = yield buildOutput(defaultPackager.packageBower(input.path(), 'foobar')); - let output = packagedBower.read(); - - expect(output).to.deep.equal({ - foobar: BOWER_PACKAGES, - }); - }) - ); + before(async function() { + input = await createTempDir(); + + input.write(BOWER_PACKAGES); + }); + + after(async function() { + await input.dispose(); + }); + + it('caches packaged bower tree', async function() { + let defaultPackager = new DefaultPackager(); + + expect(defaultPackager._cachedBower).to.equal(null); + + await buildOutput(defaultPackager.packageBower(input.path())); + + expect(defaultPackager._cachedBower).to.not.equal(null); + expect(defaultPackager._cachedBower._annotation).to.equal('Packaged Bower'); + }); + + it('packages bower files with default folder', async function() { + let defaultPackager = new DefaultPackager(); + + let packagedBower = await buildOutput(defaultPackager.packageBower(input.path())); + let output = packagedBower.read(); + + expect(output).to.deep.equal({ + bower_components: BOWER_PACKAGES, + }); + }); + + it('packages bower files with custom folder', async function() { + let defaultPackager = new DefaultPackager(); + + let packagedBower = await buildOutput(defaultPackager.packageBower(input.path(), 'foobar')); + let output = packagedBower.read(); + + expect(output).to.deep.equal({ + foobar: BOWER_PACKAGES, + }); + }); }); diff --git a/tests/unit/broccoli/default-packager/config-test.js b/tests/unit/broccoli/default-packager/config-test.js index 60d340f86b..b6e3493aa3 100644 --- a/tests/unit/broccoli/default-packager/config-test.js +++ b/tests/unit/broccoli/default-packager/config-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const expect = require('chai').expect; const DefaultPackager = require('../../../../lib/broccoli/default-packager'); const broccoliTestHelper = require('broccoli-test-helper'); @@ -28,94 +27,79 @@ describe('Default Packager: Config', function() { }, }; - before( - co.wrap(function*() { - input = yield createTempDir(); - - input.write(CONFIG); - }) - ); - - after( - co.wrap(function*() { - yield input.dispose(); - }) - ); - - afterEach( - co.wrap(function*() { - yield output.dispose(); - }) - ); - - it( - 'caches packaged config tree', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - name, - project, - env, - }); - - expect(defaultPackager._cachedConfig).to.equal(null); - - output = yield buildOutput(defaultPackager.packageConfig()); - - expect(defaultPackager._cachedConfig).to.not.equal(null); - expect(defaultPackager._cachedConfig._annotation).to.equal('Packaged Config'); - }) - ); - - it( - 'packages config files w/ tests disabled', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - name, - project, - env, - areTestsEnabled: false, - }); - - output = yield buildOutput(defaultPackager.packageConfig()); - - let outputFiles = output.read(); - - expect(outputFiles).to.deep.equal({ - [name]: { - config: { - environments: { - 'development.json': '{"a":1}', - }, + before(async function() { + input = await createTempDir(); + + input.write(CONFIG); + }); + + after(async function() { + await input.dispose(); + }); + + afterEach(async function() { + await output.dispose(); + }); + + it('caches packaged config tree', async function() { + let defaultPackager = new DefaultPackager({ + name, + project, + env, + }); + + expect(defaultPackager._cachedConfig).to.equal(null); + + output = await buildOutput(defaultPackager.packageConfig()); + + expect(defaultPackager._cachedConfig).to.not.equal(null); + expect(defaultPackager._cachedConfig._annotation).to.equal('Packaged Config'); + }); + + it('packages config files w/ tests disabled', async function() { + let defaultPackager = new DefaultPackager({ + name, + project, + env, + areTestsEnabled: false, + }); + + output = await buildOutput(defaultPackager.packageConfig()); + + let outputFiles = output.read(); + + expect(outputFiles).to.deep.equal({ + [name]: { + config: { + environments: { + 'development.json': '{"a":1}', }, }, - }); - }) - ); - - it( - 'packages config files w/ tests enabled', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - name, - project, - env, - areTestsEnabled: true, - }); - - output = yield buildOutput(defaultPackager.packageConfig()); - - let outputFiles = output.read(); - - expect(outputFiles).to.deep.equal({ - [name]: { - config: { - environments: { - 'development.json': '{"a":1}', - 'test.json': '{"a":1}', - }, + }, + }); + }); + + it('packages config files w/ tests enabled', async function() { + let defaultPackager = new DefaultPackager({ + name, + project, + env, + areTestsEnabled: true, + }); + + output = await buildOutput(defaultPackager.packageConfig()); + + let outputFiles = output.read(); + + expect(outputFiles).to.deep.equal({ + [name]: { + config: { + environments: { + 'development.json': '{"a":1}', + 'test.json': '{"a":1}', }, }, - }); - }) - ); + }, + }); + }); }); diff --git a/tests/unit/broccoli/default-packager/ember-cli-internal-test.js b/tests/unit/broccoli/default-packager/ember-cli-internal-test.js index 8e5bfc549c..118bba29d2 100644 --- a/tests/unit/broccoli/default-packager/ember-cli-internal-test.js +++ b/tests/unit/broccoli/default-packager/ember-cli-internal-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const expect = require('chai').expect; const DefaultPackager = require('../../../../lib/broccoli/default-packager'); const broccoliTestHelper = require('broccoli-test-helper'); @@ -30,218 +29,197 @@ describe('Default Packager: Ember CLI Internal', function() { }, }; - before( - co.wrap(function*() { - input = yield createTempDir(); - - input.write(CONFIG); - }) - ); - - after( - co.wrap(function*() { - yield input.dispose(); - }) - ); - - afterEach( - co.wrap(function*() { - yield output.dispose(); - }) - ); - - it( - 'caches packaged ember cli internal tree', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - env: 'development', - name: 'the-best-app-ever', - project, - autoRun: false, - areTestsEnabled: true, - storeConfigInMeta: false, - isModuleUnificationEnabled: false, - }); - - expect(defaultPackager._cachedEmberCliInternalTree).to.equal(null); - - output = yield buildOutput(defaultPackager.packageEmberCliInternalFiles()); - - expect(defaultPackager._cachedEmberCliInternalTree).to.not.equal(null); - expect(defaultPackager._cachedEmberCliInternalTree._annotation).to.equal('Packaged Ember CLI Internal Files'); - }) - ); - - it( - 'packages internal files properly', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - env: 'development', - name: 'the-best-app-ever', - project, - autoRun: false, - areTestsEnabled: true, - storeConfigInMeta: false, - isModuleUnificationEnabled: false, - }); - - expect(defaultPackager._cachedEmberCliInternalTree).to.equal(null); - - output = yield buildOutput(defaultPackager.packageEmberCliInternalFiles()); - - let outputFiles = output.read(); - - let emberCliFiles = outputFiles.vendor['ember-cli']; - - expect(Object.keys(emberCliFiles)).to.deep.equal([ - 'app-boot.js', - 'app-config.js', - 'app-prefix.js', - 'app-suffix.js', - 'test-support-prefix.js', - 'test-support-suffix.js', - 'tests-prefix.js', - 'tests-suffix.js', - 'vendor-prefix.js', - 'vendor-suffix.js', - ]); - }) - ); - - it( - 'populates the contents of internal files correctly', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - env: 'development', - name: 'the-best-app-ever', - project, - autoRun: false, - areTestsEnabled: false, - storeConfigInMeta: false, - isModuleUnificationEnabled: false, - }); - - expect(defaultPackager._cachedEmberCliInternalTree).to.equal(null); - - output = yield buildOutput(defaultPackager.packageEmberCliInternalFiles()); - - let outputFiles = output.read(); - - let emberCliFiles = outputFiles.vendor['ember-cli']; - - let appBootFileContent = emberCliFiles['app-boot.js'].trim(); - let appConfigFileContent = emberCliFiles['app-config.js'].trim(); - let appPrefixFileContent = emberCliFiles['app-prefix.js'].trim(); - let appSuffixFileContent = emberCliFiles['app-suffix.js'].trim(); - - let testPrefixFileContent = emberCliFiles['tests-prefix.js'].trim(); - let testSuffixFileContent = emberCliFiles['tests-suffix.js'].trim(); - let testSupportPrefixFileContent = emberCliFiles['test-support-prefix.js'].trim(); - let testSupportSuffixFileContent = emberCliFiles['test-support-suffix.js'].trim(); - - let vendorPrefixFileContent = emberCliFiles['vendor-prefix.js'].trim(); - let vendorSuffixFileContent = emberCliFiles['vendor-suffix.js'].trim(); - - expect(appBootFileContent).to.equal(''); - expect(appConfigFileContent).to.contain(`'default': {"modulePrefix":"the-best-app-ever"}`); - expect(appPrefixFileContent).to.contain(`'use strict';`); - expect(appSuffixFileContent).to.equal(''); - - expect(testPrefixFileContent).to.contain(`'use strict';`); - expect(testSuffixFileContent).to.contain( - `require('the-best-app-ever/tests/test-helper');\nEmberENV.TESTS_FILE_LOADED = true;` - ); - expect(testSupportPrefixFileContent).to.equal(''); - expect(testSupportSuffixFileContent).to.contain( - 'runningTests = true;\n\nif (window.Testem) {\n window.Testem.hookIntoTestFramework();\n}' - ); - - expect(vendorPrefixFileContent).to.contain( - 'window.EmberENV = (function(EmberENV, extra) {\n for (var key in extra) {\n EmberENV[key] = extra[key];\n }\n\n return EmberENV;\n})(window.EmberENV || {}, {});\n\nvar runningTests = false;' - ); - expect(vendorSuffixFileContent).to.equal(''); - }) - ); - - it( - 'populates the contents of internal files correctly when `storeConfigInMeta` is enabled', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - env: 'development', - name: 'the-best-app-ever', - project, - autoRun: false, - areTestsEnabled: true, - storeConfigInMeta: true, - isModuleUnificationEnabled: false, - }); - - expect(defaultPackager._cachedEmberCliInternalTree).to.equal(null); - - output = yield buildOutput(defaultPackager.packageEmberCliInternalFiles()); - - let outputFiles = output.read(); - - let emberCliFiles = outputFiles.vendor['ember-cli']; - let appConfigFileContent = emberCliFiles['app-config.js'].trim(); - - expect(appConfigFileContent).to.contain(`var rawConfig = document.querySelector(`); - expect(appConfigFileContent).to.contain(`var config = JSON.parse(decodeURIComponent(rawConfig));`); - }) - ); - - it( - 'populates the contents of internal files correctly, including content from add-ons', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - env: 'development', - name: 'the-best-app-ever', - project: { - addons: [ - { - contentFor(type) { - if (type === 'app-prefix') { - return 'CUSTOM APP PREFIX CODE'; - } - }, + before(async function() { + input = await createTempDir(); + + input.write(CONFIG); + }); + + after(async function() { + await input.dispose(); + }); + + afterEach(async function() { + await output.dispose(); + }); + + it('caches packaged ember cli internal tree', async function() { + let defaultPackager = new DefaultPackager({ + env: 'development', + name: 'the-best-app-ever', + project, + autoRun: false, + areTestsEnabled: true, + storeConfigInMeta: false, + isModuleUnificationEnabled: false, + }); + + expect(defaultPackager._cachedEmberCliInternalTree).to.equal(null); + + output = await buildOutput(defaultPackager.packageEmberCliInternalFiles()); + + expect(defaultPackager._cachedEmberCliInternalTree).to.not.equal(null); + expect(defaultPackager._cachedEmberCliInternalTree._annotation).to.equal('Packaged Ember CLI Internal Files'); + }); + + it('packages internal files properly', async function() { + let defaultPackager = new DefaultPackager({ + env: 'development', + name: 'the-best-app-ever', + project, + autoRun: false, + areTestsEnabled: true, + storeConfigInMeta: false, + isModuleUnificationEnabled: false, + }); + + expect(defaultPackager._cachedEmberCliInternalTree).to.equal(null); + + output = await buildOutput(defaultPackager.packageEmberCliInternalFiles()); + + let outputFiles = output.read(); + + let emberCliFiles = outputFiles.vendor['ember-cli']; + + expect(Object.keys(emberCliFiles)).to.deep.equal([ + 'app-boot.js', + 'app-config.js', + 'app-prefix.js', + 'app-suffix.js', + 'test-support-prefix.js', + 'test-support-suffix.js', + 'tests-prefix.js', + 'tests-suffix.js', + 'vendor-prefix.js', + 'vendor-suffix.js', + ]); + }); + + it('populates the contents of internal files correctly', async function() { + let defaultPackager = new DefaultPackager({ + env: 'development', + name: 'the-best-app-ever', + project, + autoRun: false, + areTestsEnabled: false, + storeConfigInMeta: false, + isModuleUnificationEnabled: false, + }); + + expect(defaultPackager._cachedEmberCliInternalTree).to.equal(null); + + output = await buildOutput(defaultPackager.packageEmberCliInternalFiles()); + + let outputFiles = output.read(); + + let emberCliFiles = outputFiles.vendor['ember-cli']; + + let appBootFileContent = emberCliFiles['app-boot.js'].trim(); + let appConfigFileContent = emberCliFiles['app-config.js'].trim(); + let appPrefixFileContent = emberCliFiles['app-prefix.js'].trim(); + let appSuffixFileContent = emberCliFiles['app-suffix.js'].trim(); + + let testPrefixFileContent = emberCliFiles['tests-prefix.js'].trim(); + let testSuffixFileContent = emberCliFiles['tests-suffix.js'].trim(); + let testSupportPrefixFileContent = emberCliFiles['test-support-prefix.js'].trim(); + let testSupportSuffixFileContent = emberCliFiles['test-support-suffix.js'].trim(); + + let vendorPrefixFileContent = emberCliFiles['vendor-prefix.js'].trim(); + let vendorSuffixFileContent = emberCliFiles['vendor-suffix.js'].trim(); + + expect(appBootFileContent).to.equal(''); + expect(appConfigFileContent).to.contain(`'default': {"modulePrefix":"the-best-app-ever"}`); + expect(appPrefixFileContent).to.contain(`'use strict';`); + expect(appSuffixFileContent).to.equal(''); + + expect(testPrefixFileContent).to.contain(`'use strict';`); + expect(testSuffixFileContent).to.contain( + `require('the-best-app-ever/tests/test-helper');\nEmberENV.TESTS_FILE_LOADED = true;` + ); + expect(testSupportPrefixFileContent).to.equal(''); + expect(testSupportSuffixFileContent).to.contain( + 'runningTests = true;\n\nif (window.Testem) {\n window.Testem.hookIntoTestFramework();\n}' + ); + + expect(vendorPrefixFileContent).to.contain( + 'window.EmberENV = (function(EmberENV, extra) {\n for (var key in extra) {\n EmberENV[key] = extra[key];\n }\n\n return EmberENV;\n})(window.EmberENV || {}, {});\n\nvar runningTests = false;' + ); + expect(vendorSuffixFileContent).to.equal(''); + }); + + it('populates the contents of internal files correctly when `storeConfigInMeta` is enabled', async function() { + let defaultPackager = new DefaultPackager({ + env: 'development', + name: 'the-best-app-ever', + project, + autoRun: false, + areTestsEnabled: true, + storeConfigInMeta: true, + isModuleUnificationEnabled: false, + }); + + expect(defaultPackager._cachedEmberCliInternalTree).to.equal(null); + + output = await buildOutput(defaultPackager.packageEmberCliInternalFiles()); + + let outputFiles = output.read(); + + let emberCliFiles = outputFiles.vendor['ember-cli']; + let appConfigFileContent = emberCliFiles['app-config.js'].trim(); + + expect(appConfigFileContent).to.contain(`var rawConfig = document.querySelector(`); + expect(appConfigFileContent).to.contain(`var config = JSON.parse(decodeURIComponent(rawConfig));`); + }); + + it('populates the contents of internal files correctly, including content from add-ons', async function() { + let defaultPackager = new DefaultPackager({ + env: 'development', + name: 'the-best-app-ever', + project: { + addons: [ + { + contentFor(type) { + if (type === 'app-prefix') { + return 'CUSTOM APP PREFIX CODE'; + } }, - { - contentFor(type) { - if (type === 'app-boot') { - return 'CUSTOM APP BOOT CODE'; - } - }, + }, + { + contentFor(type) { + if (type === 'app-boot') { + return 'CUSTOM APP BOOT CODE'; + } }, - ], - - configPath() { - return `${input.path()}/config/environment`; }, + ], - config() { - return { - modulePrefix: 'the-best-app-ever', - }; - }, + configPath() { + return `${input.path()}/config/environment`; + }, + + config() { + return { + modulePrefix: 'the-best-app-ever', + }; }, - autoRun: false, - areTestsEnabled: true, - storeConfigInMeta: false, - isModuleUnificationEnabled: false, - }); + }, + autoRun: false, + areTestsEnabled: true, + storeConfigInMeta: false, + isModuleUnificationEnabled: false, + }); - expect(defaultPackager._cachedEmberCliInternalTree).to.equal(null); + expect(defaultPackager._cachedEmberCliInternalTree).to.equal(null); - output = yield buildOutput(defaultPackager.packageEmberCliInternalFiles()); + output = await buildOutput(defaultPackager.packageEmberCliInternalFiles()); - let outputFiles = output.read(); + let outputFiles = output.read(); - let emberCliFiles = outputFiles.vendor['ember-cli']; - let appBootFileContent = emberCliFiles['app-boot.js'].trim(); - let appPrefixFileContent = emberCliFiles['app-prefix.js'].trim(); + let emberCliFiles = outputFiles.vendor['ember-cli']; + let appBootFileContent = emberCliFiles['app-boot.js'].trim(); + let appPrefixFileContent = emberCliFiles['app-prefix.js'].trim(); - expect(appBootFileContent).to.equal('CUSTOM APP BOOT CODE'); - expect(appPrefixFileContent).to.equal(`'use strict';\n\nCUSTOM APP PREFIX CODE`); - }) - ); + expect(appBootFileContent).to.equal('CUSTOM APP BOOT CODE'); + expect(appPrefixFileContent).to.equal(`'use strict';\n\nCUSTOM APP PREFIX CODE`); + }); }); diff --git a/tests/unit/broccoli/default-packager/external-test.js b/tests/unit/broccoli/default-packager/external-test.js index c6200c5673..736d9c4cfb 100644 --- a/tests/unit/broccoli/default-packager/external-test.js +++ b/tests/unit/broccoli/default-packager/external-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const expect = require('chai').expect; const DefaultPackager = require('../../../../lib/broccoli/default-packager'); const broccoliTestHelper = require('broccoli-test-helper'); @@ -21,69 +20,60 @@ describe('Default Packager: External', function() { }, }; - before( - co.wrap(function*() { - input = yield createTempDir(); - - input.write(EXTERNAL); - }) - ); - - after( - co.wrap(function*() { - yield input.dispose(); - }) - ); - - afterEach( - co.wrap(function*() { - yield output.dispose(); - }) - ); - - it( - 'applies transforms to an external tree', - co.wrap(function*() { - let customTransformsMap = new Map(); - - customTransformsMap.set('amd', { - files: ['vendor/auth0-js.js', 'vendor/auth0-lock.js', 'vendor/auth0-lock-passwordless.js'], - callback(tree, options) { - const stew = require('broccoli-stew'); - - return stew.map(tree, (content, relativePath) => { - const name = options[relativePath].as; - - return `${name} was transformed`; - }); + before(async function() { + input = await createTempDir(); + + input.write(EXTERNAL); + }); + + after(async function() { + await input.dispose(); + }); + + afterEach(async function() { + await output.dispose(); + }); + + it('applies transforms to an external tree', async function() { + let customTransformsMap = new Map(); + + customTransformsMap.set('amd', { + files: ['vendor/auth0-js.js', 'vendor/auth0-lock.js', 'vendor/auth0-lock-passwordless.js'], + callback(tree, options) { + const stew = require('broccoli-stew'); + + return stew.map(tree, (content, relativePath) => { + const name = options[relativePath].as; + + return `${name} was transformed`; + }); + }, + processOptions() {}, + options: { + 'vendor/auth0-js.js': { + as: 'auth0', + }, + 'vendor/auth0-lock-passwordless.js': { + as: 'auth0-lock-passwordless', }, - processOptions() {}, - options: { - 'vendor/auth0-js.js': { - as: 'auth0', - }, - 'vendor/auth0-lock-passwordless.js': { - as: 'auth0-lock-passwordless', - }, - 'vendor/auth0-lock.js': { - as: 'auth0-lock', - }, + 'vendor/auth0-lock.js': { + as: 'auth0-lock', }, - }); + }, + }); - let defaultPackager = new DefaultPackager({ - customTransformsMap, - }); + let defaultPackager = new DefaultPackager({ + customTransformsMap, + }); - output = yield buildOutput(defaultPackager.applyCustomTransforms(input.path())); + output = await buildOutput(defaultPackager.applyCustomTransforms(input.path())); - let outputFiles = output.read(); + let outputFiles = output.read(); - expect(outputFiles.vendor).to.deep.equal({ - 'auth0-js.js': 'auth0 was transformed', - 'auth0-lock.js': 'auth0-lock was transformed', - 'auth0-lock-passwordless.js': 'auth0-lock-passwordless was transformed', - }); - }) - ); + expect(outputFiles.vendor).to.deep.equal({ + 'auth0-js.js': 'auth0 was transformed', + 'auth0-lock.js': 'auth0-lock was transformed', + 'auth0-lock-passwordless.js': 'auth0-lock-passwordless was transformed', + }); + }); }); diff --git a/tests/unit/broccoli/default-packager/index-test.js b/tests/unit/broccoli/default-packager/index-test.js index 5e3f94b376..9aaa9428c7 100644 --- a/tests/unit/broccoli/default-packager/index-test.js +++ b/tests/unit/broccoli/default-packager/index-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const expect = require('chai').expect; const DefaultPackager = require('../../../../lib/broccoli/default-packager'); const broccoliTestHelper = require('broccoli-test-helper'); @@ -30,240 +29,213 @@ describe('Default Packager: Index', function() { let META_TAG = '/best-url-ever/\n'; - before( - co.wrap(function*() { - input = yield createTempDir(); + before(async function() { + input = await createTempDir(); - let indexContent = ` + let indexContent = ` {{rootURL}}{{content-for "head"}} {{content-for "head-footer"}} {{content-for "body"}} {{content-for "body-footer"}} `; - input.write({ - 'addon-tree-output': {}, - 'the-best-app-ever': { - 'router.js': 'router.js', - 'app.js': 'app.js', - 'index.html': indexContent, - config: { - 'environment.js': 'environment.js', - }, - templates: {}, - }, - }); - }) - ); - - after( - co.wrap(function*() { - yield input.dispose(); - }) - ); - - afterEach( - co.wrap(function*() { - yield output.dispose(); - }) - ); - - it( - 'caches processed index tree', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', - env: 'development', - - autoRun: true, - storeConfigInMeta: true, - isModuleUnificationEnabled: false, - areTestsEnabled: true, - - distPaths: { - appHtmlFile: 'index.html', + input.write({ + 'addon-tree-output': {}, + 'the-best-app-ever': { + 'router.js': 'router.js', + 'app.js': 'app.js', + 'index.html': indexContent, + config: { + 'environment.js': 'environment.js', }, + templates: {}, + }, + }); + }); - project, - }); + after(async function() { + await input.dispose(); + }); - expect(defaultPackager._cachedProcessedIndex).to.equal(null); + afterEach(async function() { + await output.dispose(); + }); - output = yield buildOutput(defaultPackager.processIndex(input.path())); + it('caches processed index tree', async function() { + let defaultPackager = new DefaultPackager({ + name: 'the-best-app-ever', + env: 'development', - expect(defaultPackager._cachedProcessedIndex).to.not.equal(null); - }) - ); + autoRun: true, + storeConfigInMeta: true, + isModuleUnificationEnabled: false, + areTestsEnabled: true, - it( - 'works with a custom path', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', - env: 'development', + distPaths: { + appHtmlFile: 'index.html', + }, - autoRun: true, - storeConfigInMeta: true, - isModuleUnificationEnabled: false, - areTestsEnabled: true, + project, + }); - distPaths: { - appHtmlFile: 'custom/index.html', - }, + expect(defaultPackager._cachedProcessedIndex).to.equal(null); - project, - }); + output = await buildOutput(defaultPackager.processIndex(input.path())); - expect(defaultPackager._cachedProcessedIndex).to.equal(null); + expect(defaultPackager._cachedProcessedIndex).to.not.equal(null); + }); - output = yield buildOutput(defaultPackager.processIndex(input.path())); + it('works with a custom path', async function() { + let defaultPackager = new DefaultPackager({ + name: 'the-best-app-ever', + env: 'development', - let outputFiles = output.read(); - let indexContent = decodeURIComponent(outputFiles.custom['index.html'].trim()); + autoRun: true, + storeConfigInMeta: true, + isModuleUnificationEnabled: false, + areTestsEnabled: true, - expect(indexContent).to.equal(META_TAG); - }) - ); + distPaths: { + appHtmlFile: 'custom/index.html', + }, - it( - 'populates `index.html` according to settings', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', - env: 'development', + project, + }); - autoRun: true, - storeConfigInMeta: true, - isModuleUnificationEnabled: false, - areTestsEnabled: true, + expect(defaultPackager._cachedProcessedIndex).to.equal(null); - distPaths: { - appHtmlFile: 'index.html', - }, + output = await buildOutput(defaultPackager.processIndex(input.path())); - project, - }); + let outputFiles = output.read(); + let indexContent = decodeURIComponent(outputFiles.custom['index.html'].trim()); + + expect(indexContent).to.equal(META_TAG); + }); + + it('populates `index.html` according to settings', async function() { + let defaultPackager = new DefaultPackager({ + name: 'the-best-app-ever', + env: 'development', + + autoRun: true, + storeConfigInMeta: true, + isModuleUnificationEnabled: false, + areTestsEnabled: true, + + distPaths: { + appHtmlFile: 'index.html', + }, + + project, + }); - expect(defaultPackager._cachedProcessedIndex).to.equal(null); + expect(defaultPackager._cachedProcessedIndex).to.equal(null); - output = yield buildOutput(defaultPackager.processIndex(input.path())); + output = await buildOutput(defaultPackager.processIndex(input.path())); - let outputFiles = output.read(); - let indexContent = decodeURIComponent(outputFiles['index.html'].trim()); + let outputFiles = output.read(); + let indexContent = decodeURIComponent(outputFiles['index.html'].trim()); - expect(indexContent).to.equal(META_TAG); - }) - ); + expect(indexContent).to.equal(META_TAG); + }); if (isExperimentEnabled('MODULE_UNIFICATION')) { describe('with module unification', function() { let input, output; - before( - co.wrap(function*() { - input = yield createTempDir(); + before(async function() { + input = await createTempDir(); - let indexContent = ` + let indexContent = ` {{rootURL}}{{content-for "head"}} {{content-for "head-footer"}} {{content-for "body"}} {{content-for "body-footer"}} `; - input.write({ - 'addon-tree-output': {}, - 'the-best-app-ever': { - 'router.js': 'router.js', - 'app.js': 'app.js', - 'index.html': indexContent, - config: { - 'environment.js': 'environment.js', - }, - templates: {}, + input.write({ + 'addon-tree-output': {}, + 'the-best-app-ever': { + 'router.js': 'router.js', + 'app.js': 'app.js', + 'index.html': indexContent, + config: { + 'environment.js': 'environment.js', }, - src: { - ui: { - 'index.html': 'src', - }, - }, - }); - }) - ); - - after( - co.wrap(function*() { - yield input.dispose(); - }) - ); - - afterEach( - co.wrap(function*() { - yield output.dispose(); - }) - ); - - it( - 'prefers `src/ui/index.html` over `app/index.html`', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', - env: 'development', - - autoRun: true, - storeConfigInMeta: true, - isModuleUnificationEnabled: true, - areTestsEnabled: true, - - distPaths: { - appHtmlFile: 'index.html', + templates: {}, + }, + src: { + ui: { + 'index.html': 'src', }, + }, + }); + }); - project, - }); + after(async function() { + await input.dispose(); + }); - output = yield buildOutput(defaultPackager.processIndex(input.path())); + afterEach(async function() { + await output.dispose(); + }); - let outputFiles = output.read(); - let indexContent = decodeURIComponent(outputFiles['index.html'].trim()); + it('prefers `src/ui/index.html` over `app/index.html`', async function() { + let defaultPackager = new DefaultPackager({ + name: 'the-best-app-ever', + env: 'development', - expect(indexContent).to.equal('src'); - }) - ); + autoRun: true, + storeConfigInMeta: true, + isModuleUnificationEnabled: true, + areTestsEnabled: true, - it( - 'works if only `src/ui/index.html` exists', - co.wrap(function*() { - input.dispose(); - input.write({ - 'addon-tree-output': {}, - src: { - ui: { - 'index.html': 'src', - }, - }, - }); - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', - env: 'development', - - autoRun: true, - storeConfigInMeta: true, - isModuleUnificationEnabled: true, - areTestsEnabled: true, - - distPaths: { - appHtmlFile: 'index.html', + distPaths: { + appHtmlFile: 'index.html', + }, + + project, + }); + + output = await buildOutput(defaultPackager.processIndex(input.path())); + + let outputFiles = output.read(); + let indexContent = decodeURIComponent(outputFiles['index.html'].trim()); + + expect(indexContent).to.equal('src'); + }); + + it('works if only `src/ui/index.html` exists', async function() { + input.dispose(); + input.write({ + 'addon-tree-output': {}, + src: { + ui: { + 'index.html': 'src', }, + }, + }); + let defaultPackager = new DefaultPackager({ + name: 'the-best-app-ever', + env: 'development', + + autoRun: true, + storeConfigInMeta: true, + isModuleUnificationEnabled: true, + areTestsEnabled: true, + + distPaths: { + appHtmlFile: 'index.html', + }, - project, - }); + project, + }); - output = yield buildOutput(defaultPackager.processIndex(input.path())); + output = await buildOutput(defaultPackager.processIndex(input.path())); - let outputFiles = output.read(); - let indexContent = decodeURIComponent(outputFiles['index.html'].trim()); + let outputFiles = output.read(); + let indexContent = decodeURIComponent(outputFiles['index.html'].trim()); - expect(indexContent).to.equal('src'); - }) - ); + expect(indexContent).to.equal('src'); + }); }); } }); diff --git a/tests/unit/broccoli/default-packager/javascript-test.js b/tests/unit/broccoli/default-packager/javascript-test.js index f9a01c14f3..e9e1770327 100644 --- a/tests/unit/broccoli/default-packager/javascript-test.js +++ b/tests/unit/broccoli/default-packager/javascript-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const expect = require('chai').expect; const Funnel = require('broccoli-funnel'); const DefaultPackager = require('../../../../lib/broccoli/default-packager'); @@ -105,217 +104,196 @@ describe('Default Packager: Javascript', function() { addons: [], }; - before( - co.wrap(function*() { - input = yield createTempDir(); - - input.write(MODULES); - }) - ); - - after( - co.wrap(function*() { - yield input.dispose(); - }) - ); - - afterEach( - co.wrap(function*() { - yield output.dispose(); - }) - ); - - it( - 'caches packaged javascript tree', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', - env: 'development', + before(async function() { + input = await createTempDir(); - distPaths: { - appJsFile: '/assets/the-best-app-ever.js', - vendorJsFile: '/assets/vendor.js', - }, + input.write(MODULES); + }); - registry: setupRegistryFor('template', function(tree) { - return new Funnel(tree, { - getDestinationPath(relativePath) { - return relativePath.replace(/hbs$/g, 'js'); - }, - }); - }), + after(async function() { + await input.dispose(); + }); - customTransformsMap: new Map(), + afterEach(async function() { + await output.dispose(); + }); - scriptOutputFiles, - project, - }); + it('caches packaged javascript tree', async function() { + let defaultPackager = new DefaultPackager({ + name: 'the-best-app-ever', + env: 'development', - expect(defaultPackager._cachedJavascript).to.equal(null); + distPaths: { + appJsFile: '/assets/the-best-app-ever.js', + vendorJsFile: '/assets/vendor.js', + }, - output = yield buildOutput(defaultPackager.packageJavascript(input.path())); + registry: setupRegistryFor('template', function(tree) { + return new Funnel(tree, { + getDestinationPath(relativePath) { + return relativePath.replace(/hbs$/g, 'js'); + }, + }); + }), - expect(defaultPackager._cachedJavascript).to.not.equal(null); - expect(defaultPackager._cachedJavascript._annotation).to.equal('Packaged Javascript'); - }) - ); + customTransformsMap: new Map(), - it( - 'packages javascript files with sourcemaps on', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', - env: 'development', + scriptOutputFiles, + project, + }); - distPaths: { - appJsFile: '/assets/the-best-app-ever.js', - vendorJsFile: '/assets/vendor.js', - }, + expect(defaultPackager._cachedJavascript).to.equal(null); - registry: setupRegistryFor('template', function(tree) { - return new Funnel(tree, { - getDestinationPath(relativePath) { - return relativePath.replace(/hbs$/g, 'js'); - }, - }); - }), + output = await buildOutput(defaultPackager.packageJavascript(input.path())); - customTransformsMap: new Map(), + expect(defaultPackager._cachedJavascript).to.not.equal(null); + expect(defaultPackager._cachedJavascript._annotation).to.equal('Packaged Javascript'); + }); - scriptOutputFiles, - project, - }); + it('packages javascript files with sourcemaps on', async function() { + let defaultPackager = new DefaultPackager({ + name: 'the-best-app-ever', + env: 'development', - output = yield buildOutput(defaultPackager.packageJavascript(input.path())); + distPaths: { + appJsFile: '/assets/the-best-app-ever.js', + vendorJsFile: '/assets/vendor.js', + }, - let outputFiles = output.read(); + registry: setupRegistryFor('template', function(tree) { + return new Funnel(tree, { + getDestinationPath(relativePath) { + return relativePath.replace(/hbs$/g, 'js'); + }, + }); + }), - expect(Object.keys(outputFiles.assets)).to.deep.equal([ - 'the-best-app-ever.js', - 'the-best-app-ever.map', - 'vendor.js', - 'vendor.map', - ]); - }) - ); + customTransformsMap: new Map(), - it( - 'packages javascript files with sourcemaps off', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', - env: 'development', + scriptOutputFiles, + project, + }); - distPaths: { - appJsFile: '/assets/the-best-app-ever.js', - vendorJsFile: '/assets/vendor.js', - }, + output = await buildOutput(defaultPackager.packageJavascript(input.path())); - registry: setupRegistryFor('template', function(tree) { - return new Funnel(tree, { - getDestinationPath(relativePath) { - return relativePath.replace(/hbs$/g, 'js'); - }, - }); - }), + let outputFiles = output.read(); - sourcemaps: { - enabled: false, - }, + expect(Object.keys(outputFiles.assets)).to.deep.equal([ + 'the-best-app-ever.js', + 'the-best-app-ever.map', + 'vendor.js', + 'vendor.map', + ]); + }); - customTransformsMap: new Map(), + it('packages javascript files with sourcemaps off', async function() { + let defaultPackager = new DefaultPackager({ + name: 'the-best-app-ever', + env: 'development', - scriptOutputFiles, - project, - }); + distPaths: { + appJsFile: '/assets/the-best-app-ever.js', + vendorJsFile: '/assets/vendor.js', + }, - output = yield buildOutput(defaultPackager.packageJavascript(input.path())); + registry: setupRegistryFor('template', function(tree) { + return new Funnel(tree, { + getDestinationPath(relativePath) { + return relativePath.replace(/hbs$/g, 'js'); + }, + }); + }), - let outputFiles = output.read(); + sourcemaps: { + enabled: false, + }, - expect(Object.keys(outputFiles.assets)).to.deep.equal(['the-best-app-ever.js', 'vendor.js']); - }) - ); + customTransformsMap: new Map(), - it( - 'processes javascript according to the registry', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', + scriptOutputFiles, + project, + }); - registry: setupRegistryFor('js', function(tree) { - return new Funnel(tree, { - getDestinationPath(relativePath) { - return relativePath.replace(/js/g, 'jsx'); - }, - }); - }), + output = await buildOutput(defaultPackager.packageJavascript(input.path())); - project: { addons: [] }, - }); + let outputFiles = output.read(); - expect(defaultPackager._cachedProcessedJavascript).to.equal(null); + expect(Object.keys(outputFiles.assets)).to.deep.equal(['the-best-app-ever.js', 'vendor.js']); + }); - output = yield buildOutput(defaultPackager.processJavascript(input.path())); + it('processes javascript according to the registry', async function() { + let defaultPackager = new DefaultPackager({ + name: 'the-best-app-ever', - let outputFiles = output.read(); + registry: setupRegistryFor('js', function(tree) { + return new Funnel(tree, { + getDestinationPath(relativePath) { + return relativePath.replace(/js/g, 'jsx'); + }, + }); + }), - expect(outputFiles['the-best-app-ever']).to.deep.equal({ - 'app.jsx': 'app.js', - components: { - 'x-foo.jsx': 'export default class {}', - }, - routes: { - 'application.jsx': 'export default class {}', - }, - config: { - 'environment.jsx': 'environment.js', - }, - 'router.jsx': 'router.js', - }); - }) - ); + project: { addons: [] }, + }); - it( - 'runs pre/post-process add-on hooks', - co.wrap(function*() { - let addonPreprocessTreeHookCalled = false; - let addonPostprocessTreeHookCalled = false; + expect(defaultPackager._cachedProcessedJavascript).to.equal(null); - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', + output = await buildOutput(defaultPackager.processJavascript(input.path())); - registry: setupRegistryFor('js', tree => tree), + let outputFiles = output.read(); - // avoid using `testdouble.js` here on purpose; it does not have a "proxy" - // option, where a function call would be registered and the original - // would be returned - project: { - addons: [ - { - preprocessTree(type, tree) { - addonPreprocessTreeHookCalled = true; + expect(outputFiles['the-best-app-ever']).to.deep.equal({ + 'app.jsx': 'app.js', + components: { + 'x-foo.jsx': 'export default class {}', + }, + routes: { + 'application.jsx': 'export default class {}', + }, + config: { + 'environment.jsx': 'environment.js', + }, + 'router.jsx': 'router.js', + }); + }); - return tree; - }, - postprocessTree(type, tree) { - addonPostprocessTreeHookCalled = true; + it('runs pre/post-process add-on hooks', async function() { + let addonPreprocessTreeHookCalled = false; + let addonPostprocessTreeHookCalled = false; - return tree; - }, + let defaultPackager = new DefaultPackager({ + name: 'the-best-app-ever', + + registry: setupRegistryFor('js', tree => tree), + + // avoid using `testdouble.js` here on purpose; it does not have a "proxy" + // option, where a function call would be registered and the original + // would be returned + project: { + addons: [ + { + preprocessTree(type, tree) { + addonPreprocessTreeHookCalled = true; + + return tree; }, - ], - }, - }); + postprocessTree(type, tree) { + addonPostprocessTreeHookCalled = true; - expect(defaultPackager._cachedProcessedJavascript).to.equal(null); + return tree; + }, + }, + ], + }, + }); - output = yield buildOutput(defaultPackager.processJavascript(input.path())); + expect(defaultPackager._cachedProcessedJavascript).to.equal(null); - expect(addonPreprocessTreeHookCalled).to.equal(true); - expect(addonPostprocessTreeHookCalled).to.equal(true); - }) - ); + output = await buildOutput(defaultPackager.processJavascript(input.path())); + + expect(addonPreprocessTreeHookCalled).to.equal(true); + expect(addonPostprocessTreeHookCalled).to.equal(true); + }); }); if (isExperimentEnabled('MODULE_UNIFICATION')) { @@ -356,135 +334,123 @@ if (isExperimentEnabled('MODULE_UNIFICATION')) { }, }, }; - before( - co.wrap(function*() { - inputMU = yield createTempDir(); - - inputMU.write(MU_LAYOUT); - }) - ); - - after( - co.wrap(function*() { - yield inputMU.dispose(); - }) - ); - - afterEach( - co.wrap(function*() { - yield outputMU.dispose(); - }) - ); - - it( - 'processes javascript according to the registry', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', - - distPaths: { - appJsFile: '/assets/the-best-app-ever.js', - appCssFile: '/assets/the-best-app-ever.css', - vendorJsFile: '/assets/vendor.js', - }, + before(async function() { + inputMU = await createTempDir(); + + inputMU.write(MU_LAYOUT); + }); + + after(async function() { + await inputMU.dispose(); + }); + + afterEach(async function() { + await outputMU.dispose(); + }); + + it('processes javascript according to the registry', async function() { + let defaultPackager = new DefaultPackager({ + name: 'the-best-app-ever', + + distPaths: { + appJsFile: '/assets/the-best-app-ever.js', + appCssFile: '/assets/the-best-app-ever.css', + vendorJsFile: '/assets/vendor.js', + }, + + registry: setupRegistry({ + js: tree => tree, + }), + + isModuleUnificationEnabled: true, - registry: setupRegistry({ - js: tree => tree, - }), - - isModuleUnificationEnabled: true, - - // avoid using `testdouble.js` here on purpose; it does not have a "proxy" - // option, where a function call would be registered and the original - // would be returned - project: { - addons: [ - { - preprocessTree(type, tree) { - expect(type).to.equal('src'); - return tree; - }, - postprocessTree(type, tree) { - expect(type).to.equal('src'); - return tree; - }, + // avoid using `testdouble.js` here on purpose; it does not have a "proxy" + // option, where a function call would be registered and the original + // would be returned + project: { + addons: [ + { + preprocessTree(type, tree) { + expect(type).to.equal('src'); + return tree; }, - ], - }, - }); + postprocessTree(type, tree) { + expect(type).to.equal('src'); + return tree; + }, + }, + ], + }, + }); - expect(defaultPackager._cachedProcessedSrc).to.equal(null); + expect(defaultPackager._cachedProcessedSrc).to.equal(null); - outputMU = yield buildOutput(defaultPackager.processJavascriptSrc(inputMU.path())); + outputMU = await buildOutput(defaultPackager.processJavascriptSrc(inputMU.path())); - let outputFiles = outputMU.read(); + let outputFiles = outputMU.read(); - expect(outputFiles['the-best-app-ever']).to.deep.equal({ - src: { - 'main.js': '', - 'resolver.js': '', - 'router.js': '', - ui: { - components: { - 'login-form': { - 'component.js': '', - }, + expect(outputFiles['the-best-app-ever']).to.deep.equal({ + src: { + 'main.js': '', + 'resolver.js': '', + 'router.js': '', + ui: { + components: { + 'login-form': { + 'component.js': '', }, }, }, - }); - }) - ); - - it( - 'runs pre/post-process add-on hooks', - co.wrap(function*() { - addonPreprocessTreeHookCalled = false; - addonPostprocessTreeHookCalled = false; - - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', - - distPaths: { - appJsFile: '/assets/the-best-app-ever.js', - appCssFile: '/assets/the-best-app-ever.css', - vendorJsFile: '/assets/vendor.js', - }, + }, + }); + }); - registry: setupRegistry({ - js: tree => tree, - }), - - isModuleUnificationEnabled: true, - - // avoid using `testdouble.js` here on purpose; it does not have a "proxy" - // option, where a function call would be registered and the original - // would be returned - project: { - addons: [ - { - preprocessTree(type, tree) { - expect(type).to.equal('src'); - addonPreprocessTreeHookCalled = true; - - return tree; - }, - postprocessTree(type, tree) { - expect(type).to.equal('src'); - addonPostprocessTreeHookCalled = true; - - return tree; - }, + it('runs pre/post-process add-on hooks', async function() { + addonPreprocessTreeHookCalled = false; + addonPostprocessTreeHookCalled = false; + + let defaultPackager = new DefaultPackager({ + name: 'the-best-app-ever', + + distPaths: { + appJsFile: '/assets/the-best-app-ever.js', + appCssFile: '/assets/the-best-app-ever.css', + vendorJsFile: '/assets/vendor.js', + }, + + registry: setupRegistry({ + js: tree => tree, + }), + + isModuleUnificationEnabled: true, + + // avoid using `testdouble.js` here on purpose; it does not have a "proxy" + // option, where a function call would be registered and the original + // would be returned + project: { + addons: [ + { + preprocessTree(type, tree) { + expect(type).to.equal('src'); + addonPreprocessTreeHookCalled = true; + + return tree; }, - ], - }, - }); + postprocessTree(type, tree) { + expect(type).to.equal('src'); + addonPostprocessTreeHookCalled = true; + + return tree; + }, + }, + ], + }, + }); - outputMU = yield buildOutput(defaultPackager.processJavascriptSrc(inputMU.path())); + outputMU = await buildOutput(defaultPackager.processJavascriptSrc(inputMU.path())); - expect(addonPreprocessTreeHookCalled).to.equal(true); - expect(addonPostprocessTreeHookCalled).to.equal(true); - }) - ); + expect(addonPreprocessTreeHookCalled).to.equal(true); + expect(addonPostprocessTreeHookCalled).to.equal(true); + }); }); } diff --git a/tests/unit/broccoli/default-packager/process-test.js b/tests/unit/broccoli/default-packager/process-test.js index 9e298a9d25..7843cdfdcf 100644 --- a/tests/unit/broccoli/default-packager/process-test.js +++ b/tests/unit/broccoli/default-packager/process-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const expect = require('chai').expect; const Funnel = require('broccoli-funnel'); const DefaultPackager = require('../../../../lib/broccoli/default-packager'); @@ -73,31 +72,101 @@ describe('Default Packager: Process Javascript', function() { ], }; - before( - co.wrap(function*() { - input = yield createTempDir(); - - input.write(MODULES); - }) - ); - - after( - co.wrap(function*() { - yield input.dispose(); - }) - ); - - afterEach( - co.wrap(function*() { - if (output) { - yield output.dispose(); - } - }) - ); - - it( - 'caches packaged application tree', - co.wrap(function*() { + before(async function() { + input = await createTempDir(); + + input.write(MODULES); + }); + + after(async function() { + await input.dispose(); + }); + + afterEach(async function() { + if (output) { + await output.dispose(); + } + }); + + it('caches packaged application tree', async function() { + let defaultPackager = new DefaultPackager({ + name: 'the-best-app-ever', + env: 'development', + + distPaths: { + appJsFile: '/assets/the-best-app-ever.js', + vendorJsFile: '/assets/vendor.js', + }, + + registry: setupRegistryFor('template', function(tree) { + return new Funnel(tree, { + getDestinationPath(relativePath) { + return relativePath.replace(/hbs$/g, 'js'); + }, + }); + }), + + customTransformsMap: new Map(), + + scriptOutputFiles, + project, + }); + + expect(defaultPackager._cachedProcessedAppAndDependencies).to.equal(null); + + output = await buildOutput(defaultPackager.processAppAndDependencies(input.path())); + + expect(defaultPackager._cachedProcessedAppAndDependencies).to.not.equal(null); + expect(defaultPackager._cachedProcessedAppAndDependencies._annotation).to.equal( + 'Processed Application and Dependencies' + ); + }); + + if (isExperimentEnabled('MODULE_UNIFICATION')) { + it('merges src with with app', async function() { + let input = await createTempDir(); + + input.write({ + 'addon-tree-output': {}, + 'the-best-app-ever': { + 'router.js': 'router.js', + 'app.js': 'app.js', + components: { + 'x-foo.js': 'export default class {}', + }, + routes: { + 'application.js': 'export default class {}', + }, + config: { + 'environment.js': 'environment.js', + }, + templates: {}, + }, + vendor: {}, + src: { + 'main.js': '', + 'resolver.js': '', + 'router.js': '', + ui: { + components: { + 'login-form': { + 'component.js': '', + 'template.hbs': '', + }, + }, + 'index.html': '', + routes: { + application: { + 'template.hbs': '', + }, + }, + styles: { + 'app.css': '', + }, + }, + }, + }); + let defaultPackager = new DefaultPackager({ name: 'the-best-app-ever', env: 'development', @@ -107,6 +176,8 @@ describe('Default Packager: Process Javascript', function() { vendorJsFile: '/assets/vendor.js', }, + isModuleUnificationEnabled: true, + registry: setupRegistryFor('template', function(tree) { return new Funnel(tree, { getDestinationPath(relativePath) { @@ -121,97 +192,13 @@ describe('Default Packager: Process Javascript', function() { project, }); - expect(defaultPackager._cachedProcessedAppAndDependencies).to.equal(null); - - output = yield buildOutput(defaultPackager.processAppAndDependencies(input.path())); - - expect(defaultPackager._cachedProcessedAppAndDependencies).to.not.equal(null); - expect(defaultPackager._cachedProcessedAppAndDependencies._annotation).to.equal( - 'Processed Application and Dependencies' - ); - }) - ); - - if (isExperimentEnabled('MODULE_UNIFICATION')) { - it( - 'merges src with with app', - co.wrap(function*() { - let input = yield createTempDir(); - - input.write({ - 'addon-tree-output': {}, - 'the-best-app-ever': { - 'router.js': 'router.js', - 'app.js': 'app.js', - components: { - 'x-foo.js': 'export default class {}', - }, - routes: { - 'application.js': 'export default class {}', - }, - config: { - 'environment.js': 'environment.js', - }, - templates: {}, - }, - vendor: {}, - src: { - 'main.js': '', - 'resolver.js': '', - 'router.js': '', - ui: { - components: { - 'login-form': { - 'component.js': '', - 'template.hbs': '', - }, - }, - 'index.html': '', - routes: { - application: { - 'template.hbs': '', - }, - }, - styles: { - 'app.css': '', - }, - }, - }, - }); - - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', - env: 'development', - - distPaths: { - appJsFile: '/assets/the-best-app-ever.js', - vendorJsFile: '/assets/vendor.js', - }, + output = await buildOutput(defaultPackager.processAppAndDependencies(input.path())); - isModuleUnificationEnabled: true, + let outputFiles = output.read(); - registry: setupRegistryFor('template', function(tree) { - return new Funnel(tree, { - getDestinationPath(relativePath) { - return relativePath.replace(/hbs$/g, 'js'); - }, - }); - }), + expect(Object.keys(outputFiles)).to.deep.equal(['addon-tree-output', 'src', 'the-best-app-ever', 'vendor']); - customTransformsMap: new Map(), - - scriptOutputFiles, - project, - }); - - output = yield buildOutput(defaultPackager.processAppAndDependencies(input.path())); - - let outputFiles = output.read(); - - expect(Object.keys(outputFiles)).to.deep.equal(['addon-tree-output', 'src', 'the-best-app-ever', 'vendor']); - - input.dispose(); - }) - ); + input.dispose(); + }); } }); diff --git a/tests/unit/broccoli/default-packager/public-test.js b/tests/unit/broccoli/default-packager/public-test.js index 56e163eb17..d7f716afee 100644 --- a/tests/unit/broccoli/default-packager/public-test.js +++ b/tests/unit/broccoli/default-packager/public-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const expect = require('chai').expect; const DefaultPackager = require('../../../../lib/broccoli/default-packager'); const broccoliTestHelper = require('broccoli-test-helper'); @@ -22,49 +21,37 @@ describe('Default Packager: Public', function() { }, }; - before( - co.wrap(function*() { - input = yield createTempDir(); + before(async function() { + input = await createTempDir(); - input.write(PUBLIC); - }) - ); + input.write(PUBLIC); + }); - after( - co.wrap(function*() { - yield input.dispose(); - }) - ); + after(async function() { + await input.dispose(); + }); - afterEach( - co.wrap(function*() { - yield output.dispose(); - }) - ); + afterEach(async function() { + await output.dispose(); + }); - it( - 'caches packaged public tree', - co.wrap(function*() { - let defaultPackager = new DefaultPackager(); + it('caches packaged public tree', async function() { + let defaultPackager = new DefaultPackager(); - expect(defaultPackager._cachedPublic).to.equal(null); + expect(defaultPackager._cachedPublic).to.equal(null); - output = yield buildOutput(defaultPackager.packagePublic(input.path())); + output = await buildOutput(defaultPackager.packagePublic(input.path())); - expect(defaultPackager._cachedPublic).to.not.equal(null); - }) - ); + expect(defaultPackager._cachedPublic).to.not.equal(null); + }); - it( - 'packages public files', - co.wrap(function*() { - let defaultPackager = new DefaultPackager(); + it('packages public files', async function() { + let defaultPackager = new DefaultPackager(); - output = yield buildOutput(defaultPackager.packagePublic(input.path())); + output = await buildOutput(defaultPackager.packagePublic(input.path())); - let outputFiles = output.read(); + let outputFiles = output.read(); - expect(outputFiles).to.deep.equal(PUBLIC.public); - }) - ); + expect(outputFiles).to.deep.equal(PUBLIC.public); + }); }); diff --git a/tests/unit/broccoli/default-packager/styles-test.js b/tests/unit/broccoli/default-packager/styles-test.js index 5504ddd324..27e9e5bab2 100644 --- a/tests/unit/broccoli/default-packager/styles-test.js +++ b/tests/unit/broccoli/default-packager/styles-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const expect = require('chai').expect; const Funnel = require('broccoli-funnel'); const { isExperimentEnabled } = require('../../../../lib/experiments'); @@ -63,343 +62,314 @@ describe('Default Packager: Styles', function() { }, }; - before( - co.wrap(function*() { - input = yield createTempDir(); - - input.write(MODULES); - }) - ); - - after( - co.wrap(function*() { - yield input.dispose(); - }) - ); - - afterEach( - co.wrap(function*() { - if (output) { - yield output.dispose(); - } - }) - ); - - it( - 'caches packaged styles tree', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', - env: 'development', + before(async function() { + input = await createTempDir(); - distPaths: { - appCssFile: '/assets/the-best-app-ever.css', - vendorCssFile: '/assets/vendor.css', - }, + input.write(MODULES); + }); - registry: setupRegistryFor('css', function(tree) { - return new Funnel(tree, { - getDestinationPath(relativePath) { - return relativePath.replace(/scss$/g, 'css'); - }, - }); - }), + after(async function() { + await input.dispose(); + }); - minifyCSS: { - enabled: true, - options: { processImport: false }, - }, + afterEach(async function() { + if (output) { + await output.dispose(); + } + }); - styleOutputFiles, + it('caches packaged styles tree', async function() { + let defaultPackager = new DefaultPackager({ + name: 'the-best-app-ever', + env: 'development', - project: { addons: [] }, - }); + distPaths: { + appCssFile: '/assets/the-best-app-ever.css', + vendorCssFile: '/assets/vendor.css', + }, - expect(defaultPackager._cachedProcessedStyles).to.equal(null); + registry: setupRegistryFor('css', function(tree) { + return new Funnel(tree, { + getDestinationPath(relativePath) { + return relativePath.replace(/scss$/g, 'css'); + }, + }); + }), - output = yield buildOutput(defaultPackager.packageStyles(input.path())); + minifyCSS: { + enabled: true, + options: { processImport: false }, + }, - expect(defaultPackager._cachedProcessedStyles).to.not.equal(null); - expect(defaultPackager._cachedProcessedStyles._annotation).to.equal('Packaged Styles'); - }) - ); + styleOutputFiles, - it( - 'does not minify css files when minification is disabled', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', - env: 'development', + project: { addons: [] }, + }); - distPaths: { - appCssFile: { app: '/assets/the-best-app-ever.css' }, - vendorCssFile: '/assets/vendor.css', - }, + expect(defaultPackager._cachedProcessedStyles).to.equal(null); - registry: { - load: () => [], - }, + output = await buildOutput(defaultPackager.packageStyles(input.path())); - minifyCSS: { - enabled: false, - options: { - processImport: false, - relativeTo: 'assets', - }, + expect(defaultPackager._cachedProcessedStyles).to.not.equal(null); + expect(defaultPackager._cachedProcessedStyles._annotation).to.equal('Packaged Styles'); + }); + + it('does not minify css files when minification is disabled', async function() { + let defaultPackager = new DefaultPackager({ + name: 'the-best-app-ever', + env: 'development', + + distPaths: { + appCssFile: { app: '/assets/the-best-app-ever.css' }, + vendorCssFile: '/assets/vendor.css', + }, + + registry: { + load: () => [], + }, + + minifyCSS: { + enabled: false, + options: { + processImport: false, + relativeTo: 'assets', }, + }, - styleOutputFiles, + styleOutputFiles, - project: { addons: [] }, - }); + project: { addons: [] }, + }); - expect(defaultPackager._cachedProcessedStyles).to.equal(null); + expect(defaultPackager._cachedProcessedStyles).to.equal(null); - output = yield buildOutput(defaultPackager.packageStyles(input.path())); + output = await buildOutput(defaultPackager.packageStyles(input.path())); - let outputFiles = output.read(); + let outputFiles = output.read(); - expect(Object.keys(outputFiles.assets)).to.deep.equal(['extra.css', 'the-best-app-ever.css', 'vendor.css']); - expect(outputFiles.assets['vendor.css'].trim()).to.equal('body { height: 100%; }'); - expect(outputFiles.assets['the-best-app-ever.css'].trim()).to.equal( - '@import "extra.css";\nhtml { height: 100%; }' - ); - }) - ); + expect(Object.keys(outputFiles.assets)).to.deep.equal(['extra.css', 'the-best-app-ever.css', 'vendor.css']); + expect(outputFiles.assets['vendor.css'].trim()).to.equal('body { height: 100%; }'); + expect(outputFiles.assets['the-best-app-ever.css'].trim()).to.equal('@import "extra.css";\nhtml { height: 100%; }'); + }); - it( - 'minifies css files when minification is enabled', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', - env: 'development', + it('minifies css files when minification is enabled', async function() { + let defaultPackager = new DefaultPackager({ + name: 'the-best-app-ever', + env: 'development', - distPaths: { - appCssFile: { app: '/assets/the-best-app-ever.css' }, - vendorCssFile: '/assets/vendor.css', - }, + distPaths: { + appCssFile: { app: '/assets/the-best-app-ever.css' }, + vendorCssFile: '/assets/vendor.css', + }, - registry: { - load: () => [], - }, + registry: { + load: () => [], + }, - minifyCSS: { - enabled: true, - options: { - processImport: false, - relativeTo: 'assets', - }, + minifyCSS: { + enabled: true, + options: { + processImport: false, + relativeTo: 'assets', }, + }, - styleOutputFiles, + styleOutputFiles, - project: { addons: [] }, - }); + project: { addons: [] }, + }); - expect(defaultPackager._cachedProcessedStyles).to.equal(null); + expect(defaultPackager._cachedProcessedStyles).to.equal(null); - output = yield buildOutput(defaultPackager.packageStyles(input.path())); + output = await buildOutput(defaultPackager.packageStyles(input.path())); - let outputFiles = output.read(); + let outputFiles = output.read(); - expect(Object.keys(outputFiles.assets)).to.deep.equal(['extra.css', 'the-best-app-ever.css', 'vendor.css']); - expect(outputFiles.assets['vendor.css'].trim()).to.match(/^\S+$/, 'css file is minified'); - expect(outputFiles.assets['the-best-app-ever.css'].trim()).to.match(/^@import \S+$/, 'css file is minified'); - }) - ); + expect(Object.keys(outputFiles.assets)).to.deep.equal(['extra.css', 'the-best-app-ever.css', 'vendor.css']); + expect(outputFiles.assets['vendor.css'].trim()).to.match(/^\S+$/, 'css file is minified'); + expect(outputFiles.assets['the-best-app-ever.css'].trim()).to.match(/^@import \S+$/, 'css file is minified'); + }); - it( - 'processes css according to the registry', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', - env: 'development', + it('processes css according to the registry', async function() { + let defaultPackager = new DefaultPackager({ + name: 'the-best-app-ever', + env: 'development', - distPaths: { - appCssFile: { app: '/assets/the-best-app-ever.css' }, - vendorCssFile: '/assets/vendor.css', - }, - - registry: setupRegistryFor('css', function(tree, inputPath, outputPath, options) { - return new Funnel(tree, { - getDestinationPath(relativePath) { - if (relativePath.includes('app.css')) { - return options.outputPaths.app.replace(/css$/g, 'zss'); - } + distPaths: { + appCssFile: { app: '/assets/the-best-app-ever.css' }, + vendorCssFile: '/assets/vendor.css', + }, - return relativePath; - }, - }); - }), + registry: setupRegistryFor('css', function(tree, inputPath, outputPath, options) { + return new Funnel(tree, { + getDestinationPath(relativePath) { + if (relativePath.includes('app.css')) { + return options.outputPaths.app.replace(/css$/g, 'zss'); + } - minifyCSS: { - enabled: true, - options: { - processImport: false, - relativeTo: 'assets', + return relativePath; }, + }); + }), + + minifyCSS: { + enabled: true, + options: { + processImport: false, + relativeTo: 'assets', }, + }, - styleOutputFiles, + styleOutputFiles, - project: { addons: [] }, - }); + project: { addons: [] }, + }); - expect(defaultPackager._cachedProcessedStyles).to.equal(null); + expect(defaultPackager._cachedProcessedStyles).to.equal(null); - output = yield buildOutput(defaultPackager.packageStyles(input.path())); + output = await buildOutput(defaultPackager.packageStyles(input.path())); - let outputFiles = output.read(); + let outputFiles = output.read(); - expect(Object.keys(outputFiles.assets)).to.deep.equal(['the-best-app-ever.zss', 'vendor.css']); - }) - ); + expect(Object.keys(outputFiles.assets)).to.deep.equal(['the-best-app-ever.zss', 'vendor.css']); + }); - it( - 'inlines css imports', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', - env: 'development', + it('inlines css imports', async function() { + let defaultPackager = new DefaultPackager({ + name: 'the-best-app-ever', + env: 'development', - distPaths: { - appCssFile: { app: '/assets/the-best-app-ever.css' }, - vendorCssFile: '/assets/vendor.css', - }, + distPaths: { + appCssFile: { app: '/assets/the-best-app-ever.css' }, + vendorCssFile: '/assets/vendor.css', + }, - registry: { - load: () => [], - }, + registry: { + load: () => [], + }, - minifyCSS: { - enabled: true, - options: { - processImport: true, - relativeTo: 'assets', - }, + minifyCSS: { + enabled: true, + options: { + processImport: true, + relativeTo: 'assets', }, + }, - styleOutputFiles, + styleOutputFiles, - project: { addons: [] }, - }); + project: { addons: [] }, + }); - expect(defaultPackager._cachedProcessedStyles).to.equal(null); + expect(defaultPackager._cachedProcessedStyles).to.equal(null); - output = yield buildOutput(defaultPackager.packageStyles(input.path())); + output = await buildOutput(defaultPackager.packageStyles(input.path())); - let outputFiles = output.read(); + let outputFiles = output.read(); - expect(outputFiles.assets['the-best-app-ever.css'].trim()).to.not.include('@import'); - expect(outputFiles.assets['the-best-app-ever.css'].trim()).to.equal('body{position:relative}html{height:100%}'); - }) - ); + expect(outputFiles.assets['the-best-app-ever.css'].trim()).to.not.include('@import'); + expect(outputFiles.assets['the-best-app-ever.css'].trim()).to.equal('body{position:relative}html{height:100%}'); + }); - it( - 'runs pre/post-process add-on hooks', - co.wrap(function*() { - let addonPreprocessTreeHookCalled = false; - let addonPostprocessTreeHookCalled = false; + it('runs pre/post-process add-on hooks', async function() { + let addonPreprocessTreeHookCalled = false; + let addonPostprocessTreeHookCalled = false; - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', - env: 'development', + let defaultPackager = new DefaultPackager({ + name: 'the-best-app-ever', + env: 'development', - distPaths: { - appCssFile: { app: '/assets/the-best-app-ever.css' }, - vendorCssFile: '/assets/vendor.css', - }, + distPaths: { + appCssFile: { app: '/assets/the-best-app-ever.css' }, + vendorCssFile: '/assets/vendor.css', + }, - registry: { - load: () => [], - }, + registry: { + load: () => [], + }, - minifyCSS: { - enabled: true, - options: { - processImport: false, - relativeTo: 'assets', - }, + minifyCSS: { + enabled: true, + options: { + processImport: false, + relativeTo: 'assets', }, + }, - styleOutputFiles, - - // avoid using `testdouble.js` here on purpose; it does not have a "proxy" - // option, where a function call would be registered and the original - // would be returned - project: { - addons: [ - { - preprocessTree(type, tree) { - addonPreprocessTreeHookCalled = true; + styleOutputFiles, - return tree; - }, - postprocessTree(type, tree) { - addonPostprocessTreeHookCalled = true; + // avoid using `testdouble.js` here on purpose; it does not have a "proxy" + // option, where a function call would be registered and the original + // would be returned + project: { + addons: [ + { + preprocessTree(type, tree) { + addonPreprocessTreeHookCalled = true; - return tree; - }, + return tree; }, - ], - }, - }); - - expect(defaultPackager._cachedProcessedStyles).to.equal(null); - - output = yield buildOutput(defaultPackager.packageStyles(input.path())); + postprocessTree(type, tree) { + addonPostprocessTreeHookCalled = true; - expect(addonPreprocessTreeHookCalled).to.equal(true); - expect(addonPostprocessTreeHookCalled).to.equal(true); - }) - ); - - it( - 'prevents duplicate inclusion, maintains order: CSS', - co.wrap(function*() { - let importFilesMap = { - '/assets/vendor.css': [ - 'bower_components/1.css', - 'bower_components/2.css', - 'bower_components/3.css', - 'bower_components/1.css', + return tree; + }, + }, ], - }; - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', - env: 'development', + }, + }); - distPaths: { - appCssFile: { app: '/assets/the-best-app-ever.css' }, - vendorCssFile: '/assets/vendor.css', - }, + expect(defaultPackager._cachedProcessedStyles).to.equal(null); + + output = await buildOutput(defaultPackager.packageStyles(input.path())); + + expect(addonPreprocessTreeHookCalled).to.equal(true); + expect(addonPostprocessTreeHookCalled).to.equal(true); + }); + + it('prevents duplicate inclusion, maintains order: CSS', async function() { + let importFilesMap = { + '/assets/vendor.css': [ + 'bower_components/1.css', + 'bower_components/2.css', + 'bower_components/3.css', + 'bower_components/1.css', + ], + }; + let defaultPackager = new DefaultPackager({ + name: 'the-best-app-ever', + env: 'development', + + distPaths: { + appCssFile: { app: '/assets/the-best-app-ever.css' }, + vendorCssFile: '/assets/vendor.css', + }, - registry: { - load: () => [], - }, + registry: { + load: () => [], + }, - minifyCSS: { - enabled: true, - options: { - processImport: false, - relativeTo: 'assets', - }, + minifyCSS: { + enabled: true, + options: { + processImport: false, + relativeTo: 'assets', }, + }, - styleOutputFiles: importFilesMap, + styleOutputFiles: importFilesMap, - project: { addons: [] }, - }); + project: { addons: [] }, + }); - expect(defaultPackager._cachedProcessedStyles).to.equal(null); + expect(defaultPackager._cachedProcessedStyles).to.equal(null); - output = yield buildOutput(defaultPackager.packageStyles(input.path())); + output = await buildOutput(defaultPackager.packageStyles(input.path())); - let outputFiles = output.read(); + let outputFiles = output.read(); - expect(outputFiles.assets['vendor.css']).to.equal('.third{position:absolute}'); - }) - ); + expect(outputFiles.assets['vendor.css']).to.equal('.third{position:absolute}'); + }); if (isExperimentEnabled('MODULE_UNIFICATION')) { describe('with module unification layout', function() { @@ -475,46 +445,37 @@ describe('Default Packager: Styles', function() { project: { addons: [] }, }); - before( - co.wrap(function*() { - input = yield createTempDir(); - processedSrc = yield createTempDir(); - - input.write(MU_LAYOUT); - processedSrc.write(processedSrcFolder); - }) - ); - - after( - co.wrap(function*() { - yield input.dispose(); - yield processedSrc.dispose(); - }) - ); - - afterEach( - co.wrap(function*() { - yield output.dispose(); - }) - ); - - it( - 'processes styles according to the registry', - co.wrap(function*() { - defaultPackager._cachedProcessedSrc = processedSrc.path(); - - output = yield buildOutput(defaultPackager.packageStyles(input.path())); - - let outputFiles = output.read(); - - expect(outputFiles).to.deep.equal({ - assets: { - 'the-best-app-ever.css': 'html{height:100%}', - 'vendor.css': 'body{height:100%}', - }, - }); - }) - ); + before(async function() { + input = await createTempDir(); + processedSrc = await createTempDir(); + + input.write(MU_LAYOUT); + processedSrc.write(processedSrcFolder); + }); + + after(async function() { + await input.dispose(); + await processedSrc.dispose(); + }); + + afterEach(async function() { + await output.dispose(); + }); + + it('processes styles according to the registry', async function() { + defaultPackager._cachedProcessedSrc = processedSrc.path(); + + output = await buildOutput(defaultPackager.packageStyles(input.path())); + + let outputFiles = output.read(); + + expect(outputFiles).to.deep.equal({ + assets: { + 'the-best-app-ever.css': 'html{height:100%}', + 'vendor.css': 'body{height:100%}', + }, + }); + }); }); } }); diff --git a/tests/unit/broccoli/default-packager/templates-test.js b/tests/unit/broccoli/default-packager/templates-test.js index 136d19308f..16b3e080a6 100644 --- a/tests/unit/broccoli/default-packager/templates-test.js +++ b/tests/unit/broccoli/default-packager/templates-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const expect = require('chai').expect; const Funnel = require('broccoli-funnel'); const DefaultPackager = require('../../../../lib/broccoli/default-packager'); @@ -25,135 +24,120 @@ describe('Default Packager: Templates', function() { }, }; - before( - co.wrap(function*() { - input = yield createTempDir(); - - input.write(TEMPLATES); - }) - ); - - after( - co.wrap(function*() { - if (input) { - yield input.dispose(); - } - }) - ); - - afterEach( - co.wrap(function*() { - if (output) { - yield output.dispose(); - } - }) - ); - - it( - 'caches processed templates tree', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', - - registry: setupRegistryFor('template', function(tree) { - return new Funnel(tree, { - getDestinationPath(relativePath) { - return relativePath.replace(/hbs$/g, 'js'); - }, - }); - }), + before(async function() { + input = await createTempDir(); - project: { addons: [] }, - }); + input.write(TEMPLATES); + }); - expect(defaultPackager._cachedProcessedTemplates).to.equal(null); + after(async function() { + if (input) { + await input.dispose(); + } + }); - output = yield buildOutput(defaultPackager.processTemplates(input.path())); + afterEach(async function() { + if (output) { + await output.dispose(); + } + }); - expect(defaultPackager._cachedProcessedTemplates).to.not.equal(null); - }) - ); + it('caches processed templates tree', async function() { + let defaultPackager = new DefaultPackager({ + name: 'the-best-app-ever', - it( - 'processes templates according to the registry', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', + registry: setupRegistryFor('template', function(tree) { + return new Funnel(tree, { + getDestinationPath(relativePath) { + return relativePath.replace(/hbs$/g, 'js'); + }, + }); + }), - registry: setupRegistryFor('template', function(tree) { - return new Funnel(tree, { - getDestinationPath(relativePath) { - return relativePath.replace(/hbs$/g, 'js'); - }, - }); - }), - - project: { addons: [] }, - }); - - expect(defaultPackager._cachedProcessedTemplates).to.equal(null); - - output = yield buildOutput(defaultPackager.processTemplates(input.path())); - - let outputFiles = output.read(); - - expect(outputFiles['the-best-app-ever']).to.deep.equal({ - templates: { - 'application.js': '', - 'error.js': '', - 'index.js': '', - 'loading.js': '', - }, - }); - }) - ); - - it( - 'runs pre/post-process add-on hooks', - co.wrap(function*() { - let addonPreprocessTreeHookCalled = false; - let addonPostprocessTreeHookCalled = false; - - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', - - registry: setupRegistryFor('template', function(tree) { - return new Funnel(tree, { - getDestinationPath(relativePath) { - return relativePath.replace(/hbs$/g, 'js'); + project: { addons: [] }, + }); + + expect(defaultPackager._cachedProcessedTemplates).to.equal(null); + + output = await buildOutput(defaultPackager.processTemplates(input.path())); + + expect(defaultPackager._cachedProcessedTemplates).to.not.equal(null); + }); + + it('processes templates according to the registry', async function() { + let defaultPackager = new DefaultPackager({ + name: 'the-best-app-ever', + + registry: setupRegistryFor('template', function(tree) { + return new Funnel(tree, { + getDestinationPath(relativePath) { + return relativePath.replace(/hbs$/g, 'js'); + }, + }); + }), + + project: { addons: [] }, + }); + + expect(defaultPackager._cachedProcessedTemplates).to.equal(null); + + output = await buildOutput(defaultPackager.processTemplates(input.path())); + + let outputFiles = output.read(); + + expect(outputFiles['the-best-app-ever']).to.deep.equal({ + templates: { + 'application.js': '', + 'error.js': '', + 'index.js': '', + 'loading.js': '', + }, + }); + }); + + it('runs pre/post-process add-on hooks', async function() { + let addonPreprocessTreeHookCalled = false; + let addonPostprocessTreeHookCalled = false; + + let defaultPackager = new DefaultPackager({ + name: 'the-best-app-ever', + + registry: setupRegistryFor('template', function(tree) { + return new Funnel(tree, { + getDestinationPath(relativePath) { + return relativePath.replace(/hbs$/g, 'js'); + }, + }); + }), + + // avoid using `testdouble.js` here on purpose; it does not have a "proxy" + // option, where a function call would be registered and the original + // would be returned + project: { + addons: [ + { + preprocessTree(type, tree) { + expect(type).to.equal('template'); + addonPreprocessTreeHookCalled = true; + + return tree; }, - }); - }), - - // avoid using `testdouble.js` here on purpose; it does not have a "proxy" - // option, where a function call would be registered and the original - // would be returned - project: { - addons: [ - { - preprocessTree(type, tree) { - expect(type).to.equal('template'); - addonPreprocessTreeHookCalled = true; - - return tree; - }, - postprocessTree(type, tree) { - expect(type).to.equal('template'); - addonPostprocessTreeHookCalled = true; - - return tree; - }, + postprocessTree(type, tree) { + expect(type).to.equal('template'); + addonPostprocessTreeHookCalled = true; + + return tree; }, - ], - }, - }); + }, + ], + }, + }); - expect(defaultPackager._cachedProcessedTemplates).to.equal(null); + expect(defaultPackager._cachedProcessedTemplates).to.equal(null); - output = yield buildOutput(defaultPackager.processTemplates(input.path())); + output = await buildOutput(defaultPackager.processTemplates(input.path())); - expect(addonPreprocessTreeHookCalled).to.equal(true); - expect(addonPostprocessTreeHookCalled).to.equal(true); - }) - ); + expect(addonPreprocessTreeHookCalled).to.equal(true); + expect(addonPostprocessTreeHookCalled).to.equal(true); + }); }); diff --git a/tests/unit/broccoli/default-packager/tests-test.js b/tests/unit/broccoli/default-packager/tests-test.js index 6c8fd152aa..daea94d1c4 100644 --- a/tests/unit/broccoli/default-packager/tests-test.js +++ b/tests/unit/broccoli/default-packager/tests-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const stew = require('broccoli-stew'); const Funnel = require('broccoli-funnel'); const expect = require('chai').expect; @@ -116,478 +115,448 @@ describe('Default Packager: Tests', function() { ], }; - before( - co.wrap(function*() { - input = yield createTempDir(); - - input.write(TESTS); - }) - ); - - after( - co.wrap(function*() { - yield input.dispose(); - }) - ); - - afterEach( - co.wrap(function*() { - yield output.dispose(); - }) - ); - - it( - 'caches packaged tests tree', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - project, - name, - env, - areTestsEnabled: true, - - distPaths: { - testJsFile: '/assets/tests.js', - testSupportJsFile: { - testSupport: '/assets/test-support.js', - testLoader: '/assets/test-loader.js', - }, - testSupportCssFile: '/assets/test-support.css', + before(async function() { + input = await createTempDir(); + + input.write(TESTS); + }); + + after(async function() { + await input.dispose(); + }); + + afterEach(async function() { + await output.dispose(); + }); + + it('caches packaged tests tree', async function() { + let defaultPackager = new DefaultPackager({ + project, + name, + env, + areTestsEnabled: true, + + distPaths: { + testJsFile: '/assets/tests.js', + testSupportJsFile: { + testSupport: '/assets/test-support.js', + testLoader: '/assets/test-loader.js', }, + testSupportCssFile: '/assets/test-support.css', + }, - customTransformsMap: new Map(), + customTransformsMap: new Map(), - vendorTestStaticStyles: [], - legacyTestFilesToAppend: [], + vendorTestStaticStyles: [], + legacyTestFilesToAppend: [], - registry: setupRegistryFor('js', tree => tree), - }); + registry: setupRegistryFor('js', tree => tree), + }); - expect(defaultPackager._cachedTests).to.equal(null); + expect(defaultPackager._cachedTests).to.equal(null); - output = yield buildOutput(defaultPackager.packageTests(input.path())); + output = await buildOutput(defaultPackager.packageTests(input.path())); - expect(defaultPackager._cachedTests).to.not.equal(null); - }) - ); + expect(defaultPackager._cachedTests).to.not.equal(null); + }); - it( - 'packages test files (with sourcemaps)', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - project, - name, - env, - areTestsEnabled: true, + it('packages test files (with sourcemaps)', async function() { + let defaultPackager = new DefaultPackager({ + project, + name, + env, + areTestsEnabled: true, - distPaths: { - testJsFile: '/assets/tests.js', - testSupportJsFile: { - testSupport: '/assets/test-support.js', - testLoader: '/assets/test-loader.js', - }, - testSupportCssFile: '/assets/test-support.css', + distPaths: { + testJsFile: '/assets/tests.js', + testSupportJsFile: { + testSupport: '/assets/test-support.js', + testLoader: '/assets/test-loader.js', }, + testSupportCssFile: '/assets/test-support.css', + }, - customTransformsMap: new Map(), + customTransformsMap: new Map(), - vendorTestStaticStyles: [], - legacyTestFilesToAppend: [], + vendorTestStaticStyles: [], + legacyTestFilesToAppend: [], - registry: setupRegistryFor('js', tree => tree), - }); + registry: setupRegistryFor('js', tree => tree), + }); - output = yield buildOutput(defaultPackager.packageTests(input.path())); - - let outputFiles = output.read(); - - expect(Object.keys(outputFiles.tests)).to.deep.equal(['index.html']); - - expect(Object.keys(outputFiles.assets)).to.deep.equal([ - 'test-support.js', - 'test-support.map', - 'tests.js', - 'tests.map', - ]); - - expect(Object.keys(outputFiles)).to.deep.equal(['assets', 'testem.js', 'tests']); - - expect(outputFiles.assets['tests.js']).to.include('login-test.js'); - expect(outputFiles.assets['tests.js']).to.include('login-test.lint.js'); - expect(outputFiles.assets['tests.js']).to.include('test-helper'); - expect(outputFiles.assets['tests.js']).to.include(`define('the-best-app-ever/config/environment'`); - expect(outputFiles.assets['tests.js']).to.include(`require('the-best-app-ever/tests/test-helper');`); - expect(outputFiles.assets['tests.js']).to.include('EmberENV.TESTS_FILE_LOADED = true;'); - }) - ); - - it( - 'packages test files (without sourcemaps)', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - project, - name, - env, - areTestsEnabled: true, - sourcemaps: { enabled: false }, - - distPaths: { - testJsFile: '/assets/tests.js', - testSupportJsFile: { - testSupport: '/assets/test-support.js', - testLoader: '/assets/test-loader.js', - }, - testSupportCssFile: '/assets/test-support.css', + output = await buildOutput(defaultPackager.packageTests(input.path())); + + let outputFiles = output.read(); + + expect(Object.keys(outputFiles.tests)).to.deep.equal(['index.html']); + + expect(Object.keys(outputFiles.assets)).to.deep.equal([ + 'test-support.js', + 'test-support.map', + 'tests.js', + 'tests.map', + ]); + + expect(Object.keys(outputFiles)).to.deep.equal(['assets', 'testem.js', 'tests']); + + expect(outputFiles.assets['tests.js']).to.include('login-test.js'); + expect(outputFiles.assets['tests.js']).to.include('login-test.lint.js'); + expect(outputFiles.assets['tests.js']).to.include('test-helper'); + expect(outputFiles.assets['tests.js']).to.include(`define('the-best-app-ever/config/environment'`); + expect(outputFiles.assets['tests.js']).to.include(`require('the-best-app-ever/tests/test-helper');`); + expect(outputFiles.assets['tests.js']).to.include('EmberENV.TESTS_FILE_LOADED = true;'); + }); + + it('packages test files (without sourcemaps)', async function() { + let defaultPackager = new DefaultPackager({ + project, + name, + env, + areTestsEnabled: true, + sourcemaps: { enabled: false }, + + distPaths: { + testJsFile: '/assets/tests.js', + testSupportJsFile: { + testSupport: '/assets/test-support.js', + testLoader: '/assets/test-loader.js', }, + testSupportCssFile: '/assets/test-support.css', + }, - customTransformsMap: new Map(), + customTransformsMap: new Map(), - vendorTestStaticStyles: [], - legacyTestFilesToAppend: [], + vendorTestStaticStyles: [], + legacyTestFilesToAppend: [], - registry: setupRegistryFor('js', tree => tree), - }); + registry: setupRegistryFor('js', tree => tree), + }); - output = yield buildOutput(defaultPackager.packageTests(input.path())); + output = await buildOutput(defaultPackager.packageTests(input.path())); - let outputFiles = output.read(); + let outputFiles = output.read(); - expect(Object.keys(outputFiles.tests)).to.deep.equal(['index.html']); + expect(Object.keys(outputFiles.tests)).to.deep.equal(['index.html']); - expect(Object.keys(outputFiles.assets)).to.deep.equal(['test-support.js', 'tests.js']); + expect(Object.keys(outputFiles.assets)).to.deep.equal(['test-support.js', 'tests.js']); - expect(Object.keys(outputFiles)).to.deep.equal(['assets', 'testem.js', 'tests']); + expect(Object.keys(outputFiles)).to.deep.equal(['assets', 'testem.js', 'tests']); - expect(outputFiles.assets['tests.js']).to.include('login-test.js'); - expect(outputFiles.assets['tests.js']).to.include('login-test.lint.js'); - expect(outputFiles.assets['tests.js']).to.include('test-helper'); - expect(outputFiles.assets['tests.js']).to.include(`define('the-best-app-ever/config/environment'`); - expect(outputFiles.assets['tests.js']).to.include(`require('the-best-app-ever/tests/test-helper');`); - expect(outputFiles.assets['tests.js']).to.include('EmberENV.TESTS_FILE_LOADED = true;'); - }) - ); + expect(outputFiles.assets['tests.js']).to.include('login-test.js'); + expect(outputFiles.assets['tests.js']).to.include('login-test.lint.js'); + expect(outputFiles.assets['tests.js']).to.include('test-helper'); + expect(outputFiles.assets['tests.js']).to.include(`define('the-best-app-ever/config/environment'`); + expect(outputFiles.assets['tests.js']).to.include(`require('the-best-app-ever/tests/test-helper');`); + expect(outputFiles.assets['tests.js']).to.include('EmberENV.TESTS_FILE_LOADED = true;'); + }); - it( - 'does not process `addon-test-support` folder', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - project, - name, - env, - areTestsEnabled: true, + it('does not process `addon-test-support` folder', async function() { + let defaultPackager = new DefaultPackager({ + project, + name, + env, + areTestsEnabled: true, - distPaths: { - testJsFile: '/assets/tests.js', - testSupportJsFile: { - testSupport: '/assets/test-support.js', - testLoader: '/assets/test-loader.js', - }, - testSupportCssFile: '/assets/test-support.css', + distPaths: { + testJsFile: '/assets/tests.js', + testSupportJsFile: { + testSupport: '/assets/test-support.js', + testLoader: '/assets/test-loader.js', }, + testSupportCssFile: '/assets/test-support.css', + }, - customTransformsMap: new Map(), + customTransformsMap: new Map(), - vendorTestStaticStyles: [], - legacyTestFilesToAppend: [], + vendorTestStaticStyles: [], + legacyTestFilesToAppend: [], - registry: setupRegistryFor('js', function(tree) { - return new Funnel(tree, { - getDestinationPath(relativePath) { - return relativePath.replace(/js/g, 'js-test'); - }, - }); - }), - }); + registry: setupRegistryFor('js', function(tree) { + return new Funnel(tree, { + getDestinationPath(relativePath) { + return relativePath.replace(/js/g, 'js-test'); + }, + }); + }), + }); - output = yield buildOutput(defaultPackager.processTests(input.path())); + output = await buildOutput(defaultPackager.processTests(input.path())); - let outputFiles = output.read(); + let outputFiles = output.read(); - expect(outputFiles).to.deep.equal({ - 'addon-test-support': { - '@ember': { - 'test-helpers': { - 'global.js': - 'define("@ember/test-helpers/global", ["exports"], function(exports) { Object.defineProperty(exports, "__esModule", { value: true }); });', - }, + expect(outputFiles).to.deep.equal({ + 'addon-test-support': { + '@ember': { + 'test-helpers': { + 'global.js': + 'define("@ember/test-helpers/global", ["exports"], function(exports) { Object.defineProperty(exports, "__esModule", { value: true }); });', }, }, - [name]: { - tests: { - acceptance: { - 'login-test.js-test': ' // login-test.js', - 'logout-test.js-test': '', - }, - lint: { - 'login-test.lint.js-test': ' // login-test.lint.js', - 'logout-test.lint.js-test': '', - }, - helpers: { - 'resolver.js-test': '', - 'start-app.js-test': '', - }, - 'index.html': 'index', - integration: { - components: { - 'login-form-test.js-test': '', - 'user-menu-test.js-test': '', - }, + }, + [name]: { + tests: { + acceptance: { + 'login-test.js-test': ' // login-test.js', + 'logout-test.js-test': '', + }, + lint: { + 'login-test.lint.js-test': ' // login-test.lint.js', + 'logout-test.lint.js-test': '', + }, + helpers: { + 'resolver.js-test': '', + 'start-app.js-test': '', + }, + 'index.html': 'index', + integration: { + components: { + 'login-form-test.js-test': '', + 'user-menu-test.js-test': '', }, - 'test-helper.js-test': '// test-helper.js', - unit: { - services: { - 'session-test.js-test': '', - }, + }, + 'test-helper.js-test': '// test-helper.js', + unit: { + services: { + 'session-test.js-test': '', }, }, }, - }); - }) - ); - - it( - 'processes tests files according to the registry', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - project, - name, - env, - areTestsEnabled: true, - - distPaths: { - testJsFile: '/assets/tests.js', - testSupportJsFile: { - testSupport: '/assets/test-support.js', - testLoader: '/assets/test-loader.js', - }, - testSupportCssFile: '/assets/test-support.css', + }, + }); + }); + + it('processes tests files according to the registry', async function() { + let defaultPackager = new DefaultPackager({ + project, + name, + env, + areTestsEnabled: true, + + distPaths: { + testJsFile: '/assets/tests.js', + testSupportJsFile: { + testSupport: '/assets/test-support.js', + testLoader: '/assets/test-loader.js', }, + testSupportCssFile: '/assets/test-support.css', + }, - customTransformsMap: new Map(), + customTransformsMap: new Map(), - vendorTestStaticStyles: [], - legacyTestFilesToAppend: [], + vendorTestStaticStyles: [], + legacyTestFilesToAppend: [], - registry: setupRegistryFor('js', function(tree) { - return new Funnel(tree, { - getDestinationPath(relativePath) { - return relativePath.replace(/js/g, 'js-test'); - }, - }); - }), - }); + registry: setupRegistryFor('js', function(tree) { + return new Funnel(tree, { + getDestinationPath(relativePath) { + return relativePath.replace(/js/g, 'js-test'); + }, + }); + }), + }); - output = yield buildOutput(defaultPackager.processTests(input.path())); + output = await buildOutput(defaultPackager.processTests(input.path())); - let outputFiles = output.read(); + let outputFiles = output.read(); - expect(outputFiles).to.deep.equal({ - 'addon-test-support': { - '@ember': { - 'test-helpers': { - 'global.js': - 'define("@ember/test-helpers/global", ["exports"], function(exports) { Object.defineProperty(exports, "__esModule", { value: true }); });', - }, + expect(outputFiles).to.deep.equal({ + 'addon-test-support': { + '@ember': { + 'test-helpers': { + 'global.js': + 'define("@ember/test-helpers/global", ["exports"], function(exports) { Object.defineProperty(exports, "__esModule", { value: true }); });', }, }, - [name]: { - tests: { - acceptance: { - 'login-test.js-test': ' // login-test.js', - 'logout-test.js-test': '', - }, - lint: { - 'login-test.lint.js-test': ' // login-test.lint.js', - 'logout-test.lint.js-test': '', - }, - helpers: { - 'resolver.js-test': '', - 'start-app.js-test': '', - }, - 'index.html': 'index', - integration: { - components: { - 'login-form-test.js-test': '', - 'user-menu-test.js-test': '', - }, - }, - 'test-helper.js-test': '// test-helper.js', - unit: { - services: { - 'session-test.js-test': '', - }, - }, + }, + [name]: { + tests: { + acceptance: { + 'login-test.js-test': ' // login-test.js', + 'logout-test.js-test': '', }, - }, - }); - }) - ); - - it( - 'emits dist/assets/tests.js by default', - co.wrap(function*() { - let emptyInput = yield createTempDir(); - let emptyTestFolder = { - 'addon-tree-output': {}, - bower_components: {}, - 'the-best-app-ever': { - 'router.js': 'router.js', - 'app.js': 'app.js', - components: { - 'x-foo.js': 'export default class {}', + lint: { + 'login-test.lint.js-test': ' // login-test.lint.js', + 'logout-test.lint.js-test': '', }, - routes: { - 'application.js': 'export default class {}', + helpers: { + 'resolver.js-test': '', + 'start-app.js-test': '', }, - config: { - 'environment.js': 'environment.js', + 'index.html': 'index', + integration: { + components: { + 'login-form-test.js-test': '', + 'user-menu-test.js-test': '', + }, }, - templates: {}, - }, - vendor: { - 'ember-cli': { - 'app-boot.js': 'app-boot.js', - 'app-config.js': 'app-config.js', - 'app-prefix.js': 'app-prefix.js', - 'app-suffix.js': 'app-suffix.js', - 'test-support-prefix.js': 'test-support-prefix.js', - 'test-support-suffix.js': 'test-support-suffix.js', - 'tests-prefix.js': 'tests-prefix.js', - 'tests-suffix.js': 'tests-suffix.js', - 'vendor-prefix.js': 'vendor-prefix.js', - 'vendor-suffix.js': 'vendor-suffix.js', + 'test-helper.js-test': '// test-helper.js', + unit: { + services: { + 'session-test.js-test': '', + }, }, }, - tests: { - 'test-helper.js': '// test-helper.js', + }, + }); + }); + + it('emits dist/assets/tests.js by default', async function() { + let emptyInput = await createTempDir(); + let emptyTestFolder = { + 'addon-tree-output': {}, + bower_components: {}, + 'the-best-app-ever': { + 'router.js': 'router.js', + 'app.js': 'app.js', + components: { + 'x-foo.js': 'export default class {}', }, - }; + routes: { + 'application.js': 'export default class {}', + }, + config: { + 'environment.js': 'environment.js', + }, + templates: {}, + }, + vendor: { + 'ember-cli': { + 'app-boot.js': 'app-boot.js', + 'app-config.js': 'app-config.js', + 'app-prefix.js': 'app-prefix.js', + 'app-suffix.js': 'app-suffix.js', + 'test-support-prefix.js': 'test-support-prefix.js', + 'test-support-suffix.js': 'test-support-suffix.js', + 'tests-prefix.js': 'tests-prefix.js', + 'tests-suffix.js': 'tests-suffix.js', + 'vendor-prefix.js': 'vendor-prefix.js', + 'vendor-suffix.js': 'vendor-suffix.js', + }, + }, + tests: { + 'test-helper.js': '// test-helper.js', + }, + }; - emptyInput.write(emptyTestFolder); + emptyInput.write(emptyTestFolder); - let project = { - configPath() { - return `${emptyInput.path()}/the-best-app-ever/config/environment`; - }, + let project = { + configPath() { + return `${emptyInput.path()}/the-best-app-ever/config/environment`; + }, - config() { - return { a: 1 }; - }, + config() { + return { a: 1 }; + }, - addons: [], - }; + addons: [], + }; - let defaultPackager = new DefaultPackager({ - project, - name, - env, - areTestsEnabled: true, - - distPaths: { - testJsFile: '/assets/tests.js', - testSupportJsFile: { - testSupport: '/assets/test-support.js', - testLoader: '/assets/test-loader.js', - }, - testSupportCssFile: '/assets/test-support.css', + let defaultPackager = new DefaultPackager({ + project, + name, + env, + areTestsEnabled: true, + + distPaths: { + testJsFile: '/assets/tests.js', + testSupportJsFile: { + testSupport: '/assets/test-support.js', + testLoader: '/assets/test-loader.js', }, + testSupportCssFile: '/assets/test-support.css', + }, - customTransformsMap: new Map(), + customTransformsMap: new Map(), - vendorTestStaticStyles: [], - legacyTestFilesToAppend: [], + vendorTestStaticStyles: [], + legacyTestFilesToAppend: [], - registry: setupRegistryFor('js', tree => tree), - }); + registry: setupRegistryFor('js', tree => tree), + }); - output = yield buildOutput(defaultPackager.packageTests(input.path())); + output = await buildOutput(defaultPackager.packageTests(input.path())); - let outputFiles = output.read(); + let outputFiles = output.read(); - expect(Object.keys(outputFiles.tests)).to.deep.equal(['index.html']); + expect(Object.keys(outputFiles.tests)).to.deep.equal(['index.html']); - expect(Object.keys(outputFiles.assets)).to.deep.equal([ - 'test-support.js', - 'test-support.map', - 'tests.js', - 'tests.map', - ]); + expect(Object.keys(outputFiles.assets)).to.deep.equal([ + 'test-support.js', + 'test-support.map', + 'tests.js', + 'tests.map', + ]); - expect(Object.keys(outputFiles)).to.deep.equal(['assets', 'testem.js', 'tests']); + expect(Object.keys(outputFiles)).to.deep.equal(['assets', 'testem.js', 'tests']); - emptyInput.dispose(); - }) - ); + emptyInput.dispose(); + }); - it( - 'lintTree results do not "win" over app tests', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - project, - name, - env, - areTestsEnabled: true, + it('lintTree results do not "win" over app tests', async function() { + let defaultPackager = new DefaultPackager({ + project, + name, + env, + areTestsEnabled: true, - distPaths: { - testJsFile: '/assets/tests.js', - testSupportJsFile: { - testSupport: '/assets/test-support.js', - testLoader: '/assets/test-loader.js', - }, - testSupportCssFile: '/assets/test-support.css', + distPaths: { + testJsFile: '/assets/tests.js', + testSupportJsFile: { + testSupport: '/assets/test-support.js', + testLoader: '/assets/test-loader.js', }, + testSupportCssFile: '/assets/test-support.css', + }, - customTransformsMap: new Map(), + customTransformsMap: new Map(), - vendorTestStaticStyles: [], - legacyTestFilesToAppend: [], + vendorTestStaticStyles: [], + legacyTestFilesToAppend: [], - registry: setupRegistryFor('js', tree => tree), - }); + registry: setupRegistryFor('js', tree => tree), + }); - output = yield buildOutput(defaultPackager.packageTests(input.path())); - - let outputFiles = output.read(); - - // confirm this contains the original value - // unmodified by the `lintTree` added above - expect(outputFiles.assets['tests.js']).to.include('// login-test.js'); - }) - ); - - it( - 'maintains the concatenation order', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - project, - name, - env, - areTestsEnabled: true, - - distPaths: { - testJsFile: '/assets/tests.js', - testSupportJsFile: { - testSupport: '/assets/test-support.js', - testLoader: '/assets/test-loader.js', - }, - testSupportCssFile: '/assets/test-support.css', + output = await buildOutput(defaultPackager.packageTests(input.path())); + + let outputFiles = output.read(); + + // confirm this contains the original value + // unmodified by the `lintTree` added above + expect(outputFiles.assets['tests.js']).to.include('// login-test.js'); + }); + + it('maintains the concatenation order', async function() { + let defaultPackager = new DefaultPackager({ + project, + name, + env, + areTestsEnabled: true, + + distPaths: { + testJsFile: '/assets/tests.js', + testSupportJsFile: { + testSupport: '/assets/test-support.js', + testLoader: '/assets/test-loader.js', }, + testSupportCssFile: '/assets/test-support.css', + }, - customTransformsMap: new Map(), + customTransformsMap: new Map(), - vendorTestStaticStyles: ['vendor/custom/a.css', 'vendor/custom/b.css'], - legacyTestFilesToAppend: ['vendor/custom/a.js', 'vendor/custom/b.js'], + vendorTestStaticStyles: ['vendor/custom/a.css', 'vendor/custom/b.css'], + legacyTestFilesToAppend: ['vendor/custom/a.js', 'vendor/custom/b.js'], - registry: setupRegistryFor('js', tree => tree), - }); + registry: setupRegistryFor('js', tree => tree), + }); - output = yield buildOutput(defaultPackager.packageTests(input.path())); + output = await buildOutput(defaultPackager.packageTests(input.path())); - let outputFiles = output.read(); + let outputFiles = output.read(); - expect(outputFiles.assets['test-support.js']).to.include('a.js\nb.js'); - expect(outputFiles.assets['test-support.css']).to.include('a.css\nb.css'); - }) - ); + expect(outputFiles.assets['test-support.js']).to.include('a.js\nb.js'); + expect(outputFiles.assets['test-support.css']).to.include('a.css\nb.css'); + }); if (isExperimentEnabled('MODULE_UNIFICATION')) { describe('with module unification layout', function() { @@ -645,78 +614,69 @@ describe('Default Packager: Tests', function() { }, }; - before( - co.wrap(function*() { - input = yield createTempDir(); - - input.write(MU_LAYOUT); - }) - ); - - after( - co.wrap(function*() { - yield input.dispose(); - }) - ); - - afterEach( - co.wrap(function*() { - yield output.dispose(); - }) - ); - - it( - 'packages test files', - co.wrap(function*() { - let defaultPackager = new DefaultPackager({ - project, - name, - env, - areTestsEnabled: true, - - distPaths: { - testJsFile: '/assets/tests.js', - testSupportJsFile: { - testSupport: '/assets/test-support.js', - testLoader: '/assets/test-loader.js', - }, - testSupportCssFile: '/assets/test-support.css', + before(async function() { + input = await createTempDir(); + + input.write(MU_LAYOUT); + }); + + after(async function() { + await input.dispose(); + }); + + afterEach(async function() { + await output.dispose(); + }); + + it('packages test files', async function() { + let defaultPackager = new DefaultPackager({ + project, + name, + env, + areTestsEnabled: true, + + distPaths: { + testJsFile: '/assets/tests.js', + testSupportJsFile: { + testSupport: '/assets/test-support.js', + testLoader: '/assets/test-loader.js', }, + testSupportCssFile: '/assets/test-support.css', + }, - customTransformsMap: new Map(), + customTransformsMap: new Map(), - isModuleUnificationEnabled: true, + isModuleUnificationEnabled: true, - vendorTestStaticStyles: [], - legacyTestFilesToAppend: [], + vendorTestStaticStyles: [], + legacyTestFilesToAppend: [], - registry: setupRegistryFor('js', tree => tree), - }); + registry: setupRegistryFor('js', tree => tree), + }); - output = yield buildOutput(defaultPackager.packageTests(input.path())); + output = await buildOutput(defaultPackager.packageTests(input.path())); - let outputFiles = output.read(); + let outputFiles = output.read(); - expect(Object.keys(outputFiles.tests)).to.deep.equal(['index.html']); + expect(Object.keys(outputFiles.tests)).to.deep.equal(['index.html']); - expect(Object.keys(outputFiles.assets)).to.deep.equal([ - 'test-support.js', - 'test-support.map', - 'tests.js', - 'tests.map', - ]); + expect(Object.keys(outputFiles.assets)).to.deep.equal([ + 'test-support.js', + 'test-support.map', + 'tests.js', + 'tests.map', + ]); - expect(Object.keys(outputFiles)).to.deep.equal(['assets', 'testem.js', 'tests']); + expect(Object.keys(outputFiles)).to.deep.equal(['assets', 'testem.js', 'tests']); - expect(outputFiles.assets['tests.js']).to.include('login-form-component-test'); - expect(outputFiles.assets['tests.js']).to.include('login-test.js'); - expect(outputFiles.assets['tests.js']).to.include('login-test.lint.js'); - expect(outputFiles.assets['tests.js']).to.include('test-helper'); - expect(outputFiles.assets['tests.js']).to.include(`define('the-best-app-ever/config/environment'`); - expect(outputFiles.assets['tests.js']).to.include(`require('the-best-app-ever/tests/test-helper');`); - expect(outputFiles.assets['tests.js']).to.include('EmberENV.TESTS_FILE_LOADED = true;'); - }) - ); + expect(outputFiles.assets['tests.js']).to.include('login-form-component-test'); + expect(outputFiles.assets['tests.js']).to.include('login-test.js'); + expect(outputFiles.assets['tests.js']).to.include('login-test.lint.js'); + expect(outputFiles.assets['tests.js']).to.include('test-helper'); + expect(outputFiles.assets['tests.js']).to.include(`define('the-best-app-ever/config/environment'`); + expect(outputFiles.assets['tests.js']).to.include(`require('the-best-app-ever/tests/test-helper');`); + expect(outputFiles.assets['tests.js']).to.include('EmberENV.TESTS_FILE_LOADED = true;'); + }); }); } }); diff --git a/tests/unit/broccoli/default-packager/vendor-test.js b/tests/unit/broccoli/default-packager/vendor-test.js index 12ffa8eae9..a75f48db5e 100644 --- a/tests/unit/broccoli/default-packager/vendor-test.js +++ b/tests/unit/broccoli/default-packager/vendor-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const expect = require('chai').expect; const DefaultPackager = require('../../../../lib/broccoli/default-packager'); const broccoliTestHelper = require('broccoli-test-helper'); @@ -43,52 +42,40 @@ describe('Default Packager: Vendor', function() { }, }; - before( - co.wrap(function*() { - input = yield createTempDir(); + before(async function() { + input = await createTempDir(); - input.write(VENDOR_PACKAGES); - }) - ); + input.write(VENDOR_PACKAGES); + }); - after( - co.wrap(function*() { - yield input.dispose(); - }) - ); + after(async function() { + await input.dispose(); + }); - afterEach( - co.wrap(function*() { - yield output.dispose(); - }) - ); + afterEach(async function() { + await output.dispose(); + }); - it( - 'caches packaged vendor tree', - co.wrap(function*() { - let defaultPackager = new DefaultPackager(); + it('caches packaged vendor tree', async function() { + let defaultPackager = new DefaultPackager(); - expect(defaultPackager._cachedVendor).to.equal(null); + expect(defaultPackager._cachedVendor).to.equal(null); - output = yield buildOutput(defaultPackager.packageVendor(input.path())); + output = await buildOutput(defaultPackager.packageVendor(input.path())); - expect(defaultPackager._cachedVendor).to.not.equal(null); - expect(defaultPackager._cachedVendor._annotation).to.equal('Packaged Vendor'); - }) - ); + expect(defaultPackager._cachedVendor).to.not.equal(null); + expect(defaultPackager._cachedVendor._annotation).to.equal('Packaged Vendor'); + }); - it( - 'packages vendor files', - co.wrap(function*() { - let defaultPackager = new DefaultPackager(); + it('packages vendor files', async function() { + let defaultPackager = new DefaultPackager(); - output = yield buildOutput(defaultPackager.packageVendor(input.path())); + output = await buildOutput(defaultPackager.packageVendor(input.path())); - let outputFiles = output.read(); + let outputFiles = output.read(); - expect(outputFiles).to.deep.equal({ - vendor: VENDOR_PACKAGES, - }); - }) - ); + expect(outputFiles).to.deep.equal({ + vendor: VENDOR_PACKAGES, + }); + }); }); diff --git a/tests/unit/broccoli/ember-app-test.js b/tests/unit/broccoli/ember-app-test.js index 53768e5dce..63951b7fb0 100644 --- a/tests/unit/broccoli/ember-app-test.js +++ b/tests/unit/broccoli/ember-app-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const path = require('path'); const Project = require('../../../lib/models/project'); const expect = require('chai').expect; @@ -60,37 +59,29 @@ describe('EmberApp', function() { describe('packager hook', function() { let js, input, output; - before( - co.wrap(function*() { - js = yield createTempDir(); - js.write({ - fake: { - javascript: '// javascript.js', - }, - }); - }) - ); + before(async function() { + js = await createTempDir(); + js.write({ + fake: { + javascript: '// javascript.js', + }, + }); + }); - beforeEach( - co.wrap(function*() { - input = yield createTempDir(); - }) - ); + beforeEach(async function() { + input = await createTempDir(); + }); - afterEach( - co.wrap(function*() { - yield input.dispose(); - if (output) { - yield output.dispose(); - } - }) - ); + afterEach(async function() { + await input.dispose(); + if (output) { + await output.dispose(); + } + }); - after( - co.wrap(function*() { - yield js.dispose(); - }) - ); + after(async function() { + await js.dispose(); + }); it('sets `_isPackageHookSupplied` to `false` if `package` hook is not a function', function() { let app = new EmberApp({ @@ -118,628 +109,586 @@ describe('EmberApp', function() { expect(app._isPackageHookSupplied).to.equal(true); }); - it( - 'overrides the output of the build', - co.wrap(function*() { - input.write({ - fake: { - dist: { - 'foo.js': '// foo.js', - }, + it('overrides the output of the build', async function() { + input.write({ + fake: { + dist: { + 'foo.js': '// foo.js', }, - }); + }, + }); - let app = new EmberApp({ - project, - package: () => input.path(), - }); - mockTemplateRegistry(app); + let app = new EmberApp({ + project, + package: () => input.path(), + }); + mockTemplateRegistry(app); - output = yield buildOutput(app.toTree()); + output = await buildOutput(app.toTree()); - let outputFiles = output.read(); + let outputFiles = output.read(); - expect(outputFiles).to.deep.equal({ - fake: { - dist: { - 'foo.js': '// foo.js', - }, + expect(outputFiles).to.deep.equal({ + fake: { + dist: { + 'foo.js': '// foo.js', }, - }); - }) - ); + }, + }); + }); - it( - 'receives a full tree as an argument', - co.wrap(function*() { - let appStyles = yield createTempDir(); - appStyles.write({ - 'app.css': '// css styles', - }); - input.write({ - fake: { - dist: { - 'foo.js': '// foo.js', - }, + it('receives a full tree as an argument', async function() { + let appStyles = await createTempDir(); + appStyles.write({ + 'app.css': '// css styles', + }); + input.write({ + fake: { + dist: { + 'foo.js': '// foo.js', }, - }); + }, + }); - let app = new EmberApp({ - project, - package: tree => mergeTrees([tree, input.path()]), - trees: { - styles: appStyles.path(), - }, - }); - mockTemplateRegistry(app); + let app = new EmberApp({ + project, + package: tree => mergeTrees([tree, input.path()]), + trees: { + styles: appStyles.path(), + }, + }); + mockTemplateRegistry(app); - app.getAppJavascript = () => js.path(); + app.getAppJavascript = () => js.path(); - output = yield buildOutput(app.toTree()); + output = await buildOutput(app.toTree()); - let outputFiles = output.read(); + let outputFiles = output.read(); - expect(outputFiles).to.deep.equal({ - 'addon-tree-output': {}, - fake: { - dist: { - 'foo.js': '// foo.js', - }, - javascript: '// javascript.js', - }, - app: { - styles: { - 'app.css': '// css styles', - }, - }, - 'test-project': { - templates: {}, - }, - tests: { - '.gitkeep': '', - 'addon-test-support': {}, - lint: {}, + expect(outputFiles).to.deep.equal({ + 'addon-tree-output': {}, + fake: { + dist: { + 'foo.js': '// foo.js', }, - public: {}, - vendor: { - '.gitkeep': '', + javascript: '// javascript.js', + }, + app: { + styles: { + 'app.css': '// css styles', }, - }); - }) - ); + }, + 'test-project': { + templates: {}, + }, + tests: { + '.gitkeep': '', + 'addon-test-support': {}, + lint: {}, + }, + public: {}, + vendor: { + '.gitkeep': '', + }, + }); + }); - it( - 'prints a warning if `package` is not a function and falls back to default packaging', - co.wrap(function*() { - let app = new EmberApp({ - project, - package: {}, - }); + it('prints a warning if `package` is not a function and falls back to default packaging', async function() { + let app = new EmberApp({ + project, + package: {}, + }); - app.project.ui.writeWarnLine = td.function(); - - app.getAppJavascript = td.function(); - app.getAddonTemplates = td.function(); - app.getStyles = td.function(); - app.getTests = td.function(); - app.getExternalTree = td.function(); - app.getSrc = td.function(); - app._legacyAddonCompile = td.function(); - app._defaultPackager = { - packagePublic: td.function(), - packageJavascript: td.function(), - packageStyles: td.function(), - processIndex: td.function(), - importAdditionalAssets: td.function(), - packageTests: td.function(), - }; - - output = yield buildOutput(app.toTree()); - - td.verify(app.getAppJavascript(false)); - td.verify(app.getStyles()); - td.verify(app.getTests()); - td.verify(app.getExternalTree()); - td.verify(app.getSrc()); - td.verify( - app.project.ui.writeWarnLine('`package` hook must be a function, falling back to default packaging.') - ); - }) - ); + app.project.ui.writeWarnLine = td.function(); - it( - 'receives transpiled ES current app tree', - co.wrap(function*() { - let app = new EmberApp({ - project, - package: tree => tree, - }); - mockTemplateRegistry(app); + app.getAppJavascript = td.function(); + app.getAddonTemplates = td.function(); + app.getStyles = td.function(); + app.getTests = td.function(); + app.getExternalTree = td.function(); + app.getSrc = td.function(); + app._legacyAddonCompile = td.function(); + app._defaultPackager = { + packagePublic: td.function(), + packageJavascript: td.function(), + packageStyles: td.function(), + processIndex: td.function(), + importAdditionalAssets: td.function(), + packageTests: td.function(), + }; - input.write({ - fake: { - dist: { - 'foo.js': '// foo.js', - }, - }, - }); - app.registry.add('js', { - name: 'fake-js-preprocessor', - ext: 'js', - toTree() { - return input.path(); - }, - }); + output = await buildOutput(app.toTree()); - output = yield buildOutput(app.toTree()); + td.verify(app.getAppJavascript(false)); + td.verify(app.getStyles()); + td.verify(app.getTests()); + td.verify(app.getExternalTree()); + td.verify(app.getSrc()); + td.verify( + app.project.ui.writeWarnLine('`package` hook must be a function, falling back to default packaging.') + ); + }); - let outputFiles = output.read(); + it('receives transpiled ES current app tree', async function() { + let app = new EmberApp({ + project, + package: tree => tree, + }); + mockTemplateRegistry(app); - expect(outputFiles.fake).to.deep.equal({ + input.write({ + fake: { dist: { 'foo.js': '// foo.js', }, - }); - }) - ); - }); - } - - describe('getStyles()', function() { - it( - 'can handle empty styles folders', - co.wrap(function*() { - let appStyles = yield createTempDir(); - appStyles.write({ - 'app.css': '// css styles', + }, }); - - let app = new EmberApp({ - project, - trees: { - styles: appStyles.path(), + app.registry.add('js', { + name: 'fake-js-preprocessor', + ext: 'js', + toTree() { + return input.path(); }, }); - app.addonTreesFor = () => []; + output = await buildOutput(app.toTree()); - let output = yield buildOutput(app.getStyles()); let outputFiles = output.read(); - expect(outputFiles).to.deep.equal({ - app: { - styles: { - 'app.css': '// css styles', - }, + expect(outputFiles.fake).to.deep.equal({ + dist: { + 'foo.js': '// foo.js', }, }); + }); + }); + } - yield output.dispose(); - }) - ); + describe('getStyles()', function() { + it('can handle empty styles folders', async function() { + let appStyles = await createTempDir(); + appStyles.write({ + 'app.css': '// css styles', + }); + + let app = new EmberApp({ + project, + trees: { + styles: appStyles.path(), + }, + }); - it( - 'can handle empty addon styles folders', - co.wrap(function*() { - let appOptions = { project }; + app.addonTreesFor = () => []; - if (isExperimentEnabled('MODULE_UNIFICATION')) { - appOptions.trees = { src: {} }; - } + let output = await buildOutput(app.getStyles()); + let outputFiles = output.read(); - let app = new EmberApp(appOptions); + expect(outputFiles).to.deep.equal({ + app: { + styles: { + 'app.css': '// css styles', + }, + }, + }); - let AddonFoo = Addon.extend({ - root: 'foo', - name: 'foo', - }); - let addonFoo = new AddonFoo(app, project); - app.project.addons.push(addonFoo); + await output.dispose(); + }); - let output = yield buildOutput(app.getStyles()); - let outputFiles = output.read(); + it('can handle empty addon styles folders', async function() { + let appOptions = { project }; - let expectedOutput; - if (isExperimentEnabled('MODULE_UNIFICATION')) { - expectedOutput = { - src: { - ui: { - styles: {}, - }, - }, - }; - } else { - expectedOutput = {}; - } - expect(outputFiles).to.deep.equal(expectedOutput); + if (isExperimentEnabled('MODULE_UNIFICATION')) { + appOptions.trees = { src: {} }; + } - yield output.dispose(); - }) - ); + let app = new EmberApp(appOptions); - it( - 'add `app/styles` folder from add-ons', - co.wrap(function*() { - let addonFooStyles = yield createTempDir(); + let AddonFoo = Addon.extend({ + root: 'foo', + name: 'foo', + }); + let addonFoo = new AddonFoo(app, project); + app.project.addons.push(addonFoo); - addonFooStyles.write({ - app: { - styles: { - 'foo.css': 'foo', + let output = await buildOutput(app.getStyles()); + let outputFiles = output.read(); + + let expectedOutput; + if (isExperimentEnabled('MODULE_UNIFICATION')) { + expectedOutput = { + src: { + ui: { + styles: {}, }, }, - }); - - let appOptions = { project }; + }; + } else { + expectedOutput = {}; + } + expect(outputFiles).to.deep.equal(expectedOutput); - if (isExperimentEnabled('MODULE_UNIFICATION')) { - appOptions.trees = { src: {} }; - } + await output.dispose(); + }); - let app = new EmberApp(appOptions); + it('add `app/styles` folder from add-ons', async function() { + let addonFooStyles = await createTempDir(); - let AddonFoo = Addon.extend({ - root: 'foo', - name: 'foo', - treeForStyles() { - return addonFooStyles.path(); + addonFooStyles.write({ + app: { + styles: { + 'foo.css': 'foo', }, - }); - let addonFoo = new AddonFoo(app, project); - app.project.addons.push(addonFoo); + }, + }); - let output = yield buildOutput(app.getStyles()); - let outputFiles = output.read(); + let appOptions = { project }; - let expectedOutput; - if (isExperimentEnabled('MODULE_UNIFICATION')) { - expectedOutput = { - src: { - ui: { - styles: { - 'foo.css': 'foo', - }, - }, - }, - }; - } else { - expectedOutput = { - app: { + if (isExperimentEnabled('MODULE_UNIFICATION')) { + appOptions.trees = { src: {} }; + } + + let app = new EmberApp(appOptions); + + let AddonFoo = Addon.extend({ + root: 'foo', + name: 'foo', + treeForStyles() { + return addonFooStyles.path(); + }, + }); + let addonFoo = new AddonFoo(app, project); + app.project.addons.push(addonFoo); + + let output = await buildOutput(app.getStyles()); + let outputFiles = output.read(); + + let expectedOutput; + if (isExperimentEnabled('MODULE_UNIFICATION')) { + expectedOutput = { + src: { + ui: { styles: { 'foo.css': 'foo', }, }, - }; - } - expect(outputFiles).to.deep.equal(expectedOutput); - - yield addonFooStyles.dispose(); - yield output.dispose(); - }) - ); - - it( - 'returns add-ons styles files', - co.wrap(function*() { - let addonFooStyles = yield createTempDir(); - let addonBarStyles = yield createTempDir(); - - // `ember-basic-dropdown` - addonFooStyles.write({ + }, + }; + } else { + expectedOutput = { app: { styles: { 'foo.css': 'foo', }, }, - }); - // `ember-bootstrap` - addonBarStyles.write({ - baztrap: { - 'baztrap.css': '// baztrap.css', - }, - }); - - let app = new EmberApp({ - project, - }); - app.addonTreesFor = function() { - return [addonFooStyles.path(), addonBarStyles.path()]; }; + } + expect(outputFiles).to.deep.equal(expectedOutput); - let output = yield buildOutput(app.getStyles()); - let outputFiles = output.read(); + await addonFooStyles.dispose(); + await output.dispose(); + }); - expect(outputFiles).to.deep.equal({ - app: { - styles: { - 'foo.css': 'foo', - }, + it('returns add-ons styles files', async function() { + let addonFooStyles = await createTempDir(); + let addonBarStyles = await createTempDir(); + + // `ember-basic-dropdown` + addonFooStyles.write({ + app: { + styles: { + 'foo.css': 'foo', }, - baztrap: { - 'baztrap.css': '// baztrap.css', + }, + }); + // `ember-bootstrap` + addonBarStyles.write({ + baztrap: { + 'baztrap.css': '// baztrap.css', + }, + }); + + let app = new EmberApp({ + project, + }); + app.addonTreesFor = function() { + return [addonFooStyles.path(), addonBarStyles.path()]; + }; + + let output = await buildOutput(app.getStyles()); + let outputFiles = output.read(); + + expect(outputFiles).to.deep.equal({ + app: { + styles: { + 'foo.css': 'foo', }, - }); + }, + baztrap: { + 'baztrap.css': '// baztrap.css', + }, + }); - yield addonFooStyles.dispose(); - yield addonBarStyles.dispose(); - yield output.dispose(); - }) - ); + await addonFooStyles.dispose(); + await addonBarStyles.dispose(); + await output.dispose(); + }); - it( - 'does not fail if add-ons do not export styles', - co.wrap(function*() { - let app = new EmberApp({ - project, - }); - app.addonTreesFor = () => []; + it('does not fail if add-ons do not export styles', async function() { + let app = new EmberApp({ + project, + }); + app.addonTreesFor = () => []; - let output = yield buildOutput(app.getStyles()); - let outputFiles = output.read(); + let output = await buildOutput(app.getStyles()); + let outputFiles = output.read(); - expect(outputFiles).to.deep.equal({}); + expect(outputFiles).to.deep.equal({}); - yield output.dispose(); - }) - ); + await output.dispose(); + }); }); describe('getPublic()', function() { - it( - 'returns public files for app and add-ons', - co.wrap(function*() { - let input = yield createTempDir(); - let addonFooPublic = yield createTempDir(); - let addonBarPublic = yield createTempDir(); + it('returns public files for app and add-ons', async function() { + let input = await createTempDir(); + let addonFooPublic = await createTempDir(); + let addonBarPublic = await createTempDir(); - input.write({ + input.write({ + 'crossdomain.xml': '', + 'robots.txt': '', + }); + addonFooPublic.write({ + foo: 'foo', + }); + addonBarPublic.write({ + bar: 'bar', + }); + + app = new EmberApp({ + project, + }); + + app.trees.public = input.path(); + app.addonTreesFor = function() { + return [addonFooPublic.path(), addonBarPublic.path()]; + }; + + let output = await buildOutput(app.getPublic()); + let outputFiles = output.read(); + + expect(outputFiles).to.deep.equal({ + public: { 'crossdomain.xml': '', 'robots.txt': '', - }); - addonFooPublic.write({ foo: 'foo', - }); - addonBarPublic.write({ bar: 'bar', - }); + }, + }); - app = new EmberApp({ - project, - }); + await input.dispose(); + await addonFooPublic.dispose(); + await addonBarPublic.dispose(); + await output.dispose(); + }); - app.trees.public = input.path(); - app.addonTreesFor = function() { - return [addonFooPublic.path(), addonBarPublic.path()]; - }; + it('does not fail if app or add-ons have the same `public` folder structure', async function() { + let input = await createTempDir(); + let addonFooPublic = await createTempDir(); + let addonBarPublic = await createTempDir(); - let output = yield buildOutput(app.getPublic()); - let outputFiles = output.read(); + input.write({ + 'crossdomain.xml': '', + 'robots.txt': '', + }); + addonFooPublic.write({ + bar: 'bar', + foo: 'foo', + }); + addonBarPublic.write({ + bar: 'bar', + }); - expect(outputFiles).to.deep.equal({ - public: { - 'crossdomain.xml': '', - 'robots.txt': '', - foo: 'foo', - bar: 'bar', - }, - }); + app = new EmberApp({ + project, + }); - yield input.dispose(); - yield addonFooPublic.dispose(); - yield addonBarPublic.dispose(); - yield output.dispose(); - }) - ); + app.trees.public = input.path(); + app.addonTreesFor = function() { + return [addonFooPublic.path(), addonBarPublic.path()]; + }; - it( - 'does not fail if app or add-ons have the same `public` folder structure', - co.wrap(function*() { - let input = yield createTempDir(); - let addonFooPublic = yield createTempDir(); - let addonBarPublic = yield createTempDir(); + let output = await buildOutput(app.getPublic()); + let outputFiles = output.read(); - input.write({ + expect(outputFiles).to.deep.equal({ + public: { 'crossdomain.xml': '', 'robots.txt': '', - }); - addonFooPublic.write({ - bar: 'bar', foo: 'foo', - }); - addonBarPublic.write({ bar: 'bar', - }); - - app = new EmberApp({ - project, - }); - - app.trees.public = input.path(); - app.addonTreesFor = function() { - return [addonFooPublic.path(), addonBarPublic.path()]; - }; - - let output = yield buildOutput(app.getPublic()); - let outputFiles = output.read(); - - expect(outputFiles).to.deep.equal({ - public: { - 'crossdomain.xml': '', - 'robots.txt': '', - foo: 'foo', - bar: 'bar', - }, - }); + }, + }); - yield input.dispose(); - yield addonFooPublic.dispose(); - yield addonBarPublic.dispose(); - yield output.dispose(); - }) - ); + await input.dispose(); + await addonFooPublic.dispose(); + await addonBarPublic.dispose(); + await output.dispose(); + }); }); describe('getAddonTemplates()', function() { - it( - 'returns add-ons template files', - co.wrap(function*() { - let input = yield createTempDir(); - let addonFooTemplates = yield createTempDir(); - let addonBarTemplates = yield createTempDir(); - - addonFooTemplates.write({ - 'foo.hbs': 'foo', - }); - addonBarTemplates.write({ - 'bar.hbs': 'bar', - }); + it('returns add-ons template files', async function() { + let input = await createTempDir(); + let addonFooTemplates = await createTempDir(); + let addonBarTemplates = await createTempDir(); - let app = new EmberApp({ - project, - }); - app.trees.templates = input.path(); - app.addonTreesFor = function() { - return [addonFooTemplates.path(), addonBarTemplates.path()]; - }; + addonFooTemplates.write({ + 'foo.hbs': 'foo', + }); + addonBarTemplates.write({ + 'bar.hbs': 'bar', + }); - let output = yield buildOutput(app.getAddonTemplates()); - let outputFiles = output.read(); + let app = new EmberApp({ + project, + }); + app.trees.templates = input.path(); + app.addonTreesFor = function() { + return [addonFooTemplates.path(), addonBarTemplates.path()]; + }; - expect(outputFiles['test-project'].templates).to.deep.equal({ - 'foo.hbs': 'foo', - 'bar.hbs': 'bar', - }); + let output = await buildOutput(app.getAddonTemplates()); + let outputFiles = output.read(); - yield input.dispose(); - yield addonFooTemplates.dispose(); - yield addonBarTemplates.dispose(); - yield output.dispose(); - }) - ); + expect(outputFiles['test-project'].templates).to.deep.equal({ + 'foo.hbs': 'foo', + 'bar.hbs': 'bar', + }); + + await input.dispose(); + await addonFooTemplates.dispose(); + await addonBarTemplates.dispose(); + await output.dispose(); + }); }); describe('getTests()', function() { - it( - 'returns all test files `hinting` is enabled', - co.wrap(function*() { - let input = yield createTempDir(); - let addonLint = yield createTempDir(); - let addonFooTestSupport = yield createTempDir(); - let addonBarTestSupport = yield createTempDir(); - - input.write({ - acceptance: { - 'login-test.js': '', - 'logout-test.js': '', - }, - }); - addonFooTestSupport.write({ - 'foo-helper.js': 'foo', - }); - addonBarTestSupport.write({ - 'bar-helper.js': 'bar', - }); - addonLint.write({ - 'login-test.lint.js': '', - 'logout-test.lint.js': '', - }); + it('returns all test files `hinting` is enabled', async function() { + let input = await createTempDir(); + let addonLint = await createTempDir(); + let addonFooTestSupport = await createTempDir(); + let addonBarTestSupport = await createTempDir(); + + input.write({ + acceptance: { + 'login-test.js': '', + 'logout-test.js': '', + }, + }); + addonFooTestSupport.write({ + 'foo-helper.js': 'foo', + }); + addonBarTestSupport.write({ + 'bar-helper.js': 'bar', + }); + addonLint.write({ + 'login-test.lint.js': '', + 'logout-test.lint.js': '', + }); - let app = new EmberApp({ - project, - }); - app.trees.tests = input.path(); - app.addonLintTree = (type, tree) => { - if (type === 'tests') { - return addonLint.path(); - } + let app = new EmberApp({ + project, + }); + app.trees.tests = input.path(); + app.addonLintTree = (type, tree) => { + if (type === 'tests') { + return addonLint.path(); + } - return tree; - }; - app.addonTreesFor = function(type) { - if (type === 'test-support') { - return [addonFooTestSupport.path(), addonBarTestSupport.path()]; - } + return tree; + }; + app.addonTreesFor = function(type) { + if (type === 'test-support') { + return [addonFooTestSupport.path(), addonBarTestSupport.path()]; + } - return []; - }; + return []; + }; - let output = yield buildOutput(app.getTests()); - let outputFiles = output.read(); + let output = await buildOutput(app.getTests()); + let outputFiles = output.read(); - expect(outputFiles.tests).to.deep.equal({ - 'addon-test-support': {}, - lint: { - 'login-test.lint.js': '', - 'logout-test.lint.js': '', - }, - acceptance: { - 'login-test.js': '', - 'logout-test.js': '', - }, - 'foo-helper.js': 'foo', - 'bar-helper.js': 'bar', - }); + expect(outputFiles.tests).to.deep.equal({ + 'addon-test-support': {}, + lint: { + 'login-test.lint.js': '', + 'logout-test.lint.js': '', + }, + acceptance: { + 'login-test.js': '', + 'logout-test.js': '', + }, + 'foo-helper.js': 'foo', + 'bar-helper.js': 'bar', + }); - yield input.dispose(); - yield addonFooTestSupport.dispose(); - yield addonBarTestSupport.dispose(); - yield addonLint.dispose(); - yield output.dispose(); - }) - ); + await input.dispose(); + await addonFooTestSupport.dispose(); + await addonBarTestSupport.dispose(); + await addonLint.dispose(); + await output.dispose(); + }); - it( - 'returns test files w/o lint tests if `hinting` is disabled', - co.wrap(function*() { - let input = yield createTempDir(); - let addonFooTestSupport = yield createTempDir(); - let addonBarTestSupport = yield createTempDir(); + it('returns test files w/o lint tests if `hinting` is disabled', async function() { + let input = await createTempDir(); + let addonFooTestSupport = await createTempDir(); + let addonBarTestSupport = await createTempDir(); - input.write({ - acceptance: { - 'login-test.js': '', - 'logout-test.js': '', - }, - }); - addonFooTestSupport.write({ - 'foo-helper.js': 'foo', - }); - addonBarTestSupport.write({ - 'bar-helper.js': 'bar', - }); + input.write({ + acceptance: { + 'login-test.js': '', + 'logout-test.js': '', + }, + }); + addonFooTestSupport.write({ + 'foo-helper.js': 'foo', + }); + addonBarTestSupport.write({ + 'bar-helper.js': 'bar', + }); - let app = new EmberApp({ - project, - hinting: false, - }); - app.trees.tests = input.path(); - app.addonTreesFor = function(type) { - if (type === 'test-support') { - return [addonFooTestSupport.path(), addonBarTestSupport.path()]; - } + let app = new EmberApp({ + project, + hinting: false, + }); + app.trees.tests = input.path(); + app.addonTreesFor = function(type) { + if (type === 'test-support') { + return [addonFooTestSupport.path(), addonBarTestSupport.path()]; + } - return []; - }; + return []; + }; - let output = yield buildOutput(app.getTests()); - let outputFiles = output.read(); + let output = await buildOutput(app.getTests()); + let outputFiles = output.read(); - expect(outputFiles.tests).to.deep.equal({ - 'addon-test-support': {}, - acceptance: { - 'login-test.js': '', - 'logout-test.js': '', - }, - 'foo-helper.js': 'foo', - 'bar-helper.js': 'bar', - }); + expect(outputFiles.tests).to.deep.equal({ + 'addon-test-support': {}, + acceptance: { + 'login-test.js': '', + 'logout-test.js': '', + }, + 'foo-helper.js': 'foo', + 'bar-helper.js': 'bar', + }); - yield input.dispose(); - yield addonFooTestSupport.dispose(); - yield addonBarTestSupport.dispose(); - yield output.dispose(); - }) - ); + await input.dispose(); + await addonFooTestSupport.dispose(); + await addonBarTestSupport.dispose(); + await output.dispose(); + }); }); describe('constructor', function() { diff --git a/tests/unit/broccoli/ember-app/app-and-dependencies-test.js b/tests/unit/broccoli/ember-app/app-and-dependencies-test.js index a9be2fa7c9..f9e62c40f4 100644 --- a/tests/unit/broccoli/ember-app/app-and-dependencies-test.js +++ b/tests/unit/broccoli/ember-app/app-and-dependencies-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const broccoliTestHelper = require('broccoli-test-helper'); const expect = require('chai').expect; @@ -16,21 +15,20 @@ const { isExperimentEnabled } = require('../../../../lib/experiments'); describe('EmberApp#appAndDependencies', function() { let input, output; - beforeEach( - co.wrap(function*() { - process.env.EMBER_ENV = 'development'; + beforeEach(async function() { + process.env.EMBER_ENV = 'development'; - input = yield createTempDir(); + input = await createTempDir(); - input.write({ - node_modules: { - 'fake-template-preprocessor': { - 'package.json': JSON.stringify({ - name: 'fake-template-preprocessor', - main: 'index.js', - keywords: ['ember-addon'], - }), - 'index.js': ` + input.write({ + node_modules: { + 'fake-template-preprocessor': { + 'package.json': JSON.stringify({ + name: 'fake-template-preprocessor', + main: 'index.js', + keywords: ['ember-addon'], + }), + 'index.js': ` module.exports = { name: 'fake-template-preprocessor', setupPreprocessorRegistry(type, registry) { @@ -43,25 +41,22 @@ describe('EmberApp#appAndDependencies', function() { } }; `, - }, }, - config: { - 'environment.js': `module.exports = function() { return { modulePrefix: 'test-app' }; };`, - }, - }); - }) - ); + }, + config: { + 'environment.js': `module.exports = function() { return { modulePrefix: 'test-app' }; };`, + }, + }); + }); - afterEach( - co.wrap(function*() { - delete process.env.EMBER_ENV; - yield input.dispose(); + afterEach(async function() { + delete process.env.EMBER_ENV; + await input.dispose(); - if (output) { - yield output.dispose(); - } - }) - ); + if (output) { + await output.dispose(); + } + }); function createApp(options) { options = options || {}; @@ -95,9 +90,52 @@ describe('EmberApp#appAndDependencies', function() { }); } - it( - 'moduleNormalizerDisabled', - co.wrap(function*() { + it('moduleNormalizerDisabled', async function() { + input.write({ + node_modules: { + 'my-addon': { + addon: { + 'index.js': `define('amd', function() {});`, + }, + 'package.json': JSON.stringify({ + name: 'my-addon', + main: 'index.js', + keywords: ['ember-addon'], + }), + 'index.js': ` + module.exports = { + name: 'my-addon', + setupPreprocessorRegistry(type, registry) { + registry.add('template', { ext: 'hbs', toTree(tree) { return tree; } }); + registry.add('js', { ext: 'js', toTree(tree) { return tree; } }); + }, + } + `, + }, + }, + }); + + let app = createApp({ + moduleNormalizerDisabled: true, + }); + + let addon = app.project.findAddonByName('my-addon'); + + addon.treeForAddon = tree => { + const Funnel = require('broccoli-funnel'); + return new Funnel(tree, { + destDir: 'modules/my-addon', + }); + }; + + output = await buildOutput(app.getExternalTree()); + let actualFiles = getFiles(output.path()); + + expect(actualFiles).to.contain('addon-tree-output/modules/my-addon/index.js'); + }); + + if (isExperimentEnabled('DELAYED_TRANSPILATION')) { + it('amdFunnelDisabled', async function() { input.write({ node_modules: { 'my-addon': { @@ -123,165 +161,107 @@ describe('EmberApp#appAndDependencies', function() { }); let app = createApp({ - moduleNormalizerDisabled: true, + amdFunnelDisabled: true, }); - let addon = app.project.findAddonByName('my-addon'); + let tree; - addon.treeForAddon = tree => { - const Funnel = require('broccoli-funnel'); - return new Funnel(tree, { - destDir: 'modules/my-addon', - }); - }; + app.registry.add('js', { + ext: 'js', + toTree(_tree) { + tree = _tree; + return _tree; + }, + }); + + app.addonTree(); + app._legacyAddonCompile('addon', 'addon-tree-output'); - output = yield buildOutput(app.getExternalTree()); + output = await buildOutput(tree); let actualFiles = getFiles(output.path()); - expect(actualFiles).to.contain('addon-tree-output/modules/my-addon/index.js'); - }) - ); + expect(actualFiles).to.deep.equal(['my-addon/index.js']); + }); - if (isExperimentEnabled('DELAYED_TRANSPILATION')) { - it( - 'amdFunnelDisabled', - co.wrap(function*() { - input.write({ - node_modules: { - 'my-addon': { - addon: { - 'index.js': `define('amd', function() {});`, - }, - 'package.json': JSON.stringify({ - name: 'my-addon', - main: 'index.js', - keywords: ['ember-addon'], - }), - 'index.js': ` - module.exports = { - name: 'my-addon', - setupPreprocessorRegistry(type, registry) { - registry.add('template', { ext: 'hbs', toTree(tree) { return tree; } }); - registry.add('js', { ext: 'js', toTree(tree) { return tree; } }); - }, - } - `, - }, - }, - }); + it('uses preprocessor that is marked by default', async function() { + let app = createApp(); - let app = createApp({ - amdFunnelDisabled: true, - }); + app.registry.add('js', { + ext: 'js', + name: 'addon1', + isDefaultForType: true, + toTree(tree) { + return tree; + }, + }); - let tree; + app.registry.add('js', { + ext: 'js', + name: 'addon2', + toTree(tree) { + expect(true).to.equal(false); + return tree; + }, + }); - app.registry.add('js', { - ext: 'js', - toTree(_tree) { - tree = _tree; - return _tree; - }, - }); + await buildOutput(app.addonTree()); + }); - app.addonTree(); - app._legacyAddonCompile('addon', 'addon-tree-output'); + it('uses all registered preprocessors if none is marked by default', async function() { + let count = 0; + let app = createApp(); - output = yield buildOutput(tree); - let actualFiles = getFiles(output.path()); + app.registry.add('js', { + ext: 'js', + name: 'addon1', + toTree(tree) { + count++; + return tree; + }, + }); - expect(actualFiles).to.deep.equal(['my-addon/index.js']); - }) - ); + app.registry.add('js', { + ext: 'js', + name: 'addon2', + toTree(tree) { + count++; + return tree; + }, + }); - it( - 'uses preprocessor that is marked by default', - co.wrap(function*() { - let app = createApp(); - - app.registry.add('js', { - ext: 'js', - name: 'addon1', - isDefaultForType: true, - toTree(tree) { - return tree; - }, - }); + app.addonTree(); - app.registry.add('js', { - ext: 'js', - name: 'addon2', - toTree(tree) { - expect(true).to.equal(false); - return tree; - }, - }); + await buildOutput(app._legacyAddonCompile('addon', 'addon-tree-output')); - yield buildOutput(app.addonTree()); - }) - ); + expect(count).to.equal(2); + }); - it( - 'uses all registered preprocessors if none is marked by default', - co.wrap(function*() { - let count = 0; - let app = createApp(); - - app.registry.add('js', { - ext: 'js', - name: 'addon1', - toTree(tree) { - count++; - return tree; - }, - }); + it('throws an exception if more than one preprocessor is marked as default', async function() { + let exceptionMessage; + let app = createApp(); - app.registry.add('js', { - ext: 'js', - name: 'addon2', - toTree(tree) { - count++; - return tree; - }, - }); + app.registry.add('template', { + ext: 'hbs', + name: 'faulty-addon', + isDefaultForType: true, + toTree(tree) { + return tree; + }, + }); + await (async function() { app.addonTree(); - yield buildOutput(app._legacyAddonCompile('addon', 'addon-tree-output')); - - expect(count).to.equal(2); - }) - ); - - it( - 'throws an exception if more than one preprocessor is marked as default', - co.wrap(function*() { - let exceptionMessage; - let app = createApp(); - - app.registry.add('template', { - ext: 'hbs', - name: 'faulty-addon', - isDefaultForType: true, - toTree(tree) { - return tree; - }, - }); - - yield co(function*() { - app.addonTree(); - - output = yield buildOutput(app._legacyAddonCompile('addon', 'addon-tree-output')); + output = await buildOutput(app._legacyAddonCompile('addon', 'addon-tree-output')); + })() + .catch(e => { + exceptionMessage = e.message; }) - .catch(e => { - exceptionMessage = e.message; - }) - .then(() => { - expect(exceptionMessage).to.equal( - `There are multiple preprocessor plugins marked as default for 'template': fake-template-preprocessor, faulty-addon` - ); - }); - }) - ); + .then(() => { + expect(exceptionMessage).to.equal( + `There are multiple preprocessor plugins marked as default for 'template': fake-template-preprocessor, faulty-addon` + ); + }); + }); } }); diff --git a/tests/unit/broccoli/ember-app/import-test.js b/tests/unit/broccoli/ember-app/import-test.js index e50bc794e4..a5dabdcfed 100644 --- a/tests/unit/broccoli/ember-app/import-test.js +++ b/tests/unit/broccoli/ember-app/import-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const path = require('path'); const broccoliTestHelper = require('broccoli-test-helper'); const expect = require('chai').expect; @@ -25,148 +24,132 @@ describe('EmberApp: Bower Dependencies', function() { 'moment.min.js': 'window.moment = "verysmallmoment"', }); - beforeEach( - co.wrap(function*() { - applicationDirectory = yield createTempDir(); - }) - ); + beforeEach(async function() { + applicationDirectory = await createTempDir(); + }); - afterEach( - co.wrap(function*() { - yield applicationDirectory.dispose(); - yield output.dispose(); - }) - ); + afterEach(async function() { + await applicationDirectory.dispose(); + await output.dispose(); + }); /* * Both Ember.js and jQuery are packaged by default (when distriburted * through bower). `ember-source` takes precedent over bower though. */ - it( - 'are not packaged unless explicitly imported', - co.wrap(function*() { - // Given - applicationDirectory.write( - getDefaultUnpackagedDist('the-best-app-ever', { - bowerComponents: Object.assign({}, moment), - }) - ); - - let applicationInstance = new EmberApp({ - name: 'the-best-app-ever', - project: setupProject(path.join(applicationDirectory.path(), 'the-best-app-ever')), - }); - - // When - let packagedApplicationJs = applicationInstance._defaultPackager.packageJavascript(applicationDirectory.path()); - - // Then - output = yield buildOutput(packagedApplicationJs); - let results = output.read(); - - expect(() => { - validateDefaultPackagedDist('the-best-app-ever', results); - }).not.to.throw(); - expect(results.assets['vendor.js']).to.contain('window.Ember = {'); - expect(results.assets['vendor.js']).to.contain('window.$ = function() {'); - expect(results.assets['vendor.js']).to.not.contain('window.moment'); - }) - ); - - it( - 'are packaged when explicitly imported', - co.wrap(function*() { - // Given - applicationDirectory.write( - getDefaultUnpackagedDist('the-best-app-ever', { - bowerComponents: Object.assign({}, moment), - }) - ); - let applicationInstance = new EmberApp({ - name: 'the-best-app-ever', - project: setupProject(path.join(applicationDirectory.path(), 'the-best-app-ever')), - }); - applicationInstance.import('bower_components/moment/moment.js'); - - // When - let packagedApplicationJs = applicationInstance._defaultPackager.packageJavascript(applicationDirectory.path()); - - // Then - output = yield buildOutput(packagedApplicationJs); - let results = output.read(); - - expect(() => { - validateDefaultPackagedDist('the-best-app-ever', results); - }).not.to.throw(); - expect(results.assets['vendor.js']).to.contain('window.Ember = {'); - expect(results.assets['vendor.js']).to.contain('window.$ = function() {'); - expect(results.assets['vendor.js']).to.contain('window.moment'); - }) - ); - - it( - 'are packaged when explicitly imported for production', - co.wrap(function*() { - // Given - applicationDirectory.write( - getDefaultUnpackagedDist('the-best-app-ever', { - bowerComponents: Object.assign({}, moment), - }) - ); - - let applicationInstance = new EmberApp({ - name: 'the-best-app-ever', - project: setupProject(path.join(applicationDirectory.path(), 'the-best-app-ever')), - }); - applicationInstance.env = 'production'; - applicationInstance.import({ - development: 'bower_components/moment/moment.js', - production: 'bower_components/moment/moment.min.js', - }); - - // When - let packagedApplicationJs = applicationInstance._defaultPackager.packageJavascript(applicationDirectory.path()); - - // Then - output = yield buildOutput(packagedApplicationJs); - let results = output.read(); - - expect(() => { - validateDefaultPackagedDist('the-best-app-ever', results); - }).not.to.throw(); - expect(results.assets['vendor.js']).to.contain('verysmallmoment'); - }) - ); - - it( - 'are packaged when explicitly imported for development', - co.wrap(function*() { - // Given - applicationDirectory.write( - getDefaultUnpackagedDist('the-best-app-ever', { - bowerComponents: Object.assign({}, moment), - }) - ); - let applicationInstance = new EmberApp({ - name: 'the-best-app-ever', - project: setupProject(path.join(applicationDirectory.path(), 'the-best-app-ever')), - }); - applicationInstance.import({ - development: 'bower_components/moment/moment.js', - production: 'bower_components/moment/moment.min.js', - }); - - // When - let packagedApplicationJs = applicationInstance._defaultPackager.packageJavascript(applicationDirectory.path()); - - // Then - output = yield buildOutput(packagedApplicationJs); - let results = output.read(); - - expect(() => { - validateDefaultPackagedDist('the-best-app-ever', results); - }).not.to.throw(); - expect(results.assets['vendor.js']).to.contain('window.moment'); - }) - ); + it('are not packaged unless explicitly imported', async function() { + // Given + applicationDirectory.write( + getDefaultUnpackagedDist('the-best-app-ever', { + bowerComponents: Object.assign({}, moment), + }) + ); + + let applicationInstance = new EmberApp({ + name: 'the-best-app-ever', + project: setupProject(path.join(applicationDirectory.path(), 'the-best-app-ever')), + }); + + // When + let packagedApplicationJs = applicationInstance._defaultPackager.packageJavascript(applicationDirectory.path()); + + // Then + output = await buildOutput(packagedApplicationJs); + let results = output.read(); + + expect(() => { + validateDefaultPackagedDist('the-best-app-ever', results); + }).not.to.throw(); + expect(results.assets['vendor.js']).to.contain('window.Ember = {'); + expect(results.assets['vendor.js']).to.contain('window.$ = function() {'); + expect(results.assets['vendor.js']).to.not.contain('window.moment'); + }); + + it('are packaged when explicitly imported', async function() { + // Given + applicationDirectory.write( + getDefaultUnpackagedDist('the-best-app-ever', { + bowerComponents: Object.assign({}, moment), + }) + ); + let applicationInstance = new EmberApp({ + name: 'the-best-app-ever', + project: setupProject(path.join(applicationDirectory.path(), 'the-best-app-ever')), + }); + applicationInstance.import('bower_components/moment/moment.js'); + + // When + let packagedApplicationJs = applicationInstance._defaultPackager.packageJavascript(applicationDirectory.path()); + + // Then + output = await buildOutput(packagedApplicationJs); + let results = output.read(); + + expect(() => { + validateDefaultPackagedDist('the-best-app-ever', results); + }).not.to.throw(); + expect(results.assets['vendor.js']).to.contain('window.Ember = {'); + expect(results.assets['vendor.js']).to.contain('window.$ = function() {'); + expect(results.assets['vendor.js']).to.contain('window.moment'); + }); + + it('are packaged when explicitly imported for production', async function() { + // Given + applicationDirectory.write( + getDefaultUnpackagedDist('the-best-app-ever', { + bowerComponents: Object.assign({}, moment), + }) + ); + + let applicationInstance = new EmberApp({ + name: 'the-best-app-ever', + project: setupProject(path.join(applicationDirectory.path(), 'the-best-app-ever')), + }); + applicationInstance.env = 'production'; + applicationInstance.import({ + development: 'bower_components/moment/moment.js', + production: 'bower_components/moment/moment.min.js', + }); + + // When + let packagedApplicationJs = applicationInstance._defaultPackager.packageJavascript(applicationDirectory.path()); + + // Then + output = await buildOutput(packagedApplicationJs); + let results = output.read(); + + expect(() => { + validateDefaultPackagedDist('the-best-app-ever', results); + }).not.to.throw(); + expect(results.assets['vendor.js']).to.contain('verysmallmoment'); + }); + + it('are packaged when explicitly imported for development', async function() { + // Given + applicationDirectory.write( + getDefaultUnpackagedDist('the-best-app-ever', { + bowerComponents: Object.assign({}, moment), + }) + ); + let applicationInstance = new EmberApp({ + name: 'the-best-app-ever', + project: setupProject(path.join(applicationDirectory.path(), 'the-best-app-ever')), + }); + applicationInstance.import({ + development: 'bower_components/moment/moment.js', + production: 'bower_components/moment/moment.min.js', + }); + + // When + let packagedApplicationJs = applicationInstance._defaultPackager.packageJavascript(applicationDirectory.path()); + + // Then + output = await buildOutput(packagedApplicationJs); + let results = output.read(); + + expect(() => { + validateDefaultPackagedDist('the-best-app-ever', results); + }).not.to.throw(); + expect(results.assets['vendor.js']).to.contain('window.moment'); + }); }); diff --git a/tests/unit/settings-file/leek-options-test.js b/tests/unit/settings-file/leek-options-test.js index deeb4ce530..52cc0b33db 100644 --- a/tests/unit/settings-file/leek-options-test.js +++ b/tests/unit/settings-file/leek-options-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const expect = require('chai').expect; const MockUI = require('console-ui/mock'); const Yam = require('yam'); @@ -13,48 +12,44 @@ const createTempDir = broccoliTestHelper.createTempDir; describe('.ember-cli leek options', function() { let passedOptions, leekConfigFolder; - before( - co.wrap(function*() { - leekConfigFolder = yield createTempDir(); - - leekConfigFolder.write({ - '.ember-cli': JSON.stringify({ - leekOptions: { - adapterUrls: { - event: 'http://www.example.com/event', - exception: 'http://www.example.com/error', - timing: 'http://www.example.com/timing', - appview: 'http://www.example.com/track', - }, + before(async function() { + leekConfigFolder = await createTempDir(); + + leekConfigFolder.write({ + '.ember-cli': JSON.stringify({ + leekOptions: { + adapterUrls: { + event: 'http://www.example.com/event', + exception: 'http://www.example.com/error', + timing: 'http://www.example.com/timing', + appview: 'http://www.example.com/track', }, - }), - }); - - let primaryPath = leekConfigFolder.path(); - - yield buildOutput(primaryPath); - - let mockedYam = new Yam('ember-cli', { - primary: primaryPath, - }); - - let mockedLeek = function(options) { - passedOptions = options; - }; - - cliEntry({ - UI: MockUI, - Leek: mockedLeek, - Yam: mockedYam, - }); - }) - ); - - after( - co.wrap(function*() { - yield leekConfigFolder.dispose(); - }) - ); + }, + }), + }); + + let primaryPath = leekConfigFolder.path(); + + await buildOutput(primaryPath); + + let mockedYam = new Yam('ember-cli', { + primary: primaryPath, + }); + + let mockedLeek = function(options) { + passedOptions = options; + }; + + cliEntry({ + UI: MockUI, + Leek: mockedLeek, + Yam: mockedYam, + }); + }); + + after(async function() { + await leekConfigFolder.dispose(); + }); it('should contain the leek options from .ember-cli file', function() { expect(passedOptions.adapterUrls).to.contain.keys(['event', 'exception', 'timing', 'appview']); diff --git a/tests/unit/tasks/server/express-server-test.js b/tests/unit/tasks/server/express-server-test.js index 59e9b25eac..88996bab7b 100644 --- a/tests/unit/tasks/server/express-server-test.js +++ b/tests/unit/tasks/server/express-server-test.js @@ -14,7 +14,6 @@ const net = require('net'); const EOL = require('os').EOL; const nock = require('nock'); const express = require('express'); -const co = require('co'); const WebSocket = require('websocket').w3cwebsocket; function checkMiddlewareOptions(options) { @@ -314,38 +313,35 @@ describe('express-server', function() { }); }); - it( - 'does not use compression for server sent events', - co.wrap(function*() { - project.require = function() { - let app = express(); - app.use('/foo', function(req, res) { - res.set('Content-Type', 'text/event-stream'); - res.send(longText); - }); - return app; - }; - - yield subject.start({ - proxy: 'http://localhost:3001/', - host: undefined, - port: '1337', - rootURL: '/', - compression: true, + it('does not use compression for server sent events', async function() { + project.require = function() { + let app = express(); + app.use('/foo', function(req, res) { + res.set('Content-Type', 'text/event-stream'); + res.send(longText); }); + return app; + }; - yield request(subject.app) - .get('/foo') - .set('accept', 'application/json, */*') - .expect(function(res) { - expect(res.text).to.equal(longText); - expect(res.header['content-encoding']).to.not.exist; - expect(parseInt(res.header['content-length'], 10)).to.equal(longText.length); - }); + await subject.start({ + proxy: 'http://localhost:3001/', + host: undefined, + port: '1337', + rootURL: '/', + compression: true, + }); - expect(proxy.called).to.equal(false); - }) - ); + await request(subject.app) + .get('/foo') + .set('accept', 'application/json, */*') + .expect(function(res) { + expect(res.text).to.equal(longText); + expect(res.header['content-encoding']).to.not.exist; + expect(parseInt(res.header['content-length'], 10)).to.equal(longText.length); + }); + + expect(proxy.called).to.equal(false); + }); }); describe('with proxy', function() { diff --git a/tests/unit/utilities/load-config-test.js b/tests/unit/utilities/load-config-test.js index 8808414cb8..a220b48fd2 100644 --- a/tests/unit/utilities/load-config-test.js +++ b/tests/unit/utilities/load-config-test.js @@ -1,6 +1,5 @@ 'use strict'; -const co = require('co'); const expect = require('chai').expect; const path = require('path'); const loadConfig = require('../../../lib/utilities/load-config'); @@ -12,30 +11,26 @@ const createTempDir = broccoliTestHelper.createTempDir; describe('load-config', function() { let fixtureDirectoryPath, fixtureDirectory; - before( - co.wrap(function*() { - fixtureDirectory = yield createTempDir(); - fixtureDirectoryPath = fixtureDirectory.path(); - - fixtureDirectory.write({ - '.something': 'hello: world\n', - '.travis.yaml': 'hello: world', - '.travis.yml': 'hello: world', - 'package.json': '{ "hello": "world" }', - child: { - 'test.json': '{ "hello": "world" }', - }, - }); - - yield buildOutput(fixtureDirectoryPath); - }) - ); + before(async function() { + fixtureDirectory = await createTempDir(); + fixtureDirectoryPath = fixtureDirectory.path(); + + fixtureDirectory.write({ + '.something': 'hello: world\n', + '.travis.yaml': 'hello: world', + '.travis.yml': 'hello: world', + 'package.json': '{ "hello": "world" }', + child: { + 'test.json': '{ "hello": "world" }', + }, + }); + + await buildOutput(fixtureDirectoryPath); + }); - after( - co.wrap(function*() { - yield fixtureDirectory.dispose(); - }) - ); + after(async function() { + await fixtureDirectory.dispose(); + }); it('loads and parses a yml file', function() { expect(loadConfig('.travis.yml', fixtureDirectoryPath).hello).to.equal('world'); diff --git a/yarn.lock b/yarn.lock index 48bb34d037..cac2743b6c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1423,11 +1423,6 @@ clone@^2.1.2: resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= - code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" From 536968997e55374273ec440df58dcd87d91cb305 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 18 Dec 2019 12:06:03 -0500 Subject: [PATCH 143/818] Update GitHub Actions setup to use TAP output. The other CI systems already use TAP output, but GitHub Actions didn't (because we don't set `CI` environment variable in our config, and they don't set it automatically). Using TAP output in CI makes it possible to Cmd+F (or Ctrl+F) for "not ok" to jump directly to the failing tests, otherwise with the standard Mocha `spec` reporter it is quite difficult to jump to the failures. --- tests/runner.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/runner.js b/tests/runner.js index 6025be20da..ec111153de 100644 --- a/tests/runner.js +++ b/tests/runner.js @@ -17,7 +17,8 @@ fs.removeSync('.deps-tmp'); let root = 'tests/{unit,integration,acceptance}'; let optionOrFile = process.argv[2]; // default to `tap` reporter in CI otherwise default to `spec` -let reporter = process.env.MOCHA_REPORTER || (process.env.CI ? 'tap' : 'spec'); +let isCI = process.env.CI || process.env.GITHUB_ACTIONS; +let reporter = process.env.MOCHA_REPORTER || (isCI ? 'tap' : 'spec'); let mocha = new Mocha({ timeout: 5000, reporter, From 2d12f9f532ccd403c835a629a7c8b151bc22031a Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 18 Dec 2019 11:06:19 -0500 Subject: [PATCH 144/818] Update ember-resolver to v7.0.0. The primary breaking change is that it drops support for Module Unification. --- blueprints/app/files/package.json | 2 +- tests/fixtures/addon/npm/package.json | 2 +- tests/fixtures/addon/simple/package.json | 2 +- tests/fixtures/addon/with-app-styles/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/npm/package.json | 2 +- tests/fixtures/app/yarn/package.json | 2 +- tests/fixtures/brocfile-tests/query/package.json | 2 +- tests/fixtures/project-with-handlebars/package.json | 2 +- tests/unit/models/project-test.js | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 01a97f21ef..50ea190027 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -39,7 +39,7 @@ "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", - "ember-resolver": "^6.0.0", + "ember-resolver": "^7.0.0", "ember-source": "~3.15.0<% if (welcome) { %>", "ember-welcome-page": "^4.0.0<% } %>", "eslint-plugin-ember": "^7.7.1", diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index 16020af028..a0ba93de7d 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -42,7 +42,7 @@ "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", - "ember-resolver": "^6.0.0", + "ember-resolver": "^7.0.0", "ember-source": "~3.15.0", "ember-source-channel-url": "^2.0.1", "ember-try": "^1.4.0", diff --git a/tests/fixtures/addon/simple/package.json b/tests/fixtures/addon/simple/package.json index 077cd9c130..e1db417e4b 100644 --- a/tests/fixtures/addon/simple/package.json +++ b/tests/fixtures/addon/simple/package.json @@ -8,7 +8,7 @@ "paths": ["./lib/ember-super-button"] }, "devDependencies": { - "ember-resolver": "^5.0.1", + "ember-resolver": "^7.0.0", "ember-cli": "latest", "ember-random-addon": "latest", "ember-non-root-addon": "latest", diff --git a/tests/fixtures/addon/with-app-styles/package.json b/tests/fixtures/addon/with-app-styles/package.json index e22086c4b8..e069a08539 100644 --- a/tests/fixtures/addon/with-app-styles/package.json +++ b/tests/fixtures/addon/with-app-styles/package.json @@ -8,7 +8,7 @@ "paths": ["./lib/ember-super-button"] }, "devDependencies": { - "ember-resolver": "^5.0.1", + "ember-resolver": "^7.0.0", "ember-cli": "latest", "ember-random-addon": "latest", "ember-non-root-addon": "latest", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 6ec54c16d8..9b3db21251 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -42,7 +42,7 @@ "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", - "ember-resolver": "^6.0.0", + "ember-resolver": "^7.0.0", "ember-source": "~3.15.0", "ember-source-channel-url": "^2.0.1", "ember-try": "^1.4.0", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 647c33b48b..ca6d0fe95a 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -39,7 +39,7 @@ "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", - "ember-resolver": "^6.0.0", + "ember-resolver": "^7.0.0", "ember-source": "~3.15.0", "eslint-plugin-ember": "^7.7.1", "eslint-plugin-node": "^10.0.0", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index d893968595..355eee6aba 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -39,7 +39,7 @@ "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", - "ember-resolver": "^6.0.0", + "ember-resolver": "^7.0.0", "ember-source": "~3.15.0", "ember-welcome-page": "^4.0.0", "eslint-plugin-ember": "^7.7.1", diff --git a/tests/fixtures/brocfile-tests/query/package.json b/tests/fixtures/brocfile-tests/query/package.json index 650ce9123a..443fa3735f 100644 --- a/tests/fixtures/brocfile-tests/query/package.json +++ b/tests/fixtures/brocfile-tests/query/package.json @@ -3,7 +3,7 @@ "dependencies": { "ember-cli": "*", "ember-cli-htmlbars": "^3.0.0", - "ember-resolver": "^5.0.1", + "ember-resolver": "^7.0.0", "loader.js": "latest" } } diff --git a/tests/fixtures/project-with-handlebars/package.json b/tests/fixtures/project-with-handlebars/package.json index 8a9407a41f..02566f3ea1 100644 --- a/tests/fixtures/project-with-handlebars/package.json +++ b/tests/fixtures/project-with-handlebars/package.json @@ -7,7 +7,7 @@ }, "devDependencies": { "ember-cli": "latest", - "ember-resolver": "^5.0.1", + "ember-resolver": "^7.0.0", "loader.js": "*" } } diff --git a/tests/unit/models/project-test.js b/tests/unit/models/project-test.js index 59f94db5bf..273d377b46 100644 --- a/tests/unit/models/project-test.js +++ b/tests/unit/models/project-test.js @@ -303,7 +303,7 @@ describe('models/project.js', function() { let expected = { 'ember-cli': 'latest', 'ember-random-addon': 'latest', - 'ember-resolver': '^5.0.1', + 'ember-resolver': '^7.0.0', 'ember-non-root-addon': 'latest', 'ember-generated-with-export-addon': 'latest', 'non-ember-thingy': 'latest', From d6b07d6717799edc87b99242965a3f0cecb3b330 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 18 Dec 2019 14:45:31 -0500 Subject: [PATCH 145/818] Fix PackageInfoCache assertions to work properly in Windows. --- .../unit/models/package-info-cache/package-info-cache-test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/models/package-info-cache/package-info-cache-test.js b/tests/unit/models/package-info-cache/package-info-cache-test.js index 5deb906ef6..7218917e8a 100644 --- a/tests/unit/models/package-info-cache/package-info-cache-test.js +++ b/tests/unit/models/package-info-cache/package-info-cache-test.js @@ -205,14 +205,14 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { it('shows a warning with invalid ember-addon#path', function() { project.discoverAddons(); expect(project.cli.ui.output).to.include( - "specifies an invalid, malformed or missing addon at relative path 'lib/no-such-path'" + `specifies an invalid, malformed or missing addon at relative path 'lib${path.sep}no-such-path'` ); }); it('throws an error with flag on', function() { process.env.EMBER_CLI_ERROR_ON_INVALID_ADDON = 'true'; expect(() => project.discoverAddons()).to.throw( - /specifies an invalid, malformed or missing addon at relative path 'lib\/no-such-path'/ + /specifies an invalid, malformed or missing addon at relative path 'lib[\\/]no-such-path'/ ); }); }); From 1b870bf1adc08743101a95c07400e925dce3710f Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 4 Dec 2019 05:23:53 +0000 Subject: [PATCH 146/818] Bump prettier from 1.17.0 to 1.19.1 Bumps [prettier](https://github.com/prettier/prettier) from 1.17.0 to 1.19.1. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/1.17.0...1.19.1) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index bf346a50b3..545ab2b824 100644 --- a/package.json +++ b/package.json @@ -149,7 +149,7 @@ "mocha": "^6.2.1", "nock": "^11.7.0", "nyc": "^14.1.0", - "prettier": "1.17.0", + "prettier": "1.19.1", "rimraf": "^3.0.0", "strip-ansi": "^6.0.0", "supertest": "^4.0.2", diff --git a/yarn.lock b/yarn.lock index cac2743b6c..62d7a20d35 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5129,10 +5129,10 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@1.17.0: - version "1.17.0" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.17.0.tgz#53b303676eed22cc14a9f0cec09b477b3026c008" - integrity sha512-sXe5lSt2WQlCbydGETgfm1YBShgOX4HxQkFPvbxkcwgDvGDeqVau8h+12+lmSVlP3rHPz0oavfddSZg/q+Szjw== +prettier@1.19.1: + version "1.19.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" + integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== printf@^0.5.1: version "0.5.1" From 85bc370df5357044a20c60ad8da46be2f13a11f6 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 18 Dec 2019 14:36:20 -0500 Subject: [PATCH 147/818] Fixup linting failures after updating Prettier. ``` yarn lint --fix ``` --- lib/broccoli/ember-app.js | 21 +++++++++----------- lib/commands/new.js | 4 +--- lib/commands/serve.js | 4 +--- lib/models/addon.js | 12 +++-------- lib/utilities/find-addon-by-name.js | 4 +--- lib/utilities/get-serve-url.js | 2 +- tests/integration/models/blueprint-test.js | 20 +++++++++++++++---- tests/unit/utilities/ember-app-utils-test.js | 5 ++++- 8 files changed, 36 insertions(+), 36 deletions(-) diff --git a/lib/broccoli/ember-app.js b/lib/broccoli/ember-app.js index 826b096f27..af23e41310 100644 --- a/lib/broccoli/ember-app.js +++ b/lib/broccoli/ember-app.js @@ -589,9 +589,7 @@ class EmberApp { if (semver.lt(version, '6.0.0') && !roots[babelInstance.root]) { roots[babelInstance.root] = true; this.project.ui.writeDeprecateLine( - `ember-cli-babel 5.x has been deprecated. Please upgrade to at least ember-cli-babel 6.6. Version ${version} located: ${ - babelInstance.root - }` + `ember-cli-babel 5.x has been deprecated. Please upgrade to at least ember-cli-babel 6.6. Version ${version} located: ${babelInstance.root}` ); } } @@ -689,11 +687,7 @@ class EmberApp { if (this._customTransformsMap.has(transformName)) { // there is already a transform with a same name, therefore we warn the user this.project.ui.writeWarnLine( - `Addon "${ - addon.name - }" is defining a transform name: ${transformName} that is already being defined. Using transform from addon: "${ - addon.name - }".` + `Addon "${addon.name}" is defining a transform name: ${transformName} that is already being defined. Using transform from addon: "${addon.name}".` ); } @@ -1240,10 +1234,13 @@ class EmberApp { createAddonTree(type, outputDir, options) { let addonBundles = this._addonBundles(type, options); - let tree = mergeTrees(addonBundles.map(({ tree }) => tree), { - overwrite: true, - annotation: `TreeMerger (${type})`, - }); + let tree = mergeTrees( + addonBundles.map(({ tree }) => tree), + { + overwrite: true, + annotation: `TreeMerger (${type})`, + } + ); return new Funnel(tree, { destDir: outputDir, diff --git a/lib/commands/new.js b/lib/commands/new.js index 767ef49ea1..4c61ca10ab 100644 --- a/lib/commands/new.js +++ b/lib/commands/new.js @@ -46,9 +46,7 @@ module.exports = Command.extend({ commandOptions.name = rawArgs.shift(); if (!packageName) { - message = `The \`ember ${ - this.name - }\` command requires a name to be specified. For more details, use \`ember help\`.`; + message = `The \`ember ${this.name}\` command requires a name to be specified. For more details, use \`ember help\`.`; return Promise.reject(new SilentError(message)); } diff --git a/lib/commands/serve.js b/lib/commands/serve.js index b7f1f3da5e..9d3c958148 100644 --- a/lib/commands/serve.js +++ b/lib/commands/serve.js @@ -98,9 +98,7 @@ module.exports = Command.extend({ return this._checkExpressPort(commandOptions).then(commandOptions => { if (commandOptions.proxy) { if (!/^(http:|https:)/.test(commandOptions.proxy)) { - let message = `You need to include a protocol with the proxy URL.${EOL}Try --proxy http://${ - commandOptions.proxy - }`; + let message = `You need to include a protocol with the proxy URL.${EOL}Try --proxy http://${commandOptions.proxy}`; return Promise.reject(new SilentError(message)); } diff --git a/lib/models/addon.js b/lib/models/addon.js index c0e0748b16..e7be4cda60 100644 --- a/lib/models/addon.js +++ b/lib/models/addon.js @@ -447,9 +447,7 @@ let addonProto = { throw new SilentError( 'Your names in package.json and index.js should match. ' + - `The addon in ${pathToDisplay} currently have '${parentName}' in package.json and '${ - this.name - }' in index.js. ` + + `The addon in ${pathToDisplay} currently have '${parentName}' in package.json and '${this.name}' in index.js. ` + 'Until ember-cli v3.9, this error can be disabled by setting env variable EMBER_CLI_IGNORE_ADDON_NAME_MISMATCH to "true". ' + 'For more information about this workaround, see: https://github.com/ember-cli/ember-cli/pull/7950.' ); @@ -578,9 +576,7 @@ let addonProto = { if (!this.project) { this._warn( - `Addon: \`${ - this.name - }\` is missing addon.project, this may be the result of an addon forgetting to invoke \`super\` in its init.` + `Addon: \`${this.name}\` is missing addon.project, this may be the result of an addon forgetting to invoke \`super\` in its init.` ); } // TODO: fix law of demeter `_watchmanInfo.canNestRoots` is obviously a poor idea @@ -1270,9 +1266,7 @@ let addonProto = { if (!this.options[emberCLIBabelConfigKey]) { this._warn( `Ember CLI addons manage their own module transpilation during the \`treeForAddon\` processing. ` + - `\`${this.name}\` (found at \`${ - this.root - }\`) has overridden the \`this.options.${emberCLIBabelConfigKey}\` ` + + `\`${this.name}\` (found at \`${this.root}\`) has overridden the \`this.options.${emberCLIBabelConfigKey}\` ` + `options which conflicts with the addons ability to transpile its \`addon/\` files properly. ` + `Falling back to default babel configuration options.` ); diff --git a/lib/utilities/find-addon-by-name.js b/lib/utilities/find-addon-by-name.js index bd659ab8e4..56ecbef096 100644 --- a/lib/utilities/find-addon-by-name.js +++ b/lib/utilities/find-addon-by-name.js @@ -56,9 +56,7 @@ module.exports = function findAddonByName(addons, name) { if (HAS_FOUND_ADDON_BY_UNSCOPED_NAME[name] !== true) { HAS_FOUND_ADDON_BY_UNSCOPED_NAME[name] = true; console.trace( - `Finding a scoped addon via its unscoped name is deprecated. You searched for \`${name}\` which we found as \`${ - unscopedMatchFromIndex.name - }\` in '${unscopedMatchFromIndex.root}'` + `Finding a scoped addon via its unscoped name is deprecated. You searched for \`${name}\` which we found as \`${unscopedMatchFromIndex.name}\` in '${unscopedMatchFromIndex.root}'` ); } diff --git a/lib/utilities/get-serve-url.js b/lib/utilities/get-serve-url.js index 1c5de475b6..0c7165a429 100644 --- a/lib/utilities/get-serve-url.js +++ b/lib/utilities/get-serve-url.js @@ -5,6 +5,6 @@ const cleanBaseURL = require('clean-base-url'); module.exports = function(options, project) { let config = project.config(options.environment); - let baseURL = config.rootURL === '' ? '/' : cleanBaseURL(config.rootURL || (config.baseURL || '/')); + let baseURL = config.rootURL === '' ? '/' : cleanBaseURL(config.rootURL || config.baseURL || '/'); return `http${options.ssl ? 's' : ''}://${options.host || 'localhost'}:${options.port}${baseURL}`; }; diff --git a/tests/integration/models/blueprint-test.js b/tests/integration/models/blueprint-test.js index 5c30677b34..557002983f 100644 --- a/tests/integration/models/blueprint-test.js +++ b/tests/integration/models/blueprint-test.js @@ -789,7 +789,10 @@ describe('Blueprint', function() { }, }); - blueprint.addPackagesToProject([{ name: 'foo-bar', target: '^123.1.12' }, { name: 'bar-foo', target: '0.0.7' }]); + blueprint.addPackagesToProject([ + { name: 'foo-bar', target: '^123.1.12' }, + { name: 'bar-foo', target: '0.0.7' }, + ]); expect(packages).to.deep.equal(['foo-bar@^123.1.12', 'bar-foo@0.0.7']); }); @@ -807,7 +810,10 @@ describe('Blueprint', function() { it('writes information to the ui log for multiple packages', function() { blueprint.ui = ui; - blueprint.addPackagesToProject([{ name: 'foo-bar', target: '^123.1.12' }, { name: 'bar-foo', target: '0.0.7' }]); + blueprint.addPackagesToProject([ + { name: 'foo-bar', target: '^123.1.12' }, + { name: 'bar-foo', target: '0.0.7' }, + ]); let output = ui.output.trim(); @@ -833,7 +839,10 @@ describe('Blueprint', function() { }, }); - blueprint.addPackagesToProject([{ name: 'foo-bar', target: '^123.1.12' }, { name: 'bar-foo', target: '0.0.7' }]); + blueprint.addPackagesToProject([ + { name: 'foo-bar', target: '^123.1.12' }, + { name: 'bar-foo', target: '0.0.7' }, + ]); expect(!!saveDev).to.equal(true); }); @@ -847,7 +856,10 @@ describe('Blueprint', function() { }, }); - blueprint.addPackagesToProject([{ name: 'foo-bar', target: '^123.1.12' }, { name: 'bar-foo', target: '0.0.7' }]); + blueprint.addPackagesToProject([ + { name: 'foo-bar', target: '^123.1.12' }, + { name: 'bar-foo', target: '0.0.7' }, + ]); expect(verbose).to.equal(false); }); diff --git a/tests/unit/utilities/ember-app-utils-test.js b/tests/unit/utilities/ember-app-utils-test.js index 50c8c3e861..13c53aef8f 100644 --- a/tests/unit/utilities/ember-app-utils-test.js +++ b/tests/unit/utilities/ember-app-utils-test.js @@ -94,7 +94,10 @@ describe('ember-app-utils', function() { results.push(match); } - expect(results).to.deep.equal([["{{content-for 'foo'}}", 'foo'], ["{{content-for 'bar'}}", 'bar']]); + expect(results).to.deep.equal([ + ["{{content-for 'foo'}}", 'foo'], + ["{{content-for 'bar'}}", 'bar'], + ]); }); it('returns an empty string if invalid type is specified', function() { From 42c7d2dd7cb5f7a0959344ce233a0d88696f07dc Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 19 Dec 2019 15:45:04 +0000 Subject: [PATCH 148/818] Bump which from 1.3.1 to 2.0.2 (#8957) --- package.json | 2 +- yarn.lock | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index bf346a50b3..b1364a8a9f 100644 --- a/package.json +++ b/package.json @@ -156,7 +156,7 @@ "testdouble": "^3.12.4", "tmp": "^0.1.0", "websocket": "^1.0.30", - "which": "1.3.1", + "which": "2.0.2", "yuidoc-ember-cli-theme": "^1.0.4", "yuidocjs": "0.10.2" }, diff --git a/yarn.lock b/yarn.lock index cac2743b6c..cc438ce601 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6619,6 +6619,13 @@ which@1.3.1, which@^1.2.14, which@^1.2.9, which@^1.3.0: dependencies: isexe "^2.0.0" +which@2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + wide-align@1.1.3, wide-align@^1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" From 95939c5cd324475aad2be5fd68bbdad0cafc1274 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 16 Dec 2019 16:39:50 -0500 Subject: [PATCH 149/818] Support `ember new @scope-here/name-here`. When a parent directory name is the scope name the new folder that is created will be the project name without the scope name, otherwise the new folder will be `scope-name-project-name`. --- lib/commands/init.js | 4 +- lib/commands/new.js | 28 ++++----- lib/tasks/create-and-step-into-directory.js | 40 +++++++++++-- lib/utilities/valid-project-name.js | 23 ++++++-- tests/acceptance/new-test.js | 58 ++++++++++++++++++- .../unit/utilities/valid-project-name-test.js | 32 +++++++--- 6 files changed, 147 insertions(+), 38 deletions(-) diff --git a/lib/commands/init.js b/lib/commands/init.js index dc47922494..e0bb1f8e95 100644 --- a/lib/commands/init.js +++ b/lib/commands/init.js @@ -6,7 +6,7 @@ const Command = require('../models/command'); const Promise = require('rsvp').Promise; const SilentError = require('silent-error'); const chalk = require('chalk'); -const validProjectName = require('../utilities/valid-project-name'); +const isValidProjectName = require('../utilities/valid-project-name'); const normalizeBlueprint = require('../utilities/normalize-blueprint-option'); const mergeBlueprintOptions = require('../utilities/merge-blueprint-options'); const isYarnProject = require('../utilities/is-yarn-project'); @@ -81,7 +81,7 @@ module.exports = Command.extend({ blueprint: normalizeBlueprint(blueprintOpts.blueprint || this._defaultBlueprint()), }); - if (!validProjectName(packageName)) { + if (!isValidProjectName(packageName)) { return Promise.reject(new SilentError(`We currently do not support a name of \`${packageName}\`.`)); } diff --git a/lib/commands/new.js b/lib/commands/new.js index 767ef49ea1..dfb8085f4b 100644 --- a/lib/commands/new.js +++ b/lib/commands/new.js @@ -6,7 +6,7 @@ const Command = require('../models/command'); const RSVP = require('rsvp'); const Project = require('../models/project'); const SilentError = require('silent-error'); -const validProjectName = require('../utilities/valid-project-name'); +const isValidProjectName = require('../utilities/valid-project-name'); const normalizeBlueprint = require('../utilities/normalize-blueprint-option'); const mergeBlueprintOptions = require('../utilities/merge-blueprint-options'); @@ -40,12 +40,12 @@ module.exports = Command.extend({ beforeRun: mergeBlueprintOptions, run(commandOptions, rawArgs) { - let packageName = rawArgs[0], + let projectName = rawArgs[0], message; commandOptions.name = rawArgs.shift(); - if (!packageName) { + if (!projectName) { message = `The \`ember ${ this.name }\` command requires a name to be specified. For more details, use \`ember help\`.`; @@ -57,25 +57,21 @@ module.exports = Command.extend({ commandOptions.skipGit = true; } - if (packageName === '.') { + if (projectName === '.') { let blueprintName = commandOptions.blueprint === 'app' ? 'application' : commandOptions.blueprint; message = `Trying to generate an ${blueprintName} structure in this directory? Use \`ember init\` instead.`; return Promise.reject(new SilentError(message)); } - if (!validProjectName(packageName)) { - message = `We currently do not support a name of \`${packageName}\`.`; + if (!isValidProjectName(projectName)) { + message = `We currently do not support a name of \`${projectName}\`.`; return Promise.reject(new SilentError(message)); } commandOptions.blueprint = normalizeBlueprint(commandOptions.blueprint); - if (!commandOptions.directory) { - commandOptions.directory = packageName; - } - let InitCommand = this.commands.Init; let initCommand = new InitCommand({ @@ -86,16 +82,20 @@ module.exports = Command.extend({ }); return this.runTask('CreateAndStepIntoDirectory', { + projectName, directoryName: commandOptions.directory, dryRun: commandOptions.dryRun, }).then(opts => { initCommand.project.root = process.cwd(); return initCommand.run(commandOptions, rawArgs).catch(err => { - let dirName = commandOptions.directory; - process.chdir(opts.initialDirectory); - return rmdir(dirName).then(() => { - console.log(chalk.red(`Error creating new application. Removing generated directory \`./${dirName}\``)); + let { initialDirectory, projectDirectory } = opts; + + process.chdir(initialDirectory); + return rmdir(projectDirectory).then(() => { + console.log( + chalk.red(`Error creating new application. Removing generated directory \`./${projectDirectory}\``) + ); throw err; }); }); diff --git a/lib/tasks/create-and-step-into-directory.js b/lib/tasks/create-and-step-into-directory.js index ba2b820235..6908360b67 100644 --- a/lib/tasks/create-and-step-into-directory.js +++ b/lib/tasks/create-and-step-into-directory.js @@ -4,23 +4,50 @@ // this directory. const fs = require('fs-extra'); +const path = require('path'); const Task = require('../models/task'); const SilentError = require('silent-error'); +// used in order to infer the directory to use, if `--directory` was specified +// to `ember new`/`ember addon` it will **always** be used directly (without +// modification) +function chooseDirectoryName(projectName) { + let isScoped = projectName[0] === '@' && projectName.includes('/'); + + if (isScoped) { + let slashIndex = projectName.indexOf('/'); + let scopeName = projectName.substring(1, slashIndex); + let packageNameWithoutScope = projectName.substring(slashIndex + 1); + let pathParts = process.cwd().split(path.sep); + + let parentDirectoryContainsScopeName = pathParts.includes(scopeName); + + if (parentDirectoryContainsScopeName) { + return packageNameWithoutScope; + } else { + return `${scopeName}-${packageNameWithoutScope}`; + } + } else { + return projectName; + } +} + class CreateTask extends Task { // Options: String directoryName, Boolean: dryRun - warnDirectoryAlreadyExists() { - let message = `Directory '${this.directoryName}' already exists.`; + warnDirectoryAlreadyExists(directoryName) { + let message = `Directory '${directoryName}' already exists.`; return new SilentError(message); } async run(options) { - let directoryName = (this.directoryName = options.directoryName); + let directoryName = options.directoryName ? options.directoryName : chooseDirectoryName(options.projectName); + if (options.dryRun) { if (fs.existsSync(directoryName) && fs.readdirSync(directoryName).length) { - throw this.warnDirectoryAlreadyExists(); + throw this.warnDirectoryAlreadyExists(directoryName); } + return; } @@ -30,7 +57,7 @@ class CreateTask extends Task { if (err.code === 'EEXIST') { // Allow using directory if it is empty. if (fs.readdirSync(directoryName).length) { - throw this.warnDirectoryAlreadyExists(); + throw this.warnDirectoryAlreadyExists(directoryName); } } else { throw err; @@ -38,7 +65,8 @@ class CreateTask extends Task { } let cwd = process.cwd(); process.chdir(directoryName); - return { initialDirectory: cwd }; + + return { initialDirectory: cwd, projectDirectory: directoryName }; } } diff --git a/lib/utilities/valid-project-name.js b/lib/utilities/valid-project-name.js index 5874b1e63b..36ad71a66b 100644 --- a/lib/utilities/valid-project-name.js +++ b/lib/utilities/valid-project-name.js @@ -1,5 +1,7 @@ 'use strict'; +const INVALID_PROJECT_NAMES = ['test', 'ember', 'ember-cli', 'vendor', 'public', 'app', 'addon', 'application']; + /** * Checks if the string starts with a number. * @@ -10,6 +12,15 @@ function startsWithNumber(name) { return /^\d.*$/.test(name); } +function containsInvalidSlash(name) { + let indexOfFirstSlash = name.indexOf('/'); + let isScoped = name[0] === '@' && indexOfFirstSlash !== -1; + + let containsInvalidSlash = isScoped ? name.indexOf('/', indexOfFirstSlash + 1) > -1 : name.includes('/'); + + return containsInvalidSlash; +} + /** * Checks if project name is valid. * @@ -21,11 +32,15 @@ function startsWithNumber(name) { * @param {String} name The name of Ember CLI project * @return {Boolean} */ -module.exports = function(name) { - let invalidProjectNames = ['test', 'ember', 'ember-cli', 'vendor', 'public', 'app', 'application']; - name = name.toLowerCase(); +module.exports = function isValidProjectName(projectName) { + let lowerSanitizedName = projectName.toLowerCase(); - if (invalidProjectNames.indexOf(name) !== -1 || name.indexOf('.') !== -1 || startsWithNumber(name)) { + if ( + INVALID_PROJECT_NAMES.includes(lowerSanitizedName) || + lowerSanitizedName.includes('.') || + containsInvalidSlash(lowerSanitizedName) || + startsWithNumber(lowerSanitizedName) + ) { return false; } diff --git a/tests/acceptance/new-test.js b/tests/acceptance/new-test.js index 1f84254e05..ab70bd640c 100644 --- a/tests/acceptance/new-test.js +++ b/tests/acceptance/new-test.js @@ -43,8 +43,8 @@ describe('Acceptance: ember new', function() { return tmp.teardown(tmpDir); }); - function confirmBlueprintedForDir(dir) { - let blueprintPath = path.join(root, dir, 'files'); + function confirmBlueprintedForDir(blueprintDir, expectedAppDir = 'foo') { + let blueprintPath = path.join(root, blueprintDir, 'files'); let expected = walkSync(blueprintPath); let actual = walkSync('.').sort(); let directory = path.basename(process.cwd()); @@ -55,7 +55,7 @@ describe('Acceptance: ember new', function() { expected.sort(); - expect(directory).to.equal('foo'); + expect(directory).to.equal(expectedAppDir); expect(expected).to.deep.equal( actual, `${EOL} expected: ${util.inspect(expected)}${EOL} but got: ${util.inspect(actual)}` @@ -102,6 +102,32 @@ describe('Acceptance: ember new', function() { }) ); + it('ember new @foo/bar, when parent directory does not contain `foo`', async function() { + await ember(['new', '@foo/bar', '--skip-npm', '--skip-bower']); + + confirmBlueprintedForDir('blueprints/app', 'foo-bar'); + }); + + it('ember new @foo/bar, when direct parent directory contains `foo`', async function() { + let scopedDirectoryPath = path.join(process.cwd(), 'foo'); + fs.mkdirsSync(scopedDirectoryPath); + process.chdir(scopedDirectoryPath); + + await ember(['new', '@foo/bar', '--skip-npm', '--skip-bower']); + + confirmBlueprintedForDir('blueprints/app', 'bar'); + }); + + it('ember new @foo/bar, when parent directory heirarchy contains `foo`', async function() { + let scopedDirectoryPath = path.join(process.cwd(), 'foo', 'packages'); + fs.mkdirsSync(scopedDirectoryPath); + process.chdir(scopedDirectoryPath); + + await ember(['new', '@foo/bar', '--skip-npm', '--skip-bower']); + + confirmBlueprintedForDir('blueprints/app', 'bar'); + }); + it( 'ember new foo, blueprint targets match the default ember-cli targets', co.wrap(function*() { @@ -358,6 +384,32 @@ describe('Acceptance: ember new', function() { }) ); + it('ember addon @foo/bar when parent directory does not contain `foo`', async function() { + await ember(['addon', '@foo/bar', '--skip-npm', '--skip-bower', '--skip-git']); + + let directoryName = path.basename(process.cwd()); + + expect(directoryName).to.equal('foo-bar'); + + let pkgJson = fs.readJsonSync('package.json'); + expect(pkgJson.name).to.equal('@foo/bar', 'uses addon name for package name'); + }); + + it('ember addon @foo/bar when parent directory contains `foo`', async function() { + let scopedDirectoryPath = path.join(process.cwd(), 'foo'); + fs.mkdirsSync(scopedDirectoryPath); + process.chdir(scopedDirectoryPath); + + await ember(['addon', '@foo/bar', '--skip-npm', '--skip-bower', '--skip-git']); + + let directoryName = path.basename(process.cwd()); + + expect(directoryName).to.equal('bar'); + + let pkgJson = fs.readJsonSync('package.json'); + expect(pkgJson.name).to.equal('@foo/bar', 'uses addon name for package name'); + }); + describe('verify fixtures', function() { function checkEslintConfig(fixturePath) { expect(file('.eslintrc.js')).to.equal(file(path.join(__dirname, '../fixtures', fixturePath, '.eslintrc.js'))); diff --git a/tests/unit/utilities/valid-project-name-test.js b/tests/unit/utilities/valid-project-name-test.js index 7083f735d7..b6673c6e45 100644 --- a/tests/unit/utilities/valid-project-name-test.js +++ b/tests/unit/utilities/valid-project-name-test.js @@ -1,18 +1,32 @@ 'use strict'; -const validProjectName = require('../../../lib/utilities/valid-project-name'); +const isValidProjectName = require('../../../lib/utilities/valid-project-name'); const expect = require('chai').expect; -describe('validate project name', function() { - ['app', 'public', '.', 'ember', 'so-cool.', 'vendor', 'test', '1234test', 'application'].forEach(name => { - it(`'${name}' is an invalid name`, function() { - expect(validProjectName(name)).to.not.be.ok; +describe('lib/utilities/valid-project-name', function() { + describe('isValidProjectName', function() { + [ + 'app', + 'addon', + 'public', + '.', + 'ember', + 'so-cool.', + 'vendor', + 'test', + '1234test', + 'application', + '@foo/bar/baz', + ].forEach(name => { + it(`'${name}' is an invalid name`, function() { + expect(isValidProjectName(name)).to.not.be.ok; + }); }); - }); - ['my-app', 'foobar', 'testbaz'].forEach(name => { - it(`'${name}' is a valid name`, function() { - expect(validProjectName(name)).to.be.ok; + ['my-app', 'foobar', 'testbaz', '@foo/bar'].forEach(name => { + it(`'${name}' is a valid name`, function() { + expect(isValidProjectName(name)).to.be.ok; + }); }); }); }); From f000dee8d3c502987bde31b2d15092f7eb1cd4f1 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Thu, 19 Dec 2019 12:22:59 -0500 Subject: [PATCH 150/818] Add an ember-try scenario for Ember "classic" (pre-octane). This provides an additional Ember try scenario to help aide addons in confirming that while onboarding new Octane features they do not accidentally regress non-octane users. --- blueprints/addon/files/.travis.yml | 1 + blueprints/addon/files/addon-config/ember-try.js | 13 +++++++++++++ tests/fixtures/addon/npm/.travis.yml | 1 + tests/fixtures/addon/npm/config/ember-try.js | 13 +++++++++++++ tests/fixtures/addon/yarn/.travis.yml | 1 + tests/fixtures/addon/yarn/config/ember-try.js | 13 +++++++++++++ 6 files changed, 42 insertions(+) diff --git a/blueprints/addon/files/.travis.yml b/blueprints/addon/files/.travis.yml index 58b0c76c9a..27ddd612af 100644 --- a/blueprints/addon/files/.travis.yml +++ b/blueprints/addon/files/.travis.yml @@ -59,6 +59,7 @@ jobs: - env: EMBER_TRY_SCENARIO=ember-beta - env: EMBER_TRY_SCENARIO=ember-canary - env: EMBER_TRY_SCENARIO=ember-default-with-jquery + - env: EMBER_TRY_SCENARIO=ember-classic <% if (yarn) { %> before_install: - curl -o- -L https://yarnpkg.com/install.sh | bash diff --git a/blueprints/addon/files/addon-config/ember-try.js b/blueprints/addon/files/addon-config/ember-try.js index 614db394c1..ab9f067f0c 100644 --- a/blueprints/addon/files/addon-config/ember-try.js +++ b/blueprints/addon/files/addon-config/ember-try.js @@ -68,6 +68,19 @@ module.exports = async function() { '@ember/jquery': '^0.5.1' } } + }, + { + name: 'ember-classic', + env: { + EMBER_OPTIONAL_FEATURES: JSON.stringify({ + 'application-template-wrapper': true, + 'default-async-observers': false, + 'template-only-glimmer-components': false + }) + } + ember: { + edition: 'classic' + } } ] }; diff --git a/tests/fixtures/addon/npm/.travis.yml b/tests/fixtures/addon/npm/.travis.yml index 337d7018e5..e9eaf401e3 100644 --- a/tests/fixtures/addon/npm/.travis.yml +++ b/tests/fixtures/addon/npm/.travis.yml @@ -55,6 +55,7 @@ jobs: - env: EMBER_TRY_SCENARIO=ember-beta - env: EMBER_TRY_SCENARIO=ember-canary - env: EMBER_TRY_SCENARIO=ember-default-with-jquery + - env: EMBER_TRY_SCENARIO=ember-classic script: - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO diff --git a/tests/fixtures/addon/npm/config/ember-try.js b/tests/fixtures/addon/npm/config/ember-try.js index 4ac1661824..155316a3b4 100644 --- a/tests/fixtures/addon/npm/config/ember-try.js +++ b/tests/fixtures/addon/npm/config/ember-try.js @@ -67,6 +67,19 @@ module.exports = async function() { '@ember/jquery': '^0.5.1' } } + }, + { + name: 'ember-classic', + env: { + EMBER_OPTIONAL_FEATURES: JSON.stringify({ + 'application-template-wrapper': true, + 'default-async-observers': false, + 'template-only-glimmer-components': false + }) + } + ember: { + edition: 'classic' + } } ] }; diff --git a/tests/fixtures/addon/yarn/.travis.yml b/tests/fixtures/addon/yarn/.travis.yml index 016146eb28..1a49c3fbf7 100644 --- a/tests/fixtures/addon/yarn/.travis.yml +++ b/tests/fixtures/addon/yarn/.travis.yml @@ -54,6 +54,7 @@ jobs: - env: EMBER_TRY_SCENARIO=ember-beta - env: EMBER_TRY_SCENARIO=ember-canary - env: EMBER_TRY_SCENARIO=ember-default-with-jquery + - env: EMBER_TRY_SCENARIO=ember-classic before_install: - curl -o- -L https://yarnpkg.com/install.sh | bash diff --git a/tests/fixtures/addon/yarn/config/ember-try.js b/tests/fixtures/addon/yarn/config/ember-try.js index 94f8e969a6..20931bc127 100644 --- a/tests/fixtures/addon/yarn/config/ember-try.js +++ b/tests/fixtures/addon/yarn/config/ember-try.js @@ -68,6 +68,19 @@ module.exports = async function() { '@ember/jquery': '^0.5.1' } } + }, + { + name: 'ember-classic', + env: { + EMBER_OPTIONAL_FEATURES: JSON.stringify({ + 'application-template-wrapper': true, + 'default-async-observers': false, + 'template-only-glimmer-components': false + }) + } + ember: { + edition: 'classic' + } } ] }; From 3c1bacc5a998b70e27e00de5511b4e50a460bda2 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Thu, 19 Dec 2019 14:59:31 -0500 Subject: [PATCH 151/818] Update ember-data to 3.15.0. --- blueprints/app/files/package.json | 2 +- tests/fixtures/app/npm/package.json | 2 +- tests/fixtures/app/yarn/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 50ea190027..3cbda4146d 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -33,7 +33,7 @@ "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", - "ember-data": "~3.15.0-beta.0", + "ember-data": "~3.15.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^7.0.0", "ember-load-initializers": "^2.1.1", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index ca6d0fe95a..7cefc29a94 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -33,7 +33,7 @@ "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", - "ember-data": "~3.15.0-beta.0", + "ember-data": "~3.15.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^7.0.0", "ember-load-initializers": "^2.1.1", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 355eee6aba..c7ef12dea5 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -33,7 +33,7 @@ "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", - "ember-data": "~3.15.0-beta.0", + "ember-data": "~3.15.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^7.0.0", "ember-load-initializers": "^2.1.1", From 6f7d30972d19c80c19fe41843cd5cb6da62d74a5 Mon Sep 17 00:00:00 2001 From: Sergey Astapov Date: Fri, 15 Nov 2019 14:30:39 -0500 Subject: [PATCH 152/818] Update blueprints according to Node.js support policy --- blueprints/app/files/package.json | 2 +- tests/fixtures/addon/npm/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/npm/package.json | 2 +- tests/fixtures/app/yarn/package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 3cbda4146d..21c0a53b07 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -48,7 +48,7 @@ "qunit-dom": "^0.9.2" }, "engines": { - "node": "8.* || >= 10.*" + "node": "8.* || 10.* || >= 12" }, "ember": { "edition": "octane" diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index a0ba93de7d..943d0544c1 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -52,7 +52,7 @@ "qunit-dom": "^0.9.2" }, "engines": { - "node": "8.* || >= 10.*" + "node": "8.* || 10.* || >= 12" }, "ember": { "edition": "octane" diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 9b3db21251..07e7bd2134 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -53,7 +53,7 @@ "qunit-dom": "^0.9.2" }, "engines": { - "node": "8.* || >= 10.*" + "node": "8.* || 10.* || >= 12" }, "ember": { "edition": "octane" diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 7cefc29a94..3edb2e1d14 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -47,7 +47,7 @@ "qunit-dom": "^0.9.2" }, "engines": { - "node": "8.* || >= 10.*" + "node": "8.* || 10.* || >= 12" }, "ember": { "edition": "octane" diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index c7ef12dea5..9bbe317356 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -48,7 +48,7 @@ "qunit-dom": "^0.9.2" }, "engines": { - "node": "8.* || >= 10.*" + "node": "8.* || 10.* || >= 12" }, "ember": { "edition": "octane" From e9bbf609efd791cc97d7c6a4bcbddaa627bd5d19 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Fri, 20 Dec 2019 00:31:42 +0100 Subject: [PATCH 153/818] Fix tests writing 'undefined' as file content Node.js might soon start to validate input data passed through to `fs`. Doing so caught to errors in ember-cli (the test suite is run against Node.js using `citgm` https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/2142/nodes=osx1011/testReport/junit/(root)/citgm/ember_cli_v3_14_0/). The tests seem to work independent of the content of these files. This is not a good idea though and it was never meant to be an optional argument. --- tests/acceptance/new-test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/acceptance/new-test.js b/tests/acceptance/new-test.js index 92408aeefc..97f3eaee8a 100644 --- a/tests/acceptance/new-test.js +++ b/tests/acceptance/new-test.js @@ -177,7 +177,7 @@ describe('Acceptance: ember new', function() { it('ember new with blueprint uses the specified blueprint directory with a relative path', async function() { fs.mkdirsSync('my_blueprint/files'); - fs.writeFileSync('my_blueprint/files/gitignore'); + fs.writeFileSync('my_blueprint/files/gitignore', ''); await ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--blueprint=./my_blueprint']); @@ -186,7 +186,7 @@ describe('Acceptance: ember new', function() { it('ember new with blueprint uses the specified blueprint directory with an absolute path', async function() { fs.mkdirsSync('my_blueprint/files'); - fs.writeFileSync('my_blueprint/files/gitignore'); + fs.writeFileSync('my_blueprint/files/gitignore', ''); await ember([ 'new', From 59d39d371231a92ff0839cea791326b5ce5d232a Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Thu, 19 Dec 2019 20:40:31 -0500 Subject: [PATCH 154/818] Update final CHANGELOG for 3.15.0. --- CHANGELOG.md | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b90577995f..5a262ab5e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,20 +1,23 @@ # ember-cli Changelog -## v3.15.0-beta.2 #### Blueprint Changes -- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.15.0-beta.1...v3.15.0-beta.2) -- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.15.0-beta.1...v3.15.0-beta.2) +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.14.0...v3.15.0) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.14.0...v3.15.0) #### Changelog +- [#8963](https://github.com/ember-cli/ember-cli/pull/8963) Remove `app/templates/components` [@chancancode](https://github.com/chancancode) +- [#8964](https://github.com/ember-cli/ember-cli/pull/8964) Add support for `ember new @scope-here/name-here`. [@rwjblue](https://github.com/rwjblue) +- [#8965](https://github.com/ember-cli/ember-cli/pull/8965) Update ember-resolver to v7.0.0. [@rwjblue](https://github.com/rwjblue) +- [#8971](https://github.com/ember-cli/ember-cli/pull/8971) Add an ember-try scenario for Ember "classic" (pre-octane). [@rwjblue](https://github.com/rwjblue) +- [#8972](https://github.com/ember-cli/ember-cli/pull/8972) Update ember-data to 3.15.0. [@rwjblue](https://github.com/rwjblue) - [#8933](https://github.com/ember-cli/ember-cli/pull/8933) Remove `app/resolver.js` in favor of importing in `app/app.js` [@rwjblue](https://github.com/rwjblue) - [#8945](https://github.com/ember-cli/ember-cli/pull/8945) Fix issue with addon `.travis.yml` configuration when using `npm` [@kellyselden](https://github.com/kellyselden) - [#8946](https://github.com/ember-cli/ember-cli/pull/8946) Drop testing of ember-source@3.4 in the addon blueprints ember-try config [@kellyselden](https://github.com/kellyselden) - [#8946](https://github.com/ember-cli/ember-cli/pull/8946) Add testing of ember-source@3.12 in the addon blueprints ember-try config [@kellyselden](https://github.com/kellyselden) - [#8959](https://github.com/ember-cli/ember-cli/pull/8959) Fix issue with addon discovery when npm/yarn leave empty directories in resolvable locations [@stefanpenner](https://github.com/stefanpenner) -- [#8949](https://github.com/ember-cli/ember-cli/pull/8949) Add GitHub Actions for CI [@Turbo87](https://github.com/Turbo87) - [#8961](https://github.com/ember-cli/ember-cli/pull/8961) Prepare for Octane release in 3.15 [@rwjblue](https://github.com/rwjblue) * Adds `ember` property to `package.json` to implement [emberjs/rfcs#558](https://github.com/emberjs/rfcs/pull/558) * Adds `@glimmer/component@1.0.0` as a development dependency for both apps and addons @@ -23,17 +26,6 @@ * Updates ember-template-lint configuration to use `octane` preset * Update to ember-source@3.15 stable * Updates all packages in the application blueprint to their latest version - -Thank you to all who took the time to contribute! - -## v3.15.0-beta.1 - -#### Blueprint Changes - -- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.14.0...v3.15.0-beta.1) -- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.14.0...v3.15.0-beta.1) - - - [#8827](https://github.com/ember-cli/ember-cli/pull/8827) Remove module-unification blueprints [@dcyriller](https://github.com/dcyriller) - [#8878](https://github.com/ember-cli/ember-cli/pull/8878) Adds flag to throw an error for invalid addon locations [@tmquinn](https://github.com/tmquinn) - [#8906](https://github.com/ember-cli/ember-cli/pull/8906) Enable broccoli memoization by default in Ember-CLI [@SparshithNR](https://github.com/SparshithNR) From 85a695e0f4ec031f50f7331e1139305cacfe5789 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Thu, 19 Dec 2019 20:40:45 -0500 Subject: [PATCH 155/818] Release v3.15.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 175584a263..848801beef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.15.0-beta.3", + "version": "3.15.0", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From 6afe0a9b08c91d93b3bc84cdf002bc3110843b1f Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 20 Dec 2019 09:16:48 -0500 Subject: [PATCH 156/818] Fix invalid syntax with ember-classic ember-try scenario. --- blueprints/addon/files/addon-config/ember-try.js | 8 +++++--- tests/fixtures/addon/npm/config/ember-try.js | 8 +++++--- tests/fixtures/addon/yarn/config/ember-try.js | 8 +++++--- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/blueprints/addon/files/addon-config/ember-try.js b/blueprints/addon/files/addon-config/ember-try.js index ab9f067f0c..ab9f1d06bf 100644 --- a/blueprints/addon/files/addon-config/ember-try.js +++ b/blueprints/addon/files/addon-config/ember-try.js @@ -77,9 +77,11 @@ module.exports = async function() { 'default-async-observers': false, 'template-only-glimmer-components': false }) - } - ember: { - edition: 'classic' + }, + npm: { + ember: { + edition: 'classic' + } } } ] diff --git a/tests/fixtures/addon/npm/config/ember-try.js b/tests/fixtures/addon/npm/config/ember-try.js index 155316a3b4..85ba96fe2f 100644 --- a/tests/fixtures/addon/npm/config/ember-try.js +++ b/tests/fixtures/addon/npm/config/ember-try.js @@ -76,9 +76,11 @@ module.exports = async function() { 'default-async-observers': false, 'template-only-glimmer-components': false }) - } - ember: { - edition: 'classic' + }, + npm: { + ember: { + edition: 'classic' + } } } ] diff --git a/tests/fixtures/addon/yarn/config/ember-try.js b/tests/fixtures/addon/yarn/config/ember-try.js index 20931bc127..bc5afe5114 100644 --- a/tests/fixtures/addon/yarn/config/ember-try.js +++ b/tests/fixtures/addon/yarn/config/ember-try.js @@ -77,9 +77,11 @@ module.exports = async function() { 'default-async-observers': false, 'template-only-glimmer-components': false }) - } - ember: { - edition: 'classic' + }, + npm: { + ember: { + edition: 'classic' + } } } ] From e5b10f8dbe0e62818fbf8451574e07481810a867 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 20 Dec 2019 10:20:43 -0500 Subject: [PATCH 157/818] Add v3.15.1 to CHANGELOG.md. --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a262ab5e6..f6ad6d800e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,19 @@ # ember-cli Changelog +## v3.15.1 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.15.0...v3.15.1) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.15.0...v3.15.1) + +#### Changelog + +- [#8977](https://github.com/ember-cli/ember-cli/pull/8977) Fix invalid syntax with ember-classic ember-try scenario. [@rwjblue](https://github.com/rwjblue) + +Thank you to all who took the time to contribute! + #### Blueprint Changes - [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.14.0...v3.15.0) From fa8cdb1431090cfb0c1f3a371e5785cbee9474c0 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 20 Dec 2019 10:23:48 -0500 Subject: [PATCH 158/818] Release v3.15.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 848801beef..17e70b0269 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.15.0", + "version": "3.15.1", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From a4458a6d5b3078af8da4d02e9bcffab1480da4bd Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Sat, 21 Dec 2019 16:58:22 +0000 Subject: [PATCH 159/818] fix env var typo --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f95355ac90..98ffde6104 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,7 +83,7 @@ jobs: - EMBER_CLI_PACKAGER - EMBER_CLI_MODULE_UNIFICATION - EMBER_CLI_DELAYED_TRANSPILATION - - EMBER_CLI_SYSTEM_TEMP= + - EMBER_CLI_SYSTEM_TEMP - EMBER_CLI_BROCCOLI_WATCHER steps: From 61854eb60fb45f44fdc5c17d3c81c8765634972c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2019 06:16:18 +0000 Subject: [PATCH 160/818] Bump websocket from 1.0.30 to 1.0.31 (#8984) --- package.json | 2 +- yarn.lock | 65 ++++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 62 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 2fe14f9d07..36b4904e7e 100644 --- a/package.json +++ b/package.json @@ -155,7 +155,7 @@ "supertest": "^4.0.2", "testdouble": "^3.12.4", "tmp": "^0.1.0", - "websocket": "^1.0.30", + "websocket": "^1.0.31", "which": "2.0.2", "yuidoc-ember-cli-theme": "^1.0.4", "yuidocjs": "0.10.2" diff --git a/yarn.lock b/yarn.lock index 1aba097b63..2b1af8667e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1687,6 +1687,14 @@ ctype@0.5.3: resolved "https://registry.yarnpkg.com/ctype/-/ctype-0.5.3.tgz#82c18c2461f74114ef16c135224ad0b9144ca12f" integrity sha1-gsGMJGH3QRTvFsE1IkrQuRRMoS8= +d@1, d@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" + integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== + dependencies: + es5-ext "^0.10.50" + type "^1.0.1" + dag-map@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/dag-map/-/dag-map-2.0.2.tgz#9714b472de82a1843de2fba9b6876938cab44c68" @@ -2052,11 +2060,37 @@ es-to-primitive@^1.2.0: is-date-object "^1.0.1" is-symbol "^1.0.2" +es5-ext@^0.10.35, es5-ext@^0.10.50: + version "0.10.53" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.53.tgz#93c5a3acfdbef275220ad72644ad02ee18368de1" + integrity sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q== + dependencies: + es6-iterator "~2.0.3" + es6-symbol "~3.1.3" + next-tick "~1.0.0" + es6-error@^4.0.1: version "4.1.1" resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d" integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg== +es6-iterator@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-symbol@^3.1.1, es6-symbol@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" + integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== + dependencies: + d "^1.0.1" + ext "^1.1.2" + escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -2322,6 +2356,13 @@ express@^4.10.7, express@^4.13.1, express@^4.16.4: utils-merge "1.0.1" vary "~1.1.2" +ext@^1.1.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.4.0.tgz#89ae7a07158f79d35517882904324077e4379244" + integrity sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A== + dependencies: + type "^2.0.0" + extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" @@ -4565,6 +4606,11 @@ nested-error-stacks@^2.0.0: resolved "https://registry.yarnpkg.com/nested-error-stacks/-/nested-error-stacks-2.1.0.tgz#0fbdcf3e13fe4994781280524f8b96b0cdff9c61" integrity sha512-AO81vsIO1k1sM4Zrd6Hu7regmJN1NSiAja10gc4bX3F0wd+9rQmcuHQaHVQCYIEC8iFXnE+mavh23GOt7wBgug== +next-tick@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" + integrity sha1-yobR/ogoFpsBICCOPchCS524NCw= + nice-try@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" @@ -6367,6 +6413,16 @@ type-is@~1.6.17, type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" +type@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" + integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== + +type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/type/-/type-2.0.0.tgz#5f16ff6ef2eb44f260494dae271033b29c09a9c3" + integrity sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow== + typedarray-to-buffer@^3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" @@ -6597,12 +6653,13 @@ websocket-extensions@>=0.1.1: resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29" integrity sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg== -websocket@^1.0.30: - version "1.0.30" - resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.30.tgz#91d3bd00c3d43e916f0cf962f8f8c451bb0b2373" - integrity sha512-aO6klgaTdSMkhfl5VVJzD5fm+Srhh5jLYbS15+OiI1sN6h/RU/XW6WN9J1uVIpUKNmsTvT3Hs35XAFjn9NMfOw== +websocket@^1.0.31: + version "1.0.31" + resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.31.tgz#e5d0f16c3340ed87670e489ecae6144c79358730" + integrity sha512-VAouplvGKPiKFDTeCCO65vYHsyay8DqoBSlzIO3fayrfOgU94lQN5a1uWVnFrMLceTJw/+fQXR5PGbUVRaHshQ== dependencies: debug "^2.2.0" + es5-ext "^0.10.50" nan "^2.14.0" typedarray-to-buffer "^3.1.5" yaeti "^0.0.6" From 6c587bad8aed68688dfd6995e7cd259813c3f0de Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2019 07:45:35 +0000 Subject: [PATCH 161/818] Bump @octokit/rest from 16.35.0 to 16.35.2 (#8985) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 36b4904e7e..efba59e4d9 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,7 @@ }, "devDependencies": { "@ember/edition-utils": "^1.1.1", - "@octokit/rest": "^16.35.0", + "@octokit/rest": "^16.35.2", "broccoli-plugin": "^3.0.0", "broccoli-test-helper": "^2.0.0", "chai": "^4.2.0", diff --git a/yarn.lock b/yarn.lock index 2b1af8667e..dea3af2fbf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -218,10 +218,10 @@ once "^1.4.0" universal-user-agent "^4.0.0" -"@octokit/rest@^16.35.0": - version "16.35.0" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.35.0.tgz#7ccc1f802f407d5b8eb21768c6deca44e7b4c0d8" - integrity sha512-9ShFqYWo0CLoGYhA1FdtdykJuMzS/9H6vSbbQWDX4pWr4p9v+15MsH/wpd/3fIU+tSxylaNO48+PIHqOkBRx3w== +"@octokit/rest@^16.35.2": + version "16.35.2" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.35.2.tgz#0098c9e2a895d4afb0fa6578479283553543143c" + integrity sha512-iijaNZpn9hBpUdh8YdXqNiWazmq4R1vCUsmxpBB0kCQ0asHZpCx+HNs22eiHuwYKRhO31ZSAGBJLi0c+3XHaKQ== dependencies: "@octokit/request" "^5.2.0" "@octokit/request-error" "^1.0.2" From 83d1aaea5e3db76631e1b27f21a3fcc6beca82a4 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 23 Dec 2019 15:42:07 -0500 Subject: [PATCH 162/818] Increase testem browser timeout. Some CI systems seem to hit the default limit much more often than others. Specifically, GitHub actions seems to fail fairly consistently (5 out of 10 job runs) without increasing the timeout, but passes consistently with an increased limit. --- blueprints/app/files/testem.js | 1 + 1 file changed, 1 insertion(+) diff --git a/blueprints/app/files/testem.js b/blueprints/app/files/testem.js index 367f5659c1..02423c6845 100644 --- a/blueprints/app/files/testem.js +++ b/blueprints/app/files/testem.js @@ -7,6 +7,7 @@ module.exports = { launch_in_dev: [ 'Chrome' ], + browser_start_timeout: 120, browser_args: { Chrome: { ci: [ From 1bb36c97eff937db0b148622e1a320fa70785738 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 24 Dec 2019 06:06:34 +0000 Subject: [PATCH 163/818] Bump eslint-plugin-chai-expect from 2.0.1 to 2.1.0 (#8989) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index efba59e4d9..0c9de4bf79 100644 --- a/package.json +++ b/package.json @@ -140,7 +140,7 @@ "ember-cli-internal-test-helpers": "^0.9.1", "eslint": "^5.16.0", "eslint-config-prettier": "^6.7.0", - "eslint-plugin-chai-expect": "^2.0.1", + "eslint-plugin-chai-expect": "^2.1.0", "eslint-plugin-mocha": "^6.1.1", "eslint-plugin-node": "^10.0.0", "eslint-plugin-prettier": "^3.1.1", diff --git a/yarn.lock b/yarn.lock index dea3af2fbf..1647928189 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2108,10 +2108,10 @@ eslint-config-prettier@^6.7.0: dependencies: get-stdin "^6.0.0" -eslint-plugin-chai-expect@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-chai-expect/-/eslint-plugin-chai-expect-2.0.1.tgz#0f9267745feafa723b8ec1bb151c073df5558f60" - integrity sha512-HiFoh9F9grVdVQEIwADwPA7SlcGZcsm9gdzZGDoH2SeUoUmYrUuq1cQmfjyOfqRpFOL6qlhcz5nZW2ppTH9ZlQ== +eslint-plugin-chai-expect@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-chai-expect/-/eslint-plugin-chai-expect-2.1.0.tgz#9dd1d8e5a80543fdec956f6aef7f83f2241ca92b" + integrity sha512-rd0/4mjMV6c3i0o4DKkWI4uaFN9DK707kW+/fDphaDI6HVgxXnhML9Xgt5vHnTXmSSnDhupuCFBgsEAEpchXmQ== eslint-plugin-es@^2.0.0: version "2.0.0" From d7b552494770a6ff5bff1da4e43cd1b7d6aacea6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 24 Dec 2019 07:36:12 +0000 Subject: [PATCH 164/818] Bump eslint-plugin-mocha from 6.1.1 to 6.2.2 (#8939) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 0c9de4bf79..3e24efabd5 100644 --- a/package.json +++ b/package.json @@ -141,7 +141,7 @@ "eslint": "^5.16.0", "eslint-config-prettier": "^6.7.0", "eslint-plugin-chai-expect": "^2.1.0", - "eslint-plugin-mocha": "^6.1.1", + "eslint-plugin-mocha": "^6.2.2", "eslint-plugin-node": "^10.0.0", "eslint-plugin-prettier": "^3.1.1", "fixturify": "^1.2.0", diff --git a/yarn.lock b/yarn.lock index 1647928189..02183d4d05 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2121,10 +2121,10 @@ eslint-plugin-es@^2.0.0: eslint-utils "^1.4.2" regexpp "^3.0.0" -eslint-plugin-mocha@^6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-6.1.1.tgz#5a036f2f806e1a5fb7d19f7538ebeff3afb15377" - integrity sha512-p/otruG425jRYDa28HjbBYYXoFNzq3Qp++gn5dbE44Kz4NvmIsSUKSV1T+RLYUcZOcdJKKAftXbaqkHFqReKoA== +eslint-plugin-mocha@^6.2.2: + version "6.2.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-6.2.2.tgz#6ef4b78bd12d744beb08a06e8209de330985100d" + integrity sha512-oNhPzfkT6Q6CJ0HMVJ2KLxEWG97VWGTmuHOoRcDLE0U88ugUyFNV9wrT2XIt5cGtqc5W9k38m4xTN34L09KhBA== dependencies: ramda "^0.26.1" From bf1325969b4e8da1d2f105d2444b7f18b782d058 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 24 Dec 2019 13:10:54 +0100 Subject: [PATCH 165/818] Bump babel-plugin-module-resolver from 3.2.0 to 4.0.0 (#8988) Bumps [babel-plugin-module-resolver](https://github.com/tleunen/babel-plugin-module-resolver) from 3.2.0 to 4.0.0. - [Release notes](https://github.com/tleunen/babel-plugin-module-resolver/releases) - [Changelog](https://github.com/tleunen/babel-plugin-module-resolver/blob/master/CHANGELOG.md) - [Commits](https://github.com/tleunen/babel-plugin-module-resolver/compare/v3.2.0...v4.0.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 80 +++++++++++++++------------------------------------- 2 files changed, 24 insertions(+), 58 deletions(-) diff --git a/package.json b/package.json index 3e24efabd5..a486e78ac9 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "@babel/core": "^7.7.2", "@babel/plugin-transform-modules-amd": "^7.5.0", "amd-name-resolver": "^1.3.1", - "babel-plugin-module-resolver": "^3.2.0", + "babel-plugin-module-resolver": "^4.0.0", "bower-config": "^1.4.1", "bower-endpoint-parser": "0.2.2", "broccoli": "^3.2.0", diff --git a/yarn.lock b/yarn.lock index 02183d4d05..bd45a0494b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -587,16 +587,16 @@ babel-plugin-dynamic-import-node@^2.3.0: dependencies: object.assign "^4.1.0" -babel-plugin-module-resolver@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/babel-plugin-module-resolver/-/babel-plugin-module-resolver-3.2.0.tgz#ddfa5e301e3b9aa12d852a9979f18b37881ff5a7" - integrity sha512-tjR0GvSndzPew/Iayf4uICWZqjBwnlMWjSx6brryfQ81F9rxBVqwDJtFCV8oOs0+vJeefK9TmdZtkIFdFe1UnA== +babel-plugin-module-resolver@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/babel-plugin-module-resolver/-/babel-plugin-module-resolver-4.0.0.tgz#8f3a3d9d48287dc1d3b0d5595113adabd36a847f" + integrity sha512-3pdEq3PXALilSJ6dnC4wMWr0AZixHRM4utpdpBR9g5QG7B7JwWyukQv7a9hVxkbGFl+nQbrHDqqQOIBtTXTP/Q== dependencies: - find-babel-config "^1.1.0" - glob "^7.1.2" - pkg-up "^2.0.0" - reselect "^3.0.1" - resolve "^1.4.0" + find-babel-config "^1.2.0" + glob "^7.1.6" + pkg-up "^3.1.0" + reselect "^4.0.0" + resolve "^1.13.1" backbone@^1.1.2: version "1.4.0" @@ -2503,7 +2503,7 @@ finalhandler@1.1.2, finalhandler@~1.1.2: statuses "~1.5.0" unpipe "~1.0.0" -find-babel-config@^1.1.0: +find-babel-config@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/find-babel-config/-/find-babel-config-1.2.0.tgz#a9b7b317eb5b9860cda9d54740a8c8337a2283a2" integrity sha512-jB2CHJeqy6a820ssiqwrKMeyC6nNdmrcgkKWJWmpoxpE8RKciYJXCcXRq1h2AzCo5I5BJeN2tkGEO3hLTuePRA== @@ -2532,13 +2532,6 @@ find-up@3.0.0, find-up@^3.0.0: dependencies: locate-path "^3.0.0" -find-up@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= - dependencies: - locate-path "^2.0.0" - find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" @@ -3799,14 +3792,6 @@ load-json-file@^4.0.0: pify "^3.0.0" strip-bom "^3.0.0" -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - locate-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" @@ -4938,13 +4923,6 @@ p-is-promise@^1.1.0: resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-1.1.0.tgz#9c9456989e9f6588017b0434d56097675c3da05e" integrity sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4= -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" - integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== - dependencies: - p-try "^1.0.0" - p-limit@^2.0.0, p-limit@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.0.tgz#417c9941e6027a9abcba5092dd2904e255b5fbc2" @@ -4952,13 +4930,6 @@ p-limit@^2.0.0, p-limit@^2.2.0: dependencies: p-try "^2.0.0" -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= - dependencies: - p-limit "^1.1.0" - p-locate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" @@ -4980,11 +4951,6 @@ p-timeout@^2.0.1: dependencies: p-finally "^1.0.0" -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= - p-try@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" @@ -5137,12 +5103,12 @@ pkg-dir@^3.0.0: dependencies: find-up "^3.0.0" -pkg-up@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f" - integrity sha1-yBmscoBZpGHKscOImivjxJoATX8= +pkg-up@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-3.1.0.tgz#100ec235cc150e4fd42519412596a28512a0def5" + integrity sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA== dependencies: - find-up "^2.1.0" + find-up "^3.0.0" portfinder@^1.0.25: version "1.0.25" @@ -5454,10 +5420,10 @@ requires-port@^1.0.0: resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= -reselect@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/reselect/-/reselect-3.0.1.tgz#efdaa98ea7451324d092b2b2163a6a1d7a9a2147" - integrity sha1-79qpjqdFEyTQkrKyFjpqHXqaIUc= +reselect@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/reselect/-/reselect-4.0.0.tgz#f2529830e5d3d0e021408b246a206ef4ea4437f7" + integrity sha512-qUgANli03jjAyGlnbYVAV5vvnOmJnODyABz51RdBN7M4WaVu8mecZWgyQNkG8Yqe3KRGRt0l4K4B3XVEULC4CA== resolve-dir@^1.0.0, resolve-dir@^1.0.1: version "1.0.1" @@ -5493,10 +5459,10 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.3.2, resolve@^1.4.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.12.0.tgz#3fc644a35c84a48554609ff26ec52b66fa577df6" - integrity sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w== +resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.3.2: + version "1.14.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.14.1.tgz#9e018c540fcf0c427d678b9931cbf45e984bcaff" + integrity sha512-fn5Wobh4cxbLzuHaE+nphztHy43/b++4M6SsGFC2gB8uYwf0C8LcarfCz1un7UTW8OFQg9iNjZ4xpcFVGebDPg== dependencies: path-parse "^1.0.6" From 2a233aaf1eeffd697b1925ad92d757e3ab2b6c27 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 24 Dec 2019 14:07:50 +0000 Subject: [PATCH 166/818] Bump resolve-package-path from 1.2.7 to 2.0.0 (#8983) --- package.json | 2 +- yarn.lock | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a486e78ac9..dd9b4bedab 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,7 @@ "promise.prototype.finally": "^3.1.1", "quick-temp": "^0.1.8", "resolve": "^1.12.0", - "resolve-package-path": "^1.2.7", + "resolve-package-path": "^2.0.0", "rsvp": "^4.8.5", "sane": "^4.1.0", "semver": "^6.3.0", diff --git a/yarn.lock b/yarn.lock index bd45a0494b..a07f871288 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5438,7 +5438,7 @@ resolve-from@^4.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== -resolve-package-path@^1.0.11, resolve-package-path@^1.2.7: +resolve-package-path@^1.0.11: version "1.2.7" resolved "https://registry.yarnpkg.com/resolve-package-path/-/resolve-package-path-1.2.7.tgz#2a7bc37ad96865e239330e3102c31322847e652e" integrity sha512-fVEKHGeK85bGbVFuwO9o1aU0n3vqQGrezPc51JGu9UTXpFQfWq5qCeKxyaRUSvephs+06c5j5rPq/dzHGEo8+Q== @@ -5446,6 +5446,14 @@ resolve-package-path@^1.0.11, resolve-package-path@^1.2.7: path-root "^0.1.1" resolve "^1.10.0" +resolve-package-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve-package-path/-/resolve-package-path-2.0.0.tgz#7f258ab86ff074fff4ff8027a28f94d17d6fb1df" + integrity sha512-/CLuzodHO2wyyHTzls5Qr+EFeG6RcW4u6//gjYvUfcfyuplIX1SSccU+A5A9A78Gmezkl3NBkFAMxLbzTY9TJA== + dependencies: + path-root "^0.1.1" + resolve "^1.13.1" + resolve-path@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/resolve-path/-/resolve-path-1.4.0.tgz#c4bda9f5efb2fce65247873ab36bb4d834fe16f7" From 38dce07dfeebc36f406d0176cd11bf18d1748723 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 25 Dec 2019 03:13:45 +0000 Subject: [PATCH 167/818] Bump chalk from 2.4.2 to 3.0.0 Bumps [chalk](https://github.com/chalk/chalk) from 2.4.2 to 3.0.0. - [Release notes](https://github.com/chalk/chalk/releases) - [Commits](https://github.com/chalk/chalk/compare/v2.4.2...v3.0.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index dd9b4bedab..3d9f936a0d 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "broccoli-stew": "^3.0.0", "calculate-cache-key-for-tree": "^2.0.0", "capture-exit": "^2.0.0", - "chalk": "^2.4.2", + "chalk": "^3.0.0", "ci-info": "^2.0.0", "clean-base-url": "^1.0.0", "compression": "^1.7.4", diff --git a/yarn.lock b/yarn.lock index a07f871288..901b94b1b5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -248,6 +248,11 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd" integrity sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow== +"@types/color-name@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" + integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== + "@types/events@*": version "3.0.0" resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" @@ -400,6 +405,14 @@ ansi-styles@^3.0.0, ansi-styles@^3.2.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" +ansi-styles@^4.1.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.0.tgz#5681f0dcf7ae5880a7841d8831c4724ed9cc0172" + integrity sha512-7kFQgnEaMdRtwf6uSfUnVr9gSGC7faurn+J/Mv90/W+iTtN0405/nLdopfMWwchyxhbGYl6TC4Sccn9TUkGAgg== + dependencies: + "@types/color-name" "^1.1.1" + color-convert "^2.0.1" + ansicolors@~0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.2.1.tgz#be089599097b74a5c9c4a84a0cdbcdb62bd87aef" @@ -1314,6 +1327,14 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.1, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chalk@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" + integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + chardet@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" @@ -1443,11 +1464,23 @@ color-convert@^1.9.0: dependencies: color-name "1.1.3" +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + color-name@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + colors@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" @@ -3006,6 +3039,11 @@ has-flag@^3.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + has-symbol-support-x@^1.4.1: version "1.4.2" resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" @@ -6091,6 +6129,13 @@ supports-color@^6.1.0: dependencies: has-flag "^3.0.0" +supports-color@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" + integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== + dependencies: + has-flag "^4.0.0" + symlink-or-copy@^1.0.0, symlink-or-copy@^1.0.1, symlink-or-copy@^1.1.8, symlink-or-copy@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/symlink-or-copy/-/symlink-or-copy-1.2.0.tgz#5d49108e2ab824a34069b68974486c290020b393" From 169889d88e33ba56a42491f6d17d0c6d79d4d7af Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 25 Dec 2019 06:09:19 +0000 Subject: [PATCH 168/818] Bump sort-package-json from 1.23.1 to 1.31.0 (#8992) --- package.json | 2 +- yarn.lock | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index dd9b4bedab..2525c5fab5 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,7 @@ "sane": "^4.1.0", "semver": "^6.3.0", "silent-error": "^1.1.1", - "sort-package-json": "^1.23.1", + "sort-package-json": "^1.31.0", "symlink-or-copy": "^1.2.0", "temp": "0.9.0", "testem": "^3.0.1", diff --git a/yarn.lock b/yarn.lock index a07f871288..da49025774 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1847,6 +1847,11 @@ detect-indent@^6.0.0: resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-6.0.0.tgz#0abd0f549f69fc6659a254fe96786186b6f528fd" integrity sha512-oSyFlqaTHCItVRGK5RmrmjB+CmaMOW7IaNA/kdxqhoa6d17j/5ce9O9eWXmV/KEdRwqpQA+Vqe8a8Bsybu4YnA== +detect-newline@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" + integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== + diff@3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" @@ -5781,12 +5786,13 @@ sort-object-keys@^1.1.2: resolved "https://registry.yarnpkg.com/sort-object-keys/-/sort-object-keys-1.1.2.tgz#d3a6c48dc2ac97e6bc94367696e03f6d09d37952" integrity sha1-06bEjcKsl+a8lDZ2luA/bQnTeVI= -sort-package-json@^1.23.1: - version "1.23.1" - resolved "https://registry.yarnpkg.com/sort-package-json/-/sort-package-json-1.23.1.tgz#7882349ad885ee6d82ff57af4184f9d6e9159e1d" - integrity sha512-dg6XChDHL+V1gPBLW4fDWsip5T94wpDVlowm8gxXsxQMxX2271zw8JM1RRbJSIrN80/UlwlRdBVkk2SuiuZ2cw== +sort-package-json@^1.31.0: + version "1.31.0" + resolved "https://registry.yarnpkg.com/sort-package-json/-/sort-package-json-1.31.0.tgz#778c652b1ee88c15337b258d3ae7e47576e4fb88" + integrity sha512-zBdnTpMCJNZszbPcAbGIAgfRQ0A0dF/ZOsQdUHICZ6XLuIQK1Mcwp8zfkF3ySg2lT2oKxU4dVhh/9tZxGLBU0A== dependencies: detect-indent "^6.0.0" + detect-newline "3.1.0" glob "^7.1.6" sort-object-keys "^1.1.2" From db7b5188bab084a56a67bde21223b95e26ab9906 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 25 Dec 2019 07:35:38 +0000 Subject: [PATCH 169/818] Bump @babel/plugin-transform-modules-amd from 7.5.0 to 7.7.5 (#8993) --- package.json | 2 +- yarn.lock | 99 ++++++++++++++++++++++++++++++++-------------------- 2 files changed, 62 insertions(+), 39 deletions(-) diff --git a/package.json b/package.json index 2525c5fab5..67408649e0 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ }, "dependencies": { "@babel/core": "^7.7.2", - "@babel/plugin-transform-modules-amd": "^7.5.0", + "@babel/plugin-transform-modules-amd": "^7.7.5", "amd-name-resolver": "^1.3.1", "babel-plugin-module-resolver": "^4.0.0", "bower-config": "^1.4.1", diff --git a/yarn.lock b/yarn.lock index da49025774..0e9d665dc3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -55,44 +55,37 @@ dependencies: "@babel/types" "^7.7.0" -"@babel/helper-module-imports@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz#96081b7111e486da4d2cd971ad1a4fe216cc2e3d" - integrity sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A== - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-module-transforms@^7.1.0": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.4.4.tgz#96115ea42a2f139e619e98ed46df6019b94414b8" - integrity sha512-3Z1yp8TVQf+B4ynN7WoHPKS8EkdTbgAEy0nU0rs/1Kw4pDgmvYH3rz3aI11KgxKCba2cn7N+tqzV1mY2HMN96w== - dependencies: - "@babel/helper-module-imports" "^7.0.0" - "@babel/helper-simple-access" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.4.4" - "@babel/template" "^7.4.4" - "@babel/types" "^7.4.4" - lodash "^4.17.11" +"@babel/helper-module-imports@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.7.4.tgz#e5a92529f8888bf319a6376abfbd1cebc491ad91" + integrity sha512-dGcrX6K9l8258WFjyDLJwuVKxR4XZfU0/vTUgOQYWEnRD8mgr+p4d6fCUMq/ys0h4CCt/S5JhbvtyErjWouAUQ== + dependencies: + "@babel/types" "^7.7.4" + +"@babel/helper-module-transforms@^7.7.5": + version "7.7.5" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.7.5.tgz#d044da7ffd91ec967db25cd6748f704b6b244835" + integrity sha512-A7pSxyJf1gN5qXVcidwLWydjftUN878VkalhXX5iQDuGyiGK3sOrrKKHF4/A4fwHtnsotv/NipwAeLzY4KQPvw== + dependencies: + "@babel/helper-module-imports" "^7.7.4" + "@babel/helper-simple-access" "^7.7.4" + "@babel/helper-split-export-declaration" "^7.7.4" + "@babel/template" "^7.7.4" + "@babel/types" "^7.7.4" + lodash "^4.17.13" "@babel/helper-plugin-utils@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA== -"@babel/helper-simple-access@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz#65eeb954c8c245beaa4e859da6188f39d71e585c" - integrity sha512-Vk+78hNjRbsiu49zAPALxTb+JUQCz1aolpd8osOF16BGnLtseD21nbHgLPGUwrXEurZgiCOUmvs3ExTu4F5x6w== +"@babel/helper-simple-access@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.7.4.tgz#a169a0adb1b5f418cfc19f22586b2ebf58a9a294" + integrity sha512-zK7THeEXfan7UlWsG2A6CI/L9jVnI5+xxKZOdej39Y0YtDYKx9raHk5F2EtK9K8DHRTihYwg20ADt9S36GR78A== dependencies: - "@babel/template" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-split-export-declaration@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz#ff94894a340be78f53f06af038b205c49d993677" - integrity sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q== - dependencies: - "@babel/types" "^7.4.4" + "@babel/template" "^7.7.4" + "@babel/types" "^7.7.4" "@babel/helper-split-export-declaration@^7.7.0": version "7.7.0" @@ -101,6 +94,13 @@ dependencies: "@babel/types" "^7.7.0" +"@babel/helper-split-export-declaration@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.4.tgz#57292af60443c4a3622cf74040ddc28e68336fd8" + integrity sha512-guAg1SXFcVr04Guk9eq0S4/rWS++sbmyqosJzVs8+1fH5NI+ZcmkaSkc7dmtAFbHFva6yRJnjW3yAcGxjueDug== + dependencies: + "@babel/types" "^7.7.4" + "@babel/helpers@^7.7.0": version "7.7.0" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.7.0.tgz#359bb5ac3b4726f7c1fde0ec75f64b3f4275d60b" @@ -124,12 +124,17 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.7.2.tgz#ea8334dc77416bfd9473eb470fd00d8245b3943b" integrity sha512-DDaR5e0g4ZTb9aP7cpSZLkACEBdoLGwJDWgHtBhrGX7Q1RjhdoMOfexICj5cqTAtpowjGQWfcvfnQG7G2kAB5w== -"@babel/plugin-transform-modules-amd@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.5.0.tgz#ef00435d46da0a5961aa728a1d2ecff063e4fb91" - integrity sha512-n20UsQMKnWrltocZZm24cRURxQnWIvsABPJlw/fvoy9c6AgHZzoelAIzajDHAQrDpuKFFPPcFGd7ChsYuIUMpg== +"@babel/parser@^7.7.4": + version "7.7.7" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.7.7.tgz#1b886595419cf92d811316d5b715a53ff38b4937" + integrity sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw== + +"@babel/plugin-transform-modules-amd@^7.7.5": + version "7.7.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.7.5.tgz#39e0fb717224b59475b306402bb8eedab01e729c" + integrity sha512-CT57FG4A2ZUNU1v+HdvDSDrjNWBrtCmSH6YbbgN3Lrf0Di/q/lWRxZrE72p3+HCCz9UjfZOEBdphgC0nzOS6DQ== dependencies: - "@babel/helper-module-transforms" "^7.1.0" + "@babel/helper-module-transforms" "^7.7.5" "@babel/helper-plugin-utils" "^7.0.0" babel-plugin-dynamic-import-node "^2.3.0" @@ -141,7 +146,7 @@ core-js "^2.6.5" regenerator-runtime "^0.13.2" -"@babel/template@^7.1.0", "@babel/template@^7.4.0", "@babel/template@^7.4.4", "@babel/template@^7.7.0": +"@babel/template@^7.4.0", "@babel/template@^7.7.0": version "7.7.0" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.7.0.tgz#4fadc1b8e734d97f56de39c77de76f2562e597d0" integrity sha512-OKcwSYOW1mhWbnTBgQY5lvg1Fxg+VyfQGjcBduZFljfc044J5iDlnDSfhQ867O17XHiSCxYHUxHg2b7ryitbUQ== @@ -150,6 +155,15 @@ "@babel/parser" "^7.7.0" "@babel/types" "^7.7.0" +"@babel/template@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.7.4.tgz#428a7d9eecffe27deac0a98e23bf8e3675d2a77b" + integrity sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw== + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/parser" "^7.7.4" + "@babel/types" "^7.7.4" + "@babel/traverse@^7.4.3", "@babel/traverse@^7.7.0", "@babel/traverse@^7.7.2": version "7.7.2" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.7.2.tgz#ef0a65e07a2f3c550967366b3d9b62a2dcbeae09" @@ -165,7 +179,7 @@ globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.0.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.7.0", "@babel/types@^7.7.2": +"@babel/types@^7.4.0", "@babel/types@^7.7.0", "@babel/types@^7.7.2": version "7.7.2" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.7.2.tgz#550b82e5571dcd174af576e23f0adba7ffc683f7" integrity sha512-YTf6PXoh3+eZgRCBzzP25Bugd2ngmpQVrk7kXX0i5N9BO7TFBtIgZYs7WtxtOGs8e6A4ZI7ECkbBCEHeXocvOA== @@ -174,6 +188,15 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" +"@babel/types@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.7.4.tgz#516570d539e44ddf308c07569c258ff94fde9193" + integrity sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA== + dependencies: + esutils "^2.0.2" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + "@cnakazawa/watch@^1.0.3": version "1.0.3" resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.3.tgz#099139eaec7ebf07a27c1786a3ff64f39464d2ef" From 79f873bef3c301c53c8f4bd1d4480e15ca71a7f1 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 26 Dec 2019 04:40:19 +0000 Subject: [PATCH 170/818] Bump @octokit/rest from 16.35.2 to 16.36.0 (#8994) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 67408649e0..e14d186af5 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,7 @@ }, "devDependencies": { "@ember/edition-utils": "^1.1.1", - "@octokit/rest": "^16.35.2", + "@octokit/rest": "^16.36.0", "broccoli-plugin": "^3.0.0", "broccoli-test-helper": "^2.0.0", "chai": "^4.2.0", diff --git a/yarn.lock b/yarn.lock index 0e9d665dc3..bfda448c8e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -241,10 +241,10 @@ once "^1.4.0" universal-user-agent "^4.0.0" -"@octokit/rest@^16.35.2": - version "16.35.2" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.35.2.tgz#0098c9e2a895d4afb0fa6578479283553543143c" - integrity sha512-iijaNZpn9hBpUdh8YdXqNiWazmq4R1vCUsmxpBB0kCQ0asHZpCx+HNs22eiHuwYKRhO31ZSAGBJLi0c+3XHaKQ== +"@octokit/rest@^16.36.0": + version "16.36.0" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.36.0.tgz#99892c57ba632c2a7b21845584004387b56c2cb7" + integrity sha512-zoZj7Ya4vWBK4fjTwK2Cnmu7XBB1p9ygSvTk2TthN6DVJXM4hQZQoAiknWFLJWSTix4dnA3vuHtjPZbExYoCZA== dependencies: "@octokit/request" "^5.2.0" "@octokit/request-error" "^1.0.2" From d764774dc9388d011bb053580deb8069c81c2f20 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 26 Dec 2019 06:07:33 +0000 Subject: [PATCH 171/818] Bump @babel/core from 7.7.2 to 7.7.7 (#8995) --- package.json | 2 +- yarn.lock | 122 +++++++++++++++++++-------------------------------- 2 files changed, 47 insertions(+), 77 deletions(-) diff --git a/package.json b/package.json index e14d186af5..78ff17828e 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "test:debug": "node debug tests/runner" }, "dependencies": { - "@babel/core": "^7.7.2", + "@babel/core": "^7.7.7", "@babel/plugin-transform-modules-amd": "^7.7.5", "amd-name-resolver": "^1.3.1", "babel-plugin-module-resolver": "^4.0.0", diff --git a/yarn.lock b/yarn.lock index bfda448c8e..efee627d3d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,18 +9,18 @@ dependencies: "@babel/highlight" "^7.0.0" -"@babel/core@^7.3.3", "@babel/core@^7.3.4", "@babel/core@^7.7.2": - version "7.7.2" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.7.2.tgz#ea5b99693bcfc058116f42fa1dd54da412b29d91" - integrity sha512-eeD7VEZKfhK1KUXGiyPFettgF3m513f8FoBSWiQ1xTvl1RAopLs42Wp9+Ze911I6H0N9lNqJMDgoZT7gHsipeQ== +"@babel/core@^7.3.3", "@babel/core@^7.3.4", "@babel/core@^7.7.7": + version "7.7.7" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.7.7.tgz#ee155d2e12300bcc0cff6a8ad46f2af5063803e9" + integrity sha512-jlSjuj/7z138NLZALxVgrx13AOtqip42ATZP7+kYl53GvDV6+4dCek1mVUo8z8c8Xnw/mx2q3d9HWh3griuesQ== dependencies: "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.7.2" - "@babel/helpers" "^7.7.0" - "@babel/parser" "^7.7.2" - "@babel/template" "^7.7.0" - "@babel/traverse" "^7.7.2" - "@babel/types" "^7.7.2" + "@babel/generator" "^7.7.7" + "@babel/helpers" "^7.7.4" + "@babel/parser" "^7.7.7" + "@babel/template" "^7.7.4" + "@babel/traverse" "^7.7.4" + "@babel/types" "^7.7.4" convert-source-map "^1.7.0" debug "^4.1.0" json5 "^2.1.0" @@ -29,31 +29,31 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.4.0", "@babel/generator@^7.7.2": - version "7.7.2" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.7.2.tgz#2f4852d04131a5e17ea4f6645488b5da66ebf3af" - integrity sha512-WthSArvAjYLz4TcbKOi88me+KmDJdKSlfwwN8CnUYn9jBkzhq0ZEPuBfkAWIvjJ3AdEV1Cf/+eSQTnp3IDJKlQ== +"@babel/generator@^7.4.0", "@babel/generator@^7.7.4", "@babel/generator@^7.7.7": + version "7.7.7" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.7.7.tgz#859ac733c44c74148e1a72980a64ec84b85f4f45" + integrity sha512-/AOIBpHh/JU1l0ZFS4kiRCBnLi6OTHzh0RPk3h9isBxkkqELtQNFi1Vr/tiG9p1yfoUdKVwISuXWQR+hwwM4VQ== dependencies: - "@babel/types" "^7.7.2" + "@babel/types" "^7.7.4" jsesc "^2.5.1" lodash "^4.17.13" source-map "^0.5.0" -"@babel/helper-function-name@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.7.0.tgz#44a5ad151cfff8ed2599c91682dda2ec2c8430a3" - integrity sha512-tDsJgMUAP00Ugv8O2aGEua5I2apkaQO7lBGUq1ocwN3G23JE5Dcq0uh3GvFTChPa4b40AWiAsLvCZOA2rdnQ7Q== +"@babel/helper-function-name@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.7.4.tgz#ab6e041e7135d436d8f0a3eca15de5b67a341a2e" + integrity sha512-AnkGIdiBhEuiwdoMnKm7jfPfqItZhgRaZfMg1XX3bS25INOnLPjPG1Ppnajh8eqgt5kPJnfqrRHqFqmjKDZLzQ== dependencies: - "@babel/helper-get-function-arity" "^7.7.0" - "@babel/template" "^7.7.0" - "@babel/types" "^7.7.0" + "@babel/helper-get-function-arity" "^7.7.4" + "@babel/template" "^7.7.4" + "@babel/types" "^7.7.4" -"@babel/helper-get-function-arity@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.0.tgz#c604886bc97287a1d1398092bc666bc3d7d7aa2d" - integrity sha512-tLdojOTz4vWcEnHWHCuPN5P85JLZWbm5Fx5ZsMEMPhF3Uoe3O7awrbM2nQ04bDOUToH/2tH/ezKEOR8zEYzqyw== +"@babel/helper-get-function-arity@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz#cb46348d2f8808e632f0ab048172130e636005f0" + integrity sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA== dependencies: - "@babel/types" "^7.7.0" + "@babel/types" "^7.7.4" "@babel/helper-module-imports@^7.7.4": version "7.7.4" @@ -87,13 +87,6 @@ "@babel/template" "^7.7.4" "@babel/types" "^7.7.4" -"@babel/helper-split-export-declaration@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.0.tgz#1365e74ea6c614deeb56ebffabd71006a0eb2300" - integrity sha512-HgYSI8rH08neWlAH3CcdkFg9qX9YsZysZI5GD8LjhQib/mM0jGOZOVkoUiiV2Hu978fRtjtsGsW6w0pKHUWtqA== - dependencies: - "@babel/types" "^7.7.0" - "@babel/helper-split-export-declaration@^7.7.4": version "7.7.4" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.4.tgz#57292af60443c4a3622cf74040ddc28e68336fd8" @@ -101,14 +94,14 @@ dependencies: "@babel/types" "^7.7.4" -"@babel/helpers@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.7.0.tgz#359bb5ac3b4726f7c1fde0ec75f64b3f4275d60b" - integrity sha512-VnNwL4YOhbejHb7x/b5F39Zdg5vIQpUUNzJwx0ww1EcVRt41bbGRZWhAURrfY32T5zTT3qwNOQFWpn+P0i0a2g== +"@babel/helpers@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.7.4.tgz#62c215b9e6c712dadc15a9a0dcab76c92a940302" + integrity sha512-ak5NGZGJ6LV85Q1Zc9gn2n+ayXOizryhjSUBTdu5ih1tlVCJeuQENzc4ItyCVhINVXvIT/ZQ4mheGIsfBkpskg== dependencies: - "@babel/template" "^7.7.0" - "@babel/traverse" "^7.7.0" - "@babel/types" "^7.7.0" + "@babel/template" "^7.7.4" + "@babel/traverse" "^7.7.4" + "@babel/types" "^7.7.4" "@babel/highlight@^7.0.0": version "7.0.0" @@ -119,12 +112,7 @@ esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.4.3", "@babel/parser@^7.7.0", "@babel/parser@^7.7.2": - version "7.7.2" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.7.2.tgz#ea8334dc77416bfd9473eb470fd00d8245b3943b" - integrity sha512-DDaR5e0g4ZTb9aP7cpSZLkACEBdoLGwJDWgHtBhrGX7Q1RjhdoMOfexICj5cqTAtpowjGQWfcvfnQG7G2kAB5w== - -"@babel/parser@^7.7.4": +"@babel/parser@^7.4.3", "@babel/parser@^7.7.4", "@babel/parser@^7.7.7": version "7.7.7" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.7.7.tgz#1b886595419cf92d811316d5b715a53ff38b4937" integrity sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw== @@ -146,16 +134,7 @@ core-js "^2.6.5" regenerator-runtime "^0.13.2" -"@babel/template@^7.4.0", "@babel/template@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.7.0.tgz#4fadc1b8e734d97f56de39c77de76f2562e597d0" - integrity sha512-OKcwSYOW1mhWbnTBgQY5lvg1Fxg+VyfQGjcBduZFljfc044J5iDlnDSfhQ867O17XHiSCxYHUxHg2b7ryitbUQ== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.7.0" - "@babel/types" "^7.7.0" - -"@babel/template@^7.7.4": +"@babel/template@^7.4.0", "@babel/template@^7.7.4": version "7.7.4" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.7.4.tgz#428a7d9eecffe27deac0a98e23bf8e3675d2a77b" integrity sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw== @@ -164,31 +143,22 @@ "@babel/parser" "^7.7.4" "@babel/types" "^7.7.4" -"@babel/traverse@^7.4.3", "@babel/traverse@^7.7.0", "@babel/traverse@^7.7.2": - version "7.7.2" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.7.2.tgz#ef0a65e07a2f3c550967366b3d9b62a2dcbeae09" - integrity sha512-TM01cXib2+rgIZrGJOLaHV/iZUAxf4A0dt5auY6KNZ+cm6aschuJGqKJM3ROTt3raPUdIDk9siAufIFEleRwtw== +"@babel/traverse@^7.4.3", "@babel/traverse@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.7.4.tgz#9c1e7c60fb679fe4fcfaa42500833333c2058558" + integrity sha512-P1L58hQyupn8+ezVA2z5KBm4/Zr4lCC8dwKCMYzsa5jFMDMQAzaBNy9W5VjB+KAmBjb40U7a/H6ao+Xo+9saIw== dependencies: "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.7.2" - "@babel/helper-function-name" "^7.7.0" - "@babel/helper-split-export-declaration" "^7.7.0" - "@babel/parser" "^7.7.2" - "@babel/types" "^7.7.2" + "@babel/generator" "^7.7.4" + "@babel/helper-function-name" "^7.7.4" + "@babel/helper-split-export-declaration" "^7.7.4" + "@babel/parser" "^7.7.4" + "@babel/types" "^7.7.4" debug "^4.1.0" globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.4.0", "@babel/types@^7.7.0", "@babel/types@^7.7.2": - version "7.7.2" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.7.2.tgz#550b82e5571dcd174af576e23f0adba7ffc683f7" - integrity sha512-YTf6PXoh3+eZgRCBzzP25Bugd2ngmpQVrk7kXX0i5N9BO7TFBtIgZYs7WtxtOGs8e6A4ZI7ECkbBCEHeXocvOA== - dependencies: - esutils "^2.0.2" - lodash "^4.17.13" - to-fast-properties "^2.0.0" - -"@babel/types@^7.7.4": +"@babel/types@^7.4.0", "@babel/types@^7.7.4": version "7.7.4" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.7.4.tgz#516570d539e44ddf308c07569c258ff94fde9193" integrity sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA== From 0c445efad84dfd0d1d6db5906c76f26f6e8a9dab Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 26 Dec 2019 19:44:48 +0000 Subject: [PATCH 172/818] [Security] Bump handlebars from 4.1.2 to 4.5.3 (#8997) --- yarn.lock | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index efee627d3d..cb31abb49a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1467,11 +1467,16 @@ commander@2.8.x: dependencies: graceful-readlink ">= 1.0.0" -commander@^2.15.1, commander@^2.6.0, commander@~2.20.0: +commander@^2.15.1, commander@^2.6.0: version "2.20.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== +commander@~2.20.3: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" @@ -2963,9 +2968,9 @@ growly@^1.3.0: integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= handlebars@^4.0.11, handlebars@^4.0.4, handlebars@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.1.2.tgz#b6b37c1ced0306b221e094fc7aca3ec23b131b67" - integrity sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw== + version "4.5.3" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.5.3.tgz#5cf75bd8714f7605713511a56be7c349becb0482" + integrity sha512-3yPecJoJHK/4c6aZhSvxOyG4vJKDshV36VHp0iVCDVh7o9w2vwi3NSnL2MMPj3YdduqaBcu7cGbggJQM0br9xA== dependencies: neo-async "^2.6.0" optimist "^0.6.1" @@ -6409,11 +6414,11 @@ uc.micro@^1.0.0, uc.micro@^1.0.1, uc.micro@^1.0.5: integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== uglify-js@^3.1.4: - version "3.6.0" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.6.0.tgz#704681345c53a8b2079fb6cec294b05ead242ff5" - integrity sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg== + version "3.7.2" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.7.2.tgz#cb1a601e67536e9ed094a92dd1e333459643d3f9" + integrity sha512-uhRwZcANNWVLrxLfNFEdltoPNhECUR3lc+UdJoG9CBpMcSnKyWA94tc3eAujB1GcMY5Uwq8ZMp4qWpxWYDQmaA== dependencies: - commander "~2.20.0" + commander "~2.20.3" source-map "~0.6.1" underscore.string@^3.2.2, underscore.string@~3.3.4: From 13e4f70bbb45a4efaa2c6d367772217693da26a2 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 27 Dec 2019 04:40:25 +0000 Subject: [PATCH 173/818] Bump eslint-plugin-prettier from 3.1.1 to 3.1.2 (#8998) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 78ff17828e..385458b2db 100644 --- a/package.json +++ b/package.json @@ -143,7 +143,7 @@ "eslint-plugin-chai-expect": "^2.1.0", "eslint-plugin-mocha": "^6.2.2", "eslint-plugin-node": "^10.0.0", - "eslint-plugin-prettier": "^3.1.1", + "eslint-plugin-prettier": "^3.1.2", "fixturify": "^1.2.0", "fixturify-project": "^1.9.1", "mocha": "^6.2.1", diff --git a/yarn.lock b/yarn.lock index cb31abb49a..b69888f27f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2143,10 +2143,10 @@ eslint-plugin-node@^10.0.0: resolve "^1.10.1" semver "^6.1.0" -eslint-plugin-prettier@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.1.tgz#507b8562410d02a03f0ddc949c616f877852f2ba" - integrity sha512-A+TZuHZ0KU0cnn56/9mfR7/KjUJ9QNVXUhwvRFSR7PGPe0zQR6PTkmyqg1AtUUEOzTqeRsUwyKFh0oVZKVCrtA== +eslint-plugin-prettier@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.2.tgz#432e5a667666ab84ce72f945c72f77d996a5c9ba" + integrity sha512-GlolCC9y3XZfv3RQfwGew7NnuFDKsfI4lbvRK+PIIo23SFH+LemGs4cKwzAaRa+Mdb+lQO/STaIayno8T5sJJA== dependencies: prettier-linter-helpers "^1.0.0" From 4944fe374aeb5a38c23d6568bfa28cdb40a4194d Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 30 Dec 2019 04:45:16 +0000 Subject: [PATCH 174/818] Bump @ember/edition-utils from 1.1.1 to 1.2.0 (#9000) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 385458b2db..5a9d3096fb 100644 --- a/package.json +++ b/package.json @@ -129,7 +129,7 @@ "yam": "^1.0.0" }, "devDependencies": { - "@ember/edition-utils": "^1.1.1", + "@ember/edition-utils": "^1.2.0", "@octokit/rest": "^16.36.0", "broccoli-plugin": "^3.0.0", "broccoli-test-helper": "^2.0.0", diff --git a/yarn.lock b/yarn.lock index b69888f27f..2f0e40b44b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -175,10 +175,10 @@ exec-sh "^0.3.2" minimist "^1.2.0" -"@ember/edition-utils@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@ember/edition-utils/-/edition-utils-1.1.1.tgz#d5732c3da593f202e6e1ac6dbee56a758242403f" - integrity sha512-GEhri78jdQp/xxPpM6z08KlB0wrHfnfrJ9dmQk7JeQ4XCiMzXsJci7yooQgg/IcTKCM/PxE/IkGCQAo80adMkw== +"@ember/edition-utils@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@ember/edition-utils/-/edition-utils-1.2.0.tgz#a039f542dc14c8e8299c81cd5abba95e2459cfa6" + integrity sha512-VmVq/8saCaPdesQmftPqbFtxJWrzxNGSQ+e8x8LLe3Hjm36pJ04Q8LeORGZkAeOhldoUX9seLGmSaHeXkIqoog== "@octokit/endpoint@^5.5.0": version "5.5.1" From 601bc2693f44f2807e9bb3c882bbb5235cd6cde6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 31 Dec 2019 04:44:21 +0000 Subject: [PATCH 175/818] Bump promise.prototype.finally from 3.1.1 to 3.1.2 (#9001) --- package.json | 2 +- yarn.lock | 84 +++++++++++++++++++++++++++++++++++++--------------- 2 files changed, 61 insertions(+), 25 deletions(-) diff --git a/package.json b/package.json index 5a9d3096fb..949dacaf1b 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "p-defer": "^3.0.0", "portfinder": "^1.0.25", "promise-map-series": "^0.2.3", - "promise.prototype.finally": "^3.1.1", + "promise.prototype.finally": "^3.1.2", "quick-temp": "^0.1.8", "resolve": "^1.12.0", "resolve-package-path": "^2.0.0", diff --git a/yarn.lock b/yarn.lock index 2f0e40b44b..caa6c43d17 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2042,22 +2042,27 @@ error@^7.0.0: string-template "~0.2.1" xtend "~4.0.0" -es-abstract@^1.13.0, es-abstract@^1.5.1: - version "1.13.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9" - integrity sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg== +es-abstract@^1.17.0-next.0, es-abstract@^1.5.1: + version "1.17.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.0.tgz#f42a517d0036a5591dbb2c463591dc8bb50309b1" + integrity sha512-yYkE07YF+6SIBmg1MsJ9dlub5L48Ek7X0qz+c/CPCHS9EBXfESorzng4cJQjJW5/pB6vDF41u7F8vUhLVDqIug== dependencies: - es-to-primitive "^1.2.0" + es-to-primitive "^1.2.1" function-bind "^1.1.1" has "^1.0.3" - is-callable "^1.1.4" - is-regex "^1.0.4" - object-keys "^1.0.12" + has-symbols "^1.0.1" + is-callable "^1.1.5" + is-regex "^1.0.5" + object-inspect "^1.7.0" + object-keys "^1.1.1" + object.assign "^4.1.0" + string.prototype.trimleft "^2.1.1" + string.prototype.trimright "^2.1.1" -es-to-primitive@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377" - integrity sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg== +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== dependencies: is-callable "^1.1.4" is-date-object "^1.0.1" @@ -3019,6 +3024,11 @@ has-symbols@^1.0.0: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" integrity sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q= +has-symbols@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" + integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== + has-to-string-tag-x@^1.2.0: version "1.4.1" resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" @@ -3062,7 +3072,7 @@ has-values@^1.0.0: is-number "^3.0.0" kind-of "^4.0.0" -has@^1.0.1, has@^1.0.3: +has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== @@ -3342,6 +3352,11 @@ is-callable@^1.1.4: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" integrity sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA== +is-callable@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab" + integrity sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q== + is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -3461,12 +3476,12 @@ is-promise@^2.1.0: resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= -is-regex@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" - integrity sha1-VRdIm1RwkbCTDglWVM7SXul+lJE= +is-regex@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae" + integrity sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ== dependencies: - has "^1.0.1" + has "^1.0.3" is-regexp@^1.0.0: version "1.0.0" @@ -4780,7 +4795,12 @@ object-hash@^1.3.1: resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-1.3.1.tgz#fde452098a951cb145f039bb7d455449ddc126df" integrity sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA== -object-keys@^1.0.11, object-keys@^1.0.12: +object-inspect@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" + integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw== + +object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== @@ -5178,13 +5198,13 @@ promise-map-series@^0.2.1, promise-map-series@^0.2.3: dependencies: rsvp "^3.0.14" -promise.prototype.finally@^3.1.0, promise.prototype.finally@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/promise.prototype.finally/-/promise.prototype.finally-3.1.1.tgz#cb279d3a5020ca6403b3d92357f8e22d50ed92aa" - integrity sha512-gnt8tThx0heJoI3Ms8a/JdkYBVhYP/wv+T7yQimR+kdOEJL21xTFbiJhMRqnSPcr54UVvMbsscDk2w+ivyaLPw== +promise.prototype.finally@^3.1.0, promise.prototype.finally@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/promise.prototype.finally/-/promise.prototype.finally-3.1.2.tgz#b8af89160c9c673cefe3b4c4435b53cfd0287067" + integrity sha512-A2HuJWl2opDH0EafgdjwEw7HysI8ff/n4lW4QEVBCUXFk9QeGecBWv0Deph0UmLe3tTNYegz8MOjsVuE6SMoJA== dependencies: define-properties "^1.1.3" - es-abstract "^1.13.0" + es-abstract "^1.17.0-next.0" function-bind "^1.1.1" propagate@^2.0.0: @@ -5958,6 +5978,22 @@ string-width@^3.0.0, string-width@^3.1.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^5.1.0" +string.prototype.trimleft@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz#9bdb8ac6abd6d602b17a4ed321870d2f8dcefc74" + integrity sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag== + dependencies: + define-properties "^1.1.3" + function-bind "^1.1.1" + +string.prototype.trimright@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz#440314b15996c866ce8a0341894d45186200c5d9" + integrity sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g== + dependencies: + define-properties "^1.1.3" + function-bind "^1.1.1" + string_decoder@0.10, string_decoder@~0.10.x: version "0.10.31" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" From 98d3928f92bf1be0c270a2e880b51580d5256c9b Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Wed, 13 Nov 2019 09:56:39 +0000 Subject: [PATCH 176/818] remove amd-shim duplication --- .../transforms/amd}/amd-shim.js | 0 lib/tasks/transforms/amd/index.js | 22 ++++++------------- 2 files changed, 7 insertions(+), 15 deletions(-) rename lib/{broccoli => tasks/transforms/amd}/amd-shim.js (100%) diff --git a/lib/broccoli/amd-shim.js b/lib/tasks/transforms/amd/amd-shim.js similarity index 100% rename from lib/broccoli/amd-shim.js rename to lib/tasks/transforms/amd/amd-shim.js diff --git a/lib/tasks/transforms/amd/index.js b/lib/tasks/transforms/amd/index.js index 98aa080625..ab492540f0 100644 --- a/lib/tasks/transforms/amd/index.js +++ b/lib/tasks/transforms/amd/index.js @@ -1,6 +1,6 @@ 'use strict'; -const stew = require('broccoli-stew'); +const shimAmd = require('./amd-shim'); class AmdTransformAddon { /** @@ -18,20 +18,12 @@ class AmdTransformAddon { return { amd: { transform: (tree, options) => { - let amdTransform = stew.map(tree, (content, relativePath) => { - const name = options[relativePath].as; - if (name) { - return [ - '(function(define){\n', - content, - '\n})((function(){ function newDefine(){ var args = Array.prototype.slice.call(arguments); args.unshift("', - name, - '"); return define.apply(null, args); }; newDefine.amd = true; return newDefine; })());', - ].join(''); - } else { - return content; - } - }); + let nameMapping = {}; + for (let relativePath in options) { + nameMapping[relativePath] = options[relativePath].as; + } + + let amdTransform = shimAmd(tree, nameMapping); return amdTransform; }, From bc6d511e3460edbed59b1f810a6f4b0a01b7d22d Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Wed, 13 Nov 2019 10:20:23 +0000 Subject: [PATCH 177/818] allow importing named UMD files --- lib/tasks/transforms/amd/amd-shim.js | 19 ++++++------- lib/tasks/transforms/amd/index.js | 6 ----- tests/acceptance/brocfile-smoke-test-slow.js | 27 +++++++++++++++++++ .../app-import-named-umd/ember-cli-build.js | 22 +++++++++++++++ .../vendor/named-umd-example.js | 11 ++++++++ 5 files changed, 70 insertions(+), 15 deletions(-) create mode 100644 tests/fixtures/brocfile-tests/app-import-named-umd/ember-cli-build.js create mode 100644 tests/fixtures/brocfile-tests/app-import-named-umd/vendor/named-umd-example.js diff --git a/lib/tasks/transforms/amd/amd-shim.js b/lib/tasks/transforms/amd/amd-shim.js index 3fa3499e22..8477e704cc 100644 --- a/lib/tasks/transforms/amd/amd-shim.js +++ b/lib/tasks/transforms/amd/amd-shim.js @@ -4,16 +4,17 @@ const stew = require('broccoli-stew'); module.exports = function shimAmd(tree, nameMapping) { return stew.map(tree, (content, relativePath) => { let name = nameMapping[relativePath]; + let sections = [ + '(function(define){\n', + content, + '\n})((function(){ function newDefine(){ var args = Array.prototype.slice.call(arguments);', + ]; if (name) { - return [ - '(function(define){\n', - content, - '\n})((function(){ function newDefine(){ var args = Array.prototype.slice.call(arguments); args.unshift("', - name, - '"); return define.apply(null, args); }; newDefine.amd = true; return newDefine; })());', - ].join(''); - } else { - return content; + sections.push(' args.unshift("'); + sections.push(name); + sections.push('");'); } + sections.push(' return define.apply(null, args); }; newDefine.amd = true; return newDefine; })());'); + return sections.join(''); }); }; diff --git a/lib/tasks/transforms/amd/index.js b/lib/tasks/transforms/amd/index.js index ab492540f0..cac1de5667 100644 --- a/lib/tasks/transforms/amd/index.js +++ b/lib/tasks/transforms/amd/index.js @@ -28,12 +28,6 @@ class AmdTransformAddon { return amdTransform; }, processOptions: (assetPath, entry, options) => { - if (!entry.as) { - throw new Error( - `while importing ${assetPath}: amd transformation requires an \`as\` argument that specifies the desired module name` - ); - } - // If the import is specified to be a different name we must break because of the broccoli rewrite behavior. if (Object.keys(options).indexOf(assetPath) !== -1 && options[assetPath].as !== entry.as) { throw new Error( diff --git a/tests/acceptance/brocfile-smoke-test-slow.js b/tests/acceptance/brocfile-smoke-test-slow.js index f37d8cd883..3c069ff01e 100644 --- a/tests/acceptance/brocfile-smoke-test-slow.js +++ b/tests/acceptance/brocfile-smoke-test-slow.js @@ -315,6 +315,33 @@ describe('Acceptance: brocfile-smoke-test', function() { }) ); + it( + 'can use transformation to turn named UMD into named AMD', + co.wrap(function*() { + yield copyFixtureFiles('brocfile-tests/app-import-named-umd'); + yield runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let outputJS = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'output.js'), { + encoding: 'utf8', + }); + + (function() { + let defineCount = 0; + // eslint-disable-next-line no-unused-vars + function define(name, deps, factory) { + expect(name).to.equal('hello-world'); + expect(deps).to.deep.equal([]); + expect(factory()()).to.equal('Hello World'); + defineCount++; + } + /* eslint-disable no-eval */ + eval(outputJS); + /* eslint-enable no-eval */ + expect(defineCount).to.eql(1); + })(); + }) + ); + it( 'can do amd transform from addon', co.wrap(function*() { diff --git a/tests/fixtures/brocfile-tests/app-import-named-umd/ember-cli-build.js b/tests/fixtures/brocfile-tests/app-import-named-umd/ember-cli-build.js new file mode 100644 index 0000000000..66b5df4e81 --- /dev/null +++ b/tests/fixtures/brocfile-tests/app-import-named-umd/ember-cli-build.js @@ -0,0 +1,22 @@ +const EmberApp = require('ember-cli/lib/broccoli/ember-app'); + +module.exports = function (defaults) { + var app = new EmberApp(defaults, { + }); + + app.import('vendor/named-umd-example.js', { + using: [ + { transformation: 'amd'} + ], + outputFile: '/assets/output.js' + }); + + app.import('vendor/named-umd-example.js', { + using: [ + { transformation: 'amd'} + ], + outputFile: '/assets/output.js' + }); + + return app.toTree(); +}; diff --git a/tests/fixtures/brocfile-tests/app-import-named-umd/vendor/named-umd-example.js b/tests/fixtures/brocfile-tests/app-import-named-umd/vendor/named-umd-example.js new file mode 100644 index 0000000000..4438314d39 --- /dev/null +++ b/tests/fixtures/brocfile-tests/app-import-named-umd/vendor/named-umd-example.js @@ -0,0 +1,11 @@ +!function(e, t) { + if ("function" == typeof define && define.amd) { + define("hello-world", [], t); + } else { + throw new Error("No amd loader found"); + } +}(this, function() { + return function helloWorld() { + return "Hello World"; + } +}); From a300bde04c969b6e6dee9848fc9ada6cdf5582a6 Mon Sep 17 00:00:00 2001 From: Cyrille David Date: Wed, 15 Jan 2020 12:17:48 +0100 Subject: [PATCH 178/818] Remove useless line break ^^ --- blueprints/app/files/.editorconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/blueprints/app/files/.editorconfig b/blueprints/app/files/.editorconfig index 219985c228..c35a002406 100644 --- a/blueprints/app/files/.editorconfig +++ b/blueprints/app/files/.editorconfig @@ -4,7 +4,6 @@ root = true - [*] end_of_line = lf charset = utf-8 From 1833352680dc3f84491364c8a1bdcdc3f4a116f0 Mon Sep 17 00:00:00 2001 From: Jonathan Johnson Date: Tue, 14 Jan 2020 13:50:12 -0800 Subject: [PATCH 179/818] Drop support for Node v8 In line with the Node support policy this drops support for Node v8 which reached end of life on December 31st 2019. Also updated blueprints to match. --- .github/workflows/ci.yml | 2 +- .travis.yml | 5 +---- appveyor.yml | 1 - blueprints/addon/files/.travis.yml | 2 +- blueprints/addon/files/README.md | 2 +- blueprints/app/files/.travis.yml | 2 +- blueprints/app/files/package.json | 2 +- docs/node-support.md | 2 +- package.json | 2 +- tests/fixtures/addon/npm/.travis.yml | 2 +- tests/fixtures/addon/npm/README.md | 2 +- tests/fixtures/addon/npm/package.json | 2 +- tests/fixtures/addon/yarn/.travis.yml | 2 +- tests/fixtures/addon/yarn/README.md | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/npm/.travis.yml | 2 +- tests/fixtures/app/npm/package.json | 2 +- tests/fixtures/app/yarn/.travis.yml | 2 +- tests/fixtures/app/yarn/package.json | 2 +- 19 files changed, 18 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 98ffde6104..8401bf2882 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,7 +48,7 @@ jobs: strategy: matrix: - node-version: [8.x, 10.x, 12.x] + node-version: [10.x, 12.x] steps: - uses: actions/checkout@v1 diff --git a/.travis.yml b/.travis.yml index 079a2bd5aa..02170bd89e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,10 +37,7 @@ jobs: - yarn test - stage: additional tests - name: Node.js 8 - node_js: 8 - - - name: Node.js 10 + name: Node.js 10 node_js: 10 - name: Node.js 12 diff --git a/appveyor.yml b/appveyor.yml index a30c3b0c16..391275b37a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,7 +6,6 @@ image: Visual Studio 2017 environment: MOCHA_REPORTER: "mocha-appveyor-reporter" matrix: - - nodejs_version: "8" - nodejs_version: "10" - nodejs_version: "12" - nodejs_version: "13" diff --git a/blueprints/addon/files/.travis.yml b/blueprints/addon/files/.travis.yml index f16c639c3b..73292278de 100644 --- a/blueprints/addon/files/.travis.yml +++ b/blueprints/addon/files/.travis.yml @@ -3,7 +3,7 @@ language: node_js node_js: # we recommend testing addons with the same minimum supported node version as Ember CLI # so that your addon works for all apps - - "8" + - "10" dist: trusty diff --git a/blueprints/addon/files/README.md b/blueprints/addon/files/README.md index 44d6428a62..881e5e70e3 100644 --- a/blueprints/addon/files/README.md +++ b/blueprints/addon/files/README.md @@ -9,7 +9,7 @@ Compatibility * Ember.js v3.12 or above * Ember CLI v2.13 or above -* Node.js v8 or above +* Node.js v10 or above Installation diff --git a/blueprints/app/files/.travis.yml b/blueprints/app/files/.travis.yml index cd094a3563..2079213f48 100644 --- a/blueprints/app/files/.travis.yml +++ b/blueprints/app/files/.travis.yml @@ -1,7 +1,7 @@ --- language: node_js node_js: - - "8" + - "10" dist: trusty diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 21c0a53b07..9021fa1c99 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -48,7 +48,7 @@ "qunit-dom": "^0.9.2" }, "engines": { - "node": "8.* || 10.* || >= 12" + "node": "10.* || >= 12" }, "ember": { "edition": "octane" diff --git a/docs/node-support.md b/docs/node-support.md index 50313a8886..0edfb68a21 100644 --- a/docs/node-support.md +++ b/docs/node-support.md @@ -10,7 +10,7 @@ | 5.x | 1.13.9 - 2.6.3 | | 6.x | 2.9.0 - 3.9.x | | 7.x | 2.10.0 - 2.16.x | -| 8.x | 2.13.3 - Current | +| 8.x | 2.13.3 - 3.16.x | | 9.x | 2.16.2 - 3.2.x | | 10.x | 3.1.3 - Current | | 11.x | 3.9.0 - 3.13.0 | diff --git a/package.json b/package.json index 949dacaf1b..ae40cacf0d 100644 --- a/package.json +++ b/package.json @@ -161,7 +161,7 @@ "yuidocjs": "0.10.2" }, "engines": { - "node": "8.* || 10.* || >= 12" + "node": "10.* || >= 12" }, "trackingCode": "UA-49225444-1", "greenkeeper": { diff --git a/tests/fixtures/addon/npm/.travis.yml b/tests/fixtures/addon/npm/.travis.yml index 3b54643797..b1b71a965d 100644 --- a/tests/fixtures/addon/npm/.travis.yml +++ b/tests/fixtures/addon/npm/.travis.yml @@ -3,7 +3,7 @@ language: node_js node_js: # we recommend testing addons with the same minimum supported node version as Ember CLI # so that your addon works for all apps - - "8" + - "10" dist: trusty diff --git a/tests/fixtures/addon/npm/README.md b/tests/fixtures/addon/npm/README.md index cf2820eadb..955cce6cfe 100644 --- a/tests/fixtures/addon/npm/README.md +++ b/tests/fixtures/addon/npm/README.md @@ -9,7 +9,7 @@ Compatibility * Ember.js v3.12 or above * Ember CLI v2.13 or above -* Node.js v8 or above +* Node.js v10 or above Installation diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index 943d0544c1..3fce475804 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -52,7 +52,7 @@ "qunit-dom": "^0.9.2" }, "engines": { - "node": "8.* || 10.* || >= 12" + "node": "10.* || >= 12" }, "ember": { "edition": "octane" diff --git a/tests/fixtures/addon/yarn/.travis.yml b/tests/fixtures/addon/yarn/.travis.yml index af96b63073..f5df21049e 100644 --- a/tests/fixtures/addon/yarn/.travis.yml +++ b/tests/fixtures/addon/yarn/.travis.yml @@ -3,7 +3,7 @@ language: node_js node_js: # we recommend testing addons with the same minimum supported node version as Ember CLI # so that your addon works for all apps - - "8" + - "10" dist: trusty diff --git a/tests/fixtures/addon/yarn/README.md b/tests/fixtures/addon/yarn/README.md index cf2820eadb..955cce6cfe 100644 --- a/tests/fixtures/addon/yarn/README.md +++ b/tests/fixtures/addon/yarn/README.md @@ -9,7 +9,7 @@ Compatibility * Ember.js v3.12 or above * Ember CLI v2.13 or above -* Node.js v8 or above +* Node.js v10 or above Installation diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 07e7bd2134..17fb9ce1a1 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -53,7 +53,7 @@ "qunit-dom": "^0.9.2" }, "engines": { - "node": "8.* || 10.* || >= 12" + "node": "10.* || >= 12" }, "ember": { "edition": "octane" diff --git a/tests/fixtures/app/npm/.travis.yml b/tests/fixtures/app/npm/.travis.yml index 8339c408e1..a0208ca37f 100644 --- a/tests/fixtures/app/npm/.travis.yml +++ b/tests/fixtures/app/npm/.travis.yml @@ -1,7 +1,7 @@ --- language: node_js node_js: - - "8" + - "10" dist: trusty diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 3edb2e1d14..52cdfc25b2 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -47,7 +47,7 @@ "qunit-dom": "^0.9.2" }, "engines": { - "node": "8.* || 10.* || >= 12" + "node": "10.* || >= 12" }, "ember": { "edition": "octane" diff --git a/tests/fixtures/app/yarn/.travis.yml b/tests/fixtures/app/yarn/.travis.yml index b05f2ddbad..b1f2a2c3b8 100644 --- a/tests/fixtures/app/yarn/.travis.yml +++ b/tests/fixtures/app/yarn/.travis.yml @@ -1,7 +1,7 @@ --- language: node_js node_js: - - "8" + - "10" dist: trusty diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 9bbe317356..2093bcf4ee 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -48,7 +48,7 @@ "qunit-dom": "^0.9.2" }, "engines": { - "node": "8.* || 10.* || >= 12" + "node": "10.* || >= 12" }, "ember": { "edition": "octane" From c89428a4eb439fc9aeeb6c4cdf2dcb1a5e1d0449 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 15 Jan 2020 13:12:01 -0800 Subject: [PATCH 180/818] Allow failure of Node 8 CI jobs. --- .github/workflows/ci.yml | 5 +++++ .travis.yml | 3 +++ appveyor.yml | 2 ++ 3 files changed, 10 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f95355ac90..70ccbcc482 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,6 +49,9 @@ jobs: strategy: matrix: node-version: [8.x, 10.x, 12.x] + include: + - node-version: 8.x + continue-on-error: true steps: - uses: actions/checkout@v1 @@ -68,7 +71,9 @@ jobs: ${{ runner.os }}-yarn- - run: yarn install + continue-on-error: ${{ matrix['continue-on-error'] == true }} - run: yarn test:all + continue-on-error: ${{ matrix['continue-on-error'] == true }} feature-flags: name: "Feature Flag: ${{ matrix.feature-flag }}" diff --git a/.travis.yml b/.travis.yml index 497e5ca9b8..ba11e63a55 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,6 +29,9 @@ stages: if: type IN (push) AND branch = release jobs: + allow_failures: + - node_js: 8 + include: - stage: basic test name: Basic Tests diff --git a/appveyor.yml b/appveyor.yml index 3ce793d1b4..95e3e3958b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -12,6 +12,8 @@ environment: matrix: fast_finish: true + allow_failures: + - nodejs_version: "8" branches: only: From e164076b946f12e5c95f8dc64c7abae57b6c143e Mon Sep 17 00:00:00 2001 From: "Quinn C. Hoyer" Date: Tue, 5 Nov 2019 10:46:16 -0800 Subject: [PATCH 181/818] Supply a more universal .ui Addon packageInfos do not have a project. All packageInfos have a cache.ui (cherry picked from commit 1652f93ed738168c9a0ce0b25e36063d5f99043c) --- lib/models/package-info-cache/package-info.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/models/package-info-cache/package-info.js b/lib/models/package-info-cache/package-info.js index d2c383ad3a..dca22a3645 100644 --- a/lib/models/package-info-cache/package-info.js +++ b/lib/models/package-info-cache/package-info.js @@ -363,7 +363,7 @@ class PackageInfo { if (process.env.EMBER_CLI_ERROR_ON_INVALID_ADDON) { throw msg; } else { - this.project.ui.writeWarnLine(msg); + this.cache.ui.writeWarnLine(msg); } } } From 07f849c011395648f73d3aa1ccc6233600971937 Mon Sep 17 00:00:00 2001 From: Thomas Wang Date: Tue, 14 Jan 2020 07:14:17 -0800 Subject: [PATCH 182/818] Remove duplicated code This has been moved to lib/broccoli/default-packager.js --- lib/broccoli/ember-app.js | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/lib/broccoli/ember-app.js b/lib/broccoli/ember-app.js index af23e41310..9abc5795d4 100644 --- a/lib/broccoli/ember-app.js +++ b/lib/broccoli/ember-app.js @@ -22,7 +22,6 @@ const concat = require('broccoli-concat'); const BroccoliDebug = require('broccoli-debug'); const ModuleNormalizer = require('broccoli-module-normalizer'); const AmdFunnel = require('broccoli-amd-funnel'); -const ConfigReplace = require('broccoli-config-replace'); const mergeTrees = require('./merge-trees'); const WatchedDir = require('broccoli-source').WatchedDir; const UnwatchedDir = require('broccoli-source').UnwatchedDir; @@ -34,7 +33,6 @@ const omitBy = require('ember-cli-lodash-subset').omitBy; const isNull = require('ember-cli-lodash-subset').isNull; const Funnel = require('broccoli-funnel'); const logger = require('heimdalljs-logger')('ember-cli:ember-app'); -const emberAppUtils = require('../utilities/ember-app-utils'); const addonProcessTree = require('../utilities/addon-process-tree'); const lintAddonsByType = require('../utilities/lint-addons-by-type'); const emberCLIBabelConfigKey = require('../utilities/ember-cli-babel-config-key'); @@ -42,8 +40,6 @@ const { isExperimentEnabled } = require('../experiments'); const semver = require('semver'); const DefaultPackager = require('./default-packager'); -const configReplacePatterns = emberAppUtils.configReplacePatterns; - let DEFAULT_CONFIG = { storeConfigInMeta: true, autoRun: true, @@ -968,36 +964,6 @@ class EmberApp { return this._cachedTemplateTree; } - /** - Returns the tree for /tests/index.html - - @private - @method testIndex - @return {Tree} Tree for /tests/index.html - */ - testIndex() { - let index = new Funnel(this.trees.tests, { - srcDir: '/', - files: ['index.html'], - destDir: '/tests', - annotation: 'Funnel (test index)', - }); - - let patterns = configReplacePatterns({ - addons: this.project.addons, - autoRun: this.options.autoRun, - storeConfigInMeta: this.options.storeConfigInMeta, - isModuleUnification: isExperimentEnabled('MODULE_UNIFICATION') && !!this.trees.src, - }); - - return new ConfigReplace(index, this._defaultPackager.packageConfig(this.tests), { - configPath: path.join(this.name, 'config', 'environments', 'test.json'), - files: ['tests/index.html'], - env: 'test', - patterns, - }); - } - /* * Gather application and add-ons javascript files and return them in a single * tree. From 4f1a5bbf92e695c569504e8cb070a84488ed26b5 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 24 Jan 2020 09:20:13 -0500 Subject: [PATCH 183/818] Add v3.15.2 to CHANGELOG.md. --- CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6ad6d800e..18294175ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # ember-cli Changelog +## v3.15.2 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.15.1...v3.15.2) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.15.1...v3.15.2) + +#### Changelog + +- [#8924](https://github.com/ember-cli/ember-cli/pull/8924) Fix named UMD imports [@kellyselden](https://github.com/kellyselden) +- [#9015](https://github.com/ember-cli/ember-cli/pull/9015) Allow failure of Node 8 CI jobs. [@rwjblue](https://github.com/rwjblue) +- [#9014](https://github.com/ember-cli/ember-cli/pull/9014) Avoid errors when `ui` is not present and a warning will be emitted. [@tmquinn](https://github.com/tmquinn) + +Thank you to all who took the time to contribute! ## v3.15.1 From e17502b45b6f9e337d14fc46e30ae9b2769b8956 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 24 Jan 2020 09:21:15 -0500 Subject: [PATCH 184/818] 3.15.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 17e70b0269..b423fa80c0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.15.1", + "version": "3.15.2", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From 4ec7296d389313f3728d9dbaa4413c654f276415 Mon Sep 17 00:00:00 2001 From: Aleksandr Kanunnikov Date: Thu, 6 Feb 2020 08:16:27 +0300 Subject: [PATCH 185/818] Add maybeMakeCommand method for CLI --- lib/cli/cli.js | 68 ++++++++++++++++++++++++-------------- tests/unit/cli/cli-test.js | 41 +++++++++++++++++++++++ 2 files changed, 84 insertions(+), 25 deletions(-) diff --git a/lib/cli/cli.js b/lib/cli/cli.js index 7f605cbe34..78c5da2e23 100644 --- a/lib/cli/cli.js +++ b/lib/cli/cli.js @@ -82,6 +82,44 @@ class CLI { logger.info('testing %o', !!this.testing); } + /** + * @private + * @method maybeMakeCommand + * @param commandName + * @param commandArgs + * @return {null|CurrentCommand} + */ + maybeMakeCommand(commandName, commandArgs) { + if (this._environment === undefined) { + throw new Error('Unable to make command without environment, you have to execute "run" method first.'); + } + let CurrentCommand = lookupCommand(this._environment.commands, commandName, commandArgs, { + project: this._environment.project, + ui: this.ui, + }); + + /* + * XXX Need to decide what to do here about showing errors. For + * a non-CLI project the cache is local and probably should. For + * a CLI project the cache is there, but not sure when we'll know + * about all the errors, because there may be multiple projects. + * if (this.packageInfoCache.hasErrors()) { + * this.packageInfoCache.showErrors(); + * } + */ + let command = new CurrentCommand({ + ui: this.ui, + analytics: this.analytics, + commands: this._environment.commands, + tasks: this._environment.tasks, + project: this._environment.project, + settings: this._environment.settings, + testing: this.testing, + cli: this, + }); + + return command; + } /** * @private * @method run @@ -89,8 +127,11 @@ class CLI { * @return {Promise} */ run(environment) { + if (environment === undefined) { + return RSVP.reject(new Error('Unable to execute "run" command without environment argument')); + } + this._environment = environment; let shutdownOnExit = null; - return RSVP.hash(environment) .then(environment => { let args = environment.cliArgs.slice(); @@ -100,30 +141,7 @@ class CLI { let commandLookupCreationToken = heimdall.start('lookup-command'); - let CurrentCommand = lookupCommand(environment.commands, commandName, commandArgs, { - project: environment.project, - ui: this.ui, - }); - - /* - * XXX Need to decide what to do here about showing errors. For - * a non-CLI project the cache is local and probably should. For - * a CLI project the cache is there, but not sure when we'll know - * about all the errors, because there may be multiple projects. - * if (this.packageInfoCache.hasErrors()) { - * this.packageInfoCache.showErrors(); - * } - */ - let command = new CurrentCommand({ - ui: this.ui, - analytics: this.analytics, - commands: environment.commands, - tasks: environment.tasks, - project: environment.project, - settings: environment.settings, - testing: this.testing, - cli: this, - }); + let command = this.maybeMakeCommand(commandName, commandArgs); commandLookupCreationToken.stop(); diff --git a/tests/unit/cli/cli-test.js b/tests/unit/cli/cli-test.js index 91b07b66c5..25266b736a 100644 --- a/tests/unit/cli/cli-test.js +++ b/tests/unit/cli/cli-test.js @@ -194,6 +194,47 @@ describe('Unit: CLI', function() { }); }); + it('"run" method must throw error if no evironment provided', function() { + stubValidateAndRun('help'); + + let cli = new CLI({ + ui, + analytics, + testing: true, + }); + + let wasResolved = false; + cli + .run() + .then(() => { + wasResolved = true; + }) + .catch(err => { + expect(err.toString()).to.be.equal('Error: Unable to execute "run" command without environment argument'); + }) + .finally(() => { + expect(wasResolved).to.be.false; + }); + }); + + it('errors correctly if "run" method not called before "maybeMakeCommand" execution', function() { + stubValidateAndRun('help'); + + let cli = new CLI({ + ui, + analytics, + testing: true, + }); + + try { + cli.maybeMakeCommand('foo', ['bar']); + } catch (err) { + expect(err.toString()).to.be.equal( + 'Error: Unable to make command without environment, you have to execute "run" method first.' + ); + } + }); + describe('custom addon command', function() { it('beforeRun can return a promise', function() { let CustomCommand = Command.extend({ From 10aecb0d15a7eb5ce4cc8c0fc7e85ac5d695a00c Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 10 Feb 2020 13:39:40 -0500 Subject: [PATCH 186/818] Make "process already captured" error more useful. This ensures that the stack that captured the process originally is included in the error message. Without this you only know the source for the _second_ (and errant) call to `.capture()`. --- lib/utilities/will-interrupt-process.js | 6 ++++-- tests/unit/utilities/will-interrupt-process-test.js | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/utilities/will-interrupt-process.js b/lib/utilities/will-interrupt-process.js index 170c5add4a..65d3a77162 100644 --- a/lib/utilities/will-interrupt-process.js +++ b/lib/utilities/will-interrupt-process.js @@ -16,12 +16,12 @@ const EventEmitter = require('events'); const handlers = []; -let _process, windowsCtrlCTrap, originalIsRaw; +let _process, _processCapturedLocation, windowsCtrlCTrap, originalIsRaw; module.exports = { capture(outerProcess) { if (_process) { - throw new Error('process already captured'); + throw new Error(`process already captured at: \n\n${_processCapturedLocation.stack}`); } if (outerProcess instanceof EventEmitter === false) { @@ -29,6 +29,7 @@ module.exports = { } _process = outerProcess; + _processCapturedLocation = new Error(); // ember-cli and user apps have many dependencies, many of which require // process.addListener('exit', ....) for cleanup, by default this limit for @@ -62,6 +63,7 @@ module.exports = { } _process = null; + _processCapturedLocation = null; }, /** diff --git a/tests/unit/utilities/will-interrupt-process-test.js b/tests/unit/utilities/will-interrupt-process-test.js index bf3313ab0f..2214169ccb 100644 --- a/tests/unit/utilities/will-interrupt-process-test.js +++ b/tests/unit/utilities/will-interrupt-process-test.js @@ -28,7 +28,8 @@ describe('will interrupt process', function() { willInterruptProcess.capture(mockProcess); expect(true).to.equal(false); } catch (e) { - expect(e.message).to.equal('process already captured'); + expect(e.message).to.include('process already captured'); + expect(e.message).to.include('will-interrupt-process-test.js'); } }); From 4a407f6cf816c2651f2c261106ae144ca368e3b0 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 10 Feb 2020 10:59:17 -0500 Subject: [PATCH 187/818] Update to use Ember + Ember Data 3.16. --- blueprints/app/files/package.json | 4 ++-- tests/fixtures/addon/npm/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/npm/package.json | 4 ++-- tests/fixtures/app/yarn/package.json | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 9021fa1c99..ee6dde361d 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -33,14 +33,14 @@ "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", - "ember-data": "~3.15.0", + "ember-data": "~3.16.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^7.0.0", "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", - "ember-source": "~3.15.0<% if (welcome) { %>", + "ember-source": "~3.16.0<% if (welcome) { %>", "ember-welcome-page": "^4.0.0<% } %>", "eslint-plugin-ember": "^7.7.1", "eslint-plugin-node": "^10.0.0", diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index 3fce475804..481c53d589 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -43,7 +43,7 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", - "ember-source": "~3.15.0", + "ember-source": "~3.16.0", "ember-source-channel-url": "^2.0.1", "ember-try": "^1.4.0", "eslint-plugin-ember": "^7.7.1", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 17fb9ce1a1..8fe5a299ac 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -43,7 +43,7 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", - "ember-source": "~3.15.0", + "ember-source": "~3.16.0", "ember-source-channel-url": "^2.0.1", "ember-try": "^1.4.0", "ember-welcome-page": "^4.0.0", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 52cdfc25b2..a157556c37 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -33,14 +33,14 @@ "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", - "ember-data": "~3.15.0", + "ember-data": "~3.16.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^7.0.0", "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", - "ember-source": "~3.15.0", + "ember-source": "~3.16.0", "eslint-plugin-ember": "^7.7.1", "eslint-plugin-node": "^10.0.0", "loader.js": "^4.7.0", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 2093bcf4ee..0c481fed42 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -33,14 +33,14 @@ "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", - "ember-data": "~3.15.0", + "ember-data": "~3.16.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^7.0.0", "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", - "ember-source": "~3.15.0", + "ember-source": "~3.16.0", "ember-welcome-page": "^4.0.0", "eslint-plugin-ember": "^7.7.1", "eslint-plugin-node": "^10.0.0", From 109a0d28ecd17b462eb37b0314004ebbb1ea096b Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 10 Feb 2020 15:28:37 -0500 Subject: [PATCH 188/818] Fix issue in `treeForSrc` for addon's with `src` but no template compilers. We should _probably_ remove the module unification build support, but that is 1) more work and 2) breaking to folks still using module unification. The goal is to remove that _after_ 3.16 is released (so they'll have seen the deprecation warnings in the LTS version). This broke due to `@ember-data/private-build-infra` using `src/` folder (for non-MU things). In `@ember-data/private-build-infra@3.15.0` that package was **not** an addon (so this issue didn't crop up), but it was changed to be an addon in 3.16.0. --- lib/models/addon.js | 4 ++-- tests/unit/broccoli/template-precompilation-test.js | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/models/addon.js b/lib/models/addon.js index e7be4cda60..bd03f4861a 100644 --- a/lib/models/addon.js +++ b/lib/models/addon.js @@ -882,7 +882,7 @@ let addonProto = { let srcAfterPreprocessTreeHook = this._addonPreprocessTree('src', srcNamespacedTree); let srcAfterTemplatePreprocessing = srcAfterPreprocessTreeHook; - if (!isExperimentEnabled('DELAYED_TRANSPILATION') || registryHasPreprocessor(this.registry, 'template')) { + if (isExperimentEnabled('DELAYED_TRANSPILATION') === false && registryHasPreprocessor(this.registry, 'template')) { srcAfterTemplatePreprocessing = preprocessTemplates(srcAfterPreprocessTreeHook, { registry: this.registry, annotation: `Addon#treeForSrc(${this.name})`, @@ -1214,7 +1214,7 @@ let addonProto = { let preprocessedTemplateTree = this._addonPreprocessTree('template', addonTree); let processedTemplateTree; - if (!isExperimentEnabled('DELAYED_TRANSPILATION') || registryHasPreprocessor(this.registry, 'template')) { + if (!isExperimentEnabled('DELAYED_TRANSPILATION')) { processedTemplateTree = preprocessTemplates(preprocessedTemplateTree, { annotation: `compileTemplates(${this.name})`, registry: this.registry, diff --git a/tests/unit/broccoli/template-precompilation-test.js b/tests/unit/broccoli/template-precompilation-test.js index 619a9b9915..c58816b209 100644 --- a/tests/unit/broccoli/template-precompilation-test.js +++ b/tests/unit/broccoli/template-precompilation-test.js @@ -7,6 +7,8 @@ const expect = require('chai').expect; const BroccoliPlugin = require('broccoli-plugin'); const walkSync = require('walk-sync'); +const { isExperimentEnabled } = require('../../../lib/experiments'); + const MockCLI = require('../../helpers/mock-cli'); const Project = require('../../../lib/models/project'); const Addon = require('../../../lib/models/addon'); @@ -56,6 +58,12 @@ describe('template preprocessors', function() { } describe('Addon', function() { + if (isExperimentEnabled('DELAYED_TRANSPILATION')) { + // these tests fundamentally require running template transpilation + // against the addon's own `addon/` tree + return; + } + beforeEach(async function() { input = await createTempDir(); let MockAddon = Addon.extend({ From 4b6320b2680131979f9a1580dc0a3609fa41e166 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Tue, 11 Feb 2020 10:51:34 -0500 Subject: [PATCH 189/818] Add @glimmer/tracking to default blueprint. This package isn't _strictly_ required (because we polyfill replace it with a Ember.* path at runtime), but having it is much easier to explain (aides consumers in TypeScript land, matches the similar @glimmer/component dependency, etc). --- blueprints/app/files/package.json | 1 + tests/fixtures/addon/npm/package.json | 1 + tests/fixtures/addon/yarn/package.json | 1 + tests/fixtures/app/npm/package.json | 1 + tests/fixtures/app/yarn/package.json | 1 + 5 files changed, 5 insertions(+) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index ee6dde361d..810bdb6c5e 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -20,6 +20,7 @@ "devDependencies": { "@ember/optional-features": "^1.1.0", "@glimmer/component": "^1.0.0", + "@glimmer/tracking": "^1.0.0", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", "ember-auto-import": "^1.5.3", diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index 481c53d589..073f4ccea5 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -27,6 +27,7 @@ "devDependencies": { "@ember/optional-features": "^1.1.0", "@glimmer/component": "^1.0.0", + "@glimmer/tracking": "^1.0.0", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", "ember-auto-import": "^1.5.3", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 8fe5a299ac..72bef03dcd 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -27,6 +27,7 @@ "devDependencies": { "@ember/optional-features": "^1.1.0", "@glimmer/component": "^1.0.0", + "@glimmer/tracking": "^1.0.0", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", "ember-auto-import": "^1.5.3", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index a157556c37..9a7e51c540 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -20,6 +20,7 @@ "devDependencies": { "@ember/optional-features": "^1.1.0", "@glimmer/component": "^1.0.0", + "@glimmer/tracking": "^1.0.0", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", "ember-auto-import": "^1.5.3", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 0c481fed42..836162364b 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -20,6 +20,7 @@ "devDependencies": { "@ember/optional-features": "^1.1.0", "@glimmer/component": "^1.0.0", + "@glimmer/tracking": "^1.0.0", "babel-eslint": "^10.0.3", "broccoli-asset-rev": "^3.0.0", "ember-auto-import": "^1.5.3", From 8ebe43cf13b41c122916cc14ae9d253f4c4986b3 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2020 17:34:56 +0000 Subject: [PATCH 190/818] Bump promise-map-series from 0.2.3 to 0.3.0 Bumps [promise-map-series](https://github.com/joliss/promise-map-series) from 0.2.3 to 0.3.0. - [Release notes](https://github.com/joliss/promise-map-series/releases) - [Changelog](https://github.com/joliss/promise-map-series/blob/master/CHANGELOG.md) - [Commits](https://github.com/joliss/promise-map-series/compare/v0.2.3...v0.3.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2c84aaca3f..d21aed5716 100644 --- a/package.json +++ b/package.json @@ -108,7 +108,7 @@ "npm-package-arg": "^6.1.1", "p-defer": "^3.0.0", "portfinder": "^1.0.25", - "promise-map-series": "^0.2.3", + "promise-map-series": "^0.3.0", "promise.prototype.finally": "^3.1.2", "quick-temp": "^0.1.8", "resolve": "^1.12.0", diff --git a/yarn.lock b/yarn.lock index caa6c43d17..dbf23fdefe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5191,13 +5191,18 @@ progress@^2.0.0: resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== -promise-map-series@^0.2.1, promise-map-series@^0.2.3: +promise-map-series@^0.2.1: version "0.2.3" resolved "https://registry.yarnpkg.com/promise-map-series/-/promise-map-series-0.2.3.tgz#c2d377afc93253f6bd03dbb77755eb88ab20a847" integrity sha1-wtN3r8kyU/a9A9u3d1XriKsgqEc= dependencies: rsvp "^3.0.14" +promise-map-series@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/promise-map-series/-/promise-map-series-0.3.0.tgz#41873ca3652bb7a042b387d538552da9b576f8a1" + integrity sha512-3npG2NGhTc8BWBolLLf8l/92OxMGaRLbqvIh9wjCHhDXNvk4zsxaTaCpiCunW09qWPrN2zeNSNwRLVBrQQtutA== + promise.prototype.finally@^3.1.0, promise.prototype.finally@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/promise.prototype.finally/-/promise.prototype.finally-3.1.2.tgz#b8af89160c9c673cefe3b4c4435b53cfd0287067" From c576f8aaa050a3eb9697f90d86287bdbdb6e0a08 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2020 17:38:23 +0000 Subject: [PATCH 191/818] Bump temp from 0.9.0 to 0.9.1 Bumps [temp](https://github.com/bruce/node-temp) from 0.9.0 to 0.9.1. - [Release notes](https://github.com/bruce/node-temp/releases) - [Commits](https://github.com/bruce/node-temp/compare/v0.9.0...v0.9.1) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 2c84aaca3f..88f9b1cf36 100644 --- a/package.json +++ b/package.json @@ -119,7 +119,7 @@ "silent-error": "^1.1.1", "sort-package-json": "^1.31.0", "symlink-or-copy": "^1.2.0", - "temp": "0.9.0", + "temp": "0.9.1", "testem": "^3.0.1", "tiny-lr": "^1.1.1", "tree-sync": "^2.0.0", diff --git a/yarn.lock b/yarn.lock index caa6c43d17..3c3f342be7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6166,10 +6166,10 @@ tap-parser@^7.0.0: js-yaml "^3.2.7" minipass "^2.2.0" -temp@0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/temp/-/temp-0.9.0.tgz#61391795a11bd9738d4c4d7f55f012cb8f55edaa" - integrity sha512-YfUhPQCJoNQE5N+FJQcdPz63O3x3sdT4Xju69Gj4iZe0lBKOtnAMi0SLj9xKhGkcGhsxThvTJ/usxtFPo438zQ== +temp@0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/temp/-/temp-0.9.1.tgz#2d666114fafa26966cd4065996d7ceedd4dd4697" + integrity sha512-WMuOgiua1xb5R56lE0eH6ivpVmg/lq2OHm4+LtT/xtEtPQ+sz6N3bBM6WZ5FvO1lO4IKIOb43qnhoc4qxP5OeA== dependencies: rimraf "~2.6.2" From c00d6c2436b23385fa2d79d320f30852ac382b81 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Tue, 11 Feb 2020 16:30:00 -0500 Subject: [PATCH 192/818] Update minimum versions of app / addon blueprint dependencies. --- blueprints/app/files/package.json | 14 +++++++------- tests/fixtures/addon/npm/package.json | 14 +++++++------- tests/fixtures/addon/yarn/package.json | 14 +++++++------- tests/fixtures/app/npm/package.json | 14 +++++++------- tests/fixtures/app/yarn/package.json | 14 +++++++------- 5 files changed, 35 insertions(+), 35 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 0c67ce53f5..d958437b3b 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -18,7 +18,7 @@ "test": "ember test" }, "devDependencies": { - "@ember/optional-features": "^1.1.0", + "@ember/optional-features": "^1.3.0", "@glimmer/component": "^1.0.0", "@glimmer/tracking": "^1.0.0", "babel-eslint": "^10.0.3", @@ -26,11 +26,11 @@ "ember-auto-import": "^1.5.3", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^3.2.0", - "ember-cli-babel": "^7.13.0", + "ember-cli-babel": "^7.17.2", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-eslint": "^5.1.0", - "ember-cli-htmlbars": "^4.2.0", - "ember-cli-inject-live-reload": "^2.0.1", + "ember-cli-htmlbars": "^4.2.2", + "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", @@ -43,10 +43,10 @@ "ember-resolver": "^7.0.0", "ember-source": "~3.16.0<% if (welcome) { %>", "ember-welcome-page": "^4.0.0<% } %>", - "eslint-plugin-ember": "^7.7.1", - "eslint-plugin-node": "^10.0.0", + "eslint-plugin-ember": "^7.7.2", + "eslint-plugin-node": "^11.0.0", "loader.js": "^4.7.0", - "qunit-dom": "^0.9.2" + "qunit-dom": "^1.0.0" }, "engines": { "node": "10.* || >= 12" diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index 8314b06d23..9c54e36965 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -21,11 +21,11 @@ "test:all": "ember try:each" }, "dependencies": { - "ember-cli-babel": "^7.13.0", - "ember-cli-htmlbars": "^4.2.0" + "ember-cli-babel": "^7.17.2", + "ember-cli-htmlbars": "^4.2.2" }, "devDependencies": { - "@ember/optional-features": "^1.1.0", + "@ember/optional-features": "^1.3.0", "@glimmer/component": "^1.0.0", "@glimmer/tracking": "^1.0.0", "babel-eslint": "^10.0.3", @@ -34,7 +34,7 @@ "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-eslint": "^5.1.0", - "ember-cli-inject-live-reload": "^2.0.1", + "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", @@ -47,10 +47,10 @@ "ember-source": "~3.16.0", "ember-source-channel-url": "^2.0.1", "ember-try": "^1.4.0", - "eslint-plugin-ember": "^7.7.1", - "eslint-plugin-node": "^10.0.0", + "eslint-plugin-ember": "^7.7.2", + "eslint-plugin-node": "^11.0.0", "loader.js": "^4.7.0", - "qunit-dom": "^0.9.2" + "qunit-dom": "^1.0.0" }, "engines": { "node": "10.* || >= 12" diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index e2c8e9ca1d..2540eede2f 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -21,11 +21,11 @@ "test:all": "ember try:each" }, "dependencies": { - "ember-cli-babel": "^7.13.0", - "ember-cli-htmlbars": "^4.2.0" + "ember-cli-babel": "^7.17.2", + "ember-cli-htmlbars": "^4.2.2" }, "devDependencies": { - "@ember/optional-features": "^1.1.0", + "@ember/optional-features": "^1.3.0", "@glimmer/component": "^1.0.0", "@glimmer/tracking": "^1.0.0", "babel-eslint": "^10.0.3", @@ -34,7 +34,7 @@ "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-eslint": "^5.1.0", - "ember-cli-inject-live-reload": "^2.0.1", + "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", @@ -48,10 +48,10 @@ "ember-source-channel-url": "^2.0.1", "ember-try": "^1.4.0", "ember-welcome-page": "^4.0.0", - "eslint-plugin-ember": "^7.7.1", - "eslint-plugin-node": "^10.0.0", + "eslint-plugin-ember": "^7.7.2", + "eslint-plugin-node": "^11.0.0", "loader.js": "^4.7.0", - "qunit-dom": "^0.9.2" + "qunit-dom": "^1.0.0" }, "engines": { "node": "10.* || >= 12" diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index fcd4f661b3..f3dfa50478 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -18,7 +18,7 @@ "test": "ember test" }, "devDependencies": { - "@ember/optional-features": "^1.1.0", + "@ember/optional-features": "^1.3.0", "@glimmer/component": "^1.0.0", "@glimmer/tracking": "^1.0.0", "babel-eslint": "^10.0.3", @@ -26,11 +26,11 @@ "ember-auto-import": "^1.5.3", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^3.2.0", - "ember-cli-babel": "^7.13.0", + "ember-cli-babel": "^7.17.2", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-eslint": "^5.1.0", - "ember-cli-htmlbars": "^4.2.0", - "ember-cli-inject-live-reload": "^2.0.1", + "ember-cli-htmlbars": "^4.2.2", + "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", @@ -42,10 +42,10 @@ "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", "ember-source": "~3.16.0", - "eslint-plugin-ember": "^7.7.1", - "eslint-plugin-node": "^10.0.0", + "eslint-plugin-ember": "^7.7.2", + "eslint-plugin-node": "^11.0.0", "loader.js": "^4.7.0", - "qunit-dom": "^0.9.2" + "qunit-dom": "^1.0.0" }, "engines": { "node": "10.* || >= 12" diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 7359915412..45daa5071e 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -18,7 +18,7 @@ "test": "ember test" }, "devDependencies": { - "@ember/optional-features": "^1.1.0", + "@ember/optional-features": "^1.3.0", "@glimmer/component": "^1.0.0", "@glimmer/tracking": "^1.0.0", "babel-eslint": "^10.0.3", @@ -26,11 +26,11 @@ "ember-auto-import": "^1.5.3", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^3.2.0", - "ember-cli-babel": "^7.13.0", + "ember-cli-babel": "^7.17.2", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-eslint": "^5.1.0", - "ember-cli-htmlbars": "^4.2.0", - "ember-cli-inject-live-reload": "^2.0.1", + "ember-cli-htmlbars": "^4.2.2", + "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", @@ -43,10 +43,10 @@ "ember-resolver": "^7.0.0", "ember-source": "~3.16.0", "ember-welcome-page": "^4.0.0", - "eslint-plugin-ember": "^7.7.1", - "eslint-plugin-node": "^10.0.0", + "eslint-plugin-ember": "^7.7.2", + "eslint-plugin-node": "^11.0.0", "loader.js": "^4.7.0", - "qunit-dom": "^0.9.2" + "qunit-dom": "^1.0.0" }, "engines": { "node": "10.* || >= 12" From da966f296fcfab3b24d180a1eb1c4776c924dd8e Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2020 04:49:23 +0000 Subject: [PATCH 193/818] Bump sort-package-json from 1.31.0 to 1.39.1 (#9030) --- package.json | 2 +- yarn.lock | 173 +++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 162 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 6b69ca1d07..c44e261308 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,7 @@ "sane": "^4.1.0", "semver": "^6.3.0", "silent-error": "^1.1.1", - "sort-package-json": "^1.31.0", + "sort-package-json": "^1.39.1", "symlink-or-copy": "^1.2.0", "temp": "0.9.1", "testem": "^3.0.1", diff --git a/yarn.lock b/yarn.lock index a42f93827a..ec66604f30 100644 --- a/yarn.lock +++ b/yarn.lock @@ -180,6 +180,27 @@ resolved "https://registry.yarnpkg.com/@ember/edition-utils/-/edition-utils-1.2.0.tgz#a039f542dc14c8e8299c81cd5abba95e2459cfa6" integrity sha512-VmVq/8saCaPdesQmftPqbFtxJWrzxNGSQ+e8x8LLe3Hjm36pJ04Q8LeORGZkAeOhldoUX9seLGmSaHeXkIqoog== +"@nodelib/fs.scandir@2.1.3": + version "2.1.3" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b" + integrity sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw== + dependencies: + "@nodelib/fs.stat" "2.0.3" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.3", "@nodelib/fs.stat@^2.0.2": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz#34dc5f4cabbc720f4e60f75a747e7ecd6c175bd3" + integrity sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz#011b9202a70a6366e436ca5c065844528ab04976" + integrity sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ== + dependencies: + "@nodelib/fs.scandir" "2.1.3" + fastq "^1.6.0" + "@octokit/endpoint@^5.5.0": version "5.5.1" resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-5.5.1.tgz#2eea81e110ca754ff2de11c79154ccab4ae16b3f" @@ -258,7 +279,7 @@ dependencies: "@types/node" "*" -"@types/glob@*": +"@types/glob@*", "@types/glob@^7.1.1": version "7.1.1" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575" integrity sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w== @@ -488,6 +509,11 @@ array-to-sentence@^1.1.0: resolved "https://registry.yarnpkg.com/array-to-sentence/-/array-to-sentence-1.1.0.tgz#c804956dafa53232495b205a9452753a258d39fc" integrity sha1-yASVba+lMjJJWyBalFJ1OiWNOfw= +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + array-unique@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" @@ -756,6 +782,13 @@ braces@^2.3.1: split-string "^3.0.2" to-regex "^3.0.1" +braces@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + broccoli-amd-funnel@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/broccoli-amd-funnel/-/broccoli-amd-funnel-2.0.1.tgz#dbdbfd28841731342d538126567c25bea3f15310" @@ -1893,6 +1926,13 @@ diff@^4.0.1: resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.1.tgz#0c667cb467ebbb5cea7f14f135cc2dba7780a8ff" integrity sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q== +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + doctrine@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" @@ -2457,6 +2497,17 @@ fast-diff@^1.1.2: resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== +fast-glob@^3.0.3: + version "3.1.1" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.1.1.tgz#87ee30e9e9f3eb40d6f254a7997655da753d7c82" + integrity sha512-nTCREpBY8w8r+boyFYAx21iL6faSsQynliPHM4Uf56SbkyohCNxpVPEH9xrF5TXKy+IsjkPUHDKiUkzBVRXn9g== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.0" + merge2 "^1.3.0" + micromatch "^4.0.2" + fast-json-stable-stringify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" @@ -2488,6 +2539,13 @@ fast-sourcemap-concat@^1.4.0: source-map-url "^0.3.0" sourcemap-validator "^1.1.0" +fastq@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.6.0.tgz#4ec8a38f4ac25f21492673adb7eae9cfef47d1c2" + integrity sha512-jmxqQ3Z/nXoeyDmWAzF9kH1aGZSis6e/SbfPmJpUnyZ0ogr6iscHQaml4wsEepEWSdtmpy+eVXmCRIMpxaXqOA== + dependencies: + reusify "^1.0.0" + faye-websocket@~0.10.0: version "0.10.0" resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" @@ -2531,6 +2589,13 @@ fill-range@^4.0.0: repeat-string "^1.6.1" to-regex-range "^2.1.0" +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + finalhandler@1.1.2, finalhandler@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" @@ -2897,11 +2962,23 @@ get-value@^2.0.3, get-value@^2.0.6: resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= +git-hooks-list@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/git-hooks-list/-/git-hooks-list-1.0.2.tgz#b023b76872f00d81b353efd1458fb4a165035575" + integrity sha512-C3c/FG6Pgh053+yK/CnNNYJo5mgCa3OeI+cPxPIl0tyMLm1mGfiV0NX0LrhnjVoX7dfkR78WyW2kvFVHvAlneg== + git-repo-info@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/git-repo-info/-/git-repo-info-2.1.1.tgz#220ffed8cbae74ef8a80e3052f2ccb5179aed058" integrity sha512-8aCohiDo4jwjOwma4FmYFd3i97urZulL8XL24nIPxuE+GZnfsAyy/g2Shqx6OjUiFKUXZM+Yy+KHnOmmA3FVcg== +glob-parent@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.0.tgz#5f4c1d1e748d30cd73ad2944b3577a81b081e8c2" + integrity sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw== + dependencies: + is-glob "^4.0.1" + glob@7.1.3: version "7.1.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" @@ -2962,6 +3039,20 @@ globals@^11.1.0, globals@^11.7.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== +globby@10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.1.tgz#4782c34cb75dd683351335c5829cc3420e606b22" + integrity sha512-sSs4inE1FB2YQiymcmTv6NWENryABjUNPeWhOvmn4SjtKybglsyPZxFB3U1/+L1bYi0rNZDqCLlHyLYDl1Pq5A== + dependencies: + "@types/glob" "^7.1.1" + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.0.3" + glob "^7.1.3" + ignore "^5.1.1" + merge2 "^1.2.3" + slash "^3.0.0" + got@^8.0.1: version "8.3.2" resolved "https://registry.yarnpkg.com/got/-/got-8.3.2.tgz#1d23f64390e97f776cac52e5b936e5f514d2e937" @@ -3444,7 +3535,7 @@ is-extendable@^1.0.1: dependencies: is-plain-object "^2.0.4" -is-extglob@^2.1.0: +is-extglob@^2.1.0, is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= @@ -3473,6 +3564,13 @@ is-glob@^3.1.0: dependencies: is-extglob "^2.1.0" +is-glob@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + dependencies: + is-extglob "^2.1.1" + is-number@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" @@ -3480,6 +3578,11 @@ is-number@^3.0.0: dependencies: kind-of "^3.0.2" +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + is-obj@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" @@ -4429,6 +4532,11 @@ merge-trees@^2.0.0: fs-updater "^1.0.4" heimdalljs "^0.2.5" +merge2@^1.2.3, merge2@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.3.0.tgz#5b366ee83b2f1582c48f87e47cf1a9352103ca81" + integrity sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw== + methods@^1.1.1, methods@^1.1.2, methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" @@ -4453,6 +4561,14 @@ micromatch@^3.0.4, micromatch@^3.1.4: snapdragon "^0.8.1" to-regex "^3.0.2" +micromatch@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" + integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== + dependencies: + braces "^3.0.1" + picomatch "^2.0.5" + mime-db@1.40.0, "mime-db@>= 1.40.0 < 2": version "1.40.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.40.0.tgz#a65057e998db090f732a68f6c276d387d4126c32" @@ -5130,11 +5246,21 @@ path-type@^3.0.0: dependencies: pify "^3.0.0" +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + pathval@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" integrity sha1-uULm1L3mUwBe9rcTYd74cn0GReA= +picomatch@^2.0.5: + version "2.2.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.1.tgz#21bac888b6ed8601f831ce7816e335bc779f0a4a" + integrity sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA== + pify@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" @@ -5560,6 +5686,11 @@ ret@~0.1.10: resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== +reusify@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + rimraf@2.6.3, rimraf@^2.1.4, rimraf@^2.2.8, rimraf@^2.3.4, rimraf@^2.4.1, rimraf@^2.4.3, rimraf@^2.4.4, rimraf@^2.5.3, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3, rimraf@~2.6.2: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" @@ -5596,6 +5727,11 @@ run-async@^2.2.0: dependencies: is-promise "^2.1.0" +run-parallel@^1.1.9: + version "1.1.9" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.9.tgz#c9dd3a7cf9f4b2c4b6244e173a6ed866e61dd679" + integrity sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q== + rxjs@^6.4.0: version "6.5.2" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.2.tgz#2e35ce815cd46d84d02a209fb4e5921e051dbec7" @@ -5743,6 +5879,11 @@ silent-error@^1.0.0, silent-error@^1.0.1, silent-error@^1.1.0, silent-error@^1.1 dependencies: debug "^2.2.0" +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + slice-ansi@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" @@ -5842,20 +5983,21 @@ sort-keys@^2.0.0: dependencies: is-plain-obj "^1.0.0" -sort-object-keys@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/sort-object-keys/-/sort-object-keys-1.1.2.tgz#d3a6c48dc2ac97e6bc94367696e03f6d09d37952" - integrity sha1-06bEjcKsl+a8lDZ2luA/bQnTeVI= +sort-object-keys@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/sort-object-keys/-/sort-object-keys-1.1.3.tgz#bff833fe85cab147b34742e45863453c1e190b45" + integrity sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg== -sort-package-json@^1.31.0: - version "1.31.0" - resolved "https://registry.yarnpkg.com/sort-package-json/-/sort-package-json-1.31.0.tgz#778c652b1ee88c15337b258d3ae7e47576e4fb88" - integrity sha512-zBdnTpMCJNZszbPcAbGIAgfRQ0A0dF/ZOsQdUHICZ6XLuIQK1Mcwp8zfkF3ySg2lT2oKxU4dVhh/9tZxGLBU0A== +sort-package-json@^1.39.1: + version "1.39.1" + resolved "https://registry.yarnpkg.com/sort-package-json/-/sort-package-json-1.39.1.tgz#ac4d8464a1bdf980aa86cd790b876fb5708b7bf0" + integrity sha512-ibynHvDF6jfSpA7tok+larZUPQ4YLm4YO6nP9Iov1NuGsMyvkYm3hmKAA6LdXxwOXzqBqJjedk0rMZ2Sbyra4Q== dependencies: detect-indent "^6.0.0" detect-newline "3.1.0" - glob "^7.1.6" - sort-object-keys "^1.1.2" + git-hooks-list "1.0.2" + globby "10.0.1" + sort-object-keys "^1.1.3" source-map-resolve@^0.5.0: version "0.5.2" @@ -6391,6 +6533,13 @@ to-regex-range@^2.1.0: is-number "^3.0.0" repeat-string "^1.6.1" +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + to-regex@^3.0.1, to-regex@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" From 6493e1a746af9d351d1d98d660b09198c7600b3f Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2020 04:51:07 +0000 Subject: [PATCH 194/818] Bump symlink-or-copy from 1.2.0 to 1.3.1 Bumps [symlink-or-copy](https://github.com/broccolijs/node-symlink-or-copy) from 1.2.0 to 1.3.1. - [Release notes](https://github.com/broccolijs/node-symlink-or-copy/releases) - [Changelog](https://github.com/broccolijs/node-symlink-or-copy/blob/master/CHANGELOG.md) - [Commits](https://github.com/broccolijs/node-symlink-or-copy/compare/v1.2.0...v1.3.1) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index c44e261308..b08d2eaa27 100644 --- a/package.json +++ b/package.json @@ -118,7 +118,7 @@ "semver": "^6.3.0", "silent-error": "^1.1.1", "sort-package-json": "^1.39.1", - "symlink-or-copy": "^1.2.0", + "symlink-or-copy": "^1.3.1", "temp": "0.9.1", "testem": "^3.0.1", "tiny-lr": "^1.1.1", diff --git a/yarn.lock b/yarn.lock index ec66604f30..0cbd4ba38e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6323,10 +6323,10 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" -symlink-or-copy@^1.0.0, symlink-or-copy@^1.0.1, symlink-or-copy@^1.1.8, symlink-or-copy@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/symlink-or-copy/-/symlink-or-copy-1.2.0.tgz#5d49108e2ab824a34069b68974486c290020b393" - integrity sha512-W31+GLiBmU/ZR02Ii0mVZICuNEN9daZ63xZMPDsYgPgNjMtg+atqLEGI7PPI936jYSQZxoLb/63xos8Adrx4Eg== +symlink-or-copy@^1.0.0, symlink-or-copy@^1.0.1, symlink-or-copy@^1.1.8, symlink-or-copy@^1.2.0, symlink-or-copy@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/symlink-or-copy/-/symlink-or-copy-1.3.1.tgz#9506dd64d8e98fa21dcbf4018d1eab23e77f71fe" + integrity sha512-0K91MEXFpBUaywiwSSkmKjnGcasG/rVBXFLJz5DrgGabpYD6N+3yZrfD6uUIfpuTu65DZLHi7N8CizHc07BPZA== sync-disk-cache@^1.3.3: version "1.3.3" From ced0abf514c3b2fd02843958bdf530a1ec43f1e8 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2020 05:40:31 +0000 Subject: [PATCH 195/818] Bump uuid from 3.3.3 to 3.4.0 (#9031) --- package.json | 2 +- yarn.lock | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index c44e261308..a69eef1dd2 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,7 @@ "testem": "^3.0.1", "tiny-lr": "^1.1.1", "tree-sync": "^2.0.0", - "uuid": "^3.3.3", + "uuid": "^3.4.0", "walk-sync": "^2.0.2", "watch-detector": "^1.0.0", "yam": "^1.0.0" diff --git a/yarn.lock b/yarn.lock index ec66604f30..fdfe849a88 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6762,15 +6762,10 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= -uuid@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" - integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== - -uuid@^3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866" - integrity sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ== +uuid@^3.3.2, uuid@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== validate-npm-package-license@^3.0.1: version "3.0.4" From 8eb6041bb6084e8c0456729ed41c88b83629da18 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 12 Feb 2020 11:17:44 -0500 Subject: [PATCH 196/818] Fix tests failing due to chalk update. The chalk@3 update caused a few tests to fail. --- tests/unit/utilities/markdown-color-test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/utilities/markdown-color-test.js b/tests/unit/utilities/markdown-color-test.js index 4295829984..7071cdce3f 100644 --- a/tests/unit/utilities/markdown-color-test.js +++ b/tests/unit/utilities/markdown-color-test.js @@ -73,14 +73,14 @@ describe('MarkdownColor', function() { it('parses markdown files', function() { // console.log(mc.renderFile(path.join(__dirname,'../../../tests/fixtures/markdown/foo.md'))) expect(mc.renderFile(path.join(__dirname, '../../../tests/fixtures/markdown/foo.md'))).to.equal( - '\u001b[0m\u001b[36mtacos are \u001b[33mdelicious\u001b[36m \u001b[34mand I\u001b[39m enjoy eating them\u001b[39m\u001b[0m\n\n' + '\u001b[0m\u001b[36mtacos are \u001b[33mdelicious\u001b[39m\u001b[36m \u001b[34mand I\u001b[39m enjoy eating them\u001b[39m\u001b[0m\n\n' ); }); it('allows tokens inside other token bounds', function() { // console.log(mc.render('tacos are delicious and I enjoy eating them')) expect(mc.render('tacos are delicious and I enjoy eating them')).to.equal( - '\u001b[0m\u001b[36mtacos are \u001b[33mdelicious\u001b[36m and I enjoy eating' + ' them\u001b[39m\u001b[0m\n\n' + '\u001b[0m\u001b[36mtacos are \u001b[33mdelicious\u001b[39m\u001b[36m and I enjoy eating them\u001b[39m\u001b[0m\n\n' ); }); }); From 8911d98d8e2a257455903fd79153ec7a13a32cf3 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 20 Dec 2019 10:21:25 -0500 Subject: [PATCH 197/818] Fix dev/changelog script to emit proper headers. Previously, the script would output only the `#### Blueprint Changes` header but not the actual version number or the `#### Changelog` separator between the blueprint diffs and the changelog entries. --- dev/changelog | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/dev/changelog b/dev/changelog index 6e25014af1..7da8137f8c 100755 --- a/dev/changelog +++ b/dev/changelog @@ -14,7 +14,6 @@ * dev/changelog */ -const { EOL } = require('os'); const GitHubApi = require('@octokit/rest'); const semver = require('semver'); @@ -37,16 +36,20 @@ if (nextVersion[0] !== 'v') { } function generateChangelog(contributions) { - let header = ` + return ` +## ${nextVersion} + #### Blueprint Changes - [\`ember new\` diff](https://github.com/ember-cli/ember-new-output/compare/${currentVersion}...${nextVersion}) - [\`ember addon\` diff](https://github.com/ember-cli/ember-addon-output/compare/${currentVersion}...${nextVersion}) -`; - let footer = 'Thank you to all who took the time to contribute!'; +#### Changelog - return header + EOL + EOL + contributions + EOL + EOL + footer; +${contributions} + +Thank you to all who took the time to contribute! +`; } // only filters when dependabot itself merges a PR From c8a73f33927a4b0c77b70715bd8d7cb1dbd33ff0 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 20 Dec 2019 10:23:05 -0500 Subject: [PATCH 198/818] Cleanup CHANGELOG.md (fix missing headers) --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18294175ad..1f9850db5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,8 @@ Thank you to all who took the time to contribute! Thank you to all who took the time to contribute! +## v3.15.0 + #### Blueprint Changes - [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.14.0...v3.15.0) @@ -68,6 +70,7 @@ Thank you to all who took the time to contribute! - [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.13.2...v3.14.0) - [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.13.2...v3.14.0) +#### Changelog - [#8875](https://github.com/ember-cli/ember-cli/pull/8875) Fix ember-cli-htmlbars-inline-precompile deprecation [@HeroicEric](https://github.com/HeroicEric) - [#8882](https://github.com/ember-cli/ember-cli/pull/8882) Simplify "Get started" message for `ember new` [@dcyriller](https://github.com/dcyriller) @@ -88,6 +91,7 @@ Thank you to all who took the time to contribute! - [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.13.1...v3.13.2) - [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.13.1...v3.13.2) +#### Changelog - [#8875](https://github.com/ember-cli/ember-cli/pull/8875) Fix ember-cli-htmlbars-inline-precompile deprecation [@HeroicEric](https://github.com/HeroicEric) - [#8882](https://github.com/ember-cli/ember-cli/pull/8882) Simplify "Get started" message [@dcyriller](https://github.com/dcyriller) @@ -102,6 +106,7 @@ Thank you to all who took the time to contribute! - [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.13.0...v3.13.1) - [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.13.0...v3.13.1) +#### Changelog - [#8857](https://github.com/ember-cli/ember-cli/pull/8857) Tweaks to release scripts. [@rwjblue](https://github.com/rwjblue) - [#8862](https://github.com/ember-cli/ember-cli/pull/8862) Adjust message for when a new app is created [@dcyriller](https://github.com/dcyriller) From ec382b9b9389f4af13458a1f45f2377a2840d3ae Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 12 Feb 2020 11:31:21 -0500 Subject: [PATCH 199/818] Add v3.16.0 to CHANGELOG.md. --- CHANGELOG.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18294175ad..b44f474b7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,31 @@ # ember-cli Changelog + +## v3.16.0 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.15.2...v3.16.0) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.15.2...v3.16.0) + +#### Changelog + +- [#8905](https://github.com/ember-cli/ember-cli/pull/8905) Use production environment for `npm run build` / `yarn build` by default [@pichfl](https://github.com/pichfl) +- [#8930](https://github.com/ember-cli/ember-cli/pull/8930) / [#8929](https://github.com/ember-cli/ember-cli/pull/8929) Drop Node 11 support [@SergeAstapov](https://github.com/SergeAstapov) +- [#8932](https://github.com/ember-cli/ember-cli/pull/8932) Add Node.js 13 to test matrix [@SergeAstapov](https://github.com/SergeAstapov) +- [#8941](https://github.com/ember-cli/ember-cli/pull/8941) feat(blueprint): resolve remote blueprints via package manager [@buschtoens](https://github.com/buschtoens) +- [#8944](https://github.com/ember-cli/ember-cli/pull/8944) Travis.yml: Remove deprecated `sudo: false` option [@tniezurawski](https://github.com/tniezurawski) +- [#8943](https://github.com/ember-cli/ember-cli/pull/8943) Travis.yml: use fast_finish instead of undocumented fail_fast [@tniezurawski](https://github.com/tniezurawski) +- [#8962](https://github.com/ember-cli/ember-cli/pull/8962) Drop Ember 3.8 and add Ember 3.16 scenarios in default `config/ember-try.js`. [@kellyselden](https://github.com/kellyselden) +- [#8986](https://github.com/ember-cli/ember-cli/pull/8986) Increase testem browser timeout. [@rwjblue](https://github.com/rwjblue) +- [#9012](https://github.com/ember-cli/ember-cli/pull/9012) Drop support for Node v8 [@jrjohnson](https://github.com/jrjohnson) +- [#9013](https://github.com/ember-cli/ember-cli/pull/9013) Remove useless line break in `.editorconfig` file [@dcyriller](https://github.com/dcyriller) +- [#9023](https://github.com/ember-cli/ember-cli/pull/9023) Update to use Ember + Ember Data 3.16. [@rwjblue](https://github.com/rwjblue) +- [#9026](https://github.com/ember-cli/ember-cli/pull/9026) Add @glimmer/tracking to default blueprint. [@rwjblue](https://github.com/rwjblue) +- [#9028](https://github.com/ember-cli/ember-cli/pull/9028) Update minimum versions of app / addon blueprint dependencies. [@rwjblue](https://github.com/rwjblue) + +Thank you to all who took the time to contribute! + ## v3.15.2 #### Blueprint Changes From 6858057ff750be62b141c01f0b2248bedde30399 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 12 Feb 2020 11:31:35 -0500 Subject: [PATCH 200/818] 3.16.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a69eef1dd2..8d0f91108e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.15.2", + "version": "3.16.0", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From 233d1bc9dadf14c13d8a484014e496d490617b39 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 12 Feb 2020 12:08:49 -0500 Subject: [PATCH 201/818] Update Ember and Ember Data to 3.17 betas. --- blueprints/app/files/package.json | 4 ++-- tests/fixtures/addon/npm/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/npm/package.json | 4 ++-- tests/fixtures/app/yarn/package.json | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index d958437b3b..2b6515787f 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -34,14 +34,14 @@ "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", - "ember-data": "~3.16.0", + "ember-data": "~3.17.0-beta.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^7.0.0", "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", - "ember-source": "~3.16.0<% if (welcome) { %>", + "ember-source": "~3.17.0-beta.1<% if (welcome) { %>", "ember-welcome-page": "^4.0.0<% } %>", "eslint-plugin-ember": "^7.7.2", "eslint-plugin-node": "^11.0.0", diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index 9c54e36965..91afd7a6c9 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -44,7 +44,7 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", - "ember-source": "~3.16.0", + "ember-source": "~3.17.0-beta.1", "ember-source-channel-url": "^2.0.1", "ember-try": "^1.4.0", "eslint-plugin-ember": "^7.7.2", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 2540eede2f..a68452d1fe 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -44,7 +44,7 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", - "ember-source": "~3.16.0", + "ember-source": "~3.17.0-beta.1", "ember-source-channel-url": "^2.0.1", "ember-try": "^1.4.0", "ember-welcome-page": "^4.0.0", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index f3dfa50478..1cd657de98 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -34,14 +34,14 @@ "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", - "ember-data": "~3.16.0", + "ember-data": "~3.17.0-beta.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^7.0.0", "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", - "ember-source": "~3.16.0", + "ember-source": "~3.17.0-beta.1", "eslint-plugin-ember": "^7.7.2", "eslint-plugin-node": "^11.0.0", "loader.js": "^4.7.0", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 45daa5071e..d336b608c8 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -34,14 +34,14 @@ "ember-cli-sri": "^2.1.1", "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", - "ember-data": "~3.16.0", + "ember-data": "~3.17.0-beta.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^7.0.0", "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", - "ember-source": "~3.16.0", + "ember-source": "~3.17.0-beta.1", "ember-welcome-page": "^4.0.0", "eslint-plugin-ember": "^7.7.2", "eslint-plugin-node": "^11.0.0", From c81e7a96fccf8654cb41b145dc4d5f6d25755182 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2020 17:21:59 +0000 Subject: [PATCH 202/818] Bump markdown-it from 9.1.0 to 10.0.0 Bumps [markdown-it](https://github.com/markdown-it/markdown-it) from 9.1.0 to 10.0.0. - [Release notes](https://github.com/markdown-it/markdown-it/releases) - [Changelog](https://github.com/markdown-it/markdown-it/blob/master/CHANGELOG.md) - [Commits](https://github.com/markdown-it/markdown-it/compare/9.1.0...10.0.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 27 ++++++++++++++++----------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 8d0f91108e..748863cee6 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,7 @@ "json-stable-stringify": "^1.0.1", "leek": "0.0.24", "lodash.template": "^4.5.0", - "markdown-it": "^9.1.0", + "markdown-it": "^10.0.0", "markdown-it-terminal": "0.1.0", "minimatch": "^3.0.4", "morgan": "^1.9.1", diff --git a/yarn.lock b/yarn.lock index fdfe849a88..473c53331d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2100,6 +2100,11 @@ entities@~1.1.1: resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== +entities@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.0.tgz#68d6084cab1b079767540d80e56a39b423e4abf4" + integrity sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw== + error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -4430,6 +4435,17 @@ markdown-it-terminal@0.1.0: lodash.merge "^4.6.0" markdown-it "^8.3.1" +markdown-it@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-10.0.0.tgz#abfc64f141b1722d663402044e43927f1f50a8dc" + integrity sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg== + dependencies: + argparse "^1.0.7" + entities "~2.0.0" + linkify-it "^2.0.0" + mdurl "^1.0.1" + uc.micro "^1.0.5" + markdown-it@^4.3.0: version "4.4.0" resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-4.4.0.tgz#3df373dbea587a9a7fef3e56311b68908f75c414" @@ -4452,17 +4468,6 @@ markdown-it@^8.0.0, markdown-it@^8.3.1: mdurl "^1.0.1" uc.micro "^1.0.5" -markdown-it@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-9.1.0.tgz#df9601c168568704d554b1fff9af0c5b561168d9" - integrity sha512-xHKG4C8iPriyfu/jc2hsCC045fKrMQ0VexX2F1FGYiRxDxqMB2aAhF8WauJ3fltn2kb90moGBkiiEdooGIg55w== - dependencies: - argparse "^1.0.7" - entities "~1.1.1" - linkify-it "^2.0.0" - mdurl "^1.0.1" - uc.micro "^1.0.5" - matcher-collection@^1.0.0, matcher-collection@^1.0.4, matcher-collection@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/matcher-collection/-/matcher-collection-1.1.2.tgz#1076f506f10ca85897b53d14ef54f90a5c426838" From da37b0775a7d64a06a0f6495eb39be6a70ed0f9f Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 12 Feb 2020 12:29:49 -0500 Subject: [PATCH 203/818] Remove EMBER_CLI_DELAYED_TRANSPILATION experiment. This was an important testing bed for the overall direction, but this work is fully replaced by usage of Embroider itself. --- .github/workflows/ci.yml | 1 - .travis.yml | 1 - lib/broccoli/ember-app.js | 53 +------ lib/experiments/index.js | 2 +- lib/models/addon.js | 37 ++--- package.json | 1 - .../ember-app/app-and-dependencies-test.js | 132 ------------------ .../broccoli/template-precompilation-test.js | 8 -- tests/unit/experiments-test.js | 2 - yarn.lock | 24 +--- 10 files changed, 12 insertions(+), 249 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0ae69b8d9f..552e286beb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,7 +84,6 @@ jobs: - EMBER_CLI_ENABLE_ALL_EXPERIMENTS - EMBER_CLI_PACKAGER - EMBER_CLI_MODULE_UNIFICATION - - EMBER_CLI_DELAYED_TRANSPILATION - EMBER_CLI_SYSTEM_TEMP - EMBER_CLI_BROCCOLI_WATCHER diff --git a/.travis.yml b/.travis.yml index e9636efafe..1074170c6d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,7 +56,6 @@ jobs: - env: EMBER_CLI_ENABLE_ALL_EXPERIMENTS=true - env: EMBER_CLI_PACKAGER=true - env: EMBER_CLI_MODULE_UNIFICATION=true - - env: EMBER_CLI_DELAYED_TRANSPILATION=true - env: EMBER_CLI_SYSTEM_TEMP=false - stage: deploy diff --git a/lib/broccoli/ember-app.js b/lib/broccoli/ember-app.js index 9abc5795d4..9e81fb7d14 100644 --- a/lib/broccoli/ember-app.js +++ b/lib/broccoli/ember-app.js @@ -20,7 +20,6 @@ let preprocessTemplates = p.preprocessTemplates; const concat = require('broccoli-concat'); const BroccoliDebug = require('broccoli-debug'); -const ModuleNormalizer = require('broccoli-module-normalizer'); const AmdFunnel = require('broccoli-amd-funnel'); const mergeTrees = require('./merge-trees'); const WatchedDir = require('broccoli-source').WatchedDir; @@ -1154,39 +1153,10 @@ class EmberApp { return this._cachedNodeModuleTrees; } - _addonBundles(type, _options) { + _addonBundles(type) { if (!this._cachedAddonBundles[type]) { - let options = Object.assign( - { - moduleNormalizerDisabled: this.options.moduleNormalizerDisabled, - }, - _options - ); - let addonBundles = this._addonTreesFor(type); - for (let addonBundle of addonBundles) { - let { name, root } = addonBundle; - - if (isExperimentEnabled('DELAYED_TRANSPILATION')) { - if (!options.moduleNormalizerDisabled) { - // move legacy /modules/addon to /addon - let hasAlreadyPrintedModuleDeprecation; - addonBundle.tree = new ModuleNormalizer(addonBundle.tree, { - callback: () => { - if (!hasAlreadyPrintedModuleDeprecation) { - this.project.ui.writeDeprecateLine( - `Addon "${name}" (found at "${root}") is manually placing files in the legacy "modules" folder. Support for this will be removed in a future version.` - ); - hasAlreadyPrintedModuleDeprecation = true; - } - }, - annotation: `ModuleNormalizer (${type} ${name})`, - }); - } - } - } - this._cachedAddonBundles[type] = addonBundles; } @@ -1712,27 +1682,6 @@ class EmberApp { } _legacyPackage(fullTree) { - if (isExperimentEnabled('DELAYED_TRANSPILATION')) { - fullTree = mergeTrees( - [ - fullTree, - this._legacyAddonCompile('addon', 'addon-tree-output'), - this._legacyAddonCompile('addon-test-support', 'tests/addon-test-support', { - skipTemplates: true, - }), - this._legacyAddonCompile('src', 'addon-tree-output', { - // moduleNormalizerDisabled: true, - amdFunnelDisabled: true, - }), - ], - { - overwrite: true, - } - ); - - fullTree = this._debugTree(fullTree, 'postcompiledAddonTrees'); - } - let javascriptTree = this._defaultPackager.packageJavascript(fullTree); let stylesTree = this._defaultPackager.packageStyles(fullTree); let appIndex = this._defaultPackager.processIndex(fullTree); diff --git a/lib/experiments/index.js b/lib/experiments/index.js index 933625952b..28c58fa76b 100644 --- a/lib/experiments/index.js +++ b/lib/experiments/index.js @@ -1,7 +1,7 @@ 'use strict'; const chalk = require('chalk'); -const availableExperiments = Object.freeze(['PACKAGER', 'MODULE_UNIFICATION', 'DELAYED_TRANSPILATION', 'SYSTEM_TEMP']); +const availableExperiments = Object.freeze(['PACKAGER', 'MODULE_UNIFICATION', 'SYSTEM_TEMP']); const deprecatedExperiments = Object.freeze(['MODULE_UNIFICATION', 'BROCCOLI_WATCHER']); const enabledExperiments = Object.freeze(['SYSTEM_TEMP']); diff --git a/lib/models/addon.js b/lib/models/addon.js index bd03f4861a..aff4413bcd 100644 --- a/lib/models/addon.js +++ b/lib/models/addon.js @@ -327,10 +327,6 @@ let addonProto = { p.setupRegistry(this); this._initDefaultBabelOptions(); - - if (isExperimentEnabled('DELAYED_TRANSPILATION')) { - this.registry.remove('template', 'ember-cli-htmlbars'); - } }, _initDefaultBabelOptions() { @@ -338,19 +334,9 @@ let addonProto = { babel: this[BUILD_BABEL_OPTIONS_FOR_PREPROCESSORS](), }); - let defaultEmberCLIBabelOptions; - if (isExperimentEnabled('DELAYED_TRANSPILATION')) { - defaultEmberCLIBabelOptions = { - compileModules: false, - disablePresetEnv: true, - disableDebugTooling: true, - disableEmberModulesAPIPolyfill: true, - }; - } else { - defaultEmberCLIBabelOptions = { - compileModules: true, - }; - } + let defaultEmberCLIBabelOptions = { + compileModules: true, + }; let emberCLIBabelConfigKey = this._emberCLIBabelConfigKey(); this.__originalOptions[emberCLIBabelConfigKey] = this.options[emberCLIBabelConfigKey] = defaultsDeep( this.options[emberCLIBabelConfigKey], @@ -882,7 +868,7 @@ let addonProto = { let srcAfterPreprocessTreeHook = this._addonPreprocessTree('src', srcNamespacedTree); let srcAfterTemplatePreprocessing = srcAfterPreprocessTreeHook; - if (isExperimentEnabled('DELAYED_TRANSPILATION') === false && registryHasPreprocessor(this.registry, 'template')) { + if (registryHasPreprocessor(this.registry, 'template')) { srcAfterTemplatePreprocessing = preprocessTemplates(srcAfterPreprocessTreeHook, { registry: this.registry, annotation: `Addon#treeForSrc(${this.name})`, @@ -1203,7 +1189,7 @@ let addonProto = { */ compileTemplates(addonTree) { if (this.shouldCompileTemplates()) { - if (!isExperimentEnabled('DELAYED_TRANSPILATION') && !registryHasPreprocessor(this.registry, 'template')) { + if (!registryHasPreprocessor(this.registry, 'template')) { throw new SilentError( `Addon templates were detected, but there are no template compilers registered for \`${this.name}\`. ` + `Please make sure your template precompiler (commonly \`ember-cli-htmlbars\`) is listed in \`dependencies\` ` + @@ -1213,15 +1199,10 @@ let addonProto = { let preprocessedTemplateTree = this._addonPreprocessTree('template', addonTree); - let processedTemplateTree; - if (!isExperimentEnabled('DELAYED_TRANSPILATION')) { - processedTemplateTree = preprocessTemplates(preprocessedTemplateTree, { - annotation: `compileTemplates(${this.name})`, - registry: this.registry, - }); - } else { - processedTemplateTree = preprocessedTemplateTree; - } + let processedTemplateTree = preprocessTemplates(preprocessedTemplateTree, { + annotation: `compileTemplates(${this.name})`, + registry: this.registry, + }); let postprocessedTemplateTree = this._addonPostprocessTree('template', processedTemplateTree); diff --git a/package.json b/package.json index 8d0f91108e..7050f712ff 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,6 @@ "broccoli-funnel-reducer": "^1.0.0", "broccoli-merge-trees": "^3.0.2", "broccoli-middleware": "^2.1.1", - "broccoli-module-normalizer": "^1.3.0", "broccoli-module-unification-reexporter": "^1.0.0", "broccoli-slow-trees": "^3.0.1", "broccoli-source": "^3.0.0", diff --git a/tests/unit/broccoli/ember-app/app-and-dependencies-test.js b/tests/unit/broccoli/ember-app/app-and-dependencies-test.js index f9e62c40f4..68ea0659cc 100644 --- a/tests/unit/broccoli/ember-app/app-and-dependencies-test.js +++ b/tests/unit/broccoli/ember-app/app-and-dependencies-test.js @@ -10,7 +10,6 @@ const Project = require('../../../../lib/models/project'); const buildOutput = broccoliTestHelper.buildOutput; const createTempDir = broccoliTestHelper.createTempDir; const walkSync = require('walk-sync'); -const { isExperimentEnabled } = require('../../../../lib/experiments'); describe('EmberApp#appAndDependencies', function() { let input, output; @@ -133,135 +132,4 @@ describe('EmberApp#appAndDependencies', function() { expect(actualFiles).to.contain('addon-tree-output/modules/my-addon/index.js'); }); - - if (isExperimentEnabled('DELAYED_TRANSPILATION')) { - it('amdFunnelDisabled', async function() { - input.write({ - node_modules: { - 'my-addon': { - addon: { - 'index.js': `define('amd', function() {});`, - }, - 'package.json': JSON.stringify({ - name: 'my-addon', - main: 'index.js', - keywords: ['ember-addon'], - }), - 'index.js': ` - module.exports = { - name: 'my-addon', - setupPreprocessorRegistry(type, registry) { - registry.add('template', { ext: 'hbs', toTree(tree) { return tree; } }); - registry.add('js', { ext: 'js', toTree(tree) { return tree; } }); - }, - } - `, - }, - }, - }); - - let app = createApp({ - amdFunnelDisabled: true, - }); - - let tree; - - app.registry.add('js', { - ext: 'js', - toTree(_tree) { - tree = _tree; - return _tree; - }, - }); - - app.addonTree(); - app._legacyAddonCompile('addon', 'addon-tree-output'); - - output = await buildOutput(tree); - let actualFiles = getFiles(output.path()); - - expect(actualFiles).to.deep.equal(['my-addon/index.js']); - }); - - it('uses preprocessor that is marked by default', async function() { - let app = createApp(); - - app.registry.add('js', { - ext: 'js', - name: 'addon1', - isDefaultForType: true, - toTree(tree) { - return tree; - }, - }); - - app.registry.add('js', { - ext: 'js', - name: 'addon2', - toTree(tree) { - expect(true).to.equal(false); - return tree; - }, - }); - - await buildOutput(app.addonTree()); - }); - - it('uses all registered preprocessors if none is marked by default', async function() { - let count = 0; - let app = createApp(); - - app.registry.add('js', { - ext: 'js', - name: 'addon1', - toTree(tree) { - count++; - return tree; - }, - }); - - app.registry.add('js', { - ext: 'js', - name: 'addon2', - toTree(tree) { - count++; - return tree; - }, - }); - - app.addonTree(); - - await buildOutput(app._legacyAddonCompile('addon', 'addon-tree-output')); - - expect(count).to.equal(2); - }); - - it('throws an exception if more than one preprocessor is marked as default', async function() { - let exceptionMessage; - let app = createApp(); - - app.registry.add('template', { - ext: 'hbs', - name: 'faulty-addon', - isDefaultForType: true, - toTree(tree) { - return tree; - }, - }); - - await (async function() { - app.addonTree(); - - output = await buildOutput(app._legacyAddonCompile('addon', 'addon-tree-output')); - })() - .catch(e => { - exceptionMessage = e.message; - }) - .then(() => { - expect(exceptionMessage).to.equal( - `There are multiple preprocessor plugins marked as default for 'template': fake-template-preprocessor, faulty-addon` - ); - }); - }); - } }); diff --git a/tests/unit/broccoli/template-precompilation-test.js b/tests/unit/broccoli/template-precompilation-test.js index c58816b209..619a9b9915 100644 --- a/tests/unit/broccoli/template-precompilation-test.js +++ b/tests/unit/broccoli/template-precompilation-test.js @@ -7,8 +7,6 @@ const expect = require('chai').expect; const BroccoliPlugin = require('broccoli-plugin'); const walkSync = require('walk-sync'); -const { isExperimentEnabled } = require('../../../lib/experiments'); - const MockCLI = require('../../helpers/mock-cli'); const Project = require('../../../lib/models/project'); const Addon = require('../../../lib/models/addon'); @@ -58,12 +56,6 @@ describe('template preprocessors', function() { } describe('Addon', function() { - if (isExperimentEnabled('DELAYED_TRANSPILATION')) { - // these tests fundamentally require running template transpilation - // against the addon's own `addon/` tree - return; - } - beforeEach(async function() { input = await createTempDir(); let MockAddon = Addon.extend({ diff --git a/tests/unit/experiments-test.js b/tests/unit/experiments-test.js index b8a29f2df6..0999d58975 100644 --- a/tests/unit/experiments-test.js +++ b/tests/unit/experiments-test.js @@ -34,7 +34,6 @@ describe('experiments', function() { delete process.env.EMBER_CLI_ENABLE_ALL_EXPERIMENTS; delete process.env.EMBER_CLI_MODULE_UNIFICATION; delete process.env.EMBER_CLI_PACKAGER; - delete process.env.EMBER_CLI_DELAYED_TRANSPILATION; delete process.env.EMBER_CLI_SYSTEM_TEMP; warnings = []; @@ -52,7 +51,6 @@ describe('experiments', function() { expect(isExperimentEnabled('PACKAGER')).to.be.true; expect(isExperimentEnabled('SYSTEM_TEMP')).to.be.true; - expect(isExperimentEnabled('DELAYED_TRANSPILATION')).to.be.true; expect(warnings).to.deep.equal([]); }); diff --git a/yarn.lock b/yarn.lock index fdfe849a88..4623dbd6d4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -946,16 +946,6 @@ broccoli-middleware@^2.1.1: has-ansi "^3.0.0" mime-types "^2.1.18" -broccoli-module-normalizer@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/broccoli-module-normalizer/-/broccoli-module-normalizer-1.3.0.tgz#f9982d9cbb776b4ed754161cc6547784d3eb19de" - integrity sha512-0idZCOtdVG6xXoQ36Psc1ApMCr3lW5DB+WEAOEwHcUoESIBHzwcRPQTxheGIjZ5o0hxpsRYAUH5x0ErtNezbrQ== - dependencies: - broccoli-plugin "^1.3.0" - merge-trees "^1.0.1" - rimraf "^2.6.2" - symlink-or-copy "^1.1.8" - broccoli-module-unification-reexporter@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/broccoli-module-unification-reexporter/-/broccoli-module-unification-reexporter-1.0.0.tgz#031909c5d3f159ec11d5f9e2346f2861db8acb3e" @@ -2864,7 +2854,7 @@ fs-sync@^1.0.4: mkdirp "^0.5.1" rimraf "^2.1.4" -fs-tree-diff@^0.5.2, fs-tree-diff@^0.5.3, fs-tree-diff@^0.5.4, fs-tree-diff@^0.5.6, fs-tree-diff@^0.5.7, fs-tree-diff@^0.5.9: +fs-tree-diff@^0.5.2, fs-tree-diff@^0.5.3, fs-tree-diff@^0.5.6, fs-tree-diff@^0.5.7, fs-tree-diff@^0.5.9: version "0.5.9" resolved "https://registry.yarnpkg.com/fs-tree-diff/-/fs-tree-diff-0.5.9.tgz#a4ec6182c2f5bd80b9b83c8e23e4522e6f5fd946" integrity sha512-872G8ax0kHh01m9n/2KDzgYwouKza0Ad9iFltBpNykvROvf2AGtoOzPJgGx125aolGPER3JuC7uZFrQ7bG1AZw== @@ -4512,18 +4502,6 @@ merge-source-map@^1.1.0: dependencies: source-map "^0.6.1" -merge-trees@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-trees/-/merge-trees-1.0.1.tgz#ccbe674569787f9def17fd46e6525f5700bbd23e" - integrity sha1-zL5nRWl4f53vF/1G5lJfVwC70j4= - dependencies: - can-symlink "^1.0.0" - fs-tree-diff "^0.5.4" - heimdalljs "^0.2.1" - heimdalljs-logger "^0.1.7" - rimraf "^2.4.3" - symlink-or-copy "^1.0.0" - merge-trees@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-trees/-/merge-trees-2.0.0.tgz#a560d796e566c5d9b2c40472a2967cca48d85161" From 2eaa2606ffc65a47c5ec88cd5bc7b183b3a25ae6 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 12 Feb 2020 12:45:34 -0500 Subject: [PATCH 204/818] Remove long enabled EMBER_CLI_SYSTEM_TEMP experiment. This experiment has been enabled for quite some time. --- .github/workflows/ci.yml | 1 - .travis.yml | 1 - lib/experiments/index.js | 4 +- lib/models/builder.js | 23 +------- lib/utilities/attempt-never-index.js | 27 ---------- tests/unit/experiments-test.js | 9 ---- tests/unit/models/builder-test.js | 53 ++++++------------- .../utilities/attempt-never-index-test.js | 33 ------------ 8 files changed, 20 insertions(+), 131 deletions(-) delete mode 100644 lib/utilities/attempt-never-index.js delete mode 100644 tests/unit/utilities/attempt-never-index-test.js diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0ae69b8d9f..451aadbf12 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,7 +85,6 @@ jobs: - EMBER_CLI_PACKAGER - EMBER_CLI_MODULE_UNIFICATION - EMBER_CLI_DELAYED_TRANSPILATION - - EMBER_CLI_SYSTEM_TEMP - EMBER_CLI_BROCCOLI_WATCHER steps: diff --git a/.travis.yml b/.travis.yml index e9636efafe..30d7399bd8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,7 +57,6 @@ jobs: - env: EMBER_CLI_PACKAGER=true - env: EMBER_CLI_MODULE_UNIFICATION=true - env: EMBER_CLI_DELAYED_TRANSPILATION=true - - env: EMBER_CLI_SYSTEM_TEMP=false - stage: deploy name: Publish API Docs diff --git a/lib/experiments/index.js b/lib/experiments/index.js index 933625952b..6e1e157d5b 100644 --- a/lib/experiments/index.js +++ b/lib/experiments/index.js @@ -1,10 +1,10 @@ 'use strict'; const chalk = require('chalk'); -const availableExperiments = Object.freeze(['PACKAGER', 'MODULE_UNIFICATION', 'DELAYED_TRANSPILATION', 'SYSTEM_TEMP']); +const availableExperiments = Object.freeze(['PACKAGER', 'MODULE_UNIFICATION', 'DELAYED_TRANSPILATION']); const deprecatedExperiments = Object.freeze(['MODULE_UNIFICATION', 'BROCCOLI_WATCHER']); -const enabledExperiments = Object.freeze(['SYSTEM_TEMP']); +const enabledExperiments = Object.freeze([]); const deprecatedExperimentsDeprecationsIssued = []; function isExperimentEnabled(experimentName) { diff --git a/lib/models/builder.js b/lib/models/builder.js index 7d2a23201f..a176eee4e4 100644 --- a/lib/models/builder.js +++ b/lib/models/builder.js @@ -6,12 +6,10 @@ const Promise = require('rsvp').Promise; const CoreObject = require('core-object'); const SilentError = require('silent-error'); const chalk = require('chalk'); -const attemptNeverIndex = require('../utilities/attempt-never-index'); const findBuildFile = require('../utilities/find-build-file'); const _resetTreeCache = require('./addon')._resetTreeCache; const Sync = require('tree-sync'); const heimdall = require('heimdalljs'); -const { isExperimentEnabled } = require('../experiments'); const progress = require('../utilities/heimdall-progress'); /** @@ -67,21 +65,8 @@ class Builder extends CoreObject { let broccoli = require('broccoli'); - // If not using system temp dir, compatibility mode with broccoli-builder, tmp in root - let tmpDir; - if (!isExperimentEnabled('SYSTEM_TEMP')) { - tmpDir = `${this.project.root}/tmp`; - if (!fs.existsSync(tmpDir)) { - fs.mkdir(tmpDir); - } - } - - let options = { - tmpdir: tmpDir, - }; - try { - this.builder = new broccoli.Builder(this.tree, options); + this.builder = new broccoli.Builder(this.tree); return; } catch (e) { // Catch here to trap InvalidNodeError. If this is thrown, it's because the node provided is not valid @@ -103,7 +88,7 @@ class Builder extends CoreObject { broccoli = require('broccoli-builder'); this.broccoliBuilderFallback = true; - this.builder = new broccoli.Builder(this.tree, options); + this.builder = new broccoli.Builder(this.tree); } /** @@ -200,10 +185,6 @@ class Builder extends CoreObject { build(addWatchDirCallback, resultAnnotation) { this.project._instrumentation.start('build'); - if (!isExperimentEnabled('SYSTEM_TEMP')) { - attemptNeverIndex('tmp'); - } - if (addWatchDirCallback && !this.broccoliBuilderFallback) { for (let path of this.builder.watchedPaths) { addWatchDirCallback(path); diff --git a/lib/utilities/attempt-never-index.js b/lib/utilities/attempt-never-index.js deleted file mode 100644 index ac3d3b022d..0000000000 --- a/lib/utilities/attempt-never-index.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; - -let isDarwin = /darwin/i.test(require('os').type()); -const logger = require('heimdalljs-logger')('ember-cli:utilities/attempt-metadata-index-file'); - -/* - * Writes a `.metadata_never_index` file to the specified folder if running on OS X. - * - * This hints to spotlight that this folder should not be indexed. - * - * @param {String} dir path to the folder that should not be indexed - */ -module.exports = function(dir) { - let path = `${dir}/.metadata_never_index`; - - if (!isDarwin) { - logger.info('not darwin, skipping %s (which hints to spotlight to prevent indexing)', path); - return; - } - - logger.info('creating: %s (to prevent spotlight indexing)', path); - - const fs = require('fs-extra'); - - fs.mkdirsSync(dir); - fs.writeFileSync(path); -}; diff --git a/tests/unit/experiments-test.js b/tests/unit/experiments-test.js index b8a29f2df6..2967e8583f 100644 --- a/tests/unit/experiments-test.js +++ b/tests/unit/experiments-test.js @@ -35,7 +35,6 @@ describe('experiments', function() { delete process.env.EMBER_CLI_MODULE_UNIFICATION; delete process.env.EMBER_CLI_PACKAGER; delete process.env.EMBER_CLI_DELAYED_TRANSPILATION; - delete process.env.EMBER_CLI_SYSTEM_TEMP; warnings = []; console.warn = warning => warnings.push(warning); @@ -51,19 +50,11 @@ describe('experiments', function() { process.env.EMBER_CLI_ENABLE_ALL_EXPERIMENTS = true; expect(isExperimentEnabled('PACKAGER')).to.be.true; - expect(isExperimentEnabled('SYSTEM_TEMP')).to.be.true; expect(isExperimentEnabled('DELAYED_TRANSPILATION')).to.be.true; expect(warnings).to.deep.equal([]); }); - it('should have SYSTEM_TEMP disabled when environment flag is present', function() { - process.env.EMBER_CLI_SYSTEM_TEMP = 'false'; - expect(isExperimentEnabled('SYSTEM_TEMP')).to.be.false; - - expect(warnings).to.deep.equal([]); - }); - it('setting an already disabled feature to false does not enable it', function() { process.env.EMBER_CLI_PACKAGER = 'false'; expect(isExperimentEnabled('PACKAGER')).to.be.false; diff --git a/tests/unit/models/builder-test.js b/tests/unit/models/builder-test.js index 028ce5fc8c..2d85e76eda 100644 --- a/tests/unit/models/builder-test.js +++ b/tests/unit/models/builder-test.js @@ -9,7 +9,6 @@ const rimraf = require('rimraf'); const fixturify = require('fixturify'); const MockProject = require('../../helpers/mock-project'); const mkTmpDirIn = require('../../../lib/utilities/mk-tmp-dir-in'); -const { isExperimentEnabled } = require('../../../lib/experiments'); const td = require('testdouble'); const ci = require('ci-info'); const chai = require('../../chai'); @@ -200,45 +199,25 @@ describe('models/builder.js', function() { expect(output).to.not.include('Heimdalljs < 0.1.4 found. Please remove old versions'); }); - if (!isExperimentEnabled('SYSTEM_TEMP')) { - it('writes temp files to project root by default', async function() { - const project = new MockProject(); - project.root += '/tests/fixtures/build/simple'; - - builder = new Builder({ - project, - ui: project.ui, - processBuildResult(buildResults) { - return Promise.resolve(buildResults); - }, - }); - - await builder.build(); - expect(fs.existsSync(`${builder.project.root}/tmp`)).to.be.true; + it('writes temp files to Broccoli temp dir', async function() { + const project = new MockProject(); + project.root += '/tests/fixtures/build/simple'; + expect(fs.existsSync(`${builder.project.root}/tmp`)).to.be.false; + builder = new Builder({ + project, + ui: project.ui, + processBuildResult(buildResults) { + return Promise.resolve(buildResults); + }, }); - } - if (isExperimentEnabled('SYSTEM_TEMP')) { - it('writes temp files to Broccoli temp dir when EMBER_CLI_SYSTEM_TEMP=1', async function() { - const project = new MockProject(); - project.root += '/tests/fixtures/build/simple'; - expect(fs.existsSync(`${builder.project.root}/tmp`)).to.be.false; - builder = new Builder({ - project, - ui: project.ui, - processBuildResult(buildResults) { - return Promise.resolve(buildResults); - }, - }); - - expect(fs.existsSync(`${builder.project.root}/tmp`)).to.be.false; + expect(fs.existsSync(`${builder.project.root}/tmp`)).to.be.false; - let result = await builder.build(); - expect(fs.existsSync(result.directory)).to.be.true; - expect(fs.existsSync(`${builder.project.root}/tmp`)).to.be.false; - rimraf.sync(result.directory); - }); - } + let result = await builder.build(); + expect(fs.existsSync(result.directory)).to.be.true; + expect(fs.existsSync(`${builder.project.root}/tmp`)).to.be.false; + rimraf.sync(result.directory); + }); (ci.APPVEYOR ? it.skip : it)('produces the correct output', async function() { const project = new MockProject(); diff --git a/tests/unit/utilities/attempt-never-index-test.js b/tests/unit/utilities/attempt-never-index-test.js deleted file mode 100644 index 121a7705d1..0000000000 --- a/tests/unit/utilities/attempt-never-index-test.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -const attemptNeverIndex = require('../../../lib/utilities/attempt-never-index'); -const quickTemp = require('quick-temp'); -let isDarwin = /darwin/i.test(require('os').type()); - -const chai = require('../../chai'); -let expect = chai.expect; -let file = chai.file; - -describe('attempt-never-index', function() { - let context = {}; - let tmpPath; - before(function() { - tmpPath = quickTemp.makeOrRemake(context, 'attempt-never-index'); - }); - - after(function() { - quickTemp.remove(context, 'attempt-never-index'); - }); - - it('sets the hint to spotlight if possible', function() { - expect(file(`${tmpPath}/.metadata_never_index`)).to.not.exist; - - attemptNeverIndex(tmpPath); - - if (isDarwin) { - expect(file(`${tmpPath}/.metadata_never_index`)).to.exist; - } else { - expect(file(`${tmpPath}/.metadata_never_index`)).to.not.exist; - } - }); -}); From f5b44ba21c60d83ee8f2384a7af7bb4a6181ffcd Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 20 Dec 2019 09:41:31 -0500 Subject: [PATCH 205/818] Add specific GH actions linting job. --- .github/workflows/ci.yml | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0ae69b8d9f..a258cc49c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,30 @@ on: - cron: '0 3 * * *' # daily, at 3am jobs: + linting: + name: Linting + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 12.x + + - name: get yarn cache dir + id: yarn-cache + run: echo "::set-output name=dir::$(yarn cache dir)" + + - uses: actions/cache@v1 + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - run: yarn install + - run: yarn lint + basic-tests: name: Basic Tests runs-on: ubuntu-latest @@ -37,14 +61,13 @@ jobs: ${{ runner.os }}-yarn- - run: yarn install - - run: yarn lint - run: yarn test tests: name: Node.js ${{ matrix.node-version }} runs-on: ubuntu-latest - needs: [basic-tests] + needs: [linting, basic-tests] strategy: matrix: @@ -76,7 +99,7 @@ jobs: name: "Feature Flag: ${{ matrix.feature-flag }}" runs-on: ubuntu-latest - needs: [basic-tests] + needs: [linting, basic-tests] strategy: matrix: From cf6ffc42538dc31ea626f62ce8177c561fd7c673 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 20 Dec 2019 09:43:05 -0500 Subject: [PATCH 206/818] Always use `--frozen-lockfile` and `--non-interactive` with `yarn`. Ensures that our lockfile does not get out of sync, and runs _slightly_ faster. --- .github/workflows/ci.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a258cc49c9..a3a62c83a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: restore-keys: | ${{ runner.os }}-yarn- - - run: yarn install + - run: yarn install --frozen-lockfile --non-interactive - run: yarn lint basic-tests: @@ -60,7 +60,7 @@ jobs: restore-keys: | ${{ runner.os }}-yarn- - - run: yarn install + - run: yarn install --frozen-lockfile --non-interactive - run: yarn test tests: @@ -90,8 +90,7 @@ jobs: restore-keys: | ${{ runner.os }}-yarn- - - run: yarn install - continue-on-error: ${{ matrix['continue-on-error'] == true }} + - run: yarn install --frozen-lockfile --non-interactive - run: yarn test:all continue-on-error: ${{ matrix['continue-on-error'] == true }} @@ -128,7 +127,7 @@ jobs: restore-keys: | ${{ runner.os }}-yarn- - - run: yarn install + - run: yarn install --frozen-lockfile --non-interactive - run: yarn test:all env: ${{ matrix.feature-flag }}: true From 404050dbd5561b8fa735b63be13f84cb0a74a293 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 20 Dec 2019 09:44:50 -0500 Subject: [PATCH 207/818] Add Node 13.x to GH Actions CI. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3a62c83a3..641429d26e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,7 +71,7 @@ jobs: strategy: matrix: - node-version: [10.x, 12.x] + node-version: [10.x, 12.x, 13.x] steps: - uses: actions/checkout@v1 From 96aaa21e3d973292434bd7e715ecc09e24dfb25e Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 20 Dec 2019 09:59:10 -0500 Subject: [PATCH 208/818] Tweak CI job display names. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 641429d26e..5815c1eaf3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -95,7 +95,7 @@ jobs: continue-on-error: ${{ matrix['continue-on-error'] == true }} feature-flags: - name: "Feature Flag: ${{ matrix.feature-flag }}" + name: "Feature: ${{ matrix.feature-flag }}" runs-on: ubuntu-latest needs: [linting, basic-tests] From 5aa4fa188e7649915e7cd3db1dd7983a39a25a7c Mon Sep 17 00:00:00 2001 From: Sivakumar Kailasam Date: Thu, 13 Feb 2020 18:17:01 -0500 Subject: [PATCH 209/818] Publish yuidoc json as a part of npm package --- .npmignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.npmignore b/.npmignore index 95112164c5..7b5f0c9368 100644 --- a/.npmignore +++ b/.npmignore @@ -9,3 +9,4 @@ *.log !/.travis.yml /yarn.lock +!docs/build/data.json From 5ecf34d6a513b534c65893659ae5140e43b620fe Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 12 Feb 2020 13:10:09 -0500 Subject: [PATCH 210/818] Remove MODULE_UNIFICATION experiment. This was deprecated in 3.15 then included in 3.16 (an LTS release), and can now be removed. --- .github/workflows/ci.yml | 2 - .travis.yml | 1 - blueprints/in-repo-addon/index.js | 3 +- blueprints/packages/index.js | 16 - docs/experiments.md | 2 +- lib/broccoli/default-packager.js | 130 +--- lib/broccoli/ember-addon.js | 5 - lib/broccoli/ember-app.js | 74 +- lib/commands/init.js | 6 - lib/experiments/index.js | 4 +- lib/models/addon.js | 73 +- lib/models/project.js | 19 - lib/utilities/ember-app-utils.js | 6 +- package.json | 1 - tests/acceptance/addon-generate-test.js | 49 +- tests/acceptance/addon-smoke-test-slow.js | 153 ++-- tests/acceptance/brocfile-smoke-test-slow.js | 597 ++++++++-------- .../nested-addons-smoke-test-slow.js | 69 +- .../preprocessor-smoke-test-slow.js | 156 ++-- tests/acceptance/smoke-test-slow.js | 675 +++++++++--------- .../blueprints/component/index.js | 29 +- tests/fixtures/help/generate-with-addon.txt | 2 - tests/fixtures/help/generate.txt | 2 - tests/fixtures/help/help.js | 7 - tests/fixtures/help/with-addon-blueprints.js | 7 - tests/fixtures/help/with-addon-commands.js | 7 - tests/helpers/default-packager.js | 2 +- tests/helpers/mock-project.js | 4 - tests/unit/blueprints/packages-test.js | 42 -- .../ember-cli-internal-test.js | 5 - .../broccoli/default-packager/index-test.js | 105 --- .../default-packager/javascript-test.js | 161 ----- .../broccoli/default-packager/process-test.js | 81 --- .../broccoli/default-packager/styles-test.js | 109 --- .../broccoli/default-packager/tests-test.js | 123 ---- tests/unit/broccoli/ember-app-test.js | 48 +- tests/unit/experiments-test.js | 31 - tests/unit/models/project-test.js | 22 - tests/unit/utilities/ember-app-utils-test.js | 10 - yarn.lock | 9 - 40 files changed, 855 insertions(+), 1992 deletions(-) delete mode 100644 blueprints/packages/index.js delete mode 100644 tests/unit/blueprints/packages-test.js diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6449ddd948..d0923e0f07 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,8 +105,6 @@ jobs: feature-flag: - EMBER_CLI_ENABLE_ALL_EXPERIMENTS - EMBER_CLI_PACKAGER - - EMBER_CLI_MODULE_UNIFICATION - - EMBER_CLI_BROCCOLI_WATCHER steps: - uses: actions/checkout@v1 diff --git a/.travis.yml b/.travis.yml index 8396e3cd4e..87faf1bed2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -55,7 +55,6 @@ jobs: - env: EMBER_CLI_ENABLE_ALL_EXPERIMENTS=true - env: EMBER_CLI_PACKAGER=true - - env: EMBER_CLI_MODULE_UNIFICATION=true - stage: deploy name: Publish API Docs diff --git a/blueprints/in-repo-addon/index.js b/blueprints/in-repo-addon/index.js index de389b9fdd..c7fad43eb3 100755 --- a/blueprints/in-repo-addon/index.js +++ b/blueprints/in-repo-addon/index.js @@ -15,8 +15,7 @@ module.exports = { }, _processTokens(name) { - let isModuleUnification = this.project.isModuleUnification && this.project.isModuleUnification(); - let root = isModuleUnification ? 'packages' : 'lib'; + let root = 'lib'; if (name.match(/[./]/)) { root = path.dirname(name); diff --git a/blueprints/packages/index.js b/blueprints/packages/index.js deleted file mode 100644 index 6b7e922df0..0000000000 --- a/blueprints/packages/index.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -const fs = require('fs-extra'); - -module.exports = { - description: 'Generates a packages directory for module unification in-repo addons.', - - normalizeEntityName(name) { - return name; - }, - - beforeInstall() { - // make sure to create `packages` directory - fs.mkdirsSync('packages'); - }, -}; diff --git a/docs/experiments.md b/docs/experiments.md index 5a993195f7..4093584e62 100644 --- a/docs/experiments.md +++ b/docs/experiments.md @@ -17,7 +17,7 @@ to ensure all tests pass when the feature is enabled _or_ disabled: const { isExperimentEnabled } = require('../experiments'); // ...snip... -if (isExperimentEnabled('MODULE_UNIFICATION')) { +if (isExperimentEnabled('SOME_EXPERIMENT')) { ... } else { ... diff --git a/lib/broccoli/default-packager.js b/lib/broccoli/default-packager.js index 2520adb0bf..6f0abdad7a 100644 --- a/lib/broccoli/default-packager.js +++ b/lib/broccoli/default-packager.js @@ -110,7 +110,6 @@ module.exports = class DefaultPackager { this._cachedPublic = null; this._cachedConfig = null; this._cachedJavascript = null; - this._cachedProcessedSrc = null; this._cachedProcessedIndex = null; this._cachedTransformedTree = null; this._cachedProcessedStyles = null; @@ -140,7 +139,6 @@ module.exports = class DefaultPackager { this.additionalAssetPaths = this.options.additionalAssetPaths; this.vendorTestStaticStyles = this.options.vendorTestStaticStyles; this.legacyTestFilesToAppend = this.options.legacyTestFilesToAppend; - this.isModuleUnificationEnabled = this.options.isModuleUnificationEnabled; } /* @@ -181,24 +179,10 @@ module.exports = class DefaultPackager { annotation: 'Classic: index.html', }); - if (this.isModuleUnificationEnabled) { - let srcIndex = new Funnel(tree, { - files: ['src/ui/index.html'], - getDestinationPath: () => indexFilePath, - annotation: 'Module Unification `index.html`', - }); - - index = mergeTrees([index, srcIndex], { - overwrite: true, - annotation: 'Classic And Module Unification `index.html`', - }); - } - let patterns = configReplacePatterns({ addons: this.project.addons, autoRun: this.autoRun, storeConfigInMeta: this.storeConfigInMeta, - isModuleUnification: this.isModuleUnificationEnabled, }); this._cachedProcessedIndex = new ConfigReplace(index, this.packageConfig(), { @@ -242,7 +226,7 @@ module.exports = class DefaultPackager { 'app-and-deps:post-templates' ); - let trees = [allTrees, appContentsWithCompiledTemplates, this.processJavascriptSrc(allTrees)].filter(Boolean); + let trees = [allTrees, appContentsWithCompiledTemplates].filter(Boolean); let mergedTree = this._debugTree( mergeTrees(trees, { @@ -387,7 +371,6 @@ module.exports = class DefaultPackager { addons: this.project.addons, autoRun: this.autoRun, storeConfigInMeta: this.storeConfigInMeta, - isModuleUnification: this.isModuleUnificationEnabled, }); let configTree = this.packageConfig(); @@ -449,20 +432,6 @@ module.exports = class DefaultPackager { let mergedTemplates = [appFiles]; - if (this.isModuleUnificationEnabled) { - let include = this.registry.extensionsForType('template').map(extension => `**/*/template.${extension}`); - - let mu = new Funnel(inputTree, { - srcDir: 'src', - destDir: `${this.name}/src`, - include, - exclude: ['templates/**/*'], - annotation: 'MU Templates', - }); - mu = this._debugTree(mu, 'mu-layout:tree:template'); - mergedTemplates.push(mu); - } - mergedTemplates = mergeTrees(mergedTemplates, { overwrite: true, annotation: 'Templates', @@ -586,12 +555,7 @@ module.exports = class DefaultPackager { let stylesAndVendor = callAddonsPreprocessTreeHook(this.project, 'css', tree); stylesAndVendor = this._debugTree(stylesAndVendor, 'mu-layout:addonsPreprocessTree:css'); - let preprocessedStyles = preprocessCss( - stylesAndVendor, - this.isModuleUnificationEnabled ? 'src/ui/styles' : '/app/styles', - '/assets', - options - ); + let preprocessedStyles = preprocessCss(stylesAndVendor, '/app/styles', '/assets', options); preprocessedStyles = this._debugTree(preprocessedStyles, 'mu-layout:preprocess:css'); let vendorStyles = []; @@ -634,63 +598,6 @@ module.exports = class DefaultPackager { return this._cachedProcessedStyles; } - /* - * Runs pre/post-processors hooks on the application javascript files - * and returns a single tree with the processed ones. - * - * Used only when `MODULE_UNIFICATION` experiment is enabled. - * - * Given a tree: - * - * ``` - * / - * └── src - * ├── main.js - * ├── resolver.js - * ├── router.js - * └── ui - * ├── components - * ├── index.html - * ├── routes - * │ └── application - * │ └── template.hbs - * └── styles - * └── app.css - * ``` - * - * Returns the tree with only the JS/TS files, but with processed files. - * - * @private - * @method processJavascriptSrc - * @param {BroccoliTree} tree - * @return {BroccoliTree} - */ - processJavascriptSrc(tree) { - if (this._cachedProcessedSrc === null && this.isModuleUnificationEnabled) { - let src = new Funnel(tree, { - srcDir: 'src', - destDir: 'src', - include: ['**/*.{js,ts}'], - exclude: ['**/*-test.{js,ts}'], - annotation: 'Module Unification Src', - }); - - let srcAfterPreprocessTreeHook = callAddonsPreprocessTreeHook(this.project, 'src', src); - srcAfterPreprocessTreeHook = this._debugTree(srcAfterPreprocessTreeHook, 'mu-layout:addonsPreprocessTree:js'); - - let srcAfterPostprocessTreeHook = callAddonsPostprocessTreeHook(this.project, 'src', srcAfterPreprocessTreeHook); - srcAfterPostprocessTreeHook = this._debugTree(srcAfterPostprocessTreeHook, 'mu-layout:addonsPostprocessTree:js'); - - this._cachedProcessedSrc = new Funnel(mergeTrees([srcAfterPostprocessTreeHook], { ovewrite: true }), { - srcDir: '/', - destDir: this.name, - annotation: 'Funnel: src', - }); - } - - return this._cachedProcessedSrc; - } - /* * Given an input tree, returns a properly assembled Broccoli tree with bower * components. @@ -825,36 +732,9 @@ module.exports = class DefaultPackager { annotation: 'Tests To Process', }); - if (this.isModuleUnificationEnabled) { - let destDir, testSrcTree, srcDir; - - // ember-addon - if (this.name === 'dummy') { - testSrcTree = 'src'; - destDir = `${this.project.name()}/src`; - } else { - testSrcTree = tree; - destDir = `${this.name}/src`; - srcDir = 'src'; - } - testSrcTree = new Funnel(testSrcTree, { - srcDir, - include: ['**/*-test.{js,ts}'], - annotation: 'Module Unification Tests', - }); - - testSrcTree = new Funnel(testSrcTree, { - destDir, - }); - - treeToCompile = mergeTrees([treeToCompile, testSrcTree], { - annotation: 'Merge MU Tests', - }); - } - treeToCompile = callAddonsPreprocessTreeHook(this.project, 'test', treeToCompile); - const inputPath = this.isModuleUnificationEnabled ? '/' : '/tests'; + const inputPath = '/tests'; let preprocessedTests = preprocessJs(treeToCompile, inputPath, this.name, { registry: this.registry, }); @@ -957,7 +837,6 @@ module.exports = class DefaultPackager { addons: this.project.addons, autoRun: this.autoRun, storeConfigInMeta: this.storeConfigInMeta, - isModuleUnification: this.isModuleUnificationEnabled, }); let configPath = path.join(this.name, 'config', 'environments', 'test.json'); @@ -1004,7 +883,6 @@ module.exports = class DefaultPackager { addons: this.project.addons, autoRun: this.autoRun, storeConfigInMeta: this.storeConfigInMeta, - isModuleUnification: this.isModuleUnificationEnabled, }); let configPath = path.join(this.name, 'config', 'environments', `test.json`); @@ -1065,7 +943,7 @@ module.exports = class DefaultPackager { }); return concat(appTestTrees, { - inputFiles: ['**/{tests,src}/**/*.js'], + inputFiles: ['**/tests/**/*.js'], headerFiles: ['vendor/ember-cli/tests-prefix.js'], footerFiles: ['vendor/ember-cli/app-config.js', 'vendor/ember-cli/tests-suffix.js'], outputFile: this.distPaths.testJsFile, diff --git a/lib/broccoli/ember-addon.js b/lib/broccoli/ember-addon.js index c89c32f901..55d0b27af6 100644 --- a/lib/broccoli/ember-addon.js +++ b/lib/broccoli/ember-addon.js @@ -35,7 +35,6 @@ class EmberAddon extends EmberApp { trees: { app: 'tests/dummy/app', public: 'tests/dummy/public', - src: null, styles: 'tests/dummy/app/styles', templates: 'tests/dummy/app/templates', tests: new Funnel('tests', { @@ -54,10 +53,6 @@ class EmberAddon extends EmberApp { overrides.trees.styles = null; overrides.trees.templates = null; } - if (fs.existsSync('tests/dummy/src')) { - overrides.trees.src = 'tests/dummy/src'; - overrides.trees.styles = 'tests/dummy/src/ui/styles'; - } if (fs.existsSync('tests/dummy/vendor')) { overrides.trees.vendor = 'tests/dummy/vendor'; diff --git a/lib/broccoli/ember-app.js b/lib/broccoli/ember-app.js index 9e81fb7d14..cc61d603f2 100644 --- a/lib/broccoli/ember-app.js +++ b/lib/broccoli/ember-app.js @@ -160,7 +160,6 @@ class EmberApp { additionalAssetPaths: this.otherAssetPaths, vendorTestStaticStyles: this.vendorTestStaticStyles, legacyTestFilesToAppend: this.legacyTestFilesToAppend, - isModuleUnificationEnabled: isExperimentEnabled('MODULE_UNIFICATION') && !!this.trees.src, distPaths: { appJsFile: this.options.outputPaths.app.js, appCssFile: this.options.outputPaths.app.css, @@ -251,7 +250,6 @@ class EmberApp { }; let trees = (options && options.trees) || {}; - let srcTree = buildTreeFor('src', trees.src); let appTree = buildTreeFor('app', trees.app); let testsPath = typeof trees.tests === 'string' ? resolvePathFor('tests', trees.tests) : null; @@ -259,13 +257,7 @@ class EmberApp { // these are contained within app/ no need to watch again // (we should probably have the builder or the watcher dedup though) - - if (isExperimentEnabled('MODULE_UNIFICATION')) { - let srcStylesPath = `${resolvePathFor('src', trees.src)}/ui/styles`; - this._stylesPath = fs.existsSync(srcStylesPath) ? srcStylesPath : resolvePathFor('app/styles', trees.styles); - } else { - this._stylesPath = resolvePathFor('app/styles', trees.styles); - } + this._stylesPath = resolvePathFor('app/styles', trees.styles); let stylesTree = null; if (fs.existsSync(this._stylesPath)) { @@ -326,7 +318,6 @@ class EmberApp { extensions: ['js'], }, trees: { - src: srcTree, app: appTree, tests: testsTree, styles: stylesTree, @@ -1017,26 +1008,6 @@ class EmberApp { return appTree; } - /* - * Returns a `src/` directory of the application or `null` if it is not - * present. - * - * @private - * @method getSrc - * @return {BroccoliTree} - */ - getSrc() { - let rawSrcTree = this.trees.src; - - if (!rawSrcTree) { - return null; - } - - return new Funnel(rawSrcTree, { - destDir: 'src', - }); - } - /* * Gather add-ons style (css/sass/less) files and return them in a single * tree. @@ -1070,24 +1041,7 @@ class EmberApp { overwrite: true, annotation: 'Styles', }); - if (isExperimentEnabled('MODULE_UNIFICATION') && this.trees.src) { - // move only app/styles to /src/ui/styles - let styles1 = new Funnel(styles, { - allowEmpty: true, - srcDir: '/app/styles', - destDir: '/src/ui/styles', - }); - let styles2 = new Funnel(styles, { - allowEmpty: true, - srcDir: '.', - exclude: ['app/styles/**'], - destDir: '.', - }); - styles = mergeTrees([styles1, styles2], { - annotation: 'Styles MU', - }); - styles = this._debugTree(styles, 'mu-layout:styles'); - } + return styles; } @@ -1200,16 +1154,6 @@ class EmberApp { return this._cachedAddonTestSupportTree; } - addonSrcTree() { - if (!this._cachedAddonSrcTree) { - this._cachedAddonSrcTree = this.createAddonTree('src', 'addon-tree-output', { - moduleNormalizerDisabled: true, - }); - } - - return this._cachedAddonSrcTree; - } - /* * Gather all dependencies external to `ember-cli`, namely: * @@ -1245,9 +1189,8 @@ class EmberApp { ); let addons = this.addonTree(); - let addonsSrc = this.addonSrcTree(); - let trees = [vendor].concat(addons, addonsSrc); + let trees = [vendor].concat(addons); if (this._bowerEnabled) { let bower = this._defaultPackager.packageBower(this.trees.bower, this.bowerDirectory); @@ -1376,16 +1319,6 @@ class EmberApp { lintTrees.push(lintedApp); } - if (isExperimentEnabled('MODULE_UNIFICATION') && this.trees.src) { - let lintedSrc = this.addonLintTree('src', this.trees.src); - lintedSrc = new Funnel(lintedSrc, { - destDir: 'lint/src/', - annotation: 'Funnel (lint src)', - }); - - lintTrees.push(lintedSrc); - } - let lintedTests = this.addonLintTree('tests', this.trees.tests); let lintedTemplates = this.addonLintTree('templates', this._templatesTree()); @@ -1609,7 +1542,6 @@ class EmberApp { this.getTests(), this.getExternalTree(), this.getPublic(), - this.getSrc(), this.getAppJavascript(this._isPackageHookSupplied), ].filter(Boolean); } diff --git a/lib/commands/init.js b/lib/commands/init.js index e0bb1f8e95..ac70d3e112 100644 --- a/lib/commands/init.js +++ b/lib/commands/init.js @@ -36,14 +36,8 @@ module.exports = Command.extend({ _defaultBlueprint() { if (this.project.isEmberCLIAddon()) { - if (this.project.isModuleUnification()) { - return 'module-unification-addon'; - } return 'addon'; } else { - if (this.project.isModuleUnification()) { - return 'module-unification-app'; - } return 'app'; } }, diff --git a/lib/experiments/index.js b/lib/experiments/index.js index 8543f81a3c..f17e275367 100644 --- a/lib/experiments/index.js +++ b/lib/experiments/index.js @@ -1,9 +1,9 @@ 'use strict'; const chalk = require('chalk'); -const availableExperiments = Object.freeze(['PACKAGER', 'MODULE_UNIFICATION']); +const availableExperiments = Object.freeze(['PACKAGER']); -const deprecatedExperiments = Object.freeze(['MODULE_UNIFICATION', 'BROCCOLI_WATCHER']); +const deprecatedExperiments = Object.freeze(['BROCCOLI_WATCHER']); const enabledExperiments = Object.freeze([]); const deprecatedExperimentsDeprecationsIssued = []; diff --git a/lib/models/addon.js b/lib/models/addon.js index aff4413bcd..772f70ee57 100644 --- a/lib/models/addon.js +++ b/lib/models/addon.js @@ -11,7 +11,6 @@ const heimdallLogger = require('heimdalljs-logger'); const logger = heimdallLogger('ember-cli:addon'); const treeCacheLogger = heimdallLogger('ember-cli:addon:tree-cache'); const cacheKeyLogger = heimdallLogger('ember-cli:addon:cache-key-for-tree'); -const { isExperimentEnabled } = require('../experiments'); const PackageInfoCache = require('../models/package-info-cache'); const p = require('ember-cli-preprocess-registry/preprocessors'); @@ -57,7 +56,6 @@ if (!heimdall.hasMonitor('cache-key-for-tree')) { let DEFAULT_TREE_FOR_METHODS = { app: 'treeForApp', - src: 'treeForSrc', addon: 'treeForAddon', 'addon-styles': 'treeForAddonStyles', 'addon-templates': 'treeForAddonTemplates', @@ -72,7 +70,6 @@ let DEFAULT_TREE_FOR_METHODS = { let GLOBAL_TREE_FOR_METHOD_METHODS = ['treeFor', '_treeFor', 'treeGenerator']; let DEFAULT_TREE_FOR_METHOD_METHODS = { app: ['treeForApp'], - src: ['treeForSrc'], addon: [ 'treeForAddon', 'treeForAddonStyles', @@ -291,7 +288,6 @@ let addonProto = { this.treePaths = { app: 'app', - src: 'src', styles: 'app/styles', templates: 'app/templates', addon: 'addon', @@ -344,16 +340,6 @@ let addonProto = { ); }, - /** - Returns whether this is using a module unification format. - @private - @method isModuleUnification - @return {Boolean} Whether this is using a module unification format. - */ - isModuleUnification() { - return false; - }, - /** * Find an addon of the current addon. * @@ -812,26 +798,6 @@ let addonProto = { @return {Tree} App file tree */ treeForApp(tree) { - if (!isExperimentEnabled('MODULE_UNIFICATION')) { - return tree; - } else if (this.project.isModuleUnification() && this.isModuleUnification()) { - return null; - } - - let srcTreePath = path.resolve(this.root, this.treePaths.src); - - if (fs.existsSync(srcTreePath)) { - const MUReexporter = require('broccoli-module-unification-reexporter'); - - let srcTree = this.treeGenerator(srcTreePath); - - let reexportedOutput = new MUReexporter(srcTree, { - namespace: this.name, - }); - - return reexportedOutput; - } - return tree; }, @@ -847,41 +813,6 @@ let addonProto = { return tree; }, - /** - @private - @method treeForSrc - @return - */ - treeForSrc(rawSrcTree) { - if (!isExperimentEnabled('MODULE_UNIFICATION')) { - return null; - } - if (!rawSrcTree) { - return null; - } - - let srcNamespacedTree = new Funnel(rawSrcTree, { - destDir: `${this.name}/src`, - annotation: `Addon#treeForSrc(${this.name}) namespace`, - }); - - let srcAfterPreprocessTreeHook = this._addonPreprocessTree('src', srcNamespacedTree); - - let srcAfterTemplatePreprocessing = srcAfterPreprocessTreeHook; - if (registryHasPreprocessor(this.registry, 'template')) { - srcAfterTemplatePreprocessing = preprocessTemplates(srcAfterPreprocessTreeHook, { - registry: this.registry, - annotation: `Addon#treeForSrc(${this.name})`, - }); - } - - let srcAfterJsPreprocessing = preprocessJs(srcAfterTemplatePreprocessing, '/', this.name, { - registry: this.registry, - }); - - return this._addonPostprocessTree('src', srcAfterJsPreprocessing); - }, - /** Returns the tree for this addon's templates @@ -1596,7 +1527,7 @@ let addonProto = { @public @method preprocessTree - @param {String} type What kind of tree (eg. 'js', 'css', 'src', 'template') + @param {String} type What kind of tree (eg. 'js', 'css', 'template') @param {Tree} tree Tree to process @return {Tree} Processed tree */ @@ -1606,7 +1537,7 @@ let addonProto = { @public @method postprocessTree - @param {String} type What kind of tree (eg. 'js', 'css', 'src', 'template') + @param {String} type What kind of tree (eg. 'js', 'css', 'template') @param {Tree} tree Tree to process @return {Tree} Processed tree diff --git a/lib/models/project.js b/lib/models/project.js index b9b3427766..78bad902ba 100644 --- a/lib/models/project.js +++ b/lib/models/project.js @@ -162,10 +162,6 @@ class Project { return false; }; - NULL_PROJECT.isModuleUnification = function() { - return false; - }; - NULL_PROJECT.name = function() { return path.basename(process.cwd()); }; @@ -210,21 +206,6 @@ class Project { return !!this.pkg.keywords && this.pkg.keywords.indexOf('ember-addon') > -1; } - /** - Returns whether this is using a module unification format. - @private - @method isModuleUnification - @return {Boolean} Whether this is using a module unification format. - */ - isModuleUnification() { - const { isExperimentEnabled } = require('../experiments'); - if (isExperimentEnabled('MODULE_UNIFICATION')) { - return this.has('src'); - } else { - return false; - } - } - /** Returns the path to the configuration. diff --git a/lib/utilities/ember-app-utils.js b/lib/utilities/ember-app-utils.js index b5fb40d208..c4524f8a8d 100644 --- a/lib/utilities/ember-app-utils.js +++ b/lib/utilities/ember-app-utils.js @@ -77,8 +77,6 @@ function calculateBaseTag(baseURL, locationType) { application or not * @param {Boolean} options.storeConfigInMeta Controls whether to include the contents of config - * @param {Boolean} options.isModuleUnification Signifies if the application - supports module unification or not * @return {String} The content. */ function contentFor(config, match, type, options) { @@ -120,7 +118,7 @@ function contentFor(config, match, type, options) { break; case 'app-boot': if (options.autoRun) { - let moduleToRequire = `${config.modulePrefix}/${options.isModuleUnification ? 'src/main' : 'app'}`; + let moduleToRequire = `${config.modulePrefix}/app`; content.push(` if (!runningTests) { require("${moduleToRequire}")["default"].create(${convertObjectToString(config.APP)}); @@ -160,8 +158,6 @@ function contentFor(config, match, type, options) { application or not * @param {Boolean} options.storeConfigInMeta Controls whether to include the contents of config - * @param {Boolean} options.isModuleUnification Signifies if the application - supports module unification or not @return {Array} An array of patterns to match against and replace */ function configReplacePatterns(options) { diff --git a/package.json b/package.json index 374e087149..85f0e927dc 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,6 @@ "broccoli-funnel-reducer": "^1.0.0", "broccoli-merge-trees": "^3.0.2", "broccoli-middleware": "^2.1.1", - "broccoli-module-unification-reexporter": "^1.0.0", "broccoli-slow-trees": "^3.0.1", "broccoli-source": "^3.0.0", "broccoli-stew": "^3.0.0", diff --git a/tests/acceptance/addon-generate-test.js b/tests/acceptance/addon-generate-test.js index 0c00e89037..9eb3dbe094 100644 --- a/tests/acceptance/addon-generate-test.js +++ b/tests/acceptance/addon-generate-test.js @@ -11,7 +11,6 @@ let tmproot = path.join(root, 'tmp'); const Blueprint = require('../../lib/models/blueprint'); const BlueprintNpmTask = require('ember-cli-internal-test-helpers/lib/helpers/disable-npm-on-blueprint'); const mkTmpDirIn = require('../../lib/utilities/mk-tmp-dir-in'); -const { isExperimentEnabled } = require('../../lib/experiments'); const chai = require('../chai'); let expect = chai.expect; @@ -70,40 +69,36 @@ describe('Acceptance: ember generate in-addon', function() { } }); - if (!isExperimentEnabled('MODULE_UNIFICATION')) { - it('runs the `addon-import` blueprint from a classic addon', async function() { - await initAddon('my-addon'); + it('runs the `addon-import` blueprint from a classic addon', async function() { + await initAddon('my-addon'); - await outputFile( - 'blueprints/service/files/__root__/__path__/__name__.js', - "import Service from '@ember/service';\n" + 'export default Service.extend({ });\n' - ); + await outputFile( + 'blueprints/service/files/__root__/__path__/__name__.js', + "import Service from '@ember/service';\n" + 'export default Service.extend({ });\n' + ); - await ember(['generate', 'service', 'session']); + await ember(['generate', 'service', 'session']); - expect(file('app/services/session.js')).to.exist; - }); - } + expect(file('app/services/session.js')).to.exist; + }); - if (!isExperimentEnabled('MODULE_UNIFICATION')) { - it('runs a custom "*-addon" blueprint from a classic addon', async function() { - await initAddon('my-addon'); + it('runs a custom "*-addon" blueprint from a classic addon', async function() { + await initAddon('my-addon'); - await outputFile( - 'blueprints/service/files/__root__/__path__/__name__.js', - "import Service from '@ember/service';\n" + 'export default Service.extend({ });\n' - ); + await outputFile( + 'blueprints/service/files/__root__/__path__/__name__.js', + "import Service from '@ember/service';\n" + 'export default Service.extend({ });\n' + ); - await outputFile( - 'blueprints/service-addon/files/app/services/session.js', - "export { default } from 'somewhere';\n" - ); + await outputFile( + 'blueprints/service-addon/files/app/services/session.js', + "export { default } from 'somewhere';\n" + ); - await ember(['generate', 'service', 'session']); + await ember(['generate', 'service', 'session']); - expect(file('app/services/session.js')).to.exist; - }); - } + expect(file('app/services/session.js')).to.exist; + }); it('in-addon blueprint foo', async function() { await generateInAddon(['blueprint', 'foo']); diff --git a/tests/acceptance/addon-smoke-test-slow.js b/tests/acceptance/addon-smoke-test-slow.js index 415e584fa1..dca034cd0a 100644 --- a/tests/acceptance/addon-smoke-test-slow.js +++ b/tests/acceptance/addon-smoke-test-slow.js @@ -6,7 +6,6 @@ const fs = require('fs-extra'); const spawn = require('child_process').spawn; const chalk = require('chalk'); -const { isExperimentEnabled } = require('../../lib/experiments'); const runCommand = require('../helpers/run-command'); const ember = require('../helpers/ember'); const copyFixtureFiles = require('../helpers/copy-fixture-files'); @@ -50,108 +49,106 @@ describe('Acceptance: addon-smoke-test', function() { delete process.env.JOBS; }); - if (!isExperimentEnabled('MODULE_UNIFICATION')) { - it('generates package.json with proper metadata', function() { - let packageContents = fs.readJsonSync('package.json'); + it('generates package.json with proper metadata', function() { + let packageContents = fs.readJsonSync('package.json'); - expect(packageContents.name).to.equal(addonName); - expect(packageContents.private).to.be.an('undefined'); - expect(packageContents.keywords).to.deep.equal(['ember-addon']); - expect(packageContents['ember-addon']).to.deep.equal({ configPath: 'tests/dummy/config' }); - }); + expect(packageContents.name).to.equal(addonName); + expect(packageContents.private).to.be.an('undefined'); + expect(packageContents.keywords).to.deep.equal(['ember-addon']); + expect(packageContents['ember-addon']).to.deep.equal({ configPath: 'tests/dummy/config' }); + }); - it('ember addon foo, clean from scratch', function() { - return ember(['test']); - }); + it('ember addon foo, clean from scratch', function() { + return ember(['test']); + }); - it('works in most common scenarios for an example addon', async function() { - await copyFixtureFiles('addon/kitchen-sink'); + it('works in most common scenarios for an example addon', async function() { + await copyFixtureFiles('addon/kitchen-sink'); - let packageJsonPath = path.join(addonRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); + let packageJsonPath = path.join(addonRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); - expect(packageJson.devDependencies['ember-source']).to.not.be.empty; + expect(packageJson.devDependencies['ember-source']).to.not.be.empty; - packageJson.dependencies = packageJson.dependencies || {}; - // add HTMLBars for templates (generators do this automatically when components/templates are added) - packageJson.dependencies['ember-cli-htmlbars'] = 'latest'; + packageJson.dependencies = packageJson.dependencies || {}; + // add HTMLBars for templates (generators do this automatically when components/templates are added) + packageJson.dependencies['ember-cli-htmlbars'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); + fs.writeJsonSync(packageJsonPath, packageJson); - let result = await runCommand('node_modules/ember-cli/bin/ember', 'build'); + let result = await runCommand('node_modules/ember-cli/bin/ember', 'build'); - expect(result.code).to.eql(0); - let contents; + expect(result.code).to.eql(0); + let contents; - let indexPath = path.join(addonRoot, 'dist', 'index.html'); - contents = fs.readFileSync(indexPath, { encoding: 'utf8' }); - expect(contents).to.contain('"SOME AWESOME STUFF"'); + let indexPath = path.join(addonRoot, 'dist', 'index.html'); + contents = fs.readFileSync(indexPath, { encoding: 'utf8' }); + expect(contents).to.contain('"SOME AWESOME STUFF"'); - let cssPath = path.join(addonRoot, 'dist', 'assets', 'vendor.css'); - contents = fs.readFileSync(cssPath, { encoding: 'utf8' }); - expect(contents).to.contain('addon/styles/app.css is present'); + let cssPath = path.join(addonRoot, 'dist', 'assets', 'vendor.css'); + contents = fs.readFileSync(cssPath, { encoding: 'utf8' }); + expect(contents).to.contain('addon/styles/app.css is present'); - let robotsPath = path.join(addonRoot, 'dist', 'robots.txt'); - contents = fs.readFileSync(robotsPath, { encoding: 'utf8' }); - expect(contents).to.contain('tests/dummy/public/robots.txt is present'); + let robotsPath = path.join(addonRoot, 'dist', 'robots.txt'); + contents = fs.readFileSync(robotsPath, { encoding: 'utf8' }); + expect(contents).to.contain('tests/dummy/public/robots.txt is present'); - result = await runCommand('node_modules/ember-cli/bin/ember', 'test'); + result = await runCommand('node_modules/ember-cli/bin/ember', 'test'); - expect(result.code).to.eql(0); - }); + expect(result.code).to.eql(0); + }); - it('npm pack does not include unnecessary files', async function() { - let handleError = function(error, commandName) { - if (error.code === 'ENOENT') { - console.warn(chalk.yellow(` Your system does not provide ${commandName} -> Skipped this test.`)); - } else { - throw new Error(error); - } - }; - - try { - await npmPack(); - } catch (error) { - return handleError(error, 'npm'); + it('npm pack does not include unnecessary files', async function() { + let handleError = function(error, commandName) { + if (error.code === 'ENOENT') { + console.warn(chalk.yellow(` Your system does not provide ${commandName} -> Skipped this test.`)); + } else { + throw new Error(error); } + }; - let output; - try { - output = await tar(); - } catch (error) { - return handleError(error, 'tar'); - } + try { + await npmPack(); + } catch (error) { + return handleError(error, 'npm'); + } + + let output; + try { + output = await tar(); + } catch (error) { + return handleError(error, 'tar'); + } - let necessaryFiles = ['package.json', 'index.js', 'LICENSE.md', 'README.md', 'config/environment.js']; + let necessaryFiles = ['package.json', 'index.js', 'LICENSE.md', 'README.md', 'config/environment.js']; - let unnecessaryFiles = [ - '.gitkeep', - '.travis.yml', - '.editorconfig', - 'testem.js', - '.ember-cli', - 'bower.json', - '.bowerrc', - ]; + let unnecessaryFiles = [ + '.gitkeep', + '.travis.yml', + '.editorconfig', + 'testem.js', + '.ember-cli', + 'bower.json', + '.bowerrc', + ]; - let unnecessaryFolders = [/^tests\//, /^bower_components\//]; + let unnecessaryFolders = [/^tests\//, /^bower_components\//]; - let outputFiles = output - .split('\n') - .filter(Boolean) - .map(f => f.replace(/^package\//, '')); + let outputFiles = output + .split('\n') + .filter(Boolean) + .map(f => f.replace(/^package\//, '')); - expect(outputFiles, 'verify our assumptions about the output structure').to.include.members(necessaryFiles); + expect(outputFiles, 'verify our assumptions about the output structure').to.include.members(necessaryFiles); - expect(outputFiles).to.not.have.members(unnecessaryFiles); + expect(outputFiles).to.not.have.members(unnecessaryFiles); - for (let unnecessaryFolder of unnecessaryFolders) { - for (let outputFile of outputFiles) { - expect(outputFile).to.not.match(unnecessaryFolder); - } + for (let unnecessaryFolder of unnecessaryFolders) { + for (let outputFile of outputFiles) { + expect(outputFile).to.not.match(unnecessaryFolder); } - }); - } + } + }); }); function npmPack() { diff --git a/tests/acceptance/brocfile-smoke-test-slow.js b/tests/acceptance/brocfile-smoke-test-slow.js index 8d9fff3aa2..e608d9f11b 100644 --- a/tests/acceptance/brocfile-smoke-test-slow.js +++ b/tests/acceptance/brocfile-smoke-test-slow.js @@ -5,7 +5,6 @@ const path = require('path'); const fs = require('fs-extra'); let remove = RSVP.denodeify(fs.remove); -const { isExperimentEnabled } = require('../../lib/experiments'); const runCommand = require('../helpers/run-command'); const acceptance = require('../helpers/acceptance'); const copyFixtureFiles = require('../helpers/copy-fixture-files'); @@ -40,401 +39,393 @@ describe('Acceptance: brocfile-smoke-test', function() { expect(dir(appRoot)).to.not.exist; }); - if (!isExperimentEnabled('MODULE_UNIFICATION')) { - it('a custom EmberENV in config/environment.js is used for window.EmberENV', async function() { - await copyFixtureFiles('brocfile-tests/custom-ember-env'); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - let vendorContents = fs.readFileSync(path.join('dist', 'assets', 'vendor.js'), { - encoding: 'utf8', - }); + it('a custom EmberENV in config/environment.js is used for window.EmberENV', async function() { + await copyFixtureFiles('brocfile-tests/custom-ember-env'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - // Changes in config/optional-features.json end up being set in EmberENV - let expected = - '(window.EmberENV || {}, {"asdflkmawejf":";jlnu3yr23","_APPLICATION_TEMPLATE_WRAPPER":false,"_DEFAULT_ASYNC_OBSERVERS":true,"_JQUERY_INTEGRATION":false,"_TEMPLATE_ONLY_GLIMMER_COMPONENTS":true});'; - expect(vendorContents).to.contain(expected, 'EmberENV should be in assets/vendor.js'); + let vendorContents = fs.readFileSync(path.join('dist', 'assets', 'vendor.js'), { + encoding: 'utf8', }); - it('a custom environment config can be used in Brocfile.js', async function() { - await copyFixtureFiles('brocfile-tests/custom-environment-config'); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); - }); + // Changes in config/optional-features.json end up being set in EmberENV + let expected = + '(window.EmberENV || {}, {"asdflkmawejf":";jlnu3yr23","_APPLICATION_TEMPLATE_WRAPPER":false,"_DEFAULT_ASYNC_OBSERVERS":true,"_JQUERY_INTEGRATION":false,"_TEMPLATE_ONLY_GLIMMER_COMPONENTS":true});'; + expect(vendorContents).to.contain(expected, 'EmberENV should be in assets/vendor.js'); + }); - it('without app/templates', async function() { - await copyFixtureFiles('brocfile-tests/pods-templates'); - await remove(path.join(process.cwd(), 'app/templates')); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); - }); + it('a custom environment config can be used in Brocfile.js', async function() { + await copyFixtureFiles('brocfile-tests/custom-environment-config'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); + }); - it('strips app/styles or app/templates from JS', async function() { - await copyFixtureFiles('brocfile-tests/styles-and-templates-stripped'); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + it('without app/templates', async function() { + await copyFixtureFiles('brocfile-tests/pods-templates'); + await remove(path.join(process.cwd(), 'app/templates')); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); + }); - let appFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', `${appName}.js`), { - encoding: 'utf8', - }); + it('strips app/styles or app/templates from JS', async function() { + await copyFixtureFiles('brocfile-tests/styles-and-templates-stripped'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - expect(appFileContents).to.include('//app/templates-stuff.js'); - expect(appFileContents).to.include('//app/styles-manager.js'); + let appFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', `${appName}.js`), { + encoding: 'utf8', }); - it('should throw if no build file is found', async function() { - fs.removeSync('./ember-cli-build.js'); - try { - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - } catch (err) { - expect(err.code).to.eql(1); - } - }); + expect(appFileContents).to.include('//app/templates-stuff.js'); + expect(appFileContents).to.include('//app/styles-manager.js'); + }); - it('using autoRun: true', async function() { - await copyFixtureFiles('brocfile-tests/auto-run-true'); + it('should throw if no build file is found', async function() { + fs.removeSync('./ember-cli-build.js'); + try { await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + } catch (err) { + expect(err.code).to.eql(1); + } + }); - let appFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', `${appName}.js`), { - encoding: 'utf8', - }); - expect(appFileContents).to.match(/\/app"\)\["default"\]\.create\(/); - }); + it('using autoRun: true', async function() { + await copyFixtureFiles('brocfile-tests/auto-run-true'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - it('using autoRun: false', async function() { - await copyFixtureFiles('brocfile-tests/auto-run-false'); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + let appFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', `${appName}.js`), { + encoding: 'utf8', + }); + expect(appFileContents).to.match(/\/app"\)\["default"\]\.create\(/); + }); - let appFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', `${appName}.js`), { - encoding: 'utf8', - }); + it('using autoRun: false', async function() { + await copyFixtureFiles('brocfile-tests/auto-run-false'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - expect(appFileContents).to.not.match(/\/app"\)\["default"\]\.create\(/); + let appFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', `${appName}.js`), { + encoding: 'utf8', }); - it('app.import works properly with test tree files', async function() { - await copyFixtureFiles('brocfile-tests/app-test-import'); + expect(appFileContents).to.not.match(/\/app"\)\["default"\]\.create\(/); + }); - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-test-addon'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); + it('app.import works properly with test tree files', async function() { + await copyFixtureFiles('brocfile-tests/app-test-import'); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-test-addon'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); - let subjectFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'test-support.js'), { - encoding: 'utf8', - }); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - expect(subjectFileContents).to.contain('// File for test tree imported and added via postprocessTree()'); + let subjectFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'test-support.js'), { + encoding: 'utf8', }); - it('app.import works properly with non-js/css files', async function() { - await copyFixtureFiles('brocfile-tests/app-import'); + expect(subjectFileContents).to.contain('// File for test tree imported and added via postprocessTree()'); + }); - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-random-addon'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); + it('app.import works properly with non-js/css files', async function() { + await copyFixtureFiles('brocfile-tests/app-import'); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-random-addon'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); - let subjectFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'file-to-import.txt'), { - encoding: 'utf8', - }); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - expect(subjectFileContents).to.equal('EXAMPLE TEXT FILE CONTENT\n'); + let subjectFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'file-to-import.txt'), { + encoding: 'utf8', }); - it('addons can have a public tree that is merged and returned namespaced by default', async function() { - await copyFixtureFiles('brocfile-tests/public-tree'); + expect(subjectFileContents).to.equal('EXAMPLE TEXT FILE CONTENT\n'); + }); - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-random-addon'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); + it('addons can have a public tree that is merged and returned namespaced by default', async function() { + await copyFixtureFiles('brocfile-tests/public-tree'); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-random-addon'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); - let subjectFileContents = fs.readFileSync( - path.join(appRoot, 'dist', 'ember-random-addon', 'some-root-file.txt'), - { - encoding: 'utf8', - } - ); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - expect(subjectFileContents).to.equal('ROOT FILE\n'); + let subjectFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'ember-random-addon', 'some-root-file.txt'), { + encoding: 'utf8', }); - it('using pods based templates', async function() { - await copyFixtureFiles('brocfile-tests/pods-templates'); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); - }); + expect(subjectFileContents).to.equal('ROOT FILE\n'); + }); - it('using pods based templates with a podModulePrefix', async function() { - await copyFixtureFiles('brocfile-tests/pods-with-prefix-templates'); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); - }); + it('using pods based templates', async function() { + await copyFixtureFiles('brocfile-tests/pods-templates'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); + }); - it('addon trees are not jshinted', async function() { - await copyFixtureFiles('brocfile-tests/jshint-addon'); + it('using pods based templates with a podModulePrefix', async function() { + await copyFixtureFiles('brocfile-tests/pods-with-prefix-templates'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); + }); - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson['ember-addon'] = { - paths: ['./lib/ember-random-thing'], - }; - fs.writeJsonSync(packageJsonPath, packageJson); + it('addon trees are not jshinted', async function() { + await copyFixtureFiles('brocfile-tests/jshint-addon'); - let ember = path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'); + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson['ember-addon'] = { + paths: ['./lib/ember-random-thing'], + }; + fs.writeJsonSync(packageJsonPath, packageJson); - let error = await expect(runCommand(ember, 'test', '--filter=jshint')).to.eventually.be.rejected; + let ember = path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'); - expect(error.output.join('')).to.include('Error: No tests matched the filter "jshint"'); - }); + let error = await expect(runCommand(ember, 'test', '--filter=jshint')).to.eventually.be.rejected; - it('multiple css files in styles/ are output when a preprocessor is not used', async function() { - await copyFixtureFiles('brocfile-tests/multiple-css-files'); + expect(error.output.join('')).to.include('Error: No tests matched the filter "jshint"'); + }); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + it('multiple css files in styles/ are output when a preprocessor is not used', async function() { + await copyFixtureFiles('brocfile-tests/multiple-css-files'); - let files = ['/assets/some-cool-app.css', '/assets/other.css']; + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - let basePath = path.join(appRoot, 'dist'); - files.forEach(function(f) { - expect(file(path.join(basePath, f))).to.exist; - }); + let files = ['/assets/some-cool-app.css', '/assets/other.css']; + + let basePath = path.join(appRoot, 'dist'); + files.forEach(function(f) { + expect(file(path.join(basePath, f))).to.exist; }); + }); - it('specifying custom output paths works properly', async function() { - await copyFixtureFiles('brocfile-tests/custom-output-paths'); + it('specifying custom output paths works properly', async function() { + await copyFixtureFiles('brocfile-tests/custom-output-paths'); - let themeCSSPath = path.join(appRoot, 'app', 'styles', 'theme.css'); - fs.writeFileSync(themeCSSPath, 'html, body { margin: 20%; }'); + let themeCSSPath = path.join(appRoot, 'app', 'styles', 'theme.css'); + fs.writeFileSync(themeCSSPath, 'html, body { margin: 20%; }'); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let files = [ + '/css/app.css', + '/css/theme/a.css', + '/js/app.js', + '/css/vendor.css', + '/js/vendor.js', + '/css/test-support.css', + '/js/test-support.js', + '/my-app.html', + ]; - let files = [ - '/css/app.css', - '/css/theme/a.css', - '/js/app.js', - '/css/vendor.css', - '/js/vendor.js', - '/css/test-support.css', - '/js/test-support.js', - '/my-app.html', - ]; - - let basePath = path.join(appRoot, 'dist'); - files.forEach(function(f) { - expect(file(path.join(basePath, f))).to.exist; - }); + let basePath = path.join(appRoot, 'dist'); + files.forEach(function(f) { + expect(file(path.join(basePath, f))).to.exist; }); + }); - it('specifying outputFile results in an explicitly generated assets', async function() { - await copyFixtureFiles('brocfile-tests/app-import-output-file'); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + it('specifying outputFile results in an explicitly generated assets', async function() { + await copyFixtureFiles('brocfile-tests/app-import-output-file'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - let files = ['/assets/output-file.js', '/assets/output-file.css', '/assets/vendor.css', '/assets/vendor.js']; + let files = ['/assets/output-file.js', '/assets/output-file.css', '/assets/vendor.css', '/assets/vendor.js']; - let basePath = path.join(appRoot, 'dist'); - files.forEach(function(f) { - expect(file(path.join(basePath, f))).to.exist; - }); + let basePath = path.join(appRoot, 'dist'); + files.forEach(function(f) { + expect(file(path.join(basePath, f))).to.exist; }); + }); - it('can use transformation to turn anonymous AMD into named AMD', async function() { - await copyFixtureFiles('brocfile-tests/app-import-anonymous-amd'); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + it('can use transformation to turn anonymous AMD into named AMD', async function() { + await copyFixtureFiles('brocfile-tests/app-import-anonymous-amd'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - let outputJS = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'output.js'), { - encoding: 'utf8', - }); - - (function() { - let defineCount = 0; - // eslint-disable-next-line no-unused-vars - function define(name, deps, factory) { - expect(name).to.equal('hello-world'); - expect(deps).to.deep.equal([]); - expect(factory()()).to.equal('Hello World'); - defineCount++; - } - /* eslint-disable no-eval */ - eval(outputJS); - /* eslint-enable no-eval */ - expect(defineCount).to.eql(1); - })(); + let outputJS = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'output.js'), { + encoding: 'utf8', }); - it('can use transformation to turn named UMD into named AMD', async function() { - await copyFixtureFiles('brocfile-tests/app-import-named-umd'); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + (function() { + let defineCount = 0; + // eslint-disable-next-line no-unused-vars + function define(name, deps, factory) { + expect(name).to.equal('hello-world'); + expect(deps).to.deep.equal([]); + expect(factory()()).to.equal('Hello World'); + defineCount++; + } + /* eslint-disable no-eval */ + eval(outputJS); + /* eslint-enable no-eval */ + expect(defineCount).to.eql(1); + })(); + }); - let outputJS = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'output.js'), { - encoding: 'utf8', - }); - - (function() { - let defineCount = 0; - // eslint-disable-next-line no-unused-vars - function define(name, deps, factory) { - expect(name).to.equal('hello-world'); - expect(deps).to.deep.equal([]); - expect(factory()()).to.equal('Hello World'); - defineCount++; - } - /* eslint-disable no-eval */ - eval(outputJS); - /* eslint-enable no-eval */ - expect(defineCount).to.eql(1); - })(); + it('can use transformation to turn named UMD into named AMD', async function() { + await copyFixtureFiles('brocfile-tests/app-import-named-umd'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let outputJS = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'output.js'), { + encoding: 'utf8', }); - it('can do amd transform from addon', async function() { - await copyFixtureFiles('brocfile-tests/app-import-custom-transform'); + (function() { + let defineCount = 0; + // eslint-disable-next-line no-unused-vars + function define(name, deps, factory) { + expect(name).to.equal('hello-world'); + expect(deps).to.deep.equal([]); + expect(factory()()).to.equal('Hello World'); + defineCount++; + } + /* eslint-disable no-eval */ + eval(outputJS); + /* eslint-enable no-eval */ + expect(defineCount).to.eql(1); + })(); + }); - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-transform-addon'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); + it('can do amd transform from addon', async function() { + await copyFixtureFiles('brocfile-tests/app-import-custom-transform'); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-transform-addon'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); - let addonOutputJs = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'addon-output.js'), { - encoding: 'utf8', - }); - - (function() { - let defineCount = 0; - // eslint-disable-next-line no-unused-vars - function define(name, deps, factory) { - expect(name).to.equal('addon-vendor'); - expect(deps).to.deep.equal([]); - expect(factory()()).to.equal('Hello World'); - defineCount++; - } - /* eslint-disable no-eval */ - eval(addonOutputJs); - /* eslint-enable no-eval */ - expect(defineCount).to.eql(1); - })(); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let addonOutputJs = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'addon-output.js'), { + encoding: 'utf8', }); - it('can use transformation to turn library into custom transformation', async function() { - await copyFixtureFiles('brocfile-tests/app-import-custom-transform'); + (function() { + let defineCount = 0; + // eslint-disable-next-line no-unused-vars + function define(name, deps, factory) { + expect(name).to.equal('addon-vendor'); + expect(deps).to.deep.equal([]); + expect(factory()()).to.equal('Hello World'); + defineCount++; + } + /* eslint-disable no-eval */ + eval(addonOutputJs); + /* eslint-enable no-eval */ + expect(defineCount).to.eql(1); + })(); + }); - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-transform-addon'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); + it('can use transformation to turn library into custom transformation', async function() { + await copyFixtureFiles('brocfile-tests/app-import-custom-transform'); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-transform-addon'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); - let outputJS = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'output.js'), { - encoding: 'utf8', - }); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - expect(outputJS).to.be.equal( - 'if (typeof FastBoot === \'undefined\') { window.hello = "hello world"; }//# sourceMappingURL=output.map\n' - ); + let outputJS = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'output.js'), { + encoding: 'utf8', }); - // skipped because of potentially broken assertion that should be fixed correctly at a later point - it.skip('specifying partial `outputPaths` hash deep merges options correctly', async function() { - await copyFixtureFiles('brocfile-tests/custom-output-paths'); + expect(outputJS).to.be.equal( + 'if (typeof FastBoot === \'undefined\') { window.hello = "hello world"; }//# sourceMappingURL=output.map\n' + ); + }); - let themeCSSPath = path.join(appRoot, 'app', 'styles', 'theme.css'); - fs.writeFileSync(themeCSSPath, 'html, body { margin: 20%; }'); + // skipped because of potentially broken assertion that should be fixed correctly at a later point + it.skip('specifying partial `outputPaths` hash deep merges options correctly', async function() { + await copyFixtureFiles('brocfile-tests/custom-output-paths'); - let brocfilePath = path.join(appRoot, 'ember-cli-build.js'); - let brocfile = fs.readFileSync(brocfilePath, 'utf8'); + let themeCSSPath = path.join(appRoot, 'app', 'styles', 'theme.css'); + fs.writeFileSync(themeCSSPath, 'html, body { margin: 20%; }'); - // remove outputPaths.app.js option - brocfile = brocfile.replace(/js: '\/js\/app.js'/, ''); - // remove outputPaths.app.css.app option - brocfile = brocfile.replace(/'app': '\/css\/app\.css',/, ''); + let brocfilePath = path.join(appRoot, 'ember-cli-build.js'); + let brocfile = fs.readFileSync(brocfilePath, 'utf8'); - fs.writeFileSync(brocfilePath, brocfile, 'utf8'); + // remove outputPaths.app.js option + brocfile = brocfile.replace(/js: '\/js\/app.js'/, ''); + // remove outputPaths.app.css.app option + brocfile = brocfile.replace(/'app': '\/css\/app\.css',/, ''); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + fs.writeFileSync(brocfilePath, brocfile, 'utf8'); - let files = [ - '/css/theme/a.css', - '/assets/some-cool-app.js', - '/css/vendor.css', - '/js/vendor.js', - '/css/test-support.css', - '/js/test-support.js', - ]; - - let basePath = path.join(appRoot, 'dist'); - files.forEach(function(f) { - expect(file(path.join(basePath, f))).to.exist; - }); - - expect(file(path.join(basePath, '/assets/some-cool-app.css'))).to.not.exist; + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + let files = [ + '/css/theme/a.css', + '/assets/some-cool-app.js', + '/css/vendor.css', + '/js/vendor.js', + '/css/test-support.css', + '/js/test-support.js', + ]; + + let basePath = path.join(appRoot, 'dist'); + files.forEach(function(f) { + expect(file(path.join(basePath, f))).to.exist; }); - it('multiple paths can be CSS preprocessed', async function() { - await copyFixtureFiles('brocfile-tests/multiple-sass-files'); + expect(file(path.join(basePath, '/assets/some-cool-app.css'))).to.not.exist; + }); - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-cli-sass'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); + it('multiple paths can be CSS preprocessed', async function() { + await copyFixtureFiles('brocfile-tests/multiple-sass-files'); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-cli-sass'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); - expect(file('dist/assets/main.css')).to.equal( - 'body { background: black; }\n', - 'main.css contains correct content' - ); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - expect(file('dist/assets/theme/a.css')).to.equal( - '.theme { color: red; }\n', - 'theme/a.css contains correct content' - ); - }); + expect(file('dist/assets/main.css')).to.equal('body { background: black; }\n', 'main.css contains correct content'); - it('app.css is output to .css by default', async function() { - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - expect(file(`dist/assets/${appName}.css`)).to.exist; - }); + expect(file('dist/assets/theme/a.css')).to.equal( + '.theme { color: red; }\n', + 'theme/a.css contains correct content' + ); + }); - // for backwards compat. - it('app.scss is output to .css by default', async function() { - await copyFixtureFiles('brocfile-tests/multiple-sass-files'); + it('app.css is output to .css by default', async function() { + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + expect(file(`dist/assets/${appName}.css`)).to.exist; + }); - let brocfilePath = path.join(appRoot, 'ember-cli-build.js'); - let brocfile = fs.readFileSync(brocfilePath, 'utf8'); + // for backwards compat. + it('app.scss is output to .css by default', async function() { + await copyFixtureFiles('brocfile-tests/multiple-sass-files'); - // remove custom preprocessCss paths, use app.scss instead - brocfile = brocfile.replace(/outputPaths.*/, ''); + let brocfilePath = path.join(appRoot, 'ember-cli-build.js'); + let brocfile = fs.readFileSync(brocfilePath, 'utf8'); - fs.writeFileSync(brocfilePath, brocfile, 'utf8'); + // remove custom preprocessCss paths, use app.scss instead + brocfile = brocfile.replace(/outputPaths.*/, ''); - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-cli-sass'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); + fs.writeFileSync(brocfilePath, brocfile, 'utf8'); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-cli-sass'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); - expect(file(`dist/assets/${appName}.css`)).to.equal('body { background: green; }\n'); - }); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + expect(file(`dist/assets/${appName}.css`)).to.equal('body { background: green; }\n'); + }); + + it('additional trees can be passed to the app', async function() { + await copyFixtureFiles('brocfile-tests/additional-trees'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', { verbose: true }); - it('additional trees can be passed to the app', async function() { - await copyFixtureFiles('brocfile-tests/additional-trees'); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', { verbose: true }); - - let files = [ - '/assets/custom-output-file.js', - '/assets/custom-output-file.css', - '/assets/vendor.css', - '/assets/vendor.js', - ]; - - let basePath = path.join(appRoot, 'dist'); - files.forEach(function(f) { - expect(file(path.join(basePath, f))).to.exist; - }); + let files = [ + '/assets/custom-output-file.js', + '/assets/custom-output-file.css', + '/assets/vendor.css', + '/assets/vendor.js', + ]; + + let basePath = path.join(appRoot, 'dist'); + files.forEach(function(f) { + expect(file(path.join(basePath, f))).to.exist; }); - } + }); }); diff --git a/tests/acceptance/nested-addons-smoke-test-slow.js b/tests/acceptance/nested-addons-smoke-test-slow.js index 92b6d56f10..2390dfe1a8 100644 --- a/tests/acceptance/nested-addons-smoke-test-slow.js +++ b/tests/acceptance/nested-addons-smoke-test-slow.js @@ -3,7 +3,6 @@ const path = require('path'); const fs = require('fs-extra'); -const { isExperimentEnabled } = require('../../lib/experiments'); const runCommand = require('../helpers/run-command'); const acceptance = require('../helpers/acceptance'); const copyFixtureFiles = require('../helpers/copy-fixture-files'); @@ -38,39 +37,37 @@ describe('Acceptance: nested-addons-smoke-test', function() { expect(dir(appRoot)).to.not.exist; }); - if (!isExperimentEnabled('MODULE_UNIFICATION')) { - it('addons with nested addons compile correctly', async function() { - await copyFixtureFiles('addon/with-nested-addons'); - - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-top-addon'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); - - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - expect(file('dist/assets/vendor.js')).to.contain('INNER_ADDON_IMPORT_WITH_APP_IMPORT'); - expect(file('dist/assets/vendor.js')).to.contain('INNER_ADDON_IMPORT_WITH_THIS_IMPORT'); - - // RAW comments should have been converted to PREPROCESSED by - // tests/fixtures/addon/with-nested-addons/node_modules/ember-top-addon/node_modules/preprocesstree-addon - // then from PREPROCESSED to POSTPROCESSED by - // tests/fixtures/addon/with-nested-addons/node_modules/ember-top-addon/node_modules/postprocesstree-addon - expect(file('dist/assets/vendor.js')).to.contain( - 'POSTPROCESSED node_modules/ember-top-addon/addon/templates/application.hbs' - ); - expect(file('dist/assets/vendor.js')).to.contain('POSTPROCESSED node_modules/ember-top-addon/addon/index.js'); - expect(file('dist/assets/vendor.css')).to.contain( - 'POSTPROCESSED node_modules/ember-top-addon/addon/styles/app.css' - ); - - // the pre/post process tree hooks above should *not* have changed RAW's in the current app - expect(file('dist/assets/some-cool-app.js')).to.contain('RAW app/foo.js'); - - // should *not* have changed RAW's in sibling addons - expect(file('dist/assets/vendor.js')).to.contain( - 'RAW node_modules/ember-top-addon/node_modules/ember-inner-addon/addon/index.js' - ); - }); - } + it('addons with nested addons compile correctly', async function() { + await copyFixtureFiles('addon/with-nested-addons'); + + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-top-addon'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); + + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + expect(file('dist/assets/vendor.js')).to.contain('INNER_ADDON_IMPORT_WITH_APP_IMPORT'); + expect(file('dist/assets/vendor.js')).to.contain('INNER_ADDON_IMPORT_WITH_THIS_IMPORT'); + + // RAW comments should have been converted to PREPROCESSED by + // tests/fixtures/addon/with-nested-addons/node_modules/ember-top-addon/node_modules/preprocesstree-addon + // then from PREPROCESSED to POSTPROCESSED by + // tests/fixtures/addon/with-nested-addons/node_modules/ember-top-addon/node_modules/postprocesstree-addon + expect(file('dist/assets/vendor.js')).to.contain( + 'POSTPROCESSED node_modules/ember-top-addon/addon/templates/application.hbs' + ); + expect(file('dist/assets/vendor.js')).to.contain('POSTPROCESSED node_modules/ember-top-addon/addon/index.js'); + expect(file('dist/assets/vendor.css')).to.contain( + 'POSTPROCESSED node_modules/ember-top-addon/addon/styles/app.css' + ); + + // the pre/post process tree hooks above should *not* have changed RAW's in the current app + expect(file('dist/assets/some-cool-app.js')).to.contain('RAW app/foo.js'); + + // should *not* have changed RAW's in sibling addons + expect(file('dist/assets/vendor.js')).to.contain( + 'RAW node_modules/ember-top-addon/node_modules/ember-inner-addon/addon/index.js' + ); + }); }); diff --git a/tests/acceptance/preprocessor-smoke-test-slow.js b/tests/acceptance/preprocessor-smoke-test-slow.js index 9930ae3e91..302b240a7e 100644 --- a/tests/acceptance/preprocessor-smoke-test-slow.js +++ b/tests/acceptance/preprocessor-smoke-test-slow.js @@ -3,7 +3,6 @@ const path = require('path'); const fs = require('fs-extra'); -const { isExperimentEnabled } = require('../../lib/experiments'); const runCommand = require('../helpers/run-command'); const acceptance = require('../helpers/acceptance'); const copyFixtureFiles = require('../helpers/copy-fixture-files'); @@ -38,81 +37,80 @@ describe('Acceptance: preprocessor-smoke-test', function() { expect(dir(appRoot)).to.not.exist; }); - if (!isExperimentEnabled('MODULE_UNIFICATION')) { - it('addons with standard preprocessors compile correctly', async function() { - await copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors`); + it('addons with standard preprocessors compile correctly', async function() { + await copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors`); - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-cli-sass'] = 'latest'; - packageJson.devDependencies['ember-cool-addon'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-cli-sass'] = 'latest'; + packageJson.devDependencies['ember-cool-addon'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - expect(file('dist/assets/some-cool-app.css')).to.contain('app styles included'); - expect(file('dist/assets/vendor.css')).to.contain('addon styles included'); - }); + expect(file('dist/assets/some-cool-app.css')).to.contain('app styles included'); + expect(file('dist/assets/vendor.css')).to.contain('addon styles included'); + }); - it('addon registry entries are added in the proper order', async function() { - await copyFixtureFiles(`preprocessor-tests/app-registry-ordering`); + it('addon registry entries are added in the proper order', async function() { + await copyFixtureFiles(`preprocessor-tests/app-registry-ordering`); - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['first-dummy-preprocessor'] = 'latest'; - packageJson.devDependencies['second-dummy-preprocessor'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['first-dummy-preprocessor'] = 'latest'; + packageJson.devDependencies['second-dummy-preprocessor'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - expect(file('dist/assets/some-cool-app.js')) - .to.contain('replacedByPreprocessor', 'token should have been replaced in app bundle') - .to.not.contain('__SECOND_PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should not be contained') - .to.not.contain('__FIRST_PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should not be contained'); - }); + expect(file('dist/assets/some-cool-app.js')) + .to.contain('replacedByPreprocessor', 'token should have been replaced in app bundle') + .to.not.contain('__SECOND_PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should not be contained') + .to.not.contain('__FIRST_PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should not be contained'); + }); - it('addons without preprocessors compile correctly', async function() { - await copyFixtureFiles(`preprocessor-tests/app-with-addon-without-preprocessors`); + it('addons without preprocessors compile correctly', async function() { + await copyFixtureFiles(`preprocessor-tests/app-with-addon-without-preprocessors`); - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-cli-sass'] = 'latest'; - packageJson.devDependencies['ember-cool-addon'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-cli-sass'] = 'latest'; + packageJson.devDependencies['ember-cool-addon'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - expect(file('dist/assets/some-cool-app.css')).to.contain('app styles included'); - expect(file('dist/assets/vendor.css')).to.contain('addon styles included'); - }); + expect(file('dist/assets/some-cool-app.css')).to.contain('app styles included'); + expect(file('dist/assets/vendor.css')).to.contain('addon styles included'); + }); - /* + /* [ app ] -> [ addon ] -> [ preprocessor addon ] | | | |--- preprocessor applies to this | |-- preprocessor should not apply to this */ - it('addons depending on preprocessor addon preprocesses addon but not app', async function() { - await copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors-2`); + it('addons depending on preprocessor addon preprocesses addon but not app', async function() { + await copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors-2`); - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-cool-addon'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-cool-addon'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - expect(file('dist/assets/some-cool-app.js')) - .to.contain('__PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should not have been replaced in app bundle') - .to.not.contain('replacedByPreprocessor', 'token should not have been replaced in app bundle'); + expect(file('dist/assets/some-cool-app.js')) + .to.contain('__PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should not have been replaced in app bundle') + .to.not.contain('replacedByPreprocessor', 'token should not have been replaced in app bundle'); - expect(file('dist/assets/vendor.js')) - .to.contain('replacedByPreprocessor', 'token should have been replaced in vendor bundle') - .to.not.contain('__PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should have been replaced in vendor bundle'); - }); + expect(file('dist/assets/vendor.js')) + .to.contain('replacedByPreprocessor', 'token should have been replaced in vendor bundle') + .to.not.contain('__PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should have been replaced in vendor bundle'); + }); - /* + /* [ app ] -> [ addon ] -> [ addon ] -> [ preprocessor addon ] | | | | | |--- preprocessor applies to this @@ -121,32 +119,28 @@ describe('Acceptance: preprocessor-smoke-test', function() { | |-- preprocessor should not apply to this */ - it('addon N levels deep depending on preprocessor preprocesses that parent addon only', async function() { - await copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors-3`); - - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-shallow-addon'] = 'latest'; - - fs.writeJsonSync(packageJsonPath, packageJson); - - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - expect(file('dist/assets/some-cool-app.js')) - .to.contain('__PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should not have been replaced in app bundle') - .to.not.contain('replacedByPreprocessor', 'token should not have been replaced in app bundle'); - - expect(file('dist/assets/vendor.js')) - .to.contain('deep: "replacedByPreprocessor"', 'token should have been replaced in deep component') - .to.contain( - 'shallow: __PREPROCESSOR_REPLACEMENT_TOKEN__', - 'token should not have been replaced in shallow component' - ) - .to.not.contain('deep: __PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should have been replaced in deep component') - .to.not.contain( - 'shallow: "replacedByPreprocessor"', - 'token should not have been replaced in shallow component' - ); - }); - } + it('addon N levels deep depending on preprocessor preprocesses that parent addon only', async function() { + await copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors-3`); + + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-shallow-addon'] = 'latest'; + + fs.writeJsonSync(packageJsonPath, packageJson); + + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + + expect(file('dist/assets/some-cool-app.js')) + .to.contain('__PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should not have been replaced in app bundle') + .to.not.contain('replacedByPreprocessor', 'token should not have been replaced in app bundle'); + + expect(file('dist/assets/vendor.js')) + .to.contain('deep: "replacedByPreprocessor"', 'token should have been replaced in deep component') + .to.contain( + 'shallow: __PREPROCESSOR_REPLACEMENT_TOKEN__', + 'token should not have been replaced in shallow component' + ) + .to.not.contain('deep: __PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should have been replaced in deep component') + .to.not.contain('shallow: "replacedByPreprocessor"', 'token should not have been replaced in shallow component'); + }); }); diff --git a/tests/acceptance/smoke-test-slow.js b/tests/acceptance/smoke-test-slow.js index 33118d4ab7..3dd6245b10 100644 --- a/tests/acceptance/smoke-test-slow.js +++ b/tests/acceptance/smoke-test-slow.js @@ -6,7 +6,6 @@ const crypto = require('crypto'); const walkSync = require('walk-sync'); const EOL = require('os').EOL; -const { isExperimentEnabled } = require('../../lib/experiments'); const runCommand = require('../helpers/run-command'); const acceptance = require('../helpers/acceptance'); const copyFixtureFiles = require('../helpers/copy-fixture-files'); @@ -47,434 +46,416 @@ describe('Acceptance: smoke-test', function() { return runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); }); - if (!isExperimentEnabled('MODULE_UNIFICATION')) { - it('ember new foo, make sure addon template overwrites', async function() { - await ember(['generate', 'template', 'foo']); - await ember(['generate', 'in-repo-addon', 'my-addon']); + it('ember new foo, make sure addon template overwrites', async function() { + await ember(['generate', 'template', 'foo']); + await ember(['generate', 'in-repo-addon', 'my-addon']); - // this should work, but generating a template in an addon/in-repo-addon doesn't - // do the right thing: update once https://github.com/ember-cli/ember-cli/issues/5687 - // is fixed - //return ember(['generate', 'template', 'foo', '--in-repo-addon=my-addon']); + // this should work, but generating a template in an addon/in-repo-addon doesn't + // do the right thing: update once https://github.com/ember-cli/ember-cli/issues/5687 + // is fixed + //return ember(['generate', 'template', 'foo', '--in-repo-addon=my-addon']); - // temporary work around - let templatePath = path.join('lib', 'my-addon', 'app', 'templates', 'foo.hbs'); - let packageJsonPath = path.join('lib', 'my-addon', 'package.json'); + // temporary work around + let templatePath = path.join('lib', 'my-addon', 'app', 'templates', 'foo.hbs'); + let packageJsonPath = path.join('lib', 'my-addon', 'package.json'); - fs.mkdirsSync(path.dirname(templatePath)); - fs.writeFileSync(templatePath, 'Hi, Mom!', { encoding: 'utf8' }); + fs.mkdirsSync(path.dirname(templatePath)); + fs.writeFileSync(templatePath, 'Hi, Mom!', { encoding: 'utf8' }); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.dependencies = packageJson.dependencies || {}; - packageJson.dependencies['ember-cli-htmlbars'] = '*'; + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.dependencies = packageJson.dependencies || {}; + packageJson.dependencies['ember-cli-htmlbars'] = '*'; - fs.writeJsonSync(packageJsonPath, packageJson); + fs.writeJsonSync(packageJsonPath, packageJson); - let result = await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - expect(result.code).to.equal(0); - }); + let result = await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + expect(result.code).to.equal(0); + }); - it('ember test still runs when a JavaScript testem config exists', async function() { - await copyFixtureFiles('smoke-tests/js-testem-config'); + it('ember test still runs when a JavaScript testem config exists', async function() { + await copyFixtureFiles('smoke-tests/js-testem-config'); - let result = await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); + let result = await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); - let exitCode = result.code; - let output = result.output.join(EOL); + let exitCode = result.code; + let output = result.output.join(EOL); - expect(exitCode).to.eql(0); - expect(output).to.include('***CUSTOM_TESTEM_JS**'); - }); + expect(exitCode).to.eql(0); + expect(output).to.include('***CUSTOM_TESTEM_JS**'); + }); - it('eslint passes after running ember new', async function() { - let result = await runCommand(path.join('.', 'node_modules', 'eslint', 'bin', 'eslint.js'), appRoot); + it('eslint passes after running ember new', async function() { + let result = await runCommand(path.join('.', 'node_modules', 'eslint', 'bin', 'eslint.js'), appRoot); - let exitCode = result.code; + let exitCode = result.code; - expect(exitCode).to.equal(0, 'exit code should be 0 for passing tests'); - expect(result.output).to.be.empty; - }); - - // there is a bug in here when running the entire suite on Travis - // when run in isolation, it passes - // here is the error: - // test-support-80f2fe63fae0c44478fe0f8af73200a7.js contains the fingerprint (2871106928f813936fdd64f4d16005ac): expected 'test-support-80f2fe63fae0c44478fe0f8af73200a7.js' to include '2871106928f813936fdd64f4d16005ac' - it.skip('ember new foo, build production and verify fingerprint', async function() { - await runCommand( - path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), - 'build', - '--environment=production' - ); + expect(exitCode).to.equal(0, 'exit code should be 0 for passing tests'); + expect(result.output).to.be.empty; + }); - let dirPath = path.join(appRoot, 'dist', 'assets'); - let dir = fs.readdirSync(dirPath); - let files = []; + // there is a bug in here when running the entire suite on Travis + // when run in isolation, it passes + // here is the error: + // test-support-80f2fe63fae0c44478fe0f8af73200a7.js contains the fingerprint (2871106928f813936fdd64f4d16005ac): expected 'test-support-80f2fe63fae0c44478fe0f8af73200a7.js' to include '2871106928f813936fdd64f4d16005ac' + it.skip('ember new foo, build production and verify fingerprint', async function() { + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--environment=production'); - dir.forEach(function(filepath) { - if (filepath === '.gitkeep') { - return; - } + let dirPath = path.join(appRoot, 'dist', 'assets'); + let dir = fs.readdirSync(dirPath); + let files = []; - files.push(filepath); + dir.forEach(function(filepath) { + if (filepath === '.gitkeep') { + return; + } - let file = fs.readFileSync(path.join(dirPath, filepath), { encoding: null }); + files.push(filepath); - let md5 = crypto.createHash('md5'); - md5.update(file); - let hex = md5.digest('hex'); + let file = fs.readFileSync(path.join(dirPath, filepath), { encoding: null }); - expect(filepath).to.contain(hex, `${filepath} contains the fingerprint (${hex})`); - }); + let md5 = crypto.createHash('md5'); + md5.update(file); + let hex = md5.digest('hex'); - let indexHtml = file('dist/index.html'); - files.forEach(function(filename) { - expect(indexHtml).to.contain(filename); - }); + expect(filepath).to.contain(hex, `${filepath} contains the fingerprint (${hex})`); }); - it('ember test --environment=production', async function() { - await copyFixtureFiles('smoke-tests/passing-test'); - - let result = await runCommand( - path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), - 'test', - '--environment=production' - ); + let indexHtml = file('dist/index.html'); + files.forEach(function(filename) { + expect(indexHtml).to.contain(filename); + }); + }); - let exitCode = result.code; - let output = result.output.join(EOL); + it('ember test --environment=production', async function() { + await copyFixtureFiles('smoke-tests/passing-test'); - expect(exitCode).to.equal(0, 'exit code should be 0 for passing tests'); - expect(output).to.match(/ESLint/, 'ESLint should be run on production assets'); - expect(output).to.match(/fail\s+0/, 'no failures'); - expect(output).to.match(/pass\s+\d+/, 'many passing'); - }); + let result = await runCommand( + path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), + 'test', + '--environment=production' + ); - it('ember test --path with previous build', async function() { - let originalWrite = process.stdout.write; - let output = []; + let exitCode = result.code; + let output = result.output.join(EOL); - await copyFixtureFiles('smoke-tests/passing-test'); + expect(exitCode).to.equal(0, 'exit code should be 0 for passing tests'); + expect(output).to.match(/ESLint/, 'ESLint should be run on production assets'); + expect(output).to.match(/fail\s+0/, 'no failures'); + expect(output).to.match(/pass\s+\d+/, 'many passing'); + }); - // TODO: Change to using ember() helper once it properly saves build artifacts - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + it('ember test --path with previous build', async function() { + let originalWrite = process.stdout.write; + let output = []; - // TODO: Figure out how to get this to write into the MockUI - process.stdout.write = (function() { - return function() { - output.push(arguments[0]); - }; - })(originalWrite); + await copyFixtureFiles('smoke-tests/passing-test'); - let result; - try { - result = await ember(['test', '--path=dist']); - } finally { - process.stdout.write = originalWrite; - } + // TODO: Change to using ember() helper once it properly saves build artifacts + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - expect(result.exitCode).to.equal(0, 'exit code should be 0 for passing tests'); + // TODO: Figure out how to get this to write into the MockUI + process.stdout.write = (function() { + return function() { + output.push(arguments[0]); + }; + })(originalWrite); - output = output.join(EOL); + let result; + try { + result = await ember(['test', '--path=dist']); + } finally { + process.stdout.write = originalWrite; + } - expect(output).to.match(/fail\s+0/, 'no failures'); - expect(output).to.match(/pass\s+\d+/, 'many passing'); - }); + expect(result.exitCode).to.equal(0, 'exit code should be 0 for passing tests'); - it('ember test wasm', async function() { - let originalWrite = process.stdout.write; - let output = []; + output = output.join(EOL); - await copyFixtureFiles('smoke-tests/serve-wasm'); + expect(output).to.match(/fail\s+0/, 'no failures'); + expect(output).to.match(/pass\s+\d+/, 'many passing'); + }); - // TODO: Change to using ember() helper once it properly saves build artifacts - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + it('ember test wasm', async function() { + let originalWrite = process.stdout.write; + let output = []; - // TODO: Figure out how to get this to write into the MockUI - process.stdout.write = (function() { - return function() { - output.push(arguments[0]); - }; - })(originalWrite); + await copyFixtureFiles('smoke-tests/serve-wasm'); - let result; - try { - result = await ember(['test', '--path=dist']); - } finally { - process.stdout.write = originalWrite; - } + // TODO: Change to using ember() helper once it properly saves build artifacts + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - expect(result.exitCode).to.equal(0, 'exit code should be 0 for passing tests'); + // TODO: Figure out how to get this to write into the MockUI + process.stdout.write = (function() { + return function() { + output.push(arguments[0]); + }; + })(originalWrite); - output = output.join(EOL); + let result; + try { + result = await ember(['test', '--path=dist']); + } finally { + process.stdout.write = originalWrite; + } - expect(output).to.match(/fail\s+0/, 'no failures'); - expect(output).to.match(/pass\s+\d+/, 'many passing'); - }); + expect(result.exitCode).to.equal(0, 'exit code should be 0 for passing tests'); - it('ember new foo, build development, and verify generated files', async function() { - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + output = output.join(EOL); - let dirPath = path.join(appRoot, 'dist'); - let paths = walkSync(dirPath); + expect(output).to.match(/fail\s+0/, 'no failures'); + expect(output).to.match(/pass\s+\d+/, 'many passing'); + }); - expect(paths).to.have.length.below(24, `expected fewer than 24 files in dist, found ${paths.length}`); - }); + it('ember new foo, build development, and verify generated files', async function() { + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - it('ember build exits with non-zero code when build fails', async function() { - let appJsPath = path.join(appRoot, 'app', 'app.js'); + let dirPath = path.join(appRoot, 'dist'); + let paths = walkSync(dirPath); - let result = await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - expect(result.code).to.equal(0, `expected exit code to be zero, but got ${result.code}`); + expect(paths).to.have.length.below(24, `expected fewer than 24 files in dist, found ${paths.length}`); + }); - // add something broken to the project to make build fail - fs.appendFileSync(appJsPath, '{(syntaxError>$@}{'); + it('ember build exits with non-zero code when build fails', async function() { + let appJsPath = path.join(appRoot, 'app', 'app.js'); - result = await expect(runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build')).to.be - .rejected; + let result = await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + expect(result.code).to.equal(0, `expected exit code to be zero, but got ${result.code}`); - expect(result.code).to.not.equal(0, `expected exit code to be non-zero, but got ${result.code}`); - }); + // add something broken to the project to make build fail + fs.appendFileSync(appJsPath, '{(syntaxError>$@}{'); - it('ember build generates instrumentation files when viz is enabled', async function() { - process.env.BROCCOLI_VIZ = '1'; - - try { - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', { - env: { - BROCCOLI_VIZ: '1', - }, - }); - } finally { - delete process.env.BROCCOLI_VIZ; - } + result = await expect(runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build')).to.be + .rejected; - [ - 'instrumentation.build.0.json', - 'instrumentation.command.json', - 'instrumentation.init.json', - 'instrumentation.shutdown.json', - ].forEach(instrumentationFile => { - expect(fs.existsSync(instrumentationFile)).to.equal(true); + expect(result.code).to.not.equal(0, `expected exit code to be non-zero, but got ${result.code}`); + }); - let json = fs.readJsonSync(instrumentationFile); - expect(Object.keys(json)).to.eql(['summary', 'nodes']); + it('ember build generates instrumentation files when viz is enabled', async function() { + process.env.BROCCOLI_VIZ = '1'; - expect(Array.isArray(json.nodes)).to.equal(true); + try { + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', { + env: { + BROCCOLI_VIZ: '1', + }, }); + } finally { + delete process.env.BROCCOLI_VIZ; + } + + [ + 'instrumentation.build.0.json', + 'instrumentation.command.json', + 'instrumentation.init.json', + 'instrumentation.shutdown.json', + ].forEach(instrumentationFile => { + expect(fs.existsSync(instrumentationFile)).to.equal(true); + + let json = fs.readJsonSync(instrumentationFile); + expect(Object.keys(json)).to.eql(['summary', 'nodes']); + + expect(Array.isArray(json.nodes)).to.equal(true); }); + }); + + it.skip('ember new foo, build --watch development, and verify rebuilt after change', async function() { + let touched = false; + let appJsPath = path.join(appRoot, 'app', 'app.js'); + let builtJsPath = path.join(appRoot, 'dist', 'assets', 'some-cool-app.js'); + let text = 'anotuhaonteuhanothunaothanoteh'; + let line = `console.log("${text}");`; + + try { + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--watch', { + onOutput(string, child) { + if (touched) { + if (string.match(/Build successful/)) { + // build after change to app.js + let contents = fs.readFileSync(builtJsPath).toString(); + expect(contents).to.contain(text, 'must contain changed line after rebuild'); + killCliProcess(child); + } + } else if (string.match(/Build successful/)) { + // first build + touched = true; + fs.appendFileSync(appJsPath, line); + } + }, + }); + } catch (error) { + // swallowing because of SIGINT + } + }); - it.skip('ember new foo, build --watch development, and verify rebuilt after change', async function() { - let touched = false; - let appJsPath = path.join(appRoot, 'app', 'app.js'); - let builtJsPath = path.join(appRoot, 'dist', 'assets', 'some-cool-app.js'); - let text = 'anotuhaonteuhanothunaothanoteh'; - let line = `console.log("${text}");`; - - try { - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--watch', { - onOutput(string, child) { - if (touched) { - if (string.match(/Build successful/)) { - // build after change to app.js - let contents = fs.readFileSync(builtJsPath).toString(); - expect(contents).to.contain(text, 'must contain changed line after rebuild'); - killCliProcess(child); - } - } else if (string.match(/Build successful/)) { + it.skip('ember new foo, build --watch development, and verify rebuilt after multiple changes', async function() { + let buildCount = 0; + let touched = false; + let appJsPath = path.join(appRoot, 'app', 'app.js'); + let builtJsPath = path.join(appRoot, 'dist', 'assets', 'some-cool-app.js'); + let firstText = 'anotuhaonteuhanothunaothanoteh'; + let firstLine = `console.log("${firstText}");`; + let secondText = 'aahsldfjlwioruoiiononociwewqwr'; + let secondLine = `console.log("${secondText}");`; + + try { + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--watch', { + onOutput(string, child) { + if (buildCount === 0) { + if (string.match(/Build successful/)) { // first build touched = true; - fs.appendFileSync(appJsPath, line); + buildCount = 1; + fs.appendFileSync(appJsPath, firstLine); } - }, - }); - } catch (error) { - // swallowing because of SIGINT - } - }); - - it.skip('ember new foo, build --watch development, and verify rebuilt after multiple changes', async function() { - let buildCount = 0; - let touched = false; - let appJsPath = path.join(appRoot, 'app', 'app.js'); - let builtJsPath = path.join(appRoot, 'dist', 'assets', 'some-cool-app.js'); - let firstText = 'anotuhaonteuhanothunaothanoteh'; - let firstLine = `console.log("${firstText}");`; - let secondText = 'aahsldfjlwioruoiiononociwewqwr'; - let secondLine = `console.log("${secondText}");`; - - try { - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--watch', { - onOutput(string, child) { - if (buildCount === 0) { - if (string.match(/Build successful/)) { - // first build - touched = true; - buildCount = 1; - fs.appendFileSync(appJsPath, firstLine); - } - } else if (buildCount === 1) { - if (string.match(/Build successful/)) { - // second build - touched = true; - buildCount = 2; - fs.appendFileSync(appJsPath, secondLine); - } - } else if (touched && buildCount === 2) { - if (string.match(/Build successful/)) { - // build after change to app.js - let contents = fs.readFileSync(builtJsPath).toString(); - expect(contents).to.contain(secondText, 'must contain second changed line after rebuild'); - killCliProcess(child); - } + } else if (buildCount === 1) { + if (string.match(/Build successful/)) { + // second build + touched = true; + buildCount = 2; + fs.appendFileSync(appJsPath, secondLine); } - }, - }); - } catch (error) { - // swallowing because of SIGINT - } - }); - - it.skip('ember new foo, server, SIGINT clears tmp/', async function() { - let result = await runCommand( - path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), - 'server', - '--port=54323', - '--live-reload=false', - { - onOutput(string, child) { + } else if (touched && buildCount === 2) { if (string.match(/Build successful/)) { + // build after change to app.js + let contents = fs.readFileSync(builtJsPath).toString(); + expect(contents).to.contain(secondText, 'must contain second changed line after rebuild'); killCliProcess(child); } - }, - } - ); + } + }, + }); + } catch (error) { + // swallowing because of SIGINT + } + }); - expect(result.code, 'should be zero exit code').to.equal(0); + it.skip('ember new foo, server, SIGINT clears tmp/', async function() { + let result = await runCommand( + path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), + 'server', + '--port=54323', + '--live-reload=false', + { + onOutput(string, child) { + if (string.match(/Build successful/)) { + killCliProcess(child); + } + }, + } + ); - let dirPath = path.join(appRoot, 'tmp'); + expect(result.code, 'should be zero exit code').to.equal(0); - // before broccoli2, various addons used tmp/ in the project. - // With broccoli2 that should not exist, they should be using os.tmpdir(). - // So we'll just check for "if tmp/ is there, are the contents correct?" - if (fs.existsSync(dirPath)) { - let dir = fs.readdirSync(dirPath).filter(file => file !== '.metadata_never_index'); - expect(dir.length, `${dirPath} should be empty`).to.equal(0); - } - }); + let dirPath = path.join(appRoot, 'tmp'); - it('ember new foo, test, SIGINT exits with error and clears tmp/', async function() { - let result = await expect( - runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test', '--test-port=25522', { - onOutput(string, child) { - // wait for the first passed test and then exit - if (string.match(/^ok /)) { - killCliProcess(child); - } - }, - }) - ).to.be.rejected; + // before broccoli2, various addons used tmp/ in the project. + // With broccoli2 that should not exist, they should be using os.tmpdir(). + // So we'll just check for "if tmp/ is there, are the contents correct?" + if (fs.existsSync(dirPath)) { + let dir = fs.readdirSync(dirPath).filter(file => file !== '.metadata_never_index'); + expect(dir.length, `${dirPath} should be empty`).to.equal(0); + } + }); - expect(result.code, 'should be error exit code').to.not.equal(0); + it('ember new foo, test, SIGINT exits with error and clears tmp/', async function() { + let result = await expect( + runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test', '--test-port=25522', { + onOutput(string, child) { + // wait for the first passed test and then exit + if (string.match(/^ok /)) { + killCliProcess(child); + } + }, + }) + ).to.be.rejected; + + expect(result.code, 'should be error exit code').to.not.equal(0); + + let dirPath = path.join(appRoot, 'tmp'); + + // before broccoli2, various addons used tmp/ in the project. + // With broccoli2 that should not exist, they should be using os.tmpdir(). + // So we'll just check for "if tmp/ is there, are the contents correct?" + if (fs.existsSync(dirPath)) { + let dir = fs.readdirSync(dirPath).filter(file => file !== '.metadata_never_index'); + expect(dir.length, `${dirPath} should be empty`).to.equal(0); + } + }); + + it('ember new foo, build production and verify css files are concatenated', async function() { + await copyFixtureFiles('with-styles'); - let dirPath = path.join(appRoot, 'tmp'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--environment=production'); - // before broccoli2, various addons used tmp/ in the project. - // With broccoli2 that should not exist, they should be using os.tmpdir(). - // So we'll just check for "if tmp/ is there, are the contents correct?" - if (fs.existsSync(dirPath)) { - let dir = fs.readdirSync(dirPath).filter(file => file !== '.metadata_never_index'); - expect(dir.length, `${dirPath} should be empty`).to.equal(0); + let dirPath = path.join(appRoot, 'dist', 'assets'); + let dir = fs.readdirSync(dirPath); + let cssNameRE = new RegExp(`${appName}-([a-f0-9]+)\\.css`, 'i'); + dir.forEach(function(filepath) { + if (cssNameRE.test(filepath)) { + expect(file(`dist/assets/${filepath}`)) + .to.contain('.some-weird-selector') + .to.contain('.some-even-weirder-selector'); } }); + }); - it('ember new foo, build production and verify css files are concatenated', async function() { - await copyFixtureFiles('with-styles'); - - await runCommand( - path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), - 'build', - '--environment=production' - ); - - let dirPath = path.join(appRoot, 'dist', 'assets'); - let dir = fs.readdirSync(dirPath); - let cssNameRE = new RegExp(`${appName}-([a-f0-9]+)\\.css`, 'i'); - dir.forEach(function(filepath) { - if (cssNameRE.test(filepath)) { - expect(file(`dist/assets/${filepath}`)) - .to.contain('.some-weird-selector') - .to.contain('.some-even-weirder-selector'); - } - }); - }); + it('ember new foo, build production and verify css files are minified', async function() { + await copyFixtureFiles('with-unminified-styles'); - it('ember new foo, build production and verify css files are minified', async function() { - await copyFixtureFiles('with-unminified-styles'); - - await runCommand( - path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), - 'build', - '--environment=production' - ); - - let dirPath = path.join(appRoot, 'dist', 'assets'); - let dir = fs.readdirSync(dirPath); - let cssNameRE = new RegExp(`${appName}-([a-f0-9]+)\\.css`, 'i'); - dir.forEach(function(filepath) { - if (cssNameRE.test(filepath)) { - let contents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', filepath), { encoding: 'utf8' }); - expect(contents).to.match(/^\S+$/, 'css file is minified'); - } - }); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--environment=production'); + + let dirPath = path.join(appRoot, 'dist', 'assets'); + let dir = fs.readdirSync(dirPath); + let cssNameRE = new RegExp(`${appName}-([a-f0-9]+)\\.css`, 'i'); + dir.forEach(function(filepath) { + if (cssNameRE.test(filepath)) { + let contents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', filepath), { encoding: 'utf8' }); + expect(contents).to.match(/^\S+$/, 'css file is minified'); + } }); + }); - it('ember new foo, build production and verify single "use strict";', async function() { - await runCommand( - path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), - 'build', - '--environment=production' - ); - - let dirPath = path.join(appRoot, 'dist', 'assets'); - let dir = fs.readdirSync(dirPath); - let appNameRE = new RegExp(`${appName}-([a-f0-9]+)\\.js`, 'i'); - dir.forEach(function(filepath) { - if (appNameRE.test(filepath)) { - let contents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', filepath), { encoding: 'utf8' }); - let count = (contents.match(/(["'])use strict\1;/g) || []).length; - expect(count).to.equal(1); - } - }); + it('ember new foo, build production and verify single "use strict";', async function() { + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--environment=production'); + + let dirPath = path.join(appRoot, 'dist', 'assets'); + let dir = fs.readdirSync(dirPath); + let appNameRE = new RegExp(`${appName}-([a-f0-9]+)\\.js`, 'i'); + dir.forEach(function(filepath) { + if (appNameRE.test(filepath)) { + let contents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', filepath), { encoding: 'utf8' }); + let count = (contents.match(/(["'])use strict\1;/g) || []).length; + expect(count).to.equal(1); + } }); + }); - it('ember can override and reuse the built-in blueprints', async function() { - await copyFixtureFiles('addon/with-blueprint-override'); + it('ember can override and reuse the built-in blueprints', async function() { + await copyFixtureFiles('addon/with-blueprint-override'); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'generate', 'component', 'foo-bar'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'generate', 'component', 'foo-bar'); - let filePath = 'app/components/new-path/foo-bar.js'; + let filePath = 'app/components/new-path/foo-bar.js'; - // because we're overriding, the fileMapTokens is default, sans 'component' - expect(file(filePath)).to.contain('generated component successfully'); - }); + // because we're overriding, the fileMapTokens is default, sans 'component' + expect(file(filePath)).to.contain('generated component successfully'); + }); - it('template linting works properly for pods and classic structured templates', async function() { - await copyFixtureFiles('smoke-tests/with-template-failing-linting'); + it('template linting works properly for pods and classic structured templates', async function() { + await copyFixtureFiles('smoke-tests/with-template-failing-linting'); - let packageJsonPath = 'package.json'; - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies = packageJson.devDependencies || {}; - packageJson.devDependencies['fake-template-linter'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); + let packageJsonPath = 'package.json'; + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies = packageJson.devDependencies || {}; + packageJson.devDependencies['fake-template-linter'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); - let result = await expect(runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test')).to.be - .rejected; + let result = await expect(runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test')).to.be + .rejected; - let output = result.output.join(EOL); - expect(output).to.match(/TemplateLint:/, 'ran template linter'); - expect(output).to.match(/fail\s+2/, 'two templates failed linting'); - expect(result.code).to.equal(1); - }); - } + let output = result.output.join(EOL); + expect(output).to.match(/TemplateLint:/, 'ran template linter'); + expect(output).to.match(/fail\s+2/, 'two templates failed linting'); + expect(result.code).to.equal(1); + }); }); diff --git a/tests/fixtures/addon/with-blueprint-override/blueprints/component/index.js b/tests/fixtures/addon/with-blueprint-override/blueprints/component/index.js index 4a2db1a359..2dee6f0719 100644 --- a/tests/fixtures/addon/with-blueprint-override/blueprints/component/index.js +++ b/tests/fixtures/addon/with-blueprint-override/blueprints/component/index.js @@ -5,32 +5,15 @@ const path = require('path'); module.exports = { filesPath: function() { - let filesDirectory = 'files'; - - if (isExperimentEnabled('MODULE_UNIFICATION')) { - filesDirectory = 'module-unification-files'; - } - - return path.join(this.path, filesDirectory); + return path.join(this.path, 'files'); }, fileMapTokens: function() { - if (isExperimentEnabled('MODULE_UNIFICATION')) { - return { - __root__(options) { - return 'src'; - }, - __path__(options) { - return path.join('ui', 'components', 'new-path', options.dasherizedModuleName); - }, - }; - } else { - return { - __path__: function(options) { - return path.join('components', 'new-path'); - }, - }; - } + return { + __path__: function(options) { + return path.join('components', 'new-path'); + }, + }; }, locals(options) { diff --git a/tests/fixtures/help/generate-with-addon.txt b/tests/fixtures/help/generate-with-addon.txt index bb5fc0565c..34443775be 100644 --- a/tests/fixtures/help/generate-with-addon.txt +++ b/tests/fixtures/help/generate-with-addon.txt @@ -45,8 +45,6 @@ ember generate \u001b[33m\u001b[39m \u001b[36m\u001b[39m \u001b[90mThe blueprint for addon in repo ember-cli addons.\u001b[39m lib \u001b[33m\u001b[39m \u001b[90mGenerates a lib directory for in-repo addons.\u001b[39m - packages \u001b[33m\u001b[39m - \u001b[90mGenerates a packages directory for module unification in-repo addons.\u001b[39m server \u001b[33m\u001b[39m \u001b[90mGenerates a server directory for mocks and proxies.\u001b[39m vendor-shim \u001b[33m\u001b[39m diff --git a/tests/fixtures/help/generate.txt b/tests/fixtures/help/generate.txt index 084867308c..43e22db6ff 100644 --- a/tests/fixtures/help/generate.txt +++ b/tests/fixtures/help/generate.txt @@ -17,8 +17,6 @@ \u001b[90mThe blueprint for addon in repo ember-cli addons.\u001b[39m lib \u001b[33m\u001b[39m \u001b[90mGenerates a lib directory for in-repo addons.\u001b[39m - packages \u001b[33m\u001b[39m - \u001b[90mGenerates a packages directory for module unification in-repo addons.\u001b[39m server \u001b[33m\u001b[39m \u001b[90mGenerates a server directory for mocks and proxies.\u001b[39m vendor-shim \u001b[33m\u001b[39m diff --git a/tests/fixtures/help/help.js b/tests/fixtures/help/help.js index 3311b16fa3..fb42857d4b 100644 --- a/tests/fixtures/help/help.js +++ b/tests/fixtures/help/help.js @@ -317,13 +317,6 @@ module.exports = { anonymousOptions: ['name'], overridden: false }, - { - name: 'packages', - description: 'Generates a packages directory for module unification in-repo addons.', - availableOptions: [], - anonymousOptions: ['name'], - overridden: false - }, { name: 'server', description: 'Generates a server directory for mocks and proxies.', diff --git a/tests/fixtures/help/with-addon-blueprints.js b/tests/fixtures/help/with-addon-blueprints.js index c37c3ac71c..7e150b9af9 100644 --- a/tests/fixtures/help/with-addon-blueprints.js +++ b/tests/fixtures/help/with-addon-blueprints.js @@ -349,13 +349,6 @@ module.exports = { anonymousOptions: ['name'], overridden: false }, - { - name: 'packages', - description: 'Generates a packages directory for module unification in-repo addons.', - availableOptions: [], - anonymousOptions: ['name'], - overridden: false - }, { name: 'server', description: 'Generates a server directory for mocks and proxies.', diff --git a/tests/fixtures/help/with-addon-commands.js b/tests/fixtures/help/with-addon-commands.js index 43f0de03a6..c264b2e4b4 100644 --- a/tests/fixtures/help/with-addon-commands.js +++ b/tests/fixtures/help/with-addon-commands.js @@ -317,13 +317,6 @@ module.exports = { anonymousOptions: ['name'], overridden: false }, - { - name: 'packages', - description: 'Generates a packages directory for module unification in-repo addons.', - availableOptions: [], - anonymousOptions: ['name'], - overridden: false - }, { name: 'server', description: 'Generates a server directory for mocks and proxies.', diff --git a/tests/helpers/default-packager.js b/tests/helpers/default-packager.js index c0fd150117..b2a7ed4c46 100644 --- a/tests/helpers/default-packager.js +++ b/tests/helpers/default-packager.js @@ -234,7 +234,7 @@ function getDependencyFor(key, value) { * for and a function that takes a Broccoli tree and must return a Broccoli tree * as well. * - * @param {String} registryType i.e. 'template', 'js', 'css', 'src', 'all' + * @param {String} registryType i.e. 'template', 'js', 'css', 'all' * @param {Function} fn Transormation that is applied to the input tree */ function setupRegistryFor(registryType, fn) { diff --git a/tests/helpers/mock-project.js b/tests/helpers/mock-project.js index 18a421bbb1..025707d771 100644 --- a/tests/helpers/mock-project.js +++ b/tests/helpers/mock-project.js @@ -65,10 +65,6 @@ class MockProject extends Project { isEmberCLIAddon() { return false; } - - isModuleUnification() { - return false; - } } module.exports = MockProject; diff --git a/tests/unit/blueprints/packages-test.js b/tests/unit/blueprints/packages-test.js deleted file mode 100644 index 67f5ae3d6d..0000000000 --- a/tests/unit/blueprints/packages-test.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -const path = require('path'); -const blueprintHelpers = require('ember-cli-blueprint-test-helpers/helpers'); -let setupTestHooks = blueprintHelpers.setupTestHooks; -let emberNew = blueprintHelpers.emberNew; -let emberGenerateDestroy = blueprintHelpers.emberGenerateDestroy; -let modifyPackages = blueprintHelpers.modifyPackages; - -const expect = require('ember-cli-blueprint-test-helpers/chai').expect; -const dir = require('chai-files').dir; - -describe('Acceptance: ember generate and destroy packages', function() { - setupTestHooks(this, { - cliPath: path.resolve(`${__dirname}/../../..`), - }); - - it('packages foo', function() { - let args = ['packages', 'foo']; - - return emberNew().then(() => - emberGenerateDestroy(args, file => { - expect(dir('packages')).to.exist; - expect(file('lib/.eslintrc.js')).to.not.exist; - expect(file('packages/.jshintrc')).to.not.exist; - }) - ); - }); - - it('packages foo with ember-cli-jshint', function() { - let args = ['packages', 'foo']; - - return emberNew() - .then(() => modifyPackages([{ name: 'ember-cli-jshint', dev: true }])) - .then(() => - emberGenerateDestroy(args, file => { - expect(dir('packages')).to.exist; - expect(file('packages/.jshintrc')).to.not.exist; - }) - ); - }); -}); diff --git a/tests/unit/broccoli/default-packager/ember-cli-internal-test.js b/tests/unit/broccoli/default-packager/ember-cli-internal-test.js index 118bba29d2..22c317bf5d 100644 --- a/tests/unit/broccoli/default-packager/ember-cli-internal-test.js +++ b/tests/unit/broccoli/default-packager/ember-cli-internal-test.js @@ -51,7 +51,6 @@ describe('Default Packager: Ember CLI Internal', function() { autoRun: false, areTestsEnabled: true, storeConfigInMeta: false, - isModuleUnificationEnabled: false, }); expect(defaultPackager._cachedEmberCliInternalTree).to.equal(null); @@ -70,7 +69,6 @@ describe('Default Packager: Ember CLI Internal', function() { autoRun: false, areTestsEnabled: true, storeConfigInMeta: false, - isModuleUnificationEnabled: false, }); expect(defaultPackager._cachedEmberCliInternalTree).to.equal(null); @@ -103,7 +101,6 @@ describe('Default Packager: Ember CLI Internal', function() { autoRun: false, areTestsEnabled: false, storeConfigInMeta: false, - isModuleUnificationEnabled: false, }); expect(defaultPackager._cachedEmberCliInternalTree).to.equal(null); @@ -155,7 +152,6 @@ describe('Default Packager: Ember CLI Internal', function() { autoRun: false, areTestsEnabled: true, storeConfigInMeta: true, - isModuleUnificationEnabled: false, }); expect(defaultPackager._cachedEmberCliInternalTree).to.equal(null); @@ -206,7 +202,6 @@ describe('Default Packager: Ember CLI Internal', function() { autoRun: false, areTestsEnabled: true, storeConfigInMeta: false, - isModuleUnificationEnabled: false, }); expect(defaultPackager._cachedEmberCliInternalTree).to.equal(null); diff --git a/tests/unit/broccoli/default-packager/index-test.js b/tests/unit/broccoli/default-packager/index-test.js index 9aaa9428c7..af04f1c955 100644 --- a/tests/unit/broccoli/default-packager/index-test.js +++ b/tests/unit/broccoli/default-packager/index-test.js @@ -3,7 +3,6 @@ const expect = require('chai').expect; const DefaultPackager = require('../../../../lib/broccoli/default-packager'); const broccoliTestHelper = require('broccoli-test-helper'); -const { isExperimentEnabled } = require('../../../../lib/experiments'); const buildOutput = broccoliTestHelper.buildOutput; const createTempDir = broccoliTestHelper.createTempDir; @@ -67,7 +66,6 @@ describe('Default Packager: Index', function() { autoRun: true, storeConfigInMeta: true, - isModuleUnificationEnabled: false, areTestsEnabled: true, distPaths: { @@ -91,7 +89,6 @@ describe('Default Packager: Index', function() { autoRun: true, storeConfigInMeta: true, - isModuleUnificationEnabled: false, areTestsEnabled: true, distPaths: { @@ -118,7 +115,6 @@ describe('Default Packager: Index', function() { autoRun: true, storeConfigInMeta: true, - isModuleUnificationEnabled: false, areTestsEnabled: true, distPaths: { @@ -137,105 +133,4 @@ describe('Default Packager: Index', function() { expect(indexContent).to.equal(META_TAG); }); - - if (isExperimentEnabled('MODULE_UNIFICATION')) { - describe('with module unification', function() { - let input, output; - - before(async function() { - input = await createTempDir(); - - let indexContent = ` - {{rootURL}}{{content-for "head"}} - {{content-for "head-footer"}} - {{content-for "body"}} - {{content-for "body-footer"}} - `; - input.write({ - 'addon-tree-output': {}, - 'the-best-app-ever': { - 'router.js': 'router.js', - 'app.js': 'app.js', - 'index.html': indexContent, - config: { - 'environment.js': 'environment.js', - }, - templates: {}, - }, - src: { - ui: { - 'index.html': 'src', - }, - }, - }); - }); - - after(async function() { - await input.dispose(); - }); - - afterEach(async function() { - await output.dispose(); - }); - - it('prefers `src/ui/index.html` over `app/index.html`', async function() { - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', - env: 'development', - - autoRun: true, - storeConfigInMeta: true, - isModuleUnificationEnabled: true, - areTestsEnabled: true, - - distPaths: { - appHtmlFile: 'index.html', - }, - - project, - }); - - output = await buildOutput(defaultPackager.processIndex(input.path())); - - let outputFiles = output.read(); - let indexContent = decodeURIComponent(outputFiles['index.html'].trim()); - - expect(indexContent).to.equal('src'); - }); - - it('works if only `src/ui/index.html` exists', async function() { - input.dispose(); - input.write({ - 'addon-tree-output': {}, - src: { - ui: { - 'index.html': 'src', - }, - }, - }); - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', - env: 'development', - - autoRun: true, - storeConfigInMeta: true, - isModuleUnificationEnabled: true, - areTestsEnabled: true, - - distPaths: { - appHtmlFile: 'index.html', - }, - - project, - }); - - output = await buildOutput(defaultPackager.processIndex(input.path())); - - let outputFiles = output.read(); - let indexContent = decodeURIComponent(outputFiles['index.html'].trim()); - - expect(indexContent).to.equal('src'); - }); - }); - } }); diff --git a/tests/unit/broccoli/default-packager/javascript-test.js b/tests/unit/broccoli/default-packager/javascript-test.js index e9e1770327..0f9b26c2ed 100644 --- a/tests/unit/broccoli/default-packager/javascript-test.js +++ b/tests/unit/broccoli/default-packager/javascript-test.js @@ -5,11 +5,9 @@ const Funnel = require('broccoli-funnel'); const DefaultPackager = require('../../../../lib/broccoli/default-packager'); const broccoliTestHelper = require('broccoli-test-helper'); const defaultPackagerHelpers = require('../../../helpers/default-packager'); -const { isExperimentEnabled } = require('../../../../lib/experiments'); const buildOutput = broccoliTestHelper.buildOutput; const createTempDir = broccoliTestHelper.createTempDir; -const setupRegistry = defaultPackagerHelpers.setupRegistry; const setupRegistryFor = defaultPackagerHelpers.setupRegistryFor; describe('Default Packager: Javascript', function() { @@ -295,162 +293,3 @@ describe('Default Packager: Javascript', function() { expect(addonPostprocessTreeHookCalled).to.equal(true); }); }); - -if (isExperimentEnabled('MODULE_UNIFICATION')) { - // there is a little code duplication here (mainly the ceremony around - // setting up the folder structure and disposing of it after the tests are - // executed; once we enable MU flag by defaul, we should clean this up a tad - describe('with module unification layout', function() { - let inputMU, outputMU; - let addonPreprocessTreeHookCalled = false; - let addonPostprocessTreeHookCalled = false; - - let MU_LAYOUT = { - 'addon-tree-output': {}, - public: {}, - tests: {}, - vendor: {}, - src: { - 'main.js': '', - 'resolver.js': '', - 'router.js': '', - ui: { - components: { - 'login-form': { - 'component-test.js': ' // login-form-component-test', - 'component.js': '', - 'template.hbs': '', - }, - }, - 'index.html': '', - routes: { - application: { - 'template.hbs': '', - }, - }, - styles: { - 'app.css': 'html { height: 100%; }', - }, - }, - }, - }; - before(async function() { - inputMU = await createTempDir(); - - inputMU.write(MU_LAYOUT); - }); - - after(async function() { - await inputMU.dispose(); - }); - - afterEach(async function() { - await outputMU.dispose(); - }); - - it('processes javascript according to the registry', async function() { - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', - - distPaths: { - appJsFile: '/assets/the-best-app-ever.js', - appCssFile: '/assets/the-best-app-ever.css', - vendorJsFile: '/assets/vendor.js', - }, - - registry: setupRegistry({ - js: tree => tree, - }), - - isModuleUnificationEnabled: true, - - // avoid using `testdouble.js` here on purpose; it does not have a "proxy" - // option, where a function call would be registered and the original - // would be returned - project: { - addons: [ - { - preprocessTree(type, tree) { - expect(type).to.equal('src'); - return tree; - }, - postprocessTree(type, tree) { - expect(type).to.equal('src'); - return tree; - }, - }, - ], - }, - }); - - expect(defaultPackager._cachedProcessedSrc).to.equal(null); - - outputMU = await buildOutput(defaultPackager.processJavascriptSrc(inputMU.path())); - - let outputFiles = outputMU.read(); - - expect(outputFiles['the-best-app-ever']).to.deep.equal({ - src: { - 'main.js': '', - 'resolver.js': '', - 'router.js': '', - ui: { - components: { - 'login-form': { - 'component.js': '', - }, - }, - }, - }, - }); - }); - - it('runs pre/post-process add-on hooks', async function() { - addonPreprocessTreeHookCalled = false; - addonPostprocessTreeHookCalled = false; - - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', - - distPaths: { - appJsFile: '/assets/the-best-app-ever.js', - appCssFile: '/assets/the-best-app-ever.css', - vendorJsFile: '/assets/vendor.js', - }, - - registry: setupRegistry({ - js: tree => tree, - }), - - isModuleUnificationEnabled: true, - - // avoid using `testdouble.js` here on purpose; it does not have a "proxy" - // option, where a function call would be registered and the original - // would be returned - project: { - addons: [ - { - preprocessTree(type, tree) { - expect(type).to.equal('src'); - addonPreprocessTreeHookCalled = true; - - return tree; - }, - postprocessTree(type, tree) { - expect(type).to.equal('src'); - addonPostprocessTreeHookCalled = true; - - return tree; - }, - }, - ], - }, - }); - - outputMU = await buildOutput(defaultPackager.processJavascriptSrc(inputMU.path())); - - expect(addonPreprocessTreeHookCalled).to.equal(true); - expect(addonPostprocessTreeHookCalled).to.equal(true); - }); - }); -} diff --git a/tests/unit/broccoli/default-packager/process-test.js b/tests/unit/broccoli/default-packager/process-test.js index 7843cdfdcf..76cb7ac5d7 100644 --- a/tests/unit/broccoli/default-packager/process-test.js +++ b/tests/unit/broccoli/default-packager/process-test.js @@ -5,7 +5,6 @@ const Funnel = require('broccoli-funnel'); const DefaultPackager = require('../../../../lib/broccoli/default-packager'); const broccoliTestHelper = require('broccoli-test-helper'); const defaultPackagerHelpers = require('../../../helpers/default-packager'); -const { isExperimentEnabled } = require('../../../../lib/experiments'); const buildOutput = broccoliTestHelper.buildOutput; const createTempDir = broccoliTestHelper.createTempDir; @@ -121,84 +120,4 @@ describe('Default Packager: Process Javascript', function() { 'Processed Application and Dependencies' ); }); - - if (isExperimentEnabled('MODULE_UNIFICATION')) { - it('merges src with with app', async function() { - let input = await createTempDir(); - - input.write({ - 'addon-tree-output': {}, - 'the-best-app-ever': { - 'router.js': 'router.js', - 'app.js': 'app.js', - components: { - 'x-foo.js': 'export default class {}', - }, - routes: { - 'application.js': 'export default class {}', - }, - config: { - 'environment.js': 'environment.js', - }, - templates: {}, - }, - vendor: {}, - src: { - 'main.js': '', - 'resolver.js': '', - 'router.js': '', - ui: { - components: { - 'login-form': { - 'component.js': '', - 'template.hbs': '', - }, - }, - 'index.html': '', - routes: { - application: { - 'template.hbs': '', - }, - }, - styles: { - 'app.css': '', - }, - }, - }, - }); - - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', - env: 'development', - - distPaths: { - appJsFile: '/assets/the-best-app-ever.js', - vendorJsFile: '/assets/vendor.js', - }, - - isModuleUnificationEnabled: true, - - registry: setupRegistryFor('template', function(tree) { - return new Funnel(tree, { - getDestinationPath(relativePath) { - return relativePath.replace(/hbs$/g, 'js'); - }, - }); - }), - - customTransformsMap: new Map(), - - scriptOutputFiles, - project, - }); - - output = await buildOutput(defaultPackager.processAppAndDependencies(input.path())); - - let outputFiles = output.read(); - - expect(Object.keys(outputFiles)).to.deep.equal(['addon-tree-output', 'src', 'the-best-app-ever', 'vendor']); - - input.dispose(); - }); - } }); diff --git a/tests/unit/broccoli/default-packager/styles-test.js b/tests/unit/broccoli/default-packager/styles-test.js index 27e9e5bab2..f5f670a5f9 100644 --- a/tests/unit/broccoli/default-packager/styles-test.js +++ b/tests/unit/broccoli/default-packager/styles-test.js @@ -2,7 +2,6 @@ const expect = require('chai').expect; const Funnel = require('broccoli-funnel'); -const { isExperimentEnabled } = require('../../../../lib/experiments'); const DefaultPackager = require('../../../../lib/broccoli/default-packager'); const broccoliTestHelper = require('broccoli-test-helper'); const defaultPackagerHelpers = require('../../../helpers/default-packager'); @@ -370,112 +369,4 @@ describe('Default Packager: Styles', function() { expect(outputFiles.assets['vendor.css']).to.equal('.third{position:absolute}'); }); - - if (isExperimentEnabled('MODULE_UNIFICATION')) { - describe('with module unification layout', function() { - let importFilesMap = { - '/assets/vendor.css': ['vendor/font-awesome/css/font-awesome.css'], - }; - let input, output, processedSrc; - - let MU_LAYOUT = { - vendor: { - 'font-awesome': { - css: { - 'font-awesome.css': 'body { height: 100%; }', - }, - }, - }, - src: { - 'main.js': '', - 'resolver.js': '', - 'router.js': '', - ui: { - components: { - 'login-form': { - 'component.js': '', - 'template.hbs': '', - }, - }, - 'index.html': '', - routes: { - application: { - 'template.hbs': '', - }, - }, - styles: { - 'app.css': 'html { height: 100%; }', - }, - }, - }, - }; - let processedSrcFolder = { - 'the-best-app-ever': { - src: MU_LAYOUT, - assets: { - 'the-best-app-ever.css': 'html { height: 100%; }', - }, - }, - }; - - let defaultPackager = new DefaultPackager({ - name: 'the-best-app-ever', - - distPaths: { - appCssFile: { app: '/assets/the-best-app-ever.css' }, - vendorCssFile: '/assets/vendor.css', - }, - - registry: { - load: () => [], - }, - - minifyCSS: { - enabled: true, - options: { - processImport: false, - relativeTo: 'assets', - }, - }, - - styleOutputFiles: importFilesMap, - - isModuleUnificationEnabled: true, - - project: { addons: [] }, - }); - - before(async function() { - input = await createTempDir(); - processedSrc = await createTempDir(); - - input.write(MU_LAYOUT); - processedSrc.write(processedSrcFolder); - }); - - after(async function() { - await input.dispose(); - await processedSrc.dispose(); - }); - - afterEach(async function() { - await output.dispose(); - }); - - it('processes styles according to the registry', async function() { - defaultPackager._cachedProcessedSrc = processedSrc.path(); - - output = await buildOutput(defaultPackager.packageStyles(input.path())); - - let outputFiles = output.read(); - - expect(outputFiles).to.deep.equal({ - assets: { - 'the-best-app-ever.css': 'html{height:100%}', - 'vendor.css': 'body{height:100%}', - }, - }); - }); - }); - } }); diff --git a/tests/unit/broccoli/default-packager/tests-test.js b/tests/unit/broccoli/default-packager/tests-test.js index daea94d1c4..df6ee5a4de 100644 --- a/tests/unit/broccoli/default-packager/tests-test.js +++ b/tests/unit/broccoli/default-packager/tests-test.js @@ -3,7 +3,6 @@ const stew = require('broccoli-stew'); const Funnel = require('broccoli-funnel'); const expect = require('chai').expect; -const { isExperimentEnabled } = require('../../../../lib/experiments'); const DefaultPackager = require('../../../../lib/broccoli/default-packager'); const broccoliTestHelper = require('broccoli-test-helper'); const defaultPackagerHelpers = require('../../../helpers/default-packager'); @@ -557,126 +556,4 @@ describe('Default Packager: Tests', function() { expect(outputFiles.assets['test-support.js']).to.include('a.js\nb.js'); expect(outputFiles.assets['test-support.css']).to.include('a.css\nb.css'); }); - - if (isExperimentEnabled('MODULE_UNIFICATION')) { - describe('with module unification layout', function() { - let input, output; - - let MU_LAYOUT = { - vendor: { - 'ember-cli': { - 'app-boot.js': 'app-boot.js', - 'app-config.js': 'app-config.js', - 'app-prefix.js': 'app-prefix.js', - 'app-suffix.js': 'app-suffix.js', - 'test-support-prefix.js': 'test-support-prefix.js', - 'test-support-suffix.js': 'test-support-suffix.js', - 'tests-prefix.js': 'tests-prefix.js', - 'tests-suffix.js': 'tests-suffix.js', - 'vendor-prefix.js': 'vendor-prefix.js', - 'vendor-suffix.js': 'vendor-suffix.js', - }, - }, - tests: { - 'addon-test-support': {}, - acceptance: { - 'login-test.js': ' // login-test.js', - 'logout-test.js': '', - }, - lint: { - 'login-test.lint.js': ' // login-test.lint.js', - 'logout-test.lint.js': '', - }, - 'index.html': 'index', - }, - src: { - 'main.js': '', - 'resolver.js': '', - 'router.js': '', - ui: { - components: { - 'login-form': { - 'component-test.js': ' // login-form-component-test', - 'component.js': '', - 'template.hbs': '', - }, - }, - 'index.html': '', - routes: { - application: { - 'template.hbs': '', - }, - }, - styles: { - 'app.css': 'html { height: 100%; }', - }, - }, - }, - }; - - before(async function() { - input = await createTempDir(); - - input.write(MU_LAYOUT); - }); - - after(async function() { - await input.dispose(); - }); - - afterEach(async function() { - await output.dispose(); - }); - - it('packages test files', async function() { - let defaultPackager = new DefaultPackager({ - project, - name, - env, - areTestsEnabled: true, - - distPaths: { - testJsFile: '/assets/tests.js', - testSupportJsFile: { - testSupport: '/assets/test-support.js', - testLoader: '/assets/test-loader.js', - }, - testSupportCssFile: '/assets/test-support.css', - }, - - customTransformsMap: new Map(), - - isModuleUnificationEnabled: true, - - vendorTestStaticStyles: [], - legacyTestFilesToAppend: [], - - registry: setupRegistryFor('js', tree => tree), - }); - - output = await buildOutput(defaultPackager.packageTests(input.path())); - - let outputFiles = output.read(); - - expect(Object.keys(outputFiles.tests)).to.deep.equal(['index.html']); - - expect(Object.keys(outputFiles.assets)).to.deep.equal([ - 'test-support.js', - 'test-support.map', - 'tests.js', - 'tests.map', - ]); - - expect(Object.keys(outputFiles)).to.deep.equal(['assets', 'testem.js', 'tests']); - - expect(outputFiles.assets['tests.js']).to.include('login-form-component-test'); - expect(outputFiles.assets['tests.js']).to.include('login-test.js'); - expect(outputFiles.assets['tests.js']).to.include('login-test.lint.js'); - expect(outputFiles.assets['tests.js']).to.include('test-helper'); - expect(outputFiles.assets['tests.js']).to.include(`define('the-best-app-ever/config/environment'`); - expect(outputFiles.assets['tests.js']).to.include(`require('the-best-app-ever/tests/test-helper');`); - expect(outputFiles.assets['tests.js']).to.include('EmberENV.TESTS_FILE_LOADED = true;'); - }); - }); - } }); diff --git a/tests/unit/broccoli/ember-app-test.js b/tests/unit/broccoli/ember-app-test.js index 63951b7fb0..cdc380401d 100644 --- a/tests/unit/broccoli/ember-app-test.js +++ b/tests/unit/broccoli/ember-app-test.js @@ -206,7 +206,6 @@ describe('EmberApp', function() { app.getStyles = td.function(); app.getTests = td.function(); app.getExternalTree = td.function(); - app.getSrc = td.function(); app._legacyAddonCompile = td.function(); app._defaultPackager = { packagePublic: td.function(), @@ -223,7 +222,6 @@ describe('EmberApp', function() { td.verify(app.getStyles()); td.verify(app.getTests()); td.verify(app.getExternalTree()); - td.verify(app.getSrc()); td.verify( app.project.ui.writeWarnLine('`package` hook must be a function, falling back to default packaging.') ); @@ -297,10 +295,6 @@ describe('EmberApp', function() { it('can handle empty addon styles folders', async function() { let appOptions = { project }; - if (isExperimentEnabled('MODULE_UNIFICATION')) { - appOptions.trees = { src: {} }; - } - let app = new EmberApp(appOptions); let AddonFoo = Addon.extend({ @@ -313,18 +307,7 @@ describe('EmberApp', function() { let output = await buildOutput(app.getStyles()); let outputFiles = output.read(); - let expectedOutput; - if (isExperimentEnabled('MODULE_UNIFICATION')) { - expectedOutput = { - src: { - ui: { - styles: {}, - }, - }, - }; - } else { - expectedOutput = {}; - } + let expectedOutput = {}; expect(outputFiles).to.deep.equal(expectedOutput); await output.dispose(); @@ -343,10 +326,6 @@ describe('EmberApp', function() { let appOptions = { project }; - if (isExperimentEnabled('MODULE_UNIFICATION')) { - appOptions.trees = { src: {} }; - } - let app = new EmberApp(appOptions); let AddonFoo = Addon.extend({ @@ -362,26 +341,13 @@ describe('EmberApp', function() { let output = await buildOutput(app.getStyles()); let outputFiles = output.read(); - let expectedOutput; - if (isExperimentEnabled('MODULE_UNIFICATION')) { - expectedOutput = { - src: { - ui: { - styles: { - 'foo.css': 'foo', - }, - }, - }, - }; - } else { - expectedOutput = { - app: { - styles: { - 'foo.css': 'foo', - }, + let expectedOutput = { + app: { + styles: { + 'foo.css': 'foo', }, - }; - } + }, + }; expect(outputFiles).to.deep.equal(expectedOutput); await addonFooStyles.dispose(); diff --git a/tests/unit/experiments-test.js b/tests/unit/experiments-test.js index 4d5eb081d1..1f087937e4 100644 --- a/tests/unit/experiments-test.js +++ b/tests/unit/experiments-test.js @@ -1,6 +1,5 @@ 'use strict'; -const chalk = require('chalk'); const expect = require('chai').expect; const { isExperimentEnabled, _deprecatedExperimentsDeprecationsIssued } = require('../../lib/experiments'); @@ -32,7 +31,6 @@ describe('experiments', function() { // reset all experiment flags for these tests, they will be restored in // afterEach delete process.env.EMBER_CLI_ENABLE_ALL_EXPERIMENTS; - delete process.env.EMBER_CLI_MODULE_UNIFICATION; delete process.env.EMBER_CLI_PACKAGER; warnings = []; @@ -59,34 +57,5 @@ describe('experiments', function() { expect(warnings).to.deep.equal([]); }); - - it('should have MODULE_UNIFICATION disabled by default', function() { - expect(isExperimentEnabled('MODULE_UNIFICATION')).to.be.false; - - expect(warnings).to.deep.equal([]); - }); - - it('should have MODULE_UNIFICATION enabled when environment variable is set', function() { - process.env.EMBER_CLI_MODULE_UNIFICATION = 'true'; - expect(isExperimentEnabled('MODULE_UNIFICATION')).to.be.true; - - expect(warnings).to.deep.equal([ - chalk.yellow(`The MODULE_UNIFICATION experiment in ember-cli has been deprecated and will be removed.`), - ]); - }); - - it('only emits deprecation warnings once', function() { - process.env.EMBER_CLI_MODULE_UNIFICATION = 'true'; - expect(isExperimentEnabled('MODULE_UNIFICATION')).to.be.true; - - expect(warnings).to.deep.equal([ - chalk.yellow(`The MODULE_UNIFICATION experiment in ember-cli has been deprecated and will be removed.`), - ]); - - warnings = []; - expect(isExperimentEnabled('MODULE_UNIFICATION')).to.be.true; - - expect(warnings).to.deep.equal([]); - }); }); }); diff --git a/tests/unit/models/project-test.js b/tests/unit/models/project-test.js index 273d377b46..ce442f1f85 100644 --- a/tests/unit/models/project-test.js +++ b/tests/unit/models/project-test.js @@ -10,7 +10,6 @@ const expect = require('chai').expect; const emberCLIVersion = require('../../../lib/utilities/version-utils').emberCLIVersion; const td = require('testdouble'); const MockCLI = require('../../helpers/mock-cli'); -const { isExperimentEnabled } = require('../../../lib/experiments'); describe('models/project.js', function() { let project, projectPath, packageContents; @@ -576,27 +575,6 @@ describe('models/project.js', function() { }); }); - if (isExperimentEnabled('MODULE_UNIFICATION')) { - describe('isModuleUnification', function() { - beforeEach(function() { - projectPath = `${process.cwd()}/tmp/test-app`; - - makeProject(); - }); - - it('returns false when `./src` does not exist', function() { - expect(project.isModuleUnification()).to.equal(false); - }); - - it('returns true when `./src` exists', function() { - let srcPath = path.join(projectPath, 'src'); - fs.ensureDirSync(srcPath); - - expect(project.isModuleUnification()).to.equal(true); - }); - }); - } - describe('findAddonByName', function() { beforeEach(function() { projectPath = `${process.cwd()}/tmp/test-app`; diff --git a/tests/unit/utilities/ember-app-utils-test.js b/tests/unit/utilities/ember-app-utils-test.js index 13c53aef8f..b4c6247028 100644 --- a/tests/unit/utilities/ember-app-utils-test.js +++ b/tests/unit/utilities/ember-app-utils-test.js @@ -81,7 +81,6 @@ describe('ember-app-utils', function() { storeConfigInMeta: true, autoRun: true, addons: [], - isModuleUnification: false, }; it('`content-for` regex returns all matches presents in a same line', function() { @@ -199,15 +198,6 @@ describe('ember-app-utils', function() { ); }); - it('returns application bootstrap snippet with MU module name if `isModuleUnification` is true', function() { - let options = Object.assign({}, defaultOptions, { isModuleUnification: true }); - let output = contentFor(config, defaultMatch, 'app-boot', options); - - expect(output, 'includes application bootstrap snippet').to.contain( - 'require("cool-foo/src/main")["default"].create({});' - ); - }); - it('omits application bootstrap snippet if `autoRun` is false', function() { let options = Object.assign({}, defaultOptions, { autoRun: false }); let output = contentFor(config, defaultMatch, 'app-boot', options); diff --git a/yarn.lock b/yarn.lock index 47c07ea044..29ee794dcd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -946,15 +946,6 @@ broccoli-middleware@^2.1.1: has-ansi "^3.0.0" mime-types "^2.1.18" -broccoli-module-unification-reexporter@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/broccoli-module-unification-reexporter/-/broccoli-module-unification-reexporter-1.0.0.tgz#031909c5d3f159ec11d5f9e2346f2861db8acb3e" - integrity sha512-HTi9ua520M20aBZomaiBopsSt3yjL7J/paR3XPjieygK7+ShATBiZdn0B+ZPiniBi4I8JuMn1q0fNFUevtP//A== - dependencies: - broccoli-plugin "^1.3.0" - mkdirp "^0.5.1" - walk-sync "^0.3.2" - broccoli-node-api@^1.6.0: version "1.7.0" resolved "https://registry.yarnpkg.com/broccoli-node-api/-/broccoli-node-api-1.7.0.tgz#391aa6edecd2a42c63c111b4162956b2fa288cb6" From d039546423b1d36ad85232ff88934eabd5e3b454 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Thu, 13 Feb 2020 12:30:05 -0500 Subject: [PATCH 211/818] Remove usage of RSVP. * Rewrite all usages of RSVP to use native promise * Use [promise.hash.helper](https://github.com/stefanpenner/promise.hash.helper) as a `RSVP.hash` replacement * Remove `promise.prototype.finally` (in favor of native promise `.finally`) --- lib/cli/cli.js | 8 ++--- lib/commands/destroy.js | 1 - lib/commands/generate.js | 1 - lib/commands/init.js | 1 - lib/commands/install.js | 1 - lib/commands/new.js | 6 +--- lib/commands/serve.js | 6 ++-- lib/commands/uninstall-npm.js | 1 - lib/models/asset-size-printer.js | 4 +-- lib/models/blueprint.js | 35 +++++++------------ lib/models/builder.js | 1 - lib/models/command.js | 1 - lib/models/edit-file-diff.js | 11 +++--- lib/models/file-info.js | 14 ++++---- lib/models/project.js | 4 +-- lib/models/watcher.js | 12 +++---- lib/tasks/addon-install.js | 1 - lib/tasks/bower-install.js | 8 ++--- lib/tasks/install-blueprint.js | 8 ++--- lib/tasks/npm-install.js | 1 - lib/tasks/serve.js | 6 ++-- lib/tasks/server/express-server.js | 1 - lib/tasks/server/livereload-server.js | 1 - .../middleware/history-support/index.js | 3 +- .../middleware/history-support/package.json | 3 +- .../server/middleware/tests-server/index.js | 13 +++---- .../middleware/tests-server/package.json | 3 +- lib/tasks/test-server.js | 1 - lib/utilities/clean-remove.js | 15 +++----- lib/utilities/execa.js | 3 +- lib/utilities/insert-into-file.js | 6 +--- lib/utilities/mk-tmp-dir-in.js | 4 +-- lib/utilities/open-editor.js | 1 - lib/utilities/sequence.js | 1 - lib/utilities/windows-admin.js | 1 - package.json | 3 +- tests/acceptance/addon-dummy-generate-test.js | 4 +-- tests/acceptance/addon-generate-test.js | 11 +++--- tests/acceptance/addon-smoke-test-slow.js | 1 - tests/acceptance/brocfile-smoke-test-slow.js | 4 +-- tests/acceptance/destroy-test.js | 9 ++--- tests/acceptance/generate-test.js | 6 ++-- tests/acceptance/in-option-destroy-test.js | 4 +-- tests/acceptance/in-option-generate-test.js | 4 +-- tests/acceptance/pods-destroy-test.js | 6 ++-- tests/acceptance/pods-generate-test.js | 15 ++++---- tests/fixtures/blueprints/basic/index.js | 1 - tests/helpers/copy-fixture-files.js | 5 +-- tests/helpers/generate-utils.js | 4 +-- tests/helpers/mock-broccoli-watcher.js | 3 +- tests/helpers/mock-express-server.js | 3 +- tests/helpers/mock-server-watcher.js | 3 +- tests/helpers/mock-watcher.js | 3 +- tests/helpers/run-command.js | 1 - tests/helpers/tmp.js | 6 ++-- tests/integration/tasks/build-test.js | 4 +-- .../utilities/clean-remove-test.js | 22 ++++++------ tests/runner.js | 3 +- tests/unit/cli/cli-test.js | 1 - tests/unit/commands/destroy-test.js | 1 - tests/unit/commands/generate-test.js | 1 - tests/unit/commands/init-test.js | 1 - tests/unit/commands/install-test.js | 1 - tests/unit/commands/new-test.js | 1 - tests/unit/commands/serve-test.js | 5 ++- tests/unit/commands/test-test.js | 1 - tests/unit/models/addon-test.js | 4 +-- tests/unit/models/asset-size-printer-test.js | 6 +--- tests/unit/models/builder-test.js | 6 +--- tests/unit/models/command-test.js | 2 -- tests/unit/models/file-info-test.js | 7 ++-- tests/unit/tasks/addon-install-test.js | 1 - .../unit/tasks/server/express-server-test.js | 1 - .../server/middleware/tests-server-test.js | 1 - yarn.lock | 7 +++- 75 files changed, 127 insertions(+), 232 deletions(-) diff --git a/lib/cli/cli.js b/lib/cli/cli.js index 78c5da2e23..e12323a867 100644 --- a/lib/cli/cli.js +++ b/lib/cli/cli.js @@ -1,16 +1,14 @@ 'use strict'; -const RSVP = require('rsvp'); - const lookupCommand = require('./lookup-command'); const getOptionArgs = require('../utilities/get-option-args'); +const hash = require('promise.hash.helper'); const logger = require('heimdalljs-logger')('ember-cli:cli'); const loggerTesting = require('heimdalljs-logger')('ember-cli:testing'); const Instrumentation = require('../models/instrumentation'); const PackageInfoCache = require('../models/package-info-cache'); const heimdall = require('heimdalljs'); -const Promise = RSVP.Promise; const onProcessInterrupt = require('../utilities/will-interrupt-process'); class CLI { @@ -128,11 +126,11 @@ class CLI { */ run(environment) { if (environment === undefined) { - return RSVP.reject(new Error('Unable to execute "run" command without environment argument')); + return Promise.reject(new Error('Unable to execute "run" command without environment argument')); } this._environment = environment; let shutdownOnExit = null; - return RSVP.hash(environment) + return hash(environment) .then(environment => { let args = environment.cliArgs.slice(); let commandName = args.shift(); diff --git a/lib/commands/destroy.js b/lib/commands/destroy.js index 50cdc61208..f6089c25fc 100644 --- a/lib/commands/destroy.js +++ b/lib/commands/destroy.js @@ -2,7 +2,6 @@ const path = require('path'); const Command = require('../models/command'); -const Promise = require('rsvp').Promise; const mergeBlueprintOptions = require('../utilities/merge-blueprint-options'); const merge = require('ember-cli-lodash-subset').merge; const SilentError = require('silent-error'); diff --git a/lib/commands/generate.js b/lib/commands/generate.js index 1e1730629b..dd6d0a2e49 100644 --- a/lib/commands/generate.js +++ b/lib/commands/generate.js @@ -3,7 +3,6 @@ const path = require('path'); const chalk = require('chalk'); const Command = require('../models/command'); -const Promise = require('rsvp').Promise; const Blueprint = require('../models/blueprint'); const mergeBlueprintOptions = require('../utilities/merge-blueprint-options'); const _ = require('ember-cli-lodash-subset'); diff --git a/lib/commands/init.js b/lib/commands/init.js index ac70d3e112..91920e7b08 100644 --- a/lib/commands/init.js +++ b/lib/commands/init.js @@ -3,7 +3,6 @@ const clone = require('ember-cli-lodash-subset').clone; const merge = require('ember-cli-lodash-subset').merge; const Command = require('../models/command'); -const Promise = require('rsvp').Promise; const SilentError = require('silent-error'); const chalk = require('chalk'); const isValidProjectName = require('../utilities/valid-project-name'); diff --git a/lib/commands/install.js b/lib/commands/install.js index 3b6aa1bd49..5a938ed1f6 100644 --- a/lib/commands/install.js +++ b/lib/commands/install.js @@ -2,7 +2,6 @@ const Command = require('../models/command'); const SilentError = require('silent-error'); -const Promise = require('rsvp').Promise; module.exports = Command.extend({ name: 'install', diff --git a/lib/commands/new.js b/lib/commands/new.js index bdf9b3c1af..bcd8fd735d 100644 --- a/lib/commands/new.js +++ b/lib/commands/new.js @@ -3,16 +3,12 @@ const fs = require('fs-extra'); const chalk = require('chalk'); const Command = require('../models/command'); -const RSVP = require('rsvp'); const Project = require('../models/project'); const SilentError = require('silent-error'); const isValidProjectName = require('../utilities/valid-project-name'); const normalizeBlueprint = require('../utilities/normalize-blueprint-option'); const mergeBlueprintOptions = require('../utilities/merge-blueprint-options'); -const rmdir = RSVP.denodeify(fs.remove); -const Promise = RSVP.Promise; - module.exports = Command.extend({ name: 'new', description: `Creates a new directory and runs ${chalk.green('ember init')} in it.`, @@ -90,7 +86,7 @@ module.exports = Command.extend({ let { initialDirectory, projectDirectory } = opts; process.chdir(initialDirectory); - return rmdir(projectDirectory).then(() => { + return fs.remove(projectDirectory).then(() => { console.log( chalk.red(`Error creating new application. Removing generated directory \`./${projectDirectory}\``) ); diff --git a/lib/commands/serve.js b/lib/commands/serve.js index 9d3c958148..367c79b139 100644 --- a/lib/commands/serve.js +++ b/lib/commands/serve.js @@ -1,17 +1,15 @@ 'use strict'; const Command = require('../models/command'); -const RSVP = require('rsvp'); +const util = require('util'); const SilentError = require('silent-error'); const PortFinder = require('portfinder'); const Win = require('../utilities/windows-admin'); const EOL = require('os').EOL; -const Promise = RSVP.Promise; - PortFinder.basePort = 7020; -let getPort = RSVP.denodeify(PortFinder.getPort); +let getPort = util.promisify(PortFinder.getPort); let defaultPort = process.env.PORT || 4200; module.exports = Command.extend({ diff --git a/lib/commands/uninstall-npm.js b/lib/commands/uninstall-npm.js index 3b65b93be8..6633777d28 100644 --- a/lib/commands/uninstall-npm.js +++ b/lib/commands/uninstall-npm.js @@ -2,7 +2,6 @@ const Command = require('../models/command'); const SilentError = require('silent-error'); -const Promise = require('rsvp').Promise; module.exports = Command.extend({ name: 'uninstall:npm', diff --git a/lib/models/asset-size-printer.js b/lib/models/asset-size-printer.js index 7de6d10214..7cb41cd03a 100644 --- a/lib/models/asset-size-printer.js +++ b/lib/models/asset-size-printer.js @@ -2,7 +2,7 @@ const chalk = require('chalk'); const path = require('path'); -const RSVP = require('rsvp'); +const util = require('util'); const walkSync = require('walk-sync'); module.exports = class AssetPrinterSize { @@ -51,7 +51,7 @@ module.exports = class AssetPrinterSize { return new Promise(resolve => { const fs = require('fs'); const zlib = require('zlib'); - let gzip = RSVP.denodeify(zlib.gzip); + let gzip = util.promisify(zlib.gzip); let files = this.findFiles(); let testFileRegex = /(test-(loader|support))|(testem)/i; diff --git a/lib/models/blueprint.js b/lib/models/blueprint.js index 5fff7675ce..401f4866a5 100644 --- a/lib/models/blueprint.js +++ b/lib/models/blueprint.js @@ -4,7 +4,6 @@ @module ember-cli */ const FileInfo = require('./file-info'); -const RSVP = require('rsvp'); const chalk = require('chalk'); const MarkdownColor = require('../utilities/markdown-color'); const sequence = require('../utilities/sequence'); @@ -26,10 +25,6 @@ const logger = require('heimdalljs-logger')('ember-cli:blueprint'); const normalizeEntityName = require('ember-cli-normalize-entity-name'); const isAddon = require('../utilities/is-addon'); -const Promise = RSVP.Promise; -const stat = RSVP.denodeify(fs.stat); -const writeFile = RSVP.denodeify(fs.outputFile); - const initialIgnoredFiles = ['.DS_Store']; /** @@ -295,9 +290,9 @@ let Blueprint = CoreObject.extend({ @param {Object} info @return {Promise} */ - _writeFile(info) { + async _writeFile(info) { if (!this.dryRun) { - return writeFile(info.outputPath, info.render()); + return fs.outputFile(info.outputPath, await info.render()); } }, @@ -429,7 +424,12 @@ let Blueprint = CoreObject.extend({ Promise.resolve() .then(beforeHook.bind(this, options, locals)) .then(process.bind(this, intoDir, locals)) - .then(promises => RSVP.map(promises, this._commit.bind(this))) + .then(async promises => { + let values = await Promise.all(promises); + let commitPromises = values.map(this._commit.bind(this)); + + return Promise.all(commitPromises); + }) .then(afterHook.bind(this, options)) ); }, @@ -750,8 +750,7 @@ let Blueprint = CoreObject.extend({ fileInfosToRemove = finishProcessingForUninstall(fileInfosToRemove); - return RSVP.filter(fileInfos, isValidFile) - .then(promises => RSVP.map(promises, prepareConfirm)) + return Promise.all(fileInfos.filter(isValidFile).map(prepareConfirm)) .then(finishProcessingForInstall) .then(fileInfos => fileInfos.concat(fileInfosToRemove)); }, @@ -766,7 +765,7 @@ let Blueprint = CoreObject.extend({ this._ignoreUpdateFiles(); - return RSVP.filter(fileInfos, isValidFile).then(finishProcessingForUninstall); + return finishProcessingForUninstall(fileInfos.filter(isValidFile)); }, /** @@ -1450,16 +1449,6 @@ function gatherConfirmationMessages(collection, info) { return collection; } -/** - @private - @method isFile - @param {FileInfo} info - @return {Promise} -*/ -function isFile(info) { - return stat(info.inputPath).then(it => it.isFile()); -} - /** @private @method isIgnored @@ -1534,9 +1523,9 @@ function ensureTargetDirIsAddon(addonPath) { */ function isValidFile(fileInfo) { if (isIgnored(fileInfo)) { - return Promise.resolve(false); + return false; } else { - return isFile(fileInfo); + return isFilePath(fileInfo); } } diff --git a/lib/models/builder.js b/lib/models/builder.js index a176eee4e4..8db1618a15 100644 --- a/lib/models/builder.js +++ b/lib/models/builder.js @@ -2,7 +2,6 @@ const onProcessInterrupt = require('../utilities/will-interrupt-process'); const fs = require('fs-extra'); const path = require('path'); -const Promise = require('rsvp').Promise; const CoreObject = require('core-object'); const SilentError = require('silent-error'); const chalk = require('chalk'); diff --git a/lib/models/command.js b/lib/models/command.js index eedfacbad1..c32d6604c9 100644 --- a/lib/models/command.js +++ b/lib/models/command.js @@ -7,7 +7,6 @@ const isGitRepo = require('is-git-url'); const camelize = require('ember-cli-string-utils').camelize; const getCallerFile = require('get-caller-file'); const printCommand = require('../utilities/print-command'); -const Promise = require('rsvp').Promise; const _ = require('ember-cli-lodash-subset'); const EOL = require('os').EOL; const CoreObject = require('core-object'); diff --git a/lib/models/edit-file-diff.js b/lib/models/edit-file-diff.js index 90a0702e44..23c740ed73 100644 --- a/lib/models/edit-file-diff.js +++ b/lib/models/edit-file-diff.js @@ -1,15 +1,16 @@ 'use strict'; const fs = require('fs'); -const RSVP = require('rsvp'); +const util = require('util'); const jsdiff = require('diff'); const quickTemp = require('quick-temp'); const path = require('path'); const SilentError = require('silent-error'); const openEditor = require('../utilities/open-editor'); +const hash = require('promise.hash.helper'); -const readFile = RSVP.denodeify(fs.readFile); -const writeFile = RSVP.denodeify(fs.writeFile); +const readFile = util.promisify(fs.readFile); +const writeFile = util.promisify(fs.writeFile); class EditFileDiff { constructor(options) { @@ -19,7 +20,7 @@ class EditFileDiff { } edit() { - return RSVP.hash({ + return hash({ input: this.info.render(), output: readFile(this.info.outputPath), }) @@ -33,7 +34,7 @@ class EditFileDiff { } applyPatch(resultHash) { - return RSVP.hash({ + return hash({ diffString: readFile(resultHash.diffPath), currentString: readFile(resultHash.outputPath), }).then(result => { diff --git a/lib/models/file-info.js b/lib/models/file-info.js index 19c227173d..c4ce5536f6 100644 --- a/lib/models/file-info.js +++ b/lib/models/file-info.js @@ -1,17 +1,18 @@ 'use strict'; const fs = require('fs'); -const RSVP = require('rsvp'); +const util = require('util'); const chalk = require('chalk'); const EditFileDiff = require('./edit-file-diff'); const EOL = require('os').EOL; const rxEOL = new RegExp(EOL, 'g'); const isBinaryFile = require('isbinaryfile').sync; +const hash = require('promise.hash.helper'); const canEdit = require('../utilities/open-editor').canEdit; const processTemplate = require('../utilities/process-template'); -const readFile = RSVP.denodeify(fs.readFile); -const lstat = RSVP.denodeify(fs.stat); +const readFile = util.promisify(fs.readFile); +const lstat = util.promisify(fs.stat); function diffHighlight(line) { if (line[0] === '+') { @@ -73,7 +74,7 @@ class FileInfo { displayDiff() { let info = this, jsdiff = require('diff'); - return RSVP.hash({ + return hash({ input: this.render(), output: readFile(info.outputPath), }).then(result => { @@ -90,9 +91,10 @@ class FileInfo { }); } - render() { + async render() { if (!this.rendered) { - this.rendered = this._render().then(result => this.replacer(result, this)); + let result = await this._render(); + this.rendered = this.replacer(result, this); } return this.rendered; diff --git a/lib/models/project.js b/lib/models/project.js index 78bad902ba..bd567465bc 100644 --- a/lib/models/project.js +++ b/lib/models/project.js @@ -3,10 +3,10 @@ /** @module ember-cli */ -const RSVP = require('rsvp'); +const util = require('util'); const path = require('path'); const findup = require('find-up'); -const resolve = RSVP.denodeify(require('resolve')); +const resolve = util.promisify(require('resolve')); const fs = require('fs-extra'); const _ = require('ember-cli-lodash-subset'); const logger = require('heimdalljs-logger')('ember-cli:project'); diff --git a/lib/models/watcher.js b/lib/models/watcher.js index dbdbf0305b..231a08d605 100644 --- a/lib/models/watcher.js +++ b/lib/models/watcher.js @@ -5,7 +5,6 @@ const logger = require('heimdalljs-logger')('ember-cli:watcher'); const CoreObject = require('core-object'); const serveURL = require('../utilities/get-serve-url'); const printSlowTrees = require('broccoli-slow-trees'); -const promiseFinally = require('promise.prototype.finally'); const eventTypeNormalization = { add: 'added', @@ -59,20 +58,19 @@ module.exports = class Watcher extends CoreObject { _setupBroccoliWatcherBuild() { let heimdallNode; - promiseFinally( - this.watcher.currentBuild.then(hash => { + this.watcher.currentBuild + .then(hash => { heimdallNode = hash.graph.__heimdall__; return hash; - }), - () => { + }) + .finally(() => { // guard against `build` rejecting if (heimdallNode) { // remove the heimdall subtree for this build so we don't leak. If // BROCCOLI_VIZ=1 then we have already output the json in `verboseOutput`. heimdallNode.remove(); } - } - ); + }); } _totalTime(hash) { diff --git a/lib/tasks/addon-install.js b/lib/tasks/addon-install.js index 19d04f2474..993f5333c3 100644 --- a/lib/tasks/addon-install.js +++ b/lib/tasks/addon-install.js @@ -4,7 +4,6 @@ const Task = require('../models/task'); const SilentError = require('silent-error'); const merge = require('ember-cli-lodash-subset').merge; const getPackageBaseName = require('../utilities/get-package-base-name'); -const Promise = require('rsvp').Promise; class AddonInstallTask extends Task { constructor(options) { diff --git a/lib/tasks/bower-install.js b/lib/tasks/bower-install.js index 7d6a56c29d..93c387d46e 100644 --- a/lib/tasks/bower-install.js +++ b/lib/tasks/bower-install.js @@ -4,16 +4,14 @@ const fs = require('fs-extra'); const path = require('path'); const execa = require('../utilities/execa'); -const RSVP = require('rsvp'); +const util = require('util'); const SilentError = require('silent-error'); const Task = require('../models/task'); const formatPackageList = require('../utilities/format-package-list'); const logger = require('heimdalljs-logger')('ember-cli:tasks:bower-install'); -const Promise = RSVP.Promise; -const resolve = RSVP.denodeify(require('resolve')); -const writeJson = RSVP.denodeify(fs.writeJson); +const resolve = util.promisify(require('resolve')); const cliPath = path.resolve(`${__dirname}/../..`); @@ -98,7 +96,7 @@ class BowerInstallTask extends Task { logger.info('Creating "bower.json" for: %s at: %s', projectName, bowerJsonPath); - return writeJson(bowerJsonPath, { name: projectName }, { spaces: 2 }); + return fs.writeJson(bowerJsonPath, { name: projectName }, { spaces: 2 }); } // Options: Boolean verbose diff --git a/lib/tasks/install-blueprint.js b/lib/tasks/install-blueprint.js index 2ad74fdbc0..432ff286c3 100644 --- a/lib/tasks/install-blueprint.js +++ b/lib/tasks/install-blueprint.js @@ -3,7 +3,7 @@ const fs = require('fs-extra'); const Blueprint = require('../models/blueprint'); const Task = require('../models/task'); -const RSVP = require('rsvp'); +const util = require('util'); const temp = require('temp'); const path = require('path'); const merge = require('ember-cli-lodash-subset').merge; @@ -18,7 +18,7 @@ const NOT_FOUND_REGEXP = /npm ERR! 404 {2}'(\S+)' is not in the npm registry/; // Automatically track and cleanup temp files at exit temp.track(); -let mkdirTemp = RSVP.denodeify(temp.mkdir); +let mkdirTemp = util.promisify(temp.mkdir); class InstallBlueprintTask extends Task { run(options) { @@ -58,7 +58,7 @@ class InstallBlueprintTask extends Task { _lookupLocalBlueprint(name) { logger.info(`Looking up blueprint "${name}" locally...`); - return RSVP.resolve().then(() => + return Promise.resolve().then(() => Blueprint.lookup(name, { paths: this.project.blueprintLookupPaths(), }) @@ -180,7 +180,7 @@ class InstallBlueprintTask extends Task { _loadBlueprintFromPath(path) { logger.info(`Loading blueprint from "${path}" ...`); - return RSVP.resolve().then(() => Blueprint.load(path)); + return Promise.resolve().then(() => Blueprint.load(path)); } /* diff --git a/lib/tasks/npm-install.js b/lib/tasks/npm-install.js index f4978ea197..6b98374909 100644 --- a/lib/tasks/npm-install.js +++ b/lib/tasks/npm-install.js @@ -5,7 +5,6 @@ const path = require('path'); const fs = require('fs'); const NpmTask = require('./npm-task'); const formatPackageList = require('../utilities/format-package-list'); -const Promise = require('rsvp').Promise; class NpmInstallTask extends NpmTask { constructor(options) { diff --git a/lib/tasks/serve.js b/lib/tasks/serve.js index 9fe9bfdc1f..91cb65f1da 100644 --- a/lib/tasks/serve.js +++ b/lib/tasks/serve.js @@ -3,16 +3,16 @@ const fs = require('fs'); const path = require('path'); const ExpressServer = require('./server/express-server'); -const RSVP = require('rsvp'); const Task = require('../models/task'); const Watcher = require('../models/watcher'); const ServerWatcher = require('../models/server-watcher'); const Builder = require('../models/builder'); const SilentError = require('silent-error'); const serveURL = require('../utilities/get-serve-url'); +const pDefer = require('p-defer'); function mockWatcher(distDir) { - let watcher = RSVP.Promise.resolve({ directory: distDir }); + let watcher = Promise.resolve({ directory: distDir }); watcher.on = () => {}; return watcher; } @@ -86,7 +86,7 @@ class ServeTask extends Task { }); /* hang until the user exits */ - this._runDeferred = RSVP.defer(); + this._runDeferred = pDefer(); return expressServer.start(options).then(() => { if (hasBuild) { diff --git a/lib/tasks/server/express-server.js b/lib/tasks/server/express-server.js index 2642f4c0c9..665f3d3394 100644 --- a/lib/tasks/server/express-server.js +++ b/lib/tasks/server/express-server.js @@ -6,7 +6,6 @@ const chalk = require('chalk'); const fs = require('fs'); const debounce = require('ember-cli-lodash-subset').debounce; const mapSeries = require('promise-map-series'); -const Promise = require('rsvp').Promise; const Task = require('../../models/task'); const SilentError = require('silent-error'); const LiveReloadServer = require('./livereload-server'); diff --git a/lib/tasks/server/livereload-server.js b/lib/tasks/server/livereload-server.js index cc2eabc923..ade03118ea 100644 --- a/lib/tasks/server/livereload-server.js +++ b/lib/tasks/server/livereload-server.js @@ -6,7 +6,6 @@ const path = require('path'); const FSTree = require('fs-tree-diff'); const logger = require('heimdalljs-logger')('ember-cli:live-reload:'); const fs = require('fs'); -const Promise = require('rsvp').Promise; const cleanBaseUrl = require('clean-base-url'); const isLiveReloadRequest = require('../../utilities/is-live-reload-request'); diff --git a/lib/tasks/server/middleware/history-support/index.js b/lib/tasks/server/middleware/history-support/index.js index 3426c4fd95..6739075634 100644 --- a/lib/tasks/server/middleware/history-support/index.js +++ b/lib/tasks/server/middleware/history-support/index.js @@ -2,7 +2,6 @@ const path = require('path'); const fs = require('fs'); -const promiseFinally = require('promise.prototype.finally'); const cleanBaseURL = require('clean-base-url'); class HistorySupportAddon { @@ -64,7 +63,7 @@ class HistorySupportAddon { } }); - promiseFinally(Promise.resolve(results), next); + Promise.resolve(results).finally(next); }); } diff --git a/lib/tasks/server/middleware/history-support/package.json b/lib/tasks/server/middleware/history-support/package.json index 953a797f7d..ad739c5053 100644 --- a/lib/tasks/server/middleware/history-support/package.json +++ b/lib/tasks/server/middleware/history-support/package.json @@ -7,7 +7,6 @@ "before": "broccoli-watcher" }, "dependencies": { - "clean-base-url": "*", - "promise.prototype.finally": "*" + "clean-base-url": "*" } } diff --git a/lib/tasks/server/middleware/tests-server/index.js b/lib/tasks/server/middleware/tests-server/index.js index aee289b803..bceef76987 100644 --- a/lib/tasks/server/middleware/tests-server/index.js +++ b/lib/tasks/server/middleware/tests-server/index.js @@ -4,7 +4,6 @@ const cleanBaseURL = require('clean-base-url'); const path = require('path'); const fs = require('fs'); const logger = require('heimdalljs-logger')('ember-cli:test-server'); -const promiseFinally = require('promise.prototype.finally'); class TestsServerAddon { /** @@ -56,11 +55,13 @@ class TestsServerAddon { } }); - promiseFinally(promiseFinally(Promise.resolve(results), next), () => { - if (config.finally) { - config.finally(); - } - }); + Promise.resolve(results) + .finally(next) + .finally(() => { + if (config.finally) { + config.finally(); + } + }); }); } } diff --git a/lib/tasks/server/middleware/tests-server/package.json b/lib/tasks/server/middleware/tests-server/package.json index e6c5de51fa..258449ef43 100644 --- a/lib/tasks/server/middleware/tests-server/package.json +++ b/lib/tasks/server/middleware/tests-server/package.json @@ -8,7 +8,6 @@ }, "dependencies": { "clean-base-url": "*", - "heimdalljs-logger": "*", - "promise.prototype.finally": "*" + "heimdalljs-logger": "*" } } diff --git a/lib/tasks/test-server.js b/lib/tasks/test-server.js index b72e957714..2dee6e4b96 100644 --- a/lib/tasks/test-server.js +++ b/lib/tasks/test-server.js @@ -1,7 +1,6 @@ 'use strict'; const TestTask = require('./test'); -const Promise = require('rsvp').Promise; const chalk = require('chalk'); const SilentError = require('silent-error'); diff --git a/lib/utilities/clean-remove.js b/lib/utilities/clean-remove.js index ab4f41cb39..2d81c53440 100644 --- a/lib/utilities/clean-remove.js +++ b/lib/utilities/clean-remove.js @@ -2,18 +2,13 @@ const path = require('path'); const fs = require('fs-extra'); -const RSVP = require('rsvp'); const walkUp = require('./walk-up-path'); -const Promise = RSVP.Promise; -const stat = RSVP.denodeify(fs.stat); -const remove = RSVP.denodeify(fs.remove); -const readdir = RSVP.denodeify(fs.readdir); - function cleanRemove(fileInfo) { // see if file exists to avoid wasting time - return stat(fileInfo.outputPath) - .then(() => remove(fileInfo.outputPath)) + return fs + .stat(fileInfo.outputPath) + .then(() => fs.remove(fileInfo.outputPath)) .then(() => { let paths = walkUp(fileInfo.displayPath).map(thePath => path.join(fileInfo.outputBasePath, thePath)); @@ -27,13 +22,13 @@ function cleanRemove(fileInfo) { } // get list of files remaining in this dir - return readdir(thePath).then(paths => { + return fs.readdir(thePath).then(paths => { if (paths.length) { // don't check parent dirs since this one isn't empty return true; } - return remove(thePath).then(() => false); + return fs.remove(thePath).then(() => false); }); }), Promise.resolve() diff --git a/lib/utilities/execa.js b/lib/utilities/execa.js index 38f6e63f81..0b22b6610f 100644 --- a/lib/utilities/execa.js +++ b/lib/utilities/execa.js @@ -1,12 +1,11 @@ 'use strict'; const execa = require('execa'); -const RSVP = require('rsvp'); const logger = require('heimdalljs-logger')('ember-cli:execa'); function _execa(cmd, args, opts) { logger.info('execa(%j, %j)', cmd, args); - return RSVP.resolve(execa(cmd, args, opts)).then(result => { + return Promise.resolve(execa(cmd, args, opts)).then(result => { logger.info('execa(%j, %j) -> code: %d', cmd, args, result.code); return result; }); diff --git a/lib/utilities/insert-into-file.js b/lib/utilities/insert-into-file.js index 6cc7e8d358..59be86a0c4 100644 --- a/lib/utilities/insert-into-file.js +++ b/lib/utilities/insert-into-file.js @@ -2,10 +2,6 @@ const fs = require('fs-extra'); const EOL = require('os').EOL; -const RSVP = require('rsvp'); - -const Promise = RSVP.Promise; -const writeFile = RSVP.denodeify(fs.outputFile); /** Inserts the given content into a file. If the `contentsToInsert` string is already @@ -118,7 +114,7 @@ function insertIntoFile(fullPath, contentsToInsert, providedOptions) { if (contentsToWrite !== originalContents) { returnValue.inserted = true; - return writeFile(fullPath, contentsToWrite).then(() => returnValue); + return fs.outputFile(fullPath, contentsToWrite).then(() => returnValue); } } diff --git a/lib/utilities/mk-tmp-dir-in.js b/lib/utilities/mk-tmp-dir-in.js index 5a5840bbe1..e270f44334 100644 --- a/lib/utilities/mk-tmp-dir-in.js +++ b/lib/utilities/mk-tmp-dir-in.js @@ -2,9 +2,9 @@ const fs = require('fs-extra'); const temp = require('temp'); -const RSVP = require('rsvp'); +const util = require('util'); -const mkdirTemp = RSVP.denodeify(temp.mkdir); +const mkdirTemp = util.promisify(temp.mkdir); function mkTmpDirIn(dir) { return fs.ensureDir(dir).then(() => mkdirTemp({ dir })); diff --git a/lib/utilities/open-editor.js b/lib/utilities/open-editor.js index 1196166058..a7a7a5f7d7 100644 --- a/lib/utilities/open-editor.js +++ b/lib/utilities/open-editor.js @@ -1,6 +1,5 @@ 'use strict'; -const Promise = require('rsvp').Promise; const spawn = require('child_process').spawn; function openEditor(file) { diff --git a/lib/utilities/sequence.js b/lib/utilities/sequence.js index a7e3f6db01..23f472877b 100644 --- a/lib/utilities/sequence.js +++ b/lib/utilities/sequence.js @@ -1,6 +1,5 @@ 'use strict'; -const Promise = require('rsvp').Promise; /* * * given an array of functions, that may or may not return promises sequence diff --git a/lib/utilities/windows-admin.js b/lib/utilities/windows-admin.js index 85a1845154..7348d22c44 100644 --- a/lib/utilities/windows-admin.js +++ b/lib/utilities/windows-admin.js @@ -1,6 +1,5 @@ 'use strict'; -const Promise = require('rsvp').Promise; const chalk = require('chalk'); class WindowsSymlinkChecker { diff --git a/package.json b/package.json index 85f0e927dc..e339296a9f 100644 --- a/package.json +++ b/package.json @@ -107,11 +107,10 @@ "p-defer": "^3.0.0", "portfinder": "^1.0.25", "promise-map-series": "^0.3.0", - "promise.prototype.finally": "^3.1.2", + "promise.hash.helper": "^1.0.2", "quick-temp": "^0.1.8", "resolve": "^1.12.0", "resolve-package-path": "^2.0.0", - "rsvp": "^4.8.5", "sane": "^4.1.0", "semver": "^6.3.0", "silent-error": "^1.1.1", diff --git a/tests/acceptance/addon-dummy-generate-test.js b/tests/acceptance/addon-dummy-generate-test.js index e5b113a8a4..21c7281ec2 100644 --- a/tests/acceptance/addon-dummy-generate-test.js +++ b/tests/acceptance/addon-dummy-generate-test.js @@ -1,10 +1,8 @@ 'use strict'; -const RSVP = require('rsvp'); const ember = require('../helpers/ember'); const fs = require('fs-extra'); const path = require('path'); -let remove = RSVP.denodeify(fs.remove); let root = process.cwd(); let tmproot = path.join(root, 'tmp'); const Blueprint = require('../../lib/models/blueprint'); @@ -33,7 +31,7 @@ describe('Acceptance: ember generate in-addon-dummy', function() { afterEach(function() { process.chdir(root); - return remove(tmproot); + return fs.remove(tmproot); }); function initAddon() { diff --git a/tests/acceptance/addon-generate-test.js b/tests/acceptance/addon-generate-test.js index 9eb3dbe094..19c86bc8d3 100644 --- a/tests/acceptance/addon-generate-test.js +++ b/tests/acceptance/addon-generate-test.js @@ -1,11 +1,8 @@ 'use strict'; -const RSVP = require('rsvp'); const ember = require('../helpers/ember'); const path = require('path'); const fs = require('fs-extra'); -let outputFile = RSVP.denodeify(fs.outputFile); -let remove = RSVP.denodeify(fs.remove); let root = process.cwd(); let tmproot = path.join(root, 'tmp'); const Blueprint = require('../../lib/models/blueprint'); @@ -34,7 +31,7 @@ describe('Acceptance: ember generate in-addon', function() { afterEach(function() { process.chdir(root); - return remove(tmproot); + return fs.remove(tmproot); }); function initAddon(name) { @@ -72,7 +69,7 @@ describe('Acceptance: ember generate in-addon', function() { it('runs the `addon-import` blueprint from a classic addon', async function() { await initAddon('my-addon'); - await outputFile( + await fs.outputFile( 'blueprints/service/files/__root__/__path__/__name__.js', "import Service from '@ember/service';\n" + 'export default Service.extend({ });\n' ); @@ -85,12 +82,12 @@ describe('Acceptance: ember generate in-addon', function() { it('runs a custom "*-addon" blueprint from a classic addon', async function() { await initAddon('my-addon'); - await outputFile( + await fs.outputFile( 'blueprints/service/files/__root__/__path__/__name__.js', "import Service from '@ember/service';\n" + 'export default Service.extend({ });\n' ); - await outputFile( + await fs.outputFile( 'blueprints/service-addon/files/app/services/session.js', "export { default } from 'somewhere';\n" ); diff --git a/tests/acceptance/addon-smoke-test-slow.js b/tests/acceptance/addon-smoke-test-slow.js index dca034cd0a..cff9b38752 100644 --- a/tests/acceptance/addon-smoke-test-slow.js +++ b/tests/acceptance/addon-smoke-test-slow.js @@ -1,6 +1,5 @@ 'use strict'; -const Promise = require('rsvp').Promise; const path = require('path'); const fs = require('fs-extra'); const spawn = require('child_process').spawn; diff --git a/tests/acceptance/brocfile-smoke-test-slow.js b/tests/acceptance/brocfile-smoke-test-slow.js index e608d9f11b..042cc27329 100644 --- a/tests/acceptance/brocfile-smoke-test-slow.js +++ b/tests/acceptance/brocfile-smoke-test-slow.js @@ -1,9 +1,7 @@ 'use strict'; -const RSVP = require('rsvp'); const path = require('path'); const fs = require('fs-extra'); -let remove = RSVP.denodeify(fs.remove); const runCommand = require('../helpers/run-command'); const acceptance = require('../helpers/acceptance'); @@ -60,7 +58,7 @@ describe('Acceptance: brocfile-smoke-test', function() { it('without app/templates', async function() { await copyFixtureFiles('brocfile-tests/pods-templates'); - await remove(path.join(process.cwd(), 'app/templates')); + await fs.remove(path.join(process.cwd(), 'app/templates')); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); }); diff --git a/tests/acceptance/destroy-test.js b/tests/acceptance/destroy-test.js index 55431653d9..7cc5685c24 100644 --- a/tests/acceptance/destroy-test.js +++ b/tests/acceptance/destroy-test.js @@ -1,11 +1,8 @@ 'use strict'; -const RSVP = require('rsvp'); const ember = require('../helpers/ember'); const fs = require('fs-extra'); -let outputFile = RSVP.denodeify(fs.outputFile); const path = require('path'); -let remove = RSVP.denodeify(fs.remove); let root = process.cwd(); let tmproot = path.join(root, 'tmp'); const mkTmpDirIn = require('../../lib/utilities/mk-tmp-dir-in'); @@ -36,7 +33,7 @@ describe('Acceptance: ember destroy', function() { afterEach(function() { process.chdir(root); - return remove(tmproot); + return fs.remove(tmproot); }); function initApp() { @@ -109,7 +106,7 @@ describe('Acceptance: ember destroy', function() { let files = ['app/foos/bar.js']; await initApp(); - await outputFile( + await fs.outputFile( 'blueprints/foo/files/app/foos/__name__.js', "import Ember from 'ember';\n\n" + 'export default Ember.Object.extend({ foo: true });\n' ); @@ -126,7 +123,7 @@ describe('Acceptance: ember destroy', function() { let files = ['app/controllers/foo.js']; await initApp(); - await outputFile( + await fs.outputFile( 'blueprints/controller/files/app/controllers/__name__.js', "import Ember from 'ember';\n\n" + 'export default Ember.Controller.extend({ custom: true });\n' ); diff --git a/tests/acceptance/generate-test.js b/tests/acceptance/generate-test.js index 497fb6fef7..a3ea8b5d97 100755 --- a/tests/acceptance/generate-test.js +++ b/tests/acceptance/generate-test.js @@ -1,11 +1,11 @@ 'use strict'; -const RSVP = require('rsvp'); +const util = require('util'); const ember = require('../helpers/ember'); const fs = require('fs-extra'); -let outputFile = RSVP.denodeify(fs.outputFile); +let outputFile = util.promisify(fs.outputFile); const path = require('path'); -let remove = RSVP.denodeify(fs.remove); +let remove = util.promisify(fs.remove); const replaceFile = require('ember-cli-internal-test-helpers/lib/helpers/file-utils').replaceFile; let root = process.cwd(); let tmproot = path.join(root, 'tmp'); diff --git a/tests/acceptance/in-option-destroy-test.js b/tests/acceptance/in-option-destroy-test.js index 7a9ebf8749..781e62dd39 100644 --- a/tests/acceptance/in-option-destroy-test.js +++ b/tests/acceptance/in-option-destroy-test.js @@ -1,10 +1,8 @@ 'use strict'; -const RSVP = require('rsvp'); const ember = require('../helpers/ember'); const fs = require('fs-extra'); const path = require('path'); -let remove = RSVP.denodeify(fs.remove); let root = process.cwd(); let tmproot = path.join(root, 'tmp'); const mkTmpDirIn = require('../../lib/utilities/mk-tmp-dir-in'); @@ -40,7 +38,7 @@ describe('Acceptance: ember destroy with --in option', function() { this.timeout(10000); process.chdir(root); - return remove(tmproot); + return fs.remove(tmproot); }); function generate(args) { diff --git a/tests/acceptance/in-option-generate-test.js b/tests/acceptance/in-option-generate-test.js index 5855d9344b..45a51d3b29 100644 --- a/tests/acceptance/in-option-generate-test.js +++ b/tests/acceptance/in-option-generate-test.js @@ -1,10 +1,8 @@ 'use strict'; -const RSVP = require('rsvp'); const ember = require('../helpers/ember'); const fs = require('fs-extra'); const path = require('path'); -let remove = RSVP.denodeify(fs.remove); let root = process.cwd(); let tmproot = path.join(root, 'tmp'); const Blueprint = require('../../lib/models/blueprint'); @@ -36,7 +34,7 @@ describe('Acceptance: ember generate with --in option', function() { afterEach(function() { process.chdir(root); - return remove(tmproot); + return fs.remove(tmproot); }); function removeAddonPath() { diff --git a/tests/acceptance/pods-destroy-test.js b/tests/acceptance/pods-destroy-test.js index adaf675c14..0bbfe6dfcc 100644 --- a/tests/acceptance/pods-destroy-test.js +++ b/tests/acceptance/pods-destroy-test.js @@ -1,12 +1,12 @@ 'use strict'; -const RSVP = require('rsvp'); const ember = require('../helpers/ember'); const fs = require('fs-extra'); +const util = require('util'); const replaceFile = require('ember-cli-internal-test-helpers/lib/helpers/file-utils').replaceFile; -let outputFile = RSVP.denodeify(fs.outputFile); +let outputFile = util.promisify(fs.outputFile); const path = require('path'); -let remove = RSVP.denodeify(fs.remove); +let remove = util.promisify(fs.remove); let root = process.cwd(); let tmproot = path.join(root, 'tmp'); const mkTmpDirIn = require('../../lib/utilities/mk-tmp-dir-in'); diff --git a/tests/acceptance/pods-generate-test.js b/tests/acceptance/pods-generate-test.js index 7cbe6d3bb2..9b2d6e8241 100644 --- a/tests/acceptance/pods-generate-test.js +++ b/tests/acceptance/pods-generate-test.js @@ -1,12 +1,9 @@ 'use strict'; -const RSVP = require('rsvp'); const ember = require('../helpers/ember'); const replaceFile = require('ember-cli-internal-test-helpers/lib/helpers/file-utils').replaceFile; const fs = require('fs-extra'); -let outputFile = RSVP.denodeify(fs.outputFile); const path = require('path'); -let remove = RSVP.denodeify(fs.remove); let root = process.cwd(); let tmproot = path.join(root, 'tmp'); const mkTmpDirIn = require('../../lib/utilities/mk-tmp-dir-in'); @@ -38,7 +35,7 @@ describe('Acceptance: ember generate pod', function() { afterEach(function() { process.chdir(root); - return remove(tmproot); + return fs.remove(tmproot); }); function initApp() { @@ -254,7 +251,7 @@ describe('Acceptance: ember generate pod', function() { it('uses blueprints from the project directory', async function() { await initApp(); - await outputFile( + await fs.outputFile( 'blueprints/foo/files/app/foos/__name__.js', "import Ember from 'ember';\n" + 'export default Ember.Object.extend({ foo: true });\n' ); @@ -266,7 +263,7 @@ describe('Acceptance: ember generate pod', function() { it('allows custom blueprints to override built-ins', async function() { await initApp(); - await outputFile( + await fs.outputFile( 'blueprints/controller/files/app/__path__/__name__.js', "import Ember from 'ember';\n\n" + 'export default Ember.Controller.extend({ custom: true });\n' ); @@ -278,12 +275,12 @@ describe('Acceptance: ember generate pod', function() { it('passes custom cli arguments to blueprint options', async function() { await initApp(); - await outputFile( + await fs.outputFile( 'blueprints/customblue/files/app/__name__.js', 'Q: Can I has custom command? A: <%= hasCustomCommand %>' ); - await outputFile( + await fs.outputFile( 'blueprints/customblue/index.js', 'module.exports = {\n' + ' fileMapTokens(options) {\n' + @@ -308,7 +305,7 @@ describe('Acceptance: ember generate pod', function() { it('correctly identifies the root of the project', async function() { await initApp(); - await outputFile( + await fs.outputFile( 'blueprints/controller/files/app/__path__/__name__.js', "import Ember from 'ember';\n\n" + 'export default Ember.Controller.extend({ custom: true });\n' ); diff --git a/tests/fixtures/blueprints/basic/index.js b/tests/fixtures/blueprints/basic/index.js index 495ee6c0fd..5c24b277e8 100644 --- a/tests/fixtures/blueprints/basic/index.js +++ b/tests/fixtures/blueprints/basic/index.js @@ -1,7 +1,6 @@ 'use strict'; const Blueprint = require('../../../../lib/models/blueprint'); -const Promise = require('rsvp').Promise; module.exports = Blueprint.extend({ description: 'A basic blueprint', diff --git a/tests/helpers/copy-fixture-files.js b/tests/helpers/copy-fixture-files.js index c9a087b7ad..e4b7f626ae 100644 --- a/tests/helpers/copy-fixture-files.js +++ b/tests/helpers/copy-fixture-files.js @@ -2,12 +2,9 @@ const fs = require('fs-extra'); const path = require('path'); -const RSVP = require('rsvp'); - -const copy = RSVP.denodeify(fs.copy); let rootPath = process.cwd(); module.exports = function copyFixtureFiles(sourceDir) { - return copy(path.join(rootPath, 'tests', 'fixtures', sourceDir), '.', { overwrite: true }); + return fs.copy(path.join(rootPath, 'tests', 'fixtures', sourceDir), '.', { overwrite: true }); }; diff --git a/tests/helpers/generate-utils.js b/tests/helpers/generate-utils.js index deedf50f2f..fd538ab172 100644 --- a/tests/helpers/generate-utils.js +++ b/tests/helpers/generate-utils.js @@ -1,8 +1,6 @@ 'use strict'; -const RSVP = require('rsvp'); const fs = require('fs-extra'); -let outputFile = RSVP.denodeify(fs.outputFile); const ember = require('./ember'); function inRepoAddon(path) { @@ -10,7 +8,7 @@ function inRepoAddon(path) { } function tempBlueprint() { - return outputFile('blueprints/foo/files/__root__/foos/__name__.js', '/* whoah, empty foo! */'); + return fs.outputFile('blueprints/foo/files/__root__/foos/__name__.js', '/* whoah, empty foo! */'); } module.exports = { diff --git a/tests/helpers/mock-broccoli-watcher.js b/tests/helpers/mock-broccoli-watcher.js index d7ac45363e..0c9556160d 100644 --- a/tests/helpers/mock-broccoli-watcher.js +++ b/tests/helpers/mock-broccoli-watcher.js @@ -1,6 +1,5 @@ 'use strict'; -const RSVP = require('rsvp'); const EventEmitter = require('events').EventEmitter; const path = require('path'); @@ -8,7 +7,7 @@ class MockBroccoliWatcher extends EventEmitter { start() {} then() { - let promise = RSVP.resolve({ + let promise = Promise.resolve({ directory: path.resolve(__dirname, '../fixtures/express-server'), }); return promise.then.apply(promise, arguments); diff --git a/tests/helpers/mock-express-server.js b/tests/helpers/mock-express-server.js index 299d2e8d8b..2999bf9fd9 100644 --- a/tests/helpers/mock-express-server.js +++ b/tests/helpers/mock-express-server.js @@ -1,12 +1,11 @@ 'use strict'; -const RSVP = require('rsvp'); const EventEmitter = require('events').EventEmitter; const path = require('path'); class MockExpressServer extends EventEmitter { then() { - let promise = RSVP.resolve({ + let promise = Promise.resolve({ directory: path.resolve(__dirname, '../fixtures/express-server'), }); return promise.then.apply(promise, arguments); diff --git a/tests/helpers/mock-server-watcher.js b/tests/helpers/mock-server-watcher.js index 45c1c3888b..57519c379f 100644 --- a/tests/helpers/mock-server-watcher.js +++ b/tests/helpers/mock-server-watcher.js @@ -1,12 +1,11 @@ 'use strict'; -const RSVP = require('rsvp'); const EventEmitter = require('events').EventEmitter; const path = require('path'); class MockServerWatcher extends EventEmitter { then() { - let promise = RSVP.resolve({ + let promise = Promise.resolve({ directory: path.resolve(__dirname, '../fixtures/express-server'), }); return promise.then.apply(promise, arguments); diff --git a/tests/helpers/mock-watcher.js b/tests/helpers/mock-watcher.js index 244509a353..bef29f43ac 100644 --- a/tests/helpers/mock-watcher.js +++ b/tests/helpers/mock-watcher.js @@ -1,12 +1,11 @@ 'use strict'; -const RSVP = require('rsvp'); const EventEmitter = require('events').EventEmitter; const path = require('path'); class MockWatcher extends EventEmitter { then() { - let promise = RSVP.resolve({ + let promise = Promise.resolve({ directory: path.resolve(__dirname, '../fixtures/express-server'), }); return promise.then.apply(promise, arguments); diff --git a/tests/helpers/run-command.js b/tests/helpers/run-command.js index 7e99ce231a..a70dc75c62 100644 --- a/tests/helpers/run-command.js +++ b/tests/helpers/run-command.js @@ -1,6 +1,5 @@ 'use strict'; -const Promise = require('rsvp').Promise; const chalk = require('chalk'); const spawn = require('child_process').spawn; const defaults = require('ember-cli-lodash-subset').defaults; diff --git a/tests/helpers/tmp.js b/tests/helpers/tmp.js index 3a213b96a8..1275522cd7 100644 --- a/tests/helpers/tmp.js +++ b/tests/helpers/tmp.js @@ -1,20 +1,18 @@ 'use strict'; const fs = require('fs-extra'); -const RSVP = require('rsvp'); -let remove = RSVP.denodeify(fs.remove); let root = process.cwd(); module.exports.setup = function(path) { process.chdir(root); - return remove(path).then(function() { + return fs.remove(path).then(function() { fs.mkdirsSync(path); }); }; module.exports.teardown = function(path) { process.chdir(root); - return remove(path); + return fs.remove(path); }; diff --git a/tests/integration/tasks/build-test.js b/tests/integration/tasks/build-test.js index 451088dd9e..7a59508723 100644 --- a/tests/integration/tasks/build-test.js +++ b/tests/integration/tasks/build-test.js @@ -7,14 +7,12 @@ let expect = chai.expect; let file = chai.file; const walkSync = require('walk-sync'); const BuildTask = require('../../../lib/tasks/build'); -const RSVP = require('rsvp'); const MockProject = require('../../helpers/mock-project'); const MockAnalytics = require('../../helpers/mock-analytics'); const MockProcess = require('../../helpers/mock-process'); const copyFixtureFiles = require('../../helpers/copy-fixture-files'); const mkTmpDirIn = require('../../../lib/utilities/mk-tmp-dir-in'); const willInterruptProcess = require('../../../lib/utilities/will-interrupt-process'); -let remove = RSVP.denodeify(fs.remove); let root = process.cwd(); let tmproot = path.join(root, 'tmp'); @@ -42,7 +40,7 @@ describe('build task test', function() { process.chdir(root); delete process.env.BROCCOLI_VIZ; - return remove(tmproot); + return fs.remove(tmproot); }); it('can build', function() { diff --git a/tests/integration/utilities/clean-remove-test.js b/tests/integration/utilities/clean-remove-test.js index 7cb33b4664..b56a141407 100644 --- a/tests/integration/utilities/clean-remove-test.js +++ b/tests/integration/utilities/clean-remove-test.js @@ -4,12 +4,8 @@ const expect = require('../../chai').expect; const cleanRemove = require('../../../lib/utilities/clean-remove'); const temp = require('temp'); const path = require('path'); -const RSVP = require('rsvp'); const fs = require('fs-extra'); -let outputFile = RSVP.denodeify(fs.outputFile); -let stat = RSVP.denodeify(fs.stat); - describe('clean-remove', function() { let tempDir; let originalCwd = process.cwd(); @@ -35,9 +31,10 @@ describe('clean-remove', function() { fileInfo.outputPath = path.join(tempDir, displayPath); fileInfo.displayPath = displayPath; - return outputFile(displayPath, '') + return fs + .outputFile(displayPath, '') .then(function() { - return stat(displayPath).then(function(stats) { + return fs.stat(displayPath).then(function(stats) { expect(stats).to.be.ok; }); }) @@ -45,7 +42,7 @@ describe('clean-remove', function() { return cleanRemove(fileInfo); }) .then(function() { - return expect(stat('nested1')).to.be.rejected; + return expect(fs.stat('nested1')).to.be.rejected; }); }); @@ -55,12 +52,13 @@ describe('clean-remove', function() { fileInfo.outputPath = path.join(tempDir, removedDisplayPath); fileInfo.displayPath = removedDisplayPath; - return outputFile(removedDisplayPath, '') + return fs + .outputFile(removedDisplayPath, '') .then(function() { - return outputFile(preservedDisplayPath, ''); + return fs.outputFile(preservedDisplayPath, ''); }) .then(function() { - return stat(preservedDisplayPath).then(function(stats) { + return fs.stat(preservedDisplayPath).then(function(stats) { expect(stats).to.be.ok; }); }) @@ -68,10 +66,10 @@ describe('clean-remove', function() { return cleanRemove(fileInfo); }) .then(function() { - return expect(stat(removedDisplayPath)).to.be.rejected; + return expect(fs.stat(removedDisplayPath)).to.be.rejected; }) .then(function() { - return stat(preservedDisplayPath).then(function(stats) { + return fs.stat(preservedDisplayPath).then(function(stats) { expect(stats).to.be.ok; }); }); diff --git a/tests/runner.js b/tests/runner.js index ec111153de..439cb29a00 100644 --- a/tests/runner.js +++ b/tests/runner.js @@ -5,7 +5,6 @@ captureExit.captureExit(); const glob = require('glob'); const Mocha = require('mocha'); -const RSVP = require('rsvp'); const fs = require('fs-extra'); if (process.env.EOLNEWLINE) { @@ -58,7 +57,7 @@ function runMocha() { }); } -RSVP.resolve() +Promise.resolve() .then(() => runMocha()) .catch(error => { console.error(error); diff --git a/tests/unit/cli/cli-test.js b/tests/unit/cli/cli-test.js index 25266b736a..5d111527b0 100644 --- a/tests/unit/cli/cli-test.js +++ b/tests/unit/cli/cli-test.js @@ -5,7 +5,6 @@ const MockUI = require('console-ui/mock'); const MockAnalytics = require('../../helpers/mock-analytics'); const td = require('testdouble'); const Command = require('../../../lib/models/command'); -const Promise = require('rsvp').Promise; let ui; let analytics; diff --git a/tests/unit/commands/destroy-test.js b/tests/unit/commands/destroy-test.js index 617abd6240..5e43956b75 100644 --- a/tests/unit/commands/destroy-test.js +++ b/tests/unit/commands/destroy-test.js @@ -5,7 +5,6 @@ const EOL = require('os').EOL; const MockProject = require('../../helpers/mock-project'); const processHelpString = require('../../helpers/process-help-string'); const commandOptions = require('../../factories/command-options'); -const Promise = require('rsvp').Promise; const Task = require('../../../lib/models/task'); const DestroyCommand = require('../../../lib/commands/destroy'); diff --git a/tests/unit/commands/generate-test.js b/tests/unit/commands/generate-test.js index bce9ca7989..1293982568 100644 --- a/tests/unit/commands/generate-test.js +++ b/tests/unit/commands/generate-test.js @@ -5,7 +5,6 @@ const EOL = require('os').EOL; const commandOptions = require('../../factories/command-options'); const processHelpString = require('../../helpers/process-help-string'); const MockProject = require('../../helpers/mock-project'); -const Promise = require('rsvp').Promise; const Task = require('../../../lib/models/task'); const Blueprint = require('../../../lib/models/blueprint'); const GenerateCommand = require('../../../lib/commands/generate'); diff --git a/tests/unit/commands/init-test.js b/tests/unit/commands/init-test.js index 412c6d91be..6e9ec2a290 100644 --- a/tests/unit/commands/init-test.js +++ b/tests/unit/commands/init-test.js @@ -7,7 +7,6 @@ const expect = require('../../chai').expect; const map = require('ember-cli-lodash-subset').map; const MockUI = require('console-ui/mock'); const MockAnalytics = require('../../helpers/mock-analytics'); -const Promise = require('rsvp').Promise; const Blueprint = require('../../../lib/models/blueprint'); const Project = require('../../../lib/models/project'); const Task = require('../../../lib/models/task'); diff --git a/tests/unit/commands/install-test.js b/tests/unit/commands/install-test.js index 3d5fd820f1..f1a8645610 100644 --- a/tests/unit/commands/install-test.js +++ b/tests/unit/commands/install-test.js @@ -4,7 +4,6 @@ const expect = require('../../chai').expect; const MockProject = require('../../helpers/mock-project'); const commandOptions = require('../../factories/command-options'); const Task = require('../../../lib/models/task'); -const Promise = require('rsvp').Promise; const AddonInstall = require('../../../lib/tasks/addon-install'); const InstallCommand = require('../../../lib/commands/install'); const td = require('testdouble'); diff --git a/tests/unit/commands/new-test.js b/tests/unit/commands/new-test.js index f2ba9d8e32..38bf268055 100644 --- a/tests/unit/commands/new-test.js +++ b/tests/unit/commands/new-test.js @@ -4,7 +4,6 @@ const expect = require('../../chai').expect; const map = require('ember-cli-lodash-subset').map; const commandOptions = require('../../factories/command-options'); const NewCommand = require('../../../lib/commands/new'); -const Promise = require('rsvp').Promise; const Blueprint = require('../../../lib/models/blueprint'); const Command = require('../../../lib/models/command'); const Task = require('../../../lib/models/task'); diff --git a/tests/unit/commands/serve-test.js b/tests/unit/commands/serve-test.js index f6ede2b3fe..6248deb7e4 100644 --- a/tests/unit/commands/serve-test.js +++ b/tests/unit/commands/serve-test.js @@ -4,12 +4,11 @@ const expect = require('../../chai').expect; const EOL = require('os').EOL; const commandOptions = require('../../factories/command-options'); const Task = require('../../../lib/models/task'); -const RSVP = require('rsvp'); +const util = require('util'); const td = require('testdouble'); const PortFinder = require('portfinder'); -const Promise = RSVP.Promise; -const getPort = RSVP.denodeify(PortFinder.getPort); +const getPort = util.promisify(PortFinder.getPort); const ServeCommand = require('../../../lib/commands/serve'); diff --git a/tests/unit/commands/test-test.js b/tests/unit/commands/test-test.js index 48a2a8b284..7ad1c73cfa 100644 --- a/tests/unit/commands/test-test.js +++ b/tests/unit/commands/test-test.js @@ -5,7 +5,6 @@ const CoreObject = require('core-object'); const expect = require('../../chai').expect; const MockProject = require('../../helpers/mock-project'); const commandOptions = require('../../factories/command-options'); -const Promise = require('rsvp').Promise; const Task = require('../../../lib/models/task'); const TestCommand = require('../../../lib/commands/test'); const td = require('testdouble'); diff --git a/tests/unit/models/addon-test.js b/tests/unit/models/addon-test.js index 34bd73f023..5b39b6dfa1 100644 --- a/tests/unit/models/addon-test.js +++ b/tests/unit/models/addon-test.js @@ -4,9 +4,7 @@ const fs = require('fs-extra'); const path = require('path'); const Project = require('../../../lib/models/project'); const Addon = require('../../../lib/models/addon'); -const RSVP = require('rsvp'); const expect = require('chai').expect; -let remove = RSVP.denodeify(fs.remove); const findWhere = require('ember-cli-lodash-subset').find; const MockUI = require('console-ui/mock'); const MockCLI = require('../../helpers/mock-cli'); @@ -514,7 +512,7 @@ describe('models/addon.js', function() { }); afterEach(function() { - return remove(tmproot); + return fs.remove(tmproot); }); it('returns undefined if the `blueprint` folder does not exist', function() { diff --git a/tests/unit/models/asset-size-printer-test.js b/tests/unit/models/asset-size-printer-test.js index c447a6a421..ef97dd3864 100644 --- a/tests/unit/models/asset-size-printer-test.js +++ b/tests/unit/models/asset-size-printer-test.js @@ -3,16 +3,12 @@ const expect = require('chai').expect; const MockUi = require('console-ui/mock'); const AssetSizePrinter = require('../../../lib/models/asset-size-printer'); -const RSVP = require('rsvp'); const path = require('path'); const fs = require('fs-extra'); let root = process.cwd(); const mkTmpDirIn = require('../../../lib/utilities/mk-tmp-dir-in'); let tmpRoot = path.join(root, 'tmp'); -const Promise = RSVP.Promise; -const remove = RSVP.denodeify(fs.remove); - const chai = require('chai'); const chaiAsPromised = require('chai-as-promised'); @@ -54,7 +50,7 @@ describe('models/asset-size-printer', function() { }); afterEach(function() { - return Promise.all([remove(storedTmpDir)]); + return fs.remove(storedTmpDir); }); it('prints human-readable file sizes (including gzipped sizes) of css and js files in the output path', function() { diff --git a/tests/unit/models/builder-test.js b/tests/unit/models/builder-test.js index 2d85e76eda..15ef92154a 100644 --- a/tests/unit/models/builder-test.js +++ b/tests/unit/models/builder-test.js @@ -4,7 +4,6 @@ const fs = require('fs-extra'); const path = require('path'); const BuildCommand = require('../../../lib/commands/build'); const commandOptions = require('../../factories/command-options'); -const RSVP = require('rsvp'); const rimraf = require('rimraf'); const fixturify = require('fixturify'); const MockProject = require('../../helpers/mock-project'); @@ -20,9 +19,6 @@ let tmproot = path.join(root, 'tmp'); let Builder; -const Promise = RSVP.Promise; -const remove = RSVP.denodeify(fs.remove); - describe('models/builder.js', function() { let addon, builder, buildResults, tmpdir; @@ -71,7 +67,7 @@ describe('models/builder.js', function() { }); afterEach(function() { - return remove(tmproot); + return fs.remove(tmproot); }); (ci.APPVEYOR ? it.skip : it)('allows for non-existent output-paths at arbitrary depth', function() { diff --git a/tests/unit/models/command-test.js b/tests/unit/models/command-test.js index 30f566c030..fb6b4c97cd 100644 --- a/tests/unit/models/command-test.js +++ b/tests/unit/models/command-test.js @@ -7,8 +7,6 @@ const Yam = require('yam'); const EOL = require('os').EOL; const td = require('testdouble'); const ci = require('ci-info'); -const RSVP = require('rsvp'); -const Promise = RSVP.Promise; let Task = require('../../../lib/models/task'); let Command = require('../../../lib/models/command'); diff --git a/tests/unit/models/file-info-test.js b/tests/unit/models/file-info-test.js index 5fa1835c87..b6d0896dd1 100644 --- a/tests/unit/models/file-info-test.js +++ b/tests/unit/models/file-info-test.js @@ -6,13 +6,9 @@ const FileInfo = require('../../../lib/models/file-info'); const path = require('path'); const fs = require('fs-extra'); const EOL = require('os').EOL; -const RSVP = require('rsvp'); const mkTmpDirIn = require('../../../lib/utilities/mk-tmp-dir-in'); const td = require('testdouble'); -const Promise = RSVP.Promise; -const writeFile = RSVP.denodeify(fs.writeFile); - let root = process.cwd(); let tmproot = path.join(root, 'tmp'); @@ -124,7 +120,8 @@ describe('Unit - FileInfo', function() { validOptions.templateVariables.friend = 'Billy'; let fileInfo = new FileInfo(validOptions); - return writeFile(testOutputPath, `Something Old${EOL}`) + return fs + .writeFile(testOutputPath, `Something Old${EOL}`) .then(function() { return fileInfo.displayDiff(); }) diff --git a/tests/unit/tasks/addon-install-test.js b/tests/unit/tasks/addon-install-test.js index 27287741fe..06b0836cc9 100644 --- a/tests/unit/tasks/addon-install-test.js +++ b/tests/unit/tasks/addon-install-test.js @@ -3,7 +3,6 @@ const AddonInstallTask = require('../../../lib/tasks/addon-install'); const expect = require('chai').expect; const CoreObject = require('core-object'); -const Promise = require('rsvp').Promise; describe('addon install task', function() { let ui; diff --git a/tests/unit/tasks/server/express-server-test.js b/tests/unit/tasks/server/express-server-test.js index 88996bab7b..6b3a74ce30 100644 --- a/tests/unit/tasks/server/express-server-test.js +++ b/tests/unit/tasks/server/express-server-test.js @@ -2,7 +2,6 @@ const expect = require('../../../chai').expect; const ExpressServer = require('../../../../lib/tasks/server/express-server'); -const Promise = require('rsvp').Promise; const MockUI = require('console-ui/mock'); const MockProject = require('../../../helpers/mock-project'); const MockWatcher = require('../../../helpers/mock-watcher'); diff --git a/tests/unit/tasks/server/middleware/tests-server-test.js b/tests/unit/tasks/server/middleware/tests-server-test.js index 6ec4e1dd43..582ec84a1d 100644 --- a/tests/unit/tasks/server/middleware/tests-server-test.js +++ b/tests/unit/tasks/server/middleware/tests-server-test.js @@ -2,7 +2,6 @@ const expect = require('chai').expect; const TestsServerAddon = require('../../../../../lib/tasks/server/middleware/tests-server'); -const Promise = require('rsvp').Promise; describe('TestServerAddon', function() { describe('.serverMiddleware', function() { diff --git a/yarn.lock b/yarn.lock index 29ee794dcd..cafb5871ce 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5336,7 +5336,12 @@ promise-map-series@^0.3.0: resolved "https://registry.yarnpkg.com/promise-map-series/-/promise-map-series-0.3.0.tgz#41873ca3652bb7a042b387d538552da9b576f8a1" integrity sha512-3npG2NGhTc8BWBolLLf8l/92OxMGaRLbqvIh9wjCHhDXNvk4zsxaTaCpiCunW09qWPrN2zeNSNwRLVBrQQtutA== -promise.prototype.finally@^3.1.0, promise.prototype.finally@^3.1.2: +promise.hash.helper@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/promise.hash.helper/-/promise.hash.helper-1.0.2.tgz#bd22410ff0d8bc9585ad4ab6e584d64a16c8154f" + integrity sha512-ei8fgXZIibwzyQ/7S9pssslC4VFHIBrem5KJ+Fq0qY4EMQVB1BeDXM0h7DGgH8EKI4oHF97iYpBHj2NpTfSE4g== + +promise.prototype.finally@^3.1.0: version "3.1.2" resolved "https://registry.yarnpkg.com/promise.prototype.finally/-/promise.prototype.finally-3.1.2.tgz#b8af89160c9c673cefe3b4c4435b53cfd0287067" integrity sha512-A2HuJWl2opDH0EafgdjwEw7HysI8ff/n4lW4QEVBCUXFk9QeGecBWv0Deph0UmLe3tTNYegz8MOjsVuE6SMoJA== From a338837a5807d5d3b7d6828759052a8d8dcf7d4b Mon Sep 17 00:00:00 2001 From: Sivakumar Kailasam Date: Fri, 14 Feb 2020 11:57:09 -0500 Subject: [PATCH 212/818] Build docs before publishing tarball --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 374e087149..f0f1a2ca17 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "scripts": { "docs": "yuidoc", "lint": "eslint . --cache", + "prepack": "yarn docs", "test": "node tests/runner", "test:all": "node tests/runner all", "test:cover": "nyc node tests/runner all", From 01ffbc914a15cfd5cb68ec514d18c63d93080d09 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sat, 15 Feb 2020 13:15:21 -0500 Subject: [PATCH 213/818] Refactor Blueprint model to avoid floating promises in `_process`. The conversion for `RSVP.map` was done incorrectly leading to promises that were floated (not immediately entangled in the resulting promise chain). --- lib/models/blueprint.js | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/lib/models/blueprint.js b/lib/models/blueprint.js index 401f4866a5..defa47b7fb 100644 --- a/lib/models/blueprint.js +++ b/lib/models/blueprint.js @@ -417,21 +417,22 @@ let Blueprint = CoreObject.extend({ @param {Function} process @param {Function} afterHook */ - _process(options, beforeHook, process, afterHook) { + async _process(options, beforeHook, process, afterHook) { let intoDir = options.target; - return this._locals(options).then(locals => - Promise.resolve() - .then(beforeHook.bind(this, options, locals)) - .then(process.bind(this, intoDir, locals)) - .then(async promises => { - let values = await Promise.all(promises); - let commitPromises = values.map(this._commit.bind(this)); - - return Promise.all(commitPromises); - }) - .then(afterHook.bind(this, options)) - ); + let locals = await this._locals(options); + + // run beforeInstall/beforeUninstall userland hooks + await beforeHook.call(this, options, locals); + + // gather fileInfos to be processed + let fileInfos = await process.call(this, intoDir, locals); + + // commit changes for each FileInfo (with prompting as needed) + await Promise.all(fileInfos.map(fi => this._commit(fi))); + + // run afterInstall/afterUninstall userland hooks + await afterHook.call(this, options); }, /** @@ -738,6 +739,7 @@ let Blueprint = CoreObject.extend({ @method processFiles @param {String} intoDir @param {Object} templateVariables + @return {Promise} */ processFiles(intoDir, templateVariables) { let files = this._getFilesForInstall(templateVariables.targetFiles); From 1fc48ff6c7ff4aa1142d2bac3fc057c9cd6b7f59 Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Sun, 16 Feb 2020 20:11:00 +0000 Subject: [PATCH 214/818] add final newline in CONTRIBUTING.md to match other .md files and the .editorconfig --- blueprints/addon/files/CONTRIBUTING.md | 2 +- tests/fixtures/addon/npm/CONTRIBUTING.md | 2 +- tests/fixtures/addon/yarn/CONTRIBUTING.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/blueprints/addon/files/CONTRIBUTING.md b/blueprints/addon/files/CONTRIBUTING.md index 7a36e49be8..97d3493600 100644 --- a/blueprints/addon/files/CONTRIBUTING.md +++ b/blueprints/addon/files/CONTRIBUTING.md @@ -23,4 +23,4 @@ * `ember serve` * Visit the dummy application at [http://localhost:4200](http://localhost:4200). -For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/). \ No newline at end of file +For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/). diff --git a/tests/fixtures/addon/npm/CONTRIBUTING.md b/tests/fixtures/addon/npm/CONTRIBUTING.md index 8fc5b869d6..9dc619ac43 100644 --- a/tests/fixtures/addon/npm/CONTRIBUTING.md +++ b/tests/fixtures/addon/npm/CONTRIBUTING.md @@ -23,4 +23,4 @@ * `ember serve` * Visit the dummy application at [http://localhost:4200](http://localhost:4200). -For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/). \ No newline at end of file +For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/). diff --git a/tests/fixtures/addon/yarn/CONTRIBUTING.md b/tests/fixtures/addon/yarn/CONTRIBUTING.md index 59e532958a..249926e03b 100644 --- a/tests/fixtures/addon/yarn/CONTRIBUTING.md +++ b/tests/fixtures/addon/yarn/CONTRIBUTING.md @@ -23,4 +23,4 @@ * `ember serve` * Visit the dummy application at [http://localhost:4200](http://localhost:4200). -For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/). \ No newline at end of file +For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/). From 97fced2b6d5d105cd7e076d8ce2456d8ad56ff69 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 17 Feb 2020 05:34:10 +0000 Subject: [PATCH 215/818] Bump configstore from 5.0.0 to 5.0.1 (#9047) --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 4090899b3f..768b39371b 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "ci-info": "^2.0.0", "clean-base-url": "^1.0.0", "compression": "^1.7.4", - "configstore": "^5.0.0", + "configstore": "^5.0.1", "console-ui": "^3.1.1", "core-object": "^3.1.5", "dag-map": "^2.0.2", diff --git a/yarn.lock b/yarn.lock index b6949f6f3d..a2ae85699e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1574,12 +1574,12 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -configstore@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/configstore/-/configstore-5.0.0.tgz#37de662c7a49b5fe8dbcf8f6f5818d2d81ed852b" - integrity sha512-eE/hvMs7qw7DlcB5JPRnthmrITuHMmACUJAp89v6PT6iOqzoLS7HRWhBtuHMlhNHo2AhUSA/3Dh1bKNJHcublQ== +configstore@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/configstore/-/configstore-5.0.1.tgz#d365021b5df4b98cdd187d6a3b0e3f6a7cc5ed96" + integrity sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA== dependencies: - dot-prop "^5.1.0" + dot-prop "^5.2.0" graceful-fs "^4.1.2" make-dir "^3.0.0" unique-string "^2.0.0" @@ -1921,10 +1921,10 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -dot-prop@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.1.0.tgz#bdd8c986a77b83e3fca524e53786df916cabbd8a" - integrity sha512-n1oC6NBF+KM9oVXtjmen4Yo7HyAVWV2UUl50dCYJdw2924K6dX9bf9TTTWaKtYlRn0FEtxG27KS80ayVLixxJA== +dot-prop@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.2.0.tgz#c34ecc29556dc45f1f4c22697b6f4904e0cc4fcb" + integrity sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A== dependencies: is-obj "^2.0.0" From cd1ec16edee246c8f012e152a18ad12388e11baf Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 17 Feb 2020 07:57:35 +0000 Subject: [PATCH 216/818] Bump resolve from 1.14.1 to 1.15.1 (#9048) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 768b39371b..a120afebbc 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "promise-map-series": "^0.3.0", "promise.hash.helper": "^1.0.2", "quick-temp": "^0.1.8", - "resolve": "^1.12.0", + "resolve": "^1.15.1", "resolve-package-path": "^2.0.0", "sane": "^4.1.0", "semver": "^6.3.0", diff --git a/yarn.lock b/yarn.lock index a2ae85699e..21df951610 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5638,10 +5638,10 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.3.2: - version "1.14.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.14.1.tgz#9e018c540fcf0c427d678b9931cbf45e984bcaff" - integrity sha512-fn5Wobh4cxbLzuHaE+nphztHy43/b++4M6SsGFC2gB8uYwf0C8LcarfCz1un7UTW8OFQg9iNjZ4xpcFVGebDPg== +resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.1, resolve@^1.13.1, resolve@^1.15.1, resolve@^1.3.2: + version "1.15.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8" + integrity sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w== dependencies: path-parse "^1.0.6" From 2d06e0cc61605b6289fab9fb09fcf7c988e5dd70 Mon Sep 17 00:00:00 2001 From: Cyrille David Date: Fri, 10 Jan 2020 10:06:08 +0100 Subject: [PATCH 217/818] Replace ember-cli-{eslint,template-lint} by eslint.. .. and ember-template-lint Implements RFC https://github.com/ember-cli/rfcs/pull/121 --- blueprints/app/files/package.json | 6 +++--- tests/fixtures/addon/npm/package.json | 4 ++-- tests/fixtures/addon/yarn/package.json | 4 ++-- tests/fixtures/app/npm/package.json | 4 ++-- tests/fixtures/app/yarn/package.json | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 2b6515787f..1bfd8a0f11 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -28,11 +28,9 @@ "ember-cli-app-version": "^3.2.0", "ember-cli-babel": "^7.17.2", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-eslint": "^5.1.0", "ember-cli-htmlbars": "^4.2.2", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", - "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", "ember-data": "~3.17.0-beta.0", "ember-export-application-global": "^2.0.1", @@ -41,8 +39,10 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", - "ember-source": "~3.17.0-beta.1<% if (welcome) { %>", + "ember-source": "~3.17.0-beta.1", + "ember-template-lint": "^2.0.0<% if (welcome) { %>", "ember-welcome-page": "^4.0.0<% } %>", + "eslint": "^6.8.0", "eslint-plugin-ember": "^7.7.2", "eslint-plugin-node": "^11.0.0", "loader.js": "^4.7.0", diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index 91afd7a6c9..94a6975163 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -33,10 +33,8 @@ "ember-auto-import": "^1.5.3", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-eslint": "^5.1.0", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", - "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", "ember-disable-prototype-extensions": "^1.1.3", "ember-export-application-global": "^2.0.1", @@ -46,7 +44,9 @@ "ember-resolver": "^7.0.0", "ember-source": "~3.17.0-beta.1", "ember-source-channel-url": "^2.0.1", + "ember-template-lint": "^2.0.0", "ember-try": "^1.4.0", + "eslint": "^6.8.0", "eslint-plugin-ember": "^7.7.2", "eslint-plugin-node": "^11.0.0", "loader.js": "^4.7.0", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index a68452d1fe..ad7a058c43 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -33,10 +33,8 @@ "ember-auto-import": "^1.5.3", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-eslint": "^5.1.0", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", - "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", "ember-disable-prototype-extensions": "^1.1.3", "ember-export-application-global": "^2.0.1", @@ -46,8 +44,10 @@ "ember-resolver": "^7.0.0", "ember-source": "~3.17.0-beta.1", "ember-source-channel-url": "^2.0.1", + "ember-template-lint": "^2.0.0", "ember-try": "^1.4.0", "ember-welcome-page": "^4.0.0", + "eslint": "^6.8.0", "eslint-plugin-ember": "^7.7.2", "eslint-plugin-node": "^11.0.0", "loader.js": "^4.7.0", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 1cd657de98..a252caadcc 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -28,11 +28,9 @@ "ember-cli-app-version": "^3.2.0", "ember-cli-babel": "^7.17.2", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-eslint": "^5.1.0", "ember-cli-htmlbars": "^4.2.2", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", - "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", "ember-data": "~3.17.0-beta.0", "ember-export-application-global": "^2.0.1", @@ -42,6 +40,8 @@ "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", "ember-source": "~3.17.0-beta.1", + "ember-template-lint": "^2.0.0", + "eslint": "^6.8.0", "eslint-plugin-ember": "^7.7.2", "eslint-plugin-node": "^11.0.0", "loader.js": "^4.7.0", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index d336b608c8..5e2efe83f9 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -28,11 +28,9 @@ "ember-cli-app-version": "^3.2.0", "ember-cli-babel": "^7.17.2", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-eslint": "^5.1.0", "ember-cli-htmlbars": "^4.2.2", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", - "ember-cli-template-lint": "^1.0.0-beta.3", "ember-cli-uglify": "^3.0.0", "ember-data": "~3.17.0-beta.0", "ember-export-application-global": "^2.0.1", @@ -42,7 +40,9 @@ "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", "ember-source": "~3.17.0-beta.1", + "ember-template-lint": "^2.0.0", "ember-welcome-page": "^4.0.0", + "eslint": "^6.8.0", "eslint-plugin-ember": "^7.7.2", "eslint-plugin-node": "^11.0.0", "loader.js": "^4.7.0", From c0c0da35c3fa8ba82e875d94cc73140048435d74 Mon Sep 17 00:00:00 2001 From: Cyrille David Date: Mon, 17 Feb 2020 18:01:41 +0100 Subject: [PATCH 218/818] Use ember-template-lint v1 As v2 is in beta at the moment --- blueprints/app/files/package.json | 2 +- tests/fixtures/addon/npm/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/npm/package.json | 2 +- tests/fixtures/app/yarn/package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 1bfd8a0f11..083e66a237 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -40,7 +40,7 @@ "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", "ember-source": "~3.17.0-beta.1", - "ember-template-lint": "^2.0.0<% if (welcome) { %>", + "ember-template-lint": "^1.13.2<% if (welcome) { %>", "ember-welcome-page": "^4.0.0<% } %>", "eslint": "^6.8.0", "eslint-plugin-ember": "^7.7.2", diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index 94a6975163..c2238071e8 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -44,7 +44,7 @@ "ember-resolver": "^7.0.0", "ember-source": "~3.17.0-beta.1", "ember-source-channel-url": "^2.0.1", - "ember-template-lint": "^2.0.0", + "ember-template-lint": "^1.13.2", "ember-try": "^1.4.0", "eslint": "^6.8.0", "eslint-plugin-ember": "^7.7.2", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index ad7a058c43..e02b3de81c 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -44,7 +44,7 @@ "ember-resolver": "^7.0.0", "ember-source": "~3.17.0-beta.1", "ember-source-channel-url": "^2.0.1", - "ember-template-lint": "^2.0.0", + "ember-template-lint": "^1.13.2", "ember-try": "^1.4.0", "ember-welcome-page": "^4.0.0", "eslint": "^6.8.0", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index a252caadcc..ab87b3c3b4 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -40,7 +40,7 @@ "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", "ember-source": "~3.17.0-beta.1", - "ember-template-lint": "^2.0.0", + "ember-template-lint": "^1.13.2", "eslint": "^6.8.0", "eslint-plugin-ember": "^7.7.2", "eslint-plugin-node": "^11.0.0", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 5e2efe83f9..00365bd40b 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -40,7 +40,7 @@ "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", "ember-source": "~3.17.0-beta.1", - "ember-template-lint": "^2.0.0", + "ember-template-lint": "^1.13.2", "ember-welcome-page": "^4.0.0", "eslint": "^6.8.0", "eslint-plugin-ember": "^7.7.2", From 6de31bf05cd443495afbf00d8c11eafa5dea5f5c Mon Sep 17 00:00:00 2001 From: Cyrille David Date: Mon, 17 Feb 2020 19:43:19 +0100 Subject: [PATCH 219/818] Update smoke test ESLint is not run anymore by the command `ember test` in a brand new app (or addon). Indeed, ember-cli-eslint is gone now. --- tests/acceptance/smoke-test-slow.js | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/acceptance/smoke-test-slow.js b/tests/acceptance/smoke-test-slow.js index 3dd6245b10..684b6b61a7 100644 --- a/tests/acceptance/smoke-test-slow.js +++ b/tests/acceptance/smoke-test-slow.js @@ -139,7 +139,6 @@ describe('Acceptance: smoke-test', function() { let output = result.output.join(EOL); expect(exitCode).to.equal(0, 'exit code should be 0 for passing tests'); - expect(output).to.match(/ESLint/, 'ESLint should be run on production assets'); expect(output).to.match(/fail\s+0/, 'no failures'); expect(output).to.match(/pass\s+\d+/, 'many passing'); }); From 3c7dbed10a4d35283d84079da06de07223f15b53 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2020 04:48:16 +0000 Subject: [PATCH 220/818] Bump @babel/core from 7.7.7 to 7.8.4 (#9051) --- package.json | 2 +- yarn.lock | 163 +++++++++++++++++++++++++++------------------------ 2 files changed, 89 insertions(+), 76 deletions(-) diff --git a/package.json b/package.json index a120afebbc..7a94e916e0 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "test:debug": "node debug tests/runner" }, "dependencies": { - "@babel/core": "^7.7.7", + "@babel/core": "^7.8.4", "@babel/plugin-transform-modules-amd": "^7.7.5", "amd-name-resolver": "^1.3.1", "babel-plugin-module-resolver": "^4.0.0", diff --git a/yarn.lock b/yarn.lock index 21df951610..70ea6c04e0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,58 +2,59 @@ # yarn lockfile v1 -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.5.5": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d" - integrity sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw== - dependencies: - "@babel/highlight" "^7.0.0" - -"@babel/core@^7.3.3", "@babel/core@^7.3.4", "@babel/core@^7.7.7": - version "7.7.7" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.7.7.tgz#ee155d2e12300bcc0cff6a8ad46f2af5063803e9" - integrity sha512-jlSjuj/7z138NLZALxVgrx13AOtqip42ATZP7+kYl53GvDV6+4dCek1mVUo8z8c8Xnw/mx2q3d9HWh3griuesQ== - dependencies: - "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.7.7" - "@babel/helpers" "^7.7.4" - "@babel/parser" "^7.7.7" - "@babel/template" "^7.7.4" - "@babel/traverse" "^7.7.4" - "@babel/types" "^7.7.4" +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e" + integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g== + dependencies: + "@babel/highlight" "^7.8.3" + +"@babel/core@^7.3.3", "@babel/core@^7.3.4", "@babel/core@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.4.tgz#d496799e5c12195b3602d0fddd77294e3e38e80e" + integrity sha512-0LiLrB2PwrVI+a2/IEskBopDYSd8BCb3rOvH7D5tzoWd696TBEduBvuLVm4Nx6rltrLZqvI3MCalB2K2aVzQjA== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/generator" "^7.8.4" + "@babel/helpers" "^7.8.4" + "@babel/parser" "^7.8.4" + "@babel/template" "^7.8.3" + "@babel/traverse" "^7.8.4" + "@babel/types" "^7.8.3" convert-source-map "^1.7.0" debug "^4.1.0" + gensync "^1.0.0-beta.1" json5 "^2.1.0" lodash "^4.17.13" resolve "^1.3.2" semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.4.0", "@babel/generator@^7.7.4", "@babel/generator@^7.7.7": - version "7.7.7" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.7.7.tgz#859ac733c44c74148e1a72980a64ec84b85f4f45" - integrity sha512-/AOIBpHh/JU1l0ZFS4kiRCBnLi6OTHzh0RPk3h9isBxkkqELtQNFi1Vr/tiG9p1yfoUdKVwISuXWQR+hwwM4VQ== +"@babel/generator@^7.4.0", "@babel/generator@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.4.tgz#35bbc74486956fe4251829f9f6c48330e8d0985e" + integrity sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA== dependencies: - "@babel/types" "^7.7.4" + "@babel/types" "^7.8.3" jsesc "^2.5.1" lodash "^4.17.13" source-map "^0.5.0" -"@babel/helper-function-name@^7.7.4": - version "7.7.4" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.7.4.tgz#ab6e041e7135d436d8f0a3eca15de5b67a341a2e" - integrity sha512-AnkGIdiBhEuiwdoMnKm7jfPfqItZhgRaZfMg1XX3bS25INOnLPjPG1Ppnajh8eqgt5kPJnfqrRHqFqmjKDZLzQ== +"@babel/helper-function-name@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz#eeeb665a01b1f11068e9fb86ad56a1cb1a824cca" + integrity sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA== dependencies: - "@babel/helper-get-function-arity" "^7.7.4" - "@babel/template" "^7.7.4" - "@babel/types" "^7.7.4" + "@babel/helper-get-function-arity" "^7.8.3" + "@babel/template" "^7.8.3" + "@babel/types" "^7.8.3" -"@babel/helper-get-function-arity@^7.7.4": - version "7.7.4" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz#cb46348d2f8808e632f0ab048172130e636005f0" - integrity sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA== +"@babel/helper-get-function-arity@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz#b894b947bd004381ce63ea1db9f08547e920abd5" + integrity sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA== dependencies: - "@babel/types" "^7.7.4" + "@babel/types" "^7.8.3" "@babel/helper-module-imports@^7.7.4": version "7.7.4" @@ -94,28 +95,35 @@ dependencies: "@babel/types" "^7.7.4" -"@babel/helpers@^7.7.4": - version "7.7.4" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.7.4.tgz#62c215b9e6c712dadc15a9a0dcab76c92a940302" - integrity sha512-ak5NGZGJ6LV85Q1Zc9gn2n+ayXOizryhjSUBTdu5ih1tlVCJeuQENzc4ItyCVhINVXvIT/ZQ4mheGIsfBkpskg== +"@babel/helper-split-export-declaration@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz#31a9f30070f91368a7182cf05f831781065fc7a9" + integrity sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA== dependencies: - "@babel/template" "^7.7.4" - "@babel/traverse" "^7.7.4" - "@babel/types" "^7.7.4" + "@babel/types" "^7.8.3" -"@babel/highlight@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4" - integrity sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw== +"@babel/helpers@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.8.4.tgz#754eb3ee727c165e0a240d6c207de7c455f36f73" + integrity sha512-VPbe7wcQ4chu4TDQjimHv/5tj73qz88o12EPkO2ValS2QiQS/1F2SsjyIGNnAD0vF/nZS6Cf9i+vW6HIlnaR8w== + dependencies: + "@babel/template" "^7.8.3" + "@babel/traverse" "^7.8.4" + "@babel/types" "^7.8.3" + +"@babel/highlight@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.8.3.tgz#28f173d04223eaaa59bc1d439a3836e6d1265797" + integrity sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg== dependencies: chalk "^2.0.0" esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.4.3", "@babel/parser@^7.7.4", "@babel/parser@^7.7.7": - version "7.7.7" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.7.7.tgz#1b886595419cf92d811316d5b715a53ff38b4937" - integrity sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw== +"@babel/parser@^7.4.3", "@babel/parser@^7.8.3", "@babel/parser@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.4.tgz#d1dbe64691d60358a974295fa53da074dd2ce8e8" + integrity sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw== "@babel/plugin-transform-modules-amd@^7.7.5": version "7.7.5" @@ -134,34 +142,34 @@ core-js "^2.6.5" regenerator-runtime "^0.13.2" -"@babel/template@^7.4.0", "@babel/template@^7.7.4": - version "7.7.4" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.7.4.tgz#428a7d9eecffe27deac0a98e23bf8e3675d2a77b" - integrity sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.7.4" - "@babel/types" "^7.7.4" - -"@babel/traverse@^7.4.3", "@babel/traverse@^7.7.4": - version "7.7.4" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.7.4.tgz#9c1e7c60fb679fe4fcfaa42500833333c2058558" - integrity sha512-P1L58hQyupn8+ezVA2z5KBm4/Zr4lCC8dwKCMYzsa5jFMDMQAzaBNy9W5VjB+KAmBjb40U7a/H6ao+Xo+9saIw== - dependencies: - "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.7.4" - "@babel/helper-function-name" "^7.7.4" - "@babel/helper-split-export-declaration" "^7.7.4" - "@babel/parser" "^7.7.4" - "@babel/types" "^7.7.4" +"@babel/template@^7.4.0", "@babel/template@^7.7.4", "@babel/template@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.3.tgz#e02ad04fe262a657809327f578056ca15fd4d1b8" + integrity sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/parser" "^7.8.3" + "@babel/types" "^7.8.3" + +"@babel/traverse@^7.4.3", "@babel/traverse@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.4.tgz#f0845822365f9d5b0e312ed3959d3f827f869e3c" + integrity sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/generator" "^7.8.4" + "@babel/helper-function-name" "^7.8.3" + "@babel/helper-split-export-declaration" "^7.8.3" + "@babel/parser" "^7.8.4" + "@babel/types" "^7.8.3" debug "^4.1.0" globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.4.0", "@babel/types@^7.7.4": - version "7.7.4" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.7.4.tgz#516570d539e44ddf308c07569c258ff94fde9193" - integrity sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA== +"@babel/types@^7.4.0", "@babel/types@^7.7.4", "@babel/types@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.3.tgz#5a383dffa5416db1b73dedffd311ffd0788fb31c" + integrity sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg== dependencies: esutils "^2.0.2" lodash "^4.17.13" @@ -2911,6 +2919,11 @@ gauge@~2.7.3: strip-ansi "^3.0.1" wide-align "^1.1.0" +gensync@^1.0.0-beta.1: + version "1.0.0-beta.1" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" + integrity sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg== + get-caller-file@^2.0.1, get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" From 1e1a15f74f74fe7f7ad4abd68263b92287e140b1 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2020 05:36:01 +0000 Subject: [PATCH 221/818] Bump fixturify-project from 1.9.1 to 1.10.0 (#9052) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 7a94e916e0..1147a0fbda 100644 --- a/package.json +++ b/package.json @@ -142,7 +142,7 @@ "eslint-plugin-node": "^10.0.0", "eslint-plugin-prettier": "^3.1.2", "fixturify": "^1.2.0", - "fixturify-project": "^1.9.1", + "fixturify-project": "^1.10.0", "mocha": "^6.2.1", "nock": "^11.7.0", "nyc": "^14.1.0", diff --git a/yarn.lock b/yarn.lock index 70ea6c04e0..3995c0cfa3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2669,10 +2669,10 @@ fireworm@^0.7.0: lodash.flatten "^3.0.2" minimatch "^3.0.2" -fixturify-project@^1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/fixturify-project/-/fixturify-project-1.9.1.tgz#64cdf6fd763a8f8975170e1d9d3bbadea0778680" - integrity sha512-KyzFWPWMitlZFDrC6lluvr/UGkJg0ExucR5ubN9uLAHWsGmwghofA8CT5chFJCy5aMWx/SNxYpTygPKaZFERIg== +fixturify-project@^1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/fixturify-project/-/fixturify-project-1.10.0.tgz#091c452a9bb15f09b6b9cc7cf5c0ad559f1d9aad" + integrity sha512-L1k9uiBQuN0Yr8tA9Noy2VSQ0dfg0B8qMdvT7Wb5WQKc7f3dn3bzCbSrqlb+etLW+KDV4cBC7R1OvcMg3kcxmA== dependencies: fixturify "^1.2.0" tmp "^0.0.33" From 0d5c4fbd119f7cb8aab125c46d4a99b3161feb23 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2020 04:50:49 +0000 Subject: [PATCH 222/818] Bump eslint-plugin-mocha from 6.2.2 to 6.3.0 (#9053) --- package.json | 2 +- yarn.lock | 28 ++++++++++++++++++---------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 1147a0fbda..3b31844820 100644 --- a/package.json +++ b/package.json @@ -138,7 +138,7 @@ "eslint": "^5.16.0", "eslint-config-prettier": "^6.7.0", "eslint-plugin-chai-expect": "^2.1.0", - "eslint-plugin-mocha": "^6.2.2", + "eslint-plugin-mocha": "^6.3.0", "eslint-plugin-node": "^10.0.0", "eslint-plugin-prettier": "^3.1.2", "fixturify": "^1.2.0", diff --git a/yarn.lock b/yarn.lock index 3995c0cfa3..2de5083767 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2196,12 +2196,13 @@ eslint-plugin-es@^2.0.0: eslint-utils "^1.4.2" regexpp "^3.0.0" -eslint-plugin-mocha@^6.2.2: - version "6.2.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-6.2.2.tgz#6ef4b78bd12d744beb08a06e8209de330985100d" - integrity sha512-oNhPzfkT6Q6CJ0HMVJ2KLxEWG97VWGTmuHOoRcDLE0U88ugUyFNV9wrT2XIt5cGtqc5W9k38m4xTN34L09KhBA== +eslint-plugin-mocha@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-6.3.0.tgz#72bfd06a5c4323e17e30ef41cd726030e8cdb8fd" + integrity sha512-Cd2roo8caAyG21oKaaNTj7cqeYRWW1I2B5SfpKRp0Ip1gkfwoR1Ow0IGlPWnNjzywdF4n+kHL8/9vM6zCJUxdg== dependencies: - ramda "^0.26.1" + eslint-utils "^2.0.0" + ramda "^0.27.0" eslint-plugin-node@^10.0.0: version "10.0.0" @@ -2237,7 +2238,14 @@ eslint-utils@^1.3.1, eslint-utils@^1.4.2: dependencies: eslint-visitor-keys "^1.0.0" -eslint-visitor-keys@^1.0.0: +eslint-utils@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.0.0.tgz#7be1cc70f27a72a76cd14aa698bcabed6890e1cd" + integrity sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA== + dependencies: + eslint-visitor-keys "^1.1.0" + +eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== @@ -5440,10 +5448,10 @@ quick-temp@^0.1.2, quick-temp@^0.1.3, quick-temp@^0.1.5, quick-temp@^0.1.8: rimraf "^2.5.4" underscore.string "~3.3.4" -ramda@^0.26.1: - version "0.26.1" - resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.26.1.tgz#8d41351eb8111c55353617fc3bbffad8e4d35d06" - integrity sha512-hLWjpy7EnsDBb0p+Z3B7rPi3GDeRG5ZtiI33kJhTt+ORCd38AbAIjB/9zRIUoeTbE/AVX5ZkU7m6bznsvrf8eQ== +ramda@^0.27.0: + version "0.27.0" + resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.27.0.tgz#915dc29865c0800bf3f69b8fd6c279898b59de43" + integrity sha512-pVzZdDpWwWqEVVLshWUHjNwuVP7SfcmPraYuqocJp1yo2U1R7P+5QAfDhdItkuoGqIBnBYrtPp7rEPqDn9HlZA== range-parser@~1.2.1: version "1.2.1" From 489c0a0e05e3c9600ac589fc03214432c85ac169 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2020 05:38:37 +0000 Subject: [PATCH 223/818] Bump broccoli-babel-transpiler from 7.3.0 to 7.4.0 (#9054) --- package.json | 2 +- yarn.lock | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 3b31844820..7e17060875 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "bower-endpoint-parser": "0.2.2", "broccoli": "^3.2.0", "broccoli-amd-funnel": "^2.0.1", - "broccoli-babel-transpiler": "^7.3.0", + "broccoli-babel-transpiler": "^7.4.0", "broccoli-builder": "^0.18.14", "broccoli-concat": "^3.7.4", "broccoli-config-loader": "^1.0.1", diff --git a/yarn.lock b/yarn.lock index 2de5083767..c182bf7c2a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,7 +9,7 @@ dependencies: "@babel/highlight" "^7.8.3" -"@babel/core@^7.3.3", "@babel/core@^7.3.4", "@babel/core@^7.8.4": +"@babel/core@^7.3.4", "@babel/core@^7.8.3", "@babel/core@^7.8.4": version "7.8.4" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.4.tgz#d496799e5c12195b3602d0fddd77294e3e38e80e" integrity sha512-0LiLrB2PwrVI+a2/IEskBopDYSd8BCb3rOvH7D5tzoWd696TBEduBvuLVm4Nx6rltrLZqvI3MCalB2K2aVzQjA== @@ -134,10 +134,10 @@ "@babel/helper-plugin-utils" "^7.0.0" babel-plugin-dynamic-import-node "^2.3.0" -"@babel/polyfill@^7.0.0": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.4.4.tgz#78801cf3dbe657844eeabf31c1cae3828051e893" - integrity sha512-WlthFLfhQQhh+A2Gn5NSFl0Huxz36x86Jn+E9OW7ibK8edKPq+KLy4apM1yDpQ8kJOVi1OVjpP4vSDLdrI04dg== +"@babel/polyfill@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.8.3.tgz#2333fc2144a542a7c07da39502ceeeb3abe4debd" + integrity sha512-0QEgn2zkCzqGIkSWWAEmvxD7e00Nm9asTtQvi7HdlYvMhjy/J38V/1Y9ode0zEJeIuxAI0uftiAzqc7nVeWUGg== dependencies: core-js "^2.6.5" regenerator-runtime "^0.13.2" @@ -805,13 +805,13 @@ broccoli-amd-funnel@^2.0.1: broccoli-plugin "^1.3.0" symlink-or-copy "^1.2.0" -broccoli-babel-transpiler@^7.3.0: - version "7.3.0" - resolved "https://registry.yarnpkg.com/broccoli-babel-transpiler/-/broccoli-babel-transpiler-7.3.0.tgz#a0ad3a37dbf74469664bbca403d652070c2c1317" - integrity sha512-tsXNvDf3gp6g8rGkz234AhbaIRUsCdd6CM3ikfkJVB0EpC8ZAczGsFKTjENLy1etx4s7FkruW/QjI7Wfdhx6Ng== +broccoli-babel-transpiler@^7.4.0: + version "7.4.0" + resolved "https://registry.yarnpkg.com/broccoli-babel-transpiler/-/broccoli-babel-transpiler-7.4.0.tgz#f3069f0f77e8017aa17e1e757dfb4a30de044182" + integrity sha512-DzPXQr1C+zOgzXG40wqPjtjSSa6wRKb+Ls45Qtq7Pn+GxL3/jIvQOBZi0/irZ5dlYVbRMEZiUnaIBIOha2ygIw== dependencies: - "@babel/core" "^7.3.3" - "@babel/polyfill" "^7.0.0" + "@babel/core" "^7.8.3" + "@babel/polyfill" "^7.8.3" broccoli-funnel "^2.0.2" broccoli-merge-trees "^3.0.2" broccoli-persistent-filter "^2.2.1" From fa32b58118aeb4d433c3bf5faa1c074abcbf07cc Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sat, 22 Feb 2020 19:26:45 -0500 Subject: [PATCH 224/818] Update to ember-template-lint@2.0.0. --- blueprints/app/files/package.json | 2 +- tests/fixtures/addon/npm/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/npm/package.json | 2 +- tests/fixtures/app/yarn/package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 083e66a237..1bfd8a0f11 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -40,7 +40,7 @@ "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", "ember-source": "~3.17.0-beta.1", - "ember-template-lint": "^1.13.2<% if (welcome) { %>", + "ember-template-lint": "^2.0.0<% if (welcome) { %>", "ember-welcome-page": "^4.0.0<% } %>", "eslint": "^6.8.0", "eslint-plugin-ember": "^7.7.2", diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index c2238071e8..94a6975163 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -44,7 +44,7 @@ "ember-resolver": "^7.0.0", "ember-source": "~3.17.0-beta.1", "ember-source-channel-url": "^2.0.1", - "ember-template-lint": "^1.13.2", + "ember-template-lint": "^2.0.0", "ember-try": "^1.4.0", "eslint": "^6.8.0", "eslint-plugin-ember": "^7.7.2", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index e02b3de81c..ad7a058c43 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -44,7 +44,7 @@ "ember-resolver": "^7.0.0", "ember-source": "~3.17.0-beta.1", "ember-source-channel-url": "^2.0.1", - "ember-template-lint": "^1.13.2", + "ember-template-lint": "^2.0.0", "ember-try": "^1.4.0", "ember-welcome-page": "^4.0.0", "eslint": "^6.8.0", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index ab87b3c3b4..a252caadcc 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -40,7 +40,7 @@ "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", "ember-source": "~3.17.0-beta.1", - "ember-template-lint": "^1.13.2", + "ember-template-lint": "^2.0.0", "eslint": "^6.8.0", "eslint-plugin-ember": "^7.7.2", "eslint-plugin-node": "^11.0.0", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 00365bd40b..5e2efe83f9 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -40,7 +40,7 @@ "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", "ember-source": "~3.17.0-beta.1", - "ember-template-lint": "^1.13.2", + "ember-template-lint": "^2.0.0", "ember-welcome-page": "^4.0.0", "eslint": "^6.8.0", "eslint-plugin-ember": "^7.7.2", From a3bb2377e6890f1ea9b4a0a4f6d286a056bef17c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 23 Feb 2020 01:37:30 +0000 Subject: [PATCH 225/818] Bump npm-package-arg from 6.1.1 to 8.0.0 (#9046) --- package.json | 2 +- yarn.lock | 38 +++++++++++++++++++++++++++++++------- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 7e17060875..342a8cb829 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ "minimatch": "^3.0.4", "morgan": "^1.9.1", "nopt": "^3.0.6", - "npm-package-arg": "^6.1.1", + "npm-package-arg": "^8.0.0", "p-defer": "^3.0.0", "portfinder": "^1.0.25", "promise-map-series": "^0.3.0", diff --git a/yarn.lock b/yarn.lock index c182bf7c2a..e06fc39cd6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3289,11 +3289,18 @@ homedir-polyfill@^1.0.1: dependencies: parse-passwd "^1.0.0" -hosted-git-info@^2.1.4, hosted-git-info@^2.7.1: +hosted-git-info@^2.1.4: version "2.8.4" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.4.tgz#44119abaf4bc64692a16ace34700fed9c03e2546" integrity sha512-pzXIvANXEFrc5oFFXRMkbLPQ2rXRoDERwDLyrcUxGhaZhgP54BBSl9Oheh7Vv0T090cszWBxPjkQQ5Sq1PbBRQ== +hosted-git-info@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-3.0.2.tgz#8b7e3bd114b59b51786f8bade0f39ddc80275a97" + integrity sha512-ezZMWtHXm7Eb7Rq4Mwnx2vs79WUx2QmRg3+ZqeGroKzfDO+EprOcgRPYghsOP9JuYBfK18VojmRTGCg8Ma+ktw== + dependencies: + lru-cache "^5.1.1" + http-cache-semantics@3.8.1: version "3.8.1" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" @@ -4387,6 +4394,13 @@ lru-cache@^4.0.1: pseudomap "^1.0.2" yallist "^2.1.2" +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + macos-release@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.2.0.tgz#ab58d55dd4714f0a05ad4b0e90f4370fef5cdea8" @@ -4852,14 +4866,14 @@ normalize-url@2.0.1: query-string "^5.0.1" sort-keys "^2.0.0" -npm-package-arg@^6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.1.tgz#02168cb0a49a2b75bf988a28698de7b529df5cb7" - integrity sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg== +npm-package-arg@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-8.0.0.tgz#b519989b569efffa1fa050fb22a3c3c322d4bcc5" + integrity sha512-JgqZHCEUKvhX7EehLNdySiuB227a0QYra9wpZOkW+jvwsRYKkce7y5Rv2axkxScJU1EP+L32jT2PLhQz7IWHlw== dependencies: - hosted-git-info "^2.7.1" + hosted-git-info "^3.0.2" osenv "^0.1.5" - semver "^5.6.0" + semver "^7.0.0" validate-npm-package-name "^3.0.0" npm-run-path@^2.0.0: @@ -5786,6 +5800,11 @@ semver@^6.0.0, semver@^6.1.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +semver@^7.0.0: + version "7.1.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.1.3.tgz#e4345ce73071c53f336445cfc19efb1c311df2a6" + integrity sha512-ekM0zfiA9SCBlsKa2X1hxyxiI4L3B6EbVJkkdgQXnSEEaHlGdvyodMruTiulSRWMMB4NeIuYNMC9rTKTz97GxA== + send@0.17.1: version "0.17.1" resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" @@ -7011,6 +7030,11 @@ yallist@^3.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== +yallist@^3.0.2: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + yam@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/yam/-/yam-1.0.0.tgz#7f6c91dc0f5de75a031e6da6b3907c3d25ab0de5" From 4bc79f8e567d84b98be0613259066b7ab58947a6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 23 Feb 2020 01:37:39 +0000 Subject: [PATCH 226/818] Bump markdown-it-terminal from 0.1.0 to 0.1.1 (#9049) --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 342a8cb829..7e59502af5 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "leek": "0.0.24", "lodash.template": "^4.5.0", "markdown-it": "^10.0.0", - "markdown-it-terminal": "0.1.0", + "markdown-it-terminal": "0.1.1", "minimatch": "^3.0.4", "morgan": "^1.9.1", "nopt": "^3.0.6", diff --git a/yarn.lock b/yarn.lock index e06fc39cd6..75a1d8efc2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4440,15 +4440,15 @@ map-visit@^1.0.0: dependencies: object-visit "^1.0.0" -markdown-it-terminal@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/markdown-it-terminal/-/markdown-it-terminal-0.1.0.tgz#545abd8dd01c3d62353bfcea71db580b51d22bd9" - integrity sha1-VFq9jdAcPWI1O/zqcdtYC1HSK9k= +markdown-it-terminal@0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/markdown-it-terminal/-/markdown-it-terminal-0.1.1.tgz#7665d28a97f6f7f61f8738304d409a8505620192" + integrity sha512-8v4pHGEh7eiw+UbD28PRyrpu+WrnRR/HefC6NRs+Ttbk1ZQoOY6ViMrkZcdO9Y+PoBsfxNsmiJZtG9BRHEGZ2A== dependencies: ansi-styles "^3.0.0" cardinal "^1.0.0" cli-table "^0.3.1" - lodash.merge "^4.6.0" + lodash.merge "^4.6.2" markdown-it "^8.3.1" markdown-it@^10.0.0: From 754504c43d2f212c35a0615fae01d891e049a6f6 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sat, 22 Feb 2020 19:37:48 -0500 Subject: [PATCH 227/818] Ensure `npm test` / `yarn test` fails when linting fails. As part of merging RFC#121 we collectively agreed that the normal Node ecosystem conventions should apply. This means that we **must** ensure that `npm test` (or `yarn test`) fails when we consider the repository to be in a "bad state". Prior to the changes proposed in the RFC, this was true (mostly :smiley: ) because ember-cli-eslint and ember-cli-template-lint would add errors to the `ember test` run. The pre-RFC121 setup fell down in a few (IMHO important and fatal) ways: * It was only possible to lint files that were part of the application build. This meant that issues in files in other directories (e.g. `index.js`, `ember-cli-build.js`, etc) would *not* fail `npm test` / `yarn test`. * For addon's, important compatibility tests (ember-try scenarios) were never ran. If an addon didn't use the generated `.travis.yml` setup they would _never_ have their compatibility tests ran :scream:. This commit does a few specific things to address the concerns above, and make it possible to deliver on the promises that we made in order to land RFC121: * Add a `lint` script to projects that runs both `lint:js` and `lint:hbs` (in parallel) aggregating the results. * Add a `test:ember` script that runs `ember test` (previously was the test script). * Change the `test` script to run `lint:js`, `lint:hbs`, and `test:ember` scripts * For addons, rename the `test:each` script to `test:ember-compatibility` (`test:each` seemed too ambiguous) and ensure `test` script runs this as well. * Simplify the `.travis.yml` configuration now that `npm test` actually does the right thing :smile_cat: --- blueprints/addon/files/.travis.yml | 7 +++---- blueprints/addon/index.js | 4 ++-- blueprints/app/files/.travis.yml | 2 -- blueprints/app/files/package.json | 5 ++++- tests/fixtures/addon/npm/.travis.yml | 7 +++---- tests/fixtures/addon/npm/package.json | 7 +++++-- tests/fixtures/addon/yarn/.travis.yml | 7 +++---- tests/fixtures/addon/yarn/package.json | 7 +++++-- tests/fixtures/app/npm/.travis.yml | 2 -- tests/fixtures/app/npm/package.json | 5 ++++- tests/fixtures/app/yarn/.travis.yml | 2 -- tests/fixtures/app/yarn/package.json | 5 ++++- tests/unit/blueprints/addon-test.js | 4 ++-- 13 files changed, 35 insertions(+), 29 deletions(-) diff --git a/blueprints/addon/files/.travis.yml b/blueprints/addon/files/.travis.yml index 73292278de..88bc3ef75a 100644 --- a/blueprints/addon/files/.travis.yml +++ b/blueprints/addon/files/.travis.yml @@ -38,9 +38,8 @@ jobs: - stage: "Tests" name: "Tests" script: - - <% if (yarn) { %>yarn<% } else { %>npm run<% } %> lint:hbs - - <% if (yarn) { %>yarn<% } else { %>npm run<% } %> lint:js - - <% if (yarn) { %>yarn<% } else { %>npm<% } %> test + - <% if (yarn) { %>yarn<% } else { %>npm run<% } %> lint + - <% if (yarn) { %>yarn<% } else { %>npm run<% } %> test:ember - stage: "Additional Tests" name: "Floating Dependencies" @@ -48,7 +47,7 @@ jobs: - yarn install --no-lockfile --non-interactive<% } else { %> - npm install --no-package-lock<% } %> script: - - <% if (yarn) { %>yarn<% } else { %>npm<% } %> test + - <% if (yarn) { %>yarn<% } else { %>npm run<% } %> test:ember # we recommend new addons test the current and previous LTS # as well as latest stable release (bonus points to beta/canary) diff --git a/blueprints/addon/index.js b/blueprints/addon/index.js index 678575dab1..2f29b686ec 100644 --- a/blueprints/addon/index.js +++ b/blueprints/addon/index.js @@ -80,8 +80,8 @@ module.exports = { // add ember-source-channel-url contents.devDependencies['ember-source-channel-url'] = '^2.0.1'; - // add `ember-try` as `test:all` script in addons - contents.scripts['test:all'] = 'ember try:each'; + // add `ember-compatibility` script in addons + contents.scripts['test:ember-compatibility'] = 'ember try:each'; contents['ember-addon'] = contents['ember-addon'] || {}; contents['ember-addon'].configPath = 'tests/dummy/config'; diff --git a/blueprints/app/files/.travis.yml b/blueprints/app/files/.travis.yml index 2079213f48..c4c79abdbc 100644 --- a/blueprints/app/files/.travis.yml +++ b/blueprints/app/files/.travis.yml @@ -32,6 +32,4 @@ install: - yarn install --non-interactive <% } %> script: - - <% if (yarn) { %>yarn<% } else { %>npm run<% } %> lint:hbs - - <% if (yarn) { %>yarn<% } else { %>npm run<% } %> lint:js - <% if (yarn) { %>yarn<% } else { %>npm<% } %> test diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 1bfd8a0f11..4485794f97 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -12,10 +12,12 @@ }, "scripts": { "build": "ember build --environment=production", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*", "lint:hbs": "ember-template-lint .", "lint:js": "eslint .", "start": "ember serve", - "test": "ember test" + "test": "npm-run-all lint:* test:*", + "test:ember": "ember test" }, "devDependencies": { "@ember/optional-features": "^1.3.0", @@ -46,6 +48,7 @@ "eslint-plugin-ember": "^7.7.2", "eslint-plugin-node": "^11.0.0", "loader.js": "^4.7.0", + "npm-run-all": "^4.1.5", "qunit-dom": "^1.0.0" }, "engines": { diff --git a/tests/fixtures/addon/npm/.travis.yml b/tests/fixtures/addon/npm/.travis.yml index b1b71a965d..8ddfaf16da 100644 --- a/tests/fixtures/addon/npm/.travis.yml +++ b/tests/fixtures/addon/npm/.travis.yml @@ -35,16 +35,15 @@ jobs: - stage: "Tests" name: "Tests" script: - - npm run lint:hbs - - npm run lint:js - - npm test + - npm run lint + - npm run test:ember - stage: "Additional Tests" name: "Floating Dependencies" install: - npm install --no-package-lock script: - - npm test + - npm run test:ember # we recommend new addons test the current and previous LTS # as well as latest stable release (bonus points to beta/canary) diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index 94a6975163..4ed84b9d46 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -14,11 +14,13 @@ }, "scripts": { "build": "ember build --environment=production", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*", "lint:hbs": "ember-template-lint .", "lint:js": "eslint .", "start": "ember serve", - "test": "ember test", - "test:all": "ember try:each" + "test": "npm-run-all lint:* test:*", + "test:ember": "ember test", + "test:ember-compatibility": "ember try:each" }, "dependencies": { "ember-cli-babel": "^7.17.2", @@ -50,6 +52,7 @@ "eslint-plugin-ember": "^7.7.2", "eslint-plugin-node": "^11.0.0", "loader.js": "^4.7.0", + "npm-run-all": "^4.1.5", "qunit-dom": "^1.0.0" }, "engines": { diff --git a/tests/fixtures/addon/yarn/.travis.yml b/tests/fixtures/addon/yarn/.travis.yml index f5df21049e..c6f3b9e9f9 100644 --- a/tests/fixtures/addon/yarn/.travis.yml +++ b/tests/fixtures/addon/yarn/.travis.yml @@ -34,16 +34,15 @@ jobs: - stage: "Tests" name: "Tests" script: - - yarn lint:hbs - - yarn lint:js - - yarn test + - yarn lint + - yarn test:ember - stage: "Additional Tests" name: "Floating Dependencies" install: - yarn install --no-lockfile --non-interactive script: - - yarn test + - yarn test:ember # we recommend new addons test the current and previous LTS # as well as latest stable release (bonus points to beta/canary) diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index ad7a058c43..87a41e544e 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -14,11 +14,13 @@ }, "scripts": { "build": "ember build --environment=production", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*", "lint:hbs": "ember-template-lint .", "lint:js": "eslint .", "start": "ember serve", - "test": "ember test", - "test:all": "ember try:each" + "test": "npm-run-all lint:* test:*", + "test:ember": "ember test", + "test:ember-compatibility": "ember try:each" }, "dependencies": { "ember-cli-babel": "^7.17.2", @@ -51,6 +53,7 @@ "eslint-plugin-ember": "^7.7.2", "eslint-plugin-node": "^11.0.0", "loader.js": "^4.7.0", + "npm-run-all": "^4.1.5", "qunit-dom": "^1.0.0" }, "engines": { diff --git a/tests/fixtures/app/npm/.travis.yml b/tests/fixtures/app/npm/.travis.yml index a0208ca37f..45bca26147 100644 --- a/tests/fixtures/app/npm/.travis.yml +++ b/tests/fixtures/app/npm/.travis.yml @@ -22,6 +22,4 @@ branches: - master script: - - npm run lint:hbs - - npm run lint:js - npm test diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index a252caadcc..a19fcbf1f7 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -12,10 +12,12 @@ }, "scripts": { "build": "ember build --environment=production", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*", "lint:hbs": "ember-template-lint .", "lint:js": "eslint .", "start": "ember serve", - "test": "ember test" + "test": "npm-run-all lint:* test:*", + "test:ember": "ember test" }, "devDependencies": { "@ember/optional-features": "^1.3.0", @@ -45,6 +47,7 @@ "eslint-plugin-ember": "^7.7.2", "eslint-plugin-node": "^11.0.0", "loader.js": "^4.7.0", + "npm-run-all": "^4.1.5", "qunit-dom": "^1.0.0" }, "engines": { diff --git a/tests/fixtures/app/yarn/.travis.yml b/tests/fixtures/app/yarn/.travis.yml index b1f2a2c3b8..31826e4a4e 100644 --- a/tests/fixtures/app/yarn/.travis.yml +++ b/tests/fixtures/app/yarn/.travis.yml @@ -28,6 +28,4 @@ install: - yarn install --non-interactive script: - - yarn lint:hbs - - yarn lint:js - yarn test diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 5e2efe83f9..ee8a04d7eb 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -12,10 +12,12 @@ }, "scripts": { "build": "ember build --environment=production", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*", "lint:hbs": "ember-template-lint .", "lint:js": "eslint .", "start": "ember serve", - "test": "ember test" + "test": "npm-run-all lint:* test:*", + "test:ember": "ember test" }, "devDependencies": { "@ember/optional-features": "^1.3.0", @@ -46,6 +48,7 @@ "eslint-plugin-ember": "^7.7.2", "eslint-plugin-node": "^11.0.0", "loader.js": "^4.7.0", + "npm-run-all": "^4.1.5", "qunit-dom": "^1.0.0" }, "engines": { diff --git a/tests/unit/blueprints/addon-test.js b/tests/unit/blueprints/addon-test.js index a4700ccfa4..b33570233e 100644 --- a/tests/unit/blueprints/addon-test.js +++ b/tests/unit/blueprints/addon-test.js @@ -76,7 +76,7 @@ describe('blueprint - addon', function() { "ember-addon"\n\ ],\n\ "scripts": {\n\ - "test:all": "ember try:each"\n\ + "test:ember-compatibility": "ember try:each"\n\ },\n\ "dependencies": {},\n\ "devDependencies": {\n\ @@ -172,7 +172,7 @@ describe('blueprint - addon', function() { ); let json = JSON.parse(output); - expect(json.scripts['test:all']).to.equal('ember try:each'); + expect(json.scripts['test:ember-compatibility']).to.equal('ember try:each'); }); it('overwrites `ember-addon.configPath`', function() { From 839d207b5ed6ffb7d8c6741f5885fe0dd28c1198 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 24 Feb 2020 21:25:22 -0500 Subject: [PATCH 228/818] Release v3.17.0-beta.1. --- CHANGELOG.md | 19 +++++++++++++++++++ package.json | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d504538b6b..378be92a00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # ember-cli Changelog +## v3.17.0-beta.1 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.16.0...v3.17.0-beta.1) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.16.0...v3.17.0-beta.1) + +#### Changelog + +- [#9037](https://github.com/ember-cli/ember-cli/pull/9037) Update Ember and Ember Data to 3.17 betas. [@rwjblue](https://github.com/rwjblue) +- [#9039](https://github.com/ember-cli/ember-cli/pull/9039) Remove long enabled EMBER_CLI_SYSTEM_TEMP experiment. [@rwjblue](https://github.com/rwjblue) +- [#9038](https://github.com/ember-cli/ember-cli/pull/9038) Remove EMBER_CLI_DELAYED_TRANSPILATION experiment. [@rwjblue](https://github.com/rwjblue) +- [#9040](https://github.com/ember-cli/ember-cli/pull/9040) Remove MODULE_UNIFICATION experiment. [@rwjblue](https://github.com/rwjblue) +- [#9009](https://github.com/ember-cli/ember-cli/pull/9009) Use `eslint` and `ember-template-lint` directly (no longer lint during builds/rebuilds by default) [@dcyriller](https://github.com/dcyriller) +- [#9041](https://github.com/ember-cli/ember-cli/pull/9041) Remove usage of RSVP. [@rwjblue](https://github.com/rwjblue) +- [#9042](https://github.com/ember-cli/ember-cli/pull/9042) Include API documentation `yuidoc` JSON output when publishing [@sivakumar-kailasam](https://github.com/sivakumar-kailasam) +- [#9045](https://github.com/ember-cli/ember-cli/pull/9045) Add final newline in CONTRIBUTING.md [@kellyselden](https://github.com/kellyselden) + +Thank you to all who took the time to contribute! ## v3.16.0 diff --git a/package.json b/package.json index 82c9dbd4b6..92be5e9843 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.16.0", + "version": "3.17.0-beta.1", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From 9c749b60f4b5b21f46e34f5c5b55af9771d2ed2a Mon Sep 17 00:00:00 2001 From: Julien Palmas Date: Tue, 25 Feb 2020 15:10:39 +0100 Subject: [PATCH 229/818] small typo --- lib/models/blueprint.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/models/blueprint.js b/lib/models/blueprint.js index defa47b7fb..f1aa61d460 100644 --- a/lib/models/blueprint.js +++ b/lib/models/blueprint.js @@ -162,7 +162,7 @@ const initialIgnoredFiles = ['.DS_Store']; ### beforeInstall & beforeUninstall Called before any of the template files are processed and receives - the the `options` and `locals` hashes as parameters. Typically used for + the `options` and `locals` hashes as parameters. Typically used for validating any additional command line options or for any asynchronous setup that is needed. As an example, the `controller` blueprint validates its `--type` option in this hook. If you need to run any asynchronous code, From 2ec95eb4cbb3d8e8a928ecdd5d9751bf1bc67b3c Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Wed, 26 Feb 2020 14:36:07 +0000 Subject: [PATCH 230/818] consistently 'use strict'; for our node js files right now some files have it and some don't --- blueprints/app/files/.eslintrc.js | 2 ++ blueprints/app/files/testem.js | 2 ++ tests/fixtures/addon/.eslintrc.js | 2 ++ tests/fixtures/app/.eslintrc.js | 2 ++ 4 files changed, 8 insertions(+) diff --git a/blueprints/app/files/.eslintrc.js b/blueprints/app/files/.eslintrc.js index 11921a10ba..351c1fb271 100644 --- a/blueprints/app/files/.eslintrc.js +++ b/blueprints/app/files/.eslintrc.js @@ -1,3 +1,5 @@ +'use strict'; + module.exports = { root: true, parser: 'babel-eslint', diff --git a/blueprints/app/files/testem.js b/blueprints/app/files/testem.js index 02423c6845..49f53feed6 100644 --- a/blueprints/app/files/testem.js +++ b/blueprints/app/files/testem.js @@ -1,3 +1,5 @@ +'use strict'; + module.exports = { test_page: 'tests/index.html?hidepassed', disable_watching: true, diff --git a/tests/fixtures/addon/.eslintrc.js b/tests/fixtures/addon/.eslintrc.js index c4b7c4129c..85a190092e 100644 --- a/tests/fixtures/addon/.eslintrc.js +++ b/tests/fixtures/addon/.eslintrc.js @@ -1,3 +1,5 @@ +'use strict'; + module.exports = { root: true, parser: 'babel-eslint', diff --git a/tests/fixtures/app/.eslintrc.js b/tests/fixtures/app/.eslintrc.js index f2fa7e537b..f3c9d4f26e 100644 --- a/tests/fixtures/app/.eslintrc.js +++ b/tests/fixtures/app/.eslintrc.js @@ -1,3 +1,5 @@ +'use strict'; + module.exports = { root: true, parser: 'babel-eslint', From bd8bba01fe2e53e8857f7d28a02ca41c31efea50 Mon Sep 17 00:00:00 2001 From: Domenic Santangelo Date: Thu, 27 Feb 2020 15:24:22 -0800 Subject: [PATCH 231/818] [minor] Adds link to CLI commands doc from README This adds a direct link to the basic CLI commands doc. Rationale: 1. The readme says, "You can call `ember --help` to find out more about all of the following commands..." but no command list follows. 2. From the project page/readme, it takes 3 clicks to find what the actual `ember-cli` commands are, one of which is hidden inside an accordion. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 17b4a30393..f97d411382 100644 --- a/README.md +++ b/README.md @@ -49,8 +49,8 @@ Usage After installation the `ember` CLI tool will be available to you. It is the entrypoint for all the functionality mentioned above. -You can call `ember --help` to find out more about all of the -following commands or visit to read +You can call `ember --help` to find out more about [all of the +following commands](https://cli.emberjs.com/release/basic-use/cli-commands/) or visit to read the in-depth documentation. From d564247a79409ccb70861a529267459e1a5b239d Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Thu, 27 Feb 2020 22:32:05 -0700 Subject: [PATCH 232/818] fail tests on unhandled rejections --- .github/workflows/ci.yml | 2 +- lib/tasks/addon-install.js | 2 +- .../middleware/history-support/index.js | 12 +-- .../server/middleware/tests-server/index.js | 76 +++++++++-------- lib/utilities/open-editor.js | 7 +- package.json | 8 +- tests/integration/models/blueprint-test.js | 54 ++++++------ tests/runner.js | 4 +- tests/unit/docs-lint-test.js | 82 +++++++++++-------- tests/unit/tasks/addon-install-test.js | 6 +- tests/unit/tasks/git-init-test.js | 1 - .../tasks/server/livereload-server-test.js | 43 +++++----- .../server/middleware/tests-server-test.js | 4 +- tests/unit/utilities/open-editor-test.js | 50 ++++++++--- 14 files changed, 206 insertions(+), 145 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0923e0f07..60edc33923 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,7 +71,7 @@ jobs: strategy: matrix: - node-version: [10.x, 12.x, 13.x] + node-version: [10.19, 12.x, 13.x] steps: - uses: actions/checkout@v1 diff --git a/lib/tasks/addon-install.js b/lib/tasks/addon-install.js index 993f5333c3..3cf631bf01 100644 --- a/lib/tasks/addon-install.js +++ b/lib/tasks/addon-install.js @@ -16,7 +16,7 @@ class AddonInstallTask extends Task { run(options) { const chalk = require('chalk'); let ui = this.ui; - let packageNames = options.packages; + let packageNames = options.packages || []; let blueprintOptions = options.blueprintOptions || {}; let commandOptions = blueprintOptions; diff --git a/lib/tasks/server/middleware/history-support/index.js b/lib/tasks/server/middleware/history-support/index.js index 6739075634..3d31dc14ad 100644 --- a/lib/tasks/server/middleware/history-support/index.js +++ b/lib/tasks/server/middleware/history-support/index.js @@ -47,11 +47,13 @@ class HistorySupportAddon { let baseURL = options.rootURL === '' ? '/' : cleanBaseURL(options.rootURL || options.baseURL); - app.use((req, res, next) => { - const results = watcher.then(results => { + app.use(async (req, _, next) => { + try { + const results = await watcher; if (this.shouldHandleRequest(req, options)) { let assetPath = req.path.slice(baseURL.length); let isFile = false; + try { isFile = fs.statSync(path.join(results.directory, assetPath)).isFile(); } catch (err) { @@ -61,9 +63,9 @@ class HistorySupportAddon { req.serveUrl = `${baseURL}index.html`; } } - }); - - Promise.resolve(results).finally(next); + } finally { + next(); + } }); } diff --git a/lib/tasks/server/middleware/tests-server/index.js b/lib/tasks/server/middleware/tests-server/index.js index bceef76987..5a87c6a848 100644 --- a/lib/tasks/server/middleware/tests-server/index.js +++ b/lib/tasks/server/middleware/tests-server/index.js @@ -5,7 +5,7 @@ const path = require('path'); const fs = require('fs'); const logger = require('heimdalljs-logger')('ember-cli:test-server'); -class TestsServerAddon { +module.exports = class TestsServerAddon { /** * This addon is used to serve the QUnit or Mocha test runner * at `baseURL + '/tests'`. @@ -26,44 +26,52 @@ class TestsServerAddon { let baseURL = options.rootURL === '' ? '/' : cleanBaseURL(options.rootURL || options.baseURL); let testsPath = `${baseURL}tests`; - app.use((req, res, next) => { - const results = watcher.then(results => { - let acceptHeaders = req.headers.accept || []; - let hasHTMLHeader = acceptHeaders.indexOf('text/html') !== -1; - let hasWildcardHeader = acceptHeaders.indexOf('*/*') !== -1; + app.use(async (req, _, next) => { + let results; + let watcherSuccess; - let isForTests = req.path.indexOf(testsPath) === 0; + try { + results = await watcher; + watcherSuccess = true; + } catch (e) { + watcherSuccess = false; + // the build has failed, the middleware can safely be skipped. + // build error reporting is handled by: + // 1. watcher production stderr + // 2. watcher-middleware serving the error page + } - logger.info('isForTests: %o', isForTests); + if (watcherSuccess) { + rewriteRequestUrlIfBasePageIsNeeded(req, testsPath, baseURL, results.directory); + } - if (isForTests && (hasHTMLHeader || hasWildcardHeader) && req.method === 'GET') { - let assetPath = req.path.slice(baseURL.length); - let filePath = path.join(results.directory, assetPath); + next(); - if (!fs.existsSync(filePath) || !fs.statSync(filePath).isFile()) { - // N.B., `baseURL` will end with a slash as it went through `cleanBaseURL` - let newURL = `${baseURL}tests/index.html`; + if (config.finally) { + config.finally(); + } + }); + } +}; - logger.info( - 'url: %s resolved to path: %s which is not a file. Assuming %s instead', - req.path, - filePath, - newURL - ); - req.url = newURL; - } - } - }); +function rewriteRequestUrlIfBasePageIsNeeded(req, testsPath, baseURL, directory) { + let acceptHeaders = req.headers.accept || []; + let hasHTMLHeader = acceptHeaders.indexOf('text/html') !== -1; + let hasWildcardHeader = acceptHeaders.indexOf('*/*') !== -1; - Promise.resolve(results) - .finally(next) - .finally(() => { - if (config.finally) { - config.finally(); - } - }); - }); + let isForTests = req.path.indexOf(testsPath) === 0; + + logger.info('isForTests: %o', isForTests); + + if (isForTests && (hasHTMLHeader || hasWildcardHeader) && req.method === 'GET') { + let assetPath = req.path.slice(baseURL.length); + let filePath = path.join(directory, assetPath); + + if (!fs.existsSync(filePath) || !fs.statSync(filePath).isFile()) { + // N.B., `baseURL` will end with a slash as it went through `cleanBaseURL` + let newURL = `${baseURL}tests/index.html`; + logger.info('url: %s resolved to path: %s which is not a file. Assuming %s instead', req.path, filePath, newURL); + req.url = newURL; + } } } - -module.exports = TestsServerAddon; diff --git a/lib/utilities/open-editor.js b/lib/utilities/open-editor.js index a7a7a5f7d7..2fa869fd56 100644 --- a/lib/utilities/open-editor.js +++ b/lib/utilities/open-editor.js @@ -13,14 +13,17 @@ function openEditor(file) { let editorArgs = openEditor._env().EDITOR.split(' '); let editor = editorArgs.shift(); - let editProcess = openEditor._spawn(editor, [file].concat(editorArgs), { stdio: 'inherit' }); + const args = [file].concat(editorArgs); + let editProcess = openEditor._spawn(editor, args, { stdio: 'inherit' }); return new Promise((resolve, reject) => { editProcess.on('close', code => { if (code === 0) { resolve(); } else { - reject(); + reject( + new Error(`Spawn('${editor}', [${args.join(',')}]) exited with a non zero error status code: '${code}'`) + ); } }); }); diff --git a/package.json b/package.json index 92be5e9843..832ca743bf 100644 --- a/package.json +++ b/package.json @@ -30,11 +30,11 @@ "docs": "yuidoc", "lint": "eslint . --cache", "prepack": "yarn docs", - "test": "node tests/runner", - "test:all": "node tests/runner all", + "test": "node --unhandled-rejections=strict tests/runner", + "test:all": "node --unhandled-rejections=strict tests/runner all", "test:cover": "nyc node tests/runner all", - "test:slow": "node tests/runner slow", - "test:debug": "node debug tests/runner" + "test:slow": "node --unhandled-rejections=strict tests/runner slow", + "test:debug": "node --unhandled-rejections=strict debug tests/runner" }, "dependencies": { "@babel/core": "^7.8.4", diff --git a/tests/integration/models/blueprint-test.js b/tests/integration/models/blueprint-test.js index 557002983f..9711a0fa26 100644 --- a/tests/integration/models/blueprint-test.js +++ b/tests/integration/models/blueprint-test.js @@ -12,7 +12,7 @@ const util = require('util'); const EOL = require('os').EOL; let root = process.cwd(); -let tmproot = path.join(root, 'tmp'); +let tempRoot = path.join(root, 'tmp'); const SilentError = require('silent-error'); const mkTmpDirIn = require('../../../lib/utilities/mk-tmp-dir-in'); const td = require('testdouble'); @@ -244,7 +244,7 @@ describe('Blueprint', function() { let tmpdir; beforeEach(async function() { - const dir = await mkTmpDirIn(tmproot); + const dir = await mkTmpDirIn(tempRoot); tmpdir = dir; blueprint = new InstrumentedBasicBlueprint(basicBlueprint); ui = new MockUI(); @@ -258,8 +258,8 @@ describe('Blueprint', function() { }; }); - afterEach(function() { - return remove(tmproot); + afterEach(async function() { + await remove(tempRoot); }); it('installs basic files', async function() { @@ -599,7 +599,7 @@ describe('Blueprint', function() { } beforeEach(async function() { - let dir = await mkTmpDirIn(tmproot); + let dir = await mkTmpDirIn(tempRoot); tmpdir = dir; blueprint = new BasicBlueprintClass(basicBlueprint); @@ -614,8 +614,8 @@ describe('Blueprint', function() { refreshUI(); }); - afterEach(function() { - return remove(tmproot); + afterEach(async function() { + await remove(tempRoot); }); it('uninstalls basic files', async function() { @@ -637,9 +637,7 @@ describe('Blueprint', function() { expect(actualFiles.length).to.equal(0); - fs.exists(path.join(tmpdir, 'test.txt'), function(exists) { - expect(exists).to.be.false; - }); + expect(fs.existsSync(path.join(tmpdir, 'test.txt'))).to.be.false; }); it("uninstall doesn't remove non-empty folders", async function() { @@ -683,7 +681,7 @@ describe('Blueprint', function() { } beforeEach(async function() { - let dir = await mkTmpDirIn(tmproot); + let dir = await mkTmpDirIn(tempRoot); tmpdir = dir; blueprint = new InstrumentedBasicBlueprint(basicBlueprint); project = new MockProject(); @@ -693,7 +691,7 @@ describe('Blueprint', function() { }; refreshUI(); await blueprint.install(options); - await resetCalled(); + resetCalled(); refreshUI(); }); @@ -752,8 +750,8 @@ describe('Blueprint', function() { }; }); - afterEach(function() { - return remove(tmproot); + afterEach(async function() { + await remove(tempRoot); }); it('looks up the `npm-install` task', function() { @@ -882,8 +880,8 @@ describe('Blueprint', function() { }; }); - afterEach(function() { - return remove(tmproot); + afterEach(async function() { + await remove(tempRoot); }); it('looks up the `npm-uninstall` task', function() { @@ -922,7 +920,7 @@ describe('Blueprint', function() { }); afterEach(function() { - return remove(tmproot); + return remove(tempRoot); }); it('looks up the `npm-uninstall` task', function() { @@ -1098,8 +1096,8 @@ describe('Blueprint', function() { }; }); - afterEach(function() { - return remove(tmproot); + afterEach(async function() { + await remove(tempRoot); }); it('passes a packages array for addBowerPackagesToProject', function() { @@ -1150,8 +1148,8 @@ describe('Blueprint', function() { }; }); - afterEach(function() { - return remove(tmproot); + afterEach(async function() { + await remove(tempRoot); }); it('looks up the `bower-install` task', function() { @@ -1244,8 +1242,8 @@ describe('Blueprint', function() { blueprint = new Blueprint(basicBlueprint); }); - afterEach(function() { - return remove(tmproot); + afterEach(async function() { + await remove(tempRoot); }); it('passes a packages array for addAddonsToProject', function() { @@ -1280,8 +1278,8 @@ describe('Blueprint', function() { }; }); - afterEach(function() { - return remove(tmproot); + afterEach(async function() { + await remove(tempRoot); }); it('looks up the `addon-install` task', function() { @@ -1409,7 +1407,7 @@ describe('Blueprint', function() { let project; beforeEach(async function() { - let dir = await mkTmpDirIn(tmproot); + let dir = await mkTmpDirIn(tempRoot); tmpdir = dir; blueprint = new Blueprint(basicBlueprint); project = new MockProject(); @@ -1421,8 +1419,8 @@ describe('Blueprint', function() { }; }); - afterEach(function() { - return remove(tmproot); + afterEach(async function() { + await remove(tempRoot); }); it('can lookup other Blueprints from the project blueprintLookupPaths', function() { diff --git a/tests/runner.js b/tests/runner.js index 439cb29a00..9a85a07ad7 100644 --- a/tests/runner.js +++ b/tests/runner.js @@ -1,5 +1,7 @@ 'use strict'; - +// process.on('unhandledRejection', e => { +// throw e; +// }); const captureExit = require('capture-exit'); captureExit.captureExit(); diff --git a/tests/unit/docs-lint-test.js b/tests/unit/docs-lint-test.js index 4a600c5e25..4e7d35a67e 100644 --- a/tests/unit/docs-lint-test.js +++ b/tests/unit/docs-lint-test.js @@ -1,45 +1,61 @@ 'use strict'; +/* + * Turns out, YUIDoc attached a process.on('unhandledRejection' handler which + * incorrectly reports any unhandledRejection as a YUIDoc error. This makes + * debugging of unhandledRejections in the ember-cli test suite quite painful + * + * To address YUIDocs behavior, we run YUIDoc isolated in it's own process; + */ +if (!process.env['IS_CHILD_THREAD']) { + const execa = require('execa'); + + describe('YUIDoc', function() { + it('parses without warnings', async function() { + await execa('node', [`--unhandled-rejections=strict`, __filename], { + env: { + IS_CHILD_THREAD: true, + }, + }); + }); + }); + return; +} + const Y = require('yuidocjs'); const EOL = require('os').EOL; -describe('YUIDoc', function() { - let options = Y.Project.init({ - quiet: true, - }); - let yuiDoc = new Y.YUIDoc(options); - - it('parses without warnings', function() { - let json = yuiDoc.run(); +let options = Y.Project.init({ + quiet: true, +}); +let yuiDoc = new Y.YUIDoc(options); - let warnings = {}; - json.warnings.forEach(function(warning) { - let tmp = warning.line.split(':'); - let file = tmp[0].trim(); - let line = tmp[1]; +let json = yuiDoc.run(); - if (!warnings[file]) { - warnings[file] = []; - } +let warnings = {}; +json.warnings.forEach(function(warning) { + let tmp = warning.line.split(':'); + let file = tmp[0].trim(); + let line = tmp[1]; - warnings[file].push({ - line, - message: warning.message, - }); - }); + if (!warnings[file]) { + warnings[file] = []; + } - let message = ''; - Object.keys(warnings).forEach(function(file) { - message += `\t${file} – YUIDoc issues found:${EOL}${EOL}`; - warnings[file].forEach(function(warning) { - message += `\t\tline ${warning.line}: ${warning.message}${EOL}`; - }); - }); + warnings[file].push({ + line, + message: warning.message, + }); +}); - if (message.length) { - let error = new Error(message); - delete error.stack; - throw error; - } +let message = ''; +Object.keys(warnings).forEach(function(file) { + message += `\t${file} – YUIDoc issues found:${EOL}${EOL}`; + warnings[file].forEach(function(warning) { + message += `\t\tline ${warning.line}: ${warning.message}${EOL}`; }); }); + +if (message.length) { + throw new Error(message); +} diff --git a/tests/unit/tasks/addon-install-test.js b/tests/unit/tasks/addon-install-test.js index 06b0836cc9..66eed5d73e 100644 --- a/tests/unit/tasks/addon-install-test.js +++ b/tests/unit/tasks/addon-install-test.js @@ -3,14 +3,16 @@ const AddonInstallTask = require('../../../lib/tasks/addon-install'); const expect = require('chai').expect; const CoreObject = require('core-object'); +const MockUi = require('console-ui/mock'); describe('addon install task', function() { let ui; let project; beforeEach(function() { - ui = { - startProgress() {}, + ui = new MockUi(); + project = { + reloadAddons() {}, }; }); diff --git a/tests/unit/tasks/git-init-test.js b/tests/unit/tasks/git-init-test.js index 104d29bdc3..251634a968 100644 --- a/tests/unit/tasks/git-init-test.js +++ b/tests/unit/tasks/git-init-test.js @@ -63,7 +63,6 @@ describe('git-init', function() { td.when(task._gitVersion()).thenReject(); await task.run(); - td.verify(task._gitVersion(), { times: 1 }); td.verify(task._gitInit(), { times: 0 }); td.verify(task._gitAdd(), { times: 0 }); td.verify(task._gitCommit(td.matchers.anything()), { times: 0 }); diff --git a/tests/unit/tasks/server/livereload-server-test.js b/tests/unit/tasks/server/livereload-server-test.js index c0bd427995..0744e04f20 100644 --- a/tests/unit/tasks/server/livereload-server-test.js +++ b/tests/unit/tasks/server/livereload-server-test.js @@ -60,24 +60,22 @@ describe('livereload-server', function() { expect(!!subject.liveReloadServer).to.equal(false); }); }); - it('informs of error during startup with custom port', function(done) { + it('informs of error during startup with custom port', async function() { let preexistingServer = net.createServer(); preexistingServer.listen(1337); - subject - .setupMiddleware({ + + try { + await subject.setupMiddleware({ liveReload: true, liveReloadPort: 1337, liveReloadPrefix: '/', port: 4200, - }) - .catch(function(reason) { - expect(reason).to.equal( - `Livereload failed on http://localhost:1337. It is either in use or you do not have permission.` - ); - }) - .finally(function() { - preexistingServer.close(done); }); + } catch (e) { + expect(e.message).to.include(`Livereload failed on 'http://localhost:1337', It may be in use.`); + } finally { + await new Promise(resolve => preexistingServer.close(resolve)); + } }); it('starts with custom host, custom port', function() { return subject @@ -126,28 +124,29 @@ describe('livereload-server', function() { expect(subject.liveReloadServer.options.cert).to.be.an.instanceof(Buffer); }); }); - it('informs of error during startup', function(done) { + + it('informs of error during startup', async function() { let preexistingServer = net.createServer(); preexistingServer.listen(1337); - subject - .setupMiddleware({ + try { + await subject.setupMiddleware({ liveReloadPort: 1337, liveReload: true, ssl: true, sslKey: 'tests/fixtures/ssl/server.key', sslCert: 'tests/fixtures/ssl/server.crt', port: 4200, - }) - .catch(function(reason) { - expect(reason).to.equal( - `Livereload failed on https://localhost:1337. It is either in use or you do not have permission.` - ); - }) - .finally(function() { - preexistingServer.close(done); }); + + expect.fail('expected rejection'); + } catch (e) { + expect(e.message).to.include(`Livereload failed on 'https://localhost:1337', It may be in use.`); + } finally { + await new Promise(resolve => preexistingServer.close(resolve)); + } }); + it('correctly runs in https mode with custom port', function() { return subject .setupMiddleware({ diff --git a/tests/unit/tasks/server/middleware/tests-server-test.js b/tests/unit/tasks/server/middleware/tests-server-test.js index 582ec84a1d..3591ef11bd 100644 --- a/tests/unit/tasks/server/middleware/tests-server-test.js +++ b/tests/unit/tasks/server/middleware/tests-server-test.js @@ -29,7 +29,9 @@ describe('TestServerAddon', function() { addon.serverMiddleware({ app, options: { - watcher: Promise.resolve(), + watcher: Promise.resolve({ + directory: 'some-output-directory', + }), }, finally() { try { diff --git a/tests/unit/utilities/open-editor-test.js b/tests/unit/utilities/open-editor-test.js index e8a0e005b2..cbb3493bdc 100644 --- a/tests/unit/utilities/open-editor-test.js +++ b/tests/unit/utilities/open-editor-test.js @@ -15,24 +15,54 @@ describe('open-editor', function() { td.reset(); }); - it('throws if EDITOR is not set', function() { + it('throws if EDITOR is not set', async function() { td.when(openEditor._env()).thenReturn({}); - expect(() => { - openEditor('test'); - }).to.throw('EDITOR environment variable is not set'); + try { + await openEditor('test'); + expect.fail('expected rejection'); + } catch (e) { + expect(e.message).to.eql('EDITOR environment variable is not set'); + } }); - it('spawns EDITOR with passed file', function() { + it('spawns EDITOR with passed file', async function() { td.when(openEditor._env()).thenReturn({ EDITOR: 'vi' }); - openEditor('test'); + td.when(openEditor._spawn(td.matchers.anything(), td.matchers.anything(), td.matchers.anything())).thenReturn({ + on(event, cb) { + cb(0); + }, + }); + + await openEditor('test'); td.verify(openEditor._spawn('vi', ['test'], { stdio: 'inherit' })); }); - it('throws if no file option is provided', function() { + it('spawns EDITOR with passed file (rejection scenario)', async function() { td.when(openEditor._env()).thenReturn({ EDITOR: 'vi' }); - expect(() => { - openEditor(); - }).to.throw('No `file` option provided'); + td.when(openEditor._spawn(td.matchers.anything(), td.matchers.anything(), td.matchers.anything())).thenReturn({ + on(event, cb) { + cb(-1); + }, + }); + + try { + await openEditor('test'); + expect.fail('expected rejection'); + } catch (e) { + expect(e.message).to.include(`exited with a non zero error status code: '-1'`); + } + + td.verify(openEditor._spawn('vi', ['test'], { stdio: 'inherit' })); + }); + it('throws if no file option is provided', async function() { + td.when(openEditor._env()).thenReturn({ EDITOR: 'vi' }); + + try { + await openEditor(); + expect.fail('expected rejection'); + } catch (e) { + expect(e.message).to.eql('No `file` option provided'); + } }); describe('.canEdit()', function() { From acc2a40ff94a436dd393d0f3c9b6a78c55434472 Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Fri, 28 Feb 2020 17:44:31 -0700 Subject: [PATCH 233/818] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60edc33923..d0923e0f07 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,7 +71,7 @@ jobs: strategy: matrix: - node-version: [10.19, 12.x, 13.x] + node-version: [10.x, 12.x, 13.x] steps: - uses: actions/checkout@v1 From 9db52b3c657081be583bc6f46cc4b589c96d6c67 Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Fri, 28 Feb 2020 17:45:39 -0700 Subject: [PATCH 234/818] Update runner.js --- tests/runner.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/runner.js b/tests/runner.js index 9a85a07ad7..2038051614 100644 --- a/tests/runner.js +++ b/tests/runner.js @@ -1,7 +1,4 @@ 'use strict'; -// process.on('unhandledRejection', e => { -// throw e; -// }); const captureExit = require('capture-exit'); captureExit.captureExit(); From 23d2ef85d6e3f022add6f7b46d6259332e8ff3d7 Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Thu, 27 Feb 2020 22:32:05 -0700 Subject: [PATCH 235/818] fail tests on unhandled rejections --- tests/unit/docs-lint-test.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/unit/docs-lint-test.js b/tests/unit/docs-lint-test.js index 4e7d35a67e..6681c48226 100644 --- a/tests/unit/docs-lint-test.js +++ b/tests/unit/docs-lint-test.js @@ -7,14 +7,16 @@ * * To address YUIDocs behavior, we run YUIDoc isolated in it's own process; */ -if (!process.env['IS_CHILD_THREAD']) { + +const ENV_VAR = '' + Math.random(); +if (!process.env[ENV_VAR]) { const execa = require('execa'); describe('YUIDoc', function() { it('parses without warnings', async function() { await execa('node', [`--unhandled-rejections=strict`, __filename], { env: { - IS_CHILD_THREAD: true, + [ENV_VAR]: true, }, }); }); From ce7d83eaf1fe2c41d66570f55384eee02a35bf5c Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Fri, 28 Feb 2020 17:04:59 -0700 Subject: [PATCH 236/818] [BUGFIXA] [Fixes #9007] Ensure buildFailures are reported correctly --- lib/models/watcher.js | 42 ++++--- package.json | 2 +- tests/acceptance/smoke-test-slow.js | 41 ++++++ tests/helpers/run-command.js | 10 +- tests/integration/models/blueprint-test.js | 24 ++-- tests/unit/docs-lint-test.js | 5 +- tests/unit/models/builder-test.js | 6 +- tests/unit/models/watcher-test.js | 29 +++++ yarn.lock | 139 ++++++++++++++++++--- 9 files changed, 248 insertions(+), 50 deletions(-) diff --git a/lib/models/watcher.js b/lib/models/watcher.js index 231a08d605..68f909e54b 100644 --- a/lib/models/watcher.js +++ b/lib/models/watcher.js @@ -30,7 +30,11 @@ module.exports = class Watcher extends CoreObject { this.watcher.on('buildStart', this._setupBroccoliWatcherBuild.bind(this)); this.watcher.on('buildSuccess', this.didChange.bind(this)); + // build errors arriving via watcher + this.watcher.on('buildFailure', this.didError.bind(this)); + // watcher specific errors this.watcher.on('error', this.didError.bind(this)); + this.serveURL = serveURL; } @@ -55,22 +59,28 @@ module.exports = class Watcher extends CoreObject { } } - _setupBroccoliWatcherBuild() { - let heimdallNode; - - this.watcher.currentBuild - .then(hash => { - heimdallNode = hash.graph.__heimdall__; - return hash; - }) - .finally(() => { - // guard against `build` rejecting - if (heimdallNode) { - // remove the heimdall subtree for this build so we don't leak. If - // BROCCOLI_VIZ=1 then we have already output the json in `verboseOutput`. - heimdallNode.remove(); - } - }); + async _setupBroccoliWatcherBuild() { + try { + const hash = await this.watcher.currentBuild; + hash.graph.__heimdall__.remove(); + } catch (e) { + if (e !== null && typeof e === 'object' && e.isBuilderError === true) { + // e must be a builder error which we can safely ignore. + // + // Builder errors are expected failures which are handled and presented + // to the user else-where. To prevent double reporting faliures to the + // user, it is important that we ignore them here as this functions + // single responsibilty is to reset the himedall state after each build. + // + // exists to prune heimdall data after a build. Those errors are + // reported elsewhere. + // + } else { + // this error is unexpected, we must re-throw as we cannot be sure it + // has been handled else-where + throw e; + } + } } _totalTime(hash) { diff --git a/package.json b/package.json index 832ca743bf..57d7ad20a2 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "babel-plugin-module-resolver": "^4.0.0", "bower-config": "^1.4.1", "bower-endpoint-parser": "0.2.2", - "broccoli": "^3.2.0", + "broccoli": "^3.3.3", "broccoli-amd-funnel": "^2.0.1", "broccoli-babel-transpiler": "^7.4.0", "broccoli-builder": "^0.18.14", diff --git a/tests/acceptance/smoke-test-slow.js b/tests/acceptance/smoke-test-slow.js index 684b6b61a7..9ee3b29f8f 100644 --- a/tests/acceptance/smoke-test-slow.js +++ b/tests/acceptance/smoke-test-slow.js @@ -328,6 +328,47 @@ describe('Acceptance: smoke-test', function() { } }); + it.only('build failures should be logged correctly', async function() { + fs.writeFileSync( + `${process.cwd()}/ember-cli-build.js`, + ` +const Plugin = require('broccoli-plugin'); + +module.exports = function() { + return new class extends Plugin { + constructor() { + super([]); + } + build() { + throw new Error('I AM A BUILD FAILURE'); + } + } +} + ` + ); + + let errorMessageSeenSTDERR = 0; + let errorMessageSeenSTDOUT = 0; + await runCommand( + path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), + 'server', + '--port=54323', + '--live-reload=false', + { + onOutput(string, child) { + if (string.includes('I AM A BUILD FAILURE')) { + killCliProcess(child); + } + }, + onError(string, child) { + if (string.includes('I AM A BUILD FAILURE')) { + killCliProcess(child); + } + }, + } + ); + }); + it.skip('ember new foo, server, SIGINT clears tmp/', async function() { let result = await runCommand( path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), diff --git a/tests/helpers/run-command.js b/tests/helpers/run-command.js index a70dc75c62..27a3a4b3b6 100644 --- a/tests/helpers/run-command.js +++ b/tests/helpers/run-command.js @@ -6,6 +6,7 @@ const defaults = require('ember-cli-lodash-subset').defaults; const killCliProcess = require('./kill-cli-process'); const logOnFailure = require('./log-on-failure'); let debug = require('heimdalljs-logger')('run-command'); +const captureExit = require('capture-exit'); module.exports = function run(/* command, args, options */) { let command = arguments[0]; @@ -43,9 +44,9 @@ module.exports = function run(/* command, args, options */) { options.log(` Running: ${command} ${args.join(' ')} in: ${process.cwd()}`); let opts = {}; + args = [`--unhandled-rejections=strict`, `${command}`].concat(args); + command = 'node'; if (process.platform === 'win32') { - args = [`"${command}"`].concat(args); - command = 'node'; opts.windowsVerbatimArguments = true; opts.stdio = [null, null, null, 'ipc']; } @@ -53,8 +54,11 @@ module.exports = function run(/* command, args, options */) { opts.env = defaults(options.env, process.env); } - debug.info('command: %s, args: %o', command, args); + debug.info('runCommand: %s, args: %o', command, args); let child = spawn(command, args, opts); + // ensure we tear down the child process on exit; + captureExit.onExit(() => killCliProcess(child)); + let result = { output: [], errors: [], diff --git a/tests/integration/models/blueprint-test.js b/tests/integration/models/blueprint-test.js index 9711a0fa26..621e177050 100644 --- a/tests/integration/models/blueprint-test.js +++ b/tests/integration/models/blueprint-test.js @@ -526,19 +526,25 @@ describe('Blueprint', function() { }).to.throw(SilentError, /The `ember generate ` command requires an entity name to be specified./); }); - it('throws error when an action does not exist', function() { + it('throws error when an action does not exist', async function() { blueprint._actions = {}; - return blueprint.install(options).catch(function(err) { - expect(err.message).to.equal('Tried to call action "write" but it does not exist'); - }); + try { + await blueprint.install(options); + expect.fail('expected rejection'); + } catch (e) { + expect(e.message).to.equal('Tried to call action "write" but it does not exist'); + } }); - it('calls normalizeEntityName hook during install', function(done) { - blueprint.normalizeEntityName = function() { - done(); - }; + it('calls normalizeEntityName hook during install', async function() { + const wait = new Promise(resolve => { + blueprint.normalizeEntityName = function() { + resolve(); + }; + }); options.entity = { name: 'foo' }; - blueprint.install(options); + await blueprint.install(options); + await wait; }); it('normalizeEntityName hook can modify the entity name', async function() { diff --git a/tests/unit/docs-lint-test.js b/tests/unit/docs-lint-test.js index 6681c48226..a25ead32ab 100644 --- a/tests/unit/docs-lint-test.js +++ b/tests/unit/docs-lint-test.js @@ -8,15 +8,14 @@ * To address YUIDocs behavior, we run YUIDoc isolated in it's own process; */ -const ENV_VAR = '' + Math.random(); -if (!process.env[ENV_VAR]) { +if (!process.env['IS_CHILD']) { const execa = require('execa'); describe('YUIDoc', function() { it('parses without warnings', async function() { await execa('node', [`--unhandled-rejections=strict`, __filename], { env: { - [ENV_VAR]: true, + IS_CHILD: true, }, }); }); diff --git a/tests/unit/models/builder-test.js b/tests/unit/models/builder-test.js index 15ef92154a..67745d286f 100644 --- a/tests/unit/models/builder-test.js +++ b/tests/unit/models/builder-test.js @@ -15,7 +15,7 @@ let expect = chai.expect; let file = chai.file; let root = process.cwd(); -let tmproot = path.join(root, 'tmp'); +let tmpRoot = path.join(root, 'tmp'); let Builder; @@ -57,7 +57,7 @@ describe('models/builder.js', function() { describe('copyToOutputPath', function() { beforeEach(async function() { - tmpdir = await mkTmpDirIn(tmproot); + tmpdir = await mkTmpDirIn(tmpRoot); let project = new MockProject(); builder = new Builder({ project, @@ -67,7 +67,7 @@ describe('models/builder.js', function() { }); afterEach(function() { - return fs.remove(tmproot); + return fs.remove(tmpRoot); }); (ci.APPVEYOR ? it.skip : it)('allows for non-existent output-paths at arbitrary depth', function() { diff --git a/tests/unit/models/watcher-test.js b/tests/unit/models/watcher-test.js index 3dcb08ca45..2b434fbd36 100644 --- a/tests/unit/models/watcher-test.js +++ b/tests/unit/models/watcher-test.js @@ -301,6 +301,35 @@ describe('Watcher', function() { ]); }); + it('watcher error', function() { + watcher.emit('error', { + message: 'foo', + stack: new Error().stack, + }); + + expect(ui.output).to.equal(''); + + let outs = ui.errors.split(EOL); + + expect(outs[0]).to.equal(chalk.red('foo')); + }); + + it('watcher buildFailure', function() { + watcher.emit('buildFailure', { + isBuilderError: true, + message: 'I am a build error', + file: 'the-file.txt', + stack: new Error().stack, + }); + + expect(ui.output).to.equal(''); + + let outs = ui.errors.split(EOL); + + expect(outs[0]).to.equal(chalk.red('File: the-file.txt')); + expect(outs[2]).to.equal(chalk.red('I am a build error')); + }); + it('emits without error.file', function() { subject.didError( new BuildError({ diff --git a/yarn.lock b/yarn.lock index 75a1d8efc2..2143020f79 100644 --- a/yarn.lock +++ b/yarn.lock @@ -270,16 +270,60 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd" integrity sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow== +"@types/body-parser@*": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.0.tgz#0685b3c47eb3006ffed117cdd55164b61f80538f" + integrity sha512-W98JrE0j2K78swW4ukqMleo8R7h/pFETjM2DQ90MF6XK2i4LO4W3gQ71Lt4w3bfm2EvVSyWHplECvB5sK22yFQ== + dependencies: + "@types/connect" "*" + "@types/node" "*" + +"@types/chai-as-promised@^7.1.2": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-7.1.2.tgz#2f564420e81eaf8650169e5a3a6b93e096e5068b" + integrity sha512-PO2gcfR3Oxa+u0QvECLe1xKXOqYTzCmWf0FhLhjREoW3fPAVamjihL7v1MOVLJLsnAMdLcjkfrs01yvDMwVK4Q== + dependencies: + "@types/chai" "*" + +"@types/chai@*", "@types/chai@^4.2.9": + version "4.2.9" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.9.tgz#194332625ed2ae914aef00b8d5ca3b77e7924cc6" + integrity sha512-NeXgZj+MFL4izGqA4sapdYzkzQG+MtGra9vhQ58dnmDY++VgJaRUws+aLVV5zRJCYJl/8s9IjMmhiUw1WsKSmw== + "@types/color-name@^1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== +"@types/connect@*": + version "3.4.33" + resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.33.tgz#31610c901eca573b8713c3330abc6e6b9f588546" + integrity sha512-2+FrkXY4zllzTNfJth7jOqEHC+enpLeGslEhpnTAkg21GkRrWV4SsAtqchtT4YS9/nODBU2/ZfsBY2X4J/dX7A== + dependencies: + "@types/node" "*" + "@types/events@*": version "3.0.0" resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g== +"@types/express-serve-static-core@*": + version "4.17.2" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.2.tgz#f6f41fa35d42e79dbf6610eccbb2637e6008a0cf" + integrity sha512-El9yMpctM6tORDAiBwZVLMcxoTMcqqRO9dVyYcn7ycLWbvR8klrDn8CAOwRfZujZtWD7yS/mshTdz43jMOejbg== + dependencies: + "@types/node" "*" + "@types/range-parser" "*" + +"@types/express@^4.17.2": + version "4.17.2" + resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.2.tgz#a0fb7a23d8855bac31bc01d5a58cadd9b2173e6c" + integrity sha512-5mHFNyavtLoJmnusB8OKJ5bshSzw+qkMIBAobLrIM48HJvunFva9mOa6aBwh64lBFyNwBbs0xiEFuj4eU/NjCA== + dependencies: + "@types/body-parser" "*" + "@types/express-serve-static-core" "*" + "@types/serve-static" "*" + "@types/fs-extra@^5.0.5": version "5.1.0" resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-5.1.0.tgz#2a325ef97901504a3828718c390d34b8426a10a1" @@ -296,6 +340,11 @@ "@types/minimatch" "*" "@types/node" "*" +"@types/mime@*": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@types/mime/-/mime-2.0.1.tgz#dc488842312a7f075149312905b5e3c0b054c79d" + integrity sha512-FwI9gX75FgVBJ7ywgnq/P7tw+/o1GUbtP0KzbtusLigAOgIgNISRK0ZPl4qertvXSIE8YbsVJueQ90cDt9YYyw== + "@types/minimatch@*", "@types/minimatch@^3.0.3": version "3.0.3" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" @@ -311,6 +360,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.7.tgz#01e4ea724d9e3bd50d90c11fd5980ba317d8fa11" integrity sha512-E6Zn0rffhgd130zbCbAr/JdXfXkoOUFAKNs/rF8qnafSJ8KYaA/j3oz7dcwal+lYjLA7xvdd5J4wdYpCTlP8+w== +"@types/range-parser@*": + version "1.2.3" + resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.3.tgz#7ee330ba7caafb98090bece86a5ee44115904c2c" + integrity sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA== + "@types/rimraf@^2.0.2": version "2.0.2" resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-2.0.2.tgz#7f0fc3cf0ff0ad2a99bb723ae1764f30acaf8b6e" @@ -319,6 +373,14 @@ "@types/glob" "*" "@types/node" "*" +"@types/serve-static@*": + version "1.13.3" + resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.3.tgz#eb7e1c41c4468272557e897e9171ded5e2ded9d1" + integrity sha512-oprSwp094zOglVrXdlo/4bAHtKTAxX6VT8FOZlBKrmyLbNvE1zxZyJ6yikMVtHIvwP45+ZQGJn+FdXGKTozq0g== + dependencies: + "@types/express-serve-static-core" "*" + "@types/mime" "*" + "@types/symlink-or-copy@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@types/symlink-or-copy/-/symlink-or-copy-1.2.0.tgz#4151a81b4052c80bc2becbae09f3a9ec010a9c7a" @@ -1115,33 +1177,35 @@ broccoli@^2.0.0: underscore.string "^3.2.2" watch-detector "^0.1.0" -broccoli@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/broccoli/-/broccoli-3.2.0.tgz#6b5a89b8d6d0c733d39aa23ac5b43d85f56fafab" - integrity sha512-n58yqAbV2Zbg+HXmBGBOUoDOgbCM0hMJtqvnPDF89Jwk3ZBVhD5/UKW0diY6l3DbB5+j92NCDQVd9HqO+WYFYA== +broccoli@^3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/broccoli/-/broccoli-3.3.3.tgz#f4034b2495b709e99dd7e7d8834bf4a01bb4d0d7" + integrity sha512-MFyAk94I8XcSmfDZ0DtXlkgDvWL/U2lGbFpWiU1OPBGyUNC5WgWElC2U18SEFuDc0GncZfUaIxN+QAALrs4fAQ== dependencies: + "@types/chai" "^4.2.9" + "@types/chai-as-promised" "^7.1.2" + "@types/express" "^4.17.2" ansi-html "^0.0.7" broccoli-node-info "^2.1.0" broccoli-slow-trees "^3.0.1" - broccoli-source "^1.1.0" - commander "^2.15.1" + broccoli-source "^3.0.0" + commander "^4.1.1" connect "^3.6.6" console-ui "^3.0.4" esm "^3.2.4" - findup-sync "^2.0.0" - handlebars "^4.0.11" + findup-sync "^4.0.0" + handlebars "^4.7.3" heimdalljs "^0.2.6" heimdalljs-logger "^0.1.9" https "^1.0.0" - mime-types "^2.1.19" - promise.prototype.finally "^3.1.0" + mime-types "^2.1.26" resolve-path "^1.4.0" - rimraf "^2.6.2" + rimraf "^3.0.2" sane "^4.0.0" - tmp "0.0.33" - tree-sync "^1.2.2" + tmp "^0.0.33" + tree-sync "^2.0.0" underscore.string "^3.2.2" - watch-detector "^0.1.0" + watch-detector "^1.0.0" browser-stdout@1.3.1: version "1.3.1" @@ -1527,6 +1591,11 @@ commander@^2.15.1, commander@^2.6.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== +commander@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" + integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== + commander@~2.20.3: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" @@ -2666,6 +2735,16 @@ findup-sync@^2.0.0: micromatch "^3.0.4" resolve-dir "^1.0.1" +findup-sync@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-4.0.0.tgz#956c9cdde804052b881b428512905c4a5f2cdef0" + integrity sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ== + dependencies: + detect-file "^1.0.0" + is-glob "^4.0.0" + micromatch "^4.0.2" + resolve-dir "^1.0.1" + fireworm@^0.7.0: version "0.7.1" resolved "https://registry.yarnpkg.com/fireworm/-/fireworm-0.7.1.tgz#ccf20f7941f108883fcddb99383dbe6e1861c758" @@ -3114,6 +3193,17 @@ handlebars@^4.0.11, handlebars@^4.0.4, handlebars@^4.1.2: optionalDependencies: uglify-js "^3.1.4" +handlebars@^4.7.3: + version "4.7.3" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.3.tgz#8ece2797826886cf8082d1726ff21d2a022550ee" + integrity sha512-SRGwSYuNfx8DwHD/6InAPzD6RgeruWLT+B8e8a7gGs8FWgHzlExpTFMEq2IA6QpAfOClpKHy6+8IqTjeBCu6Kg== + dependencies: + neo-async "^2.6.0" + optimist "^0.6.1" + source-map "^0.6.1" + optionalDependencies: + uglify-js "^3.1.4" + has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" @@ -3578,7 +3668,7 @@ is-glob@^3.1.0: dependencies: is-extglob "^2.1.0" -is-glob@^4.0.1: +is-glob@^4.0.0, is-glob@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== @@ -4583,6 +4673,11 @@ mime-db@1.40.0, "mime-db@>= 1.40.0 < 2": resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.40.0.tgz#a65057e998db090f732a68f6c276d387d4126c32" integrity sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA== +mime-db@1.43.0: + version "1.43.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" + integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== + mime-types@^2.1.12, mime-types@^2.1.18, mime-types@^2.1.19, mime-types@~2.1.24: version "2.1.24" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.24.tgz#b6f8d0b3e951efb77dedeca194cff6d16f676f81" @@ -4590,6 +4685,13 @@ mime-types@^2.1.12, mime-types@^2.1.18, mime-types@^2.1.19, mime-types@~2.1.24: dependencies: mime-db "1.40.0" +mime-types@^2.1.26: + version "2.1.26" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06" + integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== + dependencies: + mime-db "1.43.0" + mime-types@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-1.0.2.tgz#995ae1392ab8affcbfcb2641dd054e943c0d5dce" @@ -5719,6 +5821,13 @@ rimraf@^3.0.0: dependencies: glob "^7.1.3" +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + rsvp@^3.0.14, rsvp@^3.0.17, rsvp@^3.0.18, rsvp@^3.0.21: version "3.6.2" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-3.6.2.tgz#2e96491599a96cde1b515d5674a8f7a91452926a" From 5f9702b6ebd8ae7b221314e32ad1d7c6aee01155 Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Sun, 1 Mar 2020 12:23:43 -0700 Subject: [PATCH 237/818] =?UTF-8?q?POC:=20don=E2=80=99t=20leak=20runComman?= =?UTF-8?q?ds=20processes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/acceptance/addon-smoke-test-slow.js | 1 + tests/acceptance/brocfile-smoke-test-slow.js | 1 + .../nested-addons-smoke-test-slow.js | 1 + .../preprocessor-smoke-test-slow.js | 1 + tests/acceptance/smoke-test-slow.js | 9 ++-- tests/helpers/run-command.js | 48 +++++++++---------- 6 files changed, 31 insertions(+), 30 deletions(-) diff --git a/tests/acceptance/addon-smoke-test-slow.js b/tests/acceptance/addon-smoke-test-slow.js index cff9b38752..c4d6333116 100644 --- a/tests/acceptance/addon-smoke-test-slow.js +++ b/tests/acceptance/addon-smoke-test-slow.js @@ -39,6 +39,7 @@ describe('Acceptance: addon-smoke-test', function() { }); afterEach(function() { + runCommand.killAll(); // Cleans up a folder set up on the other side of a symlink. fs.removeSync(path.join(addonRoot, 'node_modules', 'developing-addon')); diff --git a/tests/acceptance/brocfile-smoke-test-slow.js b/tests/acceptance/brocfile-smoke-test-slow.js index 042cc27329..da4a099c83 100644 --- a/tests/acceptance/brocfile-smoke-test-slow.js +++ b/tests/acceptance/brocfile-smoke-test-slow.js @@ -33,6 +33,7 @@ describe('Acceptance: brocfile-smoke-test', function() { }); afterEach(function() { + runCommand.killAll(); cleanupRun(appName); expect(dir(appRoot)).to.not.exist; }); diff --git a/tests/acceptance/nested-addons-smoke-test-slow.js b/tests/acceptance/nested-addons-smoke-test-slow.js index 2390dfe1a8..47cdc428d9 100644 --- a/tests/acceptance/nested-addons-smoke-test-slow.js +++ b/tests/acceptance/nested-addons-smoke-test-slow.js @@ -33,6 +33,7 @@ describe('Acceptance: nested-addons-smoke-test', function() { }); afterEach(function() { + runCommand.killAll(); cleanupRun(appName); expect(dir(appRoot)).to.not.exist; }); diff --git a/tests/acceptance/preprocessor-smoke-test-slow.js b/tests/acceptance/preprocessor-smoke-test-slow.js index 302b240a7e..30d116d589 100644 --- a/tests/acceptance/preprocessor-smoke-test-slow.js +++ b/tests/acceptance/preprocessor-smoke-test-slow.js @@ -33,6 +33,7 @@ describe('Acceptance: preprocessor-smoke-test', function() { }); afterEach(function() { + runCommand.killAll(); cleanupRun(appName); expect(dir(appRoot)).to.not.exist; }); diff --git a/tests/acceptance/smoke-test-slow.js b/tests/acceptance/smoke-test-slow.js index 9ee3b29f8f..40a0d76207 100644 --- a/tests/acceptance/smoke-test-slow.js +++ b/tests/acceptance/smoke-test-slow.js @@ -6,11 +6,11 @@ const crypto = require('crypto'); const walkSync = require('walk-sync'); const EOL = require('os').EOL; -const runCommand = require('../helpers/run-command'); const acceptance = require('../helpers/acceptance'); const copyFixtureFiles = require('../helpers/copy-fixture-files'); const killCliProcess = require('../helpers/kill-cli-process'); const ember = require('../helpers/ember'); +const runCommand = require('../helpers/run-command'); let createTestTargets = acceptance.createTestTargets; let teardownTestTargets = acceptance.teardownTestTargets; let linkDependencies = acceptance.linkDependencies; @@ -38,6 +38,7 @@ describe('Acceptance: smoke-test', function() { afterEach(function() { delete process.env._TESTEM_CONFIG_JS_RAN; + runCommand.killAll(); cleanupRun(appName); expect(dir(appRoot)).to.not.exist; }); @@ -328,7 +329,7 @@ describe('Acceptance: smoke-test', function() { } }); - it.only('build failures should be logged correctly', async function() { + it('build failures should be logged correctly', async function() { fs.writeFileSync( `${process.cwd()}/ember-cli-build.js`, ` @@ -347,12 +348,10 @@ module.exports = function() { ` ); - let errorMessageSeenSTDERR = 0; - let errorMessageSeenSTDOUT = 0; await runCommand( path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'server', - '--port=54323', + '--port=0', '--live-reload=false', { onOutput(string, child) { diff --git a/tests/helpers/run-command.js b/tests/helpers/run-command.js index 27a3a4b3b6..60389be3ed 100644 --- a/tests/helpers/run-command.js +++ b/tests/helpers/run-command.js @@ -8,6 +8,7 @@ const logOnFailure = require('./log-on-failure'); let debug = require('heimdalljs-logger')('run-command'); const captureExit = require('capture-exit'); +let RUNS = []; module.exports = function run(/* command, args, options */) { let command = arguments[0]; let args = Array.prototype.slice.call(arguments, 1); @@ -40,7 +41,8 @@ module.exports = function run(/* command, args, options */) { }, }); - return new Promise(function(resolve, reject) { + let child; + const promise = new Promise(function(resolve, reject) { options.log(` Running: ${command} ${args.join(' ')} in: ${process.cwd()}`); let opts = {}; @@ -55,7 +57,8 @@ module.exports = function run(/* command, args, options */) { } debug.info('runCommand: %s, args: %o', command, args); - let child = spawn(command, args, opts); + child = spawn(command, args, opts); + RUNS.push(child); // ensure we tear down the child process on exit; captureExit.onExit(() => killCliProcess(child)); @@ -65,29 +68,6 @@ module.exports = function run(/* command, args, options */) { code: null, }; - if (options.onChildSpawned) { - let onChildSpawnedPromise = new Promise(function(childSpawnedResolve, childSpawnedReject) { - try { - options.onChildSpawned(child).then(childSpawnedResolve, childSpawnedReject); - } catch (err) { - childSpawnedReject(err); - } - }); - onChildSpawnedPromise.then( - function() { - if (options.killAfterChildSpawnedPromiseResolution) { - killCliProcess(child); - } - }, - function(err) { - result.testingError = err; - if (options.killAfterChildSpawnedPromiseResolution) { - killCliProcess(child); - } - } - ); - } - child.stdout.on('data', function(data) { let string = data.toString(); @@ -115,4 +95,22 @@ module.exports = function run(/* command, args, options */) { } }); }); + + promise.kill = function() { + killCliProcess(child); + }; + + return promise; +}; + +module.exports.killAll = function() { + RUNS.forEach(run => { + try { + killCliProcess(run); + } catch (e) { + console.error(e); + // during teardown, issues can arise, but teardown must complete it's operation + } + }); + RUNS.length = 0; }; From cd4451af53dce7a560c80aa851bca53d51a11421 Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Wed, 4 Mar 2020 18:31:47 -0700 Subject: [PATCH 238/818] this.currentTest may not always be set in failure modes. --- tests/helpers/log-on-failure.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/helpers/log-on-failure.js b/tests/helpers/log-on-failure.js index a0fbef56ae..d38ad41e49 100644 --- a/tests/helpers/log-on-failure.js +++ b/tests/helpers/log-on-failure.js @@ -9,7 +9,7 @@ beforeEach(function() { }); afterEach(function() { - if (this.currentTest.state !== 'passed') { + if (this.currentTest && this.currentTest.state !== 'passed') { // It would be preferable to attach the log output to the error object // (this.currentTest.err) and have Mocha report it somehow, so that the // error message and log output show up in the same place. This doesn't From 9525449334b10fd2a15c6210fb61a0d0ee1425c3 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sun, 8 Mar 2020 16:04:17 -0400 Subject: [PATCH 239/818] Run GH Actions on Ubuntu, Windows, and macOS. --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0923e0f07..87ede4ebfa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,7 +41,11 @@ jobs: basic-tests: name: Basic Tests - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest, macOS-latest, windows-latest] steps: - uses: actions/checkout@v1 From 3570970b314f58ea4952227d2e244fc1a8373778 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sun, 8 Mar 2020 16:29:48 -0400 Subject: [PATCH 240/818] Ensure tests/unit/commands/generate-test.js is deterministic. Prior to these changes, `tests/unit/commands/generate-test.js` relied on the current working directory to have a `yarn.lock` file in it. Unfortunately, when other tests "leak" the current working directory these tests fail (but really some other test left the runner in a bad state). These changes make the tests deterministic by always using a custom directory as the project root, and writing a `yarn.lock` as needed to test yarn vs npm behaviors. --- tests/unit/commands/generate-test.js | 53 +++++++++++++--------------- 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/tests/unit/commands/generate-test.js b/tests/unit/commands/generate-test.js index 1293982568..07bb507515 100644 --- a/tests/unit/commands/generate-test.js +++ b/tests/unit/commands/generate-test.js @@ -9,15 +9,18 @@ const Task = require('../../../lib/models/task'); const Blueprint = require('../../../lib/models/blueprint'); const GenerateCommand = require('../../../lib/commands/generate'); const td = require('testdouble'); -const fs = require('fs-extra'); -const path = require('path'); const ci = require('ci-info'); +const ROOT = process.cwd(); +const { createTempDir } = require('broccoli-test-helper'); describe('generate command', function() { - let options, command; + let input, options, command; - beforeEach(function() { - let project = new MockProject(); + beforeEach(async function() { + input = await createTempDir(); + process.chdir(input.path()); + + let project = new MockProject({ root: input.path() }); project.isEmberCLIProject = function() { return true; @@ -43,37 +46,31 @@ describe('generate command', function() { command = new GenerateCommand(options); }); - afterEach(function() { + afterEach(async function() { td.reset(); - }); - - describe('without yarn.lock file', function() { - let originalYarnLockPath, dummyYarnLockPath; - beforeEach(function() { - originalYarnLockPath = path.join(command.project.root, 'yarn.lock'); - dummyYarnLockPath = path.join(command.project.root, 'foo.bar'); - fs.renameSync(originalYarnLockPath, dummyYarnLockPath); - }); - - afterEach(function() { - fs.renameSync(dummyYarnLockPath, originalYarnLockPath); - }); + process.chdir(ROOT); + await input.dispose(); + }); - (ci.APPVEYOR ? it.skip : it)('runs GenerateFromBlueprint but with null nodeModulesPath with npm', function() { - command.project.hasDependencies = function() { - return false; - }; + (ci.APPVEYOR ? it.skip : it)('runs GenerateFromBlueprint but with null nodeModulesPath with npm', function() { + command.project.hasDependencies = function() { + return false; + }; - return expect(command.validateAndRun(['controller', 'foo'])).to.be.rejected.then(reason => { - expect(reason.message).to.eql( - 'Required packages are missing, run `npm install` from this directory to install them.' - ); - }); + return expect(command.validateAndRun(['controller', 'foo'])).to.be.rejected.then(reason => { + expect(reason.message).to.eql( + 'Required packages are missing, run `npm install` from this directory to install them.' + ); }); }); (ci.APPVEYOR ? it.skip : it)('runs GenerateFromBlueprint but with null nodeModulesPath with yarn', function() { + // force usage of `yarn` by adding yarn.lock file + input.write({ + 'yarn.lock': '', + }); + command.project.hasDependencies = function() { return false; }; From e8b0f918af85b2261a1688e6af8e2f45d1a5f09a Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sun, 8 Mar 2020 18:06:46 -0400 Subject: [PATCH 241/818] Add global afterEach to ensure process.cwd() is reset properly. --- tests/acceptance/missing-before-addon-test.js | 4 ++-- tests/runner.js | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/acceptance/missing-before-addon-test.js b/tests/acceptance/missing-before-addon-test.js index 5cc9eec5b1..303267ecbb 100644 --- a/tests/acceptance/missing-before-addon-test.js +++ b/tests/acceptance/missing-before-addon-test.js @@ -5,11 +5,11 @@ const ember = require('../helpers/ember'); let root = process.cwd(); describe('Acceptance: missing a before/after addon', function() { - before(function() { + beforeEach(function() { process.chdir(path.join(root, 'tests', 'fixtures', 'missing-before-addon')); }); - after(function() { + afterEach(function() { process.chdir(root); }); diff --git a/tests/runner.js b/tests/runner.js index 2038051614..94a52d4294 100644 --- a/tests/runner.js +++ b/tests/runner.js @@ -5,6 +5,7 @@ captureExit.captureExit(); const glob = require('glob'); const Mocha = require('mocha'); const fs = require('fs-extra'); +const expect = require('./chai').expect; if (process.env.EOLNEWLINE) { require('os').EOL = '\n'; @@ -47,6 +48,14 @@ function addFiles(mocha, files) { } function runMocha() { + let ROOT = process.cwd(); + + // ensure that at the end of every test, we are in the correct current + // working directory + mocha.suite.afterEach(function() { + expect(process.cwd()).to.equal(ROOT); + }); + console.time('Mocha Tests Running Time'); mocha.run(failures => { console.timeEnd('Mocha Tests Running Time'); From 7cc03e01b3c4f2efc7d083187ac3f5bd03ca791e Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sun, 8 Mar 2020 18:29:31 -0400 Subject: [PATCH 242/818] Ensure process.cwd is reset before deleting tmp dirs. --- tests/unit/broccoli/builder-test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/unit/broccoli/builder-test.js b/tests/unit/broccoli/builder-test.js index 61db04b326..0c0fbc1883 100644 --- a/tests/unit/broccoli/builder-test.js +++ b/tests/unit/broccoli/builder-test.js @@ -21,13 +21,13 @@ describe('Builder - broccoli tests', function() { }); afterEach(async function() { - await projectRoot.dispose(); - await builderOutputPath.dispose(); - await output.dispose(); - // this is needed because lib/utilities/find-build-file.js does a // `process.chdir` when it looks for the `ember-cli-build.js` process.chdir(ROOT); + + await projectRoot.dispose(); + await builderOutputPath.dispose(); + await output.dispose(); }); (ci.APPVEYOR ? it.skip : it)( From 0f8c8dc141e29ce6289bfae3d103e6848f35d9fa Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sun, 8 Mar 2020 18:48:15 -0400 Subject: [PATCH 243/818] Make scheduleServerRestart debouncing test more deterministic. This was failing sporadically when running on slower hardware (we were ot guaranteed that these racing timers would have been ran properly). This refactor changes the test to use async / await, and ensure that the timers are ran serially (not racing setTimeouts). --- .../unit/tasks/server/express-server-test.js | 32 +++++++++++++------ 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/tests/unit/tasks/server/express-server-test.js b/tests/unit/tasks/server/express-server-test.js index 6b3a74ce30..38d4c15286 100644 --- a/tests/unit/tasks/server/express-server-test.js +++ b/tests/unit/tasks/server/express-server-test.js @@ -19,6 +19,10 @@ function checkMiddlewareOptions(options) { expect(options).to.satisfy(option => option.baseURL || option.rootURL); } +function sleep(timeout) { + return new Promise(resolve => setTimeout(resolve, timeout)); +} + describe('express-server', function() { let subject, ui, project, proxy, nockProxy; nock.enableNetConnect(); @@ -1049,22 +1053,32 @@ describe('express-server', function() { }); describe('scheduleServerRestart', function() { - it('schedules exactly one call of restartHttpServer', function(done) { + it('schedules exactly one call of restartHttpServer', async function() { let calls = 0; + subject.restartHttpServer = function() { calls++; }; subject.scheduleServerRestart(); + // scheduleServerRestart is debounced and only ran after 100ms, + // restartHttpServer shouldn't be called yet expect(calls).to.equal(0); - setTimeout(function() { - expect(calls).to.equal(0); - subject.scheduleServerRestart(); - }, 50); - setTimeout(function() { - expect(calls).to.equal(1); - done(); - }, 175); + + await sleep(50); + + // after a 50ms wait, we still haven't called restartHttpServer since + // we are still within our 100ms debounce time. + expect(calls).to.equal(0); + subject.scheduleServerRestart(); + + await sleep(175); + + // finally, after 175ms we have finally called restartHttpServer, but + // importantly only called it once (all of the other + // `subject.scheduleServerRestart()` calls were within the debounce + // window) + expect(calls).to.equal(1); }); }); From 4cad8add76b8f0dc51649f23c39fa2f609a0b5d6 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 13 Mar 2020 10:40:57 -0400 Subject: [PATCH 244/818] Remove `actions/cache` from CI. Initial testing shows that caching can often be more costly than installing (especially on macOS and Windows hosts). We can always bring this back if we find that it _is_ faster, tweak config, etc. --- .github/workflows/ci.yml | 44 ---------------------------------------- 1 file changed, 44 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 87ede4ebfa..dd3f15d56d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,17 +25,6 @@ jobs: with: node-version: 12.x - - name: get yarn cache dir - id: yarn-cache - run: echo "::set-output name=dir::$(yarn cache dir)" - - - uses: actions/cache@v1 - with: - path: ${{ steps.yarn-cache.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - run: yarn install --frozen-lockfile --non-interactive - run: yarn lint @@ -53,17 +42,6 @@ jobs: with: node-version: 12.x - - name: get yarn cache dir - id: yarn-cache - run: echo "::set-output name=dir::$(yarn cache dir)" - - - uses: actions/cache@v1 - with: - path: ${{ steps.yarn-cache.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - run: yarn install --frozen-lockfile --non-interactive - run: yarn test @@ -83,17 +61,6 @@ jobs: with: node-version: ${{ matrix.node-version }} - - name: get yarn cache dir - id: yarn-cache - run: echo "::set-output name=dir::$(yarn cache dir)" - - - uses: actions/cache@v1 - with: - path: ${{ steps.yarn-cache.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - run: yarn install --frozen-lockfile --non-interactive - run: yarn test:all continue-on-error: ${{ matrix['continue-on-error'] == true }} @@ -116,17 +83,6 @@ jobs: with: node-version: 12.x - - name: get yarn cache dir - id: yarn-cache - run: echo "::set-output name=dir::$(yarn cache dir)" - - - uses: actions/cache@v1 - with: - path: ${{ steps.yarn-cache.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - run: yarn install --frozen-lockfile --non-interactive - run: yarn test:all env: From 1635f6902e97824632361d8b4c22495c95ed1b94 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Thu, 12 Mar 2020 10:05:57 -0400 Subject: [PATCH 245/818] Add Windows to GH Actions CI for test:all. * Adds `windows-latest` and `macOS-latest` to run for each supported Node version. * Tweaks the job names to be a bit simpler / easier to read. --- .github/workflows/ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd3f15d56d..60ea8815ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,12 +29,12 @@ jobs: - run: yarn lint basic-tests: - name: Basic Tests - runs-on: ${{ matrix.os }} + name: "Basic Tests - ${{ matrix.os }}" + runs-on: "${{ matrix.os }}-latest" strategy: matrix: - os: [ubuntu-latest, macOS-latest, windows-latest] + os: [ubuntu, macOS, windows] steps: - uses: actions/checkout@v1 @@ -46,14 +46,15 @@ jobs: - run: yarn test tests: - name: Node.js ${{ matrix.node-version }} - runs-on: ubuntu-latest + name: "Node ${{ matrix.node-version }} - ${{ matrix.os }} " + runs-on: "${{ matrix.os }}-latest" needs: [linting, basic-tests] strategy: matrix: node-version: [10.x, 12.x, 13.x] + os: [ubuntu, macOS, windows] steps: - uses: actions/checkout@v1 From 48ed25aca34d9a8974d68836988ceadc6e397863 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Thu, 12 Mar 2020 10:36:00 -0400 Subject: [PATCH 246/818] Simplify CI Job title for feature flag jobs. --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60ea8815ca..0eb338116b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,8 +75,8 @@ jobs: strategy: matrix: feature-flag: - - EMBER_CLI_ENABLE_ALL_EXPERIMENTS - - EMBER_CLI_PACKAGER + - ENABLE_ALL_EXPERIMENTS + - PACKAGER steps: - uses: actions/checkout@v1 @@ -87,4 +87,4 @@ jobs: - run: yarn install --frozen-lockfile --non-interactive - run: yarn test:all env: - ${{ matrix.feature-flag }}: true + "EMBER_CLI_${{ matrix.feature-flag }}": true From 5e8d1ad0f018dc7f828da5ec6a78332ea65fcf8d Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Thu, 12 Mar 2020 11:00:15 -0400 Subject: [PATCH 247/818] Avoid attempting to kill an already killed child process. --- tests/helpers/kill-cli-process.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/helpers/kill-cli-process.js b/tests/helpers/kill-cli-process.js index 4b59f3380a..336971b073 100644 --- a/tests/helpers/kill-cli-process.js +++ b/tests/helpers/kill-cli-process.js @@ -1,6 +1,12 @@ 'use strict'; module.exports = function(childProcess) { + // Calling `.kill` or `.send` when the process has already exited causes + // errors on Windows, when an `.exitCode` is non-null the process has exited + if (childProcess.exitCode !== null) { + return; + } + if (process.platform === 'win32') { childProcess.send({ kill: true }); } else { From 7e4f79e75e71c58ae4016be6fe8bb01dcc1494e0 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 13 Mar 2020 11:30:04 -0400 Subject: [PATCH 248/818] Do not fail fast for cross platform tests. --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0eb338116b..29709e899d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,6 +52,7 @@ jobs: needs: [linting, basic-tests] strategy: + fail-fast: false matrix: node-version: [10.x, 12.x, 13.x] os: [ubuntu, macOS, windows] @@ -73,6 +74,7 @@ jobs: needs: [linting, basic-tests] strategy: + fail-fast: false matrix: feature-flag: - ENABLE_ALL_EXPERIMENTS From 214009f2a46f7e3511100ce2ff676b43faf40014 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 13 Mar 2020 13:44:16 -0400 Subject: [PATCH 249/818] Migrate test of `npm pack` to use `execa`. The previous code had an error, it would exit and resolve the `tar` promise before all of the output had been read (depending on platform). This migrates to using `execa` which properly handles gathering the `stdout`. --- tests/acceptance/addon-smoke-test-slow.js | 24 +++++++++++------------ 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/tests/acceptance/addon-smoke-test-slow.js b/tests/acceptance/addon-smoke-test-slow.js index c4d6333116..c7fdd3e0d4 100644 --- a/tests/acceptance/addon-smoke-test-slow.js +++ b/tests/acceptance/addon-smoke-test-slow.js @@ -3,6 +3,7 @@ const path = require('path'); const fs = require('fs-extra'); const spawn = require('child_process').spawn; +const execa = require('execa'); const chalk = require('chalk'); const runCommand = require('../helpers/run-command'); @@ -115,7 +116,8 @@ describe('Acceptance: addon-smoke-test', function() { let output; try { - output = await tar(); + let result = await tar(); + output = result.stdout; } catch (error) { return handleError(error, 'tar'); } @@ -159,16 +161,12 @@ function npmPack() { }); } -function tar() { - return new Promise((resolve, reject) => { - let output; - let fileName = `${addonName}-0.0.0.tgz`; - if (fs.existsSync(fileName) === false) { - throw new Error(`unknown file: '${path.resolve(fileName)}'`); - } - let tar = spawn('tar', ['-tf', fileName]); - tar.on('error', reject); - tar.stdout.on('data', data => (output = data.toString())); - tar.on('close', () => resolve(output)); - }); +async function tar() { + let fileName = `${addonName}-0.0.0.tgz`; + + if (fs.existsSync(fileName) === false) { + throw new Error(`unknown file: '${path.resolve(fileName)}'`); + } + + return execa('tar', ['-tf', fileName]); } From 1b53521343d9d45c49ed0dc7b05c07b8ed64d58e Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 13 Mar 2020 13:10:54 -0400 Subject: [PATCH 250/818] Ensure `captureExit` is always called before `onExit` is used. --- tests/helpers/run-command.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/helpers/run-command.js b/tests/helpers/run-command.js index 60389be3ed..439661dca8 100644 --- a/tests/helpers/run-command.js +++ b/tests/helpers/run-command.js @@ -6,7 +6,12 @@ const defaults = require('ember-cli-lodash-subset').defaults; const killCliProcess = require('./kill-cli-process'); const logOnFailure = require('./log-on-failure'); let debug = require('heimdalljs-logger')('run-command'); -const captureExit = require('capture-exit'); +const { captureExit, onExit } = require('capture-exit'); + +// when running the full test suite, `process.exit` has already been captured +// however, when running specific files (e.g. `mocha some/path/to/file.js`) +// exit may not be captured before `runCommand` attempts to call `onExit` +captureExit(); let RUNS = []; module.exports = function run(/* command, args, options */) { @@ -60,7 +65,7 @@ module.exports = function run(/* command, args, options */) { child = spawn(command, args, opts); RUNS.push(child); // ensure we tear down the child process on exit; - captureExit.onExit(() => killCliProcess(child)); + onExit(() => killCliProcess(child)); let result = { output: [], From f595081bcb8a63595fc2c9e567b744d18ae69adb Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 13 Mar 2020 13:41:50 -0400 Subject: [PATCH 251/818] Prevent errors when re-running individual tests. Prior to this change, running a test "back to back" would often result in a `yarn upgrade` failure. This is because the `PackageCache._upgrade` method was only checking to see if `yarn` or `npm` is being used before deciding to call `yarn upgrade`, but if you call `yarn upgrade` without a `yarn.lock` an error is thrown. This tweaks the test harness to remove that failure condition, and we can now run `mocha tests/acceptance/addon-smoke-test-slow.js` multiple times in a row without error. --- tests/helpers/package-cache.js | 10 +- tests/unit/utilities/package-cache-test.js | 168 ++++++++++----------- 2 files changed, 84 insertions(+), 94 deletions(-) diff --git a/tests/helpers/package-cache.js b/tests/helpers/package-cache.js index 757666d437..df2b29eab5 100644 --- a/tests/helpers/package-cache.js +++ b/tests/helpers/package-cache.js @@ -539,9 +539,9 @@ module.exports = class PackageCache { return; } - // Only way to get repeatable behavior in npm: start over. - // We turn an `_upgrade` task into an `_install` task. - if (type === 'npm') { + if (!this._canUpgrade(label, type)) { + // Only way to get repeatable behavior in npm: start over. + // We turn an `_upgrade` task into an `_install` task. fs.removeSync(path.join(this.dirs[label], translate(type, 'path'))); return this._install(label, type); } @@ -553,6 +553,10 @@ module.exports = class PackageCache { upgraded[label] = true; } + _canUpgrade(label, type) { + return type === 'bower' || (type === 'yarn' && fs.existsSync(path.join(this.dirs[label], 'yarn.lock'))); + } + // PUBLIC API BELOW /** diff --git a/tests/unit/utilities/package-cache-test.js b/tests/unit/utilities/package-cache-test.js index 8b595a8699..e7ba95ab68 100644 --- a/tests/unit/utilities/package-cache-test.js +++ b/tests/unit/utilities/package-cache-test.js @@ -385,63 +385,6 @@ describe('PackageCache', function() { }); }); - describe('_upgrade (npm)', function() { - // We're only going to test the invocation pattern boundary. - // Don't want to wait for the install to execute. - let testCounter = 0; - let label; - - beforeEach(function() { - label = `npm-upgrade-test-${testCounter++}`; - testPackageCache._conf.set(label, 'hello'); - }); - - afterEach(function() { - td.reset(); - testPackageCache.destroy(label); - }); - - it('Trigger upgrade.', function() { - // npm is dumb. Upgrades are inconsistent and therefore invalid. - // Make sure npm does an install. - testPackageCache._upgrade(label, 'npm'); - td.verify(npm('install', { cwd: 'hello' }), { times: 1 }); - td.verify(npm(), { times: 1, ignoreExtraArgs: true }); - }); - - it('Make sure npm unlinks, installs, re-links.', function() { - // Add a link. - testPackageCache._writeManifest( - label, - 'npm', - JSON.stringify({ - _packageCache: { - links: ['ember-cli'], - }, - }) - ); - testPackageCache._upgrade(label, 'npm'); - td.verify(npm('unlink', 'ember-cli', { cwd: 'hello' }), { times: 1 }); - td.verify(npm('install', { cwd: 'hello' }), { times: 1 }); - td.verify(npm('link', 'ember-cli', { cwd: 'hello' }), { times: 1 }); - td.verify(npm(), { times: 3, ignoreExtraArgs: true }); - }); - - it('Make sure multiple invocations lock out.', function() { - testPackageCache._upgrade(label, 'npm'); - testPackageCache._upgrade(label, 'npm'); - td.verify(npm('install', { cwd: 'hello' }), { times: 1 }); - td.verify(npm(), { times: 1, ignoreExtraArgs: true }); - }); - - it('locks out _upgrade after _install', function() { - testPackageCache._install(label, 'npm'); - testPackageCache._upgrade(label, 'npm'); - td.verify(npm('install', { cwd: 'hello' }), { times: 1 }); - td.verify(npm(), { times: 1, ignoreExtraArgs: true }); - }); - }); - describe('_upgrade (yarn)', function() { // We're only going to test the invocation pattern boundary. // Don't want to wait for the install to execute. @@ -458,42 +401,85 @@ describe('PackageCache', function() { testPackageCache.destroy(label); }); - it('Trigger upgrade.', function() { - testPackageCache._upgrade(label, 'yarn'); - td.verify(yarn('upgrade', { cwd: 'hello' }), { times: 1 }); - td.verify(yarn(), { times: 1, ignoreExtraArgs: true }); + describe('without yarn.lock', function() { + beforeEach(function() { + testPackageCache._canUpgrade = () => false; + }); + + it('Trigger upgrade.', function() { + testPackageCache._upgrade(label, 'yarn'); + td.verify(yarn('install', { cwd: 'hello' }), { times: 1 }); + td.verify(yarn(), { times: 1, ignoreExtraArgs: true }); + }); + + it('Make sure it unlinks, upgrades, re-links.', function() { + // Add a link. + testPackageCache._writeManifest( + label, + 'yarn', + JSON.stringify({ + _packageCache: { + links: ['ember-cli'], + }, + }) + ); + testPackageCache._upgrade(label, 'yarn'); + td.verify(yarn('unlink', 'ember-cli', { cwd: 'hello' }), { times: 1 }); + td.verify(yarn('install', { cwd: 'hello' }), { times: 1 }); + td.verify(yarn('link', 'ember-cli', { cwd: 'hello' }), { times: 1 }); + td.verify(yarn(), { times: 3, ignoreExtraArgs: true }); + }); + + it('Make sure multiple invocations lock out.', function() { + testPackageCache._upgrade(label, 'yarn'); + testPackageCache._upgrade(label, 'yarn'); + td.verify(yarn('install', { cwd: 'hello' }), { times: 1 }); + td.verify(yarn(), { times: 1, ignoreExtraArgs: true }); + }); }); - it('Make sure it unlinks, upgrades, re-links.', function() { - // Add a link. - testPackageCache._writeManifest( - label, - 'yarn', - JSON.stringify({ - _packageCache: { - links: ['ember-cli'], - }, - }) - ); - testPackageCache._upgrade(label, 'yarn'); - td.verify(yarn('unlink', 'ember-cli', { cwd: 'hello' }), { times: 1 }); - td.verify(yarn('upgrade', { cwd: 'hello' }), { times: 1 }); - td.verify(yarn('link', 'ember-cli', { cwd: 'hello' }), { times: 1 }); - td.verify(yarn(), { times: 3, ignoreExtraArgs: true }); - }); - - it('Make sure multiple invocations lock out.', function() { - testPackageCache._upgrade(label, 'yarn'); - testPackageCache._upgrade(label, 'yarn'); - td.verify(yarn('upgrade', { cwd: 'hello' }), { times: 1 }); - td.verify(yarn(), { times: 1, ignoreExtraArgs: true }); - }); - - it('locks out _upgrade after _install', function() { - testPackageCache._install(label, 'yarn'); - testPackageCache._upgrade(label, 'yarn'); - td.verify(yarn('install', { cwd: 'hello' }), { times: 1 }); - td.verify(yarn(), { times: 1, ignoreExtraArgs: true }); + describe('with yarn.lock', function() { + beforeEach(function() { + testPackageCache._canUpgrade = () => true; + }); + + it('Trigger upgrade.', function() { + testPackageCache._upgrade(label, 'yarn'); + td.verify(yarn('upgrade', { cwd: 'hello' }), { times: 1 }); + td.verify(yarn(), { times: 1, ignoreExtraArgs: true }); + }); + + it('Make sure it unlinks, upgrades, re-links.', function() { + // Add a link. + testPackageCache._writeManifest( + label, + 'yarn', + JSON.stringify({ + _packageCache: { + links: ['ember-cli'], + }, + }) + ); + testPackageCache._upgrade(label, 'yarn'); + td.verify(yarn('unlink', 'ember-cli', { cwd: 'hello' }), { times: 1 }); + td.verify(yarn('upgrade', { cwd: 'hello' }), { times: 1 }); + td.verify(yarn('link', 'ember-cli', { cwd: 'hello' }), { times: 1 }); + td.verify(yarn(), { times: 3, ignoreExtraArgs: true }); + }); + + it('Make sure multiple invocations lock out.', function() { + testPackageCache._upgrade(label, 'yarn'); + testPackageCache._upgrade(label, 'yarn'); + td.verify(yarn('upgrade', { cwd: 'hello' }), { times: 1 }); + td.verify(yarn(), { times: 1, ignoreExtraArgs: true }); + }); + + it('locks out _upgrade after _install', function() { + testPackageCache._install(label, 'yarn'); + testPackageCache._upgrade(label, 'yarn'); + td.verify(yarn('install', { cwd: 'hello' }), { times: 1 }); + td.verify(yarn(), { times: 1, ignoreExtraArgs: true }); + }); }); }); From c30ed27181257ab4319b3a06134e13067ac1e76e Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Thu, 27 Feb 2020 22:32:05 -0700 Subject: [PATCH 252/818] fail tests on unhandled rejections (cherry picked from commit d564247a79409ccb70861a529267459e1a5b239d) --- lib/tasks/addon-install.js | 2 +- .../middleware/history-support/index.js | 13 +-- .../server/middleware/tests-server/index.js | 75 +++++++++-------- lib/utilities/open-editor.js | 7 +- package.json | 1 + tests/integration/models/blueprint-test.js | 54 ++++++------ tests/runner.js | 4 +- tests/unit/docs-lint-test.js | 82 +++++++++++-------- tests/unit/tasks/addon-install-test.js | 6 +- tests/unit/tasks/git-init-test.js | 1 - .../tasks/server/livereload-server-test.js | 43 +++++----- .../server/middleware/tests-server-test.js | 4 +- tests/unit/utilities/open-editor-test.js | 50 ++++++++--- 13 files changed, 202 insertions(+), 140 deletions(-) diff --git a/lib/tasks/addon-install.js b/lib/tasks/addon-install.js index 19d04f2474..83e57c9035 100644 --- a/lib/tasks/addon-install.js +++ b/lib/tasks/addon-install.js @@ -17,7 +17,7 @@ class AddonInstallTask extends Task { run(options) { const chalk = require('chalk'); let ui = this.ui; - let packageNames = options.packages; + let packageNames = options.packages || []; let blueprintOptions = options.blueprintOptions || {}; let commandOptions = blueprintOptions; diff --git a/lib/tasks/server/middleware/history-support/index.js b/lib/tasks/server/middleware/history-support/index.js index 3426c4fd95..3d31dc14ad 100644 --- a/lib/tasks/server/middleware/history-support/index.js +++ b/lib/tasks/server/middleware/history-support/index.js @@ -2,7 +2,6 @@ const path = require('path'); const fs = require('fs'); -const promiseFinally = require('promise.prototype.finally'); const cleanBaseURL = require('clean-base-url'); class HistorySupportAddon { @@ -48,11 +47,13 @@ class HistorySupportAddon { let baseURL = options.rootURL === '' ? '/' : cleanBaseURL(options.rootURL || options.baseURL); - app.use((req, res, next) => { - const results = watcher.then(results => { + app.use(async (req, _, next) => { + try { + const results = await watcher; if (this.shouldHandleRequest(req, options)) { let assetPath = req.path.slice(baseURL.length); let isFile = false; + try { isFile = fs.statSync(path.join(results.directory, assetPath)).isFile(); } catch (err) { @@ -62,9 +63,9 @@ class HistorySupportAddon { req.serveUrl = `${baseURL}index.html`; } } - }); - - promiseFinally(Promise.resolve(results), next); + } finally { + next(); + } }); } diff --git a/lib/tasks/server/middleware/tests-server/index.js b/lib/tasks/server/middleware/tests-server/index.js index aee289b803..5a87c6a848 100644 --- a/lib/tasks/server/middleware/tests-server/index.js +++ b/lib/tasks/server/middleware/tests-server/index.js @@ -4,9 +4,8 @@ const cleanBaseURL = require('clean-base-url'); const path = require('path'); const fs = require('fs'); const logger = require('heimdalljs-logger')('ember-cli:test-server'); -const promiseFinally = require('promise.prototype.finally'); -class TestsServerAddon { +module.exports = class TestsServerAddon { /** * This addon is used to serve the QUnit or Mocha test runner * at `baseURL + '/tests'`. @@ -27,42 +26,52 @@ class TestsServerAddon { let baseURL = options.rootURL === '' ? '/' : cleanBaseURL(options.rootURL || options.baseURL); let testsPath = `${baseURL}tests`; - app.use((req, res, next) => { - const results = watcher.then(results => { - let acceptHeaders = req.headers.accept || []; - let hasHTMLHeader = acceptHeaders.indexOf('text/html') !== -1; - let hasWildcardHeader = acceptHeaders.indexOf('*/*') !== -1; + app.use(async (req, _, next) => { + let results; + let watcherSuccess; - let isForTests = req.path.indexOf(testsPath) === 0; + try { + results = await watcher; + watcherSuccess = true; + } catch (e) { + watcherSuccess = false; + // the build has failed, the middleware can safely be skipped. + // build error reporting is handled by: + // 1. watcher production stderr + // 2. watcher-middleware serving the error page + } - logger.info('isForTests: %o', isForTests); + if (watcherSuccess) { + rewriteRequestUrlIfBasePageIsNeeded(req, testsPath, baseURL, results.directory); + } - if (isForTests && (hasHTMLHeader || hasWildcardHeader) && req.method === 'GET') { - let assetPath = req.path.slice(baseURL.length); - let filePath = path.join(results.directory, assetPath); + next(); - if (!fs.existsSync(filePath) || !fs.statSync(filePath).isFile()) { - // N.B., `baseURL` will end with a slash as it went through `cleanBaseURL` - let newURL = `${baseURL}tests/index.html`; + if (config.finally) { + config.finally(); + } + }); + } +}; - logger.info( - 'url: %s resolved to path: %s which is not a file. Assuming %s instead', - req.path, - filePath, - newURL - ); - req.url = newURL; - } - } - }); +function rewriteRequestUrlIfBasePageIsNeeded(req, testsPath, baseURL, directory) { + let acceptHeaders = req.headers.accept || []; + let hasHTMLHeader = acceptHeaders.indexOf('text/html') !== -1; + let hasWildcardHeader = acceptHeaders.indexOf('*/*') !== -1; - promiseFinally(promiseFinally(Promise.resolve(results), next), () => { - if (config.finally) { - config.finally(); - } - }); - }); + let isForTests = req.path.indexOf(testsPath) === 0; + + logger.info('isForTests: %o', isForTests); + + if (isForTests && (hasHTMLHeader || hasWildcardHeader) && req.method === 'GET') { + let assetPath = req.path.slice(baseURL.length); + let filePath = path.join(directory, assetPath); + + if (!fs.existsSync(filePath) || !fs.statSync(filePath).isFile()) { + // N.B., `baseURL` will end with a slash as it went through `cleanBaseURL` + let newURL = `${baseURL}tests/index.html`; + logger.info('url: %s resolved to path: %s which is not a file. Assuming %s instead', req.path, filePath, newURL); + req.url = newURL; + } } } - -module.exports = TestsServerAddon; diff --git a/lib/utilities/open-editor.js b/lib/utilities/open-editor.js index 1196166058..055e343383 100644 --- a/lib/utilities/open-editor.js +++ b/lib/utilities/open-editor.js @@ -14,14 +14,17 @@ function openEditor(file) { let editorArgs = openEditor._env().EDITOR.split(' '); let editor = editorArgs.shift(); - let editProcess = openEditor._spawn(editor, [file].concat(editorArgs), { stdio: 'inherit' }); + const args = [file].concat(editorArgs); + let editProcess = openEditor._spawn(editor, args, { stdio: 'inherit' }); return new Promise((resolve, reject) => { editProcess.on('close', code => { if (code === 0) { resolve(); } else { - reject(); + reject( + new Error(`Spawn('${editor}', [${args.join(',')}]) exited with a non zero error status code: '${code}'`) + ); } }); }); diff --git a/package.json b/package.json index 8d0f91108e..6cc5f67430 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "scripts": { "docs": "yuidoc", "lint": "eslint . --cache", + "prepack": "yarn docs", "test": "node tests/runner", "test:all": "node tests/runner all", "test:cover": "nyc node tests/runner all", diff --git a/tests/integration/models/blueprint-test.js b/tests/integration/models/blueprint-test.js index 557002983f..9711a0fa26 100644 --- a/tests/integration/models/blueprint-test.js +++ b/tests/integration/models/blueprint-test.js @@ -12,7 +12,7 @@ const util = require('util'); const EOL = require('os').EOL; let root = process.cwd(); -let tmproot = path.join(root, 'tmp'); +let tempRoot = path.join(root, 'tmp'); const SilentError = require('silent-error'); const mkTmpDirIn = require('../../../lib/utilities/mk-tmp-dir-in'); const td = require('testdouble'); @@ -244,7 +244,7 @@ describe('Blueprint', function() { let tmpdir; beforeEach(async function() { - const dir = await mkTmpDirIn(tmproot); + const dir = await mkTmpDirIn(tempRoot); tmpdir = dir; blueprint = new InstrumentedBasicBlueprint(basicBlueprint); ui = new MockUI(); @@ -258,8 +258,8 @@ describe('Blueprint', function() { }; }); - afterEach(function() { - return remove(tmproot); + afterEach(async function() { + await remove(tempRoot); }); it('installs basic files', async function() { @@ -599,7 +599,7 @@ describe('Blueprint', function() { } beforeEach(async function() { - let dir = await mkTmpDirIn(tmproot); + let dir = await mkTmpDirIn(tempRoot); tmpdir = dir; blueprint = new BasicBlueprintClass(basicBlueprint); @@ -614,8 +614,8 @@ describe('Blueprint', function() { refreshUI(); }); - afterEach(function() { - return remove(tmproot); + afterEach(async function() { + await remove(tempRoot); }); it('uninstalls basic files', async function() { @@ -637,9 +637,7 @@ describe('Blueprint', function() { expect(actualFiles.length).to.equal(0); - fs.exists(path.join(tmpdir, 'test.txt'), function(exists) { - expect(exists).to.be.false; - }); + expect(fs.existsSync(path.join(tmpdir, 'test.txt'))).to.be.false; }); it("uninstall doesn't remove non-empty folders", async function() { @@ -683,7 +681,7 @@ describe('Blueprint', function() { } beforeEach(async function() { - let dir = await mkTmpDirIn(tmproot); + let dir = await mkTmpDirIn(tempRoot); tmpdir = dir; blueprint = new InstrumentedBasicBlueprint(basicBlueprint); project = new MockProject(); @@ -693,7 +691,7 @@ describe('Blueprint', function() { }; refreshUI(); await blueprint.install(options); - await resetCalled(); + resetCalled(); refreshUI(); }); @@ -752,8 +750,8 @@ describe('Blueprint', function() { }; }); - afterEach(function() { - return remove(tmproot); + afterEach(async function() { + await remove(tempRoot); }); it('looks up the `npm-install` task', function() { @@ -882,8 +880,8 @@ describe('Blueprint', function() { }; }); - afterEach(function() { - return remove(tmproot); + afterEach(async function() { + await remove(tempRoot); }); it('looks up the `npm-uninstall` task', function() { @@ -922,7 +920,7 @@ describe('Blueprint', function() { }); afterEach(function() { - return remove(tmproot); + return remove(tempRoot); }); it('looks up the `npm-uninstall` task', function() { @@ -1098,8 +1096,8 @@ describe('Blueprint', function() { }; }); - afterEach(function() { - return remove(tmproot); + afterEach(async function() { + await remove(tempRoot); }); it('passes a packages array for addBowerPackagesToProject', function() { @@ -1150,8 +1148,8 @@ describe('Blueprint', function() { }; }); - afterEach(function() { - return remove(tmproot); + afterEach(async function() { + await remove(tempRoot); }); it('looks up the `bower-install` task', function() { @@ -1244,8 +1242,8 @@ describe('Blueprint', function() { blueprint = new Blueprint(basicBlueprint); }); - afterEach(function() { - return remove(tmproot); + afterEach(async function() { + await remove(tempRoot); }); it('passes a packages array for addAddonsToProject', function() { @@ -1280,8 +1278,8 @@ describe('Blueprint', function() { }; }); - afterEach(function() { - return remove(tmproot); + afterEach(async function() { + await remove(tempRoot); }); it('looks up the `addon-install` task', function() { @@ -1409,7 +1407,7 @@ describe('Blueprint', function() { let project; beforeEach(async function() { - let dir = await mkTmpDirIn(tmproot); + let dir = await mkTmpDirIn(tempRoot); tmpdir = dir; blueprint = new Blueprint(basicBlueprint); project = new MockProject(); @@ -1421,8 +1419,8 @@ describe('Blueprint', function() { }; }); - afterEach(function() { - return remove(tmproot); + afterEach(async function() { + await remove(tempRoot); }); it('can lookup other Blueprints from the project blueprintLookupPaths', function() { diff --git a/tests/runner.js b/tests/runner.js index ec111153de..72b6cc7a4d 100644 --- a/tests/runner.js +++ b/tests/runner.js @@ -1,5 +1,7 @@ 'use strict'; - +// process.on('unhandledRejection', e => { +// throw e; +// }); const captureExit = require('capture-exit'); captureExit.captureExit(); diff --git a/tests/unit/docs-lint-test.js b/tests/unit/docs-lint-test.js index 4a600c5e25..4e7d35a67e 100644 --- a/tests/unit/docs-lint-test.js +++ b/tests/unit/docs-lint-test.js @@ -1,45 +1,61 @@ 'use strict'; +/* + * Turns out, YUIDoc attached a process.on('unhandledRejection' handler which + * incorrectly reports any unhandledRejection as a YUIDoc error. This makes + * debugging of unhandledRejections in the ember-cli test suite quite painful + * + * To address YUIDocs behavior, we run YUIDoc isolated in it's own process; + */ +if (!process.env['IS_CHILD_THREAD']) { + const execa = require('execa'); + + describe('YUIDoc', function() { + it('parses without warnings', async function() { + await execa('node', [`--unhandled-rejections=strict`, __filename], { + env: { + IS_CHILD_THREAD: true, + }, + }); + }); + }); + return; +} + const Y = require('yuidocjs'); const EOL = require('os').EOL; -describe('YUIDoc', function() { - let options = Y.Project.init({ - quiet: true, - }); - let yuiDoc = new Y.YUIDoc(options); - - it('parses without warnings', function() { - let json = yuiDoc.run(); +let options = Y.Project.init({ + quiet: true, +}); +let yuiDoc = new Y.YUIDoc(options); - let warnings = {}; - json.warnings.forEach(function(warning) { - let tmp = warning.line.split(':'); - let file = tmp[0].trim(); - let line = tmp[1]; +let json = yuiDoc.run(); - if (!warnings[file]) { - warnings[file] = []; - } +let warnings = {}; +json.warnings.forEach(function(warning) { + let tmp = warning.line.split(':'); + let file = tmp[0].trim(); + let line = tmp[1]; - warnings[file].push({ - line, - message: warning.message, - }); - }); + if (!warnings[file]) { + warnings[file] = []; + } - let message = ''; - Object.keys(warnings).forEach(function(file) { - message += `\t${file} – YUIDoc issues found:${EOL}${EOL}`; - warnings[file].forEach(function(warning) { - message += `\t\tline ${warning.line}: ${warning.message}${EOL}`; - }); - }); + warnings[file].push({ + line, + message: warning.message, + }); +}); - if (message.length) { - let error = new Error(message); - delete error.stack; - throw error; - } +let message = ''; +Object.keys(warnings).forEach(function(file) { + message += `\t${file} – YUIDoc issues found:${EOL}${EOL}`; + warnings[file].forEach(function(warning) { + message += `\t\tline ${warning.line}: ${warning.message}${EOL}`; }); }); + +if (message.length) { + throw new Error(message); +} diff --git a/tests/unit/tasks/addon-install-test.js b/tests/unit/tasks/addon-install-test.js index 27287741fe..314706d79d 100644 --- a/tests/unit/tasks/addon-install-test.js +++ b/tests/unit/tasks/addon-install-test.js @@ -4,14 +4,16 @@ const AddonInstallTask = require('../../../lib/tasks/addon-install'); const expect = require('chai').expect; const CoreObject = require('core-object'); const Promise = require('rsvp').Promise; +const MockUi = require('console-ui/mock'); describe('addon install task', function() { let ui; let project; beforeEach(function() { - ui = { - startProgress() {}, + ui = new MockUi(); + project = { + reloadAddons() {}, }; }); diff --git a/tests/unit/tasks/git-init-test.js b/tests/unit/tasks/git-init-test.js index 104d29bdc3..251634a968 100644 --- a/tests/unit/tasks/git-init-test.js +++ b/tests/unit/tasks/git-init-test.js @@ -63,7 +63,6 @@ describe('git-init', function() { td.when(task._gitVersion()).thenReject(); await task.run(); - td.verify(task._gitVersion(), { times: 1 }); td.verify(task._gitInit(), { times: 0 }); td.verify(task._gitAdd(), { times: 0 }); td.verify(task._gitCommit(td.matchers.anything()), { times: 0 }); diff --git a/tests/unit/tasks/server/livereload-server-test.js b/tests/unit/tasks/server/livereload-server-test.js index c0bd427995..0744e04f20 100644 --- a/tests/unit/tasks/server/livereload-server-test.js +++ b/tests/unit/tasks/server/livereload-server-test.js @@ -60,24 +60,22 @@ describe('livereload-server', function() { expect(!!subject.liveReloadServer).to.equal(false); }); }); - it('informs of error during startup with custom port', function(done) { + it('informs of error during startup with custom port', async function() { let preexistingServer = net.createServer(); preexistingServer.listen(1337); - subject - .setupMiddleware({ + + try { + await subject.setupMiddleware({ liveReload: true, liveReloadPort: 1337, liveReloadPrefix: '/', port: 4200, - }) - .catch(function(reason) { - expect(reason).to.equal( - `Livereload failed on http://localhost:1337. It is either in use or you do not have permission.` - ); - }) - .finally(function() { - preexistingServer.close(done); }); + } catch (e) { + expect(e.message).to.include(`Livereload failed on 'http://localhost:1337', It may be in use.`); + } finally { + await new Promise(resolve => preexistingServer.close(resolve)); + } }); it('starts with custom host, custom port', function() { return subject @@ -126,28 +124,29 @@ describe('livereload-server', function() { expect(subject.liveReloadServer.options.cert).to.be.an.instanceof(Buffer); }); }); - it('informs of error during startup', function(done) { + + it('informs of error during startup', async function() { let preexistingServer = net.createServer(); preexistingServer.listen(1337); - subject - .setupMiddleware({ + try { + await subject.setupMiddleware({ liveReloadPort: 1337, liveReload: true, ssl: true, sslKey: 'tests/fixtures/ssl/server.key', sslCert: 'tests/fixtures/ssl/server.crt', port: 4200, - }) - .catch(function(reason) { - expect(reason).to.equal( - `Livereload failed on https://localhost:1337. It is either in use or you do not have permission.` - ); - }) - .finally(function() { - preexistingServer.close(done); }); + + expect.fail('expected rejection'); + } catch (e) { + expect(e.message).to.include(`Livereload failed on 'https://localhost:1337', It may be in use.`); + } finally { + await new Promise(resolve => preexistingServer.close(resolve)); + } }); + it('correctly runs in https mode with custom port', function() { return subject .setupMiddleware({ diff --git a/tests/unit/tasks/server/middleware/tests-server-test.js b/tests/unit/tasks/server/middleware/tests-server-test.js index 6ec4e1dd43..183aa766dc 100644 --- a/tests/unit/tasks/server/middleware/tests-server-test.js +++ b/tests/unit/tasks/server/middleware/tests-server-test.js @@ -30,7 +30,9 @@ describe('TestServerAddon', function() { addon.serverMiddleware({ app, options: { - watcher: Promise.resolve(), + watcher: Promise.resolve({ + directory: 'some-output-directory', + }), }, finally() { try { diff --git a/tests/unit/utilities/open-editor-test.js b/tests/unit/utilities/open-editor-test.js index e8a0e005b2..cbb3493bdc 100644 --- a/tests/unit/utilities/open-editor-test.js +++ b/tests/unit/utilities/open-editor-test.js @@ -15,24 +15,54 @@ describe('open-editor', function() { td.reset(); }); - it('throws if EDITOR is not set', function() { + it('throws if EDITOR is not set', async function() { td.when(openEditor._env()).thenReturn({}); - expect(() => { - openEditor('test'); - }).to.throw('EDITOR environment variable is not set'); + try { + await openEditor('test'); + expect.fail('expected rejection'); + } catch (e) { + expect(e.message).to.eql('EDITOR environment variable is not set'); + } }); - it('spawns EDITOR with passed file', function() { + it('spawns EDITOR with passed file', async function() { td.when(openEditor._env()).thenReturn({ EDITOR: 'vi' }); - openEditor('test'); + td.when(openEditor._spawn(td.matchers.anything(), td.matchers.anything(), td.matchers.anything())).thenReturn({ + on(event, cb) { + cb(0); + }, + }); + + await openEditor('test'); td.verify(openEditor._spawn('vi', ['test'], { stdio: 'inherit' })); }); - it('throws if no file option is provided', function() { + it('spawns EDITOR with passed file (rejection scenario)', async function() { td.when(openEditor._env()).thenReturn({ EDITOR: 'vi' }); - expect(() => { - openEditor(); - }).to.throw('No `file` option provided'); + td.when(openEditor._spawn(td.matchers.anything(), td.matchers.anything(), td.matchers.anything())).thenReturn({ + on(event, cb) { + cb(-1); + }, + }); + + try { + await openEditor('test'); + expect.fail('expected rejection'); + } catch (e) { + expect(e.message).to.include(`exited with a non zero error status code: '-1'`); + } + + td.verify(openEditor._spawn('vi', ['test'], { stdio: 'inherit' })); + }); + it('throws if no file option is provided', async function() { + td.when(openEditor._env()).thenReturn({ EDITOR: 'vi' }); + + try { + await openEditor(); + expect.fail('expected rejection'); + } catch (e) { + expect(e.message).to.eql('No `file` option provided'); + } }); describe('.canEdit()', function() { From c377300bb21485faf0137ce69b54a10b3a458828 Mon Sep 17 00:00:00 2001 From: Sivakumar Kailasam Date: Thu, 13 Feb 2020 18:17:01 -0500 Subject: [PATCH 253/818] Publish yuidoc json as a part of npm package (cherry picked from commit 5aa4fa188e7649915e7cd3db1dd7983a39a25a7c) --- .npmignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.npmignore b/.npmignore index 95112164c5..7b5f0c9368 100644 --- a/.npmignore +++ b/.npmignore @@ -9,3 +9,4 @@ *.log !/.travis.yml /yarn.lock +!docs/build/data.json From 0a8d7a18b5f27147f2cec5574625e53784841601 Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Wed, 26 Feb 2020 14:36:07 +0000 Subject: [PATCH 254/818] consistently 'use strict'; for our node js files right now some files have it and some don't (cherry picked from commit 2ec95eb4cbb3d8e8a928ecdd5d9751bf1bc67b3c) --- blueprints/app/files/.eslintrc.js | 2 ++ blueprints/app/files/testem.js | 2 ++ tests/fixtures/addon/.eslintrc.js | 2 ++ tests/fixtures/app/.eslintrc.js | 2 ++ 4 files changed, 8 insertions(+) diff --git a/blueprints/app/files/.eslintrc.js b/blueprints/app/files/.eslintrc.js index 11921a10ba..351c1fb271 100644 --- a/blueprints/app/files/.eslintrc.js +++ b/blueprints/app/files/.eslintrc.js @@ -1,3 +1,5 @@ +'use strict'; + module.exports = { root: true, parser: 'babel-eslint', diff --git a/blueprints/app/files/testem.js b/blueprints/app/files/testem.js index 02423c6845..49f53feed6 100644 --- a/blueprints/app/files/testem.js +++ b/blueprints/app/files/testem.js @@ -1,3 +1,5 @@ +'use strict'; + module.exports = { test_page: 'tests/index.html?hidepassed', disable_watching: true, diff --git a/tests/fixtures/addon/.eslintrc.js b/tests/fixtures/addon/.eslintrc.js index c4b7c4129c..85a190092e 100644 --- a/tests/fixtures/addon/.eslintrc.js +++ b/tests/fixtures/addon/.eslintrc.js @@ -1,3 +1,5 @@ +'use strict'; + module.exports = { root: true, parser: 'babel-eslint', diff --git a/tests/fixtures/app/.eslintrc.js b/tests/fixtures/app/.eslintrc.js index f2fa7e537b..f3c9d4f26e 100644 --- a/tests/fixtures/app/.eslintrc.js +++ b/tests/fixtures/app/.eslintrc.js @@ -1,3 +1,5 @@ +'use strict'; + module.exports = { root: true, parser: 'babel-eslint', From 1379d76dc21973941b08a1eac55366fa4c0f481a Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Thu, 27 Feb 2020 22:32:05 -0700 Subject: [PATCH 255/818] fail tests on unhandled rejections (cherry picked from commit 23d2ef85d6e3f022add6f7b46d6259332e8ff3d7) --- tests/unit/docs-lint-test.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/unit/docs-lint-test.js b/tests/unit/docs-lint-test.js index 4e7d35a67e..6681c48226 100644 --- a/tests/unit/docs-lint-test.js +++ b/tests/unit/docs-lint-test.js @@ -7,14 +7,16 @@ * * To address YUIDocs behavior, we run YUIDoc isolated in it's own process; */ -if (!process.env['IS_CHILD_THREAD']) { + +const ENV_VAR = '' + Math.random(); +if (!process.env[ENV_VAR]) { const execa = require('execa'); describe('YUIDoc', function() { it('parses without warnings', async function() { await execa('node', [`--unhandled-rejections=strict`, __filename], { env: { - IS_CHILD_THREAD: true, + [ENV_VAR]: true, }, }); }); From 64e635c48c76f177769ca73eb9a228149ffbd863 Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Fri, 28 Feb 2020 17:04:59 -0700 Subject: [PATCH 256/818] [BUGFIXA] [Fixes #9007] Ensure buildFailures are reported correctly (cherry picked from commit ce7d83eaf1fe2c41d66570f55384eee02a35bf5c) --- lib/models/watcher.js | 41 +++--- package.json | 2 +- tests/acceptance/smoke-test-slow.js | 38 ++++++ tests/helpers/run-command.js | 10 +- tests/integration/models/blueprint-test.js | 24 ++-- tests/unit/docs-lint-test.js | 5 +- tests/unit/models/builder-test.js | 7 +- tests/unit/models/watcher-test.js | 29 +++++ yarn.lock | 139 ++++++++++++++++++--- 9 files changed, 244 insertions(+), 51 deletions(-) diff --git a/lib/models/watcher.js b/lib/models/watcher.js index dbdbf0305b..21b37e25b4 100644 --- a/lib/models/watcher.js +++ b/lib/models/watcher.js @@ -31,7 +31,11 @@ module.exports = class Watcher extends CoreObject { this.watcher.on('buildStart', this._setupBroccoliWatcherBuild.bind(this)); this.watcher.on('buildSuccess', this.didChange.bind(this)); + // build errors arriving via watcher + this.watcher.on('buildFailure', this.didError.bind(this)); + // watcher specific errors this.watcher.on('error', this.didError.bind(this)); + this.serveURL = serveURL; } @@ -56,23 +60,28 @@ module.exports = class Watcher extends CoreObject { } } - _setupBroccoliWatcherBuild() { - let heimdallNode; - - promiseFinally( - this.watcher.currentBuild.then(hash => { - heimdallNode = hash.graph.__heimdall__; - return hash; - }), - () => { - // guard against `build` rejecting - if (heimdallNode) { - // remove the heimdall subtree for this build so we don't leak. If - // BROCCOLI_VIZ=1 then we have already output the json in `verboseOutput`. - heimdallNode.remove(); - } + async _setupBroccoliWatcherBuild() { + try { + const hash = await this.watcher.currentBuild; + hash.graph.__heimdall__.remove(); + } catch (e) { + if (e !== null && typeof e === 'object' && e.isBuilderError === true) { + // e must be a builder error which we can safely ignore. + // + // Builder errors are expected failures which are handled and presented + // to the user else-where. To prevent double reporting faliures to the + // user, it is important that we ignore them here as this functions + // single responsibilty is to reset the himedall state after each build. + // + // exists to prune heimdall data after a build. Those errors are + // reported elsewhere. + // + } else { + // this error is unexpected, we must re-throw as we cannot be sure it + // has been handled else-where + throw e; } - ); + } } _totalTime(hash) { diff --git a/package.json b/package.json index 6cc5f67430..ed11609403 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "babel-plugin-module-resolver": "^4.0.0", "bower-config": "^1.4.1", "bower-endpoint-parser": "0.2.2", - "broccoli": "^3.2.0", + "broccoli": "^3.3.3", "broccoli-amd-funnel": "^2.0.1", "broccoli-babel-transpiler": "^7.3.0", "broccoli-builder": "^0.18.14", diff --git a/tests/acceptance/smoke-test-slow.js b/tests/acceptance/smoke-test-slow.js index 33118d4ab7..011c2a3e34 100644 --- a/tests/acceptance/smoke-test-slow.js +++ b/tests/acceptance/smoke-test-slow.js @@ -335,6 +335,44 @@ describe('Acceptance: smoke-test', function() { } }); + it('build failures should be logged correctly', async function() { + fs.writeFileSync( + `${process.cwd()}/ember-cli-build.js`, + ` +const Plugin = require('broccoli-plugin'); + +module.exports = function() { + return new class extends Plugin { + constructor() { + super([]); + } + build() { + throw new Error('I AM A BUILD FAILURE'); + } + } +} + ` + ); + + await runCommand( + path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), + 'server', + '--port=54323', + '--live-reload=false', + { + onOutput(string, child) { + if (string.includes('I AM A BUILD FAILURE')) { + killCliProcess(child); + } + }, + onError(string, child) { + if (string.includes('I AM A BUILD FAILURE')) { + killCliProcess(child); + } + }, + } + ); + }); it.skip('ember new foo, server, SIGINT clears tmp/', async function() { let result = await runCommand( path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), diff --git a/tests/helpers/run-command.js b/tests/helpers/run-command.js index 7e99ce231a..018f142378 100644 --- a/tests/helpers/run-command.js +++ b/tests/helpers/run-command.js @@ -7,6 +7,7 @@ const defaults = require('ember-cli-lodash-subset').defaults; const killCliProcess = require('./kill-cli-process'); const logOnFailure = require('./log-on-failure'); let debug = require('heimdalljs-logger')('run-command'); +const captureExit = require('capture-exit'); module.exports = function run(/* command, args, options */) { let command = arguments[0]; @@ -44,9 +45,9 @@ module.exports = function run(/* command, args, options */) { options.log(` Running: ${command} ${args.join(' ')} in: ${process.cwd()}`); let opts = {}; + args = [`--unhandled-rejections=strict`, `${command}`].concat(args); + command = 'node'; if (process.platform === 'win32') { - args = [`"${command}"`].concat(args); - command = 'node'; opts.windowsVerbatimArguments = true; opts.stdio = [null, null, null, 'ipc']; } @@ -54,8 +55,11 @@ module.exports = function run(/* command, args, options */) { opts.env = defaults(options.env, process.env); } - debug.info('command: %s, args: %o', command, args); + debug.info('runCommand: %s, args: %o', command, args); let child = spawn(command, args, opts); + // ensure we tear down the child process on exit; + captureExit.onExit(() => killCliProcess(child)); + let result = { output: [], errors: [], diff --git a/tests/integration/models/blueprint-test.js b/tests/integration/models/blueprint-test.js index 9711a0fa26..621e177050 100644 --- a/tests/integration/models/blueprint-test.js +++ b/tests/integration/models/blueprint-test.js @@ -526,19 +526,25 @@ describe('Blueprint', function() { }).to.throw(SilentError, /The `ember generate ` command requires an entity name to be specified./); }); - it('throws error when an action does not exist', function() { + it('throws error when an action does not exist', async function() { blueprint._actions = {}; - return blueprint.install(options).catch(function(err) { - expect(err.message).to.equal('Tried to call action "write" but it does not exist'); - }); + try { + await blueprint.install(options); + expect.fail('expected rejection'); + } catch (e) { + expect(e.message).to.equal('Tried to call action "write" but it does not exist'); + } }); - it('calls normalizeEntityName hook during install', function(done) { - blueprint.normalizeEntityName = function() { - done(); - }; + it('calls normalizeEntityName hook during install', async function() { + const wait = new Promise(resolve => { + blueprint.normalizeEntityName = function() { + resolve(); + }; + }); options.entity = { name: 'foo' }; - blueprint.install(options); + await blueprint.install(options); + await wait; }); it('normalizeEntityName hook can modify the entity name', async function() { diff --git a/tests/unit/docs-lint-test.js b/tests/unit/docs-lint-test.js index 6681c48226..a25ead32ab 100644 --- a/tests/unit/docs-lint-test.js +++ b/tests/unit/docs-lint-test.js @@ -8,15 +8,14 @@ * To address YUIDocs behavior, we run YUIDoc isolated in it's own process; */ -const ENV_VAR = '' + Math.random(); -if (!process.env[ENV_VAR]) { +if (!process.env['IS_CHILD']) { const execa = require('execa'); describe('YUIDoc', function() { it('parses without warnings', async function() { await execa('node', [`--unhandled-rejections=strict`, __filename], { env: { - [ENV_VAR]: true, + IS_CHILD: true, }, }); }); diff --git a/tests/unit/models/builder-test.js b/tests/unit/models/builder-test.js index 028ce5fc8c..700f042a21 100644 --- a/tests/unit/models/builder-test.js +++ b/tests/unit/models/builder-test.js @@ -17,12 +17,11 @@ let expect = chai.expect; let file = chai.file; let root = process.cwd(); -let tmproot = path.join(root, 'tmp'); +let tmpRoot = path.join(root, 'tmp'); let Builder; const Promise = RSVP.Promise; -const remove = RSVP.denodeify(fs.remove); describe('models/builder.js', function() { let addon, builder, buildResults, tmpdir; @@ -62,7 +61,7 @@ describe('models/builder.js', function() { describe('copyToOutputPath', function() { beforeEach(async function() { - tmpdir = await mkTmpDirIn(tmproot); + tmpdir = await mkTmpDirIn(tmpRoot); let project = new MockProject(); builder = new Builder({ project, @@ -72,7 +71,7 @@ describe('models/builder.js', function() { }); afterEach(function() { - return remove(tmproot); + return fs.remove(tmpRoot); }); (ci.APPVEYOR ? it.skip : it)('allows for non-existent output-paths at arbitrary depth', function() { diff --git a/tests/unit/models/watcher-test.js b/tests/unit/models/watcher-test.js index 3dcb08ca45..2b434fbd36 100644 --- a/tests/unit/models/watcher-test.js +++ b/tests/unit/models/watcher-test.js @@ -301,6 +301,35 @@ describe('Watcher', function() { ]); }); + it('watcher error', function() { + watcher.emit('error', { + message: 'foo', + stack: new Error().stack, + }); + + expect(ui.output).to.equal(''); + + let outs = ui.errors.split(EOL); + + expect(outs[0]).to.equal(chalk.red('foo')); + }); + + it('watcher buildFailure', function() { + watcher.emit('buildFailure', { + isBuilderError: true, + message: 'I am a build error', + file: 'the-file.txt', + stack: new Error().stack, + }); + + expect(ui.output).to.equal(''); + + let outs = ui.errors.split(EOL); + + expect(outs[0]).to.equal(chalk.red('File: the-file.txt')); + expect(outs[2]).to.equal(chalk.red('I am a build error')); + }); + it('emits without error.file', function() { subject.didError( new BuildError({ diff --git a/yarn.lock b/yarn.lock index fdfe849a88..5bb6ae98b3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -262,16 +262,60 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd" integrity sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow== +"@types/body-parser@*": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.0.tgz#0685b3c47eb3006ffed117cdd55164b61f80538f" + integrity sha512-W98JrE0j2K78swW4ukqMleo8R7h/pFETjM2DQ90MF6XK2i4LO4W3gQ71Lt4w3bfm2EvVSyWHplECvB5sK22yFQ== + dependencies: + "@types/connect" "*" + "@types/node" "*" + +"@types/chai-as-promised@^7.1.2": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-7.1.2.tgz#2f564420e81eaf8650169e5a3a6b93e096e5068b" + integrity sha512-PO2gcfR3Oxa+u0QvECLe1xKXOqYTzCmWf0FhLhjREoW3fPAVamjihL7v1MOVLJLsnAMdLcjkfrs01yvDMwVK4Q== + dependencies: + "@types/chai" "*" + +"@types/chai@*", "@types/chai@^4.2.9": + version "4.2.9" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.9.tgz#194332625ed2ae914aef00b8d5ca3b77e7924cc6" + integrity sha512-NeXgZj+MFL4izGqA4sapdYzkzQG+MtGra9vhQ58dnmDY++VgJaRUws+aLVV5zRJCYJl/8s9IjMmhiUw1WsKSmw== + "@types/color-name@^1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== +"@types/connect@*": + version "3.4.33" + resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.33.tgz#31610c901eca573b8713c3330abc6e6b9f588546" + integrity sha512-2+FrkXY4zllzTNfJth7jOqEHC+enpLeGslEhpnTAkg21GkRrWV4SsAtqchtT4YS9/nODBU2/ZfsBY2X4J/dX7A== + dependencies: + "@types/node" "*" + "@types/events@*": version "3.0.0" resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g== +"@types/express-serve-static-core@*": + version "4.17.2" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.2.tgz#f6f41fa35d42e79dbf6610eccbb2637e6008a0cf" + integrity sha512-El9yMpctM6tORDAiBwZVLMcxoTMcqqRO9dVyYcn7ycLWbvR8klrDn8CAOwRfZujZtWD7yS/mshTdz43jMOejbg== + dependencies: + "@types/node" "*" + "@types/range-parser" "*" + +"@types/express@^4.17.2": + version "4.17.2" + resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.2.tgz#a0fb7a23d8855bac31bc01d5a58cadd9b2173e6c" + integrity sha512-5mHFNyavtLoJmnusB8OKJ5bshSzw+qkMIBAobLrIM48HJvunFva9mOa6aBwh64lBFyNwBbs0xiEFuj4eU/NjCA== + dependencies: + "@types/body-parser" "*" + "@types/express-serve-static-core" "*" + "@types/serve-static" "*" + "@types/fs-extra@^5.0.5": version "5.1.0" resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-5.1.0.tgz#2a325ef97901504a3828718c390d34b8426a10a1" @@ -288,6 +332,11 @@ "@types/minimatch" "*" "@types/node" "*" +"@types/mime@*": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@types/mime/-/mime-2.0.1.tgz#dc488842312a7f075149312905b5e3c0b054c79d" + integrity sha512-FwI9gX75FgVBJ7ywgnq/P7tw+/o1GUbtP0KzbtusLigAOgIgNISRK0ZPl4qertvXSIE8YbsVJueQ90cDt9YYyw== + "@types/minimatch@*", "@types/minimatch@^3.0.3": version "3.0.3" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" @@ -303,6 +352,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.7.tgz#01e4ea724d9e3bd50d90c11fd5980ba317d8fa11" integrity sha512-E6Zn0rffhgd130zbCbAr/JdXfXkoOUFAKNs/rF8qnafSJ8KYaA/j3oz7dcwal+lYjLA7xvdd5J4wdYpCTlP8+w== +"@types/range-parser@*": + version "1.2.3" + resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.3.tgz#7ee330ba7caafb98090bece86a5ee44115904c2c" + integrity sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA== + "@types/rimraf@^2.0.2": version "2.0.2" resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-2.0.2.tgz#7f0fc3cf0ff0ad2a99bb723ae1764f30acaf8b6e" @@ -311,6 +365,14 @@ "@types/glob" "*" "@types/node" "*" +"@types/serve-static@*": + version "1.13.3" + resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.3.tgz#eb7e1c41c4468272557e897e9171ded5e2ded9d1" + integrity sha512-oprSwp094zOglVrXdlo/4bAHtKTAxX6VT8FOZlBKrmyLbNvE1zxZyJ6yikMVtHIvwP45+ZQGJn+FdXGKTozq0g== + dependencies: + "@types/express-serve-static-core" "*" + "@types/mime" "*" + "@types/symlink-or-copy@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@types/symlink-or-copy/-/symlink-or-copy-1.2.0.tgz#4151a81b4052c80bc2becbae09f3a9ec010a9c7a" @@ -1126,33 +1188,35 @@ broccoli@^2.0.0: underscore.string "^3.2.2" watch-detector "^0.1.0" -broccoli@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/broccoli/-/broccoli-3.2.0.tgz#6b5a89b8d6d0c733d39aa23ac5b43d85f56fafab" - integrity sha512-n58yqAbV2Zbg+HXmBGBOUoDOgbCM0hMJtqvnPDF89Jwk3ZBVhD5/UKW0diY6l3DbB5+j92NCDQVd9HqO+WYFYA== +broccoli@^3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/broccoli/-/broccoli-3.3.3.tgz#f4034b2495b709e99dd7e7d8834bf4a01bb4d0d7" + integrity sha512-MFyAk94I8XcSmfDZ0DtXlkgDvWL/U2lGbFpWiU1OPBGyUNC5WgWElC2U18SEFuDc0GncZfUaIxN+QAALrs4fAQ== dependencies: + "@types/chai" "^4.2.9" + "@types/chai-as-promised" "^7.1.2" + "@types/express" "^4.17.2" ansi-html "^0.0.7" broccoli-node-info "^2.1.0" broccoli-slow-trees "^3.0.1" - broccoli-source "^1.1.0" - commander "^2.15.1" + broccoli-source "^3.0.0" + commander "^4.1.1" connect "^3.6.6" console-ui "^3.0.4" esm "^3.2.4" - findup-sync "^2.0.0" - handlebars "^4.0.11" + findup-sync "^4.0.0" + handlebars "^4.7.3" heimdalljs "^0.2.6" heimdalljs-logger "^0.1.9" https "^1.0.0" - mime-types "^2.1.19" - promise.prototype.finally "^3.1.0" + mime-types "^2.1.26" resolve-path "^1.4.0" - rimraf "^2.6.2" + rimraf "^3.0.2" sane "^4.0.0" - tmp "0.0.33" - tree-sync "^1.2.2" + tmp "^0.0.33" + tree-sync "^2.0.0" underscore.string "^3.2.2" - watch-detector "^0.1.0" + watch-detector "^1.0.0" browser-stdout@1.3.1: version "1.3.1" @@ -1538,6 +1602,11 @@ commander@^2.15.1, commander@^2.6.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== +commander@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" + integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== + commander@~2.20.3: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" @@ -2664,6 +2733,16 @@ findup-sync@^2.0.0: micromatch "^3.0.4" resolve-dir "^1.0.1" +findup-sync@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-4.0.0.tgz#956c9cdde804052b881b428512905c4a5f2cdef0" + integrity sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ== + dependencies: + detect-file "^1.0.0" + is-glob "^4.0.0" + micromatch "^4.0.2" + resolve-dir "^1.0.1" + fireworm@^0.7.0: version "0.7.1" resolved "https://registry.yarnpkg.com/fireworm/-/fireworm-0.7.1.tgz#ccf20f7941f108883fcddb99383dbe6e1861c758" @@ -3107,6 +3186,17 @@ handlebars@^4.0.11, handlebars@^4.0.4, handlebars@^4.1.2: optionalDependencies: uglify-js "^3.1.4" +handlebars@^4.7.3: + version "4.7.3" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.3.tgz#8ece2797826886cf8082d1726ff21d2a022550ee" + integrity sha512-SRGwSYuNfx8DwHD/6InAPzD6RgeruWLT+B8e8a7gGs8FWgHzlExpTFMEq2IA6QpAfOClpKHy6+8IqTjeBCu6Kg== + dependencies: + neo-async "^2.6.0" + optimist "^0.6.1" + source-map "^0.6.1" + optionalDependencies: + uglify-js "^3.1.4" + has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" @@ -3564,7 +3654,7 @@ is-glob@^3.1.0: dependencies: is-extglob "^2.1.0" -is-glob@^4.0.1: +is-glob@^4.0.0, is-glob@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== @@ -4574,6 +4664,11 @@ mime-db@1.40.0, "mime-db@>= 1.40.0 < 2": resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.40.0.tgz#a65057e998db090f732a68f6c276d387d4126c32" integrity sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA== +mime-db@1.43.0: + version "1.43.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" + integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== + mime-types@^2.1.12, mime-types@^2.1.18, mime-types@^2.1.19, mime-types@~2.1.24: version "2.1.24" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.24.tgz#b6f8d0b3e951efb77dedeca194cff6d16f676f81" @@ -4581,6 +4676,13 @@ mime-types@^2.1.12, mime-types@^2.1.18, mime-types@^2.1.19, mime-types@~2.1.24: dependencies: mime-db "1.40.0" +mime-types@^2.1.26: + version "2.1.26" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06" + integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== + dependencies: + mime-db "1.43.0" + mime-types@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-1.0.2.tgz#995ae1392ab8affcbfcb2641dd054e943c0d5dce" @@ -5705,6 +5807,13 @@ rimraf@^3.0.0: dependencies: glob "^7.1.3" +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + rsvp@^3.0.14, rsvp@^3.0.17, rsvp@^3.0.18, rsvp@^3.0.21: version "3.6.2" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-3.6.2.tgz#2e96491599a96cde1b515d5674a8f7a91452926a" From 178f271540c294d0d23bf6fd2211d6687191473c Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 13 Mar 2020 17:28:48 -0400 Subject: [PATCH 257/818] Fix linting issue (bad cherry-pick). --- lib/models/watcher.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/models/watcher.js b/lib/models/watcher.js index 21b37e25b4..68f909e54b 100644 --- a/lib/models/watcher.js +++ b/lib/models/watcher.js @@ -5,7 +5,6 @@ const logger = require('heimdalljs-logger')('ember-cli:watcher'); const CoreObject = require('core-object'); const serveURL = require('../utilities/get-serve-url'); const printSlowTrees = require('broccoli-slow-trees'); -const promiseFinally = require('promise.prototype.finally'); const eventTypeNormalization = { add: 'added', From 5f209502d927aa5353f3b01623df5c928fc59f14 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 13 Mar 2020 23:10:28 +0000 Subject: [PATCH 258/818] [Security] Bump acorn from 6.1.1 to 6.4.1 (#9089) --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 2143020f79..aa897b7156 100644 --- a/yarn.lock +++ b/yarn.lock @@ -410,9 +410,9 @@ acorn-jsx@^5.0.0: integrity sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg== acorn@^6.0.7: - version "6.1.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.1.1.tgz#7d25ae05bb8ad1f9b699108e1094ecd7884adc1f" - integrity sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA== + version "6.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" + integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== after@0.8.2: version "0.8.2" From 59f20565ed4cd0f9e76c9825056f181cd81da90d Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sat, 14 Mar 2020 15:59:18 -0400 Subject: [PATCH 259/818] Add v3.16.1 to CHANGELOG. --- CHANGELOG.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b44f474b7a..842fb128ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # ember-cli Changelog +## v3.16.1 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.16.0...v3.16.1) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.16.0...v3.16.1) + +#### Changelog + +- [#9090](https://github.com/ember-cli/ember-cli/pull/9090) Backports of critical bugfixes to LTS (3.16) [@rwjblue](https://github.com/rwjblue) +- [#9045](https://github.com/ember-cli/ember-cli/pull/9045) Add final newline in CONTRIBUTING.md [@kellyselden](https://github.com/kellyselden) +- [c30ed27181257ab4319b3a06134e13067ac1e76e](https://github.com/ember-cli/ember-cli/commit/c30ed27181257ab4319b3a06134e13067ac1e76e) Handle a number of unhandled rejections scenarios [@stefanpenner](https://github.com/stefanpenner) +- [c377300bb21485faf0137ce69b54a10b3a458828](https://github.com/ember-cli/ember-cli/commit/c377300bb21485faf0137ce69b54a10b3a458828) Publish yuidoc json as a part of npm package [@sivakumar-kailasam](https://github.com/sivakumar-kailasam) +- [0a8d7a18b5f27147f2cec5574625e53784841601](https://github.com/ember-cli/ember-cli/commit/0a8d7a18b5f27147f2cec5574625e53784841601) Consistently 'use strict'; for our node js files [@kellyselden](https://github.com/kellyselden) +- [64e635c48c76f177769ca73eb9a228149ffbd863](https://github.com/ember-cli/ember-cli/commit/64e635c48c76f177769ca73eb9a228149ffbd863) Ensure buildFailures are reported correctly [@stefanpenner](https://github.com/stefanpenner) + +Thank you to all who took the time to contribute! ## v3.16.0 From 00a06227f1f8cb8b0dd54d460400f1b04eee6808 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sat, 14 Mar 2020 16:05:29 -0400 Subject: [PATCH 260/818] Update app and addon blueprints to latest dependency versions. --- blueprints/app/files/package.json | 18 +++++++++--------- tests/fixtures/addon/npm/package.json | 14 +++++++------- tests/fixtures/addon/yarn/package.json | 14 +++++++------- tests/fixtures/app/npm/package.json | 18 +++++++++--------- tests/fixtures/app/yarn/package.json | 18 +++++++++--------- 5 files changed, 41 insertions(+), 41 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 4485794f97..495c9a0cfd 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -23,33 +23,33 @@ "@ember/optional-features": "^1.3.0", "@glimmer/component": "^1.0.0", "@glimmer/tracking": "^1.0.0", - "babel-eslint": "^10.0.3", + "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", "ember-auto-import": "^1.5.3", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^3.2.0", - "ember-cli-babel": "^7.17.2", + "ember-cli-babel": "^7.18.0", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^4.2.2", + "ember-cli-htmlbars": "^4.2.3", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-uglify": "^3.0.0", - "ember-data": "~3.17.0-beta.0", + "ember-data": "~3.17.0", "ember-export-application-global": "^2.0.1", - "ember-fetch": "^7.0.0", + "ember-fetch": "^7.0.1", "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", - "ember-source": "~3.17.0-beta.1", - "ember-template-lint": "^2.0.0<% if (welcome) { %>", + "ember-source": "~3.17.0", + "ember-template-lint": "^2.4.0<% if (welcome) { %>", "ember-welcome-page": "^4.0.0<% } %>", "eslint": "^6.8.0", - "eslint-plugin-ember": "^7.7.2", + "eslint-plugin-ember": "^7.10.1", "eslint-plugin-node": "^11.0.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "qunit-dom": "^1.0.0" + "qunit-dom": "^1.1.0" }, "engines": { "node": "10.* || >= 12" diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index 4ed84b9d46..ac1a30dedf 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -23,14 +23,14 @@ "test:ember-compatibility": "ember try:each" }, "dependencies": { - "ember-cli-babel": "^7.17.2", - "ember-cli-htmlbars": "^4.2.2" + "ember-cli-babel": "^7.18.0", + "ember-cli-htmlbars": "^4.2.3" }, "devDependencies": { "@ember/optional-features": "^1.3.0", "@glimmer/component": "^1.0.0", "@glimmer/tracking": "^1.0.0", - "babel-eslint": "^10.0.3", + "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", "ember-auto-import": "^1.5.3", "ember-cli": "~<%= emberCLIVersion %>", @@ -44,16 +44,16 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", - "ember-source": "~3.17.0-beta.1", + "ember-source": "~3.17.0", "ember-source-channel-url": "^2.0.1", - "ember-template-lint": "^2.0.0", + "ember-template-lint": "^2.4.0", "ember-try": "^1.4.0", "eslint": "^6.8.0", - "eslint-plugin-ember": "^7.7.2", + "eslint-plugin-ember": "^7.10.1", "eslint-plugin-node": "^11.0.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "qunit-dom": "^1.0.0" + "qunit-dom": "^1.1.0" }, "engines": { "node": "10.* || >= 12" diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 87a41e544e..723eda13e5 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -23,14 +23,14 @@ "test:ember-compatibility": "ember try:each" }, "dependencies": { - "ember-cli-babel": "^7.17.2", - "ember-cli-htmlbars": "^4.2.2" + "ember-cli-babel": "^7.18.0", + "ember-cli-htmlbars": "^4.2.3" }, "devDependencies": { "@ember/optional-features": "^1.3.0", "@glimmer/component": "^1.0.0", "@glimmer/tracking": "^1.0.0", - "babel-eslint": "^10.0.3", + "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", "ember-auto-import": "^1.5.3", "ember-cli": "~<%= emberCLIVersion %>", @@ -44,17 +44,17 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", - "ember-source": "~3.17.0-beta.1", + "ember-source": "~3.17.0", "ember-source-channel-url": "^2.0.1", - "ember-template-lint": "^2.0.0", + "ember-template-lint": "^2.4.0", "ember-try": "^1.4.0", "ember-welcome-page": "^4.0.0", "eslint": "^6.8.0", - "eslint-plugin-ember": "^7.7.2", + "eslint-plugin-ember": "^7.10.1", "eslint-plugin-node": "^11.0.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "qunit-dom": "^1.0.0" + "qunit-dom": "^1.1.0" }, "engines": { "node": "10.* || >= 12" diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index a19fcbf1f7..47c1f135cd 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -23,32 +23,32 @@ "@ember/optional-features": "^1.3.0", "@glimmer/component": "^1.0.0", "@glimmer/tracking": "^1.0.0", - "babel-eslint": "^10.0.3", + "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", "ember-auto-import": "^1.5.3", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^3.2.0", - "ember-cli-babel": "^7.17.2", + "ember-cli-babel": "^7.18.0", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^4.2.2", + "ember-cli-htmlbars": "^4.2.3", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-uglify": "^3.0.0", - "ember-data": "~3.17.0-beta.0", + "ember-data": "~3.17.0", "ember-export-application-global": "^2.0.1", - "ember-fetch": "^7.0.0", + "ember-fetch": "^7.0.1", "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", - "ember-source": "~3.17.0-beta.1", - "ember-template-lint": "^2.0.0", + "ember-source": "~3.17.0", + "ember-template-lint": "^2.4.0", "eslint": "^6.8.0", - "eslint-plugin-ember": "^7.7.2", + "eslint-plugin-ember": "^7.10.1", "eslint-plugin-node": "^11.0.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "qunit-dom": "^1.0.0" + "qunit-dom": "^1.1.0" }, "engines": { "node": "10.* || >= 12" diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index ee8a04d7eb..20ef12ad7d 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -23,33 +23,33 @@ "@ember/optional-features": "^1.3.0", "@glimmer/component": "^1.0.0", "@glimmer/tracking": "^1.0.0", - "babel-eslint": "^10.0.3", + "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", "ember-auto-import": "^1.5.3", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^3.2.0", - "ember-cli-babel": "^7.17.2", + "ember-cli-babel": "^7.18.0", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^4.2.2", + "ember-cli-htmlbars": "^4.2.3", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-uglify": "^3.0.0", - "ember-data": "~3.17.0-beta.0", + "ember-data": "~3.17.0", "ember-export-application-global": "^2.0.1", - "ember-fetch": "^7.0.0", + "ember-fetch": "^7.0.1", "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", - "ember-source": "~3.17.0-beta.1", - "ember-template-lint": "^2.0.0", + "ember-source": "~3.17.0", + "ember-template-lint": "^2.4.0", "ember-welcome-page": "^4.0.0", "eslint": "^6.8.0", - "eslint-plugin-ember": "^7.7.2", + "eslint-plugin-ember": "^7.10.1", "eslint-plugin-node": "^11.0.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "qunit-dom": "^1.0.0" + "qunit-dom": "^1.1.0" }, "engines": { "node": "10.* || >= 12" From 5cd21bf8f423b8e1f91d7f9d8f26c7ac46134e00 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sat, 14 Mar 2020 16:09:15 -0400 Subject: [PATCH 261/818] Update ember-source and ember-data to 3.18 betas. --- blueprints/app/files/package.json | 4 ++-- tests/fixtures/addon/npm/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/npm/package.json | 4 ++-- tests/fixtures/app/yarn/package.json | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 4485794f97..761111635d 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -34,14 +34,14 @@ "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-uglify": "^3.0.0", - "ember-data": "~3.17.0-beta.0", + "ember-data": "~3.18.0-beta.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^7.0.0", "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", - "ember-source": "~3.17.0-beta.1", + "ember-source": "~3.18.0-beta.1", "ember-template-lint": "^2.0.0<% if (welcome) { %>", "ember-welcome-page": "^4.0.0<% } %>", "eslint": "^6.8.0", diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json index 4ed84b9d46..bfdb17ee41 100644 --- a/tests/fixtures/addon/npm/package.json +++ b/tests/fixtures/addon/npm/package.json @@ -44,7 +44,7 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", - "ember-source": "~3.17.0-beta.1", + "ember-source": "~3.18.0-beta.1", "ember-source-channel-url": "^2.0.1", "ember-template-lint": "^2.0.0", "ember-try": "^1.4.0", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 87a41e544e..1fb2c61318 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -44,7 +44,7 @@ "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", - "ember-source": "~3.17.0-beta.1", + "ember-source": "~3.18.0-beta.1", "ember-source-channel-url": "^2.0.1", "ember-template-lint": "^2.0.0", "ember-try": "^1.4.0", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index a19fcbf1f7..0168fde19b 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -34,14 +34,14 @@ "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-uglify": "^3.0.0", - "ember-data": "~3.17.0-beta.0", + "ember-data": "~3.18.0-beta.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^7.0.0", "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", - "ember-source": "~3.17.0-beta.1", + "ember-source": "~3.18.0-beta.1", "ember-template-lint": "^2.0.0", "eslint": "^6.8.0", "eslint-plugin-ember": "^7.7.2", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index ee8a04d7eb..6d80ae8532 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -34,14 +34,14 @@ "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-uglify": "^3.0.0", - "ember-data": "~3.17.0-beta.0", + "ember-data": "~3.18.0-beta.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^7.0.0", "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^4.6.0", "ember-resolver": "^7.0.0", - "ember-source": "~3.17.0-beta.1", + "ember-source": "~3.18.0-beta.1", "ember-template-lint": "^2.0.0", "ember-welcome-page": "^4.0.0", "eslint": "^6.8.0", From 789e46bee81cdc8461642086292f844f9dfaba7e Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sat, 14 Mar 2020 16:26:24 -0400 Subject: [PATCH 262/818] Release 3.16.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ed11609403..553e554289 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.16.0", + "version": "3.16.1", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From d93e4eef9fc48fa4218c0faa69a8df748a10e6e9 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sat, 14 Mar 2020 17:58:29 -0400 Subject: [PATCH 263/818] Migrate supported Node version detection to use GitHub Actions config. The `PlatformChecker` reads the Node versions that are being tested in CI to decide if we should print a message to the console upon booting. When running on a supported (based on our `package.json`'s `engines.node`) but untested (e.g. not tested in CI) the following message is printed: > Node ${process.version} is not tested against Ember CLI on your > platform. We recommend that you use the most-recent "Active LTS" > version of Node.js. See https://git.io/v7S5n for details. However, when running on an unsupported version of Node (e.g. a version not covered by our `package.json`s `engines.node`) the following message is printed: > Node ${process.version} is no longer supported by Ember CLI. > We recommend that you use the most-recent "Active LTS" > version of Node.js. See https://git.io/v7S5n for details. --- This change updates the `PlatformChecker` to use the GitHub Actions configuration (`.github/workflows/ci.yml`) instead of using `.travis.yml` and `appveyor.yml`. --- .npmignore | 8 +++++- docs/node-support.md | 2 -- lib/utilities/platform-checker.js | 28 ++++++++++--------- tests/unit/utilities/load-config-test.js | 2 +- tests/unit/utilities/platform-checker-test.js | 17 +++++++++++ 5 files changed, 40 insertions(+), 17 deletions(-) diff --git a/.npmignore b/.npmignore index 7b5f0c9368..339697d4bb 100644 --- a/.npmignore +++ b/.npmignore @@ -7,6 +7,12 @@ /tmp/ /.* *.log -!/.travis.yml /yarn.lock !docs/build/data.json + +# the GitHub Action CI configuration is used by +# lib/utilities/platform-checker.js to determine what versions of Node are +# under test by the current version of ember-cli being used, this means we +# **must** publish this file (but it would be ignored by the `/.*` line just +# above) +!/.github/workflows/ci.yml diff --git a/docs/node-support.md b/docs/node-support.md index 0edfb68a21..9c1104727a 100644 --- a/docs/node-support.md +++ b/docs/node-support.md @@ -29,8 +29,6 @@ Node.js](https://github.com/nodejs/LTS#lts_schedule). ## Current support: -* v8: Released as stable version then converted to LTS. - * Supported by ember-cli/ember-cli#master until: 2019-12-31. * v10: Released as stable version then converted to LTS. * Supported by ember-cli/ember-cli#master until: 2021-04-30. * v12: Released as stable version then converted to LTS. diff --git a/lib/utilities/platform-checker.js b/lib/utilities/platform-checker.js index c421e59233..65b4bd66bf 100644 --- a/lib/utilities/platform-checker.js +++ b/lib/utilities/platform-checker.js @@ -4,24 +4,26 @@ const semver = require('semver'); const logger = require('heimdalljs-logger')('ember-cli:platform-checker:'); const loadConfig = require('./load-config'); -let testedEngines; -if (process.platform === 'win32') { - testedEngines = loadConfig('appveyor.yml') - .environment.matrix.map(element => element.nodejs_version) - .join(' || '); -} else { - let travisConfig = loadConfig('.travis.yml'); - let nodeVersions = new Set(travisConfig.node_js); - - travisConfig.jobs.include.forEach(job => { - if (job.node_js) { - nodeVersions.add(job.node_js); +const ci = loadConfig('.github/workflows/ci.yml'); +const nodeVersions = new Set(); + +for (let jobName in ci.jobs) { + let job = ci.jobs[jobName]; + + job.steps.forEach(step => { + let isSetupNode = step.uses === 'actions/setup-node@v1'; + if (isSetupNode && step.with['node-version'].includes('${{') === false) { + nodeVersions.add(step.with['node-version']); } }); - testedEngines = Array.from(nodeVersions).join(' || '); + if (job.strategy && job.strategy.matrix && job.strategy.matrix['node-version']) { + job.strategy.matrix['node-version'].forEach(version => nodeVersions.add(version)); + } } +const testedEngines = Array.from(nodeVersions).join(' || '); + let supportedEngines = loadConfig('package.json').engines.node; module.exports = class PlatformChecker { diff --git a/tests/unit/utilities/load-config-test.js b/tests/unit/utilities/load-config-test.js index a220b48fd2..b919df15e9 100644 --- a/tests/unit/utilities/load-config-test.js +++ b/tests/unit/utilities/load-config-test.js @@ -55,6 +55,6 @@ describe('publishes the appropriate config files', function() { let npmignore = loadConfig('.npmignore', EmberCLIDir); it('has the config files', function() { - expect(npmignore).to.include('!/.travis.yml'); + expect(npmignore).to.include('!/.github/workflows/ci.yml'); }); }); diff --git a/tests/unit/utilities/platform-checker-test.js b/tests/unit/utilities/platform-checker-test.js index 1dab12829b..534a4708d2 100644 --- a/tests/unit/utilities/platform-checker-test.js +++ b/tests/unit/utilities/platform-checker-test.js @@ -4,6 +4,23 @@ const expect = require('chai').expect; const PlatformChecker = require('../../../lib/utilities/platform-checker'); describe('platform-checker', function() { + describe('known versions', function() { + function check(version, { isTested, isDeprecated, isValid }) { + it(`${version}`, function() { + let checker = new PlatformChecker(version); + expect(checker.isDeprecated).to.equal(isDeprecated); + expect(checker.isValid).to.equal(isValid); + expect(checker.isTested).to.equal(isTested); + }); + } + + check('v8.0.0', { isTested: false, isDeprecated: true, isValid: false }); + check('v10.0.0', { isTested: true, isDeprecated: false, isValid: true }); + check('v12.0.0', { isTested: true, isDeprecated: false, isValid: true }); + check('v13.0.0', { isTested: true, isDeprecated: false, isValid: true }); + check('v14.0.0', { isTested: false, isDeprecated: false, isValid: true }); + }); + it('checkIsDeprecated', function() { expect(new PlatformChecker('v0.10.1').checkIsDeprecated('4 || 6')).to.be.equal( true, From 175686f03b65fb0003faca2c9d2c206bb35aa322 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sat, 14 Mar 2020 18:41:41 -0400 Subject: [PATCH 264/818] Update eslint and related dependencies. * Fix a few new failures after updating. * Migrate config file from `0`, `1`, `2` to `'off'`, `'warn'`, and `'error'`. * Use `plugin:prettier/recommended` (ensures stylistic rules from eslint are disabled) --- .eslintrc.js | 62 +++-- lib/broccoli/ember-app.js | 5 +- lib/models/command.js | 2 +- package.json | 6 +- tests/helpers/package-cache.js | 15 +- yarn.lock | 409 ++++++++++++++++++--------------- 6 files changed, 266 insertions(+), 233 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 733b1b0671..e6872be6eb 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -6,7 +6,7 @@ module.exports = { ecmaVersion: 2018, }, plugins: ['node', 'prettier'], - extends: ['eslint:recommended', 'plugin:node/recommended', 'prettier'], + extends: ['eslint:recommended', 'plugin:node/recommended', 'plugin:prettier/recommended'], env: { browser: false, node: true, @@ -16,57 +16,55 @@ module.exports = { rules: { /*** Possible Errors ***/ - 'no-console': 0, - 'no-template-curly-in-string': 2, - 'no-unsafe-negation': 2, + 'no-console': 'off', + 'no-template-curly-in-string': 'error', + 'no-unsafe-negation': 'error', /*** Best Practices ***/ - curly: 2, - eqeqeq: 2, - 'guard-for-in': 0, - 'no-caller': 2, - 'no-eq-null': 2, - 'no-eval': 2, - 'no-new': 0, + curly: 'error', + eqeqeq: 'error', + 'guard-for-in': 'off', + 'no-caller': 'error', + 'no-eq-null': 'error', + 'no-eval': 'error', + 'no-new': 'off', 'no-unused-expressions': [ - 2, + 'error', { allowShortCircuit: true, allowTernary: true, }, ], - 'wrap-iife': 0, - yoda: 2, + 'wrap-iife': 'off', + yoda: 'error', /*** Strict Mode ***/ - strict: [2, 'global'], + strict: ['error', 'global'], /*** Variables ***/ - 'no-undef': 2, - 'no-unused-vars': 2, - 'no-use-before-define': [2, 'nofunc'], + 'no-undef': 'error', + 'no-unused-vars': 'error', + 'no-use-before-define': ['error', 'nofunc'], /*** Stylistic Issues ***/ - camelcase: 2, - 'new-cap': [2, { properties: false }], - 'no-array-constructor': 2, - 'no-bitwise': 2, - 'no-lonely-if': 2, - 'no-plusplus': 0, - 'no-unneeded-ternary': 2, + camelcase: 'error', + 'new-cap': ['error', { properties: false }], + 'no-array-constructor': 'error', + 'no-bitwise': 'error', + 'no-lonely-if': 'error', + 'no-plusplus': 'off', + 'no-unneeded-ternary': 'error', /*** ECMAScript 6 ***/ - 'no-useless-computed-key': 2, - 'no-var': 2, - 'object-shorthand': 2, - 'prefer-template': 2, - 'symbol-description': 2, - - 'prettier/prettier': 'error', + 'no-useless-computed-key': 'error', + 'no-var': 'error', + 'object-shorthand': 'error', + 'prefer-template': 'error', + 'symbol-description': 'error', }, }; diff --git a/lib/broccoli/ember-app.js b/lib/broccoli/ember-app.js index cc61d603f2..8ede0ff605 100644 --- a/lib/broccoli/ember-app.js +++ b/lib/broccoli/ember-app.js @@ -1,4 +1,3 @@ -/* global require, module */ 'use strict'; /** @@ -188,8 +187,8 @@ class EmberApp { _initTestsAndHinting(options) { let testsEnabledDefault = process.env.EMBER_CLI_TEST_COMMAND || !this.isProduction; - this.tests = options.hasOwnProperty('tests') ? options.tests : testsEnabledDefault; - this.hinting = options.hasOwnProperty('hinting') ? options.hinting : testsEnabledDefault; + this.tests = 'tests' in options ? options.tests : testsEnabledDefault; + this.hinting = 'hinting' in options ? options.hinting : testsEnabledDefault; } /** diff --git a/lib/models/command.js b/lib/models/command.js index c32d6604c9..740f4cf33d 100644 --- a/lib/models/command.js +++ b/lib/models/command.js @@ -557,7 +557,7 @@ let Command = CoreObject.extend({ let validateParsed = function(key) { // ignore 'argv', 'h', and 'help' - if (!commandOptions.hasOwnProperty(key) && key !== 'argv' && key !== 'h' && key !== 'help') { + if (!(key in commandOptions) && key !== 'argv' && key !== 'h' && key !== 'help') { this.ui.writeLine( chalk.yellow( `The option '--${key}' is not registered with the '${this.name}' command. ` + diff --git a/package.json b/package.json index 57d7ad20a2..5ac6cc6edc 100644 --- a/package.json +++ b/package.json @@ -136,11 +136,11 @@ "chai-files": "^1.4.0", "ember-cli-blueprint-test-helpers": "^0.19.2", "ember-cli-internal-test-helpers": "^0.9.1", - "eslint": "^5.16.0", - "eslint-config-prettier": "^6.7.0", + "eslint": "^6.8.0", + "eslint-config-prettier": "^6.10.0", "eslint-plugin-chai-expect": "^2.1.0", "eslint-plugin-mocha": "^6.3.0", - "eslint-plugin-node": "^10.0.0", + "eslint-plugin-node": "^11.0.0", "eslint-plugin-prettier": "^3.1.2", "fixturify": "^1.2.0", "fixturify-project": "^1.10.0", diff --git a/tests/helpers/package-cache.js b/tests/helpers/package-cache.js index df2b29eab5..ab3fba95b4 100644 --- a/tests/helpers/package-cache.js +++ b/tests/helpers/package-cache.js @@ -229,13 +229,14 @@ module.exports = class PackageCache { constructor(rootPath) { this.rootPath = rootPath || originalWorkingDirectory; - this._conf = new Configstore('package-cache'); - - // Set it to where we want it to be. - this._conf.path = path.join(this.rootPath, 'tmp', 'package-cache.json'); - - // Initialize. - this._conf.all = this._conf.all; + let configPath = path.join(this.rootPath, 'tmp', 'package-cache.json'); + this._conf = new Configstore( + 'package-cache', + {}, + { + configPath, + } + ); this._cleanDirs(); } diff --git a/yarn.lock b/yarn.lock index aa897b7156..d4dd8cf354 100644 --- a/yarn.lock +++ b/yarn.lock @@ -88,14 +88,7 @@ "@babel/template" "^7.7.4" "@babel/types" "^7.7.4" -"@babel/helper-split-export-declaration@^7.7.4": - version "7.7.4" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.4.tgz#57292af60443c4a3622cf74040ddc28e68336fd8" - integrity sha512-guAg1SXFcVr04Guk9eq0S4/rWS++sbmyqosJzVs8+1fH5NI+ZcmkaSkc7dmtAFbHFva6yRJnjW3yAcGxjueDug== - dependencies: - "@babel/types" "^7.7.4" - -"@babel/helper-split-export-declaration@^7.8.3": +"@babel/helper-split-export-declaration@^7.7.4", "@babel/helper-split-export-declaration@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz#31a9f30070f91368a7182cf05f831781065fc7a9" integrity sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA== @@ -350,12 +343,7 @@ resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== -"@types/node@*": - version "12.0.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.0.5.tgz#ac14404c33d1a789973c45379a67f7f7e58a01b9" - integrity sha512-CFLSALoE+93+Hcb5pFjp0J1uMrrbLRe+L1+gFwerJ776R3TACSF0kTVRQ7AvRa7aFx70nqYHAc7wQPlt9kY2Mg== - -"@types/node@>= 8": +"@types/node@*", "@types/node@>= 8": version "12.12.7" resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.7.tgz#01e4ea724d9e3bd50d90c11fd5980ba317d8fa11" integrity sha512-E6Zn0rffhgd130zbCbAr/JdXfXkoOUFAKNs/rF8qnafSJ8KYaA/j3oz7dcwal+lYjLA7xvdd5J4wdYpCTlP8+w== @@ -404,27 +392,27 @@ accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: mime-types "~2.1.24" negotiator "0.6.2" -acorn-jsx@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.1.tgz#32a064fd925429216a09b141102bfdd185fae40e" - integrity sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg== +acorn-jsx@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.2.0.tgz#4c66069173d6fdd68ed85239fc256226182b2ebe" + integrity sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ== -acorn@^6.0.7: - version "6.4.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" - integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== +acorn@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf" + integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg== after@0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" integrity sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8= -ajv@^6.9.1: - version "6.10.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.0.tgz#90d0d54439da587cd7e843bfb7045f50bd22bdf1" - integrity sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg== +ajv@^6.10.0, ajv@^6.9.1: + version "6.12.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.0.tgz#06d60b96d87b8454a5adaba86e7854da629db4b7" + integrity sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw== dependencies: - fast-deep-equal "^2.0.1" + fast-deep-equal "^3.1.1" fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.4.1" uri-js "^4.2.2" @@ -452,6 +440,13 @@ ansi-escapes@^3.2.0: resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== +ansi-escapes@^4.2.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61" + integrity sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA== + dependencies: + type-fest "^0.11.0" + ansi-html@^0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e" @@ -1480,6 +1475,13 @@ cli-cursor@^2.1.0: dependencies: restore-cursor "^2.0.0" +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" + cli-spinners@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.1.0.tgz#22c34b4d51f573240885b201efda4e4ec9fff3c7" @@ -1586,21 +1588,16 @@ commander@2.8.x: dependencies: graceful-readlink ">= 1.0.0" -commander@^2.15.1, commander@^2.6.0: - version "2.20.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" - integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== +commander@^2.15.1, commander@^2.6.0, commander@~2.20.3: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== commander@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== -commander@~2.20.3: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" @@ -2096,6 +2093,11 @@ emoji-regex@^7.0.1: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" @@ -2245,10 +2247,10 @@ escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1 resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= -eslint-config-prettier@^6.7.0: - version "6.7.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.7.0.tgz#9a876952e12df2b284adbd3440994bf1f39dfbb9" - integrity sha512-FamQVKM3jjUVwhG4hEMnbtsq7xOIDm+SY5iBPfR8gKsJoAB2IQnNF+bk1+8Fy44Nq7PPJaLvkRxILYdJWoguKQ== +eslint-config-prettier@^6.10.0: + version "6.10.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.10.0.tgz#7b15e303bf9c956875c948f6b21500e48ded6a7f" + integrity sha512-AtndijGte1rPILInUdHjvKEGbIV06NuvPrqlIEaEaWtbtvJh464mDeyGMdZEQMsGvC0ZVkiex1fSNcC4HAbRGg== dependencies: get-stdin "^6.0.0" @@ -2257,12 +2259,12 @@ eslint-plugin-chai-expect@^2.1.0: resolved "https://registry.yarnpkg.com/eslint-plugin-chai-expect/-/eslint-plugin-chai-expect-2.1.0.tgz#9dd1d8e5a80543fdec956f6aef7f83f2241ca92b" integrity sha512-rd0/4mjMV6c3i0o4DKkWI4uaFN9DK707kW+/fDphaDI6HVgxXnhML9Xgt5vHnTXmSSnDhupuCFBgsEAEpchXmQ== -eslint-plugin-es@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-2.0.0.tgz#0f5f5da5f18aa21989feebe8a73eadefb3432976" - integrity sha512-f6fceVtg27BR02EYnBhgWLFQfK6bN4Ll0nQFrBHOlCsAyxeZkn0NHns5O0YZOPrV1B3ramd6cgFwaoFLcSkwEQ== +eslint-plugin-es@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.0.tgz#98cb1bc8ab0aa807977855e11ad9d1c9422d014b" + integrity sha512-6/Jb/J/ZvSebydwbBJO1R9E5ky7YeElfK56Veh7e4QGFHCXoIXGH9HhVz+ibJLM3XJ1XjP+T7rKBLUa/Y7eIng== dependencies: - eslint-utils "^1.4.2" + eslint-utils "^2.0.0" regexpp "^3.0.0" eslint-plugin-mocha@^6.3.0: @@ -2273,13 +2275,13 @@ eslint-plugin-mocha@^6.3.0: eslint-utils "^2.0.0" ramda "^0.27.0" -eslint-plugin-node@^10.0.0: - version "10.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-10.0.0.tgz#fd1adbc7a300cf7eb6ac55cf4b0b6fc6e577f5a6" - integrity sha512-1CSyM/QCjs6PXaT18+zuAXsjXGIGo5Rw630rSKwokSs2jrYURQc4R5JZpoanNCqwNmepg+0eZ9L7YiRUJb8jiQ== +eslint-plugin-node@^11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.0.0.tgz#365944bb0804c5d1d501182a9bc41a0ffefed726" + integrity sha512-chUs/NVID+sknFiJzxoN9lM7uKSOEta8GC8365hw1nDfwIPIjjpRSwwPvQanWv8dt/pDe9EV4anmVSwdiSndNg== dependencies: - eslint-plugin-es "^2.0.0" - eslint-utils "^1.4.2" + eslint-plugin-es "^3.0.0" + eslint-utils "^2.0.0" ignore "^5.1.1" minimatch "^3.0.4" resolve "^1.10.1" @@ -2292,20 +2294,20 @@ eslint-plugin-prettier@^3.1.2: dependencies: prettier-linter-helpers "^1.0.0" -eslint-scope@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" - integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== +eslint-scope@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9" + integrity sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw== dependencies: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-utils@^1.3.1, eslint-utils@^1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.2.tgz#166a5180ef6ab7eb462f162fd0e6f2463d7309ab" - integrity sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q== +eslint-utils@^1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" + integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== dependencies: - eslint-visitor-keys "^1.0.0" + eslint-visitor-keys "^1.1.0" eslint-utils@^2.0.0: version "2.0.0" @@ -2314,66 +2316,67 @@ eslint-utils@^2.0.0: dependencies: eslint-visitor-keys "^1.1.0" -eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: +eslint-visitor-keys@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== -eslint@^5.16.0: - version "5.16.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.16.0.tgz#a1e3ac1aae4a3fbd8296fcf8f7ab7314cbb6abea" - integrity sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg== +eslint@^6.8.0: + version "6.8.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.8.0.tgz#62262d6729739f9275723824302fb227c8c93ffb" + integrity sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig== dependencies: "@babel/code-frame" "^7.0.0" - ajv "^6.9.1" + ajv "^6.10.0" chalk "^2.1.0" cross-spawn "^6.0.5" debug "^4.0.1" doctrine "^3.0.0" - eslint-scope "^4.0.3" - eslint-utils "^1.3.1" - eslint-visitor-keys "^1.0.0" - espree "^5.0.1" + eslint-scope "^5.0.0" + eslint-utils "^1.4.3" + eslint-visitor-keys "^1.1.0" + espree "^6.1.2" esquery "^1.0.1" esutils "^2.0.2" file-entry-cache "^5.0.1" functional-red-black-tree "^1.0.1" - glob "^7.1.2" - globals "^11.7.0" + glob-parent "^5.0.0" + globals "^12.1.0" ignore "^4.0.6" import-fresh "^3.0.0" imurmurhash "^0.1.4" - inquirer "^6.2.2" - js-yaml "^3.13.0" + inquirer "^7.0.0" + is-glob "^4.0.0" + js-yaml "^3.13.1" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.3.0" - lodash "^4.17.11" + lodash "^4.17.14" minimatch "^3.0.4" mkdirp "^0.5.1" natural-compare "^1.4.0" - optionator "^0.8.2" - path-is-inside "^1.0.2" + optionator "^0.8.3" progress "^2.0.0" regexpp "^2.0.1" - semver "^5.5.1" - strip-ansi "^4.0.0" - strip-json-comments "^2.0.1" + semver "^6.1.2" + strip-ansi "^5.2.0" + strip-json-comments "^3.0.1" table "^5.2.3" text-table "^0.2.0" + v8-compile-cache "^2.0.3" esm@^3.2.4: version "3.2.25" resolved "https://registry.yarnpkg.com/esm/-/esm-3.2.25.tgz#342c18c29d56157688ba5ce31f8431fbb795cc10" integrity sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA== -espree@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-5.0.1.tgz#5d6526fa4fc7f0788a5cf75b15f30323e2f81f7a" - integrity sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A== +espree@^6.1.2: + version "6.2.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-6.2.1.tgz#77fc72e1fd744a2052c20f38a5b575832e82734a" + integrity sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw== dependencies: - acorn "^6.0.7" - acorn-jsx "^5.0.0" - eslint-visitor-keys "^1.0.0" + acorn "^7.1.1" + acorn-jsx "^5.2.0" + eslint-visitor-keys "^1.1.0" esprima@^4.0.0: version "4.0.1" @@ -2558,10 +2561,10 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" -fast-deep-equal@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" - integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= +fast-deep-equal@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" + integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA== fast-diff@^1.1.2: version "1.2.0" @@ -2584,7 +2587,7 @@ fast-json-stable-stringify@^2.0.0: resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= -fast-levenshtein@~2.0.4: +fast-levenshtein@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= @@ -2638,6 +2641,13 @@ figures@^2.0.0: dependencies: escape-string-regexp "^1.0.5" +figures@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" + integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== + dependencies: + escape-string-regexp "^1.0.5" + file-entry-cache@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" @@ -3058,7 +3068,7 @@ git-repo-info@^2.1.1: resolved "https://registry.yarnpkg.com/git-repo-info/-/git-repo-info-2.1.1.tgz#220ffed8cbae74ef8a80e3052f2ccb5179aed058" integrity sha512-8aCohiDo4jwjOwma4FmYFd3i97urZulL8XL24nIPxuE+GZnfsAyy/g2Shqx6OjUiFKUXZM+Yy+KHnOmmA3FVcg== -glob-parent@^5.1.0: +glob-parent@^5.0.0, glob-parent@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.0.tgz#5f4c1d1e748d30cd73ad2944b3577a81b081e8c2" integrity sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw== @@ -3088,7 +3098,7 @@ glob@^5.0.10: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.4, glob@^7.1.0, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: +glob@^7.0.4, glob@^7.1.0, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -3120,11 +3130,18 @@ global-prefix@^1.0.1: is-windows "^1.0.1" which "^1.2.14" -globals@^11.1.0, globals@^11.7.0: +globals@^11.1.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== +globals@^12.1.0: + version "12.4.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-12.4.0.tgz#a18813576a41b00a24a97e7f815918c2e19925f8" + integrity sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg== + dependencies: + type-fest "^0.8.1" + globby@10.0.1: version "10.0.1" resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.1.tgz#4782c34cb75dd683351335c5829cc3420e606b22" @@ -3182,18 +3199,7 @@ growly@^1.3.0: resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= -handlebars@^4.0.11, handlebars@^4.0.4, handlebars@^4.1.2: - version "4.5.3" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.5.3.tgz#5cf75bd8714f7605713511a56be7c349becb0482" - integrity sha512-3yPecJoJHK/4c6aZhSvxOyG4vJKDshV36VHp0iVCDVh7o9w2vwi3NSnL2MMPj3YdduqaBcu7cGbggJQM0br9xA== - dependencies: - neo-async "^2.6.0" - optimist "^0.6.1" - source-map "^0.6.1" - optionalDependencies: - uglify-js "^3.1.4" - -handlebars@^4.7.3: +handlebars@^4.0.11, handlebars@^4.0.4, handlebars@^4.1.2, handlebars@^4.7.3: version "4.7.3" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.3.tgz#8ece2797826886cf8082d1726ff21d2a022550ee" integrity sha512-SRGwSYuNfx8DwHD/6InAPzD6RgeruWLT+B8e8a7gGs8FWgHzlExpTFMEq2IA6QpAfOClpKHy6+8IqTjeBCu6Kg== @@ -3245,12 +3251,7 @@ has-symbol-support-x@^1.4.1: resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw== -has-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" - integrity sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q= - -has-symbols@^1.0.1: +has-symbols@^1.0.0, has-symbols@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== @@ -3514,7 +3515,7 @@ inline-source-map-comment@^1.0.5: sum-up "^1.0.1" xtend "^4.0.0" -inquirer@^6, inquirer@^6.2.2: +inquirer@^6: version "6.3.1" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.3.1.tgz#7a413b5e7950811013a3db491c61d1f3b776e8e7" integrity sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA== @@ -3533,6 +3534,25 @@ inquirer@^6, inquirer@^6.2.2: strip-ansi "^5.1.0" through "^2.3.6" +inquirer@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.1.0.tgz#1298a01859883e17c7264b82870ae1034f92dd29" + integrity sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg== + dependencies: + ansi-escapes "^4.2.1" + chalk "^3.0.0" + cli-cursor "^3.1.0" + cli-width "^2.0.0" + external-editor "^3.0.3" + figures "^3.0.0" + lodash "^4.17.15" + mute-stream "0.0.8" + run-async "^2.4.0" + rxjs "^6.5.3" + string-width "^4.1.0" + strip-ansi "^6.0.0" + through "^2.3.6" + into-stream@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-3.1.0.tgz#96fb0a936c12babd6ff1752a17d05616abd094c6" @@ -3580,12 +3600,7 @@ is-buffer@~2.0.3: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.3.tgz#4ecf3fcf749cbd1e472689e109ac66261a25e725" integrity sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw== -is-callable@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" - integrity sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA== - -is-callable@^1.1.5: +is-callable@^1.1.4, is-callable@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab" integrity sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q== @@ -3656,6 +3671,11 @@ is-fullwidth-code-point@^2.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + is-git-url@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-git-url/-/is-git-url-1.0.0.tgz#53f684cd143285b52c3244b4e6f28253527af66b" @@ -3890,7 +3910,7 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@3.13.1, js-yaml@^3.13.0, js-yaml@^3.13.1, js-yaml@^3.2.5, js-yaml@^3.2.7: +js-yaml@3.13.1, js-yaml@^3.13.1, js-yaml@^3.2.5, js-yaml@^3.2.7: version "3.13.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== @@ -4668,24 +4688,12 @@ micromatch@^4.0.2: braces "^3.0.1" picomatch "^2.0.5" -mime-db@1.40.0, "mime-db@>= 1.40.0 < 2": - version "1.40.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.40.0.tgz#a65057e998db090f732a68f6c276d387d4126c32" - integrity sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA== - -mime-db@1.43.0: +mime-db@1.43.0, "mime-db@>= 1.40.0 < 2": version "1.43.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== -mime-types@^2.1.12, mime-types@^2.1.18, mime-types@^2.1.19, mime-types@~2.1.24: - version "2.1.24" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.24.tgz#b6f8d0b3e951efb77dedeca194cff6d16f676f81" - integrity sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ== - dependencies: - mime-db "1.40.0" - -mime-types@^2.1.26: +mime-types@^2.1.12, mime-types@^2.1.18, mime-types@^2.1.19, mime-types@^2.1.26, mime-types@~2.1.24: version "2.1.26" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06" integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== @@ -4712,6 +4720,11 @@ mimic-fn@^1.0.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + mimic-response@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" @@ -4832,6 +4845,11 @@ mute-stream@0.0.7: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= +mute-stream@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" + integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== + nan@^2.14.0: version "2.14.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" @@ -5133,6 +5151,13 @@ onetime@^2.0.0: dependencies: mimic-fn "^1.0.0" +onetime@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.0.tgz#fff0f3c91617fe62bb50189636e99ac8a6df7be5" + integrity sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q== + dependencies: + mimic-fn "^2.1.0" + optimist@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" @@ -5141,17 +5166,17 @@ optimist@^0.6.1: minimist "~0.0.1" wordwrap "~0.0.2" -optionator@^0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" - integrity sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q= +optionator@^0.8.3: + version "0.8.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== dependencies: deep-is "~0.1.3" - fast-levenshtein "~2.0.4" + fast-levenshtein "~2.0.6" levn "~0.3.0" prelude-ls "~1.1.2" type-check "~0.3.2" - wordwrap "~1.0.0" + word-wrap "~1.2.3" ora@^3.4.0: version "3.4.0" @@ -5313,11 +5338,6 @@ path-is-absolute@1.0.1, path-is-absolute@^1.0.0: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -path-is-inside@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" - integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= - path-key@^2.0.0, path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" @@ -5797,6 +5817,14 @@ restore-cursor@^2.0.0: onetime "^2.0.0" signal-exit "^3.0.2" +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" @@ -5814,14 +5842,7 @@ rimraf@2.6.3, rimraf@^2.1.4, rimraf@^2.2.8, rimraf@^2.3.4, rimraf@^2.4.1, rimraf dependencies: glob "^7.1.3" -rimraf@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.0.tgz#614176d4b3010b75e5c390eb0ee96f6dc0cebb9b" - integrity sha512-NDGVxTsjqfunkds7CqsOiEnxln4Bo7Nddl3XhS4pXg5OzwkLqJ971ZVAAnB+DDLnF76N+VnDEiBHaVV8I06SUg== - dependencies: - glob "^7.1.3" - -rimraf@^3.0.2: +rimraf@^3.0.0, rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== @@ -5843,10 +5864,10 @@ rsvp@~3.2.1: resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-3.2.1.tgz#07cb4a5df25add9e826ebc67dcc9fd89db27d84a" integrity sha1-B8tKXfJa3Z6Cbrxn3Mn9idsn2Eo= -run-async@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" - integrity sha1-A3GrSuC91yDUFm19/aZP96RFpsA= +run-async@^2.2.0, run-async@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.0.tgz#e59054a5b86876cfae07f431d18cbaddc594f1e8" + integrity sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg== dependencies: is-promise "^2.1.0" @@ -5855,10 +5876,10 @@ run-parallel@^1.1.9: resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.9.tgz#c9dd3a7cf9f4b2c4b6244e173a6ed866e61dd679" integrity sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q== -rxjs@^6.4.0: - version "6.5.2" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.2.tgz#2e35ce815cd46d84d02a209fb4e5921e051dbec7" - integrity sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg== +rxjs@^6.4.0, rxjs@^6.5.3: + version "6.5.4" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.4.tgz#e0777fe0d184cec7872df147f303572d414e211c" + integrity sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q== dependencies: tslib "^1.9.0" @@ -5899,12 +5920,12 @@ sane@^4.0.0, sane@^4.1.0: minimist "^1.1.1" walker "~1.0.5" -"semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0: +"semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.6.0, semver@^5.7.0: version "5.7.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== -semver@^6.0.0, semver@^6.1.0, semver@^6.3.0: +semver@^6.0.0, semver@^6.1.0, semver@^6.1.2, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -6291,6 +6312,15 @@ string-width@^3.0.0, string-width@^3.1.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^5.1.0" +string-width@^4.1.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" + integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.0" + string.prototype.trimleft@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz#9bdb8ac6abd6d602b17a4ed321870d2f8dcefc74" @@ -6377,11 +6407,16 @@ strip-eof@^1.0.0: resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= -strip-json-comments@2.0.1, strip-json-comments@^2.0.1: +strip-json-comments@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= +strip-json-comments@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7" + integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw== + styled_string@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/styled_string/-/styled_string-0.0.1.tgz#d22782bd81295459bc4f1df18c4bad8e94dd124a" @@ -6503,7 +6538,7 @@ test-exclude@^5.2.3: read-pkg-up "^4.0.0" require-main-filename "^2.0.0" -testdouble@^3.12.4: +testdouble@^3.12.4, testdouble@^3.2.6: version "3.12.4" resolved "https://registry.yarnpkg.com/testdouble/-/testdouble-3.12.4.tgz#c8b30a62077212c10c2e05dc4105610d28013df4" integrity sha512-Ake1UjvG6XKYUrVGyNv52xg5lQM079dTQW8/F8GWuE1lbC1NRmkUgtgLrsRr+7SPQZZhIhZp6lHUWXMMBvSHEw== @@ -6513,16 +6548,6 @@ testdouble@^3.12.4: stringify-object-es5 "^2.5.0" theredoc "^1.0.0" -testdouble@^3.2.6: - version "3.12.2" - resolved "https://registry.yarnpkg.com/testdouble/-/testdouble-3.12.2.tgz#a70c11cc83f1396a91f120cf8d0a3037aeb83f37" - integrity sha512-+K1+JZZZUYFkeiIbNWDUVpyTrtYzNLHc8nRXADCvQ70913DA/xGgRkE+mWEbyZQTBRH5c5aVR4YjXvCY4hnT3w== - dependencies: - lodash "^4.17.14" - quibble "^0.5.6" - stringify-object-es5 "^2.5.0" - theredoc "^1.0.0" - testem@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/testem/-/testem-3.0.1.tgz#93fbd93fd6a4dcd57bcd1ba506d22ed8f8cfcd21" @@ -6746,6 +6771,16 @@ type-detect@^4.0.0, type-detect@^4.0.5: resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== +type-fest@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1" + integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ== + +type-fest@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" + integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== + type-is@~1.6.17, type-is@~1.6.18: version "1.6.18" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" @@ -6895,6 +6930,11 @@ uuid@^3.3.2, uuid@^3.4.0: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== +v8-compile-cache@^2.0.3: + version "2.1.0" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e" + integrity sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g== + validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" @@ -7033,16 +7073,16 @@ windows-release@^3.1.0: dependencies: execa "^1.0.0" +word-wrap@~1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= -wordwrap@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= - workerpool@^3.1.1: version "3.1.2" resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-3.1.2.tgz#b34e79243647decb174b7481ab5b351dc565c426" @@ -7134,12 +7174,7 @@ yallist@^2.1.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= -yallist@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" - integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== - -yallist@^3.0.2: +yallist@^3.0.0, yallist@^3.0.2: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== From f8b3d1a2813e761946c772f3dfe5d3734c8dfa1d Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sat, 14 Mar 2020 18:19:17 -0400 Subject: [PATCH 265/818] Remove AppVeyor CI. AppVeyor has been failing inconsistently for quite a while now (the vast majority of failures are timeout failures because the test run takes _very_ close to their limit of 60min). This change is a result of these sporadic failures combined with the fact that we recently did a big push to ensure that Windows support is fully tested by our GitHub Actions configuration. --- README.md | 3 -- appveyor.yml | 43 ------------------ tests/unit/broccoli/builder-test.js | 68 +++++++++++++--------------- tests/unit/commands/generate-test.js | 5 +- tests/unit/commands/test-test.js | 30 ++++++------ tests/unit/models/builder-test.js | 5 +- tests/unit/models/command-test.js | 44 ++++++++---------- 7 files changed, 69 insertions(+), 129 deletions(-) delete mode 100644 appveyor.yml diff --git a/README.md b/README.md index f97d411382..ab14a82ac4 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@ ember-cli [![Latest npm release][npm-badge]][npm-badge-url] [![TravisCI Build Status][travis-badge]][travis-badge-url] -[![AppVeyor Build Status][appveyor-badge]][appveyor-badge-url] [![Test Coverage][coveralls-badge]][coveralls-badge-url] [![Code Climate][codeclimate-badge]][codeclimate-badge-url] @@ -13,8 +12,6 @@ ember-cli [npm-badge-url]: https://www.npmjs.com/package/ember-cli [travis-badge]: https://img.shields.io/travis/ember-cli/ember-cli/master.svg?label=TravisCI [travis-badge-url]: https://travis-ci.org/ember-cli/ember-cli -[appveyor-badge]: https://img.shields.io/appveyor/ci/embercli/ember-cli/master.svg?label=AppVeyor -[appveyor-badge-url]: https://ci.appveyor.com/project/embercli/ember-cli/branch/master [coveralls-badge]: https://img.shields.io/coveralls/ember-cli/ember-cli/master.svg [coveralls-badge-url]: https://coveralls.io/github/ember-cli/ember-cli [codeclimate-badge]: https://codeclimate.com/github/ember-cli/ember-cli/badges/gpa.svg diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 233af82667..0000000000 --- a/appveyor.yml +++ /dev/null @@ -1,43 +0,0 @@ -# https://www.appveyor.com/docs/appveyor-yml/ - -image: Visual Studio 2017 - -# Test against these versions of Node.js. -environment: - MOCHA_REPORTER: "mocha-appveyor-reporter" - matrix: - - nodejs_version: "10" - - nodejs_version: "12" - - nodejs_version: "13" - -matrix: - fast_finish: true - allow_failures: - - nodejs_version: "8" - -branches: - only: - - master - - beta - - release - -# Install scripts. (runs after repo cloning) -install: - - ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) - - appveyor-retry npm i -g npm@^4 - - appveyor-retry yarn - - appveyor-retry yarn add mocha-appveyor-reporter # must be installed locally. - -cache: - - '%LOCALAPPDATA%\Yarn' - - '%APPDATA%\Roaming\bower' - -# Post-install test scripts. -test_script: - - cmd: yarn test:all - -# Don't actually build. -build: off - -# Set build version format here instead of in the admin panel. -version: "{build}" diff --git a/tests/unit/broccoli/builder-test.js b/tests/unit/broccoli/builder-test.js index 0c0fbc1883..e3cf8b39b5 100644 --- a/tests/unit/broccoli/builder-test.js +++ b/tests/unit/broccoli/builder-test.js @@ -2,7 +2,6 @@ const broccoliTestHelper = require('broccoli-test-helper'); const expect = require('chai').expect; -const ci = require('ci-info'); const MockProject = require('../../helpers/mock-project'); const Builder = require('../../../lib/models/builder'); @@ -30,11 +29,9 @@ describe('Builder - broccoli tests', function() { await output.dispose(); }); - (ci.APPVEYOR ? it.skip : it)( - 'falls back to broccoli-builder@0.18 when legacy plugins exist in build', - async function() { - projectRoot.write({ - 'ember-cli-build.js': ` + it('falls back to broccoli-builder@0.18 when legacy plugins exist in build', async function() { + projectRoot.write({ + 'ember-cli-build.js': ` const fs = require('fs'); const os = require('os'); const crypto = require('crypto'); @@ -70,35 +67,34 @@ describe('Builder - broccoli tests', function() { return new LegacyPlugin(__dirname + '/app'); } `, - app: { - 'hello.txt': '// hello!', - }, - }); - - builder = new Builder({ - project, - ui: project.ui, - onProcessInterrupt: { - addHandler() {}, - removeHandler() {}, - }, - outputPath: builderOutputPath.path(), - }); - - output = fromBuilder(builder); - await output.build(); - - expect(output.read()).to.deep.equal({ + app: { 'hello.txt': '// hello!', - }); - - expect(builder.broccoliBuilderFallback).to.be.true; - expect(builder.ui.output).to.include( - 'WARNING: Invalid Broccoli2 node detected, falling back to broccoli-builder. Broccoli error:' - ); - expect(builder.ui.output).to.include( - 'LegacyPlugin: The .read/.rebuild API is no longer supported as of Broccoli 1.0. Plugins must now derive from broccoli-plugin. https://github.com/broccolijs/broccoli/blob/master/docs/broccoli-1-0-plugin-api.md' - ); - } - ); + }, + }); + + builder = new Builder({ + project, + ui: project.ui, + onProcessInterrupt: { + addHandler() {}, + removeHandler() {}, + }, + outputPath: builderOutputPath.path(), + }); + + output = fromBuilder(builder); + await output.build(); + + expect(output.read()).to.deep.equal({ + 'hello.txt': '// hello!', + }); + + expect(builder.broccoliBuilderFallback).to.be.true; + expect(builder.ui.output).to.include( + 'WARNING: Invalid Broccoli2 node detected, falling back to broccoli-builder. Broccoli error:' + ); + expect(builder.ui.output).to.include( + 'LegacyPlugin: The .read/.rebuild API is no longer supported as of Broccoli 1.0. Plugins must now derive from broccoli-plugin. https://github.com/broccolijs/broccoli/blob/master/docs/broccoli-1-0-plugin-api.md' + ); + }); }); diff --git a/tests/unit/commands/generate-test.js b/tests/unit/commands/generate-test.js index 07bb507515..1f9f072968 100644 --- a/tests/unit/commands/generate-test.js +++ b/tests/unit/commands/generate-test.js @@ -9,7 +9,6 @@ const Task = require('../../../lib/models/task'); const Blueprint = require('../../../lib/models/blueprint'); const GenerateCommand = require('../../../lib/commands/generate'); const td = require('testdouble'); -const ci = require('ci-info'); const ROOT = process.cwd(); const { createTempDir } = require('broccoli-test-helper'); @@ -53,7 +52,7 @@ describe('generate command', function() { await input.dispose(); }); - (ci.APPVEYOR ? it.skip : it)('runs GenerateFromBlueprint but with null nodeModulesPath with npm', function() { + it('runs GenerateFromBlueprint but with null nodeModulesPath with npm', function() { command.project.hasDependencies = function() { return false; }; @@ -65,7 +64,7 @@ describe('generate command', function() { }); }); - (ci.APPVEYOR ? it.skip : it)('runs GenerateFromBlueprint but with null nodeModulesPath with yarn', function() { + it('runs GenerateFromBlueprint but with null nodeModulesPath with yarn', function() { // force usage of `yarn` by adding yarn.lock file input.write({ 'yarn.lock': '', diff --git a/tests/unit/commands/test-test.js b/tests/unit/commands/test-test.js index 7ad1c73cfa..25c38b20f3 100644 --- a/tests/unit/commands/test-test.js +++ b/tests/unit/commands/test-test.js @@ -8,7 +8,6 @@ const commandOptions = require('../../factories/command-options'); const Task = require('../../../lib/models/task'); const TestCommand = require('../../../lib/commands/test'); const td = require('testdouble'); -const ci = require('ci-info'); describe('test command', function() { this.timeout(30000); @@ -154,24 +153,21 @@ describe('test command', function() { }); }); - (ci.APPVEYOR ? it.skip : it)( - 'has the correct options when called with a build path and does not run a build task', - function() { - return command.validateAndRun(['--path=tests']).then(function() { - let captor = td.matchers.captor(); + it('has the correct options when called with a build path and does not run a build task', function() { + return command.validateAndRun(['--path=tests']).then(function() { + let captor = td.matchers.captor(); - td.verify(tasks.Build.prototype.run(td.matchers.anything()), { times: 0 }); - td.verify(tasks.Test.prototype.run(captor.capture())); + td.verify(tasks.Build.prototype.run(td.matchers.anything()), { times: 0 }); + td.verify(tasks.Test.prototype.run(captor.capture())); - expect(captor.value.outputPath).to.equal(path.resolve('tests'), 'has outputPath'); - expect(captor.value.configFile).to.equal( - undefined, - 'does not include configFile when not specified in options' - ); - expect(captor.value.port).to.equal(7357, 'has port'); - }); - } - ); + expect(captor.value.outputPath).to.equal(path.resolve('tests'), 'has outputPath'); + expect(captor.value.configFile).to.equal( + undefined, + 'does not include configFile when not specified in options' + ); + expect(captor.value.port).to.equal(7357, 'has port'); + }); + }); it('throws an error if the build path does not exist', function() { return expect(command.validateAndRun(['--path=bad/path/to/build'])).to.be.rejected.then(error => { diff --git a/tests/unit/models/builder-test.js b/tests/unit/models/builder-test.js index 67745d286f..d0487544f9 100644 --- a/tests/unit/models/builder-test.js +++ b/tests/unit/models/builder-test.js @@ -9,7 +9,6 @@ const fixturify = require('fixturify'); const MockProject = require('../../helpers/mock-project'); const mkTmpDirIn = require('../../../lib/utilities/mk-tmp-dir-in'); const td = require('testdouble'); -const ci = require('ci-info'); const chai = require('../../chai'); let expect = chai.expect; let file = chai.file; @@ -70,7 +69,7 @@ describe('models/builder.js', function() { return fs.remove(tmpRoot); }); - (ci.APPVEYOR ? it.skip : it)('allows for non-existent output-paths at arbitrary depth', function() { + it('allows for non-existent output-paths at arbitrary depth', function() { builder.outputPath = path.join(tmpdir, 'some', 'path', 'that', 'does', 'not', 'exist'); builder.copyToOutputPath('tests/fixtures/blueprints/basic_2'); @@ -215,7 +214,7 @@ describe('models/builder.js', function() { rimraf.sync(result.directory); }); - (ci.APPVEYOR ? it.skip : it)('produces the correct output', async function() { + it('produces the correct output', async function() { const project = new MockProject(); project.root += '/tests/fixtures/build/simple'; const setup = () => diff --git a/tests/unit/models/command-test.js b/tests/unit/models/command-test.js index fb6b4c97cd..cd59f8d1dd 100644 --- a/tests/unit/models/command-test.js +++ b/tests/unit/models/command-test.js @@ -6,7 +6,6 @@ const processHelpString = require('../../helpers/process-help-string'); const Yam = require('yam'); const EOL = require('os').EOL; const td = require('testdouble'); -const ci = require('ci-info'); let Task = require('../../../lib/models/task'); let Command = require('../../../lib/models/command'); @@ -103,34 +102,31 @@ describe('models/command.js', function() { expect(new ServeCommand(options).parseArgs(['--port', '80'])).to.have.nested.property('options.port', 80); }); - (ci.APPVEYOR ? it.skip : it)( - 'parseArgs() should get command options from the config file and command line', - function() { - expect( - new ServeCommand( - Object.assign(options, { - settings: config.getAll(), - }) - ).parseArgs(['--port', '789']) - ).to.deep.equal({ - options: { - port: 789, - environment: 'mock-development', - host: '0.1.0.1', - proxy: 'http://iamstef.net/ember-cli', - liveReload: false, - checkForUpdates: true, - }, - args: [], - }); - } - ); + it('parseArgs() should get command options from the config file and command line', function() { + expect( + new ServeCommand( + Object.assign(options, { + settings: config.getAll(), + }) + ).parseArgs(['--port', '789']) + ).to.deep.equal({ + options: { + port: 789, + environment: 'mock-development', + host: '0.1.0.1', + proxy: 'http://iamstef.net/ember-cli', + liveReload: false, + checkForUpdates: true, + }, + args: [], + }); + }); it('parseArgs() should set default option values.', function() { expect(new ServeCommand(options).parseArgs([])).to.have.nested.property('options.port', 4200); }); - (ci.APPVEYOR ? it.skip : it)('parseArgs() should return args too.', function() { + it('parseArgs() should return args too.', function() { expect( new ServeCommand( Object.assign(options, { From e2d9de2fd0f491f0351bbed690d619005f55786d Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sat, 14 Mar 2020 19:17:13 -0400 Subject: [PATCH 266/818] Update devDependencies to latest. --- package.json | 18 +- yarn.lock | 1089 +++++++++++++++++++++++++++----------------------- 2 files changed, 597 insertions(+), 510 deletions(-) diff --git a/package.json b/package.json index 5ac6cc6edc..deb96b6878 100644 --- a/package.json +++ b/package.json @@ -128,8 +128,8 @@ }, "devDependencies": { "@ember/edition-utils": "^1.2.0", - "@octokit/rest": "^16.36.0", - "broccoli-plugin": "^3.0.0", + "@octokit/rest": "^17.1.0", + "broccoli-plugin": "^4.0.1", "broccoli-test-helper": "^2.0.0", "chai": "^4.2.0", "chai-as-promised": "^7.1.1", @@ -142,16 +142,16 @@ "eslint-plugin-mocha": "^6.3.0", "eslint-plugin-node": "^11.0.0", "eslint-plugin-prettier": "^3.1.2", - "fixturify": "^1.2.0", - "fixturify-project": "^1.10.0", - "mocha": "^6.2.1", - "nock": "^11.7.0", - "nyc": "^14.1.0", + "fixturify": "^2.1.0", + "fixturify-project": "^2.1.0", + "mocha": "^7.1.0", + "nock": "^12.0.2", + "nyc": "^15.0.0", "prettier": "1.19.1", - "rimraf": "^3.0.0", + "rimraf": "^3.0.2", "strip-ansi": "^6.0.0", "supertest": "^4.0.2", - "testdouble": "^3.12.4", + "testdouble": "^3.13.0", "tmp": "^0.1.0", "websocket": "^1.0.31", "which": "2.0.2", diff --git a/yarn.lock b/yarn.lock index d4dd8cf354..302ab3f815 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,18 +9,18 @@ dependencies: "@babel/highlight" "^7.8.3" -"@babel/core@^7.3.4", "@babel/core@^7.8.3", "@babel/core@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.4.tgz#d496799e5c12195b3602d0fddd77294e3e38e80e" - integrity sha512-0LiLrB2PwrVI+a2/IEskBopDYSd8BCb3rOvH7D5tzoWd696TBEduBvuLVm4Nx6rltrLZqvI3MCalB2K2aVzQjA== +"@babel/core@^7.3.4", "@babel/core@^7.7.5", "@babel/core@^7.8.3", "@babel/core@^7.8.4": + version "7.8.7" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.7.tgz#b69017d221ccdeb203145ae9da269d72cf102f3b" + integrity sha512-rBlqF3Yko9cynC5CCFy6+K/w2N+Sq/ff2BPy+Krp7rHlABIr5epbA7OxVeKoMHB39LZOp1UY5SuLjy6uWi35yA== dependencies: "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.8.4" + "@babel/generator" "^7.8.7" "@babel/helpers" "^7.8.4" - "@babel/parser" "^7.8.4" - "@babel/template" "^7.8.3" - "@babel/traverse" "^7.8.4" - "@babel/types" "^7.8.3" + "@babel/parser" "^7.8.7" + "@babel/template" "^7.8.6" + "@babel/traverse" "^7.8.6" + "@babel/types" "^7.8.7" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.1" @@ -30,12 +30,12 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.4.0", "@babel/generator@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.4.tgz#35bbc74486956fe4251829f9f6c48330e8d0985e" - integrity sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA== +"@babel/generator@^7.8.6", "@babel/generator@^7.8.7": + version "7.8.8" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.8.tgz#cdcd58caab730834cee9eeadb729e833b625da3e" + integrity sha512-HKyUVu69cZoclptr8t8U5b6sx6zoWjh8jiUhnuj3MpZuKT2dJ8zPTuiy31luq32swhI0SpwItCIlU8XW7BZeJg== dependencies: - "@babel/types" "^7.8.3" + "@babel/types" "^7.8.7" jsesc "^2.5.1" lodash "^4.17.13" source-map "^0.5.0" @@ -113,10 +113,10 @@ esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.4.3", "@babel/parser@^7.8.3", "@babel/parser@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.4.tgz#d1dbe64691d60358a974295fa53da074dd2ce8e8" - integrity sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw== +"@babel/parser@^7.7.5", "@babel/parser@^7.8.6", "@babel/parser@^7.8.7": + version "7.8.8" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.8.tgz#4c3b7ce36db37e0629be1f0d50a571d2f86f6cd4" + integrity sha512-mO5GWzBPsPf6865iIbzNE0AvkKF3NE+2S3eRUpE+FE07BOAkXh6G+GW/Pj01hhXjve1WScbaIO4UlY1JKeqCcA== "@babel/plugin-transform-modules-amd@^7.7.5": version "7.7.5" @@ -135,34 +135,34 @@ core-js "^2.6.5" regenerator-runtime "^0.13.2" -"@babel/template@^7.4.0", "@babel/template@^7.7.4", "@babel/template@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.3.tgz#e02ad04fe262a657809327f578056ca15fd4d1b8" - integrity sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ== +"@babel/template@^7.7.4", "@babel/template@^7.8.3", "@babel/template@^7.8.6": + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.6.tgz#86b22af15f828dfb086474f964dcc3e39c43ce2b" + integrity sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg== dependencies: "@babel/code-frame" "^7.8.3" - "@babel/parser" "^7.8.3" - "@babel/types" "^7.8.3" + "@babel/parser" "^7.8.6" + "@babel/types" "^7.8.6" -"@babel/traverse@^7.4.3", "@babel/traverse@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.4.tgz#f0845822365f9d5b0e312ed3959d3f827f869e3c" - integrity sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg== +"@babel/traverse@^7.7.4", "@babel/traverse@^7.8.4", "@babel/traverse@^7.8.6": + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.6.tgz#acfe0c64e1cd991b3e32eae813a6eb564954b5ff" + integrity sha512-2B8l0db/DPi8iinITKuo7cbPznLCEk0kCxDoB9/N6gGNg/gxOXiR/IcymAFPiBwk5w6TtQ27w4wpElgp9btR9A== dependencies: "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.8.4" + "@babel/generator" "^7.8.6" "@babel/helper-function-name" "^7.8.3" "@babel/helper-split-export-declaration" "^7.8.3" - "@babel/parser" "^7.8.4" - "@babel/types" "^7.8.3" + "@babel/parser" "^7.8.6" + "@babel/types" "^7.8.6" debug "^4.1.0" globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.4.0", "@babel/types@^7.7.4", "@babel/types@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.3.tgz#5a383dffa5416db1b73dedffd311ffd0788fb31c" - integrity sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg== +"@babel/types@^7.7.4", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.8.7": + version "7.8.7" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.7.tgz#1fc9729e1acbb2337d5b6977a63979b4819f5d1d" + integrity sha512-k2TreEHxFA4CjGkL+GYjRyx35W0Mr7DP5+9q6WMkyKXB+904bYmG40syjMFV0oLlhhFCwWl0vA0DyzTDkwAiJw== dependencies: esutils "^2.0.2" lodash "^4.17.13" @@ -181,6 +181,21 @@ resolved "https://registry.yarnpkg.com/@ember/edition-utils/-/edition-utils-1.2.0.tgz#a039f542dc14c8e8299c81cd5abba95e2459cfa6" integrity sha512-VmVq/8saCaPdesQmftPqbFtxJWrzxNGSQ+e8x8LLe3Hjm36pJ04Q8LeORGZkAeOhldoUX9seLGmSaHeXkIqoog== +"@istanbuljs/load-nyc-config@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.0.0.tgz#10602de5570baea82f8afbfa2630b24e7a8cfe5b" + integrity sha512-ZR0rq/f/E4f4XcgnDvtMWXCUJpi8eO0rssVhmztsZqLIEFA9UUP9zmpE0VxlM+kv/E1ul2I876Fwil2ayptDVg== + dependencies: + camelcase "^5.3.1" + find-up "^4.1.0" + js-yaml "^3.13.1" + resolve-from "^5.0.0" + +"@istanbuljs/schema@^0.1.2": + version "0.1.2" + resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" + integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== + "@nodelib/fs.scandir@2.1.3": version "2.1.3" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b" @@ -202,6 +217,25 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" +"@octokit/auth-token@^2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.0.tgz#b64178975218b99e4dfe948253f0673cbbb59d9f" + integrity sha512-eoOVMjILna7FVQf96iWc3+ZtE/ZT6y8ob8ZzcqKY1ibSQCnu4O/B7pJvzMx5cyZ/RjAff6DAdEb0O0Cjcxidkg== + dependencies: + "@octokit/types" "^2.0.0" + +"@octokit/core@^2.4.0": + version "2.4.2" + resolved "https://registry.yarnpkg.com/@octokit/core/-/core-2.4.2.tgz#c22e583afc97e74015ea5bfd3ffb3ffc56c186ed" + integrity sha512-fUx/Qt774cgiPhb3HRKfdl6iufVL/ltECkwkCg373I4lIPYvAPY4cbidVZqyVqHI+ThAIlFlTW8FT4QHChv3Sg== + dependencies: + "@octokit/auth-token" "^2.4.0" + "@octokit/graphql" "^4.3.1" + "@octokit/request" "^5.3.1" + "@octokit/types" "^2.0.0" + before-after-hook "^2.1.0" + universal-user-agent "^5.0.0" + "@octokit/endpoint@^5.5.0": version "5.5.1" resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-5.5.1.tgz#2eea81e110ca754ff2de11c79154ccab4ae16b3f" @@ -211,7 +245,36 @@ is-plain-object "^3.0.0" universal-user-agent "^4.0.0" -"@octokit/request-error@^1.0.1", "@octokit/request-error@^1.0.2": +"@octokit/graphql@^4.3.1": + version "4.3.1" + resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.3.1.tgz#9ee840e04ed2906c7d6763807632de84cdecf418" + integrity sha512-hCdTjfvrK+ilU2keAdqNBWOk+gm1kai1ZcdjRfB30oA3/T6n53UVJb7w0L5cR3/rhU91xT3HSqCd+qbvH06yxA== + dependencies: + "@octokit/request" "^5.3.0" + "@octokit/types" "^2.0.0" + universal-user-agent "^4.0.0" + +"@octokit/plugin-paginate-rest@^2.0.0": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.0.2.tgz#fee7a81a4cc7d03784aaf9225499dd6e27f6d01e" + integrity sha512-HzODcSUt9mjErly26TlTOGZrhf9bmF/FEDQ2zln1izhgmIV6ulsjsHmgmR4VZ0wzVr/m52Eb6U2XuyS8fkcR1A== + dependencies: + "@octokit/types" "^2.0.1" + +"@octokit/plugin-request-log@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.0.tgz#eef87a431300f6148c39a7f75f8cfeb218b2547e" + integrity sha512-ywoxP68aOT3zHCLgWZgwUJatiENeHE7xJzYjfz8WI0goynp96wETBF+d95b8g/uL4QmS6owPVlaxiz3wyMAzcw== + +"@octokit/plugin-rest-endpoint-methods@^3.3.0": + version "3.3.1" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-3.3.1.tgz#279920ee391bd7e944ae4aa7fa435ba0c51fbb6a" + integrity sha512-iLAXPLWBZaP6ocy1GFfZUCzyN4cwg3y2JE6yZjQo0zLE3UaewC3TI68/TnS4ilyhXDxh81Jr1qwPN1AqTp8t3w== + dependencies: + "@octokit/types" "^2.0.1" + deprecation "^2.3.1" + +"@octokit/request-error@^1.0.1": version "1.0.2" resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-1.0.2.tgz#e6dbc5be13be1041ef8eca9225520982add574cf" integrity sha512-T9swMS/Vc4QlfWrvyeSyp/GjhXtYaBzCcibjGywV4k4D2qVrQKfEMPy8OxMDEj7zkIIdpHwqdpVbKCvnUPqkXw== @@ -219,10 +282,10 @@ deprecation "^2.0.0" once "^1.4.0" -"@octokit/request@^5.2.0": - version "5.3.1" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.3.1.tgz#3a1ace45e6f88b1be4749c5da963b3a3b4a2f120" - integrity sha512-5/X0AL1ZgoU32fAepTfEoggFinO3rxsMLtzhlUX+RctLrusn/CApJuGFCd0v7GMFhF+8UiCsTTfsu7Fh1HnEJg== +"@octokit/request@^5.3.0", "@octokit/request@^5.3.1": + version "5.3.2" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.3.2.tgz#1ca8b90a407772a1ee1ab758e7e0aced213b9883" + integrity sha512-7NPJpg19wVQy1cs2xqXjjRq/RmtSomja/VSWnptfYwuBxLdbYh2UjhGi0Wx7B1v5Iw5GKhfFDQL7jM7SSp7K2g== dependencies: "@octokit/endpoint" "^5.5.0" "@octokit/request-error" "^1.0.1" @@ -231,30 +294,22 @@ is-plain-object "^3.0.0" node-fetch "^2.3.0" once "^1.4.0" - universal-user-agent "^4.0.0" + universal-user-agent "^5.0.0" -"@octokit/rest@^16.36.0": - version "16.36.0" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.36.0.tgz#99892c57ba632c2a7b21845584004387b56c2cb7" - integrity sha512-zoZj7Ya4vWBK4fjTwK2Cnmu7XBB1p9ygSvTk2TthN6DVJXM4hQZQoAiknWFLJWSTix4dnA3vuHtjPZbExYoCZA== +"@octokit/rest@^17.1.0": + version "17.1.0" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-17.1.0.tgz#32df64d9dd4855339e9957524a84ced72762a53b" + integrity sha512-L5YtpxHZSHZCh2xETbzxz8clBGmcpT+5e78JLZQ+VfuHrHJ1J/r+R2PGwKHwClUEECTeWFMMdAtIik+OCkANBg== dependencies: - "@octokit/request" "^5.2.0" - "@octokit/request-error" "^1.0.2" - atob-lite "^2.0.0" - before-after-hook "^2.0.0" - btoa-lite "^1.0.0" - deprecation "^2.0.0" - lodash.get "^4.4.2" - lodash.set "^4.3.2" - lodash.uniq "^4.5.0" - octokit-pagination-methods "^1.1.0" - once "^1.4.0" - universal-user-agent "^4.0.0" + "@octokit/core" "^2.4.0" + "@octokit/plugin-paginate-rest" "^2.0.0" + "@octokit/plugin-request-log" "^1.0.0" + "@octokit/plugin-rest-endpoint-methods" "^3.3.0" -"@octokit/types@^2.0.0": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-2.0.1.tgz#0caf0364e010296265621593ac9a37f40ef75dad" - integrity sha512-YDYgV6nCzdGdOm7wy43Ce8SQ3M5DMKegB8E5sTB/1xrxOdo2yS/KgUgML2N2ZGD621mkbdrAglwTyA4NDOlFFA== +"@octokit/types@^2.0.0", "@octokit/types@^2.0.1": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-2.5.0.tgz#f1bbd147e662ae2c79717d518aac686e58257773" + integrity sha512-KEnLwOfdXzxPNL34fj508bhi9Z9cStyN7qY1kOfVahmqtAfrWw6Oq3P4R+dtsg0lYtZdWBpUrS/Ixmd5YILSww== dependencies: "@types/node" ">= 8" @@ -317,10 +372,10 @@ "@types/express-serve-static-core" "*" "@types/serve-static" "*" -"@types/fs-extra@^5.0.5": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-5.1.0.tgz#2a325ef97901504a3828718c390d34b8426a10a1" - integrity sha512-AInn5+UBFIK9FK5xc9yP5e3TQSPNNgjHByqYcj9g5elVBnDQcQL7PlO1CIRy2gWlbwK7UPYqi7vRvFA44dCmYQ== +"@types/fs-extra@^8.1.0": + version "8.1.0" + resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-8.1.0.tgz#1114834b53c3914806cd03b3304b37b3bd221a4d" + integrity sha512-UoOfVEzAUpeSPmjm7h1uk5MH6KZma2z2O7a75onTGjnNvAvMVrPzPL/vBbT65iIGHWj6rokwfmYcmxmlSf2uwg== dependencies: "@types/node" "*" @@ -353,10 +408,10 @@ resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.3.tgz#7ee330ba7caafb98090bece86a5ee44115904c2c" integrity sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA== -"@types/rimraf@^2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-2.0.2.tgz#7f0fc3cf0ff0ad2a99bb723ae1764f30acaf8b6e" - integrity sha512-Hm/bnWq0TCy7jmjeN5bKYij9vw5GrDFWME4IuxV08278NtU/VdGbzsBohcCUJ7+QMqmUq5hpRKB39HeQWJjztQ== +"@types/rimraf@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-2.0.3.tgz#0199a46af106729ba14213fda7b981278d8c84f2" + integrity sha512-dZfyfL/u9l/oi984hEXdmAjX3JHry7TLWw43u1HQ8HhPv6KtfxnrZ3T/bleJ0GEvnk9t5sM7eePkgMqz3yBcGg== dependencies: "@types/glob" "*" "@types/node" "*" @@ -407,7 +462,15 @@ after@0.8.2: resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" integrity sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8= -ajv@^6.10.0, ajv@^6.9.1: +aggregate-error@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.0.1.tgz#db2fe7246e536f40d9b5442a39e117d7dd6a24e0" + integrity sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA== + dependencies: + clean-stack "^2.0.0" + indent-string "^4.0.0" + +ajv@^6.10.0: version "6.12.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.0.tgz#06d60b96d87b8454a5adaba86e7854da629db4b7" integrity sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw== @@ -417,6 +480,16 @@ ajv@^6.10.0, ajv@^6.9.1: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +ajv@^6.9.1: + version "6.10.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.0.tgz#90d0d54439da587cd7e843bfb7045f50bd22bdf1" + integrity sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg== + dependencies: + fast-deep-equal "^2.0.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + amd-name-resolver@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/amd-name-resolver/-/amd-name-resolver-1.3.1.tgz#ffe71c683c6e7191fc4ae1bb3aaed15abea135d9" @@ -484,10 +557,10 @@ ansi-styles@^3.0.0, ansi-styles@^3.2.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansi-styles@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.0.tgz#5681f0dcf7ae5880a7841d8831c4724ed9cc0172" - integrity sha512-7kFQgnEaMdRtwf6uSfUnVr9gSGC7faurn+J/Mv90/W+iTtN0405/nLdopfMWwchyxhbGYl6TC4Sccn9TUkGAgg== +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" + integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== dependencies: "@types/color-name" "^1.1.1" color-convert "^2.0.1" @@ -505,12 +578,20 @@ anymatch@^2.0.0: micromatch "^3.1.4" normalize-path "^2.1.1" -append-transform@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab" - integrity sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw== +anymatch@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" + integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +append-transform@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-2.0.0.tgz#99d9d29c7b38391e6f428d28ce136551f0b77e12" + integrity sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg== dependencies: - default-require-extensions "^2.0.0" + default-require-extensions "^3.0.0" aproba@^1.0.3: version "1.2.0" @@ -662,11 +743,6 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= -atob-lite@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/atob-lite/-/atob-lite-2.0.0.tgz#0fef5ad46f1bd7a8502c65727f0367d5ee43d696" - integrity sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY= - atob@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" @@ -742,10 +818,10 @@ basic-auth@~2.0.0: dependencies: safe-buffer "5.1.2" -before-after-hook@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.0.1.tgz#a21dc15582fee3f035c39dcbb77f6892a99ada36" - integrity sha512-dpgMHA51KZyCu7uuxF6FCkN+scfGd/6aLxEr/14vKUo/1nPxcd2fhFv4BgYCbWxKt7JfgpbjJq9nc30Ip/p2uw== +before-after-hook@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.1.0.tgz#b6c03487f44e24200dd30ca5e6a1979c5d2fb635" + integrity sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A== better-assert@~1.0.0: version "1.0.2" @@ -754,6 +830,11 @@ better-assert@~1.0.0: dependencies: callsite "1.0.0" +binary-extensions@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c" + integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow== + "binaryextensions@1 || 2": version "2.1.2" resolved "https://registry.yarnpkg.com/binaryextensions/-/binaryextensions-2.1.2.tgz#c83c3d74233ba7674e4f313cb2a2b70f54e94b7c" @@ -847,7 +928,7 @@ braces@^2.3.1: split-string "^3.0.2" to-regex "^3.0.1" -braces@^3.0.1: +braces@^3.0.1, braces@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== @@ -1011,7 +1092,7 @@ broccoli-middleware@^2.1.1: has-ansi "^3.0.0" mime-types "^2.1.18" -broccoli-node-api@^1.6.0: +broccoli-node-api@^1.6.0, broccoli-node-api@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/broccoli-node-api/-/broccoli-node-api-1.7.0.tgz#391aa6edecd2a42c63c111b4162956b2fa288cb6" integrity sha512-QIqLSVJWJUVOhclmkmypJJH9u9s/aWH4+FH6Q6Ju5l+Io4dtwqdPUNmDfw40o6sxhbZHhqGujDJuHTML1wG8Yw== @@ -1026,6 +1107,15 @@ broccoli-node-info@^2.1.0: resolved "https://registry.yarnpkg.com/broccoli-node-info/-/broccoli-node-info-2.1.0.tgz#ca84560e8570ff78565bea1699866ddbf58ad644" integrity sha512-l6qDuboJThHfRVVWQVaTs++bFdrFTP0gJXgsWenczc1PavRVUmL1Eyb2swTAXXMpDOnr2zhNOBLx4w9AxkqbPQ== +broccoli-output-wrapper@^3.1.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/broccoli-output-wrapper/-/broccoli-output-wrapper-3.2.1.tgz#8f9d1092afe0c1a4b7a1b6f0d2c62f1c403e82ad" + integrity sha512-mhOTy8AyzEsqgefR2ejbv5QTy3dbY2bvDfkARo55Xml52r2MU0CehQu4T/CH6oPcAXkdVYG/hGm9UpV1vU9Ohg== + dependencies: + fs-extra "^8.1.0" + heimdalljs-logger "^0.1.10" + symlink-or-copy "^1.2.0" + broccoli-persistent-filter@^1.1.6: version "1.4.6" resolved "https://registry.yarnpkg.com/broccoli-persistent-filter/-/broccoli-persistent-filter-1.4.6.tgz#80762d19000880a77da33c34373299c0f6a3e615" @@ -1085,16 +1175,18 @@ broccoli-plugin@^2.1.0: rimraf "^2.3.4" symlink-or-copy "^1.1.8" -broccoli-plugin@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/broccoli-plugin/-/broccoli-plugin-3.0.0.tgz#516f2b550ffa2bb111bf54c1afb4bd0b2f02065b" - integrity sha512-aEtobBvzAlUIAaY5z+LwW2W3IJ9pruJtrT571CyfjoDFTGa8LZx0qjQG97Z7Guk5YzuxDoDNlM3hGsgBnnReTw== +broccoli-plugin@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/broccoli-plugin/-/broccoli-plugin-4.0.1.tgz#5a0468a9c8e02f763d5c162ced0a5930db4567a9" + integrity sha512-rBYVtV1rWvlDS8fd+CUUG7L/TO5VUCRjaGm2HEOBaTwUYQKswKJXLRSxwv0CYLo3QfVZJpI1akcn7NGe9kywIQ== dependencies: broccoli-node-api "^1.6.0" + broccoli-output-wrapper "^3.1.1" + fs-merger "^3.0.1" promise-map-series "^0.2.1" quick-temp "^0.1.3" - rimraf "^2.3.4" - symlink-or-copy "^1.1.8" + rimraf "^3.0.0" + symlink-or-copy "^1.3.0" broccoli-slow-trees@^3.0.1: version "3.0.1" @@ -1214,11 +1306,6 @@ bser@^2.0.0: dependencies: node-int64 "^0.4.0" -btoa-lite@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/btoa-lite/-/btoa-lite-1.0.0.tgz#337766da15801210fdd956c22e9c6891ab9d0337" - integrity sha1-M3dm2hWAEhD92VbCLpxokaudAzc= - buffer-alloc-unsafe@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" @@ -1285,15 +1372,15 @@ cacheable-request@^2.1.1: normalize-url "2.0.1" responselike "1.0.2" -caching-transform@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/caching-transform/-/caching-transform-3.0.2.tgz#601d46b91eca87687a281e71cef99791b0efca70" - integrity sha512-Mtgcv3lh3U0zRii/6qVgQODdPA4G3zhG+jtbCWj39RXuUFTMzH0vcdMtaJS1jPowd+It2Pqr6y3NJMQqOqCE2w== +caching-transform@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/caching-transform/-/caching-transform-4.0.0.tgz#00d297a4206d71e2163c39eaffa8157ac0651f0f" + integrity sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA== dependencies: - hasha "^3.0.0" - make-dir "^2.0.0" - package-hash "^3.0.0" - write-file-atomic "^2.4.2" + hasha "^5.0.0" + make-dir "^3.0.0" + package-hash "^4.0.0" + write-file-atomic "^3.0.0" calculate-cache-key-for-tree@^2.0.0: version "2.0.0" @@ -1312,7 +1399,7 @@ callsites@^3.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -camelcase@^5.0.0: +camelcase@^5.0.0, camelcase@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== @@ -1369,7 +1456,7 @@ chai@^3.3.0: deep-eql "^0.1.3" type-detect "^1.0.0" -chai@^4.1.0, chai@^4.1.2, chai@^4.2.0: +chai@^4.1.0, chai@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/chai/-/chai-4.2.0.tgz#760aa72cf20e3795e84b12877ce0e83737aa29e5" integrity sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw== @@ -1426,6 +1513,21 @@ check-error@^1.0.2: resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= +chokidar@3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.0.tgz#12c0714668c55800f659e262d4962a97faf554a6" + integrity sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.2.0" + optionalDependencies: + fsevents "~2.1.1" + ci-info@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" @@ -1463,6 +1565,11 @@ clean-css@^3.4.5: commander "2.8.x" source-map "0.4.x" +clean-stack@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== + clean-up-path@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/clean-up-path/-/clean-up-path-1.0.0.tgz#de9e8196519912e749c9eaf67c13d64fac72a3e5" @@ -1508,6 +1615,15 @@ cliui@^5.0.0: strip-ansi "^5.2.0" wrap-ansi "^5.1.0" +cliui@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" + integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^6.2.0" + clone-response@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" @@ -1710,7 +1826,7 @@ continuable-cache@^0.3.1: resolved "https://registry.yarnpkg.com/continuable-cache/-/continuable-cache-0.3.1.tgz#bd727a7faed77e71ff3985ac93351a912733ad0f" integrity sha1-vXJ6f67XfnH/OYWskzUakSczrQ8= -convert-source-map@^1.6.0, convert-source-map@^1.7.0: +convert-source-map@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== @@ -1759,25 +1875,6 @@ core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= -cp-file@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/cp-file/-/cp-file-6.2.0.tgz#40d5ea4a1def2a9acdd07ba5c0b0246ef73dc10d" - integrity sha512-fmvV4caBnofhPe8kOcitBwSn2f39QLjnAnGq3gO9dfd75mUytzKNZB1hde6QHunW2Rt+OwuBOMc3i1tNElbszA== - dependencies: - graceful-fs "^4.1.2" - make-dir "^2.0.0" - nested-error-stacks "^2.0.0" - pify "^4.0.1" - safe-buffer "^5.0.1" - -cross-spawn@^4: - version "4.0.2" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41" - integrity sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE= - dependencies: - lru-cache "^4.0.1" - which "^1.2.9" - cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -1789,6 +1886,15 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" +cross-spawn@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.1.tgz#0ab56286e0f7c24e153d04cc2aa027e43a9a5d14" + integrity sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + cryptiles@0.2.x: version "0.2.2" resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-0.2.2.tgz#ed91ff1f17ad13d3748288594f8a48a0d26f325c" @@ -1883,12 +1989,12 @@ deep-is@~0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= -default-require-extensions@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-2.0.0.tgz#f5f8fbb18a7d6d50b21f641f649ebb522cfe24f7" - integrity sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc= +default-require-extensions@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-3.0.0.tgz#e03f93aac9b2b6443fc52e5e4a37b3ad9ad8df96" + integrity sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg== dependencies: - strip-bom "^3.0.0" + strip-bom "^4.0.0" defaults@^1.0.3: version "1.0.3" @@ -1946,10 +2052,10 @@ depd@~1.1.2: resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= -deprecation@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.0.0.tgz#dd0427cd920c78bc575ec39dab2f22e7c304fb9d" - integrity sha512-lbQN037mB3VfA2JFuguM5GCJ+zPinMeCrFe+AfSZ6eqrnJA/Fs+EYMnd6Nb2mn9lf2jO9xwEd9o9lic+D4vkcw== +deprecation@^2.0.0, deprecation@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" + integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ== destroy@~1.0.4: version "1.0.4" @@ -2165,13 +2271,6 @@ entities@~2.0.0: resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.0.tgz#68d6084cab1b079767540d80e56a39b423e4abf4" integrity sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw== -error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - error@^7.0.0: version "7.0.2" resolved "https://registry.yarnpkg.com/error/-/error-7.0.2.tgz#a5f75fff4d9926126ddac0ea5dc38e689153cb02" @@ -2698,14 +2797,14 @@ find-babel-config@^1.2.0: json5 "^0.5.1" path-exists "^3.0.0" -find-cache-dir@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" - integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== +find-cache-dir@^3.2.0: + version "3.3.1" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.1.tgz#89b33fad4a4670daa94f855f7fbe31d6d84fe880" + integrity sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ== dependencies: commondir "^1.0.1" - make-dir "^2.0.0" - pkg-dir "^3.0.0" + make-dir "^3.0.2" + pkg-dir "^4.1.0" find-index@^1.1.0: version "1.1.1" @@ -2719,7 +2818,7 @@ find-up@3.0.0, find-up@^3.0.0: dependencies: locate-path "^3.0.0" -find-up@^4.1.0: +find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== @@ -2766,13 +2865,14 @@ fireworm@^0.7.0: lodash.flatten "^3.0.2" minimatch "^3.0.2" -fixturify-project@^1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/fixturify-project/-/fixturify-project-1.10.0.tgz#091c452a9bb15f09b6b9cc7cf5c0ad559f1d9aad" - integrity sha512-L1k9uiBQuN0Yr8tA9Noy2VSQ0dfg0B8qMdvT7Wb5WQKc7f3dn3bzCbSrqlb+etLW+KDV4cBC7R1OvcMg3kcxmA== +fixturify-project@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fixturify-project/-/fixturify-project-2.1.0.tgz#1677be3f116ec3f6b2b2ebb75b393d5860c4668e" + integrity sha512-B59wD4I5HDbokvmZatZTyNIjuSBjZzcZoEYdr9kdG9qRc/FSDjzUzzvHbrZL7oWfu9qsbyJBjzf0R0WC5hIZsA== dependencies: - fixturify "^1.2.0" + fixturify "^2.1.0" tmp "^0.0.33" + type-fest "^0.11.0" fixturify@^0.3.2: version "0.3.4" @@ -2782,16 +2882,17 @@ fixturify@^0.3.2: fs-extra "^0.30.0" matcher-collection "^1.0.4" -fixturify@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/fixturify/-/fixturify-1.2.0.tgz#abe8c52dd27dbbfdb874a02893781c93425663ea" - integrity sha512-b5CMQmBZKsGR6HGqdSrLOGYGHIqrR0CUrcGU/lDL0mYy+DtGm5cnb61Z0UiIUqMVZIoV0CbN+u9/Gwjj+ICg0A== +fixturify@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fixturify/-/fixturify-2.1.0.tgz#a0437faac9b6e4aeb35910a1214df866aeec5d75" + integrity sha512-gHq6UCv8DE91EpiaRSzrmvLoRvFOBzI961IQ3gXE5wfmMM1TtApDcZAonG2hnp6GJrVFCxHwP01wSw9VQJiJ1w== dependencies: - "@types/fs-extra" "^5.0.5" + "@types/fs-extra" "^8.1.0" "@types/minimatch" "^3.0.3" - "@types/rimraf" "^2.0.2" - fs-extra "^7.0.1" - matcher-collection "^2.0.0" + "@types/rimraf" "^2.0.3" + fs-extra "^8.1.0" + matcher-collection "^2.0.1" + walk-sync "^2.0.2" flat-cache@^2.0.1: version "2.0.1" @@ -2826,13 +2927,13 @@ for-in@^1.0.2: resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= -foreground-child@^1.5.6: - version "1.5.6" - resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-1.5.6.tgz#4fd71ad2dfde96789b980a5c0a295937cb2f5ce9" - integrity sha1-T9ca0t/elnibmApcCilZN8svXOk= +foreground-child@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-2.0.0.tgz#71b32800c9f15aa8f2f83f4a6bd9bff35d861a53" + integrity sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA== dependencies: - cross-spawn "^4" - signal-exit "^3.0.0" + cross-spawn "^7.0.0" + signal-exit "^3.0.2" forever-agent@~0.5.0: version "0.5.2" @@ -2887,6 +2988,11 @@ from2@^2.1.1: inherits "^2.0.1" readable-stream "^2.0.0" +fromentries@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fromentries/-/fromentries-1.2.0.tgz#e6aa06f240d6267f913cea422075ef88b63e7897" + integrity sha512-33X7H/wdfO99GdRLLgkjUrD4geAFdq/Uv0kl3HD4da6HDixd2GUg8Mw7dahLCV9r/EARkmtYBB6Tch4EEokFTQ== + fs-extra@^0.24.0: version "0.24.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.24.0.tgz#d4e4342a96675cb7846633a6099249332b539952" @@ -2926,7 +3032,7 @@ fs-extra@^5.0.0: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@^7.0.0, fs-extra@^7.0.1: +fs-extra@^7.0.0: version "7.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== @@ -2944,6 +3050,18 @@ fs-extra@^8.0.1, fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" +fs-merger@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/fs-merger/-/fs-merger-3.0.2.tgz#bf111334b89b8d65b95580d33c587dc79620a4e3" + integrity sha512-63wmgjPDClP5XcTSKdIXz66X5paYy/m2Ymq5c5YpGxRQEk1HFZ8rtti3LMNSOSw1ketbBMGbSFFcQeEnpnzDpQ== + dependencies: + broccoli-node-api "^1.7.0" + broccoli-node-info "^2.1.0" + fs-extra "^8.0.1" + fs-tree-diff "^2.0.1" + rimraf "^2.6.3" + walk-sync "^2.0.2" + fs-sync@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/fs-sync/-/fs-sync-1.0.6.tgz#13f1d33a82edf441805fcc7cf6fabe246936166d" @@ -2992,6 +3110,11 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= +fsevents@~2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805" + integrity sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA== + function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" @@ -3068,7 +3191,7 @@ git-repo-info@^2.1.1: resolved "https://registry.yarnpkg.com/git-repo-info/-/git-repo-info-2.1.1.tgz#220ffed8cbae74ef8a80e3052f2ccb5179aed058" integrity sha512-8aCohiDo4jwjOwma4FmYFd3i97urZulL8XL24nIPxuE+GZnfsAyy/g2Shqx6OjUiFKUXZM+Yy+KHnOmmA3FVcg== -glob-parent@^5.0.0, glob-parent@^5.1.0: +glob-parent@^5.0.0, glob-parent@^5.1.0, glob-parent@~5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.0.tgz#5f4c1d1e748d30cd73ad2944b3577a81b081e8c2" integrity sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw== @@ -3179,7 +3302,7 @@ got@^8.0.1: url-parse-lax "^3.0.0" url-to-options "^1.0.1" -graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0: +graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.0.tgz#8d8fdc73977cb04104721cb53666c1ca64cd328b" integrity sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg== @@ -3199,7 +3322,7 @@ growly@^1.3.0: resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= -handlebars@^4.0.11, handlebars@^4.0.4, handlebars@^4.1.2, handlebars@^4.7.3: +handlebars@^4.0.11, handlebars@^4.0.4, handlebars@^4.7.3: version "4.7.3" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.3.tgz#8ece2797826886cf8082d1726ff21d2a022550ee" integrity sha512-SRGwSYuNfx8DwHD/6InAPzD6RgeruWLT+B8e8a7gGs8FWgHzlExpTFMEq2IA6QpAfOClpKHy6+8IqTjeBCu6Kg== @@ -3318,12 +3441,13 @@ hash-for-dep@^1.0.2, hash-for-dep@^1.4.7, hash-for-dep@^1.5.0: resolve "^1.10.0" resolve-package-path "^1.0.11" -hasha@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/hasha/-/hasha-3.0.0.tgz#52a32fab8569d41ca69a61ff1a214f8eb7c8bd39" - integrity sha1-UqMvq4Vp1BymmmH/GiFPjrfIvTk= +hasha@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/hasha/-/hasha-5.2.0.tgz#33094d1f69c40a4a6ac7be53d5fe3ff95a269e0c" + integrity sha512-2W+jKdQbAdSIrggA8Q35Br8qKadTrqCTC8+XZvBWepKDK6m9XkX6Iz1a2yh2KP01kzAR/dpuMeUnocoLYDcskw== dependencies: - is-stream "^1.0.1" + is-stream "^2.0.0" + type-fest "^0.8.0" hawk@1.1.1: version "1.1.1" @@ -3380,11 +3504,6 @@ homedir-polyfill@^1.0.1: dependencies: parse-passwd "^1.0.0" -hosted-git-info@^2.1.4: - version "2.8.4" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.4.tgz#44119abaf4bc64692a16ace34700fed9c03e2546" - integrity sha512-pzXIvANXEFrc5oFFXRMkbLPQ2rXRoDERwDLyrcUxGhaZhgP54BBSl9Oheh7Vv0T090cszWBxPjkQQ5Sq1PbBRQ== - hosted-git-info@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-3.0.2.tgz#8b7e3bd114b59b51786f8bade0f39ddc80275a97" @@ -3392,6 +3511,11 @@ hosted-git-info@^3.0.2: dependencies: lru-cache "^5.1.1" +html-escaper@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.0.tgz#71e87f931de3fe09e56661ab9a29aadec707b491" + integrity sha512-a4u9BeERWGu/S8JiWEAQcdrg9v4QArtP9keViQjGMdff20fBdd8waotXaNmODqBe6uZ3Nafi7K/ho4gCQHV3Ig== + http-cache-semantics@3.8.1: version "3.8.1" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" @@ -3476,6 +3600,11 @@ imurmurhash@^0.1.4: resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= +indent-string@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== + indexof@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" @@ -3585,10 +3714,12 @@ is-accessor-descriptor@^1.0.0: dependencies: kind-of "^6.0.0" -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" is-buffer@^1.1.5: version "1.1.6" @@ -3688,7 +3819,7 @@ is-glob@^3.1.0: dependencies: is-extglob "^2.1.0" -is-glob@^4.0.0, is-glob@^4.0.1: +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== @@ -3758,11 +3889,16 @@ is-retry-allowed@^1.1.0: resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34" integrity sha1-EaBgVotnM5REAz0BJaYaINVk+zQ= -is-stream@^1.0.1, is-stream@^1.1.0: +is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= +is-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" + integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== + is-symbol@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.2.tgz#a055f6ae57192caee329e7a860118b497a950f38" @@ -3836,57 +3972,69 @@ isobject@^4.0.0: resolved "https://registry.yarnpkg.com/isobject/-/isobject-4.0.0.tgz#3f1c9155e73b192022a80819bacd0343711697b0" integrity sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA== -istanbul-lib-coverage@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz#675f0ab69503fad4b1d849f736baaca803344f49" - integrity sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA== +istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.0.0-alpha.1: + version "3.0.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz#f5944a37c70b550b02a78a5c3b2055b280cec8ec" + integrity sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg== -istanbul-lib-hook@^2.0.7: - version "2.0.7" - resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-2.0.7.tgz#c95695f383d4f8f60df1f04252a9550e15b5b133" - integrity sha512-vrRztU9VRRFDyC+aklfLoeXyNdTfga2EI3udDGn4cZ6fpSXpHLV9X6CHvfoMCPtggg8zvDDmC4b9xfu0z6/llA== +istanbul-lib-hook@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz#8f84c9434888cc6b1d0a9d7092a76d239ebf0cc6" + integrity sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ== dependencies: - append-transform "^1.0.0" + append-transform "^2.0.0" -istanbul-lib-instrument@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz#a5f63d91f0bbc0c3e479ef4c5de027335ec6d630" - integrity sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA== - dependencies: - "@babel/generator" "^7.4.0" - "@babel/parser" "^7.4.3" - "@babel/template" "^7.4.0" - "@babel/traverse" "^7.4.3" - "@babel/types" "^7.4.0" - istanbul-lib-coverage "^2.0.5" - semver "^6.0.0" +istanbul-lib-instrument@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.1.tgz#61f13ac2c96cfefb076fe7131156cc05907874e6" + integrity sha512-imIchxnodll7pvQBYOqUu88EufLCU56LMeFPZZM/fJZ1irYcYdqroaV+ACK1Ila8ls09iEYArp+nqyC6lW1Vfg== + dependencies: + "@babel/core" "^7.7.5" + "@babel/parser" "^7.7.5" + "@babel/template" "^7.7.4" + "@babel/traverse" "^7.7.4" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-coverage "^3.0.0" + semver "^6.3.0" -istanbul-lib-report@^2.0.8: - version "2.0.8" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz#5a8113cd746d43c4889eba36ab10e7d50c9b4f33" - integrity sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ== +istanbul-lib-processinfo@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz#e1426514662244b2f25df728e8fd1ba35fe53b9c" + integrity sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw== dependencies: - istanbul-lib-coverage "^2.0.5" - make-dir "^2.1.0" - supports-color "^6.1.0" + archy "^1.0.0" + cross-spawn "^7.0.0" + istanbul-lib-coverage "^3.0.0-alpha.1" + make-dir "^3.0.0" + p-map "^3.0.0" + rimraf "^3.0.0" + uuid "^3.3.3" -istanbul-lib-source-maps@^3.0.6: - version "3.0.6" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz#284997c48211752ec486253da97e3879defba8c8" - integrity sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw== +istanbul-lib-report@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#7518fe52ea44de372f460a76b5ecda9ffb73d8a6" + integrity sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw== + dependencies: + istanbul-lib-coverage "^3.0.0" + make-dir "^3.0.0" + supports-color "^7.1.0" + +istanbul-lib-source-maps@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz#75743ce6d96bb86dc7ee4352cf6366a23f0b1ad9" + integrity sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg== dependencies: debug "^4.1.1" - istanbul-lib-coverage "^2.0.5" - make-dir "^2.1.0" - rimraf "^2.6.3" + istanbul-lib-coverage "^3.0.0" source-map "^0.6.1" -istanbul-reports@^2.2.4: - version "2.2.6" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-2.2.6.tgz#7b4f2660d82b29303a8fe6091f8ca4bf058da1af" - integrity sha512-SKi4rnMyLBKe0Jy2uUdx28h8oG7ph2PPuQPvIAh31d+Ci+lSiEu4C+h3oBPuJ9+mPKhOyW0M8gY4U5NM1WLeXA== +istanbul-reports@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.0.0.tgz#d4d16d035db99581b6194e119bbf36c963c5eb70" + integrity sha512-2osTcC8zcOSUkImzN2EWQta3Vdi4WjjKw99P2yWx5mLnigAM0Rd5uYFn1cf2i/Ois45GkNjaoTqc5CxgMSX80A== dependencies: - handlebars "^4.1.2" + html-escaper "^2.0.0" + istanbul-lib-report "^3.0.0" istextorbinary@2.1.0: version "2.1.0" @@ -3933,11 +4081,6 @@ json-buffer@3.0.0: resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= -json-parse-better-errors@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" - integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== - json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" @@ -4065,16 +4208,6 @@ livereload-js@^2.3.0: resolved "https://registry.yarnpkg.com/livereload-js/-/livereload-js-2.4.0.tgz#447c31cf1ea9ab52fc20db615c5ddf678f78009c" integrity sha512-XPQH8Z2GDP/Hwz2PCDrh2mth4yFejwA1OZ/81Ti3LgKyhDcEjsSsqFWZojHG0va/duGd+WyosY7eXLDoOyqcPw== -load-json-file@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" - integrity sha1-L19Fq5HjMhYjT9U62rZo607AmTs= - dependencies: - graceful-fs "^4.1.2" - parse-json "^4.0.0" - pify "^3.0.0" - strip-bom "^3.0.0" - locate-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" @@ -4339,11 +4472,6 @@ lodash.forown@~2.3.0: lodash._objecttypes "~2.3.0" lodash.keys "~2.3.0" -lodash.get@^4.4.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" - integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= - lodash.identity@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/lodash.identity/-/lodash.identity-2.3.0.tgz#6b01a210c9485355c2a913b48b6711219a173ded" @@ -4409,11 +4537,6 @@ lodash.restparam@^3.0.0: resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" integrity sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU= -lodash.set@^4.3.2: - version "4.3.2" - resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23" - integrity sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM= - lodash.support@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/lodash.support/-/lodash.support-2.3.0.tgz#7eaf038af4f0d6aab776b44aa6dcfc80334c9bfd" @@ -4457,7 +4580,7 @@ lodash.templatesettings@~2.3.0: lodash._reinterpolate "~2.3.0" lodash.escape "~2.3.0" -lodash.uniq@^4.2.0, lodash.uniq@^4.5.0: +lodash.uniq@^4.2.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= @@ -4479,7 +4602,14 @@ lodash@^4.0.0, lodash@^4.16.1, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14 resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== -log-symbols@2.2.0, log-symbols@^2.2.0: +log-symbols@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" + integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== + dependencies: + chalk "^2.4.2" + +log-symbols@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" integrity sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg== @@ -4496,14 +4626,6 @@ lowercase-keys@^1.0.0: resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== -lru-cache@^4.0.1: - version "4.1.5" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" - integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -4516,18 +4638,10 @@ macos-release@^2.2.0: resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.2.0.tgz#ab58d55dd4714f0a05ad4b0e90f4370fef5cdea8" integrity sha512-iV2IDxZaX8dIcM7fG6cI46uNmHUxHE4yN+Z8tKHAW1TBPMZDIKHf/3L+YnOuj/FK9il14UaVdHmiQ1tsi90ltA== -make-dir@^2.0.0, make-dir@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" - integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== - dependencies: - pify "^4.0.1" - semver "^5.6.0" - -make-dir@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.0.0.tgz#1b5f39f6b9270ed33f9f054c5c0f84304989f801" - integrity sha512-grNJDhb8b1Jm1qeqW5R/O63wUo4UXo2v2HMic6YT9i/HBlF93S8jkMgH7yugvY9ABDShH4VZMn8I+U8+fCNegw== +make-dir@^3.0.0, make-dir@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.0.2.tgz#04a1acbf22221e1d6ef43559f43e05a90dbb4392" + integrity sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w== dependencies: semver "^6.0.0" @@ -4601,10 +4715,10 @@ matcher-collection@^1.0.0, matcher-collection@^1.0.4, matcher-collection@^1.1.1: dependencies: minimatch "^3.0.2" -matcher-collection@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/matcher-collection/-/matcher-collection-2.0.0.tgz#470ae263c793e897b3f1e72c695016b7aea355c4" - integrity sha512-wSi4BgQGTFfBN5J+pIaS78rEKk4qIkjrw+NfJYdHsd2cRVIQsbDi3BZtNAXTFA2WHvlbS9kLGtTjv3cPJKuRSw== +matcher-collection@^2.0.0, matcher-collection@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/matcher-collection/-/matcher-collection-2.0.1.tgz#90be1a4cf58d6f2949864f65bb3b0f3e41303b29" + integrity sha512-daE62nS2ZQsDg9raM0IlZzLmI2u+7ZapXBwdoeBUKAYERPDDIc0qNqA8E0Rp2D+gspKR7BgIFP52GeujaGXWeQ== dependencies: "@types/minimatch" "^3.0.3" minimatch "^3.0.2" @@ -4636,13 +4750,6 @@ merge-descriptors@1.0.1: resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= -merge-source-map@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/merge-source-map/-/merge-source-map-1.1.0.tgz#2fdde7e6020939f70906a68f2d7ae685e4c8c646" - integrity sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw== - dependencies: - source-map "^0.6.1" - merge-trees@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-trees/-/merge-trees-2.0.0.tgz#a560d796e566c5d9b2c40472a2967cca48d85161" @@ -4780,13 +4887,14 @@ mktemp@~0.4.0: resolved "https://registry.yarnpkg.com/mktemp/-/mktemp-0.4.0.tgz#6d0515611c8a8c84e484aa2000129b98e981ff0b" integrity sha1-bQUVYRyKjITkhKogABKbmOmB/ws= -mocha@^6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-6.2.1.tgz#da941c99437da9bac412097859ff99543969f94c" - integrity sha512-VCcWkLHwk79NYQc8cxhkmI8IigTIhsCwZ6RTxQsqK6go4UvEhzJkYuHm8B2YtlSxcYq2fY+ucr4JBwoD6ci80A== +mocha@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.1.0.tgz#c784f579ad0904d29229ad6cb1e2514e4db7d249" + integrity sha512-MymHK8UkU0K15Q/zX7uflZgVoRWiTjy0fXE/QjKts6mowUvGxOdPhZ2qj3b0iZdUrNZlW9LAIMFHB4IW+2b3EQ== dependencies: ansi-colors "3.2.3" browser-stdout "1.3.1" + chokidar "3.3.0" debug "3.2.6" diff "3.5.0" escape-string-regexp "1.0.5" @@ -4795,11 +4903,11 @@ mocha@^6.2.1: growl "1.10.5" he "1.2.0" js-yaml "3.13.1" - log-symbols "2.2.0" + log-symbols "3.0.0" minimatch "3.0.4" mkdirp "0.5.1" ms "2.1.1" - node-environment-flags "1.0.5" + node-environment-flags "1.0.6" object.assign "4.1.0" strip-json-comments "2.0.1" supports-color "6.0.0" @@ -4887,11 +4995,6 @@ neo-async@^2.6.0: resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== -nested-error-stacks@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/nested-error-stacks/-/nested-error-stacks-2.1.0.tgz#0fbdcf3e13fe4994781280524f8b96b0cdff9c61" - integrity sha512-AO81vsIO1k1sM4Zrd6Hu7regmJN1NSiAja10gc4bX3F0wd+9rQmcuHQaHVQCYIEC8iFXnE+mavh23GOt7wBgug== - next-tick@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" @@ -4902,22 +5005,20 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -nock@^11.7.0: - version "11.7.0" - resolved "https://registry.yarnpkg.com/nock/-/nock-11.7.0.tgz#5eaae8b8a55c0dfc014d05692c8cf3d31d61a342" - integrity sha512-7c1jhHew74C33OBeRYyQENT+YXQiejpwIrEjinh6dRurBae+Ei4QjeUaPlkptIF0ZacEiVCnw8dWaxqepkiihg== +nock@^12.0.2: + version "12.0.2" + resolved "https://registry.yarnpkg.com/nock/-/nock-12.0.2.tgz#47617b34738e026b29d2294b4579e35b27e6a4d3" + integrity sha512-pTckyfP8QHvwXP/oX+zQuSIL3S/mWTd84ba4pOGZlS/FgRZyljv4C3ZyOjgMilvkydSaERML/aJEF13EBUuDTQ== dependencies: - chai "^4.1.2" debug "^4.1.0" json-stringify-safe "^5.0.1" lodash "^4.17.13" - mkdirp "^0.5.0" propagate "^2.0.0" -node-environment-flags@1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.5.tgz#fa930275f5bf5dae188d6192b24b4c8bbac3d76a" - integrity sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ== +node-environment-flags@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.6.tgz#a30ac13621f6f7d674260a54dede048c3982c088" + integrity sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw== dependencies: object.getownpropertydescriptors "^2.0.3" semver "^5.7.0" @@ -4948,6 +5049,13 @@ node-notifier@^5.0.1: shellwords "^0.1.1" which "^1.3.0" +node-preload@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/node-preload/-/node-preload-0.2.1.tgz#c03043bb327f417a18fee7ab7ee57b408a144301" + integrity sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ== + dependencies: + process-on-spawn "^1.0.0" + node-uuid@~1.4.0: version "1.4.8" resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.8.tgz#b040eb0923968afabf8d32fb1f17f1167fdab907" @@ -4960,16 +5068,6 @@ nopt@^3.0.6: dependencies: abbrev "1" -normalize-package-data@^2.3.2: - version "2.5.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" - integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== - dependencies: - hosted-git-info "^2.1.4" - resolve "^1.10.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - normalize-path@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" @@ -4977,6 +5075,11 @@ normalize-path@^2.1.1: dependencies: remove-trailing-separator "^1.0.1" +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + normalize-url@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-2.0.1.tgz#835a9da1551fa26f70e92329069a23aa6574d7e6" @@ -5018,36 +5121,39 @@ number-is-nan@^1.0.0: resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= -nyc@^14.1.0: - version "14.1.1" - resolved "https://registry.yarnpkg.com/nyc/-/nyc-14.1.1.tgz#151d64a6a9f9f5908a1b73233931e4a0a3075eeb" - integrity sha512-OI0vm6ZGUnoGZv/tLdZ2esSVzDwUC88SNs+6JoSOMVxA+gKMB8Tk7jBwgemLx4O40lhhvZCVw1C+OYLOBOPXWw== +nyc@^15.0.0: + version "15.0.0" + resolved "https://registry.yarnpkg.com/nyc/-/nyc-15.0.0.tgz#eb32db2c0f29242c2414fe46357f230121cfc162" + integrity sha512-qcLBlNCKMDVuKb7d1fpxjPR8sHeMVX0CHarXAVzrVWoFrigCkYR8xcrjfXSPi5HXM7EU78L6ywO7w1c5rZNCNg== dependencies: - archy "^1.0.0" - caching-transform "^3.0.2" - convert-source-map "^1.6.0" - cp-file "^6.2.0" - find-cache-dir "^2.1.0" - find-up "^3.0.0" - foreground-child "^1.5.6" - glob "^7.1.3" - istanbul-lib-coverage "^2.0.5" - istanbul-lib-hook "^2.0.7" - istanbul-lib-instrument "^3.3.0" - istanbul-lib-report "^2.0.8" - istanbul-lib-source-maps "^3.0.6" - istanbul-reports "^2.2.4" + "@istanbuljs/load-nyc-config" "^1.0.0" + "@istanbuljs/schema" "^0.1.2" + caching-transform "^4.0.0" + convert-source-map "^1.7.0" + decamelize "^1.2.0" + find-cache-dir "^3.2.0" + find-up "^4.1.0" + foreground-child "^2.0.0" + glob "^7.1.6" + istanbul-lib-coverage "^3.0.0" + istanbul-lib-hook "^3.0.0" + istanbul-lib-instrument "^4.0.0" + istanbul-lib-processinfo "^2.0.2" + istanbul-lib-report "^3.0.0" + istanbul-lib-source-maps "^4.0.0" + istanbul-reports "^3.0.0" js-yaml "^3.13.1" - make-dir "^2.1.0" - merge-source-map "^1.1.0" - resolve-from "^4.0.0" - rimraf "^2.6.3" + make-dir "^3.0.0" + node-preload "^0.2.0" + p-map "^3.0.0" + process-on-spawn "^1.0.0" + resolve-from "^5.0.0" + rimraf "^3.0.0" signal-exit "^3.0.2" - spawn-wrap "^1.4.2" - test-exclude "^5.2.3" - uuid "^3.3.2" - yargs "^13.2.2" - yargs-parser "^13.0.0" + spawn-wrap "^2.0.0" + test-exclude "^6.0.0" + uuid "^3.3.3" + yargs "^15.0.2" oauth-sign@~0.3.0: version "0.3.0" @@ -5120,11 +5226,6 @@ object.pick@^1.3.0: dependencies: isobject "^3.0.1" -octokit-pagination-methods@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz#cf472edc9d551055f9ef73f6e42b4dbb4c80bea4" - integrity sha512-fZ4qZdQ2nxJvtcasX7Ghl+WlWS/d9IgnBIwFZXVNNZUmzpno91SX5bc5vuxiuKoCtK78XxGGNuSCrDC7xYB3OQ== - on-finished@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" @@ -5190,7 +5291,7 @@ ora@^3.4.0: strip-ansi "^5.2.0" wcwidth "^1.0.1" -os-homedir@^1.0.0, os-homedir@^1.0.1: +os-homedir@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= @@ -5257,6 +5358,13 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" +p-map@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-3.0.0.tgz#d704d9af8a2ba684e2600d9a215983d4141a979d" + integrity sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ== + dependencies: + aggregate-error "^3.0.0" + p-timeout@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-2.0.1.tgz#d8dd1979595d2dc0139e1fe46b8b646cb3cdf038" @@ -5269,13 +5377,13 @@ p-try@^2.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== -package-hash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/package-hash/-/package-hash-3.0.0.tgz#50183f2d36c9e3e528ea0a8605dff57ce976f88e" - integrity sha512-lOtmukMDVvtkL84rJHI7dpTYq+0rli8N2wlnqUcBuDWCfVhRUfOmnR9SsoHFMLpACvEV60dX7rd0rFaYDZI+FA== +package-hash@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/package-hash/-/package-hash-4.0.0.tgz#3537f654665ec3cc38827387fc904c163c54f506" + integrity sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ== dependencies: graceful-fs "^4.1.15" - hasha "^3.0.0" + hasha "^5.0.0" lodash.flattendeep "^4.4.0" release-zalgo "^1.0.0" @@ -5286,14 +5394,6 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -parse-json@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" - integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= - dependencies: - error-ex "^1.3.1" - json-parse-better-errors "^1.0.1" - parse-passwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" @@ -5343,6 +5443,11 @@ path-key@^2.0.0, path-key@^2.0.1: resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + path-parse@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" @@ -5370,13 +5475,6 @@ path-to-regexp@0.1.7: resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= -path-type@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" - integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== - dependencies: - pify "^3.0.0" - path-type@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" @@ -5387,7 +5485,7 @@ pathval@^1.1.0: resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" integrity sha1-uULm1L3mUwBe9rcTYd74cn0GReA= -picomatch@^2.0.5: +picomatch@^2.0.4, picomatch@^2.0.5: version "2.2.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.1.tgz#21bac888b6ed8601f831ce7816e335bc779f0a4a" integrity sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA== @@ -5397,11 +5495,6 @@ pify@^3.0.0: resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= -pify@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" - integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== - pinkie-promise@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" @@ -5414,12 +5507,12 @@ pinkie@^2.0.0: resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= -pkg-dir@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" - integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== +pkg-dir@^4.1.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== dependencies: - find-up "^3.0.0" + find-up "^4.0.0" pkg-up@^3.1.0: version "3.1.0" @@ -5474,6 +5567,13 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== +process-on-spawn@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/process-on-spawn/-/process-on-spawn-1.0.0.tgz#95b05a23073d30a17acfdc92a440efd2baefdc93" + integrity sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg== + dependencies: + fromentries "^1.2.0" + process-relative-require@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/process-relative-require/-/process-relative-require-1.0.0.tgz#1590dfcf5b8f2983ba53e398446b68240b4cc68a" @@ -5525,11 +5625,6 @@ proxy-addr@~2.0.5: forwarded "~0.1.2" ipaddr.js "1.9.0" -pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= - psl@^1.1.28: version "1.1.32" resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.32.tgz#3f132717cf2f9c169724b2b6caf373cf694198db" @@ -5567,10 +5662,10 @@ query-string@^5.0.1: object-assign "^4.1.0" strict-uri-encode "^1.0.0" -quibble@^0.5.6: - version "0.5.6" - resolved "https://registry.yarnpkg.com/quibble/-/quibble-0.5.6.tgz#f692fcf22dc8da832b212cde9b11fe88296bd582" - integrity sha512-nAqsl6RxhWK36grfglqEXC0ihA3Q+DaCKeqJti/uz8CpiE92590hx3TRob+z89udYqj3PoUpQvjW77T1IR70mw== +quibble@^0.5.7: + version "0.5.7" + resolved "https://registry.yarnpkg.com/quibble/-/quibble-0.5.7.tgz#34ea5467eee32dfa37968742a5af21b02cd6ebe0" + integrity sha512-QnHxlD12qhGGjvoEW4PIp8tA80tKjh5CxTg5wLTPp/aqvHElBA+Ag3JN0dWlHY96CUaJqSGmLxTLi+7wbysyZw== dependencies: lodash "^4.17.14" resolve "^1.11.1" @@ -5612,23 +5707,6 @@ raw-body@~1.1.0: bytes "1" string_decoder "0.10" -read-pkg-up@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-4.0.0.tgz#1b221c6088ba7799601c808f91161c66e58f8978" - integrity sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA== - dependencies: - find-up "^3.0.0" - read-pkg "^3.0.0" - -read-pkg@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" - integrity sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k= - dependencies: - load-json-file "^4.0.0" - normalize-package-data "^2.3.2" - path-type "^3.0.0" - "readable-stream@2 || 3": version "3.4.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.4.0.tgz#a51c26754658e0a3c21dbf59163bd45ba6f447fc" @@ -5661,6 +5739,13 @@ readable-stream@~1.0.2: isarray "0.0.1" string_decoder "~0.10.x" +readdirp@~3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839" + integrity sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ== + dependencies: + picomatch "^2.0.4" + redeyed@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/redeyed/-/redeyed-1.0.1.tgz#e96c193b40c0816b00aec842698e61185e55498a" @@ -5766,6 +5851,11 @@ resolve-from@^4.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + resolve-package-path@^1.0.11: version "1.2.7" resolved "https://registry.yarnpkg.com/resolve-package-path/-/resolve-package-path-1.2.7.tgz#2a7bc37ad96865e239330e3102c31322847e652e" @@ -5883,7 +5973,7 @@ rxjs@^6.4.0, rxjs@^6.5.3: dependencies: tslib "^1.9.0" -safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@5.1.2, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== @@ -5920,7 +6010,7 @@ sane@^4.0.0, sane@^4.1.0: minimist "^1.1.1" walker "~1.0.5" -"semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.6.0, semver@^5.7.0: +semver@^5.4.1, semver@^5.5.0, semver@^5.7.0: version "5.7.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== @@ -6006,11 +6096,23 @@ shebang-command@^1.2.0: dependencies: shebang-regex "^1.0.0" +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + shellwords@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" @@ -6208,43 +6310,17 @@ spawn-args@^0.2.0: resolved "https://registry.yarnpkg.com/spawn-args/-/spawn-args-0.2.0.tgz#fb7d0bd1d70fd4316bd9e3dec389e65f9d6361bb" integrity sha1-+30L0dcP1DFr2ePew4nmX51jYbs= -spawn-wrap@^1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-1.4.2.tgz#cff58e73a8224617b6561abdc32586ea0c82248c" - integrity sha512-vMwR3OmmDhnxCVxM8M+xO/FtIp6Ju/mNaDfCMMW7FDcLRTPFWUswec4LXJHTJE2hwTI9O0YBfygu4DalFl7Ylg== +spawn-wrap@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-2.0.0.tgz#103685b8b8f9b79771318827aa78650a610d457e" + integrity sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg== dependencies: - foreground-child "^1.5.6" - mkdirp "^0.5.0" - os-homedir "^1.0.1" - rimraf "^2.6.2" + foreground-child "^2.0.0" + is-windows "^1.0.2" + make-dir "^3.0.0" + rimraf "^3.0.0" signal-exit "^3.0.2" - which "^1.3.0" - -spdx-correct@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" - integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== - dependencies: - spdx-expression-parse "^3.0.0" - spdx-license-ids "^3.0.0" - -spdx-exceptions@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" - integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== - -spdx-expression-parse@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" - integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== - dependencies: - spdx-exceptions "^2.1.0" - spdx-license-ids "^3.0.0" - -spdx-license-ids@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.4.tgz#75ecd1a88de8c184ef015eafb51b5b48bfd11bb1" - integrity sha512-7j8LYJLeY/Yb6ACbQ7F76qy5jHkp0U6jgBfJsk97bwWlVUnUWsAgpyaCvo17h0/RQGnQ036tVDomiwoI4pDkQA== + which "^2.0.1" split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" @@ -6312,7 +6388,7 @@ string-width@^3.0.0, string-width@^3.1.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^5.1.0" -string-width@^4.1.0: +string-width@^4.1.0, string-width@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== @@ -6397,10 +6473,10 @@ strip-ansi@^6.0.0: dependencies: ansi-regex "^5.0.0" -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= +strip-bom@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" + integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== strip-eof@^1.0.0: version "1.0.0" @@ -6472,13 +6548,6 @@ supports-color@^5.3.0: dependencies: has-flag "^3.0.0" -supports-color@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" - integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== - dependencies: - has-flag "^3.0.0" - supports-color@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" @@ -6486,7 +6555,7 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" -symlink-or-copy@^1.0.0, symlink-or-copy@^1.0.1, symlink-or-copy@^1.1.8, symlink-or-copy@^1.2.0, symlink-or-copy@^1.3.1: +symlink-or-copy@^1.0.0, symlink-or-copy@^1.0.1, symlink-or-copy@^1.1.8, symlink-or-copy@^1.2.0, symlink-or-copy@^1.3.0, symlink-or-copy@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/symlink-or-copy/-/symlink-or-copy-1.3.1.tgz#9506dd64d8e98fa21dcbf4018d1eab23e77f71fe" integrity sha512-0K91MEXFpBUaywiwSSkmKjnGcasG/rVBXFLJz5DrgGabpYD6N+3yZrfD6uUIfpuTu65DZLHi7N8CizHc07BPZA== @@ -6528,23 +6597,22 @@ temp@0.9.1: dependencies: rimraf "~2.6.2" -test-exclude@^5.2.3: - version "5.2.3" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-5.2.3.tgz#c3d3e1e311eb7ee405e092dac10aefd09091eac0" - integrity sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g== +test-exclude@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" + integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== dependencies: - glob "^7.1.3" + "@istanbuljs/schema" "^0.1.2" + glob "^7.1.4" minimatch "^3.0.4" - read-pkg-up "^4.0.0" - require-main-filename "^2.0.0" -testdouble@^3.12.4, testdouble@^3.2.6: - version "3.12.4" - resolved "https://registry.yarnpkg.com/testdouble/-/testdouble-3.12.4.tgz#c8b30a62077212c10c2e05dc4105610d28013df4" - integrity sha512-Ake1UjvG6XKYUrVGyNv52xg5lQM079dTQW8/F8GWuE1lbC1NRmkUgtgLrsRr+7SPQZZhIhZp6lHUWXMMBvSHEw== +testdouble@^3.13.0, testdouble@^3.2.6: + version "3.13.0" + resolved "https://registry.yarnpkg.com/testdouble/-/testdouble-3.13.0.tgz#a1b74db46284991f2d35f11b0239bc2b220953e6" + integrity sha512-koLssZcTF1ou1hVD7rYvxOjx3xQHODDH1ajKckL8iID05Y2BEm/+U1YDrQV3lIejCqAp7uwbVNVHyhK7ikUxsg== dependencies: lodash "^4.17.15" - quibble "^0.5.6" + quibble "^0.5.7" stringify-object-es5 "^2.5.0" theredoc "^1.0.0" @@ -6776,7 +6844,7 @@ type-fest@^0.11.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1" integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ== -type-fest@^0.8.1: +type-fest@^0.8.0, type-fest@^0.8.1: version "0.8.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== @@ -6856,6 +6924,13 @@ universal-user-agent@^4.0.0: dependencies: os-name "^3.1.0" +universal-user-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-5.0.0.tgz#a3182aa758069bf0e79952570ca757de3579c1d9" + integrity sha512-B5TPtzZleXyPrUMKCpEHFmVhMN6EhmJYjG5PQna9s7mXeSqGTLap4OpqLl5FCEFUI3UBmllkETwKf/db66Y54Q== + dependencies: + os-name "^3.1.0" + universalify@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" @@ -6925,7 +7000,7 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= -uuid@^3.3.2, uuid@^3.4.0: +uuid@^3.3.3, uuid@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== @@ -6935,14 +7010,6 @@ v8-compile-cache@^2.0.3: resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e" integrity sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g== -validate-npm-package-license@^3.0.1: - version "3.0.4" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" - integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== - dependencies: - spdx-correct "^3.0.0" - spdx-expression-parse "^3.0.0" - validate-npm-package-name@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz#5fa912d81eb7d0c74afc140de7317f0ca7df437e" @@ -7052,7 +7119,7 @@ which@1.3.1, which@^1.2.14, which@^1.2.9, which@^1.3.0: dependencies: isexe "^2.0.0" -which@2.0.2: +which@2.0.2, which@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== @@ -7101,20 +7168,20 @@ wrap-ansi@^5.1.0: string-width "^3.0.0" strip-ansi "^5.0.0" +wrap-ansi@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= -write-file-atomic@^2.4.2: - version "2.4.3" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481" - integrity sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ== - dependencies: - graceful-fs "^4.1.11" - imurmurhash "^0.1.4" - signal-exit "^3.0.2" - write-file-atomic@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.0.tgz#1b64dbbf77cb58fd09056963d63e62667ab4fb21" @@ -7169,11 +7236,6 @@ yaeti@^0.0.6: resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" integrity sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc= -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= - yallist@^3.0.0, yallist@^3.0.2: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" @@ -7187,7 +7249,7 @@ yam@^1.0.0: fs-extra "^4.0.2" lodash.merge "^4.6.0" -yargs-parser@13.1.1, yargs-parser@^13.0.0, yargs-parser@^13.1.1: +yargs-parser@13.1.1, yargs-parser@^13.1.1: version "13.1.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.1.tgz#d26058532aa06d365fe091f6a1fc06b2f7e5eca0" integrity sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ== @@ -7195,6 +7257,14 @@ yargs-parser@13.1.1, yargs-parser@^13.0.0, yargs-parser@^13.1.1: camelcase "^5.0.0" decamelize "^1.2.0" +yargs-parser@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.0.tgz#1b0ab1118ebd41f68bb30e729f4c83df36ae84c3" + integrity sha512-o/Jr6JBOv6Yx3pL+5naWSoIA2jJ+ZkMYQG/ie9qFbukBe4uzmBatlXFOiu/tNKRWEtyf+n5w7jc/O16ufqOTdQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + yargs-unparser@1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" @@ -7204,7 +7274,7 @@ yargs-unparser@1.6.0: lodash "^4.17.15" yargs "^13.3.0" -yargs@13.3.0, yargs@^13.2.2, yargs@^13.3.0: +yargs@13.3.0, yargs@^13.3.0: version "13.3.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.0.tgz#4c657a55e07e5f2cf947f8a366567c04a0dedc83" integrity sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA== @@ -7220,6 +7290,23 @@ yargs@13.3.0, yargs@^13.2.2, yargs@^13.3.0: y18n "^4.0.0" yargs-parser "^13.1.1" +yargs@^15.0.2: + version "15.3.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.3.0.tgz#403af6edc75b3ae04bf66c94202228ba119f0976" + integrity sha512-g/QCnmjgOl1YJjGsnUg2SatC7NUYEiLXJqxNOQU9qSpjzGtGXda9b+OKccr1kLTy8BN9yqEyqfq5lxlwdc13TA== + dependencies: + cliui "^6.0.0" + decamelize "^1.2.0" + find-up "^4.1.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^4.2.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^18.1.0" + yeast@0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419" From 213addfe0c74320bd9dd7276d4ffe5fc7b4c7dfe Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sat, 14 Mar 2020 19:36:59 -0400 Subject: [PATCH 267/818] Update production dependencies to latest. Changes for major version bumps: * https://github.com/avoidwork/filesize.js/blob/master/CHANGELOG.md * https://github.com/gjtorikian/isBinaryFile/releases/tag/4.0.0 * https://github.com/npm/node-semver/blob/master/CHANGELOG.md#700 * https://github.com/uuidjs/uuid/blob/master/CHANGELOG.md --- lib/models/file-info.js | 2 +- package.json | 28 +++--- yarn.lock | 208 +++++++++++++++++++++++----------------- 3 files changed, 134 insertions(+), 104 deletions(-) diff --git a/lib/models/file-info.js b/lib/models/file-info.js index c4ce5536f6..0a497eff35 100644 --- a/lib/models/file-info.js +++ b/lib/models/file-info.js @@ -6,7 +6,7 @@ const chalk = require('chalk'); const EditFileDiff = require('./edit-file-diff'); const EOL = require('os').EOL; const rxEOL = new RegExp(EOL, 'g'); -const isBinaryFile = require('isbinaryfile').sync; +const isBinaryFile = require('isbinaryfile').isBinaryFileSync; const hash = require('promise.hash.helper'); const canEdit = require('../utilities/open-editor').canEdit; const processTemplate = require('../utilities/process-template'); diff --git a/package.json b/package.json index deb96b6878..341a20150c 100644 --- a/package.json +++ b/package.json @@ -37,8 +37,8 @@ "test:debug": "node --unhandled-rejections=strict debug tests/runner" }, "dependencies": { - "@babel/core": "^7.8.4", - "@babel/plugin-transform-modules-amd": "^7.7.5", + "@babel/core": "^7.8.7", + "@babel/plugin-transform-modules-amd": "^7.8.3", "amd-name-resolver": "^1.3.1", "babel-plugin-module-resolver": "^4.0.0", "bower-config": "^1.4.1", @@ -68,25 +68,25 @@ "console-ui": "^3.1.1", "core-object": "^3.1.5", "dag-map": "^2.0.2", - "diff": "^4.0.1", + "diff": "^4.0.2", "ember-cli-is-package-missing": "^1.0.0", "ember-cli-lodash-subset": "^2.0.1", "ember-cli-normalize-entity-name": "^1.0.0", "ember-cli-preprocess-registry": "^3.3.0", "ember-cli-string-utils": "^1.1.0", "ember-source-channel-url": "^2.0.1", - "ensure-posix-path": "^1.0.2", + "ensure-posix-path": "^1.1.1", "execa": "^1.0.0", "exit": "^0.1.2", - "express": "^4.16.4", - "filesize": "^4.2.0", + "express": "^4.17.1", + "filesize": "^6.1.0", "find-up": "^4.1.0", "find-yarn-workspace-root": "^1.2.1", "fs-extra": "^8.1.0", "fs-tree-diff": "^2.0.1", "get-caller-file": "^2.0.5", "git-repo-info": "^2.1.1", - "glob": "^7.1.4", + "glob": "^7.1.6", "heimdalljs": "^0.2.6", "heimdalljs-fs-monitor": "^0.2.3", "heimdalljs-graph": "^1.0.0", @@ -94,7 +94,7 @@ "http-proxy": "^1.18.0", "inflection": "^1.12.0", "is-git-url": "^1.0.0", - "isbinaryfile": "^3.0.3", + "isbinaryfile": "^4.0.4", "js-yaml": "^3.13.1", "json-stable-stringify": "^1.0.1", "leek": "0.0.24", @@ -104,24 +104,24 @@ "minimatch": "^3.0.4", "morgan": "^1.9.1", "nopt": "^3.0.6", - "npm-package-arg": "^8.0.0", + "npm-package-arg": "^8.0.1", "p-defer": "^3.0.0", "portfinder": "^1.0.25", "promise-map-series": "^0.3.0", - "promise.hash.helper": "^1.0.2", + "promise.hash.helper": "^1.0.6", "quick-temp": "^0.1.8", "resolve": "^1.15.1", "resolve-package-path": "^2.0.0", "sane": "^4.1.0", - "semver": "^6.3.0", + "semver": "^7.1.3", "silent-error": "^1.1.1", - "sort-package-json": "^1.39.1", + "sort-package-json": "^1.40.0", "symlink-or-copy": "^1.3.1", "temp": "0.9.1", - "testem": "^3.0.1", + "testem": "^3.0.2", "tiny-lr": "^1.1.1", "tree-sync": "^2.0.0", - "uuid": "^3.4.0", + "uuid": "^7.0.2", "walk-sync": "^2.0.2", "watch-detector": "^1.0.0", "yam": "^1.0.0" diff --git a/yarn.lock b/yarn.lock index 302ab3f815..7ae80bbd88 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,7 +9,7 @@ dependencies: "@babel/highlight" "^7.8.3" -"@babel/core@^7.3.4", "@babel/core@^7.7.5", "@babel/core@^7.8.3", "@babel/core@^7.8.4": +"@babel/core@^7.3.4", "@babel/core@^7.7.5", "@babel/core@^7.8.3", "@babel/core@^7.8.7": version "7.8.7" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.7.tgz#b69017d221ccdeb203145ae9da269d72cf102f3b" integrity sha512-rBlqF3Yko9cynC5CCFy6+K/w2N+Sq/ff2BPy+Krp7rHlABIr5epbA7OxVeKoMHB39LZOp1UY5SuLjy6uWi35yA== @@ -56,39 +56,64 @@ dependencies: "@babel/types" "^7.8.3" -"@babel/helper-module-imports@^7.7.4": - version "7.7.4" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.7.4.tgz#e5a92529f8888bf319a6376abfbd1cebc491ad91" - integrity sha512-dGcrX6K9l8258WFjyDLJwuVKxR4XZfU0/vTUgOQYWEnRD8mgr+p4d6fCUMq/ys0h4CCt/S5JhbvtyErjWouAUQ== +"@babel/helper-member-expression-to-functions@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz#659b710498ea6c1d9907e0c73f206eee7dadc24c" + integrity sha512-fO4Egq88utkQFjbPrSHGmGLFqmrshs11d46WI+WZDESt7Wu7wN2G2Iu+NMMZJFDOVRHAMIkB5SNh30NtwCA7RA== dependencies: - "@babel/types" "^7.7.4" + "@babel/types" "^7.8.3" -"@babel/helper-module-transforms@^7.7.5": - version "7.7.5" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.7.5.tgz#d044da7ffd91ec967db25cd6748f704b6b244835" - integrity sha512-A7pSxyJf1gN5qXVcidwLWydjftUN878VkalhXX5iQDuGyiGK3sOrrKKHF4/A4fwHtnsotv/NipwAeLzY4KQPvw== +"@babel/helper-module-imports@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz#7fe39589b39c016331b6b8c3f441e8f0b1419498" + integrity sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg== dependencies: - "@babel/helper-module-imports" "^7.7.4" - "@babel/helper-simple-access" "^7.7.4" - "@babel/helper-split-export-declaration" "^7.7.4" - "@babel/template" "^7.7.4" - "@babel/types" "^7.7.4" + "@babel/types" "^7.8.3" + +"@babel/helper-module-transforms@^7.8.3": + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.8.6.tgz#6a13b5eecadc35692047073a64e42977b97654a4" + integrity sha512-RDnGJSR5EFBJjG3deY0NiL0K9TO8SXxS9n/MPsbPK/s9LbQymuLNtlzvDiNS7IpecuL45cMeLVkA+HfmlrnkRg== + dependencies: + "@babel/helper-module-imports" "^7.8.3" + "@babel/helper-replace-supers" "^7.8.6" + "@babel/helper-simple-access" "^7.8.3" + "@babel/helper-split-export-declaration" "^7.8.3" + "@babel/template" "^7.8.6" + "@babel/types" "^7.8.6" lodash "^4.17.13" -"@babel/helper-plugin-utils@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" - integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA== +"@babel/helper-optimise-call-expression@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.8.3.tgz#7ed071813d09c75298ef4f208956006b6111ecb9" + integrity sha512-Kag20n86cbO2AvHca6EJsvqAd82gc6VMGule4HwebwMlwkpXuVqrNRj6CkCV2sKxgi9MyAUnZVnZ6lJ1/vKhHQ== + dependencies: + "@babel/types" "^7.8.3" + +"@babel/helper-plugin-utils@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz#9ea293be19babc0f52ff8ca88b34c3611b208670" + integrity sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ== -"@babel/helper-simple-access@^7.7.4": - version "7.7.4" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.7.4.tgz#a169a0adb1b5f418cfc19f22586b2ebf58a9a294" - integrity sha512-zK7THeEXfan7UlWsG2A6CI/L9jVnI5+xxKZOdej39Y0YtDYKx9raHk5F2EtK9K8DHRTihYwg20ADt9S36GR78A== +"@babel/helper-replace-supers@^7.8.6": + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz#5ada744fd5ad73203bf1d67459a27dcba67effc8" + integrity sha512-PeMArdA4Sv/Wf4zXwBKPqVj7n9UF/xg6slNRtZW84FM7JpE1CbG8B612FyM4cxrf4fMAMGO0kR7voy1ForHHFA== dependencies: - "@babel/template" "^7.7.4" - "@babel/types" "^7.7.4" + "@babel/helper-member-expression-to-functions" "^7.8.3" + "@babel/helper-optimise-call-expression" "^7.8.3" + "@babel/traverse" "^7.8.6" + "@babel/types" "^7.8.6" -"@babel/helper-split-export-declaration@^7.7.4", "@babel/helper-split-export-declaration@^7.8.3": +"@babel/helper-simple-access@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.8.3.tgz#7f8109928b4dab4654076986af575231deb639ae" + integrity sha512-VNGUDjx5cCWg4vvCTR8qQ7YJYZ+HBjxOgXEl7ounz+4Sn7+LMD3CFrCTEU6/qXKbA2nKg21CwhhBzO0RpRbdCw== + dependencies: + "@babel/template" "^7.8.3" + "@babel/types" "^7.8.3" + +"@babel/helper-split-export-declaration@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz#31a9f30070f91368a7182cf05f831781065fc7a9" integrity sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA== @@ -118,13 +143,13 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.8.tgz#4c3b7ce36db37e0629be1f0d50a571d2f86f6cd4" integrity sha512-mO5GWzBPsPf6865iIbzNE0AvkKF3NE+2S3eRUpE+FE07BOAkXh6G+GW/Pj01hhXjve1WScbaIO4UlY1JKeqCcA== -"@babel/plugin-transform-modules-amd@^7.7.5": - version "7.7.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.7.5.tgz#39e0fb717224b59475b306402bb8eedab01e729c" - integrity sha512-CT57FG4A2ZUNU1v+HdvDSDrjNWBrtCmSH6YbbgN3Lrf0Di/q/lWRxZrE72p3+HCCz9UjfZOEBdphgC0nzOS6DQ== +"@babel/plugin-transform-modules-amd@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.8.3.tgz#65606d44616b50225e76f5578f33c568a0b876a5" + integrity sha512-MadJiU3rLKclzT5kBH4yxdry96odTUwuqrZM+GllFI/VhxfPz+k9MshJM+MwhfkCdxxclSbSBbUGciBngR+kEQ== dependencies: - "@babel/helper-module-transforms" "^7.7.5" - "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-module-transforms" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" babel-plugin-dynamic-import-node "^2.3.0" "@babel/polyfill@^7.8.3": @@ -159,7 +184,7 @@ globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.7.4", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.8.7": +"@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.8.7": version "7.8.7" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.7.tgz#1fc9729e1acbb2337d5b6977a63979b4819f5d1d" integrity sha512-k2TreEHxFA4CjGkL+GYjRyx35W0Mr7DP5+9q6WMkyKXB+904bYmG40syjMFV0oLlhhFCwWl0vA0DyzTDkwAiJw== @@ -1306,24 +1331,6 @@ bser@^2.0.0: dependencies: node-int64 "^0.4.0" -buffer-alloc-unsafe@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" - integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg== - -buffer-alloc@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec" - integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow== - dependencies: - buffer-alloc-unsafe "^1.1.0" - buffer-fill "^1.0.0" - -buffer-fill@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" - integrity sha1-+PeLdniYiO858gXNY39o5wISKyw= - builtins@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" @@ -2082,10 +2089,10 @@ diff@3.5.0: resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== -diff@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.1.tgz#0c667cb467ebbb5cea7f14f135cc2dba7780a8ff" - integrity sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q== +diff@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== dir-glob@^3.0.1: version "3.0.1" @@ -2256,7 +2263,7 @@ engine.io@~3.3.1: engine.io-parser "~2.1.0" ws "~6.1.0" -ensure-posix-path@^1.0.0, ensure-posix-path@^1.0.1, ensure-posix-path@^1.0.2, ensure-posix-path@^1.1.0: +ensure-posix-path@^1.0.0, ensure-posix-path@^1.0.1, ensure-posix-path@^1.0.2, ensure-posix-path@^1.1.0, ensure-posix-path@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ensure-posix-path/-/ensure-posix-path-1.1.1.tgz#3c62bdb19fa4681544289edb2b382adc029179ce" integrity sha512-VWU0/zXzVbeJNXvME/5EmLuEj2TauvoaTz6aFYK1Z92JCBlDlZ3Gu0tuGR42kpW1754ywTs+QB0g5TP0oj9Zaw== @@ -2574,7 +2581,7 @@ expand-tilde@^2.0.0, expand-tilde@^2.0.2: dependencies: homedir-polyfill "^1.0.1" -express@^4.10.7, express@^4.13.1, express@^4.16.4: +express@^4.10.7, express@^4.13.1, express@^4.17.1: version "4.17.1" resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== @@ -2660,6 +2667,11 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" +fast-deep-equal@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" + integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= + fast-deep-equal@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" @@ -2754,10 +2766,10 @@ file-entry-cache@^5.0.1: dependencies: flat-cache "^2.0.1" -filesize@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/filesize/-/filesize-4.2.0.tgz#a8c989a179ca3a895cc32eab4abc64ebf6d34d44" - integrity sha512-bdS2UP98MZzLyTZzhuSH5ctAWyDt81n5xMti9BSdmgPXjjENLDz5Bmbk2R7ATVw/HRysZzWA2JIPgcSAOimWpw== +filesize@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/filesize/-/filesize-6.1.0.tgz#e81bdaa780e2451d714d71c0d7a4f3238d37ad00" + integrity sha512-LpCHtPQ3sFx67z+uh2HnSyWSLLu5Jxo21795uRDuar/EOuYWXib5EmPaGIBuSnRqH2IODiKA2k5re/K9OnN/Yg== fill-range@^4.0.0: version "4.0.0" @@ -3848,6 +3860,11 @@ is-object@^1.0.1: resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470" integrity sha1-iVJojF7C/9awPsyF52ngKQMINHA= +is-plain-obj@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + is-plain-obj@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" @@ -3943,12 +3960,10 @@ isarray@2.0.1: resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.1.tgz#a37d94ed9cda2d59865c9f76fe596ee1f338741e" integrity sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4= -isbinaryfile@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.3.tgz#5d6def3edebf6e8ca8cae9c30183a804b5f8be80" - integrity sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw== - dependencies: - buffer-alloc "^1.2.0" +isbinaryfile@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-4.0.4.tgz#6803f81a8944201c642b6e17da041e24deb78712" + integrity sha512-pEutbN134CzcjlLS1myKX/uxNjwU5eBVSprvkpv3+3dqhBHUZLIWJQowC40w5c0Zf19vBY8mrZl88y5J4RAPbQ== isexe@^2.0.0: version "2.0.0" @@ -5089,13 +5104,12 @@ normalize-url@2.0.1: query-string "^5.0.1" sort-keys "^2.0.0" -npm-package-arg@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-8.0.0.tgz#b519989b569efffa1fa050fb22a3c3c322d4bcc5" - integrity sha512-JgqZHCEUKvhX7EehLNdySiuB227a0QYra9wpZOkW+jvwsRYKkce7y5Rv2axkxScJU1EP+L32jT2PLhQz7IWHlw== +npm-package-arg@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-8.0.1.tgz#9d76f8d7667b2373ffda60bb801a27ef71e3e270" + integrity sha512-/h5Fm6a/exByzFSTm7jAyHbgOqErl9qSNJDQF32Si/ZzgwT2TERVxRxn3Jurw1wflgyVVAxnFR4fRHPM7y1ClQ== dependencies: hosted-git-info "^3.0.2" - osenv "^0.1.5" semver "^7.0.0" validate-npm-package-name "^3.0.0" @@ -5309,7 +5323,7 @@ os-tmpdir@^1.0.0, os-tmpdir@~1.0.1, os-tmpdir@~1.0.2: resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= -osenv@^0.1.0, osenv@^0.1.3, osenv@^0.1.5: +osenv@^0.1.0, osenv@^0.1.3: version "0.1.5" resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== @@ -5598,10 +5612,10 @@ promise-map-series@^0.3.0: resolved "https://registry.yarnpkg.com/promise-map-series/-/promise-map-series-0.3.0.tgz#41873ca3652bb7a042b387d538552da9b576f8a1" integrity sha512-3npG2NGhTc8BWBolLLf8l/92OxMGaRLbqvIh9wjCHhDXNvk4zsxaTaCpiCunW09qWPrN2zeNSNwRLVBrQQtutA== -promise.hash.helper@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/promise.hash.helper/-/promise.hash.helper-1.0.2.tgz#bd22410ff0d8bc9585ad4ab6e584d64a16c8154f" - integrity sha512-ei8fgXZIibwzyQ/7S9pssslC4VFHIBrem5KJ+Fq0qY4EMQVB1BeDXM0h7DGgH8EKI4oHF97iYpBHj2NpTfSE4g== +promise.hash.helper@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/promise.hash.helper/-/promise.hash.helper-1.0.6.tgz#569157909aa5bd83d9f9e411b862a9977699bb04" + integrity sha512-N/W24eii82uGe331bwoqZJk3W4iu3psPFKYMdQfGvoVmixCyBGZ0LRbRltxpRSDMnViM23/49t+LJNAGcXP28w== promise.prototype.finally@^3.1.0: version "3.1.2" @@ -5662,7 +5676,7 @@ query-string@^5.0.1: object-assign "^4.1.0" strict-uri-encode "^1.0.0" -quibble@^0.5.7: +quibble@^0.5.6, quibble@^0.5.7: version "0.5.7" resolved "https://registry.yarnpkg.com/quibble/-/quibble-0.5.7.tgz#34ea5467eee32dfa37968742a5af21b02cd6ebe0" integrity sha512-QnHxlD12qhGGjvoEW4PIp8tA80tKjh5CxTg5wLTPp/aqvHElBA+Ag3JN0dWlHY96CUaJqSGmLxTLi+7wbysyZw== @@ -6020,7 +6034,7 @@ semver@^6.0.0, semver@^6.1.0, semver@^6.1.2, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.0.0: +semver@^7.0.0, semver@^7.1.3: version "7.1.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.1.3.tgz#e4345ce73071c53f336445cfc19efb1c311df2a6" integrity sha512-ekM0zfiA9SCBlsKa2X1hxyxiI4L3B6EbVJkkdgQXnSEEaHlGdvyodMruTiulSRWMMB4NeIuYNMC9rTKTz97GxA== @@ -6239,15 +6253,16 @@ sort-object-keys@^1.1.3: resolved "https://registry.yarnpkg.com/sort-object-keys/-/sort-object-keys-1.1.3.tgz#bff833fe85cab147b34742e45863453c1e190b45" integrity sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg== -sort-package-json@^1.39.1: - version "1.39.1" - resolved "https://registry.yarnpkg.com/sort-package-json/-/sort-package-json-1.39.1.tgz#ac4d8464a1bdf980aa86cd790b876fb5708b7bf0" - integrity sha512-ibynHvDF6jfSpA7tok+larZUPQ4YLm4YO6nP9Iov1NuGsMyvkYm3hmKAA6LdXxwOXzqBqJjedk0rMZ2Sbyra4Q== +sort-package-json@^1.40.0: + version "1.40.0" + resolved "https://registry.yarnpkg.com/sort-package-json/-/sort-package-json-1.40.0.tgz#81ad8c2bd7dd21b6a127ab4a26186a160f07a157" + integrity sha512-3Uc1kjmQ3SYuKziKghZvA23SihOqGxEjK2QPfFPmd7BMo9rWiJdC2FJWvAZbfhLWapuJrdmkUf6Kp0G4Wtuv5w== dependencies: detect-indent "^6.0.0" detect-newline "3.1.0" git-hooks-list "1.0.2" globby "10.0.1" + is-plain-obj "2.1.0" sort-object-keys "^1.1.3" source-map-resolve@^0.5.0: @@ -6606,7 +6621,7 @@ test-exclude@^6.0.0: glob "^7.1.4" minimatch "^3.0.4" -testdouble@^3.13.0, testdouble@^3.2.6: +testdouble@^3.13.0: version "3.13.0" resolved "https://registry.yarnpkg.com/testdouble/-/testdouble-3.13.0.tgz#a1b74db46284991f2d35f11b0239bc2b220953e6" integrity sha512-koLssZcTF1ou1hVD7rYvxOjx3xQHODDH1ajKckL8iID05Y2BEm/+U1YDrQV3lIejCqAp7uwbVNVHyhK7ikUxsg== @@ -6616,10 +6631,20 @@ testdouble@^3.13.0, testdouble@^3.2.6: stringify-object-es5 "^2.5.0" theredoc "^1.0.0" -testem@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/testem/-/testem-3.0.1.tgz#93fbd93fd6a4dcd57bcd1ba506d22ed8f8cfcd21" - integrity sha512-2fgW8Zw+sbZDPxNdtGCH1qrzpFIG9nPdVAX/HlvBvishovOCIuRWrm/rz/FLiXp7NPOtB78Dj8QDQanoGk4+Ig== +testdouble@^3.2.6: + version "3.12.4" + resolved "https://registry.yarnpkg.com/testdouble/-/testdouble-3.12.4.tgz#c8b30a62077212c10c2e05dc4105610d28013df4" + integrity sha512-Ake1UjvG6XKYUrVGyNv52xg5lQM079dTQW8/F8GWuE1lbC1NRmkUgtgLrsRr+7SPQZZhIhZp6lHUWXMMBvSHEw== + dependencies: + lodash "^4.17.15" + quibble "^0.5.6" + stringify-object-es5 "^2.5.0" + theredoc "^1.0.0" + +testem@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/testem/-/testem-3.0.2.tgz#9100d09e73c3271e5201a141dbd3f0d31e71add2" + integrity sha512-mUcPL7MZtmg3UUkOe6sIFXoY1ysv06qxQ7VEKnAHIAiKbf21DOdAJzVqR9YsOZcvennP9gKAUbL/607z9RQt/g== dependencies: backbone "^1.1.2" bluebird "^3.4.6" @@ -7000,11 +7025,16 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= -uuid@^3.3.3, uuid@^3.4.0: +uuid@^3.3.3: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== +uuid@^7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-7.0.2.tgz#7ff5c203467e91f5e0d85cfcbaaf7d2ebbca9be6" + integrity sha512-vy9V/+pKG+5ZTYKf+VcphF5Oc6EFiu3W8Nv3P3zIh0EqVI80ZxOzuPfe9EHjkFNvf8+xuTHVeei4Drydlx4zjw== + v8-compile-cache@^2.0.3: version "2.1.0" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e" From e119fdbff447c43d2161c67df66a00119f5267be Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sat, 14 Mar 2020 20:55:40 -0400 Subject: [PATCH 268/818] Add GitHub Actions badge to README.md. --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index ab14a82ac4..86b4819eb2 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ ember-cli [![Latest npm release][npm-badge]][npm-badge-url] [![TravisCI Build Status][travis-badge]][travis-badge-url] +[![GitHub Actions CI][github-actions-badge]][github-actions-ci-url] [![Test Coverage][coveralls-badge]][coveralls-badge-url] [![Code Climate][codeclimate-badge]][codeclimate-badge-url] @@ -16,6 +17,8 @@ ember-cli [coveralls-badge-url]: https://coveralls.io/github/ember-cli/ember-cli [codeclimate-badge]: https://codeclimate.com/github/ember-cli/ember-cli/badges/gpa.svg [codeclimate-badge-url]: https://codeclimate.com/github/ember-cli/ember-cli +[github-actions-badge]: https://github.com/ember-cli/ember-cli/workflows/CI/badge.svg +[github-actions-ci-url]: https://github.com/ember-cli/ember-cli/actions?query=workflow%3ACI The Ember.js command line utility. From 33a5980c7dfa000be0a3d358c832bec72feffb9f Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sat, 14 Mar 2020 21:41:46 -0400 Subject: [PATCH 269/818] Migrate CI to use actions/checkout@v2. v2.0.0 includes [a bunch of changes](https://github.com/actions/checkout/releases/tag/v2.0.0). --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 29709e899d..0b06e47821 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: 12.x @@ -37,7 +37,7 @@ jobs: os: [ubuntu, macOS, windows] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: 12.x @@ -58,7 +58,7 @@ jobs: os: [ubuntu, macOS, windows] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} @@ -81,7 +81,7 @@ jobs: - PACKAGER steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: 12.x From 8725a0df4115eef441fbf9080203d0ef56ad19ed Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sat, 14 Mar 2020 20:00:12 -0400 Subject: [PATCH 270/818] Move codecoverage reporting to GitHub Actions CI --- .github/workflows/ci.yml | 1 - .github/workflows/coverage.yml | 32 ++++++++++++++++++++++++++++++++ .travis.yml | 4 ---- .travis/codecoverage.sh | 10 ---------- 4 files changed, 32 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/coverage.yml delete mode 100755 .travis/codecoverage.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0b06e47821..d67e603dec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,7 +65,6 @@ jobs: - run: yarn install --frozen-lockfile --non-interactive - run: yarn test:all - continue-on-error: ${{ matrix['continue-on-error'] == true }} feature-flags: name: "Feature: ${{ matrix.feature-flag }}" diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 0000000000..3b784d9792 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,32 @@ +name: Code Coverage + +on: + push: + branches: + - master + +jobs: + coverage: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 12.x + + - run: yarn install --frozen-lockfile --non-interactive + + - name: Test && Report to Code Climate + uses: paambaati/codeclimate-action@v2.5.4 + env: + CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} + with: + coverageCommand: yarn test:cover + coverageLocations: "coverage/lcov.info:lcov" + prefix: ${{ github.workspace }} + + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.travis.yml b/.travis.yml index 87faf1bed2..a785bcb091 100644 --- a/.travis.yml +++ b/.travis.yml @@ -45,10 +45,6 @@ jobs: - name: Node.js 12 node_js: 12 - script: - - yarn test:cover - after_success: - - .travis/codecoverage.sh - name: Node.js 13 node_js: 13 diff --git a/.travis/codecoverage.sh b/.travis/codecoverage.sh deleted file mode 100755 index f865d64f5e..0000000000 --- a/.travis/codecoverage.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -# fail script immediately on any errors in external commands -set -e - -# Use `yarn` to install globals -yarn global add coveralls codeclimate-test-reporter - -./node_modules/.bin/nyc report --reporter text-lcov | coveralls -./node_modules/.bin/nyc report --reporter text-lcov | codeclimate-test-reporter From af7c1549e0e11d269f34a52acdd6514d1190ba32 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sat, 14 Mar 2020 21:03:53 -0400 Subject: [PATCH 271/818] Tweak .codeclimate.yml configuration. * Update exclude paths * Do not consider "too many lines" as a maintainability issue --- .codeclimate.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.codeclimate.yml b/.codeclimate.yml index 520557c190..906c909c2a 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -1,7 +1,13 @@ +version: "2" # required to adjust maintainability checks languages: JavaScript: true +checks: + file-lines: + enabled: false + + exclude_paths: - - "tests/acceptance/*" - - "tests/fixtures/*" - - "tests/unit/*" + - "**/tests" + - "**/tmp" + - "**/node_modules/" From cc8d4aacf83390228d939b6442aa3cd86f517916 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sat, 14 Mar 2020 21:12:26 -0400 Subject: [PATCH 272/818] Tweak `nyc` setup. * Add `.nycrc.json` to configure includes/excludes * Add `text` and `lcov` reporter to `test:cover` `package.json` script * Ensure `yarn test:cover` evaluates all files (passing `--all` flag to `nyc`) --- .nycrc.json | 11 +++++++++++ package.json | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .nycrc.json diff --git a/.nycrc.json b/.nycrc.json new file mode 100644 index 0000000000..7cef8daac3 --- /dev/null +++ b/.nycrc.json @@ -0,0 +1,11 @@ +{ + "include": [ + "bin/**/*.js", + "lib/**/*.js", + "blueprints/**/*.js" + ], + + "exclude": [ + "blueprints/*/files/**" + ] +} diff --git a/package.json b/package.json index 341a20150c..046f5549a0 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "prepack": "yarn docs", "test": "node --unhandled-rejections=strict tests/runner", "test:all": "node --unhandled-rejections=strict tests/runner all", - "test:cover": "nyc node tests/runner all", + "test:cover": "nyc --all --reporter=text --reporter=lcov node tests/runner all", "test:slow": "node --unhandled-rejections=strict tests/runner slow", "test:debug": "node --unhandled-rejections=strict debug tests/runner" }, From 337caa45ee341875720a1091184e7107f5e63b44 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sun, 15 Mar 2020 13:12:38 -0400 Subject: [PATCH 273/818] Remove TravisCI setup. --- .travis.yml | 72 ------------------ .travis/deploy.sh | 20 ----- .travis/deploy_key.pem.enc | Bin 1680 -> 0 bytes .travis/deploy_key.pem.pub | 1 - README.md | 3 - docs/build-concurrency.md | 8 +- docs/code-coverage.md | 7 +- .../smoke-tests/js-testem-config/testem.js | 2 +- 8 files changed, 9 insertions(+), 104 deletions(-) delete mode 100644 .travis.yml delete mode 100755 .travis/deploy.sh delete mode 100644 .travis/deploy_key.pem.enc delete mode 100644 .travis/deploy_key.pem.pub diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a785bcb091..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,72 +0,0 @@ -language: node_js -node_js: - - "12" - -addons: - chrome: stable - -branches: - only: - - master - - beta - - release - - next - # release branches - - /^(?:release|lts)-\d+-\d+$/ - # npm version tags - - /^v\d+\.\d+\.\d+/ - -cache: - yarn: true - directories: - - $HOME/.npm - - $HOME/.cache # includes bower's cache - -stages: - - basic test - - additional tests - - name: deploy - if: type IN (push) AND branch = release - -jobs: - allow_failures: - - node_js: 8 - - include: - - stage: basic test - name: Basic Tests - script: - - yarn lint - - yarn test - - - stage: additional tests - name: Node.js 10 - node_js: 10 - - - name: Node.js 12 - node_js: 12 - - - name: Node.js 13 - node_js: 13 - - - env: EMBER_CLI_ENABLE_ALL_EXPERIMENTS=true - - env: EMBER_CLI_PACKAGER=true - - - stage: deploy - name: Publish API Docs - script: skip - deploy: - provider: script - script: ./.travis/deploy.sh - -before_install: - # prevent the npm loading indicator - - npm config --global set spin false - - # travis currently includes yarn v0.17.8 (20170705) - # this isn't new enough for our use of --non-interactive - - curl -o- -L https://yarnpkg.com/install.sh | bash - - export PATH=$HOME/.yarn/bin:$PATH - -script: - - yarn test:all diff --git a/.travis/deploy.sh b/.travis/deploy.sh deleted file mode 100755 index a175b121ce..0000000000 --- a/.travis/deploy.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -set -e - -eval "$(ssh-agent -s)" - -openssl aes-256-cbc -K $encrypted_c177ff031535_key -iv $encrypted_c177ff031535_iv -in .travis/deploy_key.pem.enc -out .travis/deploy_key.pem -d -chmod 600 .travis/deploy_key.pem -ssh-add .travis/deploy_key.pem - -rm -rf docs/build -npm run docs -cd docs/build - -git init -git config user.name "Travis" -git config user.email "noreply@travis-ci.org" -git add . -git commit -m "Deploy to GitHub Pages" -git push --force --quiet git@github.com:ember-cli/api.git master:gh-pages > /dev/null 2>&1 diff --git a/.travis/deploy_key.pem.enc b/.travis/deploy_key.pem.enc deleted file mode 100644 index 87f11ee51decc708624f9442eef044369e914c47..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1680 zcmV;B25|~ zbVKW>RM_yIGsGAj(!56gg^MGlD*+mzBZmW+c#}|N(KQO{R5N;lcer+)w{FT=WoN%? zS5$`@nCX#5t0@W__^MTSTXAdKW7uvLb-fO8@zl|IAZl9-=cOcKZ;ke8mKbgUuL3!O zxEk^Hb%Ih?-D@m;8#Qf|=hrH_@)ptaam=1>{ew@seu|9 zDbX&+&9N!R5|Ka>$4({jBAQbKw=P|8N%ZKT%Fi%z?LA_eIxl+|UgQ6`eS&#h8Yn7_ z5>%NJrj@PP{grp@T9EKVQ20z78MYPIxC_JZbnpFz_AqOT<61QXu0 zQ%)75ogR=i-IMDBx3755{JJ9x$`@r`)y!@zCy}keScLB`lIFvVzheO~wW&}$2i5em zem8AwggXo)lh~+ZUBM7!o5;$}+1Wxm*v@`v*))0l!#}rLZK+eu+`9w50VWw*0(j2& z@MdECQ+SQL)b!r!Jq`p?rFm<6=lS^n3ec%1SYZcX8l5aR%PZXL3lK+^4=~($SX;^IE$W2K0kc;sz2+^(#`xpGAsgisEn< zQegPMd>OP#c%uWTlv}nb39ALs7OGD_YKccyEh+pibG6s-QmRYT>dbb_fc?Bv9{dbD z*Bp_`TsPVjV~Ys6o!3T`z+zkq@M-1b06ths{lpfA@)E(Ed}@()L}n(1XG1fh>cjiw zvdvURd_~EL3iBZ{NC%?s z7?GQb-nDJd+Fkq)#CYOw`U&BQoRPcHd+p0|;ZVilYQ}vrt4Q?EsdXO#qGzt)(~NR< zi3}V;|EtW)#&aYM)ceMqkBjvbSVka!`N_MBa2Y+G%!I-guZS}Lo4W8&y01KQQPPBy zv2yqLJAyw{!nV$JZNZr^scEE{BH7i|1Yr7Zz3JR#%q}}g=Mitz1^niitHDPpZMzY|x5<4irpY9jP5C1}#@<5>wo+rJnF5W-^b0>SpiovT zx$1JkUP;nisGEk5V>QnNP<#>56OSePQoDO`OAA>R2_>mcQ1`~-XuB@HBaN#`;(w!^ ziCDsTHsKFmm!vy2D^h3`%u7J8NNPKs(<@aRO4iN0havS(5@xkj`~)lwK3}Ij zPB*qttpedrWg#3{2I9r?+ghceK~67_fEj!Bcuq*rw6v@y&lC&|a zL%4%2(-zHbI6H4Fsf38>meAGw9xb8y9f-MjbMru7jO2>G z%afn+$k4m_d^vY4*qlN}ff5;T36;cERR=rytvuGL3-WV~cY!9Z?1Z&8=K4v`&qEu@ zFq&IvgOyS6@Gk>Q_R22*_65T9Rkvq{v!w~7I0E(+ zm)Sg%)OHKdNrU|*`xlGfKl;g(7NpWxmp3G`P~U_&RHoZjQheAdOu2}7A-G 32) but the -individual CI jobs are limited to only 1.5 or 2 concurrent processes. - +The most common case for this is in CI systems like GitHub Actions, TravisCI, +and CircleCI where the total number of CPU's available on the system is very +large (> 32) but the individual CI jobs are limited to only 1.5 or 2 concurrent +processes. diff --git a/docs/code-coverage.md b/docs/code-coverage.md index 05f59387d4..c2b9d391ff 100644 --- a/docs/code-coverage.md +++ b/docs/code-coverage.md @@ -7,7 +7,8 @@ Code coverage information is generated using [istanbuljs](https://github.com/ist and then later uploaded to both [Coveralls](https://coveralls.io/github/ember-cli/ember-cli) and [Code Climate](https://codeclimate.com/github/ember-cli/ember-cli) via -[`.travis/codecoverage.sh`](../.travis/codecoverage.sh) after each Pull Request. +[`.github/workflows/coverage.yml`](../.github/workflows/coverage.yml) after each Pull Request. -`CODECLIMATE_REPO_TOKEN`, `COVERALLS_REPO_TOKEN` and `COVERALLS_SERVICE_NAME` are set via Travis CI -Settings and not exposed to the public as they are private tokens. +`CC_TEST_REPORTER_ID` is set via [GitHub encrypted +secrets](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets) +and not exposed to the public as they are private tokens. diff --git a/tests/fixtures/smoke-tests/js-testem-config/testem.js b/tests/fixtures/smoke-tests/js-testem-config/testem.js index a3cb08b46c..a2f44c434d 100644 --- a/tests/fixtures/smoke-tests/js-testem-config/testem.js +++ b/tests/fixtures/smoke-tests/js-testem-config/testem.js @@ -13,7 +13,7 @@ module.exports = { "browser_args": { "Chrome": [ // --no-sandbox is needed when running Chrome inside a container - process.env.TRAVIS ? '--no-sandbox' : null, + process.env.CI ? '--no-sandbox' : null, "--headless", "--remote-debugging-port=0", From daefb9ef6a73c52d0f47e3269f3da6c63012b127 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sun, 15 Mar 2020 21:08:14 -0400 Subject: [PATCH 274/818] Add v3.17.0 to CHANGELOG.md. --- CHANGELOG.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d44f98c91..5864f2b9b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,19 @@ # ember-cli Changelog -## v3.17.0-beta.1 +## v3.17.0 #### Blueprint Changes -- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.16.0...v3.17.0-beta.1) -- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.16.0...v3.17.0-beta.1) +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.17.0-beta.1...v3.17.0) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.17.0-beta.1...v3.17.0) #### Changelog +- [#9045](https://github.com/ember-cli/ember-cli/pull/9045) Add final newline in CONTRIBUTING.md [@kellyselden](https://github.com/kellyselden) +- [c30ed27181257ab4319b3a06134e13067ac1e76e](https://github.com/ember-cli/ember-cli/commit/c30ed27181257ab4319b3a06134e13067ac1e76e) Handle a number of unhandled rejections scenarios [@stefanpenner](https://github.com/stefanpenner) +- [c377300bb21485faf0137ce69b54a10b3a458828](https://github.com/ember-cli/ember-cli/commit/c377300bb21485faf0137ce69b54a10b3a458828) Publish yuidoc json as a part of npm package [@sivakumar-kailasam](https://github.com/sivakumar-kailasam) +- [0a8d7a18b5f27147f2cec5574625e53784841601](https://github.com/ember-cli/ember-cli/commit/0a8d7a18b5f27147f2cec5574625e53784841601) Consistently 'use strict'; for our node js files [@kellyselden](https://github.com/kellyselden) +- [64e635c48c76f177769ca73eb9a228149ffbd863](https://github.com/ember-cli/ember-cli/commit/64e635c48c76f177769ca73eb9a228149ffbd863) Ensure buildFailures are reported correctly [@stefanpenner](https://github.com/stefanpenner) - [#9037](https://github.com/ember-cli/ember-cli/pull/9037) Update Ember and Ember Data to 3.17 betas. [@rwjblue](https://github.com/rwjblue) - [#9039](https://github.com/ember-cli/ember-cli/pull/9039) Remove long enabled EMBER_CLI_SYSTEM_TEMP experiment. [@rwjblue](https://github.com/rwjblue) - [#9038](https://github.com/ember-cli/ember-cli/pull/9038) Remove EMBER_CLI_DELAYED_TRANSPILATION experiment. [@rwjblue](https://github.com/rwjblue) From 5d40206f9eff393362ba2acec904290ae84f0fd9 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sun, 15 Mar 2020 21:08:30 -0400 Subject: [PATCH 275/818] Fix issue in changelog generation script. The import path changed as part of the most recent upgrade. --- dev/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/changelog b/dev/changelog index 7da8137f8c..c5b496bc20 100755 --- a/dev/changelog +++ b/dev/changelog @@ -14,7 +14,7 @@ * dev/changelog */ -const GitHubApi = require('@octokit/rest'); +const { Octokit } = require('@octokit/rest'); const semver = require('semver'); let currentVersion = `v${require('../package').version}`; @@ -116,7 +116,7 @@ async function processPages(res) { } async function main() { - let github = new GitHubApi({ version: '3.0.0' }); + let github = new Octokit({ version: '3.0.0' }); github.repos .compareCommits({ From 234d0ab3e9c8b5f4b2ba611486f7bf95b73c85d5 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sun, 15 Mar 2020 21:09:32 -0400 Subject: [PATCH 276/818] 3.17.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 03c1b277d2..cd6028fd13 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.17.0-beta.1", + "version": "3.17.0", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From 6752625be1c339c2a4a15c53812d0dbb343402a3 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sun, 15 Mar 2020 21:11:14 -0400 Subject: [PATCH 277/818] Fix typo in 3.17 changelog URLs. --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5864f2b9b8..16996ddd79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,8 @@ #### Blueprint Changes -- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.17.0-beta.1...v3.17.0) -- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.17.0-beta.1...v3.17.0) +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.16.1...v3.17.0) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.16.1...v3.17.0) #### Changelog From 157d1ce28086060f4eb0931eaa0a34275695909a Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sun, 15 Mar 2020 21:18:27 -0400 Subject: [PATCH 278/818] Add v3.18.0-beta.1 to CHANGELOG.md. --- CHANGELOG.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16996ddd79..ebefdac2f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,25 @@ # ember-cli Changelog + +## v3.18.0-beta.1 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.17.0...v3.18.0-beta.1) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.17.0...v3.18.0-beta.1) + +#### Changelog + +- [#9063](https://github.com/ember-cli/ember-cli/pull/9063) Fix typo in `Blueprint` documentation. [@bartocc](https://github.com/bartocc) +- [#9068](https://github.com/ember-cli/ember-cli/pull/9068) Adds link to CLI commands doc from README [@entendu](https://github.com/entendu) +- [#9070](https://github.com/ember-cli/ember-cli/pull/9070) Fix a number of causes of unhandled rejections (and ensure tests fail when unhandled rejection occurs). [@stefanpenner](https://github.com/stefanpenner) +- [#9072](https://github.com/ember-cli/ember-cli/pull/9072) Ensure errors during build are properly reported to the console. [@stefanpenner](https://github.com/stefanpenner) +- [#9092](https://github.com/ember-cli/ember-cli/pull/9092) Update ember-source and ember-data to 3.18 betas. [@rwjblue](https://github.com/rwjblue) +- [#9093](https://github.com/ember-cli/ember-cli/pull/9093) Migrate supported Node version detection to use GitHub Actions config. [@rwjblue](https://github.com/rwjblue) +- [#9097](https://github.com/ember-cli/ember-cli/pull/9097) Update production dependencies to latest. [@rwjblue](https://github.com/rwjblue) + +Thank you to all who took the time to contribute! + ## v3.17.0 #### Blueprint Changes From a65e5e6bd1dc4fe1d02ffe30c02d474d802d3e24 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sun, 15 Mar 2020 21:18:55 -0400 Subject: [PATCH 279/818] 3.18.0-beta.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 68e9bfe818..dcc33229e7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.17.0", + "version": "3.18.0-beta.1", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From cf11ee409a6b15cbcd568fd8dc30fba6961746f4 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2020 03:56:47 +0000 Subject: [PATCH 280/818] Bump testdouble from 3.13.0 to 3.13.1 (#9104) --- package.json | 2 +- yarn.lock | 20 +++++--------------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index dcc33229e7..4fb400b5aa 100644 --- a/package.json +++ b/package.json @@ -151,7 +151,7 @@ "rimraf": "^3.0.2", "strip-ansi": "^6.0.0", "supertest": "^4.0.2", - "testdouble": "^3.13.0", + "testdouble": "^3.13.1", "tmp": "^0.1.0", "websocket": "^1.0.31", "which": "2.0.2", diff --git a/yarn.lock b/yarn.lock index 7ae80bbd88..515438be61 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5676,7 +5676,7 @@ query-string@^5.0.1: object-assign "^4.1.0" strict-uri-encode "^1.0.0" -quibble@^0.5.6, quibble@^0.5.7: +quibble@^0.5.7: version "0.5.7" resolved "https://registry.yarnpkg.com/quibble/-/quibble-0.5.7.tgz#34ea5467eee32dfa37968742a5af21b02cd6ebe0" integrity sha512-QnHxlD12qhGGjvoEW4PIp8tA80tKjh5CxTg5wLTPp/aqvHElBA+Ag3JN0dWlHY96CUaJqSGmLxTLi+7wbysyZw== @@ -6621,26 +6621,16 @@ test-exclude@^6.0.0: glob "^7.1.4" minimatch "^3.0.4" -testdouble@^3.13.0: - version "3.13.0" - resolved "https://registry.yarnpkg.com/testdouble/-/testdouble-3.13.0.tgz#a1b74db46284991f2d35f11b0239bc2b220953e6" - integrity sha512-koLssZcTF1ou1hVD7rYvxOjx3xQHODDH1ajKckL8iID05Y2BEm/+U1YDrQV3lIejCqAp7uwbVNVHyhK7ikUxsg== +testdouble@^3.13.1, testdouble@^3.2.6: + version "3.13.1" + resolved "https://registry.yarnpkg.com/testdouble/-/testdouble-3.13.1.tgz#22a8cb06a92973a917d57419d4b080bbd349e43d" + integrity sha512-3fMIiKxi64WfVyPpPH0psKLNV2VDBt2fjNOOmp9g3ZPW6CTtbpAH2GK5Y3m0uK6vkerWOK41orfWNI8R2iDCTw== dependencies: lodash "^4.17.15" quibble "^0.5.7" stringify-object-es5 "^2.5.0" theredoc "^1.0.0" -testdouble@^3.2.6: - version "3.12.4" - resolved "https://registry.yarnpkg.com/testdouble/-/testdouble-3.12.4.tgz#c8b30a62077212c10c2e05dc4105610d28013df4" - integrity sha512-Ake1UjvG6XKYUrVGyNv52xg5lQM079dTQW8/F8GWuE1lbC1NRmkUgtgLrsRr+7SPQZZhIhZp6lHUWXMMBvSHEw== - dependencies: - lodash "^4.17.15" - quibble "^0.5.6" - stringify-object-es5 "^2.5.0" - theredoc "^1.0.0" - testem@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/testem/-/testem-3.0.2.tgz#9100d09e73c3271e5201a141dbd3f0d31e71add2" From a3dcaf67b185d462ccaf1ec33c6a8975ef7f18f0 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sun, 15 Mar 2020 20:47:58 -0400 Subject: [PATCH 281/818] Re-roll yarn.lock. Ensures we are using the latest allowable transient dependencies. --- yarn.lock | 994 +++++++++++++++++++++++------------------------------- 1 file changed, 418 insertions(+), 576 deletions(-) diff --git a/yarn.lock b/yarn.lock index 515438be61..b084eaa084 100644 --- a/yarn.lock +++ b/yarn.lock @@ -153,12 +153,12 @@ babel-plugin-dynamic-import-node "^2.3.0" "@babel/polyfill@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.8.3.tgz#2333fc2144a542a7c07da39502ceeeb3abe4debd" - integrity sha512-0QEgn2zkCzqGIkSWWAEmvxD7e00Nm9asTtQvi7HdlYvMhjy/J38V/1Y9ode0zEJeIuxAI0uftiAzqc7nVeWUGg== + version "7.8.7" + resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.8.7.tgz#151ec24c7135481336168c3bd8b8bf0cf91c032f" + integrity sha512-LeSfP9bNZH2UOZgcGcZ0PIHUt1ZuHub1L3CVmEyqLxCeDLm4C5Gi8jRH8ZX2PNpDhQCo0z6y/+DIs2JlliXW8w== dependencies: core-js "^2.6.5" - regenerator-runtime "^0.13.2" + regenerator-runtime "^0.13.4" "@babel/template@^7.7.4", "@babel/template@^7.8.3", "@babel/template@^7.8.6": version "7.8.6" @@ -194,9 +194,9 @@ to-fast-properties "^2.0.0" "@cnakazawa/watch@^1.0.3": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.3.tgz#099139eaec7ebf07a27c1786a3ff64f39464d2ef" - integrity sha512-r5160ogAvGyHsal38Kux7YYtodEKOj89RGb28ht1jh3SJb08VwRwAKKJL0bGb04Zd/3r9FL3BFIc3bBidYffCA== + version "1.0.4" + resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.4.tgz#f864ae85004d0fcab6f50be9141c4da368d1656a" + integrity sha512-v9kIhKwjeZThiWrLmj0y17CWoyddASLj9O2yvbZkbvw/N3rWOYy9zkV66ursAoVr0mV15bL8g0c4QZUE6cdDoQ== dependencies: exec-sh "^0.3.2" minimist "^1.2.0" @@ -262,13 +262,13 @@ universal-user-agent "^5.0.0" "@octokit/endpoint@^5.5.0": - version "5.5.1" - resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-5.5.1.tgz#2eea81e110ca754ff2de11c79154ccab4ae16b3f" - integrity sha512-nBFhRUb5YzVTCX/iAK1MgQ4uWo89Gu0TH00qQHoYRCsE12dWcG1OiLd7v2EIo2+tpUKPMOQ62QFy9hy9Vg2ULg== + version "5.5.3" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-5.5.3.tgz#0397d1baaca687a4c8454ba424a627699d97c978" + integrity sha512-EzKwkwcxeegYYah5ukEeAI/gYRLv2Y9U5PpIsseGSFDk+G3RbipQGBs8GuYS1TLCtQaqoO66+aQGtITPalxsNQ== dependencies: "@octokit/types" "^2.0.0" is-plain-object "^3.0.0" - universal-user-agent "^4.0.0" + universal-user-agent "^5.0.0" "@octokit/graphql@^4.3.1": version "4.3.1" @@ -300,10 +300,11 @@ deprecation "^2.3.1" "@octokit/request-error@^1.0.1": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-1.0.2.tgz#e6dbc5be13be1041ef8eca9225520982add574cf" - integrity sha512-T9swMS/Vc4QlfWrvyeSyp/GjhXtYaBzCcibjGywV4k4D2qVrQKfEMPy8OxMDEj7zkIIdpHwqdpVbKCvnUPqkXw== + version "1.2.1" + resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-1.2.1.tgz#ede0714c773f32347576c25649dc013ae6b31801" + integrity sha512-+6yDyk1EES6WK+l3viRDElw96MvwfJxCt45GvmjDUKWjYIb3PJZQkq3i46TwGwoPD4h8NmTrENmtyA1FwbmhRA== dependencies: + "@octokit/types" "^2.0.0" deprecation "^2.0.0" once "^1.4.0" @@ -359,9 +360,9 @@ "@types/chai" "*" "@types/chai@*", "@types/chai@^4.2.9": - version "4.2.9" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.9.tgz#194332625ed2ae914aef00b8d5ca3b77e7924cc6" - integrity sha512-NeXgZj+MFL4izGqA4sapdYzkzQG+MtGra9vhQ58dnmDY++VgJaRUws+aLVV5zRJCYJl/8s9IjMmhiUw1WsKSmw== + version "4.2.11" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.11.tgz#d3614d6c5f500142358e6ed24e1bf16657536c50" + integrity sha512-t7uW6eFafjO+qJ3BIV2gGUyZs27egcNRkUdalkud+Qa3+kg//f129iuOFivHDXQ+vnU3fDXuwgv0cqMCbcE8sw== "@types/color-name@^1.1.1": version "1.1.1" @@ -389,9 +390,9 @@ "@types/range-parser" "*" "@types/express@^4.17.2": - version "4.17.2" - resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.2.tgz#a0fb7a23d8855bac31bc01d5a58cadd9b2173e6c" - integrity sha512-5mHFNyavtLoJmnusB8OKJ5bshSzw+qkMIBAobLrIM48HJvunFva9mOa6aBwh64lBFyNwBbs0xiEFuj4eU/NjCA== + version "4.17.3" + resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.3.tgz#38e4458ce2067873b09a73908df488870c303bd9" + integrity sha512-I8cGRJj3pyOLs/HndoP+25vOqhqWkAZsWMEmq1qXy/b/M3ppufecUwaK2/TVDVxcV61/iSdhykUjQQ2DLSrTdg== dependencies: "@types/body-parser" "*" "@types/express-serve-static-core" "*" @@ -424,9 +425,9 @@ integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== "@types/node@*", "@types/node@>= 8": - version "12.12.7" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.7.tgz#01e4ea724d9e3bd50d90c11fd5980ba317d8fa11" - integrity sha512-E6Zn0rffhgd130zbCbAr/JdXfXkoOUFAKNs/rF8qnafSJ8KYaA/j3oz7dcwal+lYjLA7xvdd5J4wdYpCTlP8+w== + version "13.9.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-13.9.1.tgz#96f606f8cd67fb018847d9b61e93997dabdefc72" + integrity sha512-E6M6N0blf/jiZx8Q3nb0vNaswQeEyn0XlupO+xN6DtJ6r6IT4nXrTry7zhIfYvFCl3/8Cu6WIysmUBKiqV0bqQ== "@types/range-parser@*": version "1.2.3" @@ -495,7 +496,7 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" -ajv@^6.10.0: +ajv@^6.10.0, ajv@^6.10.2: version "6.12.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.0.tgz#06d60b96d87b8454a5adaba86e7854da629db4b7" integrity sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw== @@ -505,16 +506,6 @@ ajv@^6.10.0: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^6.9.1: - version "6.10.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.0.tgz#90d0d54439da587cd7e843bfb7045f50bd22bdf1" - integrity sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg== - dependencies: - fast-deep-equal "^2.0.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - amd-name-resolver@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/amd-name-resolver/-/amd-name-resolver-1.3.1.tgz#ffe71c683c6e7191fc4ae1bb3aaed15abea135d9" @@ -721,9 +712,9 @@ astral-regex@^1.0.0: integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== async-disk-cache@^1.2.1: - version "1.3.4" - resolved "https://registry.yarnpkg.com/async-disk-cache/-/async-disk-cache-1.3.4.tgz#a5c9f72f199a9933583659f57a0e11377884f816" - integrity sha512-qsIvGJ/XYZ5bSGf5vHt2aEQHZnyuehmk/+51rCJhpkZl4LtvOZ+STbhLbdFAJGYO+dLzUT5Bb4nLKqHBX83vhw== + version "1.3.5" + resolved "https://registry.yarnpkg.com/async-disk-cache/-/async-disk-cache-1.3.5.tgz#cc6206ed79bb6982b878fc52e0505e4f52b62a02" + integrity sha512-VZpqfR0R7CEOJZ/0FOTgWq70lCrZyS1rkI8PXugDUkTKyyAUgZ2zQ09gLhMkEn+wN8LYeUTPxZdXtlX/kmbXKQ== dependencies: debug "^2.1.3" heimdalljs "^0.2.3" @@ -734,9 +725,9 @@ async-disk-cache@^1.2.1: username-sync "^1.0.2" async-limiter@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" - integrity sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg== + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" + integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== async-promise-queue@^1.0.3: version "1.0.5" @@ -768,7 +759,7 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= -atob@^2.1.1: +atob@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== @@ -818,10 +809,10 @@ base64-arraybuffer@0.1.5: resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz#73926771923b5a19747ad666aa5cd4bf9c6e9ce8" integrity sha1-c5JncZI7Whl0etZmqlzUv5xunOg= -base64id@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/base64id/-/base64id-1.0.0.tgz#47688cb99bb6804f0e06d3e763b1c32e57d8e6b6" - integrity sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY= +base64id@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/base64id/-/base64id-2.0.0.tgz#2770ac6bc47d312af97a8bf9a634342e0cd25cb6" + integrity sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog== base@^0.11.1: version "0.11.2" @@ -861,9 +852,9 @@ binary-extensions@^2.0.0: integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow== "binaryextensions@1 || 2": - version "2.1.2" - resolved "https://registry.yarnpkg.com/binaryextensions/-/binaryextensions-2.1.2.tgz#c83c3d74233ba7674e4f313cb2a2b70f54e94b7c" - integrity sha512-xVNN69YGDghOqCCtA6FI7avYrr02mTJjOgB0/f1VPD3pJC8QEvjTKWc4epDx8AqxxA75NI0QpVM2gPJXUbE4Tg== + version "2.2.0" + resolved "https://registry.yarnpkg.com/binaryextensions/-/binaryextensions-2.2.0.tgz#e7c6ba82d4f5f5758c26078fe8eea28881233311" + integrity sha512-bHhs98rj/7i/RZpCSJ3uk55pLXOItjIrh2sRQZSM6OoktScX+LxJzvlU+FELp9j3TdcddTmmYArLSGptCTwjuw== blank-object@^1.0.1: version "1.0.2" @@ -876,9 +867,9 @@ blob@0.0.5: integrity sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig== bluebird@^3.1.1, bluebird@^3.4.6: - version "3.5.5" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.5.tgz#a8d0afd73251effbbd5fe384a77d73003c17a71f" - integrity sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w== + version "3.7.2" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== body-parser@1.19.0: version "1.19.0" @@ -1021,9 +1012,9 @@ broccoli-clean-css@^1.1.0: json-stable-stringify "^1.0.0" broccoli-concat@^3.7.4: - version "3.7.4" - resolved "https://registry.yarnpkg.com/broccoli-concat/-/broccoli-concat-3.7.4.tgz#7371e846eb7a97cb44ccff10f68582bcadcafacd" - integrity sha512-9gRv1tyCQuq2+48DT9DQyxRNLOuwDtHybDeYuWA3g26HFqZd0PGAOeXcLXHpKRhxzrEbU6Gm28dZ/KolMr04cQ== + version "3.7.5" + resolved "https://registry.yarnpkg.com/broccoli-concat/-/broccoli-concat-3.7.5.tgz#223beda8c1184252cf08ae020a3d45ffa6a48218" + integrity sha512-rDs1Mej3Ej0Cy5yIO9oIQq5+BCv0opAwS2NW7M0BeCsAMeFM42Z/zacDUC6jKc5OV5wiHvGTyCPLnZkMe0h6kQ== dependencies: broccoli-debug "^0.6.5" broccoli-kitchen-sink-helpers "^0.3.1" @@ -1161,9 +1152,9 @@ broccoli-persistent-filter@^1.1.6: walk-sync "^0.3.1" broccoli-persistent-filter@^2.2.1, broccoli-persistent-filter@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/broccoli-persistent-filter/-/broccoli-persistent-filter-2.3.0.tgz#191e6272e20693c6e110e844cce58bdb46238035" - integrity sha512-3ckoDlHB4IVsMrPFUOmFhPlSj6GC6p4PgxVRZU581GCq0j2IdEfmhzjm/s+ctkkl2PFUANBSs3Ot5W9wYgP4ZQ== + version "2.3.1" + resolved "https://registry.yarnpkg.com/broccoli-persistent-filter/-/broccoli-persistent-filter-2.3.1.tgz#4a052e0e0868b344c3a2977e35a3d497aa9eca72" + integrity sha512-hVsmIgCDrl2NFM+3Gs4Cr2TA6UPaIZip99hN8mtkaUPgM8UeVnCbxelCvBjUBHo0oaaqP5jzqqnRVvb568Yu5g== dependencies: async-disk-cache "^1.2.1" async-promise-queue "^1.0.3" @@ -1324,10 +1315,10 @@ browser-stdout@1.3.1: resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== -bser@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" - integrity sha1-mseNPtXZFYBP2HrLFYvHlxR6Fxk= +bser@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" + integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== dependencies: node-int64 "^0.4.0" @@ -1597,9 +1588,9 @@ cli-cursor@^3.1.0: restore-cursor "^3.1.0" cli-spinners@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.1.0.tgz#22c34b4d51f573240885b201efda4e4ec9fff3c7" - integrity sha512-8B00fJOEh1HPrx4fo5eW16XmE1PcL1tGpGrxy63CXGP9nHdPBN63X75hA1zhvQuhVztJWLqV58Roj2qlNM7cAA== + version "2.2.0" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.2.0.tgz#e8b988d9206c692302d8ee834e7a85c0144d8f77" + integrity sha512-tgU3fKwzYjiLEQgPMD9Jt+JjHVL9kW93FiIMX/l7rivvOD4/LL0Mf7gda3+4U2KJBloybwgj5KEoQgGRioMiKQ== cli-table@^0.3.1: version "0.3.1" @@ -1747,11 +1738,11 @@ component-inherit@0.0.3: integrity sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM= compressible@~2.0.16: - version "2.0.17" - resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.17.tgz#6e8c108a16ad58384a977f3a482ca20bff2f38c1" - integrity sha512-BGHeLCK1GV7j1bSmQQAi26X+GgWcTjLr/0tzSvMCl3LH1w1IJ4PFSPoV5316b30cneTziC+B1a+3OjoSUcQYmw== + version "2.0.18" + resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" + integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== dependencies: - mime-db ">= 1.40.0 < 2" + mime-db ">= 1.43.0 < 2" compression@^1.7.4: version "1.7.4" @@ -1866,9 +1857,9 @@ copy-descriptor@^0.1.0: integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= core-js@^2.6.5: - version "2.6.9" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.9.tgz#6b4b214620c834152e179323727fc19741b084f2" - integrity sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A== + version "2.6.11" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" + integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg== core-object@^3.1.5: version "3.1.5" @@ -1939,7 +1930,7 @@ debug@2.6.9, debug@^2.1.0, debug@^2.1.1, debug@^2.1.3, debug@^2.2.0, debug@^2.3. dependencies: ms "2.0.0" -debug@3.2.6, debug@^3.0.1, debug@^3.1.0, debug@^3.1.1, debug@^3.2.6: +debug@3.2.6, debug@^3.0.0, debug@^3.0.1, debug@^3.1.0, debug@^3.1.1: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== @@ -2217,21 +2208,21 @@ encodeurl@~1.0.2: integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= end-of-stream@^1.1.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" - integrity sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q== + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== dependencies: once "^1.4.0" -engine.io-client@~3.3.1: - version "3.3.2" - resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-3.3.2.tgz#04e068798d75beda14375a264bb3d742d7bc33aa" - integrity sha512-y0CPINnhMvPuwtqXfsGuWE8BB66+B6wTtCofQDRecMQPYX3MYUZXFNKDhdrSe3EVjgOu4V3rxdeqN/Tr91IgbQ== +engine.io-client@~3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-3.4.0.tgz#82a642b42862a9b3f7a188f41776b2deab643700" + integrity sha512-a4J5QO2k99CM2a0b12IznnyQndoEvtA4UAldhGzKqnHf42I3Qs2W5SPnDvatZRcMaNZs4IevVicBPayxYt6FwA== dependencies: component-emitter "1.2.1" component-inherit "0.0.3" - debug "~3.1.0" - engine.io-parser "~2.1.1" + debug "~4.1.0" + engine.io-parser "~2.2.0" has-cors "1.1.0" indexof "0.0.1" parseqs "0.0.5" @@ -2240,10 +2231,10 @@ engine.io-client@~3.3.1: xmlhttprequest-ssl "~1.5.4" yeast "0.1.2" -engine.io-parser@~2.1.0, engine.io-parser@~2.1.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-2.1.3.tgz#757ab970fbf2dfb32c7b74b033216d5739ef79a6" - integrity sha512-6HXPre2O4Houl7c4g7Ic/XzPnHBvaEmN90vtRO9uLmwtRqQmTOw0QMevL1TOfL2Cpu1VzsaTmMotQgMdkzGkVA== +engine.io-parser@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-2.2.0.tgz#312c4894f57d52a02b420868da7b5c1c84af80ed" + integrity sha512-6I3qD9iUxotsC5HEMuuGsKA0cXerGz+4uGcXQEkfBidgKf0amsjrrtwcbwK/nzpZBxclXlV7gGl9dgWvu4LF6w== dependencies: after "0.8.2" arraybuffer.slice "~0.0.7" @@ -2251,17 +2242,17 @@ engine.io-parser@~2.1.0, engine.io-parser@~2.1.1: blob "0.0.5" has-binary2 "~1.0.2" -engine.io@~3.3.1: - version "3.3.2" - resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-3.3.2.tgz#18cbc8b6f36e9461c5c0f81df2b830de16058a59" - integrity sha512-AsaA9KG7cWPXWHp5FvHdDWY3AMWeZ8x+2pUVLcn71qE5AtAzgGbxuclOytygskw8XGmiQafTmnI9Bix3uihu2w== +engine.io@~3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-3.4.0.tgz#3a962cc4535928c252759a00f98519cb46c53ff3" + integrity sha512-XCyYVWzcHnK5cMz7G4VTu2W7zJS7SM1QkcelghyIk/FmobWBtXE7fwhBusEKvCSqc3bMh8fNFMlUkCKTFRxH2w== dependencies: accepts "~1.3.4" - base64id "1.0.0" + base64id "2.0.0" cookie "0.3.1" - debug "~3.1.0" - engine.io-parser "~2.1.0" - ws "~6.1.0" + debug "~4.1.0" + engine.io-parser "~2.2.0" + ws "^7.1.2" ensure-posix-path@^1.0.0, ensure-posix-path@^1.0.1, ensure-posix-path@^1.0.2, ensure-posix-path@^1.1.0, ensure-posix-path@^1.1.1: version "1.1.1" @@ -2279,17 +2270,16 @@ entities@~2.0.0: integrity sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw== error@^7.0.0: - version "7.0.2" - resolved "https://registry.yarnpkg.com/error/-/error-7.0.2.tgz#a5f75fff4d9926126ddac0ea5dc38e689153cb02" - integrity sha1-pfdf/02ZJhJt2sDqXcOOaJFTywI= + version "7.2.1" + resolved "https://registry.yarnpkg.com/error/-/error-7.2.1.tgz#eab21a4689b5f684fc83da84a0e390de82d94894" + integrity sha512-fo9HBvWnx3NGUKMvMwB/CBCMMrfEJgbDTVDEkPygA3Bdd3lM1OyCd+rbQ8BwnpF6GdVeOLDNmyL4N5Bg80ZvdA== dependencies: string-template "~0.2.1" - xtend "~4.0.0" -es-abstract@^1.17.0-next.0, es-abstract@^1.5.1: - version "1.17.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.0.tgz#f42a517d0036a5591dbb2c463591dc8bb50309b1" - integrity sha512-yYkE07YF+6SIBmg1MsJ9dlub5L48Ek7X0qz+c/CPCHS9EBXfESorzng4cJQjJW5/pB6vDF41u7F8vUhLVDqIug== +es-abstract@^1.17.0-next.0, es-abstract@^1.17.0-next.1: + version "1.17.4" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.4.tgz#e3aedf19706b20e7c2594c35fc0d57605a79e184" + integrity sha512-Ae3um/gb8F0mui/jPL+QiqmglkUsaQf7FwBEHYIFkztkneosu9imhqHpBzQ3h1vit8t5iQ74t6PEVvphBZiuiQ== dependencies: es-to-primitive "^1.2.1" function-bind "^1.1.1" @@ -2495,9 +2485,9 @@ esprima@~3.0.0: integrity sha1-U88kes2ncxPlUcOqLnM0LT+099k= esquery@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708" - integrity sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA== + version "1.1.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.1.0.tgz#c5c0b66f383e7656404f86b31334d72524eddb48" + integrity sha512-MxYW9xKmROWF672KqjO75sszsA8Mxhw06YFeS5VHlB98KDHbOSurm3ArsjO60Eaf3QmGMCP1yn+0JQkNLo/97Q== dependencies: estraverse "^4.0.0" @@ -2509,14 +2499,14 @@ esrecurse@^4.1.0: estraverse "^4.1.0" estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1: - version "4.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" - integrity sha1-De4/7TH81GlhjOc0IJn8GvoL2xM= + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== esutils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" - integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== etag@~1.8.1: version "1.8.1" @@ -2534,9 +2524,9 @@ events-to-array@^1.0.1: integrity sha1-LUH1Y+H+QA7Uli/hpNXGp1Od9/Y= exec-sh@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.2.tgz#6738de2eb7c8e671d0366aea0b0db8c6f7d7391b" - integrity sha512-9sLAvzhI5nc8TpuQUh4ahMdCrWT00wPWz7j47/emR5+2qEfoZP5zzUXvx+vdx+H6ohhnsYC31iX04QLYJK8zTg== + version "0.3.4" + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.4.tgz#3a018ceb526cc6f6df2bb504b2bfe8e3a4934ec5" + integrity sha512-sEFIkc61v75sWeOe72qyrqg2Qg0OuLESziUDk/O/z2qgS15y2gWVFrI6f2Qn/qw/0/NCfCEsmNA4zOjkwEZT1A== execa@^1.0.0: version "1.0.0" @@ -2645,9 +2635,9 @@ extend@^3.0.0: integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== external-editor@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.0.3.tgz#5866db29a97826dbe4bf3afd24070ead9ea43a27" - integrity sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA== + version "3.1.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== dependencies: chardet "^0.7.0" iconv-lite "^0.4.24" @@ -2667,11 +2657,6 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" -fast-deep-equal@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" - integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= - fast-deep-equal@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" @@ -2683,20 +2668,21 @@ fast-diff@^1.1.2: integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== fast-glob@^3.0.3: - version "3.1.1" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.1.1.tgz#87ee30e9e9f3eb40d6f254a7997655da753d7c82" - integrity sha512-nTCREpBY8w8r+boyFYAx21iL6faSsQynliPHM4Uf56SbkyohCNxpVPEH9xrF5TXKy+IsjkPUHDKiUkzBVRXn9g== + version "3.2.2" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.2.tgz#ade1a9d91148965d4bf7c51f72e1ca662d32e63d" + integrity sha512-UDV82o4uQyljznxwMxyVRJgZZt3O5wENYojjzbaGEGZgeOxkLFf+V4cnUD+krzb2F72E18RhamkMZ7AdeggF7A== dependencies: "@nodelib/fs.stat" "^2.0.2" "@nodelib/fs.walk" "^1.2.3" glob-parent "^5.1.0" merge2 "^1.3.0" micromatch "^4.0.2" + picomatch "^2.2.1" fast-json-stable-stringify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" - integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== fast-levenshtein@~2.0.6: version "2.0.6" @@ -2725,11 +2711,11 @@ fast-sourcemap-concat@^1.4.0: sourcemap-validator "^1.1.0" fastq@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.6.0.tgz#4ec8a38f4ac25f21492673adb7eae9cfef47d1c2" - integrity sha512-jmxqQ3Z/nXoeyDmWAzF9kH1aGZSis6e/SbfPmJpUnyZ0ogr6iscHQaml4wsEepEWSdtmpy+eVXmCRIMpxaXqOA== + version "1.6.1" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.6.1.tgz#4570c74f2ded173e71cf0beb08ac70bb85826791" + integrity sha512-mpIH5sKYueh3YyeJwqtVo8sORi0CgtmkVbK6kZStpQlZBYQuTzG2CZ7idSiJuA7bY0SFCWUc5WIs+oYumGCQNw== dependencies: - reusify "^1.0.0" + reusify "^1.0.4" faye-websocket@~0.10.0: version "0.10.0" @@ -2739,11 +2725,11 @@ faye-websocket@~0.10.0: websocket-driver ">=0.5.1" fb-watchman@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" - integrity sha1-VOmr99+i8mzZsWNsWIwa/AXeXVg= + version "2.0.1" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.1.tgz#fc84fb39d2709cf3ff6d743706157bb5708a8a85" + integrity sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg== dependencies: - bser "^2.0.0" + bser "2.1.1" figures@^2.0.0: version "2.0.0" @@ -2923,16 +2909,16 @@ flat@^4.1.0: is-buffer "~2.0.3" flatted@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.0.tgz#55122b6536ea496b4b44893ee2608141d10d9916" - integrity sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg== + version "2.0.1" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.1.tgz#69e57caa8f0eacbc281d2e2cb458d46fdb449e08" + integrity sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg== follow-redirects@^1.0.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.7.0.tgz#489ebc198dc0e7f64167bd23b03c4c19b5784c76" - integrity sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ== + version "1.10.0" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.10.0.tgz#01f5263aee921c6a54fb91667f08f4155ce169eb" + integrity sha512-4eyLK6s6lH32nOvLLwlIOnr9zrL8Sm+OvW4pVTJNoXeGzYIkHVf+pADQi+OJ0E67hiuSLezPVPyBcIZO50TmmQ== dependencies: - debug "^3.2.6" + debug "^3.0.0" for-in@^1.0.2: version "1.0.2" @@ -2953,9 +2939,9 @@ forever-agent@~0.5.0: integrity sha1-bQ4JxJIflKJ/Y9O0nF/v8epMUTA= form-data@^2.3.1: - version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + version "2.5.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" + integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA== dependencies: asynckit "^0.4.0" combined-stream "^1.0.6" @@ -2971,9 +2957,9 @@ form-data@~0.1.0: mime "~1.2.11" formidable@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/formidable/-/formidable-1.2.1.tgz#70fb7ca0290ee6ff961090415f4b3df3d2082659" - integrity sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg== + version "1.2.2" + resolved "https://registry.yarnpkg.com/formidable/-/formidable-1.2.2.tgz#bf69aea2972982675f00865342b982986f6b8dd9" + integrity sha512-V8gLm+41I/8kguQ4/o1D3RIHRmhYFG4pnNyonvua+40rqcEmT4+V71yaZ3B457xbbgCsCfjSPi65u/W6vK1U5Q== forwarded@~0.1.2: version "0.1.2" @@ -3315,9 +3301,9 @@ got@^8.0.1: url-to-options "^1.0.1" graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.0.tgz#8d8fdc73977cb04104721cb53666c1ca64cd328b" - integrity sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg== + version "4.2.3" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" + integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== "graceful-readlink@>= 1.0.0": version "1.0.1" @@ -3517,9 +3503,9 @@ homedir-polyfill@^1.0.1: parse-passwd "^1.0.0" hosted-git-info@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-3.0.2.tgz#8b7e3bd114b59b51786f8bade0f39ddc80275a97" - integrity sha512-ezZMWtHXm7Eb7Rq4Mwnx2vs79WUx2QmRg3+ZqeGroKzfDO+EprOcgRPYghsOP9JuYBfK18VojmRTGCg8Ma+ktw== + version "3.0.4" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-3.0.4.tgz#be4973eb1fd2737b11c9c7c19380739bb249f60d" + integrity sha512-4oT62d2jwSDBbLLFLZE+1vPuQ1h8p9wjrJ8Mqx5TjsyWmBMV5B13eJqn8pvluqubLf3cJPTfiYCIwNwDNmzScQ== dependencies: lru-cache "^5.1.1" @@ -3533,7 +3519,7 @@ http-cache-semantics@3.8.1: resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w== -http-errors@1.7.2, http-errors@~1.7.2: +http-errors@1.7.2: version "1.7.2" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== @@ -3554,10 +3540,21 @@ http-errors@~1.6.2: setprototypeof "1.1.0" statuses ">= 1.4.0 < 2" -http-parser-js@>=0.4.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.0.tgz#d65edbede84349d0dc30320815a15d39cc3cbbd8" - integrity sha512-cZdEF7r4gfRIq7ezX9J0T+kQmJNOub71dWbgAXVHDct80TKP4MCETtZQ31xyv38UwgzkWPYF/Xc0ge55dW9Z9w== +http-errors@~1.7.2: + version "1.7.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" + integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== + dependencies: + depd "~1.1.2" + inherits "2.0.4" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +"http-parser-js@>=0.4.0 <0.4.11": + version "0.4.10" + resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.4.10.tgz#92c9c1374c35085f75db359ec56cc257cbb93fa4" + integrity sha1-ksnBN0w1CF912zWexWzCV8u5P6Q= http-proxy@^1.13.1, http-proxy@^1.18.0: version "1.18.0" @@ -3595,14 +3592,14 @@ ignore@^4.0.6: integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== ignore@^5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.2.tgz#e28e584d43ad7e92f96995019cc43b9e1ac49558" - integrity sha512-vdqWBp7MyzdmHkkRWV5nY+PfGRbYbahfuvsBCh277tq+w9zyNi7h5CYJCK0kmzti9kU+O/cB7sE8HvKv6aXAKQ== + version "5.1.4" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.4.tgz#84b7b3dbe64552b6ef0eca99f6743dbec6d97adf" + integrity sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A== import-fresh@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.0.0.tgz#a3d897f420cab0e671236897f75bc14b4885c390" - integrity sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ== + version "3.2.1" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" + integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== dependencies: parent-module "^1.0.0" resolve-from "^4.0.0" @@ -3635,7 +3632,12 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +inherits@2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= @@ -3657,9 +3659,9 @@ inline-source-map-comment@^1.0.5: xtend "^4.0.0" inquirer@^6: - version "6.3.1" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.3.1.tgz#7a413b5e7950811013a3db491c61d1f3b776e8e7" - integrity sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA== + version "6.5.2" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" + integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== dependencies: ansi-escapes "^3.2.0" chalk "^2.4.2" @@ -3667,7 +3669,7 @@ inquirer@^6: cli-width "^2.0.0" external-editor "^3.0.3" figures "^2.0.0" - lodash "^4.17.11" + lodash "^4.17.12" mute-stream "0.0.7" run-async "^2.2.0" rxjs "^6.4.0" @@ -3707,10 +3709,10 @@ ip-regex@^2.1.0: resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= -ipaddr.js@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.0.tgz#37df74e430a0e47550fe54a2defe30d8acd95f65" - integrity sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA== +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== is-accessor-descriptor@^0.1.6: version "0.1.6" @@ -3739,9 +3741,9 @@ is-buffer@^1.1.5: integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== is-buffer@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.3.tgz#4ecf3fcf749cbd1e472689e109ac66261a25e725" - integrity sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw== + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623" + integrity sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A== is-callable@^1.1.4, is-callable@^1.1.5: version "1.1.5" @@ -3763,9 +3765,9 @@ is-data-descriptor@^1.0.0: kind-of "^6.0.0" is-date-object@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" - integrity sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY= + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" + integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== is-descriptor@^0.1.0: version "0.1.6" @@ -3870,7 +3872,7 @@ is-plain-obj@^1.0.0: resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= -is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: +is-plain-object@^2.0.3, is-plain-object@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== @@ -3902,9 +3904,9 @@ is-regexp@^1.0.0: integrity sha1-/S2INUXEa6xaYz57mgnof6LLUGk= is-retry-allowed@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34" - integrity sha1-EaBgVotnM5REAz0BJaYaINVk+zQ= + version "1.2.0" + resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" + integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== is-stream@^1.1.0: version "1.1.0" @@ -3917,11 +3919,11 @@ is-stream@^2.0.0: integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== is-symbol@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.2.tgz#a055f6ae57192caee329e7a860118b497a950f38" - integrity sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw== + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" + integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== dependencies: - has-symbols "^1.0.0" + has-symbols "^1.0.1" is-type@0.0.1: version "0.0.1" @@ -4124,9 +4126,9 @@ json5@^0.5.1: integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= json5@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.0.tgz#e7a0c62c48285c628d20a10b85c89bb807c32850" - integrity sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ== + version "2.1.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.1.tgz#81b6cb04e9ba496f1c7005d07b4368a2638f90b6" + integrity sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ== dependencies: minimist "^1.2.0" @@ -4176,9 +4178,9 @@ kind-of@^5.0.0: integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== kind-of@^6.0.0, kind-of@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" - integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== klaw@^1.0.0: version "1.3.1" @@ -4205,9 +4207,9 @@ levn@^0.3.0, levn@~0.3.0: type-check "~0.3.2" linkify-it@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-2.1.0.tgz#c4caf38a6cd7ac2212ef3c7d2bde30a91561f9db" - integrity sha512-4REs8/062kV2DSHxNfq5183zrqXMl7WP0WzABH9IeJI+NLm429FgE1PDecltYfnOoFDFlZGh2T8PfZn0r+GTRg== + version "2.2.0" + resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-2.2.0.tgz#e3b54697e78bf915c70a38acd78fd09e0058b1cf" + integrity sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw== dependencies: uc.micro "^1.0.1" @@ -4246,49 +4248,11 @@ lodash._baseassign@^3.0.0: lodash._basecopy "^3.0.0" lodash.keys "^3.0.0" -lodash._basebind@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lodash._basebind/-/lodash._basebind-2.3.0.tgz#2b5bc452a0e106143b21869f233bdb587417d248" - integrity sha1-K1vEUqDhBhQ7IYafIzvbWHQX0kg= - dependencies: - lodash._basecreate "~2.3.0" - lodash._setbinddata "~2.3.0" - lodash.isobject "~2.3.0" - lodash._basecopy@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" integrity sha1-jaDmqHbPNEwK2KVIghEd08XHyjY= -lodash._basecreate@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lodash._basecreate/-/lodash._basecreate-2.3.0.tgz#9b88a86a4dcff7b7f3c61d83a2fcfc0671ec9de0" - integrity sha1-m4ioak3P97fzxh2Dovz8BnHsneA= - dependencies: - lodash._renative "~2.3.0" - lodash.isobject "~2.3.0" - lodash.noop "~2.3.0" - -lodash._basecreatecallback@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lodash._basecreatecallback/-/lodash._basecreatecallback-2.3.0.tgz#37b2ab17591a339e988db3259fcd46019d7ac362" - integrity sha1-N7KrF1kaM56YjbMln81GAZ16w2I= - dependencies: - lodash._setbinddata "~2.3.0" - lodash.bind "~2.3.0" - lodash.identity "~2.3.0" - lodash.support "~2.3.0" - -lodash._basecreatewrapper@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lodash._basecreatewrapper/-/lodash._basecreatewrapper-2.3.0.tgz#aa0c61ad96044c3933376131483a9759c3651247" - integrity sha1-qgxhrZYETDkzN2ExSDqXWcNlEkc= - dependencies: - lodash._basecreate "~2.3.0" - lodash._setbinddata "~2.3.0" - lodash._slice "~2.3.0" - lodash.isobject "~2.3.0" - lodash._baseflatten@^3.0.0: version "3.1.4" resolved "https://registry.yarnpkg.com/lodash._baseflatten/-/lodash._baseflatten-3.1.4.tgz#0770ff80131af6e34f3b511796a7ba5214e65ff7" @@ -4311,90 +4275,21 @@ lodash._createassigner@^3.0.0: lodash._isiterateecall "^3.0.0" lodash.restparam "^3.0.0" -lodash._createwrapper@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lodash._createwrapper/-/lodash._createwrapper-2.3.0.tgz#d1aae1102dadf440e8e06fc133a6edd7fe146075" - integrity sha1-0arhEC2t9EDo4G/BM6bt1/4UYHU= - dependencies: - lodash._basebind "~2.3.0" - lodash._basecreatewrapper "~2.3.0" - lodash.isfunction "~2.3.0" - -lodash._escapehtmlchar@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lodash._escapehtmlchar/-/lodash._escapehtmlchar-2.3.0.tgz#d03da6bd82eedf38dc0a5b503d740ecd0e894592" - integrity sha1-0D2mvYLu3zjcCltQPXQOzQ6JRZI= - dependencies: - lodash._htmlescapes "~2.3.0" - -lodash._escapestringchar@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lodash._escapestringchar/-/lodash._escapestringchar-2.3.0.tgz#cce73ae60fc6da55d2bf8a0679c23ca2bab149fc" - integrity sha1-zOc65g/G2lXSv4oGecI8orqxSfw= - lodash._getnative@^3.0.0: version "3.9.1" resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" integrity sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U= -lodash._htmlescapes@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lodash._htmlescapes/-/lodash._htmlescapes-2.3.0.tgz#1ca98863cadf1fa1d82c84f35f31e40556a04f3a" - integrity sha1-HKmIY8rfH6HYLITzXzHkBVagTzo= - lodash._isiterateecall@^3.0.0: version "3.0.9" resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" integrity sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw= -lodash._objecttypes@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lodash._objecttypes/-/lodash._objecttypes-2.3.0.tgz#6a3ea3987dd6eeb8021b2d5c9c303549cc2bae1e" - integrity sha1-aj6jmH3W7rgCGy1cnDA1Scwrrh4= - -lodash._reinterpolate@^3.0.0, lodash._reinterpolate@~3.0.0: +lodash._reinterpolate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= -lodash._reinterpolate@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-2.3.0.tgz#03ee9d85c0e55cbd590d71608a295bdda51128ec" - integrity sha1-A+6dhcDlXL1ZDXFgiilb3aURKOw= - -lodash._renative@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lodash._renative/-/lodash._renative-2.3.0.tgz#77d8edd4ced26dd5971f9e15a5f772e4e317fbd3" - integrity sha1-d9jt1M7SbdWXH54Vpfdy5OMX+9M= - -lodash._reunescapedhtml@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lodash._reunescapedhtml/-/lodash._reunescapedhtml-2.3.0.tgz#db920b55ac7f3ff825939aceb9ba2c231713d24d" - integrity sha1-25ILVax/P/glk5rOubosIxcT0k0= - dependencies: - lodash._htmlescapes "~2.3.0" - lodash.keys "~2.3.0" - -lodash._setbinddata@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lodash._setbinddata/-/lodash._setbinddata-2.3.0.tgz#e5610490acd13277d59858d95b5f2727f1508f04" - integrity sha1-5WEEkKzRMnfVmFjZW18nJ/FQjwQ= - dependencies: - lodash._renative "~2.3.0" - lodash.noop "~2.3.0" - -lodash._shimkeys@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lodash._shimkeys/-/lodash._shimkeys-2.3.0.tgz#611f93149e3e6c721096b48769ef29537ada8ba9" - integrity sha1-YR+TFJ4+bHIQlrSHae8pU3rai6k= - dependencies: - lodash._objecttypes "~2.3.0" - -lodash._slice@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lodash._slice/-/lodash._slice-2.3.0.tgz#147198132859972e4680ca29a5992c855669aa5c" - integrity sha1-FHGYEyhZly5GgMoppZkshVZpqlw= - lodash.assign@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-3.2.0.tgz#3ce9f0234b4b2223e296b8fa0ac1fee8ebca64fa" @@ -4409,15 +4304,6 @@ lodash.assignin@^4.1.0: resolved "https://registry.yarnpkg.com/lodash.assignin/-/lodash.assignin-4.2.0.tgz#ba8df5fb841eb0a3e8044232b0e263a8dc6a28a2" integrity sha1-uo31+4QesKPoBEIysOJjqNxqKKI= -lodash.bind@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lodash.bind/-/lodash.bind-2.3.0.tgz#c2a8e18b68e5ecc152e2b168266116fea5b016cc" - integrity sha1-wqjhi2jl7MFS4rFoJmEW/qWwFsw= - dependencies: - lodash._createwrapper "~2.3.0" - lodash._renative "~2.3.0" - lodash._slice "~2.3.0" - lodash.castarray@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.castarray/-/lodash.castarray-4.4.0.tgz#c02513515e309daddd4c24c60cfddcf5976d9115" @@ -4435,23 +4321,6 @@ lodash.debounce@^3.1.1: dependencies: lodash._getnative "^3.0.0" -lodash.defaults@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-2.3.0.tgz#a832b001f138f3bb9721c2819a2a7cc5ae21ed25" - integrity sha1-qDKwAfE487uXIcKBmip8xa4h7SU= - dependencies: - lodash._objecttypes "~2.3.0" - lodash.keys "~2.3.0" - -lodash.escape@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-2.3.0.tgz#844c38c58f844e1362ebe96726159b62cf5f2a58" - integrity sha1-hEw4xY+EThNi6+lnJhWbYs9fKlg= - dependencies: - lodash._escapehtmlchar "~2.3.0" - lodash._reunescapedhtml "~2.3.0" - lodash.keys "~2.3.0" - lodash.find@^4.5.1: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.find/-/lodash.find-4.6.0.tgz#cb0704d47ab71789ffa0de8b97dd926fb88b13b1" @@ -4470,27 +4339,10 @@ lodash.flattendeep@^4.4.0: resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" integrity sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI= -lodash.foreach@~2.3.x: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-2.3.0.tgz#083404c91e846ee77245fdf9d76519c68b2af168" - integrity sha1-CDQEyR6EbudyRf3512UZxosq8Wg= - dependencies: - lodash._basecreatecallback "~2.3.0" - lodash.forown "~2.3.0" - -lodash.forown@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lodash.forown/-/lodash.forown-2.3.0.tgz#24fb4aaf800d45fc2dc60bfec3ce04c836a3ad7f" - integrity sha1-JPtKr4ANRfwtxgv+w84EyDajrX8= - dependencies: - lodash._basecreatecallback "~2.3.0" - lodash._objecttypes "~2.3.0" - lodash.keys "~2.3.0" - -lodash.identity@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lodash.identity/-/lodash.identity-2.3.0.tgz#6b01a210c9485355c2a913b48b6711219a173ded" - integrity sha1-awGiEMlIU1XCqRO0i2cRIZoXPe0= +lodash.foreach@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz#1a6a35eace401280c7f06dddec35165ab27e3e53" + integrity sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM= lodash.isarguments@^3.0.0: version "3.1.0" @@ -4502,18 +4354,6 @@ lodash.isarray@^3.0.0: resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" integrity sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U= -lodash.isfunction@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lodash.isfunction/-/lodash.isfunction-2.3.0.tgz#6b2973e47a647cf12e70d676aea13643706e5267" - integrity sha1-aylz5HpkfPEucNZ2rqE2Q3BuUmc= - -lodash.isobject@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lodash.isobject/-/lodash.isobject-2.3.0.tgz#2e16d3fc583da9831968953f2d8e6d73434f6799" - integrity sha1-LhbT/Fg9qYMZaJU/LY5tc0NPZ5k= - dependencies: - lodash._objecttypes "~2.3.0" - lodash.keys@^3.0.0: version "3.1.2" resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" @@ -4523,25 +4363,11 @@ lodash.keys@^3.0.0: lodash.isarguments "^3.0.0" lodash.isarray "^3.0.0" -lodash.keys@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-2.3.0.tgz#b350f4f92caa9f45a4a2ecf018454cf2f28ae253" - integrity sha1-s1D0+Syqn0WkouzwGEVM8vKK4lM= - dependencies: - lodash._renative "~2.3.0" - lodash._shimkeys "~2.3.0" - lodash.isobject "~2.3.0" - lodash.merge@^4.6.0, lodash.merge@^4.6.2: version "4.6.2" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lodash.noop@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lodash.noop/-/lodash.noop-2.3.0.tgz#3059d628d51bbf937cd2a0b6fc3a7f212a669c2c" - integrity sha1-MFnWKNUbv5N80qC2/Dp/ISpmnCw= - lodash.omit@^4.1.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.omit/-/lodash.omit-4.5.0.tgz#6eb19ae5a1ee1dd9df0b969e66ce0b7fa30b5e60" @@ -4552,13 +4378,6 @@ lodash.restparam@^3.0.0: resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" integrity sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU= -lodash.support@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lodash.support/-/lodash.support-2.3.0.tgz#7eaf038af4f0d6aab776b44aa6dcfc80334c9bfd" - integrity sha1-fq8DivTw1qq3drRKptz8gDNMm/0= - dependencies: - lodash._renative "~2.3.0" - lodash.template@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" @@ -4567,33 +4386,12 @@ lodash.template@^4.5.0: lodash._reinterpolate "^3.0.0" lodash.templatesettings "^4.0.0" -lodash.template@~2.3.x: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-2.3.0.tgz#4e3e29c433b4cfea675ec835e6f12391c61fd22b" - integrity sha1-Tj4pxDO0z+pnXsg15vEjkcYf0is= - dependencies: - lodash._escapestringchar "~2.3.0" - lodash._reinterpolate "~2.3.0" - lodash.defaults "~2.3.0" - lodash.escape "~2.3.0" - lodash.keys "~2.3.0" - lodash.templatesettings "~2.3.0" - lodash.values "~2.3.0" - lodash.templatesettings@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz#2b4d4e95ba440d915ff08bc899e4553666713316" - integrity sha1-K01OlbpEDZFf8IvImeRVNmZxMxY= - dependencies: - lodash._reinterpolate "~3.0.0" - -lodash.templatesettings@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-2.3.0.tgz#303d132c342710040d5a18efaa2d572fd03f8cdc" - integrity sha1-MD0TLDQnEAQNWhjvqi1XL9A/jNw= + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33" + integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== dependencies: - lodash._reinterpolate "~2.3.0" - lodash.escape "~2.3.0" + lodash._reinterpolate "^3.0.0" lodash.uniq@^4.2.0: version "4.5.0" @@ -4605,14 +4403,7 @@ lodash.uniqby@^4.7.0: resolved "https://registry.yarnpkg.com/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz#d99c07a669e9e6d24e1362dfe266c67616af1302" integrity sha1-2ZwHpmnp5tJOE2Lf4mbGdhavEwI= -lodash.values@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lodash.values/-/lodash.values-2.3.0.tgz#ca96fbe60a20b0b0ec2ba2ba5fc6a765bd14a3ba" - integrity sha1-ypb75gogsLDsK6K6X8anZb0Uo7o= - dependencies: - lodash.keys "~2.3.0" - -lodash@^4.0.0, lodash@^4.16.1, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15: +lodash@^4.0.0, lodash@^4.16.1, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== @@ -4649,9 +4440,9 @@ lru-cache@^5.1.1: yallist "^3.0.2" macos-release@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.2.0.tgz#ab58d55dd4714f0a05ad4b0e90f4370fef5cdea8" - integrity sha512-iV2IDxZaX8dIcM7fG6cI46uNmHUxHE4yN+Z8tKHAW1TBPMZDIKHf/3L+YnOuj/FK9il14UaVdHmiQ1tsi90ltA== + version "2.3.0" + resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.3.0.tgz#eb1930b036c0800adebccd5f17bc4c12de8bb71f" + integrity sha512-OHhSbtcviqMPt7yfw5ef5aghS2jzFVKEFyCJndQt2YpSQ9qRVSEv2axSJI1paVThEu+FFGs584h/1YhxjVqajA== make-dir@^3.0.0, make-dir@^3.0.2: version "3.0.2" @@ -4810,7 +4601,7 @@ micromatch@^4.0.2: braces "^3.0.1" picomatch "^2.0.5" -mime-db@1.43.0, "mime-db@>= 1.40.0 < 2": +mime-db@1.43.0, "mime-db@>= 1.43.0 < 2": version "1.43.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== @@ -4865,9 +4656,9 @@ minimist@0.0.8: integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= minimist@^1.1.1, minimist@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== minimist@~0.0.1: version "0.0.10" @@ -4875,17 +4666,17 @@ minimist@~0.0.1: integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= minipass@^2.2.0: - version "2.3.5" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848" - integrity sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA== + version "2.9.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" + integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== dependencies: safe-buffer "^5.1.2" yallist "^3.0.0" mixin-deep@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" - integrity sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ== + version "1.3.2" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" + integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== dependencies: for-in "^1.0.2" is-extendable "^1.0.1" @@ -4944,24 +4735,29 @@ morgan@^1.9.1: on-headers "~1.0.1" mout@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mout/-/mout-1.1.0.tgz#0b29d41e6a80fa9e2d4a5be9d602e1d9d02177f6" - integrity sha512-XsP0vf4As6BfqglxZqbqQ8SR6KQot2AgxvR0gG+WtUkf90vUXchMOZQtPf/Hml1rEffJupqL/tIrU6EYhsUQjw== + version "1.2.2" + resolved "https://registry.yarnpkg.com/mout/-/mout-1.2.2.tgz#c9b718a499806a0632cede178e80f436259e777d" + integrity sha512-w0OUxFEla6z3d7sVpMZGBCpQvYh8PHS1wZ6Wu9GNKHMpAHWJ0if0LsQZh3DlOqw55HlhJEOMLpFnwtxp99Y5GA== ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= -ms@2.1.1, ms@^2.1.1: +ms@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== +ms@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + mustache@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/mustache/-/mustache-3.0.1.tgz#873855f23aa8a95b150fb96d9836edbc5a1d248a" - integrity sha512-jFI/4UVRsRYdUbuDTKT7KzfOp7FiD5WzYmmwNwXyUVypC0xjoTL78Fqc0jHUPIvvGD+6DQSPHIt1NE7D1ArsqA== + version "3.2.1" + resolved "https://registry.yarnpkg.com/mustache/-/mustache-3.2.1.tgz#89e78a9d207d78f2799b1e95764a25bf71a28322" + integrity sha512-RERvMFdLpaFfSRIEe632yDm5nsd0SDKn8hGmcUwswnyiE5mtdZLDybtHAz6hjJhawokF0hXvGLtx9mrQfm6FkA== mute-stream@0.0.7: version "0.0.7" @@ -5054,9 +4850,9 @@ node-modules-path@^1.0.0: integrity sha512-6Gbjq+d7uhkO7epaKi5DNgUJn7H0gEyA4Jg0Mo1uQOi3Rk50G83LtmhhFyw0LxnAFhtlspkiiw52ISP13qzcBg== node-notifier@^5.0.1: - version "5.4.0" - resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.4.0.tgz#7b455fdce9f7de0c63538297354f3db468426e6a" - integrity sha512-SUDEb+o71XR5lXSTyivXd9J7fCloE3SyP4lSgt3lU2oSANiox+SxlNRGPjDKrwU1YN3ix2KN/VGGCg0t01rttQ== + version "5.4.3" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.4.3.tgz#cb72daf94c93904098e28b9c590fd866e464bd50" + integrity sha512-M4UBGcs4jeOK9CjTsYwkvH6/MzuUmGCyTW+kCY7uO+1ZVr0+FHGdPdIf5CCLqAaxnRrWidyoQlNkMIIVwbKB8Q== dependencies: growly "^1.3.0" is-wsl "^1.1.0" @@ -5226,12 +5022,12 @@ object.assign@4.1.0, object.assign@^4.1.0: object-keys "^1.0.11" object.getownpropertydescriptors@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" - integrity sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY= + version "2.1.0" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" + integrity sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg== dependencies: - define-properties "^1.1.2" - es-abstract "^1.5.1" + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" object.pick@^1.3.0: version "1.3.0" @@ -5352,9 +5148,9 @@ p-is-promise@^1.1.0: integrity sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4= p-limit@^2.0.0, p-limit@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.0.tgz#417c9941e6027a9abcba5092dd2904e255b5fbc2" - integrity sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ== + version "2.2.2" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.2.tgz#61279b67721f5287aa1c13a9a7fbbc48c9291b1e" + integrity sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ== dependencies: p-try "^2.0.0" @@ -5499,7 +5295,7 @@ pathval@^1.1.0: resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" integrity sha1-uULm1L3mUwBe9rcTYd74cn0GReA= -picomatch@^2.0.4, picomatch@^2.0.5: +picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.1.tgz#21bac888b6ed8601f831ce7816e335bc779f0a4a" integrity sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA== @@ -5572,9 +5368,9 @@ prettier@1.19.1: integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== printf@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/printf/-/printf-0.5.1.tgz#e0466788260859ed153006dc6867f09ddf240cf3" - integrity sha512-UaE/jO0hNsrvPGQEb4LyNzcrJv9Z00tsreBduOSxMtrebvoUhxiEJ4YCHX8YHf6akwfKsC2Gyv5zv47UXhMiLg== + version "0.5.2" + resolved "https://registry.yarnpkg.com/printf/-/printf-0.5.2.tgz#8546e01a1f647b1dff510ae92bdc92beb8c9b2f9" + integrity sha512-Hn0UuWqTRd94HiCJoiCNGZTnSyXJdIF3t4/4I293hezIzyH4pQ3ai4TlH/SmRCiMvR5aNMxSYWshjQWWW6J8MQ== process-nextick-args@~2.0.0: version "2.0.1" @@ -5613,9 +5409,9 @@ promise-map-series@^0.3.0: integrity sha512-3npG2NGhTc8BWBolLLf8l/92OxMGaRLbqvIh9wjCHhDXNvk4zsxaTaCpiCunW09qWPrN2zeNSNwRLVBrQQtutA== promise.hash.helper@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/promise.hash.helper/-/promise.hash.helper-1.0.6.tgz#569157909aa5bd83d9f9e411b862a9977699bb04" - integrity sha512-N/W24eii82uGe331bwoqZJk3W4iu3psPFKYMdQfGvoVmixCyBGZ0LRbRltxpRSDMnViM23/49t+LJNAGcXP28w== + version "1.0.7" + resolved "https://registry.yarnpkg.com/promise.hash.helper/-/promise.hash.helper-1.0.7.tgz#2f39d8495df40dcdfbc1d5be9e9e56efeae7f180" + integrity sha512-0qhWYyCV9TYDMSooYw1fShIb7R6hsWYja7JLqbeb1MvHqDTvP/uy/R1RsyVqDi6GCiHOI4G5p2Hpr3IA+/l/+Q== promise.prototype.finally@^3.1.0: version "3.1.2" @@ -5632,17 +5428,17 @@ propagate@^2.0.0: integrity sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag== proxy-addr@~2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.5.tgz#34cbd64a2d81f4b1fd21e76f9f06c8a45299ee34" - integrity sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ== + version "2.0.6" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf" + integrity sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw== dependencies: forwarded "~0.1.2" - ipaddr.js "1.9.0" + ipaddr.js "1.9.1" psl@^1.1.28: - version "1.1.32" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.32.tgz#3f132717cf2f9c169724b2b6caf373cf694198db" - integrity sha512-MHACAkHpihU/REGGPLj4sEfc/XKW2bheigvHO1dUqjaKigMp1C8+WLQYRGgeKFMsw5PMfegZcaN8IDXK/cD0+g== + version "1.7.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.7.0.tgz#f1c4c47a8ef97167dea5d6bbf4816d736e884a3c" + integrity sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ== pump@^3.0.0: version "3.0.0" @@ -5657,11 +5453,16 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -qs@6.7.0, qs@^6.4.0, qs@^6.5.1: +qs@6.7.0: version "6.7.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== +qs@^6.4.0, qs@^6.5.1: + version "6.9.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.1.tgz#20082c65cb78223635ab1a9eaca8875a29bf8ec9" + integrity sha512-Cxm7/SS/y/Z3MHWSxXb8lIFqgqBowP5JMlTUFyJN88y0SGQhVmZnqFK/PeuMX9LzUyWsqqhNxIyg0jlzq946yA== + qs@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/qs/-/qs-1.0.2.tgz#50a93e2b5af6691c31bcea5dae78ee6ea1903768" @@ -5722,18 +5523,18 @@ raw-body@~1.1.0: string_decoder "0.10" "readable-stream@2 || 3": - version "3.4.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.4.0.tgz#a51c26754658e0a3c21dbf59163bd45ba6f447fc" - integrity sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ== + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== dependencies: inherits "^2.0.3" string_decoder "^1.1.1" util-deprecate "^1.0.1" readable-stream@^2.0.0, readable-stream@^2.0.6, readable-stream@^2.3.5: - version "2.3.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" - integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== dependencies: core-util-is "~1.0.0" inherits "~2.0.3" @@ -5767,10 +5568,10 @@ redeyed@~1.0.0: dependencies: esprima "~3.0.0" -regenerator-runtime@^0.13.2: - version "0.13.2" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz#32e59c9a6fb9b1a4aff09b4930ca2d4477343447" - integrity sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA== +regenerator-runtime@^0.13.4: + version "0.13.5" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz#d878a1d094b4306d10b9096484b33ebd55e26697" + integrity sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA== regex-not@^1.0.0, regex-not@^1.0.2: version "1.0.2" @@ -5934,18 +5735,25 @@ ret@~0.1.10: resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== -reusify@^1.0.0: +reusify@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rimraf@2.6.3, rimraf@^2.1.4, rimraf@^2.2.8, rimraf@^2.3.4, rimraf@^2.4.1, rimraf@^2.4.3, rimraf@^2.4.4, rimraf@^2.5.3, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3, rimraf@~2.6.2: +rimraf@2.6.3, rimraf@~2.6.2: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== dependencies: glob "^7.1.3" +rimraf@^2.1.4, rimraf@^2.2.8, rimraf@^2.3.4, rimraf@^2.4.1, rimraf@^2.4.3, rimraf@^2.4.4, rimraf@^2.5.3, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + rimraf@^3.0.0, rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" @@ -5987,11 +5795,16 @@ rxjs@^6.4.0, rxjs@^6.5.3: dependencies: tslib "^1.9.0" -safe-buffer@5.1.2, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== +safe-buffer@>=5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" + integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== + safe-json-parse@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/safe-json-parse/-/safe-json-parse-1.0.1.tgz#3e76723e38dfdda13c9b1d29a1e07ffee4b30b57" @@ -6025,9 +5838,9 @@ sane@^4.0.0, sane@^4.1.0: walker "~1.0.5" semver@^5.4.1, semver@^5.5.0, semver@^5.7.0: - version "5.7.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" - integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== semver@^6.0.0, semver@^6.1.0, semver@^6.1.2, semver@^6.3.0: version "6.3.0" @@ -6073,20 +5886,10 @@ set-blocking@^2.0.0, set-blocking@~2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= -set-value@^0.4.3: - version "0.4.3" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" - integrity sha1-fbCPnT0i3H945Trzw79GZuzfzPE= - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.1" - to-object-path "^0.3.0" - -set-value@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" - integrity sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg== +set-value@^2.0.0, set-value@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" + integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== dependencies: extend-shallow "^2.0.1" is-extendable "^0.1.1" @@ -6196,21 +5999,21 @@ sntp@0.2.x: hoek "0.9.x" socket.io-adapter@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz#2a805e8a14d6372124dd9159ad4502f8cb07f06b" - integrity sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs= + version "1.1.2" + resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz#ab3f0d6f66b8fc7fca3959ab5991f82221789be9" + integrity sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g== -socket.io-client@2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-2.2.0.tgz#84e73ee3c43d5020ccc1a258faeeb9aec2723af7" - integrity sha512-56ZrkTDbdTLmBIyfFYesgOxsjcLnwAKoN4CiPyTVkMQj3zTUh0QAx3GbvIvLpFEOvQWu92yyWICxB0u7wkVbYA== +socket.io-client@2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-2.3.0.tgz#14d5ba2e00b9bcd145ae443ab96b3f86cbcc1bb4" + integrity sha512-cEQQf24gET3rfhxZ2jJ5xzAOo/xhZwK+mOqtGRg5IowZsMgwvHwnf/mCRapAAkadhM26y+iydgwsXGObBB5ZdA== dependencies: backo2 "1.0.2" base64-arraybuffer "0.1.5" component-bind "1.0.0" component-emitter "1.2.1" - debug "~3.1.0" - engine.io-client "~3.3.1" + debug "~4.1.0" + engine.io-client "~3.4.0" has-binary2 "~1.0.2" has-cors "1.1.0" indexof "0.0.1" @@ -6229,17 +6032,26 @@ socket.io-parser@~3.3.0: debug "~3.1.0" isarray "2.0.1" +socket.io-parser@~3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-3.4.0.tgz#370bb4a151df2f77ce3345ff55a7072cc6e9565a" + integrity sha512-/G/VOI+3DBp0+DJKW4KesGnQkQPFmUCbA/oO2QGT6CWxU7hLGWqU3tyuzeSK/dqcyeHsQg1vTe9jiZI8GU9SCQ== + dependencies: + component-emitter "1.2.1" + debug "~4.1.0" + isarray "2.0.1" + socket.io@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-2.2.0.tgz#f0f633161ef6712c972b307598ecd08c9b1b4d5b" - integrity sha512-wxXrIuZ8AILcn+f1B4ez4hJTPG24iNgxBBDaJfT6MsyOhVYiTXWexGoPkd87ktJG8kQEcL/NBvRi64+9k4Kc0w== + version "2.3.0" + resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-2.3.0.tgz#cd762ed6a4faeca59bc1f3e243c0969311eb73fb" + integrity sha512-2A892lrj0GcgR/9Qk81EaY2gYhCBxurV0PfmmESO6p27QPrUK1J3zdns+5QPqvUYK2q657nSj0guoIil9+7eFg== dependencies: debug "~4.1.0" - engine.io "~3.3.1" + engine.io "~3.4.0" has-binary2 "~1.0.2" socket.io-adapter "~1.1.0" - socket.io-client "2.2.0" - socket.io-parser "~3.3.0" + socket.io-client "2.3.0" + socket.io-parser "~3.4.0" sort-keys@^2.0.0: version "2.0.0" @@ -6266,11 +6078,11 @@ sort-package-json@^1.40.0: sort-object-keys "^1.1.3" source-map-resolve@^0.5.0: - version "0.5.2" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" - integrity sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA== + version "0.5.3" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" + integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== dependencies: - atob "^2.1.1" + atob "^2.1.2" decode-uri-component "^0.2.0" resolve-url "^0.2.1" source-map-url "^0.4.0" @@ -6311,13 +6123,13 @@ source-map@~0.1.x: amdefine ">=0.0.4" sourcemap-validator@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/sourcemap-validator/-/sourcemap-validator-1.1.0.tgz#00454547d1682186e1498a7208e022e8dfa8738f" - integrity sha512-Hmdu39KL+EoAAZ69OTk7RXXJdPRRizJvOZOWhCW9jLGfEQflCNPTlSoCXFPdKWFwwf0uzLcGR/fc7EP/PT8vRQ== + version "1.1.1" + resolved "https://registry.yarnpkg.com/sourcemap-validator/-/sourcemap-validator-1.1.1.tgz#3d7d8a399ccab09c1fedc510d65436e25b1c386b" + integrity sha512-pq6y03Vs6HUaKo9bE0aLoksAcpeOo9HZd7I8pI6O480W/zxNZ9U32GfzgtPP0Pgc/K1JHna569nAbOk3X8/Qtw== dependencies: jsesc "~0.3.x" - lodash.foreach "~2.3.x" - lodash.template "~2.3.x" + lodash.foreach "^4.5.0" + lodash.template "^4.5.0" source-map "~0.1.x" spawn-args@^0.2.0: @@ -6434,11 +6246,11 @@ string_decoder@0.10, string_decoder@~0.10.x: integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= string_decoder@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.2.0.tgz#fe86e738b19544afe70469243b2a1ee9240eae8d" - integrity sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w== + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== dependencies: - safe-buffer "~5.1.0" + safe-buffer "~5.2.0" string_decoder@~1.1.1: version "1.1.1" @@ -6576,9 +6388,9 @@ symlink-or-copy@^1.0.0, symlink-or-copy@^1.0.1, symlink-or-copy@^1.1.8, symlink- integrity sha512-0K91MEXFpBUaywiwSSkmKjnGcasG/rVBXFLJz5DrgGabpYD6N+3yZrfD6uUIfpuTu65DZLHi7N8CizHc07BPZA== sync-disk-cache@^1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/sync-disk-cache/-/sync-disk-cache-1.3.3.tgz#481933461623fdc2bdf46cfc87872ba215a7e246" - integrity sha512-Kp7DFemXDPRUbFW856CKamtX7bJuThZPa2dwnK2RfNqMew7Ah8xDc52SdooNlfN8oydDdDHlBPLsXTrtmA7HKw== + version "1.3.4" + resolved "https://registry.yarnpkg.com/sync-disk-cache/-/sync-disk-cache-1.3.4.tgz#53a2c5a09d8f4bb53160bce182a456ad71574024" + integrity sha512-GlkGeM81GPPEKz/lH7QUTbvqLq7K/IUTuaKDSMulP9XQ42glqNJIN/RKgSOw4y8vxL1gOVvj+W7ruEO4s36eCw== dependencies: debug "^2.1.3" heimdalljs "^0.2.3" @@ -6587,12 +6399,12 @@ sync-disk-cache@^1.3.3: username-sync "^1.0.2" table@^5.2.3: - version "5.4.0" - resolved "https://registry.yarnpkg.com/table/-/table-5.4.0.tgz#d772a3216e68829920a41a32c18eda286c95d780" - integrity sha512-nHFDrxmbrkU7JAFKqKbDJXfzrX2UBsWmrieXFTGxiI5e4ncg3VqsZeI4EzNmX0ncp4XNGVeoxIWJXfCIXwrsvw== + version "5.4.6" + resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" + integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug== dependencies: - ajv "^6.9.1" - lodash "^4.17.11" + ajv "^6.10.2" + lodash "^4.17.14" slice-ansi "^2.1.0" string-width "^3.0.0" @@ -6672,9 +6484,9 @@ text-table@^0.2.0: integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= "textextensions@1 || 2": - version "2.4.0" - resolved "https://registry.yarnpkg.com/textextensions/-/textextensions-2.4.0.tgz#6a143a985464384cc2cff11aea448cd5b018e72b" - integrity sha512-qftQXnX1DzpSV8EddtHIT0eDDEiBF8ywhFYR2lI9xrGtxqKN+CvLXhACeCIGbCpQfxxERbrkZEFb8cZcDKbVZA== + version "2.6.0" + resolved "https://registry.yarnpkg.com/textextensions/-/textextensions-2.6.0.tgz#d7e4ab13fe54e32e08873be40d51b74229b00fc4" + integrity sha512-49WtAWS+tcsy93dRt6P0P3AMD2m5PvXRhuEA0kaXos5ZLlujtYmpmFsB+QvWUSxE1ZsstmYXfQ7L40+EcQgpAQ== theredoc@^1.0.0: version "1.0.0" @@ -6823,9 +6635,9 @@ tree-sync@^2.0.0: walk-sync "^0.3.3" tslib@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" - integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ== + version "1.11.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35" + integrity sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA== tunnel-agent@~0.4.0: version "0.4.3" @@ -6895,9 +6707,9 @@ uc.micro@^1.0.0, uc.micro@^1.0.1, uc.micro@^1.0.5: integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== uglify-js@^3.1.4: - version "3.7.2" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.7.2.tgz#cb1a601e67536e9ed094a92dd1e333459643d3f9" - integrity sha512-uhRwZcANNWVLrxLfNFEdltoPNhECUR3lc+UdJoG9CBpMcSnKyWA94tc3eAujB1GcMY5Uwq8ZMp4qWpxWYDQmaA== + version "3.8.0" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.8.0.tgz#f3541ae97b2f048d7e7e3aa4f39fd8a1f5d7a805" + integrity sha512-ugNSTT8ierCsDHso2jkBHXYrU8Y5/fY2ZUprfrJUiD7YpuFvV4jODLFmb3h4btQjqr5Nh4TX4XtgDfCU1WdioQ== dependencies: commander "~2.20.3" source-map "~0.6.1" @@ -6911,19 +6723,19 @@ underscore.string@^3.2.2, underscore.string@~3.3.4: util-deprecate "^1.0.2" underscore@>=1.8.3: - version "1.9.1" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" - integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== + version "1.9.2" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.2.tgz#0c8d6f536d6f378a5af264a72f7bec50feb7cf2f" + integrity sha512-D39qtimx0c1fI3ya1Lnhk3E9nONswSKhnffBI0gME9C99fYOkNi04xs8K6pePLhvl1frbDemkaBQ5ikWllR2HQ== union-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" - integrity sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ= + version "1.0.1" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" + integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== dependencies: arr-union "^3.1.0" get-value "^2.0.6" is-extendable "^0.1.1" - set-value "^0.4.3" + set-value "^2.0.1" unique-string@^2.0.0: version "2.0.0" @@ -6933,9 +6745,9 @@ unique-string@^2.0.0: crypto-random-string "^2.0.0" universal-user-agent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-4.0.0.tgz#27da2ec87e32769619f68a14996465ea1cb9df16" - integrity sha512-eM8knLpev67iBDizr/YtqkJsF3GK8gzDc6st/WKzrTuPtcsOKW/0IdL4cnMBsU69pOx0otavLWBDGTwg+dB0aA== + version "4.0.1" + resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-4.0.1.tgz#fd8d6cb773a679a709e967ef8288a31fcc03e557" + integrity sha512-LnST3ebHwVL2aNe4mejI9IQh2HfZ1RLo8Io2HugSif8ekzD1TlWpHpColOB/eh8JHMLkGH3Akqf040I+4ylNxg== dependencies: os-name "^3.1.0" @@ -7051,9 +6863,9 @@ walk-sync@^0.3.0, walk-sync@^0.3.1, walk-sync@^0.3.2, walk-sync@^0.3.3: matcher-collection "^1.0.0" walk-sync@^1.0.0, walk-sync@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/walk-sync/-/walk-sync-1.1.3.tgz#3b7b6468f068b5eba2278c931c57db3d39092969" - integrity sha512-23ivbET0Q/389y3EHpiIgxx881AS2mwdXA7iBqUDNSymoTPYb2jWlF3gkuuAP1iLgdNXmiHw/kZ/wZwrELU6Ag== + version "1.1.4" + resolved "https://registry.yarnpkg.com/walk-sync/-/walk-sync-1.1.4.tgz#81049f3d8095479b49574cfa5f558d7a252b127d" + integrity sha512-nowc9thB/Jg0KW4TgxoRjLLYRPvl3DB/98S89r4ZcJqq2B0alNcKDh6pzLkBSkPMzRSMsJghJHQi79qw0YWEkA== dependencies: "@types/minimatch" "^3.0.3" ensure-posix-path "^1.1.0" @@ -7104,11 +6916,12 @@ wcwidth@^1.0.1: defaults "^1.0.3" websocket-driver@>=0.5.1: - version "0.7.0" - resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.0.tgz#0caf9d2d755d93aee049d4bdd0d3fe2cca2a24eb" - integrity sha1-DK+dLXVdk67gSdS90NP+LMoqJOs= + version "0.7.3" + resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.3.tgz#a2d4e0d4f4f116f1e6297eba58b05d430100e9f9" + integrity sha512-bpxWlvbbB459Mlipc5GBzzZwhoZgGEZLuqPaR0INBGnPAY1vdBX6hPnoFXiw+3yWxDuHyQjO2oXTMyS8A5haFg== dependencies: - http-parser-js ">=0.4.0" + http-parser-js ">=0.4.0 <0.4.11" + safe-buffer ">=5.1.0" websocket-extensions ">=0.1.1" websocket-extensions@>=0.1.1: @@ -7203,9 +7016,9 @@ wrappy@1: integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= write-file-atomic@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.0.tgz#1b64dbbf77cb58fd09056963d63e62667ab4fb21" - integrity sha512-EIgkf60l2oWsffja2Sf2AL384dx328c0B+cIYPTQq5q2rOYuDV00/iPFBOUiDKKwKMOhkymH8AidPaRvzfxY+Q== + version "3.0.3" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8" + integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q== dependencies: imurmurhash "^0.1.4" is-typedarray "^1.0.0" @@ -7219,6 +7032,11 @@ write@1.0.3: dependencies: mkdirp "^0.5.1" +ws@^7.1.2: + version "7.2.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.2.3.tgz#a5411e1fb04d5ed0efee76d26d5c46d830c39b46" + integrity sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ== + ws@~6.1.0: version "6.1.4" resolved "https://registry.yarnpkg.com/ws/-/ws-6.1.4.tgz#5b5c8800afab925e94ccb29d153c8d02c1776ef9" @@ -7232,19 +7050,19 @@ xdg-basedir@^4.0.0: integrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q== xmldom@^0.1.19: - version "0.1.27" - resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.27.tgz#d501f97b3bdb403af8ef9ecc20573187aadac0e9" - integrity sha1-1QH5ezvbQDr4757MIFcxh6rawOk= + version "0.1.31" + resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.31.tgz#b76c9a1bd9f0a9737e5a72dc37231cf38375e2ff" + integrity sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ== xmlhttprequest-ssl@~1.5.4: version "1.5.5" resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz#c2876b06168aadc40e57d97e81191ac8f4398b3e" integrity sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4= -xtend@^4.0.0, xtend@~4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" - integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= +xtend@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== y18n@^4.0.0: version "4.0.0" @@ -7269,7 +7087,7 @@ yam@^1.0.0: fs-extra "^4.0.2" lodash.merge "^4.6.0" -yargs-parser@13.1.1, yargs-parser@^13.1.1: +yargs-parser@13.1.1: version "13.1.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.1.tgz#d26058532aa06d365fe091f6a1fc06b2f7e5eca0" integrity sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ== @@ -7277,10 +7095,18 @@ yargs-parser@13.1.1, yargs-parser@^13.1.1: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.0.tgz#1b0ab1118ebd41f68bb30e729f4c83df36ae84c3" - integrity sha512-o/Jr6JBOv6Yx3pL+5naWSoIA2jJ+ZkMYQG/ie9qFbukBe4uzmBatlXFOiu/tNKRWEtyf+n5w7jc/O16ufqOTdQ== +yargs-parser@^13.1.1, yargs-parser@^13.1.2: + version "13.1.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" + integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-parser@^18.1.1: + version "18.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.1.tgz#bf7407b915427fc760fcbbccc6c82b4f0ffcbd37" + integrity sha512-KRHEsOM16IX7XuLnMOqImcPNbLVXMNHYAoFc3BKR8Ortl5gzDbtXvvEoGx9imk5E+X1VeNKNlcHr8B8vi+7ipA== dependencies: camelcase "^5.0.0" decamelize "^1.2.0" @@ -7294,7 +7120,7 @@ yargs-unparser@1.6.0: lodash "^4.17.15" yargs "^13.3.0" -yargs@13.3.0, yargs@^13.3.0: +yargs@13.3.0: version "13.3.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.0.tgz#4c657a55e07e5f2cf947f8a366567c04a0dedc83" integrity sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA== @@ -7310,10 +7136,26 @@ yargs@13.3.0, yargs@^13.3.0: y18n "^4.0.0" yargs-parser "^13.1.1" +yargs@^13.3.0: + version "13.3.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" + integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.2" + yargs@^15.0.2: - version "15.3.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.3.0.tgz#403af6edc75b3ae04bf66c94202228ba119f0976" - integrity sha512-g/QCnmjgOl1YJjGsnUg2SatC7NUYEiLXJqxNOQU9qSpjzGtGXda9b+OKccr1kLTy8BN9yqEyqfq5lxlwdc13TA== + version "15.3.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.3.1.tgz#9505b472763963e54afe60148ad27a330818e98b" + integrity sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA== dependencies: cliui "^6.0.0" decamelize "^1.2.0" @@ -7325,7 +7167,7 @@ yargs@^15.0.2: string-width "^4.2.0" which-module "^2.0.0" y18n "^4.0.0" - yargs-parser "^18.1.0" + yargs-parser "^18.1.1" yeast@0.1.2: version "0.1.2" From e3bc46c19e08613dde1f195d27b9138699d20b3c Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sun, 15 Mar 2020 22:22:19 -0400 Subject: [PATCH 282/818] Fix a few new linting failures. When updating transient packages some new linting failures cropped up (legitmately). Since we publish the `tests/helpers/` files publicly there were a few packages that are only used in test helpers that were not being published. The fix here is to ignore a few (`which` and `websocket`), but the correct solution is to move the helpers that we _do_ expect folks to use publicly (e.g. the `tests/helpers/mock-*.js` ones, or `tests/helpers/fixturify-project.js`) to a `lib/test-helpers` folder. --- package.json | 2 +- tests/helpers/has-global-yarn.js | 1 + tests/helpers/proxy-server.js | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 4fb400b5aa..15c312bf6a 100644 --- a/package.json +++ b/package.json @@ -82,6 +82,7 @@ "filesize": "^6.1.0", "find-up": "^4.1.0", "find-yarn-workspace-root": "^1.2.1", + "fixturify-project": "^2.1.0", "fs-extra": "^8.1.0", "fs-tree-diff": "^2.0.1", "get-caller-file": "^2.0.5", @@ -143,7 +144,6 @@ "eslint-plugin-node": "^11.0.0", "eslint-plugin-prettier": "^3.1.2", "fixturify": "^2.1.0", - "fixturify-project": "^2.1.0", "mocha": "^7.1.0", "nock": "^12.0.2", "nyc": "^15.0.0", diff --git a/tests/helpers/has-global-yarn.js b/tests/helpers/has-global-yarn.js index 1c0a3dc690..679149e760 100644 --- a/tests/helpers/has-global-yarn.js +++ b/tests/helpers/has-global-yarn.js @@ -1,5 +1,6 @@ 'use strict'; +/* eslint-disable node/no-unpublished-require */ const which = require('which'); module.exports = which.sync('yarn', { nothrow: true }); diff --git a/tests/helpers/proxy-server.js b/tests/helpers/proxy-server.js index dfda5e939b..058dfc1bfe 100644 --- a/tests/helpers/proxy-server.js +++ b/tests/helpers/proxy-server.js @@ -1,6 +1,7 @@ 'use strict'; const http = require('http'); +/* eslint-disable node/no-unpublished-require */ const WebSocketServer = require('websocket').server; class ProxyServer { From 1dfabda0b5e4bd3db446f32c7f245e7a7d674ca9 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 16 Mar 2020 09:40:30 -0400 Subject: [PATCH 283/818] Ensure `CLI._environment` is fully resolved. `CLI` was saving off the passed in argument as `this._environment`, however that argument is _not_ resolved (it may contain properties that are lazily resolved promises). When `CLI.prototype.maybeMakeCommand` uses the stashed off `this._environment` in order to build the command instance to be used it does not wait for any async. At the moment, this is "fine" because the specific properties used inside `maybeMakeCommand` (`this._environment.commands`, `this._environment.tasks`, `this._environment.project`, and `this._environment.settings`) are currently synchronously defined, but a future refactor could **easily** make one of those async and therefore break the functionality of `maybeMakeCommand`. This changes the implementation of `CLI.prototype.run` to only set `this._environment` to the _resolved_ value, avoiding future issues. --- lib/cli/cli.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/cli/cli.js b/lib/cli/cli.js index e12323a867..5ce704692e 100644 --- a/lib/cli/cli.js +++ b/lib/cli/cli.js @@ -128,10 +128,11 @@ class CLI { if (environment === undefined) { return Promise.reject(new Error('Unable to execute "run" command without environment argument')); } - this._environment = environment; let shutdownOnExit = null; return hash(environment) .then(environment => { + this._environment = environment; + let args = environment.cliArgs.slice(); let commandName = args.shift(); let commandArgs = args; From 9223e7de48cb64d093b14c4ae48135b64d9f3bec Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 16 Mar 2020 09:46:36 -0400 Subject: [PATCH 284/818] Use native `try`/`finally` to ensure `willInteruptProcess.release` is called. This has a few minor benefits: * stack trace is a bit easier to follow * language semantics make it much easier to grok what is happening --- lib/cli/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/cli/index.js b/lib/cli/index.js index a0c3030fef..d54517873e 100644 --- a/lib/cli/index.js +++ b/lib/cli/index.js @@ -68,7 +68,7 @@ function configureLogger(env) { } // Options: Array cliArgs, Stream inputStream, Stream outputStream, EventEmitter process -module.exports = function(options) { +module.exports = async function(options) { // `process` should be captured before we require any libraries which // may use `process.exit` work arounds for async cleanup. willInterruptProcess.capture(options.process || process); @@ -143,5 +143,9 @@ module.exports = function(options) { settings: merge(defaultUpdateCheckerOptions, config.getAll()), }; - return cli.run(environment).finally(() => willInterruptProcess.release()); + try { + return await cli.run(environment); + } finally { + willInterruptProcess.release(); + } }; From 598fcd452a360fbc3c9d144c7d0818b190343720 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 16 Mar 2020 10:08:07 -0400 Subject: [PATCH 285/818] Unroll outer `Promise.then` async to `async`/`await` in `CLI.prototype.run`. --- lib/cli/cli.js | 210 +++++++++++++++++++------------------ tests/unit/cli/cli-test.js | 8 +- 2 files changed, 107 insertions(+), 111 deletions(-) diff --git a/lib/cli/cli.js b/lib/cli/cli.js index 5ce704692e..fa49dff5f6 100644 --- a/lib/cli/cli.js +++ b/lib/cli/cli.js @@ -118,140 +118,142 @@ class CLI { return command; } + /** * @private * @method run - * @param environment + * @param {Promise} environmentPromiseHash * @return {Promise} */ - run(environment) { - if (environment === undefined) { + async run(environmentPromiseHash) { + if (environmentPromiseHash === undefined) { return Promise.reject(new Error('Unable to execute "run" command without environment argument')); } let shutdownOnExit = null; - return hash(environment) - .then(environment => { - this._environment = environment; - let args = environment.cliArgs.slice(); - let commandName = args.shift(); - let commandArgs = args; - let helpOptions; + let environment = (this._environment = await hash(environmentPromiseHash)); - let commandLookupCreationToken = heimdall.start('lookup-command'); + try { + let args = environment.cliArgs.slice(); + let commandName = args.shift(); + let commandArgs = args; + let helpOptions; - let command = this.maybeMakeCommand(commandName, commandArgs); + let commandLookupCreationToken = heimdall.start('lookup-command'); - commandLookupCreationToken.stop(); + let command = this.maybeMakeCommand(commandName, commandArgs); - getOptionArgs('--verbose', commandArgs).forEach(arg => { - process.env[`EMBER_VERBOSE_${arg.toUpperCase()}`] = 'true'; - }); + commandLookupCreationToken.stop(); - let platformCheckerToken = heimdall.start('platform-checker'); + getOptionArgs('--verbose', commandArgs).forEach(arg => { + process.env[`EMBER_VERBOSE_${arg.toUpperCase()}`] = 'true'; + }); - const PlatformChecker = require('../utilities/platform-checker'); - let platform = new PlatformChecker(process.version); - let recommendation = - ' We recommend that you use the most-recent "Active LTS" version of Node.js.' + - ' See https://git.io/v7S5n for details.'; + let platformCheckerToken = heimdall.start('platform-checker'); - if (!this.testing) { - if (platform.isDeprecated) { - this.ui.writeDeprecateLine(`Node ${process.version} is no longer supported by Ember CLI.${recommendation}`); - } + const PlatformChecker = require('../utilities/platform-checker'); + let platform = new PlatformChecker(process.version); + let recommendation = + ' We recommend that you use the most-recent "Active LTS" version of Node.js.' + + ' See https://git.io/v7S5n for details.'; - if (!platform.isTested) { - this.ui.writeWarnLine( - `Node ${process.version} is not tested against Ember CLI on your platform.${recommendation}` - ); - } + if (!this.testing) { + if (platform.isDeprecated) { + this.ui.writeDeprecateLine(`Node ${process.version} is no longer supported by Ember CLI.${recommendation}`); } - platformCheckerToken.stop(); - - logger.info('command: %s', commandName); - - if (!this.testing) { - process.chdir(environment.project.root); - let skipInstallationCheck = commandArgs.indexOf('--skip-installation-check') !== -1; - if (environment.project.isEmberCLIProject() && !skipInstallationCheck) { - const InstallationChecker = require('../models/installation-checker'); - new InstallationChecker({ project: environment.project }).checkInstallations(); - } + if (!platform.isTested) { + this.ui.writeWarnLine( + `Node ${process.version} is not tested against Ember CLI on your platform.${recommendation}` + ); } + } - let instrumentation = this.instrumentation; - let onCommandInterrupt; - - let runPromise = Promise.resolve() - .then(() => { - instrumentation.stopAndReport('init'); - instrumentation.start('command'); + platformCheckerToken.stop(); - loggerTesting.info('cli: command.beforeRun'); - onProcessInterrupt.addHandler(onCommandInterrupt); + logger.info('command: %s', commandName); - return command.beforeRun(commandArgs); - }) - .then(() => { - loggerTesting.info('cli: command.validateAndRun'); + if (!this.testing) { + process.chdir(environment.project.root); + let skipInstallationCheck = commandArgs.indexOf('--skip-installation-check') !== -1; + if (environment.project.isEmberCLIProject() && !skipInstallationCheck) { + const InstallationChecker = require('../models/installation-checker'); + new InstallationChecker({ project: environment.project }).checkInstallations(); + } + } - return command.validateAndRun(commandArgs); - }) - .then(result => { - instrumentation.stopAndReport('command', commandName, commandArgs); + let instrumentation = this.instrumentation; + let onCommandInterrupt; + + let runPromise = Promise.resolve() + .then(() => { + instrumentation.stopAndReport('init'); + instrumentation.start('command'); + + loggerTesting.info('cli: command.beforeRun'); + onProcessInterrupt.addHandler(onCommandInterrupt); + + return command.beforeRun(commandArgs); + }) + .then(() => { + loggerTesting.info('cli: command.validateAndRun'); + + return command.validateAndRun(commandArgs); + }) + .then(result => { + instrumentation.stopAndReport('command', commandName, commandArgs); + + onProcessInterrupt.removeHandler(onCommandInterrupt); + + return result; + }) + .finally(() => { + instrumentation.start('shutdown'); + shutdownOnExit = function() { + instrumentation.stopAndReport('shutdown'); + }; + }) + .then(result => { + // if the help option was passed, call the help command + if (result === 'callHelp') { + helpOptions = { + environment, + commandName, + commandArgs, + }; - onProcessInterrupt.removeHandler(onCommandInterrupt); + return this.callHelp(helpOptions); + } - return result; - }) - .finally(() => { - instrumentation.start('shutdown'); - shutdownOnExit = function() { - instrumentation.stopAndReport('shutdown'); - }; - }) - .then(result => { - // if the help option was passed, call the help command - if (result === 'callHelp') { - helpOptions = { - environment, - commandName, - commandArgs, - }; - - return this.callHelp(helpOptions); + return result; + }) + .then(exitCode => { + loggerTesting.info(`cli: command run complete. exitCode: ${exitCode}`); + // TODO: fix this + // Possibly this issue: https://github.com/joyent/node/issues/8329 + // Wait to resolve promise when running on windows. + // This ensures that stdout is flushed so acceptance tests get full output + + return new Promise(resolve => { + if (process.platform === 'win32') { + setTimeout(resolve, 250, exitCode); + } else { + resolve(exitCode); } - - return result; - }) - .then(exitCode => { - loggerTesting.info(`cli: command run complete. exitCode: ${exitCode}`); - // TODO: fix this - // Possibly this issue: https://github.com/joyent/node/issues/8329 - // Wait to resolve promise when running on windows. - // This ensures that stdout is flushed so acceptance tests get full output - - return new Promise(resolve => { - if (process.platform === 'win32') { - setTimeout(resolve, 250, exitCode); - } else { - resolve(exitCode); - } - }); }); + }); - onCommandInterrupt = () => Promise.resolve(command.onInterrupt()).then(() => runPromise); + onCommandInterrupt = () => Promise.resolve(command.onInterrupt()).then(() => runPromise); - return runPromise; - }) - .finally(() => { - if (shutdownOnExit) { - shutdownOnExit(); - } - }) - .catch(this.logError.bind(this)); + return await runPromise; + } catch (error) { + this.logError(error); + return 1; + } finally { + if (shutdownOnExit) { + shutdownOnExit(); + } + } } /** diff --git a/tests/unit/cli/cli-test.js b/tests/unit/cli/cli-test.js index 5d111527b0..25623dc2df 100644 --- a/tests/unit/cli/cli-test.js +++ b/tests/unit/cli/cli-test.js @@ -5,6 +5,7 @@ const MockUI = require('console-ui/mock'); const MockAnalytics = require('../../helpers/mock-analytics'); const td = require('testdouble'); const Command = require('../../../lib/models/command'); +const CLI = require('../../../lib/cli/cli'); let ui; let analytics; @@ -13,8 +14,6 @@ let isWithinProject; let project; let willInterruptProcess; -let CLI; - // helper to similate running the CLI function ember(args) { let cli = new CLI({ @@ -71,7 +70,6 @@ describe('Unit: CLI', function() { td.replace(willInterruptProcess, 'addHandler', td.function()); td.replace(willInterruptProcess, 'removeHandler', td.function()); - CLI = require('../../../lib/cli/cli'); ui = new MockUI(); analytics = new MockAnalytics(); commands = {}; @@ -99,10 +97,6 @@ describe('Unit: CLI', function() { this.timeout(10000); - it('exists', function() { - expect(CLI).to.be.ok; - }); - it('ember', function() { let help = stubValidateAndRun('help'); From b7e61f3c831d929ba494b99ed5a8312619b5d298 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 16 Mar 2020 10:29:12 -0400 Subject: [PATCH 286/818] Migrate `Builder.prototype.run` to native `try`/`finally`. Simplifies logic a bit (reduces nesting too), and makes stack traces a bit easier to grok. --- lib/tasks/build.js | 79 +++++++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 40 deletions(-) diff --git a/lib/tasks/build.js b/lib/tasks/build.js index fd7996a5e1..465e557008 100644 --- a/lib/tasks/build.js +++ b/lib/tasks/build.js @@ -6,12 +6,10 @@ const Builder = require('../models/builder'); module.exports = class BuildTask extends Task { // Options: String outputPath - run(options) { + async run(options) { let ui = this.ui; let analytics = this.analytics; - ui.startProgress(chalk.green('Building'), chalk.green('.')); - let builder = new Builder({ ui, outputPath: options.outputPath, @@ -19,42 +17,43 @@ module.exports = class BuildTask extends Task { project: this.project, }); - ui.writeLine(`Environment: ${options.environment}`); - - let annotation = { - type: 'initial', - reason: 'build', - primaryFile: null, - changedFiles: [], - }; - - return builder - .build(null, annotation) - .then(results => { - let totalTime = results.totalTime / 1e6; - - analytics.track({ - name: 'ember build', - message: `${totalTime}ms`, - }); - - /* - * We use the `rebuild` category in our analytics setup for both builds - * and rebuilds. This is a bit confusing, but the actual thing we - * delineate on in the reports is the `variable` value below. This is - * used both here and in `lib/models/watcher.js`. - */ - analytics.trackTiming({ - category: 'rebuild', - variable: 'build time', - label: 'broccoli build time', - value: parseInt(totalTime, 10), - }); - }) - .finally(() => { - ui.stopProgress(); - return builder.cleanup(); - }) - .then(() => ui.writeLine(chalk.green(`Built project successfully. Stored in "${options.outputPath}".`))); + try { + ui.startProgress(chalk.green('Building'), chalk.green('.')); + + ui.writeLine(`Environment: ${options.environment}`); + + let annotation = { + type: 'initial', + reason: 'build', + primaryFile: null, + changedFiles: [], + }; + + let results = await builder.build(null, annotation); + let totalTime = results.totalTime / 1e6; + + analytics.track({ + name: 'ember build', + message: `${totalTime}ms`, + }); + + /* + * We use the `rebuild` category in our analytics setup for both builds + * and rebuilds. This is a bit confusing, but the actual thing we + * delineate on in the reports is the `variable` value below. This is + * used both here and in `lib/models/watcher.js`. + */ + analytics.trackTiming({ + category: 'rebuild', + variable: 'build time', + label: 'broccoli build time', + value: parseInt(totalTime, 10), + }); + } finally { + ui.stopProgress(); + await builder.cleanup(); + } + + ui.writeLine(chalk.green(`Built project successfully. Stored in "${options.outputPath}".`)); } }; From b97f41abbc581e82c2c663e657ca59a4fe415237 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 16 Mar 2020 11:57:01 -0400 Subject: [PATCH 287/818] Refactor `lib/models/builder.js` to async/await. * Simplifies the logic a bit * Makes stack traces a bit easier to read * Makes it clearer which codepaths are only for `this.broccoliBuilderFallback` * Leveraging native syntax for try/finally helps ensure things like cleanup / ui progress / etc are done properly --- lib/models/builder.js | 164 +++++++++++++----------------- tests/unit/models/builder-test.js | 57 ++++++----- 2 files changed, 100 insertions(+), 121 deletions(-) diff --git a/lib/models/builder.js b/lib/models/builder.js index 8db1618a15..7d069dc7c9 100644 --- a/lib/models/builder.js +++ b/lib/models/builder.js @@ -31,7 +31,7 @@ class Builder extends CoreObject { this._instantiationStack = new Error().stack.replace(/[^\n]*\n/, ''); this._cleanup = this.cleanup.bind(this); - this._cleanupPromise = null; + this._cleanupStarted = false; this._onProcessInterrupt = options.onProcessInterrupt || onProcessInterrupt; this._onProcessInterrupt.addHandler(this._cleanup); @@ -136,21 +136,6 @@ class Builder extends CoreObject { return changes.map(op => op[1]); } - /** - * @private - * @method processBuildResult - * @param results - * @return {Promise} - */ - processBuildResult(results) { - return Promise.resolve() - .then(() => this.copyToOutputPath(results.directory)) - .then(syncResult => { - results.outputChanges = syncResult; - return results; - }); - } - /** * @private * @method processAddonBuildSteps @@ -181,47 +166,65 @@ class Builder extends CoreObject { * @method build * @return {Promise} */ - build(addWatchDirCallback, resultAnnotation) { - this.project._instrumentation.start('build'); + async build(addWatchDirCallback, resultAnnotation) { + let buildResults, uiProgressIntervalID; - if (addWatchDirCallback && !this.broccoliBuilderFallback) { - for (let path of this.builder.watchedPaths) { - addWatchDirCallback(path); + try { + this.project._instrumentation.start('build'); + + if (addWatchDirCallback && !this.broccoliBuilderFallback) { + for (let path of this.builder.watchedPaths) { + addWatchDirCallback(path); + } } - } - this.ui.startProgress(progress.format(progress())); - - const intervalID = setInterval(() => { - this.ui.spinner.text = progress.format(progress()); - }, this.ui.spinner.interval); - - return this.processAddonBuildSteps('preBuild') - .then(() => this.builder.build(this.broccoliBuilderFallback ? addWatchDirCallback : null)) - .then(this.compatNode.bind(this), this.compatBroccoliPayload.bind(this)) - .then(this.processAddonBuildSteps.bind(this, 'postBuild')) - .then(this.processBuildResult.bind(this)) - .then(this.processAddonBuildSteps.bind(this, 'outputReady')) - .then( - result => { - this.project._instrumentation.stopAndReport('build', result, resultAnnotation); - return result; - }, - reason => { - this.project._instrumentation.stopAndReport('build', null, resultAnnotation); - throw reason; + this.ui.startProgress(progress.format(progress())); + + uiProgressIntervalID = setInterval(() => { + this.ui.spinner.text = progress.format(progress()); + }, this.ui.spinner.interval); + + await this.processAddonBuildSteps('preBuild'); + + if (this.broccoliBuilderFallback) { + try { + buildResults = await this.builder.build(addWatchDirCallback); + } catch (error) { + this.throwFormattedBroccoliError(error); + } + } else { + try { + await this.builder.build(); + + // build legacy style results object (this is passed to various addon APIs) + buildResults = { + directory: this.builder.outputPath, + graph: this.builder.outputNodeWrapper, + }; + } catch (error) { + this.throwFormattedBroccoliError(error); } - ) - .then(this.checkForPostBuildEnvironmentIssues.bind(this)) - .finally(() => { - clearInterval(intervalID); - this.ui.stopProgress(); - }) - .catch(error => { - this.processAddonBuildSteps('buildError', error); - throw error; - }) - .finally(this.finalizeBuild.bind(this)); + } + + await this.processAddonBuildSteps('postBuild', buildResults); + + let outputChanges = await this.copyToOutputPath(buildResults.directory); + + await this.processAddonBuildSteps('outputReady', Object.assign({ outputChanges }, buildResults)); + + this.checkForPostBuildEnvironmentIssues(); + + return buildResults; + } catch (error) { + await this.processAddonBuildSteps('buildError', error); + + throw error; + } finally { + clearInterval(uiProgressIntervalID); + this.ui.stopProgress(); + this.project._instrumentation.stopAndReport('build', buildResults, resultAnnotation); + this.project.configCache.clear(); + } } /** @@ -231,8 +234,9 @@ class Builder extends CoreObject { * @method cleanup * @return {Promise} */ - cleanup() { - if (!this._cleanupPromise) { + async cleanup() { + if (!this._cleanupStarted) { + this._cleanupStarted = true; let ui = this.project.ui; ui.startProgress('cleaning up'); ui.writeLine('cleaning up...'); @@ -243,20 +247,16 @@ class Builder extends CoreObject { this._onProcessInterrupt.removeHandler(this._cleanup); let node = heimdall.start({ name: 'Builder Cleanup' }); - - this._cleanupPromise = Promise.resolve() - .then(() => this.builder.cleanup()) - .finally(() => { - ui.stopProgress(); - node.stop(); - }) - .catch(err => { - ui.writeLine(chalk.red('Cleanup error.')); - ui.writeError(err); - }); + try { + await this.builder.cleanup(); + } catch (error) { + ui.writeLine(chalk.red('Cleanup error.')); + ui.writeError(error); + } finally { + ui.stopProgress(); + node.stop(); + } } - - return this._cleanupPromise; } /** @@ -279,33 +279,7 @@ class Builder extends CoreObject { return value; } - /** - * @private - * @method finalizeBuild - */ - finalizeBuild() { - this.project.configCache.clear(); - } - - /** - * broccoli-builder reformats the response into {directory, graph}, this method is a backwards - * compatible shim for broccoli 1.x - * @private - * @method compatNode - * @param node The node returned from Broccoli builder - */ - compatNode(node) { - if (!this.broccoliBuilderFallback) { - return { - directory: this.builder.outputPath, - graph: this.builder.outputNodeWrapper, - }; - } - - return node; - } - - compatBroccoliPayload(err) { + throwFormattedBroccoliError(err) { // TODO fix ember-cli/console-ui to handle current broccoli broccoliPayload let broccoliPayload = err && err.broccoliPayload; if (broccoliPayload) { diff --git a/tests/unit/models/builder-test.js b/tests/unit/models/builder-test.js index 67745d286f..1c6ae945dd 100644 --- a/tests/unit/models/builder-test.js +++ b/tests/unit/models/builder-test.js @@ -141,8 +141,8 @@ describe('models/builder.js', function() { project, ui: project.ui, setupBroccoliBuilder, - processBuildResult(buildResults) { - return Promise.resolve(buildResults); + copyToOutputPath() { + return []; }, }); @@ -202,8 +202,8 @@ describe('models/builder.js', function() { builder = new Builder({ project, ui: project.ui, - processBuildResult(buildResults) { - return Promise.resolve(buildResults); + copyToOutputPath() { + return []; }, }); @@ -222,8 +222,8 @@ describe('models/builder.js', function() { new Builder({ project, ui: project.ui, - processBuildResult(buildResults) { - return Promise.resolve(buildResults); + copyToOutputPath() { + return []; }, }); @@ -239,8 +239,8 @@ describe('models/builder.js', function() { builder = new Builder({ project, ui: project.ui, - processBuildResult(buildResults) { - return Promise.resolve(buildResults); + copyToOutputPath() { + return []; }, }); @@ -259,17 +259,20 @@ describe('models/builder.js', function() { project, ui: project.ui, setupBroccoliBuilder, - processBuildResult(buildResults) { - return Promise.resolve(buildResults); - }, }); }); - it('is idempotent', function() { - let firstCleanupPromise = builder.cleanup(); - expect(builder.cleanup()).to.equal(firstCleanupPromise); + it('is idempotent', async function() { + let cleanupCount = 0; + builder.builder.cleanup = function() { + cleanupCount++; + }; + + let cleanupPromises = [builder.cleanup(), builder.cleanup(), builder.cleanup(), builder.cleanup()]; - return firstCleanupPromise; + await Promise.all(cleanupPromises); + + expect(cleanupCount).to.equal(1); }); }); @@ -314,8 +317,8 @@ describe('models/builder.js', function() { return originalBuild.call(this); }; }, - processBuildResult(buildResults) { - return Promise.resolve(buildResults); + copyToOutputPath() { + return []; }, project, ui: project.ui, @@ -352,7 +355,9 @@ describe('models/builder.js', function() { let outputReady = td.replace(addon, 'outputReady', td.function()); await builder.build(); - td.verify(outputReady(buildResults), { times: 1 }); + + let expected = Object.assign({ outputChanges: [] }, buildResults); + td.verify(outputReady(expected), { times: 1 }); }); describe('instrumentation hooks', function() { @@ -375,26 +380,26 @@ describe('models/builder.js', function() { expect(hooksCalled).to.deep.equal(['preBuild', 'build', 'postBuild', 'outputReady']); }); - it('should call postBuild before processBuildResult', async function() { + it('should call postBuild before copying to dist', async function() { let called = []; addon.postBuild = function() { called.push('postBuild'); }; - builder.processBuildResult = function() { - called.push('processBuildResult'); + builder.copyToOutputPath = function() { + called.push('copyToOutputPath'); }; await builder.build(); - expect(called).to.deep.equal(['postBuild', 'processBuildResult']); + expect(called).to.deep.equal(['postBuild', 'copyToOutputPath']); }); - it('should call outputReady after processBuildResult', async function() { + it('should call outputReady after copying to output path', async function() { let called = []; - builder.processBuildResult = function() { - called.push('processBuildResult'); + builder.copyToOutputPath = function() { + called.push('copyToOutputPath'); }; addon.outputReady = function() { @@ -402,7 +407,7 @@ describe('models/builder.js', function() { }; await builder.build(); - expect(called).to.deep.equal(['processBuildResult', 'outputReady']); + expect(called).to.deep.equal(['copyToOutputPath', 'outputReady']); }); it('buildError receives the error object from the errored step', async function() { From 7da6de5741474d72bd93521c78d533de2b12f9ab Mon Sep 17 00:00:00 2001 From: Deepan Subbiah Date: Wed, 28 Aug 2019 11:45:53 +0530 Subject: [PATCH 288/818] Update npm-task.js --- lib/tasks/npm-task.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/npm-task.js b/lib/tasks/npm-task.js index 1dbce5414d..aecfe8e48b 100644 --- a/lib/tasks/npm-task.js +++ b/lib/tasks/npm-task.js @@ -175,7 +175,7 @@ class NpmTask extends Task { // this ensures that we run a full `npm install` **after** any `npm // install foo` runs to ensure that we have a fully functional // node_modules hierarchy - if (result.npmVersion && semver.gte(result.npmVersion, '5.0.0')) { + if (result.npmVersion && semver.lt(result.npmVersion, '5.7.1')) { promise = promise.then(() => this.npm(['install'])); } } From 82d9033e98cccb25194cb6a27c794ba139ac633e Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 16 Mar 2020 17:41:38 -0400 Subject: [PATCH 289/818] Refactor nested `runPromise` in CLI to async/await. Leverage an anonymous async function to allow the entanglement with `onCoonCommandInterrupt` to continue to work properly, but still take advantage of `async`/`await`. --- lib/cli/cli.js | 91 ++++++++++++++++++++++++++------------------------ 1 file changed, 47 insertions(+), 44 deletions(-) diff --git a/lib/cli/cli.js b/lib/cli/cli.js index fa49dff5f6..914caedfee 100644 --- a/lib/cli/cli.js +++ b/lib/cli/cli.js @@ -185,65 +185,68 @@ class CLI { let instrumentation = this.instrumentation; let onCommandInterrupt; - let runPromise = Promise.resolve() - .then(() => { + let runPromise = Promise.resolve().then(async () => { + let resultOrExitCode; + + try { instrumentation.stopAndReport('init'); - instrumentation.start('command'); - loggerTesting.info('cli: command.beforeRun'); - onProcessInterrupt.addHandler(onCommandInterrupt); + try { + instrumentation.start('command'); + + loggerTesting.info('cli: command.beforeRun'); + onProcessInterrupt.addHandler(onCommandInterrupt); - return command.beforeRun(commandArgs); - }) - .then(() => { - loggerTesting.info('cli: command.validateAndRun'); + await command.beforeRun(commandArgs); - return command.validateAndRun(commandArgs); - }) - .then(result => { - instrumentation.stopAndReport('command', commandName, commandArgs); + loggerTesting.info('cli: command.validateAndRun'); - onProcessInterrupt.removeHandler(onCommandInterrupt); + resultOrExitCode = await command.validateAndRun(commandArgs); + } finally { + instrumentation.stopAndReport('command', commandName, commandArgs); - return result; - }) - .finally(() => { + onProcessInterrupt.removeHandler(onCommandInterrupt); + } + } finally { instrumentation.start('shutdown'); shutdownOnExit = function() { instrumentation.stopAndReport('shutdown'); }; - }) - .then(result => { - // if the help option was passed, call the help command - if (result === 'callHelp') { - helpOptions = { - environment, - commandName, - commandArgs, - }; - - return this.callHelp(helpOptions); - } + } - return result; - }) - .then(exitCode => { - loggerTesting.info(`cli: command run complete. exitCode: ${exitCode}`); - // TODO: fix this - // Possibly this issue: https://github.com/joyent/node/issues/8329 - // Wait to resolve promise when running on windows. - // This ensures that stdout is flushed so acceptance tests get full output + // if the help option was passed, call the help command + if (resultOrExitCode === 'callHelp') { + helpOptions = { + environment, + commandName, + commandArgs, + }; + resultOrExitCode = await this.callHelp(helpOptions); + } + + let exitCode = resultOrExitCode; + + loggerTesting.info(`cli: command run complete. exitCode: ${exitCode}`); + // TODO: fix this + // Possibly this issue: https://github.com/joyent/node/issues/8329 + // Wait to resolve promise when running on windows. + // This ensures that stdout is flushed so acceptance tests get full output + + if (process.platform === 'win32') { return new Promise(resolve => { - if (process.platform === 'win32') { - setTimeout(resolve, 250, exitCode); - } else { - resolve(exitCode); - } + setTimeout(resolve, 250, exitCode); }); - }); + } else { + return exitCode; + } + }); + + onCommandInterrupt = async () => { + await command.onInterrupt(); - onCommandInterrupt = () => Promise.resolve(command.onInterrupt()).then(() => runPromise); + return await runPromise; + }; return await runPromise; } catch (error) { From df9d4a72d6bf662953b9eb61df9a0789de563e7b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 18 Mar 2020 03:51:20 +0000 Subject: [PATCH 290/818] Bump nock from 12.0.2 to 12.0.3 (#9112) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 15c312bf6a..58b8c81b28 100644 --- a/package.json +++ b/package.json @@ -145,7 +145,7 @@ "eslint-plugin-prettier": "^3.1.2", "fixturify": "^2.1.0", "mocha": "^7.1.0", - "nock": "^12.0.2", + "nock": "^12.0.3", "nyc": "^15.0.0", "prettier": "1.19.1", "rimraf": "^3.0.2", diff --git a/yarn.lock b/yarn.lock index b084eaa084..298744c412 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4816,10 +4816,10 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -nock@^12.0.2: - version "12.0.2" - resolved "https://registry.yarnpkg.com/nock/-/nock-12.0.2.tgz#47617b34738e026b29d2294b4579e35b27e6a4d3" - integrity sha512-pTckyfP8QHvwXP/oX+zQuSIL3S/mWTd84ba4pOGZlS/FgRZyljv4C3ZyOjgMilvkydSaERML/aJEF13EBUuDTQ== +nock@^12.0.3: + version "12.0.3" + resolved "https://registry.yarnpkg.com/nock/-/nock-12.0.3.tgz#83f25076dbc4c9aa82b5cdf54c9604c7a778d1c9" + integrity sha512-QNb/j8kbFnKCiyqi9C5DD0jH/FubFGj5rt9NQFONXwQm3IPB0CULECg/eS3AU1KgZb/6SwUa4/DTRKhVxkGABw== dependencies: debug "^4.1.0" json-stringify-safe "^5.0.1" From 7e5347b5f4ecc1e7292f0c1e4e13a630f163ca17 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 18 Mar 2020 04:05:35 +0000 Subject: [PATCH 291/818] Bump broccoli from 3.3.3 to 3.4.0 (#9113) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 58b8c81b28..5f2f9d4966 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "babel-plugin-module-resolver": "^4.0.0", "bower-config": "^1.4.1", "bower-endpoint-parser": "0.2.2", - "broccoli": "^3.3.3", + "broccoli": "^3.4.0", "broccoli-amd-funnel": "^2.0.1", "broccoli-babel-transpiler": "^7.4.0", "broccoli-builder": "^0.18.14", diff --git a/yarn.lock b/yarn.lock index 298744c412..e3a3280fb9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1280,10 +1280,10 @@ broccoli@^2.0.0: underscore.string "^3.2.2" watch-detector "^0.1.0" -broccoli@^3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/broccoli/-/broccoli-3.3.3.tgz#f4034b2495b709e99dd7e7d8834bf4a01bb4d0d7" - integrity sha512-MFyAk94I8XcSmfDZ0DtXlkgDvWL/U2lGbFpWiU1OPBGyUNC5WgWElC2U18SEFuDc0GncZfUaIxN+QAALrs4fAQ== +broccoli@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/broccoli/-/broccoli-3.4.0.tgz#e240a060ef35336642984f811a38b2396cfac18b" + integrity sha512-M7UO4gU12Jx6Af2H3bo13E5KHCfYOzqUCUEd18VEkriXu6BngMpet/2+PcpWos+a+cUp+2DFXkklCSJaOGxFkQ== dependencies: "@types/chai" "^4.2.9" "@types/chai-as-promised" "^7.1.2" From d332a6508e5b62a9d308db07eacfb166c80868b8 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 18 Mar 2020 04:09:08 +0000 Subject: [PATCH 292/818] Bump isbinaryfile from 4.0.4 to 4.0.5 (#9114) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 5f2f9d4966..d8a4d161af 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "http-proxy": "^1.18.0", "inflection": "^1.12.0", "is-git-url": "^1.0.0", - "isbinaryfile": "^4.0.4", + "isbinaryfile": "^4.0.5", "js-yaml": "^3.13.1", "json-stable-stringify": "^1.0.1", "leek": "0.0.24", diff --git a/yarn.lock b/yarn.lock index e3a3280fb9..f363a1bdf3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3962,10 +3962,10 @@ isarray@2.0.1: resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.1.tgz#a37d94ed9cda2d59865c9f76fe596ee1f338741e" integrity sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4= -isbinaryfile@^4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-4.0.4.tgz#6803f81a8944201c642b6e17da041e24deb78712" - integrity sha512-pEutbN134CzcjlLS1myKX/uxNjwU5eBVSprvkpv3+3dqhBHUZLIWJQowC40w5c0Zf19vBY8mrZl88y5J4RAPbQ== +isbinaryfile@^4.0.5: + version "4.0.5" + resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-4.0.5.tgz#7193454fdd7fc0b12855c36c48d4ac7368fa3ec9" + integrity sha512-Jvz0gpTh1AILHMCBUyqq7xv1ZOQrxTDwyp1/QUq1xFpOBvp4AH5uEobPePJht8KnBGqQIH7We6OR73mXsjG0cA== isexe@^2.0.0: version "2.0.0" From 4bbc3fb5582c5fd8d5842135b1c3336d439592d2 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 18 Mar 2020 04:22:56 +0000 Subject: [PATCH 293/818] Bump testem from 3.0.2 to 3.0.3 (#9115) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index d8a4d161af..f4fd716a5f 100644 --- a/package.json +++ b/package.json @@ -119,7 +119,7 @@ "sort-package-json": "^1.40.0", "symlink-or-copy": "^1.3.1", "temp": "0.9.1", - "testem": "^3.0.2", + "testem": "^3.0.3", "tiny-lr": "^1.1.1", "tree-sync": "^2.0.0", "uuid": "^7.0.2", diff --git a/yarn.lock b/yarn.lock index f363a1bdf3..d413ced601 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6443,10 +6443,10 @@ testdouble@^3.13.1, testdouble@^3.2.6: stringify-object-es5 "^2.5.0" theredoc "^1.0.0" -testem@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/testem/-/testem-3.0.2.tgz#9100d09e73c3271e5201a141dbd3f0d31e71add2" - integrity sha512-mUcPL7MZtmg3UUkOe6sIFXoY1ysv06qxQ7VEKnAHIAiKbf21DOdAJzVqR9YsOZcvennP9gKAUbL/607z9RQt/g== +testem@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/testem/-/testem-3.0.3.tgz#d59f1ffbcf497909aca5580b0496e6506350d7b8" + integrity sha512-mdBCCn8LlTmgFDpexemyGP4cjO1V0VASs/qbPGZk8Qo05EBnmch29LIqxvWUDih/nA6eau3reXp0rNEef7qpCw== dependencies: backbone "^1.1.2" bluebird "^3.4.6" From 6ee5826cf4e6c043d210e02e89a4dcf099cd6903 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 18 Mar 2020 09:19:18 -0400 Subject: [PATCH 294/818] Update paambaati/codeclimate-action to v2.5.5. This removes the need to manually specify a `prefix`. --- .github/workflows/coverage.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 3b784d9792..26213873b6 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -18,13 +18,12 @@ jobs: - run: yarn install --frozen-lockfile --non-interactive - name: Test && Report to Code Climate - uses: paambaati/codeclimate-action@v2.5.4 + uses: paambaati/codeclimate-action@v2.5.5 env: CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} with: coverageCommand: yarn test:cover coverageLocations: "coverage/lcov.info:lcov" - prefix: ${{ github.workspace }} - name: Coveralls uses: coverallsapp/github-action@master From dd81ad9988d439ef55587e66df69007783b0cf4f Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 19 Mar 2020 03:52:18 +0000 Subject: [PATCH 295/818] Bump mocha from 7.1.0 to 7.1.1 (#9117) --- package.json | 2 +- yarn.lock | 59 +++++++++++++--------------------------------------- 2 files changed, 16 insertions(+), 45 deletions(-) diff --git a/package.json b/package.json index f4fd716a5f..9a4bafed3b 100644 --- a/package.json +++ b/package.json @@ -144,7 +144,7 @@ "eslint-plugin-node": "^11.0.0", "eslint-plugin-prettier": "^3.1.2", "fixturify": "^2.1.0", - "mocha": "^7.1.0", + "mocha": "^7.1.1", "nock": "^12.0.3", "nyc": "^15.0.0", "prettier": "1.19.1", diff --git a/yarn.lock b/yarn.lock index d413ced601..34d9fa534f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4650,12 +4650,7 @@ mimic-response@^1.0.0: dependencies: brace-expansion "^1.1.7" -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= - -minimist@^1.1.1, minimist@^1.2.0: +minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== @@ -4681,22 +4676,22 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@0.5.1, mkdirp@^0.5.0, mkdirp@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= +mkdirp@0.5.3, mkdirp@^0.5.0, mkdirp@^0.5.1: + version "0.5.3" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.3.tgz#5a514b7179259287952881e94410ec5465659f8c" + integrity sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg== dependencies: - minimist "0.0.8" + minimist "^1.2.5" mktemp@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/mktemp/-/mktemp-0.4.0.tgz#6d0515611c8a8c84e484aa2000129b98e981ff0b" integrity sha1-bQUVYRyKjITkhKogABKbmOmB/ws= -mocha@^7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.1.0.tgz#c784f579ad0904d29229ad6cb1e2514e4db7d249" - integrity sha512-MymHK8UkU0K15Q/zX7uflZgVoRWiTjy0fXE/QjKts6mowUvGxOdPhZ2qj3b0iZdUrNZlW9LAIMFHB4IW+2b3EQ== +mocha@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.1.1.tgz#89fbb30d09429845b1bb893a830bf5771049a441" + integrity sha512-3qQsu3ijNS3GkWcccT5Zw0hf/rWvu1fTN9sPvEd81hlwsr30GX2GcDSSoBxo24IR8FelmrAydGC6/1J5QQP4WA== dependencies: ansi-colors "3.2.3" browser-stdout "1.3.1" @@ -4711,7 +4706,7 @@ mocha@^7.1.0: js-yaml "3.13.1" log-symbols "3.0.0" minimatch "3.0.4" - mkdirp "0.5.1" + mkdirp "0.5.3" ms "2.1.1" node-environment-flags "1.0.6" object.assign "4.1.0" @@ -4719,8 +4714,8 @@ mocha@^7.1.0: supports-color "6.0.0" which "1.3.1" wide-align "1.1.3" - yargs "13.3.0" - yargs-parser "13.1.1" + yargs "13.3.2" + yargs-parser "13.1.2" yargs-unparser "1.6.0" morgan@^1.9.1: @@ -7087,15 +7082,7 @@ yam@^1.0.0: fs-extra "^4.0.2" lodash.merge "^4.6.0" -yargs-parser@13.1.1: - version "13.1.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.1.tgz#d26058532aa06d365fe091f6a1fc06b2f7e5eca0" - integrity sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - -yargs-parser@^13.1.1, yargs-parser@^13.1.2: +yargs-parser@13.1.2, yargs-parser@^13.1.2: version "13.1.2" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== @@ -7120,23 +7107,7 @@ yargs-unparser@1.6.0: lodash "^4.17.15" yargs "^13.3.0" -yargs@13.3.0: - version "13.3.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.0.tgz#4c657a55e07e5f2cf947f8a366567c04a0dedc83" - integrity sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA== - dependencies: - cliui "^5.0.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^13.1.1" - -yargs@^13.3.0: +yargs@13.3.2, yargs@^13.3.0: version "13.3.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== From 16d68cfabf6135f3ddcde2f00616cdfecfc57eda Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 23 Mar 2020 01:36:19 +0000 Subject: [PATCH 296/818] Bump fs-extra from 8.1.0 to 9.0.0 (#9118) --- package.json | 2 +- yarn.lock | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 9a4bafed3b..c2f381404b 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "find-up": "^4.1.0", "find-yarn-workspace-root": "^1.2.1", "fixturify-project": "^2.1.0", - "fs-extra": "^8.1.0", + "fs-extra": "^9.0.0", "fs-tree-diff": "^2.0.1", "get-caller-file": "^2.0.5", "git-repo-info": "^2.1.1", diff --git a/yarn.lock b/yarn.lock index 34d9fa534f..22675d1c1d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -759,6 +759,11 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= +at-least-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" + integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== + atob@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" @@ -3048,6 +3053,16 @@ fs-extra@^8.0.1, fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" +fs-extra@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.0.tgz#b6afc31036e247b2466dc99c29ae797d5d4580a3" + integrity sha512-pmEYSk3vYsG/bF651KPUXZ+hvjpgWYw/Gc7W9NFUe3ZVLczKKWIij3IKpOrQcdw4TILtibFslZ0UmR8Vvzig4g== + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^1.0.0" + fs-merger@^3.0.1: version "3.0.2" resolved "https://registry.yarnpkg.com/fs-merger/-/fs-merger-3.0.2.tgz#bf111334b89b8d65b95580d33c587dc79620a4e3" @@ -4146,6 +4161,15 @@ jsonfile@^4.0.0: optionalDependencies: graceful-fs "^4.1.6" +jsonfile@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.0.1.tgz#98966cba214378c8c84b82e085907b40bf614179" + integrity sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg== + dependencies: + universalify "^1.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + jsonify@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" @@ -6758,6 +6782,11 @@ universalify@^0.1.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== +universalify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d" + integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug== + unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" From 8fb4f71c882a6f66ea9ae1bf0bb6aac3661ed6e8 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sun, 22 Mar 2020 22:10:58 -0400 Subject: [PATCH 297/818] Update prettier and related linting packages. --- package.json | 4 ++-- yarn.lock | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index c2f381404b..baff7672d8 100644 --- a/package.json +++ b/package.json @@ -138,7 +138,7 @@ "ember-cli-blueprint-test-helpers": "^0.19.2", "ember-cli-internal-test-helpers": "^0.9.1", "eslint": "^6.8.0", - "eslint-config-prettier": "^6.10.0", + "eslint-config-prettier": "^6.10.1", "eslint-plugin-chai-expect": "^2.1.0", "eslint-plugin-mocha": "^6.3.0", "eslint-plugin-node": "^11.0.0", @@ -147,7 +147,7 @@ "mocha": "^7.1.1", "nock": "^12.0.3", "nyc": "^15.0.0", - "prettier": "1.19.1", + "prettier": "2.0.1", "rimraf": "^3.0.2", "strip-ansi": "^6.0.0", "supertest": "^4.0.2", diff --git a/yarn.lock b/yarn.lock index 22675d1c1d..7fdbf4c8e6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2348,10 +2348,10 @@ escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1 resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= -eslint-config-prettier@^6.10.0: - version "6.10.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.10.0.tgz#7b15e303bf9c956875c948f6b21500e48ded6a7f" - integrity sha512-AtndijGte1rPILInUdHjvKEGbIV06NuvPrqlIEaEaWtbtvJh464mDeyGMdZEQMsGvC0ZVkiex1fSNcC4HAbRGg== +eslint-config-prettier@^6.10.1: + version "6.10.1" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.10.1.tgz#129ef9ec575d5ddc0e269667bf09defcd898642a" + integrity sha512-svTy6zh1ecQojvpbJSgH3aei/Rt7C6i090l5f2WQ4aB05lYHeZIR1qL4wZyyILTbtmnbHP5Yn8MrsOJMGa8RkQ== dependencies: get-stdin "^6.0.0" @@ -5381,10 +5381,10 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@1.19.1: - version "1.19.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" - integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== +prettier@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.1.tgz#3f00ac71263be34684b2b2c8d7e7f63737592dac" + integrity sha512-piXGBcY1zoFOG0MvHpNE5reAGseLmaCRifQ/fmfF49BcYkInEs/naD/unxGNAeOKFA5+JxVrPyMvMlpzcd20UA== printf@^0.5.1: version "0.5.2" From 6152f5c65060d69c44a1329c19ebb836a5b6dab2 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sun, 22 Mar 2020 22:20:48 -0400 Subject: [PATCH 298/818] yarn lint --fix --- blueprints/addon/index.js | 2 +- blueprints/blueprint/index.js | 2 +- blueprints/in-repo-addon/index.js | 4 +- docs/project_version_preprocessor.js | 2 +- lib/broccoli/default-packager.js | 4 +- lib/broccoli/ember-app.js | 40 +- lib/broccoli/merge-trees.js | 2 +- lib/cli/cli.js | 6 +- lib/cli/index.js | 6 +- lib/cli/lookup-command.js | 2 +- lib/commands/generate.js | 4 +- lib/commands/help.js | 6 +- lib/commands/new.js | 4 +- lib/commands/serve.js | 4 +- lib/models/addon.js | 20 +- lib/models/asset-size-printer.js | 20 +- lib/models/blueprint.js | 46 +-- lib/models/builder.js | 2 +- lib/models/command.js | 16 +- lib/models/edit-file-diff.js | 2 +- lib/models/file-info.js | 20 +- lib/models/hardware-info.js | 4 +- lib/models/instantiate-addons.js | 4 +- lib/models/instrumentation.js | 4 +- lib/models/package-info-cache/index.js | 22 +- lib/models/package-info-cache/package-info.js | 24 +- lib/models/project.js | 10 +- lib/models/watcher.js | 4 +- lib/tasks/bower-install.js | 6 +- lib/tasks/generate-from-blueprint.js | 4 +- lib/tasks/install-blueprint.js | 4 +- lib/tasks/npm-task.js | 12 +- lib/tasks/server/express-server.js | 10 +- lib/tasks/server/livereload-server.js | 8 +- .../middleware/broccoli-watcher/index.js | 2 +- .../server/middleware/proxy-server/index.js | 2 +- lib/utilities/clean-remove.js | 8 +- lib/utilities/deprecate.js | 2 +- lib/utilities/execa.js | 4 +- lib/utilities/find-addon-by-name.js | 8 +- lib/utilities/find-build-file.js | 2 +- lib/utilities/get-option-args.js | 2 +- lib/utilities/get-package-base-name.js | 2 +- lib/utilities/get-serve-url.js | 2 +- lib/utilities/heimdall-progress.js | 4 +- lib/utilities/json-generator.js | 4 +- lib/utilities/markdown-color.js | 4 +- lib/utilities/merge-blueprint-options.js | 2 +- lib/utilities/open-editor.js | 8 +- lib/utilities/platform-checker.js | 4 +- lib/utilities/print-command.js | 10 +- lib/utilities/will-interrupt-process.js | 2 +- lib/utilities/windows-admin.js | 4 +- tests/acceptance/addon-dummy-generate-test.js | 24 +- tests/acceptance/addon-generate-test.js | 30 +- tests/acceptance/addon-smoke-test-slow.js | 20 +- tests/acceptance/brocfile-smoke-test-slow.js | 74 ++-- tests/acceptance/destroy-test.js | 30 +- tests/acceptance/generate-test.js | 36 +- tests/acceptance/help-test.js | 40 +- tests/acceptance/in-option-destroy-test.js | 24 +- tests/acceptance/in-option-generate-test.js | 32 +- .../acceptance/in-repo-addon-generate-test.js | 14 +- tests/acceptance/init-test.js | 32 +- tests/acceptance/missing-before-addon-test.js | 8 +- .../nested-addons-smoke-test-slow.js | 10 +- tests/acceptance/new-test.js | 86 ++--- tests/acceptance/pods-destroy-test.js | 30 +- tests/acceptance/pods-generate-test.js | 34 +- .../preprocessor-smoke-test-slow.js | 18 +- tests/acceptance/smoke-test-slow.js | 74 ++-- tests/factories/command-options.js | 4 +- tests/helpers/acceptance.js | 2 +- tests/helpers/assert-version-lock.js | 2 +- tests/helpers/convert-help-output-to-json.js | 2 +- tests/helpers/fixturify-project.js | 8 +- tests/helpers/kill-cli-process.js | 2 +- tests/helpers/log-on-failure.js | 4 +- tests/helpers/mock-process.js | 2 +- tests/helpers/mock-project.js | 2 +- tests/helpers/process-help-string.js | 2 +- tests/helpers/proxy-server.js | 6 +- tests/helpers/run-command.js | 14 +- tests/helpers/tmp.js | 6 +- tests/integration/models/blueprint-test.js | 360 ++++++++--------- tests/integration/tasks/build-test.js | 20 +- .../utilities/clean-remove-test.js | 32 +- tests/runner.js | 6 +- tests/unit/analytics-test.js | 10 +- tests/unit/blueprints/addon-test.js | 50 +-- tests/unit/blueprints/in-repo-addon-test.js | 30 +- tests/unit/blueprints/lib-test.js | 10 +- tests/unit/blueprints/server-test.js | 6 +- tests/unit/broccoli/addon/linting-test.js | 22 +- tests/unit/broccoli/addon/module-name-test.js | 8 +- tests/unit/broccoli/builder-test.js | 8 +- .../additional-assets-test.js | 18 +- .../broccoli/default-packager/bower-test.js | 12 +- .../broccoli/default-packager/config-test.js | 14 +- .../ember-cli-internal-test.js | 18 +- .../default-packager/external-test.js | 10 +- .../broccoli/default-packager/index-test.js | 14 +- .../default-packager/javascript-test.js | 30 +- .../broccoli/default-packager/process-test.js | 14 +- .../broccoli/default-packager/public-test.js | 12 +- .../broccoli/default-packager/styles-test.js | 26 +- .../default-packager/templates-test.js | 20 +- .../broccoli/default-packager/tests-test.js | 42 +- .../broccoli/default-packager/vendor-test.js | 12 +- tests/unit/broccoli/ember-addon-test.js | 16 +- tests/unit/broccoli/ember-app-test.js | 338 ++++++++-------- .../ember-app/app-and-dependencies-test.js | 10 +- tests/unit/broccoli/ember-app/import-test.js | 14 +- tests/unit/broccoli/merge-trees-test.js | 24 +- .../broccoli/template-precompilation-test.js | 20 +- tests/unit/cli/cli-test.js | 238 ++++++------ tests/unit/cli/lookup-command-test.js | 16 +- tests/unit/commands/addon-test.js | 40 +- tests/unit/commands/build-test.js | 30 +- tests/unit/commands/destroy-test.js | 26 +- tests/unit/commands/generate-test.js | 52 +-- tests/unit/commands/help-test.js | 108 +++--- tests/unit/commands/init-test.js | 54 +-- tests/unit/commands/install-test.js | 82 ++-- tests/unit/commands/new-test.js | 44 +-- tests/unit/commands/serve-test.js | 116 +++--- tests/unit/commands/show-asset-sizes-test.js | 22 +- tests/unit/commands/test-test.js | 118 +++--- tests/unit/commands/uninstall-npm-test.js | 14 +- tests/unit/commands/version-test.js | 14 +- tests/unit/docs-lint-test.js | 10 +- tests/unit/errors/silent-test.js | 4 +- tests/unit/experiments-test.js | 14 +- tests/unit/models/addon-test.js | 228 +++++------ tests/unit/models/asset-size-printer-test.js | 34 +- tests/unit/models/blueprint-test.js | 66 ++-- tests/unit/models/builder-test.js | 116 +++--- tests/unit/models/command-test.js | 136 +++---- tests/unit/models/file-info-test.js | 62 +-- tests/unit/models/hardware-info-test.js | 96 ++--- .../unit/models/installation-checker-test.js | 20 +- tests/unit/models/instantiate-addons-test.js | 34 +- tests/unit/models/instrumentation-test.js | 158 ++++---- .../node-module-list-test.js | 14 +- .../package-info-cache-test.js | 152 ++++---- tests/unit/models/project-test.js | 196 +++++----- tests/unit/models/server-watcher-test.js | 28 +- tests/unit/models/watcher-test.js | 68 ++-- tests/unit/package/dependency-version-test.js | 8 +- tests/unit/settings-file/leek-options-test.js | 10 +- .../settings-file/precedence-settings-test.js | 6 +- tests/unit/tasks/addon-install-test.js | 22 +- tests/unit/tasks/bower-install-test.js | 18 +- tests/unit/tasks/build-watch-test.js | 6 +- tests/unit/tasks/git-init-test.js | 16 +- tests/unit/tasks/npm-install-test.js | 8 +- tests/unit/tasks/npm-task-test.js | 66 ++-- tests/unit/tasks/serve-test.js | 12 +- .../unit/tasks/server/express-server-test.js | 364 +++++++++--------- .../tasks/server/livereload-server-test.js | 170 ++++---- .../server/middleware/history-support-test.js | 14 +- .../server/middleware/proxy-server-test.js | 6 +- .../server/middleware/tests-server-test.js | 16 +- tests/unit/tasks/test-server-test.js | 50 +-- tests/unit/tasks/test-test.js | 6 +- .../unit/utilities/command-generator-test.js | 10 +- tests/unit/utilities/ember-app-utils-test.js | 92 ++--- .../unit/utilities/find-addon-by-name-test.js | 34 +- tests/unit/utilities/find-build-file-test.js | 14 +- .../utilities/format-package-list-test.js | 18 +- .../utilities/get-package-base-name-test.js | 8 +- tests/unit/utilities/git-repo-test.js | 4 +- tests/unit/utilities/heimdall-progres-test.js | 10 +- tests/unit/utilities/insert-into-file-test.js | 68 ++-- .../utilities/is-live-reload-request-test.js | 18 +- .../utilities/lint-addons-by-type-test.js | 8 +- tests/unit/utilities/load-config-test.js | 20 +- tests/unit/utilities/markdown-color-test.js | 18 +- .../merge-blueprint-options-test-disabled.js | 6 +- tests/unit/utilities/open-editor-test.js | 20 +- tests/unit/utilities/package-cache-test.js | 84 ++-- tests/unit/utilities/platform-checker-test.js | 12 +- tests/unit/utilities/print-command-test.js | 12 +- tests/unit/utilities/process-template-test.js | 4 +- .../utilities/stringify-and-normalize-test.js | 4 +- tests/unit/utilities/symbol-test.js | 6 +- .../unit/utilities/valid-project-name-test.js | 12 +- tests/unit/utilities/version-utils-test.js | 6 +- tests/unit/utilities/walk-up-path-test.js | 8 +- .../utilities/will-interrupt-process-test.js | 62 +-- tests/unit/utilities/windows-admin-test.js | 36 +- 191 files changed, 3052 insertions(+), 3054 deletions(-) diff --git a/blueprints/addon/index.js b/blueprints/addon/index.js index 2f29b686ec..ac0d889d40 100644 --- a/blueprints/addon/index.js +++ b/blueprints/addon/index.js @@ -121,7 +121,7 @@ module.exports = { let packagePath = path.join(this.path, 'files', 'package.json'); let bowerPath = path.join(this.path, 'files', 'bower.json'); - [packagePath, bowerPath].forEach(filePath => { + [packagePath, bowerPath].forEach((filePath) => { fs.removeSync(filePath); }); }, diff --git a/blueprints/blueprint/index.js b/blueprints/blueprint/index.js index e0a37bef05..d21affb601 100644 --- a/blueprints/blueprint/index.js +++ b/blueprints/blueprint/index.js @@ -7,7 +7,7 @@ module.exports = { let files = this._super.files.apply(this, arguments); if (!this.hasJSHint()) { - files = files.filter(file => file !== 'blueprints/.jshintrc'); + files = files.filter((file) => file !== 'blueprints/.jshintrc'); } return files; diff --git a/blueprints/in-repo-addon/index.js b/blueprints/in-repo-addon/index.js index c7fad43eb3..134dbf6497 100755 --- a/blueprints/in-repo-addon/index.js +++ b/blueprints/in-repo-addon/index.js @@ -37,8 +37,8 @@ module.exports = { fileMapTokens() { return { - __root__: options => this._processTokens(options.dasherizedModuleName).root, - __name__: options => this._processTokens(options.dasherizedModuleName).name, + __root__: (options) => this._processTokens(options.dasherizedModuleName).root, + __name__: (options) => this._processTokens(options.dasherizedModuleName).name, }; }, diff --git a/docs/project_version_preprocessor.js b/docs/project_version_preprocessor.js index 03d7b7aafb..2a50955da4 100644 --- a/docs/project_version_preprocessor.js +++ b/docs/project_version_preprocessor.js @@ -3,6 +3,6 @@ let versionUtils = require('../lib/utilities/version-utils'); let emberCLIVersion = versionUtils.emberCLIVersion; -module.exports = function(data, options) { +module.exports = function (data, options) { options.project.version = emberCLIVersion(); }; diff --git a/lib/broccoli/default-packager.js b/lib/broccoli/default-packager.js index 6f0abdad7a..cfa1814940 100644 --- a/lib/broccoli/default-packager.js +++ b/lib/broccoli/default-packager.js @@ -274,7 +274,7 @@ module.exports = class DefaultPackager { */ importAdditionalAssets(tree) { if (this._cachedProcessedAdditionalAssets === null) { - let otherAssetTrees = funnelReducer(this.additionalAssetPaths).map(options => { + let otherAssetTrees = funnelReducer(this.additionalAssetPaths).map((options) => { let files = options.include.join(','); options.annotation = `${options.srcDir}/{${files}} => ${options.destDir}/{${files}}`; @@ -1303,7 +1303,7 @@ module.exports = class DefaultPackager { // iterate over the keys and concat files // to support scenarios like // app.import('vendor/foobar.js', { outputFile: 'assets/baz.js' }); - let vendorTrees = importPaths.map(importPath => { + let vendorTrees = importPaths.map((importPath) => { let files = this.scriptOutputFiles[importPath]; let isMainVendorFile = importPath === this.distPaths.vendorJsFile; diff --git a/lib/broccoli/ember-app.js b/lib/broccoli/ember-app.js index 8ede0ff605..df9ce9cb89 100644 --- a/lib/broccoli/ember-app.js +++ b/lib/broccoli/ember-app.js @@ -132,7 +132,7 @@ class EmberApp { this.populateLegacyFiles(); this.initializeAddons(); - this.project.addons.forEach(addon => (addon.app = this)); + this.project.addons.forEach((addon) => (addon.app = this)); p.setupRegistry(this); this._importAddonTransforms(); this._notifyAddonIncluded(); @@ -205,7 +205,7 @@ class EmberApp { this.project = options.project || Project.closestSync(process.cwd()); if (options.configPath) { - this.project.configPath = function() { + this.project.configPath = function () { return app._resolveLocal(options.configPath); }; } @@ -565,7 +565,7 @@ class EmberApp { result = result || false; roots = roots || {}; - let babelInstance = addons.find(addon => addon.name === 'ember-cli-babel'); + let babelInstance = addons.find((addon) => addon.name === 'ember-cli-babel'); if (babelInstance) { let version = babelInstance.pkg.version; if (semver.lt(version, '6.6.0')) { @@ -579,7 +579,7 @@ class EmberApp { } } - return addons.some(addon => this._checkEmberCliBabel(addon.addons, result, roots)) || result; + return addons.some((addon) => this._checkEmberCliBabel(addon.addons, result, roots)) || result; } /** @@ -605,10 +605,10 @@ class EmberApp { @method _notifyAddonIncluded */ _notifyAddonIncluded() { - let addonNames = this.project.addons.map(addon => addon.name); + let addonNames = this.project.addons.map((addon) => addon.name); if (this.options.addons.blacklist) { - this.options.addons.blacklist.forEach(addonName => { + this.options.addons.blacklist.forEach((addonName) => { if (addonNames.indexOf(addonName) === -1) { throw new Error(`Addon "${addonName}" defined in blacklist is not found`); } @@ -616,7 +616,7 @@ class EmberApp { } if (this.options.addons.whitelist) { - this.options.addons.whitelist.forEach(addonName => { + this.options.addons.whitelist.forEach((addonName) => { if (addonNames.indexOf(addonName) === -1) { throw new Error(`Addon "${addonName}" defined in whitelist is not found`); } @@ -625,9 +625,9 @@ class EmberApp { // the addons must be filtered before the `included` hook is called // in case an addon caches the project.addons list - this.project.addons = this.project.addons.filter(addon => this.shouldIncludeAddon(addon)); + this.project.addons = this.project.addons.filter((addon) => this.shouldIncludeAddon(addon)); - this.project.addons.forEach(addon => { + this.project.addons.forEach((addon) => { if (addon.included) { addon.included(this); } @@ -641,7 +641,7 @@ class EmberApp { @method _importAddonTransforms */ _importAddonTransforms() { - this.project.addons.forEach(addon => { + this.project.addons.forEach((addon) => { if (this.shouldIncludeAddon(addon)) { if (addon.importTransforms) { let transforms = addon.importTransforms(); @@ -650,7 +650,7 @@ class EmberApp { throw new Error(`Addon "${addon.name}" did not return a transform map from importTransforms function`); } - Object.keys(transforms).forEach(transformName => { + Object.keys(transforms).forEach((transformName) => { let transformConfig = { files: [], options: {}, @@ -719,17 +719,17 @@ class EmberApp { @return {Array} List of trees */ addonTreesFor(type) { - return this._addonTreesFor(type).map(addonBundle => addonBundle.tree); + return this._addonTreesFor(type).map((addonBundle) => addonBundle.tree); } _getDefaultPluginForType(type) { let plugins = this.registry.load(type); - let defaultsForType = plugins.filter(plugin => plugin.isDefaultForType); + let defaultsForType = plugins.filter((plugin) => plugin.isDefaultForType); if (defaultsForType.length > 1) { throw new Error( `There are multiple preprocessor plugins marked as default for '${type}': ${defaultsForType - .map(p => p.name) + .map((p) => p.name) .join(', ')}` ); } @@ -1087,14 +1087,14 @@ class EmberApp { @return {Array} An array of regular expressions. */ _podTemplatePatterns() { - return this.registry.extensionsForType('template').map(extension => `**/*/template.${extension}`); + return this.registry.extensionsForType('template').map((extension) => `**/*/template.${extension}`); } _nodeModuleTrees() { if (!this._cachedNodeModuleTrees) { this._cachedNodeModuleTrees = Array.from( this._nodeModules.values(), - module => + (module) => new Funnel(module.path, { srcDir: '/', destDir: `node_modules/${module.name}/`, @@ -1419,7 +1419,7 @@ class EmberApp { if (!Array.isArray(options.using)) { throw new Error('You must pass an array of transformations for `using` option'); } - options.using.forEach(entry => { + options.using.forEach((entry) => { if (!entry.transformation) { throw new Error( `while importing ${assetPath}: each entry in the \`using\` list must have a \`transformation\` name` @@ -1557,7 +1557,7 @@ class EmberApp { let addonBundles = this._cachedAddonBundles[type]; - let addonTrees = addonBundles.map(addonBundle => { + let addonTrees = addonBundles.map((addonBundle) => { let { name, tree, root } = addonBundle; let precompiledSource = tree; @@ -1581,8 +1581,8 @@ class EmberApp { return [tree, precompiledSource]; }); - let precompiledSource = addonTrees.map(pair => pair[1]); - addonTrees = addonTrees.map(pair => pair[0]); + let precompiledSource = addonTrees.map((pair) => pair[1]); + addonTrees = addonTrees.map((pair) => pair[0]); precompiledSource = mergeTrees(precompiledSource, { overwrite: true, diff --git a/lib/broccoli/merge-trees.js b/lib/broccoli/merge-trees.js index 301bb5cb28..3e5116a9aa 100644 --- a/lib/broccoli/merge-trees.js +++ b/lib/broccoli/merge-trees.js @@ -20,7 +20,7 @@ function getEmptyTree() { }); let originalCleanup = EMPTY_MERGE_TREE.cleanup; - EMPTY_MERGE_TREE.cleanup = function() { + EMPTY_MERGE_TREE.cleanup = function () { // this tree is being cleaned up, we must // ensure that our shared EMPTY_MERGE_TREE is // reset (otherwise it will not have a valid diff --git a/lib/cli/cli.js b/lib/cli/cli.js index 914caedfee..bbd1dbf7d2 100644 --- a/lib/cli/cli.js +++ b/lib/cli/cli.js @@ -145,7 +145,7 @@ class CLI { commandLookupCreationToken.stop(); - getOptionArgs('--verbose', commandArgs).forEach(arg => { + getOptionArgs('--verbose', commandArgs).forEach((arg) => { process.env[`EMBER_VERBOSE_${arg.toUpperCase()}`] = 'true'; }); @@ -209,7 +209,7 @@ class CLI { } } finally { instrumentation.start('shutdown'); - shutdownOnExit = function() { + shutdownOnExit = function () { instrumentation.stopAndReport('shutdown'); }; } @@ -234,7 +234,7 @@ class CLI { // This ensures that stdout is flushed so acceptance tests get full output if (process.platform === 'win32') { - return new Promise(resolve => { + return new Promise((resolve) => { setTimeout(resolve, 250, exitCode); }); } else { diff --git a/lib/cli/index.js b/lib/cli/index.js index d54517873e..61bb79407c 100644 --- a/lib/cli/index.js +++ b/lib/cli/index.js @@ -51,9 +51,7 @@ function clientId() { if (id) { return id; } else { - id = require('uuid') - .v4() - .toString(); + id = require('uuid').v4().toString(); configStore.set('client-id', id); return id; } @@ -68,7 +66,7 @@ function configureLogger(env) { } // Options: Array cliArgs, Stream inputStream, Stream outputStream, EventEmitter process -module.exports = async function(options) { +module.exports = async function (options) { // `process` should be captured before we require any libraries which // may use `process.exit` work arounds for async cleanup. willInterruptProcess.capture(options.process || process); diff --git a/lib/cli/lookup-command.js b/lib/cli/lookup-command.js index 5e8f1d1915..1ddaae044a 100644 --- a/lib/cli/lookup-command.js +++ b/lib/cli/lookup-command.js @@ -2,7 +2,7 @@ const UnknownCommand = require('../commands/unknown'); -module.exports = function(commands, commandName, commandArgs, optionHash) { +module.exports = function (commands, commandName, commandArgs, optionHash) { let options = optionHash || {}; let project = options.project; let ui = options.ui; diff --git a/lib/commands/generate.js b/lib/commands/generate.js index dd6d0a2e49..6d488abe52 100644 --- a/lib/commands/generate.js +++ b/lib/commands/generate.js @@ -103,7 +103,7 @@ module.exports = Command.extend({ let collectionsJson = []; - blueprintList.forEach(function(collection) { + blueprintList.forEach(function (collection) { let result = this.getPackageBlueprints(collection, options, singleBlueprintName); if (options.json) { let collectionJson = {}; @@ -141,7 +141,7 @@ module.exports = Command.extend({ let blueprintsJson = []; - blueprints.forEach(function(blueprint) { + blueprints.forEach(function (blueprint) { let singleMatch = singleBlueprintName === blueprint.name; if (singleMatch) { verbose = true; diff --git a/lib/commands/help.js b/lib/commands/help.js index 03b4a321e7..e1fd4e1878 100644 --- a/lib/commands/help.js +++ b/lib/commands/help.js @@ -42,7 +42,7 @@ module.exports = Command.extend({ this.ui.writeLine('Available commands in ember-cli:'); this.ui.writeLine(''); - Object.keys(this.commands).forEach(function(commandName) { + Object.keys(this.commands).forEach(function (commandName) { this._printHelpForCommand(commandName, false, commandOptions); }, this); @@ -53,7 +53,7 @@ module.exports = Command.extend({ this.ui.writeLine(''); this.ui.writeLine(`Available commands from ${addonName}:`); - Object.keys(this.commands).forEach(function(commandName) { + Object.keys(this.commands).forEach(function (commandName) { this._printHelpForCommand(commandName, false, commandOptions); }, this); }); @@ -82,7 +82,7 @@ module.exports = Command.extend({ // Iterate through each arg beyond the initial 'help' command, // and try to display usage instructions. - rawArgs.forEach(function(commandName) { + rawArgs.forEach(function (commandName) { this._printHelpForCommand(commandName, true, commandOptions); }, this); } diff --git a/lib/commands/new.js b/lib/commands/new.js index bcd8fd735d..fbc3d1335e 100644 --- a/lib/commands/new.js +++ b/lib/commands/new.js @@ -79,10 +79,10 @@ module.exports = Command.extend({ projectName, directoryName: commandOptions.directory, dryRun: commandOptions.dryRun, - }).then(opts => { + }).then((opts) => { initCommand.project.root = process.cwd(); - return initCommand.run(commandOptions, rawArgs).catch(err => { + return initCommand.run(commandOptions, rawArgs).catch((err) => { let { initialDirectory, projectDirectory } = opts; process.chdir(initialDirectory); diff --git a/lib/commands/serve.js b/lib/commands/serve.js index 367c79b139..3609931797 100644 --- a/lib/commands/serve.js +++ b/lib/commands/serve.js @@ -93,7 +93,7 @@ module.exports = Command.extend({ run(commandOptions) { commandOptions.liveReloadHost = commandOptions.liveReloadHost || commandOptions.host; - return this._checkExpressPort(commandOptions).then(commandOptions => { + return this._checkExpressPort(commandOptions).then((commandOptions) => { if (commandOptions.proxy) { if (!/^(http:|https:)/.test(commandOptions.proxy)) { let message = `You need to include a protocol with the proxy URL.${EOL}Try --proxy http://${commandOptions.proxy}`; @@ -107,7 +107,7 @@ module.exports = Command.extend({ }, _checkExpressPort(commandOptions) { - return getPort({ port: commandOptions.port, host: commandOptions.host }).then(foundPort => { + return getPort({ port: commandOptions.port, host: commandOptions.host }).then((foundPort) => { if (commandOptions.port !== foundPort && commandOptions.port !== 0) { let message = `Port ${commandOptions.port} is already in use.`; return Promise.reject(new SilentError(message)); diff --git a/lib/models/addon.js b/lib/models/addon.js index 772f70ee57..07c1d40809 100644 --- a/lib/models/addon.js +++ b/lib/models/addon.js @@ -361,7 +361,7 @@ let addonProto = { * @method findOwnAddonByName */ findOwnAddonByName(name) { - return this.addons.find(addon => addon.name === name); + return this.addons.find((addon) => addon.name === name); }, /** @@ -450,7 +450,7 @@ let addonProto = { let addonPackageList = pkgInfo.discoverAddonAddons(); this.addonPackages = pkgInfo.generateAddonPackages( addonPackageList, - addonInfo => this.shouldIncludeChildAddon && !this.shouldIncludeChildAddon(addonInfo) + (addonInfo) => this.shouldIncludeChildAddon && !this.shouldIncludeChildAddon(addonInfo) ); // in case any child addons are invalid, dump to the console about them. @@ -475,7 +475,7 @@ let addonProto = { this.discoverAddons(); this.addons = instantiateAddons(this, this.project, this.addonPackages); - this.addons.forEach(addon => logger.info('addon: %s', addon.name)); + this.addons.forEach((addon) => logger.info('addon: %s', addon.name)); }, /** @@ -692,7 +692,7 @@ let addonProto = { let cacheKeyStats = heimdall.statsFor('cache-key-for-tree'); // determine if treeFor* (or other methods for tree type) overrides for the given tree - let modifiedMethods = methodsToValidate.filter(methodName => this[methodName] !== addonProto[methodName]); + let modifiedMethods = methodsToValidate.filter((methodName) => this[methodName] !== addonProto[methodName]); if (modifiedMethods.length) { cacheKeyStats.modifiedMethods++; @@ -1024,7 +1024,7 @@ let addonProto = { let addonTemplatesRelativeToAddonPath = addonTemplatesTreeInAddonTree && addonTemplatesTreePath.replace(`${addonTreePath}/`, ''); let podTemplateMatcher = new RegExp(`template.(${templateExtensions.join('|')})$`); - let hasPodTemplates = files.some(file => { + let hasPodTemplates = files.some((file) => { // short circuit if this is actually a `addon/templates` file if (addonTemplatesTreeInAddonTree && file.indexOf(addonTemplatesRelativeToAddonPath) === 0) { return false; @@ -1034,14 +1034,14 @@ let addonProto = { }); let jsMatcher = new RegExp(`(${jsExtensions.join('|')})$`); - let hasJSFiles = files.some(file => jsMatcher.test(file)); + let hasJSFiles = files.some((file) => jsMatcher.test(file)); if (!addonTemplatesTreeInAddonTree) { files = files.concat(this._getAddonTemplatesTreeFiles()); } let extensionMatcher = new RegExp(`(${templateExtensions.join('|')})$`); - let hasTemplates = files.some(file => extensionMatcher.test(file)); + let hasTemplates = files.some((file) => extensionMatcher.test(file)); this._cachedFileSystemInfo = { hasJSFiles, @@ -1092,7 +1092,9 @@ let addonProto = { } if (this._shouldCompilePodTemplates()) { - let includePatterns = this.registry.extensionsForType('template').map(extension => `**/*/template.${extension}`); + let includePatterns = this.registry + .extensionsForType('template') + .map((extension) => `**/*/template.${extension}`); let podTemplates = new Funnel(addonTree, { include: includePatterns, @@ -1742,7 +1744,7 @@ function methodsForTreeType(treeType) { let Addon = CoreObject.extend(addonProto); -Addon.prototype[BUILD_BABEL_OPTIONS_FOR_PREPROCESSORS] = function() { +Addon.prototype[BUILD_BABEL_OPTIONS_FOR_PREPROCESSORS] = function () { let emberCLIBabelInstance = findAddonByName(this.addons, 'ember-cli-babel'); let version; if (emberCLIBabelInstance) { diff --git a/lib/models/asset-size-printer.js b/lib/models/asset-size-printer.js index 7cb41cd03a..045f9cd93d 100644 --- a/lib/models/asset-size-printer.js +++ b/lib/models/asset-size-printer.js @@ -14,10 +14,10 @@ module.exports = class AssetPrinterSize { const filesize = require('filesize'); let ui = this.ui; - return this.makeAssetSizesObject().then(files => { + return this.makeAssetSizesObject().then((files) => { if (files.length !== 0) { ui.writeLine(chalk.green('File sizes:')); - return files.forEach(file => { + return files.forEach((file) => { let sizeOutput = filesize(file.size); if (file.showGzipped) { sizeOutput += ` (${filesize(file.gzipSize)} gzipped)`; @@ -33,9 +33,9 @@ module.exports = class AssetPrinterSize { printJSON() { let ui = this.ui; - return this.makeAssetSizesObject().then(files => { + return this.makeAssetSizesObject().then((files) => { if (files.length !== 0) { - let entries = files.map(file => ({ + let entries = files.map((file) => ({ name: file.name, size: file.size, gzipSize: file.gzipSize, @@ -48,7 +48,7 @@ module.exports = class AssetPrinterSize { } makeAssetSizesObject() { - return new Promise(resolve => { + return new Promise((resolve) => { const fs = require('fs'); const zlib = require('zlib'); let gzip = util.promisify(zlib.gzip); @@ -57,14 +57,14 @@ module.exports = class AssetPrinterSize { let assets = files // Skip test files - .filter(file => { + .filter((file) => { let filename = path.basename(file); return !testFileRegex.test(filename); }) // Print human-readable file sizes (including gzipped) - .map(file => { + .map((file) => { let contentsBuffer = fs.readFileSync(file); - return gzip(contentsBuffer).then(buffer => ({ + return gzip(contentsBuffer).then((buffer) => ({ name: file, size: contentsBuffer.length, gzipSize: buffer.length, @@ -83,8 +83,8 @@ module.exports = class AssetPrinterSize { return walkSync(outputPath, { directories: false, }) - .filter(x => x.endsWith('.css') || x.endsWith('.js')) - .map(x => path.join(outputPath, x)); + .filter((x) => x.endsWith('.css') || x.endsWith('.js')) + .map((x) => path.join(outputPath, x)); } catch (e) { if (e !== null && typeof e === 'object' && e.code === 'ENOENT') { throw new Error(`No asset files found in the path provided: ${outputPath}`); diff --git a/lib/models/blueprint.js b/lib/models/blueprint.js index f1aa61d460..9449a84098 100644 --- a/lib/models/blueprint.js +++ b/lib/models/blueprint.js @@ -429,7 +429,7 @@ let Blueprint = CoreObject.extend({ let fileInfos = await process.call(this, intoDir, locals); // commit changes for each FileInfo (with prompting as needed) - await Promise.all(fileInfos.map(fi => this._commit(fi))); + await Promise.all(fileInfos.map((fi) => this._commit(fi))); // run afterInstall/afterUninstall userland hooks await afterHook.call(this, options); @@ -647,7 +647,7 @@ let Blueprint = CoreObject.extend({ generateFileMap(fileMapVariables) { let tokens = this._fileMapTokens(fileMapVariables); let fileMapValues = _.values(tokens); - let tokenValues = fileMapValues.map(token => token(fileMapVariables)); + let tokenValues = fileMapValues.map((token) => token(fileMapVariables)); let tokenKeys = Object.keys(tokens); return _.zipObject(tokenKeys, tokenValues); }, @@ -754,7 +754,7 @@ let Blueprint = CoreObject.extend({ return Promise.all(fileInfos.filter(isValidFile).map(prepareConfirm)) .then(finishProcessingForInstall) - .then(fileInfos => fileInfos.concat(fileInfosToRemove)); + .then((fileInfos) => fileInfos.concat(fileInfosToRemove)); }, /** @@ -840,9 +840,9 @@ let Blueprint = CoreObject.extend({ let moduleName = (options.entity && options.entity.name) || packageName; let sanitizedModuleName = moduleName.replace(/\//g, '-'); - return new Promise(resolve => { + return new Promise((resolve) => { resolve(this.locals(options)); - }).then(customLocals => { + }).then((customLocals) => { let fileMapVariables = this._generateFileMapVariables(moduleName, customLocals, options); let fileMap = this.generateFileMap(fileMapVariables); let standardLocals = { @@ -1042,7 +1042,7 @@ let Blueprint = CoreObject.extend({ let installText = packages.length > 1 ? 'install bower packages' : 'install bower package'; let packageNames = []; let packageNamesAndVersions = packages - .map(pkg => { + .map((pkg) => { pkg.source = pkg.source || pkg.name; packageNames.push(pkg.name); return pkg; @@ -1099,7 +1099,7 @@ let Blueprint = CoreObject.extend({ let packages = options.packages; if (packages && packages.length) { - taskOptions.packages = packages.map(pkg => { + taskOptions.packages = packages.map((pkg) => { if (typeof pkg === 'string') { return pkg; } @@ -1223,11 +1223,11 @@ let Blueprint = CoreObject.extend({ getJson(verbose) { let json = {}; - this._printableProperties.forEach(key => { + this._printableProperties.forEach((key) => { let value = this[key]; if (key === 'availableOptions') { value = _.cloneDeep(value); - value.forEach(option => { + value.forEach((option) => { if (typeof option.type === 'function') { option.type = option.type.name; } @@ -1274,7 +1274,7 @@ let Blueprint = CoreObject.extend({ matching Blueprint could not be found @return {Blueprint} */ -Blueprint.lookup = function(name, options) { +Blueprint.lookup = function (name, options) { options = options || {}; let lookupPaths = generateLookupPaths(options.paths); @@ -1301,7 +1301,7 @@ Blueprint.lookup = function(name, options) { @param {String} blueprintPath @return {Blueprint} blueprint instance */ -Blueprint.load = function(blueprintPath) { +Blueprint.load = function (blueprintPath) { if (fs.lstatSync(blueprintPath).isDirectory()) { let Constructor = Blueprint; @@ -1328,13 +1328,13 @@ Blueprint.load = function(blueprintPath) { @param {Array} [options.paths] Extra paths to search for blueprints @return {Array} */ -Blueprint.list = function(options) { +Blueprint.list = function (options) { options = options || {}; let lookupPaths = generateLookupPaths(options.paths); let seen = []; - return lookupPaths.map(lookupPath => { + return lookupPaths.map((lookupPath) => { let source; let packagePath = path.join(lookupPath, '../package.json'); if (Blueprint._existsSync(packagePath)) { @@ -1343,7 +1343,7 @@ Blueprint.list = function(options) { source = path.basename(path.join(lookupPath, '..')); } - let blueprints = dir(lookupPath).map(blueprintPath => { + let blueprints = dir(lookupPath).map((blueprintPath) => { let blueprint = Blueprint.load(blueprintPath); if (blueprint) { let name = blueprint.name; @@ -1361,11 +1361,11 @@ Blueprint.list = function(options) { }); }; -Blueprint._existsSync = function(path, parent) { +Blueprint._existsSync = function (path, parent) { return fs.existsSync(path, parent); }; -Blueprint._readdirSync = function(path) { +Blueprint._readdirSync = function (path) { return fs.readdirSync(path); }; @@ -1400,7 +1400,7 @@ Blueprint.ignoredUpdateFiles = ['.gitkeep', 'app.css', 'LICENSE.md']; @static @property defaultLookupPaths */ -Blueprint.defaultLookupPaths = function() { +Blueprint.defaultLookupPaths = function () { return [path.resolve(__dirname, '..', '..', 'blueprints')]; }; @@ -1411,7 +1411,7 @@ Blueprint.defaultLookupPaths = function() { @return {Promise} */ function prepareConfirm(info) { - return info.checkForConflict().then(resolution => { + return info.checkForConflict().then((resolution) => { info.resolution = resolution; return info; }); @@ -1460,7 +1460,7 @@ function gatherConfirmationMessages(collection, info) { function isIgnored(info) { let fn = info.inputPath; - return Blueprint.ignoredFiles.some(ignoredFile => minimatch(fn, ignoredFile, { matchBase: true })); + return Blueprint.ignoredFiles.some((ignoredFile) => minimatch(fn, ignoredFile, { matchBase: true })); } /** @@ -1492,13 +1492,13 @@ function hasPathToken(files) { } function findAddonByName(addonOrProject, name) { - let addon = addonOrProject.addons.find(addon => addon.name === name); + let addon = addonOrProject.addons.find((addon) => addon.name === name); if (addon) { return addon; } - return addonOrProject.addons.find(addon => findAddonByName(addon, name)); + return addonOrProject.addons.find((addon) => findAddonByName(addon, name)); } function ensureTargetDirIsAddon(addonPath) { @@ -1548,7 +1548,7 @@ function isFilePath(fileInfo) { */ function dir(fullPath) { if (Blueprint._existsSync(fullPath)) { - return Blueprint._readdirSync(fullPath).map(fileName => path.join(fullPath, fileName)); + return Blueprint._readdirSync(fullPath).map((fileName) => path.join(fullPath, fileName)); } else { return []; } @@ -1573,7 +1573,7 @@ function finishProcessingForInstall(infos) { } function finishProcessingForUninstall(infos) { - let validInfos = infos.filter(info => fs.existsSync(info.outputPath)); + let validInfos = infos.filter((info) => fs.existsSync(info.outputPath)); validInfos.forEach(markToBeRemoved); return validInfos; diff --git a/lib/models/builder.js b/lib/models/builder.js index 7d069dc7c9..7bf140b1fc 100644 --- a/lib/models/builder.js +++ b/lib/models/builder.js @@ -133,7 +133,7 @@ class Builder extends CoreObject { let changes = sync.sync(); - return changes.map(op => op[1]); + return changes.map((op) => op[1]); } /** diff --git a/lib/models/command.js b/lib/models/command.js index 740f4cf33d..9dec3e64af 100644 --- a/lib/models/command.js +++ b/lib/models/command.js @@ -236,7 +236,7 @@ let Command = CoreObject.extend({ return Promise.resolve() .then(() => task.run(options)) - .catch(error => { + .catch((error) => { logger.info(`An error occurred running \`${name}\` from the \`${this.name}\` command.`, error.stack); throw error; @@ -351,8 +351,8 @@ let Command = CoreObject.extend({ // TODO: warn on duplicates and overwriting mergedAliases = []; - _.map(duplicateOptions, 'aliases').map(alias => { - alias.map(a => { + _.map(duplicateOptions, 'aliases').map((alias) => { + alias.map((a) => { mergedAliases.push(a); }); }); @@ -361,7 +361,7 @@ let Command = CoreObject.extend({ mergedOption = Object.assign.apply(null, duplicateOptions); // replace aliases with unique aliases - mergedOption.aliases = _.uniqBy(mergedAliases, alias => { + mergedOption.aliases = _.uniqBy(mergedAliases, (alias) => { if (typeof alias === 'object') { return alias[Object.keys(alias)[0]]; } @@ -551,11 +551,11 @@ let Command = CoreObject.extend({ this.registerOptions(); - let assembleAndValidateOption = function(option) { + let assembleAndValidateOption = function (option) { return this.assignOption(option, parsedOptions, commandOptions); }; - let validateParsed = function(key) { + let validateParsed = function (key) { // ignore 'argv', 'h', and 'help' if (!(key in commandOptions) && key !== 'argv' && key !== 'h' && key !== 'help') { this.ui.writeLine( @@ -570,7 +570,7 @@ let Command = CoreObject.extend({ } }; - this.availableOptions.forEach(option => { + this.availableOptions.forEach((option) => { if (typeof option.type !== 'string') { knownOpts[option.name] = option.type; } else if (option.type === 'Path') { @@ -654,7 +654,7 @@ let Command = CoreObject.extend({ let json = {}; this.registerOptions(options); - this._printableProperties.forEach(key => (json[key] = this[key])); + this._printableProperties.forEach((key) => (json[key] = this[key])); if (this.addAdditionalJsonForHelp) { this.addAdditionalJsonForHelp(json, options); diff --git a/lib/models/edit-file-diff.js b/lib/models/edit-file-diff.js index 23c740ed73..8d084c7c3a 100644 --- a/lib/models/edit-file-diff.js +++ b/lib/models/edit-file-diff.js @@ -37,7 +37,7 @@ class EditFileDiff { return hash({ diffString: readFile(resultHash.diffPath), currentString: readFile(resultHash.outputPath), - }).then(result => { + }).then((result) => { let appliedDiff = jsdiff.applyPatch(result.currentString.toString(), result.diffString.toString()); if (!appliedDiff) { diff --git a/lib/models/file-info.js b/lib/models/file-info.js index 0a497eff35..df350bb859 100644 --- a/lib/models/file-info.js +++ b/lib/models/file-info.js @@ -26,7 +26,7 @@ function diffHighlight(line) { } } -const NOOP = _ => _; +const NOOP = (_) => _; class FileInfo { constructor(options) { this.action = options.action; @@ -68,7 +68,7 @@ class FileInfo { } } - return this.ui.prompt(promptOptions).then(response => response.answer); + return this.ui.prompt(promptOptions).then((response) => response.answer); } displayDiff() { @@ -77,7 +77,7 @@ class FileInfo { return hash({ input: this.render(), output: readFile(info.outputPath), - }).then(result => { + }).then((result) => { let diff = jsdiff.createPatch( info.outputPath, result.output.toString().replace(rxEOL, '\n'), @@ -104,8 +104,8 @@ class FileInfo { let path = this.inputPath; let context = this.templateVariables; - return readFile(path).then(content => - lstat(path).then(fileStat => { + return readFile(path).then((content) => + lstat(path).then((fileStat) => { if (isBinaryFile(content, fileStat.size)) { return content; } else { @@ -121,16 +121,16 @@ class FileInfo { } checkForConflict() { - return this.render().then(input => { + return this.render().then((input) => { input = input.toString().replace(rxEOL, '\n'); return readFile(this.outputPath) - .then(output => { + .then((output) => { output = output.toString().replace(rxEOL, '\n'); return input === output ? 'identical' : 'confirm'; }) - .catch(e => { + .catch((e) => { if (e.code === 'ENOENT') { return 'none'; } @@ -143,9 +143,9 @@ class FileInfo { confirmOverwriteTask() { let info = this; - return function() { + return function () { function doConfirm() { - return info.confirmOverwrite(info.displayPath).then(action => { + return info.confirmOverwrite(info.displayPath).then((action) => { if (action === 'diff') { return info.displayDiff().then(doConfirm); } else if (action === 'edit') { diff --git a/lib/models/hardware-info.js b/lib/models/hardware-info.js index a2338fc32c..49406df6e7 100644 --- a/lib/models/hardware-info.js +++ b/lib/models/hardware-info.js @@ -10,7 +10,7 @@ function isUsingBatteryAcpi() { const { stdout } = execa.sync('acpi', ['--ac-adapter']); const lines = stdout.split('\n').filter(Boolean); - return lines.every(line => /off-line/.test(line)); + return lines.every((line) => /off-line/.test(line)); } catch (ex) { logger.warn(`Could not get battery status from acpi: ${ex}`); logger.warn(ex.stack); @@ -89,7 +89,7 @@ function isUsingBatteryUpower() { const { stdout } = execa.sync('upower', ['--enumerate']); const devices = stdout.split('\n').filter(Boolean); - return devices.some(device => { + return devices.some((device) => { const { stdout } = execa.sync('upower', ['--show-info', device]); return /\bpower supply:\s+yes\b/.test(stdout) && /\bstate:\s+discharging\b/.test(stdout); diff --git a/lib/models/instantiate-addons.js b/lib/models/instantiate-addons.js index 24f3b79eb2..e48d422617 100644 --- a/lib/models/instantiate-addons.js +++ b/lib/models/instantiate-addons.js @@ -41,7 +41,7 @@ function instantiateAddons(parent, project, addonPackages) { let graph = new DAGMap(); let addonInfo, emberAddonConfig; - addonNames.forEach(name => { + addonNames.forEach((name) => { addonInfo = addonPackages[name]; emberAddonConfig = addonInfo.pkg['ember-addon']; @@ -98,7 +98,7 @@ function instantiateAddons(parent, project, addonPackages) { logger.info( ' addon info %o', - addons.map(addon => ({ + addons.map((addon) => ({ name: addon.name, times: { initialize: addon.constructor._meta_.initializeIn, diff --git a/lib/models/instrumentation.js b/lib/models/instrumentation.js index 4e5b946c0a..3ae48cdc0e 100644 --- a/lib/models/instrumentation.js +++ b/lib/models/instrumentation.js @@ -26,7 +26,7 @@ _enableFSMonitorIfInstrumentationEnabled(); function _getHardwareInfo(platform) { const startTime = process.hrtime(); - Object.getOwnPropertyNames(hwinfo).forEach(metric => (platform[metric] = hwinfo[metric]())); + Object.getOwnPropertyNames(hwinfo).forEach((metric) => (platform[metric] = hwinfo[metric]())); const collectionTime = process.hrtime(startTime); @@ -211,7 +211,7 @@ class Instrumentation { _invokeAddonHook(name, instrumentationInfo) { if (this.project && this.project.addons.length) { - this.project.addons.forEach(addon => { + this.project.addons.forEach((addon) => { if (typeof addon.instrumentation === 'function') { addon.instrumentation(name, instrumentationInfo); } diff --git a/lib/models/package-info-cache/index.js b/lib/models/package-info-cache/index.js index 3b8b340be2..1e307e0552 100644 --- a/lib/models/package-info-cache/index.js +++ b/lib/models/package-info-cache/index.js @@ -55,7 +55,7 @@ class PackageInfoCache { hasErrors() { let paths = Object.keys(this.entries); - if (paths.find(entryPath => this.getEntry(entryPath).hasErrors())) { + if (paths.find((entryPath) => this.getEntry(entryPath).hasErrors())) { return true; } @@ -72,7 +72,7 @@ class PackageInfoCache { showErrors() { let paths = Object.keys(this.entries).sort(); - paths.forEach(entryPath => { + paths.forEach((entryPath) => { this._showObjErrors(this.getEntry(entryPath)); }); } @@ -110,7 +110,7 @@ class PackageInfoCache { rootPath = obj.realPath; } - errorEntries.forEach(errorEntry => { + errorEntries.forEach((errorEntry) => { switch (errorEntry.type) { case Errors.ERROR_PACKAGE_JSON_MISSING: logger.info(` does not exist`); @@ -131,7 +131,7 @@ class PackageInfoCache { logger.info(` specifies a missing dependency '${errorEntry.data[0]}'`); } else { logger.info(` specifies some missing dependencies:`); - errorEntry.data.forEach(dependencyName => { + errorEntry.data.forEach((dependencyName) => { logger.info(` ${dependencyName}`); }); } @@ -187,7 +187,7 @@ class PackageInfoCache { // create a PackageInfo unless there is really a directory at the // suggested location. The created addon may internally have errors, // as with any other PackageInfo. - projectInstance.supportedInternalAddonPaths().forEach(internalAddonPath => { + projectInstance.supportedInternalAddonPaths().forEach((internalAddonPath) => { if (getRealDirectoryPath(internalAddonPath)) { logger.info('Reading package for internal addon: %o', internalAddonPath); pkgInfo.addInternalAddon(this._readPackage(internalAddonPath)); @@ -222,7 +222,7 @@ class PackageInfoCache { reloadProjects() { let projects = this.projects.slice(); this._clear(); - projects.forEach(project => this.loadProject(project)); + projects.forEach((project) => this.loadProject(project)); } /** @@ -274,7 +274,7 @@ class PackageInfoCache { logger.info('Resolving dependencies...'); let packageInfos = this._getPackageInfos(); - packageInfos.forEach(pkgInfo => { + packageInfos.forEach((pkgInfo) => { if (!pkgInfo.processed) { let pkgs = pkgInfo.addDependencies(pkgInfo.pkg.dependencies); if (pkgs) { @@ -331,7 +331,7 @@ class PackageInfoCache { _getPackageInfos() { let result = []; - Object.keys(this.entries).forEach(path => { + Object.keys(this.entries).forEach((path) => { let entry = this.entries[path]; if (entry instanceof PackageInfo) { result.push(entry); @@ -549,7 +549,7 @@ class PackageInfoCache { let paths = emberAddonInfo.paths; if (paths) { - paths.forEach(p => { + paths.forEach((p) => { let addonPath = path.join(realPath, p); // real path, though may not exist. logger.info('Adding in-repo-addon at %o', addonPath); let addonPkgInfo = this._readPackage(addonPath); // may have errors in the addon package. @@ -636,7 +636,7 @@ class PackageInfoCache { logger.info('Creating new NodeModulesList instance for %o', realPath); nodeModulesList = new NodeModulesList(realPath, this); - const entries = fs.readdirSync(realPath).filter(fileName => { + const entries = fs.readdirSync(realPath).filter((fileName) => { if (fileName.startsWith('.') || fileName.startsWith('_')) { // we explicitly want to ignore these, according to the // definition of a valid package name. @@ -651,7 +651,7 @@ class PackageInfoCache { } }); // should not fail because getRealDirectoryPath passed - entries.forEach(entryName => { + entries.forEach((entryName) => { // entries should be either a package or a scoping directory. I think // there can also be files, but we'll ignore those. diff --git a/lib/models/package-info-cache/package-info.js b/lib/models/package-info-cache/package-info.js index dca22a3645..d7863d4a4e 100644 --- a/lib/models/package-info-cache/package-info.js +++ b/lib/models/package-info-cache/package-info.js @@ -189,7 +189,7 @@ class PackageInfo { let missingDependencies = []; - dependencyNames.forEach(dependencyName => { + dependencyNames.forEach((dependencyName) => { logger.info('%s: Trying to find dependency %o', this.pkg.name, dependencyName); let dependencyPackage; @@ -244,13 +244,13 @@ class PackageInfo { let result = []; if (Array.isArray(packageInfoList)) { if (excludeFn) { - packageInfoList = packageInfoList.filter(pkgInfo => !excludeFn(pkgInfo)); + packageInfoList = packageInfoList.filter((pkgInfo) => !excludeFn(pkgInfo)); } - packageInfoList.forEach(pkgInfo => result.push(pkgInfo)); + packageInfoList.forEach((pkgInfo) => result.push(pkgInfo)); } else { // We're going to assume we have a map of name to packageInfo - Object.keys(packageInfoList).forEach(name => { + Object.keys(packageInfoList).forEach((name) => { let pkgInfo = packageInfoList[name]; if (!excludeFn || !excludeFn(pkgInfo)) { result.push(pkgInfo); @@ -258,7 +258,7 @@ class PackageInfo { }); } - result.sort(lexicographically).forEach(pkgInfo => pushUnique(addonPackageList, pkgInfo)); + result.sort(lexicographically).forEach((pkgInfo) => pushUnique(addonPackageList, pkgInfo)); return addonPackageList; } @@ -274,7 +274,7 @@ class PackageInfo { this.addPackages( addonPackageList, this.dependencyPackages, - pkgInfo => !pkgInfo.isAddon() || pkgInfo.name === 'ember-cli' + (pkgInfo) => !pkgInfo.isAddon() || pkgInfo.name === 'ember-cli' ); this.addPackages(addonPackageList, this.inRepoAddons); @@ -294,8 +294,8 @@ class PackageInfo { this.addPackages(addonPackageList, project.isEmberCLIAddon() ? [this] : null); this.addPackages(addonPackageList, this.cliInfo ? this.cliInfo.inRepoAddons : null); this.addPackages(addonPackageList, this.internalAddons); - this.addPackages(addonPackageList, this.devDependencyPackages, pkgInfo => !pkgInfo.isAddon()); - this.addPackages(addonPackageList, this.dependencyPackages, pkgInfo => !pkgInfo.isAddon()); + this.addPackages(addonPackageList, this.devDependencyPackages, (pkgInfo) => !pkgInfo.isAddon()); + this.addPackages(addonPackageList, this.dependencyPackages, (pkgInfo) => !pkgInfo.isAddon()); this.addPackages(addonPackageList, this.inRepoAddons); return addonPackageList; @@ -317,7 +317,7 @@ class PackageInfo { let packageMap = Object.create(null); - validPackages.forEach(pkgInfo => { + validPackages.forEach((pkgInfo) => { let addonInfo = new AddonInfo(pkgInfo.name, pkgInfo.realPath, pkgInfo.pkg); if (!excludeFn || !excludeFn(addonInfo)) { packageMap[pkgInfo.name] = addonInfo; @@ -328,11 +328,11 @@ class PackageInfo { } getValidPackages(addonPackageList) { - return addonPackageList.filter(pkgInfo => pkgInfo.valid); + return addonPackageList.filter((pkgInfo) => pkgInfo.valid); } getInvalidPackages(addonPackageList) { - return addonPackageList.filter(pkgInfo => !pkgInfo.valid); + return addonPackageList.filter((pkgInfo) => !pkgInfo.valid); } dumpInvalidAddonPackages(addonPackageList) { @@ -354,7 +354,7 @@ class PackageInfo { msg = `${msg}\n specifies an invalid, malformed or missing addon at relative path '${relativePath}'`; } else { msg = `${msg}\n specifies invalid, malformed or missing addons at relative paths`; - invalidPackages.forEach(packageInfo => { + invalidPackages.forEach((packageInfo) => { let relativePath = path.relative(this.realPath, packageInfo.realPath); msg = `${msg}\n '${relativePath}'`; }); diff --git a/lib/models/project.js b/lib/models/project.js index bd567465bc..ec35a9cc02 100644 --- a/lib/models/project.js +++ b/lib/models/project.js @@ -154,15 +154,15 @@ class Project { NULL_PROJECT = new Project(processCwd, {}, ui, cli); - NULL_PROJECT.isEmberCLIProject = function() { + NULL_PROJECT.isEmberCLIProject = function () { return false; }; - NULL_PROJECT.isEmberCLIAddon = function() { + NULL_PROJECT.isEmberCLIAddon = function () { return false; }; - NULL_PROJECT.name = function() { + NULL_PROJECT.name = function () { return path.basename(process.cwd()); }; @@ -455,7 +455,7 @@ class Project { this.discoverAddons(); this.addons = instantiateAddons(this, this, this.addonPackages); - this.addons.forEach(addon => logger.info('addon: %s', addon.name)); + this.addons.forEach((addon) => logger.info('addon: %s', addon.name)); } /** @@ -469,7 +469,7 @@ class Project { addonCommands() { const Command = require('../models/command'); let commands = Object.create(null); - this.addons.forEach(addon => { + this.addons.forEach((addon) => { if (!addon.includedCommands) { return; } diff --git a/lib/models/watcher.js b/lib/models/watcher.js index 68f909e54b..38d8416ccc 100644 --- a/lib/models/watcher.js +++ b/lib/models/watcher.js @@ -86,13 +86,13 @@ module.exports = class Watcher extends CoreObject { _totalTime(hash) { const sumNodes = (node, cb) => { let total = 0; - node.visitPreOrder(node => { + node.visitPreOrder((node) => { total += cb(node); }); return total; }; - return sumNodes(hash.graph.__heimdall__, node => node.stats.time.self); + return sumNodes(hash.graph.__heimdall__, (node) => node.stats.time.self); } didError(error) { diff --git a/lib/tasks/bower-install.js b/lib/tasks/bower-install.js index 93c387d46e..e4f6a1e6b6 100644 --- a/lib/tasks/bower-install.js +++ b/lib/tasks/bower-install.js @@ -32,14 +32,14 @@ class BowerInstallTask extends Task { } return this.resolveBower() - .catch(error => { + .catch((error) => { if (error.message.indexOf("Cannot find module 'bower'") === -1) { throw error; } return this.installBower().then(() => this.resolveBower()); }) - .then(bowerPath => this.importBower(bowerPath)); + .then((bowerPath) => this.importBower(bowerPath)); } installBower() { @@ -52,7 +52,7 @@ class BowerInstallTask extends Task { return execa('npm', ['install', 'bower@^1.3.12'], { cwd: cliPath }) .finally(() => ui.stopProgress()) - .catch(error => this.handleInstallBowerError(error)) + .catch((error) => this.handleInstallBowerError(error)) .then(() => ui.writeLine(chalk.green('npm: Installed bower'))); } diff --git a/lib/tasks/generate-from-blueprint.js b/lib/tasks/generate-from-blueprint.js index af939ab392..45ab47d74a 100644 --- a/lib/tasks/generate-from-blueprint.js +++ b/lib/tasks/generate-from-blueprint.js @@ -64,7 +64,7 @@ class GenerateTask extends Task { await mainBlueprint[this.blueprintFunction](blueprintOptions); if (testBlueprint) { if (testBlueprint.locals === Blueprint.prototype.locals) { - testBlueprint.locals = function(options) { + testBlueprint.locals = function (options) { return mainBlueprint.locals(options); }; } @@ -81,7 +81,7 @@ class GenerateTask extends Task { } if (addonBlueprint.locals === Blueprint.prototype.locals) { - addonBlueprint.locals = function(options) { + addonBlueprint.locals = function (options) { return mainBlueprint.locals(options); }; } diff --git a/lib/tasks/install-blueprint.js b/lib/tasks/install-blueprint.js index 432ff286c3..43b1acade1 100644 --- a/lib/tasks/install-blueprint.js +++ b/lib/tasks/install-blueprint.js @@ -43,7 +43,7 @@ class InstallBlueprintTask extends Task { installOptions = merge(installOptions, options || {}); - return this._resolveBlueprint(blueprintOption).then(blueprint => { + return this._resolveBlueprint(blueprintOption).then((blueprint) => { logger.info(`Installing blueprint into "${target}" ...`); return blueprint.install(installOptions); }); @@ -53,7 +53,7 @@ class InstallBlueprintTask extends Task { name = name || 'app'; logger.info(`Resolving blueprint "${name}" ...`); - return this._lookupLocalBlueprint(name).catch(error => this._handleLocalLookupFailure(name, error)); + return this._lookupLocalBlueprint(name).catch((error) => this._handleLocalLookupFailure(name, error)); } _lookupLocalBlueprint(name) { diff --git a/lib/tasks/npm-task.js b/lib/tasks/npm-task.js index aecfe8e48b..87c0db76af 100644 --- a/lib/tasks/npm-task.js +++ b/lib/tasks/npm-task.js @@ -44,11 +44,11 @@ class NpmTask extends Task { checkYarn() { return this.yarn(['--version']) - .then(result => { + .then((result) => { let version = result.stdout; logger.info('yarn --version: %s', version); }) - .catch(error => { + .catch((error) => { logger.error('yarn --version failed: %s', error); throw error; }); @@ -56,7 +56,7 @@ class NpmTask extends Task { checkNpmVersion() { return this.npm(['--version']) - .then(result => { + .then((result) => { let version = result.stdout; logger.info('npm --version: %s', version); @@ -80,7 +80,7 @@ class NpmTask extends Task { return { npmVersion: version }; }) - .catch(error => { + .catch((error) => { logger.error('npm --version failed: %s', error); if (error.code === 'ENOENT') { @@ -112,7 +112,7 @@ class NpmTask extends Task { if (this.useYarn === true) { logger.info('yarn requested -> trying yarn'); - return this.checkYarn().catch(error => { + return this.checkYarn().catch((error) => { if (error.code === 'ENOENT') { throw new SilentError('Yarn could not be found.'); } @@ -146,7 +146,7 @@ class NpmTask extends Task { run(options) { this.useYarn = options.useYarn; - return this.findPackageManager().then(result => { + return this.findPackageManager().then((result) => { let ui = this.ui; let startMessage = this.formatStartMessage(options.packages); let completeMessage = this.formatCompleteMessage(options.packages); diff --git a/lib/tasks/server/express-server.js b/lib/tasks/server/express-server.js index 665f3d3394..856cc283da 100644 --- a/lib/tasks/server/express-server.js +++ b/lib/tasks/server/express-server.js @@ -19,7 +19,7 @@ class ExpressServerTask extends Task { this.https = this.https || require('https'); let serverRestartDelayTime = this.serverRestartDelayTime || 100; - this.scheduleServerRestart = debounce(function() { + this.scheduleServerRestart = debounce(function () { this.restartHttpServer(); }, serverRestartDelayTime); } @@ -51,7 +51,7 @@ class ExpressServerTask extends Task { // when we need to restart. this.sockets = {}; this.nextSocketId = 0; - this.httpServer.on('connection', socket => { + this.httpServer.on('connection', (socket) => { let socketId = this.nextSocketId++; this.sockets[socketId] = socket; @@ -102,7 +102,7 @@ class ExpressServerTask extends Task { return mapSeries( this.project.addons, - function(addon) { + function (addon) { if (addon.serverMiddleware) { return addon.serverMiddleware({ app: this.app, @@ -166,7 +166,7 @@ class ExpressServerTask extends Task { this.ui.writeLine(chalk.green('Server restarted.')); this.ui.writeLine(''); }) - .catch(err => { + .catch((err) => { this.ui.writeError(err); }) .finally(() => { @@ -184,7 +184,7 @@ class ExpressServerTask extends Task { if (!this.httpServer) { return resolve(); } - this.httpServer.close(err => { + this.httpServer.close((err) => { if (err) { reject(err); return; diff --git a/lib/tasks/server/livereload-server.js b/lib/tasks/server/livereload-server.js index ade03118ea..8eb2c36bf6 100644 --- a/lib/tasks/server/livereload-server.js +++ b/lib/tasks/server/livereload-server.js @@ -69,7 +69,7 @@ module.exports = class LiveReloadServer { if (options.liveReload) { if (options.liveReloadPort && options.port !== options.liveReloadPort) { - return this.createServerforCustomPort(options, Server).catch(error => { + return this.createServerforCustomPort(options, Server).catch((error) => { if (error !== null && typeof error === 'object' && error.code === 'EADDRINUSE') { let url = `http${options.ssl ? 's' : ''}://${this.displayHost(options.liveReloadHost)}:${ options.liveReloadPort @@ -94,7 +94,7 @@ module.exports = class LiveReloadServer { // Reload on file changes this.watcher.on( 'change', - function() { + function () { try { this.didChange.apply(this, arguments); } catch (e) { @@ -141,7 +141,7 @@ module.exports = class LiveReloadServer { createServerforCustomPort(options, Server) { let instance; - Server.prototype.error = function() { + Server.prototype.error = function () { instance.error.apply(instance, arguments); }; let serverOptions = { @@ -184,7 +184,7 @@ module.exports = class LiveReloadServer { if (this.project.liveReloadFilterPatterns.length > 0) { let filePath = path.relative(this.project.root, options.filePath || ''); - result = this.project.liveReloadFilterPatterns.every(pattern => pattern.test(filePath) === false); + result = this.project.liveReloadFilterPatterns.every((pattern) => pattern.test(filePath) === false); if (result === false) { this.writeSkipBanner(filePath); diff --git a/lib/tasks/server/middleware/broccoli-watcher/index.js b/lib/tasks/server/middleware/broccoli-watcher/index.js index 3f474ff650..03669a9930 100644 --- a/lib/tasks/server/middleware/broccoli-watcher/index.js +++ b/lib/tasks/server/middleware/broccoli-watcher/index.js @@ -46,7 +46,7 @@ class WatcherAddon { // Find asset and set response headers, if no file has been found, reset url for proxy stuff // that comes afterwards - middleware(req, res, err => { + middleware(req, res, (err) => { req.url = oldURL; if (err) { logger.error('err', err); diff --git a/lib/tasks/server/middleware/proxy-server/index.js b/lib/tasks/server/middleware/proxy-server/index.js index 75dddc3a12..917a6d1866 100644 --- a/lib/tasks/server/middleware/proxy-server/index.js +++ b/lib/tasks/server/middleware/proxy-server/index.js @@ -26,7 +26,7 @@ class ProxyServerAddon { timeout: options.proxyInTimeout, }); - proxy.on('error', e => { + proxy.on('error', (e) => { options.ui.writeLine(`Error proxying to ${options.proxy}`); options.ui.writeError(e); }); diff --git a/lib/utilities/clean-remove.js b/lib/utilities/clean-remove.js index 2d81c53440..1310df4192 100644 --- a/lib/utilities/clean-remove.js +++ b/lib/utilities/clean-remove.js @@ -10,11 +10,11 @@ function cleanRemove(fileInfo) { .stat(fileInfo.outputPath) .then(() => fs.remove(fileInfo.outputPath)) .then(() => { - let paths = walkUp(fileInfo.displayPath).map(thePath => path.join(fileInfo.outputBasePath, thePath)); + let paths = walkUp(fileInfo.displayPath).map((thePath) => path.join(fileInfo.outputBasePath, thePath)); return paths.reduce( (chainedPromise, thePath) => - chainedPromise.then(wasShortCircuited => { + chainedPromise.then((wasShortCircuited) => { if (wasShortCircuited) { // optimization that says since my child dir wasn't empty, // I can't be empty, so keep skipping @@ -22,7 +22,7 @@ function cleanRemove(fileInfo) { } // get list of files remaining in this dir - return fs.readdir(thePath).then(paths => { + return fs.readdir(thePath).then((paths) => { if (paths.length) { // don't check parent dirs since this one isn't empty return true; @@ -34,7 +34,7 @@ function cleanRemove(fileInfo) { Promise.resolve() ); }) - .catch(err => { + .catch((err) => { if (err.code !== 'ENOENT') { throw err; } diff --git a/lib/utilities/deprecate.js b/lib/utilities/deprecate.js index 4906bd5784..6309970e4b 100644 --- a/lib/utilities/deprecate.js +++ b/lib/utilities/deprecate.js @@ -2,7 +2,7 @@ const chalk = require('chalk'); -module.exports = function(message, test) { +module.exports = function (message, test) { if (test) { console.log(chalk.yellow(`DEPRECATION: ${message}`)); } diff --git a/lib/utilities/execa.js b/lib/utilities/execa.js index 0b22b6610f..e09568a416 100644 --- a/lib/utilities/execa.js +++ b/lib/utilities/execa.js @@ -5,13 +5,13 @@ const logger = require('heimdalljs-logger')('ember-cli:execa'); function _execa(cmd, args, opts) { logger.info('execa(%j, %j)', cmd, args); - return Promise.resolve(execa(cmd, args, opts)).then(result => { + return Promise.resolve(execa(cmd, args, opts)).then((result) => { logger.info('execa(%j, %j) -> code: %d', cmd, args, result.code); return result; }); } -_execa.sync = function(cmd, args, opts) { +_execa.sync = function (cmd, args, opts) { logger.info('execa.sync(%j, %j)', cmd, args); let result = execa.sync(cmd, args, opts); logger.info('execa.sync(%j, %j) -> code: %d', cmd, args, result.code); diff --git a/lib/utilities/find-addon-by-name.js b/lib/utilities/find-addon-by-name.js index 56ecbef096..be5098b06b 100644 --- a/lib/utilities/find-addon-by-name.js +++ b/lib/utilities/find-addon-by-name.js @@ -29,13 +29,13 @@ let HAS_FOUND_ADDON_BY_UNSCOPED_NAME = Object.create(null); */ module.exports = function findAddonByName(addons, name) { let unscopedName = unscope(name); - let exactMatchFromPkg = addons.find(addon => addon.pkg && addon.pkg.name === name); + let exactMatchFromPkg = addons.find((addon) => addon.pkg && addon.pkg.name === name); if (exactMatchFromPkg) { return exactMatchFromPkg; } - let exactMatchFromIndex = addons.find(addon => addon.name === name); + let exactMatchFromIndex = addons.find((addon) => addon.name === name); if (exactMatchFromIndex) { let pkg = exactMatchFromIndex.pkg; @@ -51,7 +51,7 @@ module.exports = function findAddonByName(addons, name) { return exactMatchFromIndex; } - let unscopedMatchFromIndex = addons.find(addon => addon.name && unscope(addon.name) === unscopedName); + let unscopedMatchFromIndex = addons.find((addon) => addon.name && unscope(addon.name) === unscopedName); if (unscopedMatchFromIndex) { if (HAS_FOUND_ADDON_BY_UNSCOPED_NAME[name] !== true) { HAS_FOUND_ADDON_BY_UNSCOPED_NAME[name] = true; @@ -66,7 +66,7 @@ module.exports = function findAddonByName(addons, name) { return null; }; -module.exports._clearCaches = function() { +module.exports._clearCaches = function () { HAS_FOUND_ADDON_BY_NAME = Object.create(null); HAS_FOUND_ADDON_BY_UNSCOPED_NAME = Object.create(null); }; diff --git a/lib/utilities/find-build-file.js b/lib/utilities/find-build-file.js index eb3f497326..1357bbd7e9 100644 --- a/lib/utilities/find-build-file.js +++ b/lib/utilities/find-build-file.js @@ -2,7 +2,7 @@ const findUp = require('find-up'); const path = require('path'); -module.exports = function(file, dir) { +module.exports = function (file, dir) { let buildFilePath = findUp.sync(file, { cwd: dir }); // Note: In the future this should throw diff --git a/lib/utilities/get-option-args.js b/lib/utilities/get-option-args.js index 2442228d06..34198cecef 100644 --- a/lib/utilities/get-option-args.js +++ b/lib/utilities/get-option-args.js @@ -1,6 +1,6 @@ 'use strict'; -module.exports = function(option, commandArgs) { +module.exports = function (option, commandArgs) { let results = [], value, i; diff --git a/lib/utilities/get-package-base-name.js b/lib/utilities/get-package-base-name.js index bd6b6ceaf8..3ff984a76a 100644 --- a/lib/utilities/get-package-base-name.js +++ b/lib/utilities/get-package-base-name.js @@ -2,7 +2,7 @@ const npa = require('npm-package-arg'); -module.exports = function(name) { +module.exports = function (name) { if (!name) { return null; } diff --git a/lib/utilities/get-serve-url.js b/lib/utilities/get-serve-url.js index 0c7165a429..4c80000841 100644 --- a/lib/utilities/get-serve-url.js +++ b/lib/utilities/get-serve-url.js @@ -2,7 +2,7 @@ const cleanBaseURL = require('clean-base-url'); -module.exports = function(options, project) { +module.exports = function (options, project) { let config = project.config(options.environment); let baseURL = config.rootURL === '' ? '/' : cleanBaseURL(config.rootURL || config.baseURL || '/'); diff --git a/lib/utilities/heimdall-progress.js b/lib/utilities/heimdall-progress.js index ee9eb7702b..a47864f878 100644 --- a/lib/utilities/heimdall-progress.js +++ b/lib/utilities/heimdall-progress.js @@ -9,11 +9,11 @@ module.exports = function progress(heimdalljs = require('heimdalljs')) { } return stack - .filter(name => name !== 'heimdall') + .filter((name) => name !== 'heimdall') .reverse() .join(' > '); }; -module.exports.format = function(text) { +module.exports.format = function (text) { return require('chalk').green('building... ') + (text ? `[${text}]` : ''); }; diff --git a/lib/utilities/json-generator.js b/lib/utilities/json-generator.js index d77615fff9..6501685398 100644 --- a/lib/utilities/json-generator.js +++ b/lib/utilities/json-generator.js @@ -29,7 +29,7 @@ class JsonGenerator { json.commands = []; json.addons = []; - Object.keys(this.commands).forEach(function(commandName) { + Object.keys(this.commands).forEach(function (commandName) { this._addCommandHelpToJson(commandName, commandOptions, json); }, this); @@ -41,7 +41,7 @@ class JsonGenerator { addonJson.commands = []; json.addons.push(addonJson); - Object.keys(this.commands).forEach(function(commandName) { + Object.keys(this.commands).forEach(function (commandName) { this._addCommandHelpToJson(commandName, commandOptions, addonJson); }, this); }); diff --git a/lib/utilities/markdown-color.js b/lib/utilities/markdown-color.js index cc5c11e8c7..d7cb59fcf1 100644 --- a/lib/utilities/markdown-color.js +++ b/lib/utilities/markdown-color.js @@ -74,7 +74,7 @@ class MarkdownColor { let styles = Object.keys(this.tokens); input = input.replace(/^/gm, indent); - styles.reverse().map(style => { + styles.reverse().map((style) => { input = input.replace(this.tokens[style].pattern, this.tokens[style].render); }); input = input.replace(/~\^(.*)~\^/g, escapeToken); @@ -128,7 +128,7 @@ class MarkdownColor { styles = [checkStyleName(renderer, styleNames)]; } - return function(match, pattern) { + return function (match, pattern) { return styles.reverse().reduce((previous, current) => renderer[current](previous), pattern); }; } diff --git a/lib/utilities/merge-blueprint-options.js b/lib/utilities/merge-blueprint-options.js index 1420638b0b..fc240e8fd0 100644 --- a/lib/utilities/merge-blueprint-options.js +++ b/lib/utilities/merge-blueprint-options.js @@ -14,7 +14,7 @@ const Blueprint = require('../models/blueprint'); * beforeRun: mergeBlueprintOptions * }) */ -module.exports = function(rawArgs) { +module.exports = function (rawArgs) { if (rawArgs.length === 0) { return; } diff --git a/lib/utilities/open-editor.js b/lib/utilities/open-editor.js index 2fa869fd56..99260ff34c 100644 --- a/lib/utilities/open-editor.js +++ b/lib/utilities/open-editor.js @@ -17,7 +17,7 @@ function openEditor(file) { let editProcess = openEditor._spawn(editor, args, { stdio: 'inherit' }); return new Promise((resolve, reject) => { - editProcess.on('close', code => { + editProcess.on('close', (code) => { if (code === 0) { resolve(); } else { @@ -29,15 +29,15 @@ function openEditor(file) { }); } -openEditor.canEdit = function() { +openEditor.canEdit = function () { return openEditor._env().EDITOR !== undefined; }; -openEditor._env = function() { +openEditor._env = function () { return process.env; }; -openEditor._spawn = function() { +openEditor._spawn = function () { return spawn.apply(this, arguments); }; diff --git a/lib/utilities/platform-checker.js b/lib/utilities/platform-checker.js index 65b4bd66bf..5234cc75dd 100644 --- a/lib/utilities/platform-checker.js +++ b/lib/utilities/platform-checker.js @@ -10,7 +10,7 @@ const nodeVersions = new Set(); for (let jobName in ci.jobs) { let job = ci.jobs[jobName]; - job.steps.forEach(step => { + job.steps.forEach((step) => { let isSetupNode = step.uses === 'actions/setup-node@v1'; if (isSetupNode && step.with['node-version'].includes('${{') === false) { nodeVersions.add(step.with['node-version']); @@ -18,7 +18,7 @@ for (let jobName in ci.jobs) { }); if (job.strategy && job.strategy.matrix && job.strategy.matrix['node-version']) { - job.strategy.matrix['node-version'].forEach(version => nodeVersions.add(version)); + job.strategy.matrix['node-version'].forEach((version) => nodeVersions.add(version)); } } diff --git a/lib/utilities/print-command.js b/lib/utilities/print-command.js index 9230c8232c..436348a75b 100644 --- a/lib/utilities/print-command.js +++ b/lib/utilities/print-command.js @@ -3,7 +3,7 @@ const chalk = require('chalk'); const EOL = require('os').EOL; -module.exports = function(initialMargin, shouldDescriptionBeGrey) { +module.exports = function (initialMargin, shouldDescriptionBeGrey) { initialMargin = initialMargin || ''; let output = ''; @@ -14,7 +14,7 @@ module.exports = function(initialMargin, shouldDescriptionBeGrey) { if (options.length) { output += ` ${chalk.yellow( options - .map(option => { + .map((option) => { // blueprints we insert brackets, commands already have them if (option.indexOf('<') === 0) { return option; @@ -44,12 +44,12 @@ module.exports = function(initialMargin, shouldDescriptionBeGrey) { // aliases: a b c if (this.aliases && this.aliases.length) { - output += `${EOL + initialMargin} ${chalk.grey(`aliases: ${this.aliases.filter(a => a).join(', ')}`)}`; + output += `${EOL + initialMargin} ${chalk.grey(`aliases: ${this.aliases.filter((a) => a).join(', ')}`)}`; } // --available-option (Required) (Default: value) // ... - options.forEach(option => { + options.forEach((option) => { output += `${EOL + initialMargin} ${chalk.cyan(`--${option.name}`)}`; if (option.values) { @@ -77,7 +77,7 @@ module.exports = function(initialMargin, shouldDescriptionBeGrey) { if (option.aliases && option.aliases.length) { output += `${EOL + initialMargin} ${chalk.grey( `aliases: ${option.aliases - .map(a => { + .map((a) => { if (typeof a === 'string') { return (a.length > 4 ? '--' : '-') + a + (option.type === Boolean ? '' : ' '); } else { diff --git a/lib/utilities/will-interrupt-process.js b/lib/utilities/will-interrupt-process.js index 65d3a77162..748d670bd9 100644 --- a/lib/utilities/will-interrupt-process.js +++ b/lib/utilities/will-interrupt-process.js @@ -165,7 +165,7 @@ function trapWindowsSignals(_process) { // This is required to capture Ctrl + C on Windows stdin.setRawMode(true); - windowsCtrlCTrap = function(data) { + windowsCtrlCTrap = function (data) { if (data.length === 1 && data[0] === 0x03) { _process.emit('SIGINT'); } diff --git a/lib/utilities/windows-admin.js b/lib/utilities/windows-admin.js index 7348d22c44..c1a305c48e 100644 --- a/lib/utilities/windows-admin.js +++ b/lib/utilities/windows-admin.js @@ -84,7 +84,7 @@ class WindowsSymlinkChecker { * @return {Promise} Object describing whether we're on windows and if admin rights exist */ checkIfSymlinksNeedToBeEnabled() { - return new Promise(resolve => { + return new Promise((resolve) => { if (!this.isWindows) { resolve({ windows: false, @@ -115,7 +115,7 @@ class WindowsSymlinkChecker { let ui = this.ui; let exec = this.exec; - return new Promise(resolve => { + return new Promise((resolve) => { exec('NET SESSION', (error, stdout, stderr) => { let elevated = !stderr || stderr.length === 0; diff --git a/tests/acceptance/addon-dummy-generate-test.js b/tests/acceptance/addon-dummy-generate-test.js index 21c7281ec2..ce1d2a01d8 100644 --- a/tests/acceptance/addon-dummy-generate-test.js +++ b/tests/acceptance/addon-dummy-generate-test.js @@ -13,23 +13,23 @@ const chai = require('../chai'); let expect = chai.expect; let file = chai.file; -describe('Acceptance: ember generate in-addon-dummy', function() { +describe('Acceptance: ember generate in-addon-dummy', function () { this.timeout(20000); - before(function() { + before(function () { BlueprintNpmTask.disableNPM(Blueprint); }); - after(function() { + after(function () { BlueprintNpmTask.restoreNPM(Blueprint); }); - beforeEach(async function() { + beforeEach(async function () { let tmpdir = await mkTmpDirIn(tmproot); process.chdir(tmpdir); }); - afterEach(function() { + afterEach(function () { process.chdir(root); return fs.remove(tmproot); }); @@ -47,12 +47,12 @@ describe('Acceptance: ember generate in-addon-dummy', function() { function generateInAddon(args) { let generateArgs = ['generate'].concat(args); - return initAddon().then(function() { + return initAddon().then(function () { return ember(generateArgs); }); } - it('dummy blueprint foo', async function() { + it('dummy blueprint foo', async function () { await generateInAddon(['blueprint', 'foo', '--dummy']); expect(file('blueprints/foo/index.js')).to.contain( @@ -73,7 +73,7 @@ describe('Acceptance: ember generate in-addon-dummy', function() { ); }); - it('dummy blueprint foo/bar', async function() { + it('dummy blueprint foo/bar', async function () { await generateInAddon(['blueprint', 'foo/bar', '--dummy']); expect(file('blueprints/foo/bar/index.js')).to.contain( @@ -94,7 +94,7 @@ describe('Acceptance: ember generate in-addon-dummy', function() { ); }); - it('dummy http-mock foo', async function() { + it('dummy http-mock foo', async function () { await generateInAddon(['http-mock', 'foo', '--dummy']); expect(file('server/index.js')).to.contain('mocks.forEach(route => route(app));'); @@ -151,7 +151,7 @@ describe('Acceptance: ember generate in-addon-dummy', function() { expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); }); - it('dummy http-mock foo-bar', async function() { + it('dummy http-mock foo-bar', async function () { await generateInAddon(['http-mock', 'foo-bar', '--dummy']); expect(file('server/index.js')).to.contain('mocks.forEach(route => route(app));'); @@ -208,7 +208,7 @@ describe('Acceptance: ember generate in-addon-dummy', function() { expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); }); - it('dummy http-proxy foo', async function() { + it('dummy http-proxy foo', async function () { await generateInAddon(['http-proxy', 'foo', 'http://localhost:5000', '--dummy']); expect(file('server/index.js')).to.contain('proxies.forEach(route => route(app));'); @@ -236,7 +236,7 @@ describe('Acceptance: ember generate in-addon-dummy', function() { expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); }); - it('dummy server', async function() { + it('dummy server', async function () { await generateInAddon(['server', '--dummy']); expect(file('server/index.js')).to.exist; }); diff --git a/tests/acceptance/addon-generate-test.js b/tests/acceptance/addon-generate-test.js index 19c86bc8d3..367744ddf0 100644 --- a/tests/acceptance/addon-generate-test.js +++ b/tests/acceptance/addon-generate-test.js @@ -13,23 +13,23 @@ const chai = require('../chai'); let expect = chai.expect; let file = chai.file; -describe('Acceptance: ember generate in-addon', function() { +describe('Acceptance: ember generate in-addon', function () { this.timeout(20000); - before(function() { + before(function () { BlueprintNpmTask.disableNPM(Blueprint); }); - after(function() { + after(function () { BlueprintNpmTask.restoreNPM(Blueprint); }); - beforeEach(async function() { + beforeEach(async function () { let tmpdir = await mkTmpDirIn(tmproot); process.chdir(tmpdir); }); - afterEach(function() { + afterEach(function () { process.chdir(root); return fs.remove(tmproot); }); @@ -52,12 +52,12 @@ describe('Acceptance: ember generate in-addon', function() { name = arguments[1]; } - return initAddon(name).then(function() { + return initAddon(name).then(function () { return ember(generateArgs); }); } - it('in-addon addon-import cannot be called directly', async function() { + it('in-addon addon-import cannot be called directly', async function () { try { await generateInAddon(['addon-import', 'foo']); } catch (error) { @@ -66,7 +66,7 @@ describe('Acceptance: ember generate in-addon', function() { } }); - it('runs the `addon-import` blueprint from a classic addon', async function() { + it('runs the `addon-import` blueprint from a classic addon', async function () { await initAddon('my-addon'); await fs.outputFile( @@ -79,7 +79,7 @@ describe('Acceptance: ember generate in-addon', function() { expect(file('app/services/session.js')).to.exist; }); - it('runs a custom "*-addon" blueprint from a classic addon', async function() { + it('runs a custom "*-addon" blueprint from a classic addon', async function () { await initAddon('my-addon'); await fs.outputFile( @@ -97,7 +97,7 @@ describe('Acceptance: ember generate in-addon', function() { expect(file('app/services/session.js')).to.exist; }); - it('in-addon blueprint foo', async function() { + it('in-addon blueprint foo', async function () { await generateInAddon(['blueprint', 'foo']); expect(file('blueprints/foo/index.js')).to.contain( @@ -118,7 +118,7 @@ describe('Acceptance: ember generate in-addon', function() { ); }); - it('in-addon blueprint foo/bar', async function() { + it('in-addon blueprint foo/bar', async function () { await generateInAddon(['blueprint', 'foo/bar']); expect(file('blueprints/foo/bar/index.js')).to.contain( @@ -139,7 +139,7 @@ describe('Acceptance: ember generate in-addon', function() { ); }); - it('in-addon http-mock foo', async function() { + it('in-addon http-mock foo', async function () { await generateInAddon(['http-mock', 'foo']); expect(file('server/index.js')).to.contain('mocks.forEach(route => route(app));'); @@ -196,7 +196,7 @@ describe('Acceptance: ember generate in-addon', function() { expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); }); - it('in-addon http-mock foo-bar', async function() { + it('in-addon http-mock foo-bar', async function () { await generateInAddon(['http-mock', 'foo-bar']); expect(file('server/index.js')).to.contain('mocks.forEach(route => route(app));'); @@ -253,7 +253,7 @@ describe('Acceptance: ember generate in-addon', function() { expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); }); - it('in-addon http-proxy foo', async function() { + it('in-addon http-proxy foo', async function () { await generateInAddon(['http-proxy', 'foo', 'http://localhost:5000']); expect(file('server/index.js')).to.contain('proxies.forEach(route => route(app));'); @@ -281,7 +281,7 @@ describe('Acceptance: ember generate in-addon', function() { expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); }); - it('in-addon server', async function() { + it('in-addon server', async function () { await generateInAddon(['server']); expect(file('server/index.js')).to.exist; }); diff --git a/tests/acceptance/addon-smoke-test-slow.js b/tests/acceptance/addon-smoke-test-slow.js index c7fdd3e0d4..d6c4c04418 100644 --- a/tests/acceptance/addon-smoke-test-slow.js +++ b/tests/acceptance/addon-smoke-test-slow.js @@ -22,10 +22,10 @@ let dir = chai.dir; let addonName = 'some-cool-addon'; let addonRoot; -describe('Acceptance: addon-smoke-test', function() { +describe('Acceptance: addon-smoke-test', function () { this.timeout(450000); - before(function() { + before(function () { return createTestTargets(addonName, { command: 'addon', }); @@ -33,13 +33,13 @@ describe('Acceptance: addon-smoke-test', function() { after(teardownTestTargets); - beforeEach(function() { + beforeEach(function () { addonRoot = linkDependencies(addonName); process.env.JOBS = '1'; }); - afterEach(function() { + afterEach(function () { runCommand.killAll(); // Cleans up a folder set up on the other side of a symlink. fs.removeSync(path.join(addonRoot, 'node_modules', 'developing-addon')); @@ -50,7 +50,7 @@ describe('Acceptance: addon-smoke-test', function() { delete process.env.JOBS; }); - it('generates package.json with proper metadata', function() { + it('generates package.json with proper metadata', function () { let packageContents = fs.readJsonSync('package.json'); expect(packageContents.name).to.equal(addonName); @@ -59,11 +59,11 @@ describe('Acceptance: addon-smoke-test', function() { expect(packageContents['ember-addon']).to.deep.equal({ configPath: 'tests/dummy/config' }); }); - it('ember addon foo, clean from scratch', function() { + it('ember addon foo, clean from scratch', function () { return ember(['test']); }); - it('works in most common scenarios for an example addon', async function() { + it('works in most common scenarios for an example addon', async function () { await copyFixtureFiles('addon/kitchen-sink'); let packageJsonPath = path.join(addonRoot, 'package.json'); @@ -99,8 +99,8 @@ describe('Acceptance: addon-smoke-test', function() { expect(result.code).to.eql(0); }); - it('npm pack does not include unnecessary files', async function() { - let handleError = function(error, commandName) { + it('npm pack does not include unnecessary files', async function () { + let handleError = function (error, commandName) { if (error.code === 'ENOENT') { console.warn(chalk.yellow(` Your system does not provide ${commandName} -> Skipped this test.`)); } else { @@ -139,7 +139,7 @@ describe('Acceptance: addon-smoke-test', function() { let outputFiles = output .split('\n') .filter(Boolean) - .map(f => f.replace(/^package\//, '')); + .map((f) => f.replace(/^package\//, '')); expect(outputFiles, 'verify our assumptions about the output structure').to.include.members(necessaryFiles); diff --git a/tests/acceptance/brocfile-smoke-test-slow.js b/tests/acceptance/brocfile-smoke-test-slow.js index da4a099c83..d3425a500a 100644 --- a/tests/acceptance/brocfile-smoke-test-slow.js +++ b/tests/acceptance/brocfile-smoke-test-slow.js @@ -19,26 +19,26 @@ let dir = chai.dir; let appName = 'some-cool-app'; let appRoot; -describe('Acceptance: brocfile-smoke-test', function() { +describe('Acceptance: brocfile-smoke-test', function () { this.timeout(500000); - before(function() { + before(function () { return createTestTargets(appName); }); after(teardownTestTargets); - beforeEach(function() { + beforeEach(function () { appRoot = linkDependencies(appName); }); - afterEach(function() { + afterEach(function () { runCommand.killAll(); cleanupRun(appName); expect(dir(appRoot)).to.not.exist; }); - it('a custom EmberENV in config/environment.js is used for window.EmberENV', async function() { + it('a custom EmberENV in config/environment.js is used for window.EmberENV', async function () { await copyFixtureFiles('brocfile-tests/custom-ember-env'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -52,18 +52,18 @@ describe('Acceptance: brocfile-smoke-test', function() { expect(vendorContents).to.contain(expected, 'EmberENV should be in assets/vendor.js'); }); - it('a custom environment config can be used in Brocfile.js', async function() { + it('a custom environment config can be used in Brocfile.js', async function () { await copyFixtureFiles('brocfile-tests/custom-environment-config'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); }); - it('without app/templates', async function() { + it('without app/templates', async function () { await copyFixtureFiles('brocfile-tests/pods-templates'); await fs.remove(path.join(process.cwd(), 'app/templates')); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); }); - it('strips app/styles or app/templates from JS', async function() { + it('strips app/styles or app/templates from JS', async function () { await copyFixtureFiles('brocfile-tests/styles-and-templates-stripped'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -75,7 +75,7 @@ describe('Acceptance: brocfile-smoke-test', function() { expect(appFileContents).to.include('//app/styles-manager.js'); }); - it('should throw if no build file is found', async function() { + it('should throw if no build file is found', async function () { fs.removeSync('./ember-cli-build.js'); try { await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -84,7 +84,7 @@ describe('Acceptance: brocfile-smoke-test', function() { } }); - it('using autoRun: true', async function() { + it('using autoRun: true', async function () { await copyFixtureFiles('brocfile-tests/auto-run-true'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -94,7 +94,7 @@ describe('Acceptance: brocfile-smoke-test', function() { expect(appFileContents).to.match(/\/app"\)\["default"\]\.create\(/); }); - it('using autoRun: false', async function() { + it('using autoRun: false', async function () { await copyFixtureFiles('brocfile-tests/auto-run-false'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -105,7 +105,7 @@ describe('Acceptance: brocfile-smoke-test', function() { expect(appFileContents).to.not.match(/\/app"\)\["default"\]\.create\(/); }); - it('app.import works properly with test tree files', async function() { + it('app.import works properly with test tree files', async function () { await copyFixtureFiles('brocfile-tests/app-test-import'); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -122,7 +122,7 @@ describe('Acceptance: brocfile-smoke-test', function() { expect(subjectFileContents).to.contain('// File for test tree imported and added via postprocessTree()'); }); - it('app.import works properly with non-js/css files', async function() { + it('app.import works properly with non-js/css files', async function () { await copyFixtureFiles('brocfile-tests/app-import'); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -139,7 +139,7 @@ describe('Acceptance: brocfile-smoke-test', function() { expect(subjectFileContents).to.equal('EXAMPLE TEXT FILE CONTENT\n'); }); - it('addons can have a public tree that is merged and returned namespaced by default', async function() { + it('addons can have a public tree that is merged and returned namespaced by default', async function () { await copyFixtureFiles('brocfile-tests/public-tree'); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -156,17 +156,17 @@ describe('Acceptance: brocfile-smoke-test', function() { expect(subjectFileContents).to.equal('ROOT FILE\n'); }); - it('using pods based templates', async function() { + it('using pods based templates', async function () { await copyFixtureFiles('brocfile-tests/pods-templates'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); }); - it('using pods based templates with a podModulePrefix', async function() { + it('using pods based templates with a podModulePrefix', async function () { await copyFixtureFiles('brocfile-tests/pods-with-prefix-templates'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); }); - it('addon trees are not jshinted', async function() { + it('addon trees are not jshinted', async function () { await copyFixtureFiles('brocfile-tests/jshint-addon'); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -183,7 +183,7 @@ describe('Acceptance: brocfile-smoke-test', function() { expect(error.output.join('')).to.include('Error: No tests matched the filter "jshint"'); }); - it('multiple css files in styles/ are output when a preprocessor is not used', async function() { + it('multiple css files in styles/ are output when a preprocessor is not used', async function () { await copyFixtureFiles('brocfile-tests/multiple-css-files'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -191,12 +191,12 @@ describe('Acceptance: brocfile-smoke-test', function() { let files = ['/assets/some-cool-app.css', '/assets/other.css']; let basePath = path.join(appRoot, 'dist'); - files.forEach(function(f) { + files.forEach(function (f) { expect(file(path.join(basePath, f))).to.exist; }); }); - it('specifying custom output paths works properly', async function() { + it('specifying custom output paths works properly', async function () { await copyFixtureFiles('brocfile-tests/custom-output-paths'); let themeCSSPath = path.join(appRoot, 'app', 'styles', 'theme.css'); @@ -216,24 +216,24 @@ describe('Acceptance: brocfile-smoke-test', function() { ]; let basePath = path.join(appRoot, 'dist'); - files.forEach(function(f) { + files.forEach(function (f) { expect(file(path.join(basePath, f))).to.exist; }); }); - it('specifying outputFile results in an explicitly generated assets', async function() { + it('specifying outputFile results in an explicitly generated assets', async function () { await copyFixtureFiles('brocfile-tests/app-import-output-file'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); let files = ['/assets/output-file.js', '/assets/output-file.css', '/assets/vendor.css', '/assets/vendor.js']; let basePath = path.join(appRoot, 'dist'); - files.forEach(function(f) { + files.forEach(function (f) { expect(file(path.join(basePath, f))).to.exist; }); }); - it('can use transformation to turn anonymous AMD into named AMD', async function() { + it('can use transformation to turn anonymous AMD into named AMD', async function () { await copyFixtureFiles('brocfile-tests/app-import-anonymous-amd'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -241,7 +241,7 @@ describe('Acceptance: brocfile-smoke-test', function() { encoding: 'utf8', }); - (function() { + (function () { let defineCount = 0; // eslint-disable-next-line no-unused-vars function define(name, deps, factory) { @@ -257,7 +257,7 @@ describe('Acceptance: brocfile-smoke-test', function() { })(); }); - it('can use transformation to turn named UMD into named AMD', async function() { + it('can use transformation to turn named UMD into named AMD', async function () { await copyFixtureFiles('brocfile-tests/app-import-named-umd'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -265,7 +265,7 @@ describe('Acceptance: brocfile-smoke-test', function() { encoding: 'utf8', }); - (function() { + (function () { let defineCount = 0; // eslint-disable-next-line no-unused-vars function define(name, deps, factory) { @@ -281,7 +281,7 @@ describe('Acceptance: brocfile-smoke-test', function() { })(); }); - it('can do amd transform from addon', async function() { + it('can do amd transform from addon', async function () { await copyFixtureFiles('brocfile-tests/app-import-custom-transform'); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -295,7 +295,7 @@ describe('Acceptance: brocfile-smoke-test', function() { encoding: 'utf8', }); - (function() { + (function () { let defineCount = 0; // eslint-disable-next-line no-unused-vars function define(name, deps, factory) { @@ -311,7 +311,7 @@ describe('Acceptance: brocfile-smoke-test', function() { })(); }); - it('can use transformation to turn library into custom transformation', async function() { + it('can use transformation to turn library into custom transformation', async function () { await copyFixtureFiles('brocfile-tests/app-import-custom-transform'); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -331,7 +331,7 @@ describe('Acceptance: brocfile-smoke-test', function() { }); // skipped because of potentially broken assertion that should be fixed correctly at a later point - it.skip('specifying partial `outputPaths` hash deep merges options correctly', async function() { + it.skip('specifying partial `outputPaths` hash deep merges options correctly', async function () { await copyFixtureFiles('brocfile-tests/custom-output-paths'); let themeCSSPath = path.join(appRoot, 'app', 'styles', 'theme.css'); @@ -359,14 +359,14 @@ describe('Acceptance: brocfile-smoke-test', function() { ]; let basePath = path.join(appRoot, 'dist'); - files.forEach(function(f) { + files.forEach(function (f) { expect(file(path.join(basePath, f))).to.exist; }); expect(file(path.join(basePath, '/assets/some-cool-app.css'))).to.not.exist; }); - it('multiple paths can be CSS preprocessed', async function() { + it('multiple paths can be CSS preprocessed', async function () { await copyFixtureFiles('brocfile-tests/multiple-sass-files'); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -384,13 +384,13 @@ describe('Acceptance: brocfile-smoke-test', function() { ); }); - it('app.css is output to .css by default', async function() { + it('app.css is output to .css by default', async function () { await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); expect(file(`dist/assets/${appName}.css`)).to.exist; }); // for backwards compat. - it('app.scss is output to .css by default', async function() { + it('app.scss is output to .css by default', async function () { await copyFixtureFiles('brocfile-tests/multiple-sass-files'); let brocfilePath = path.join(appRoot, 'ember-cli-build.js'); @@ -411,7 +411,7 @@ describe('Acceptance: brocfile-smoke-test', function() { expect(file(`dist/assets/${appName}.css`)).to.equal('body { background: green; }\n'); }); - it('additional trees can be passed to the app', async function() { + it('additional trees can be passed to the app', async function () { await copyFixtureFiles('brocfile-tests/additional-trees'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', { verbose: true }); @@ -423,7 +423,7 @@ describe('Acceptance: brocfile-smoke-test', function() { ]; let basePath = path.join(appRoot, 'dist'); - files.forEach(function(f) { + files.forEach(function (f) { expect(file(path.join(basePath, f))).to.exist; }); }); diff --git a/tests/acceptance/destroy-test.js b/tests/acceptance/destroy-test.js index 7cc5685c24..0857a61cee 100644 --- a/tests/acceptance/destroy-test.js +++ b/tests/acceptance/destroy-test.js @@ -14,24 +14,24 @@ const chai = require('../chai'); let expect = chai.expect; let file = chai.file; -describe('Acceptance: ember destroy', function() { +describe('Acceptance: ember destroy', function () { this.timeout(60000); let tmpdir; - before(function() { + before(function () { BlueprintNpmTask.disableNPM(Blueprint); }); - after(function() { + after(function () { BlueprintNpmTask.restoreNPM(Blueprint); }); - beforeEach(async function() { + beforeEach(async function () { tmpdir = await mkTmpDirIn(tmproot); process.chdir(tmpdir); }); - afterEach(function() { + afterEach(function () { process.chdir(root); return fs.remove(tmproot); }); @@ -51,18 +51,18 @@ describe('Acceptance: ember destroy', function() { } function assertFilesExist(files) { - files.forEach(function(f) { + files.forEach(function (f) { expect(file(f)).to.exist; }); } function assertFilesNotExist(files) { - files.forEach(function(f) { + files.forEach(function (f) { expect(file(f)).to.not.exist; }); } - const assertDestroyAfterGenerate = async function(args, files) { + const assertDestroyAfterGenerate = async function (args, files) { await initApp(); await generate(args); @@ -73,35 +73,35 @@ describe('Acceptance: ember destroy', function() { assertFilesNotExist(files); }; - it('blueprint foo', function() { + it('blueprint foo', function () { let commandArgs = ['blueprint', 'foo']; let files = ['blueprints/foo/index.js']; return assertDestroyAfterGenerate(commandArgs, files); }); - it('blueprint foo/bar', function() { + it('blueprint foo/bar', function () { let commandArgs = ['blueprint', 'foo/bar']; let files = ['blueprints/foo/bar/index.js']; return assertDestroyAfterGenerate(commandArgs, files); }); - it('http-mock foo', function() { + it('http-mock foo', function () { let commandArgs = ['http-mock', 'foo']; let files = ['server/mocks/foo.js']; return assertDestroyAfterGenerate(commandArgs, files); }); - it('http-proxy foo', function() { + it('http-proxy foo', function () { let commandArgs = ['http-proxy', 'foo', 'bar']; let files = ['server/proxies/foo.js']; return assertDestroyAfterGenerate(commandArgs, files); }); - it('deletes files generated using blueprints from the project directory', async function() { + it('deletes files generated using blueprints from the project directory', async function () { let commandArgs = ['foo', 'bar']; let files = ['app/foos/bar.js']; await initApp(); @@ -118,7 +118,7 @@ describe('Acceptance: ember destroy', function() { assertFilesNotExist(files); }); - it('correctly identifies the root of the project', async function() { + it('correctly identifies the root of the project', async function () { let commandArgs = ['controller', 'foo']; let files = ['app/controllers/foo.js']; await initApp(); @@ -138,7 +138,7 @@ describe('Acceptance: ember destroy', function() { assertFilesNotExist(files); }); - it('http-mock does not remove server/', async function() { + it('http-mock does not remove server/', async function () { await initApp(); await generate(['http-mock', 'foo']); await generate(['http-mock', 'bar']); diff --git a/tests/acceptance/generate-test.js b/tests/acceptance/generate-test.js index a3ea8b5d97..bbf16bb516 100755 --- a/tests/acceptance/generate-test.js +++ b/tests/acceptance/generate-test.js @@ -18,25 +18,25 @@ let expect = chai.expect; let file = chai.file; let dir = chai.dir; -describe('Acceptance: ember generate', function() { +describe('Acceptance: ember generate', function () { this.timeout(20000); let tmpdir; - before(function() { + before(function () { BlueprintNpmTask.disableNPM(Blueprint); }); - after(function() { + after(function () { BlueprintNpmTask.restoreNPM(Blueprint); }); - beforeEach(async function() { + beforeEach(async function () { tmpdir = await mkTmpDirIn(tmproot); process.chdir(tmpdir); }); - afterEach(function() { + afterEach(function () { process.chdir(root); return remove(tmproot); }); @@ -54,12 +54,12 @@ describe('Acceptance: ember generate', function() { function generate(args) { let generateArgs = ['generate'].concat(args); - return initApp().then(function() { + return initApp().then(function () { return ember(generateArgs); }); } - it('blueprint foo', async function() { + it('blueprint foo', async function () { await generate(['blueprint', 'foo']); expect(file('blueprints/foo/index.js')).to.contain( @@ -80,7 +80,7 @@ describe('Acceptance: ember generate', function() { ); }); - it('blueprint foo/bar', async function() { + it('blueprint foo/bar', async function () { await generate(['blueprint', 'foo/bar']); expect(file('blueprints/foo/bar/index.js')).to.contain( @@ -101,7 +101,7 @@ describe('Acceptance: ember generate', function() { ); }); - it('http-mock foo', async function() { + it('http-mock foo', async function () { await generate(['http-mock', 'foo']); expect(file('server/index.js')).to.contain('mocks.forEach(route => route(app));'); @@ -158,7 +158,7 @@ describe('Acceptance: ember generate', function() { expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); }); - it('http-mock foo-bar', async function() { + it('http-mock foo-bar', async function () { await generate(['http-mock', 'foo-bar']); expect(file('server/index.js')).to.contain('mocks.forEach(route => route(app));'); @@ -215,7 +215,7 @@ describe('Acceptance: ember generate', function() { expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); }); - it('http-proxy foo', async function() { + it('http-proxy foo', async function () { await generate(['http-proxy', 'foo', 'http://localhost:5000']); expect(file('server/index.js')).to.contain('proxies.forEach(route => route(app));'); @@ -243,7 +243,7 @@ describe('Acceptance: ember generate', function() { expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); }); - it('uses blueprints from the project directory', async function() { + it('uses blueprints from the project directory', async function () { await initApp(); await outputFile( @@ -256,7 +256,7 @@ describe('Acceptance: ember generate', function() { expect(file('app/foos/bar.js')).to.contain('foo: true'); }); - it('allows custom blueprints to override built-ins', async function() { + it('allows custom blueprints to override built-ins', async function () { await initApp(); await outputFile( 'blueprints/controller/files/app/controllers/__name__.js', @@ -268,7 +268,7 @@ describe('Acceptance: ember generate', function() { expect(file('app/controllers/foo.js')).to.contain('custom: true'); }); - it('passes custom cli arguments to blueprint options', async function() { + it('passes custom cli arguments to blueprint options', async function () { await initApp(); await outputFile( @@ -292,7 +292,7 @@ describe('Acceptance: ember generate', function() { expect(file('app/foo.js')).to.contain('A: Yes!'); }); - it('correctly identifies the root of the project', async function() { + it('correctly identifies the root of the project', async function () { await initApp(); await outputFile( @@ -307,17 +307,17 @@ describe('Acceptance: ember generate', function() { expect(file('app/controllers/foo.js')).to.contain('custom: true'); }); - it('server', async function() { + it('server', async function () { await generate(['server']); expect(file('server/index.js')).to.exist; }); - it('lib', async function() { + it('lib', async function () { await generate(['lib']); expect(dir('lib')).to.exist; }); - it('custom blueprint availableOptions', async function() { + it('custom blueprint availableOptions', async function () { await initApp(); await ember(['generate', 'blueprint', 'foo']); diff --git a/tests/acceptance/help-test.js b/tests/acceptance/help-test.js index 4999dd7f54..4627c62ede 100644 --- a/tests/acceptance/help-test.js +++ b/tests/acceptance/help-test.js @@ -22,10 +22,10 @@ let FooCommand = Command.extend({ anonymousOptions: [''], }); -describe('Acceptance: ember help', function() { +describe('Acceptance: ember help', function () { let options, command; - beforeEach(function() { + beforeEach(function () { let commands = requireAsHash('../../lib/commands/*.js', Command); options = commandOptions({ @@ -43,7 +43,7 @@ describe('Acceptance: ember help', function() { command = new HelpCommand(options); }); - it('works', function() { + it('works', function () { command.run(options, []); let output = options.ui.output; @@ -53,8 +53,8 @@ describe('Acceptance: ember help', function() { expect(output).to.equal(expected); }); - it('prints addon commands', function() { - options.project.eachAddonCommand = function(cb) { + it('prints addon commands', function () { + options.project.eachAddonCommand = function (cb) { cb('dummy-addon', { Foo: FooCommand }); }; @@ -68,8 +68,8 @@ describe('Acceptance: ember help', function() { expect(output).to.equal(expected); }); - it('prints single addon commands', function() { - options.project.eachAddonCommand = function(cb) { + it('prints single addon commands', function () { + options.project.eachAddonCommand = function (cb) { cb('dummy-addon', { Foo: FooCommand }); }; @@ -83,7 +83,7 @@ describe('Acceptance: ember help', function() { expect(output).to.equal(expected); }); - it('prints all blueprints', function() { + it('prints all blueprints', function () { command.run(options, ['generate']); let output = options.ui.output; @@ -94,7 +94,7 @@ describe('Acceptance: ember help', function() { expect(output).to.contain(expected); }); - it('prints helpful message for unknown command', function() { + it('prints helpful message for unknown command', function () { command.run(options, ['asdf']); let output = options.ui.output; @@ -103,7 +103,7 @@ describe('Acceptance: ember help', function() { expect(output).to.not.contain('undefined'); }); - it('prints a single blueprints', function() { + it('prints a single blueprints', function () { command.run(options, ['generate', 'blueprint']); let output = options.ui.output; @@ -114,8 +114,8 @@ describe('Acceptance: ember help', function() { expect(output).to.equal(expected); }); - it('prints blueprints from addons', function() { - options.project.blueprintLookupPaths = function() { + it('prints blueprints from addons', function () { + options.project.blueprintLookupPaths = function () { return [path.join(__dirname, '..', 'fixtures', 'blueprints')]; }; @@ -129,12 +129,12 @@ describe('Acceptance: ember help', function() { expect(output).to.equal(expected); }); - describe('--json', function() { - beforeEach(function() { + describe('--json', function () { + beforeEach(function () { options.json = true; }); - it('works', function() { + it('works', function () { command.run(options, []); let json = convertToJson(options.ui.output); @@ -143,8 +143,8 @@ describe('Acceptance: ember help', function() { expect(json).to.deep.equal(expected); }); - it('prints commands from addons', function() { - options.project.eachAddonCommand = function(cb) { + it('prints commands from addons', function () { + options.project.eachAddonCommand = function (cb) { cb('dummy-addon', { Foo: FooCommand }); }; @@ -156,8 +156,8 @@ describe('Acceptance: ember help', function() { expect(json).to.deep.equal(expected); }); - it('prints blueprints from addons', function() { - options.project.blueprintLookupPaths = function() { + it('prints blueprints from addons', function () { + options.project.blueprintLookupPaths = function () { return [path.join(__dirname, '..', 'fixtures', 'blueprints')]; }; @@ -179,7 +179,7 @@ function loadTextFixture(path) { } function decodeUnicode(str) { - return str.replace(/\\u([\d\w]{4})/gi, function(match, grp) { + return str.replace(/\\u([\d\w]{4})/gi, function (match, grp) { return String.fromCharCode(parseInt(grp, 16)); }); } diff --git a/tests/acceptance/in-option-destroy-test.js b/tests/acceptance/in-option-destroy-test.js index 781e62dd39..1500023c6c 100644 --- a/tests/acceptance/in-option-destroy-test.js +++ b/tests/acceptance/in-option-destroy-test.js @@ -16,25 +16,25 @@ const chai = require('../chai'); let expect = chai.expect; let file = chai.file; -describe('Acceptance: ember destroy with --in option', function() { +describe('Acceptance: ember destroy with --in option', function () { let tmpdir; this.timeout(20000); - before(function() { + before(function () { BlueprintNpmTask.disableNPM(Blueprint); }); - after(function() { + after(function () { BlueprintNpmTask.restoreNPM(Blueprint); }); - beforeEach(async function() { + beforeEach(async function () { tmpdir = await mkTmpDirIn(tmproot); process.chdir(tmpdir); }); - afterEach(function() { + afterEach(function () { this.timeout(10000); process.chdir(root); @@ -52,18 +52,18 @@ describe('Acceptance: ember destroy with --in option', function() { } function assertFilesExist(files) { - files.forEach(function(f) { + files.forEach(function (f) { expect(file(f)).to.exist; }); } function assertFilesNotExist(files) { - files.forEach(function(f) { + files.forEach(function (f) { expect(file(f)).to.not.exist; }); } - const assertDestroyAfterGenerate = async function(args, addonPath, files) { + const assertDestroyAfterGenerate = async function (args, addonPath, files) { await initApp(); await generateUtils.inRepoAddon(addonPath); await generateUtils.tempBlueprint(); @@ -76,7 +76,7 @@ describe('Acceptance: ember destroy with --in option', function() { assertFilesNotExist(files); }; - it('blueprint foo --in lib/other-thing', function() { + it('blueprint foo --in lib/other-thing', function () { let addonPath = './lib/other-thing'; let commandArgs = ['foo', 'bar', '--in', addonPath]; let files = ['lib/other-thing/addon/foos/bar.js']; @@ -84,7 +84,7 @@ describe('Acceptance: ember destroy with --in option', function() { return assertDestroyAfterGenerate(commandArgs, addonPath, files); }); - it('blueprint foo --in ./non-lib/other-thing', function() { + it('blueprint foo --in ./non-lib/other-thing', function () { let addonPath = './non-lib/other-thing'; let commandArgs = ['foo', 'bar', '--in', addonPath]; let files = ['non-lib/other-thing/addon/foos/bar.js']; @@ -92,7 +92,7 @@ describe('Acceptance: ember destroy with --in option', function() { return assertDestroyAfterGenerate(commandArgs, addonPath, files); }); - it('blueprint foo --in non-lib/other-thing', function() { + it('blueprint foo --in non-lib/other-thing', function () { let addonPath = 'non-lib/other-thing'; let commandArgs = ['foo', 'bar', '--in', addonPath]; let files = ['non-lib/other-thing/addon/foos/bar.js']; @@ -100,7 +100,7 @@ describe('Acceptance: ember destroy with --in option', function() { return assertDestroyAfterGenerate(commandArgs, addonPath, files); }); - it('blueprint foo --in non-lib/nested/other-thing', function() { + it('blueprint foo --in non-lib/nested/other-thing', function () { let addonPath = 'non-lib/nested/other-thing'; let commandArgs = ['foo', 'bar', '--in', addonPath]; let files = ['non-lib/nested/other-thing/addon/foos/bar.js']; diff --git a/tests/acceptance/in-option-generate-test.js b/tests/acceptance/in-option-generate-test.js index 45a51d3b29..0d449b6f61 100644 --- a/tests/acceptance/in-option-generate-test.js +++ b/tests/acceptance/in-option-generate-test.js @@ -15,24 +15,24 @@ const chai = require('../chai'); let expect = chai.expect; let file = chai.file; -describe('Acceptance: ember generate with --in option', function() { +describe('Acceptance: ember generate with --in option', function () { this.timeout(20000); - before(function() { + before(function () { BlueprintNpmTask.disableNPM(Blueprint); }); - after(function() { + after(function () { BlueprintNpmTask.restoreNPM(Blueprint); }); - beforeEach(function() { - return mkTmpDirIn(tmproot).then(function(tmpdir) { + beforeEach(function () { + return mkTmpDirIn(tmproot).then(function (tmpdir) { process.chdir(tmpdir); }); }); - afterEach(function() { + afterEach(function () { process.chdir(root); return fs.remove(tmproot); }); @@ -46,7 +46,7 @@ describe('Acceptance: ember generate with --in option', function() { return fs.writeJsonSync(packageJsonPath, packageJson); } - it('generate blueprint foo using lib', function() { + it('generate blueprint foo using lib', function () { // build an app with an in-repo addon in a non-standard path return ( initApp() @@ -55,14 +55,14 @@ describe('Acceptance: ember generate with --in option', function() { .then(() => generateUtils.tempBlueprint()) // confirm that we can generate into the non-lib path .then(() => - ember(['generate', 'foo', 'bar', '--in=lib/other-thing']).then(function() { + ember(['generate', 'foo', 'bar', '--in=lib/other-thing']).then(function () { expect(file('lib/other-thing/addon/foos/bar.js')).to.exist; }) ) ); }); - it('generate blueprint foo using custom path using current directory', function() { + it('generate blueprint foo using custom path using current directory', function () { // build an app with an in-repo addon in a non-standard path return ( initApp() @@ -71,14 +71,14 @@ describe('Acceptance: ember generate with --in option', function() { .then(() => generateUtils.tempBlueprint()) // confirm that we can generate into the non-lib path .then(() => - ember(['generate', 'foo', 'bar', '--in=non-lib/other-thing']).then(function() { + ember(['generate', 'foo', 'bar', '--in=non-lib/other-thing']).then(function () { expect(file('non-lib/other-thing/addon/foos/bar.js')).to.exist; }) ) ); }); - it('generate blueprint foo using custom path', function() { + it('generate blueprint foo using custom path', function () { // build an app with an in-repo addon in a non-standard path return ( initApp() @@ -87,14 +87,14 @@ describe('Acceptance: ember generate with --in option', function() { .then(() => generateUtils.tempBlueprint()) // confirm that we can generate into the non-lib path .then(() => - ember(['generate', 'foo', 'bar', '--in=./non-lib/other-thing']).then(function() { + ember(['generate', 'foo', 'bar', '--in=./non-lib/other-thing']).then(function () { expect(file('non-lib/other-thing/addon/foos/bar.js')).to.exist; }) ) ); }); - it('generate blueprint foo using custom nested path', function() { + it('generate blueprint foo using custom nested path', function () { // build an app with an in-repo addon in a non-standard path return ( initApp() @@ -103,14 +103,14 @@ describe('Acceptance: ember generate with --in option', function() { .then(() => generateUtils.tempBlueprint()) // confirm that we can generate into the non-lib path .then(() => - ember(['generate', 'foo', 'bar', '--in=./non-lib/nested/other-thing']).then(function() { + ember(['generate', 'foo', 'bar', '--in=./non-lib/nested/other-thing']).then(function () { expect(file('non-lib/nested/other-thing/addon/foos/bar.js')).to.exist; }) ) ); }); - it('generate blueprint foo using sibling path', function() { + it('generate blueprint foo using sibling path', function () { // build an app with an in-repo addon in a non-standard path return ( initApp() @@ -122,7 +122,7 @@ describe('Acceptance: ember generate with --in option', function() { .then(() => generateUtils.tempBlueprint()) // confirm that we can generate into the non-lib path .then(() => - ember(['generate', 'foo', 'bar', '--in=../sibling']).then(function() { + ember(['generate', 'foo', 'bar', '--in=../sibling']).then(function () { expect(file('../sibling/addon/foos/bar.js')).to.exist; }) ) diff --git a/tests/acceptance/in-repo-addon-generate-test.js b/tests/acceptance/in-repo-addon-generate-test.js index 6d712399b0..e8e857af35 100644 --- a/tests/acceptance/in-repo-addon-generate-test.js +++ b/tests/acceptance/in-repo-addon-generate-test.js @@ -16,23 +16,23 @@ const chai = require('../chai'); let expect = chai.expect; let file = chai.file; -describe('Acceptance: ember generate in-repo-addon', function() { +describe('Acceptance: ember generate in-repo-addon', function () { this.timeout(20000); - before(function() { + before(function () { BlueprintNpmTask.disableNPM(Blueprint); }); - after(function() { + after(function () { BlueprintNpmTask.restoreNPM(Blueprint); }); - beforeEach(async function() { + beforeEach(async function () { const tmpdir = await mkTmpDirIn(tmproot); return process.chdir(tmpdir); }); - afterEach(function() { + afterEach(function () { process.chdir(root); return remove(tmproot); }); @@ -46,7 +46,7 @@ describe('Acceptance: ember generate in-repo-addon', function() { return ember(['generate', 'in-repo-addon', 'my-addon']); } - it('in-repo-addon blueprint foo inside alternate path', async function() { + it('in-repo-addon blueprint foo inside alternate path', async function () { // build an app with an in-repo addon in a non-standard path await initApp(); await ember(['generate', 'in-repo-addon', './non-lib/other-thing']); @@ -58,7 +58,7 @@ describe('Acceptance: ember generate in-repo-addon', function() { expect(file('non-lib/other-thing/addon/foos/bar.js')).to.exist; }); - it('in-repo-addon adds path to lib', async function() { + it('in-repo-addon adds path to lib', async function () { await initInRepoAddon(); expect(file('package.json')).to.contain('lib/my-addon'); diff --git a/tests/acceptance/init-test.js b/tests/acceptance/init-test.js index d9729c782d..497473f780 100644 --- a/tests/acceptance/init-test.js +++ b/tests/acceptance/init-test.js @@ -23,17 +23,17 @@ let defaultIgnoredFiles = Blueprint.ignoredFiles; let tmpPath = './tmp/init-test'; -describe('Acceptance: ember init', function() { +describe('Acceptance: ember init', function () { this.timeout(20000); - beforeEach(async function() { + beforeEach(async function () { Blueprint.ignoredFiles = defaultIgnoredFiles; await tmp.setup(tmpPath); process.chdir(tmpPath); }); - afterEach(function() { + afterEach(function () { return tmp.teardown(tmpPath); }); @@ -42,7 +42,7 @@ describe('Acceptance: ember init', function() { let expected = walkSync(blueprintPath).sort(); let actual = walkSync('.').sort(); - forEach(Blueprint.renamedFiles, function(destFile, srcFile) { + forEach(Blueprint.renamedFiles, function (destFile, srcFile) { expected[expected.indexOf(srcFile)] = destFile; }); @@ -91,13 +91,13 @@ describe('Acceptance: ember init', function() { } function removeTmp(array) { - remove(array, function(entry) { + remove(array, function (entry) { return /^tmp[\\/]$/.test(entry); }); } function removeIgnored(array) { - remove(array, function(fn) { - return Blueprint.ignoredFiles.some(function(ignoredFile) { + remove(array, function (fn) { + return Blueprint.ignoredFiles.some(function (ignoredFile) { return minimatch(fn, ignoredFile, { matchBase: true, }); @@ -105,13 +105,13 @@ describe('Acceptance: ember init', function() { }); } - it('ember init', async function() { + it('ember init', async function () { await ember(['init', '--skip-npm', '--skip-bower']); confirmBlueprinted(); }); - it("init an already init'd folder", async function() { + it("init an already init'd folder", async function () { await ember(['init', '--skip-npm', '--skip-bower']); await ember(['init', '--skip-npm', '--skip-bower']); @@ -119,13 +119,13 @@ describe('Acceptance: ember init', function() { confirmBlueprinted(); }); - it('init a single file', async function() { + it('init a single file', async function () { await ember(['init', 'app.js', '--skip-npm', '--skip-bower']); confirmGlobBlueprinted('app.js'); }); - it("init a single file on already init'd folder", async function() { + it("init a single file on already init'd folder", async function () { await ember(['init', '--skip-npm', '--skip-bower']); await ember(['init', 'app.js', '--skip-npm', '--skip-bower']); @@ -133,13 +133,13 @@ describe('Acceptance: ember init', function() { confirmBlueprinted(); }); - it('init multiple files by glob pattern', async function() { + it('init multiple files by glob pattern', async function () { await ember(['init', 'app/**', '--skip-npm', '--skip-bower']); confirmGlobBlueprinted('app/**'); }); - it("init multiple files by glob pattern on already init'd folder", async function() { + it("init multiple files by glob pattern on already init'd folder", async function () { await ember(['init', '--skip-npm', '--skip-bower']); await ember(['init', 'app/**', '--skip-npm', '--skip-bower']); @@ -147,13 +147,13 @@ describe('Acceptance: ember init', function() { confirmBlueprinted(); }); - it('init multiple files by glob patterns', async function() { + it('init multiple files by glob patterns', async function () { await ember(['init', 'app/**', '{package,bower}.json', 'resolver.js', '--skip-npm', '--skip-bower']); confirmGlobBlueprinted('{app/**,{package,bower}.json,resolver.js}'); }); - it("init multiple files by glob patterns on already init'd folder", async function() { + it("init multiple files by glob patterns on already init'd folder", async function () { await ember(['init', '--skip-npm', '--skip-bower']); await ember(['init', 'app/**', '{package,bower}.json', 'resolver.js', '--skip-npm', '--skip-bower']); @@ -161,7 +161,7 @@ describe('Acceptance: ember init', function() { confirmBlueprinted(); }); - it('should not create .git folder', async function() { + it('should not create .git folder', async function () { await ember(['init', '--skip-npm', '--skip-bower']); expect(dir('.git')).to.not.exist; diff --git a/tests/acceptance/missing-before-addon-test.js b/tests/acceptance/missing-before-addon-test.js index 303267ecbb..077c12ad43 100644 --- a/tests/acceptance/missing-before-addon-test.js +++ b/tests/acceptance/missing-before-addon-test.js @@ -4,16 +4,16 @@ const path = require('path'); const ember = require('../helpers/ember'); let root = process.cwd(); -describe('Acceptance: missing a before/after addon', function() { - beforeEach(function() { +describe('Acceptance: missing a before/after addon', function () { + beforeEach(function () { process.chdir(path.join(root, 'tests', 'fixtures', 'missing-before-addon')); }); - afterEach(function() { + afterEach(function () { process.chdir(root); }); - it('does not break ember-cli', function() { + it('does not break ember-cli', function () { return ember(['help']); }); }); diff --git a/tests/acceptance/nested-addons-smoke-test-slow.js b/tests/acceptance/nested-addons-smoke-test-slow.js index 47cdc428d9..bdd40342ef 100644 --- a/tests/acceptance/nested-addons-smoke-test-slow.js +++ b/tests/acceptance/nested-addons-smoke-test-slow.js @@ -19,26 +19,26 @@ let dir = chai.dir; let appName = 'some-cool-app'; let appRoot; -describe('Acceptance: nested-addons-smoke-test', function() { +describe('Acceptance: nested-addons-smoke-test', function () { this.timeout(360000); - before(function() { + before(function () { return createTestTargets(appName); }); after(teardownTestTargets); - beforeEach(function() { + beforeEach(function () { appRoot = linkDependencies(appName); }); - afterEach(function() { + afterEach(function () { runCommand.killAll(); cleanupRun(appName); expect(dir(appRoot)).to.not.exist; }); - it('addons with nested addons compile correctly', async function() { + it('addons with nested addons compile correctly', async function () { await copyFixtureFiles('addon/with-nested-addons'); let packageJsonPath = path.join(appRoot, 'package.json'); diff --git a/tests/acceptance/new-test.js b/tests/acceptance/new-test.js index 97f3eaee8a..84a629fc24 100644 --- a/tests/acceptance/new-test.js +++ b/tests/acceptance/new-test.js @@ -21,17 +21,17 @@ const assertVersionLock = require('../helpers/assert-version-lock'); let tmpDir = './tmp/new-test'; -describe('Acceptance: ember new', function() { +describe('Acceptance: ember new', function () { this.timeout(10000); let ORIGINAL_PROCESS_ENV_CI; - beforeEach(async function() { + beforeEach(async function () { await tmp.setup(tmpDir); process.chdir(tmpDir); ORIGINAL_PROCESS_ENV_CI = process.env.CI; }); - afterEach(function() { + afterEach(function () { if (ORIGINAL_PROCESS_ENV_CI === undefined) { delete process.env.CI; } else { @@ -46,7 +46,7 @@ describe('Acceptance: ember new', function() { let actual = walkSync('.').sort(); let directory = path.basename(process.cwd()); - forEach(Blueprint.renamedFiles, function(destFile, srcFile) { + forEach(Blueprint.renamedFiles, function (destFile, srcFile) { expected[expected.indexOf(srcFile)] = destFile; }); @@ -59,7 +59,7 @@ describe('Acceptance: ember new', function() { ); } - it('ember new adds ember-welcome-page by default', async function() { + it('ember new adds ember-welcome-page by default', async function () { await ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git']); expect(file('package.json')).to.match(/"ember-welcome-page"/); @@ -67,13 +67,13 @@ describe('Acceptance: ember new', function() { expect(file('app/templates/application.hbs')).to.contain(''); }); - it('ember new @foo/bar, when parent directory does not contain `foo`', async function() { + it('ember new @foo/bar, when parent directory does not contain `foo`', async function () { await ember(['new', '@foo/bar', '--skip-npm', '--skip-bower']); confirmBlueprintedForDir('blueprints/app', 'foo-bar'); }); - it('ember new @foo/bar, when direct parent directory contains `foo`', async function() { + it('ember new @foo/bar, when direct parent directory contains `foo`', async function () { let scopedDirectoryPath = path.join(process.cwd(), 'foo'); fs.mkdirsSync(scopedDirectoryPath); process.chdir(scopedDirectoryPath); @@ -83,7 +83,7 @@ describe('Acceptance: ember new', function() { confirmBlueprintedForDir('blueprints/app', 'bar'); }); - it('ember new @foo/bar, when parent directory heirarchy contains `foo`', async function() { + it('ember new @foo/bar, when parent directory heirarchy contains `foo`', async function () { let scopedDirectoryPath = path.join(process.cwd(), 'foo', 'packages'); fs.mkdirsSync(scopedDirectoryPath); process.chdir(scopedDirectoryPath); @@ -93,7 +93,7 @@ describe('Acceptance: ember new', function() { confirmBlueprintedForDir('blueprints/app', 'bar'); }); - it('ember new --no-welcome skips installation of ember-welcome-page', async function() { + it('ember new --no-welcome skips installation of ember-welcome-page', async function () { await ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--no-welcome']); expect(file('package.json')).not.to.match(/"ember-welcome-page"/); @@ -101,19 +101,19 @@ describe('Acceptance: ember new', function() { expect(file('app/templates/application.hbs')).to.contain('Welcome to Ember'); }); - it('ember new npm blueprint with old version', async function() { + it('ember new npm blueprint with old version', async function () { await ember(['new', 'foo', '--blueprint', '@glimmer/blueprint@0.6.4', '--skip-npm', '--skip-bower']); expect(dir('src')).to.exist; }); - it('ember new foo, where foo does not yet exist, works', async function() { + it('ember new foo, where foo does not yet exist, works', async function () { await ember(['new', 'foo', '--skip-npm', '--skip-bower']); confirmBlueprintedForDir('blueprints/app'); }); - it('ember new foo, blueprint targets match the default ember-cli targets', async function() { + it('ember new foo, blueprint targets match the default ember-cli targets', async function () { await ember(['new', 'foo', '--skip-npm', '--skip-bower']); process.env.CI = true; @@ -122,21 +122,21 @@ describe('Acceptance: ember new', function() { expect(blueprintTargets).to.have.same.deep.members(defaultTargets); }); - it('ember new with empty app name fails with a warning', async function() { + it('ember new with empty app name fails with a warning', async function () { let err = await expect(ember(['new', ''])).to.be.rejected; expect(err.name).to.equal('SilentError'); expect(err.message).to.contain('The `ember new` command requires a name to be specified.'); }); - it('ember new without app name fails with a warning', async function() { + it('ember new without app name fails with a warning', async function () { let err = await expect(ember(['new'])).to.be.rejected; expect(err.name).to.equal('SilentError'); expect(err.message).to.contain('The `ember new` command requires a name to be specified.'); }); - it('ember new with app name creates new directory and has a dasherized package name', async function() { + it('ember new with app name creates new directory and has a dasherized package name', async function () { await ember(['new', 'FooApp', '--skip-npm', '--skip-bower', '--skip-git']); expect(dir('FooApp')).to.not.exist; @@ -146,13 +146,13 @@ describe('Acceptance: ember new', function() { expect(pkgJson.name).to.equal('foo-app'); }); - it('Can create new ember project in an existing empty directory', async function() { + it('Can create new ember project in an existing empty directory', async function () { fs.mkdirsSync('bar'); await ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--directory=bar']); }); - it('Cannot create new ember project in a populated directory', async function() { + it('Cannot create new ember project in a populated directory', async function () { fs.mkdirsSync('bar'); fs.writeFileSync(path.join('bar', 'package.json'), '{}'); @@ -163,7 +163,7 @@ describe('Acceptance: ember new', function() { expect(error.message).to.equal("Directory 'bar' already exists."); }); - it('Cannot run ember new, inside of ember-cli project', async function() { + it('Cannot run ember new, inside of ember-cli project', async function () { await ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git']); let error = await expect(ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git'])).to.be.rejected; @@ -175,7 +175,7 @@ describe('Acceptance: ember new', function() { confirmBlueprintedForDir('blueprints/app'); }); - it('ember new with blueprint uses the specified blueprint directory with a relative path', async function() { + it('ember new with blueprint uses the specified blueprint directory with a relative path', async function () { fs.mkdirsSync('my_blueprint/files'); fs.writeFileSync('my_blueprint/files/gitignore', ''); @@ -184,7 +184,7 @@ describe('Acceptance: ember new', function() { confirmBlueprintedForDir(path.join(tmpDir, 'my_blueprint')); }); - it('ember new with blueprint uses the specified blueprint directory with an absolute path', async function() { + it('ember new with blueprint uses the specified blueprint directory with an absolute path', async function () { fs.mkdirsSync('my_blueprint/files'); fs.writeFileSync('my_blueprint/files/gitignore', ''); @@ -200,7 +200,7 @@ describe('Acceptance: ember new', function() { confirmBlueprintedForDir(path.join(tmpDir, 'my_blueprint')); }); - it('ember new with git blueprint checks out the blueprint and uses it', async function() { + it('ember new with git blueprint checks out the blueprint and uses it', async function () { this.timeout(20000); // relies on GH network stuff await ember([ @@ -215,7 +215,7 @@ describe('Acceptance: ember new', function() { expect(file('.ember-cli')).to.exist; }); - it('ember new with git blueprint and ref checks out the blueprint with the correct ref and uses it', async function() { + it('ember new with git blueprint and ref checks out the blueprint with the correct ref and uses it', async function () { this.timeout(20000); // relies on GH network stuff await ember([ @@ -230,7 +230,7 @@ describe('Acceptance: ember new', function() { expect(file('.named-ref')).to.exist; }); - it('ember new with shorthand git blueprint and ref checks out the blueprint with the correct ref and uses it', async function() { + it('ember new with shorthand git blueprint and ref checks out the blueprint with the correct ref and uses it', async function () { this.timeout(20000); // relies on GH network stuff await ember([ @@ -245,7 +245,7 @@ describe('Acceptance: ember new', function() { expect(file('.named-ref')).to.exist; }); - it('ember new passes blueprint options through to blueprint', async function() { + it('ember new passes blueprint options through to blueprint', async function () { fs.mkdirsSync('my_blueprint/files'); fs.writeFileSync( 'my_blueprint/index.js', @@ -275,7 +275,7 @@ describe('Acceptance: ember new', function() { expect(file('.gitignore')).to.contain('customValue'); }); - it('ember new uses yarn when blueprint has yarn.lock', async function() { + it('ember new uses yarn when blueprint has yarn.lock', async function () { if (!hasGlobalYarn) { this.skip(); } @@ -291,7 +291,7 @@ describe('Acceptance: ember new', function() { expect(dir('node_modules/fs-extra')).to.not.be.empty; }); - it('ember new without skip-git flag creates .git dir', async function() { + it('ember new without skip-git flag creates .git dir', async function () { await ember(['new', 'foo', '--skip-npm', '--skip-bower'], { skipGit: false, }); @@ -299,7 +299,7 @@ describe('Acceptance: ember new', function() { expect(dir('.git')).to.exist; }); - it('ember new cleans up after itself on error', async function() { + it('ember new cleans up after itself on error', async function () { fs.mkdirsSync('my_blueprint'); fs.writeFileSync('my_blueprint/index.js', 'throw("this will break");'); @@ -308,7 +308,7 @@ describe('Acceptance: ember new', function() { expect(dir('foo')).to.not.exist; }); - it('ember new with --dry-run does not create new directory', async function() { + it('ember new with --dry-run does not create new directory', async function () { await ember(['new', 'foo', '--dry-run']); expect(process.cwd()).to.not.match(/foo/, 'does not change cwd to foo in a dry run'); @@ -316,7 +316,7 @@ describe('Acceptance: ember new', function() { expect(dir('.git')).to.not.exist; }); - it('ember new with --directory uses given directory name and has correct package name', async function() { + it('ember new with --directory uses given directory name and has correct package name', async function () { let workdir = process.cwd(); await ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--directory=bar']); @@ -332,7 +332,7 @@ describe('Acceptance: ember new', function() { expect(pkgJson.name).to.equal('foo', 'uses app name for package name'); }); - it('ember addon with --directory uses given directory name and has correct package name', async function() { + it('ember addon with --directory uses given directory name and has correct package name', async function () { let workdir = process.cwd(); await ember(['addon', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--directory=bar']); @@ -348,7 +348,7 @@ describe('Acceptance: ember new', function() { expect(pkgJson.name).to.equal('foo', 'uses addon name for package name'); }); - it('ember addon @foo/bar when parent directory does not contain `foo`', async function() { + it('ember addon @foo/bar when parent directory does not contain `foo`', async function () { await ember(['addon', '@foo/bar', '--skip-npm', '--skip-bower', '--skip-git']); let directoryName = path.basename(process.cwd()); @@ -359,7 +359,7 @@ describe('Acceptance: ember new', function() { expect(pkgJson.name).to.equal('@foo/bar', 'uses addon name for package name'); }); - it('ember addon @foo/bar when parent directory contains `foo`', async function() { + it('ember addon @foo/bar when parent directory contains `foo`', async function () { let scopedDirectoryPath = path.join(process.cwd(), 'foo'); fs.mkdirsSync(scopedDirectoryPath); process.chdir(scopedDirectoryPath); @@ -374,7 +374,7 @@ describe('Acceptance: ember new', function() { expect(pkgJson.name).to.equal('@foo/bar', 'uses addon name for package name'); }); - describe('verify fixtures', function() { + describe('verify fixtures', function () { function checkEslintConfig(fixturePath) { expect(file('.eslintrc.js')).to.equal(file(path.join(__dirname, '../fixtures', fixturePath, '.eslintrc.js'))); } @@ -389,13 +389,13 @@ describe('Acceptance: ember new', function() { expect(file('package.json')).to.equal(fixtureContents); } - it('app + npm + !welcome', async function() { + it('app + npm + !welcome', async function () { await ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--no-welcome']); let namespace = 'app'; let fixturePath = `${namespace}/npm`; - ['app/templates/application.hbs', '.travis.yml', 'README.md'].forEach(filePath => { + ['app/templates/application.hbs', '.travis.yml', 'README.md'].forEach((filePath) => { expect(file(filePath)).to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath))); }); @@ -405,19 +405,19 @@ describe('Acceptance: ember new', function() { checkEslintConfig(namespace); }); - it('app + yarn + welcome', async function() { + it('app + yarn + welcome', async function () { await ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--yarn']); let fixturePath = 'app/yarn'; - ['app/templates/application.hbs', '.travis.yml', 'README.md'].forEach(filePath => { + ['app/templates/application.hbs', '.travis.yml', 'README.md'].forEach((filePath) => { expect(file(filePath)).to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath))); }); checkPackageJson(fixturePath); }); - it('addon + yarn + welcome', async function() { + it('addon + yarn + welcome', async function () { await ember(['addon', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--yarn', '--welcome']); let fixturePath = 'addon/yarn'; @@ -428,14 +428,14 @@ describe('Acceptance: ember new', function() { '.travis.yml', 'README.md', 'CONTRIBUTING.md', - ].forEach(filePath => { + ].forEach((filePath) => { expect(file(filePath)).to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath))); }); checkPackageJson(fixturePath); }); - it('addon + npm + !welcome', async function() { + it('addon + npm + !welcome', async function () { await ember(['addon', 'foo', '--skip-npm', '--skip-bower', '--skip-git']); let namespace = 'addon'; @@ -447,7 +447,7 @@ describe('Acceptance: ember new', function() { '.travis.yml', 'README.md', 'CONTRIBUTING.md', - ].forEach(filePath => { + ].forEach((filePath) => { expect(file(filePath)).to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath))); }); @@ -458,8 +458,8 @@ describe('Acceptance: ember new', function() { }); }); - describe('verify dependencies', function() { - it('are locked down for pre-1.0 versions', async function() { + describe('verify dependencies', function () { + it('are locked down for pre-1.0 versions', async function () { await ember(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git', '--yarn', '--welcome']); let pkg = fs.readJsonSync('package.json'); diff --git a/tests/acceptance/pods-destroy-test.js b/tests/acceptance/pods-destroy-test.js index 0bbfe6dfcc..79c8fc4d43 100644 --- a/tests/acceptance/pods-destroy-test.js +++ b/tests/acceptance/pods-destroy-test.js @@ -18,25 +18,25 @@ const chai = require('../chai'); let expect = chai.expect; let file = chai.file; -describe('Acceptance: ember destroy pod', function() { +describe('Acceptance: ember destroy pod', function () { let tmpdir; this.timeout(20000); - before(function() { + before(function () { BlueprintNpmTask.disableNPM(Blueprint); }); - after(function() { + after(function () { BlueprintNpmTask.restoreNPM(Blueprint); }); - beforeEach(async function() { + beforeEach(async function () { tmpdir = await mkTmpDirIn(tmproot); process.chdir(tmpdir); }); - afterEach(function() { + afterEach(function () { this.timeout(10000); process.chdir(root); @@ -58,18 +58,18 @@ describe('Acceptance: ember destroy pod', function() { } function assertFilesExist(files) { - files.forEach(function(f) { + files.forEach(function (f) { expect(file(f)).to.exist; }); } function assertFilesNotExist(files) { - files.forEach(function(f) { + files.forEach(function (f) { expect(file(f)).to.not.exist; }); } - const assertDestroyAfterGenerate = async function(args, files) { + const assertDestroyAfterGenerate = async function (args, files) { await initApp(); replaceFile('config/environment.js', '(var|let|const) ENV = {', "$1 ENV = {\npodModulePrefix: 'app/pods', \n"); @@ -82,7 +82,7 @@ describe('Acceptance: ember destroy pod', function() { assertFilesNotExist(files); }; - const destroyAfterGenerate = async function(args) { + const destroyAfterGenerate = async function (args) { await initApp(); replaceFile('config/environment.js', '(var|let|const) ENV = {', "$1 ENV = {\npodModulePrefix: 'app/pods', \n"); @@ -91,35 +91,35 @@ describe('Acceptance: ember destroy pod', function() { return await destroy(args); }; - it('blueprint foo --pod', function() { + it('blueprint foo --pod', function () { let commandArgs = ['blueprint', 'foo', '--pod']; let files = ['blueprints/foo/index.js']; return assertDestroyAfterGenerate(commandArgs, files); }); - it('blueprint foo/bar --pod', function() { + it('blueprint foo/bar --pod', function () { let commandArgs = ['blueprint', 'foo/bar', '--pod']; let files = ['blueprints/foo/bar/index.js']; return assertDestroyAfterGenerate(commandArgs, files); }); - it('http-mock foo --pod', function() { + it('http-mock foo --pod', function () { let commandArgs = ['http-mock', 'foo', '--pod']; let files = ['server/mocks/foo.js']; return assertDestroyAfterGenerate(commandArgs, files); }); - it('http-proxy foo --pod', function() { + it('http-proxy foo --pod', function () { let commandArgs = ['http-proxy', 'foo', 'bar', '--pod']; let files = ['server/proxies/foo.js']; return assertDestroyAfterGenerate(commandArgs, files); }); - it('deletes files generated using blueprints from the project directory', async function() { + it('deletes files generated using blueprints from the project directory', async function () { let commandArgs = ['foo', 'bar', '--pod']; let files = ['app/foos/bar.js']; @@ -138,7 +138,7 @@ describe('Acceptance: ember destroy pod', function() { }); // Skip until podModulePrefix is deprecated - it.skip('podModulePrefix deprecation warning', async function() { + it.skip('podModulePrefix deprecation warning', async function () { let result = await destroyAfterGenerate(['controller', 'foo', '--pod']); expect(result.outputStream.join()).to.include( diff --git a/tests/acceptance/pods-generate-test.js b/tests/acceptance/pods-generate-test.js index 9b2d6e8241..9b98d4726f 100644 --- a/tests/acceptance/pods-generate-test.js +++ b/tests/acceptance/pods-generate-test.js @@ -15,25 +15,25 @@ const chai = require('../chai'); let expect = chai.expect; let file = chai.file; -describe('Acceptance: ember generate pod', function() { +describe('Acceptance: ember generate pod', function () { this.timeout(60000); let tmpdir; - before(function() { + before(function () { BlueprintNpmTask.disableNPM(Blueprint); }); - after(function() { + after(function () { BlueprintNpmTask.restoreNPM(Blueprint); }); - beforeEach(async function() { + beforeEach(async function () { tmpdir = await mkTmpDirIn(tmproot); process.chdir(tmpdir); }); - afterEach(function() { + afterEach(function () { process.chdir(root); return fs.remove(tmproot); }); @@ -51,7 +51,7 @@ describe('Acceptance: ember generate pod', function() { function generate(args) { let generateArgs = ['generate'].concat(args); - return initApp().then(function() { + return initApp().then(function () { return ember(generateArgs); }); } @@ -59,13 +59,13 @@ describe('Acceptance: ember generate pod', function() { function generateWithPrefix(args) { let generateArgs = ['generate'].concat(args); - return initApp().then(function() { + return initApp().then(function () { replaceFile('config/environment.js', '(var|let|const) ENV = {', "$1 ENV = {\npodModulePrefix: 'app/pods', \n"); return ember(generateArgs); }); } - it('blueprint foo --pod', async function() { + it('blueprint foo --pod', async function () { await generate(['blueprint', 'foo', '--pod']); expect(file('blueprints/foo/index.js')).to.contain( @@ -86,7 +86,7 @@ describe('Acceptance: ember generate pod', function() { ); }); - it('blueprint foo/bar --pod', async function() { + it('blueprint foo/bar --pod', async function () { await generate(['blueprint', 'foo/bar', '--pod']); expect(file('blueprints/foo/bar/index.js')).to.contain( @@ -107,7 +107,7 @@ describe('Acceptance: ember generate pod', function() { ); }); - it('http-mock foo --pod', async function() { + it('http-mock foo --pod', async function () { await generate(['http-mock', 'foo', '--pod']); expect(file('server/index.js')).to.contain('mocks.forEach(route => route(app));'); @@ -164,7 +164,7 @@ describe('Acceptance: ember generate pod', function() { expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); }); - it('http-mock foo-bar --pod', async function() { + it('http-mock foo-bar --pod', async function () { await generate(['http-mock', 'foo-bar', '--pod']); expect(file('server/index.js')).to.contain('mocks.forEach(route => route(app));'); @@ -221,7 +221,7 @@ describe('Acceptance: ember generate pod', function() { expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); }); - it('http-proxy foo --pod', async function() { + it('http-proxy foo --pod', async function () { await generate(['http-proxy', 'foo', 'http://localhost:5000', '--pod']); expect(file('server/index.js')).to.contain('proxies.forEach(route => route(app));'); @@ -249,7 +249,7 @@ describe('Acceptance: ember generate pod', function() { expect(file('server/.jshintrc')).to.contain('{\n "node": true\n}'); }); - it('uses blueprints from the project directory', async function() { + it('uses blueprints from the project directory', async function () { await initApp(); await fs.outputFile( 'blueprints/foo/files/app/foos/__name__.js', @@ -261,7 +261,7 @@ describe('Acceptance: ember generate pod', function() { expect(file('app/foos/bar.js')).to.contain('foo: true'); }); - it('allows custom blueprints to override built-ins', async function() { + it('allows custom blueprints to override built-ins', async function () { await initApp(); await fs.outputFile( 'blueprints/controller/files/app/__path__/__name__.js', @@ -273,7 +273,7 @@ describe('Acceptance: ember generate pod', function() { expect(file('app/foo/controller.js')).to.contain('custom: true'); }); - it('passes custom cli arguments to blueprint options', async function() { + it('passes custom cli arguments to blueprint options', async function () { await initApp(); await fs.outputFile( 'blueprints/customblue/files/app/__name__.js', @@ -303,7 +303,7 @@ describe('Acceptance: ember generate pod', function() { expect(file('app/foo.js')).to.contain('A: Yes!'); }); - it('correctly identifies the root of the project', async function() { + it('correctly identifies the root of the project', async function () { await initApp(); await fs.outputFile( 'blueprints/controller/files/app/__path__/__name__.js', @@ -318,7 +318,7 @@ describe('Acceptance: ember generate pod', function() { }); // Skip until podModulePrefix is deprecated - it.skip('podModulePrefix deprecation warning', async function() { + it.skip('podModulePrefix deprecation warning', async function () { let result = await generateWithPrefix(['controller', 'foo', '--pod']); expect(result.outputStream.join()).to.include( diff --git a/tests/acceptance/preprocessor-smoke-test-slow.js b/tests/acceptance/preprocessor-smoke-test-slow.js index 30d116d589..68396eef66 100644 --- a/tests/acceptance/preprocessor-smoke-test-slow.js +++ b/tests/acceptance/preprocessor-smoke-test-slow.js @@ -19,26 +19,26 @@ let dir = chai.dir; let appName = 'some-cool-app'; let appRoot; -describe('Acceptance: preprocessor-smoke-test', function() { +describe('Acceptance: preprocessor-smoke-test', function () { this.timeout(360000); - before(function() { + before(function () { return createTestTargets(appName); }); after(teardownTestTargets); - beforeEach(function() { + beforeEach(function () { appRoot = linkDependencies(appName); }); - afterEach(function() { + afterEach(function () { runCommand.killAll(); cleanupRun(appName); expect(dir(appRoot)).to.not.exist; }); - it('addons with standard preprocessors compile correctly', async function() { + it('addons with standard preprocessors compile correctly', async function () { await copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors`); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -53,7 +53,7 @@ describe('Acceptance: preprocessor-smoke-test', function() { expect(file('dist/assets/vendor.css')).to.contain('addon styles included'); }); - it('addon registry entries are added in the proper order', async function() { + it('addon registry entries are added in the proper order', async function () { await copyFixtureFiles(`preprocessor-tests/app-registry-ordering`); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -70,7 +70,7 @@ describe('Acceptance: preprocessor-smoke-test', function() { .to.not.contain('__FIRST_PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should not be contained'); }); - it('addons without preprocessors compile correctly', async function() { + it('addons without preprocessors compile correctly', async function () { await copyFixtureFiles(`preprocessor-tests/app-with-addon-without-preprocessors`); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -92,7 +92,7 @@ describe('Acceptance: preprocessor-smoke-test', function() { | |-- preprocessor should not apply to this */ - it('addons depending on preprocessor addon preprocesses addon but not app', async function() { + it('addons depending on preprocessor addon preprocesses addon but not app', async function () { await copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors-2`); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -120,7 +120,7 @@ describe('Acceptance: preprocessor-smoke-test', function() { | |-- preprocessor should not apply to this */ - it('addon N levels deep depending on preprocessor preprocesses that parent addon only', async function() { + it('addon N levels deep depending on preprocessor preprocesses that parent addon only', async function () { await copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors-3`); let packageJsonPath = path.join(appRoot, 'package.json'); diff --git a/tests/acceptance/smoke-test-slow.js b/tests/acceptance/smoke-test-slow.js index 40a0d76207..deb372801c 100644 --- a/tests/acceptance/smoke-test-slow.js +++ b/tests/acceptance/smoke-test-slow.js @@ -24,30 +24,30 @@ let dir = chai.dir; let appName = 'some-cool-app'; let appRoot; -describe('Acceptance: smoke-test', function() { +describe('Acceptance: smoke-test', function () { this.timeout(500000); - before(function() { + before(function () { return createTestTargets(appName); }); after(teardownTestTargets); - beforeEach(function() { + beforeEach(function () { appRoot = linkDependencies(appName); }); - afterEach(function() { + afterEach(function () { delete process.env._TESTEM_CONFIG_JS_RAN; runCommand.killAll(); cleanupRun(appName); expect(dir(appRoot)).to.not.exist; }); - it('ember new foo, clean from scratch', function() { + it('ember new foo, clean from scratch', function () { return runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); }); - it('ember new foo, make sure addon template overwrites', async function() { + it('ember new foo, make sure addon template overwrites', async function () { await ember(['generate', 'template', 'foo']); await ember(['generate', 'in-repo-addon', 'my-addon']); @@ -73,7 +73,7 @@ describe('Acceptance: smoke-test', function() { expect(result.code).to.equal(0); }); - it('ember test still runs when a JavaScript testem config exists', async function() { + it('ember test still runs when a JavaScript testem config exists', async function () { await copyFixtureFiles('smoke-tests/js-testem-config'); let result = await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); @@ -85,7 +85,7 @@ describe('Acceptance: smoke-test', function() { expect(output).to.include('***CUSTOM_TESTEM_JS**'); }); - it('eslint passes after running ember new', async function() { + it('eslint passes after running ember new', async function () { let result = await runCommand(path.join('.', 'node_modules', 'eslint', 'bin', 'eslint.js'), appRoot); let exitCode = result.code; @@ -98,14 +98,14 @@ describe('Acceptance: smoke-test', function() { // when run in isolation, it passes // here is the error: // test-support-80f2fe63fae0c44478fe0f8af73200a7.js contains the fingerprint (2871106928f813936fdd64f4d16005ac): expected 'test-support-80f2fe63fae0c44478fe0f8af73200a7.js' to include '2871106928f813936fdd64f4d16005ac' - it.skip('ember new foo, build production and verify fingerprint', async function() { + it.skip('ember new foo, build production and verify fingerprint', async function () { await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--environment=production'); let dirPath = path.join(appRoot, 'dist', 'assets'); let dir = fs.readdirSync(dirPath); let files = []; - dir.forEach(function(filepath) { + dir.forEach(function (filepath) { if (filepath === '.gitkeep') { return; } @@ -122,12 +122,12 @@ describe('Acceptance: smoke-test', function() { }); let indexHtml = file('dist/index.html'); - files.forEach(function(filename) { + files.forEach(function (filename) { expect(indexHtml).to.contain(filename); }); }); - it('ember test --environment=production', async function() { + it('ember test --environment=production', async function () { await copyFixtureFiles('smoke-tests/passing-test'); let result = await runCommand( @@ -144,7 +144,7 @@ describe('Acceptance: smoke-test', function() { expect(output).to.match(/pass\s+\d+/, 'many passing'); }); - it('ember test --path with previous build', async function() { + it('ember test --path with previous build', async function () { let originalWrite = process.stdout.write; let output = []; @@ -154,8 +154,8 @@ describe('Acceptance: smoke-test', function() { await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); // TODO: Figure out how to get this to write into the MockUI - process.stdout.write = (function() { - return function() { + process.stdout.write = (function () { + return function () { output.push(arguments[0]); }; })(originalWrite); @@ -175,7 +175,7 @@ describe('Acceptance: smoke-test', function() { expect(output).to.match(/pass\s+\d+/, 'many passing'); }); - it('ember test wasm', async function() { + it('ember test wasm', async function () { let originalWrite = process.stdout.write; let output = []; @@ -185,8 +185,8 @@ describe('Acceptance: smoke-test', function() { await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); // TODO: Figure out how to get this to write into the MockUI - process.stdout.write = (function() { - return function() { + process.stdout.write = (function () { + return function () { output.push(arguments[0]); }; })(originalWrite); @@ -206,7 +206,7 @@ describe('Acceptance: smoke-test', function() { expect(output).to.match(/pass\s+\d+/, 'many passing'); }); - it('ember new foo, build development, and verify generated files', async function() { + it('ember new foo, build development, and verify generated files', async function () { await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); let dirPath = path.join(appRoot, 'dist'); @@ -215,7 +215,7 @@ describe('Acceptance: smoke-test', function() { expect(paths).to.have.length.below(24, `expected fewer than 24 files in dist, found ${paths.length}`); }); - it('ember build exits with non-zero code when build fails', async function() { + it('ember build exits with non-zero code when build fails', async function () { let appJsPath = path.join(appRoot, 'app', 'app.js'); let result = await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -230,7 +230,7 @@ describe('Acceptance: smoke-test', function() { expect(result.code).to.not.equal(0, `expected exit code to be non-zero, but got ${result.code}`); }); - it('ember build generates instrumentation files when viz is enabled', async function() { + it('ember build generates instrumentation files when viz is enabled', async function () { process.env.BROCCOLI_VIZ = '1'; try { @@ -248,7 +248,7 @@ describe('Acceptance: smoke-test', function() { 'instrumentation.command.json', 'instrumentation.init.json', 'instrumentation.shutdown.json', - ].forEach(instrumentationFile => { + ].forEach((instrumentationFile) => { expect(fs.existsSync(instrumentationFile)).to.equal(true); let json = fs.readJsonSync(instrumentationFile); @@ -258,7 +258,7 @@ describe('Acceptance: smoke-test', function() { }); }); - it.skip('ember new foo, build --watch development, and verify rebuilt after change', async function() { + it.skip('ember new foo, build --watch development, and verify rebuilt after change', async function () { let touched = false; let appJsPath = path.join(appRoot, 'app', 'app.js'); let builtJsPath = path.join(appRoot, 'dist', 'assets', 'some-cool-app.js'); @@ -287,7 +287,7 @@ describe('Acceptance: smoke-test', function() { } }); - it.skip('ember new foo, build --watch development, and verify rebuilt after multiple changes', async function() { + it.skip('ember new foo, build --watch development, and verify rebuilt after multiple changes', async function () { let buildCount = 0; let touched = false; let appJsPath = path.join(appRoot, 'app', 'app.js'); @@ -329,7 +329,7 @@ describe('Acceptance: smoke-test', function() { } }); - it('build failures should be logged correctly', async function() { + it('build failures should be logged correctly', async function () { fs.writeFileSync( `${process.cwd()}/ember-cli-build.js`, ` @@ -368,7 +368,7 @@ module.exports = function() { ); }); - it.skip('ember new foo, server, SIGINT clears tmp/', async function() { + it.skip('ember new foo, server, SIGINT clears tmp/', async function () { let result = await runCommand( path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'server', @@ -391,12 +391,12 @@ module.exports = function() { // With broccoli2 that should not exist, they should be using os.tmpdir(). // So we'll just check for "if tmp/ is there, are the contents correct?" if (fs.existsSync(dirPath)) { - let dir = fs.readdirSync(dirPath).filter(file => file !== '.metadata_never_index'); + let dir = fs.readdirSync(dirPath).filter((file) => file !== '.metadata_never_index'); expect(dir.length, `${dirPath} should be empty`).to.equal(0); } }); - it('ember new foo, test, SIGINT exits with error and clears tmp/', async function() { + it('ember new foo, test, SIGINT exits with error and clears tmp/', async function () { let result = await expect( runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test', '--test-port=25522', { onOutput(string, child) { @@ -416,12 +416,12 @@ module.exports = function() { // With broccoli2 that should not exist, they should be using os.tmpdir(). // So we'll just check for "if tmp/ is there, are the contents correct?" if (fs.existsSync(dirPath)) { - let dir = fs.readdirSync(dirPath).filter(file => file !== '.metadata_never_index'); + let dir = fs.readdirSync(dirPath).filter((file) => file !== '.metadata_never_index'); expect(dir.length, `${dirPath} should be empty`).to.equal(0); } }); - it('ember new foo, build production and verify css files are concatenated', async function() { + it('ember new foo, build production and verify css files are concatenated', async function () { await copyFixtureFiles('with-styles'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--environment=production'); @@ -429,7 +429,7 @@ module.exports = function() { let dirPath = path.join(appRoot, 'dist', 'assets'); let dir = fs.readdirSync(dirPath); let cssNameRE = new RegExp(`${appName}-([a-f0-9]+)\\.css`, 'i'); - dir.forEach(function(filepath) { + dir.forEach(function (filepath) { if (cssNameRE.test(filepath)) { expect(file(`dist/assets/${filepath}`)) .to.contain('.some-weird-selector') @@ -438,7 +438,7 @@ module.exports = function() { }); }); - it('ember new foo, build production and verify css files are minified', async function() { + it('ember new foo, build production and verify css files are minified', async function () { await copyFixtureFiles('with-unminified-styles'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--environment=production'); @@ -446,7 +446,7 @@ module.exports = function() { let dirPath = path.join(appRoot, 'dist', 'assets'); let dir = fs.readdirSync(dirPath); let cssNameRE = new RegExp(`${appName}-([a-f0-9]+)\\.css`, 'i'); - dir.forEach(function(filepath) { + dir.forEach(function (filepath) { if (cssNameRE.test(filepath)) { let contents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', filepath), { encoding: 'utf8' }); expect(contents).to.match(/^\S+$/, 'css file is minified'); @@ -454,13 +454,13 @@ module.exports = function() { }); }); - it('ember new foo, build production and verify single "use strict";', async function() { + it('ember new foo, build production and verify single "use strict";', async function () { await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--environment=production'); let dirPath = path.join(appRoot, 'dist', 'assets'); let dir = fs.readdirSync(dirPath); let appNameRE = new RegExp(`${appName}-([a-f0-9]+)\\.js`, 'i'); - dir.forEach(function(filepath) { + dir.forEach(function (filepath) { if (appNameRE.test(filepath)) { let contents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', filepath), { encoding: 'utf8' }); let count = (contents.match(/(["'])use strict\1;/g) || []).length; @@ -469,7 +469,7 @@ module.exports = function() { }); }); - it('ember can override and reuse the built-in blueprints', async function() { + it('ember can override and reuse the built-in blueprints', async function () { await copyFixtureFiles('addon/with-blueprint-override'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'generate', 'component', 'foo-bar'); @@ -480,7 +480,7 @@ module.exports = function() { expect(file(filePath)).to.contain('generated component successfully'); }); - it('template linting works properly for pods and classic structured templates', async function() { + it('template linting works properly for pods and classic structured templates', async function () { await copyFixtureFiles('smoke-tests/with-template-failing-linting'); let packageJsonPath = 'package.json'; diff --git a/tests/factories/command-options.js b/tests/factories/command-options.js index 2dfc439b85..5f1df04fbe 100644 --- a/tests/factories/command-options.js +++ b/tests/factories/command-options.js @@ -7,10 +7,10 @@ const MockProject = require('../helpers/mock-project'); function createProject() { let project = new MockProject(); - project.isEmberCLIProject = function() { + project.isEmberCLIProject = function () { return true; }; - project.config = function() { + project.config = function () { return {}; }; return project; diff --git a/tests/helpers/acceptance.js b/tests/helpers/acceptance.js index 22b2482ec9..7dd1b49ede 100644 --- a/tests/helpers/acceptance.js +++ b/tests/helpers/acceptance.js @@ -36,7 +36,7 @@ function applyCommand(command, name /*, ...flags*/) { let binaryPath = path.resolve(path.join(__dirname, '..', '..', 'bin', 'ember')); let args = [binaryPath, command, name, '--disable-analytics', '--watcher=node', '--skip-git', runCommandOptions]; - flags.forEach(function(flag) { + flags.forEach(function (flag) { args.splice(2, 0, flag); }); diff --git a/tests/helpers/assert-version-lock.js b/tests/helpers/assert-version-lock.js index 96005d7adb..b82bd0310e 100644 --- a/tests/helpers/assert-version-lock.js +++ b/tests/helpers/assert-version-lock.js @@ -7,7 +7,7 @@ const semver = require('semver'); module.exports = function assertVersionLock(_deps) { let deps = _deps || {}; - Object.keys(deps).forEach(function(name) { + Object.keys(deps).forEach(function (name) { if (name !== 'ember-cli' && semver.valid(deps[name]) && semver.gtr('1.0.0', deps[name])) { // only valid if the version is fixed expect(semver.valid(deps[name]), `"${name}" has a valid version`).to.be.ok; diff --git a/tests/helpers/convert-help-output-to-json.js b/tests/helpers/convert-help-output-to-json.js index 56d69f9e68..585439fd08 100644 --- a/tests/helpers/convert-help-output-to-json.js +++ b/tests/helpers/convert-help-output-to-json.js @@ -1,5 +1,5 @@ 'use strict'; -module.exports = function(output) { +module.exports = function (output) { return JSON.parse(output.substr(output.indexOf('{'))); }; diff --git a/tests/helpers/fixturify-project.js b/tests/helpers/fixturify-project.js index d942579a86..0fdca2615c 100644 --- a/tests/helpers/fixturify-project.js +++ b/tests/helpers/fixturify-project.js @@ -38,7 +38,7 @@ module.exports = class EmberCLIFixturifyProject extends FixturifyProject { } addAddon(name, version = '0.0.0', cb) { - return this.addDependency(name, version, addon => { + return this.addDependency(name, version, (addon) => { prepareAddon(addon); if (typeof cb === 'function') { @@ -48,7 +48,7 @@ module.exports = class EmberCLIFixturifyProject extends FixturifyProject { } addDevAddon(name, version = '0.0.0', cb) { - return this.addDevDependency(name, version, addon => { + return this.addDevDependency(name, version, (addon) => { prepareAddon(addon); if (typeof cb === 'function') { cb(addon); @@ -57,7 +57,7 @@ module.exports = class EmberCLIFixturifyProject extends FixturifyProject { } addInRepoAddon(name, version = '0.0.0', cb) { - const inRepoAddon = new FixturifyProject(name, version, project => { + const inRepoAddon = new FixturifyProject(name, version, (project) => { project.pkg.keywords.push('ember-addon'); project.pkg['ember-addon'] = {}; project.files['index.js'] = 'module.exports = { name: require("./package").name };'; @@ -72,7 +72,7 @@ module.exports = class EmberCLIFixturifyProject extends FixturifyProject { addon.paths = addon.paths || []; const addonPath = `lib/${name}`; - if (addon.paths.find(path => path.toLowerCase() === addonPath.toLowerCase())) { + if (addon.paths.find((path) => path.toLowerCase() === addonPath.toLowerCase())) { throw new Error(`project: ${this.name} already contains the in-repo-addon: ${name}`); } diff --git a/tests/helpers/kill-cli-process.js b/tests/helpers/kill-cli-process.js index 336971b073..aef4d0318c 100644 --- a/tests/helpers/kill-cli-process.js +++ b/tests/helpers/kill-cli-process.js @@ -1,6 +1,6 @@ 'use strict'; -module.exports = function(childProcess) { +module.exports = function (childProcess) { // Calling `.kill` or `.send` when the process has already exited causes // errors on Windows, when an `.exitCode` is non-null the process has exited if (childProcess.exitCode !== null) { diff --git a/tests/helpers/log-on-failure.js b/tests/helpers/log-on-failure.js index d38ad41e49..7bfca90439 100644 --- a/tests/helpers/log-on-failure.js +++ b/tests/helpers/log-on-failure.js @@ -4,11 +4,11 @@ let logSink; -beforeEach(function() { +beforeEach(function () { logSink = []; }); -afterEach(function() { +afterEach(function () { if (this.currentTest && this.currentTest.state !== 'passed') { // It would be preferable to attach the log output to the error object // (this.currentTest.err) and have Mocha report it somehow, so that the diff --git a/tests/helpers/mock-process.js b/tests/helpers/mock-process.js index 97cbe4b516..15f08718d3 100644 --- a/tests/helpers/mock-process.js +++ b/tests/helpers/mock-process.js @@ -14,7 +14,7 @@ module.exports = class MockProcess extends EventEmitter { new EventEmitter(), { isRaw: process.stdin.isRaw, - setRawMode: flag => { + setRawMode: (flag) => { stdin.isRaw = flag; }, }, diff --git a/tests/helpers/mock-project.js b/tests/helpers/mock-project.js index 025707d771..97655e1aa3 100644 --- a/tests/helpers/mock-project.js +++ b/tests/helpers/mock-project.js @@ -27,7 +27,7 @@ class MockProject extends Project { require(file) { if (file === './server') { - return function() { + return function () { return { listen() { arguments[arguments.length - 1](); diff --git a/tests/helpers/process-help-string.js b/tests/helpers/process-help-string.js index c596ecea30..ebb6deae3c 100644 --- a/tests/helpers/process-help-string.js +++ b/tests/helpers/process-help-string.js @@ -5,7 +5,7 @@ const chalk = require('chalk'); // eslint-disable-next-line node/no-unpublished-require const stripAnsi = require('strip-ansi'); -module.exports = function(helpString) { +module.exports = function (helpString) { // currently windows if (chalk.supportsColor) { return helpString; diff --git a/tests/helpers/proxy-server.js b/tests/helpers/proxy-server.js index 058dfc1bfe..50aef85b34 100644 --- a/tests/helpers/proxy-server.js +++ b/tests/helpers/proxy-server.js @@ -22,15 +22,15 @@ class ProxyServer { }); let websocketEvents = (this.websocketEvents = []); - wsServer.on('connect', connection => { + wsServer.on('connect', (connection) => { websocketEvents.push('connect'); - connection.on('message', message => { + connection.on('message', (message) => { websocketEvents.push(`message: ${message.utf8Data}`); connection.sendUTF(message.utf8Data); }); - connection.on('error', error => { + connection.on('error', (error) => { websocketEvents.push(`error: ${error}`); }); diff --git a/tests/helpers/run-command.js b/tests/helpers/run-command.js index 439661dca8..c2942523ab 100644 --- a/tests/helpers/run-command.js +++ b/tests/helpers/run-command.js @@ -47,7 +47,7 @@ module.exports = function run(/* command, args, options */) { }); let child; - const promise = new Promise(function(resolve, reject) { + const promise = new Promise(function (resolve, reject) { options.log(` Running: ${command} ${args.join(' ')} in: ${process.cwd()}`); let opts = {}; @@ -73,7 +73,7 @@ module.exports = function run(/* command, args, options */) { code: null, }; - child.stdout.on('data', function(data) { + child.stdout.on('data', function (data) { let string = data.toString(); options.onOutput(string, child); @@ -81,7 +81,7 @@ module.exports = function run(/* command, args, options */) { result.output.push(string); }); - child.stderr.on('data', function(data) { + child.stderr.on('data', function (data) { let string = data.toString(); options.onError(string, child); @@ -89,7 +89,7 @@ module.exports = function run(/* command, args, options */) { result.errors.push(string); }); - child.on('close', function(code, signal) { + child.on('close', function (code, signal) { result.code = code; result.signal = signal; @@ -101,15 +101,15 @@ module.exports = function run(/* command, args, options */) { }); }); - promise.kill = function() { + promise.kill = function () { killCliProcess(child); }; return promise; }; -module.exports.killAll = function() { - RUNS.forEach(run => { +module.exports.killAll = function () { + RUNS.forEach((run) => { try { killCliProcess(run); } catch (e) { diff --git a/tests/helpers/tmp.js b/tests/helpers/tmp.js index 1275522cd7..17774f4001 100644 --- a/tests/helpers/tmp.js +++ b/tests/helpers/tmp.js @@ -4,15 +4,15 @@ const fs = require('fs-extra'); let root = process.cwd(); -module.exports.setup = function(path) { +module.exports.setup = function (path) { process.chdir(root); - return fs.remove(path).then(function() { + return fs.remove(path).then(function () { fs.mkdirsSync(path); }); }; -module.exports.teardown = function(path) { +module.exports.teardown = function (path) { process.chdir(root); return fs.remove(path); }; diff --git a/tests/integration/models/blueprint-test.js b/tests/integration/models/blueprint-test.js index 621e177050..2d81ce793f 100644 --- a/tests/integration/models/blueprint-test.js +++ b/tests/integration/models/blueprint-test.js @@ -110,22 +110,22 @@ let basicBlueprintFilesAfterBasic2 = [ 'test.txt', ]; -describe('Blueprint', function() { +describe('Blueprint', function () { const BasicBlueprintClass = require(basicBlueprint); let InstrumentedBasicBlueprint = BasicBlueprintClass.extend(instrumented); - beforeEach(function() { + beforeEach(function () { resetCalled(); }); - afterEach(function() { + afterEach(function () { td.reset(); }); - describe('.fileMapTokens', function() { - it('adds additional tokens from fileMapTokens hook', function() { + describe('.fileMapTokens', function () { + it('adds additional tokens from fileMapTokens hook', function () { let blueprint = Blueprint.lookup(basicBlueprint); - blueprint.fileMapTokens = function() { + blueprint.fileMapTokens = function () { return { __foo__() { return 'foo'; @@ -137,8 +137,8 @@ describe('Blueprint', function() { }); }); - describe('.generateFileMap', function() { - it('should not have locals in the fileMap', function() { + describe('.generateFileMap', function () { + it('should not have locals in the fileMap', function () { let blueprint = Blueprint.lookup(basicBlueprint); let fileMapVariables = { @@ -162,8 +162,8 @@ describe('Blueprint', function() { }); }); - describe('.lookup', function() { - it('uses an explicit path if one is given', function() { + describe('.lookup', function () { + it('uses an explicit path if one is given', function () { const expectedClass = require(basicBlueprint); let blueprint = Blueprint.lookup(basicBlueprint); @@ -172,7 +172,7 @@ describe('Blueprint', function() { expect(blueprint instanceof expectedClass).to.equal(true); }); - it('finds blueprints within given lookup paths', function() { + it('finds blueprints within given lookup paths', function () { const expectedClass = require(basicBlueprint); let blueprint = Blueprint.lookup('basic', { paths: [fixtureBlueprints], @@ -183,7 +183,7 @@ describe('Blueprint', function() { expect(blueprint instanceof expectedClass).to.equal(true); }); - it('finds blueprints in the ember-cli package', function() { + it('finds blueprints in the ember-cli package', function () { let expectedPath = path.resolve(defaultBlueprints, 'app'); let expectedClass = Blueprint; @@ -194,7 +194,7 @@ describe('Blueprint', function() { expect(blueprint instanceof expectedClass).to.equal(true); }); - it('can instantiate a blueprint that exports an object instead of a constructor', function() { + it('can instantiate a blueprint that exports an object instead of a constructor', function () { let blueprint = Blueprint.lookup('exporting-object', { paths: [fixtureBlueprints], }); @@ -203,13 +203,13 @@ describe('Blueprint', function() { expect(blueprint instanceof Blueprint).to.equal(true); }); - it('throws an error if no blueprint is found', function() { + it('throws an error if no blueprint is found', function () { expect(() => { Blueprint.lookup('foo'); }).to.throw('Unknown blueprint: foo'); }); - it('returns undefined if no blueprint is found and ignoredMissing is passed', function() { + it('returns undefined if no blueprint is found and ignoredMissing is passed', function () { let blueprint = Blueprint.lookup('foo', { ignoreMissing: true, }); @@ -218,32 +218,32 @@ describe('Blueprint', function() { }); }); - it('exists', function() { + it('exists', function () { let blueprint = new Blueprint(basicBlueprint); expect(!!blueprint).to.equal(true); }); - it('derives name from path', function() { + it('derives name from path', function () { let blueprint = new Blueprint(basicBlueprint); expect(blueprint.name).to.equal('basic'); }); - describe('filesPath', function() { - it('returns the blueprints default files path', function() { + describe('filesPath', function () { + it('returns the blueprints default files path', function () { let blueprint = new Blueprint(basicBlueprint); expect(blueprint.filesPath()).to.equal(path.join(basicBlueprint, 'files')); }); }); - describe('basic blueprint installation', function() { + describe('basic blueprint installation', function () { let blueprint; let ui; let project; let options; let tmpdir; - beforeEach(async function() { + beforeEach(async function () { const dir = await mkTmpDirIn(tempRoot); tmpdir = dir; blueprint = new InstrumentedBasicBlueprint(basicBlueprint); @@ -258,11 +258,11 @@ describe('Blueprint', function() { }; }); - afterEach(async function() { + afterEach(async function () { await remove(tempRoot); }); - it('installs basic files', async function() { + it('installs basic files', async function () { expect(!!blueprint).to.equal(true); await blueprint.install(options); @@ -281,7 +281,7 @@ describe('Blueprint', function() { expect(output.length).to.equal(0); expect(actualFiles).to.deep.equal(basicBlueprintFiles); expect(() => { - fs.readFile(path.join(tmpdir, 'test.txt'), 'utf-8', function(err, content) { + fs.readFile(path.join(tmpdir, 'test.txt'), 'utf-8', function (err, content) { if (err) { throw 'error'; } @@ -290,7 +290,7 @@ describe('Blueprint', function() { }).not.to.throw(); }); - it('re-installing identical files', async function() { + it('re-installing identical files', async function () { await blueprint.install(options); let output = ui.output.trim().split(EOL); @@ -324,7 +324,7 @@ describe('Blueprint', function() { expect(actualFiles).to.deep.equal(basicBlueprintFiles); }); - it('re-installing conflicting files', async function() { + it('re-installing conflicting files', async function () { td.when(ui.prompt(td.matchers.anything())).thenReturn( Promise.resolve({ answer: 'skip' }), Promise.resolve({ answer: 'overwrite' }) @@ -366,7 +366,7 @@ describe('Blueprint', function() { expect(actualFiles).to.deep.equal(basicBlueprintFilesAfterBasic2); }); - it('installs path globPattern file', async function() { + it('installs path globPattern file', async function () { options.targetFiles = ['foo.txt']; await blueprint.install(options); let actualFiles = walkSync(tmpdir).sort(); @@ -387,7 +387,7 @@ describe('Blueprint', function() { expect(actualFiles).to.deep.equal(globFiles); }); - it('installs multiple globPattern files', async function() { + it('installs multiple globPattern files', async function () { options.targetFiles = ['foo.txt', 'test.txt']; await blueprint.install(options); let actualFiles = walkSync(tmpdir).sort(); @@ -409,12 +409,12 @@ describe('Blueprint', function() { expect(actualFiles).to.deep.equal(globFiles); }); - describe('called on an existing project', function() { - beforeEach(function() { + describe('called on an existing project', function () { + beforeEach(function () { Blueprint.ignoredUpdateFiles.push('foo.txt'); }); - it('ignores files in ignoredUpdateFiles', async function() { + it('ignores files in ignoredUpdateFiles', async function () { td.when(ui.prompt(), { ignoreExtraArgs: true }).thenReturn(Promise.resolve({ answer: 'skip' })); await blueprint.install(options); @@ -433,7 +433,7 @@ describe('Blueprint', function() { let blueprintNew = new Blueprint(basicNewBlueprint); - options.project.isEmberCLIProject = function() { + options.project.isEmberCLIProject = function () { return true; }; @@ -453,12 +453,12 @@ describe('Blueprint', function() { }); }); - describe('called on a new project', function() { - beforeEach(function() { + describe('called on a new project', function () { + beforeEach(function () { Blueprint.ignoredUpdateFiles.push('foo.txt'); }); - it('does not ignores files in ignoredUpdateFiles', async function() { + it('does not ignores files in ignoredUpdateFiles', async function () { td.when(ui.prompt(), { ignoreExtraArgs: true }).thenReturn(Promise.resolve({ answer: 'skip' })); await blueprint.install(options); @@ -477,7 +477,7 @@ describe('Blueprint', function() { let blueprintNew = new Blueprint(basicNewBlueprint); - options.project.isEmberCLIProject = function() { + options.project.isEmberCLIProject = function () { return false; }; @@ -498,7 +498,7 @@ describe('Blueprint', function() { }); }); - it('throws error when there is a trailing forward slash in entityName', function() { + it('throws error when there is a trailing forward slash in entityName', function () { options.entity = { name: 'foo/' }; expect(() => { blueprint.install(options); @@ -519,14 +519,14 @@ describe('Blueprint', function() { }).not.to.throw(); }); - it('throws error when an entityName is not provided', function() { + it('throws error when an entityName is not provided', function () { options.entity = {}; expect(() => { blueprint.install(options); }).to.throw(SilentError, /The `ember generate ` command requires an entity name to be specified./); }); - it('throws error when an action does not exist', async function() { + it('throws error when an action does not exist', async function () { blueprint._actions = {}; try { await blueprint.install(options); @@ -536,9 +536,9 @@ describe('Blueprint', function() { } }); - it('calls normalizeEntityName hook during install', async function() { - const wait = new Promise(resolve => { - blueprint.normalizeEntityName = function() { + it('calls normalizeEntityName hook during install', async function () { + const wait = new Promise((resolve) => { + blueprint.normalizeEntityName = function () { resolve(); }; }); @@ -547,8 +547,8 @@ describe('Blueprint', function() { await wait; }); - it('normalizeEntityName hook can modify the entity name', async function() { - blueprint.normalizeEntityName = function() { + it('normalizeEntityName hook can modify the entity name', async function () { + blueprint.normalizeEntityName = function () { return 'foo'; }; options.entity = { name: 'bar' }; @@ -560,11 +560,11 @@ describe('Blueprint', function() { expect(actualFiles).to.not.contain('app/basics/mock-project.txt'); }); - it('calls normalizeEntityName before locals hook is called', function(done) { - blueprint.normalizeEntityName = function() { + it('calls normalizeEntityName before locals hook is called', function (done) { + blueprint.normalizeEntityName = function () { return 'foo'; }; - blueprint.locals = function(options) { + blueprint.locals = function (options) { expect(options.entity.name).to.equal('foo'); done(); }; @@ -572,7 +572,7 @@ describe('Blueprint', function() { blueprint.install(options); }); - it('calls appropriate hooks with correct arguments', async function() { + it('calls appropriate hooks with correct arguments', async function () { options.entity = { name: 'foo' }; await blueprint.install(options); @@ -586,12 +586,12 @@ describe('Blueprint', function() { expect(afterUninstallCalled).to.be.false; }); - it("doesn't throw when running uninstall without installing first", function() { + it("doesn't throw when running uninstall without installing first", function () { return blueprint.uninstall(options); }); }); - describe('basic blueprint uninstallation', function() { + describe('basic blueprint uninstallation', function () { const BasicBlueprintClass = require(basicBlueprint); let blueprint; let ui; @@ -604,7 +604,7 @@ describe('Blueprint', function() { options.ui = ui; } - beforeEach(async function() { + beforeEach(async function () { let dir = await mkTmpDirIn(tempRoot); tmpdir = dir; @@ -620,11 +620,11 @@ describe('Blueprint', function() { refreshUI(); }); - afterEach(async function() { + afterEach(async function () { await remove(tempRoot); }); - it('uninstalls basic files', async function() { + it('uninstalls basic files', async function () { expect(!!blueprint).to.equal(true); await blueprint.uninstall(options); @@ -646,7 +646,7 @@ describe('Blueprint', function() { expect(fs.existsSync(path.join(tmpdir, 'test.txt'))).to.be.false; }); - it("uninstall doesn't remove non-empty folders", async function() { + it("uninstall doesn't remove non-empty folders", async function () { options.entity = { name: 'foo' }; await blueprint.install(options); @@ -662,7 +662,7 @@ describe('Blueprint', function() { expect(actualFiles).to.contain('app/basics/mock-project.txt'); }); - it("uninstall doesn't log remove messages when file does not exist", async function() { + it("uninstall doesn't log remove messages when file does not exist", async function () { options.entity = { name: 'does-not-exist' }; await blueprint.uninstall(options); @@ -674,7 +674,7 @@ describe('Blueprint', function() { }); }); - describe('instrumented blueprint uninstallation', function() { + describe('instrumented blueprint uninstallation', function () { let blueprint; let ui; let project; @@ -686,7 +686,7 @@ describe('Blueprint', function() { options.ui = ui; } - beforeEach(async function() { + beforeEach(async function () { let dir = await mkTmpDirIn(tempRoot); tmpdir = dir; blueprint = new InstrumentedBasicBlueprint(basicBlueprint); @@ -701,7 +701,7 @@ describe('Blueprint', function() { refreshUI(); }); - it('calls appropriate hooks with correct arguments', async function() { + it('calls appropriate hooks with correct arguments', async function () { options.entity = { name: 'foo' }; await blueprint.uninstall(options); @@ -717,23 +717,23 @@ describe('Blueprint', function() { }); }); - describe('addPackageToProject', function() { + describe('addPackageToProject', function () { let blueprint; - beforeEach(function() { + beforeEach(function () { blueprint = new Blueprint(basicBlueprint); }); - it('passes a packages array for addPackagesToProject', function() { - blueprint.addPackagesToProject = function(packages) { + it('passes a packages array for addPackagesToProject', function () { + blueprint.addPackagesToProject = function (packages) { expect(packages).to.deep.equal([{ name: 'foo-bar' }]); }; blueprint.addPackageToProject('foo-bar'); }); - it('passes a packages array with target for addPackagesToProject', function() { - blueprint.addPackagesToProject = function(packages) { + it('passes a packages array with target for addPackagesToProject', function () { + blueprint.addPackagesToProject = function (packages) { expect(packages).to.deep.equal([{ name: 'foo-bar', target: '^123.1.12' }]); }; @@ -741,26 +741,26 @@ describe('Blueprint', function() { }); }); - describe('addPackagesToProject', function() { + describe('addPackagesToProject', function () { let blueprint; let ui; let NpmInstallTask; let taskNameLookedUp; - beforeEach(function() { + beforeEach(function () { blueprint = new Blueprint(basicBlueprint); ui = new MockUI(); - blueprint.taskFor = function(name) { + blueprint.taskFor = function (name) { taskNameLookedUp = name; return new NpmInstallTask(); }; }); - afterEach(async function() { + afterEach(async function () { await remove(tempRoot); }); - it('looks up the `npm-install` task', function() { + it('looks up the `npm-install` task', function () { NpmInstallTask = Task.extend({ run() {}, }); @@ -770,7 +770,7 @@ describe('Blueprint', function() { expect(taskNameLookedUp).to.equal('npm-install'); }); - it('calls the task with package names', function() { + it('calls the task with package names', function () { let packages; NpmInstallTask = Task.extend({ @@ -784,7 +784,7 @@ describe('Blueprint', function() { expect(packages).to.deep.equal(['foo-bar', 'bar-foo']); }); - it('calls the task with package names and versions', function() { + it('calls the task with package names and versions', function () { let packages; NpmInstallTask = Task.extend({ @@ -801,7 +801,7 @@ describe('Blueprint', function() { expect(packages).to.deep.equal(['foo-bar@^123.1.12', 'bar-foo@0.0.7']); }); - it('writes information to the ui log for a single package', function() { + it('writes information to the ui log for a single package', function () { blueprint.ui = ui; blueprint.addPackagesToProject([{ name: 'foo-bar', target: '^123.1.12' }]); @@ -811,7 +811,7 @@ describe('Blueprint', function() { expect(output).to.match(/install package.*foo-bar/); }); - it('writes information to the ui log for multiple packages', function() { + it('writes information to the ui log for multiple packages', function () { blueprint.ui = ui; blueprint.addPackagesToProject([ @@ -824,7 +824,7 @@ describe('Blueprint', function() { expect(output).to.match(/install packages.*foo-bar, bar-foo/); }); - it('does not error if ui is not present', function() { + it('does not error if ui is not present', function () { delete blueprint.ui; blueprint.addPackagesToProject([{ name: 'foo-bar', target: '^123.1.12' }]); @@ -834,7 +834,7 @@ describe('Blueprint', function() { expect(output).to.not.match(/install package.*foo-bar/); }); - it('runs task with --save-dev', function() { + it('runs task with --save-dev', function () { let saveDev; NpmInstallTask = Task.extend({ @@ -851,7 +851,7 @@ describe('Blueprint', function() { expect(!!saveDev).to.equal(true); }); - it('does not use verbose mode with the task', function() { + it('does not use verbose mode with the task', function () { let verbose; NpmInstallTask = Task.extend({ @@ -869,33 +869,33 @@ describe('Blueprint', function() { }); }); - describe('removePackageFromProject', function() { + describe('removePackageFromProject', function () { let blueprint; let NpmUninstallTask; let taskNameLookedUp; let project; - beforeEach(function() { + beforeEach(function () { project = new MockProject(); blueprint = new Blueprint(basicBlueprint); blueprint.project = project; - blueprint.taskFor = function(name) { + blueprint.taskFor = function (name) { taskNameLookedUp = name; return new NpmUninstallTask(); }; }); - afterEach(async function() { + afterEach(async function () { await remove(tempRoot); }); - it('looks up the `npm-uninstall` task', function() { + it('looks up the `npm-uninstall` task', function () { NpmUninstallTask = Task.extend({ run() {}, }); - project.dependencies = function() { + project.dependencies = function () { return { 'foo-bar': '1.0.0', }; @@ -906,30 +906,30 @@ describe('Blueprint', function() { }); }); - describe('removePackagesFromProject', function() { + describe('removePackagesFromProject', function () { let blueprint; let ui; let NpmUninstallTask; let taskNameLookedUp; let project; - beforeEach(function() { + beforeEach(function () { project = new MockProject(); blueprint = new Blueprint(basicBlueprint); ui = new MockUI(); blueprint.project = project; - blueprint.taskFor = function(name) { + blueprint.taskFor = function (name) { taskNameLookedUp = name; return new NpmUninstallTask(); }; }); - afterEach(function() { + afterEach(function () { return remove(tempRoot); }); - it('looks up the `npm-uninstall` task', function() { + it('looks up the `npm-uninstall` task', function () { NpmUninstallTask = Task.extend({ run() {}, }); @@ -939,7 +939,7 @@ describe('Blueprint', function() { expect(taskNameLookedUp).to.equal('npm-uninstall'); }); - it('calls the task with only existing packages', function() { + it('calls the task with only existing packages', function () { let packages; NpmUninstallTask = Task.extend({ @@ -948,7 +948,7 @@ describe('Blueprint', function() { }, }); - project.dependencies = function() { + project.dependencies = function () { return { 'foo-bar': '1.0.0', 'bar-zoo': '2.0.0', @@ -960,7 +960,7 @@ describe('Blueprint', function() { expect(packages).to.deep.equal(['foo-bar']); }); - it('skips uninstall if no matching package exists', function() { + it('skips uninstall if no matching package exists', function () { let packages; NpmUninstallTask = Task.extend({ @@ -969,7 +969,7 @@ describe('Blueprint', function() { }, }); - project.dependencies = function() { + project.dependencies = function () { return { 'foo-baz': '1.0.0', 'bar-zoo': '2.0.0', @@ -981,7 +981,7 @@ describe('Blueprint', function() { expect(packages).to.deep.equal(undefined); }); - it('calls the task with package names', function() { + it('calls the task with package names', function () { let packages; NpmUninstallTask = Task.extend({ @@ -990,7 +990,7 @@ describe('Blueprint', function() { }, }); - project.dependencies = function() { + project.dependencies = function () { return { 'foo-bar': '1.0.0', 'bar-foo': '2.0.0', @@ -1002,10 +1002,10 @@ describe('Blueprint', function() { expect(packages).to.deep.equal(['foo-bar', 'bar-foo']); }); - it('writes information to the ui log for a single package', function() { + it('writes information to the ui log for a single package', function () { blueprint.ui = ui; - project.dependencies = function() { + project.dependencies = function () { return { 'foo-bar': '1.0.0', }; @@ -1018,10 +1018,10 @@ describe('Blueprint', function() { expect(output).to.match(/uninstall package.*foo-bar/); }); - it('writes information to the ui log for multiple packages', function() { + it('writes information to the ui log for multiple packages', function () { blueprint.ui = ui; - project.dependencies = function() { + project.dependencies = function () { return { 'foo-bar': '1.0.0', 'bar-foo': '2.0.0', @@ -1035,7 +1035,7 @@ describe('Blueprint', function() { expect(output).to.match(/uninstall packages.*foo-bar, bar-foo/); }); - it('does not error if ui is not present', function() { + it('does not error if ui is not present', function () { delete blueprint.ui; blueprint.removePackagesFromProject([{ name: 'foo-bar' }]); @@ -1045,7 +1045,7 @@ describe('Blueprint', function() { expect(output).to.not.match(/uninstall package.*foo-bar/); }); - it('runs task with --save-dev', function() { + it('runs task with --save-dev', function () { let saveDev; NpmUninstallTask = Task.extend({ @@ -1054,7 +1054,7 @@ describe('Blueprint', function() { }, }); - project.dependencies = function() { + project.dependencies = function () { return { 'foo-bar': '1.0.0', 'bar-foo': '2.0.0', @@ -1066,7 +1066,7 @@ describe('Blueprint', function() { expect(!!saveDev).to.equal(true); }); - it('does not use verbose mode with the task', function() { + it('does not use verbose mode with the task', function () { let verbose; NpmUninstallTask = Task.extend({ @@ -1075,7 +1075,7 @@ describe('Blueprint', function() { }, }); - project.dependencies = function() { + project.dependencies = function () { return { 'foo-bar': '1.0.0', 'bar-foo': '2.0.0', @@ -1088,50 +1088,50 @@ describe('Blueprint', function() { }); }); - describe('addBowerPackageToProject', function() { + describe('addBowerPackageToProject', function () { let blueprint; let ui; let BowerInstallTask; - beforeEach(function() { + beforeEach(function () { blueprint = new Blueprint(basicBlueprint); ui = new MockUI(); blueprint.ui = ui; - blueprint.taskFor = function() { + blueprint.taskFor = function () { return new BowerInstallTask(); }; }); - afterEach(async function() { + afterEach(async function () { await remove(tempRoot); }); - it('passes a packages array for addBowerPackagesToProject', function() { - blueprint.addBowerPackagesToProject = function(packages) { + it('passes a packages array for addBowerPackagesToProject', function () { + blueprint.addBowerPackagesToProject = function (packages) { expect(packages).to.deep.equal([{ name: 'foo-bar', source: 'foo-bar', target: '*' }]); }; blueprint.addBowerPackageToProject('foo-bar'); }); - it('passes a packages array with target for addBowerPackagesToProject', function() { - blueprint.addBowerPackagesToProject = function(packages) { + it('passes a packages array with target for addBowerPackagesToProject', function () { + blueprint.addBowerPackagesToProject = function (packages) { expect(packages).to.deep.equal([{ name: 'foo-bar', source: 'foo-bar', target: '1.0.0' }]); }; blueprint.addBowerPackageToProject('foo-bar', '1.0.0'); }); - it('correctly handles local package naming, with a numbered pkg version', function() { - blueprint.addBowerPackagesToProject = function(packages) { + it('correctly handles local package naming, with a numbered pkg version', function () { + blueprint.addBowerPackagesToProject = function (packages) { expect(packages).to.deep.equal([{ name: 'foo-bar-local', target: '1.0.0', source: 'foo-bar' }]); }; blueprint.addBowerPackageToProject('foo-bar-local', 'foo-bar#1.0.0'); }); - it('correctly handles local package naming, with a non-versioned package', function() { - blueprint.addBowerPackagesToProject = function(packages) { + it('correctly handles local package naming, with a non-versioned package', function () { + blueprint.addBowerPackagesToProject = function (packages) { expect(packages).to.deep.equal([ { name: 'foo-bar-local', target: '*', source: 'https://twitter.github.io/bootstrap/assets/bootstrap' }, ]); @@ -1141,24 +1141,24 @@ describe('Blueprint', function() { }); }); - describe('addBowerPackagesToProject', function() { + describe('addBowerPackagesToProject', function () { let blueprint; let BowerInstallTask; let taskNameLookedUp; - beforeEach(function() { + beforeEach(function () { blueprint = new Blueprint(basicBlueprint); - blueprint.taskFor = function(name) { + blueprint.taskFor = function (name) { taskNameLookedUp = name; return new BowerInstallTask(); }; }); - afterEach(async function() { + afterEach(async function () { await remove(tempRoot); }); - it('looks up the `bower-install` task', function() { + it('looks up the `bower-install` task', function () { BowerInstallTask = Task.extend({ run() {}, }); @@ -1167,7 +1167,7 @@ describe('Blueprint', function() { expect(taskNameLookedUp).to.equal('bower-install'); }); - it('calls the task with the package names', function() { + it('calls the task with the package names', function () { let packages; BowerInstallTask = Task.extend({ @@ -1181,7 +1181,7 @@ describe('Blueprint', function() { expect(packages).to.deep.equal(['foo-bar=foo-bar', 'bar-foo=bar-foo']); }); - it('uses the provided target (version, range, sha, etc)', function() { + it('uses the provided target (version, range, sha, etc)', function () { let packages; BowerInstallTask = Task.extend({ @@ -1198,7 +1198,7 @@ describe('Blueprint', function() { expect(packages).to.deep.equal(['foo-bar=foo-bar#~1.0.0', 'bar-foo=bar-foo#0.7.0']); }); - it('properly parses a variety of bower package endpoints', function() { + it('properly parses a variety of bower package endpoints', function () { let packages; BowerInstallTask = Task.extend({ @@ -1223,7 +1223,7 @@ describe('Blueprint', function() { ]); }); - it('uses uses verbose mode with the task', function() { + it('uses uses verbose mode with the task', function () { let verbose; BowerInstallTask = Task.extend({ @@ -1241,27 +1241,27 @@ describe('Blueprint', function() { }); }); - describe('addAddonToProject', function() { + describe('addAddonToProject', function () { let blueprint; - beforeEach(function() { + beforeEach(function () { blueprint = new Blueprint(basicBlueprint); }); - afterEach(async function() { + afterEach(async function () { await remove(tempRoot); }); - it('passes a packages array for addAddonsToProject', function() { - blueprint.addAddonsToProject = function(options) { + it('passes a packages array for addAddonsToProject', function () { + blueprint.addAddonsToProject = function (options) { expect(options.packages).to.deep.equal(['foo-bar']); }; blueprint.addAddonToProject('foo-bar'); }); - it('passes a packages array with target for addAddonsToProject', function() { - blueprint.addAddonsToProject = function(options) { + it('passes a packages array with target for addAddonsToProject', function () { + blueprint.addAddonsToProject = function (options) { expect(options.packages).to.deep.equal([{ name: 'foo-bar', target: '^123.1.12' }]); }; @@ -1269,26 +1269,26 @@ describe('Blueprint', function() { }); }); - describe('addAddonsToProject', function() { + describe('addAddonsToProject', function () { let blueprint; let ui; let AddonInstallTask; let taskNameLookedUp; - beforeEach(function() { + beforeEach(function () { blueprint = new Blueprint(basicBlueprint); ui = new MockUI(); - blueprint.taskFor = function(name) { + blueprint.taskFor = function (name) { taskNameLookedUp = name; return new AddonInstallTask(); }; }); - afterEach(async function() { + afterEach(async function () { await remove(tempRoot); }); - it('looks up the `addon-install` task', function() { + it('looks up the `addon-install` task', function () { AddonInstallTask = Task.extend({ run() {}, }); @@ -1298,7 +1298,7 @@ describe('Blueprint', function() { expect(taskNameLookedUp).to.equal('addon-install'); }); - it('calls the task with package name', function() { + it('calls the task with package name', function () { let pkg; AddonInstallTask = Task.extend({ @@ -1312,7 +1312,7 @@ describe('Blueprint', function() { expect(pkg).to.deep.equal(['foo-bar', 'baz-bat']); }); - it('calls the task with correctly parsed options', function() { + it('calls the task with correctly parsed options', function () { let pkg, args, bluOpts; AddonInstallTask = Task.extend({ @@ -1341,7 +1341,7 @@ describe('Blueprint', function() { expect(bluOpts).to.equal('-foo'); }); - it('writes information to the ui log for a single package', function() { + it('writes information to the ui log for a single package', function () { blueprint.ui = ui; blueprint.addAddonsToProject({ @@ -1358,7 +1358,7 @@ describe('Blueprint', function() { expect(output).to.match(/install addon.*foo-bar/); }); - it('writes information to the ui log for multiple packages', function() { + it('writes information to the ui log for multiple packages', function () { blueprint.ui = ui; blueprint.addAddonsToProject({ @@ -1377,7 +1377,7 @@ describe('Blueprint', function() { expect(output).to.match(/install addons.*foo-bar@1.0.0,.*stuff-things,.*baz-bat@0.0.1/); }); - it('does not error if ui is not present', function() { + it('does not error if ui is not present', function () { delete blueprint.ui; blueprint.addAddonsToProject({ @@ -1395,24 +1395,24 @@ describe('Blueprint', function() { }); }); - describe('load', function() { - it('loads and returns a blueprint object', function() { + describe('load', function () { + it('loads and returns a blueprint object', function () { let blueprint = Blueprint.load(basicBlueprint); expect(blueprint).to.be.an('object'); expect(blueprint.name).to.equal('basic'); }); - it('loads only blueprints with an index.js', function() { + it('loads only blueprints with an index.js', function () { expect(Blueprint.load(path.join(fixtureBlueprints, '.notablueprint'))).to.not.exist; }); }); - describe('lookupBlueprint', function() { + describe('lookupBlueprint', function () { let blueprint; let tmpdir; let project; - beforeEach(async function() { + beforeEach(async function () { let dir = await mkTmpDirIn(tempRoot); tmpdir = dir; blueprint = new Blueprint(basicBlueprint); @@ -1420,29 +1420,29 @@ describe('Blueprint', function() { // normally provided by `install`, but mocked here for testing project.root = tmpdir; blueprint.project = project; - project.blueprintLookupPaths = function() { + project.blueprintLookupPaths = function () { return [fixtureBlueprints]; }; }); - afterEach(async function() { + afterEach(async function () { await remove(tempRoot); }); - it('can lookup other Blueprints from the project blueprintLookupPaths', function() { + it('can lookup other Blueprints from the project blueprintLookupPaths', function () { let result = blueprint.lookupBlueprint('basic_2'); expect(result.description).to.equal('Another basic blueprint'); }); - it('can find internal blueprints', function() { + it('can find internal blueprints', function () { let result = blueprint.lookupBlueprint('blueprint'); expect(result.description).to.equal('Generates a blueprint and definition.'); }); }); - describe('._generateFileMapVariables', function() { + describe('._generateFileMapVariables', function () { let blueprint; let project; let moduleName; @@ -1451,7 +1451,7 @@ describe('Blueprint', function() { let result; let expectation; - beforeEach(function() { + beforeEach(function () { blueprint = new Blueprint(basicBlueprint); project = new MockProject(); moduleName = project.name(); @@ -1478,13 +1478,13 @@ describe('Blueprint', function() { }; }); - it('should create the correct default fileMapVariables', function() { + it('should create the correct default fileMapVariables', function () { result = blueprint._generateFileMapVariables(moduleName, locals, options); expect(result).to.eql(expectation); }); - it('should use the moduleName method argument for moduleName', function() { + it('should use the moduleName method argument for moduleName', function () { moduleName = 'foo'; expectation.dasherizedModuleName = 'foo'; @@ -1493,7 +1493,7 @@ describe('Blueprint', function() { expect(result).to.eql(expectation); }); - it('should use the locals method argument for its locals value', function() { + it('should use the locals method argument for its locals value', function () { locals = { foo: 'bar' }; expectation.locals = locals; @@ -1502,7 +1502,7 @@ describe('Blueprint', function() { expect(result).to.eql(expectation); }); - it('should use the option.originBlueprintName value as its originBlueprintName if included in the options hash', function() { + it('should use the option.originBlueprintName value as its originBlueprintName if included in the options hash', function () { options.originBlueprintName = 'foo'; expectation.originBlueprintName = 'foo'; @@ -1511,8 +1511,8 @@ describe('Blueprint', function() { expect(result).to.eql(expectation); }); - it("should include a podPath if the project's podModulePrefix is defined", function() { - blueprint.project.config = function() { + it("should include a podPath if the project's podModulePrefix is defined", function () { + blueprint.project.config = function () { return { podModulePrefix: 'foo/bar', }; @@ -1525,10 +1525,10 @@ describe('Blueprint', function() { expect(result).to.eql(expectation); }); - it('should include an inAddon and inDummy flag of true if the project is an addon', function() { + it('should include an inAddon and inDummy flag of true if the project is an addon', function () { options.dummy = true; - blueprint.project.isEmberCLIAddon = function() { + blueprint.project.isEmberCLIAddon = function () { return true; }; @@ -1540,7 +1540,7 @@ describe('Blueprint', function() { expect(result).to.eql(expectation); }); - it('should include an inAddon and inRepoAddon flag of true if options.inRepoAddon is true', function() { + it('should include an inAddon and inRepoAddon flag of true if options.inRepoAddon is true', function () { options.inRepoAddon = true; expectation.inRepoAddon = true; @@ -1551,7 +1551,7 @@ describe('Blueprint', function() { expect(result).to.eql(expectation); }); - it('should include an in flag of true if options.in is true', function() { + it('should include an in flag of true if options.in is true', function () { options.in = true; expectation.in = true; @@ -1561,7 +1561,7 @@ describe('Blueprint', function() { expect(result).to.eql(expectation); }); - it('should have a hasPathToken flag of true if the blueprint hasPathToken is true', function() { + it('should have a hasPathToken flag of true if the blueprint hasPathToken is true', function () { blueprint.hasPathToken = true; expectation.hasPathToken = true; @@ -1572,22 +1572,22 @@ describe('Blueprint', function() { }); }); - describe('._locals', function() { + describe('._locals', function () { let blueprint; let project; let options; let result; let expectation; - beforeEach(function() { + beforeEach(function () { blueprint = new Blueprint(basicBlueprint); project = new MockProject(); - blueprint._generateFileMapVariables = function() { + blueprint._generateFileMapVariables = function () { return {}; }; - blueprint.generateFileMap = function() { + blueprint.generateFileMap = function () { return {}; }; @@ -1606,26 +1606,26 @@ describe('Blueprint', function() { }; }); - it('should return a default object if no custom options are passed', async function() { + it('should return a default object if no custom options are passed', async function () { result = await blueprint._locals(options); expect(result).to.deep.include(expectation); }); - it('it should call the locals method with the correct arguments', function() { - blueprint.locals = function(opts) { + it('it should call the locals method with the correct arguments', function () { + blueprint.locals = function (opts) { expect(opts).to.equal(options); }; blueprint._locals(options); }); - it('should call _generateFileMapVariables with the correct arguments', function() { - blueprint.locals = function() { + it('should call _generateFileMapVariables with the correct arguments', function () { + blueprint.locals = function () { return { foo: 'bar' }; }; - blueprint._generateFileMapVariables = function(modName, lcls, opts) { + blueprint._generateFileMapVariables = function (modName, lcls, opts) { expect(modName).to.equal('mock-project'); expect(lcls).to.eql({ foo: 'bar' }); expect(opts).to.eql(opts); @@ -1634,19 +1634,19 @@ describe('Blueprint', function() { blueprint._locals(options); }); - it('should call generateFileMap with the correct arguments', function() { - blueprint._generateFileMapVariables = function() { + it('should call generateFileMap with the correct arguments', function () { + blueprint._generateFileMapVariables = function () { return { bar: 'baz' }; }; - blueprint.generateFileMap = function(fileMapVariables) { + blueprint.generateFileMap = function (fileMapVariables) { expect(fileMapVariables).to.eql({ bar: 'baz' }); }; blueprint._locals(options); }); - it('should use the options.entity.name as its moduleName if its value is defined', async function() { + it('should use the options.entity.name as its moduleName if its value is defined', async function () { options.entity = { name: 'foo', }; @@ -1661,8 +1661,8 @@ describe('Blueprint', function() { expect(result).to.deep.include(expectation); }); - it('should update its fileMap values to match the generateFileMap result', async function() { - blueprint.generateFileMap = function() { + it('should update its fileMap values to match the generateFileMap result', async function () { + blueprint.generateFileMap = function () { return { foo: 'bar' }; }; @@ -1673,8 +1673,8 @@ describe('Blueprint', function() { expect(result).to.deep.include(expectation); }); - it('should return an object containing custom local values', async function() { - blueprint.locals = function() { + it('should return an object containing custom local values', async function () { + blueprint.locals = function () { return { foo: 'bar' }; }; diff --git a/tests/integration/tasks/build-test.js b/tests/integration/tasks/build-test.js index 7a59508723..f7c3012522 100644 --- a/tests/integration/tasks/build-test.js +++ b/tests/integration/tasks/build-test.js @@ -16,26 +16,26 @@ const willInterruptProcess = require('../../../lib/utilities/will-interrupt-proc let root = process.cwd(); let tmproot = path.join(root, 'tmp'); -describe('build task test', function() { +describe('build task test', function () { let project, ui, _process; - beforeEach(function() { + beforeEach(function () { _process = new MockProcess(); willInterruptProcess.capture(_process); return mkTmpDirIn(tmproot) - .then(function(tmpdir) { + .then(function (tmpdir) { process.chdir(tmpdir); }) - .then(function() { + .then(function () { return copyFixtureFiles('tasks/builder'); }) - .then(function() { + .then(function () { project = new MockProject(); ui = project.ui; }); }); - afterEach(function() { + afterEach(function () { willInterruptProcess.release(); process.chdir(root); delete process.env.BROCCOLI_VIZ; @@ -43,7 +43,7 @@ describe('build task test', function() { return fs.remove(tmproot); }); - it('can build', function() { + it('can build', function () { let outputPath = 'dist'; let task = new BuildTask({ analytics: new MockAnalytics(), @@ -62,7 +62,7 @@ describe('build task test', function() { }); }); - it('generates valid visualization output', function() { + it('generates valid visualization output', function () { process.env.BROCCOLI_VIZ = '1'; let outputPath = 'dist'; @@ -77,7 +77,7 @@ describe('build task test', function() { environment: 'development', }; - return task.run(runOptions).then(function() { + return task.run(runOptions).then(function () { let vizOutputPath = 'instrumentation.build.0.json'; expect(file(vizOutputPath)).to.exist; @@ -92,7 +92,7 @@ describe('build task test', function() { }); }); - it('it displays environment', function() { + it('it displays environment', function () { let outputPath = 'dist'; let task = new BuildTask({ analytics: new MockAnalytics(), diff --git a/tests/integration/utilities/clean-remove-test.js b/tests/integration/utilities/clean-remove-test.js index b56a141407..fdf29ee25e 100644 --- a/tests/integration/utilities/clean-remove-test.js +++ b/tests/integration/utilities/clean-remove-test.js @@ -6,13 +6,13 @@ const temp = require('temp'); const path = require('path'); const fs = require('fs-extra'); -describe('clean-remove', function() { +describe('clean-remove', function () { let tempDir; let originalCwd = process.cwd(); let fileInfo; let nestedPath = 'nested1/nested2'; - beforeEach(function() { + beforeEach(function () { tempDir = temp.mkdirSync('clean-remove'); process.chdir(tempDir); @@ -21,32 +21,32 @@ describe('clean-remove', function() { }; }); - afterEach(function() { + afterEach(function () { process.chdir(originalCwd); fs.removeSync(tempDir); }); - it('removes empty folders', function() { + it('removes empty folders', function () { let displayPath = path.join(nestedPath, 'file.txt'); fileInfo.outputPath = path.join(tempDir, displayPath); fileInfo.displayPath = displayPath; return fs .outputFile(displayPath, '') - .then(function() { - return fs.stat(displayPath).then(function(stats) { + .then(function () { + return fs.stat(displayPath).then(function (stats) { expect(stats).to.be.ok; }); }) - .then(function() { + .then(function () { return cleanRemove(fileInfo); }) - .then(function() { + .then(function () { return expect(fs.stat('nested1')).to.be.rejected; }); }); - it('preserves filled folders', function() { + it('preserves filled folders', function () { let removedDisplayPath = path.join(nestedPath, 'file.txt'); let preservedDisplayPath = path.join(nestedPath, 'file2.txt'); fileInfo.outputPath = path.join(tempDir, removedDisplayPath); @@ -54,22 +54,22 @@ describe('clean-remove', function() { return fs .outputFile(removedDisplayPath, '') - .then(function() { + .then(function () { return fs.outputFile(preservedDisplayPath, ''); }) - .then(function() { - return fs.stat(preservedDisplayPath).then(function(stats) { + .then(function () { + return fs.stat(preservedDisplayPath).then(function (stats) { expect(stats).to.be.ok; }); }) - .then(function() { + .then(function () { return cleanRemove(fileInfo); }) - .then(function() { + .then(function () { return expect(fs.stat(removedDisplayPath)).to.be.rejected; }) - .then(function() { - return fs.stat(preservedDisplayPath).then(function(stats) { + .then(function () { + return fs.stat(preservedDisplayPath).then(function (stats) { expect(stats).to.be.ok; }); }); diff --git a/tests/runner.js b/tests/runner.js index a1e624a6f3..13d0ba3e7c 100644 --- a/tests/runner.js +++ b/tests/runner.js @@ -53,12 +53,12 @@ function runMocha() { // ensure that at the end of every test, we are in the correct current // working directory - mocha.suite.afterEach(function() { + mocha.suite.afterEach(function () { expect(process.cwd()).to.equal(ROOT); }); console.time('Mocha Tests Running Time'); - mocha.run(failures => { + mocha.run((failures) => { console.timeEnd('Mocha Tests Running Time'); // eslint-disable-next-line no-process-exit @@ -68,7 +68,7 @@ function runMocha() { Promise.resolve() .then(() => runMocha()) - .catch(error => { + .catch((error) => { console.error(error); console.error(error.stack); diff --git a/tests/unit/analytics-test.js b/tests/unit/analytics-test.js index 01056595bd..6934db4088 100644 --- a/tests/unit/analytics-test.js +++ b/tests/unit/analytics-test.js @@ -7,8 +7,8 @@ const MockProject = require('../helpers/mock-project'); let command; let called = false; -describe('analytics', function() { - beforeEach(function() { +describe('analytics', function () { + beforeEach(function () { let analytics = { track() { called = true; @@ -21,7 +21,7 @@ describe('analytics', function() { }); let project = new MockProject(); - project.isEmberCLIProject = function() { + project.isEmberCLIProject = function () { return true; }; @@ -32,11 +32,11 @@ describe('analytics', function() { }); }); - afterEach(function() { + afterEach(function () { command = null; }); - it('track gets invoked on command.validateAndRun()', async function() { + it('track gets invoked on command.validateAndRun()', async function () { await command.validateAndRun([]); expect(called, 'expected analytics.track to be called').to.be.true; }); diff --git a/tests/unit/blueprints/addon-test.js b/tests/unit/blueprints/addon-test.js index b33570233e..c258df66f5 100644 --- a/tests/unit/blueprints/addon-test.js +++ b/tests/unit/blueprints/addon-test.js @@ -4,38 +4,38 @@ const Blueprint = require('../../../lib/models/blueprint'); const MockProject = require('../../helpers/mock-project'); const expect = require('chai').expect; -describe('blueprint - addon', function() { - describe('Blueprint.lookup', function() { +describe('blueprint - addon', function () { + describe('Blueprint.lookup', function () { let blueprint; - beforeEach(function() { + beforeEach(function () { blueprint = Blueprint.lookup('addon'); }); - describe('entityName', function() { + describe('entityName', function () { let mockProject; - beforeEach(function() { + beforeEach(function () { mockProject = new MockProject(); - mockProject.isEmberCLIProject = function() { + mockProject.isEmberCLIProject = function () { return true; }; blueprint.project = mockProject; }); - afterEach(function() { + afterEach(function () { mockProject = null; }); - it('throws error when current project is an existing ember-cli project', function() { + it('throws error when current project is an existing ember-cli project', function () { expect(() => blueprint.normalizeEntityName('foo')).to.throw( 'Generating an addon in an existing ember-cli project is not supported.' ); }); - it('works when current project is an existing ember-cli addon', function() { - mockProject.isEmberCLIAddon = function() { + it('works when current project is an existing ember-cli addon', function () { + mockProject.isEmberCLIAddon = function () { return true; }; @@ -44,15 +44,15 @@ describe('blueprint - addon', function() { ); }); - it('keeps existing behavior by calling Blueprint.normalizeEntityName', function() { + it('keeps existing behavior by calling Blueprint.normalizeEntityName', function () { expect(() => blueprint.normalizeEntityName('foo/')).to.throw(/trailing slash/); }); }); }); - describe('direct blueprint require', function() { + describe('direct blueprint require', function () { let blueprint; - beforeEach(function() { + beforeEach(function () { blueprint = require('../../../blueprints/addon'); blueprint.options = { entity: { name: 'my-cool-addon' }, @@ -63,8 +63,8 @@ describe('blueprint - addon', function() { blueprint.path = 'test-blueprint-path'; }); - describe('generatePackageJson', function() { - it('works', function() { + describe('generatePackageJson', function () { + it('works', function () { let output = blueprint.updatePackageJson(JSON.stringify({})); // string to test ordering expect(output).to.equal( @@ -91,25 +91,25 @@ describe('blueprint - addon', function() { ); }); - it('removes the `private` property', function() { + it('removes the `private` property', function () { let output = blueprint.updatePackageJson(JSON.stringify({})); expect(JSON.parse(output).private).to.be.undefined; }); - it('overwrites `name`', function() { + it('overwrites `name`', function () { let output = blueprint.updatePackageJson(JSON.stringify({ name: 'OMG' })); expect(JSON.parse(output).name).to.eql('my-cool-addon'); }); - it('overwrites `description`', function() { + it('overwrites `description`', function () { let output = blueprint.updatePackageJson(JSON.stringify({ description: 'OMG' })); let json = JSON.parse(output); expect(json.description).to.equal('The default blueprint for ember-cli addons.'); }); - it('moves `ember-cli-babel` from devDependencies to dependencies', function() { + it('moves `ember-cli-babel` from devDependencies to dependencies', function () { let output = blueprint.updatePackageJson( JSON.stringify({ devDependencies: { @@ -125,7 +125,7 @@ describe('blueprint - addon', function() { expect(json.devDependencies).to.not.have.property('ember-cli-babel'); }); - it('moves `ember-cli-htmlbars` from devDependencies to dependencies', function() { + it('moves `ember-cli-htmlbars` from devDependencies to dependencies', function () { let output = blueprint.updatePackageJson( JSON.stringify({ devDependencies: { @@ -141,7 +141,7 @@ describe('blueprint - addon', function() { expect(json.devDependencies).to.not.have.property('ember-cli-htmlbars'); }); - it('does not push multiple `ember-addon` keywords', function() { + it('does not push multiple `ember-addon` keywords', function () { let output = blueprint.updatePackageJson( JSON.stringify({ keywords: ['ember-addon'], @@ -151,7 +151,7 @@ describe('blueprint - addon', function() { expect(json.keywords).to.deep.equal(['ember-addon']); }); - it('overwrites any version of `ember-disable-prototype-extensions`', function() { + it('overwrites any version of `ember-disable-prototype-extensions`', function () { let output = blueprint.updatePackageJson( JSON.stringify({ devDependencies: { @@ -164,7 +164,7 @@ describe('blueprint - addon', function() { expect(json.devDependencies['ember-disable-prototype-extensions']).to.equal('^1.1.3'); }); - it('adds `scripts.test:all`', function() { + it('adds `scripts.test:all`', function () { let output = blueprint.updatePackageJson( JSON.stringify({ scripts: {}, @@ -175,7 +175,7 @@ describe('blueprint - addon', function() { expect(json.scripts['test:ember-compatibility']).to.equal('ember try:each'); }); - it('overwrites `ember-addon.configPath`', function() { + it('overwrites `ember-addon.configPath`', function () { let output = blueprint.updatePackageJson( JSON.stringify({ 'ember-addon': { @@ -188,7 +188,7 @@ describe('blueprint - addon', function() { expect(json['ember-addon'].configPath).to.equal('tests/dummy/config'); }); - it('preserves dependency ordering', function() { + it('preserves dependency ordering', function () { let output = blueprint.updatePackageJson( JSON.stringify({ dependencies: { diff --git a/tests/unit/blueprints/in-repo-addon-test.js b/tests/unit/blueprints/in-repo-addon-test.js index 291928b1c5..a378d44e05 100644 --- a/tests/unit/blueprints/in-repo-addon-test.js +++ b/tests/unit/blueprints/in-repo-addon-test.js @@ -12,22 +12,22 @@ const td = require('testdouble'); const expect = require('ember-cli-blueprint-test-helpers/chai').expect; const file = require('ember-cli-blueprint-test-helpers/chai').file; -describe('Acceptance: ember generate and destroy in-repo-addon', function() { +describe('Acceptance: ember generate and destroy in-repo-addon', function () { setupTestHooks(this, { cliPath: path.resolve(`${__dirname}/../../..`), }); - it('in-repo-addon fooBar', function() { + it('in-repo-addon fooBar', function () { let args = ['in-repo-addon', 'fooBar']; return emberNew() - .then(function() { + .then(function () { expect(fs.readJsonSync('package.json')['ember-addon']).to.be.undefined; }) - .then(function() { + .then(function () { return emberGenerate(args); }) - .then(function() { + .then(function () { expect(file('lib/foo-bar/package.json')).to.exist; expect(file('lib/foo-bar/index.js')).to.exist; @@ -40,10 +40,10 @@ describe('Acceptance: ember generate and destroy in-repo-addon', function() { paths: ['lib/foo-bar'], }); }) - .then(function() { + .then(function () { return emberDestroy(args); }) - .then(function() { + .then(function () { expect(file('lib/foo-bar/package.json')).to.not.exist; expect(file('lib/foo-bar/index.js')).to.not.exist; @@ -52,13 +52,13 @@ describe('Acceptance: ember generate and destroy in-repo-addon', function() { }); }); -describe('Unit: in-repo-addon blueprint', function() { +describe('Unit: in-repo-addon blueprint', function () { let blueprint; let readJsonSync; let writeFileSync; let options; - beforeEach(function() { + beforeEach(function () { blueprint = require('../../../blueprints/in-repo-addon'); blueprint.project = { root: 'test-project-root', @@ -74,11 +74,11 @@ describe('Unit: in-repo-addon blueprint', function() { writeFileSync = td.replace(blueprint, '_writeFileSync'); }); - afterEach(function() { + afterEach(function () { td.reset(); }); - it('adds to paths', function() { + it('adds to paths', function () { td.when(readJsonSync(), { ignoreExtraArgs: true }).thenReturn({}); blueprint.afterInstall(options); @@ -100,7 +100,7 @@ describe('Unit: in-repo-addon blueprint', function() { ); }); - it('ignores if already exists', function() { + it('ignores if already exists', function () { td.when(readJsonSync(), { ignoreExtraArgs: true }).thenReturn({ 'ember-addon': { paths: ['lib/test-entity-name'], @@ -126,7 +126,7 @@ describe('Unit: in-repo-addon blueprint', function() { ); }); - it('removes from paths', function() { + it('removes from paths', function () { td.when(readJsonSync(), { ignoreExtraArgs: true }).thenReturn({ 'ember-addon': { paths: ['lib/test-entity-name', 'lib/test-entity-name-2'], @@ -152,7 +152,7 @@ describe('Unit: in-repo-addon blueprint', function() { ); }); - it('removes paths if last one', function() { + it('removes paths if last one', function () { td.when(readJsonSync(), { ignoreExtraArgs: true }).thenReturn({ 'ember-addon': { paths: ['lib/test-entity-name'], @@ -172,7 +172,7 @@ describe('Unit: in-repo-addon blueprint', function() { }\n'); }); - it('alphabetizes paths', function() { + it('alphabetizes paths', function () { td.when(readJsonSync(), { ignoreExtraArgs: true }).thenReturn({ 'ember-addon': { paths: ['lib/test-entity-name-2'], diff --git a/tests/unit/blueprints/lib-test.js b/tests/unit/blueprints/lib-test.js index 9411a6868b..e975d44fbc 100644 --- a/tests/unit/blueprints/lib-test.js +++ b/tests/unit/blueprints/lib-test.js @@ -10,28 +10,28 @@ let modifyPackages = blueprintHelpers.modifyPackages; const expect = require('ember-cli-blueprint-test-helpers/chai').expect; const dir = require('chai-files').dir; -describe('Acceptance: ember generate and destroy lib', function() { +describe('Acceptance: ember generate and destroy lib', function () { setupTestHooks(this, { cliPath: path.resolve(`${__dirname}/../../..`), }); - it('lib foo', async function() { + it('lib foo', async function () { let args = ['lib', 'foo']; await emberNew(); - await emberGenerateDestroy(args, file => { + await emberGenerateDestroy(args, (file) => { expect(dir('lib')).to.exist; expect(file('lib/.eslintrc.js')).to.not.exist; expect(file('lib/.jshintrc')).to.not.exist; }); }); - it('lib foo with ember-cli-jshint', async function() { + it('lib foo with ember-cli-jshint', async function () { let args = ['lib', 'foo']; await emberNew(); await modifyPackages([{ name: 'ember-cli-jshint', dev: true }]); - await emberGenerateDestroy(args, file => { + await emberGenerateDestroy(args, (file) => { expect(dir('lib')).to.exist; expect(file('lib/.jshintrc')).to.not.exist; }); diff --git a/tests/unit/blueprints/server-test.js b/tests/unit/blueprints/server-test.js index 11da650997..89aeabc549 100644 --- a/tests/unit/blueprints/server-test.js +++ b/tests/unit/blueprints/server-test.js @@ -11,12 +11,12 @@ const chai = require('ember-cli-blueprint-test-helpers/chai'); let expect = chai.expect; let file = chai.file; -describe('Acceptance: ember generate and destroy server', function() { +describe('Acceptance: ember generate and destroy server', function () { setupTestHooks(this, { cliPath: path.resolve(`${__dirname}/../../..`), }); - it('server', async function() { + it('server', async function () { let args = ['server']; await emberNew(); @@ -26,7 +26,7 @@ describe('Acceptance: ember generate and destroy server', function() { // TODO: assert that `morgan` and `glob` dependencies were installed }); - it('server with ember-cli-jshint', async function() { + it('server with ember-cli-jshint', async function () { let args = ['server']; await emberNew(); diff --git a/tests/unit/broccoli/addon/linting-test.js b/tests/unit/broccoli/addon/linting-test.js index 9ab050af68..e999de66e0 100644 --- a/tests/unit/broccoli/addon/linting-test.js +++ b/tests/unit/broccoli/addon/linting-test.js @@ -10,10 +10,10 @@ const Addon = require('../../../../lib/models/addon'); const buildOutput = broccoliTestHelper.buildOutput; const createTempDir = broccoliTestHelper.createTempDir; -describe('Addon - linting', function() { +describe('Addon - linting', function () { let input, output, addon, lintTrees; - beforeEach(async function() { + beforeEach(async function () { input = await createTempDir(); let MockAddon = Addon.extend({ name: 'first', @@ -36,12 +36,12 @@ describe('Addon - linting', function() { addon = new MockAddon(project, project); }); - afterEach(async function() { + afterEach(async function () { await input.dispose(); await output.dispose(); }); - it('calls lintTree on project addons for app directory', async function() { + it('calls lintTree on project addons for app directory', async function () { input.write({ app: { 'derp.js': '// slerpy', @@ -60,7 +60,7 @@ describe('Addon - linting', function() { }); }); - it('calls lintTree on project addons for addon directory', async function() { + it('calls lintTree on project addons for addon directory', async function () { input.write({ addon: { 'derp.js': '// slerpy', @@ -89,7 +89,7 @@ describe('Addon - linting', function() { }); }); - it('calls lintTree on project addons for addon directory with only templates', async function() { + it('calls lintTree on project addons for addon directory with only templates', async function () { input.write({ addon: { templates: { @@ -118,7 +118,7 @@ describe('Addon - linting', function() { }); }); - it('calls lintTree on project addons for addon directory with templates', async function() { + it('calls lintTree on project addons for addon directory with templates', async function () { input.write({ addon: { 'derp.js': '// slerpy', @@ -152,7 +152,7 @@ describe('Addon - linting', function() { }); }); - it('calls lintTree on project addons for addon-test-support directory', async function() { + it('calls lintTree on project addons for addon-test-support directory', async function () { input.write({ 'addon-test-support': { 'derp.js': '// slerpy', @@ -171,7 +171,7 @@ describe('Addon - linting', function() { }); }); - it('calls lintTree on project addons for test-support directory', async function() { + it('calls lintTree on project addons for test-support directory', async function () { input.write({ 'test-support': { 'derp.js': '// slerpy', @@ -190,8 +190,8 @@ describe('Addon - linting', function() { }); }); - it('calls lintTree for trees in an addon', async function() { - addon.project.addons[0].lintTree = function(type, tree) { + it('calls lintTree for trees in an addon', async function () { + addon.project.addons[0].lintTree = function (type, tree) { return tree; }; let addonRootContents = { diff --git a/tests/unit/broccoli/addon/module-name-test.js b/tests/unit/broccoli/addon/module-name-test.js index 2cfb10799f..f265f74dae 100644 --- a/tests/unit/broccoli/addon/module-name-test.js +++ b/tests/unit/broccoli/addon/module-name-test.js @@ -11,10 +11,10 @@ const Addon = require('../../../../lib/models/addon'); const buildOutput = broccoliTestHelper.buildOutput; const createTempDir = broccoliTestHelper.createTempDir; -describe('Addon - moduleName', function() { +describe('Addon - moduleName', function () { let input, output, addon; - beforeEach(async function() { + beforeEach(async function () { input = await createTempDir(); let MockAddon = Addon.extend({ root: input.path(), @@ -40,12 +40,12 @@ describe('Addon - moduleName', function() { ]; }); - afterEach(async function() { + afterEach(async function () { await input.dispose(); await output.dispose(); }); - it('uses the module name function', async function() { + it('uses the module name function', async function () { input.write({ addon: { 'herp.js': '// slerpy', diff --git a/tests/unit/broccoli/builder-test.js b/tests/unit/broccoli/builder-test.js index e3cf8b39b5..ffaba584c4 100644 --- a/tests/unit/broccoli/builder-test.js +++ b/tests/unit/broccoli/builder-test.js @@ -9,17 +9,17 @@ const Builder = require('../../../lib/models/builder'); const { createTempDir, fromBuilder } = broccoliTestHelper; const ROOT = process.cwd(); -describe('Builder - broccoli tests', function() { +describe('Builder - broccoli tests', function () { let projectRoot, builderOutputPath, output, project, builder; - beforeEach(async function() { + beforeEach(async function () { projectRoot = await createTempDir(); builderOutputPath = await createTempDir(); project = new MockProject({ root: projectRoot.path() }); }); - afterEach(async function() { + afterEach(async function () { // this is needed because lib/utilities/find-build-file.js does a // `process.chdir` when it looks for the `ember-cli-build.js` process.chdir(ROOT); @@ -29,7 +29,7 @@ describe('Builder - broccoli tests', function() { await output.dispose(); }); - it('falls back to broccoli-builder@0.18 when legacy plugins exist in build', async function() { + it('falls back to broccoli-builder@0.18 when legacy plugins exist in build', async function () { projectRoot.write({ 'ember-cli-build.js': ` const fs = require('fs'); diff --git a/tests/unit/broccoli/default-packager/additional-assets-test.js b/tests/unit/broccoli/default-packager/additional-assets-test.js index 8f034bd447..1583d674e2 100644 --- a/tests/unit/broccoli/default-packager/additional-assets-test.js +++ b/tests/unit/broccoli/default-packager/additional-assets-test.js @@ -10,7 +10,7 @@ const buildOutput = broccoliTestHelper.buildOutput; const createTempDir = broccoliTestHelper.createTempDir; const setupRegistryFor = defaultPackagerHelpers.setupRegistryFor; -describe('Default Packager: Additional Assets', function() { +describe('Default Packager: Additional Assets', function () { let input, output; let MODULES = { @@ -47,7 +47,7 @@ describe('Default Packager: Additional Assets', function() { return { a: 1 }; }, - registry: setupRegistryFor('template', function(tree) { + registry: setupRegistryFor('template', function (tree) { return new Funnel(tree, { getDestinationPath(relativePath) { return relativePath.replace(/hbs$/g, 'js'); @@ -58,21 +58,21 @@ describe('Default Packager: Additional Assets', function() { addons: [], }; - before(async function() { + before(async function () { input = await createTempDir(); input.write(MODULES); }); - after(async function() { + after(async function () { await input.dispose(); }); - afterEach(async function() { + afterEach(async function () { await output.dispose(); }); - it('caches packaged javascript tree', async function() { + it('caches packaged javascript tree', async function () { let defaultPackager = new DefaultPackager({ name: 'the-best-app-ever', env: 'development', @@ -82,7 +82,7 @@ describe('Default Packager: Additional Assets', function() { vendorJsFile: '/assets/vendor.js', }, - registry: setupRegistryFor('template', function(tree) { + registry: setupRegistryFor('template', function (tree) { return new Funnel(tree, { getDestinationPath(relativePath) { return relativePath.replace(/hbs$/g, 'js'); @@ -116,7 +116,7 @@ describe('Default Packager: Additional Assets', function() { ); }); - it('imports additional assets properly', async function() { + it('imports additional assets properly', async function () { let defaultPackager = new DefaultPackager({ name: 'the-best-app-ever', env: 'development', @@ -126,7 +126,7 @@ describe('Default Packager: Additional Assets', function() { vendorJsFile: '/assets/vendor.js', }, - registry: setupRegistryFor('template', function(tree) { + registry: setupRegistryFor('template', function (tree) { return new Funnel(tree, { getDestinationPath(relativePath) { return relativePath.replace(/hbs$/g, 'js'); diff --git a/tests/unit/broccoli/default-packager/bower-test.js b/tests/unit/broccoli/default-packager/bower-test.js index 07c3bca25c..b6ecaf7ea5 100644 --- a/tests/unit/broccoli/default-packager/bower-test.js +++ b/tests/unit/broccoli/default-packager/bower-test.js @@ -7,7 +7,7 @@ const broccoliTestHelper = require('broccoli-test-helper'); const buildOutput = broccoliTestHelper.buildOutput; const createTempDir = broccoliTestHelper.createTempDir; -describe('Default Packager: Bower', function() { +describe('Default Packager: Bower', function () { let input; let BOWER_PACKAGES = { @@ -28,17 +28,17 @@ describe('Default Packager: Bower', function() { }, }; - before(async function() { + before(async function () { input = await createTempDir(); input.write(BOWER_PACKAGES); }); - after(async function() { + after(async function () { await input.dispose(); }); - it('caches packaged bower tree', async function() { + it('caches packaged bower tree', async function () { let defaultPackager = new DefaultPackager(); expect(defaultPackager._cachedBower).to.equal(null); @@ -49,7 +49,7 @@ describe('Default Packager: Bower', function() { expect(defaultPackager._cachedBower._annotation).to.equal('Packaged Bower'); }); - it('packages bower files with default folder', async function() { + it('packages bower files with default folder', async function () { let defaultPackager = new DefaultPackager(); let packagedBower = await buildOutput(defaultPackager.packageBower(input.path())); @@ -60,7 +60,7 @@ describe('Default Packager: Bower', function() { }); }); - it('packages bower files with custom folder', async function() { + it('packages bower files with custom folder', async function () { let defaultPackager = new DefaultPackager(); let packagedBower = await buildOutput(defaultPackager.packageBower(input.path(), 'foobar')); diff --git a/tests/unit/broccoli/default-packager/config-test.js b/tests/unit/broccoli/default-packager/config-test.js index b6e3493aa3..27f7c2d1d0 100644 --- a/tests/unit/broccoli/default-packager/config-test.js +++ b/tests/unit/broccoli/default-packager/config-test.js @@ -7,7 +7,7 @@ const broccoliTestHelper = require('broccoli-test-helper'); const buildOutput = broccoliTestHelper.buildOutput; const createTempDir = broccoliTestHelper.createTempDir; -describe('Default Packager: Config', function() { +describe('Default Packager: Config', function () { let input, output; let name = 'the-best-app-ever'; let env = 'development'; @@ -27,21 +27,21 @@ describe('Default Packager: Config', function() { }, }; - before(async function() { + before(async function () { input = await createTempDir(); input.write(CONFIG); }); - after(async function() { + after(async function () { await input.dispose(); }); - afterEach(async function() { + afterEach(async function () { await output.dispose(); }); - it('caches packaged config tree', async function() { + it('caches packaged config tree', async function () { let defaultPackager = new DefaultPackager({ name, project, @@ -56,7 +56,7 @@ describe('Default Packager: Config', function() { expect(defaultPackager._cachedConfig._annotation).to.equal('Packaged Config'); }); - it('packages config files w/ tests disabled', async function() { + it('packages config files w/ tests disabled', async function () { let defaultPackager = new DefaultPackager({ name, project, @@ -79,7 +79,7 @@ describe('Default Packager: Config', function() { }); }); - it('packages config files w/ tests enabled', async function() { + it('packages config files w/ tests enabled', async function () { let defaultPackager = new DefaultPackager({ name, project, diff --git a/tests/unit/broccoli/default-packager/ember-cli-internal-test.js b/tests/unit/broccoli/default-packager/ember-cli-internal-test.js index 22c317bf5d..2d201efb6f 100644 --- a/tests/unit/broccoli/default-packager/ember-cli-internal-test.js +++ b/tests/unit/broccoli/default-packager/ember-cli-internal-test.js @@ -7,7 +7,7 @@ const broccoliTestHelper = require('broccoli-test-helper'); const buildOutput = broccoliTestHelper.buildOutput; const createTempDir = broccoliTestHelper.createTempDir; -describe('Default Packager: Ember CLI Internal', function() { +describe('Default Packager: Ember CLI Internal', function () { let input, output; let CONFIG = { @@ -29,21 +29,21 @@ describe('Default Packager: Ember CLI Internal', function() { }, }; - before(async function() { + before(async function () { input = await createTempDir(); input.write(CONFIG); }); - after(async function() { + after(async function () { await input.dispose(); }); - afterEach(async function() { + afterEach(async function () { await output.dispose(); }); - it('caches packaged ember cli internal tree', async function() { + it('caches packaged ember cli internal tree', async function () { let defaultPackager = new DefaultPackager({ env: 'development', name: 'the-best-app-ever', @@ -61,7 +61,7 @@ describe('Default Packager: Ember CLI Internal', function() { expect(defaultPackager._cachedEmberCliInternalTree._annotation).to.equal('Packaged Ember CLI Internal Files'); }); - it('packages internal files properly', async function() { + it('packages internal files properly', async function () { let defaultPackager = new DefaultPackager({ env: 'development', name: 'the-best-app-ever', @@ -93,7 +93,7 @@ describe('Default Packager: Ember CLI Internal', function() { ]); }); - it('populates the contents of internal files correctly', async function() { + it('populates the contents of internal files correctly', async function () { let defaultPackager = new DefaultPackager({ env: 'development', name: 'the-best-app-ever', @@ -144,7 +144,7 @@ describe('Default Packager: Ember CLI Internal', function() { expect(vendorSuffixFileContent).to.equal(''); }); - it('populates the contents of internal files correctly when `storeConfigInMeta` is enabled', async function() { + it('populates the contents of internal files correctly when `storeConfigInMeta` is enabled', async function () { let defaultPackager = new DefaultPackager({ env: 'development', name: 'the-best-app-ever', @@ -167,7 +167,7 @@ describe('Default Packager: Ember CLI Internal', function() { expect(appConfigFileContent).to.contain(`var config = JSON.parse(decodeURIComponent(rawConfig));`); }); - it('populates the contents of internal files correctly, including content from add-ons', async function() { + it('populates the contents of internal files correctly, including content from add-ons', async function () { let defaultPackager = new DefaultPackager({ env: 'development', name: 'the-best-app-ever', diff --git a/tests/unit/broccoli/default-packager/external-test.js b/tests/unit/broccoli/default-packager/external-test.js index 736d9c4cfb..c78c938982 100644 --- a/tests/unit/broccoli/default-packager/external-test.js +++ b/tests/unit/broccoli/default-packager/external-test.js @@ -7,7 +7,7 @@ const broccoliTestHelper = require('broccoli-test-helper'); const buildOutput = broccoliTestHelper.buildOutput; const createTempDir = broccoliTestHelper.createTempDir; -describe('Default Packager: External', function() { +describe('Default Packager: External', function () { let input, output; let EXTERNAL = { @@ -20,21 +20,21 @@ describe('Default Packager: External', function() { }, }; - before(async function() { + before(async function () { input = await createTempDir(); input.write(EXTERNAL); }); - after(async function() { + after(async function () { await input.dispose(); }); - afterEach(async function() { + afterEach(async function () { await output.dispose(); }); - it('applies transforms to an external tree', async function() { + it('applies transforms to an external tree', async function () { let customTransformsMap = new Map(); customTransformsMap.set('amd', { diff --git a/tests/unit/broccoli/default-packager/index-test.js b/tests/unit/broccoli/default-packager/index-test.js index af04f1c955..d1e08a20af 100644 --- a/tests/unit/broccoli/default-packager/index-test.js +++ b/tests/unit/broccoli/default-packager/index-test.js @@ -7,7 +7,7 @@ const broccoliTestHelper = require('broccoli-test-helper'); const buildOutput = broccoliTestHelper.buildOutput; const createTempDir = broccoliTestHelper.createTempDir; -describe('Default Packager: Index', function() { +describe('Default Packager: Index', function () { let input, output; let project = { @@ -28,7 +28,7 @@ describe('Default Packager: Index', function() { let META_TAG = '/best-url-ever/\n'; - before(async function() { + before(async function () { input = await createTempDir(); let indexContent = ` @@ -51,15 +51,15 @@ describe('Default Packager: Index', function() { }); }); - after(async function() { + after(async function () { await input.dispose(); }); - afterEach(async function() { + afterEach(async function () { await output.dispose(); }); - it('caches processed index tree', async function() { + it('caches processed index tree', async function () { let defaultPackager = new DefaultPackager({ name: 'the-best-app-ever', env: 'development', @@ -82,7 +82,7 @@ describe('Default Packager: Index', function() { expect(defaultPackager._cachedProcessedIndex).to.not.equal(null); }); - it('works with a custom path', async function() { + it('works with a custom path', async function () { let defaultPackager = new DefaultPackager({ name: 'the-best-app-ever', env: 'development', @@ -108,7 +108,7 @@ describe('Default Packager: Index', function() { expect(indexContent).to.equal(META_TAG); }); - it('populates `index.html` according to settings', async function() { + it('populates `index.html` according to settings', async function () { let defaultPackager = new DefaultPackager({ name: 'the-best-app-ever', env: 'development', diff --git a/tests/unit/broccoli/default-packager/javascript-test.js b/tests/unit/broccoli/default-packager/javascript-test.js index 0f9b26c2ed..dac2cc0a8b 100644 --- a/tests/unit/broccoli/default-packager/javascript-test.js +++ b/tests/unit/broccoli/default-packager/javascript-test.js @@ -10,7 +10,7 @@ const buildOutput = broccoliTestHelper.buildOutput; const createTempDir = broccoliTestHelper.createTempDir; const setupRegistryFor = defaultPackagerHelpers.setupRegistryFor; -describe('Default Packager: Javascript', function() { +describe('Default Packager: Javascript', function () { let input, output; let scriptOutputFiles = { @@ -91,7 +91,7 @@ describe('Default Packager: Javascript', function() { return { a: 1 }; }, - registry: setupRegistryFor('template', function(tree) { + registry: setupRegistryFor('template', function (tree) { return new Funnel(tree, { getDestinationPath(relativePath) { return relativePath.replace(/hbs$/g, 'js'); @@ -102,21 +102,21 @@ describe('Default Packager: Javascript', function() { addons: [], }; - before(async function() { + before(async function () { input = await createTempDir(); input.write(MODULES); }); - after(async function() { + after(async function () { await input.dispose(); }); - afterEach(async function() { + afterEach(async function () { await output.dispose(); }); - it('caches packaged javascript tree', async function() { + it('caches packaged javascript tree', async function () { let defaultPackager = new DefaultPackager({ name: 'the-best-app-ever', env: 'development', @@ -126,7 +126,7 @@ describe('Default Packager: Javascript', function() { vendorJsFile: '/assets/vendor.js', }, - registry: setupRegistryFor('template', function(tree) { + registry: setupRegistryFor('template', function (tree) { return new Funnel(tree, { getDestinationPath(relativePath) { return relativePath.replace(/hbs$/g, 'js'); @@ -148,7 +148,7 @@ describe('Default Packager: Javascript', function() { expect(defaultPackager._cachedJavascript._annotation).to.equal('Packaged Javascript'); }); - it('packages javascript files with sourcemaps on', async function() { + it('packages javascript files with sourcemaps on', async function () { let defaultPackager = new DefaultPackager({ name: 'the-best-app-ever', env: 'development', @@ -158,7 +158,7 @@ describe('Default Packager: Javascript', function() { vendorJsFile: '/assets/vendor.js', }, - registry: setupRegistryFor('template', function(tree) { + registry: setupRegistryFor('template', function (tree) { return new Funnel(tree, { getDestinationPath(relativePath) { return relativePath.replace(/hbs$/g, 'js'); @@ -184,7 +184,7 @@ describe('Default Packager: Javascript', function() { ]); }); - it('packages javascript files with sourcemaps off', async function() { + it('packages javascript files with sourcemaps off', async function () { let defaultPackager = new DefaultPackager({ name: 'the-best-app-ever', env: 'development', @@ -194,7 +194,7 @@ describe('Default Packager: Javascript', function() { vendorJsFile: '/assets/vendor.js', }, - registry: setupRegistryFor('template', function(tree) { + registry: setupRegistryFor('template', function (tree) { return new Funnel(tree, { getDestinationPath(relativePath) { return relativePath.replace(/hbs$/g, 'js'); @@ -219,11 +219,11 @@ describe('Default Packager: Javascript', function() { expect(Object.keys(outputFiles.assets)).to.deep.equal(['the-best-app-ever.js', 'vendor.js']); }); - it('processes javascript according to the registry', async function() { + it('processes javascript according to the registry', async function () { let defaultPackager = new DefaultPackager({ name: 'the-best-app-ever', - registry: setupRegistryFor('js', function(tree) { + registry: setupRegistryFor('js', function (tree) { return new Funnel(tree, { getDestinationPath(relativePath) { return relativePath.replace(/js/g, 'jsx'); @@ -255,14 +255,14 @@ describe('Default Packager: Javascript', function() { }); }); - it('runs pre/post-process add-on hooks', async function() { + it('runs pre/post-process add-on hooks', async function () { let addonPreprocessTreeHookCalled = false; let addonPostprocessTreeHookCalled = false; let defaultPackager = new DefaultPackager({ name: 'the-best-app-ever', - registry: setupRegistryFor('js', tree => tree), + registry: setupRegistryFor('js', (tree) => tree), // avoid using `testdouble.js` here on purpose; it does not have a "proxy" // option, where a function call would be registered and the original diff --git a/tests/unit/broccoli/default-packager/process-test.js b/tests/unit/broccoli/default-packager/process-test.js index 76cb7ac5d7..d9a6ae7391 100644 --- a/tests/unit/broccoli/default-packager/process-test.js +++ b/tests/unit/broccoli/default-packager/process-test.js @@ -10,7 +10,7 @@ const buildOutput = broccoliTestHelper.buildOutput; const createTempDir = broccoliTestHelper.createTempDir; const setupRegistryFor = defaultPackagerHelpers.setupRegistryFor; -describe('Default Packager: Process Javascript', function() { +describe('Default Packager: Process Javascript', function () { let input, output; let scriptOutputFiles = { @@ -51,7 +51,7 @@ describe('Default Packager: Process Javascript', function() { return { a: 1 }; }, - registry: setupRegistryFor('template', function(tree) { + registry: setupRegistryFor('template', function (tree) { return new Funnel(tree, { getDestinationPath(relativePath) { return relativePath.replace(/hbs$/g, 'js'); @@ -71,23 +71,23 @@ describe('Default Packager: Process Javascript', function() { ], }; - before(async function() { + before(async function () { input = await createTempDir(); input.write(MODULES); }); - after(async function() { + after(async function () { await input.dispose(); }); - afterEach(async function() { + afterEach(async function () { if (output) { await output.dispose(); } }); - it('caches packaged application tree', async function() { + it('caches packaged application tree', async function () { let defaultPackager = new DefaultPackager({ name: 'the-best-app-ever', env: 'development', @@ -97,7 +97,7 @@ describe('Default Packager: Process Javascript', function() { vendorJsFile: '/assets/vendor.js', }, - registry: setupRegistryFor('template', function(tree) { + registry: setupRegistryFor('template', function (tree) { return new Funnel(tree, { getDestinationPath(relativePath) { return relativePath.replace(/hbs$/g, 'js'); diff --git a/tests/unit/broccoli/default-packager/public-test.js b/tests/unit/broccoli/default-packager/public-test.js index d7f716afee..b205eb341e 100644 --- a/tests/unit/broccoli/default-packager/public-test.js +++ b/tests/unit/broccoli/default-packager/public-test.js @@ -7,7 +7,7 @@ const broccoliTestHelper = require('broccoli-test-helper'); const buildOutput = broccoliTestHelper.buildOutput; const createTempDir = broccoliTestHelper.createTempDir; -describe('Default Packager: Public', function() { +describe('Default Packager: Public', function () { let input, output; let PUBLIC = { @@ -21,21 +21,21 @@ describe('Default Packager: Public', function() { }, }; - before(async function() { + before(async function () { input = await createTempDir(); input.write(PUBLIC); }); - after(async function() { + after(async function () { await input.dispose(); }); - afterEach(async function() { + afterEach(async function () { await output.dispose(); }); - it('caches packaged public tree', async function() { + it('caches packaged public tree', async function () { let defaultPackager = new DefaultPackager(); expect(defaultPackager._cachedPublic).to.equal(null); @@ -45,7 +45,7 @@ describe('Default Packager: Public', function() { expect(defaultPackager._cachedPublic).to.not.equal(null); }); - it('packages public files', async function() { + it('packages public files', async function () { let defaultPackager = new DefaultPackager(); output = await buildOutput(defaultPackager.packagePublic(input.path())); diff --git a/tests/unit/broccoli/default-packager/styles-test.js b/tests/unit/broccoli/default-packager/styles-test.js index f5f670a5f9..ccda790ff3 100644 --- a/tests/unit/broccoli/default-packager/styles-test.js +++ b/tests/unit/broccoli/default-packager/styles-test.js @@ -10,7 +10,7 @@ const buildOutput = broccoliTestHelper.buildOutput; const createTempDir = broccoliTestHelper.createTempDir; const setupRegistryFor = defaultPackagerHelpers.setupRegistryFor; -describe('Default Packager: Styles', function() { +describe('Default Packager: Styles', function () { let input, output; let styleOutputFiles = { @@ -61,23 +61,23 @@ describe('Default Packager: Styles', function() { }, }; - before(async function() { + before(async function () { input = await createTempDir(); input.write(MODULES); }); - after(async function() { + after(async function () { await input.dispose(); }); - afterEach(async function() { + afterEach(async function () { if (output) { await output.dispose(); } }); - it('caches packaged styles tree', async function() { + it('caches packaged styles tree', async function () { let defaultPackager = new DefaultPackager({ name: 'the-best-app-ever', env: 'development', @@ -87,7 +87,7 @@ describe('Default Packager: Styles', function() { vendorCssFile: '/assets/vendor.css', }, - registry: setupRegistryFor('css', function(tree) { + registry: setupRegistryFor('css', function (tree) { return new Funnel(tree, { getDestinationPath(relativePath) { return relativePath.replace(/scss$/g, 'css'); @@ -113,7 +113,7 @@ describe('Default Packager: Styles', function() { expect(defaultPackager._cachedProcessedStyles._annotation).to.equal('Packaged Styles'); }); - it('does not minify css files when minification is disabled', async function() { + it('does not minify css files when minification is disabled', async function () { let defaultPackager = new DefaultPackager({ name: 'the-best-app-ever', env: 'development', @@ -151,7 +151,7 @@ describe('Default Packager: Styles', function() { expect(outputFiles.assets['the-best-app-ever.css'].trim()).to.equal('@import "extra.css";\nhtml { height: 100%; }'); }); - it('minifies css files when minification is enabled', async function() { + it('minifies css files when minification is enabled', async function () { let defaultPackager = new DefaultPackager({ name: 'the-best-app-ever', env: 'development', @@ -189,7 +189,7 @@ describe('Default Packager: Styles', function() { expect(outputFiles.assets['the-best-app-ever.css'].trim()).to.match(/^@import \S+$/, 'css file is minified'); }); - it('processes css according to the registry', async function() { + it('processes css according to the registry', async function () { let defaultPackager = new DefaultPackager({ name: 'the-best-app-ever', env: 'development', @@ -199,7 +199,7 @@ describe('Default Packager: Styles', function() { vendorCssFile: '/assets/vendor.css', }, - registry: setupRegistryFor('css', function(tree, inputPath, outputPath, options) { + registry: setupRegistryFor('css', function (tree, inputPath, outputPath, options) { return new Funnel(tree, { getDestinationPath(relativePath) { if (relativePath.includes('app.css')) { @@ -233,7 +233,7 @@ describe('Default Packager: Styles', function() { expect(Object.keys(outputFiles.assets)).to.deep.equal(['the-best-app-ever.zss', 'vendor.css']); }); - it('inlines css imports', async function() { + it('inlines css imports', async function () { let defaultPackager = new DefaultPackager({ name: 'the-best-app-ever', env: 'development', @@ -270,7 +270,7 @@ describe('Default Packager: Styles', function() { expect(outputFiles.assets['the-best-app-ever.css'].trim()).to.equal('body{position:relative}html{height:100%}'); }); - it('runs pre/post-process add-on hooks', async function() { + it('runs pre/post-process add-on hooks', async function () { let addonPreprocessTreeHookCalled = false; let addonPostprocessTreeHookCalled = false; @@ -326,7 +326,7 @@ describe('Default Packager: Styles', function() { expect(addonPostprocessTreeHookCalled).to.equal(true); }); - it('prevents duplicate inclusion, maintains order: CSS', async function() { + it('prevents duplicate inclusion, maintains order: CSS', async function () { let importFilesMap = { '/assets/vendor.css': [ 'bower_components/1.css', diff --git a/tests/unit/broccoli/default-packager/templates-test.js b/tests/unit/broccoli/default-packager/templates-test.js index 16b3e080a6..6e16f29ecd 100644 --- a/tests/unit/broccoli/default-packager/templates-test.js +++ b/tests/unit/broccoli/default-packager/templates-test.js @@ -10,7 +10,7 @@ const buildOutput = broccoliTestHelper.buildOutput; const createTempDir = broccoliTestHelper.createTempDir; const setupRegistryFor = defaultPackagerHelpers.setupRegistryFor; -describe('Default Packager: Templates', function() { +describe('Default Packager: Templates', function () { let input, output; let TEMPLATES = { @@ -24,29 +24,29 @@ describe('Default Packager: Templates', function() { }, }; - before(async function() { + before(async function () { input = await createTempDir(); input.write(TEMPLATES); }); - after(async function() { + after(async function () { if (input) { await input.dispose(); } }); - afterEach(async function() { + afterEach(async function () { if (output) { await output.dispose(); } }); - it('caches processed templates tree', async function() { + it('caches processed templates tree', async function () { let defaultPackager = new DefaultPackager({ name: 'the-best-app-ever', - registry: setupRegistryFor('template', function(tree) { + registry: setupRegistryFor('template', function (tree) { return new Funnel(tree, { getDestinationPath(relativePath) { return relativePath.replace(/hbs$/g, 'js'); @@ -64,11 +64,11 @@ describe('Default Packager: Templates', function() { expect(defaultPackager._cachedProcessedTemplates).to.not.equal(null); }); - it('processes templates according to the registry', async function() { + it('processes templates according to the registry', async function () { let defaultPackager = new DefaultPackager({ name: 'the-best-app-ever', - registry: setupRegistryFor('template', function(tree) { + registry: setupRegistryFor('template', function (tree) { return new Funnel(tree, { getDestinationPath(relativePath) { return relativePath.replace(/hbs$/g, 'js'); @@ -95,14 +95,14 @@ describe('Default Packager: Templates', function() { }); }); - it('runs pre/post-process add-on hooks', async function() { + it('runs pre/post-process add-on hooks', async function () { let addonPreprocessTreeHookCalled = false; let addonPostprocessTreeHookCalled = false; let defaultPackager = new DefaultPackager({ name: 'the-best-app-ever', - registry: setupRegistryFor('template', function(tree) { + registry: setupRegistryFor('template', function (tree) { return new Funnel(tree, { getDestinationPath(relativePath) { return relativePath.replace(/hbs$/g, 'js'); diff --git a/tests/unit/broccoli/default-packager/tests-test.js b/tests/unit/broccoli/default-packager/tests-test.js index df6ee5a4de..e2265f36a7 100644 --- a/tests/unit/broccoli/default-packager/tests-test.js +++ b/tests/unit/broccoli/default-packager/tests-test.js @@ -11,7 +11,7 @@ const buildOutput = broccoliTestHelper.buildOutput; const createTempDir = broccoliTestHelper.createTempDir; const setupRegistryFor = defaultPackagerHelpers.setupRegistryFor; -describe('Default Packager: Tests', function() { +describe('Default Packager: Tests', function () { let input, output; let name = 'the-best-app-ever'; let env = 'development'; @@ -108,27 +108,27 @@ describe('Default Packager: Tests', function() { // files as the input tree, but the contents will be // different lintTree(type, tree) { - return stew.map(tree, string => string.toUpperCase()); + return stew.map(tree, (string) => string.toUpperCase()); }, }, ], }; - before(async function() { + before(async function () { input = await createTempDir(); input.write(TESTS); }); - after(async function() { + after(async function () { await input.dispose(); }); - afterEach(async function() { + afterEach(async function () { await output.dispose(); }); - it('caches packaged tests tree', async function() { + it('caches packaged tests tree', async function () { let defaultPackager = new DefaultPackager({ project, name, @@ -149,7 +149,7 @@ describe('Default Packager: Tests', function() { vendorTestStaticStyles: [], legacyTestFilesToAppend: [], - registry: setupRegistryFor('js', tree => tree), + registry: setupRegistryFor('js', (tree) => tree), }); expect(defaultPackager._cachedTests).to.equal(null); @@ -159,7 +159,7 @@ describe('Default Packager: Tests', function() { expect(defaultPackager._cachedTests).to.not.equal(null); }); - it('packages test files (with sourcemaps)', async function() { + it('packages test files (with sourcemaps)', async function () { let defaultPackager = new DefaultPackager({ project, name, @@ -180,7 +180,7 @@ describe('Default Packager: Tests', function() { vendorTestStaticStyles: [], legacyTestFilesToAppend: [], - registry: setupRegistryFor('js', tree => tree), + registry: setupRegistryFor('js', (tree) => tree), }); output = await buildOutput(defaultPackager.packageTests(input.path())); @@ -206,7 +206,7 @@ describe('Default Packager: Tests', function() { expect(outputFiles.assets['tests.js']).to.include('EmberENV.TESTS_FILE_LOADED = true;'); }); - it('packages test files (without sourcemaps)', async function() { + it('packages test files (without sourcemaps)', async function () { let defaultPackager = new DefaultPackager({ project, name, @@ -228,7 +228,7 @@ describe('Default Packager: Tests', function() { vendorTestStaticStyles: [], legacyTestFilesToAppend: [], - registry: setupRegistryFor('js', tree => tree), + registry: setupRegistryFor('js', (tree) => tree), }); output = await buildOutput(defaultPackager.packageTests(input.path())); @@ -249,7 +249,7 @@ describe('Default Packager: Tests', function() { expect(outputFiles.assets['tests.js']).to.include('EmberENV.TESTS_FILE_LOADED = true;'); }); - it('does not process `addon-test-support` folder', async function() { + it('does not process `addon-test-support` folder', async function () { let defaultPackager = new DefaultPackager({ project, name, @@ -270,7 +270,7 @@ describe('Default Packager: Tests', function() { vendorTestStaticStyles: [], legacyTestFilesToAppend: [], - registry: setupRegistryFor('js', function(tree) { + registry: setupRegistryFor('js', function (tree) { return new Funnel(tree, { getDestinationPath(relativePath) { return relativePath.replace(/js/g, 'js-test'); @@ -324,7 +324,7 @@ describe('Default Packager: Tests', function() { }); }); - it('processes tests files according to the registry', async function() { + it('processes tests files according to the registry', async function () { let defaultPackager = new DefaultPackager({ project, name, @@ -345,7 +345,7 @@ describe('Default Packager: Tests', function() { vendorTestStaticStyles: [], legacyTestFilesToAppend: [], - registry: setupRegistryFor('js', function(tree) { + registry: setupRegistryFor('js', function (tree) { return new Funnel(tree, { getDestinationPath(relativePath) { return relativePath.replace(/js/g, 'js-test'); @@ -399,7 +399,7 @@ describe('Default Packager: Tests', function() { }); }); - it('emits dist/assets/tests.js by default', async function() { + it('emits dist/assets/tests.js by default', async function () { let emptyInput = await createTempDir(); let emptyTestFolder = { 'addon-tree-output': {}, @@ -471,7 +471,7 @@ describe('Default Packager: Tests', function() { vendorTestStaticStyles: [], legacyTestFilesToAppend: [], - registry: setupRegistryFor('js', tree => tree), + registry: setupRegistryFor('js', (tree) => tree), }); output = await buildOutput(defaultPackager.packageTests(input.path())); @@ -492,7 +492,7 @@ describe('Default Packager: Tests', function() { emptyInput.dispose(); }); - it('lintTree results do not "win" over app tests', async function() { + it('lintTree results do not "win" over app tests', async function () { let defaultPackager = new DefaultPackager({ project, name, @@ -513,7 +513,7 @@ describe('Default Packager: Tests', function() { vendorTestStaticStyles: [], legacyTestFilesToAppend: [], - registry: setupRegistryFor('js', tree => tree), + registry: setupRegistryFor('js', (tree) => tree), }); output = await buildOutput(defaultPackager.packageTests(input.path())); @@ -525,7 +525,7 @@ describe('Default Packager: Tests', function() { expect(outputFiles.assets['tests.js']).to.include('// login-test.js'); }); - it('maintains the concatenation order', async function() { + it('maintains the concatenation order', async function () { let defaultPackager = new DefaultPackager({ project, name, @@ -546,7 +546,7 @@ describe('Default Packager: Tests', function() { vendorTestStaticStyles: ['vendor/custom/a.css', 'vendor/custom/b.css'], legacyTestFilesToAppend: ['vendor/custom/a.js', 'vendor/custom/b.js'], - registry: setupRegistryFor('js', tree => tree), + registry: setupRegistryFor('js', (tree) => tree), }); output = await buildOutput(defaultPackager.packageTests(input.path())); diff --git a/tests/unit/broccoli/default-packager/vendor-test.js b/tests/unit/broccoli/default-packager/vendor-test.js index a75f48db5e..21e10cb5c6 100644 --- a/tests/unit/broccoli/default-packager/vendor-test.js +++ b/tests/unit/broccoli/default-packager/vendor-test.js @@ -7,7 +7,7 @@ const broccoliTestHelper = require('broccoli-test-helper'); const buildOutput = broccoliTestHelper.buildOutput; const createTempDir = broccoliTestHelper.createTempDir; -describe('Default Packager: Vendor', function() { +describe('Default Packager: Vendor', function () { let input, output; let VENDOR_PACKAGES = { @@ -42,21 +42,21 @@ describe('Default Packager: Vendor', function() { }, }; - before(async function() { + before(async function () { input = await createTempDir(); input.write(VENDOR_PACKAGES); }); - after(async function() { + after(async function () { await input.dispose(); }); - afterEach(async function() { + afterEach(async function () { await output.dispose(); }); - it('caches packaged vendor tree', async function() { + it('caches packaged vendor tree', async function () { let defaultPackager = new DefaultPackager(); expect(defaultPackager._cachedVendor).to.equal(null); @@ -67,7 +67,7 @@ describe('Default Packager: Vendor', function() { expect(defaultPackager._cachedVendor._annotation).to.equal('Packaged Vendor'); }); - it('packages vendor files', async function() { + it('packages vendor files', async function () { let defaultPackager = new DefaultPackager(); output = await buildOutput(defaultPackager.packageVendor(input.path())); diff --git a/tests/unit/broccoli/ember-addon-test.js b/tests/unit/broccoli/ember-addon-test.js index 89c5da2ebd..87d55cd833 100644 --- a/tests/unit/broccoli/ember-addon-test.js +++ b/tests/unit/broccoli/ember-addon-test.js @@ -7,7 +7,7 @@ const EmberApp = require('../../../lib/broccoli/ember-app'); const expect = require('chai').expect; const MockCLI = require('../../helpers/mock-cli'); -describe('EmberAddon', function() { +describe('EmberAddon', function () { let project, emberAddon, projectPath; function setupProject(rootPath) { @@ -15,22 +15,22 @@ describe('EmberAddon', function() { let cli = new MockCLI(); project = new Project(rootPath, packageContents, cli.ui, cli); - project.require = function() { - return function() {}; + project.require = function () { + return function () {}; }; - project.initializeAddons = function() { + project.initializeAddons = function () { this.addons = []; }; return project; } - beforeEach(function() { + beforeEach(function () { projectPath = path.resolve(__dirname, '../../fixtures/addon/simple'); project = setupProject(projectPath); }); - it('should merge options with defaults to depth', function() { + it('should merge options with defaults to depth', function () { emberAddon = new EmberAddon( { project, @@ -67,11 +67,11 @@ describe('EmberAddon', function() { }); }); - it('should contain env', function() { + it('should contain env', function () { expect(EmberAddon.env).to.be.a('function'); }); - it('should contain return the correct environment', function() { + it('should contain return the correct environment', function () { expect(EmberAddon.env()).to.eql(EmberApp.env()); }); }); diff --git a/tests/unit/broccoli/ember-app-test.js b/tests/unit/broccoli/ember-app-test.js index cdc380401d..9b1a4933a1 100644 --- a/tests/unit/broccoli/ember-app-test.js +++ b/tests/unit/broccoli/ember-app-test.js @@ -20,11 +20,11 @@ const Addon = require('../../../lib/models/addon'); function mockTemplateRegistry(app) { let oldLoad = app.registry.load; - app.registry.load = function(type) { + app.registry.load = function (type) { if (type === 'template') { return [ { - toTree: tree => tree, + toTree: (tree) => tree, }, ]; } @@ -32,7 +32,7 @@ function mockTemplateRegistry(app) { }; } -describe('EmberApp', function() { +describe('EmberApp', function () { let project, projectPath, app, addon; function setupProject(rootPath) { @@ -40,26 +40,26 @@ describe('EmberApp', function() { let cli = new MockCLI(); project = new Project(rootPath, packageContents, cli.ui, cli); - project.require = function() { - return function() {}; + project.require = function () { + return function () {}; }; - project.initializeAddons = function() { + project.initializeAddons = function () { this.addons = []; }; return project; } - beforeEach(function() { + beforeEach(function () { projectPath = path.resolve(__dirname, '../../fixtures/addon/simple'); project = setupProject(projectPath); }); if (isExperimentEnabled('PACKAGER')) { - describe('packager hook', function() { + describe('packager hook', function () { let js, input, output; - before(async function() { + before(async function () { js = await createTempDir(); js.write({ fake: { @@ -68,22 +68,22 @@ describe('EmberApp', function() { }); }); - beforeEach(async function() { + beforeEach(async function () { input = await createTempDir(); }); - afterEach(async function() { + afterEach(async function () { await input.dispose(); if (output) { await output.dispose(); } }); - after(async function() { + after(async function () { await js.dispose(); }); - it('sets `_isPackageHookSupplied` to `false` if `package` hook is not a function', function() { + it('sets `_isPackageHookSupplied` to `false` if `package` hook is not a function', function () { let app = new EmberApp({ project, package: false, @@ -92,7 +92,7 @@ describe('EmberApp', function() { expect(app._isPackageHookSupplied).to.equal(false); }); - it('sets `_isPackageHookSupplied` to `false` if `package` hook is not supplied', function() { + it('sets `_isPackageHookSupplied` to `false` if `package` hook is not supplied', function () { let app = new EmberApp({ project, }); @@ -100,7 +100,7 @@ describe('EmberApp', function() { expect(app._isPackageHookSupplied).to.equal(false); }); - it('sets `_isPackageHookSupplied` to `true` if `package` hook is supplied', function() { + it('sets `_isPackageHookSupplied` to `true` if `package` hook is supplied', function () { let app = new EmberApp({ project, package: () => input.path(), @@ -109,7 +109,7 @@ describe('EmberApp', function() { expect(app._isPackageHookSupplied).to.equal(true); }); - it('overrides the output of the build', async function() { + it('overrides the output of the build', async function () { input.write({ fake: { dist: { @@ -137,7 +137,7 @@ describe('EmberApp', function() { }); }); - it('receives a full tree as an argument', async function() { + it('receives a full tree as an argument', async function () { let appStyles = await createTempDir(); appStyles.write({ 'app.css': '// css styles', @@ -152,7 +152,7 @@ describe('EmberApp', function() { let app = new EmberApp({ project, - package: tree => mergeTrees([tree, input.path()]), + package: (tree) => mergeTrees([tree, input.path()]), trees: { styles: appStyles.path(), }, @@ -193,7 +193,7 @@ describe('EmberApp', function() { }); }); - it('prints a warning if `package` is not a function and falls back to default packaging', async function() { + it('prints a warning if `package` is not a function and falls back to default packaging', async function () { let app = new EmberApp({ project, package: {}, @@ -227,10 +227,10 @@ describe('EmberApp', function() { ); }); - it('receives transpiled ES current app tree', async function() { + it('receives transpiled ES current app tree', async function () { let app = new EmberApp({ project, - package: tree => tree, + package: (tree) => tree, }); mockTemplateRegistry(app); @@ -262,8 +262,8 @@ describe('EmberApp', function() { }); } - describe('getStyles()', function() { - it('can handle empty styles folders', async function() { + describe('getStyles()', function () { + it('can handle empty styles folders', async function () { let appStyles = await createTempDir(); appStyles.write({ 'app.css': '// css styles', @@ -292,7 +292,7 @@ describe('EmberApp', function() { await output.dispose(); }); - it('can handle empty addon styles folders', async function() { + it('can handle empty addon styles folders', async function () { let appOptions = { project }; let app = new EmberApp(appOptions); @@ -313,7 +313,7 @@ describe('EmberApp', function() { await output.dispose(); }); - it('add `app/styles` folder from add-ons', async function() { + it('add `app/styles` folder from add-ons', async function () { let addonFooStyles = await createTempDir(); addonFooStyles.write({ @@ -354,7 +354,7 @@ describe('EmberApp', function() { await output.dispose(); }); - it('returns add-ons styles files', async function() { + it('returns add-ons styles files', async function () { let addonFooStyles = await createTempDir(); let addonBarStyles = await createTempDir(); @@ -376,7 +376,7 @@ describe('EmberApp', function() { let app = new EmberApp({ project, }); - app.addonTreesFor = function() { + app.addonTreesFor = function () { return [addonFooStyles.path(), addonBarStyles.path()]; }; @@ -399,7 +399,7 @@ describe('EmberApp', function() { await output.dispose(); }); - it('does not fail if add-ons do not export styles', async function() { + it('does not fail if add-ons do not export styles', async function () { let app = new EmberApp({ project, }); @@ -414,8 +414,8 @@ describe('EmberApp', function() { }); }); - describe('getPublic()', function() { - it('returns public files for app and add-ons', async function() { + describe('getPublic()', function () { + it('returns public files for app and add-ons', async function () { let input = await createTempDir(); let addonFooPublic = await createTempDir(); let addonBarPublic = await createTempDir(); @@ -436,7 +436,7 @@ describe('EmberApp', function() { }); app.trees.public = input.path(); - app.addonTreesFor = function() { + app.addonTreesFor = function () { return [addonFooPublic.path(), addonBarPublic.path()]; }; @@ -458,7 +458,7 @@ describe('EmberApp', function() { await output.dispose(); }); - it('does not fail if app or add-ons have the same `public` folder structure', async function() { + it('does not fail if app or add-ons have the same `public` folder structure', async function () { let input = await createTempDir(); let addonFooPublic = await createTempDir(); let addonBarPublic = await createTempDir(); @@ -480,7 +480,7 @@ describe('EmberApp', function() { }); app.trees.public = input.path(); - app.addonTreesFor = function() { + app.addonTreesFor = function () { return [addonFooPublic.path(), addonBarPublic.path()]; }; @@ -503,8 +503,8 @@ describe('EmberApp', function() { }); }); - describe('getAddonTemplates()', function() { - it('returns add-ons template files', async function() { + describe('getAddonTemplates()', function () { + it('returns add-ons template files', async function () { let input = await createTempDir(); let addonFooTemplates = await createTempDir(); let addonBarTemplates = await createTempDir(); @@ -520,7 +520,7 @@ describe('EmberApp', function() { project, }); app.trees.templates = input.path(); - app.addonTreesFor = function() { + app.addonTreesFor = function () { return [addonFooTemplates.path(), addonBarTemplates.path()]; }; @@ -539,8 +539,8 @@ describe('EmberApp', function() { }); }); - describe('getTests()', function() { - it('returns all test files `hinting` is enabled', async function() { + describe('getTests()', function () { + it('returns all test files `hinting` is enabled', async function () { let input = await createTempDir(); let addonLint = await createTempDir(); let addonFooTestSupport = await createTempDir(); @@ -574,7 +574,7 @@ describe('EmberApp', function() { return tree; }; - app.addonTreesFor = function(type) { + app.addonTreesFor = function (type) { if (type === 'test-support') { return [addonFooTestSupport.path(), addonBarTestSupport.path()]; } @@ -606,7 +606,7 @@ describe('EmberApp', function() { await output.dispose(); }); - it('returns test files w/o lint tests if `hinting` is disabled', async function() { + it('returns test files w/o lint tests if `hinting` is disabled', async function () { let input = await createTempDir(); let addonFooTestSupport = await createTempDir(); let addonBarTestSupport = await createTempDir(); @@ -629,7 +629,7 @@ describe('EmberApp', function() { hinting: false, }); app.trees.tests = input.path(); - app.addonTreesFor = function(type) { + app.addonTreesFor = function (type) { if (type === 'test-support') { return [addonFooTestSupport.path(), addonBarTestSupport.path()]; } @@ -657,9 +657,9 @@ describe('EmberApp', function() { }); }); - describe('constructor', function() { - it('should override project.configPath if configPath option is specified', function() { - project.configPath = function() { + describe('constructor', function () { + it('should override project.configPath if configPath option is specified', function () { + project.configPath = function () { return 'original value'; }; @@ -673,7 +673,7 @@ describe('EmberApp', function() { expect(project.configPath().slice(-expected.length)).to.equal(expected); }); - it('should set bowerDirectory for app', function() { + it('should set bowerDirectory for app', function () { let app = new EmberApp({ project, }); @@ -682,7 +682,7 @@ describe('EmberApp', function() { expect(app.bowerDirectory).to.equal('bower_components'); }); - it('should merge options with defaults to depth', function() { + it('should merge options with defaults to depth', function () { let app = new EmberApp( { project, @@ -719,7 +719,7 @@ describe('EmberApp', function() { }); }); - it('should do the right thing when merging default object options', function() { + it('should do the right thing when merging default object options', function () { let app = new EmberApp( { project, @@ -750,7 +750,7 @@ describe('EmberApp', function() { }); }); - it('should watch vendor if it exists', function() { + it('should watch vendor if it exists', function () { let app = new EmberApp({ project, }); @@ -758,7 +758,7 @@ describe('EmberApp', function() { expect(app.options.trees.vendor.__broccoliGetInfo__()).to.have.property('watched', true); }); - describe('Addons included hook', function() { + describe('Addons included hook', function () { let includedWasCalled; let setupPreprocessorRegistryWasCalled; let addonsAppIncluded, addonsApp; @@ -777,15 +777,15 @@ describe('EmberApp', function() { }, }; - beforeEach(function() { + beforeEach(function () { setupPreprocessorRegistryWasCalled = includedWasCalled = 0; addonsApp = null; addonsAppIncluded = null; - project.initializeAddons = function() {}; + project.initializeAddons = function () {}; project.addons = [addon]; }); - it('should set the app on the addons', function() { + it('should set the app on the addons', function () { expect(includedWasCalled).to.eql(0); let app = new EmberApp({ project, @@ -800,8 +800,8 @@ describe('EmberApp', function() { }); }); - describe('loader.js missing', function() { - it('does not error when loader.js is present in registry.availablePlugins', function() { + describe('loader.js missing', function () { + it('does not error when loader.js is present in registry.availablePlugins', function () { expect(() => { new EmberApp({ project, @@ -809,7 +809,7 @@ describe('EmberApp', function() { }).to.not.throw(/loader.js addon is missing/); }); - it('throws an error when loader.js is not present in registry.availablePlugins', function() { + it('throws an error when loader.js is not present in registry.availablePlugins', function () { expect(() => { new EmberApp({ project, @@ -821,7 +821,7 @@ describe('EmberApp', function() { }).to.throw(/loader.js addon is missing/); }); - it('does not throw an error if _ignoreMissingLoader is set', function() { + it('does not throw an error if _ignoreMissingLoader is set', function () { expect(() => { new EmberApp({ project, @@ -835,14 +835,14 @@ describe('EmberApp', function() { }); }); - describe('ember-resolver npm vs Bower', function() { - it('does not load ember-resolver.js as bower dep when ember-resolver is present in registry.availablePlugins', function() { + describe('ember-resolver npm vs Bower', function () { + it('does not load ember-resolver.js as bower dep when ember-resolver is present in registry.availablePlugins', function () { let app = new EmberApp({ project }); expect(app.vendorFiles['ember-resolver']).to.equal(undefined); }); - it('keeps ember-resolver.js in vendorFiles when npm ember-resolver is not installed, but is present in bower.json', function() { - project.bowerDependencies = function() { + it('keeps ember-resolver.js in vendorFiles when npm ember-resolver is not installed, but is present in bower.json', function () { + project.bowerDependencies = function () { return { ember: {}, 'ember-resolver': {} }; }; let app = new EmberApp({ @@ -857,8 +857,8 @@ describe('EmberApp', function() { ); }); - it('removes ember-resolver.js from vendorFiles when not in bower.json and npm ember-resolver not installed', function() { - project.bowerDependencies = function() { + it('removes ember-resolver.js from vendorFiles when not in bower.json and npm ember-resolver not installed', function () { + project.bowerDependencies = function () { return { ember: {} }; }; let app = new EmberApp({ @@ -873,8 +873,8 @@ describe('EmberApp', function() { }); }); - describe('options.babel.sourceMaps', function() { - it('disables babel sourcemaps by default', function() { + describe('options.babel.sourceMaps', function () { + it('disables babel sourcemaps by default', function () { let app = new EmberApp({ project, }); @@ -882,7 +882,7 @@ describe('EmberApp', function() { expect(app.options.babel.sourceMaps).to.be.false; }); - it('can enable babel sourcemaps with the option', function() { + it('can enable babel sourcemaps with the option', function () { let app = new EmberApp({ project, babel: { @@ -894,8 +894,8 @@ describe('EmberApp', function() { }); }); - describe('options.fingerprint.exclude', function() { - it('excludeds testem in fingerprint exclude', function() { + describe('options.fingerprint.exclude', function () { + it('excludeds testem in fingerprint exclude', function () { let app = new EmberApp({ project, fingerprint: { @@ -908,9 +908,9 @@ describe('EmberApp', function() { }); }); - describe('addons', function() { - describe('included hook', function() { - it('included hook is called properly on instantiation', function() { + describe('addons', function () { + describe('included hook', function () { + it('included hook is called properly on instantiation', function () { let called = false; let passedApp; @@ -922,7 +922,7 @@ describe('EmberApp', function() { treeFor() {}, }; - project.initializeAddons = function() { + project.initializeAddons = function () { this.addons = [addon]; }; @@ -934,10 +934,10 @@ describe('EmberApp', function() { expect(passedApp).to.equal(app); }); - it('does not throw an error if the addon does not implement `included`', function() { + it('does not throw an error if the addon does not implement `included`', function () { delete addon.included; - project.initializeAddons = function() { + project.initializeAddons = function () { this.addons = [addon]; }; @@ -949,14 +949,14 @@ describe('EmberApp', function() { }); }); - describe('addonTreesFor', function() { - beforeEach(function() { + describe('addonTreesFor', function () { + beforeEach(function () { addon = { included() {}, treeFor() {}, }; - project.initializeAddons = function() { + project.initializeAddons = function () { this.addons = [addon]; }; @@ -965,15 +965,15 @@ describe('EmberApp', function() { }); }); - it('addonTreesFor returns an empty array if no addons return a tree', function() { + it('addonTreesFor returns an empty array if no addons return a tree', function () { expect(app.addonTreesFor('blah')).to.deep.equal([]); }); - it('addonTreesFor calls treesFor on the addon', function() { + it('addonTreesFor calls treesFor on the addon', function () { let sampleAddon = project.addons[0]; let actualTreeName; - sampleAddon.treeFor = function(name) { + sampleAddon.treeFor = function (name) { actualTreeName = name; return 'blazorz'; @@ -983,7 +983,7 @@ describe('EmberApp', function() { expect(actualTreeName).to.equal('blah'); }); - it('addonTreesFor does not throw an error if treeFor is not defined', function() { + it('addonTreesFor does not throw an error if treeFor is not defined', function () { delete addon.treeFor; app = new EmberApp({ @@ -995,8 +995,8 @@ describe('EmberApp', function() { }).not.to.throw(/addon must implement the `treeFor`/); }); - describe('addonTreesFor is called properly', function() { - beforeEach(function() { + describe('addonTreesFor is called properly', function () { + beforeEach(function () { app = new EmberApp({ project, }); @@ -1005,10 +1005,10 @@ describe('EmberApp', function() { td.when(app.addonTreesFor(), { ignoreExtraArgs: true }).thenReturn(['batman']); }); - it('getAppJavascript calls addonTreesFor', function() { + it('getAppJavascript calls addonTreesFor', function () { app.getAppJavascript(); - let args = td.explain(app.addonTreesFor).calls.map(function(call) { + let args = td.explain(app.addonTreesFor).calls.map(function (call) { return call.args[0]; }); @@ -1017,8 +1017,8 @@ describe('EmberApp', function() { }); }); - describe('toArray', function() { - it('excludes `tests` tree from resulting array if the tree is not present', function() { + describe('toArray', function () { + it('excludes `tests` tree from resulting array if the tree is not present', function () { app = new EmberApp({ project, trees: { @@ -1038,15 +1038,15 @@ describe('EmberApp', function() { }); }); - describe('toTree', function() { - beforeEach(function() { + describe('toTree', function () { + beforeEach(function () { addon = { included() {}, treeFor() {}, postprocessTree: td.function(), }; - project.initializeAddons = function() { + project.initializeAddons = function () { this.addons = [addon]; }; @@ -1057,7 +1057,7 @@ describe('EmberApp', function() { }); }); - it('calls postProcessTree if defined', function() { + it('calls postProcessTree if defined', function () { app.toArray = td.function(); app._legacyPackage = td.function(); @@ -1067,7 +1067,7 @@ describe('EmberApp', function() { addon.postprocessTree( 'all', td.matchers.argThat( - t => t.constructor === BroccoliMergeTrees && t._inputNodes.length === 1 && t._inputNodes[0] === 'bar' + (t) => t.constructor === BroccoliMergeTrees && t._inputNodes.length === 1 && t._inputNodes[0] === 'bar' ) ) ).thenReturn('derp'); @@ -1075,7 +1075,7 @@ describe('EmberApp', function() { expect(app.toTree()).to.equal('derp'); }); - it('calls addonPostprocessTree', function() { + it('calls addonPostprocessTree', function () { app.toArray = td.function(); app.addonPostprocessTree = td.function(); app._legacyPackage = td.function(); @@ -1086,7 +1086,7 @@ describe('EmberApp', function() { app.addonPostprocessTree( 'all', td.matchers.argThat( - t => t.constructor === BroccoliMergeTrees && t._inputNodes.length === 1 && t._inputNodes[0] === 'bar' + (t) => t.constructor === BroccoliMergeTrees && t._inputNodes.length === 1 && t._inputNodes[0] === 'bar' ) ) ).thenReturn('blap'); @@ -1094,7 +1094,7 @@ describe('EmberApp', function() { expect(app.toTree()).to.equal('blap'); }); - it('calls each addon postprocessTree hook', function() { + it('calls each addon postprocessTree hook', function () { mockTemplateRegistry(app); app.index = td.function(); @@ -1110,7 +1110,7 @@ describe('EmberApp', function() { expect(app.toTree()).to.equal('blap'); - let args = td.explain(addon.postprocessTree).calls.map(function(call) { + let args = td.explain(addon.postprocessTree).calls.map(function (call) { return call.args[0]; }); @@ -1118,27 +1118,27 @@ describe('EmberApp', function() { }); }); - describe('addons can be disabled', function() { - beforeEach(function() { + describe('addons can be disabled', function () { + beforeEach(function () { projectPath = path.resolve(__dirname, '../../fixtures/addon/env-addons'); const packageContents = require(path.join(projectPath, 'package.json')); let cli = new MockCLI(); project = new Project(projectPath, packageContents, cli.ui, cli); }); - afterEach(function() { + afterEach(function () { process.env.EMBER_ENV = undefined; }); - describe('isEnabled is called properly', function() { - describe('with environment', function() { + describe('isEnabled is called properly', function () { + describe('with environment', function () { let emberFooEnvAddonFixture; - beforeEach(function() { + beforeEach(function () { emberFooEnvAddonFixture = require(path.resolve(projectPath, 'node_modules/ember-foo-env-addon/index.js')); }); - it('development', function() { + it('development', function () { process.env.EMBER_ENV = 'development'; let app = new EmberApp({ project }); @@ -1148,7 +1148,7 @@ describe('EmberApp', function() { expect(app.project.addons.length).to.equal(8); }); - it('foo', function() { + it('foo', function () { process.env.EMBER_ENV = 'foo'; let app = new EmberApp({ project }); @@ -1160,8 +1160,8 @@ describe('EmberApp', function() { }); }); - describe('blacklist', function() { - it('prevents addons to be added to the project', function() { + describe('blacklist', function () { + it('prevents addons to be added to the project', function () { process.env.EMBER_ENV = 'foo'; let app = new EmberApp({ @@ -1176,7 +1176,7 @@ describe('EmberApp', function() { expect(app.project.addons.length).to.equal(8); }); - it('throws if unavailable addon is specified', function() { + it('throws if unavailable addon is specified', function () { function load() { process.env.EMBER_ENV = 'foo'; @@ -1192,8 +1192,8 @@ describe('EmberApp', function() { }); }); - describe('whitelist', function() { - it('prevents non-whitelisted addons to be added to the project', function() { + describe('whitelist', function () { + it('prevents non-whitelisted addons to be added to the project', function () { process.env.EMBER_ENV = 'foo'; let app = new EmberApp({ @@ -1208,7 +1208,7 @@ describe('EmberApp', function() { expect(app.project.addons.length).to.equal(1); }); - it('throws if unavailable addon is specified', function() { + it('throws if unavailable addon is specified', function () { function load() { process.env.EMBER_ENV = 'foo'; app = new EmberApp({ @@ -1223,8 +1223,8 @@ describe('EmberApp', function() { }); }); - describe('blacklist wins over whitelist', function() { - it('prevents addon to be added to the project', function() { + describe('blacklist wins over whitelist', function () { + it('prevents addon to be added to the project', function () { process.env.EMBER_ENV = 'foo'; app = new EmberApp({ project, @@ -1239,13 +1239,13 @@ describe('EmberApp', function() { }); }); - describe('addonLintTree', function() { - beforeEach(function() { + describe('addonLintTree', function () { + beforeEach(function () { addon = { lintTree: td.function(), }; - project.initializeAddons = function() { + project.initializeAddons = function () { this.addons = [addon]; }; @@ -1254,11 +1254,11 @@ describe('EmberApp', function() { }); }); - it('does not throw an error if lintTree is not defined', function() { + it('does not throw an error if lintTree is not defined', function () { app.addonLintTree(); }); - it('calls lintTree on the addon', function() { + it('calls lintTree on the addon', function () { app.addonLintTree('blah', 'blam'); td.verify(addon.lintTree('blah', 'blam')); @@ -1266,25 +1266,25 @@ describe('EmberApp', function() { }); }); - describe('import', function() { - beforeEach(function() { + describe('import', function () { + beforeEach(function () { app = new EmberApp({ project, }); }); - afterEach(function() { + afterEach(function () { process.env.EMBER_ENV = undefined; }); - it('appends dependencies to vendor by default', function() { + it('appends dependencies to vendor by default', function () { app.import('vendor/moment.js'); let outputFile = app._scriptOutputFiles['/assets/vendor.js']; expect(outputFile).to.be.instanceof(Array); expect(outputFile.indexOf('vendor/moment.js')).to.equal(outputFile.length - 1); }); - it('appends dependencies', function() { + it('appends dependencies', function () { app.import('vendor/moment.js', { type: 'vendor' }); let outputFile = app._scriptOutputFiles['/assets/vendor.js']; @@ -1293,7 +1293,7 @@ describe('EmberApp', function() { expect(outputFile.indexOf('vendor/moment.js')).to.equal(outputFile.length - 1); }); - it('prepends dependencies', function() { + it('prepends dependencies', function () { app.import('vendor/es5-shim.js', { type: 'vendor', prepend: true }); let outputFile = app._scriptOutputFiles['/assets/vendor.js']; @@ -1302,7 +1302,7 @@ describe('EmberApp', function() { expect(outputFile.indexOf('vendor/es5-shim.js')).to.equal(0); }); - it('prepends dependencies to outputFile', function() { + it('prepends dependencies to outputFile', function () { app.import('vendor/moment.js', { outputFile: 'moment.js', prepend: true }); let outputFile = app._scriptOutputFiles['moment.js']; @@ -1311,7 +1311,7 @@ describe('EmberApp', function() { expect(outputFile.indexOf('vendor/moment.js')).to.equal(0); }); - it('appends dependencies to outputFile', function() { + it('appends dependencies to outputFile', function () { app.import('vendor/moment.js', { outputFile: 'moment.js' }); let outputFile = app._scriptOutputFiles['moment.js']; @@ -1320,7 +1320,7 @@ describe('EmberApp', function() { expect(outputFile.indexOf('vendor/moment.js')).to.equal(outputFile.length - 1); }); - it('defaults to development if production is not set', function() { + it('defaults to development if production is not set', function () { process.env.EMBER_ENV = 'production'; app.import({ development: 'vendor/jquery.js', @@ -1330,7 +1330,7 @@ describe('EmberApp', function() { expect(outputFile.indexOf('vendor/jquery.js')).to.equal(outputFile.length - 1); }); - it('honors explicitly set to null in environment', function() { + it('honors explicitly set to null in environment', function () { process.env.EMBER_ENV = 'production'; // set EMBER_ENV before creating the project @@ -1346,7 +1346,7 @@ describe('EmberApp', function() { expect(app._scriptOutputFiles['/assets/vendor.js']).to.not.contain('vendor/jquery.js'); }); - it('normalizes asset path correctly', function() { + it('normalizes asset path correctly', function () { app.import('vendor\\path\\to\\lib.js', { type: 'vendor' }); app.import('vendor/path/to/lib2.js', { type: 'vendor' }); @@ -1354,7 +1354,7 @@ describe('EmberApp', function() { expect(app._scriptOutputFiles['/assets/vendor.js']).to.contain('vendor/path/to/lib2.js'); }); - it('option.using throws exception given invalid inputs', function() { + it('option.using throws exception given invalid inputs', function () { // `using` is looped over if given, we should ensure this throws an exception with proper error message expect(() => { app.import('vendor/path/to/lib1.js', { using: 1 }); @@ -1374,11 +1374,11 @@ describe('EmberApp', function() { }); }); - describe('vendorFiles', function() { + describe('vendorFiles', function () { let defaultVendorFiles = ['jquery.js', 'ember.js', 'app-shims.js']; - describe('handlebars.js', function() { - it('does not app.import handlebars if not present in bower.json', function() { + describe('handlebars.js', function () { + it('does not app.import handlebars if not present in bower.json', function () { let app = new EmberApp({ project, }); @@ -1386,7 +1386,7 @@ describe('EmberApp', function() { expect(app.vendorFiles).not.to.include.keys('handlebars.js'); }); - it('includes handlebars if present in bower.json', function() { + it('includes handlebars if present in bower.json', function () { projectPath = path.resolve(__dirname, '../../fixtures/project-with-handlebars'); project = setupProject(projectPath); @@ -1397,7 +1397,7 @@ describe('EmberApp', function() { expect(app.vendorFiles).to.include.keys('handlebars.js'); }); - it('includes handlebars if present in provided `vendorFiles`', function() { + it('includes handlebars if present in provided `vendorFiles`', function () { let app = new EmberApp({ project, vendorFiles: { @@ -1409,14 +1409,14 @@ describe('EmberApp', function() { }); }); - it('defines vendorFiles by default', function() { + it('defines vendorFiles by default', function () { app = new EmberApp({ project, }); expect(Object.keys(app.vendorFiles)).to.deep.equal(defaultVendorFiles); }); - it('redefines a location of a vendor asset', function() { + it('redefines a location of a vendor asset', function () { app = new EmberApp({ project, @@ -1427,7 +1427,7 @@ describe('EmberApp', function() { expect(app.vendorFiles['ember.js']).to.equal('vendor/ember.js'); }); - it('defines vendorFiles in order even when option for it is passed', function() { + it('defines vendorFiles in order even when option for it is passed', function () { app = new EmberApp({ project, @@ -1438,17 +1438,17 @@ describe('EmberApp', function() { expect(Object.keys(app.vendorFiles)).to.deep.equal(defaultVendorFiles); }); - it('does not include jquery if the app has `@ember/jquery` installed', function() { - project.initializeAddons = function() { + it('does not include jquery if the app has `@ember/jquery` installed', function () { + project.initializeAddons = function () { this.addons = [{ name: '@ember/jquery' }]; }; app = new EmberApp({ project }); - let filesWithoutJQuery = defaultVendorFiles.filter(e => e !== 'jquery.js'); + let filesWithoutJQuery = defaultVendorFiles.filter((e) => e !== 'jquery.js'); expect(Object.keys(app.vendorFiles)).to.deep.equal(filesWithoutJQuery); }); - it('does not include jquery if the app has `@ember/optional-features` with the `jquery-integration` FF turned off', function() { - project.initializeAddons = function() { + it('does not include jquery if the app has `@ember/optional-features` with the `jquery-integration` FF turned off', function () { + project.initializeAddons = function () { this.addons = [ { name: 'ember-source', @@ -1463,11 +1463,11 @@ describe('EmberApp', function() { ]; }; app = new EmberApp({ project, vendorFiles: { 'ember-testing.js': null } }); - let filesWithoutJQuery = defaultVendorFiles.filter(e => e !== 'jquery.js'); + let filesWithoutJQuery = defaultVendorFiles.filter((e) => e !== 'jquery.js'); expect(Object.keys(app.vendorFiles)).to.deep.equal(filesWithoutJQuery); }); - it('removes dependency in vendorFiles', function() { + it('removes dependency in vendorFiles', function () { app = new EmberApp({ project, @@ -1481,7 +1481,7 @@ describe('EmberApp', function() { expect(vendorFiles).to.not.contain('handlebars.js'); }); - it('defaults to ember.debug.js if exists in bower_components', function() { + it('defaults to ember.debug.js if exists in bower_components', function () { let root = path.resolve(__dirname, '../../fixtures/app/with-default-ember-debug'); app = new EmberApp({ @@ -1492,7 +1492,7 @@ describe('EmberApp', function() { expect(files.development).to.equal('bower_components/ember/ember.debug.js'); }); - it('switches the default ember.debug.js to ember.js if it does not exist', function() { + it('switches the default ember.debug.js to ember.js if it does not exist', function () { let root = path.resolve(__dirname, '../../fixtures/app/without-ember-debug'); app = new EmberApp({ @@ -1503,7 +1503,7 @@ describe('EmberApp', function() { expect(files.development).to.equal('bower_components/ember/ember.js'); }); - it('does not clobber an explicitly configured ember development file', function() { + it('does not clobber an explicitly configured ember development file', function () { app = new EmberApp({ project, @@ -1518,7 +1518,7 @@ describe('EmberApp', function() { }); }); - it('fails with invalid type', function() { + it('fails with invalid type', function () { let app = new EmberApp({ project, }); @@ -1530,8 +1530,8 @@ describe('EmberApp', function() { ); }); - describe('_initOptions', function() { - it('sets the tests directory as watched when tests are enabled', function() { + describe('_initOptions', function () { + it('sets the tests directory as watched when tests are enabled', function () { let app = new EmberApp({ project, }); @@ -1542,7 +1542,7 @@ describe('EmberApp', function() { expect(app.options.trees.tests).to.be.an.instanceOf(WatchedDir); }); - it('sets the tests directory as unwatched when tests are disabled', function() { + it('sets the tests directory as unwatched when tests are disabled', function () { let app = new EmberApp({ project, }); @@ -1555,8 +1555,8 @@ describe('EmberApp', function() { }); }); - describe('_resolveLocal', function() { - it('resolves a path relative to the project root', function() { + describe('_resolveLocal', function () { + it('resolves a path relative to the project root', function () { let app = new EmberApp({ project, }); @@ -1566,17 +1566,17 @@ describe('EmberApp', function() { }); }); - describe('_concatFiles()', function() { - beforeEach(function() { + describe('_concatFiles()', function () { + beforeEach(function () { app = new EmberApp({ project }); }); - describe('concat order', function() { - beforeEach(function() { + describe('concat order', function () { + beforeEach(function () { mockTemplateRegistry(app); }); - it('correctly orders concats from app.styles()', function() { + it('correctly orders concats from app.styles()', function () { app.import('files/b.css'); app.import('files/c.css'); app.import('files/a.css', { prepend: true }); @@ -1590,7 +1590,7 @@ describe('EmberApp', function() { ]); }); - it('correctly orders concats from app.testFiles()', function() { + it('correctly orders concats from app.testFiles()', function () { app.import('files/b.js', { type: 'test' }); app.import('files/c.js', { type: 'test' }); app.import('files/a.js', { type: 'test' }); @@ -1612,16 +1612,16 @@ describe('EmberApp', function() { }); }); - describe('deprecations', function() { - it('shows ember-cli-shims deprecation', function() { + describe('deprecations', function () { + it('shows ember-cli-shims deprecation', function () { let root = path.resolve(__dirname, '../../fixtures/app/npm'); let project = setupProject(root); - project.require = function() { + project.require = function () { return { version: '5.0.0', }; }; - project.initializeAddons = function() { + project.initializeAddons = function () { this.addons = [ { name: 'ember-cli-babel', @@ -1639,9 +1639,9 @@ describe('EmberApp', function() { ); }); - describe('jQuery integration', function() { - it('shows deprecation', function() { - project.initializeAddons = function() { + describe('jQuery integration', function () { + it('shows deprecation', function () { + project.initializeAddons = function () { this.addons = [{ name: 'ember-source', paths: {} }]; }; app = new EmberApp({ project }); @@ -1651,8 +1651,8 @@ describe('EmberApp', function() { ); }); - it('does not show deprecation if the app has `@ember/jquery` installed', function() { - project.initializeAddons = function() { + it('does not show deprecation if the app has `@ember/jquery` installed', function () { + project.initializeAddons = function () { this.addons = [{ name: 'ember-source', paths: {} }, { name: '@ember/jquery' }]; }; app = new EmberApp({ project }); @@ -1661,8 +1661,8 @@ describe('EmberApp', function() { ); }); - it('does not show deprecation if the app has `@ember/optional-features` with the `jquery-integration` FF turned off', function() { - project.initializeAddons = function() { + it('does not show deprecation if the app has `@ember/optional-features` with the `jquery-integration` FF turned off', function () { + project.initializeAddons = function () { this.addons = [ { name: 'ember-source', paths: {} }, { diff --git a/tests/unit/broccoli/ember-app/app-and-dependencies-test.js b/tests/unit/broccoli/ember-app/app-and-dependencies-test.js index 68ea0659cc..cf5c2714fb 100644 --- a/tests/unit/broccoli/ember-app/app-and-dependencies-test.js +++ b/tests/unit/broccoli/ember-app/app-and-dependencies-test.js @@ -11,10 +11,10 @@ const buildOutput = broccoliTestHelper.buildOutput; const createTempDir = broccoliTestHelper.createTempDir; const walkSync = require('walk-sync'); -describe('EmberApp#appAndDependencies', function() { +describe('EmberApp#appAndDependencies', function () { let input, output; - beforeEach(async function() { + beforeEach(async function () { process.env.EMBER_ENV = 'development'; input = await createTempDir(); @@ -48,7 +48,7 @@ describe('EmberApp#appAndDependencies', function() { }); }); - afterEach(async function() { + afterEach(async function () { delete process.env.EMBER_ENV; await input.dispose(); @@ -89,7 +89,7 @@ describe('EmberApp#appAndDependencies', function() { }); } - it('moduleNormalizerDisabled', async function() { + it('moduleNormalizerDisabled', async function () { input.write({ node_modules: { 'my-addon': { @@ -120,7 +120,7 @@ describe('EmberApp#appAndDependencies', function() { let addon = app.project.findAddonByName('my-addon'); - addon.treeForAddon = tree => { + addon.treeForAddon = (tree) => { const Funnel = require('broccoli-funnel'); return new Funnel(tree, { destDir: 'modules/my-addon', diff --git a/tests/unit/broccoli/ember-app/import-test.js b/tests/unit/broccoli/ember-app/import-test.js index a5dabdcfed..dd9606e299 100644 --- a/tests/unit/broccoli/ember-app/import-test.js +++ b/tests/unit/broccoli/ember-app/import-test.js @@ -15,7 +15,7 @@ const getDependencyFor = defaultPackagerHelpers.getDependencyFor; const setupProject = defaultPackagerHelpers.setupProject; const validateDefaultPackagedDist = defaultPackagerHelpers.validateDefaultPackagedDist; -describe('EmberApp: Bower Dependencies', function() { +describe('EmberApp: Bower Dependencies', function () { let applicationDirectory, output; let moment = getDependencyFor('moment', { @@ -24,11 +24,11 @@ describe('EmberApp: Bower Dependencies', function() { 'moment.min.js': 'window.moment = "verysmallmoment"', }); - beforeEach(async function() { + beforeEach(async function () { applicationDirectory = await createTempDir(); }); - afterEach(async function() { + afterEach(async function () { await applicationDirectory.dispose(); await output.dispose(); }); @@ -37,7 +37,7 @@ describe('EmberApp: Bower Dependencies', function() { * Both Ember.js and jQuery are packaged by default (when distriburted * through bower). `ember-source` takes precedent over bower though. */ - it('are not packaged unless explicitly imported', async function() { + it('are not packaged unless explicitly imported', async function () { // Given applicationDirectory.write( getDefaultUnpackagedDist('the-best-app-ever', { @@ -65,7 +65,7 @@ describe('EmberApp: Bower Dependencies', function() { expect(results.assets['vendor.js']).to.not.contain('window.moment'); }); - it('are packaged when explicitly imported', async function() { + it('are packaged when explicitly imported', async function () { // Given applicationDirectory.write( getDefaultUnpackagedDist('the-best-app-ever', { @@ -93,7 +93,7 @@ describe('EmberApp: Bower Dependencies', function() { expect(results.assets['vendor.js']).to.contain('window.moment'); }); - it('are packaged when explicitly imported for production', async function() { + it('are packaged when explicitly imported for production', async function () { // Given applicationDirectory.write( getDefaultUnpackagedDist('the-best-app-ever', { @@ -124,7 +124,7 @@ describe('EmberApp: Bower Dependencies', function() { expect(results.assets['vendor.js']).to.contain('verysmallmoment'); }); - it('are packaged when explicitly imported for development', async function() { + it('are packaged when explicitly imported for development', async function () { // Given applicationDirectory.write( getDefaultUnpackagedDist('the-best-app-ever', { diff --git a/tests/unit/broccoli/merge-trees-test.js b/tests/unit/broccoli/merge-trees-test.js index b491413e46..b9f23f53a1 100644 --- a/tests/unit/broccoli/merge-trees-test.js +++ b/tests/unit/broccoli/merge-trees-test.js @@ -4,30 +4,30 @@ const expect = require('chai').expect; const mergeTrees = require('../../../lib/broccoli/merge-trees'); -describe('broccoli/merge-trees', function() { +describe('broccoli/merge-trees', function () { let originalUpstreamMergeTrees; - beforeEach(function() { + beforeEach(function () { originalUpstreamMergeTrees = mergeTrees._upstreamMergeTrees; - mergeTrees._upstreamMergeTrees = function() { + mergeTrees._upstreamMergeTrees = function () { return {}; }; }); - afterEach(function() { + afterEach(function () { // reset the shared EMPTY_MERGE_TREE to ensure // we end up back in a consistent state mergeTrees._overrideEmptyTree(null); mergeTrees._upstreamMergeTrees = originalUpstreamMergeTrees; }); - it('returns the first item when merging single item array', function() { + it('returns the first item when merging single item array', function () { let actual = mergeTrees(['foo']); expect(actual).to.equal('foo'); }); - it('returns a constant "empty tree" when passed an empty array', function() { + it('returns a constant "empty tree" when passed an empty array', function () { let expected = {}; mergeTrees._overrideEmptyTree(expected); @@ -39,11 +39,11 @@ describe('broccoli/merge-trees', function() { expect(second).to.equal(expected); }); - it('passes all inputTrees through when non-empty', function() { + it('passes all inputTrees through when non-empty', function () { let expected = ['foo', 'bar']; let actual; - mergeTrees._upstreamMergeTrees = function(inputTrees) { + mergeTrees._upstreamMergeTrees = function (inputTrees) { actual = inputTrees; return {}; }; @@ -52,13 +52,13 @@ describe('broccoli/merge-trees', function() { expect(actual).to.deep.equal(expected); }); - it('filters out empty trees from inputs', function() { + it('filters out empty trees from inputs', function () { let expected = ['bar', 'baz']; let actual; mergeTrees._overrideEmptyTree('foo'); - mergeTrees._upstreamMergeTrees = function(inputTrees) { + mergeTrees._upstreamMergeTrees = function (inputTrees) { actual = inputTrees; return {}; }; @@ -67,13 +67,13 @@ describe('broccoli/merge-trees', function() { expect(actual).to.deep.equal(expected); }); - it('removes duplicate trees with the last duplicate being the remainder', function() { + it('removes duplicate trees with the last duplicate being the remainder', function () { let treeA = {}; let treeB = {}; let expected = [treeB, treeA]; let actual; - mergeTrees._upstreamMergeTrees = function(inputTrees) { + mergeTrees._upstreamMergeTrees = function (inputTrees) { actual = inputTrees; return {}; }; diff --git a/tests/unit/broccoli/template-precompilation-test.js b/tests/unit/broccoli/template-precompilation-test.js index 619a9b9915..1a321a5193 100644 --- a/tests/unit/broccoli/template-precompilation-test.js +++ b/tests/unit/broccoli/template-precompilation-test.js @@ -15,7 +15,7 @@ const EmberApp = require('../../../lib/broccoli/ember-app'); const buildOutput = broccoliTestHelper.buildOutput; const createTempDir = broccoliTestHelper.createTempDir; -describe('template preprocessors', function() { +describe('template preprocessors', function () { let input, output, addon; class FakeTemplateColocator extends BroccoliPlugin { @@ -33,7 +33,7 @@ describe('template preprocessors', function() { let root = entries[0]; let files = walkSync(path.join(inputPath, root), { directories: false }); - files.forEach(file => { + files.forEach((file) => { let fullInputPath = path.join(inputPath, root, file); let fullOutputPath = path.join(this.outputPath, root, file); @@ -55,8 +55,8 @@ describe('template preprocessors', function() { } } - describe('Addon', function() { - beforeEach(async function() { + describe('Addon', function () { + beforeEach(async function () { input = await createTempDir(); let MockAddon = Addon.extend({ root: input.path(), @@ -77,12 +77,12 @@ describe('template preprocessors', function() { }); }); - afterEach(async function() { + afterEach(async function () { await input.dispose(); await output.dispose(); }); - it('the template preprocessor receives access to all files', async function() { + it('the template preprocessor receives access to all files', async function () { addon.registry.add('template', { name: 'fake-template-compiler', ext: 'hbs', @@ -116,22 +116,22 @@ describe('template preprocessors', function() { }); }); - describe('EmberApp', function() { + describe('EmberApp', function () { let project; - beforeEach(async function() { + beforeEach(async function () { input = await createTempDir(); let cli = new MockCLI(); let pkg = { name: 'fake-app-test', devDependencies: { 'ember-cli': '*' } }; project = new Project(input.path(), pkg, cli.ui, cli); }); - afterEach(async function() { + afterEach(async function () { await input.dispose(); await output.dispose(); }); - it('the template preprocessor receives access to all files', async function() { + it('the template preprocessor receives access to all files', async function () { input.write({ app: { components: { diff --git a/tests/unit/cli/cli-test.js b/tests/unit/cli/cli-test.js index 25623dc2df..680a0f2cdb 100644 --- a/tests/unit/cli/cli-test.js +++ b/tests/unit/cli/cli-test.js @@ -33,7 +33,7 @@ function ember(args) { settings: {}, project, }) - .then(function(value) { + .then(function (value) { td.verify(stopInstr('init'), { times: 1 }); td.verify(startInstr('command'), { times: 1 }); td.verify(stopInstr('command', td.matchers.anything(), td.matchers.isA(Array)), { times: 1 }); @@ -64,8 +64,8 @@ function stubRun(name) { return td.replace(commands[name].prototype, 'run', td.function()); } -describe('Unit: CLI', function() { - beforeEach(function() { +describe('Unit: CLI', function () { + beforeEach(function () { willInterruptProcess = require('../../../lib/utilities/will-interrupt-process'); td.replace(willInterruptProcess, 'addHandler', td.function()); td.replace(willInterruptProcess, 'removeHandler', td.function()); @@ -88,7 +88,7 @@ describe('Unit: CLI', function() { }; }); - afterEach(function() { + afterEach(function () { td.reset(); delete process.env.EMBER_ENV; @@ -97,10 +97,10 @@ describe('Unit: CLI', function() { this.timeout(10000); - it('ember', function() { + it('ember', function () { let help = stubValidateAndRun('help'); - return ember().then(function() { + return ember().then(function () { td.verify(help(), { ignoreExtraArgs: true, times: 1 }); let output = ui.output.trim(); expect(output).to.equal('', 'expected no extra output'); @@ -120,7 +120,7 @@ describe('Unit: CLI', function() { }); */ - it('callHelp', function() { + it('callHelp', function () { let cli = new CLI({ ui, analytics, @@ -155,7 +155,7 @@ describe('Unit: CLI', function() { td.verify(init(), { ignoreExtraArgs: true, times: 0 }); }); - it('errors correctly if the init hook errors', function() { + it('errors correctly if the init hook errors', function () { stubValidateAndRun('help'); let cli = new CLI({ @@ -179,7 +179,7 @@ describe('Unit: CLI', function() { settings: {}, project, }) - .then(function() { + .then(function () { td.verify(startInstr('command'), { times: 0 }); td.verify(stopInstr('command'), { times: 0 }); td.verify(startInstr('shutdown'), { times: 1 }); @@ -187,7 +187,7 @@ describe('Unit: CLI', function() { }); }); - it('"run" method must throw error if no evironment provided', function() { + it('"run" method must throw error if no evironment provided', function () { stubValidateAndRun('help'); let cli = new CLI({ @@ -202,7 +202,7 @@ describe('Unit: CLI', function() { .then(() => { wasResolved = true; }) - .catch(err => { + .catch((err) => { expect(err.toString()).to.be.equal('Error: Unable to execute "run" command without environment argument'); }) .finally(() => { @@ -210,7 +210,7 @@ describe('Unit: CLI', function() { }); }); - it('errors correctly if "run" method not called before "maybeMakeCommand" execution', function() { + it('errors correctly if "run" method not called before "maybeMakeCommand" execution', function () { stubValidateAndRun('help'); let cli = new CLI({ @@ -228,8 +228,8 @@ describe('Unit: CLI', function() { } }); - describe('custom addon command', function() { - it('beforeRun can return a promise', function() { + describe('custom addon command', function () { + it('beforeRun can return a promise', function () { let CustomCommand = Command.extend({ name: 'custom', @@ -242,8 +242,8 @@ describe('Unit: CLI', function() { beforeRun() { let command = this; - return new Promise(function(resolve) { - setTimeout(function() { + return new Promise(function (resolve) { + setTimeout(function () { command._beforeRunFinished = true; resolve(); }, 5); @@ -257,7 +257,7 @@ describe('Unit: CLI', function() { }, }); - project.eachAddonCommand = function(callback) { + project.eachAddonCommand = function (callback) { callback('custom-addon', { custom: CustomCommand, }); @@ -267,13 +267,13 @@ describe('Unit: CLI', function() { }); }); - describe('command interruption handler', function() { + describe('command interruption handler', function () { let onCommandInterrupt; - beforeEach(function() { + beforeEach(function () { onCommandInterrupt = td.matchers.isA(Function); }); - it('sets up handler before command run', function() { + it('sets up handler before command run', function () { const CustomCommand = Command.extend({ name: 'custom', @@ -288,7 +288,7 @@ describe('Unit: CLI', function() { }, }); - project.eachAddonCommand = function(callback) { + project.eachAddonCommand = function (callback) { callback('custom-addon', { CustomCommand, }); @@ -297,32 +297,32 @@ describe('Unit: CLI', function() { return ember(['custom']); }); - it('cleans up handler after command finished', function() { + it('cleans up handler after command finished', function () { stubValidateAndRun('serve'); - return ember(['serve']).finally(function() { + return ember(['serve']).finally(function () { td.verify(willInterruptProcess.removeHandler(onCommandInterrupt)); }); }); }); - describe('help', function() { - ['--help', '-h'].forEach(function(command) { - it(`ember ${command}`, function() { + describe('help', function () { + ['--help', '-h'].forEach(function (command) { + it(`ember ${command}`, function () { let help = stubValidateAndRun('help'); - return ember([command]).then(function() { + return ember([command]).then(function () { td.verify(help(), { ignoreExtraArgs: true, times: 1 }); let output = ui.output.trim(); expect(output).to.equal('', 'expected no extra output'); }); }); - it(`ember new ${command}`, function() { + it(`ember new ${command}`, function () { let help = stubCallHelp(); stubValidateAndRunHelp('new'); - return ember(['new', command]).then(function() { + return ember(['new', command]).then(function () { td.verify(help(), { ignoreExtraArgs: true, times: 1 }); let output = ui.output.trim(); expect(output).to.equal('', 'expected no extra output'); @@ -331,11 +331,11 @@ describe('Unit: CLI', function() { }); }); - ['--version', '-v'].forEach(function(command) { - it(`ember ${command}`, function() { + ['--version', '-v'].forEach(function (command) { + it(`ember ${command}`, function () { let version = stubValidateAndRun('version'); - return ember([command]).then(function() { + return ember([command]).then(function () { let output = ui.output.trim(); expect(output).to.equal('', 'expected no extra output'); td.verify(version(), { ignoreExtraArgs: true, times: 1 }); @@ -343,32 +343,32 @@ describe('Unit: CLI', function() { }); }); - describe('server', function() { - ['server', 's'].forEach(function(command) { - it(`ember ${command} --port 9999`, function() { + describe('server', function () { + ['server', 's'].forEach(function (command) { + it(`ember ${command} --port 9999`, function () { let server = stubRun('serve'); - return ember([command, '--port', '9999']).then(function() { + return ember([command, '--port', '9999']).then(function () { let captor = td.matchers.captor(); td.verify(server(captor.capture()), { ignoreExtraArgs: true, times: 1 }); expect(captor.value.port, 'port').to.equal(9999); }); }); - it(`ember ${command} --host localhost`, function() { + it(`ember ${command} --host localhost`, function () { let server = stubRun('serve'); - return ember(['server', '--host', 'localhost']).then(function() { + return ember(['server', '--host', 'localhost']).then(function () { let captor = td.matchers.captor(); td.verify(server(captor.capture()), { ignoreExtraArgs: true, times: 1 }); expect(captor.value.host, 'host').to.equal('localhost'); }); }); - it(`ember ${command} --port 9292 --host localhost`, function() { + it(`ember ${command} --port 9292 --host localhost`, function () { let server = stubRun('serve'); - return ember([command, '--port', '9292', '--host', 'localhost']).then(function() { + return ember([command, '--port', '9292', '--host', 'localhost']).then(function () { let captor = td.matchers.captor(); td.verify(server(captor.capture()), { ignoreExtraArgs: true, times: 1 }); expect(captor.value.host, 'host').to.equal('localhost'); @@ -376,71 +376,71 @@ describe('Unit: CLI', function() { }); }); - it(`ember ${command} --proxy http://localhost:3000/`, function() { + it(`ember ${command} --proxy http://localhost:3000/`, function () { let server = stubRun('serve'); - return ember([command, '--proxy', 'http://localhost:3000/']).then(function() { + return ember([command, '--proxy', 'http://localhost:3000/']).then(function () { let captor = td.matchers.captor(); td.verify(server(captor.capture()), { ignoreExtraArgs: true, times: 1 }); expect(captor.value.proxy, 'proxy').to.equal('http://localhost:3000/'); }); }); - it(`ember ${command} --proxy https://localhost:3009/ --insecure-proxy`, function() { + it(`ember ${command} --proxy https://localhost:3009/ --insecure-proxy`, function () { let server = stubRun('serve'); - return ember([command, '--insecure-proxy']).then(function() { + return ember([command, '--insecure-proxy']).then(function () { let captor = td.matchers.captor(); td.verify(server(captor.capture()), { ignoreExtraArgs: true, times: 1 }); expect(captor.value.insecureProxy, 'insecureProxy').to.equal(true); }); }); - it(`ember ${command} --proxy https://localhost:3009/ --no-insecure-proxy`, function() { + it(`ember ${command} --proxy https://localhost:3009/ --no-insecure-proxy`, function () { let server = stubRun('serve'); - return ember([command, '--no-insecure-proxy']).then(function() { + return ember([command, '--no-insecure-proxy']).then(function () { let captor = td.matchers.captor(); td.verify(server(captor.capture()), { ignoreExtraArgs: true, times: 1 }); expect(captor.value.insecureProxy, 'insecureProxy').to.equal(false); }); }); - it(`ember ${command} --watcher events`, function() { + it(`ember ${command} --watcher events`, function () { let server = stubRun('serve'); - return ember([command, '--watcher', 'events']).then(function() { + return ember([command, '--watcher', 'events']).then(function () { let captor = td.matchers.captor(); td.verify(server(captor.capture()), { ignoreExtraArgs: true, times: 1 }); expect(captor.value.watcher, 'watcher').to.match(/node|polling|watchman/); }); }); - it(`ember ${command} --watcher polling`, function() { + it(`ember ${command} --watcher polling`, function () { let server = stubRun('serve'); - return ember([command, '--watcher', 'polling']).then(function() { + return ember([command, '--watcher', 'polling']).then(function () { let captor = td.matchers.captor(); td.verify(server(captor.capture()), { ignoreExtraArgs: true, times: 1 }); expect(captor.value.watcher, 'watcher').to.equal('polling'); }); }); - it(`ember ${command}`, function() { + it(`ember ${command}`, function () { let server = stubRun('serve'); - return ember([command]).then(function() { + return ember([command]).then(function () { let captor = td.matchers.captor(); td.verify(server(captor.capture()), { ignoreExtraArgs: true, times: 1 }); expect(captor.value.watcher, 'watcher').to.match(/node|polling|watchman/); }); }); - ['production', 'development', 'foo'].forEach(function(env) { - it(`ember ${command} --environment ${env}`, function() { + ['production', 'development', 'foo'].forEach(function (env) { + it(`ember ${command} --environment ${env}`, function () { let server = stubRun('serve'); - return ember([command, '--environment', env]).then(function() { + return ember([command, '--environment', env]).then(function () { let captor = td.matchers.captor(); td.verify(server(captor.capture()), { ignoreExtraArgs: true, times: 1 }); expect(captor.value.environment, 'environment').to.equal(env); @@ -448,12 +448,12 @@ describe('Unit: CLI', function() { }); }); - ['development', 'foo'].forEach(function(env) { - it(`ember ${command} --environment ${env}`, function() { + ['development', 'foo'].forEach(function (env) { + it(`ember ${command} --environment ${env}`, function () { let server = stubRun('serve'); process.env.EMBER_ENV = 'production'; - return ember([command, '--environment', env]).then(function() { + return ember([command, '--environment', env]).then(function () { td.verify(server(), { ignoreExtraArgs: true, times: 1 }); expect(process.env.EMBER_ENV).to.equal('production', 'uses EMBER_ENV over environment'); @@ -461,13 +461,13 @@ describe('Unit: CLI', function() { }); }); - ['production', 'development', 'foo'].forEach(function(env) { - it(`EMBER_ENV=${env} ember ${command}`, function() { + ['production', 'development', 'foo'].forEach(function (env) { + it(`EMBER_ENV=${env} ember ${command}`, function () { let server = stubRun('serve'); process.env.EMBER_ENV = env; - return ember([command]).then(function() { + return ember([command]).then(function () { td.verify(server(), { ignoreExtraArgs: true, times: 1 }); expect(process.env.EMBER_ENV).to.equal(env, 'correct environment'); @@ -477,12 +477,12 @@ describe('Unit: CLI', function() { }); }); - describe('generate', function() { - ['generate', 'g'].forEach(function(command) { - it(`ember ${command} foo bar baz`, function() { + describe('generate', function () { + ['generate', 'g'].forEach(function (command) { + it(`ember ${command} foo bar baz`, function () { let generate = stubRun('generate'); - return ember([command, 'foo', 'bar', 'baz']).then(function() { + return ember([command, 'foo', 'bar', 'baz']).then(function () { let captor = td.matchers.captor(); td.verify(generate(captor.capture(), ['foo', 'bar', 'baz']), { times: 1 }); @@ -494,20 +494,20 @@ describe('Unit: CLI', function() { }); }); - describe('init', function() { - ['init'].forEach(function(command) { - it(`ember ${command}`, function() { + describe('init', function () { + ['init'].forEach(function (command) { + it(`ember ${command}`, function () { let init = stubValidateAndRun('init'); - return ember([command]).then(function() { + return ember([command]).then(function () { td.verify(init(), { ignoreExtraArgs: true, times: 1 }); }); }); - it(`ember ${command} `, function() { + it(`ember ${command} `, function () { let init = stubRun('init'); - return ember([command, 'my-blog']).then(function() { + return ember([command, 'my-blog']).then(function () { let captor = td.matchers.captor(); td.verify(init(captor.capture(), ['my-blog']), { times: 1 }); @@ -519,34 +519,34 @@ describe('Unit: CLI', function() { }); }); - describe('new', function() { - it('ember new', function() { + describe('new', function () { + it('ember new', function () { isWithinProject = false; let newCommand = stubRun('new'); - return ember(['new']).then(function() { + return ember(['new']).then(function () { td.verify(newCommand(), { ignoreExtraArgs: true, times: 1 }); }); }); - it('ember new MyApp', function() { + it('ember new MyApp', function () { isWithinProject = false; let newCommand = stubRun('new'); - return ember(['new', 'MyApp']).then(function() { + return ember(['new', 'MyApp']).then(function () { td.verify(newCommand(td.matchers.anything(), ['MyApp']), { times: 1 }); }); }); }); - describe('build', function() { - ['build', 'b'].forEach(function(command) { - it(`ember ${command}`, function() { + describe('build', function () { + ['build', 'b'].forEach(function (command) { + it(`ember ${command}`, function () { let build = stubRun('build'); - return ember([command]).then(function() { + return ember([command]).then(function () { let captor = td.matchers.captor(); td.verify(build(captor.capture()), { ignoreExtraArgs: true, times: 1 }); @@ -556,10 +556,10 @@ describe('Unit: CLI', function() { }); }); - it(`ember ${command} --disable-analytics`, function() { + it(`ember ${command} --disable-analytics`, function () { let build = stubRun('build'); - return ember([command, '--disable-analytics']).then(function() { + return ember([command, '--disable-analytics']).then(function () { let captor = td.matchers.captor(); td.verify(build(captor.capture()), { ignoreExtraArgs: true, times: 1 }); @@ -568,10 +568,10 @@ describe('Unit: CLI', function() { }); }); - it(`ember ${command} --watch`, function() { + it(`ember ${command} --watch`, function () { let build = stubRun('build'); - return ember([command, '--watch']).then(function() { + return ember([command, '--watch']).then(function () { let captor = td.matchers.captor(); td.verify(build(captor.capture()), { ignoreExtraArgs: true, times: 1 }); @@ -580,10 +580,10 @@ describe('Unit: CLI', function() { }); }); - it(`ember ${command} --suppress-sizes`, function() { + it(`ember ${command} --suppress-sizes`, function () { let build = stubRun('build'); - return ember([command, '--suppress-sizes']).then(function() { + return ember([command, '--suppress-sizes']).then(function () { let captor = td.matchers.captor(); td.verify(build(captor.capture()), { ignoreExtraArgs: true, times: 1 }); @@ -592,11 +592,11 @@ describe('Unit: CLI', function() { }); }); - ['production', 'development', 'baz'].forEach(function(env) { - it(`ember ${command} --environment ${env}`, function() { + ['production', 'development', 'baz'].forEach(function (env) { + it(`ember ${command} --environment ${env}`, function () { let build = stubRun('build'); - return ember([command, '--environment', env]).then(function() { + return ember([command, '--environment', env]).then(function () { let captor = td.matchers.captor(); td.verify(build(captor.capture()), { ignoreExtraArgs: true, times: 1 }); @@ -606,13 +606,13 @@ describe('Unit: CLI', function() { }); }); - ['development', 'baz'].forEach(function(env) { - it(`EMBER_ENV=production ember ${command} --environment ${env}`, function() { + ['development', 'baz'].forEach(function (env) { + it(`EMBER_ENV=production ember ${command} --environment ${env}`, function () { let build = stubRun('build'); process.env.EMBER_ENV = 'production'; - return ember([command, '--environment', env]).then(function() { + return ember([command, '--environment', env]).then(function () { td.verify(build(), { ignoreExtraArgs: true, times: 1 }); expect(process.env.EMBER_ENV).to.equal('production', 'uses EMBER_ENV over environment'); @@ -620,13 +620,13 @@ describe('Unit: CLI', function() { }); }); - ['production', 'development', 'baz'].forEach(function(env) { - it(`EMBER_ENV=${env} ember ${command} `, function() { + ['production', 'development', 'baz'].forEach(function (env) { + it(`EMBER_ENV=${env} ember ${command} `, function () { let build = stubRun('build'); process.env.EMBER_ENV = env; - return ember([command]).then(function() { + return ember([command]).then(function () { td.verify(build(), { ignoreExtraArgs: true, times: 1 }); expect(process.env.EMBER_ENV).to.equal(env, 'correct environment'); @@ -636,11 +636,11 @@ describe('Unit: CLI', function() { }); }); - it('ember ', function() { + it('ember ', function () { let help = stubValidateAndRun('help'); let serve = stubValidateAndRun('serve'); - return ember(['serve']).then(function() { + return ember(['serve']).then(function () { td.verify(help(), { ignoreExtraArgs: true, times: 0 }); td.verify(serve(), { ignoreExtraArgs: true, times: 1 }); @@ -649,11 +649,11 @@ describe('Unit: CLI', function() { }); }); - it.skip('ember ', function() { + it.skip('ember ', function () { let help = stubValidateAndRun('help'); let serve = stubValidateAndRun('serve'); - return ember(['serve', 'lorem', 'ipsum', 'dolor', '--flag1=one']).then(function() { + return ember(['serve', 'lorem', 'ipsum', 'dolor', '--flag1=one']).then(function () { let args = serve.calledWith[0][0].cliArgs; expect(help.called).to.equal(0, 'expected the help command NOT to be run'); @@ -667,10 +667,10 @@ describe('Unit: CLI', function() { }); }); - it('ember ', function() { + it('ember ', function () { let help = stubValidateAndRun('help'); - return expect(ember(['unknownCommand'])).to.be.rejected.then(error => { + return expect(ember(['unknownCommand'])).to.be.rejected.then((error) => { expect(help.called, 'help command was executed').to.not.be.ok; expect(error.name).to.equal('SilentError'); expect(error.message).to.equal( @@ -679,12 +679,12 @@ describe('Unit: CLI', function() { }); }); - describe.skip('default options config file', function() { - it('reads default options from .ember-cli file', function() { + describe.skip('default options config file', function () { + it('reads default options from .ember-cli file', function () { let defaults = ['--output', process.cwd()]; let build = stubValidateAndRun('build'); - return ember(['build'], defaults).then(function() { + return ember(['build'], defaults).then(function () { let options = build.calledWith[0][1].cliOptions; expect(options.output).to.equal(process.cwd()); @@ -692,8 +692,8 @@ describe('Unit: CLI', function() { }); }); - describe('logError', function() { - it('returns error status code in production', function() { + describe('logError', function () { + it('returns error status code in production', function () { let cli = new CLI({ ui: new MockUI(), testing: false, @@ -702,7 +702,7 @@ describe('Unit: CLI', function() { expect(cli.logError('foo')).to.equal(1); }); - it('does not throw an error in production', function() { + it('does not throw an error in production', function () { let cli = new CLI({ ui: new MockUI(), testing: false, @@ -713,7 +713,7 @@ describe('Unit: CLI', function() { expect(invokeError).to.not.throw(); }); - it('throws error in testing', function() { + it('throws error in testing', function () { let cli = new CLI({ ui: new MockUI(), testing: true, @@ -725,21 +725,21 @@ describe('Unit: CLI', function() { }); }); - describe('Global command options', function() { - let verboseCommand = function(args) { + describe('Global command options', function () { + let verboseCommand = function (args) { return ember(['fake-command', '--verbose'].concat(args)); }; - describe('--verbose', function() { - describe('option parsing', function() { - afterEach(function() { + describe('--verbose', function () { + describe('option parsing', function () { + afterEach(function () { delete process.env.EMBER_VERBOSE_FAKE_OPTION_1; delete process.env.EMBER_VERBOSE_FAKE_OPTION_2; }); // eslint-disable-next-line no-template-curly-in-string - it('sets process.env.EMBER_VERBOSE_${NAME} for each space delimited option', function() { - return expect(verboseCommand(['fake_option_1', 'fake_option_2'])).to.be.rejected.then(error => { + it('sets process.env.EMBER_VERBOSE_${NAME} for each space delimited option', function () { + return expect(verboseCommand(['fake_option_1', 'fake_option_2'])).to.be.rejected.then((error) => { expect(process.env.EMBER_VERBOSE_FAKE_OPTION_1).to.be.ok; expect(process.env.EMBER_VERBOSE_FAKE_OPTION_2).to.be.ok; expect(error.name).to.equal('SilentError'); @@ -749,9 +749,9 @@ describe('Unit: CLI', function() { }); }); - it('ignores verbose options after --', function() { + it('ignores verbose options after --', function () { return expect(verboseCommand(['fake_option_1', '--fake-option', 'fake_option_2'])).to.be.rejected.then( - error => { + (error) => { expect(process.env.EMBER_VERBOSE_FAKE_OPTION_1).to.be.ok; expect(process.env.EMBER_VERBOSE_FAKE_OPTION_2).to.not.be.ok; expect(error.name).to.equal('SilentError'); @@ -762,8 +762,8 @@ describe('Unit: CLI', function() { ); }); - it('ignores verbose options after -', function() { - return expect(verboseCommand(['fake_option_1', '-f', 'fake_option_2'])).to.be.rejected.then(error => { + it('ignores verbose options after -', function () { + return expect(verboseCommand(['fake_option_1', '-f', 'fake_option_2'])).to.be.rejected.then((error) => { expect(process.env.EMBER_VERBOSE_FAKE_OPTION_1).to.be.ok; expect(process.env.EMBER_VERBOSE_FAKE_OPTION_2).to.not.be.ok; expect(error.name).to.equal('SilentError'); diff --git a/tests/unit/cli/lookup-command-test.js b/tests/unit/cli/lookup-command-test.js index c2d0e1d708..d256ed4c98 100644 --- a/tests/unit/cli/lookup-command-test.js +++ b/tests/unit/cli/lookup-command-test.js @@ -23,7 +23,7 @@ let commands = { function AddonServeCommand() { return this; } -AddonServeCommand.prototype.includedCommands = function() { +AddonServeCommand.prototype.includedCommands = function () { return { Serve: { name: 'serve', @@ -32,7 +32,7 @@ AddonServeCommand.prototype.includedCommands = function() { }; }; -describe('cli/lookup-command.js', function() { +describe('cli/lookup-command.js', function () { let ui; let project = { isEmberCLIProject() { @@ -45,18 +45,18 @@ describe('cli/lookup-command.js', function() { eachAddonCommand: Project.prototype.eachAddonCommand, }; - before(function() { + before(function () { ui = new MockUI(); }); - it('lookupCommand() should find commands by name and aliases.', function() { + it('lookupCommand() should find commands by name and aliases.', function () { // Valid commands expect(lookupCommand(commands, 'serve')).to.exist; expect(lookupCommand(commands, 's')).to.exist; }); - it('lookupCommand() should find commands that addons add by name and aliases.', function() { + it('lookupCommand() should find commands that addons add by name and aliases.', function () { let command, Command; Command = lookupCommand(commands, 'addon-command', [], { @@ -119,7 +119,7 @@ describe('cli/lookup-command.js', function() { expect(command.name).to.equal('class-addon-command'); }); - it('lookupCommand() should write out a warning when overriding a core command', function() { + it('lookupCommand() should write out a warning when overriding a core command', function () { project = { isEmberCLIProject() { return true; @@ -141,7 +141,7 @@ describe('cli/lookup-command.js', function() { ); }); - it('lookupCommand() should write out a warning when overriding a core command and allow it if intentional', function() { + it('lookupCommand() should write out a warning when overriding a core command and allow it if intentional', function () { project = { isEmberCLIProject() { return true; @@ -163,7 +163,7 @@ describe('cli/lookup-command.js', function() { ); }); - it('lookupCommand() should return UnknownCommand object when command name is not present.', function() { + it('lookupCommand() should return UnknownCommand object when command name is not present.', function () { let Command = lookupCommand(commands, 'something-else', [], { project, ui, diff --git a/tests/unit/commands/addon-test.js b/tests/unit/commands/addon-test.js index c58f1dce72..28ec08aee2 100644 --- a/tests/unit/commands/addon-test.js +++ b/tests/unit/commands/addon-test.js @@ -7,10 +7,10 @@ const AddonCommand = require('../../../lib/commands/addon'); const Blueprint = require('../../../lib/models/blueprint'); const td = require('testdouble'); -describe('addon command', function() { +describe('addon command', function () { let command; - beforeEach(function() { + beforeEach(function () { let options = commandOptions({ project: { isEmberCLIProject() { @@ -25,61 +25,61 @@ describe('addon command', function() { command = new AddonCommand(options); }); - afterEach(function() { + afterEach(function () { td.reset(); }); - it("doesn't allow to create an addon named `test`", function() { - return expect(command.validateAndRun(['test'])).to.be.rejected.then(error => { + it("doesn't allow to create an addon named `test`", function () { + return expect(command.validateAndRun(['test'])).to.be.rejected.then((error) => { expect(error.message).to.equal('We currently do not support a name of `test`.'); }); }); - it("doesn't allow to create an addon named `ember`", function() { - return expect(command.validateAndRun(['ember'])).to.be.rejected.then(error => { + it("doesn't allow to create an addon named `ember`", function () { + return expect(command.validateAndRun(['ember'])).to.be.rejected.then((error) => { expect(error.message).to.equal('We currently do not support a name of `ember`.'); }); }); - it("doesn't allow to create an addon named `Ember`", function() { - return expect(command.validateAndRun(['Ember'])).to.be.rejected.then(error => { + it("doesn't allow to create an addon named `Ember`", function () { + return expect(command.validateAndRun(['Ember'])).to.be.rejected.then((error) => { expect(error.message).to.equal('We currently do not support a name of `Ember`.'); }); }); - it("doesn't allow to create an addon named `ember-cli`", function() { - return expect(command.validateAndRun(['ember-cli'])).to.be.rejected.then(error => { + it("doesn't allow to create an addon named `ember-cli`", function () { + return expect(command.validateAndRun(['ember-cli'])).to.be.rejected.then((error) => { expect(error.message).to.equal('We currently do not support a name of `ember-cli`.'); }); }); - it("doesn't allow to create an addon named `vendor`", function() { - return expect(command.validateAndRun(['vendor'])).to.be.rejected.then(error => { + it("doesn't allow to create an addon named `vendor`", function () { + return expect(command.validateAndRun(['vendor'])).to.be.rejected.then((error) => { expect(error.message).to.equal('We currently do not support a name of `vendor`.'); }); }); - it("doesn't allow to create an addon with a period in the name", function() { - return expect(command.validateAndRun(['zomg.awesome'])).to.be.rejected.then(error => { + it("doesn't allow to create an addon with a period in the name", function () { + return expect(command.validateAndRun(['zomg.awesome'])).to.be.rejected.then((error) => { expect(error.message).to.equal('We currently do not support a name of `zomg.awesome`.'); }); }); - it("doesn't allow to create an addon with a name beginning with a number", function() { - return expect(command.validateAndRun(['123-my-bagel'])).to.be.rejected.then(error => { + it("doesn't allow to create an addon with a name beginning with a number", function () { + return expect(command.validateAndRun(['123-my-bagel'])).to.be.rejected.then((error) => { expect(error.message).to.equal('We currently do not support a name of `123-my-bagel`.'); }); }); - it("doesn't allow to create an addon when the name is a period", function() { - return expect(command.validateAndRun(['.'])).to.be.rejected.then(error => { + it("doesn't allow to create an addon when the name is a period", function () { + return expect(command.validateAndRun(['.'])).to.be.rejected.then((error) => { expect(error.message).to.equal( `Trying to generate an addon structure in this directory? Use \`ember init\` instead.` ); }); }); - it('registers blueprint options in beforeRun', function() { + it('registers blueprint options in beforeRun', function () { td.replace(Blueprint, 'lookup', td.function()); td.when(Blueprint.lookup('addon'), { ignoreExtraArgs: true }).thenReturn({ diff --git a/tests/unit/commands/build-test.js b/tests/unit/commands/build-test.js index da53db5832..851c7d8413 100644 --- a/tests/unit/commands/build-test.js +++ b/tests/unit/commands/build-test.js @@ -6,11 +6,11 @@ const Task = require('../../../lib/models/task'); const BuildCommand = require('../../../lib/commands/build'); const td = require('testdouble'); -describe('build command', function() { +describe('build command', function () { let tasks, options, command; let buildTaskInstance, buildWatchTaskInstance; - beforeEach(function() { + beforeEach(function () { tasks = { Build: Task.extend({ init() { @@ -47,24 +47,24 @@ describe('build command', function() { td.when(tasks.BuildWatch.prototype.run(), { ignoreExtraArgs: true, times: 1 }).thenResolve(); }); - afterEach(function() { + afterEach(function () { td.reset(); }); - it('Build task is provided with the project instance', function() { - return command.validateAndRun([]).then(function() { + it('Build task is provided with the project instance', function () { + return command.validateAndRun([]).then(function () { expect(buildTaskInstance.project).to.equal(options.project, 'has correct project instance'); }); }); - it('BuildWatch task is provided with the project instance', function() { - return command.validateAndRun(['--watch']).then(function() { + it('BuildWatch task is provided with the project instance', function () { + return command.validateAndRun(['--watch']).then(function () { expect(buildWatchTaskInstance.project).to.equal(options.project, 'has correct project instance'); }); }); - it('BuildWatch task is provided with a watcher option', function() { - return command.validateAndRun(['--watch', '--watcher poller']).then(function() { + it('BuildWatch task is provided with a watcher option', function () { + return command.validateAndRun(['--watch', '--watcher poller']).then(function () { let buildWatchRun = tasks.BuildWatch.prototype.run; let captor = td.matchers.captor(); @@ -73,24 +73,24 @@ describe('build command', function() { }); }); - it('Asset Size Printer task is not run after Build task in non-production environment', function() { - return new BuildCommand(options).validateAndRun([]).then(function() { + it('Asset Size Printer task is not run after Build task in non-production environment', function () { + return new BuildCommand(options).validateAndRun([]).then(function () { let showSizesRun = tasks.ShowAssetSizes.prototype.run; td.verify(showSizesRun(), { ignoreExtraArgs: true, times: 0 }); }); }); - it('Asset Size Printer task is run after Build task in production environment', function() { - return new BuildCommand(options).validateAndRun(['--environment=production']).then(function() { + it('Asset Size Printer task is run after Build task in production environment', function () { + return new BuildCommand(options).validateAndRun(['--environment=production']).then(function () { let showSizesRun = tasks.ShowAssetSizes.prototype.run; td.verify(showSizesRun(), { ignoreExtraArgs: true, times: 1 }); }); }); - it('Asset Size Printer task is not run if suppress sizes option is provided', function() { - return new BuildCommand(options).validateAndRun(['--suppress-sizes']).then(function() { + it('Asset Size Printer task is not run if suppress sizes option is provided', function () { + return new BuildCommand(options).validateAndRun(['--suppress-sizes']).then(function () { let showSizesRun = tasks.ShowAssetSizes.prototype.run; td.verify(showSizesRun(), { ignoreExtraArgs: true, times: 0 }); diff --git a/tests/unit/commands/destroy-test.js b/tests/unit/commands/destroy-test.js index 5e43956b75..ff2e2f05c7 100644 --- a/tests/unit/commands/destroy-test.js +++ b/tests/unit/commands/destroy-test.js @@ -8,13 +8,13 @@ const commandOptions = require('../../factories/command-options'); const Task = require('../../../lib/models/task'); const DestroyCommand = require('../../../lib/commands/destroy'); -describe('destroy command', function() { +describe('destroy command', function () { let options, command, project; - beforeEach(function() { + beforeEach(function () { project = new MockProject(); - project.isEmberCLIProject = function() { + project.isEmberCLIProject = function () { return true; }; @@ -33,16 +33,16 @@ describe('destroy command', function() { command = new DestroyCommand(options); }); - it('runs DestroyFromBlueprint with expected options', function() { - return command.validateAndRun(['controller', 'foo']).then(function(options) { + it('runs DestroyFromBlueprint with expected options', function () { + return command.validateAndRun(['controller', 'foo']).then(function (options) { expect(options.dryRun).to.be.false; expect(options.verbose).to.be.false; expect(options.args).to.deep.equal(['controller', 'foo']); }); }); - it('complains if no entity name is given', function() { - return expect(command.validateAndRun(['controller'])).to.be.rejected.then(error => { + it('complains if no entity name is given', function () { + return expect(command.validateAndRun(['controller'])).to.be.rejected.then((error) => { expect(error.message).to.equal( 'The `ember destroy` command requires an ' + 'entity name to be specified. ' + @@ -51,8 +51,8 @@ describe('destroy command', function() { }); }); - it('complains if no blueprint name is given', function() { - return expect(command.validateAndRun([])).to.be.rejected.then(error => { + it('complains if no blueprint name is given', function () { + return expect(command.validateAndRun([])).to.be.rejected.then((error) => { expect(error.message).to.equal( 'The `ember destroy` command requires a ' + 'blueprint name to be specified. ' + @@ -61,13 +61,13 @@ describe('destroy command', function() { }); }); - it('does not throw errors when beforeRun is invoked without the blueprint name', function() { + it('does not throw errors when beforeRun is invoked without the blueprint name', function () { expect(() => { command.beforeRun([]); }).to.not.throw(); }); - it('rethrows errors from beforeRun', function() { + it('rethrows errors from beforeRun', function () { project.blueprintLookupPaths = undefined; expect(() => { @@ -75,8 +75,8 @@ describe('destroy command', function() { }).to.throw(/(is not a function)|(has no method)/); }); - describe('help', function() { - it('prints extra info', function() { + describe('help', function () { + it('prints extra info', function () { command.printDetailedHelp(); let output = options.ui.output; diff --git a/tests/unit/commands/generate-test.js b/tests/unit/commands/generate-test.js index 1f9f072968..6a978151c8 100644 --- a/tests/unit/commands/generate-test.js +++ b/tests/unit/commands/generate-test.js @@ -12,20 +12,20 @@ const td = require('testdouble'); const ROOT = process.cwd(); const { createTempDir } = require('broccoli-test-helper'); -describe('generate command', function() { +describe('generate command', function () { let input, options, command; - beforeEach(async function() { + beforeEach(async function () { input = await createTempDir(); process.chdir(input.path()); let project = new MockProject({ root: input.path() }); - project.isEmberCLIProject = function() { + project.isEmberCLIProject = function () { return true; }; - project.blueprintLookupPaths = function() { + project.blueprintLookupPaths = function () { return []; }; @@ -45,44 +45,44 @@ describe('generate command', function() { command = new GenerateCommand(options); }); - afterEach(async function() { + afterEach(async function () { td.reset(); process.chdir(ROOT); await input.dispose(); }); - it('runs GenerateFromBlueprint but with null nodeModulesPath with npm', function() { - command.project.hasDependencies = function() { + it('runs GenerateFromBlueprint but with null nodeModulesPath with npm', function () { + command.project.hasDependencies = function () { return false; }; - return expect(command.validateAndRun(['controller', 'foo'])).to.be.rejected.then(reason => { + return expect(command.validateAndRun(['controller', 'foo'])).to.be.rejected.then((reason) => { expect(reason.message).to.eql( 'Required packages are missing, run `npm install` from this directory to install them.' ); }); }); - it('runs GenerateFromBlueprint but with null nodeModulesPath with yarn', function() { + it('runs GenerateFromBlueprint but with null nodeModulesPath with yarn', function () { // force usage of `yarn` by adding yarn.lock file input.write({ 'yarn.lock': '', }); - command.project.hasDependencies = function() { + command.project.hasDependencies = function () { return false; }; - return expect(command.validateAndRun(['controller', 'foo'])).to.be.rejected.then(reason => { + return expect(command.validateAndRun(['controller', 'foo'])).to.be.rejected.then((reason) => { expect(reason.message).to.eql( 'Required packages are missing, run `yarn install` from this directory to install them.' ); }); }); - it('runs GenerateFromBlueprint with expected options', function() { - return command.validateAndRun(['controller', 'foo']).then(function(options) { + it('runs GenerateFromBlueprint with expected options', function () { + return command.validateAndRun(['controller', 'foo']).then(function (options) { expect(options.pod).to.be.false; expect(options.dryRun).to.be.false; expect(options.verbose).to.be.false; @@ -90,14 +90,14 @@ describe('generate command', function() { }); }); - it('does not throw errors when beforeRun is invoked without the blueprint name', function() { + it('does not throw errors when beforeRun is invoked without the blueprint name', function () { expect(() => { command.beforeRun([]); }).to.not.throw(); }); - it('complains if no blueprint name is given', function() { - return expect(command.validateAndRun([])).to.be.rejected.then(error => { + it('complains if no blueprint name is given', function () { + return expect(command.validateAndRun([])).to.be.rejected.then((error) => { expect(error.message).to.equal( 'The `ember generate` command requires a ' + 'blueprint name to be specified. ' + @@ -106,12 +106,12 @@ describe('generate command', function() { }); }); - describe('help', function() { - beforeEach(function() { + describe('help', function () { + beforeEach(function () { td.replace(Blueprint, 'list', td.function()); }); - it('lists available blueprints', function() { + it('lists available blueprints', function () { td.when(Blueprint.list(), { ignoreExtraArgs: true }).thenReturn([ { source: 'my-app', @@ -148,7 +148,7 @@ ${EOL}`); expect(output).to.equal(testString); }); - it('lists available blueprints json', function() { + it('lists available blueprints json', function () { td.when(Blueprint.list(), { ignoreExtraArgs: true }).thenReturn([ { source: 'my-app', @@ -195,7 +195,7 @@ ${EOL}`); ]); }); - it('works with single blueprint', function() { + it('works with single blueprint', function () { td.when(Blueprint.list(), { ignoreExtraArgs: true }).thenReturn([ { source: 'my-app', @@ -227,7 +227,7 @@ ${EOL}`); expect(output).to.equal(testString); }); - it('works with single blueprint json', function() { + it('works with single blueprint json', function () { td.when(Blueprint.list(), { ignoreExtraArgs: true }).thenReturn([ { source: 'my-app', @@ -266,7 +266,7 @@ ${EOL}`); ]); }); - it('handles missing blueprint', function() { + it('handles missing blueprint', function () { td.when(Blueprint.list(), { ignoreExtraArgs: true }).thenReturn([ { source: 'my-app', @@ -291,7 +291,7 @@ ${EOL}`); expect(output).to.equal(testString); }); - it('handles missing blueprint json', function() { + it('handles missing blueprint json', function () { td.when(Blueprint.list(), { ignoreExtraArgs: true }).thenReturn([ { source: 'my-app', @@ -317,7 +317,7 @@ ${EOL}`); ]); }); - it('ignores overridden blueprints when verbose false', function() { + it('ignores overridden blueprints when verbose false', function () { td.when(Blueprint.list(), { ignoreExtraArgs: true }).thenReturn([ { source: 'my-app', @@ -345,7 +345,7 @@ ${EOL}`); expect(output).to.equal(testString); }); - it('shows overridden blueprints when verbose true', function() { + it('shows overridden blueprints when verbose true', function () { td.when(Blueprint.list(), { ignoreExtraArgs: true }).thenReturn([ { source: 'my-app', diff --git a/tests/unit/commands/help-test.js b/tests/unit/commands/help-test.js index c315e0459d..b271495d99 100644 --- a/tests/unit/commands/help-test.js +++ b/tests/unit/commands/help-test.js @@ -9,16 +9,16 @@ const td = require('testdouble'); let HelpCommand = require('../../../lib/commands/help'); -describe('help command', function() { +describe('help command', function () { let options; - beforeEach(function() { + beforeEach(function () { options = commandOptions(); }); - describe('common to both', function() { - it('finds command on disk', function() { - let Command1 = function() {}; + describe('common to both', function () { + it('finds command on disk', function () { + let Command1 = function () {}; Command1.prototype.printBasicHelp = td.function(); Command1.prototype.printDetailedHelp = td.function(); @@ -29,7 +29,7 @@ describe('help command', function() { let command = new HelpCommand(options); let wasCalled; - command._lookupCommand = function() { + command._lookupCommand = function () { expect(arguments[0]).to.equal(options.commands); expect(arguments[1]).to.equal('command-2'); wasCalled = true; @@ -42,10 +42,10 @@ describe('help command', function() { expect(wasCalled).to.be.true; }); - it('looks up multiple commands', function() { - let Command1 = function() {}; - let Command2 = function() {}; - let Command3 = function() {}; + it('looks up multiple commands', function () { + let Command1 = function () {}; + let Command2 = function () {}; + let Command3 = function () {}; Command1.prototype.printBasicHelp = td.function(); Command2.prototype.printBasicHelp = td.function(); Command3.prototype.printBasicHelp = td.function(); @@ -72,10 +72,10 @@ describe('help command', function() { }); }); - describe('unique to text printing', function() { - it('lists commands', function() { - let Command1 = function() {}; - let Command2 = function() {}; + describe('unique to text printing', function () { + it('lists commands', function () { + let Command1 = function () {}; + let Command2 = function () {}; Command1.prototype.printBasicHelp = td.function(); Command2.prototype.printBasicHelp = td.function(); Command1.prototype.printDetailedHelp = td.function(); @@ -96,9 +96,9 @@ describe('help command', function() { td.verify(Command2.prototype.printDetailedHelp(), { ignoreExtraArgs: true, times: 0 }); }); - it('works with single command', function() { - let Command1 = function() {}; - let Command2 = function() {}; + it('works with single command', function () { + let Command1 = function () {}; + let Command2 = function () {}; Command1.prototype.printBasicHelp = td.function(); Command2.prototype.printBasicHelp = td.function(); Command1.prototype.printDetailedHelp = td.function(); @@ -119,8 +119,8 @@ describe('help command', function() { td.verify(Command2.prototype.printDetailedHelp(), { ignoreExtraArgs: true, times: 0 }); }); - it('works with single command alias', function() { - let Command1 = function() {}; + it('works with single command alias', function () { + let Command1 = function () {}; Command1.prototype.aliases = ['my-alias']; Command1.prototype.printBasicHelp = td.function(); Command1.prototype.printDetailedHelp = td.function(); @@ -136,8 +136,8 @@ describe('help command', function() { td.verify(Command1.prototype.printBasicHelp(), { ignoreExtraArgs: true, times: 1 }); }); - it('passes extra commands to `generate`', function() { - let Generate = function() {}; + it('passes extra commands to `generate`', function () { + let Generate = function () {}; Generate.prototype.printBasicHelp = td.function(); Generate.prototype.printDetailedHelp = td.function(); @@ -158,8 +158,8 @@ describe('help command', function() { expect(captor.value.rawArgs).to.deep.equal(['something', 'else']); }); - it('handles no extra commands to `generate`', function() { - let Generate = function() {}; + it('handles no extra commands to `generate`', function () { + let Generate = function () {}; Generate.prototype.printBasicHelp = td.function(); Generate.prototype.printDetailedHelp = td.function(); @@ -180,8 +180,8 @@ describe('help command', function() { expect(captor.value.rawArgs).to.be.undefined; }); - it('passes extra commands to `generate` alias', function() { - let Generate = function() {}; + it('passes extra commands to `generate` alias', function () { + let Generate = function () {}; Generate.prototype.aliases = ['g']; Generate.prototype.printBasicHelp = td.function(); Generate.prototype.printDetailedHelp = td.function(); @@ -203,8 +203,8 @@ describe('help command', function() { expect(captor.value.rawArgs).to.deep.equal(['something', 'else']); }); - it('handles missing command', function() { - let Command1 = function() {}; + it('handles missing command', function () { + let Command1 = function () {}; options.commands = { Command1, @@ -224,11 +224,11 @@ ${EOL}\ expect(output).to.include(testString); }); - it('respects skipHelp when listing', function() { - let Command1 = function() { + it('respects skipHelp when listing', function () { + let Command1 = function () { this.skipHelp = true; }; - let Command2 = function() {}; + let Command2 = function () {}; Command1.prototype.printBasicHelp = td.function(); Command2.prototype.printBasicHelp = td.function(); @@ -245,8 +245,8 @@ ${EOL}\ td.verify(Command2.prototype.printBasicHelp(), { ignoreExtraArgs: true, times: 1 }); }); - it('ignores skipHelp when single', function() { - let Command1 = function() { + it('ignores skipHelp when single', function () { + let Command1 = function () { this.skipHelp = true; }; Command1.prototype.printBasicHelp = td.function(); @@ -263,13 +263,13 @@ ${EOL}\ td.verify(Command1.prototype.printBasicHelp(), { ignoreExtraArgs: true, times: 1 }); }); - it('lists addons', function() { - let Command1 = function() {}; - let Command2 = function() {}; + it('lists addons', function () { + let Command1 = function () {}; + let Command2 = function () {}; Command1.prototype.printBasicHelp = td.function(); Command2.prototype.printBasicHelp = td.function(); - options.project.eachAddonCommand = function(callback) { + options.project.eachAddonCommand = function (callback) { callback('my-addon', { Command1, Command2, @@ -291,13 +291,13 @@ Available commands from my-addon:${EOL}`); td.verify(Command2.prototype.printBasicHelp(), { ignoreExtraArgs: true, times: 1 }); }); - it('finds single addon command', function() { - let Command1 = function() {}; - let Command2 = function() {}; + it('finds single addon command', function () { + let Command1 = function () {}; + let Command2 = function () {}; Command1.prototype.printBasicHelp = td.function(); Command1.prototype.printDetailedHelp = td.function(); - options.project.eachAddonCommand = function(callback) { + options.project.eachAddonCommand = function (callback) { callback('my-addon', { Command1, Command2, @@ -312,13 +312,13 @@ Available commands from my-addon:${EOL}`); }); }); - describe('unique to json printing', function() { - beforeEach(function() { + describe('unique to json printing', function () { + beforeEach(function () { options.json = true; }); - it('lists commands', function() { - let Command1 = function() { + it('lists commands', function () { + let Command1 = function () { return { getJson() { return { @@ -328,7 +328,7 @@ Available commands from my-addon:${EOL}`); }; }; - let Command2 = function() { + let Command2 = function () { return { getJson() { return { @@ -356,8 +356,8 @@ Available commands from my-addon:${EOL}`); ]); }); - it('handles special option `Path`', function() { - let Command1 = function() { + it('handles special option `Path`', function () { + let Command1 = function () { return { getJson() { return { @@ -382,14 +382,14 @@ Available commands from my-addon:${EOL}`); ]); }); - it('respects skipHelp when listing', function() { - let Command1 = function() { + it('respects skipHelp when listing', function () { + let Command1 = function () { return { skipHelp: true, }; }; - let Command2 = function() { + let Command2 = function () { return { getJson() { return { @@ -414,8 +414,8 @@ Available commands from my-addon:${EOL}`); ]); }); - it('lists addons', function() { - let Command1 = function() { + it('lists addons', function () { + let Command1 = function () { return { getJson() { return { @@ -425,7 +425,7 @@ Available commands from my-addon:${EOL}`); }; }; - let Command2 = function() { + let Command2 = function () { return { getJson() { return { @@ -435,7 +435,7 @@ Available commands from my-addon:${EOL}`); }; }; - options.project.eachAddonCommand = function(callback) { + options.project.eachAddonCommand = function (callback) { callback('my-addon', { Command1, Command2 }); }; diff --git a/tests/unit/commands/init-test.js b/tests/unit/commands/init-test.js index 6e9ec2a290..7b5cfeac01 100644 --- a/tests/unit/commands/init-test.js +++ b/tests/unit/commands/init-test.js @@ -14,10 +14,10 @@ const InitCommand = require('../../../lib/commands/init'); const MockCLI = require('../../helpers/mock-cli'); const td = require('testdouble'); -describe('init command', function() { +describe('init command', function () { let ui, analytics, tasks, command, workingDir; - beforeEach(function() { + beforeEach(function () { ui = new MockUI(); analytics = new MockAnalytics(); tasks = { @@ -32,7 +32,7 @@ describe('init command', function() { fs.mkdirSync(workingDir); }); - afterEach(function() { + afterEach(function () { fs.removeSync(workingDir); td.reset(); }); @@ -50,25 +50,25 @@ describe('init command', function() { command = new InitCommand(options); } - it("doesn't allow to create an application named `test`", function() { + it("doesn't allow to create an application named `test`", function () { buildCommand({ name: 'test' }); - return expect(command.validateAndRun([])).to.be.rejected.then(error => { + return expect(command.validateAndRun([])).to.be.rejected.then((error) => { expect(error.message).to.equal('We currently do not support a name of `test`.'); }); }); - it("doesn't allow to create an application without project name", function() { + it("doesn't allow to create an application without project name", function () { buildCommand({ name: undefined }); - return expect(command.validateAndRun([])).to.be.rejected.then(error => { + return expect(command.validateAndRun([])).to.be.rejected.then((error) => { expect(error.message).to.equal( 'The `ember init` command requires a package.json in current folder with name attribute or a specified name via arguments. For more details, use `ember help`.' ); }); }); - it('Uses the name of the closest project to when calling installBlueprint', function() { + it('Uses the name of the closest project to when calling installBlueprint', function () { tasks.InstallBlueprint = Task.extend({ run(blueprintOpts) { expect(blueprintOpts.rawName).to.equal('some-random-name'); @@ -78,12 +78,12 @@ describe('init command', function() { buildCommand(); - return command.validateAndRun([]).catch(function(reason) { + return command.validateAndRun([]).catch(function (reason) { expect(reason).to.equal('Called run'); }); }); - it('Uses the provided app name over the closest found project', function() { + it('Uses the provided app name over the closest found project', function () { tasks.InstallBlueprint = Task.extend({ run(blueprintOpts) { expect(blueprintOpts.rawName).to.equal('provided-name'); @@ -93,12 +93,12 @@ describe('init command', function() { buildCommand(); - return command.validateAndRun(['--name=provided-name']).catch(function(reason) { + return command.validateAndRun(['--name=provided-name']).catch(function (reason) { expect(reason).to.equal('Called run'); }); }); - it('Uses process.cwd if no package is found when calling installBlueprint', function() { + it('Uses process.cwd if no package is found when calling installBlueprint', function () { // change the working dir so `process.cwd` can't be an invalid path for base directories // named `ember-cli`. @@ -117,15 +117,15 @@ describe('init command', function() { return command .validateAndRun([]) - .catch(function(reason) { + .catch(function (reason) { expect(reason).to.equal('Called run'); }) - .then(function() { + .then(function () { process.chdir(currentWorkingDir); }); }); - it("doesn't use --dry-run or any other command option as the name", function() { + it("doesn't use --dry-run or any other command option as the name", function () { tasks.InstallBlueprint = Task.extend({ run(blueprintOpts) { expect(blueprintOpts.rawName).to.equal('some-random-name'); @@ -135,12 +135,12 @@ describe('init command', function() { buildCommand(); - return command.validateAndRun(['--dry-run']).catch(function(reason) { + return command.validateAndRun(['--dry-run']).catch(function (reason) { expect(reason).to.equal('Called run'); }); }); - it("doesn't use . as the name", function() { + it("doesn't use . as the name", function () { tasks.InstallBlueprint = Task.extend({ run(blueprintOpts) { expect(blueprintOpts.rawName).to.equal('some-random-name'); @@ -150,12 +150,12 @@ describe('init command', function() { buildCommand(); - return command.validateAndRun(['.']).catch(function(reason) { + return command.validateAndRun(['.']).catch(function (reason) { expect(reason).to.equal('Called run'); }); }); - it('Uses the "app" blueprint by default', function() { + it('Uses the "app" blueprint by default', function () { tasks.InstallBlueprint = Task.extend({ run(blueprintOpts) { expect(blueprintOpts.blueprint).to.equal('app'); @@ -165,12 +165,12 @@ describe('init command', function() { buildCommand(); - return command.validateAndRun(['--name=provided-name']).catch(function(reason) { + return command.validateAndRun(['--name=provided-name']).catch(function (reason) { expect(reason).to.equal('Called run'); }); }); - it('Uses arguments to select files to init', function() { + it('Uses arguments to select files to init', function () { tasks.InstallBlueprint = Task.extend({ run(blueprintOpts) { expect(blueprintOpts.blueprint).to.equal('app'); @@ -180,12 +180,12 @@ describe('init command', function() { buildCommand(); - return command.validateAndRun(['package.json', '--name=provided-name']).catch(function(reason) { + return command.validateAndRun(['package.json', '--name=provided-name']).catch(function (reason) { expect(reason).to.equal('Called run'); }); }); - it('Uses the "addon" blueprint for addons', function() { + it('Uses the "addon" blueprint for addons', function () { tasks.InstallBlueprint = Task.extend({ run(blueprintOpts) { expect(blueprintOpts.blueprint).to.equal('addon'); @@ -195,12 +195,12 @@ describe('init command', function() { buildCommand({ keywords: ['ember-addon'], name: 'some-random-name' }); - return command.validateAndRun(['--name=provided-name']).catch(function(reason) { + return command.validateAndRun(['--name=provided-name']).catch(function (reason) { expect(reason).to.equal('Called run'); }); }); - it('Registers blueprint options in beforeRun', function() { + it('Registers blueprint options in beforeRun', function () { td.replace(Blueprint, 'lookup', td.function()); td.when(Blueprint.lookup('app'), { ignoreExtraArgs: true }).thenReturn({ availableOptions: [{ name: 'custom-blueprint-option', type: String }], @@ -212,7 +212,7 @@ describe('init command', function() { expect(map(command.availableOptions, 'name')).to.contain('custom-blueprint-option'); }); - it('Passes command options through to the install blueprint task', function() { + it('Passes command options through to the install blueprint task', function () { tasks.InstallBlueprint = Task.extend({ run(blueprintOpts) { expect(blueprintOpts).to.contain.keys('customOption'); @@ -223,7 +223,7 @@ describe('init command', function() { buildCommand(); - return expect(command.validateAndRun(['--custom-option=customValue'])).to.be.rejected.then(reason => { + return expect(command.validateAndRun(['--custom-option=customValue'])).to.be.rejected.then((reason) => { expect(reason).to.equal('Called run'); }); }); diff --git a/tests/unit/commands/install-test.js b/tests/unit/commands/install-test.js index f1a8645610..9f606575c4 100644 --- a/tests/unit/commands/install-test.js +++ b/tests/unit/commands/install-test.js @@ -8,19 +8,19 @@ const AddonInstall = require('../../../lib/tasks/addon-install'); const InstallCommand = require('../../../lib/commands/install'); const td = require('testdouble'); -describe('install command', function() { +describe('install command', function () { let generateBlueprintInstance, npmInstance; let command, tasks; - beforeEach(function() { + beforeEach(function () { let project = new MockProject(); - project.isEmberCLIProject = function() { + project.isEmberCLIProject = function () { return true; }; - project.initializeAddons = function() {}; - project.reloadAddons = function() { + project.initializeAddons = function () {}; + project.reloadAddons = function () { this.addons = [ { pkg: { @@ -79,12 +79,12 @@ describe('install command', function() { command = new InstallCommand(options); }); - afterEach(function() { + afterEach(function () { td.reset(); }); - it('initializes npm install and generate blueprint task with ui, project and analytics', function() { - return command.validateAndRun(['ember-data']).then(function() { + it('initializes npm install and generate blueprint task with ui, project and analytics', function () { + return command.validateAndRun(['ember-data']).then(function () { expect(npmInstance.ui, 'ui was set').to.be.ok; expect(npmInstance.project, 'project was set').to.be.ok; expect(npmInstance.analytics, 'analytics was set').to.be.ok; @@ -95,9 +95,9 @@ describe('install command', function() { }); }); - describe('with args', function() { - it('runs the npm install task with given name and save-dev true', function() { - return command.validateAndRun(['ember-data']).then(function() { + describe('with args', function () { + it('runs the npm install task with given name and save-dev true', function () { + return command.validateAndRun(['ember-data']).then(function () { let npmRun = tasks.NpmInstall.prototype.run; td.verify( @@ -113,14 +113,14 @@ describe('install command', function() { }); }); - it('runs the npm install task with given name and save-dev true in an addon', function() { - command.project.isEmberCLIProject = function() { + it('runs the npm install task with given name and save-dev true in an addon', function () { + command.project.isEmberCLIProject = function () { return false; }; - command.project.isEmberCLIAddon = function() { + command.project.isEmberCLIAddon = function () { return true; }; - return command.validateAndRun(['ember-data']).then(function() { + return command.validateAndRun(['ember-data']).then(function () { let npmRun = tasks.NpmInstall.prototype.run; td.verify( @@ -136,8 +136,8 @@ describe('install command', function() { }); }); - it('runs the npm install task with given name and save true with the --save option', function() { - return command.validateAndRun(['ember-data', '--save']).then(function() { + it('runs the npm install task with given name and save true with the --save option', function () { + return command.validateAndRun(['ember-data', '--save']).then(function () { let npmRun = tasks.NpmInstall.prototype.run; td.verify( @@ -153,14 +153,14 @@ describe('install command', function() { }); }); - it('runs the npm install task with given name and save true in an addon with the --save option', function() { - command.project.isEmberCLIProject = function() { + it('runs the npm install task with given name and save true in an addon with the --save option', function () { + command.project.isEmberCLIProject = function () { return false; }; - command.project.isEmberCLIAddon = function() { + command.project.isEmberCLIAddon = function () { return true; }; - return command.validateAndRun(['ember-data', '--save']).then(function() { + return command.validateAndRun(['ember-data', '--save']).then(function () { let npmRun = tasks.NpmInstall.prototype.run; td.verify( @@ -176,8 +176,8 @@ describe('install command', function() { }); }); - it('runs the package name blueprint task with given name and args', function() { - return command.validateAndRun(['ember-data']).then(function() { + it('runs the package name blueprint task with given name and args', function () { + return command.validateAndRun(['ember-data']).then(function () { let generateRun = tasks.GenerateFromBlueprint.prototype.run; let captor = td.matchers.captor(); td.verify(generateRun(captor.capture())); @@ -186,8 +186,8 @@ describe('install command', function() { }); }); - it('fails to install second argument for unknown addon', function() { - return expect(command.validateAndRun(['ember-cli-cordova', 'com.ember.test'])).to.be.rejected.then(error => { + it('fails to install second argument for unknown addon', function () { + return expect(command.validateAndRun(['ember-cli-cordova', 'com.ember.test'])).to.be.rejected.then((error) => { let generateRun = tasks.GenerateFromBlueprint.prototype.run; let captor = td.matchers.captor(); td.verify(generateRun(captor.capture())); @@ -203,8 +203,8 @@ describe('install command', function() { }); }); - it('runs npmInstall once and installs three addons', function() { - return command.validateAndRun(['ember-data', 'ember-cli-cordova', 'ember-cli-qunit']).then(function() { + it('runs npmInstall once and installs three addons', function () { + return command.validateAndRun(['ember-data', 'ember-cli-cordova', 'ember-cli-qunit']).then(function () { let npmRun = tasks.NpmInstall.prototype.run; td.verify( @@ -219,15 +219,15 @@ describe('install command', function() { ); let generateRun = tasks.GenerateFromBlueprint.prototype.run; - let generateRunArgs = td.explain(generateRun).calls.map(function(call) { + let generateRunArgs = td.explain(generateRun).calls.map(function (call) { return call.args[0].args[0]; }); expect(generateRunArgs).to.deep.equal(['ember-data', 'cordova-starter-kit', 'ember-cli-qunit']); }); }); - it('ember-cli/ember-cli-qunit: runs npmInstall but does not install the addon blueprint', function() { - return command.validateAndRun(['ember-cli/ember-cli-qunit']).then(function() { + it('ember-cli/ember-cli-qunit: runs npmInstall but does not install the addon blueprint', function () { + return command.validateAndRun(['ember-cli/ember-cli-qunit']).then(function () { let npmRun = tasks.NpmInstall.prototype.run; td.verify( @@ -246,8 +246,8 @@ describe('install command', function() { }); }); - it('ember-cli-qunit@1.2.0: runs npmInstall and installs the addon blueprint', function() { - return command.validateAndRun(['ember-cli-qunit@1.2.0']).then(function() { + it('ember-cli-qunit@1.2.0: runs npmInstall and installs the addon blueprint', function () { + return command.validateAndRun(['ember-cli-qunit@1.2.0']).then(function () { let npmRun = tasks.NpmInstall.prototype.run; td.verify( @@ -262,15 +262,15 @@ describe('install command', function() { ); let generateRun = tasks.GenerateFromBlueprint.prototype.run; - let generateRunArgs = td.explain(generateRun).calls.map(function(call) { + let generateRunArgs = td.explain(generateRun).calls.map(function (call) { return call.args[0].args[0]; }); expect(generateRunArgs).to.deep.equal(['ember-cli-qunit']); }); }); - it('@ember-cli/ember-cli-qunit: runs npmInstall and installs the addon blueprint', function() { - return command.validateAndRun(['@ember-cli/ember-cli-qunit']).then(function() { + it('@ember-cli/ember-cli-qunit: runs npmInstall and installs the addon blueprint', function () { + return command.validateAndRun(['@ember-cli/ember-cli-qunit']).then(function () { let npmRun = tasks.NpmInstall.prototype.run; td.verify( @@ -285,15 +285,15 @@ describe('install command', function() { ); let generateRun = tasks.GenerateFromBlueprint.prototype.run; - let generateRunArgs = td.explain(generateRun).calls.map(function(call) { + let generateRunArgs = td.explain(generateRun).calls.map(function (call) { return call.args[0].args[0]; }); expect(generateRunArgs).to.deep.equal(['@ember-cli/ember-cli-qunit']); }); }); - it("gives helpful message if it can't find the addon", function() { - return expect(command.validateAndRun(['unknown-addon'])).to.be.rejected.then(error => { + it("gives helpful message if it can't find the addon", function () { + return expect(command.validateAndRun(['unknown-addon'])).to.be.rejected.then((error) => { expect(error.message).to.equal( 'Install failed. Could not find addon with name: unknown-addon', 'expected error to have helpful message' @@ -302,9 +302,9 @@ describe('install command', function() { }); }); - describe('without args', function() { - it('gives a helpful message if no arguments are passed', function() { - return expect(command.validateAndRun([])).to.be.rejected.then(error => { + describe('without args', function () { + it('gives a helpful message if no arguments are passed', function () { + return expect(command.validateAndRun([])).to.be.rejected.then((error) => { expect(error.message).to.equal( 'The `install` command must take an argument with the name ' + 'of an ember-cli addon. For installing all npm and bower ' + diff --git a/tests/unit/commands/new-test.js b/tests/unit/commands/new-test.js index 38bf268055..39c43123a2 100644 --- a/tests/unit/commands/new-test.js +++ b/tests/unit/commands/new-test.js @@ -9,10 +9,10 @@ const Command = require('../../../lib/models/command'); const Task = require('../../../lib/models/task'); const td = require('testdouble'); -describe('new command', function() { +describe('new command', function () { let command; - beforeEach(function() { + beforeEach(function () { let options = commandOptions({ project: { isEmberCLIProject() { @@ -29,61 +29,61 @@ describe('new command', function() { td.replace(Blueprint, 'lookup', td.function()); }); - afterEach(function() { + afterEach(function () { td.reset(); }); - it("doesn't allow to create an application named `test`", function() { - return expect(command.validateAndRun(['test'])).to.be.rejected.then(error => { + it("doesn't allow to create an application named `test`", function () { + return expect(command.validateAndRun(['test'])).to.be.rejected.then((error) => { expect(error.message).to.equal('We currently do not support a name of `test`.'); }); }); - it("doesn't allow to create an application named `ember`", function() { - return expect(command.validateAndRun(['ember'])).to.be.rejected.then(error => { + it("doesn't allow to create an application named `ember`", function () { + return expect(command.validateAndRun(['ember'])).to.be.rejected.then((error) => { expect(error.message).to.equal('We currently do not support a name of `ember`.'); }); }); - it("doesn't allow to create an application named `Ember`", function() { - return expect(command.validateAndRun(['Ember'])).to.be.rejected.then(error => { + it("doesn't allow to create an application named `Ember`", function () { + return expect(command.validateAndRun(['Ember'])).to.be.rejected.then((error) => { expect(error.message).to.equal('We currently do not support a name of `Ember`.'); }); }); - it("doesn't allow to create an application named `ember-cli`", function() { - return expect(command.validateAndRun(['ember-cli'])).to.be.rejected.then(error => { + it("doesn't allow to create an application named `ember-cli`", function () { + return expect(command.validateAndRun(['ember-cli'])).to.be.rejected.then((error) => { expect(error.message).to.equal('We currently do not support a name of `ember-cli`.'); }); }); - it("doesn't allow to create an application named `vendor`", function() { - return expect(command.validateAndRun(['vendor'])).to.be.rejected.then(error => { + it("doesn't allow to create an application named `vendor`", function () { + return expect(command.validateAndRun(['vendor'])).to.be.rejected.then((error) => { expect(error.message).to.equal('We currently do not support a name of `vendor`.'); }); }); - it("doesn't allow to create an application with a period in the name", function() { - return expect(command.validateAndRun(['zomg.awesome'])).to.be.rejected.then(error => { + it("doesn't allow to create an application with a period in the name", function () { + return expect(command.validateAndRun(['zomg.awesome'])).to.be.rejected.then((error) => { expect(error.message).to.equal('We currently do not support a name of `zomg.awesome`.'); }); }); - it("doesn't allow to create an application with a name beginning with a number", function() { - return expect(command.validateAndRun(['123-my-bagel'])).to.be.rejected.then(error => { + it("doesn't allow to create an application with a name beginning with a number", function () { + return expect(command.validateAndRun(['123-my-bagel'])).to.be.rejected.then((error) => { expect(error.message).to.equal('We currently do not support a name of `123-my-bagel`.'); }); }); - it('shows a suggestion messages when the application name is a period', function() { - return expect(command.validateAndRun(['.'])).to.be.rejected.then(error => { + it('shows a suggestion messages when the application name is a period', function () { + return expect(command.validateAndRun(['.'])).to.be.rejected.then((error) => { expect(error.message).to.equal( `Trying to generate an application structure in this directory? Use \`ember init\` instead.` ); }); }); - it('registers blueprint options in beforeRun', function() { + it('registers blueprint options in beforeRun', function () { td.when(Blueprint.lookup('app'), { ignoreExtraArgs: true }).thenReturn({ availableOptions: [{ name: 'custom-blueprint-option', type: String }], }); @@ -92,7 +92,7 @@ describe('new command', function() { expect(map(command.availableOptions, 'name')).to.contain('custom-blueprint-option'); }); - it('passes command options through to init command', function() { + it('passes command options through to init command', function () { command.tasks.CreateAndStepIntoDirectory = Task.extend({ run() { return Promise.resolve(); @@ -111,7 +111,7 @@ describe('new command', function() { availableOptions: [{ name: 'custom-blueprint-option', type: String }], }); - return command.validateAndRun(['foo', '--custom-option=customValue']).then(function(reason) { + return command.validateAndRun(['foo', '--custom-option=customValue']).then(function (reason) { expect(reason).to.equal('Called run'); }); }); diff --git a/tests/unit/commands/serve-test.js b/tests/unit/commands/serve-test.js index 6248deb7e4..a292aab7a8 100644 --- a/tests/unit/commands/serve-test.js +++ b/tests/unit/commands/serve-test.js @@ -12,10 +12,10 @@ const getPort = util.promisify(PortFinder.getPort); const ServeCommand = require('../../../lib/commands/serve'); -describe('serve command', function() { +describe('serve command', function () { let tasks, options, command; - beforeEach(function() { + beforeEach(function () { tasks = { Serve: Task.extend(), }; @@ -29,12 +29,12 @@ describe('serve command', function() { command = new ServeCommand(options); }); - afterEach(function() { + afterEach(function () { td.reset(); }); - it('has correct default options', function() { - return command.validateAndRun(['--port', '0']).then(function() { + it('has correct default options', function () { + return command.validateAndRun(['--port', '0']).then(function () { let captor = td.matchers.captor(); td.verify(tasks.Serve.prototype.run(captor.capture()), { times: 1 }); expect(captor.value.port).to.be.gte(4200, 'has correct port'); @@ -42,9 +42,9 @@ describe('serve command', function() { }); }); - it('setting --port without --live-reload-port', function() { - return getPort().then(function(port) { - return command.validateAndRun(['--port', `${port}`]).then(function() { + it('setting --port without --live-reload-port', function () { + return getPort().then(function (port) { + return command.validateAndRun(['--port', `${port}`]).then(function () { let captor = td.matchers.captor(); td.verify(tasks.Serve.prototype.run(captor.capture()), { times: 1 }); expect(captor.value.port).to.equal(port, 'has correct port'); @@ -53,9 +53,9 @@ describe('serve command', function() { }); }); - it('setting both --port and --live-reload-port', function() { - return getPort().then(function(port) { - return command.validateAndRun(['--port', `${port}`, '--live-reload-port', '8005']).then(function() { + it('setting both --port and --live-reload-port', function () { + return getPort().then(function (port) { + return command.validateAndRun(['--port', `${port}`, '--live-reload-port', '8005']).then(function () { let captor = td.matchers.captor(); td.verify(tasks.Serve.prototype.run(captor.capture()), { times: 1 }); expect(captor.value.port).to.equal(port, 'has correct port'); @@ -71,24 +71,24 @@ describe('serve command', function() { // Works correctly on Travis and has been left for context as it does test // a valid code path. - let testServer = function(opts, test) { - let server = require('http').createServer(function() {}); - return new Promise(function(resolve) { - server.listen(opts.port, opts.host, function() { + let testServer = function (opts, test) { + let server = require('http').createServer(function () {}); + return new Promise(function (resolve) { + server.listen(opts.port, opts.host, function () { resolve(test(opts, server)); }); - }).finally(function() { - return new Promise(function(resolve) { - server.close(function() { + }).finally(function () { + return new Promise(function (resolve) { + server.close(function () { resolve(); }); }); }); }; - it('should throw error when -p PORT is taken', function() { - return testServer({ port: '32773' }, function() { - return expect(command.validateAndRun(['--port', '32773'])).to.be.rejected.then(err => { + it('should throw error when -p PORT is taken', function () { + return testServer({ port: '32773' }, function () { + return expect(command.validateAndRun(['--port', '32773'])).to.be.rejected.then((err) => { td.verify(tasks.Serve.prototype.run(), { ignoreExtraArgs: true, times: 0 }); expect(err.message).to.contain('is already in use.'); }); @@ -96,8 +96,8 @@ describe('serve command', function() { }); } - it('allows OS to choose port', function() { - return command.validateAndRun(['--port', '0']).then(function() { + it('allows OS to choose port', function () { + return command.validateAndRun(['--port', '0']).then(function () { let captor = td.matchers.captor(); td.verify(tasks.Serve.prototype.run(captor.capture()), { times: 1 }); expect(captor.value.port).to.be.within(7020, 65535, 'has correct port'); @@ -105,122 +105,124 @@ describe('serve command', function() { }); }); - it('has correct liveLoadPort', function() { - return command.validateAndRun(['--port', '0', '--live-reload-port', '4001']).then(function() { + it('has correct liveLoadPort', function () { + return command.validateAndRun(['--port', '0', '--live-reload-port', '4001']).then(function () { let captor = td.matchers.captor(); td.verify(tasks.Serve.prototype.run(captor.capture()), { times: 1 }); expect(captor.value.liveReloadPort).to.be.gte(4001, 'has correct liveReload port'); }); }); - it('has correct liveReloadLoadHost', function() { - return command.validateAndRun(['--port', '0', '--live-reload-host', '127.0.0.1']).then(function() { + it('has correct liveReloadLoadHost', function () { + return command.validateAndRun(['--port', '0', '--live-reload-host', '127.0.0.1']).then(function () { let captor = td.matchers.captor(); td.verify(tasks.Serve.prototype.run(captor.capture()), { times: 1 }); expect(captor.value.liveReloadHost).to.equal('127.0.0.1', 'has correct liveReload host'); }); }); - it('has correct liveLoadBaseUrl', function() { - return command.validateAndRun(['--port', '0', '--live-reload-base-url', 'http://127.0.0.1:4200/']).then(function() { - let captor = td.matchers.captor(); - td.verify(tasks.Serve.prototype.run(captor.capture()), { times: 1 }); - expect(captor.value.liveReloadBaseUrl).to.equal('http://127.0.0.1:4200/', 'has correct liveReload baseUrl'); - }); + it('has correct liveLoadBaseUrl', function () { + return command + .validateAndRun(['--port', '0', '--live-reload-base-url', 'http://127.0.0.1:4200/']) + .then(function () { + let captor = td.matchers.captor(); + td.verify(tasks.Serve.prototype.run(captor.capture()), { times: 1 }); + expect(captor.value.liveReloadBaseUrl).to.equal('http://127.0.0.1:4200/', 'has correct liveReload baseUrl'); + }); }); - it('has correct proxy', function() { - return command.validateAndRun(['--port', '0', '--proxy', 'http://localhost:3000/']).then(function() { + it('has correct proxy', function () { + return command.validateAndRun(['--port', '0', '--proxy', 'http://localhost:3000/']).then(function () { let captor = td.matchers.captor(); td.verify(tasks.Serve.prototype.run(captor.capture()), { times: 1 }); expect(captor.value.proxy).to.equal('http://localhost:3000/', 'has correct port'); }); }); - it('has correct secure proxy option', function() { - return command.validateAndRun(['--port', '0', '--secure-proxy', 'false']).then(function() { + it('has correct secure proxy option', function () { + return command.validateAndRun(['--port', '0', '--secure-proxy', 'false']).then(function () { let captor = td.matchers.captor(); td.verify(tasks.Serve.prototype.run(captor.capture()), { times: 1 }); expect(captor.value.secureProxy).to.equal(false, 'has correct insecure proxy option'); }); }); - it('has correct default value for secure proxy', function() { - return command.validateAndRun(['--port', '0']).then(function() { + it('has correct default value for secure proxy', function () { + return command.validateAndRun(['--port', '0']).then(function () { let captor = td.matchers.captor(); td.verify(tasks.Serve.prototype.run(captor.capture()), { times: 1 }); expect(captor.value.secureProxy).to.equal(true, 'has correct secure proxy option when not set'); }); }); - it('requires proxy URL to include protocol', function() { - return expect(command.validateAndRun(['--port', '0', '--proxy', 'localhost:3000'])).to.be.rejected.then(error => { + it('requires proxy URL to include protocol', function () { + return expect(command.validateAndRun(['--port', '0', '--proxy', 'localhost:3000'])).to.be.rejected.then((error) => { expect(error.message).to.equal( `You need to include a protocol with the proxy URL.${EOL}Try --proxy http://localhost:3000` ); }); }); - it('has correct default value for transparent proxy', function() { - return command.validateAndRun(['--port', '0']).then(function() { + it('has correct default value for transparent proxy', function () { + return command.validateAndRun(['--port', '0']).then(function () { let captor = td.matchers.captor(); td.verify(tasks.Serve.prototype.run(captor.capture()), { times: 1 }); expect(captor.value.transparentProxy).to.equal(true, 'has correct transparent proxy option when not set'); }); }); - it('host alias does not conflict with help alias', function() { - return command.validateAndRun(['--port', '0', '-H', 'localhost']).then(function() { + it('host alias does not conflict with help alias', function () { + return command.validateAndRun(['--port', '0', '-H', 'localhost']).then(function () { let captor = td.matchers.captor(); td.verify(tasks.Serve.prototype.run(captor.capture()), { times: 1 }); expect(captor.value.host).to.equal('localhost', 'has correct hostname'); }); }); - it('has correct value for proxy-in-timeout', function() { - return command.validateAndRun(['--port', '0', '--proxy-in-timeout', '300000']).then(function() { + it('has correct value for proxy-in-timeout', function () { + return command.validateAndRun(['--port', '0', '--proxy-in-timeout', '300000']).then(function () { let captor = td.matchers.captor(); td.verify(tasks.Serve.prototype.run(captor.capture()), { times: 1 }); expect(captor.value.proxyInTimeout).to.equal(300000, 'has correct incoming proxy timeout option'); }); }); - it('has correct default value for proxy-in-timeout', function() { - return command.validateAndRun(['--port', '0']).then(function() { + it('has correct default value for proxy-in-timeout', function () { + return command.validateAndRun(['--port', '0']).then(function () { let captor = td.matchers.captor(); td.verify(tasks.Serve.prototype.run(captor.capture()), { times: 1 }); expect(captor.value.proxyInTimeout).to.equal(120000, 'has correct incoming proxy timeout option when not set'); }); }); - it('has correct value for proxy-out-timeout', function() { - return command.validateAndRun(['--port', '0', '--proxy-out-timeout', '30000']).then(function() { + it('has correct value for proxy-out-timeout', function () { + return command.validateAndRun(['--port', '0', '--proxy-out-timeout', '30000']).then(function () { let captor = td.matchers.captor(); td.verify(tasks.Serve.prototype.run(captor.capture()), { times: 1 }); expect(captor.value.proxyOutTimeout).to.equal(30000, 'has correct outgoing proxy timeout option'); }); }); - it('has correct default value for proxy-out-timeout', function() { - return command.validateAndRun(['--port', '0']).then(function() { + it('has correct default value for proxy-out-timeout', function () { + return command.validateAndRun(['--port', '0']).then(function () { let captor = td.matchers.captor(); td.verify(tasks.Serve.prototype.run(captor.capture()), { times: 1 }); expect(captor.value.proxyOutTimeout).to.equal(0, 'has correct outgoing proxy timeout option when not set'); }); }); - it('throws a meaningful error when run outside the project', function() { - command.project.hasDependencies = function() { + it('throws a meaningful error when run outside the project', function () { + command.project.hasDependencies = function () { return false; }; - command.project.isEmberCLIProject = function() { + command.project.isEmberCLIProject = function () { return false; }; command.isWithinProject = false; - return expect(command.validateAndRun(['--port', '0'])).to.be.rejected.then(error => { + return expect(command.validateAndRun(['--port', '0'])).to.be.rejected.then((error) => { expect(error.message).to.match(/You have to be inside an ember-cli project/); }); }); diff --git a/tests/unit/commands/show-asset-sizes-test.js b/tests/unit/commands/show-asset-sizes-test.js index 47751e63cc..31c32b518d 100644 --- a/tests/unit/commands/show-asset-sizes-test.js +++ b/tests/unit/commands/show-asset-sizes-test.js @@ -6,16 +6,16 @@ const Task = require('../../../lib/models/task'); const path = require('path'); const td = require('testdouble'); -describe('asset-sizes command', function() { +describe('asset-sizes command', function () { let ShowCommand; let tasks; let options; - before(function() { + before(function () { ShowCommand = require('../../../lib/commands/asset-sizes'); }); - beforeEach(function() { + beforeEach(function () { tasks = { ShowAssetSizes: Task.extend({}), }; @@ -28,24 +28,24 @@ describe('asset-sizes command', function() { td.replace(tasks.ShowAssetSizes.prototype, 'run', td.function()); }); - after(function() { + after(function () { ShowCommand = null; }); - afterEach(function() { + afterEach(function () { td.reset(); }); - it('has correct default value for output path', function() { - return new ShowCommand(options).validateAndRun().then(function() { + it('has correct default value for output path', function () { + return new ShowCommand(options).validateAndRun().then(function () { let captor = td.matchers.captor(); td.verify(tasks.ShowAssetSizes.prototype.run(captor.capture()), { times: 1 }); expect(captor.value.outputPath).to.equal('dist/', 'has correct output path option when not set'); }); }); - it('has correct options', function() { - return new ShowCommand(options).validateAndRun(['--output-path', path.join('some', 'path')]).then(function() { + it('has correct options', function () { + return new ShowCommand(options).validateAndRun(['--output-path', path.join('some', 'path')]).then(function () { let captor = td.matchers.captor(); td.verify(tasks.ShowAssetSizes.prototype.run(captor.capture()), { times: 1 }); expect(captor.value.outputPath).to.equal(path.join(process.cwd(), 'some', 'path'), 'has correct asset path'); @@ -53,6 +53,6 @@ describe('asset-sizes command', function() { }); }); -describe.skip('default options config file', function() { - it('reads default options from .ember-cli file', function() {}); +describe.skip('default options config file', function () { + it('reads default options from .ember-cli file', function () {}); }); diff --git a/tests/unit/commands/test-test.js b/tests/unit/commands/test-test.js index 25c38b20f3..ebf2ff9f63 100644 --- a/tests/unit/commands/test-test.js +++ b/tests/unit/commands/test-test.js @@ -9,12 +9,12 @@ const Task = require('../../../lib/models/task'); const TestCommand = require('../../../lib/commands/test'); const td = require('testdouble'); -describe('test command', function() { +describe('test command', function () { this.timeout(30000); let tasks, options, command; - beforeEach(function() { + beforeEach(function () { tasks = { Build: Task.extend(), Test: Task.extend(), @@ -23,7 +23,7 @@ describe('test command', function() { let project = new MockProject(); - project.isEmberCLIProject = function() { + project.isEmberCLIProject = function () { return true; }; @@ -41,7 +41,7 @@ describe('test command', function() { td.when(tasks.TestServer.prototype.run(), { ignoreExtraArgs: true }).thenReturn(Promise.resolve()); }); - afterEach(function() { + afterEach(function () { td.reset(); }); @@ -49,17 +49,17 @@ describe('test command', function() { command = new TestCommand(options); } - describe('default', function() { - beforeEach(function() { + describe('default', function () { + beforeEach(function () { buildCommand(); }); - it('builds and runs test', function() { + it('builds and runs test', function () { return command.validateAndRun([]); }); - it('has the correct options', function() { - return command.validateAndRun([]).then(function() { + it('has the correct options', function () { + return command.validateAndRun([]).then(function () { let captor = td.matchers.captor(); td.verify(tasks.Build.prototype.run(captor.capture())); @@ -72,8 +72,8 @@ describe('test command', function() { }); }); - it('passes through custom configFile option', function() { - return command.validateAndRun(['--config-file=some-random/path.json']).then(function() { + it('passes through custom configFile option', function () { + return command.validateAndRun(['--config-file=some-random/path.json']).then(function () { let captor = td.matchers.captor(); td.verify(tasks.Test.prototype.run(captor.capture())); @@ -81,8 +81,8 @@ describe('test command', function() { }); }); - it('does not pass any port options', function() { - return command.validateAndRun([]).then(function() { + it('does not pass any port options', function () { + return command.validateAndRun([]).then(function () { let captor = td.matchers.captor(); td.verify(tasks.Test.prototype.run(captor.capture())); @@ -90,8 +90,8 @@ describe('test command', function() { }); }); - it('passes through a custom test port option', function() { - return command.validateAndRun(['--test-port=5679']).then(function() { + it('passes through a custom test port option', function () { + return command.validateAndRun(['--test-port=5679']).then(function () { let captor = td.matchers.captor(); td.verify(tasks.Test.prototype.run(captor.capture())); @@ -99,8 +99,8 @@ describe('test command', function() { }); }); - it('passes through a custom test port option of 0 to allow OS to choose open system port', function() { - return command.validateAndRun(['--test-port=0']).then(function() { + it('passes through a custom test port option of 0 to allow OS to choose open system port', function () { + return command.validateAndRun(['--test-port=0']).then(function () { let captor = td.matchers.captor(); td.verify(tasks.Test.prototype.run(captor.capture())); @@ -108,8 +108,8 @@ describe('test command', function() { }); }); - it('only passes through the port option', function() { - return command.validateAndRun(['--port=5678']).then(function() { + it('only passes through the port option', function () { + return command.validateAndRun(['--port=5678']).then(function () { let captor = td.matchers.captor(); td.verify(tasks.Test.prototype.run(captor.capture())); @@ -117,8 +117,8 @@ describe('test command', function() { }); }); - it('passes both the port and the test port options', function() { - return command.validateAndRun(['--port=5678', '--test-port=5900']).then(function() { + it('passes both the port and the test port options', function () { + return command.validateAndRun(['--port=5678', '--test-port=5900']).then(function () { let captor = td.matchers.captor(); td.verify(tasks.Test.prototype.run(captor.capture())); @@ -126,8 +126,8 @@ describe('test command', function() { }); }); - it('passes through custom host option', function() { - return command.validateAndRun(['--host=greatwebsite.com']).then(function() { + it('passes through custom host option', function () { + return command.validateAndRun(['--host=greatwebsite.com']).then(function () { let captor = td.matchers.captor(); td.verify(tasks.Test.prototype.run(captor.capture())); @@ -135,8 +135,8 @@ describe('test command', function() { }); }); - it('passes through output path option', function() { - return command.validateAndRun(['--output-path=some/path']).then(function() { + it('passes through output path option', function () { + return command.validateAndRun(['--output-path=some/path']).then(function () { let captor = td.matchers.captor(); td.verify(tasks.Test.prototype.run(captor.capture())); @@ -144,8 +144,8 @@ describe('test command', function() { }); }); - it('passes through custom reporter option', function() { - return command.validateAndRun(['--reporter=xunit']).then(function() { + it('passes through custom reporter option', function () { + return command.validateAndRun(['--reporter=xunit']).then(function () { let captor = td.matchers.captor(); td.verify(tasks.Test.prototype.run(captor.capture())); @@ -153,8 +153,8 @@ describe('test command', function() { }); }); - it('has the correct options when called with a build path and does not run a build task', function() { - return command.validateAndRun(['--path=tests']).then(function() { + it('has the correct options when called with a build path and does not run a build task', function () { + return command.validateAndRun(['--path=tests']).then(function () { let captor = td.matchers.captor(); td.verify(tasks.Build.prototype.run(td.matchers.anything()), { times: 0 }); @@ -169,8 +169,8 @@ describe('test command', function() { }); }); - it('throws an error if the build path does not exist', function() { - return expect(command.validateAndRun(['--path=bad/path/to/build'])).to.be.rejected.then(error => { + it('throws an error if the build path does not exist', function () { + return expect(command.validateAndRun(['--path=bad/path/to/build'])).to.be.rejected.then((error) => { let expectedPath = path.resolve('bad/path/to/build'); expect(error.message).to.equal( `The path ${expectedPath} does not exist. Please specify a valid build directory to test.` @@ -179,9 +179,9 @@ describe('test command', function() { }); }); - describe('--server option', function() { + describe('--server option', function () { let buildCleanupWasCalled; - beforeEach(function() { + beforeEach(function () { buildCleanupWasCalled = false; options.Builder = CoreObject.extend({ cleanup() { @@ -193,74 +193,74 @@ describe('test command', function() { buildCommand(); }); - it('builds a watcher with verbose set to false', function() { + it('builds a watcher with verbose set to false', function () { return command .validateAndRun(['--server']) - .then(function() { + .then(function () { let captor = td.matchers.captor(); td.verify(tasks.TestServer.prototype.run(captor.capture())); expect(captor.value.watcher.verbose).to.be.false; }) - .finally(function() { + .finally(function () { expect(buildCleanupWasCalled).to.be.true; }); }); - it('builds a watcher with options.watcher set to value provided', function() { + it('builds a watcher with options.watcher set to value provided', function () { return command .validateAndRun(['--server', '--watcher=polling']) - .then(function() { + .then(function () { let captor = td.matchers.captor(); td.verify(tasks.TestServer.prototype.run(captor.capture())); expect(captor.value.watcher.options.watcher).to.equal('polling'); }) - .finally(function() { + .finally(function () { expect(buildCleanupWasCalled).to.be.true; }); }); - it('DOES NOT throw an error if using a build path', function() { + it('DOES NOT throw an error if using a build path', function () { expect(command.validateAndRun(['--server', '--path=tests'])).to.be.ok; }); }); - describe('_generateCustomConfigs', function() { + describe('_generateCustomConfigs', function () { let runOptions; - beforeEach(function() { + beforeEach(function () { buildCommand(); runOptions = {}; }); - it('should return an object even if passed param is empty object', function() { + it('should return an object even if passed param is empty object', function () { let result = command._generateCustomConfigs(runOptions); expect(result).to.be.an('object'); }); - it('when launch option is present, should be reflected in returned config', function() { + it('when launch option is present, should be reflected in returned config', function () { runOptions.launch = 'fooLauncher'; let result = command._generateCustomConfigs(runOptions); expect(result.launch).to.equal('fooLauncher'); }); - it('when query option is present, should be reflected in returned config', function() { + it('when query option is present, should be reflected in returned config', function () { runOptions.query = 'someQuery=test'; let result = command._generateCustomConfigs(runOptions); expect(result.queryString).to.equal(runOptions.query); }); - it('when provided test-page the new file returned contains the value in test_page', function() { + it('when provided test-page the new file returned contains the value in test_page', function () { runOptions['test-page'] = 'foo/test.html?foo'; let result = command._generateCustomConfigs(runOptions); expect(result.testPage).to.be.equal('foo/test.html?foo&'); }); - it('when provided test-page with filter, module, and query the new file returned contains those values in test_page', function() { + it('when provided test-page with filter, module, and query the new file returned contains those values in test_page', function () { runOptions.module = 'fooModule'; runOptions.filter = 'bar'; runOptions.query = 'someQuery=test'; @@ -270,7 +270,7 @@ describe('test command', function() { expect(contents.testPage).to.be.equal('foo/test.html?foo&module=fooModule&filter=bar&someQuery=test'); }); - it('when provided test-page with filter and module the new file returned contains both option values in test_page', function() { + it('when provided test-page with filter and module the new file returned contains both option values in test_page', function () { runOptions.module = 'fooModule'; runOptions.filter = 'bar'; runOptions['test-page'] = 'foo/test.html?foo'; @@ -279,7 +279,7 @@ describe('test command', function() { expect(contents.testPage).to.be.equal('foo/test.html?foo&module=fooModule&filter=bar'); }); - it('when provided test-page with filter and query the new file returned contains both option values in test_page', function() { + it('when provided test-page with filter and query the new file returned contains both option values in test_page', function () { runOptions.query = 'someQuery=test'; runOptions.filter = 'bar'; runOptions['test-page'] = 'foo/test.html?foo'; @@ -288,7 +288,7 @@ describe('test command', function() { expect(contents.testPage).to.be.equal('foo/test.html?foo&filter=bar&someQuery=test'); }); - it('when provided test-page with module and query the new file returned contains both option values in test_page', function() { + it('when provided test-page with module and query the new file returned contains both option values in test_page', function () { runOptions.module = 'fooModule'; runOptions.query = 'someQuery=test'; runOptions['test-page'] = 'foo/test.html?foo'; @@ -297,14 +297,14 @@ describe('test command', function() { expect(contents.testPage).to.be.equal('foo/test.html?foo&module=fooModule&someQuery=test'); }); - it('when provided launch the new file returned contains the value in launch', function() { + it('when provided launch the new file returned contains the value in launch', function () { runOptions.launch = 'fooLauncher'; let contents = command._generateCustomConfigs(runOptions); expect(contents['launch']).to.be.equal('fooLauncher'); }); - it('when provided filter is all lowercase to match the test name', function() { + it('when provided filter is all lowercase to match the test name', function () { runOptions['test-page'] = 'tests/index.html'; runOptions.filter = 'BAR'; let contents = command._generateCustomConfigs(runOptions); @@ -312,10 +312,10 @@ describe('test command', function() { expect(contents.testPage).to.be.equal('tests/index.html?filter=bar'); }); - it('when module and filter option is present uses buildTestPageQueryString for test_page queryString', function() { + it('when module and filter option is present uses buildTestPageQueryString for test_page queryString', function () { runOptions.filter = 'bar'; runOptions['test-page'] = 'tests/index.html'; - command.buildTestPageQueryString = function(options) { + command.buildTestPageQueryString = function (options) { expect(options).to.deep.equal(runOptions); return 'blah=zorz'; @@ -326,7 +326,7 @@ describe('test command', function() { expect(contents.testPage).to.be.equal('tests/index.html?blah=zorz'); }); - it('new file returned contains the filter option value in test_page', function() { + it('new file returned contains the filter option value in test_page', function () { runOptions.filter = 'foo'; runOptions['test-page'] = 'tests/index.html'; let contents = command._generateCustomConfigs(runOptions); @@ -334,7 +334,7 @@ describe('test command', function() { expect(contents.testPage).to.be.equal('tests/index.html?filter=foo'); }); - it('adds with a `&` if query string contains `?` already', function() { + it('adds with a `&` if query string contains `?` already', function () { runOptions.filter = 'foo'; runOptions['test-page'] = 'tests/index.html?hidepassed'; let contents = command._generateCustomConfigs(runOptions); @@ -342,7 +342,7 @@ describe('test command', function() { expect(contents.testPage).to.be.equal('tests/index.html?hidepassed&filter=foo'); }); - it('new file returned contains the module option value in test_page', function() { + it('new file returned contains the module option value in test_page', function () { runOptions.module = 'fooModule'; runOptions['test-page'] = 'tests/index.html'; let contents = command._generateCustomConfigs(runOptions); @@ -350,7 +350,7 @@ describe('test command', function() { expect(contents.testPage).to.be.equal('tests/index.html?module=fooModule'); }); - it('new file returned contains the query option value in test_page', function() { + it('new file returned contains the query option value in test_page', function () { runOptions.query = 'someQuery=test'; runOptions['test-page'] = 'tests/index.html'; let contents = command._generateCustomConfigs(runOptions); @@ -358,7 +358,7 @@ describe('test command', function() { expect(contents.testPage).to.be.equal('tests/index.html?someQuery=test'); }); - it('new file returned contains the query option value with multiple queries in test_page', function() { + it('new file returned contains the query option value with multiple queries in test_page', function () { runOptions.query = 'someQuery=test&something&else=false'; runOptions['test-page'] = 'tests/index.html'; let contents = command._generateCustomConfigs(runOptions); diff --git a/tests/unit/commands/uninstall-npm-test.js b/tests/unit/commands/uninstall-npm-test.js index 0b295f933c..31333c3411 100644 --- a/tests/unit/commands/uninstall-npm-test.js +++ b/tests/unit/commands/uninstall-npm-test.js @@ -5,15 +5,15 @@ const MockProject = require('../../helpers/mock-project'); const commandOptions = require('../../factories/command-options'); const UninstallNpmCommand = require('../../../lib/commands/uninstall-npm'); -describe('uninstall:npm command', function() { +describe('uninstall:npm command', function () { let command; let msg = 'This command has been removed. Please use `npm uninstall ' + ' --save-dev` instead.'; - beforeEach(function() { + beforeEach(function () { let project = new MockProject(); - project.isEmberCLIProject = function() { + project.isEmberCLIProject = function () { return true; }; @@ -24,14 +24,14 @@ describe('uninstall:npm command', function() { command = new UninstallNpmCommand(options); }); - it('throws a friendly silent error with no args', function() { - return expect(command.validateAndRun([])).to.be.rejected.then(error => { + it('throws a friendly silent error with no args', function () { + return expect(command.validateAndRun([])).to.be.rejected.then((error) => { expect(error.message).to.equal(msg, 'expect error to have a helpful message'); }); }); - it('throws a friendly silent error with args', function() { - return expect(command.validateAndRun(['moment', 'lodash'])).to.be.rejected.then(error => { + it('throws a friendly silent error with args', function () { + return expect(command.validateAndRun(['moment', 'lodash'])).to.be.rejected.then((error) => { expect(error.message).to.equal(msg, 'expect error to have a helpful message'); }); }); diff --git a/tests/unit/commands/version-test.js b/tests/unit/commands/version-test.js index 8cccdbd58e..7e768ca20a 100644 --- a/tests/unit/commands/version-test.js +++ b/tests/unit/commands/version-test.js @@ -5,10 +5,10 @@ const EOL = require('os').EOL; const commandOptions = require('../../factories/command-options'); const VersionCommand = require('../../../lib/commands/version'); -describe('version command', function() { +describe('version command', function () { let options, command; - beforeEach(function() { + beforeEach(function () { options = commandOptions({ project: { isEmberCLIProject() { @@ -20,8 +20,8 @@ describe('version command', function() { command = new VersionCommand(options); }); - it('reports node, npm, and os versions', function() { - return command.validateAndRun().then(function() { + it('reports node, npm, and os versions', function () { + return command.validateAndRun().then(function () { let lines = options.ui.output.split(EOL); expect(someLineStartsWith(lines, 'ember-cli:'), 'contains the version of ember-cli').to.be.ok; expect(someLineStartsWith(lines, 'node:'), 'contains the version of node').to.be.ok; @@ -29,8 +29,8 @@ describe('version command', function() { }); }); - it('supports a --verbose flag', function() { - return command.validateAndRun(['--verbose']).then(function() { + it('supports a --verbose flag', function () { + return command.validateAndRun(['--verbose']).then(function () { let lines = options.ui.output.split(EOL); expect(someLineStartsWith(lines, 'node:'), 'contains the version of node').to.be.ok; expect(someLineStartsWith(lines, 'os:'), 'contains the version of os').to.be.ok; @@ -40,7 +40,7 @@ describe('version command', function() { }); function someLineStartsWith(lines, search) { - return lines.some(function(line) { + return lines.some(function (line) { return line.indexOf(search) === 0; }); } diff --git a/tests/unit/docs-lint-test.js b/tests/unit/docs-lint-test.js index a25ead32ab..e35c48ee83 100644 --- a/tests/unit/docs-lint-test.js +++ b/tests/unit/docs-lint-test.js @@ -11,8 +11,8 @@ if (!process.env['IS_CHILD']) { const execa = require('execa'); - describe('YUIDoc', function() { - it('parses without warnings', async function() { + describe('YUIDoc', function () { + it('parses without warnings', async function () { await execa('node', [`--unhandled-rejections=strict`, __filename], { env: { IS_CHILD: true, @@ -34,7 +34,7 @@ let yuiDoc = new Y.YUIDoc(options); let json = yuiDoc.run(); let warnings = {}; -json.warnings.forEach(function(warning) { +json.warnings.forEach(function (warning) { let tmp = warning.line.split(':'); let file = tmp[0].trim(); let line = tmp[1]; @@ -50,9 +50,9 @@ json.warnings.forEach(function(warning) { }); let message = ''; -Object.keys(warnings).forEach(function(file) { +Object.keys(warnings).forEach(function (file) { message += `\t${file} – YUIDoc issues found:${EOL}${EOL}`; - warnings[file].forEach(function(warning) { + warnings[file].forEach(function (warning) { message += `\t\tline ${warning.line}: ${warning.message}${EOL}`; }); }); diff --git a/tests/unit/errors/silent-test.js b/tests/unit/errors/silent-test.js index e87e6b5eec..7b83d7e946 100644 --- a/tests/unit/errors/silent-test.js +++ b/tests/unit/errors/silent-test.js @@ -3,8 +3,8 @@ const SilentError = require('silent-error'); const expect = require('chai').expect; -describe('SilentError', function() { - it('return silent-error and print a deprecation', function() { +describe('SilentError', function () { + it('return silent-error and print a deprecation', function () { const SilentErrorLib = require('../../../lib/errors/silent'); expect(SilentErrorLib, 'returns silent-error').to.equal(SilentError); }); diff --git a/tests/unit/experiments-test.js b/tests/unit/experiments-test.js index 1f087937e4..9128547de4 100644 --- a/tests/unit/experiments-test.js +++ b/tests/unit/experiments-test.js @@ -21,11 +21,11 @@ function resetProcessEnv(originalProcessEnv) { const ORIGINAL_CONSOLE = Object.assign({}, console); -describe('experiments', function() { - describe('isExperimentEnabled', function() { +describe('experiments', function () { + describe('isExperimentEnabled', function () { let originalProcessEnv, warnings; - beforeEach(function() { + beforeEach(function () { originalProcessEnv = Object.assign({}, process.env); // reset all experiment flags for these tests, they will be restored in @@ -34,16 +34,16 @@ describe('experiments', function() { delete process.env.EMBER_CLI_PACKAGER; warnings = []; - console.warn = warning => warnings.push(warning); + console.warn = (warning) => warnings.push(warning); }); - afterEach(function() { + afterEach(function () { resetProcessEnv(originalProcessEnv); Object.assign(console, ORIGINAL_CONSOLE); _deprecatedExperimentsDeprecationsIssued.length = 0; }); - it('should return true for all experiments when `EMBER_CLI_ENABLE_ALL_EXPERIMENTS` is set', function() { + it('should return true for all experiments when `EMBER_CLI_ENABLE_ALL_EXPERIMENTS` is set', function () { process.env.EMBER_CLI_ENABLE_ALL_EXPERIMENTS = true; expect(isExperimentEnabled('PACKAGER')).to.be.true; @@ -51,7 +51,7 @@ describe('experiments', function() { expect(warnings).to.deep.equal([]); }); - it('setting an already disabled feature to false does not enable it', function() { + it('setting an already disabled feature to false does not enable it', function () { process.env.EMBER_CLI_PACKAGER = 'false'; expect(isExperimentEnabled('PACKAGER')).to.be.false; diff --git a/tests/unit/models/addon-test.js b/tests/unit/models/addon-test.js index 5b39b6dfa1..4098150535 100644 --- a/tests/unit/models/addon-test.js +++ b/tests/unit/models/addon-test.js @@ -19,11 +19,11 @@ let tmproot = path.join(root, 'tmp'); let fixturePath = path.resolve(__dirname, '../../fixtures/addon'); -describe('models/addon.js', function() { +describe('models/addon.js', function () { let addon, project, projectPath; - describe('root property', function() { - it('is required', function() { + describe('root property', function () { + it('is required', function () { expect(() => { let TheAddon = Addon.extend({ root: undefined }); new TheAddon(); @@ -31,8 +31,8 @@ describe('models/addon.js', function() { }); }); - describe('old core object compat', function() { - it('treeGenerator works without .project', function() { + describe('old core object compat', function () { + it('treeGenerator works without .project', function () { let warning; let TheAddon = Addon.extend({ name: 'such name', @@ -49,10 +49,10 @@ describe('models/addon.js', function() { }); }); - describe('treePaths and treeForMethods', function() { + describe('treePaths and treeForMethods', function () { let FirstAddon, SecondAddon; - beforeEach(function() { + beforeEach(function () { projectPath = path.resolve(fixturePath, 'simple'); const packageContents = require(path.join(projectPath, 'package.json')); let cli = new MockCLI(); @@ -82,10 +82,10 @@ describe('models/addon.js', function() { }); }); - describe('.jshintAddonTree', function() { + describe('.jshintAddonTree', function () { let addon; - beforeEach(function() { + beforeEach(function () { addon = new FirstAddon(project, project); // TODO: fix config story... @@ -96,11 +96,11 @@ describe('models/addon.js', function() { }, }; - addon.jshintTrees = function() {}; + addon.jshintTrees = function () {}; }); - it('lints the files before preprocessing', function() { - addon.preprocessJs = function() { + it('lints the files before preprocessing', function () { + addon.preprocessJs = function () { throw new Error('should not preprocess files'); }; @@ -111,7 +111,7 @@ describe('models/addon.js', function() { }); }); - it('modifying a treePath does not affect other addons', function() { + it('modifying a treePath does not affect other addons', function () { let first = new FirstAddon(project); let second = new SecondAddon(project); @@ -119,7 +119,7 @@ describe('models/addon.js', function() { expect(second.treePaths.vendor).to.equal('blammo'); }); - it('modifying a treeForMethod does not affect other addons', function() { + it('modifying a treeForMethod does not affect other addons', function () { let first = new FirstAddon(project); let second = new SecondAddon(project); @@ -128,9 +128,9 @@ describe('models/addon.js', function() { }); }); - describe('initialized addon', function() { + describe('initialized addon', function () { this.timeout(40000); - beforeEach(function() { + beforeEach(function () { projectPath = path.resolve(fixturePath, 'simple'); const packageContents = require(path.join(projectPath, 'package.json')); let ui = new MockUI(); @@ -139,57 +139,57 @@ describe('models/addon.js', function() { project.initializeAddons(); }); - describe('generated addon', function() { - beforeEach(function() { + describe('generated addon', function () { + beforeEach(function () { addon = findWhere(project.addons, { name: 'ember-generated-with-export-addon' }); // Clear the caches delete addon._moduleName; }); - it('sets its project', function() { + it('sets its project', function () { expect(addon.project.name).to.equal(project.name); }); - it('sets its parent', function() { + it('sets its parent', function () { expect(addon.parent.name).to.equal(project.name); }); - it('sets the root', function() { + it('sets the root', function () { expect(addon.root).to.not.equal(undefined); }); - it('sets the pkg', function() { + it('sets the pkg', function () { expect(addon.pkg).to.not.equal(undefined); }); - describe('trees for its treePaths', function() { - it('app', function() { + describe('trees for its treePaths', function () { + it('app', function () { let tree = addon.treeFor('app'); expect(typeof (tree.read || tree.rebuild)).to.equal('function'); }); - it('styles', function() { + it('styles', function () { let tree = addon.treeFor('styles'); expect(typeof (tree.read || tree.rebuild)).to.equal('function'); }); - it('templates', function() { + it('templates', function () { let tree = addon.treeFor('templates'); expect(typeof (tree.read || tree.rebuild)).to.equal('function'); }); - it('addon-templates', function() { + it('addon-templates', function () { let tree = addon.treeFor('addon-templates'); expect(typeof (tree.read || tree.rebuild)).to.equal('function'); }); - it('vendor', function() { + it('vendor', function () { let tree = addon.treeFor('vendor'); expect(typeof (tree.read || tree.rebuild)).to.equal('function'); }); - it('addon', function() { + it('addon', function () { let app = { importWhitelist: {}, options: {}, @@ -216,38 +216,38 @@ describe('models/addon.js', function() { }); }); - describe('custom treeFor methods', function() { - it('can define treeForApp', function() { + describe('custom treeFor methods', function () { + it('can define treeForApp', function () { addon.treeForApp = td.function(); addon.treeFor('app'); td.verify(addon.treeForApp(), { ignoreExtraArgs: true }); }); - it('can define treeForStyles', function() { + it('can define treeForStyles', function () { addon.treeForStyles = td.function(); addon.treeFor('styles'); td.verify(addon.treeForStyles(), { ignoreExtraArgs: true }); }); - it('can define treeForVendor', function() { + it('can define treeForVendor', function () { addon.treeForVendor = td.function(); addon.treeFor('vendor'); td.verify(addon.treeForVendor(), { ignoreExtraArgs: true }); }); - it('can define treeForTemplates', function() { + it('can define treeForTemplates', function () { addon.treeForTemplates = td.function(); addon.treeFor('templates'); td.verify(addon.treeForTemplates(), { ignoreExtraArgs: true }); }); - it('can define treeForAddonTemplates', function() { + it('can define treeForAddonTemplates', function () { addon.treeForAddonTemplates = td.function(); addon.treeFor('addon-templates'); td.verify(addon.treeForAddonTemplates(), { ignoreExtraArgs: true }); }); - it('can define treeForPublic', function() { + it('can define treeForPublic', function () { addon.treeForPublic = td.function(); addon.treeFor('public'); td.verify(addon.treeForPublic(), { ignoreExtraArgs: true }); @@ -255,12 +255,12 @@ describe('models/addon.js', function() { }); }); - describe('addon with dependencies', function() { - beforeEach(function() { + describe('addon with dependencies', function () { + beforeEach(function () { addon = findWhere(project.addons, { name: 'ember-addon-with-dependencies' }); }); - it("returns a listing of all dependencies in the addon's package.json", function() { + it("returns a listing of all dependencies in the addon's package.json", function () { let expected = { 'ember-cli': 'latest', 'something-else': 'latest', @@ -270,7 +270,7 @@ describe('models/addon.js', function() { }); }); - it('must define a `name` property', function() { + it('must define a `name` property', function () { let Foo = Addon.extend({ root: 'foo' }); expect(() => { @@ -278,10 +278,10 @@ describe('models/addon.js', function() { }).to.throw(/An addon must define a `name` property./); }); - describe('isDevelopingAddon', function() { + describe('isDevelopingAddon', function () { let originalEnvValue, addon, project; - beforeEach(function() { + beforeEach(function () { let MyAddon = Addon.extend({ name: 'test-project', root: 'foo', @@ -298,7 +298,7 @@ describe('models/addon.js', function() { originalEnvValue = process.env.EMBER_ADDON_ENV; }); - afterEach(function() { + afterEach(function () { if (originalEnvValue === undefined) { delete process.env.EMBER_ADDON_ENV; } else { @@ -308,13 +308,13 @@ describe('models/addon.js', function() { delete process.env.EMBER_CLI_IGNORE_ADDON_NAME_MISMATCH; }); - it('returns true when `EMBER_ADDON_ENV` is set to development', function() { + it('returns true when `EMBER_ADDON_ENV` is set to development', function () { process.env.EMBER_ADDON_ENV = 'development'; expect(addon.isDevelopingAddon(), 'addon is being developed').to.eql(true); }); - it('throws when the addon name is prefixed in package.json and not in index.js', function() { + it('throws when the addon name is prefixed in package.json and not in index.js', function () { process.env.EMBER_ADDON_ENV = 'development'; project.root = 'foo'; project.name = () => '@foo/my-addon'; @@ -322,7 +322,7 @@ describe('models/addon.js', function() { expect(() => addon.isDevelopingAddon()).to.throw(/Your names in package.json and index.js should match*/); }); - it('does not throw for a mismatched addon name when process.env.EMBER_CLI_IGNORE_ADDON_NAME_MISMATCH is set', function() { + it('does not throw for a mismatched addon name when process.env.EMBER_CLI_IGNORE_ADDON_NAME_MISMATCH is set', function () { process.env.EMBER_CLI_IGNORE_ADDON_NAME_MISMATCH = 'true'; process.env.EMBER_ADDON_ENV = 'development'; project.root = 'foo'; @@ -331,7 +331,7 @@ describe('models/addon.js', function() { expect(addon.isDevelopingAddon()).to.eql(true); }); - it('throws an error if addon name is different in package.json and index.js ', function() { + it('throws an error if addon name is different in package.json and index.js ', function () { process.env.EMBER_ADDON_ENV = 'development'; project.root = 'foo'; project.name = () => 'foo-my-addon'; @@ -339,19 +339,19 @@ describe('models/addon.js', function() { expect(() => addon.isDevelopingAddon()).to.throw(/Your names in package.json and index.js should match*/); }); - it('returns false when `EMBER_ADDON_ENV` is not set', function() { + it('returns false when `EMBER_ADDON_ENV` is not set', function () { delete process.env.EMBER_ADDON_ENV; expect(addon.isDevelopingAddon()).to.eql(false); }); - it('returns false when `EMBER_ADDON_ENV` is something other than `development`', function() { + it('returns false when `EMBER_ADDON_ENV` is something other than `development`', function () { process.env.EMBER_ADDON_ENV = 'production'; expect(addon.isDevelopingAddon()).to.equal(false); }); - it('returns false when the addon is not the one being developed', function() { + it('returns false when the addon is not the one being developed', function () { process.env.EMBER_ADDON_ENV = 'development'; addon.name = 'my-addon'; @@ -359,20 +359,20 @@ describe('models/addon.js', function() { }); }); - describe('findOwnAddonByName', function() { + describe('findOwnAddonByName', function () { let ThisAddon = Addon.extend({ root: 'foo', name: 'this-addon', }); - it('it has the given addon', function() { + it('it has the given addon', function () { let addon = new ThisAddon(); let ownAddon = { name: 'my-cool-addon' }; addon.addons = [ownAddon]; expect(addon.findOwnAddonByName('my-cool-addon')).to.eql(ownAddon); }); - it('it does not have the given addon', function() { + it('it does not have the given addon', function () { let addon = new ThisAddon(); let ownAddon = { name: 'my-cool-addon' }; addon.addons = [ownAddon]; @@ -380,7 +380,7 @@ describe('models/addon.js', function() { }); }); - describe('hintingEnabled', function() { + describe('hintingEnabled', function () { /** Tests the various configuration options that affect the hintingEnabled method. @@ -396,7 +396,7 @@ describe('models/addon.js', function() { let originalEnvValue, originalEmberEnvValue, originalTestCommand, addon, project; - beforeEach(function() { + beforeEach(function () { let MyAddon = Addon.extend({ name: 'test-project', root: 'foo', @@ -415,7 +415,7 @@ describe('models/addon.js', function() { originalTestCommand = process.env.EMBER_CLI_TEST_COMMAND; }); - afterEach(function() { + afterEach(function () { addon.app = { options: {}, }; @@ -439,7 +439,7 @@ describe('models/addon.js', function() { } }); - it('returns true when `EMBER_ENV` is not set to production and options.hinting is true', function() { + it('returns true when `EMBER_ENV` is not set to production and options.hinting is true', function () { process.env.EMBER_ENV = 'development'; addon.app = { @@ -449,7 +449,7 @@ describe('models/addon.js', function() { expect(addon.hintingEnabled()).to.be.true; }); - it('returns true when `EMBER_CLI_TEST_COMMAND` is set and options.hinting is true', function() { + it('returns true when `EMBER_CLI_TEST_COMMAND` is set and options.hinting is true', function () { addon.app = { options: { hinting: true }, }; @@ -457,7 +457,7 @@ describe('models/addon.js', function() { expect(addon.hintingEnabled()).to.be.true; }); - it('returns false when `EMBER_ENV` is set to production, `EMBER_CLI_TEST_COMMAND` is unset and options.hinting is true', function() { + it('returns false when `EMBER_ENV` is set to production, `EMBER_CLI_TEST_COMMAND` is unset and options.hinting is true', function () { process.env.EMBER_ENV = 'production'; delete process.env.EMBER_CLI_TEST_COMMAND; @@ -468,7 +468,7 @@ describe('models/addon.js', function() { expect(addon.hintingEnabled()).to.be.false; }); - it('returns false when options.hinting is set to false', function() { + it('returns false when options.hinting is set to false', function () { addon.app = { options: { hinting: false }, }; @@ -476,14 +476,14 @@ describe('models/addon.js', function() { expect(addon.hintingEnabled()).to.be.false; }); - it('returns true when options.hinting is not set', function() { + it('returns true when options.hinting is not set', function () { expect(addon.hintingEnabled()).to.be.ok; }); }); - describe('treeGenerator', function() { - it('watch tree when developing the addon itself', function() { - addon.isDevelopingAddon = function() { + describe('treeGenerator', function () { + it('watch tree when developing the addon itself', function () { + addon.isDevelopingAddon = function () { return true; }; @@ -492,8 +492,8 @@ describe('models/addon.js', function() { expect(tree.__broccoliGetInfo__()).to.have.property('watched', true); }); - it('uses UnwatchedDir when not developing the addon itself', function() { - addon.isDevelopingAddon = function() { + it('uses UnwatchedDir when not developing the addon itself', function () { + addon.isDevelopingAddon = function () { return false; }; @@ -503,25 +503,25 @@ describe('models/addon.js', function() { }); }); - describe('blueprintsPath', function() { + describe('blueprintsPath', function () { let tmpdir; - beforeEach(async function() { + beforeEach(async function () { tmpdir = await mkTmpDirIn(tmproot); addon.root = tmpdir; }); - afterEach(function() { + afterEach(function () { return fs.remove(tmproot); }); - it('returns undefined if the `blueprint` folder does not exist', function() { + it('returns undefined if the `blueprint` folder does not exist', function () { let returnedPath = addon.blueprintsPath(); expect(returnedPath).to.equal(undefined); }); - it('returns blueprint path if the folder exists', function() { + it('returns blueprint path if the folder exists', function () { let blueprintsDir = path.join(tmpdir, 'blueprints'); fs.mkdirSync(blueprintsDir); @@ -531,15 +531,15 @@ describe('models/addon.js', function() { }); }); - describe('config', function() { - it('returns undefined if `config/environment.js` does not exist', function() { + describe('config', function () { + it('returns undefined if `config/environment.js` does not exist', function () { addon.root = path.join(fixturePath, 'no-config'); let result = addon.config(); expect(result).to.equal(undefined); }); - it('returns blueprint path if the folder exists', function() { + it('returns blueprint path if the folder exists', function () { addon.root = path.join(fixturePath, 'with-config'); let appConfig = {}; @@ -550,8 +550,8 @@ describe('models/addon.js', function() { }); }); - describe('compileTemplates', function() { - beforeEach(function() { + describe('compileTemplates', function () { + beforeEach(function () { projectPath = path.resolve(fixturePath, 'simple'); const packageContents = require(path.join(projectPath, 'package.json')); let cli = new MockCLI(); @@ -563,7 +563,7 @@ describe('models/addon.js', function() { addon = findWhere(project.addons, { name: 'ember-generated-with-export-addon' }); }); - it('should not throw an error if addon/templates is present but empty', function() { + it('should not throw an error if addon/templates is present but empty', function () { addon.root = path.join(fixturePath, 'with-empty-addon-templates'); expect(() => { @@ -572,8 +572,8 @@ describe('models/addon.js', function() { }); }); - describe('_fileSystemInfo', function() { - beforeEach(function() { + describe('_fileSystemInfo', function () { + beforeEach(function () { projectPath = path.resolve(fixturePath, 'simple'); const packageContents = require(path.join(projectPath, 'package.json')); let cli = new MockCLI(); @@ -585,9 +585,9 @@ describe('models/addon.js', function() { addon = findWhere(project.addons, { name: 'ember-generated-with-export-addon' }); }); - it('should not call _getAddonTemplatesTreeFiles when default treePath is used', function() { + it('should not call _getAddonTemplatesTreeFiles when default treePath is used', function () { let wasCalled = false; - addon._getAddonTemplatesTreeFiles = function() { + addon._getAddonTemplatesTreeFiles = function () { wasCalled = true; return []; }; @@ -597,10 +597,10 @@ describe('models/addon.js', function() { expect(wasCalled).to.not.be.ok; }); - it("should call _getAddonTemplatesTreeFiles when custom treePaths['addon-templates'] is used", function() { + it("should call _getAddonTemplatesTreeFiles when custom treePaths['addon-templates'] is used", function () { addon.treePaths['addon-templates'] = 'foo'; let wasCalled = false; - addon._getAddonTemplatesTreeFiles = function() { + addon._getAddonTemplatesTreeFiles = function () { wasCalled = true; return []; }; @@ -610,8 +610,8 @@ describe('models/addon.js', function() { expect(wasCalled).to.be.ok; }); - it('hasPodTemplates when pod templates found', function() { - addon._getAddonTreeFiles = function() { + it('hasPodTemplates when pod templates found', function () { + addon._getAddonTreeFiles = function () { return ['foo-bar/', 'foo-bar/component.js', 'foo-bar/template.hbs']; }; @@ -622,8 +622,8 @@ describe('models/addon.js', function() { }); }); - it('does not hasPodTemplates when no pod templates found', function() { - addon._getAddonTreeFiles = function() { + it('does not hasPodTemplates when no pod templates found', function () { + addon._getAddonTreeFiles = function () { return ['templates/', 'templates/components/', 'templates/components/foo-bar.hbs']; }; @@ -634,8 +634,8 @@ describe('models/addon.js', function() { }); }); - it('does not hasPodTemplates when no pod templates found (pod-like structure in `addon/templates/`)', function() { - addon._getAddonTreeFiles = function() { + it('does not hasPodTemplates when no pod templates found (pod-like structure in `addon/templates/`)', function () { + addon._getAddonTreeFiles = function () { return [ 'templates/', // this doesn't need "pod template handling" because @@ -651,8 +651,8 @@ describe('models/addon.js', function() { }); }); - it('does not hasTemplates when no templates found', function() { - addon._getAddonTreeFiles = function() { + it('does not hasTemplates when no templates found', function () { + addon._getAddonTreeFiles = function () { return ['components/', 'components/foo-bar.js', 'templates/', 'templates/components/']; }; @@ -663,8 +663,8 @@ describe('models/addon.js', function() { }); }); - it('does not hasJSFiles when none found', function() { - addon._getAddonTreeFiles = function() { + it('does not hasJSFiles when none found', function () { + addon._getAddonTreeFiles = function () { return ['components/', 'templates/', 'templates/components/', 'styles/foo.css']; }; @@ -676,10 +676,10 @@ describe('models/addon.js', function() { }); }); - describe('packageInfoCache', function() { + describe('packageInfoCache', function () { let packageInfoCache, addon, ui; - beforeEach(function() { + beforeEach(function () { projectPath = path.resolve(fixturePath, 'simple'); const packageContents = require(path.join(projectPath, 'package.json')); @@ -696,15 +696,15 @@ describe('models/addon.js', function() { packageInfoCache = addon.packageInfoCache; }); - it("is provided with the parent's `packageInfoCache` object", function() { + it("is provided with the parent's `packageInfoCache` object", function () { expect(packageInfoCache).to.equal(project.packageInfoCache); }); }); - describe('treeForStyles', function() { + describe('treeForStyles', function () { let builder, addon; - beforeEach(function() { + beforeEach(function () { projectPath = path.resolve(fixturePath, 'with-app-styles'); const packageContents = require(path.join(projectPath, 'package.json')); let cli = new MockCLI(); @@ -719,13 +719,13 @@ describe('models/addon.js', function() { addon = new BaseAddon(project, project); }); - afterEach(function() { + afterEach(function () { if (builder) { return builder.cleanup(); } }); - it('should move files in the root of the addons app/styles tree into the app/styles path', async function() { + it('should move files in the root of the addons app/styles tree into the app/styles path', async function () { builder = new broccoli.Builder(addon.treeFor('styles')); let results = await builder.build(); @@ -737,8 +737,8 @@ describe('models/addon.js', function() { }); }); - describe('._eachProjectAddonInvoke', function() { - beforeEach(function() { + describe('._eachProjectAddonInvoke', function () { + beforeEach(function () { let MyAddon = Addon.extend({ name: 'test-project', root: 'foo', @@ -752,7 +752,7 @@ describe('models/addon.js', function() { addon = new MyAddon(project, project); }); - it('should invoke the method on each of the project addons', function() { + it('should invoke the method on each of the project addons', function () { let counter = 0; project.addons = [ { @@ -771,7 +771,7 @@ describe('models/addon.js', function() { expect(counter).to.eql(2); }); - it('should provide default arguments if none are specified', function() { + it('should provide default arguments if none are specified', function () { let counter = 0; project.addons = [ { @@ -791,7 +791,7 @@ describe('models/addon.js', function() { }); }); - describe('addon tree caching', function() { + describe('addon tree caching', function () { let projectPath = path.resolve(fixturePath, 'simple'); const packageContents = require(path.join(projectPath, 'package.json')); @@ -801,8 +801,8 @@ describe('models/addon.js', function() { return new Addon(project, project); } - describe('cacheKeyForTree', function() { - it('returns null if `treeForApp` methods are implemented for the app tree', function() { + describe('cacheKeyForTree', function () { + it('returns null if `treeForApp` methods are implemented for the app tree', function () { let addon = createAddon( Addon.extend({ name: 'test-project', @@ -814,7 +814,7 @@ describe('models/addon.js', function() { expect(addon.cacheKeyForTree('app')).to.equal(null); }); - it('returns null if `compileAddon` methods are implemented for the addon tree', function() { + it('returns null if `compileAddon` methods are implemented for the addon tree', function () { let addon = createAddon( Addon.extend({ name: 'test-project', @@ -826,7 +826,7 @@ describe('models/addon.js', function() { expect(addon.cacheKeyForTree('addon')).to.equal(null); }); - it('returns null if `treeForMethods` is modified', function() { + it('returns null if `treeForMethods` is modified', function () { let addon = createAddon( Addon.extend({ name: 'test-project', @@ -842,7 +842,7 @@ describe('models/addon.js', function() { expect(addon.cacheKeyForTree('app')).to.equal(null); }); - it('returns stable value for repeated invocations', function() { + it('returns stable value for repeated invocations', function () { let addon = createAddon( Addon.extend({ name: 'test-project', @@ -857,8 +857,8 @@ describe('models/addon.js', function() { }); }); - describe('treeFor caching', function() { - it('defining custom treeForAddon without modifying cacheKeyForTree does not cache', function() { + describe('treeFor caching', function () { + it('defining custom treeForAddon without modifying cacheKeyForTree does not cache', function () { let addon = createAddon( Addon.extend({ name: 'test-project', @@ -875,7 +875,7 @@ describe('models/addon.js', function() { expect(firstTree).not.to.equal(secondTree); }); - it('defining custom cacheKeyForTree allows addon control of cache', function() { + it('defining custom cacheKeyForTree allows addon control of cache', function () { let addonProto = { name: 'test-project', root: path.join(projectPath, 'node_modules', 'ember-generated-with-export-addon'), @@ -883,7 +883,7 @@ describe('models/addon.js', function() { return tree; }, }; - addonProto.cacheKeyForTree = function(type) { + addonProto.cacheKeyForTree = function (type) { return type; }; diff --git a/tests/unit/models/asset-size-printer-test.js b/tests/unit/models/asset-size-printer-test.js index ef97dd3864..f6b5861fe4 100644 --- a/tests/unit/models/asset-size-printer-test.js +++ b/tests/unit/models/asset-size-printer-test.js @@ -14,7 +14,7 @@ const chaiAsPromised = require('chai-as-promised'); chai.use(chaiAsPromised); -describe('models/asset-size-printer', function() { +describe('models/asset-size-printer', function () { let storedTmpDir, assetDir, assetChildDir; function writeFiles() { @@ -36,8 +36,8 @@ describe('models/asset-size-printer', function() { }); } - beforeEach(function() { - return mkTmpDirIn(tmpRoot).then(function(tmpdir) { + beforeEach(function () { + return mkTmpDirIn(tmpRoot).then(function (tmpdir) { storedTmpDir = tmpdir; assetDir = path.join(storedTmpDir, 'assets'); assetChildDir = path.join(assetDir, 'childDir'); @@ -49,17 +49,17 @@ describe('models/asset-size-printer', function() { }); }); - afterEach(function() { + afterEach(function () { return fs.remove(storedTmpDir); }); - it('prints human-readable file sizes (including gzipped sizes) of css and js files in the output path', function() { + it('prints human-readable file sizes (including gzipped sizes) of css and js files in the output path', function () { let sizePrinter = new AssetSizePrinter({ ui: new MockUi(), outputPath: storedTmpDir, }); - return sizePrinter.print().then(function() { + return sizePrinter.print().then(function () { expect(sizePrinter.ui.output).to.include('File sizes:'); expect(sizePrinter.ui.output).to.include('some-project.css: '); expect(sizePrinter.ui.output).to.include('some-project.js: '); @@ -70,24 +70,24 @@ describe('models/asset-size-printer', function() { }); }); - it('does not print gzipped file sizes of empty files', function() { + it('does not print gzipped file sizes of empty files', function () { let sizePrinter = new AssetSizePrinter({ ui: new MockUi(), outputPath: storedTmpDir, }); - return sizePrinter.print().then(function() { + return sizePrinter.print().then(function () { expect(sizePrinter.ui.output).to.not.include('0 B gzipped)'); }); }); - it('does not print project test helper file sizes', function() { + it('does not print project test helper file sizes', function () { let sizePrinter = new AssetSizePrinter({ ui: new MockUi(), outputPath: storedTmpDir, }); - return sizePrinter.print().then(function() { + return sizePrinter.print().then(function () { expect(sizePrinter.ui.output).to.not.include('test-loader'); expect(sizePrinter.ui.output).to.not.include('test-support'); expect(sizePrinter.ui.output).to.not.include('testem'); @@ -95,26 +95,26 @@ describe('models/asset-size-printer', function() { }); }); - it('does not print non-css or js file sizes', function() { + it('does not print non-css or js file sizes', function () { let sizePrinter = new AssetSizePrinter({ ui: new MockUi(), outputPath: storedTmpDir, }); - return sizePrinter.print().then(function() { + return sizePrinter.print().then(function () { expect(sizePrinter.ui.output).to.not.include('some-project.scss'); expect(sizePrinter.ui.output).to.not.include('some-project.css4'); expect(sizePrinter.ui.output).to.not.include('some-project.json'); }); }); - it('can print out to JSON', function() { + it('can print out to JSON', function () { let sizePrinter = new AssetSizePrinter({ ui: new MockUi(), outputPath: storedTmpDir, }); - return sizePrinter.printJSON().then(function() { + return sizePrinter.printJSON().then(function () { let output = JSON.parse(sizePrinter.ui.output); expect(output.files[0].name).to.include('nested-asset.css'); @@ -125,14 +125,14 @@ describe('models/asset-size-printer', function() { }); }); - it('creates an array of asset objects', function() { + it('creates an array of asset objects', function () { let assetObjectKeys; let sizePrinter = new AssetSizePrinter({ ui: new MockUi(), outputPath: storedTmpDir, }); - return sizePrinter.makeAssetSizesObject().then(function(assetObject) { + return sizePrinter.makeAssetSizesObject().then(function (assetObject) { assetObjectKeys = Object.keys(assetObject[0]); expect(assetObjectKeys).to.deep.equal(['name', 'size', 'gzipSize', 'showGzipped']); @@ -145,7 +145,7 @@ describe('models/asset-size-printer', function() { }); }); - it('prints an error when no files are found', function() { + it('prints an error when no files are found', function () { let outputPath = path.join('path', 'that', 'does', 'not', 'exist'); let sizePrinter = new AssetSizePrinter({ ui: new MockUi(), diff --git a/tests/unit/models/blueprint-test.js b/tests/unit/models/blueprint-test.js index 0c4a075352..4593a9d275 100644 --- a/tests/unit/models/blueprint-test.js +++ b/tests/unit/models/blueprint-test.js @@ -9,13 +9,13 @@ const td = require('testdouble'); let Blueprint = require('../../../lib/models/blueprint'); -describe('Blueprint', function() { - afterEach(function() { +describe('Blueprint', function () { + afterEach(function () { td.reset(); }); - describe('.mapFile', function() { - it('replaces all occurrences of __name__ with module name', function() { + describe('.mapFile', function () { + it('replaces all occurrences of __name__ with module name', function () { let path = Blueprint.prototype.mapFile('__name__/__name__-controller.js', { dasherizedModuleName: 'my-blueprint', }); @@ -28,7 +28,7 @@ describe('Blueprint', function() { expect(path).to.equal('my-blueprint/my-blueprint.js'); }); - it('accepts locals.fileMap with multiple mappings', function() { + it('accepts locals.fileMap with multiple mappings', function () { let locals = {}; locals.fileMap = { __name__: 'user', @@ -45,24 +45,24 @@ describe('Blueprint', function() { }); }); - describe('.list', function() { - beforeEach(function() { - td.replace(Blueprint, '_existsSync', function(path) { + describe('.list', function () { + beforeEach(function () { + td.replace(Blueprint, '_existsSync', function (path) { return path.indexOf('package.json') === -1; }); td.replace(Blueprint, 'defaultLookupPaths'); td.when(Blueprint.defaultLookupPaths()).thenReturn([]); - td.replace(Blueprint, 'load', function(blueprintPath) { + td.replace(Blueprint, 'load', function (blueprintPath) { return { name: path.basename(blueprintPath), }; }); }); - it('returns a list of blueprints grouped by lookup path', function() { - td.replace(Blueprint, '_readdirSync', function() { + it('returns a list of blueprints grouped by lookup path', function () { + td.replace(Blueprint, '_readdirSync', function () { return ['test1', 'test2']; }); @@ -83,8 +83,8 @@ describe('Blueprint', function() { }); }); - it('overrides a blueprint of the same name from another package', function() { - td.replace(Blueprint, '_readdirSync', function() { + it('overrides a blueprint of the same name from another package', function () { + td.replace(Blueprint, '_readdirSync', function () { return ['test2']; }); @@ -113,21 +113,21 @@ describe('Blueprint', function() { }); }); - describe('help', function() { + describe('help', function () { let blueprint; - beforeEach(function() { + beforeEach(function () { blueprint = new Blueprint('path/to/my-blueprint'); }); - describe('printBasicHelp', function() { - beforeEach(function() { + describe('printBasicHelp', function () { + beforeEach(function () { td.replace(blueprint, '_printCommand', td.function()); td.replace(blueprint, 'printDetailedHelp', td.function()); td.when(blueprint.printDetailedHelp(), { ignoreExtraArgs: true }).thenReturn('help in detail'); }); - it('handles overridden', function() { + it('handles overridden', function () { Object.assign(blueprint, { overridden: true, }); @@ -142,7 +142,7 @@ describe('Blueprint', function() { td.verify(blueprint._printCommand(), { times: 0 }); }); - it('calls printCommand', function() { + it('calls printCommand', function () { td.when(blueprint._printCommand(), { ignoreExtraArgs: true }).thenReturn(' command printed'); let output = blueprint.printBasicHelp(); @@ -153,7 +153,7 @@ describe('Blueprint', function() { expect(output).to.equal(testString); }); - it('prints detailed help if verbose', function() { + it('prints detailed help if verbose', function () { td.when(blueprint._printCommand(), { ignoreExtraArgs: true }).thenReturn(' command printed'); let availableOptions = []; @@ -171,9 +171,9 @@ help in detail`); }); }); - describe('printDetailedHelp', function() { - it('did not find the file', function() { - td.replace(Blueprint, '_existsSync', function() { + describe('printDetailedHelp', function () { + it('did not find the file', function () { + td.replace(Blueprint, '_existsSync', function () { return false; }); @@ -185,12 +185,12 @@ help in detail`); td.verify(MarkdownColor.prototype.renderFile(), { ignoreExtraArgs: true, times: 0 }); }); - it('found the file', function() { - td.replace(Blueprint, '_existsSync', function() { + it('found the file', function () { + td.replace(Blueprint, '_existsSync', function () { return true; }); - td.replace(MarkdownColor.prototype, 'renderFile', function() { + td.replace(MarkdownColor.prototype, 'renderFile', function () { expect(arguments[1].indent).to.equal(' '); return 'test-file'; }); @@ -201,12 +201,12 @@ help in detail`); }); }); - describe('getJson', function() { - beforeEach(function() { + describe('getJson', function () { + beforeEach(function () { blueprint._printableProperties = ['test1', 'availableOptions']; }); - it('iterates options', function() { + it('iterates options', function () { let availableOptions = [ { type: 'my-string-type', @@ -238,7 +238,7 @@ help in detail`); }); }); - it('does not print detailed if not verbose', function() { + it('does not print detailed if not verbose', function () { td.replace(blueprint, 'printDetailedHelp', td.function()); blueprint.getJson(); @@ -246,7 +246,7 @@ help in detail`); td.verify(blueprint.printDetailedHelp(), { ignoreExtraArgs: true, times: 0 }); }); - it('is calling printDetailedHelp with availableOptions', function() { + it('is calling printDetailedHelp with availableOptions', function () { td.replace(blueprint, 'printDetailedHelp', td.function()); let availableOptions = []; @@ -259,7 +259,7 @@ help in detail`); td.verify(blueprint.printDetailedHelp(availableOptions)); }); - it("if printDetailedHelp returns falsy, don't attach property detailedHelp", function() { + it("if printDetailedHelp returns falsy, don't attach property detailedHelp", function () { td.replace(blueprint, 'printDetailedHelp', td.function()); let json = blueprint.getJson(true); @@ -268,7 +268,7 @@ help in detail`); expect(json).to.not.have.property('detailedHelp'); }); - it('sets detailedHelp properly', function() { + it('sets detailedHelp properly', function () { td.replace(blueprint, 'printDetailedHelp', td.function()); td.when(blueprint.printDetailedHelp(), { ignoreExtraArgs: true }).thenReturn('some details'); diff --git a/tests/unit/models/builder-test.js b/tests/unit/models/builder-test.js index e4d8d6681b..d3b9491fd0 100644 --- a/tests/unit/models/builder-test.js +++ b/tests/unit/models/builder-test.js @@ -18,7 +18,7 @@ let tmpRoot = path.join(root, 'tmp'); let Builder; -describe('models/builder.js', function() { +describe('models/builder.js', function () { let addon, builder, buildResults, tmpdir; function setupBroccoliBuilder() { @@ -40,7 +40,7 @@ describe('models/builder.js', function() { }; } - before(function() { + before(function () { let willInterruptProcess = require('../../../lib/utilities/will-interrupt-process'); td.replace(willInterruptProcess, 'addHandler', td.function()); td.replace(willInterruptProcess, 'removeHandler', td.function()); @@ -48,14 +48,14 @@ describe('models/builder.js', function() { Builder = require('../../../lib/models/builder'); }); - afterEach(function() { + afterEach(function () { if (builder) { return builder.cleanup(); } }); - describe('copyToOutputPath', function() { - beforeEach(async function() { + describe('copyToOutputPath', function () { + beforeEach(async function () { tmpdir = await mkTmpDirIn(tmpRoot); let project = new MockProject(); builder = new Builder({ @@ -65,22 +65,22 @@ describe('models/builder.js', function() { }); }); - afterEach(function() { + afterEach(function () { return fs.remove(tmpRoot); }); - it('allows for non-existent output-paths at arbitrary depth', function() { + it('allows for non-existent output-paths at arbitrary depth', function () { builder.outputPath = path.join(tmpdir, 'some', 'path', 'that', 'does', 'not', 'exist'); builder.copyToOutputPath('tests/fixtures/blueprints/basic_2'); expect(file(path.join(builder.outputPath, 'files', 'foo.txt'))).to.exist; }); - describe('build command', function() { + describe('build command', function () { let command; let parentPath = `..${path.sep}..${path.sep}`; - beforeEach(function() { + beforeEach(function () { command = new BuildCommand(commandOptions()); let project = new MockProject(); @@ -91,7 +91,7 @@ describe('models/builder.js', function() { }); }); - it('when outputPath is root directory ie., `--output-path=/` or `--output-path=C:`', function() { + it('when outputPath is root directory ie., `--output-path=/` or `--output-path=C:`', function () { let outputPathArg = '--output-path=.'; let outputPath = command.parseArgs([outputPathArg]).options.outputPath; outputPath = outputPath.split(path.sep)[0] + path.sep; @@ -100,7 +100,7 @@ describe('models/builder.js', function() { expect(builder.canDeleteOutputPath(outputPath)).to.equal(false); }); - it('when outputPath is project root ie., `--output-path=.`', function() { + it('when outputPath is project root ie., `--output-path=.`', function () { let outputPathArg = '--output-path=.'; let outputPath = command.parseArgs([outputPathArg]).options.outputPath; builder.outputPath = outputPath; @@ -108,7 +108,7 @@ describe('models/builder.js', function() { expect(builder.canDeleteOutputPath(outputPath)).to.equal(false); }); - it(`when outputPath is a parent directory ie., \`--output-path=${parentPath}\``, function() { + it(`when outputPath is a parent directory ie., \`--output-path=${parentPath}\``, function () { let outputPathArg = `--output-path=${parentPath}`; let outputPath = command.parseArgs([outputPathArg]).options.outputPath; builder.outputPath = outputPath; @@ -116,7 +116,7 @@ describe('models/builder.js', function() { expect(builder.canDeleteOutputPath(outputPath)).to.equal(false); }); - it('allow outputPath to contain the root path as a substring, as long as it is not a parent', function() { + it('allow outputPath to contain the root path as a substring, as long as it is not a parent', function () { let outputPathArg = '--output-path=.'; let outputPath = command.parseArgs([outputPathArg]).options.outputPath; outputPath = outputPath.substr(0, outputPath.length - 1); @@ -127,12 +127,12 @@ describe('models/builder.js', function() { }); }); - describe('build', function() { + describe('build', function () { let instrumentationStart; let instrumentationStop; let cwd, project; - beforeEach(function() { + beforeEach(function () { // Cache cwd to reset after test cwd = process.cwd(); project = new MockProject(); @@ -149,7 +149,7 @@ describe('models/builder.js', function() { instrumentationStop = td.replace(builder.project._instrumentation, 'stopAndReport'); }); - afterEach(function() { + afterEach(function () { process.chdir(cwd); delete process._heimdall; delete process.env.BROCCOLI_VIZ; @@ -159,13 +159,13 @@ describe('models/builder.js', function() { } }); - it('calls instrumentation.start', async function() { + it('calls instrumentation.start', async function () { let mockAnnotation = 'MockAnnotation'; await builder.build(null, mockAnnotation); td.verify(instrumentationStart('build'), { times: 1 }); }); - it('calls instrumentation.stop(build, result, resultAnnotation)', async function() { + it('calls instrumentation.stop(build, result, resultAnnotation)', async function () { let mockAnnotation = 'MockAnnotation'; await builder.build(null, mockAnnotation); @@ -176,7 +176,7 @@ describe('models/builder.js', function() { ); }); - it('prints a deprecation warning if it discovers a < v0.1.4 version of heimdalljs', async function() { + it('prints a deprecation warning if it discovers a < v0.1.4 version of heimdalljs', async function () { process._heimdall = {}; await builder.build(); @@ -185,7 +185,7 @@ describe('models/builder.js', function() { expect(output).to.include('Heimdalljs < 0.1.4 found. Please remove old versions'); }); - it('does not print a deprecation warning if it does not discover a < v0.1.4 version of heimdalljs', async function() { + it('does not print a deprecation warning if it does not discover a < v0.1.4 version of heimdalljs', async function () { expect(process._heimdall).to.equal(undefined); await builder.build(); @@ -194,7 +194,7 @@ describe('models/builder.js', function() { expect(output).to.not.include('Heimdalljs < 0.1.4 found. Please remove old versions'); }); - it('writes temp files to Broccoli temp dir', async function() { + it('writes temp files to Broccoli temp dir', async function () { const project = new MockProject(); project.root += '/tests/fixtures/build/simple'; expect(fs.existsSync(`${builder.project.root}/tmp`)).to.be.false; @@ -214,7 +214,7 @@ describe('models/builder.js', function() { rimraf.sync(result.directory); }); - it('produces the correct output', async function() { + it('produces the correct output', async function () { const project = new MockProject(); project.root += '/tests/fixtures/build/simple'; const setup = () => @@ -231,7 +231,7 @@ describe('models/builder.js', function() { expect(fixturify.readSync(result.directory)).to.deep.equal(fixturify.readSync(`${project.root}/dist`)); }); - it('returns {directory, graph} as the result object', async function() { + it('returns {directory, graph} as the result object', async function () { const project = new MockProject(); project.root += '/tests/fixtures/build/simple'; @@ -251,8 +251,8 @@ describe('models/builder.js', function() { }); }); - describe('cleanup', function() { - beforeEach(function() { + describe('cleanup', function () { + beforeEach(function () { let project = new MockProject(); builder = new Builder({ project, @@ -261,9 +261,9 @@ describe('models/builder.js', function() { }); }); - it('is idempotent', async function() { + it('is idempotent', async function () { let cleanupCount = 0; - builder.builder.cleanup = function() { + builder.builder.cleanup = function () { cleanupCount++; }; @@ -275,10 +275,10 @@ describe('models/builder.js', function() { }); }); - describe('addons', function() { + describe('addons', function () { let hooksCalled; - beforeEach(function() { + beforeEach(function () { hooksCalled = []; addon = { name: 'TestAddon', @@ -331,26 +331,26 @@ describe('models/builder.js', function() { }; }); - afterEach(function() { + afterEach(function () { delete process.env.BROCCOLI_VIZ; delete process.env.EMBER_CLI_INSTRUMENTATION; }); - it('allows addons to add promises preBuild', function() { + it('allows addons to add promises preBuild', function () { let preBuild = td.replace(addon, 'preBuild', td.function()); td.when(preBuild(), { ignoreExtraArgs: true, times: 1 }).thenReturn(Promise.resolve()); return builder.build(); }); - it('allows addons to add promises postBuild', async function() { + it('allows addons to add promises postBuild', async function () { let postBuild = td.replace(addon, 'postBuild', td.function()); await builder.build(); td.verify(postBuild(buildResults), { times: 1 }); }); - it('allows addons to add promises outputReady', async function() { + it('allows addons to add promises outputReady', async function () { let outputReady = td.replace(addon, 'outputReady', td.function()); await builder.build(); @@ -359,13 +359,13 @@ describe('models/builder.js', function() { td.verify(outputReady(expected), { times: 1 }); }); - describe('instrumentation hooks', function() { - beforeEach(function() { + describe('instrumentation hooks', function () { + beforeEach(function () { process.env.EMBER_CLI_INSTRUMENTATION = '1'; }); - it('invokes the instrumentation hook if it is preset', async function() { - addon.instrumentation = function() { + it('invokes the instrumentation hook if it is preset', async function () { + addon.instrumentation = function () { hooksCalled.push('instrumentation'); }; @@ -374,19 +374,19 @@ describe('models/builder.js', function() { }); }); - it('hooks are called in the right order without visualization', async function() { + it('hooks are called in the right order without visualization', async function () { await builder.build(); expect(hooksCalled).to.deep.equal(['preBuild', 'build', 'postBuild', 'outputReady']); }); - it('should call postBuild before copying to dist', async function() { + it('should call postBuild before copying to dist', async function () { let called = []; - addon.postBuild = function() { + addon.postBuild = function () { called.push('postBuild'); }; - builder.copyToOutputPath = function() { + builder.copyToOutputPath = function () { called.push('copyToOutputPath'); }; @@ -394,14 +394,14 @@ describe('models/builder.js', function() { expect(called).to.deep.equal(['postBuild', 'copyToOutputPath']); }); - it('should call outputReady after copying to output path', async function() { + it('should call outputReady after copying to output path', async function () { let called = []; - builder.copyToOutputPath = function() { + builder.copyToOutputPath = function () { called.push('copyToOutputPath'); }; - addon.outputReady = function() { + addon.outputReady = function () { called.push('outputReady'); }; @@ -409,15 +409,15 @@ describe('models/builder.js', function() { expect(called).to.deep.equal(['copyToOutputPath', 'outputReady']); }); - it('buildError receives the error object from the errored step', async function() { + it('buildError receives the error object from the errored step', async function () { let thrownBuildError = new Error('buildError'); let receivedBuildError; - addon.buildError = function(errorThrown) { + addon.buildError = function (errorThrown) { receivedBuildError = errorThrown; }; - builder.builder.build = function() { + builder.builder.build = function () { hooksCalled.push('build'); return Promise.reject(thrownBuildError); @@ -427,8 +427,8 @@ describe('models/builder.js', function() { expect(receivedBuildError).to.equal(thrownBuildError); }); - it('calls buildError and does not call build, postBuild or outputReady when preBuild fails', async function() { - addon.preBuild = function() { + it('calls buildError and does not call build, postBuild or outputReady when preBuild fails', async function () { + addon.preBuild = function () { hooksCalled.push('preBuild'); return Promise.reject(new Error('preBuild Error')); @@ -438,8 +438,8 @@ describe('models/builder.js', function() { expect(hooksCalled).to.deep.equal(['preBuild', 'buildError']); }); - it('calls buildError and does not call postBuild or outputReady when build fails', async function() { - builder.builder.build = function() { + it('calls buildError and does not call postBuild or outputReady when build fails', async function () { + builder.builder.build = function () { hooksCalled.push('build'); return Promise.reject(new Error('build Error')); @@ -449,8 +449,8 @@ describe('models/builder.js', function() { expect(hooksCalled).to.deep.equal(['preBuild', 'build', 'buildError']); }); - it('calls buildError when postBuild fails', async function() { - addon.postBuild = function() { + it('calls buildError when postBuild fails', async function () { + addon.postBuild = function () { hooksCalled.push('postBuild'); return Promise.reject(new Error('preBuild Error')); @@ -460,8 +460,8 @@ describe('models/builder.js', function() { expect(hooksCalled).to.deep.equal(['preBuild', 'build', 'postBuild', 'buildError']); }); - it('calls buildError when outputReady fails', async function() { - addon.outputReady = function() { + it('calls buildError when outputReady fails', async function () { + addon.outputReady = function () { hooksCalled.push('outputReady'); return Promise.reject(new Error('outputReady Error')); @@ -472,8 +472,8 @@ describe('models/builder.js', function() { }); }); - describe('fallback from broccoli 2 to broccoli-builder', function() { - it('falls back to broccoli-builder if an InvalidNode error is thrown for read/rebuild api', function() { + describe('fallback from broccoli 2 to broccoli-builder', function () { + it('falls back to broccoli-builder if an InvalidNode error is thrown for read/rebuild api', function () { let project = new MockProject(); const builder = new Builder({ project, @@ -496,7 +496,7 @@ describe('models/builder.js', function() { ); }); - it('errors for an invalid node', function() { + it('errors for an invalid node', function () { let project = new MockProject(); expect( () => diff --git a/tests/unit/models/command-test.js b/tests/unit/models/command-test.js index cd59f8d1dd..c3eaf645e5 100644 --- a/tests/unit/models/command-test.js +++ b/tests/unit/models/command-test.js @@ -77,32 +77,32 @@ let OptionsAliasCommand = Command.extend({ }, }); -describe('models/command.js', function() { +describe('models/command.js', function () { let ui; let config; let options; - before(function() { + before(function () { config = new Yam('ember-cli', { secondary: `${process.cwd()}/tests/fixtures/home`, primary: `${process.cwd()}/tests/fixtures/project`, }); }); - beforeEach(function() { + beforeEach(function () { options = commandOptions(); ui = options.ui; }); - afterEach(function() { + afterEach(function () { td.reset(); }); - it('parseArgs() should parse the command options.', function() { + it('parseArgs() should parse the command options.', function () { expect(new ServeCommand(options).parseArgs(['--port', '80'])).to.have.nested.property('options.port', 80); }); - it('parseArgs() should get command options from the config file and command line', function() { + it('parseArgs() should get command options from the config file and command line', function () { expect( new ServeCommand( Object.assign(options, { @@ -122,11 +122,11 @@ describe('models/command.js', function() { }); }); - it('parseArgs() should set default option values.', function() { + it('parseArgs() should set default option values.', function () { expect(new ServeCommand(options).parseArgs([])).to.have.nested.property('options.port', 4200); }); - it('parseArgs() should return args too.', function() { + it('parseArgs() should return args too.', function () { expect( new ServeCommand( Object.assign(options, { @@ -146,7 +146,7 @@ describe('models/command.js', function() { }); }); - it('parseArgs() should warn if an option is invalid.', function() { + it('parseArgs() should warn if an option is invalid.', function () { new ServeCommand( Object.assign(options, { settings: config.getAll(), @@ -157,18 +157,18 @@ describe('models/command.js', function() { ); }); - it('parseArgs() should parse shorthand options.', function() { + it('parseArgs() should parse shorthand options.', function () { expect(new ServeCommand(options).parseArgs(['-e', 'tacotown'])).to.have.nested.property( 'options.environment', 'tacotown' ); }); - it('parseArgs() should parse shorthand dasherized options.', function() { + it('parseArgs() should parse shorthand dasherized options.', function () { expect(new ServeCommand(options).parseArgs(['-lr', 'false'])).to.have.nested.property('options.liveReload', false); }); - it('parseArgs() should parse string options.', function() { + it('parseArgs() should parse string options.', function () { let CustomAliasCommand = Command.extend({ name: 'custom-alias', availableOptions: [ @@ -185,14 +185,14 @@ describe('models/command.js', function() { expect(command).to.have.nested.property('options.options', '--split 2 --random'); }); - describe('#validateAndRun', function() { - it('should reject and print a message if a required option is missing.', function() { - return new DevelopEmberCLICommand(options).validateAndRun([]).catch(function() { + describe('#validateAndRun', function () { + it('should reject and print a message if a required option is missing.', function () { + return new DevelopEmberCLICommand(options).validateAndRun([]).catch(function () { expect(ui.output).to.match(/requires the option.*package-name/); }); }); - it('should print a message if outside a project and command is not valid there.', function() { + it('should print a message if outside a project and command is not valid there.', function () { return new InsideProjectCommand( Object.assign(options, { project: { @@ -206,12 +206,12 @@ describe('models/command.js', function() { }) ) .validateAndRun([]) - .catch(function(reason) { + .catch(function (reason) { expect(reason.message).to.match(/You have to be inside an ember-cli project/); }); }); - it('selects watcher if an option', function() { + it('selects watcher if an option', function () { return new InsideProjectCommand( Object.assign(options, { availableOptions: [{ type: 'string', name: 'watcher' }], @@ -226,12 +226,12 @@ describe('models/command.js', function() { }) ) .validateAndRun([]) - .then(function(options) { + .then(function (options) { expect(options).to.have.property('watcher'); }); }); - it('selects NO watcher if NOT an option', function() { + it('selects NO watcher if NOT an option', function () { return new InsideProjectCommand( Object.assign(options, { availableOptions: [{ type: 'string', name: 'foo' }], @@ -246,19 +246,19 @@ describe('models/command.js', function() { }) ) .validateAndRun([]) - .then(function(options) { + .then(function (options) { expect(options).to.not.have.property('watcher'); }); }); - it('should print a message if inside a project and command is not valid there.', function() { - return new OutsideProjectCommand(options).validateAndRun([]).catch(function(reason) { + it('should print a message if inside a project and command is not valid there.', function () { + return new OutsideProjectCommand(options).validateAndRun([]).catch(function (reason) { expect(reason.message).to.match(/You cannot use.*inside an ember-cli project/); }); }); }); - it('should be able to set availableOptions within init', function() { + it('should be able to set availableOptions within init', function () { let AvailableOptionsInitCommand = Command.extend({ name: 'available-options-init-command', init() { @@ -290,12 +290,12 @@ describe('models/command.js', function() { }) ) .validateAndRun([]) - .then(function(commandOptions) { + .then(function (commandOptions) { expect(commandOptions).to.deep.equal({ spicy: true }); }); }); - it('should be able to set availableOptions within beforeRun', function() { + it('should be able to set availableOptions within beforeRun', function () { let AvailableOptionsInitCommand = Command.extend({ name: 'available-options-init-command', @@ -308,7 +308,7 @@ describe('models/command.js', function() { ], beforeRun() { - return new Promise(resolve => { + return new Promise((resolve) => { resolve( this.availableOptions.push({ name: 'foobar', @@ -337,13 +337,13 @@ describe('models/command.js', function() { ); return command.beforeRun().then(() => - command.validateAndRun([]).then(commandOptions => { + command.validateAndRun([]).then((commandOptions) => { expect(commandOptions).to.deep.equal({ spicy: true, foobar: 'bazbaz' }); }) ); }); - it('availableOptions with aliases should work.', function() { + it('availableOptions with aliases should work.', function () { expect(new OptionsAliasCommand(options).parseArgs(['-soft-shell'])).to.deep.equal({ options: { taco: 'soft-shell', @@ -353,7 +353,7 @@ describe('models/command.js', function() { }); }); - it('availableOptions with aliases should work with minimum characters.', function() { + it('availableOptions with aliases should work with minimum characters.', function () { expect(new OptionsAliasCommand(options).parseArgs(['-so'])).to.deep.equal({ options: { taco: 'soft-shell', @@ -363,7 +363,7 @@ describe('models/command.js', function() { }); }); - it('availableOptions with aliases should work with hyphenated options', function() { + it('availableOptions with aliases should work with hyphenated options', function () { expect(new OptionsAliasCommand(options).parseArgs(['-dm', 'hi'])).to.deep.equal({ options: { taco: 'traditional', @@ -383,7 +383,7 @@ describe('models/command.js', function() { }); }); - it('registerOptions() should allow adding availableOptions.', function() { + it('registerOptions() should allow adding availableOptions.', function () { let optionsAlias = new OptionsAliasCommand(options); let extendedAvailableOptions = [ { @@ -424,7 +424,7 @@ describe('models/command.js', function() { }); }); - it('registerOptions() should allow overriding availableOptions.', function() { + it('registerOptions() should allow overriding availableOptions.', function () { let optionsAlias = new OptionsAliasCommand(options); let extendedAvailableOptions = [ { @@ -483,7 +483,7 @@ describe('models/command.js', function() { }); }); - it('registerOptions() should not allow aliases with the same name.', function() { + it('registerOptions() should not allow aliases with the same name.', function () { let optionsAlias = new OptionsAliasCommand(options); let extendedAvailableOptions = [ { @@ -508,7 +508,7 @@ describe('models/command.js', function() { ); }); - it('registerOptions() should warn on options override attempts.', function() { + it('registerOptions() should warn on options override attempts.', function () { let optionsAlias = new OptionsAliasCommand(options); let extendedAvailableOptions = [ { @@ -522,7 +522,7 @@ describe('models/command.js', function() { expect(ui.output).to.match(/The ".*" alias cannot be overridden. Please use a different alias./); }); - it('registerOptions() should handle invalid alias definitions.', function() { + it('registerOptions() should handle invalid alias definitions.', function () { //check for different types, validate proper errors are thrown let optionsAlias = new OptionsAliasCommand(options); let badArrayAvailableOptions = [ @@ -556,7 +556,7 @@ describe('models/command.js', function() { ); }); - it('parseAlias() should parse aliases and return an object', function() { + it('parseAlias() should parse aliases and return an object', function () { let optionsAlias = new OptionsAliasCommand(options); let option = { name: 'filling', @@ -573,7 +573,7 @@ describe('models/command.js', function() { }); }); - it('validateOption() should validate options', function() { + it('validateOption() should validate options', function () { let option = { name: 'filling', type: String, @@ -595,7 +595,7 @@ describe('models/command.js', function() { expect(optionsAliasCommand.validateOption(dupe)).to.be.false; }); - it('validateOption() should throw an error when option is missing name or type', function() { + it('validateOption() should throw an error when option is missing name or type', function () { let optionsAlias = new OptionsAliasCommand(options); let notype = { name: 'taco' }; let noname = { type: Boolean }; @@ -608,7 +608,7 @@ describe('models/command.js', function() { ); }); - it('validateOption() should throw an error when option name is camelCase or capitalized', function() { + it('validateOption() should throw an error when option name is camelCase or capitalized', function () { let optionsAlias = new OptionsAliasCommand(options); let capital = { name: 'Taco', @@ -627,7 +627,7 @@ describe('models/command.js', function() { ); }); - it('mergeDuplicateOption() should merge duplicate options together', function() { + it('mergeDuplicateOption() should merge duplicate options together', function () { let optionsAlias = new OptionsAliasCommand(options); let garbageAvailableOptions = [{ name: 'spicy', type: Boolean, default: true, aliases: [{ mild: true }] }]; optionsAlias.registerOptions({ availableOptions: garbageAvailableOptions }); @@ -690,7 +690,7 @@ describe('models/command.js', function() { ]); }); - it('implicit shorthands work with values.', function() { + it('implicit shorthands work with values.', function () { expect(new OptionsAliasCommand(options).parseArgs(['-s', 'false', '-t', 'hard-shell'])).to.deep.equal({ options: { taco: 'hard-shell', @@ -700,12 +700,12 @@ describe('models/command.js', function() { }); }); - describe('runTask', function() { + describe('runTask', function () { let command; class AsyncTask extends Task { run(options) { - return new Promise(function(resolve) { + return new Promise(function (resolve) { setTimeout(() => resolve(options), 50); }); } @@ -723,7 +723,7 @@ describe('models/command.js', function() { } } - beforeEach(function() { + beforeEach(function () { // this should be changed to new Command(), but needs more mocking command = new ServeCommand( Object.assign({}, options, { @@ -736,15 +736,15 @@ describe('models/command.js', function() { ); }); - it('always handles task as a promise', function() { - return command.runTask('Sync', { param: 'value' }).then(result => { + it('always handles task as a promise', function () { + return command.runTask('Sync', { param: 'value' }).then((result) => { expect(result).to.eql({ param: 'value', }); }); }); - it('command environment should be shared with a task', function() { + it('command environment should be shared with a task', function () { let taskRun = command.runTask('Async', { param: 'value' }); expect(command._currentTask.ui).to.eql(command.ui); @@ -754,7 +754,7 @@ describe('models/command.js', function() { return taskRun; }); - it('_currentTask should store a reference to the current task', function() { + it('_currentTask should store a reference to the current task', function () { expect(command._currentTask).to.be.undefined; let taskRun = command.runTask('Sync', { param: 'value' }).then(() => { expect(command._currentTask).to.be.undefined; @@ -764,13 +764,13 @@ describe('models/command.js', function() { return taskRun; }); - it('_currentTask should cleanup current task on fail', function() { + it('_currentTask should cleanup current task on fail', function () { return expect(command.runTask('Failing', { param: 'value' })).to.be.rejected.then(() => { expect(command._currentTask).to.be.undefined; }); }); - it('throws on attempt to launch concurrent tasks', function() { + it('throws on attempt to launch concurrent tasks', function () { let asyncTaskRun, syncTaskRun; expect(() => { @@ -781,7 +781,7 @@ describe('models/command.js', function() { return Promise.all([asyncTaskRun, syncTaskRun]); }); - it('throws if the task is not found', function() { + it('throws if the task is not found', function () { try { let taskRun = command.runTask('notfound'); @@ -794,25 +794,25 @@ describe('models/command.js', function() { }); }); - describe('help', function() { + describe('help', function () { let command; - beforeEach(function() { + beforeEach(function () { // this should be changed to new Command(), but needs more mocking command = new ServeCommand(options); }); - describe('printBasicHelp', function() { - beforeEach(function() { + describe('printBasicHelp', function () { + beforeEach(function () { td.replace(command, '_printCommand', td.function()); td.when(command._printCommand(), { ignoreExtraArgs: true }).thenReturn(' command printed'); }); - afterEach(function() { + afterEach(function () { td.reset(); }); - it('calls printCommand', function() { + it('calls printCommand', function () { let output = command.printBasicHelp(); let testString = processHelpString(`ember serve command printed${EOL}`); @@ -820,7 +820,7 @@ describe('models/command.js', function() { expect(output).to.equal(testString); }); - it('is root', function() { + it('is root', function () { command.isRoot = true; let output = command.printBasicHelp(); @@ -831,30 +831,30 @@ describe('models/command.js', function() { }); }); - describe('printDetailedHelp', function() { - it('has no-op function', function() { + describe('printDetailedHelp', function () { + it('has no-op function', function () { let output = command.printDetailedHelp(); expect(output).to.be.undefined; }); }); - describe('hasOption', function() { - it('reports false if no option with that name is present', function() { + describe('hasOption', function () { + it('reports false if no option with that name is present', function () { expect(command.hasOption('no-option-by-this-name')).to.be.false; }); - it('reports true if option with that name is present', function() { + it('reports true if option with that name is present', function () { expect(command.hasOption('port')).to.be.true; }); }); - describe('getJson', function() { - beforeEach(function() { + describe('getJson', function () { + beforeEach(function () { command._printableProperties = ['test1', 'test2']; }); - it('iterates options', function() { + it('iterates options', function () { Object.assign(command, { test1: 'a test', test2: 'another test', @@ -868,7 +868,7 @@ describe('models/command.js', function() { }); }); - it('calls detailed json', function() { + it('calls detailed json', function () { td.replace(command, 'addAdditionalJsonForHelp', td.function()); let options = {}; diff --git a/tests/unit/models/file-info-test.js b/tests/unit/models/file-info-test.js index b6d0896dd1..25c8e81cd4 100644 --- a/tests/unit/models/file-info-test.js +++ b/tests/unit/models/file-info-test.js @@ -12,11 +12,11 @@ const td = require('testdouble'); let root = process.cwd(); let tmproot = path.join(root, 'tmp'); -describe('Unit - FileInfo', function() { +describe('Unit - FileInfo', function () { let validOptions, ui, testOutputPath; - beforeEach(function() { - return mkTmpDirIn(tmproot).then(function(tmpdir) { + beforeEach(function () { + return mkTmpDirIn(tmproot).then(function (tmpdir) { testOutputPath = path.join(tmpdir, 'outputfile'); ui = new MockUI(); @@ -33,43 +33,43 @@ describe('Unit - FileInfo', function() { }); }); - afterEach(function(done) { + afterEach(function (done) { td.reset(); fs.remove(tmproot, done); }); - it('can instantiate with options', function() { + it('can instantiate with options', function () { new FileInfo(validOptions); }); // eslint-disable-next-line no-template-curly-in-string - it('does not interpolate {{ }} or ${ }', function() { + it('does not interpolate {{ }} or ${ }', function () { let options = {}; Object.assign(options, validOptions, { inputPath: path.resolve(__dirname, '../../fixtures/file-info/interpolate.txt'), templateVariables: { name: 'tacocat' }, }); let fileInfo = new FileInfo(options); - return fileInfo.render().then(function(output) { + return fileInfo.render().then(function (output) { // eslint-disable-next-line no-template-curly-in-string expect(output.trim()).to.equal('{{ name }} ${ name } tacocat tacocat'); }); }); - it('renders an input file', function() { + it('renders an input file', function () { validOptions.templateVariables.friend = 'Billy'; let fileInfo = new FileInfo(validOptions); - return fileInfo.render().then(function(output) { + return fileInfo.render().then(function (output) { expect(output.trim()).to.equal('Howdy Billy', 'expects the template to have been run'); }); }); - it('allows mutation to the rendered file', function() { + it('allows mutation to the rendered file', function () { validOptions.templateVariables.friend = 'Billy'; let fileInfo; - validOptions.replacer = function(content, theFileInfo) { + validOptions.replacer = function (content, theFileInfo) { expect(theFileInfo).to.eql(fileInfo); expect(content).to.eql('Howdy Billy\n'); @@ -78,12 +78,12 @@ describe('Unit - FileInfo', function() { fileInfo = new FileInfo(validOptions); - return fileInfo.render().then(function(output) { + return fileInfo.render().then(function (output) { expect(output.trim()).to.equal('HOWDY BILLY', 'expects the template to have been run'); }); }); - it('rejects if templating throws', function() { + it('rejects if templating throws', function () { let templateWithUndefinedVariable = path.resolve( __dirname, '../../fixtures/blueprints/with-templating/files/with-undefined-variable.txt' @@ -94,38 +94,38 @@ describe('Unit - FileInfo', function() { return fileInfo .render() - .then(function() { + .then(function () { throw new Error('FileInfo.render should reject if templating throws'); }) - .catch(function(e) { + .catch(function (e) { if (!e.toString().match(/ReferenceError/)) { throw e; } }); }); - it('does not explode when trying to template binary files', function() { + it('does not explode when trying to template binary files', function () { let binary = path.resolve(__dirname, '../../fixtures/problem-binary.png'); validOptions.inputPath = binary; let fileInfo = new FileInfo(validOptions); - return fileInfo.render().then(function(output) { + return fileInfo.render().then(function (output) { expect(!!output, 'expects the file to be processed without error').to.equal(true); }); }); - it('renders a diff to the UI', function() { + it('renders a diff to the UI', function () { validOptions.templateVariables.friend = 'Billy'; let fileInfo = new FileInfo(validOptions); return fs .writeFile(testOutputPath, `Something Old${EOL}`) - .then(function() { + .then(function () { return fileInfo.displayDiff(); }) - .then(function() { + .then(function () { let output = ui.output.trim().split(EOL); expect(output.shift()).to.equal(`Index: ${testOutputPath}`); expect(output.shift()).to.match(/=+/); @@ -137,50 +137,50 @@ describe('Unit - FileInfo', function() { }); }); - it('renders a menu with an overwrite option', function() { + it('renders a menu with an overwrite option', function () { td.when(ui.prompt(td.matchers.anything())).thenReturn(Promise.resolve({ answer: 'overwrite' })); let fileInfo = new FileInfo(validOptions); - return fileInfo.confirmOverwrite('test.js').then(function(action) { + return fileInfo.confirmOverwrite('test.js').then(function (action) { td.verify(ui.prompt(td.matchers.anything()), { times: 1 }); expect(action).to.equal('overwrite'); }); }); - it('renders a menu with a skip option', function() { + it('renders a menu with a skip option', function () { td.when(ui.prompt(td.matchers.anything())).thenReturn(Promise.resolve({ answer: 'skip' })); let fileInfo = new FileInfo(validOptions); - return fileInfo.confirmOverwrite('test.js').then(function(action) { + return fileInfo.confirmOverwrite('test.js').then(function (action) { td.verify(ui.prompt(td.matchers.anything()), { times: 1 }); expect(action).to.equal('skip'); }); }); - it('renders a menu with a diff option', function() { + it('renders a menu with a diff option', function () { td.when(ui.prompt(td.matchers.anything())).thenReturn(Promise.resolve({ answer: 'diff' })); let fileInfo = new FileInfo(validOptions); - return fileInfo.confirmOverwrite('test.js').then(function(action) { + return fileInfo.confirmOverwrite('test.js').then(function (action) { td.verify(ui.prompt(td.matchers.anything()), { times: 1 }); expect(action).to.equal('diff'); }); }); - it('renders a menu without diff and edit options when dealing with binary files', function() { + it('renders a menu without diff and edit options when dealing with binary files', function () { td.when(ui.prompt(td.matchers.anything())).thenReturn(Promise.resolve({ answer: 'skip' })); let binary = path.resolve(__dirname, '../../fixtures/problem-binary.png'); validOptions.inputPath = binary; let fileInfo = new FileInfo(validOptions); - return fileInfo.confirmOverwrite('test.png').then(function(/* action */) { + return fileInfo.confirmOverwrite('test.png').then(function (/* action */) { td.verify( ui.prompt( - td.matchers.argThat(function(options) { + td.matchers.argThat(function (options) { return options.choices.length === 2 && options.choices[0].key === 'y' && options.choices[1].key === 'n'; }) ) @@ -188,7 +188,7 @@ describe('Unit - FileInfo', function() { }); }); - it('normalizes line endings before comparing files', function() { + it('normalizes line endings before comparing files', function () { if (EOL === '\n') { return; } @@ -197,7 +197,7 @@ describe('Unit - FileInfo', function() { validOptions.outputPath = path.resolve(__dirname, '../../fixtures/file-info/test_lf.js'); let fileInfo = new FileInfo(validOptions); - return fileInfo.checkForConflict().then(function(type) { + return fileInfo.checkForConflict().then(function (type) { expect(type).to.equal('identical'); }); }); diff --git a/tests/unit/models/hardware-info-test.js b/tests/unit/models/hardware-info-test.js index 68812885a6..bc422eafdb 100644 --- a/tests/unit/models/hardware-info-test.js +++ b/tests/unit/models/hardware-info-test.js @@ -81,18 +81,18 @@ function stdout(value) { }); } -describe('models/hardware-info.js', function() { - afterEach(function() { +describe('models/hardware-info.js', function () { + afterEach(function () { td.reset(); }); - describe('.isUsingBattery', function() { - it('returns null for unsupported platforms', function() { + describe('.isUsingBattery', function () { + it('returns null for unsupported platforms', function () { expect(hwinfo.isUsingBattery('not-a-real-platform')).to.be.null; }); - describe('on FreeBSD', function() { - it('returns false via apm when not on battery', function() { + describe('on FreeBSD', function () { + it('returns false via apm when not on battery', function () { const stub = td.function(execa.sync); td.when(stub('apm'), { ignoreExtraArgs: true }).thenReturn({ stdout: '1\n' }); @@ -102,7 +102,7 @@ describe('models/hardware-info.js', function() { expect(hwinfo.isUsingBattery('freebsd')).to.be.false; }); - it('returns true via apm when on battery', function() { + it('returns true via apm when on battery', function () { const stub = td.function(execa.sync); td.when(stub('apm'), { ignoreExtraArgs: true }).thenReturn({ stdout: '0\n' }); @@ -112,7 +112,7 @@ describe('models/hardware-info.js', function() { expect(hwinfo.isUsingBattery('freebsd')).to.be.true; }); - it('returns false via upower when not on battery', function() { + it('returns false via upower when not on battery', function () { const stub = td.function(execa.sync); td.when(stub('apm'), { ignoreExtraArgs: true }).thenThrow(new Error('command not found')); @@ -122,7 +122,7 @@ describe('models/hardware-info.js', function() { expect(hwinfo.isUsingBattery('freebsd')).to.be.false; }); - it('returns true via upower when on battery', function() { + it('returns true via upower when on battery', function () { const stub = td.function(execa.sync); td.when(stub('apm'), { ignoreExtraArgs: true }).thenThrow(new Error('command not found')); @@ -132,7 +132,7 @@ describe('models/hardware-info.js', function() { expect(hwinfo.isUsingBattery('freebsd')).to.be.true; }); - it('returns null when battery status cannot be determined', function() { + it('returns null when battery status cannot be determined', function () { const stub = td.function(execa.sync); td.when(stub(), { ignoreExtraArgs: true }).thenThrow(new Error('command not found')); @@ -142,8 +142,8 @@ describe('models/hardware-info.js', function() { }); }); - describe('on Linux', function() { - it('returns false via /sys/class/power_supply when not on battery', function() { + describe('on Linux', function () { + it('returns false via /sys/class/power_supply when not on battery', function () { const execaStub = td.function(execa.sync); td.when(execaStub(), { ignoreExtraArgs: true }).thenThrow(new Error('command not found')); @@ -157,7 +157,7 @@ describe('models/hardware-info.js', function() { expect(hwinfo.isUsingBattery('linux')).to.be.false; }); - it('returns true via /sys/class/power_supply when on battery', function() { + it('returns true via /sys/class/power_supply when on battery', function () { const execaStub = td.function(execa.sync); td.when(execaStub(), { ignoreExtraArgs: true }).thenThrow(new Error('command not found')); @@ -171,7 +171,7 @@ describe('models/hardware-info.js', function() { expect(hwinfo.isUsingBattery('linux')).to.be.true; }); - it('returns false via acpi when not on battery', function() { + it('returns false via acpi when not on battery', function () { const execaStub = td.function(execa.sync); td.when(execaStub('acpi'), { ignoreExtraArgs: true }).thenReturn({ stdout: 'Adapter 0: on-line\n' }); @@ -186,7 +186,7 @@ describe('models/hardware-info.js', function() { expect(hwinfo.isUsingBattery('linux')).to.be.false; }); - it('returns true via acpi when on battery', function() { + it('returns true via acpi when on battery', function () { const execaStub = td.function(execa.sync); td.when(execaStub('acpi'), { ignoreExtraArgs: true }).thenReturn({ stdout: 'Adapter 0: off-line\n' }); @@ -201,7 +201,7 @@ describe('models/hardware-info.js', function() { expect(hwinfo.isUsingBattery('linux')).to.be.true; }); - it('returns false via upower when not on battery', function() { + it('returns false via upower when not on battery', function () { const execaStub = td.function(execa.sync); td.when(execaStub('acpi'), { ignoreExtraArgs: true }).thenThrow(new Error('command not found')); @@ -217,7 +217,7 @@ describe('models/hardware-info.js', function() { expect(hwinfo.isUsingBattery('linux')).to.be.false; }); - it('returns true via upower when on battery', function() { + it('returns true via upower when on battery', function () { const execaStub = td.function(execa.sync); td.when(execaStub('acpi'), { ignoreExtraArgs: true }).thenThrow(new Error('command not found')); @@ -233,7 +233,7 @@ describe('models/hardware-info.js', function() { expect(hwinfo.isUsingBattery('linux')).to.be.true; }); - it('returns null when battery status cannot be determined', function() { + it('returns null when battery status cannot be determined', function () { const execaStub = td.function(execa.sync); td.when(execaStub(), { ignoreExtraArgs: true }).thenThrow(new Error('command not found')); @@ -248,8 +248,8 @@ describe('models/hardware-info.js', function() { }); }); - describe('on macOS', function() { - it('returns false when not on battery', function() { + describe('on macOS', function () { + it('returns false when not on battery', function () { td.replace( execa, 'sync', @@ -261,7 +261,7 @@ describe('models/hardware-info.js', function() { expect(hwinfo.isUsingBattery('darwin')).to.be.false; }); - it('returns true when on battery', function() { + it('returns true when on battery', function () { td.replace( execa, 'sync', @@ -273,7 +273,7 @@ describe('models/hardware-info.js', function() { expect(hwinfo.isUsingBattery('darwin')).to.be.true; }); - it('returns null when an error occurs', function() { + it('returns null when an error occurs', function () { const stub = td.function(execa.sync); td.when(stub(), { ignoreExtraArgs: true }).thenThrow(new Error('whoops!')); @@ -283,8 +283,8 @@ describe('models/hardware-info.js', function() { }); }); - describe('on OpenBSD', function() { - it('returns false via apm when not on battery', function() { + describe('on OpenBSD', function () { + it('returns false via apm when not on battery', function () { const stub = td.function(execa.sync); td.when(stub('apm'), { ignoreExtraArgs: true }).thenReturn({ stdout: '1\n' }); @@ -294,7 +294,7 @@ describe('models/hardware-info.js', function() { expect(hwinfo.isUsingBattery('openbsd')).to.be.false; }); - it('returns true via apm when on battery', function() { + it('returns true via apm when on battery', function () { const stub = td.function(execa.sync); td.when(stub('apm'), { ignoreExtraArgs: true }).thenReturn({ stdout: '0\n' }); @@ -304,7 +304,7 @@ describe('models/hardware-info.js', function() { expect(hwinfo.isUsingBattery('openbsd')).to.be.true; }); - it('returns false via upower when not on battery', function() { + it('returns false via upower when not on battery', function () { const stub = td.function(execa.sync); td.when(stub('apm'), { ignoreExtraArgs: true }).thenThrow(new Error('command not found')); @@ -314,7 +314,7 @@ describe('models/hardware-info.js', function() { expect(hwinfo.isUsingBattery('openbsd')).to.be.false; }); - it('returns true via upower when on battery', function() { + it('returns true via upower when on battery', function () { const stub = td.function(execa.sync); td.when(stub('apm'), { ignoreExtraArgs: true }).thenThrow(new Error('command not found')); @@ -324,7 +324,7 @@ describe('models/hardware-info.js', function() { expect(hwinfo.isUsingBattery('openbsd')).to.be.true; }); - it('returns null when battery status cannot be determined', function() { + it('returns null when battery status cannot be determined', function () { const stub = td.function(execa.sync); td.when(stub(), { ignoreExtraArgs: true }).thenThrow(new Error('command not found')); @@ -334,8 +334,8 @@ describe('models/hardware-info.js', function() { }); }); - describe('on Windows', function() { - it('returns false when not on battery', function() { + describe('on Windows', function () { + it('returns false when not on battery', function () { td.replace( execa, 'sync', @@ -351,7 +351,7 @@ PowerOnline=TRUE expect(hwinfo.isUsingBattery('win32')).to.be.false; }); - it('returns true when on battery', function() { + it('returns true when on battery', function () { td.replace( execa, 'sync', @@ -367,7 +367,7 @@ PowerOnline=FALSE expect(hwinfo.isUsingBattery('win32')).to.be.true; }); - it('returns null when an error occurs', function() { + it('returns null when an error occurs', function () { const stub = td.function(execa.sync); td.when(stub(), { ignoreExtraArgs: true }).thenThrow(new Error('whoops!')); @@ -378,12 +378,12 @@ PowerOnline=FALSE }); }); - describe('.memorySwapUsed', function() { - it('returns null for unsupported platforms', function() { + describe('.memorySwapUsed', function () { + it('returns null for unsupported platforms', function () { expect(hwinfo.memorySwapUsed('not-a-real-platform')).to.be.null; }); - it('returns the expected value on FreeBSD', function() { + it('returns the expected value on FreeBSD', function () { td.replace( execa, 'sync', @@ -396,7 +396,7 @@ PowerOnline=FALSE expect(hwinfo.memorySwapUsed('freebsd')).to.equal(1865728); }); - it('returns null on FreeBSD when an error occurs', function() { + it('returns null on FreeBSD when an error occurs', function () { const stub = td.function(execa.sync); td.when(stub(), { ignoreExtraArgs: true }).thenThrow(new Error('whoops!')); @@ -405,7 +405,7 @@ PowerOnline=FALSE expect(hwinfo.memorySwapUsed('freebsd')).to.be.null; }); - it('returns the expected value on Linux', function() { + it('returns the expected value on Linux', function () { td.replace( execa, 'sync', @@ -418,7 +418,7 @@ Swap: 67448598528 121593856 67327004672 expect(hwinfo.memorySwapUsed('linux')).to.equal(121593856); }); - it('returns null on Linux when an error occurs', function() { + it('returns null on Linux when an error occurs', function () { const stub = td.function(execa.sync); td.when(stub(), { ignoreExtraArgs: true }).thenThrow(new Error('whoops!')); @@ -427,7 +427,7 @@ Swap: 67448598528 121593856 67327004672 expect(hwinfo.memorySwapUsed('linux')).to.be.null; }); - it('returns the expected value on macOS', function() { + it('returns the expected value on macOS', function () { td.replace( execa, 'sync', @@ -438,7 +438,7 @@ Swap: 67448598528 121593856 67327004672 expect(hwinfo.memorySwapUsed('darwin')).to.equal(5230034944); }); - it('returns null on macOS when an error occurs', function() { + it('returns null on macOS when an error occurs', function () { const stub = td.function(execa.sync); td.when(stub(), { ignoreExtraArgs: true }).thenThrow(new Error('whoops!')); @@ -447,7 +447,7 @@ Swap: 67448598528 121593856 67327004672 expect(hwinfo.memorySwapUsed('darwin')).to.be.null; }); - it('returns the expected value on OpenBSD', function() { + it('returns the expected value on OpenBSD', function () { td.replace( execa, 'sync', @@ -460,7 +460,7 @@ Swap: 67448598528 121593856 67327004672 expect(hwinfo.memorySwapUsed('openbsd')).to.equal(932864); }); - it('returns null on OpenBSD when an error occurs', function() { + it('returns null on OpenBSD when an error occurs', function () { const stub = td.function(execa.sync); td.when(stub(), { ignoreExtraArgs: true }).thenThrow(new Error('whoops!')); @@ -469,7 +469,7 @@ Swap: 67448598528 121593856 67327004672 expect(hwinfo.memorySwapUsed('openbsd')).to.be.null; }); - it('returns the expected value on Windows', function() { + it('returns the expected value on Windows', function () { td.replace( execa, 'sync', @@ -485,7 +485,7 @@ CurrentUsage=325 expect(hwinfo.memorySwapUsed('win32')).to.equal(340787200); }); - it('returns null on Windows when an error occurs', function() { + it('returns null on Windows when an error occurs', function () { const stub = td.function(execa.sync); td.when(stub(), { ignoreExtraArgs: true }).thenThrow(new Error('whoops!')); @@ -495,14 +495,14 @@ CurrentUsage=325 }); }); - describe('.processorLoad', function() { - it('returns null on Windows', function() { + describe('.processorLoad', function () { + it('returns null on Windows', function () { expect(hwinfo.processorLoad('win32')).to.be.null; }); }); - describe('.processorSpeed', function() { - it("averages the processors' speeds", function() { + describe('.processorSpeed', function () { + it("averages the processors' speeds", function () { td.replace(os, 'cpus', () => [{ speed: 1 }, { speed: 2 }, { speed: 3 }, { speed: 4 }, { speed: 5 }]); expect(hwinfo.processorSpeed()).to.equal(3); diff --git a/tests/unit/models/installation-checker-test.js b/tests/unit/models/installation-checker-test.js index 7e6eecc18a..0462bf35eb 100644 --- a/tests/unit/models/installation-checker-test.js +++ b/tests/unit/models/installation-checker-test.js @@ -4,7 +4,7 @@ const expect = require('chai').expect; const InstallationChecker = require('../../../lib/models/installation-checker'); const path = require('path'); -describe('Installation Checker', function() { +describe('Installation Checker', function () { let installationChecker; function fixturePath(pathToFile) { @@ -15,8 +15,8 @@ describe('Installation Checker', function() { installationChecker.checkInstallations(); } - describe('bower', function() { - it('works when installation directory exist', function() { + describe('bower', function () { + it('works when installation directory exist', function () { let project = { root: fixturePath('installation-checker/valid-bower-installation'), bowerDirectory: fixturePath('installation-checker/valid-bower-installation/bower_components'), @@ -26,7 +26,7 @@ describe('Installation Checker', function() { expect(checkInstallations).to.not.throw(/No dependencies installed/); }); - it("fails when installation directory doesn't exist", function() { + it("fails when installation directory doesn't exist", function () { let project = { root: fixturePath('installation-checker/invalid-bower-installation'), bowerDirectory: fixturePath('installation-checker/invalid-bower-installation/bower_components'), @@ -37,8 +37,8 @@ describe('Installation Checker', function() { }); }); - describe('npm', function() { - it('works when installation directory exist', function() { + describe('npm', function () { + it('works when installation directory exist', function () { let project = { root: fixturePath('installation-checker/valid-npm-installation'), }; @@ -47,7 +47,7 @@ describe('Installation Checker', function() { expect(checkInstallations).to.not.throw(/No dependencies installed/); }); - it("fails when installation directory doesn't exist", function() { + it("fails when installation directory doesn't exist", function () { let project = { root: fixturePath('installation-checker/invalid-npm-installation'), }; @@ -57,8 +57,8 @@ describe('Installation Checker', function() { }); }); - describe('npm and bower', function() { - it('fails reporting both dependencies', function() { + describe('npm and bower', function () { + it('fails reporting both dependencies', function () { let project = { root: fixturePath('installation-checker/invalid-bower-and-npm'), bowerDirectory: fixturePath('installation-checker/invalid-bower-and-npm/bower_components'), @@ -68,7 +68,7 @@ describe('Installation Checker', function() { expect(checkInstallations).to.throw(/^InstallationChecker: Unable to parse: .*package.json/); }); - it('ignores directories without bower.js and package.json files', function() { + it('ignores directories without bower.js and package.json files', function () { let project = { root: fixturePath('installation-checker/empty'), bowerDirectory: fixturePath('installation-checker/empty/bower_components'), diff --git a/tests/unit/models/instantiate-addons-test.js b/tests/unit/models/instantiate-addons-test.js index 082e748a93..f21fa2da18 100644 --- a/tests/unit/models/instantiate-addons-test.js +++ b/tests/unit/models/instantiate-addons-test.js @@ -3,19 +3,19 @@ const FixturifyProject = require('../../helpers/fixturify-project'); const expect = require('chai').expect; -describe('models/instatiate-addons.js', function() { +describe('models/instatiate-addons.js', function () { let fixturifyProject; - beforeEach(function() { + beforeEach(function () { fixturifyProject = new FixturifyProject('awesome-proj', '0.0.0'); fixturifyProject.addDevDependency('ember-cli', '*'); }); - afterEach(function() { + afterEach(function () { fixturifyProject.dispose(); }); - it('ordering without before/after', function() { + it('ordering without before/after', function () { // this tests ordering is very important to maintain, it tests some naunced // details which must be maintained fixturifyProject.addAddon('foo', '1.0.0'); @@ -38,7 +38,7 @@ describe('models/instatiate-addons.js', function() { project.initializeAddons(); - expect(project.addons.map(a => ({ name: a.pkg.name, version: a.pkg.version }))).to.deep.eql([ + expect(project.addons.map((a) => ({ name: a.pkg.name, version: a.pkg.version }))).to.deep.eql([ { name: 'a', version: '2.0.0' }, { name: 'b', version: '2.0.0' }, { name: 'c', version: '2.0.0' }, @@ -49,10 +49,10 @@ describe('models/instatiate-addons.js', function() { ]); }); - it('ordering with before specified', function() { + it('ordering with before specified', function () { fixturifyProject.addAddon('foo', '1.0.0'); fixturifyProject.addAddon('bar', '1.0.0'); - fixturifyProject.addAddon('qux', '1.0.0', a => (a.pkg['ember-addon'].before = 'foo')); + fixturifyProject.addAddon('qux', '1.0.0', (a) => (a.pkg['ember-addon'].before = 'foo')); fixturifyProject.writeSync(); @@ -60,13 +60,13 @@ describe('models/instatiate-addons.js', function() { project.initializeAddons(); - expect(project.addons.map(a => a.name)).to.deep.eql(['bar', 'qux', 'foo']); + expect(project.addons.map((a) => a.name)).to.deep.eql(['bar', 'qux', 'foo']); }); - it('ordering with after specified', function() { + it('ordering with after specified', function () { fixturifyProject.addAddon('foo', '1.0.0'); fixturifyProject.addAddon('bar', '1.0.0'); - fixturifyProject.addAddon('qux', '1.0.0', a => (a.pkg['ember-addon'].after = 'foo')); + fixturifyProject.addAddon('qux', '1.0.0', (a) => (a.pkg['ember-addon'].after = 'foo')); fixturifyProject.writeSync(); @@ -74,13 +74,13 @@ describe('models/instatiate-addons.js', function() { project.initializeAddons(); - expect(project.addons.map(a => a.name)).to.deep.eql(['bar', 'foo', 'qux']); + expect(project.addons.map((a) => a.name)).to.deep.eql(['bar', 'foo', 'qux']); }); - it('ordering always matches package.json name (index.js name is ignored)', function() { + it('ordering always matches package.json name (index.js name is ignored)', function () { let foo = fixturifyProject.addAddon('lol', '1.0.0'); foo.files['index.js'] = 'module.exports = { name: "foo" };'; - fixturifyProject.addAddon('qux', '1.0.0', a => (a.pkg['ember-addon'].before = 'foo')); + fixturifyProject.addAddon('qux', '1.0.0', (a) => (a.pkg['ember-addon'].before = 'foo')); fixturifyProject.writeSync(); @@ -88,12 +88,12 @@ describe('models/instatiate-addons.js', function() { project.initializeAddons(); - expect(project.addons.map(a => a.name)).to.deep.eql(['foo', 'qux']); + expect(project.addons.map((a) => a.name)).to.deep.eql(['foo', 'qux']); }); - it('errors when there is a cycle detected', function() { - fixturifyProject.addAddon('foo', '1.0.0', a => (a.pkg['ember-addon'].after = 'qux')); - fixturifyProject.addAddon('qux', '1.0.0', a => (a.pkg['ember-addon'].after = 'foo')); + it('errors when there is a cycle detected', function () { + fixturifyProject.addAddon('foo', '1.0.0', (a) => (a.pkg['ember-addon'].after = 'qux')); + fixturifyProject.addAddon('qux', '1.0.0', (a) => (a.pkg['ember-addon'].after = 'foo')); fixturifyProject.writeSync(); diff --git a/tests/unit/models/instrumentation-test.js b/tests/unit/models/instrumentation-test.js index c54819b46f..8305a86daa 100644 --- a/tests/unit/models/instrumentation-test.js +++ b/tests/unit/models/instrumentation-test.js @@ -24,8 +24,8 @@ const tmproot = path.join(root, 'tmp'); let instrumentation; -describe('models/instrumentation.js', function() { - afterEach(async function() { +describe('models/instrumentation.js', function () { + afterEach(async function () { delete process.env.BROCCOLI_VIZ; delete process.env.EMBER_CLI_INSTRUMENTATION; @@ -33,20 +33,20 @@ describe('models/instrumentation.js', function() { await fse.remove(tmproot); }); - describe('._enableFSMonitorIfInstrumentationEnabled', function() { + describe('._enableFSMonitorIfInstrumentationEnabled', function () { let originalStatSync = fs.statSync; - beforeEach(function() { + beforeEach(function () { expect(!!process.env.BROCCOLI_VIZ).to.eql(false); expect(!!process.env.EMBER_CLI_INSTRUMENTATION).to.eql(false); expect(fs.statSync).to.equal(originalStatSync); }); - afterEach(function() { + afterEach(function () { td.reset(); }); - it('if VIZ is NOT enabled, do not monitor', function() { + it('if VIZ is NOT enabled, do not monitor', function () { let monitor = Instrumentation._enableFSMonitorIfInstrumentationEnabled(); try { expect(fs.statSync).to.equal(originalStatSync); @@ -58,7 +58,7 @@ describe('models/instrumentation.js', function() { } }); - it('if VIZ is enabled, monitor', function() { + it('if VIZ is enabled, monitor', function () { process.env.BROCCOLI_VIZ = '1'; let monitor = Instrumentation._enableFSMonitorIfInstrumentationEnabled(); try { @@ -70,7 +70,7 @@ describe('models/instrumentation.js', function() { } }); - it('if instrumentation is enabled, monitor', function() { + it('if instrumentation is enabled, monitor', function () { process.env.EMBER_CLI_INSTRUMENTATION = '1'; let monitor = Instrumentation._enableFSMonitorIfInstrumentationEnabled(); try { @@ -82,7 +82,7 @@ describe('models/instrumentation.js', function() { } }); - it('if enableInstrumentation is NOT enabled in .ember-cli, do not monitor', function() { + it('if enableInstrumentation is NOT enabled in .ember-cli, do not monitor', function () { let mockedYam = new Yam('ember-cli', { primary: `${process.cwd()}/tests/fixtures/instrumentation-disabled-config`, }); @@ -97,7 +97,7 @@ describe('models/instrumentation.js', function() { } }); - it('if enableInstrumentation is enabled in .ember-cli, monitor', function() { + it('if enableInstrumentation is enabled in .ember-cli, monitor', function () { let mockedYam = new Yam('ember-cli', { primary: `${process.cwd()}/tests/fixtures/instrumentation-enabled-config`, }); @@ -112,25 +112,25 @@ describe('models/instrumentation.js', function() { }); }); - describe('constructor', function() { + describe('constructor', function () { const heimdall = require('heimdalljs'); let heimdallStart; - beforeEach(function() { + beforeEach(function () { heimdallStart = td.replace(heimdall, 'start'); }); - afterEach(function() { + afterEach(function () { delete process.env.EMBER_CLI_INSTRUMENTATION; td.reset(); }); - describe('when instrumentation is enabled', function() { - beforeEach(function() { + describe('when instrumentation is enabled', function () { + beforeEach(function () { process.env.EMBER_CLI_INSTRUMENTATION = '1'; }); - it('starts an init node if init instrumentation is missing', function() { + it('starts an init node if init instrumentation is missing', function () { let mockToken = {}; td.when( @@ -151,7 +151,7 @@ describe('models/instrumentation.js', function() { expect(instrumentation.instrumentations.init.node).to.not.equal(undefined); }); - it('does not create an init node if init instrumentation is included', function() { + it('does not create an init node if init instrumentation is included', function () { let mockToken = {}; let mockInstrumentation = {}; @@ -165,7 +165,7 @@ describe('models/instrumentation.js', function() { td.verify(heimdallStart(), { times: 0, ignoreExtraArgs: true }); }); - it('does not warn if init instrumentation is included', function() { + it('does not warn if init instrumentation is included', function () { td.when(heimdallStart('init')); let mockInstrumentation = {}; @@ -181,12 +181,12 @@ describe('models/instrumentation.js', function() { }); }); - describe('when instrumentation is not enabled', function() { - beforeEach(function() { + describe('when instrumentation is not enabled', function () { + beforeEach(function () { expect(process.env.EMBER_CLI_INSTRUMENTATION).to.eql(undefined); }); - it('does not create an init node if init instrumentation is missing', function() { + it('does not create an init node if init instrumentation is missing', function () { let mockToken = {}; td.when(heimdallStart('init')).thenReturn(mockToken); @@ -197,7 +197,7 @@ describe('models/instrumentation.js', function() { td.verify(heimdallStart(), { times: 0, ignoreExtraArgs: true }); }); - it('does not warn when init instrumentation is missing', function() { + it('does not warn when init instrumentation is missing', function () { td.when(heimdallStart('init')); let ui = new MockUI(); @@ -211,11 +211,11 @@ describe('models/instrumentation.js', function() { }); }); - describe('.isVizEnabled', function() { + describe('.isVizEnabled', function () { let originalWarn = console.warn; let warnInvocations; - beforeEach(function() { + beforeEach(function () { instrumentation = new Instrumentation({ ui: new MockUI(), }); @@ -223,37 +223,37 @@ describe('models/instrumentation.js', function() { delete process.env.BROCCOLI_VIZ; delete process.env.EMBER_CLI_INSTRUMENTATION; warnInvocations = []; - console.warn = function() { + console.warn = function () { warnInvocations.push.apply(warnInvocations, Array.prototype.slice.call(arguments)); }; }); - afterEach(function() { + afterEach(function () { console.warn = originalWarn; }); - it('is true and does not warn if BROCCOLI_VIZ=1', function() { + it('is true and does not warn if BROCCOLI_VIZ=1', function () { process.env.BROCCOLI_VIZ = '1'; expect(instrumentation.isVizEnabled()).to.eql(true); expect(warnInvocations).to.eql([]); }); - it('is true and warns at most once if BROCCOLI_VIZ is set but not 1', function() { + it('is true and warns at most once if BROCCOLI_VIZ is set but not 1', function () { process.env.BROCCOLI_VIZ = 'on'; expect(instrumentation.isVizEnabled()).to.eql(true); expect(instrumentation.isVizEnabled()).to.eql(true); expect(warnInvocations).to.eql(["Please set BROCCOLI_VIZ=1 to enable visual instrumentation, rather than 'on'"]); }); - it('is false if BROCCOLI_VIZ is unset', function() { + it('is false if BROCCOLI_VIZ is unset', function () { expect('BROCCOLI_VIZ' in process.env).to.eql(false); expect(instrumentation.isVizEnabled()).to.eql(false); expect(warnInvocations).to.eql([]); }); }); - describe('.isEnabled', function() { - beforeEach(function() { + describe('.isEnabled', function () { + beforeEach(function () { instrumentation = new Instrumentation({ ui: new MockUI(), }); @@ -261,41 +261,41 @@ describe('models/instrumentation.js', function() { delete process.env.EMBER_CLI_INSTRUMENTATION; }); - it('is true if BROCCOLI_VIZ=1', function() { + it('is true if BROCCOLI_VIZ=1', function () { process.env.BROCCOLI_VIZ = '1'; expect(instrumentation.isEnabled()).to.eql(true); }); - it('is true if EMBER_CLI_INSTRUMENTATION=1', function() { + it('is true if EMBER_CLI_INSTRUMENTATION=1', function () { process.env.EMBER_CLI_INSTRUMENTATION = '1'; expect(instrumentation.isEnabled()).to.eql(true); }); - it('is false if EMBER_CLI_INSTRUMENTATION != 1', function() { + it('is false if EMBER_CLI_INSTRUMENTATION != 1', function () { process.env.EMBER_CLI_INSTRUMENTATION = 'on'; expect(instrumentation.isEnabled()).to.eql(false); }); - it('is false if both BROCCOLI_VIZ and EMBER_CLI_INSTRUMENTATION are unset', function() { + it('is false if both BROCCOLI_VIZ and EMBER_CLI_INSTRUMENTATION are unset', function () { expect('BROCCOLI_VIZ' in process.env).to.eql(false); expect('EMBER_CLI_INSTRUMENTATION' in process.env).to.eql(false); expect(instrumentation.isEnabled()).to.eql(false); }); }); - describe('.start', function() { + describe('.start', function () { let project; let instrumentation; let heimdall; - beforeEach(function() { + beforeEach(function () { project = new MockProject(); instrumentation = project._instrumentation; instrumentation._heimdall = heimdall = new Heimdall(); process.env.EMBER_CLI_INSTRUMENTATION = '1'; }); - it('starts a new subtree for name', function() { + it('starts a new subtree for name', function () { let heimdallStart = td.replace(heimdall, 'start'); instrumentation.start('init'); @@ -343,7 +343,7 @@ describe('models/instrumentation.js', function() { ); }); - it('does not start a subtree if instrumentation is disabled', function() { + it('does not start a subtree if instrumentation is disabled', function () { process.env.EMBER_CLI_INSTRUMENTATION = 'no thanks'; let heimdallStart = td.replace(heimdall, 'start'); @@ -353,13 +353,13 @@ describe('models/instrumentation.js', function() { td.verify(heimdallStart(), { times: 0, ignoreExtraArgs: true }); }); - it('throws if name is unexpected', function() { + it('throws if name is unexpected', function () { expect(() => { instrumentation.start('a party!'); }).to.throw('No such instrumentation "a party!"'); }); - it('removes any prior instrumentation information to avoid leaks', function() { + it('removes any prior instrumentation information to avoid leaks', function () { function build() { instrumentation.start('build'); let a = heimdall.start('a'); @@ -391,13 +391,13 @@ describe('models/instrumentation.js', function() { }); }); - describe('.stopAndReport', function() { + describe('.stopAndReport', function () { let project; let instrumentation; let heimdall; let addon; - beforeEach(function() { + beforeEach(function () { project = new MockProject(); instrumentation = project._instrumentation; heimdall = instrumentation._heimdall = new Heimdall(); @@ -414,17 +414,17 @@ describe('models/instrumentation.js', function() { ]; }); - it('throws if name is unexpected', function() { + it('throws if name is unexpected', function () { expect(() => instrumentation.stopAndReport('the weather')).to.throw('No such instrumentation "the weather"'); }); - it('throws if name has not yet started', function() { + it('throws if name has not yet started', function () { expect(() => instrumentation.stopAndReport('init')).to.throw( 'Cannot stop instrumentation "init". It has not started.' ); }); - it('warns if heimdall stop throws (eg when unbalanced)', function() { + it('warns if heimdall stop throws (eg when unbalanced)', function () { instrumentation.start('init'); heimdall.start('a ruckus'); @@ -436,7 +436,7 @@ describe('models/instrumentation.js', function() { expect(() => instrumentation.stopAndReport('init')).to.not.throw(); }); - it('computes summary for name', function() { + it('computes summary for name', function () { let buildSummary = td.replace(instrumentation, '_buildSummary'); let initSummary = td.replace(instrumentation, '_initSummary'); let treeFor = td.replace(instrumentation, '_instrumentationTreeFor'); @@ -499,8 +499,8 @@ describe('models/instrumentation.js', function() { ); }); - describe('writes to disk', function() { - beforeEach(function() { + describe('writes to disk', function () { + beforeEach(function () { let buildSummary = td.replace(instrumentation, '_buildSummary'); let initSummary = td.replace(instrumentation, '_initSummary'); let treeFor = td.replace(instrumentation, '_instrumentationTreeFor'); @@ -526,7 +526,7 @@ describe('models/instrumentation.js', function() { process.env.EMBER_CLI_INSTRUMENTATION = '1'; }); - it('writes instrumentation info if viz is enabled', async function() { + it('writes instrumentation info if viz is enabled', async function () { process.env.BROCCOLI_VIZ = '1'; await mkTmpDirIn(tmproot); @@ -561,7 +561,7 @@ describe('models/instrumentation.js', function() { }); }); - it('does not write instrumentation info if viz is disabled', async function() { + it('does not write instrumentation info if viz is disabled', async function () { delete process.env.BROCCOLI_VIZ; await mkTmpDirIn(tmproot); @@ -585,13 +585,13 @@ describe('models/instrumentation.js', function() { }); }); - describe('addons', function() { + describe('addons', function () { let mockInitSummary; let mockInitTree; let mockBuildSummary; let mockBuildTree; - beforeEach(function() { + beforeEach(function () { let buildSummary = td.replace(instrumentation, '_buildSummary'); let initSummary = td.replace(instrumentation, '_initSummary'); let treeFor = td.replace(instrumentation, '_instrumentationTreeFor'); @@ -607,7 +607,7 @@ describe('models/instrumentation.js', function() { td.when(treeFor('build')).thenReturn(mockBuildTree); }); - it('invokes addons that have [INSTRUMENTATION] for init', function() { + it('invokes addons that have [INSTRUMENTATION] for init', function () { process.env.EMBER_CLI_INSTRUMENTATION = '1'; let hook = td.function(); @@ -619,7 +619,7 @@ describe('models/instrumentation.js', function() { td.verify(hook('init', { summary: mockInitSummary, tree: mockInitTree })); }); - it('invokes addons that have [INSTRUMENTATION] for build', function() { + it('invokes addons that have [INSTRUMENTATION] for build', function () { process.env.EMBER_CLI_INSTRUMENTATION = '1'; let hook = td.function(); @@ -631,7 +631,7 @@ describe('models/instrumentation.js', function() { td.verify(hook('build', { summary: mockBuildSummary, tree: mockBuildTree })); }); - it('does not invoke addons if instrumentation is disabled', function() { + it('does not invoke addons if instrumentation is disabled', function () { process.env.EMBER_CLI_INSTRUMENTATION = 'not right now thanks'; let hook = td.function(); @@ -645,7 +645,7 @@ describe('models/instrumentation.js', function() { }); }); - describe('._instrumenationTreeFor', function() { + describe('._instrumenationTreeFor', function () { function StatsSchema() { this.x = 0; this.y = 0; @@ -696,9 +696,9 @@ describe('models/instrumentation.js', function() { expect(Object.keys(json)).to.eql(['nodes']); expect(json.nodes.length).to.eql(8); - expect(json.nodes.map(x => x.id)).to.eql([1, 2, 3, 4, 5, 6, 7, 8]); + expect(json.nodes.map((x) => x.id)).to.eql([1, 2, 3, 4, 5, 6, 7, 8]); - expect(json.nodes.map(x => x.label)).to.eql([ + expect(json.nodes.map((x) => x.label)).to.eql([ { name, emberCLI: true }, { name: 'a' }, { name: 'b1', broccoliNode: true, broccoliCachedNode: false }, @@ -709,10 +709,10 @@ describe('models/instrumentation.js', function() { { name: 'c3' }, ]); - expect(json.nodes.map(x => x.children)).to.eql([[2], [3, 5], [4], [], [6, 8], [7], [], []]); + expect(json.nodes.map((x) => x.children)).to.eql([[2], [3, 5], [4], [], [6, 8], [7], [], []]); - let stats = json.nodes.map(x => x.stats); - stats.forEach(nodeStats => { + let stats = json.nodes.map((x) => x.stats); + stats.forEach((nodeStats) => { expect('own' in nodeStats).to.eql(true); expect('time' in nodeStats).to.eql(true); expect(nodeStats.time.self).to.be.within(0, 2000000); //2ms in nanoseconds @@ -726,15 +726,15 @@ describe('models/instrumentation.js', function() { } function assertTreeValidAPI(name, tree) { - let depthFirstNames = Array.from(tree.dfsIterator()).map(x => x.label.name); + let depthFirstNames = Array.from(tree.dfsIterator()).map((x) => x.label.name); expect(depthFirstNames, 'depth first name order').to.eql([name, 'a', 'b1', 'c1', 'b2', 'c2', 'd1', 'c3']); - let breadthFirstNames = Array.from(tree.bfsIterator()).map(x => x.label.name); + let breadthFirstNames = Array.from(tree.bfsIterator()).map((x) => x.label.name); expect(breadthFirstNames, 'breadth first name order').to.eql([name, 'a', 'b1', 'b2', 'c1', 'c2', 'c3', 'd1']); - let c2 = Array.from(tree.dfsIterator()).filter(x => x.label.name === 'c2')[0]; + let c2 = Array.from(tree.dfsIterator()).filter((x) => x.label.name === 'c2')[0]; - let ancestorNames = Array.from(c2.ancestorsIterator()).map(x => x.label.name); + let ancestorNames = Array.from(c2.ancestorsIterator()).map((x) => x.label.name); expect(ancestorNames).to.eql(['b2', 'a', name]); } @@ -743,24 +743,24 @@ describe('models/instrumentation.js', function() { assertTreeValidAPI(name, tree); } - it('produces a valid tree for init', function() { + it('produces a valid tree for init', function () { process.env.EMBER_CLI_INSTRUMENTATION = '1'; makeTree('init'); assertTreeValid('init', instrumentation._instrumentationTreeFor('init')); }); - it('produces a valid tree for build', function() { + it('produces a valid tree for build', function () { process.env.EMBER_CLI_INSTRUMENTATION = '1'; makeTree('build'); assertTreeValid('build', instrumentation._instrumentationTreeFor('build')); }); }); - describe('summaries', function() { + describe('summaries', function () { let instrTree; let instrumentation; - beforeEach(function() { + beforeEach(function () { instrumentation = new Instrumentation({ ui: new MockUI() }); let heimdall = new Heimdall(); @@ -779,8 +779,8 @@ describe('models/instrumentation.js', function() { process.env.EMBER_CLI_INSTRUMENTATION = '1'; }); - describe('._buildSummary', function() { - it('computes initial build sumamries', function() { + describe('._buildSummary', function () { + it('computes initial build sumamries', function () { let result = { directory: 'tmp/someplace', outputChanges: ['assets/foo.js', 'assets/foo.css'], @@ -806,7 +806,7 @@ describe('models/instrumentation.js', function() { expect(Object.keys(summary.platform)).to.eql(['name', ...Object.keys(hwinfo), 'collectionTime']); }); - it('computes rebuild summaries', function() { + it('computes rebuild summaries', function () { let result = { directory: 'tmp/someplace', outputChanges: ['assets/foo.js', 'assets/foo.css'], @@ -843,8 +843,8 @@ describe('models/instrumentation.js', function() { }); }); - describe('._initSummary', function() { - it('computes an init summary', function() { + describe('._initSummary', function () { + it('computes an init summary', function () { let summary = instrumentation._initSummary(instrTree); expect(Object.keys(summary)).to.eql(['totalTime', 'platform']); @@ -855,8 +855,8 @@ describe('models/instrumentation.js', function() { }); }); - describe('._commandSummary', function() { - it('computes a command summary', function() { + describe('._commandSummary', function () { + it('computes a command summary', function () { let summary = instrumentation._commandSummary(instrTree, 'build', ['--like', '--whatever']); expect(Object.keys(summary)).to.eql(['name', 'args', 'totalTime', 'platform']); @@ -869,8 +869,8 @@ describe('models/instrumentation.js', function() { }); }); - describe('._shutdownSummary', function() { - it('computes a shutdown summary', function() { + describe('._shutdownSummary', function () { + it('computes a shutdown summary', function () { let summary = instrumentation._shutdownSummary(instrTree); expect(Object.keys(summary)).to.eql(['totalTime', 'platform']); diff --git a/tests/unit/models/package-info-cache/node-module-list-test.js b/tests/unit/models/package-info-cache/node-module-list-test.js index 921d5c8cf1..72412b8940 100644 --- a/tests/unit/models/package-info-cache/node-module-list-test.js +++ b/tests/unit/models/package-info-cache/node-module-list-test.js @@ -3,14 +3,14 @@ const expect = require('chai').expect; const NodeModulesList = require('../../../../lib/models/package-info-cache/node-modules-list'); -describe('models/package-info-cache/node-modules-list-test', function() { - it('correctly constructs', function() { +describe('models/package-info-cache/node-modules-list-test', function () { + it('correctly constructs', function () { expect(new NodeModulesList()).to.be.ok; expect(new NodeModulesList('/some/path')).to.be.ok; }); - describe('.NULL', function() { - it('returns a singleton, deeply frozen NodeMoudlesList', function() { + describe('.NULL', function () { + it('returns a singleton, deeply frozen NodeMoudlesList', function () { expect(NodeModulesList.NULL).to.equal(NodeModulesList.NULL); expect(NodeModulesList.NULL).to.be.frozen; expect(NodeModulesList.NULL.entries).to.be.frozen; @@ -19,13 +19,13 @@ describe('models/package-info-cache/node-modules-list-test', function() { }); }); - describe('findPackage', function() { - it('works with no entries', function() { + describe('findPackage', function () { + it('works with no entries', function () { let list = new NodeModulesList(); expect(list.findPackage('omg')).to.eql(null); }); - it('supports basic entries (missing, present, scoped)', function() { + it('supports basic entries (missing, present, scoped)', function () { let list = new NodeModulesList(); let scoped = new NodeModulesList(); let omg = { name: 'omg' }; diff --git a/tests/unit/models/package-info-cache/package-info-cache-test.js b/tests/unit/models/package-info-cache/package-info-cache-test.js index 7218917e8a..3687a48fb0 100644 --- a/tests/unit/models/package-info-cache/package-info-cache-test.js +++ b/tests/unit/models/package-info-cache/package-info-cache-test.js @@ -9,17 +9,17 @@ const MockUI = require('console-ui/mock'); const MockCLI = require('../../../helpers/mock-cli'); const FixturifyProject = require('../../../helpers/fixturify-project'); -describe('models/package-info-cache/package-info-cache-test.js', function() { +describe('models/package-info-cache/package-info-cache-test.js', function () { let project, projectPath, packageJsonPath, packageContents, projectPackageInfo, resolvedFile, ui, cli, pic; this.timeout(20000); - beforeEach(function() { + beforeEach(function () { ui = new MockUI(); cli = new MockCLI({ ui }); }); - describe('lexicographically', function() { - it('works', function() { + describe('lexicographically', function () { + it('works', function () { expect( [ { name: 'c' }, @@ -50,23 +50,23 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { }); }); - describe('pushUnique', function() { - it('works (and does last write win)', function() { + describe('pushUnique', function () { + it('works (and does last write win)', function () { let a = { name: 'a' }; let b = { name: 'b' }; let c = { name: 'c' }; let result = []; - [a, a, a, b, a, c, a, c].forEach(entry => PackageInfo.pushUnique(result, entry)); + [a, a, a, b, a, c, a, c].forEach((entry) => PackageInfo.pushUnique(result, entry)); expect(result).to.eql([b, a, c]); }); }); - describe('packageInfo contents tests on valid project', function() { + describe('packageInfo contents tests on valid project', function () { let projectPath, packageJsonPath, packageContents, projectPackageInfo; - beforeEach(function() { + beforeEach(function () { projectPath = path.resolve(addonFixturePath, 'simple'); packageJsonPath = path.join(projectPath, 'package.json'); packageContents = require(packageJsonPath); @@ -76,23 +76,23 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { projectPackageInfo = pic.getEntry(projectPath); }); - it('finds project PackageInfo entry for project root', function() { + it('finds project PackageInfo entry for project root', function () { expect(projectPackageInfo).to.exist; }); - it('projectPackageInfo has a "pkg" field', function() { + it('projectPackageInfo has a "pkg" field', function () { expect(projectPackageInfo.pkg).to.exist; }); - it('shows projectPackageInfo is considered valid', function() { + it('shows projectPackageInfo is considered valid', function () { expect(projectPackageInfo.valid).to.be.true; }); - it('is a project, so it may have addons', function() { + it('is a project, so it may have addons', function () { expect(projectPackageInfo.mayHaveAddons).to.eql(true); }); - it('shows projectPackageInfo has cliInfo at ember-cli root dir', function() { + it('shows projectPackageInfo has cliInfo at ember-cli root dir', function () { expect(projectPackageInfo.cliInfo).to.exist; let cliRealPath = projectPackageInfo.cliInfo.realPath; @@ -100,7 +100,7 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { expect(cliRealPath).to.equal(emberCliRealPath); }); - it('shows projectPackageInfo has 1 error', function() { + it('shows projectPackageInfo has 1 error', function () { expect(projectPackageInfo.hasErrors()).to.be.true; let errorArray = projectPackageInfo.errors.getErrors(); @@ -109,14 +109,14 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { }); // TODO: the input to this test is polluted by other tests: https://github.com/ember-cli/ember-cli/issues/7981 - it.skip('shows projectPackageInfo error is "3 dependencies missing"', function() { + it.skip('shows projectPackageInfo error is "3 dependencies missing"', function () { let errorArray = projectPackageInfo.errors.getErrors(); let error = errorArray[0]; expect(error.type).to.equal('dependenciesMissing'); expect(error.data.length).to.equal(3); }); - it('shows projectPackageInfo has 1 dependencyPackage', function() { + it('shows projectPackageInfo has 1 dependencyPackage', function () { let dependencyPackages = projectPackageInfo.dependencyPackages; expect(dependencyPackages).to.exist; @@ -125,13 +125,13 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { }); // TODO: the input to this test is polluted by other tests: https://github.com/ember-cli/ember-cli/issues/7981 - it.skip('shows projectPackageInfo has 8 devDependencyPackages', function() { + it.skip('shows projectPackageInfo has 8 devDependencyPackages', function () { let devDependencyPackages = projectPackageInfo.devDependencyPackages; expect(devDependencyPackages).to.exist; expect(Object.keys(devDependencyPackages).length).to.equal(8); }); - it('shows projectPackageInfo.devDependencyPackages + missing dependencies = project.devDependencies', function() { + it('shows projectPackageInfo.devDependencyPackages + missing dependencies = project.devDependencies', function () { let devDependencyPackages = projectPackageInfo.devDependencyPackages; expect(devDependencyPackages).to.exist; let devDependencyPackageNames = Object.keys(devDependencyPackages); @@ -151,7 +151,7 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { expect(packageAndErrorNames).to.deep.equal(devDependencyNames); }); - it('shows projectPackageInfo has 1 in-repo addon named "ember-super-button"', function() { + it('shows projectPackageInfo has 1 in-repo addon named "ember-super-button"', function () { let inRepoAddons = projectPackageInfo.inRepoAddons; expect(inRepoAddons).to.exist; expect(inRepoAddons.length).to.equal(1); @@ -159,14 +159,14 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { expect(inRepoAddons[0].pkg.name).to.equal('ember-super-button'); }); - it('shows projectPackageInfo has 7 internal addon packages', function() { + it('shows projectPackageInfo has 7 internal addon packages', function () { let internalAddons = projectPackageInfo.internalAddons; expect(internalAddons).to.exist; expect(internalAddons.length).to.equal(7); }); // TODO: the input to this test is polluted by other tests: https://github.com/ember-cli/ember-cli/issues/7981 - it.skip('shows projectPackageInfo has 9 node-module entries', function() { + it.skip('shows projectPackageInfo has 9 node-module entries', function () { let nodeModules = projectPackageInfo.nodeModules; expect(nodeModules).to.exist; expect(nodeModules.entries).to.exist; @@ -174,17 +174,17 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { }); }); - describe('packageInfo', function() { - describe('project with invalid paths', function() { + describe('packageInfo', function () { + describe('project with invalid paths', function () { let project, fixturifyProject; - beforeEach(function() { + beforeEach(function () { // create a new ember-app - fixturifyProject = new FixturifyProject('simple-ember-app', '0.0.0', project => { + fixturifyProject = new FixturifyProject('simple-ember-app', '0.0.0', (project) => { project.addAddon('ember-resolver', '^5.0.1'); project.addAddon('ember-random-addon', 'latest'); project.addAddon('loader.js', 'latest'); project.addAddon('something-else', 'latest'); - project.addInRepoAddon('ember-super-button', 'latest', function(project) { + project.addInRepoAddon('ember-super-button', 'latest', function (project) { project.pkg['ember-addon'].paths = ['lib/herp-not-here']; }); project.addDevDependency('ember-cli', 'latest'); @@ -197,35 +197,35 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { project = fixturifyProject.buildProjectModel(Project); }); - afterEach(function() { + afterEach(function () { fixturifyProject.dispose(); delete process.env.EMBER_CLI_ERROR_ON_INVALID_ADDON; }); - it('shows a warning with invalid ember-addon#path', function() { + it('shows a warning with invalid ember-addon#path', function () { project.discoverAddons(); expect(project.cli.ui.output).to.include( `specifies an invalid, malformed or missing addon at relative path 'lib${path.sep}no-such-path'` ); }); - it('throws an error with flag on', function() { + it('throws an error with flag on', function () { process.env.EMBER_CLI_ERROR_ON_INVALID_ADDON = 'true'; expect(() => project.discoverAddons()).to.throw( /specifies an invalid, malformed or missing addon at relative path 'lib[\\/]no-such-path'/ ); }); }); - describe('valid project', function() { + describe('valid project', function () { let project, fixturifyProject; - before(function() { + before(function () { // create a new ember-app - fixturifyProject = new FixturifyProject('simple-ember-app', '0.0.0', project => { + fixturifyProject = new FixturifyProject('simple-ember-app', '0.0.0', (project) => { project.addAddon('ember-resolver', '^5.0.1'); - project.addAddon('ember-random-addon', 'latest', addon => { - addon.addAddon('other-nested-addon', 'latest', addon => { + project.addAddon('ember-random-addon', 'latest', (addon) => { + addon.addAddon('other-nested-addon', 'latest', (addon) => { addon.addAddon('ember-resolver', '*'); - addon.toJSON = function() { + addon.toJSON = function () { const json = Object.getPrototypeOf(this).toJSON.call(this); // here we introduce an empty folder in our node_modules. json[this.name].node_modules['ember-resolver'] = {}; @@ -250,11 +250,11 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { projectPackageInfo = pic.getEntry(path.join(fixturifyProject.root, 'simple-ember-app')); }); - after(function() { + after(function () { fixturifyProject.dispose(); }); - it('was able to find ember-resolver even if an empty directory was left', function() { + it('was able to find ember-resolver even if an empty directory was left', function () { const emberResolver = project.findAddonByName('ember-resolver'); const nestedEmberResolver = project.findAddonByName('ember-random-addon').addons[0].addons[0]; expect(emberResolver.name).to.eql('ember-resolver'); @@ -262,7 +262,7 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { expect(emberResolver.root).to.eql(nestedEmberResolver.root); }); - it('has dependencies who have their mayHaveAddons correctly set', function() { + it('has dependencies who have their mayHaveAddons correctly set', function () { expect(projectPackageInfo.devDependencyPackages['non-ember-thingy']).to.have.property('mayHaveAddons', false); expect(projectPackageInfo.devDependencyPackages['ember-cli']).to.have.property('mayHaveAddons', false); expect(projectPackageInfo.dependencyPackages['loader.js']).to.have.property('mayHaveAddons', true); @@ -271,18 +271,18 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { expect(projectPackageInfo.dependencyPackages['something-else']).to.have.property('mayHaveAddons', true); }); - it('validates projectPackageInfo', function() { + it('validates projectPackageInfo', function () { expect(projectPackageInfo).to.exist; expect(projectPackageInfo.pkg).to.exist; expect(projectPackageInfo.valid).to.be.true; }); - it('shows projectPackageInfo has 0 errors', function() { + it('shows projectPackageInfo has 0 errors', function () { expect(projectPackageInfo.hasErrors()).to.be.false; expect(projectPackageInfo.errors.getErrors()).to.have.property('length', 0); }); - it('shows projectPackageInfo has 1 dependencyPackage', function() { + it('shows projectPackageInfo has 1 dependencyPackage', function () { let dependencyPackages = projectPackageInfo.dependencyPackages; expect(dependencyPackages).to.exist; @@ -290,14 +290,14 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { expect(dependencyPackages['something-else']).to.exist; }); - it('shows projectPackageInfo has 82devDependencyPackages', function() { + it('shows projectPackageInfo has 82devDependencyPackages', function () { let devDependencyPackages = projectPackageInfo.devDependencyPackages; expect(devDependencyPackages).to.exist; expect(Object.keys(devDependencyPackages).length).to.equal(2); }); - it('shows projectPackageInfo has 1 in-repo addon named "ember-super-button"', function() { + it('shows projectPackageInfo has 1 in-repo addon named "ember-super-button"', function () { let inRepoAddons = projectPackageInfo.inRepoAddons; expect(inRepoAddons).to.exist; @@ -306,14 +306,14 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { expect(inRepoAddons[0].pkg.name).to.equal('ember-super-button'); }); - it('shows projectPackageInfo has 7 internal addon packages', function() { + it('shows projectPackageInfo has 7 internal addon packages', function () { let internalAddons = projectPackageInfo.internalAddons; expect(internalAddons).to.exist; expect(internalAddons.length).to.equal(7); }); - it('shows projectPackageInfo has 7 node-module entries', function() { + it('shows projectPackageInfo has 7 node-module entries', function () { let nodeModules = projectPackageInfo.nodeModules; expect(nodeModules).to.exist; @@ -323,8 +323,8 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { }); }); - describe('packageInfo contents tests on missing project', function() { - beforeEach(function() { + describe('packageInfo contents tests on missing project', function () { + beforeEach(function () { projectPath = path.resolve(addonFixturePath, 'fakepackage'); let deps = { @@ -347,27 +347,27 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { projectPackageInfo = pic.getEntry(projectPath); }); - it('creates a packageInfo object for the missing path', function() { + it('creates a packageInfo object for the missing path', function () { expect(projectPackageInfo).to.exist; }); - it('has 3 errors', function() { + it('has 3 errors', function () { let errors = projectPackageInfo.errors; expect(errors).to.exist; expect(errors.hasErrors()).to.be.true; expect(errors.getErrors().length).to.equal(3); }); - it('has a "packageDirectoryMissing" error', function() { + it('has a "packageDirectoryMissing" error', function () { let errorArray = projectPackageInfo.errors.getErrors(); - let pkgDirMissingErr = errorArray.find(function(err) { + let pkgDirMissingErr = errorArray.find(function (err) { return err.type === 'packageDirectoryMissing'; }); expect(pkgDirMissingErr).to.exist; expect(pkgDirMissingErr.data).to.equal(projectPath); }); - it('has empty "dependencyPackages" and "devDependencyPackages" objects', function() { + it('has empty "dependencyPackages" and "devDependencyPackages" objects', function () { expect(projectPackageInfo.dependencyPackages).to.exist; expect(projectPackageInfo.devDependencyPackages).to.exist; expect(Object.keys(projectPackageInfo.dependencyPackages).length).to.equal(0); @@ -375,8 +375,8 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { }); }); - describe('packageInfo contents tests on with-nested-addons project', function() { - beforeEach(function() { + describe('packageInfo contents tests on with-nested-addons project', function () { + beforeEach(function () { projectPath = path.resolve(addonFixturePath, 'with-nested-addons'); packageJsonPath = path.join(projectPath, 'package.json'); packageContents = null; // there is no actual package.json @@ -386,9 +386,9 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { projectPackageInfo = pic.getEntry(projectPath); }); - it('shows projectPackageInfo has a "packageJsonMissing" error', function() { + it('shows projectPackageInfo has a "packageJsonMissing" error', function () { let errorArray = projectPackageInfo.errors.getErrors(); - let pkgJsonMissingErr = errorArray.find(function(err) { + let pkgJsonMissingErr = errorArray.find(function (err) { return err.type === 'packageJsonMissing'; }); expect(pkgJsonMissingErr).to.exist; @@ -396,8 +396,8 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { }); }); - describe('packageInfo contents tests on external-dependency project', function() { - beforeEach(function() { + describe('packageInfo contents tests on external-dependency project', function () { + beforeEach(function () { projectPath = path.resolve(addonFixturePath, 'external-dependency'); packageJsonPath = path.join(projectPath, 'package.json'); packageContents = require(packageJsonPath); @@ -407,7 +407,7 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { projectPackageInfo = pic.getEntry(projectPath); }); - it('shows projectPackageInfo finds a dependency above project root', function() { + it('shows projectPackageInfo finds a dependency above project root', function () { expect(projectPackageInfo.dependencyPackages).to.exist; let emberCliStringUtilsPkgInfo = projectPackageInfo.dependencyPackages['ember-cli-string-utils']; @@ -419,7 +419,7 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { ); }); - it('shows projectPackageInfo finds an external dependency involving a scope', function() { + it('shows projectPackageInfo finds an external dependency involving a scope', function () { expect(projectPackageInfo.dependencyPackages).to.exist; let restPkgInfo = projectPackageInfo.dependencyPackages['@octokit/rest']; @@ -430,18 +430,18 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { }); }); - describe('discoverProjectAddons', function() { + describe('discoverProjectAddons', function () { let fixturifyProject; - afterEach(function() { + afterEach(function () { if (fixturifyProject) { fixturifyProject.dispose(); } }); - describe('within an addon', function() { - beforeEach(function() { - fixturifyProject = new FixturifyProject('external-dependency', '0.0.0', project => { + describe('within an addon', function () { + beforeEach(function () { + fixturifyProject = new FixturifyProject('external-dependency', '0.0.0', (project) => { project.addDevDependency('ember-cli-string-utils', 'latest'); project.addDevDependency('@octokit/rest', 'latest'); project.addAddon('ember-cli-blueprint-test-helpers', 'latest'); @@ -461,7 +461,7 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { }); }); - it('lock down dependency orderings', function() { + it('lock down dependency orderings', function () { let project = fixturifyProject.buildProjectModel(); project.discoverAddons(); @@ -489,10 +489,10 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { }); }); - describe('tests for projectPackageInfo.addonMainPath', function() { + describe('tests for projectPackageInfo.addonMainPath', function () { let origPackageContents; - beforeEach(function() { + beforeEach(function () { projectPath = path.resolve(addonFixturePath, 'external-dependency'); packageJsonPath = path.join(projectPath, 'package.json'); // Because we allow the tests to modify packageContents, and the original @@ -507,7 +507,7 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { packageContents = JSON.parse(JSON.stringify(origPackageContents)); }); - it('adds .js if not present', function() { + it('adds .js if not present', function () { packageContents['ember-addon']['main'] = 'index'; project = new Project(projectPath, packageContents, ui, cli); @@ -517,7 +517,7 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { expect(resolvedFile).to.equal('index.js'); }); - it("doesn't add .js if it is .js", function() { + it("doesn't add .js if it is .js", function () { packageContents['ember-addon']['main'] = 'index.js'; project = new Project(projectPath, packageContents, ui, cli); @@ -527,7 +527,7 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { expect(resolvedFile).to.equal('index.js'); }); - it("doesn't add .js if it has another extension", function() { + it("doesn't add .js if it has another extension", function () { packageContents['ember-addon']['main'] = 'index.coffee'; project = new Project(projectPath, packageContents, ui, cli); @@ -537,7 +537,7 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { expect(resolvedFile).to.equal('index.coffee'); }); - it('allows lookup of existing non-`index.js` `main` entry points', function() { + it('allows lookup of existing non-`index.js` `main` entry points', function () { delete packageContents['ember-addon']; packageContents['main'] = 'some/other/path.js'; @@ -548,7 +548,7 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { expect(resolvedFile).to.equal(path.join(projectPath, 'some/other/path.js')); }); - it('fails invalid other `main` entry points', function() { + it('fails invalid other `main` entry points', function () { delete packageContents['ember-addon']; packageContents['main'] = 'some/other/non-existent-file.js'; @@ -561,7 +561,7 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { expect(error.type).to.equal('emberAddonMainMissing'); }); - it('falls back to `index.js` if `main` and `ember-addon` are not found', function() { + it('falls back to `index.js` if `main` and `ember-addon` are not found', function () { delete packageContents['ember-addon']; project = new Project(projectPath, packageContents, ui, cli); @@ -571,7 +571,7 @@ describe('models/package-info-cache/package-info-cache-test.js', function() { expect(resolvedFile).to.equal(path.join(projectPath, 'index.js')); }); - it('falls back to `index.js` if `main` and `ember-addon.main` are not found', function() { + it('falls back to `index.js` if `main` and `ember-addon.main` are not found', function () { delete packageContents['ember-addon'].main; project = new Project(projectPath, packageContents, ui, cli); diff --git a/tests/unit/models/project-test.js b/tests/unit/models/project-test.js index ce442f1f85..2e58930915 100644 --- a/tests/unit/models/project-test.js +++ b/tests/unit/models/project-test.js @@ -11,7 +11,7 @@ const emberCLIVersion = require('../../../lib/utilities/version-utils').emberCLI const td = require('testdouble'); const MockCLI = require('../../helpers/mock-cli'); -describe('models/project.js', function() { +describe('models/project.js', function () { let project, projectPath, packageContents; function makeProject() { @@ -19,24 +19,24 @@ describe('models/project.js', function() { project = new Project(projectPath, packageContents, cli.ui, cli); } - beforeEach(function() { + beforeEach(function () { packageContents = {}; }); - afterEach(function() { + afterEach(function () { if (project) { project = null; } }); - describe('constructor', function() { - it('sets up bidirectional instrumentation', function() { + describe('constructor', function () { + it('sets up bidirectional instrumentation', function () { let cli = new MockCLI(); expect(cli.instrumentation.project).to.equal(null); projectPath = 'tmp/test-app'; - return tmp.setup(projectPath).then(function() { + return tmp.setup(projectPath).then(function () { touch(`${projectPath}/config/environment.js`, { baseURL: '/foo/bar', }); @@ -48,13 +48,13 @@ describe('models/project.js', function() { }); }); - describe('Project.prototype.config', function() { + describe('Project.prototype.config', function () { let called; projectPath = 'tmp/test-app'; - beforeEach(function() { + beforeEach(function () { called = false; - return tmp.setup(projectPath).then(function() { + return tmp.setup(projectPath).then(function () { touch(`${projectPath}/config/environment.js`, { baseURL: '/foo/bar', }); @@ -69,24 +69,24 @@ describe('models/project.js', function() { makeProject(); - project.require = function() { + project.require = function () { called = true; - return function() {}; + return function () {}; }; }); }); - afterEach(function() { + afterEach(function () { called = null; return tmp.teardown(projectPath); }); - it('config() finds and requires config/environment', function() { + it('config() finds and requires config/environment', function () { project.config('development'); expect(called).to.equal(true); }); - it('config() with no args returns the config corresponding to the current EMBER_ENV', function() { + it('config() with no args returns the config corresponding to the current EMBER_ENV', function () { process.env.EMBER_ENV = 'testing'; project.config(); @@ -99,8 +99,8 @@ describe('models/project.js', function() { expect(configCacheKey).to.match(/testing/i); }); - describe('memoizes', function() { - it('memoizes', function() { + describe('memoizes', function () { + it('memoizes', function () { project.config('development'); expect(called).to.equal(true); called = false; @@ -108,8 +108,8 @@ describe('models/project.js', function() { expect(called).to.equal(false); }); - it('considers configPath when memoizing', function() { - project.configPath = function() { + it('considers configPath when memoizing', function () { + project.configPath = function () { return `${projectPath}/config/a`; }; project.config('development'); @@ -117,7 +117,7 @@ describe('models/project.js', function() { expect(called).to.equal(true); called = false; - project.configPath = function() { + project.configPath = function () { return `${projectPath}/config/a`; }; project.config('development'); @@ -125,7 +125,7 @@ describe('models/project.js', function() { expect(called).to.equal(false); called = false; - project.configPath = function() { + project.configPath = function () { return `${projectPath}/config/b`; }; project.config('development'); @@ -140,7 +140,7 @@ describe('models/project.js', function() { }); }); - it('configPath() returns tests/dummy/config/environment', function() { + it('configPath() returns tests/dummy/config/environment', function () { project.pkg = { 'ember-addon': { configPath: 'tests/dummy/config', @@ -152,10 +152,10 @@ describe('models/project.js', function() { expect(project.configPath().slice(-expected.length)).to.equal(expected); }); - it('calls getAddonsConfig', function() { + it('calls getAddonsConfig', function () { let addonConfigCalled = false; - project.getAddonsConfig = function() { + project.getAddonsConfig = function () { addonConfigCalled = true; return {}; @@ -165,12 +165,12 @@ describe('models/project.js', function() { expect(addonConfigCalled).to.equal(true); }); - it('returns getAddonsConfig result when configPath is not present', function() { + it('returns getAddonsConfig result when configPath is not present', function () { let expected = { foo: 'bar', }; - project.getAddonsConfig = function() { + project.getAddonsConfig = function () { return expected; }; @@ -178,10 +178,10 @@ describe('models/project.js', function() { expect(actual).to.deep.equal(expected); }); - describe('merges getAddonsConfig result with app config', function() { + describe('merges getAddonsConfig result with app config', function () { let projectConfig, addon1Config, addon2Config; - beforeEach(function() { + beforeEach(function () { addon1Config = { addon: { derp: 'herp' } }; addon2Config = { addon: { blammo: 'blahzorz' } }; @@ -201,14 +201,14 @@ describe('models/project.js', function() { project._addonsInitialized = true; - project.require = function() { - return function() { + project.require = function () { + return function () { return projectConfig; }; }; }); - it('merges getAddonsConfig result with app config', function() { + it('merges getAddonsConfig result with app config', function () { let expected = { foo: 'bar', baz: 'qux', @@ -222,7 +222,7 @@ describe('models/project.js', function() { expect(actual).to.deep.equal(expected); }); - it('getAddonsConfig does NOT override project config', function() { + it('getAddonsConfig does NOT override project config', function () { let expected = { foo: 'bar', baz: 'qux', @@ -240,18 +240,18 @@ describe('models/project.js', function() { }); }); - describe('Project.prototype.targets', function() { - beforeEach(function() { + describe('Project.prototype.targets', function () { + beforeEach(function () { projectPath = 'tmp/test-app'; }); - afterEach(function() { + afterEach(function () { return tmp.teardown(projectPath); }); - describe('when the is a `/config/targets.js` file', function() { - beforeEach(function() { - return tmp.setup(projectPath).then(function() { + describe('when the is a `/config/targets.js` file', function () { + beforeEach(function () { + return tmp.setup(projectPath).then(function () { let targetsPath = path.join(projectPath, 'config', 'targets.js'); fs.createFileSync(targetsPath); fs.writeFileSync(targetsPath, 'module.exports = { browsers: ["last 2 versions", "safari >= 7"] };', { @@ -260,27 +260,27 @@ describe('models/project.js', function() { makeProject(); - project.require = function() { + project.require = function () { return { browsers: ['last 2 versions', 'safari >= 7'] }; }; }); }); - it('returns the object defined in `/config/targets` if present', function() { + it('returns the object defined in `/config/targets` if present', function () { expect(project.targets).to.deep.equal({ browsers: ['last 2 versions', 'safari >= 7'], }); }); }); - describe("when there isn't a `/config/targets.js` file", function() { - beforeEach(function() { - return tmp.setup(projectPath).then(function() { + describe("when there isn't a `/config/targets.js` file", function () { + beforeEach(function () { + return tmp.setup(projectPath).then(function () { makeProject(); }); }); - it('returns the default targets', function() { + it('returns the default targets', function () { expect(project.targets).to.deep.equal({ browsers: ['ie 11', 'last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'], }); @@ -288,8 +288,8 @@ describe('models/project.js', function() { }); }); - describe('addons', function() { - beforeEach(function() { + describe('addons', function () { + beforeEach(function () { projectPath = path.resolve(__dirname, '../../fixtures/addon/simple'); packageContents = require(path.join(projectPath, 'package.json')); @@ -298,7 +298,7 @@ describe('models/project.js', function() { project.initializeAddons(); }); - it("returns a listing of all dependencies in the project's package.json", function() { + it("returns a listing of all dependencies in the project's package.json", function () { let expected = { 'ember-cli': 'latest', 'ember-random-addon': 'latest', @@ -317,7 +317,7 @@ describe('models/project.js', function() { expect(project.dependencies()).to.deep.equal(expected); }); - it("returns a listing of all dependencies in the project's bower.json", function() { + it("returns a listing of all dependencies in the project's bower.json", function () { let expected = { jquery: '^1.11.1', ember: '1.7.0', @@ -330,7 +330,7 @@ describe('models/project.js', function() { expect(project.bowerDependencies()).to.deep.equal(expected); }); - it('returns a listing of all ember-cli-addons directly depended on by the project', function() { + it('returns a listing of all ember-cli-addons directly depended on by the project', function () { let expected = [ 'amd-transform', 'broccoli-serve-files', @@ -351,7 +351,7 @@ describe('models/project.js', function() { expect(Object.keys(project.addonPackages)).to.deep.equal(expected); }); - it('returns instances of the addons', function() { + it('returns instances of the addons', function () { let addons = project.addons; expect(addons[8].name).to.equal('ember-before-blueprint-addon'); @@ -360,25 +360,25 @@ describe('models/project.js', function() { expect(addons[14].addons[1].name).to.equal('ember-ng'); }); - it('addons get passed the project instance', function() { + it('addons get passed the project instance', function () { let addons = project.addons; expect(addons[1].project).to.equal(project); }); - it('returns an instance of an addon that uses `ember-addon-main`', function() { + it('returns an instance of an addon that uses `ember-addon-main`', function () { let addons = project.addons; expect(addons[10].name).to.equal('ember-random-addon'); }); - it('returns the default blueprints path', function() { + it('returns the default blueprints path', function () { let expected = project.root + path.normalize('/blueprints'); expect(project.localBlueprintLookupPath()).to.equal(expected); }); - it('returns a listing of all addon blueprints paths ordered by last loaded when called once', function() { + it('returns a listing of all addon blueprints paths ordered by last loaded when called once', function () { let loadedBlueprintPaths = [ project.root + path.normalize('/node_modules/ember-before-blueprint-addon/blueprints'), project.root + path.normalize('/node_modules/ember-random-addon/blueprints'), @@ -392,7 +392,7 @@ describe('models/project.js', function() { expect(first).to.deep.equal(expected); }); - it('returns a listing of all addon blueprints paths ordered by last loaded when called twice', function() { + it('returns a listing of all addon blueprints paths ordered by last loaded when called twice', function () { let loadedBlueprintPaths = [ project.root + path.normalize('/node_modules/ember-before-blueprint-addon/blueprints'), project.root + path.normalize('/node_modules/ember-random-addon/blueprints'), @@ -407,7 +407,7 @@ describe('models/project.js', function() { expect(second).to.deep.equal(expected); }); - it('returns a listing of all blueprints paths', function() { + it('returns a listing of all blueprints paths', function () { let expected = [ project.root + path.normalize('/blueprints'), project.root + path.normalize('/node_modules/ember-after-blueprint-addon/blueprints'), @@ -418,24 +418,24 @@ describe('models/project.js', function() { expect(project.blueprintLookupPaths()).to.deep.equal(expected); }); - it('does not include blueprint path relative to root if outside a project', function() { - project.isEmberCLIProject = function() { + it('does not include blueprint path relative to root if outside a project', function () { + project.isEmberCLIProject = function () { return false; }; expect(project.blueprintLookupPaths()).to.deep.equal(project.addonBlueprintLookupPaths()); }); - it('returns an instance of an addon with an object export', function() { + it('returns an instance of an addon with an object export', function () { let addons = project.addons; expect(addons[13] instanceof Addon).to.equal(true); expect(addons[13].name).to.equal('ember-generated-with-export-addon'); }); - it('adds the project itself if it is an addon', function() { + it('adds the project itself if it is an addon', function () { project.addonPackages = {}; - project.isEmberCLIAddon = function() { + project.isEmberCLIAddon = function () { return true; }; @@ -444,7 +444,7 @@ describe('models/project.js', function() { expect(project.addonPackages[project.name()]).to.exist; }); - it('should catch addon constructor errors', function() { + it('should catch addon constructor errors', function () { projectPath = path.resolve(__dirname, '../../fixtures/addon/invalid-constructor'); packageContents = require(path.join(projectPath, 'package.json')); @@ -460,8 +460,8 @@ describe('models/project.js', function() { }); }); - describe('reloadAddon', function() { - beforeEach(function() { + describe('reloadAddon', function () { + beforeEach(function () { projectPath = path.resolve(__dirname, '../../fixtures/addon/simple'); packageContents = require(path.join(projectPath, 'package.json')); @@ -475,26 +475,26 @@ describe('models/project.js', function() { project.reloadAddons(); }); - afterEach(function() { + afterEach(function () { td.reset(); }); - it('sets _addonsInitialized to false', function() { + it('sets _addonsInitialized to false', function () { expect(project._addonsInitialized).to.equal(false); }); - it('reloads the package', function() { + it('reloads the package', function () { td.verify(Project.prototype.reloadPkg(), { ignoreExtraArgs: true }); }); - it('initializes the addons', function() { + it('initializes the addons', function () { td.verify(Project.prototype.initializeAddons(), { ignoreExtraArgs: true }); }); }); - describe('reloadPkg', function() { + describe('reloadPkg', function () { let newProjectPath, oldPkg; - beforeEach(function() { + beforeEach(function () { projectPath = path.resolve(__dirname, '../../fixtures/addon/simple'); packageContents = require(path.join(projectPath, 'package.json')); @@ -508,57 +508,57 @@ describe('models/project.js', function() { project.root = newProjectPath; }); - it('reloads the package from disk', function() { + it('reloads the package from disk', function () { project.reloadPkg(); expect(oldPkg).to.not.deep.equal(project.pkg); }); }); - describe('emberCLIVersion', function() { - beforeEach(function() { + describe('emberCLIVersion', function () { + beforeEach(function () { projectPath = `${process.cwd()}/tmp/test-app`; makeProject(); }); - it('should return the same value as the utility function', function() { + it('should return the same value as the utility function', function () { expect(project.emberCLIVersion()).to.equal(emberCLIVersion()); }); }); - describe('isEmberCLIProject', function() { - beforeEach(function() { + describe('isEmberCLIProject', function () { + beforeEach(function () { projectPath = `${process.cwd()}/tmp/test-app`; makeProject(); }); - it('returns false when `ember-cli` is not a dependency', function() { + it('returns false when `ember-cli` is not a dependency', function () { expect(project.isEmberCLIProject()).to.equal(false); }); - it('returns true when `ember-cli` is a devDependency', function() { + it('returns true when `ember-cli` is a devDependency', function () { project.pkg.devDependencies = { 'ember-cli': '*' }; expect(project.isEmberCLIProject()).to.equal(true); }); - it('returns true when `ember-cli` is a dependency', function() { + it('returns true when `ember-cli` is a dependency', function () { project.pkg.dependencies = { 'ember-cli': '*' }; expect(project.isEmberCLIProject()).to.equal(true); }); }); - describe('isEmberCLIAddon', function() { - beforeEach(function() { + describe('isEmberCLIAddon', function () { + beforeEach(function () { projectPath = `${process.cwd()}/tmp/test-app`; makeProject(); project.initializeAddons(); }); - it('should return true if `ember-addon` is included in keywords', function() { + it('should return true if `ember-addon` is included in keywords', function () { project.pkg = { keywords: ['ember-addon'], }; @@ -566,7 +566,7 @@ describe('models/project.js', function() { expect(project.isEmberCLIAddon()).to.equal(true); }); - it('should return false if `ember-addon` is not included in keywords', function() { + it('should return false if `ember-addon` is not included in keywords', function () { project.pkg = { keywords: [], }; @@ -575,8 +575,8 @@ describe('models/project.js', function() { }); }); - describe('findAddonByName', function() { - beforeEach(function() { + describe('findAddonByName', function () { + beforeEach(function () { projectPath = `${process.cwd()}/tmp/test-app`; makeProject(); @@ -598,16 +598,16 @@ describe('models/project.js', function() { ]; }); - afterEach(function() { + afterEach(function () { td.reset(); }); - it('should call initialize addons', function() { + it('should call initialize addons', function () { project.findAddonByName('foo'); td.verify(project.initializeAddons(), { ignoreExtraArgs: true }); }); - it('generally should work and defer to findAddonByName utlity', function() { + it('generally should work and defer to findAddonByName utlity', function () { let addon; addon = project.findAddonByName('foo'); expect(addon.name).to.equal('foo', 'should have found the foo addon'); @@ -617,49 +617,49 @@ describe('models/project.js', function() { }); }); - describe('bowerDirectory', function() { - beforeEach(function() { + describe('bowerDirectory', function () { + beforeEach(function () { projectPath = path.resolve(__dirname, '../../fixtures/addon/simple'); makeProject(); }); - it('should be initialized in constructor', function() { + it('should be initialized in constructor', function () { expect(project.bowerDirectory).to.equal('bower_components'); }); - it('should be set to directory property in .bowerrc', function() { + it('should be set to directory property in .bowerrc', function () { projectPath = path.resolve(__dirname, '../../fixtures/bower-directory-tests/bowerrc-with-directory'); makeProject(); expect(project.bowerDirectory).to.equal('vendor'); }); - it('should default to ‘bower_components’ unless directory property is set in .bowerrc', function() { + it('should default to ‘bower_components’ unless directory property is set in .bowerrc', function () { projectPath = path.resolve(__dirname, '../../fixtures/bower-directory-tests/bowerrc-without-directory'); makeProject(); expect(project.bowerDirectory).to.equal('bower_components'); }); - it('should default to ‘bower_components’ if .bowerrc is not present', function() { + it('should default to ‘bower_components’ if .bowerrc is not present', function () { projectPath = path.resolve(__dirname, '../../fixtures/bower-directory-tests/no-bowerrc'); makeProject(); expect(project.bowerDirectory).to.equal('bower_components'); }); - it('should default to ‘bower_components’ if .bowerrc json is invalid', function() { + it('should default to ‘bower_components’ if .bowerrc json is invalid', function () { projectPath = path.resolve(__dirname, '../../fixtures/bower-directory-tests/invalid-bowerrc'); makeProject(); expect(project.bowerDirectory).to.equal('bower_components'); }); }); - describe('.nullProject', function() { - it('is a singleton', function() { + describe('.nullProject', function () { + it('is a singleton', function () { expect(Project.nullProject()).to.equal(Project.nullProject()); }); }); - describe('generateTestFile()', function() { - it('returns empty file and shows warning', function() { + describe('generateTestFile()', function () { + it('returns empty file and shows warning', function () { projectPath = path.resolve(__dirname, '../../fixtures/project'); makeProject(); diff --git a/tests/unit/models/server-watcher-test.js b/tests/unit/models/server-watcher-test.js index 4b247170f8..11b5ff88f4 100644 --- a/tests/unit/models/server-watcher-test.js +++ b/tests/unit/models/server-watcher-test.js @@ -7,12 +7,12 @@ const MockAnalytics = require('../../helpers/mock-analytics'); const MockServerWatcher = require('../../helpers/mock-watcher'); const ServerWatcher = require('../../../lib/models/server-watcher'); -describe('Server Watcher', function() { +describe('Server Watcher', function () { let ui; let analytics; let watcher; - beforeEach(function() { + beforeEach(function () { ui = new MockUI(); analytics = new MockAnalytics(); watcher = new MockServerWatcher(); @@ -24,44 +24,44 @@ describe('Server Watcher', function() { }); }); - describe('watcher:change', function() { - beforeEach(function() { + describe('watcher:change', function () { + beforeEach(function () { watcher.emit('change', 'foo.txt'); }); - it('logs that the file was changed', function() { + it('logs that the file was changed', function () { expect(ui.output).to.equal(`File changed: "foo.txt"${EOL}`); }); - it('does NOT tracks changes', function() { + it('does NOT tracks changes', function () { expect(analytics.tracks).to.deep.equal([]); }); }); - describe('watcher:add', function() { - beforeEach(function() { + describe('watcher:add', function () { + beforeEach(function () { watcher.emit('add', 'foo.txt'); }); - it('logs that the file was added', function() { + it('logs that the file was added', function () { expect(ui.output).to.equal(`File added: "foo.txt"${EOL}`); }); - it('does NOT track additions', function() { + it('does NOT track additions', function () { expect(analytics.tracks).to.deep.equal([]); }); }); - describe('watcher:delete', function() { - beforeEach(function() { + describe('watcher:delete', function () { + beforeEach(function () { watcher.emit('delete', 'foo.txt'); }); - it('logs that the file was deleted', function() { + it('logs that the file was deleted', function () { expect(ui.output).to.equal(`File deleted: "foo.txt"${EOL}`); }); - it('does NOT tracks deletions', function() { + it('does NOT tracks deletions', function () { expect(analytics.tracks).to.deep.equal([]); }); }); diff --git a/tests/unit/models/watcher-test.js b/tests/unit/models/watcher-test.js index 2b434fbd36..4f31df86af 100644 --- a/tests/unit/models/watcher-test.js +++ b/tests/unit/models/watcher-test.js @@ -10,7 +10,7 @@ const EOL = require('os').EOL; const chalk = require('chalk'); const BuildError = require('../../helpers/build-error'); -describe('Watcher', function() { +describe('Watcher', function () { let ui; let subject; let builder; @@ -35,7 +35,7 @@ describe('Watcher', function() { }, }; - beforeEach(function() { + beforeEach(function () { ui = new MockUI(); analytics = new MockAnalytics(); @@ -49,8 +49,8 @@ describe('Watcher', function() { }); }); - describe('watcher strategy selection', function() { - it('selects the events-based watcher by default', function() { + describe('watcher strategy selection', function () { + it('selects the events-based watcher by default', function () { subject.options = null; expect(subject.buildOptions()).to.deep.equal({ @@ -61,7 +61,7 @@ describe('Watcher', function() { }); }); - it('selects the events-based watcher when given events watcher option', function() { + it('selects the events-based watcher when given events watcher option', function () { subject.options = { watcher: 'events', }; @@ -74,7 +74,7 @@ describe('Watcher', function() { }); }); - it('selects the polling watcher when given polling watcher option', function() { + it('selects the polling watcher when given polling watcher option', function () { subject.options = { watcher: 'polling', }; @@ -88,27 +88,27 @@ describe('Watcher', function() { }); }); - describe('underlining watcher properly logs change events', function() { - it('logs that the file was added', function() { + describe('underlining watcher properly logs change events', function () { + it('logs that the file was added', function () { watcher.emit('change', 'add', 'foo.txt'); expect(ui.output).to.equal(`file added foo.txt${EOL}`); }); - it('logs that the file was changed', function() { + it('logs that the file was changed', function () { watcher.emit('change', 'change', 'foo.txt'); expect(ui.output).to.equal(`file changed foo.txt${EOL}`); }); - it('logs that the file was deleted', function() { + it('logs that the file was deleted', function () { watcher.emit('change', 'delete', 'foo.txt'); expect(ui.output).to.equal(`file deleted foo.txt${EOL}`); }); }); - describe(`watcher:buildSuccess`, function() { - beforeEach(function() { + describe(`watcher:buildSuccess`, function () { + beforeEach(function () { watcher.emit(`buildSuccess`, mockResult); }); - it('tracks events', function() { + it('tracks events', function () { expect(analytics.tracks).to.deep.equal([ { name: 'ember rebuild', @@ -117,7 +117,7 @@ describe('Watcher', function() { ]); }); - it('tracks timings', function() { + it('tracks timings', function () { expect(analytics.trackTimings).to.deep.equal([ { category: 'rebuild', @@ -128,15 +128,15 @@ describe('Watcher', function() { ]); }); - it('logs that the build was successful', function() { + it('logs that the build was successful', function () { expect(ui.output).to.equal(EOL + chalk.green('Build successful (12344ms)') + EOL); }); }); - describe('output', function() { + describe('output', function () { this.timeout(40000); - it('with ssl', function() { + it('with ssl', function () { let subject = new Watcher({ ui, analytics, @@ -166,7 +166,7 @@ describe('Watcher', function() { expect(output[0]).to.equal(`${chalk.green('Build successful (12344ms)')} – Serving on https://localhost:1337/`); }); - it('with baseURL', function() { + it('with baseURL', function () { let subject = new Watcher({ ui, analytics, @@ -196,7 +196,7 @@ describe('Watcher', function() { expect(output.length).to.equal(1, 'expected only one line of output'); }); - it('with rootURL', function() { + it('with rootURL', function () { let subject = new Watcher({ ui, analytics, @@ -227,7 +227,7 @@ describe('Watcher', function() { expect(output.length).to.equal(1, 'expected only one line of output'); }); - it('with empty rootURL', function() { + it('with empty rootURL', function () { let subject = new Watcher({ ui, analytics, @@ -256,7 +256,7 @@ describe('Watcher', function() { expect(output.length).to.equal(1, 'expected only one line of output'); }); - it('with customURL', function() { + it('with customURL', function () { let subject = new Watcher({ ui, analytics, @@ -277,7 +277,7 @@ describe('Watcher', function() { }, }, }); - subject.serveURL = function() { + subject.serveURL = function () { return `http://customurl.com/`; }; subject.didChange(mockResult); @@ -287,8 +287,8 @@ describe('Watcher', function() { }); }); - describe('watcher:error', function() { - it('tracks errors', function() { + describe('watcher:error', function () { + it('tracks errors', function () { watcher.emit('error', { message: 'foo', stack: new Error().stack, @@ -301,7 +301,7 @@ describe('Watcher', function() { ]); }); - it('watcher error', function() { + it('watcher error', function () { watcher.emit('error', { message: 'foo', stack: new Error().stack, @@ -314,7 +314,7 @@ describe('Watcher', function() { expect(outs[0]).to.equal(chalk.red('foo')); }); - it('watcher buildFailure', function() { + it('watcher buildFailure', function () { watcher.emit('buildFailure', { isBuilderError: true, message: 'I am a build error', @@ -330,7 +330,7 @@ describe('Watcher', function() { expect(outs[2]).to.equal(chalk.red('I am a build error')); }); - it('emits without error.file', function() { + it('emits without error.file', function () { subject.didError( new BuildError({ file: 'someFile', @@ -346,7 +346,7 @@ describe('Watcher', function() { expect(outs[2]).to.equal(chalk.red('buildFailed')); }); - it('emits with error.file with error.line without err.col', function() { + it('emits with error.file with error.line without err.col', function () { subject.didError( new BuildError({ file: 'someFile', @@ -363,7 +363,7 @@ describe('Watcher', function() { expect(outs[2]).to.equal(chalk.red('buildFailed')); }); - it('emits with error.file without error.line with err.col', function() { + it('emits with error.file without error.line with err.col', function () { subject.didError( new BuildError({ file: 'someFile', @@ -380,7 +380,7 @@ describe('Watcher', function() { expect(outs[2]).to.equal(chalk.red('buildFailed')); }); - it('emits with error.file with error.line with err.col', function() { + it('emits with error.file with error.line with err.col', function () { subject.didError( new BuildError({ file: 'someFile', @@ -399,8 +399,8 @@ describe('Watcher', function() { }); }); - describe('watcher:change afterError', function() { - beforeEach(function() { + describe('watcher:change afterError', function () { + beforeEach(function () { watcher.emit('error', { message: 'foo', stack: new Error().stack, @@ -409,11 +409,11 @@ describe('Watcher', function() { watcher.emit(`buildSuccess`, mockResult); }); - it('log that the build was green', function() { + it('log that the build was green', function () { expect(ui.output).to.match(/Build successful./, 'has successful build output'); }); - it('keep tracking analytics', function() { + it('keep tracking analytics', function () { expect(analytics.tracks).to.deep.equal([ { name: 'ember rebuild', diff --git a/tests/unit/package/dependency-version-test.js b/tests/unit/package/dependency-version-test.js index 3e052b6815..0a92f422a4 100644 --- a/tests/unit/package/dependency-version-test.js +++ b/tests/unit/package/dependency-version-test.js @@ -2,15 +2,15 @@ const assertVersionLock = require('../../helpers/assert-version-lock'); -describe('dependencies', function() { +describe('dependencies', function () { let pkg; - describe('in package.json', function() { - before(function() { + describe('in package.json', function () { + before(function () { pkg = require('../../../package.json'); }); - it('are locked down for pre-1.0 versions', function() { + it('are locked down for pre-1.0 versions', function () { assertVersionLock(pkg.dependencies); assertVersionLock(pkg.devDependencies); }); diff --git a/tests/unit/settings-file/leek-options-test.js b/tests/unit/settings-file/leek-options-test.js index 52cc0b33db..7876de3a14 100644 --- a/tests/unit/settings-file/leek-options-test.js +++ b/tests/unit/settings-file/leek-options-test.js @@ -9,10 +9,10 @@ const broccoliTestHelper = require('broccoli-test-helper'); const buildOutput = broccoliTestHelper.buildOutput; const createTempDir = broccoliTestHelper.createTempDir; -describe('.ember-cli leek options', function() { +describe('.ember-cli leek options', function () { let passedOptions, leekConfigFolder; - before(async function() { + before(async function () { leekConfigFolder = await createTempDir(); leekConfigFolder.write({ @@ -36,7 +36,7 @@ describe('.ember-cli leek options', function() { primary: primaryPath, }); - let mockedLeek = function(options) { + let mockedLeek = function (options) { passedOptions = options; }; @@ -47,11 +47,11 @@ describe('.ember-cli leek options', function() { }); }); - after(async function() { + after(async function () { await leekConfigFolder.dispose(); }); - it('should contain the leek options from .ember-cli file', function() { + it('should contain the leek options from .ember-cli file', function () { expect(passedOptions.adapterUrls).to.contain.keys(['event', 'exception', 'timing', 'appview']); }); }); diff --git a/tests/unit/settings-file/precedence-settings-test.js b/tests/unit/settings-file/precedence-settings-test.js index 31793bd99d..6e47537b64 100644 --- a/tests/unit/settings-file/precedence-settings-test.js +++ b/tests/unit/settings-file/precedence-settings-test.js @@ -7,14 +7,14 @@ const MockAnalytics = require('../../helpers/mock-analytics'); const Command = require('../../../lib/models/command'); const Yam = require('yam'); -describe('.ember-cli', function() { +describe('.ember-cli', function () { let ui; let analytics; let project; let settings; let homeSettings; - before(function() { + before(function () { ui = new MockUI(); analytics = new MockAnalytics(); project = { @@ -36,7 +36,7 @@ describe('.ember-cli', function() { }).getAll(); }); - it('local settings take precedence over global settings', function() { + it('local settings take precedence over global settings', function () { let command = new Command({ ui, analytics, diff --git a/tests/unit/tasks/addon-install-test.js b/tests/unit/tasks/addon-install-test.js index 66eed5d73e..4ee1b71fc7 100644 --- a/tests/unit/tasks/addon-install-test.js +++ b/tests/unit/tasks/addon-install-test.js @@ -5,25 +5,25 @@ const expect = require('chai').expect; const CoreObject = require('core-object'); const MockUi = require('console-ui/mock'); -describe('addon install task', function() { +describe('addon install task', function () { let ui; let project; - beforeEach(function() { + beforeEach(function () { ui = new MockUi(); project = { reloadAddons() {}, }; }); - afterEach(function() { + afterEach(function () { // ui.stopProgress(); ui = undefined; project = undefined; }); - describe('when no save flag specified in blueprintOptions', function() { - it('calls npm install with --save-dev as a default', function(done) { + describe('when no save flag specified in blueprintOptions', function () { + it('calls npm install with --save-dev as a default', function (done) { let MockNpmInstallTask = CoreObject.extend({ run(options) { expect(options.save).to.not.be.true; @@ -43,8 +43,8 @@ describe('addon install task', function() { }); }); - describe('when save flag specified in blueprintOptions', function() { - it('calls npm install with --save', function(done) { + describe('when save flag specified in blueprintOptions', function () { + it('calls npm install with --save', function (done) { let MockNpmInstallTask = CoreObject.extend({ run(options) { expect(options.save).to.be.true; @@ -68,8 +68,8 @@ describe('addon install task', function() { }); }); - describe('when saveDev flag specified in blueprintOptions', function() { - it('calls npm install with --save-dev', function(done) { + describe('when saveDev flag specified in blueprintOptions', function () { + it('calls npm install with --save-dev', function (done) { let MockNpmInstallTask = CoreObject.extend({ run(options) { expect(options.save).to.not.be.true; @@ -93,8 +93,8 @@ describe('addon install task', function() { }); }); - describe('when both save and saveDev flag specified in blueprintOptions', function() { - it('calls npm install with --save', function(done) { + describe('when both save and saveDev flag specified in blueprintOptions', function () { + it('calls npm install with --save', function (done) { let MockNpmInstallTask = CoreObject.extend({ run(options) { expect(options.save).to.be.true; diff --git a/tests/unit/tasks/bower-install-test.js b/tests/unit/tasks/bower-install-test.js index 6045016679..926dcc3ad0 100644 --- a/tests/unit/tasks/bower-install-test.js +++ b/tests/unit/tasks/bower-install-test.js @@ -5,22 +5,22 @@ const MockUI = require('console-ui/mock'); const expect = require('../../chai').expect; const td = require('testdouble'); -describe('BowerInstallTask', function() { +describe('BowerInstallTask', function () { let task, ui; - beforeEach(function() { + beforeEach(function () { ui = new MockUI(); task = new BowerInstallTask({ ui }); }); - describe('ensureBower()', function() { - beforeEach(function() { + describe('ensureBower()', function () { + beforeEach(function () { task.resolveBower = td.function(); task.importBower = td.function(); task.installBower = td.function(); }); - it('resolves if "bower" property is set', async function() { + it('resolves if "bower" property is set', async function () { let mockValue = 'foobar'; task.bower = mockValue; @@ -30,14 +30,14 @@ describe('BowerInstallTask', function() { expect(task.bower).to.equal(mockValue); }); - it('imports "bower" if it can be resolved', async function() { + it('imports "bower" if it can be resolved', async function () { td.when(task.resolveBower()).thenResolve('path/to/bower'); td.when(task.importBower('path/to/bower')).thenReturn('ok'); expect(await task.ensureBower()).to.equal('ok'); }); - it('install "bower" if it can not be resolved', async function() { + it('install "bower" if it can not be resolved', async function () { let error = new Error("Cannot find module 'bower'"); td.when(task.resolveBower()).thenReturn(Promise.reject(error), Promise.resolve('path/to/bower')); @@ -47,7 +47,7 @@ describe('BowerInstallTask', function() { expect(await task.ensureBower()).to.equal('ok'); }); - it('pass other resolve errors on', async function() { + it('pass other resolve errors on', async function () { let error = new Error('foobar'); td.when(task.resolveBower()).thenReturn(Promise.reject(error)); @@ -55,7 +55,7 @@ describe('BowerInstallTask', function() { await expect(task.ensureBower()).to.be.rejectedWith('foobar'); }); - it('pass install errors on', async function() { + it('pass install errors on', async function () { let error = new Error("Cannot find module 'bower'"); td.when(task.resolveBower()).thenReturn(Promise.reject(error)); diff --git a/tests/unit/tasks/build-watch-test.js b/tests/unit/tasks/build-watch-test.js index a9162943b9..111cfbeeaa 100644 --- a/tests/unit/tasks/build-watch-test.js +++ b/tests/unit/tasks/build-watch-test.js @@ -5,7 +5,7 @@ const Builder = require('../../../lib/models/builder'); const MockProject = require('../../helpers/mock-project'); const expect = require('chai').expect; -describe('build-watch task', function() { +describe('build-watch task', function () { let task, ui; function setupBroccoliBuilder() { @@ -58,8 +58,8 @@ describe('build-watch task', function() { return task.run(options); } - describe('onInterrupt', function() { - it('fulfills the run promise and cleans up the builder', async function() { + describe('onInterrupt', function () { + it('fulfills the run promise and cleans up the builder', async function () { let runPromise = runBuildWatchTask(); Promise.resolve().then(() => task.onInterrupt()); diff --git a/tests/unit/tasks/git-init-test.js b/tests/unit/tasks/git-init-test.js index 251634a968..be24e96fe0 100644 --- a/tests/unit/tasks/git-init-test.js +++ b/tests/unit/tasks/git-init-test.js @@ -11,10 +11,10 @@ const mkTmpDirIn = require('../../../lib/utilities/mk-tmp-dir-in'); let tmproot = path.join(root, 'tmp'); const td = require('testdouble'); -describe('git-init', function() { +describe('git-init', function () { let task; - beforeEach(async function() { + beforeEach(async function () { task = new GitInitTask({ ui: new MockUI(), project: new MockProject(), @@ -28,13 +28,13 @@ describe('git-init', function() { process.chdir(tmpdir); }); - afterEach(async function() { + afterEach(async function () { process.chdir(root); await fs.remove(tmproot); }); - describe('skipGit: true', function() { - it('does not initialize git', async function() { + describe('skipGit: true', function () { + it('does not initialize git', async function () { await task.run({ skipGit: true, }); @@ -43,7 +43,7 @@ describe('git-init', function() { }); }); - it('correctly initializes git if git is around, and more or less works', async function() { + it('correctly initializes git if git is around, and more or less works', async function () { td.when(task._gitVersion()).thenResolve(); td.when(task._gitInit()).thenResolve(); td.when(task._gitAdd()).thenResolve(); @@ -59,7 +59,7 @@ describe('git-init', function() { expect(task.ui.errors).to.equal(''); }); - it('skips initializing git, if `git --version` fails', async function() { + it('skips initializing git, if `git --version` fails', async function () { td.when(task._gitVersion()).thenReject(); await task.run(); @@ -71,7 +71,7 @@ describe('git-init', function() { expect(task.ui.errors).to.equal(''); }); - it('includes the HOME environment variable in the environment passed to git', function() { + it('includes the HOME environment variable in the environment passed to git', function () { let env = task.buildGitEnvironment(); expect(env.HOME).to.equal(process.env.HOME); }); diff --git a/tests/unit/tasks/npm-install-test.js b/tests/unit/tasks/npm-install-test.js index 52ea9573cb..b9c3ba8b6c 100644 --- a/tests/unit/tasks/npm-install-test.js +++ b/tests/unit/tasks/npm-install-test.js @@ -4,11 +4,11 @@ const NpmInstallTask = require('../../../lib/tasks/npm-install'); const MockUI = require('console-ui/mock'); const expect = require('chai').expect; -describe('npm install task', function() { +describe('npm install task', function () { let npmInstallTask; let ui; - beforeEach(function() { + beforeEach(function () { let project = { root: __dirname, }; @@ -20,12 +20,12 @@ describe('npm install task', function() { }); }); - afterEach(function() { + afterEach(function () { ui = undefined; npmInstallTask = undefined; }); - it('skips npm installs if there is no package.json', function() { + it('skips npm installs if there is no package.json', function () { return npmInstallTask.run({}).then(() => { expect(ui.output).to.include('Skipping npm install: package.json not found'); }); diff --git a/tests/unit/tasks/npm-task-test.js b/tests/unit/tasks/npm-task-test.js index b2bca390a5..08812185b5 100644 --- a/tests/unit/tasks/npm-task-test.js +++ b/tests/unit/tasks/npm-task-test.js @@ -6,17 +6,17 @@ const expect = require('../../chai').expect; const td = require('testdouble'); const SilentError = require('silent-error'); -describe('NpmTask', function() { - describe('checkNpmVersion', function() { +describe('NpmTask', function () { + describe('checkNpmVersion', function () { let task, ui; - beforeEach(function() { + beforeEach(function () { ui = new MockUI(); task = new NpmTask({ ui }); task.npm = td.function(); }); - it('resolves when a compatible version is found', function() { + it('resolves when a compatible version is found', function () { td.when(task.npm(['--version'])).thenResolve({ stdout: '5.2.1' }); return expect(task.checkNpmVersion()).to.be.fulfilled.then(() => { @@ -25,7 +25,7 @@ describe('NpmTask', function() { }); }); - it('resolves with warning when a newer version is found', function() { + it('resolves with warning when a newer version is found', function () { td.when(task.npm(['--version'])).thenResolve({ stdout: '7.0.0' }); return expect(task.checkNpmVersion()).to.be.fulfilled.then(() => { @@ -34,7 +34,7 @@ describe('NpmTask', function() { }); }); - it('rejects when an older version is found', function() { + it('rejects when an older version is found', function () { td.when(task.npm(['--version'])).thenResolve({ stdout: '2.9.9' }); return expect(task.checkNpmVersion()) @@ -45,7 +45,7 @@ describe('NpmTask', function() { }); }); - it('rejects when npm is not found', function() { + it('rejects when npm is not found', function () { let error = new Error('npm not found'); error.code = 'ENOENT'; @@ -59,7 +59,7 @@ describe('NpmTask', function() { }); }); - it('rejects when npm returns an unreadable version', function() { + it('rejects when npm returns an unreadable version', function () { td.when(task.npm(['--version'])).thenResolve({ stdout: '5' }); return expect(task.checkNpmVersion()) @@ -70,7 +70,7 @@ describe('NpmTask', function() { }); }); - it('rejects when an unknown error is thrown', function() { + it('rejects when an unknown error is thrown', function () { td.when(task.npm(['--version'])).thenReject(new Error('foobar?')); return expect(task.checkNpmVersion()) @@ -82,22 +82,22 @@ describe('NpmTask', function() { }); }); - describe('checkYarn', function() { + describe('checkYarn', function () { let task, ui, yarn; - beforeEach(function() { + beforeEach(function () { ui = new MockUI(); yarn = td.function(); task = new NpmTask({ ui, yarn }); }); - it('resolves when yarn is found', function() { + it('resolves when yarn is found', function () { td.when(yarn(['--version'])).thenResolve({ stdout: '0.22.1' }); return expect(task.checkYarn()).to.be.fulfilled; }); - it('rejects when yarn is not found', function() { + it('rejects when yarn is not found', function () { let error = new Error('yarn not found'); error.code = 'ENOENT'; @@ -106,38 +106,38 @@ describe('NpmTask', function() { return expect(task.checkYarn()).to.be.rejectedWith('yarn not found'); }); - it('rejects when an unknown error is thrown', function() { + it('rejects when an unknown error is thrown', function () { td.when(yarn(['--version'])).thenReject(new Error('foobar?')); return expect(task.checkYarn()).to.be.rejectedWith('foobar?'); }); }); - describe('findPackageManager', function() { + describe('findPackageManager', function () { let task; - beforeEach(function() { + beforeEach(function () { task = new NpmTask(); task.hasYarnLock = td.function(); task.checkYarn = td.function(); task.checkNpmVersion = td.function(); }); - it('resolves when no yarn.lock file was found and npm is compatible', function() { + it('resolves when no yarn.lock file was found and npm is compatible', function () { td.when(task.hasYarnLock()).thenReturn(false); td.when(task.checkNpmVersion()).thenResolve(); return expect(task.findPackageManager()).to.be.fulfilled; }); - it('resolves when no yarn.lock file was found and npm is incompatible', function() { + it('resolves when no yarn.lock file was found and npm is incompatible', function () { td.when(task.hasYarnLock()).thenReturn(false); td.when(task.checkNpmVersion()).thenReject(); return expect(task.findPackageManager()).to.be.rejected; }); - it('resolves when yarn.lock file and yarn were found and sets useYarn = true', function() { + it('resolves when yarn.lock file and yarn were found and sets useYarn = true', function () { td.when(task.hasYarnLock()).thenReturn(true); td.when(task.checkYarn()).thenResolve(); @@ -147,7 +147,7 @@ describe('NpmTask', function() { }); }); - it('resolves when yarn.lock file was found, yarn was not found and npm is compatible', function() { + it('resolves when yarn.lock file was found, yarn was not found and npm is compatible', function () { td.when(task.hasYarnLock()).thenReturn(true); td.when(task.checkYarn()).thenReject(); td.when(task.checkNpmVersion()).thenResolve(); @@ -158,7 +158,7 @@ describe('NpmTask', function() { }); }); - it('rejects when yarn.lock file was found, yarn was not found and npm is incompatible', function() { + it('rejects when yarn.lock file was found, yarn was not found and npm is incompatible', function () { td.when(task.hasYarnLock()).thenReturn(true); td.when(task.checkYarn()).thenReject(); td.when(task.checkNpmVersion()).thenReject(); @@ -166,7 +166,7 @@ describe('NpmTask', function() { return expect(task.findPackageManager()).to.be.rejected; }); - it('resolves when yarn is requested and found', function() { + it('resolves when yarn is requested and found', function () { task.useYarn = true; td.when(task.checkYarn()).thenResolve(); @@ -174,7 +174,7 @@ describe('NpmTask', function() { return expect(task.findPackageManager()).to.be.fulfilled; }); - it('rejects with SilentError when yarn is requested but not found', function() { + it('rejects with SilentError when yarn is requested but not found', function () { task.useYarn = true; let error = new Error('yarn not found'); @@ -185,7 +185,7 @@ describe('NpmTask', function() { return expect(task.findPackageManager()).to.be.rejectedWith(SilentError, /Yarn could not be found/); }); - it('rejects when yarn is requested and yarn check errors', function() { + it('rejects when yarn is requested and yarn check errors', function () { task.useYarn = true; td.when(task.checkYarn()).thenReject(new Error('foobar')); @@ -193,7 +193,7 @@ describe('NpmTask', function() { return expect(task.findPackageManager()).to.be.rejectedWith('foobar'); }); - it('resolves when npm is requested and compatible', function() { + it('resolves when npm is requested and compatible', function () { task.useYarn = false; td.when(task.checkNpmVersion()).thenResolve(); @@ -201,7 +201,7 @@ describe('NpmTask', function() { return expect(task.findPackageManager()).to.be.fulfilled; }); - it('rejects when npm is requested but incompatible', function() { + it('rejects when npm is requested but incompatible', function () { task.useYarn = false; td.when(task.checkNpmVersion()).thenReject(); @@ -210,26 +210,26 @@ describe('NpmTask', function() { }); }); - describe('toYarnArgs', function() { + describe('toYarnArgs', function () { let task; - beforeEach(function() { + beforeEach(function () { task = new NpmTask(); }); - it('converts "npm install --no-optional" to "yarn install --ignore-optional"', function() { + it('converts "npm install --no-optional" to "yarn install --ignore-optional"', function () { let args = task.toYarnArgs('install', { optional: false }); expect(args).to.deep.equal(['install', '--ignore-optional', '--non-interactive']); }); - it('converts "npm install --save foobar" to "yarn add foobar"', function() { + it('converts "npm install --save foobar" to "yarn add foobar"', function () { let args = task.toYarnArgs('install', { save: true, packages: ['foobar'] }); expect(args).to.deep.equal(['add', 'foobar', '--non-interactive']); }); - it('converts "npm install --save-dev --save-exact foo" to "yarn add --dev --exact foo"', function() { + it('converts "npm install --save-dev --save-exact foo" to "yarn add --dev --exact foo"', function () { let args = task.toYarnArgs('install', { 'save-dev': true, 'save-exact': true, @@ -239,13 +239,13 @@ describe('NpmTask', function() { expect(args).to.deep.equal(['add', '--dev', '--exact', 'foo', '--non-interactive']); }); - it('converts "npm uninstall bar" to "yarn remove bar"', function() { + it('converts "npm uninstall bar" to "yarn remove bar"', function () { let args = task.toYarnArgs('uninstall', { packages: ['bar'] }); expect(args).to.deep.equal(['remove', 'bar', '--non-interactive']); }); - it('throws when "yarn install" is called with packages', function() { + it('throws when "yarn install" is called with packages', function () { expect(() => task.toYarnArgs('install', { packages: ['foo'] })).to.throw(Error, /install foo/); }); }); diff --git a/tests/unit/tasks/serve-test.js b/tests/unit/tasks/serve-test.js index 9346a5467c..7567cb942d 100644 --- a/tests/unit/tasks/serve-test.js +++ b/tests/unit/tasks/serve-test.js @@ -5,7 +5,7 @@ const Builder = require('../../../lib/models/builder'); const MockProject = require('../../helpers/mock-project'); const expect = require('chai').expect; -describe('serve task', function() { +describe('serve task', function () { let task, ui; function setupBroccoliBuilder() { @@ -63,14 +63,14 @@ describe('serve task', function() { return task.run(options); } - describe('run with path', function() { - it(`Throws error if path doesn't exist`, function() { + describe('run with path', function () { + it(`Throws error if path doesn't exist`, function () { expect(runServeTask.bind(this, 'xyz')).to.throw( 'The path xyz does not exist. Please specify a valid build directory to serve.' ); }); - it(`Serves ember app from given path`, async function() { + it(`Serves ember app from given path`, async function () { runServeTask('docs'); await Promise.resolve(); @@ -78,8 +78,8 @@ describe('serve task', function() { }); }); - describe('onInterrupt', function() { - it('fulfills the run promise and cleans up the builder', async function() { + describe('onInterrupt', function () { + it('fulfills the run promise and cleans up the builder', async function () { let servePromise = runServeTask(); await Promise.resolve(); diff --git a/tests/unit/tasks/server/express-server-test.js b/tests/unit/tasks/server/express-server-test.js index 38d4c15286..135413f1a5 100644 --- a/tests/unit/tasks/server/express-server-test.js +++ b/tests/unit/tasks/server/express-server-test.js @@ -16,18 +16,18 @@ const express = require('express'); const WebSocket = require('websocket').w3cwebsocket; function checkMiddlewareOptions(options) { - expect(options).to.satisfy(option => option.baseURL || option.rootURL); + expect(options).to.satisfy((option) => option.baseURL || option.rootURL); } function sleep(timeout) { - return new Promise(resolve => setTimeout(resolve, timeout)); + return new Promise((resolve) => setTimeout(resolve, timeout)); } -describe('express-server', function() { +describe('express-server', function () { let subject, ui, project, proxy, nockProxy; nock.enableNetConnect(); - beforeEach(function() { + beforeEach(function () { this.timeout(10000); ui = new MockUI(); project = new MockProject(); @@ -43,7 +43,7 @@ describe('express-server', function() { }); }); - afterEach(function() { + afterEach(function () { return subject .stopHttpServer() .catch(() => {}) @@ -56,7 +56,7 @@ describe('express-server', function() { }); }); - it('address in use', function() { + it('address in use', function () { let preexistingServer = net.createServer(); preexistingServer.listen(1337); @@ -65,31 +65,31 @@ describe('express-server', function() { host: undefined, port: '1337', }) - .then(function() { + .then(function () { expect(false, 'should have rejected').to.be.ok; }) - .catch(function(reason) { + .catch(function (reason) { expect(reason.message).to.equal( 'Could not serve on http://localhost:1337. It is either in use or you do not have permission.' ); }) - .finally(function() { + .finally(function () { preexistingServer.close(); }); }); - describe('displayHost', function() { - it('should use the specified host if specified', function() { + describe('displayHost', function () { + it('should use the specified host if specified', function () { expect(subject.displayHost('1.2.3.4')).to.equal('1.2.3.4'); }); - it('should use the use localhost if host is not specified', function() { + it('should use the use localhost if host is not specified', function () { expect(subject.displayHost(undefined)).to.equal('localhost'); }); }); - describe('processAppMiddlewares', function() { - it('has a good error message if a file exists, but does not export a function', function() { + describe('processAppMiddlewares', function () { + it('has a good error message if a file exists, but does not export a function', function () { subject.project = { has() { return true; @@ -104,13 +104,13 @@ describe('express-server', function() { }).to.throw(TypeError, 'ember-cli expected ./server/index.js to be the entry for your mock or proxy server'); }); - it('returns values returned by server/index', function() { + it('returns values returned by server/index', function () { subject.project = { has() { return true; }, require() { - return function() { + return function () { return 'foo'; }; }, @@ -120,10 +120,10 @@ describe('express-server', function() { }); }); - describe('output', function() { + describe('output', function () { this.timeout(40000); - it('address in use', function() { + it('address in use', function () { let preexistingServer = net.createServer(); preexistingServer.listen(1337); @@ -133,19 +133,19 @@ describe('express-server', function() { port: '1337', }) ) - .to.be.rejected.then(reason => { + .to.be.rejected.then((reason) => { expect(reason.message).to.equal( 'Could not serve on http://localhost:1337. It is either in use or you do not have permission.' ); }) - .finally(function() { + .finally(function () { preexistingServer.close(); }); }); }); - describe('behaviour', function() { - it('starts with ssl if ssl option is passed', function() { + describe('behaviour', function () { + it('starts with ssl if ssl option is passed', function () { return subject .start({ host: 'localhost', @@ -155,12 +155,12 @@ describe('express-server', function() { sslKey: 'tests/fixtures/ssl/server.key', rootURL: '/', }) - .then(function() { - return new Promise(function(resolve, reject) { + .then(function () { + return new Promise(function (resolve, reject) { process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; request('https://localhost:1337', { strictSSL: false }) .get('/') - .expect(200, function(err, value) { + .expect(200, function (err, value) { process.env.NODE_TLS_REJECT_UNAUTHORIZED = '1'; if (err) { reject(err); @@ -172,12 +172,12 @@ describe('express-server', function() { }); }); - it('app middlewares are processed before the proxy', function(done) { + it('app middlewares are processed before the proxy', function (done) { let expected = '/foo was hit'; - project.require = function() { - return function(app) { - app.use('/foo', function(req, res) { + project.require = function () { + return function (app) { + app.use('/foo', function (req, res) { res.send(expected); }); }; @@ -190,14 +190,14 @@ describe('express-server', function() { port: '1337', rootURL: '/', }) - .then(function() { + .then(function () { request(subject.app) .get('/foo') .set('accept', 'application/json, */*') - .expect(res => { + .expect((res) => { expect(res.text).to.equal(expected); }) - .end(function(err) { + .end(function (err) { if (err) { return done(err); } @@ -207,12 +207,12 @@ describe('express-server', function() { }); }); - it('works with a regular express app', function(done) { + it('works with a regular express app', function (done) { let expected = '/foo was hit'; - project.require = function() { + project.require = function () { let app = express(); - app.use('/foo', function(req, res) { + app.use('/foo', function (req, res) { res.send(expected); }); return app; @@ -225,14 +225,14 @@ describe('express-server', function() { port: '1337', rootURL: '/', }) - .then(function() { + .then(function () { request(subject.app) .get('/foo') .set('accept', 'application/json, */*') - .expect(res => { + .expect((res) => { expect(res.text).to.equal(expected); }) - .end(function(err) { + .end(function (err) { if (err) { return done(err); } @@ -242,16 +242,16 @@ describe('express-server', function() { }); }); - describe('compression', function() { + describe('compression', function () { let longText = ''; for (let i = 0; i < 10000; ++i) { longText += 'x'; } longText += ''; - it('uses compression by default for long texts', function(done) { - project.require = function() { + it('uses compression by default for long texts', function (done) { + project.require = function () { let app = express(); - app.use('/foo', function(req, res) { + app.use('/foo', function (req, res) { res.send(longText); }); return app; @@ -264,14 +264,14 @@ describe('express-server', function() { port: '1337', rootURL: '/', }) - .then(function() { + .then(function () { request(subject.app) .get('/foo') - .expect(function(res) { + .expect(function (res) { expect(res.text).to.equal(longText); expect(res.header['content-encoding']).to.equal('gzip'); }) - .end(function(err) { + .end(function (err) { if (err) { return done(err); } @@ -281,10 +281,10 @@ describe('express-server', function() { }); }); - it('does not use compression even for long texts when the x-no-compression header is sent in the response', function(done) { - project.require = function() { + it('does not use compression even for long texts when the x-no-compression header is sent in the response', function (done) { + project.require = function () { let app = express(); - app.use('/foo', function(req, res) { + app.use('/foo', function (req, res) { res.set('x-no-compression', 'true'), res.send(longText); }); return app; @@ -297,16 +297,16 @@ describe('express-server', function() { port: '1337', rootURL: '/', }) - .then(function() { + .then(function () { request(subject.app) .get('/foo') .set('accept', 'application/json, */*') - .expect(function(res) { + .expect(function (res) { expect(res.text).to.equal(longText); expect(res.header['content-encoding']).to.not.exist; expect(parseInt(res.header['content-length'], 10)).to.equal(longText.length); }) - .end(function(err) { + .end(function (err) { if (err) { return done(err); } @@ -316,10 +316,10 @@ describe('express-server', function() { }); }); - it('does not use compression for server sent events', async function() { - project.require = function() { + it('does not use compression for server sent events', async function () { + project.require = function () { let app = express(); - app.use('/foo', function(req, res) { + app.use('/foo', function (req, res) { res.set('Content-Type', 'text/event-stream'); res.send(longText); }); @@ -337,7 +337,7 @@ describe('express-server', function() { await request(subject.app) .get('/foo') .set('accept', 'application/json, */*') - .expect(function(res) { + .expect(function (res) { expect(res.text).to.equal(longText); expect(res.header['content-encoding']).to.not.exist; expect(parseInt(res.header['content-length'], 10)).to.equal(longText.length); @@ -347,8 +347,8 @@ describe('express-server', function() { }); }); - describe('with proxy', function() { - beforeEach(function() { + describe('with proxy', function () { + beforeEach(function () { return subject.start({ proxy: 'http://localhost:3001/', host: undefined, @@ -362,7 +362,7 @@ describe('express-server', function() { request(app) .get(url) .set('accept', 'text/html') - .end(function(err, response) { + .end(function (err, response) { if (err) { return done(err); } @@ -374,12 +374,12 @@ describe('express-server', function() { }); } - it('bypasses proxy for /', function(done) { + it('bypasses proxy for /', function (done) { bypassTest(subject.app, '/', done); }); - it('bypasses proxy for files that exist', function(done) { - bypassTest(subject.app, '/test-file.txt', done, function(response) { + it('bypasses proxy for files that exist', function (done) { + bypassTest(subject.app, '/test-file.txt', done, function (response) { expect(response.text.trim()).to.equal('some contents'); }); }); @@ -390,7 +390,7 @@ describe('express-server', function() { .call(req, url) .set('content-length', 0) .set('accept', 'text/json') - .end(function(err) { + .end(function (err) { if (err) { return done(err); } @@ -402,27 +402,27 @@ describe('express-server', function() { }); } - it('proxies GET', function(done) { + it('proxies GET', function (done) { apiTest(subject.app, 'get', '/api/get', done); }); - it('proxies PUT', function(done) { + it('proxies PUT', function (done) { apiTest(subject.app, 'put', '/api/put', done); }); - it('proxies POST', function(done) { + it('proxies POST', function (done) { apiTest(subject.app, 'post', '/api/post', done); }); - it('proxies DELETE', function(done) { + it('proxies DELETE', function (done) { apiTest(subject.app, 'delete', '/api/delete', done); }); - it('proxies websockets', function(done) { + it('proxies websockets', function (done) { let number = Math.round(Math.random() * 0xffffff); let client = new WebSocket('ws://localhost:1337/foo'); - client.onerror = error => { + client.onerror = (error) => { done(error); // fail the test }; @@ -441,11 +441,11 @@ describe('express-server', function() { }); // test for #1263 - it('proxies when accept contains */*', function(done) { + it('proxies when accept contains */*', function (done) { request(subject.app) .get('/api/get') .set('accept', 'application/json, */*') - .end(function(err) { + .end(function (err) { if (err) { return done(err); } @@ -455,8 +455,8 @@ describe('express-server', function() { }); }); - describe('proxy with subdomain', function() { - beforeEach(function() { + describe('proxy with subdomain', function () { + beforeEach(function () { nockProxy = { called: null, method: null, @@ -476,7 +476,7 @@ describe('express-server', function() { return req[method] .call(req, url) .set('accept', 'text/json') - .end(function(err) { + .end(function (err) { if (err) { return done(err); } @@ -487,14 +487,14 @@ describe('express-server', function() { }); } - it('proxies GET', function(done) { + it('proxies GET', function (done) { nock('http://api.lvh.me', { reqheaders: { host: 'api.lvh.me', }, }) .get('/api/get') - .reply(200, function() { + .reply(200, function () { nockProxy.called = true; nockProxy.method = 'GET'; nockProxy.url = '/api/get'; @@ -505,14 +505,14 @@ describe('express-server', function() { apiTest(subject.app, 'get', '/api/get', done); }); - it('proxies PUT', function(done) { + it('proxies PUT', function (done) { nock('http://api.lvh.me', { reqheaders: { host: 'api.lvh.me', }, }) .put('/api/put') - .reply(204, function() { + .reply(204, function () { nockProxy.called = true; nockProxy.method = 'PUT'; nockProxy.url = '/api/put'; @@ -523,14 +523,14 @@ describe('express-server', function() { apiTest(subject.app, 'put', '/api/put', done); }); - it('proxies POST', function(done) { + it('proxies POST', function (done) { nock('http://api.lvh.me', { reqheaders: { host: 'api.lvh.me', }, }) .post('/api/post') - .reply(201, function() { + .reply(201, function () { nockProxy.called = true; nockProxy.method = 'POST'; nockProxy.url = '/api/post'; @@ -541,14 +541,14 @@ describe('express-server', function() { apiTest(subject.app, 'post', '/api/post', done); }); - it('proxies DELETE', function(done) { + it('proxies DELETE', function (done) { nock('http://api.lvh.me', { reqheaders: { host: 'api.lvh.me', }, }) .delete('/api/delete') - .reply(204, function() { + .reply(204, function () { nockProxy.called = true; nockProxy.method = 'DELETE'; nockProxy.url = '/api/delete'; @@ -560,10 +560,10 @@ describe('express-server', function() { }); // test for #1263 - it('proxies when accept contains */*', function(done) { + it('proxies when accept contains */*', function (done) { nock('http://api.lvh.me') .get('/api/get') - .reply(200, function() { + .reply(200, function () { nockProxy.called = true; nockProxy.method = 'GET'; nockProxy.url = '/api/get'; @@ -574,7 +574,7 @@ describe('express-server', function() { request(subject.app) .get('/api/get') .set('accept', 'application/json, */*') - .end(function(err) { + .end(function (err) { if (err) { return done(err); } @@ -584,7 +584,7 @@ describe('express-server', function() { }); }); - describe('without proxy', function() { + describe('without proxy', function () { function startServer(rootURL) { return subject.start({ environment: 'development', @@ -594,14 +594,14 @@ describe('express-server', function() { }); } - it('serves index.html when file not found with auto/history location', function(done) { - startServer().then(function() { + it('serves index.html when file not found with auto/history location', function (done) { + startServer().then(function () { request(subject.app) .get('/someurl.withperiod') .set('accept', 'text/html') .expect(200) .expect('Content-Type', /html/) - .end(function(err) { + .end(function (err) { if (err) { return done(err); } @@ -610,19 +610,19 @@ describe('express-server', function() { }); }); - it('GET /tests serves tests/index.html for mime of */* (hash location)', function(done) { + it('GET /tests serves tests/index.html for mime of */* (hash location)', function (done) { project._config = { rootURL: '/', locationType: 'hash', }; - startServer().then(function() { + startServer().then(function () { request(subject.app) .get('/tests') .set('accept', '*/*') .expect(200) .expect('Content-Type', /html/) - .end(function(err) { + .end(function (err) { if (err) { return done(err); } @@ -631,14 +631,14 @@ describe('express-server', function() { }); }); - it('GET /tests serves tests/index.html for mime of */* (auto location)', function(done) { - startServer().then(function() { + it('GET /tests serves tests/index.html for mime of */* (auto location)', function (done) { + startServer().then(function () { request(subject.app) .get('/tests') .set('accept', '*/*') .expect(200) .expect('Content-Type', /html/) - .end(function(err) { + .end(function (err) { if (err) { return done(err); } @@ -647,14 +647,14 @@ describe('express-server', function() { }); }); - it('GET /tests/whatever serves tests/index.html when file not found', function(done) { - startServer().then(function() { + it('GET /tests/whatever serves tests/index.html when file not found', function (done) { + startServer().then(function () { request(subject.app) .get('/tests/whatever') .set('accept', 'text/html') .expect(200) .expect('Content-Type', /html/) - .end(function(err) { + .end(function (err) { if (err) { return done(err); } @@ -663,15 +663,15 @@ describe('express-server', function() { }); }); - it('GET /tests/an-existing-file.tla serves tests/an-existing-file.tla if it is found', function(done) { - startServer().then(function() { + it('GET /tests/an-existing-file.tla serves tests/an-existing-file.tla if it is found', function (done) { + startServer().then(function () { request(subject.app) .get('/tests/test-file.txt') .set('accept', 'text/html') .expect(200) .expect(/some contents/) .expect('Content-Type', /text/) - .end(function(err) { + .end(function (err) { if (err) { return done(err); } @@ -680,14 +680,14 @@ describe('express-server', function() { }); }); - it('serves index.html when file not found (with rootURL) with auto/history location', function(done) { - startServer('/foo').then(function() { + it('serves index.html when file not found (with rootURL) with auto/history location', function (done) { + startServer('/foo').then(function () { request(subject.app) .get('/foo/someurl') .set('accept', 'text/html') .expect(200) .expect('Content-Type', /html/) - .end(function(err) { + .end(function (err) { if (err) { return done(err); } @@ -696,20 +696,20 @@ describe('express-server', function() { }); }); - it('serves index.html when file not found (with rootURL) with custom history location', function(done) { + it('serves index.html when file not found (with rootURL) with custom history location', function (done) { project._config = { rootURL: '/', locationType: 'blahr', historySupportMiddleware: true, }; - startServer('/foo').then(function() { + startServer('/foo').then(function () { request(subject.app) .get('/foo/someurl') .set('accept', 'text/html') .expect(200) .expect('Content-Type', /html/) - .end(function(err) { + .end(function (err) { if (err) { return done(err); } @@ -718,38 +718,34 @@ describe('express-server', function() { }); }); - it('returns a 404 when file not found with hash location', function(done) { + it('returns a 404 when file not found with hash location', function (done) { project._config = { rootURL: '/', locationType: 'hash', }; - startServer().then(function() { - request(subject.app) - .get('/someurl.withperiod') - .set('accept', 'text/html') - .expect(404) - .end(done); + startServer().then(function () { + request(subject.app).get('/someurl.withperiod').set('accept', 'text/html').expect(404).end(done); }); }); - it('files that exist in broccoli directory are served up', function(done) { - startServer().then(function() { + it('files that exist in broccoli directory are served up', function (done) { + startServer().then(function () { request(subject.app) .get('/test-file.txt') - .end(function(err, response) { + .end(function (err, response) { expect(response.text.trim()).to.equal('some contents'); done(); }); }); }); - it('serves static asset up from build output without a period in name', function(done) { - startServer().then(function() { + it('serves static asset up from build output without a period in name', function (done) { + startServer().then(function () { request(subject.app) .get('/someurl-without-period') .expect(200) - .end(function(err, response) { + .end(function (err, response) { if (err) { return done(err); } @@ -761,12 +757,12 @@ describe('express-server', function() { }); }); - it('serves a static wasm file up from build output with correct Content-Type header', function(done) { - startServer().then(function() { + it('serves a static wasm file up from build output with correct Content-Type header', function (done) { + startServer().then(function () { request(subject.app) .get('/vendor/foo.wasm') .expect(200) - .end(function(err, response) { + .end(function (err, response) { if (err) { return done(err); } @@ -778,16 +774,16 @@ describe('express-server', function() { }); }); - it('serves static asset up from build output without a period in name (with rootURL)', function(done) { + it('serves static asset up from build output without a period in name (with rootURL)', function (done) { project._config = { rootURL: '/foo', }; - startServer('/foo').then(function() { + startServer('/foo').then(function () { request(subject.app) .get('/foo/someurl-without-period') .expect(200) - .end(function(err, response) { + .end(function (err, response) { if (err) { return done(err); } @@ -800,37 +796,37 @@ describe('express-server', function() { }); }); - describe('addons', function() { + describe('addons', function () { let calls; - beforeEach(function() { + beforeEach(function () { calls = 0; - subject.processAddonMiddlewares = function(options) { + subject.processAddonMiddlewares = function (options) { checkMiddlewareOptions(options); calls++; }; }); - it('calls processAddonMiddlewares upon start', function() { + it('calls processAddonMiddlewares upon start', function () { return subject .start({ host: undefined, port: '1337', }) - .then(function() { + .then(function () { expect(calls).to.equal(1); }); }); }); - describe('addon middleware', function() { + describe('addon middleware', function () { let firstCalls; let secondCalls; - beforeEach(function() { + beforeEach(function () { firstCalls = 0; secondCalls = 0; - project.initializeAddons = function() {}; + project.initializeAddons = function () {}; project.addons = [ { serverMiddleware({ options }) { @@ -850,39 +846,39 @@ describe('express-server', function() { ]; }); - it('calls serverMiddleware on the addons on start', function() { + it('calls serverMiddleware on the addons on start', function () { return subject .start({ host: undefined, port: '1337', }) - .then(function() { + .then(function () { expect(firstCalls).to.equal(1); expect(secondCalls).to.equal(1); }); }); - it('calls serverMiddleware on the addons on restart', function() { + it('calls serverMiddleware on the addons on restart', function () { return subject .start({ host: undefined, port: '1337', }) - .then(function() { + .then(function () { subject.changedFiles = ['bar.js']; return subject.restartHttpServer(); }) - .then(function() { + .then(function () { expect(firstCalls).to.equal(2); expect(secondCalls).to.equal(2); }); }); }); - describe('addon middleware is async', function() { + describe('addon middleware is async', function () { let order = []; - beforeEach(function() { - project.initializeAddons = function() {}; + beforeEach(function () { + project.initializeAddons = function () {}; project.addons = [ { serverMiddleware() { @@ -891,8 +887,8 @@ describe('express-server', function() { }, { serverMiddleware() { - return new Promise(function(resolve) { - setTimeout(function() { + return new Promise(function (resolve) { + setTimeout(function () { order.push('second'); resolve(); }, 50); @@ -907,13 +903,13 @@ describe('express-server', function() { ]; }); - it('waits for async middleware to complete before the next middleware', function() { + it('waits for async middleware to complete before the next middleware', function () { return subject .start({ host: undefined, port: '1337', }) - .then(function() { + .then(function () { expect(order[0]).to.equal('first'); expect(order[1]).to.equal('second'); expect(order[2]).to.equal('third'); @@ -921,9 +917,9 @@ describe('express-server', function() { }); }); - describe('addon middleware bubble errors', function() { - beforeEach(function() { - project.initializeAddons = function() {}; + describe('addon middleware bubble errors', function () { + beforeEach(function () { + project.initializeAddons = function () {}; project.addons = [ { serverMiddleware() { @@ -932,33 +928,33 @@ describe('express-server', function() { }, ]; }); - it('up to server start', function() { + it('up to server start', function () { return subject .start({ host: undefined, port: '1337', }) - .catch(function(reason) { + .catch(function (reason) { expect(reason).to.equal('addon middleware fail'); }); }); }); - describe('app middleware', function() { + describe('app middleware', function () { let passedOptions; let calls; - beforeEach(function() { + beforeEach(function () { passedOptions = null; calls = 0; - subject.processAppMiddlewares = function(options) { + subject.processAppMiddlewares = function (options) { passedOptions = options; calls++; }; }); - it('calls processAppMiddlewares upon start', function() { + it('calls processAppMiddlewares upon start', function () { let realOptions = { baseURL: '/', rootURL: undefined, @@ -966,13 +962,13 @@ describe('express-server', function() { port: '1337', }; - return subject.start(realOptions).then(function() { + return subject.start(realOptions).then(function () { expect(passedOptions).to.deep.equal(realOptions); expect(calls).to.equal(1); }); }); - it('calls processAppMiddlewares upon restart', function() { + it('calls processAppMiddlewares upon restart', function () { let realOptions = { baseURL: '/', rootURL: undefined, @@ -984,12 +980,12 @@ describe('express-server', function() { return subject .start(realOptions) - .then(function() { + .then(function () { originalApp = subject.app; subject.changedFiles = ['bar.js']; return subject.restartHttpServer(); }) - .then(function() { + .then(function () { expect(subject.app).to.be.ok; expect(originalApp).to.not.equal(subject.app); expect(passedOptions).to.deep.equal(realOptions); @@ -997,10 +993,10 @@ describe('express-server', function() { }); }); - it('includes httpServer instance in options', function() { + it('includes httpServer instance in options', function () { let passedOptions; - subject.processAppMiddlewares = function(options) { + subject.processAppMiddlewares = function (options) { passedOptions = options; }; @@ -1009,16 +1005,16 @@ describe('express-server', function() { port: '1337', }; - return subject.start(realOptions).then(function() { + return subject.start(realOptions).then(function () { expect(!!passedOptions.httpServer.listen).to.be.ok; }); }); }); - describe('serverWatcherDidChange', function() { - it('is called on file change', function() { + describe('serverWatcherDidChange', function () { + it('is called on file change', function () { let calls = 0; - subject.serverWatcherDidChange = function() { + subject.serverWatcherDidChange = function () { calls++; }; @@ -1027,15 +1023,15 @@ describe('express-server', function() { host: undefined, port: '1337', }) - .then(function() { + .then(function () { subject.serverWatcher.emit('change', 'foo.txt'); expect(calls).to.equal(1); }); }); - it('schedules a server restart', function() { + it('schedules a server restart', function () { let calls = 0; - subject.scheduleServerRestart = function() { + subject.scheduleServerRestart = function () { calls++; }; @@ -1044,7 +1040,7 @@ describe('express-server', function() { host: undefined, port: '1337', }) - .then(function() { + .then(function () { subject.serverWatcher.emit('change', 'foo.txt'); subject.serverWatcher.emit('change', 'bar.txt'); expect(calls).to.equal(2); @@ -1052,11 +1048,11 @@ describe('express-server', function() { }); }); - describe('scheduleServerRestart', function() { - it('schedules exactly one call of restartHttpServer', async function() { + describe('scheduleServerRestart', function () { + it('schedules exactly one call of restartHttpServer', async function () { let calls = 0; - subject.restartHttpServer = function() { + subject.restartHttpServer = function () { calls++; }; @@ -1082,8 +1078,8 @@ describe('express-server', function() { }); }); - describe('restartHttpServer', function() { - it('restarts the server', function() { + describe('restartHttpServer', function () { + it('restarts the server', function () { let originalHttpServer; let originalApp; return subject @@ -1091,14 +1087,14 @@ describe('express-server', function() { host: undefined, port: '1337', }) - .then(function() { + .then(function () { ui.output = ''; originalHttpServer = subject.httpServer; originalApp = subject.app; subject.changedFiles = ['bar.js']; return subject.restartHttpServer(); }) - .then(function() { + .then(function () { expect(ui.output).to.contains(EOL + chalk.green('Server restarted.') + EOL + EOL); expect(subject.httpServer, 'HTTP server exists').to.be.ok; expect(subject.httpServer).to.not.equal(originalHttpServer, 'HTTP server has changed'); @@ -1107,7 +1103,7 @@ describe('express-server', function() { }); }); - it('restarts the server again if one or more files change during a previous restart', function() { + it('restarts the server again if one or more files change during a previous restart', function () { let originalHttpServer; let originalApp; return subject @@ -1115,11 +1111,11 @@ describe('express-server', function() { host: undefined, port: '1337', }) - .then(function() { + .then(function () { originalHttpServer = subject.httpServer; originalApp = subject.app; - subject.serverRestartPromise = new Promise(function(resolve) { - setTimeout(function() { + subject.serverRestartPromise = new Promise(function (resolve) { + setTimeout(function () { subject.serverRestartPromise = null; resolve(); }, 20); @@ -1127,7 +1123,7 @@ describe('express-server', function() { subject.changedFiles = ['bar.js']; return subject.restartHttpServer(); }) - .then(function() { + .then(function () { expect(!!subject.httpServer).to.equal(true, 'HTTP server exists'); expect(subject.httpServer).to.not.equal(originalHttpServer, 'HTTP server has changed'); expect(!!subject.app).to.equal(true, 'App exists'); @@ -1135,9 +1131,9 @@ describe('express-server', function() { }); }); - it('emits the restart event', function() { + it('emits the restart event', function () { let calls = 0; - subject.on('restart', function() { + subject.on('restart', function () { calls++; }); return subject @@ -1145,11 +1141,11 @@ describe('express-server', function() { host: undefined, port: '1337', }) - .then(function() { + .then(function () { subject.changedFiles = ['bar.js']; return subject.restartHttpServer(); }) - .then(function() { + .then(function () { expect(calls).to.equal(1); }); }); diff --git a/tests/unit/tasks/server/livereload-server-test.js b/tests/unit/tasks/server/livereload-server-test.js index 0744e04f20..d371172e94 100644 --- a/tests/unit/tasks/server/livereload-server-test.js +++ b/tests/unit/tasks/server/livereload-server-test.js @@ -12,14 +12,14 @@ const express = require('express'); const FSTree = require('fs-tree-diff'); const http = require('http'); -describe('livereload-server', function() { +describe('livereload-server', function () { let subject; let ui; let watcher; let httpServer; let app; - beforeEach(function() { + beforeEach(function () { ui = new MockUI(); watcher = new MockWatcher(); httpServer = new MockExpressServer(); @@ -37,7 +37,7 @@ describe('livereload-server', function() { }); }); - afterEach(function() { + afterEach(function () { try { if (subject.liveReloadServer) { subject.liveReloadServer.close(); @@ -47,20 +47,20 @@ describe('livereload-server', function() { } }); - describe('start', function() { - it('does not start the server if `liveReload` option is not true', function() { + describe('start', function () { + it('does not start the server if `liveReload` option is not true', function () { return subject .setupMiddleware({ liveReload: false, liveReloadPort: 4200, liveReloadPrefix: '/', }) - .then(function() { + .then(function () { expect(ui.output).to.contains('WARNING: Livereload server manually disabled.'); expect(!!subject.liveReloadServer).to.equal(false); }); }); - it('informs of error during startup with custom port', async function() { + it('informs of error during startup with custom port', async function () { let preexistingServer = net.createServer(); preexistingServer.listen(1337); @@ -74,10 +74,10 @@ describe('livereload-server', function() { } catch (e) { expect(e.message).to.include(`Livereload failed on 'http://localhost:1337', It may be in use.`); } finally { - await new Promise(resolve => preexistingServer.close(resolve)); + await new Promise((resolve) => preexistingServer.close(resolve)); } }); - it('starts with custom host, custom port', function() { + it('starts with custom host, custom port', function () { return subject .setupMiddleware({ liveReloadHost: '127.0.0.1', @@ -86,12 +86,12 @@ describe('livereload-server', function() { liveReloadPrefix: '/', port: 4200, }) - .then(function() { + .then(function () { expect(subject.liveReloadServer.options.port).to.equal(1377); expect(subject.liveReloadServer.options.host).to.equal('127.0.0.1'); }); }); - it('Livereload responds to livereload requests and returns livereload file', function(done) { + it('Livereload responds to livereload requests and returns livereload file', function (done) { let server = app.listen(4200); subject .setupMiddleware({ @@ -99,16 +99,16 @@ describe('livereload-server', function() { liveReloadPrefix: '_lr', port: 4200, }) - .then(function() { - http.get('http://localhost:4200/_lr/livereload.js', function(response) { + .then(function () { + http.get('http://localhost:4200/_lr/livereload.js', function (response) { expect(response.statusCode).to.equal(200); server.close(done); }); }); }); }); - describe('start with https', function() { - it('correctly runs in https mode', function() { + describe('start with https', function () { + it('correctly runs in https mode', function () { return subject .setupMiddleware({ liveReload: true, @@ -119,13 +119,13 @@ describe('livereload-server', function() { sslCert: 'tests/fixtures/ssl/server.crt', port: 4200, }) - .then(function() { + .then(function () { expect(subject.liveReloadServer.options.key).to.be.an.instanceof(Buffer); expect(subject.liveReloadServer.options.cert).to.be.an.instanceof(Buffer); }); }); - it('informs of error during startup', async function() { + it('informs of error during startup', async function () { let preexistingServer = net.createServer(); preexistingServer.listen(1337); @@ -143,11 +143,11 @@ describe('livereload-server', function() { } catch (e) { expect(e.message).to.include(`Livereload failed on 'https://localhost:1337', It may be in use.`); } finally { - await new Promise(resolve => preexistingServer.close(resolve)); + await new Promise((resolve) => preexistingServer.close(resolve)); } }); - it('correctly runs in https mode with custom port', function() { + it('correctly runs in https mode with custom port', function () { return subject .setupMiddleware({ liveReload: true, @@ -158,17 +158,17 @@ describe('livereload-server', function() { sslCert: 'tests/fixtures/ssl/server.crt', port: 4200, }) - .then(function() { + .then(function () { expect(subject.liveReloadServer.options.key).to.be.an.instanceof(Buffer); expect(subject.liveReloadServer.options.cert).to.be.an.instanceof(Buffer); }); }); }); - describe('express server restart', function() { - it('triggers when the express server restarts', function() { + describe('express server restart', function () { + it('triggers when the express server restarts', function () { let calls = 0; - subject.didRestart = function() { + subject.didRestart = function () { calls++; }; return subject @@ -177,14 +177,14 @@ describe('livereload-server', function() { liveReloadPrefix: '/', port: 4200, }) - .then(function() { + .then(function () { subject.app.emit('restart'); expect(calls).to.equal(1); }); }); - it('triggers when the express server restarts with custom port', function() { + it('triggers when the express server restarts with custom port', function () { let calls = 0; - subject.didRestart = function() { + subject.didRestart = function () { calls++; }; return subject @@ -194,28 +194,28 @@ describe('livereload-server', function() { liveReloadPort: 1337, port: 4200, }) - .then(function() { + .then(function () { subject.app.emit('restart'); expect(calls).to.equal(1); }); }); }); - describe('livereload changes', function() { + describe('livereload changes', function () { let liveReloadServer; let changedCount; let oldChanged; - let stubbedChanged = function() { + let stubbedChanged = function () { changedCount += 1; }; let trackCount; let oldTrack; - let stubbedTrack = function() { + let stubbedTrack = function () { trackCount += 1; }; - let createStubbedGetDirectoryEntries = function(files) { - return function() { - return files.map(function(file) { + let createStubbedGetDirectoryEntries = function (files) { + return function () { + return files.map(function (file) { return { relativePath: file, isDirectory() { @@ -226,7 +226,7 @@ describe('livereload-server', function() { }; }; - beforeEach(function() { + beforeEach(function () { subject.setupMiddleware({ liveReload: true, liveReloadPort: 4200, @@ -245,13 +245,13 @@ describe('livereload-server', function() { subject.tree = FSTree.fromEntries([]); }); - afterEach(function() { + afterEach(function () { liveReloadServer.changed = oldChanged; subject.analytics.track = oldTrack; subject.project.liveReloadFilterPatterns = []; }); - describe('watcher events', function() { + describe('watcher events', function () { function watcherEventTest(eventName, expectedCount) { subject.getDirectoryEntries = createStubbedGetDirectoryEntries(['test/fixtures/proxy/file-a.js']); subject.project.liveReloadFilterPatterns = []; @@ -261,20 +261,20 @@ describe('livereload-server', function() { return expect(changedCount).to.equal(expectedCount); } - it('triggers a livereload change on a watcher change event', function() { + it('triggers a livereload change on a watcher change event', function () { return watcherEventTest('change', 1); }); - it('triggers a livereload change on a watcher error event', function() { + it('triggers a livereload change on a watcher error event', function () { return watcherEventTest('error', 1); }); - it('does not trigger a livereload change on other watcher events', function() { + it('does not trigger a livereload change on other watcher events', function () { return watcherEventTest('not-an-event', 0); }); - it('recovers from error when file is already cached in previous cache step', function() { - let compileError = function() { + it('recovers from error when file is already cached in previous cache step', function () { + let compileError = function () { try { throw new Error('Compile time error'); } catch (error) { @@ -294,8 +294,8 @@ describe('livereload-server', function() { expect(changedCount).to.equal(2); }); - describe('filter pattern', function() { - it('shouldTriggerReload must be true if there are no liveReloadFilterPatterns', function() { + describe('filter pattern', function () { + it('shouldTriggerReload must be true if there are no liveReloadFilterPatterns', function () { subject.project.liveReloadFilterPatterns = []; let result = subject.shouldTriggerReload({ filePath: '/home/user/my-project/app/styles/app.css', @@ -303,7 +303,7 @@ describe('livereload-server', function() { expect(result).to.be.true; }); - it('shouldTriggerReload is true when no liveReloadFilterPatterns matches the filePath', function() { + it('shouldTriggerReload is true when no liveReloadFilterPatterns matches the filePath', function () { let basePath = path.normalize('test/fixtures/proxy').replace(/\\/g, '\\\\'); let filter = new RegExp(`^${basePath}`); @@ -314,7 +314,7 @@ describe('livereload-server', function() { expect(result).to.be.true; }); - it('shouldTriggerReload is false when one or more of the liveReloadFilterPatterns matches filePath', function() { + it('shouldTriggerReload is false when one or more of the liveReloadFilterPatterns matches filePath', function () { let basePath = path.normalize('test/fixtures/proxy').replace(/\\/g, '\\\\'); let filter = new RegExp(`^${basePath}`); @@ -325,7 +325,7 @@ describe('livereload-server', function() { expect(result).to.be.false; }); - it('shouldTriggerReload writes a banner after skipping reload for a file', function() { + it('shouldTriggerReload writes a banner after skipping reload for a file', function () { let basePath = path.normalize('test/fixtures/proxy').replace(/\\/g, '\\\\'); let filter = new RegExp(`^${basePath}`); @@ -338,7 +338,7 @@ describe('livereload-server', function() { ); }); - it('triggers the livereload server of a change when no pattern matches', function() { + it('triggers the livereload server of a change when no pattern matches', function () { subject.getDirectoryEntries = createStubbedGetDirectoryEntries([]); subject.didChange({ filePath: '/home/user/my-project/test/fixtures/proxy/file-a.js', @@ -347,7 +347,7 @@ describe('livereload-server', function() { expect(trackCount).to.equal(1); }); - it('does not trigger livereload server of a change when there is a pattern match', function() { + it('does not trigger livereload server of a change when there is a pattern match', function () { // normalize test regex for windows // path.normalize with change forward slashes to back slashes if test is running on windows // we then replace backslashes with double backslahes to escape the backslash in the regex @@ -367,22 +367,22 @@ describe('livereload-server', function() { }); }); - describe('specific files', function() { + describe('specific files', function () { let reloadedFiles; - let stubbedChanged = function(options) { + let stubbedChanged = function (options) { reloadedFiles = options.body.files; }; - beforeEach(function() { + beforeEach(function () { liveReloadServer.changed = stubbedChanged; }); - afterEach(function() { + afterEach(function () { reloadedFiles = undefined; }); - it('triggers livereload with modified files', function() { + it('triggers livereload with modified files', function () { let changedFiles = ['assets/my-project.css', 'assets/my-project.js']; subject.getDirectoryEntries = createStubbedGetDirectoryEntries(changedFiles); @@ -393,7 +393,7 @@ describe('livereload-server', function() { expect(reloadedFiles).to.deep.equal(changedFiles); }); - it('triggers livereload with deleted directories', function() { + it('triggers livereload with deleted directories', function () { let changedFiles = ['assets/my-project.css', 'assets/my-project.js']; subject.getDirectoryEntries = createStubbedGetDirectoryEntries(changedFiles); @@ -410,7 +410,7 @@ describe('livereload-server', function() { expect(reloadedFiles).to.deep.equal([]); }); - it('triggers livereload ignoring source map files', function() { + it('triggers livereload ignoring source map files', function () { let changedFiles = ['assets/my-project.css', 'assets/my-project.css.map']; let expectedResult = ['assets/my-project.css']; @@ -423,7 +423,7 @@ describe('livereload-server', function() { expect(reloadedFiles).to.deep.equal(expectedResult); }); - it('triggers livereload with "LiveReload files" if no results.directory was provided', function() { + it('triggers livereload with "LiveReload files" if no results.directory was provided', function () { let changedOptions; subject.liveReloadServer = { changed(options) { @@ -441,21 +441,21 @@ describe('livereload-server', function() { }); }); }); - describe('livereload changes with custom port', function() { + describe('livereload changes with custom port', function () { let liveReloadServer; let changedCount; let oldChanged; - let stubbedChanged = function() { + let stubbedChanged = function () { changedCount += 1; }; let trackCount; let oldTrack; - let stubbedTrack = function() { + let stubbedTrack = function () { trackCount += 1; }; - let createStubbedGetDirectoryEntries = function(files) { - return function() { - return files.map(function(file) { + let createStubbedGetDirectoryEntries = function (files) { + return function () { + return files.map(function (file) { return { relativePath: file, isDirectory() { @@ -466,7 +466,7 @@ describe('livereload-server', function() { }; }; - beforeEach(function() { + beforeEach(function () { subject.setupMiddleware({ liveReload: true, liveReloadPort: 1337, @@ -485,13 +485,13 @@ describe('livereload-server', function() { subject.tree = FSTree.fromEntries([]); }); - afterEach(function() { + afterEach(function () { liveReloadServer.changed = oldChanged; subject.analytics.track = oldTrack; subject.project.liveReloadFilterPatterns = []; }); - describe('watcher events', function() { + describe('watcher events', function () { function watcherEventTest(eventName, expectedCount) { subject.getDirectoryEntries = createStubbedGetDirectoryEntries(['test/fixtures/proxy/file-a.js']); subject.project.liveReloadFilterPatterns = []; @@ -501,20 +501,20 @@ describe('livereload-server', function() { return expect(changedCount).to.equal(expectedCount); } - it('triggers a livereload change on a watcher change event', function() { + it('triggers a livereload change on a watcher change event', function () { return watcherEventTest('change', 1); }); - it('triggers a livereload change on a watcher error event', function() { + it('triggers a livereload change on a watcher error event', function () { return watcherEventTest('error', 1); }); - it('does not trigger a livereload change on other watcher events', function() { + it('does not trigger a livereload change on other watcher events', function () { return watcherEventTest('not-an-event', 0); }); - it('recovers from error when file is already cached in previous cache step', function() { - let compileError = function() { + it('recovers from error when file is already cached in previous cache step', function () { + let compileError = function () { try { throw new Error('Compile time error'); } catch (error) { @@ -534,8 +534,8 @@ describe('livereload-server', function() { expect(changedCount).to.equal(2); }); - describe('filter pattern', function() { - it('shouldTriggerReload must be true if there are no liveReloadFilterPatterns', function() { + describe('filter pattern', function () { + it('shouldTriggerReload must be true if there are no liveReloadFilterPatterns', function () { subject.project.liveReloadFilterPatterns = []; let result = subject.shouldTriggerReload({ filePath: '/home/user/my-project/app/styles/app.css', @@ -543,7 +543,7 @@ describe('livereload-server', function() { expect(result).to.be.true; }); - it('shouldTriggerReload is true when no liveReloadFilterPatterns matches the filePath', function() { + it('shouldTriggerReload is true when no liveReloadFilterPatterns matches the filePath', function () { let basePath = path.normalize('test/fixtures/proxy').replace(/\\/g, '\\\\'); let filter = new RegExp(`^${basePath}`); @@ -554,7 +554,7 @@ describe('livereload-server', function() { expect(result).to.be.true; }); - it('shouldTriggerReload is false when one or more of the liveReloadFilterPatterns matches filePath', function() { + it('shouldTriggerReload is false when one or more of the liveReloadFilterPatterns matches filePath', function () { let basePath = path.normalize('test/fixtures/proxy').replace(/\\/g, '\\\\'); let filter = new RegExp(`^${basePath}`); @@ -565,7 +565,7 @@ describe('livereload-server', function() { expect(result).to.be.false; }); - it('shouldTriggerReload writes a banner after skipping reload for a file', function() { + it('shouldTriggerReload writes a banner after skipping reload for a file', function () { let basePath = path.normalize('test/fixtures/proxy').replace(/\\/g, '\\\\'); let filter = new RegExp(`^${basePath}`); @@ -578,7 +578,7 @@ describe('livereload-server', function() { ); }); - it('triggers the livereload server of a change when no pattern matches', function() { + it('triggers the livereload server of a change when no pattern matches', function () { subject.getDirectoryEntries = createStubbedGetDirectoryEntries([]); subject.didChange({ filePath: '/home/user/my-project/test/fixtures/proxy/file-a.js', @@ -587,7 +587,7 @@ describe('livereload-server', function() { expect(trackCount).to.equal(1); }); - it('does not trigger livereload server of a change when there is a pattern match', function() { + it('does not trigger livereload server of a change when there is a pattern match', function () { // normalize test regex for windows // path.normalize with change forward slashes to back slashes if test is running on windows // we then replace backslashes with double backslahes to escape the backslash in the regex @@ -607,24 +607,24 @@ describe('livereload-server', function() { }); }); - describe('specific files', function() { + describe('specific files', function () { let reloadedFiles; let changedOptions; - let stubbedChanged = function(options) { + let stubbedChanged = function (options) { reloadedFiles = options.body.files; changedOptions = options; }; - beforeEach(function() { + beforeEach(function () { liveReloadServer.changed = stubbedChanged; }); - afterEach(function() { + afterEach(function () { reloadedFiles = undefined; }); - it('triggers livereload with modified files', function() { + it('triggers livereload with modified files', function () { let changedFiles = ['assets/my-project.css', 'assets/my-project.js']; subject.getDirectoryEntries = createStubbedGetDirectoryEntries(changedFiles); @@ -635,7 +635,7 @@ describe('livereload-server', function() { expect(reloadedFiles).to.deep.equal(changedFiles); }); - it('triggers livereload with deleted directories', function() { + it('triggers livereload with deleted directories', function () { let changedFiles = ['assets/my-project.css', 'assets/my-project.js']; subject.getDirectoryEntries = createStubbedGetDirectoryEntries(changedFiles); @@ -652,7 +652,7 @@ describe('livereload-server', function() { expect(reloadedFiles).to.deep.equal([]); }); - it('triggers livereload ignoring source map files', function() { + it('triggers livereload ignoring source map files', function () { let changedFiles = ['assets/my-project.css', 'assets/my-project.css.map']; let expectedResult = ['assets/my-project.css']; @@ -665,7 +665,7 @@ describe('livereload-server', function() { expect(reloadedFiles).to.deep.equal(expectedResult); }); - it('triggers livereload with "LiveReload files" if no results.directory was provided', function() { + it('triggers livereload with "LiveReload files" if no results.directory was provided', function () { subject.didChange({}); expect(changedOptions).to.deep.equal({ diff --git a/tests/unit/tasks/server/middleware/history-support-test.js b/tests/unit/tasks/server/middleware/history-support-test.js index fe1f4de1ac..4643174cf3 100644 --- a/tests/unit/tasks/server/middleware/history-support-test.js +++ b/tests/unit/tasks/server/middleware/history-support-test.js @@ -3,9 +3,9 @@ const expect = require('chai').expect; const HistorySupportAddon = require('../../../../../lib/tasks/server/middleware/history-support'); -describe('HistorySupportAddon', function() { - describe('.serverMiddleware', function() { - it('add middleware when locationType is auto', function() { +describe('HistorySupportAddon', function () { + describe('.serverMiddleware', function () { + it('add middleware when locationType is auto', function () { let addon = new HistorySupportAddon({ config() { return { @@ -17,7 +17,7 @@ describe('HistorySupportAddon', function() { expect(addon.shouldAddMiddleware()).to.true; }); - it('add middleware when locationType is history', function() { + it('add middleware when locationType is history', function () { let addon = new HistorySupportAddon({ config() { return { @@ -29,7 +29,7 @@ describe('HistorySupportAddon', function() { expect(addon.shouldAddMiddleware()).to.true; }); - it('add middleware when locationType is an unknown type', function() { + it('add middleware when locationType is an unknown type', function () { let addon = new HistorySupportAddon({ config() { return { @@ -42,7 +42,7 @@ describe('HistorySupportAddon', function() { expect(addon.shouldAddMiddleware()).to.true; }); - it('add middleware when historySupportMiddleware is true', function() { + it('add middleware when historySupportMiddleware is true', function () { let addon = new HistorySupportAddon({ config() { return { @@ -54,7 +54,7 @@ describe('HistorySupportAddon', function() { expect(addon.shouldAddMiddleware()).to.true; }); - it('do not add middleware when historySupportMiddleware is false and locationType is history', function() { + it('do not add middleware when historySupportMiddleware is false and locationType is history', function () { let addon = new HistorySupportAddon({ config() { return { diff --git a/tests/unit/tasks/server/middleware/proxy-server-test.js b/tests/unit/tasks/server/middleware/proxy-server-test.js index 636212b9c9..bed1087931 100644 --- a/tests/unit/tasks/server/middleware/proxy-server-test.js +++ b/tests/unit/tasks/server/middleware/proxy-server-test.js @@ -4,15 +4,15 @@ const MockProject = require('../../../../helpers/mock-project'); const ProxyServerAddon = require('../../../../../lib/tasks/server/middleware/proxy-server'); const expect = require('chai').expect; -describe('proxy-server', function() { +describe('proxy-server', function () { let project, proxyServer; - beforeEach(function() { + beforeEach(function () { project = new MockProject(); proxyServer = new ProxyServerAddon(project); }); - it(`bypass livereload request`, function() { + it(`bypass livereload request`, function () { let options = { liveReloadPrefix: 'test/', }; diff --git a/tests/unit/tasks/server/middleware/tests-server-test.js b/tests/unit/tasks/server/middleware/tests-server-test.js index 3591ef11bd..56dd569fcd 100644 --- a/tests/unit/tasks/server/middleware/tests-server-test.js +++ b/tests/unit/tasks/server/middleware/tests-server-test.js @@ -3,11 +3,11 @@ const expect = require('chai').expect; const TestsServerAddon = require('../../../../../lib/tasks/server/middleware/tests-server'); -describe('TestServerAddon', function() { - describe('.serverMiddleware', function() { +describe('TestServerAddon', function () { + describe('.serverMiddleware', function () { let addon, nextWasCalled, mockRequest, app; - beforeEach(function() { + beforeEach(function () { addon = new TestsServerAddon(); nextWasCalled = false; mockRequest = { @@ -18,14 +18,14 @@ describe('TestServerAddon', function() { }; app = { use(callback) { - return callback(mockRequest, null, function() { + return callback(mockRequest, null, function () { nextWasCalled = true; }); }, }; }); - it('invokes next when the watcher succeeds', function(done) { + it('invokes next when the watcher succeeds', function (done) { addon.serverMiddleware({ app, options: { @@ -44,7 +44,7 @@ describe('TestServerAddon', function() { }); }); - it('invokes next when the watcher fails', function(done) { + it('invokes next when the watcher fails', function (done) { let mockError = 'bad things are bad'; addon.serverMiddleware({ @@ -63,7 +63,7 @@ describe('TestServerAddon', function() { }); }); - it('allows baseURL containing `+` character', function(done) { + it('allows baseURL containing `+` character', function (done) { mockRequest.path = '/braden/+/tests/any-old-file'; mockRequest.headers.accept = ['*/*']; addon.serverMiddleware({ @@ -83,7 +83,7 @@ describe('TestServerAddon', function() { }); }); - it('allows rootURL containing `+` character', function(done) { + it('allows rootURL containing `+` character', function (done) { mockRequest.path = '/grayson/+/tests/any-old-file'; mockRequest.headers.accept = ['text/html']; addon.serverMiddleware({ diff --git a/tests/unit/tasks/test-server-test.js b/tests/unit/tasks/test-server-test.js index f25120f68c..e5da221fd4 100644 --- a/tests/unit/tasks/test-server-test.js +++ b/tests/unit/tasks/test-server-test.js @@ -7,10 +7,10 @@ const MockProject = require('../../helpers/mock-project'); const MockUI = require('console-ui/mock'); const MockWatcher = require('../../helpers/mock-watcher'); -describe('test server', function() { +describe('test server', function () { let subject; - it('transforms and sets defaultOptions in testem and invokes testem properly', function() { + it('transforms and sets defaultOptions in testem and invokes testem properly', function () { let ui = new MockUI(); let watcher = new MockWatcher(); @@ -48,17 +48,17 @@ describe('test server', function() { watcher, testPage: 'http://my/test/page', }) - .then(function(value) { + .then(function (value) { expect(value, 'expected exist status of 0').to.eql(0); }); watcher.emit('change'); return runResult; }); - describe('completion', function() { + describe('completion', function () { let ui, watcher, subject, runOptions; - before(function() { + before(function () { ui = new MockUI(); watcher = new MockWatcher(); @@ -83,18 +83,18 @@ describe('test server', function() { }); }); - describe('firstRun', function() { - it('rejects with testem exceptions', function() { + describe('firstRun', function () { + it('rejects with testem exceptions', function () { let error = new Error('OMG'); - subject.testem.setDefaultOptions = function(options) { + subject.testem.setDefaultOptions = function (options) { this.defaultOptions = options; }; - subject.testem.startDev = function(options, finalizer) { + subject.testem.startDev = function (options, finalizer) { finalizer(1, error); }; - let runResult = expect(subject.run(runOptions)).to.be.rejected.then(reason => { + let runResult = expect(subject.run(runOptions)).to.be.rejected.then((reason) => { expect(reason).to.eql(error); }); @@ -103,17 +103,17 @@ describe('test server', function() { return runResult; }); - it('rejects with exit status (1)', function() { + it('rejects with exit status (1)', function () { let error = new SilentError('Testem finished with non-zero exit code. Tests failed.'); - subject.testem.setDefaultOptions = function(options) { + subject.testem.setDefaultOptions = function (options) { this.defaultOptions = options; }; - subject.testem.startDev = function(options, finalizer) { + subject.testem.startDev = function (options, finalizer) { finalizer(1); }; - let runResult = expect(subject.run(runOptions)).to.be.rejected.then(reason => { + let runResult = expect(subject.run(runOptions)).to.be.rejected.then((reason) => { expect(reason).to.eql(error); }); @@ -121,16 +121,16 @@ describe('test server', function() { return runResult; }); - it('resolves with exit status (0)', function() { - subject.testem.setDefaultOptions = function(options) { + it('resolves with exit status (0)', function () { + subject.testem.setDefaultOptions = function (options) { this.defaultOptions = options; }; - subject.testem.startDev = function(options, finalizer) { + subject.testem.startDev = function (options, finalizer) { finalizer(0); }; - let runResult = subject.run(runOptions).then(function(value) { + let runResult = subject.run(runOptions).then(function (value) { expect(value, 'expected exist status of 0').to.eql(0); }); @@ -140,14 +140,14 @@ describe('test server', function() { }); }); - describe('restart', function() { - it('rejects with testem exceptions', function() { + describe('restart', function () { + it('rejects with testem exceptions', function () { let error = new Error('OMG'); - subject.testem.setDefaultOptions = function(options) { + subject.testem.setDefaultOptions = function (options) { this.defaultOptions = options; }; - subject.testem.startDev = function(options, finalizer) { + subject.testem.startDev = function (options, finalizer) { finalizer(0); }; @@ -155,12 +155,12 @@ describe('test server', function() { watcher.emit('change'); - return runResult.then(function() { - subject.testem.startDev = function(options, finalizer) { + return runResult.then(function () { + subject.testem.startDev = function (options, finalizer) { finalizer(0, error); }; - runResult = expect(subject.run(runOptions)).to.be.rejected.then(reason => { + runResult = expect(subject.run(runOptions)).to.be.rejected.then((reason) => { expect(reason).to.eql(error); }); diff --git a/tests/unit/tasks/test-test.js b/tests/unit/tasks/test-test.js index e2d7f28ee4..ebcf5503d1 100644 --- a/tests/unit/tasks/test-test.js +++ b/tests/unit/tasks/test-test.js @@ -4,10 +4,10 @@ const expect = require('chai').expect; const TestTask = require('../../../lib/tasks/test'); const MockProject = require('../../helpers/mock-project'); -describe('test task test', function() { +describe('test task test', function () { let subject; - it('transforms options for testem configuration', function() { + it('transforms options for testem configuration', function () { subject = new TestTask({ project: new MockProject(), addonMiddlewares() { @@ -55,7 +55,7 @@ describe('test task test', function() { }); }); - it('supports conditionally passing SSL configuration forward', function() { + it('supports conditionally passing SSL configuration forward', function () { subject = new TestTask({ project: new MockProject(), diff --git a/tests/unit/utilities/command-generator-test.js b/tests/unit/utilities/command-generator-test.js index def5978264..542788b356 100644 --- a/tests/unit/utilities/command-generator-test.js +++ b/tests/unit/utilities/command-generator-test.js @@ -3,19 +3,19 @@ const td = require('testdouble'); const Command = require('../../../tests/helpers/command-generator'); -describe('command-generator', function() { +describe('command-generator', function () { let yarn, _invoke; - beforeEach(function() { + beforeEach(function () { yarn = new Command('yarn'); _invoke = yarn._invoke = td.function('invoke'); }); - afterEach(function() { + afterEach(function () { td.reset(); }); - it('invoke passes options', function() { + it('invoke passes options', function () { // Works with subcommand or argument. yarn.invoke('install'); td.verify(_invoke(td.matchers.isA(Array), {})); @@ -45,7 +45,7 @@ describe('command-generator', function() { td.verify(_invoke(), { times: 8, ignoreExtraArgs: true }); }); - it('builds the proper invocation', function() { + it('builds the proper invocation', function () { yarn.invoke(); td.verify(_invoke([]), { ignoreExtraArgs: true }); diff --git a/tests/unit/utilities/ember-app-utils-test.js b/tests/unit/utilities/ember-app-utils-test.js index b4c6247028..f4f87b74f2 100644 --- a/tests/unit/utilities/ember-app-utils-test.js +++ b/tests/unit/utilities/ember-app-utils-test.js @@ -12,14 +12,14 @@ const normalizeUrl = emberAppUtils.normalizeUrl; const calculateBaseTag = emberAppUtils.calculateBaseTag; const convertObjectToString = emberAppUtils.convertObjectToString; -describe('ember-app-utils', function() { - describe(`rootURL`, function() { - it('`rootURL` regex accepts space-padded padded variation', function() { +describe('ember-app-utils', function () { + describe(`rootURL`, function () { + it('`rootURL` regex accepts space-padded padded variation', function () { const regex = configReplacePatterns()[0].match; const variations = ['{{rootURL}}', '{{ rootURL }}', 'foo']; const results = []; - variations.forEach(variation => { + variations.forEach((variation) => { const match = variation.match(regex); if (match !== null) { @@ -32,13 +32,13 @@ describe('ember-app-utils', function() { }); }); - describe(`EMBER_ENV`, function() { - it('`EMBER_ENV` regex accepts space-padded padded variation', function() { + describe(`EMBER_ENV`, function () { + it('`EMBER_ENV` regex accepts space-padded padded variation', function () { const regex = configReplacePatterns()[1].match; const variations = ['{{EMBER_ENV}}', '{{ EMBER_ENV }}', 'foo']; const results = []; - variations.forEach(variation => { + variations.forEach((variation) => { const match = variation.match(regex); if (match !== null) { @@ -51,13 +51,13 @@ describe('ember-app-utils', function() { }); }); - describe(`MODULE_PREFIX`, function() { - it('`MODULE_PREFIX` regex accepts space-padded padded variation', function() { + describe(`MODULE_PREFIX`, function () { + it('`MODULE_PREFIX` regex accepts space-padded padded variation', function () { const regex = configReplacePatterns()[3].match; const variations = ['{{MODULE_PREFIX}}', '{{ MODULE_PREFIX }}', 'foo']; const results = []; - variations.forEach(variation => { + variations.forEach((variation) => { const match = variation.match(regex); if (match !== null) { @@ -70,7 +70,7 @@ describe('ember-app-utils', function() { }); }); - describe(`contentFor`, function() { + describe(`contentFor`, function () { let config = { modulePrefix: 'cool-foo', }; @@ -83,7 +83,7 @@ describe('ember-app-utils', function() { addons: [], }; - it('`content-for` regex returns all matches presents in a same line', function() { + it('`content-for` regex returns all matches presents in a same line', function () { const contentForRegex = configReplacePatterns(defaultOptions)[2].match; const content = "{{content-for 'foo'}} {{content-for 'bar'}}"; const results = []; @@ -99,21 +99,21 @@ describe('ember-app-utils', function() { ]); }); - it('returns an empty string if invalid type is specified', function() { + it('returns an empty string if invalid type is specified', function () { expect(contentFor(config, defaultMatch, 'foo', defaultOptions)).to.equal(''); expect(contentFor(config, defaultMatch, 'body', defaultOptions)).to.equal(''); expect(contentFor(config, defaultMatch, 'blah', defaultOptions)).to.equal(''); }); - describe('"head"', function() { - it('returns `` tag by default', function() { + describe('"head"', function () { + it('returns `` tag by default', function () { let actual = contentFor(config, defaultMatch, 'head', defaultOptions); let expected = ``; expect(actual, '`` tag was included by default').to.contain(expected); }); - it('handles multibyte characters in `` tag', function() { + it('handles multibyte characters in `` tag', function () { let configWithMultibyteChars = { modulePrefix: 'cool-å' }; let actual = contentFor(configWithMultibyteChars, defaultMatch, 'head', defaultOptions); let escapedConfig = encodeURIComponent(JSON.stringify(configWithMultibyteChars)); @@ -122,7 +122,7 @@ describe('ember-app-utils', function() { expect(actual, '`` tag was included with multibyte characters').to.contain(expected); }); - it('omits `` tag if `storeConfigInMeta` is false', function() { + it('omits `` tag if `storeConfigInMeta` is false', function () { let options = Object.assign({}, defaultOptions, { storeConfigInMeta: false }); let output = contentFor(config, defaultMatch, 'head', options); @@ -131,7 +131,7 @@ describe('ember-app-utils', function() { expect(output, '`` tag was not included').not.to.contain(expected); }); - it('returns `` tag if `locationType` is "auto"', function() { + it('returns `` tag if `locationType` is "auto"', function () { config.locationType = 'auto'; config.baseURL = '/'; @@ -142,7 +142,7 @@ describe('ember-app-utils', function() { }); // this is required by testem - it('returns `` tag if `locationType` is "none"', function() { + it('returns `` tag if `locationType` is "none"', function () { config.locationType = 'none'; config.baseURL = '/'; @@ -152,7 +152,7 @@ describe('ember-app-utils', function() { expect(output, '`` tag was included').to.contain(expected); }); - it('omits `` tag if `locationType` is "hash"', function() { + it('omits `` tag if `locationType` is "hash"', function () { config.locationType = 'hash'; config.baseURL = '/foo/bar'; @@ -162,7 +162,7 @@ describe('ember-app-utils', function() { expect(output, '`` tag was not included').to.not.contain(expected); }); - it('omits `` tag if `baseURL` is `undefined`', function() { + it('omits `` tag if `baseURL` is `undefined`', function () { let expected = '` tag gathering snippet by default', function() { + describe('"config-module"', function () { + it('returns `` tag gathering snippet by default', function () { let metaSnippetPath = path.join(__dirname, '..', '..', '..', 'lib', 'broccoli', 'app-config-from-meta.js'); let expected = fs.readFileSync(metaSnippetPath, { encoding: 'utf8' }); @@ -180,7 +180,7 @@ describe('ember-app-utils', function() { expect(output, 'includes `` tag snippet').to.contain(expected); }); - it('returns "raw" config if `storeConfigInMeta` is false', function() { + it('returns "raw" config if `storeConfigInMeta` is false', function () { let options = Object.assign({}, defaultOptions, { storeConfigInMeta: false }); let expected = JSON.stringify(config); let output = contentFor(config, defaultMatch, 'config-module', options); @@ -189,8 +189,8 @@ describe('ember-app-utils', function() { }); }); - describe('"app-boot"', function() { - it('returns application bootstrap snippet by default', function() { + describe('"app-boot"', function () { + it('returns application bootstrap snippet by default', function () { let output = contentFor(config, defaultMatch, 'app-boot', defaultOptions); expect(output, 'includes application bootstrap snippet').to.contain( @@ -198,7 +198,7 @@ describe('ember-app-utils', function() { ); }); - it('omits application bootstrap snippet if `autoRun` is false', function() { + it('omits application bootstrap snippet if `autoRun` is false', function () { let options = Object.assign({}, defaultOptions, { autoRun: false }); let output = contentFor(config, defaultMatch, 'app-boot', options); @@ -206,8 +206,8 @@ describe('ember-app-utils', function() { }); }); - describe('"test-body-footer"', function() { - it('returns ` diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index 275cba5ff3..44a7c58bca 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -28,6 +28,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", + "@ember/test-helpers": "^2.0.0-beta.4", "@glimmer/component": "^1.0.2", "@glimmer/tracking": "^1.0.2", "babel-eslint": "^10.1.0", @@ -42,7 +43,7 @@ "ember-export-application-global": "^2.0.1", "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^4.6.0", + "ember-qunit": "^5.0.0-beta.4", "ember-resolver": "^8.0.2", "ember-source": "~3.23.0-beta.1", "ember-source-channel-url": "^3.0.0", @@ -53,6 +54,7 @@ "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", + "qunit": "^2.11.0", "qunit-dom": "^1.5.0" }, "engines": { diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index cfe028d279..2f4fd1140f 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -28,6 +28,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", + "@ember/test-helpers": "^2.0.0-beta.4", "@glimmer/component": "^1.0.2", "@glimmer/tracking": "^1.0.2", "babel-eslint": "^10.1.0", @@ -42,7 +43,7 @@ "ember-export-application-global": "^2.0.1", "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^4.6.0", + "ember-qunit": "^5.0.0-beta.4", "ember-resolver": "^8.0.2", "ember-source": "~3.23.0-beta.1", "ember-source-channel-url": "^3.0.0", @@ -54,6 +55,7 @@ "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", + "qunit": "^2.11.0", "qunit-dom": "^1.5.0" }, "engines": { diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index 6181941400..55677ad386 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -21,6 +21,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", + "@ember/test-helpers": "^2.0.0-beta.4", "@glimmer/component": "^1.0.2", "@glimmer/tracking": "^1.0.2", "babel-eslint": "^10.1.0", @@ -39,7 +40,7 @@ "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^4.6.0", + "ember-qunit": "^5.0.0-beta.4", "ember-resolver": "^8.0.2", "ember-source": "~3.23.0-beta.1", "ember-template-lint": "^2.14.0", @@ -49,6 +50,7 @@ "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", + "qunit": "^2.11.0", "qunit-dom": "^1.5.0" }, "engines": { diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index 7582239919..6fc41a79cc 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -21,6 +21,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", + "@ember/test-helpers": "^2.0.0-beta.4", "@embroider/compat": "^0.27.0", "@embroider/core": "^0.27.0", "@embroider/webpack": "^0.27.0", @@ -42,7 +43,7 @@ "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^4.6.0", + "ember-qunit": "^5.0.0-beta.4", "ember-resolver": "^8.0.2", "ember-source": "~3.23.0-beta.1", "ember-template-lint": "^2.14.0", @@ -51,6 +52,7 @@ "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", + "qunit": "^2.11.0", "qunit-dom": "^1.5.0" }, "engines": { diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index ba8300e637..1dd4238bdd 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -21,6 +21,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", + "@ember/test-helpers": "^2.0.0-beta.4", "@embroider/compat": "^0.27.0", "@embroider/core": "^0.27.0", "@embroider/webpack": "^0.27.0", @@ -42,7 +43,7 @@ "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^4.6.0", + "ember-qunit": "^5.0.0-beta.4", "ember-resolver": "^8.0.2", "ember-source": "~3.23.0-beta.1", "ember-template-lint": "^2.14.0", @@ -52,6 +53,7 @@ "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", + "qunit": "^2.11.0", "qunit-dom": "^1.5.0" }, "engines": { diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 7217e7d173..a7d6cb2092 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -21,6 +21,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", + "@ember/test-helpers": "^2.0.0-beta.4", "@glimmer/component": "^1.0.2", "@glimmer/tracking": "^1.0.2", "babel-eslint": "^10.1.0", @@ -39,7 +40,7 @@ "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^4.6.0", + "ember-qunit": "^5.0.0-beta.4", "ember-resolver": "^8.0.2", "ember-source": "~3.23.0-beta.1", "ember-template-lint": "^2.14.0", @@ -48,6 +49,7 @@ "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", + "qunit": "^2.11.0", "qunit-dom": "^1.5.0" }, "engines": { diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 6181941400..55677ad386 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -21,6 +21,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", + "@ember/test-helpers": "^2.0.0-beta.4", "@glimmer/component": "^1.0.2", "@glimmer/tracking": "^1.0.2", "babel-eslint": "^10.1.0", @@ -39,7 +40,7 @@ "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^4.6.0", + "ember-qunit": "^5.0.0-beta.4", "ember-resolver": "^8.0.2", "ember-source": "~3.23.0-beta.1", "ember-template-lint": "^2.14.0", @@ -49,6 +50,7 @@ "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", + "qunit": "^2.11.0", "qunit-dom": "^1.5.0" }, "engines": { From 165c73f48aae493ad69c0ade2a6ef998b8b59bf5 Mon Sep 17 00:00:00 2001 From: Steve Calvert Date: Wed, 23 Sep 2020 08:50:56 -0700 Subject: [PATCH 554/818] Adding extra breathing room --- blueprints/app/files/tests/index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/blueprints/app/files/tests/index.html b/blueprints/app/files/tests/index.html index 00fd4c8bb4..0f191fece5 100644 --- a/blueprints/app/files/tests/index.html +++ b/blueprints/app/files/tests/index.html @@ -20,6 +20,7 @@ {{content-for "body"}} {{content-for "test-body"}} +
From 2936726edcdebc1715a5a858a0f18cf35a240655 Mon Sep 17 00:00:00 2001 From: Steve Calvert Date: Tue, 20 Oct 2020 16:46:31 -0700 Subject: [PATCH 555/818] Updating @ember/test-helpers to 2.0.0 --- blueprints/app/files/package.json | 2 +- tests/fixtures/addon/defaults/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/defaults/package.json | 2 +- tests/fixtures/app/embroider-no-welcome/package.json | 2 +- tests/fixtures/app/embroider/package.json | 2 +- tests/fixtures/app/npm/package.json | 2 +- tests/fixtures/app/yarn/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 668d592062..aba1c247e2 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -21,7 +21,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.0.0-beta.4<% if (embroider) { %>", + "@ember/test-helpers": "^2.0.0<% if (embroider) { %>", "@embroider/compat": "^0.27.0", "@embroider/core": "^0.27.0", "@embroider/webpack": "^0.27.0<% } %>", diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index 44a7c58bca..d62b30c3bf 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -28,7 +28,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.0.0-beta.4", + "@ember/test-helpers": "^2.0.0", "@glimmer/component": "^1.0.2", "@glimmer/tracking": "^1.0.2", "babel-eslint": "^10.1.0", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 2f4fd1140f..f4ba88c10d 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -28,7 +28,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.0.0-beta.4", + "@ember/test-helpers": "^2.0.0", "@glimmer/component": "^1.0.2", "@glimmer/tracking": "^1.0.2", "babel-eslint": "^10.1.0", diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index 55677ad386..5bf2ce1405 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -21,7 +21,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.0.0-beta.4", + "@ember/test-helpers": "^2.0.0", "@glimmer/component": "^1.0.2", "@glimmer/tracking": "^1.0.2", "babel-eslint": "^10.1.0", diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index 6fc41a79cc..2a616d2811 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -21,7 +21,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.0.0-beta.4", + "@ember/test-helpers": "^2.0.0", "@embroider/compat": "^0.27.0", "@embroider/core": "^0.27.0", "@embroider/webpack": "^0.27.0", diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index 1dd4238bdd..b32b5cdfee 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -21,7 +21,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.0.0-beta.4", + "@ember/test-helpers": "^2.0.0", "@embroider/compat": "^0.27.0", "@embroider/core": "^0.27.0", "@embroider/webpack": "^0.27.0", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index a7d6cb2092..b32ce1365d 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -21,7 +21,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.0.0-beta.4", + "@ember/test-helpers": "^2.0.0", "@glimmer/component": "^1.0.2", "@glimmer/tracking": "^1.0.2", "babel-eslint": "^10.1.0", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 55677ad386..5bf2ce1405 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -21,7 +21,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.0.0-beta.4", + "@ember/test-helpers": "^2.0.0", "@glimmer/component": "^1.0.2", "@glimmer/tracking": "^1.0.2", "babel-eslint": "^10.1.0", From 79580e149de06aaf5121d47da15e74398c7163a0 Mon Sep 17 00:00:00 2001 From: Steve Calvert Date: Wed, 21 Oct 2020 13:50:05 -0700 Subject: [PATCH 556/818] Updating qunit-dom to 1.6.0-beta.1 --- blueprints/app/files/package.json | 2 +- tests/fixtures/addon/defaults/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/defaults/package.json | 2 +- tests/fixtures/app/embroider-no-welcome/package.json | 2 +- tests/fixtures/app/embroider/package.json | 2 +- tests/fixtures/app/npm/package.json | 2 +- tests/fixtures/app/yarn/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index aba1c247e2..425894c0c1 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -54,7 +54,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "qunit": "^2.11.0", - "qunit-dom": "^1.5.0" + "qunit-dom": "^1.6.0-beta.1" }, "engines": { "node": "10.* || >= 12" diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index d62b30c3bf..e3fadcbbc1 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -55,7 +55,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "qunit": "^2.11.0", - "qunit-dom": "^1.5.0" + "qunit-dom": "^1.6.0-beta.1" }, "engines": { "node": "10.* || >= 12" diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index f4ba88c10d..45560b042e 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -56,7 +56,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "qunit": "^2.11.0", - "qunit-dom": "^1.5.0" + "qunit-dom": "^1.6.0-beta.1" }, "engines": { "node": "10.* || >= 12" diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index 5bf2ce1405..2ae4618dc6 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -51,7 +51,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "qunit": "^2.11.0", - "qunit-dom": "^1.5.0" + "qunit-dom": "^1.6.0-beta.1" }, "engines": { "node": "10.* || >= 12" diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index 2a616d2811..fa489436b8 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -53,7 +53,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "qunit": "^2.11.0", - "qunit-dom": "^1.5.0" + "qunit-dom": "^1.6.0-beta.1" }, "engines": { "node": "10.* || >= 12" diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index b32b5cdfee..27f6b9a226 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -54,7 +54,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "qunit": "^2.11.0", - "qunit-dom": "^1.5.0" + "qunit-dom": "^1.6.0-beta.1" }, "engines": { "node": "10.* || >= 12" diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index b32ce1365d..d1635932c9 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -50,7 +50,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "qunit": "^2.11.0", - "qunit-dom": "^1.5.0" + "qunit-dom": "^1.6.0-beta.1" }, "engines": { "node": "10.* || >= 12" diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 5bf2ce1405..2ae4618dc6 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -51,7 +51,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "qunit": "^2.11.0", - "qunit-dom": "^1.5.0" + "qunit-dom": "^1.6.0-beta.1" }, "engines": { "node": "10.* || >= 12" From a424c9c49a02c0c1f22b031e5db2bd028d77bc52 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 21 Oct 2020 19:01:41 -0400 Subject: [PATCH 557/818] Add v3.23.0-beta.1 to CHANGELOG.md. --- CHANGELOG.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bc4877003..9d65c43948 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # ember-cli Changelog +## v3.23.0-beta.1 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.22.0...v3.23.0-beta.1) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.22.0...v3.23.0-beta.1) + +#### Changelog + +- [#9340](https://github.com/ember-cli/ember-cli/pull/9340) Update blueprints with new testing configuration [@scalvert](https://github.com/scalvert) +- [#9361](https://github.com/ember-cli/ember-cli/pull/9361) / [#9364](https://github.com/ember-cli/ember-cli/pull/9364) / [#9365](https://github.com/ember-cli/ember-cli/pull/9365) Update dependencies to latest. [@rwjblue](https://github.com/rwjblue) +- [#9368](https://github.com/ember-cli/ember-cli/pull/9368) Update `markdown-it` to latest. [@rwjblue](https://github.com/rwjblue) +- [#9369](https://github.com/ember-cli/ember-cli/pull/9369) Update `ember-source` and `ember-data` for 3.23.0-beta's. [@rwjblue](https://github.com/rwjblue) + +Thank you to all who took the time to contribute! + ## v3.22.0 #### Blueprint Changes From 18a00189d43149258b6b38faa86e0d0a1c76b82a Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 21 Oct 2020 19:02:51 -0400 Subject: [PATCH 558/818] Release 3.23.0-beta.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1a7722c0e8..6907c7a399 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.22.0", + "version": "3.23.0-beta.1", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From c8bf7bbd7257f77818bb3c306d24a8cde7b9fd4c Mon Sep 17 00:00:00 2001 From: Steve Calvert Date: Wed, 21 Oct 2020 20:15:18 -0700 Subject: [PATCH 559/818] fix: Adds missing qunit-dom setup invocation --- blueprints/app/files/tests/test-helper.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/blueprints/app/files/tests/test-helper.js b/blueprints/app/files/tests/test-helper.js index 2302100167..959791ce73 100644 --- a/blueprints/app/files/tests/test-helper.js +++ b/blueprints/app/files/tests/test-helper.js @@ -1,8 +1,12 @@ import Application from '<%= modulePrefix %>/app'; import config from '<%= modulePrefix %>/config/environment'; +import * as QUnit from 'qunit'; import { setApplication } from '@ember/test-helpers'; +import { setup } from 'qunit-dom'; import { start } from 'ember-qunit'; setApplication(Application.create(config.APP)); +setup(QUnit.assert); + start(); From c2e3eb2ea88a7d2d2abfbb46d4cacaa9346eeedb Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Thu, 22 Oct 2020 11:36:50 -0400 Subject: [PATCH 560/818] Add v3.23.0-beta.2 to CHANGELOG.md. --- CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d65c43948..db33252ce3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # ember-cli Changelog + +## v3.23.0-beta.2 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.23.0-beta.1...v3.23.0-beta.2) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.23.0-beta.1...v3.23.0-beta.2) + +#### Changelog + +- [#9371](https://github.com/ember-cli/ember-cli/pull/9371) Adds missing `qunit-dom` setup invocation [@scalvert](https://github.com/scalvert) + +Thank you to all who took the time to contribute! + ## v3.23.0-beta.1 #### Blueprint Changes From 98fbd78917f374b7698f41b9cc0fc3c68b80d3ae Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Thu, 22 Oct 2020 11:42:39 -0400 Subject: [PATCH 561/818] Release 3.23.0-beta.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6907c7a399..4364777dfe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.23.0-beta.1", + "version": "3.23.0-beta.2", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From 5b0ce7dac59c20d9b7aa61202fd1a6d575763078 Mon Sep 17 00:00:00 2001 From: Raido Kuli Date: Fri, 23 Oct 2020 14:50:54 +0300 Subject: [PATCH 562/818] Add ember-page-title to app blueprint --- blueprints/app/files/app/templates/application.hbs | 2 ++ blueprints/app/files/package.json | 1 + tests/fixtures/addon/defaults/package.json | 1 + .../addon/defaults/tests/dummy/app/templates/application.hbs | 2 ++ tests/fixtures/addon/yarn/package.json | 1 + .../addon/yarn/tests/dummy/app/templates/application.hbs | 2 ++ tests/fixtures/app/defaults/app/templates/application.hbs | 2 ++ tests/fixtures/app/defaults/package.json | 1 + tests/fixtures/app/embroider-no-welcome/package.json | 1 + tests/fixtures/app/embroider/package.json | 1 + tests/fixtures/app/npm/app/templates/application.hbs | 2 ++ tests/fixtures/app/npm/package.json | 1 + tests/fixtures/app/yarn/app/templates/application.hbs | 2 ++ tests/fixtures/app/yarn/package.json | 1 + 14 files changed, 20 insertions(+) diff --git a/blueprints/app/files/app/templates/application.hbs b/blueprints/app/files/app/templates/application.hbs index e7e67e966a..78970cd25d 100644 --- a/blueprints/app/files/app/templates/application.hbs +++ b/blueprints/app/files/app/templates/application.hbs @@ -1,3 +1,5 @@ +{{page-title "<%= namespace %>"}} + <% if (welcome) { %>{{!-- The following component displays Ember's default welcome message. --}} {{!-- Feel free to remove this! --}} diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 425894c0c1..4d3274cb6f 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -44,6 +44,7 @@ "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^5.0.0-beta.4", + "ember-page-title": "^6.0.2", "ember-resolver": "^8.0.2", "ember-source": "~3.23.0-beta.1", "ember-template-lint": "^2.14.0<% if (welcome) { %>", diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index e3fadcbbc1..7c9d3b7c7d 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -43,6 +43,7 @@ "ember-export-application-global": "^2.0.1", "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", + "ember-page-title": "^6.0.2", "ember-qunit": "^5.0.0-beta.4", "ember-resolver": "^8.0.2", "ember-source": "~3.23.0-beta.1", diff --git a/tests/fixtures/addon/defaults/tests/dummy/app/templates/application.hbs b/tests/fixtures/addon/defaults/tests/dummy/app/templates/application.hbs index 5230580f82..1001d149e1 100644 --- a/tests/fixtures/addon/defaults/tests/dummy/app/templates/application.hbs +++ b/tests/fixtures/addon/defaults/tests/dummy/app/templates/application.hbs @@ -1,3 +1,5 @@ +{{page-title "Dummy"}} +

Welcome to Ember

{{outlet}} \ No newline at end of file diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 45560b042e..0a82a942af 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -43,6 +43,7 @@ "ember-export-application-global": "^2.0.1", "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", + "ember-page-title": "^6.0.2", "ember-qunit": "^5.0.0-beta.4", "ember-resolver": "^8.0.2", "ember-source": "~3.23.0-beta.1", diff --git a/tests/fixtures/addon/yarn/tests/dummy/app/templates/application.hbs b/tests/fixtures/addon/yarn/tests/dummy/app/templates/application.hbs index 7b1b1040fe..ef465c353f 100644 --- a/tests/fixtures/addon/yarn/tests/dummy/app/templates/application.hbs +++ b/tests/fixtures/addon/yarn/tests/dummy/app/templates/application.hbs @@ -1,3 +1,5 @@ +{{page-title "Dummy"}} + {{!-- The following component displays Ember's default welcome message. --}} {{!-- Feel free to remove this! --}} diff --git a/tests/fixtures/app/defaults/app/templates/application.hbs b/tests/fixtures/app/defaults/app/templates/application.hbs index 7b1b1040fe..c50aa5fb7c 100644 --- a/tests/fixtures/app/defaults/app/templates/application.hbs +++ b/tests/fixtures/app/defaults/app/templates/application.hbs @@ -1,3 +1,5 @@ +{{page-title "Foo"}} + {{!-- The following component displays Ember's default welcome message. --}} {{!-- Feel free to remove this! --}} diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index 2ae4618dc6..db6c2779d3 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -41,6 +41,7 @@ "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^5.0.0-beta.4", + "ember-page-title": "^6.0.2", "ember-resolver": "^8.0.2", "ember-source": "~3.23.0-beta.1", "ember-template-lint": "^2.14.0", diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index fa489436b8..3407e4121a 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -44,6 +44,7 @@ "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^5.0.0-beta.4", + "ember-page-title": "^6.0.2", "ember-resolver": "^8.0.2", "ember-source": "~3.23.0-beta.1", "ember-template-lint": "^2.14.0", diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index 27f6b9a226..1fd1d5cc04 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -44,6 +44,7 @@ "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^5.0.0-beta.4", + "ember-page-title": "^6.0.2", "ember-resolver": "^8.0.2", "ember-source": "~3.23.0-beta.1", "ember-template-lint": "^2.14.0", diff --git a/tests/fixtures/app/npm/app/templates/application.hbs b/tests/fixtures/app/npm/app/templates/application.hbs index 5230580f82..76f2c5e009 100644 --- a/tests/fixtures/app/npm/app/templates/application.hbs +++ b/tests/fixtures/app/npm/app/templates/application.hbs @@ -1,3 +1,5 @@ +{{page-title "Foo"}} +

Welcome to Ember

{{outlet}} \ No newline at end of file diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index d1635932c9..77071a8ee8 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -41,6 +41,7 @@ "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^5.0.0-beta.4", + "ember-page-title": "^6.0.2", "ember-resolver": "^8.0.2", "ember-source": "~3.23.0-beta.1", "ember-template-lint": "^2.14.0", diff --git a/tests/fixtures/app/yarn/app/templates/application.hbs b/tests/fixtures/app/yarn/app/templates/application.hbs index 7b1b1040fe..c50aa5fb7c 100644 --- a/tests/fixtures/app/yarn/app/templates/application.hbs +++ b/tests/fixtures/app/yarn/app/templates/application.hbs @@ -1,3 +1,5 @@ +{{page-title "Foo"}} + {{!-- The following component displays Ember's default welcome message. --}} {{!-- Feel free to remove this! --}} diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 2ae4618dc6..db6c2779d3 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -41,6 +41,7 @@ "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^5.0.0-beta.4", + "ember-page-title": "^6.0.2", "ember-resolver": "^8.0.2", "ember-source": "~3.23.0-beta.1", "ember-template-lint": "^2.14.0", From 9387a8e644b5b579e1e5a3129788157980a4cc98 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 1 Nov 2020 04:25:20 +0000 Subject: [PATCH 563/818] Bump eslint-config-prettier from 6.13.0 to 6.15.0 (#9378) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 4364777dfe..cf7c82a749 100644 --- a/package.json +++ b/package.json @@ -140,7 +140,7 @@ "ember-cli-blueprint-test-helpers": "^0.19.2", "ember-cli-internal-test-helpers": "^0.9.1", "eslint": "^7.11.0", - "eslint-config-prettier": "^6.13.0", + "eslint-config-prettier": "^6.15.0", "eslint-plugin-chai-expect": "^2.2.0", "eslint-plugin-mocha": "^8.0.0", "eslint-plugin-node": "^11.1.0", diff --git a/yarn.lock b/yarn.lock index c6a1ee74e3..61db8b154e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2617,10 +2617,10 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= -eslint-config-prettier@^6.13.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.13.0.tgz#207d88796b5624e5bb815bbbdfc5891ceb9ebffa" - integrity sha512-LcT0i0LSmnzqK2t764pyIt7kKH2AuuqKRTtJTdddWxOiUja9HdG5GXBVF2gmCTvVYWVsTu8J2MhJLVGRh+pj8w== +eslint-config-prettier@^6.15.0: + version "6.15.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz#7f93f6cb7d45a92f1537a70ecc06366e1ac6fed9" + integrity sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw== dependencies: get-stdin "^6.0.0" From 6ae31ae94a1d363b2f46aa4b895ba7dfc68028ad Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 1 Nov 2020 05:27:12 +0000 Subject: [PATCH 564/818] Bump execa from 4.0.3 to 4.1.0 (#9380) --- package.json | 2 +- yarn.lock | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index cf7c82a749..3261bf0604 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "ember-cli-string-utils": "^1.1.0", "ember-source-channel-url": "^3.0.0", "ensure-posix-path": "^1.1.1", - "execa": "^4.0.3", + "execa": "^4.1.0", "exit": "^0.1.2", "express": "^4.17.1", "filesize": "^6.1.0", diff --git a/yarn.lock b/yarn.lock index 61db8b154e..c64e8aeb0e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2805,7 +2805,7 @@ exec-sh@^0.3.2: resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.4.tgz#3a018ceb526cc6f6df2bb504b2bfe8e3a4934ec5" integrity sha512-sEFIkc61v75sWeOe72qyrqg2Qg0OuLESziUDk/O/z2qgS15y2gWVFrI6f2Qn/qw/0/NCfCEsmNA4zOjkwEZT1A== -execa@4.0.3, execa@^4.0.2, execa@^4.0.3: +execa@4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/execa/-/execa-4.0.3.tgz#0a34dabbad6d66100bd6f2c576c8669403f317f2" integrity sha512-WFDXGHckXPWZX19t1kCsXzOpqX9LWYNqn4C+HqZlk/V0imTkzJZqf87ZBhvpHaftERYknpk0fjSylnXVlVgI0A== @@ -2833,6 +2833,21 @@ execa@^1.0.0: signal-exit "^3.0.0" strip-eof "^1.0.0" +execa@^4.0.2, execa@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" + integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== + dependencies: + cross-spawn "^7.0.0" + get-stream "^5.0.0" + human-signals "^1.1.1" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.0" + onetime "^5.1.0" + signal-exit "^3.0.2" + strip-final-newline "^2.0.0" + exists-sync@0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/exists-sync/-/exists-sync-0.0.3.tgz#b910000bedbb113b378b82f5f5a7638107622dcf" From 84ab893d7951baa93a60924d335b31adfe68c7dc Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 1 Nov 2020 06:30:49 +0000 Subject: [PATCH 565/818] Bump release-it from 14.2.0 to 14.2.1 (#9375) --- package.json | 2 +- yarn.lock | 73 +++++++++++++++++++++------------------------------- 2 files changed, 30 insertions(+), 45 deletions(-) diff --git a/package.json b/package.json index 3261bf0604..9656828a52 100644 --- a/package.json +++ b/package.json @@ -152,7 +152,7 @@ "nock": "^13.0.4", "nyc": "^15.1.0", "prettier": "2.1.2", - "release-it": "^14.2.0", + "release-it": "^14.2.1", "rimraf": "^3.0.2", "strip-ansi": "^6.0.0", "supertest": "^5.0.0", diff --git a/yarn.lock b/yarn.lock index c64e8aeb0e..c19ecf79f2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -349,10 +349,10 @@ once "^1.4.0" universal-user-agent "^5.0.0" -"@octokit/rest@18.0.6", "@octokit/rest@^18.0.6": - version "18.0.6" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.6.tgz#76c274f1a68f40741a131768ef483f041e7b98b6" - integrity sha512-ES4lZBKPJMX/yUoQjAZiyFjei9pJ4lTTfb9k7OtYoUzKPDLl/M8jiHqt6qeSauyU4eZGLw0sgP1WiQl9FYeM5w== +"@octokit/rest@18.0.7", "@octokit/rest@^18.0.6": + version "18.0.7" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.7.tgz#236514417084334bc0ef62416a19f6030db3d907" + integrity sha512-ctz0cMIb3c6gO2ADto+A1r4JI+2hkUkDcD1JRunkhk1SOUrNGQcQ+9FBqZ6UekS1Z/c3xPvF0OoLtX2cQ118+A== dependencies: "@octokit/core" "^3.0.0" "@octokit/plugin-paginate-rest" "^2.2.0" @@ -378,10 +378,10 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== -"@sindresorhus/is@^3.1.1": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-3.1.2.tgz#548650de521b344e3781fbdb0ece4aa6f729afb8" - integrity sha512-JiX9vxoKMmu8Y3Zr2RVathBL1Cdu4Nt4MuNWemt1Nc06A0RAin9c5FArkhGsyMBWfCu4zj+9b+GxtjAnE4qqLQ== +"@sindresorhus/is@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.0.0.tgz#2ff674e9611b45b528896d820d3d7a812de2f0e4" + integrity sha512-FyD2meJpDPjyNQejSjvnhpgI/azsQkA4lGbuu5BQZfjvJ9cbRZXzeWL2HceCekW4lixO9JPesIIQkSoLjeJHNQ== "@szmarczak/http-timer@^1.1.2": version "1.1.2" @@ -2805,10 +2805,10 @@ exec-sh@^0.3.2: resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.4.tgz#3a018ceb526cc6f6df2bb504b2bfe8e3a4934ec5" integrity sha512-sEFIkc61v75sWeOe72qyrqg2Qg0OuLESziUDk/O/z2qgS15y2gWVFrI6f2Qn/qw/0/NCfCEsmNA4zOjkwEZT1A== -execa@4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/execa/-/execa-4.0.3.tgz#0a34dabbad6d66100bd6f2c576c8669403f317f2" - integrity sha512-WFDXGHckXPWZX19t1kCsXzOpqX9LWYNqn4C+HqZlk/V0imTkzJZqf87ZBhvpHaftERYknpk0fjSylnXVlVgI0A== +execa@4.1.0, execa@^4.0.2, execa@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" + integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== dependencies: cross-spawn "^7.0.0" get-stream "^5.0.0" @@ -2833,21 +2833,6 @@ execa@^1.0.0: signal-exit "^3.0.0" strip-eof "^1.0.0" -execa@^4.0.2, execa@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" - integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== - dependencies: - cross-spawn "^7.0.0" - get-stream "^5.0.0" - human-signals "^1.1.1" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.0" - onetime "^5.1.0" - signal-exit "^3.0.2" - strip-final-newline "^2.0.0" - exists-sync@0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/exists-sync/-/exists-sync-0.0.3.tgz#b910000bedbb113b378b82f5f5a7638107622dcf" @@ -3523,10 +3508,10 @@ git-up@^4.0.0: is-ssh "^1.3.0" parse-url "^5.0.0" -git-url-parse@11.3.0: - version "11.3.0" - resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-11.3.0.tgz#1515b4574c4eb2efda7d25cc50b29ce8beaefaae" - integrity sha512-i3XNa8IKmqnUqWBcdWBjOcnyZYfN3C1WRvnKI6ouFWwsXCZEnlgbwbm55ZpJ3OJMhfEP/ryFhqW8bBhej3C5Ug== +git-url-parse@11.4.0: + version "11.4.0" + resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-11.4.0.tgz#f2bb1f2b00f05552540e95a62e31399a639a6aa6" + integrity sha512-KlIa5jvMYLjXMQXkqpFzobsyD/V2K5DRHl5OAf+6oDFPlPLxrGDVQlIdI63c4/Kt6kai4kALENSALlzTGST3GQ== dependencies: git-up "^4.0.0" @@ -3625,12 +3610,12 @@ globby@11.0.1: merge2 "^1.3.0" slash "^3.0.0" -got@11.7.0: - version "11.7.0" - resolved "https://registry.yarnpkg.com/got/-/got-11.7.0.tgz#a386360305571a74548872e674932b4ef70d3b24" - integrity sha512-7en2XwH2MEqOsrK0xaKhbWibBoZqy+f1RSUoIeF1BLcnf+pyQdDsljWMfmOh+QKJwuvDIiKx38GtPh5wFdGGjg== +got@11.8.0: + version "11.8.0" + resolved "https://registry.yarnpkg.com/got/-/got-11.8.0.tgz#be0920c3586b07fd94add3b5b27cb28f49e6545f" + integrity sha512-k9noyoIIY9EejuhaBNLyZ31D5328LeqnyPNXJQb2XlJZcKakLqN5m6O/ikhq/0lw56kUYS54fVm+D1x57YC9oQ== dependencies: - "@sindresorhus/is" "^3.1.1" + "@sindresorhus/is" "^4.0.0" "@szmarczak/http-timer" "^4.0.5" "@types/cacheable-request" "^6.0.1" "@types/responselike" "^1.0.0" @@ -6195,24 +6180,24 @@ registry-url@^5.0.0: dependencies: rc "^1.2.8" -release-it@^14.2.0: - version "14.2.0" - resolved "https://registry.yarnpkg.com/release-it/-/release-it-14.2.0.tgz#395804c3b14893cd32ae5e17b7b995906c44f7ea" - integrity sha512-34m8YlmZOUs+/mJhiVx11hcJEi67CAxtqqWXGGszc0uoEUdojUNTm1cWCEW/kuJbv6bMhmb8jP8B/8qmGjiKyQ== +release-it@^14.2.1: + version "14.2.1" + resolved "https://registry.yarnpkg.com/release-it/-/release-it-14.2.1.tgz#e3d7b6daee45162a6fe903ef1b1b022a0d25c325" + integrity sha512-zHXJjU2eOvVcbXTQSfgNC9DcDU7WgTc9qappBFfGRDicK//Bqt1KaOAEhCS6EZ9u4v7YbWBRbUejSrVXOLfCVQ== dependencies: "@iarna/toml" "2.2.5" - "@octokit/rest" "18.0.6" + "@octokit/rest" "18.0.7" async-retry "1.3.1" chalk "4.1.0" cosmiconfig "7.0.0" debug "4.2.0" deprecated-obj "2.0.0" - execa "4.0.3" + execa "4.1.0" find-up "5.0.0" form-data "3.0.0" - git-url-parse "11.3.0" + git-url-parse "11.4.0" globby "11.0.1" - got "11.7.0" + got "11.8.0" import-cwd "3.0.0" inquirer "7.3.3" is-ci "2.0.0" From 5651b93d1d805cbb18b8573addf912284691f33e Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 1 Nov 2020 07:33:20 +0000 Subject: [PATCH 566/818] Bump fs-extra from 9.0.0 to 9.0.1 (#9374) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 9656828a52..704d900ff4 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "find-up": "^5.0.0", "find-yarn-workspace-root": "^2.0.0", "fixturify-project": "^2.1.0", - "fs-extra": "^9.0.0", + "fs-extra": "^9.0.1", "fs-tree-diff": "^2.0.1", "get-caller-file": "^2.0.5", "git-repo-info": "^2.1.1", diff --git a/yarn.lock b/yarn.lock index c19ecf79f2..67f9ffdc2e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3342,10 +3342,10 @@ fs-extra@^8.0.1, fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.0.tgz#b6afc31036e247b2466dc99c29ae797d5d4580a3" - integrity sha512-pmEYSk3vYsG/bF651KPUXZ+hvjpgWYw/Gc7W9NFUe3ZVLczKKWIij3IKpOrQcdw4TILtibFslZ0UmR8Vvzig4g== +fs-extra@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc" + integrity sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ== dependencies: at-least-node "^1.0.0" graceful-fs "^4.2.0" From 708cae428374e3ae949f27ea9ba2f8bc36547bfd Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 1 Nov 2020 08:45:46 +0000 Subject: [PATCH 567/818] Bump workerpool from 6.0.2 to 6.0.3 (#9381) --- package.json | 2 +- yarn.lock | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 704d900ff4..5a4386d7aa 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ "uuid": "^8.3.1", "walk-sync": "^2.2.0", "watch-detector": "^1.0.0", - "workerpool": "^6.0.2", + "workerpool": "^6.0.3", "yam": "^1.0.0" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index 67f9ffdc2e..34fd2b065c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7693,7 +7693,7 @@ wordwrap@^0.0.3, wordwrap@~0.0.2: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= -workerpool@6.0.2, workerpool@^6.0.2: +workerpool@6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.0.2.tgz#e241b43d8d033f1beb52c7851069456039d1d438" integrity sha512-DSNyvOpFKrNusaaUwk+ej6cBj1bmhLcBfj80elGk+ZIo5JSkq+unB1dLKEOcNfJDZgjGICfhQ0Q5TbP0PvF4+Q== @@ -7707,6 +7707,11 @@ workerpool@^3.1.1: object-assign "4.1.1" rsvp "^4.8.4" +workerpool@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.0.3.tgz#3f80ba4d914fe7bb8d933628c26e5d7ff820c703" + integrity sha512-meU8ZzO+ipcx/njxtKUcbu2K95085q5WYDo8fR6PMW3hCY4driteIsNsEowYV7dzOtvq0HotUKsReJkK8gKXgg== + wrap-ansi@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" From d988c41a0c254e53f5cb87014a1778c1e00b869b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 1 Nov 2020 09:56:47 +0000 Subject: [PATCH 568/818] Bump resolve-package-path from 3.0.1 to 3.1.0 (#9379) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 5a4386d7aa..656133a31e 100644 --- a/package.json +++ b/package.json @@ -113,7 +113,7 @@ "promise.hash.helper": "^1.0.7", "quick-temp": "^0.1.8", "resolve": "^1.17.0", - "resolve-package-path": "^3.0.1", + "resolve-package-path": "^3.1.0", "sane": "^4.1.0", "semver": "^7.3.2", "silent-error": "^1.1.1", diff --git a/yarn.lock b/yarn.lock index 34fd2b065c..c11ca41e1c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6307,10 +6307,10 @@ resolve-package-path@^1.0.11: path-root "^0.1.1" resolve "^1.10.0" -resolve-package-path@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/resolve-package-path/-/resolve-package-path-3.0.1.tgz#f6971030c2609cce413460b31775bd957010092f" - integrity sha512-IsMa7xljkYdj+oF4vdxjiaZ0E2itynPaF7/5sY8keuO00vL9lsA5FRjy1+e2khzxEl4WUJIQMDgmhkgZw9h8RQ== +resolve-package-path@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/resolve-package-path/-/resolve-package-path-3.1.0.tgz#35faaa5d54a9c7dd481eb7c4b2a44410c9c763d8" + integrity sha512-2oC2EjWbMJwvSN6Z7DbDfJMnD8MYEouaLn5eIX0j8XwPsYCVIyY9bbnX88YHVkbr8XHqvZrYbxaLPibfTYKZMA== dependencies: path-root "^0.1.1" resolve "^1.17.0" From 84d48714b3ea44c22a3129292a52fbb03bfaa8ab Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 1 Nov 2020 12:49:49 +0000 Subject: [PATCH 569/818] Bump temp from 0.9.1 to 0.9.2 (#9377) --- package.json | 2 +- yarn.lock | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 656133a31e..a8eee0c01e 100644 --- a/package.json +++ b/package.json @@ -119,7 +119,7 @@ "silent-error": "^1.1.1", "sort-package-json": "^1.46.0", "symlink-or-copy": "^1.3.1", - "temp": "0.9.1", + "temp": "0.9.2", "testem": "^3.2.0", "tiny-lr": "^2.0.0", "tree-sync": "^2.1.0", diff --git a/yarn.lock b/yarn.lock index c11ca41e1c..12a28ea791 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7067,11 +7067,12 @@ tap-parser@^7.0.0: js-yaml "^3.2.7" minipass "^2.2.0" -temp@0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/temp/-/temp-0.9.1.tgz#2d666114fafa26966cd4065996d7ceedd4dd4697" - integrity sha512-WMuOgiua1xb5R56lE0eH6ivpVmg/lq2OHm4+LtT/xtEtPQ+sz6N3bBM6WZ5FvO1lO4IKIOb43qnhoc4qxP5OeA== +temp@0.9.2: + version "0.9.2" + resolved "https://registry.yarnpkg.com/temp/-/temp-0.9.2.tgz#06728e6e4b847e3ea5579c69c44bcc3ee6a47100" + integrity sha512-KLVd6CXeUYsqmI/LBWDLg3bFkdZPg0Xr/Gn79GUuPNiISzp6v/EKUaCOrxqeH1w/wVNmrljyDRgKxhZV9JzyJA== dependencies: + mkdirp "^0.5.1" rimraf "~2.6.2" term-size@^2.1.0: From 1a492bc7306b0b199e620d6831df0f3756f5847d Mon Sep 17 00:00:00 2001 From: Raido Kuli Date: Tue, 3 Nov 2020 20:47:38 +0200 Subject: [PATCH 570/818] Bump ember-page-title to v6.0.3 --- blueprints/app/files/package.json | 2 +- tests/fixtures/addon/defaults/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/defaults/package.json | 2 +- tests/fixtures/app/embroider-no-welcome/package.json | 2 +- tests/fixtures/app/embroider/package.json | 2 +- tests/fixtures/app/npm/package.json | 2 +- tests/fixtures/app/yarn/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 4d3274cb6f..1f25953733 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -44,7 +44,7 @@ "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^5.0.0-beta.4", - "ember-page-title": "^6.0.2", + "ember-page-title": "^6.0.3", "ember-resolver": "^8.0.2", "ember-source": "~3.23.0-beta.1", "ember-template-lint": "^2.14.0<% if (welcome) { %>", diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index 7c9d3b7c7d..c8d7de86f3 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -43,7 +43,7 @@ "ember-export-application-global": "^2.0.1", "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", - "ember-page-title": "^6.0.2", + "ember-page-title": "^6.0.3", "ember-qunit": "^5.0.0-beta.4", "ember-resolver": "^8.0.2", "ember-source": "~3.23.0-beta.1", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 0a82a942af..44f375ad2c 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -43,7 +43,7 @@ "ember-export-application-global": "^2.0.1", "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", - "ember-page-title": "^6.0.2", + "ember-page-title": "^6.0.3", "ember-qunit": "^5.0.0-beta.4", "ember-resolver": "^8.0.2", "ember-source": "~3.23.0-beta.1", diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index db6c2779d3..26d5b9164d 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -41,7 +41,7 @@ "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^5.0.0-beta.4", - "ember-page-title": "^6.0.2", + "ember-page-title": "^6.0.3", "ember-resolver": "^8.0.2", "ember-source": "~3.23.0-beta.1", "ember-template-lint": "^2.14.0", diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index 3407e4121a..51095176c5 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -44,7 +44,7 @@ "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^5.0.0-beta.4", - "ember-page-title": "^6.0.2", + "ember-page-title": "^6.0.3", "ember-resolver": "^8.0.2", "ember-source": "~3.23.0-beta.1", "ember-template-lint": "^2.14.0", diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index 1fd1d5cc04..1ebbfbf619 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -44,7 +44,7 @@ "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^5.0.0-beta.4", - "ember-page-title": "^6.0.2", + "ember-page-title": "^6.0.3", "ember-resolver": "^8.0.2", "ember-source": "~3.23.0-beta.1", "ember-template-lint": "^2.14.0", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 77071a8ee8..3c588d03bb 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -41,7 +41,7 @@ "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^5.0.0-beta.4", - "ember-page-title": "^6.0.2", + "ember-page-title": "^6.0.3", "ember-resolver": "^8.0.2", "ember-source": "~3.23.0-beta.1", "ember-template-lint": "^2.14.0", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index db6c2779d3..26d5b9164d 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -41,7 +41,7 @@ "ember-load-initializers": "^2.1.1", "ember-maybe-import-regenerator": "^0.1.6", "ember-qunit": "^5.0.0-beta.4", - "ember-page-title": "^6.0.2", + "ember-page-title": "^6.0.3", "ember-resolver": "^8.0.2", "ember-source": "~3.23.0-beta.1", "ember-template-lint": "^2.14.0", From 56eb4466f23fde8c2f18439734f5e6aabaec4eb7 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 1 Dec 2020 04:44:17 +0000 Subject: [PATCH 571/818] Bump @babel/core from 7.12.3 to 7.12.9 (#9400) --- package.json | 2 +- yarn.lock | 84 ++++++++++++++++++++++++++-------------------------- 2 files changed, 43 insertions(+), 43 deletions(-) diff --git a/package.json b/package.json index a8eee0c01e..0a15b22709 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "test:slow": "node --unhandled-rejections=strict tests/runner slow" }, "dependencies": { - "@babel/core": "^7.12.3", + "@babel/core": "^7.12.9", "@babel/plugin-transform-modules-amd": "^7.12.1", "amd-name-resolver": "^1.3.1", "babel-plugin-module-resolver": "^4.0.0", diff --git a/yarn.lock b/yarn.lock index 12a28ea791..f4c63f1342 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,19 +9,19 @@ dependencies: "@babel/highlight" "^7.10.4" -"@babel/core@^7.12.0", "@babel/core@^7.12.3", "@babel/core@^7.3.4", "@babel/core@^7.7.5": - version "7.12.3" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.3.tgz#1b436884e1e3bff6fb1328dc02b208759de92ad8" - integrity sha512-0qXcZYKZp3/6N2jKYVxZv0aNCsxTSVCiK72DTiTYZAu7sjg73W0/aynWjMbiGd87EQL4WyA8reiJVh92AVla9g== +"@babel/core@^7.12.0", "@babel/core@^7.12.9", "@babel/core@^7.3.4", "@babel/core@^7.7.5": + version "7.12.9" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.9.tgz#fd450c4ec10cdbb980e2928b7aa7a28484593fc8" + integrity sha512-gTXYh3M5wb7FRXQy+FErKFAv90BnlOuNn1QkCK2lREoPAjrQCO49+HVSrFoe5uakFAF5eenS75KbO2vQiLrTMQ== dependencies: "@babel/code-frame" "^7.10.4" - "@babel/generator" "^7.12.1" + "@babel/generator" "^7.12.5" "@babel/helper-module-transforms" "^7.12.1" - "@babel/helpers" "^7.12.1" - "@babel/parser" "^7.12.3" - "@babel/template" "^7.10.4" - "@babel/traverse" "^7.12.1" - "@babel/types" "^7.12.1" + "@babel/helpers" "^7.12.5" + "@babel/parser" "^7.12.7" + "@babel/template" "^7.12.7" + "@babel/traverse" "^7.12.9" + "@babel/types" "^7.12.7" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.1" @@ -31,12 +31,12 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.1.tgz#0d70be32bdaa03d7c51c8597dda76e0df1f15468" - integrity sha512-DB+6rafIdc9o72Yc3/Ph5h+6hUjeOp66pF0naQBgUFFuPqzQwIlPTm3xZR7YNvduIMtkDIj2t21LSQwnbCrXvg== +"@babel/generator@^7.12.5": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.5.tgz#a2c50de5c8b6d708ab95be5e6053936c1884a4de" + integrity sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A== dependencies: - "@babel/types" "^7.12.1" + "@babel/types" "^7.12.5" jsesc "^2.5.1" source-map "^0.5.0" @@ -126,14 +126,14 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== -"@babel/helpers@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.12.1.tgz#8a8261c1d438ec18cb890434df4ec768734c1e79" - integrity sha512-9JoDSBGoWtmbay98efmT2+mySkwjzeFeAL9BuWNoVQpkPFQF8SIIFUfY5os9u8wVzglzoiPRSW7cuJmBDUt43g== +"@babel/helpers@^7.12.5": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.12.5.tgz#1a1ba4a768d9b58310eda516c449913fe647116e" + integrity sha512-lgKGMQlKqA8meJqKsW6rUnc4MdUk35Ln0ATDqdM1a/UpARODdI4j5Y5lVfUScnSNkJcdCRAaWkspykNoFg9sJA== dependencies: "@babel/template" "^7.10.4" - "@babel/traverse" "^7.12.1" - "@babel/types" "^7.12.1" + "@babel/traverse" "^7.12.5" + "@babel/types" "^7.12.5" "@babel/highlight@^7.10.4": version "7.10.4" @@ -144,10 +144,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.10.4", "@babel/parser@^7.12.1", "@babel/parser@^7.12.3", "@babel/parser@^7.7.5": - version "7.12.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.3.tgz#a305415ebe7a6c7023b40b5122a0662d928334cd" - integrity sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw== +"@babel/parser@^7.12.7", "@babel/parser@^7.7.5": + version "7.12.7" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.7.tgz#fee7b39fe809d0e73e5b25eecaf5780ef3d73056" + integrity sha512-oWR02Ubp4xTLCAqPRiNIuMVgNO5Aif/xpXtabhzW2HWUD47XJsAB4Zd/Rg30+XeQA3juXigV7hlquOTmwqLiwg== "@babel/plugin-transform-modules-amd@^7.12.1": version "7.12.1" @@ -166,34 +166,34 @@ core-js "^2.6.5" regenerator-runtime "^0.13.4" -"@babel/template@^7.10.4", "@babel/template@^7.7.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.10.4.tgz#3251996c4200ebc71d1a8fc405fba940f36ba278" - integrity sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA== +"@babel/template@^7.10.4", "@babel/template@^7.12.7", "@babel/template@^7.7.4": + version "7.12.7" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.7.tgz#c817233696018e39fbb6c491d2fb684e05ed43bc" + integrity sha512-GkDzmHS6GV7ZeXfJZ0tLRBhZcMcY0/Lnb+eEbXDBfCAcZCjrZKe6p3J4we/D24O9Y8enxWAg1cWwof59yLh2ow== dependencies: "@babel/code-frame" "^7.10.4" - "@babel/parser" "^7.10.4" - "@babel/types" "^7.10.4" + "@babel/parser" "^7.12.7" + "@babel/types" "^7.12.7" -"@babel/traverse@^7.12.1", "@babel/traverse@^7.7.4": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.1.tgz#941395e0c5cc86d5d3e75caa095d3924526f0c1e" - integrity sha512-MA3WPoRt1ZHo2ZmoGKNqi20YnPt0B1S0GTZEPhhd+hw2KGUzBlHuVunj6K4sNuK+reEvyiPwtp0cpaqLzJDmAw== +"@babel/traverse@^7.12.1", "@babel/traverse@^7.12.5", "@babel/traverse@^7.12.9", "@babel/traverse@^7.7.4": + version "7.12.9" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.9.tgz#fad26c972eabbc11350e0b695978de6cc8e8596f" + integrity sha512-iX9ajqnLdoU1s1nHt36JDI9KG4k+vmI8WgjK5d+aDTwQbL2fUnzedNedssA645Ede3PM2ma1n8Q4h2ohwXgMXw== dependencies: "@babel/code-frame" "^7.10.4" - "@babel/generator" "^7.12.1" + "@babel/generator" "^7.12.5" "@babel/helper-function-name" "^7.10.4" "@babel/helper-split-export-declaration" "^7.11.0" - "@babel/parser" "^7.12.1" - "@babel/types" "^7.12.1" + "@babel/parser" "^7.12.7" + "@babel/types" "^7.12.7" debug "^4.1.0" globals "^11.1.0" lodash "^4.17.19" -"@babel/types@^7.10.4", "@babel/types@^7.11.0", "@babel/types@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.1.tgz#e109d9ab99a8de735be287ee3d6a9947a190c4ae" - integrity sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA== +"@babel/types@^7.10.4", "@babel/types@^7.11.0", "@babel/types@^7.12.1", "@babel/types@^7.12.5", "@babel/types@^7.12.7": + version "7.12.7" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.7.tgz#6039ff1e242640a29452c9ae572162ec9a8f5d13" + integrity sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ== dependencies: "@babel/helper-validator-identifier" "^7.10.4" lodash "^4.17.19" From 242d32d3aec091e74d61314bce51bbe1ea3cd1a5 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 1 Dec 2020 05:46:00 +0000 Subject: [PATCH 572/818] Bump resolve from 1.17.0 to 1.19.0 (#9396) --- package.json | 2 +- yarn.lock | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 0a15b22709..7068003307 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,7 @@ "promise-map-series": "^0.3.0", "promise.hash.helper": "^1.0.7", "quick-temp": "^0.1.8", - "resolve": "^1.17.0", + "resolve": "^1.19.0", "resolve-package-path": "^3.1.0", "sane": "^4.1.0", "semver": "^7.3.2", diff --git a/yarn.lock b/yarn.lock index f4c63f1342..5c5fa8b033 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4126,6 +4126,13 @@ is-ci@2.0.0, is-ci@^2.0.0: dependencies: ci-info "^2.0.0" +is-core-module@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" + integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== + dependencies: + has "^1.0.3" + is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -6328,11 +6335,12 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.1, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.3.2: - version "1.17.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" - integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.1, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.19.0, resolve@^1.3.2: + version "1.19.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" + integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== dependencies: + is-core-module "^2.1.0" path-parse "^1.0.6" responselike@^1.0.2: From 3990b5c069fe8ec8085b8702ce2a62ebe63ea317 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 1 Dec 2020 06:59:24 +0000 Subject: [PATCH 573/818] Bump console-ui from 3.1.1 to 3.1.2 (#9398) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 7068003307..5f3de221fc 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "clean-base-url": "^1.0.0", "compression": "^1.7.4", "configstore": "^5.0.1", - "console-ui": "^3.1.1", + "console-ui": "^3.1.2", "core-object": "^3.1.5", "dag-map": "^2.0.2", "diff": "^4.0.2", diff --git a/yarn.lock b/yarn.lock index 5c5fa8b033..e2a0cdf2ee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1968,10 +1968,10 @@ console-control-strings@^1.0.0, console-control-strings@~1.1.0: resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= -console-ui@^3.0.4, console-ui@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/console-ui/-/console-ui-3.1.1.tgz#681a0414e8b0a23ed679d0a2802e39d920801171" - integrity sha512-22y+uk4AGq9quz6kofKQjkeCIAm86+MTxT/RZMFm8fMArP2lAkzxjUjNyrw7S6wXnnB+qRnC+/2ANMTke68RTQ== +console-ui@^3.0.4, console-ui@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/console-ui/-/console-ui-3.1.2.tgz#51aef616ff02013c85ccee6a6d77ef7a94202e7a" + integrity sha512-+5j3R4wZJcEYZeXk30whc4ZU/+fWW9JMTNntVuMYpjZJ9n26Cxr0tUBXco1NRjVZRpRVvZ4DDKKKIHNYeUG9Dw== dependencies: chalk "^2.1.0" inquirer "^6" From ef58f241d123847798f956050a690bdd05383b8e Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 1 Dec 2020 08:12:02 +0000 Subject: [PATCH 574/818] Bump sort-package-json from 1.46.0 to 1.48.0 (#9397) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 5f3de221fc..0055a6f128 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,7 @@ "sane": "^4.1.0", "semver": "^7.3.2", "silent-error": "^1.1.1", - "sort-package-json": "^1.46.0", + "sort-package-json": "^1.48.0", "symlink-or-copy": "^1.3.1", "temp": "0.9.2", "testem": "^3.2.0", diff --git a/yarn.lock b/yarn.lock index e2a0cdf2ee..7a3d51a1d9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6729,10 +6729,10 @@ sort-object-keys@^1.1.3: resolved "https://registry.yarnpkg.com/sort-object-keys/-/sort-object-keys-1.1.3.tgz#bff833fe85cab147b34742e45863453c1e190b45" integrity sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg== -sort-package-json@^1.46.0: - version "1.46.0" - resolved "https://registry.yarnpkg.com/sort-package-json/-/sort-package-json-1.46.0.tgz#ea30a03d17c23762bfbf115fa54500459508c9ca" - integrity sha512-Fn5iiGKkATkEOQ0rol45dClfvNNW3r6PZ87mU4rbpz/M0Dxz+0D6oEU8nfpwUB5rd8u+WzsH2BQ/kRDwz+yVDQ== +sort-package-json@^1.48.0: + version "1.48.0" + resolved "https://registry.yarnpkg.com/sort-package-json/-/sort-package-json-1.48.0.tgz#476043cdde65346900296d5035a0b20560c954e5" + integrity sha512-VAC5THvyGFQFeVLbKcGNPzny5u/heOwks9tzTTLvL8nX9v7zZjpx36/itcJtqp8gI+r57Rw1RVYT6Ecy+3N6+Q== dependencies: detect-indent "^6.0.0" detect-newline "3.1.0" From f0da3b26772500d0777bc5e79fb17f1a90506e93 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 1 Dec 2020 09:25:30 +0000 Subject: [PATCH 575/818] Bump markdown-it from 12.0.1 to 12.0.2 (#9394) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 0055a6f128..9cff2fcc9d 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "json-stable-stringify": "^1.0.1", "leek": "0.0.24", "lodash.template": "^4.5.0", - "markdown-it": "^12.0.1", + "markdown-it": "^12.0.2", "markdown-it-terminal": "0.2.1", "minimatch": "^3.0.4", "morgan": "^1.10.0", diff --git a/yarn.lock b/yarn.lock index 7a3d51a1d9..bed203f89e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4948,10 +4948,10 @@ markdown-it-terminal@0.2.1: lodash.merge "^4.6.2" markdown-it "^8.3.1" -markdown-it@^12.0.1: - version "12.0.1" - resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-12.0.1.tgz#29e617276869614d6b0b45a90df39b8e7f58c53c" - integrity sha512-+y+88n2za9jayLU9ELoGdTKucnW4qIIg6JRWmkesrw8LBnp/Eb2Vurg2P1epf+iNvpRc7IzDjbYcgreOuuOZzw== +markdown-it@^12.0.2: + version "12.0.2" + resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-12.0.2.tgz#4401beae8df8aa2221fc6565a7188e60a06ef0ed" + integrity sha512-4Lkvjbv2kK+moL9TbeV+6/NHx+1Q+R/NIdUlFlkqkkzUcTod4uiyTJRiBidKR9qXSdkNFkgv+AELY8KN9vSgVA== dependencies: argparse "^2.0.1" entities "~2.0.0" From 27c721ac67f55956260814fe7f2f09d8d9e76883 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 1 Dec 2020 10:38:10 +0000 Subject: [PATCH 576/818] Bump @octokit/rest from 18.0.7 to 18.0.9 (#9401) --- package.json | 2 +- yarn.lock | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9cff2fcc9d..b6c2d13c96 100644 --- a/package.json +++ b/package.json @@ -131,7 +131,7 @@ }, "devDependencies": { "@ember/edition-utils": "^1.2.0", - "@octokit/rest": "^18.0.6", + "@octokit/rest": "^18.0.9", "broccoli-plugin": "^4.0.3", "broccoli-test-helper": "^2.0.0", "chai": "^4.2.0", diff --git a/yarn.lock b/yarn.lock index bed203f89e..09c8843e98 100644 --- a/yarn.lock +++ b/yarn.lock @@ -326,6 +326,14 @@ "@octokit/types" "^5.5.0" deprecation "^2.3.1" +"@octokit/plugin-rest-endpoint-methods@4.2.1": + version "4.2.1" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.2.1.tgz#8224833a45c3394836dc6e86f1e6c49269a2c350" + integrity sha512-QyFr4Bv807Pt1DXZOC5a7L5aFdrwz71UHTYoHVajYV5hsqffWm8FUl9+O7nxRu5PDMtB/IKrhFqTmdBTK5cx+A== + dependencies: + "@octokit/types" "^5.5.0" + deprecation "^2.3.1" + "@octokit/request-error@^2.0.0": version "2.0.2" resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.0.2.tgz#0e76b83f5d8fdda1db99027ea5f617c2e6ba9ed0" @@ -349,7 +357,7 @@ once "^1.4.0" universal-user-agent "^5.0.0" -"@octokit/rest@18.0.7", "@octokit/rest@^18.0.6": +"@octokit/rest@18.0.7": version "18.0.7" resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.7.tgz#236514417084334bc0ef62416a19f6030db3d907" integrity sha512-ctz0cMIb3c6gO2ADto+A1r4JI+2hkUkDcD1JRunkhk1SOUrNGQcQ+9FBqZ6UekS1Z/c3xPvF0OoLtX2cQ118+A== @@ -359,6 +367,16 @@ "@octokit/plugin-request-log" "^1.0.0" "@octokit/plugin-rest-endpoint-methods" "4.2.0" +"@octokit/rest@^18.0.9": + version "18.0.9" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.9.tgz#964d707d914eb34b1787895fdcacff96de47844d" + integrity sha512-CC5+cIx974Ygx9lQNfUn7/oXDQ9kqGiKUC6j1A9bAVZZ7aoTF8K6yxu0pQhQrLBwSl92J6Z3iVDhGhGFgISCZg== + dependencies: + "@octokit/core" "^3.0.0" + "@octokit/plugin-paginate-rest" "^2.2.0" + "@octokit/plugin-request-log" "^1.0.0" + "@octokit/plugin-rest-endpoint-methods" "4.2.1" + "@octokit/types@^2.0.0", "@octokit/types@^2.12.1": version "2.12.1" resolved "https://registry.yarnpkg.com/@octokit/types/-/types-2.12.1.tgz#4a26b4a85ec121043d3b0745b5798f9d8fd968ca" From ceda33e872796d069ec35af84e35ad497fb86d5a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 1 Dec 2020 11:53:04 +0000 Subject: [PATCH 577/818] Bump nock from 13.0.4 to 13.0.5 (#9399) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index b6c2d13c96..979a9fffe4 100644 --- a/package.json +++ b/package.json @@ -149,7 +149,7 @@ "is-language-code": "^1.0.12", "latest-version": "^5.1.0", "mocha": "^8.2.0", - "nock": "^13.0.4", + "nock": "^13.0.5", "nyc": "^15.1.0", "prettier": "2.1.2", "release-it": "^14.2.1", diff --git a/yarn.lock b/yarn.lock index 09c8843e98..4162e32c1a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5317,10 +5317,10 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -nock@^13.0.4: - version "13.0.4" - resolved "https://registry.yarnpkg.com/nock/-/nock-13.0.4.tgz#9fb74db35d0aa056322e3c45be14b99105cd7510" - integrity sha512-alqTV8Qt7TUbc74x1pKRLSENzfjp4nywovcJgi/1aXDiUxXdt7TkruSTF5MDWPP7UoPVgea4F9ghVdmX0xxnSA== +nock@^13.0.5: + version "13.0.5" + resolved "https://registry.yarnpkg.com/nock/-/nock-13.0.5.tgz#a618c6f86372cb79fac04ca9a2d1e4baccdb2414" + integrity sha512-1ILZl0zfFm2G4TIeJFW0iHknxr2NyA+aGCMTjDVUsBY4CkMRispF1pfIYkTRdAR/3Bg+UzdEuK0B6HczMQZcCg== dependencies: debug "^4.1.0" json-stringify-safe "^5.0.1" From 711b01a04e166f89dae4526890ecea6edd8ba3a5 Mon Sep 17 00:00:00 2001 From: Bryan Mishkin <698306+bmish@users.noreply.github.com> Date: Wed, 2 Dec 2020 17:43:38 -0500 Subject: [PATCH 578/818] chore(blueprint): update eslint-plugin-ember to v10 https://github.com/ember-cli/eslint-plugin-ember/releases/tag/v10.0.0 This includes Ember Octane linting enabled by default in the recommended configuration. --- blueprints/app/files/package.json | 2 +- tests/fixtures/addon/defaults/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/defaults/package.json | 2 +- tests/fixtures/app/embroider-no-welcome/package.json | 2 +- tests/fixtures/app/embroider/package.json | 2 +- tests/fixtures/app/npm/package.json | 2 +- tests/fixtures/app/yarn/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 1f25953733..8c9a82fb81 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -50,7 +50,7 @@ "ember-template-lint": "^2.14.0<% if (welcome) { %>", "ember-welcome-page": "^4.0.0<% } %>", "eslint": "^7.11.0", - "eslint-plugin-ember": "^9.3.0", + "eslint-plugin-ember": "^10.0.1", "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index c8d7de86f3..73bb63d539 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -51,7 +51,7 @@ "ember-template-lint": "^2.14.0", "ember-try": "^1.4.0", "eslint": "^7.11.0", - "eslint-plugin-ember": "^9.3.0", + "eslint-plugin-ember": "^10.0.1", "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 44f375ad2c..206ccf9351 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -52,7 +52,7 @@ "ember-try": "^1.4.0", "ember-welcome-page": "^4.0.0", "eslint": "^7.11.0", - "eslint-plugin-ember": "^9.3.0", + "eslint-plugin-ember": "^10.0.1", "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index 26d5b9164d..f4f5ba2105 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -47,7 +47,7 @@ "ember-template-lint": "^2.14.0", "ember-welcome-page": "^4.0.0", "eslint": "^7.11.0", - "eslint-plugin-ember": "^9.3.0", + "eslint-plugin-ember": "^10.0.1", "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index 51095176c5..d242f00294 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -49,7 +49,7 @@ "ember-source": "~3.23.0-beta.1", "ember-template-lint": "^2.14.0", "eslint": "^7.11.0", - "eslint-plugin-ember": "^9.3.0", + "eslint-plugin-ember": "^10.0.1", "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index 1ebbfbf619..9e3d71f20b 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -50,7 +50,7 @@ "ember-template-lint": "^2.14.0", "ember-welcome-page": "^4.0.0", "eslint": "^7.11.0", - "eslint-plugin-ember": "^9.3.0", + "eslint-plugin-ember": "^10.0.1", "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 3c588d03bb..32ca58ebee 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -46,7 +46,7 @@ "ember-source": "~3.23.0-beta.1", "ember-template-lint": "^2.14.0", "eslint": "^7.11.0", - "eslint-plugin-ember": "^9.3.0", + "eslint-plugin-ember": "^10.0.1", "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 26d5b9164d..f4f5ba2105 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -47,7 +47,7 @@ "ember-template-lint": "^2.14.0", "ember-welcome-page": "^4.0.0", "eslint": "^7.11.0", - "eslint-plugin-ember": "^9.3.0", + "eslint-plugin-ember": "^10.0.1", "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", From 2b59468e587841c37f999478206ab6f65fea9e1b Mon Sep 17 00:00:00 2001 From: Bryan Mishkin <698306+bmish@users.noreply.github.com> Date: Sun, 29 Nov 2020 22:57:30 -0500 Subject: [PATCH 579/818] feat: add prettier to blueprint Implemnts this RFC: https://github.com/emberjs/rfcs/blob/master/text/0628-prettier.md --- .../addon/files/addon-config/ember-try.js | 56 +++++++++---------- .../addon/files/addon-config/environment.js | 4 +- blueprints/addon/files/ember-cli-build.js | 2 +- blueprints/addon/files/index.js | 2 +- blueprints/app/files/.eslintignore | 1 + blueprints/app/files/.eslintrc.js | 36 ++++++------ blueprints/app/files/.prettierignore | 21 +++++++ blueprints/app/files/.prettierrc.js | 5 ++ blueprints/app/files/.template-lintrc.js | 2 +- blueprints/app/files/app/router.js | 3 +- blueprints/app/files/config/environment.js | 8 +-- blueprints/app/files/config/targets.js | 4 +- blueprints/app/files/ember-cli-build.js | 2 +- blueprints/app/files/package.json | 10 +++- blueprints/app/files/testem.js | 16 ++---- docs/brocfile-transition.md | 2 +- lib/models/blueprint.js | 6 +- lib/utilities/insert-into-file.js | 6 +- tests/fixtures/addon/.eslintrc.js | 28 +++++----- .../addon/defaults/config/ember-try.js | 56 +++++++++---------- tests/fixtures/addon/defaults/package.json | 10 +++- tests/fixtures/addon/yarn/config/ember-try.js | 56 +++++++++---------- tests/fixtures/addon/yarn/package.json | 10 +++- tests/fixtures/app/.eslintrc.js | 28 +++++----- .../fixtures/app/defaults/ember-cli-build.js | 2 +- tests/fixtures/app/defaults/package.json | 10 +++- .../app/embroider-no-welcome/package.json | 10 +++- .../fixtures/app/embroider/ember-cli-build.js | 2 +- tests/fixtures/app/embroider/package.json | 10 +++- tests/fixtures/app/npm/package.json | 10 +++- tests/fixtures/app/yarn/package.json | 10 +++- .../auto-run-false/ember-cli-build.js | 2 +- .../auto-run-true/ember-cli-build.js | 2 +- .../ember-cli-build.js | 2 +- .../lib/ember-random-thing/index.js | 2 +- .../multiple-sass-files/ember-cli-build.js | 2 +- .../lib/sample-addon/index.js | 2 +- .../smoke-tests/js-testem-config/testem.js | 12 ++-- 38 files changed, 259 insertions(+), 193 deletions(-) create mode 100644 blueprints/app/files/.prettierignore create mode 100644 blueprints/app/files/.prettierrc.js diff --git a/blueprints/addon/files/addon-config/ember-try.js b/blueprints/addon/files/addon-config/ember-try.js index e4e8973d60..657373b209 100644 --- a/blueprints/addon/files/addon-config/ember-try.js +++ b/blueprints/addon/files/addon-config/ember-try.js @@ -2,7 +2,7 @@ const getChannelURL = require('ember-source-channel-url'); -module.exports = async function() { +module.exports = async function () { return { <% if (yarn) { %>useYarn: true, <% } %>scenarios: [ @@ -10,54 +10,54 @@ module.exports = async function() { name: 'ember-lts-3.16', npm: { devDependencies: { - 'ember-source': '~3.16.0' - } - } + 'ember-source': '~3.16.0', + }, + }, }, { name: 'ember-lts-3.20', npm: { devDependencies: { - 'ember-source': '~3.20.5' - } - } + 'ember-source': '~3.20.5', + }, + }, }, { name: 'ember-release', npm: { devDependencies: { - 'ember-source': await getChannelURL('release') - } - } + 'ember-source': await getChannelURL('release'), + }, + }, }, { name: 'ember-beta', npm: { devDependencies: { - 'ember-source': await getChannelURL('beta') - } - } + 'ember-source': await getChannelURL('beta'), + }, + }, }, { name: 'ember-canary', npm: { devDependencies: { - 'ember-source': await getChannelURL('canary') - } - } + 'ember-source': await getChannelURL('canary'), + }, + }, }, { name: 'ember-default-with-jquery', env: { EMBER_OPTIONAL_FEATURES: JSON.stringify({ - 'jquery-integration': true - }) + 'jquery-integration': true, + }), }, npm: { devDependencies: { - '@ember/jquery': '^1.1.0' - } - } + '@ember/jquery': '^1.1.0', + }, + }, }, { name: 'ember-classic', @@ -65,15 +65,15 @@ module.exports = async function() { EMBER_OPTIONAL_FEATURES: JSON.stringify({ 'application-template-wrapper': true, 'default-async-observers': false, - 'template-only-glimmer-components': false - }) + 'template-only-glimmer-components': false, + }), }, npm: { ember: { - edition: 'classic' - } - } - } - ] + edition: 'classic', + }, + }, + }, + ], }; }; diff --git a/blueprints/addon/files/addon-config/environment.js b/blueprints/addon/files/addon-config/environment.js index 0dfaed4728..331ab30dfe 100644 --- a/blueprints/addon/files/addon-config/environment.js +++ b/blueprints/addon/files/addon-config/environment.js @@ -1,5 +1,5 @@ 'use strict'; -module.exports = function(/* environment, appConfig */) { - return { }; +module.exports = function (/* environment, appConfig */) { + return {}; }; diff --git a/blueprints/addon/files/ember-cli-build.js b/blueprints/addon/files/ember-cli-build.js index dc5a39e1b7..ba0649dc93 100644 --- a/blueprints/addon/files/ember-cli-build.js +++ b/blueprints/addon/files/ember-cli-build.js @@ -2,7 +2,7 @@ const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); -module.exports = function(defaults) { +module.exports = function (defaults) { let app = new EmberAddon(defaults, { // Add options here }); diff --git a/blueprints/addon/files/index.js b/blueprints/addon/files/index.js index 2e1d1d8d5f..0ca063d427 100644 --- a/blueprints/addon/files/index.js +++ b/blueprints/addon/files/index.js @@ -1,5 +1,5 @@ 'use strict'; module.exports = { - name: require('./package').name + name: require('./package').name, }; diff --git a/blueprints/app/files/.eslintignore b/blueprints/app/files/.eslintignore index 72df373072..9221655522 100644 --- a/blueprints/app/files/.eslintignore +++ b/blueprints/app/files/.eslintignore @@ -13,6 +13,7 @@ # misc /coverage/ !.* +.eslintcache # ember-try /.node_modules.ember-try/ diff --git a/blueprints/app/files/.eslintrc.js b/blueprints/app/files/.eslintrc.js index 11a44f2eb2..256132080e 100644 --- a/blueprints/app/files/.eslintrc.js +++ b/blueprints/app/files/.eslintrc.js @@ -7,18 +7,17 @@ module.exports = { ecmaVersion: 2018, sourceType: 'module', ecmaFeatures: { - legacyDecorators: true - } + legacyDecorators: true, + }, }, - plugins: [ - 'ember' - ], + plugins: ['ember'], extends: [ 'eslint:recommended', - 'plugin:ember/recommended' + 'plugin:ember/recommended', + 'plugin:prettier/recommended', ], env: { - browser: true + browser: true, }, rules: {}, overrides: [ @@ -26,36 +25,37 @@ module.exports = { { files: [ '.eslintrc.js', + '.prettierrc.js', '.template-lintrc.js', 'ember-cli-build.js',<% if (blueprint !== 'app') { %> 'index.js',<% } %> 'testem.js', 'blueprints/*/index.js', - 'config/**/*.js'<% if (blueprint === 'app') { %>, + 'config/**/*.js',<% if (blueprint === 'app') { %> 'lib/*/index.js', - 'server/**/*.js'<% } else { %>, - 'tests/dummy/config/**/*.js'<% } %> + 'server/**/*.js',<% } else { %> + 'tests/dummy/config/**/*.js',<% } %> ],<% if (blueprint !== 'app') { %> excludedFiles: [ 'addon/**', 'addon-test-support/**', 'app/**', - 'tests/dummy/app/**' + 'tests/dummy/app/**', ],<% } %> parserOptions: { - sourceType: 'script' + sourceType: 'script', }, env: { browser: false, - node: true + node: true, }, plugins: ['node'], - extends: ['plugin:node/recommended']<% if (blueprint === 'app') {%>, + extends: ['plugin:node/recommended'],<% if (blueprint === 'app') {%> rules: { // this can be removed once the following is fixed // https://github.com/mysticatea/eslint-plugin-node/issues/77 - 'node/no-unpublished-require': 'off' - }<% } %> - } - ] + 'node/no-unpublished-require': 'off', + },<% } %> + }, + ], }; diff --git a/blueprints/app/files/.prettierignore b/blueprints/app/files/.prettierignore new file mode 100644 index 0000000000..9221655522 --- /dev/null +++ b/blueprints/app/files/.prettierignore @@ -0,0 +1,21 @@ +# unconventional js +/blueprints/*/files/ +/vendor/ + +# compiled output +/dist/ +/tmp/ + +# dependencies +/bower_components/ +/node_modules/ + +# misc +/coverage/ +!.* +.eslintcache + +# ember-try +/.node_modules.ember-try/ +/bower.json.ember-try +/package.json.ember-try diff --git a/blueprints/app/files/.prettierrc.js b/blueprints/app/files/.prettierrc.js new file mode 100644 index 0000000000..534e6d35aa --- /dev/null +++ b/blueprints/app/files/.prettierrc.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = { + singleQuote: true, +}; diff --git a/blueprints/app/files/.template-lintrc.js b/blueprints/app/files/.template-lintrc.js index f387370010..3b0b9af953 100644 --- a/blueprints/app/files/.template-lintrc.js +++ b/blueprints/app/files/.template-lintrc.js @@ -1,5 +1,5 @@ 'use strict'; module.exports = { - extends: 'octane' + extends: 'octane', }; diff --git a/blueprints/app/files/app/router.js b/blueprints/app/files/app/router.js index 8ab5dca38c..9d2bbff522 100644 --- a/blueprints/app/files/app/router.js +++ b/blueprints/app/files/app/router.js @@ -6,5 +6,4 @@ export default class Router extends EmberRouter { rootURL = config.rootURL; } -Router.map(function() { -}); +Router.map(function () {}); diff --git a/blueprints/app/files/config/environment.js b/blueprints/app/files/config/environment.js index 19ed234454..25cbe0b0f0 100644 --- a/blueprints/app/files/config/environment.js +++ b/blueprints/app/files/config/environment.js @@ -1,6 +1,6 @@ 'use strict'; -module.exports = function(environment) { +module.exports = function (environment) { let ENV = { modulePrefix: '<%= modulePrefix %>', environment, @@ -13,14 +13,14 @@ module.exports = function(environment) { }, EXTEND_PROTOTYPES: { // Prevent Ember Data from overriding Date.parse. - Date: false - } + Date: false, + }, }, APP: { // Here you can pass flags/options to your application instance // when it is created - } + }, }; if (environment === 'development') { diff --git a/blueprints/app/files/config/targets.js b/blueprints/app/files/config/targets.js index 228a078986..4b33327e86 100644 --- a/blueprints/app/files/config/targets.js +++ b/blueprints/app/files/config/targets.js @@ -3,7 +3,7 @@ const browsers = [ 'last 1 Chrome versions', 'last 1 Firefox versions', - 'last 1 Safari versions' + 'last 1 Safari versions', ]; const isCI = Boolean(process.env.CI); @@ -14,5 +14,5 @@ if (isCI || isProduction) { } module.exports = { - browsers + browsers, }; diff --git a/blueprints/app/files/ember-cli-build.js b/blueprints/app/files/ember-cli-build.js index 64cae47d29..e12881816b 100644 --- a/blueprints/app/files/ember-cli-build.js +++ b/blueprints/app/files/ember-cli-build.js @@ -2,7 +2,7 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app'); -module.exports = function(defaults) { +module.exports = function (defaults) { let app = new EmberApp(defaults, { // Add options here }); diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 8c9a82fb81..1a4d586092 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -12,9 +12,12 @@ }, "scripts": { "build": "ember build --environment=production", - "lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'", + "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix", "lint:hbs": "ember-template-lint .", - "lint:js": "eslint .", + "lint:hbs:fix": "ember-template-lint . --fix", + "lint:js": "eslint . --cache", + "lint:js:fix": "eslint . --fix", "start": "ember serve", "test": "npm-run-all lint:* test:*", "test:ember": "ember test" @@ -50,10 +53,13 @@ "ember-template-lint": "^2.14.0<% if (welcome) { %>", "ember-welcome-page": "^4.0.0<% } %>", "eslint": "^7.11.0", + "eslint-config-prettier": "^6.15.0", "eslint-plugin-ember": "^10.0.1", "eslint-plugin-node": "^11.1.0", + "eslint-plugin-prettier": "^3.1.4", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", + "prettier": "^2.2.1", "qunit": "^2.11.0", "qunit-dom": "^1.6.0-beta.1" }, diff --git a/blueprints/app/files/testem.js b/blueprints/app/files/testem.js index 49f53feed6..ed2f37124a 100644 --- a/blueprints/app/files/testem.js +++ b/blueprints/app/files/testem.js @@ -3,12 +3,8 @@ module.exports = { test_page: 'tests/index.html?hidepassed', disable_watching: true, - launch_in_ci: [ - 'Chrome' - ], - launch_in_dev: [ - 'Chrome' - ], + launch_in_ci: ['Chrome'], + launch_in_dev: ['Chrome'], browser_start_timeout: 120, browser_args: { Chrome: { @@ -20,8 +16,8 @@ module.exports = { '--disable-software-rasterizer', '--mute-audio', '--remote-debugging-port=0', - '--window-size=1440,900' - ].filter(Boolean) - } - } + '--window-size=1440,900', + ].filter(Boolean), + }, + }, }; diff --git a/docs/brocfile-transition.md b/docs/brocfile-transition.md index dd4863acb2..c542f23c87 100644 --- a/docs/brocfile-transition.md +++ b/docs/brocfile-transition.md @@ -33,7 +33,7 @@ module.exports = app.toTree(); ``` var EmberApp = require('ember-cli/lib/broccoli/ember-app'); -module.exports = function(defaults) { +module.exports = function (defaults) { var app = new EmberApp(defaults, { // Any other options }); diff --git a/lib/models/blueprint.js b/lib/models/blueprint.js index 8c3c8d896b..0736c9753f 100644 --- a/lib/models/blueprint.js +++ b/lib/models/blueprint.js @@ -1161,13 +1161,13 @@ let Blueprint = CoreObject.extend({ Example: ``` // app/router.js - Router.map(function() { + Router.map(function () { }); ``` ``` insertIntoFile('app/router.js', ' this.route("admin");', { - after: 'Router.map(function() {' + EOL + after: 'Router.map(function () {' + EOL }).then(function() { // file has been inserted into! }); @@ -1177,7 +1177,7 @@ let Blueprint = CoreObject.extend({ ``` // app/router.js - Router.map(function() { + Router.map(function () { this.route("admin"); }); ``` diff --git a/lib/utilities/insert-into-file.js b/lib/utilities/insert-into-file.js index 27d280f08d..dff87ddd1f 100644 --- a/lib/utilities/insert-into-file.js +++ b/lib/utilities/insert-into-file.js @@ -24,19 +24,19 @@ const EOL = require('os').EOL; ``` // app/router.js - Router.map(function() { + Router.map(function () { }); ``` ``` insertIntoFile('app/router.js', ' this.route("admin");', { - after: 'Router.map(function() {' + EOL + after: 'Router.map(function () {' + EOL }); ``` ``` // app/router.js - Router.map(function() { + Router.map(function () { this.route("admin"); }); ``` diff --git a/tests/fixtures/addon/.eslintrc.js b/tests/fixtures/addon/.eslintrc.js index 9285859954..2504063f68 100644 --- a/tests/fixtures/addon/.eslintrc.js +++ b/tests/fixtures/addon/.eslintrc.js @@ -7,18 +7,17 @@ module.exports = { ecmaVersion: 2018, sourceType: 'module', ecmaFeatures: { - legacyDecorators: true - } + legacyDecorators: true, + }, }, - plugins: [ - 'ember' - ], + plugins: ['ember'], extends: [ 'eslint:recommended', - 'plugin:ember/recommended' + 'plugin:ember/recommended', + 'plugin:prettier/recommended', ], env: { - browser: true + browser: true, }, rules: {}, overrides: [ @@ -26,29 +25,30 @@ module.exports = { { files: [ '.eslintrc.js', + '.prettierrc.js', '.template-lintrc.js', 'ember-cli-build.js', 'index.js', 'testem.js', 'blueprints/*/index.js', 'config/**/*.js', - 'tests/dummy/config/**/*.js' + 'tests/dummy/config/**/*.js', ], excludedFiles: [ 'addon/**', 'addon-test-support/**', 'app/**', - 'tests/dummy/app/**' + 'tests/dummy/app/**', ], parserOptions: { - sourceType: 'script' + sourceType: 'script', }, env: { browser: false, - node: true + node: true, }, plugins: ['node'], - extends: ['plugin:node/recommended'] - } - ] + extends: ['plugin:node/recommended'], + }, + ], }; diff --git a/tests/fixtures/addon/defaults/config/ember-try.js b/tests/fixtures/addon/defaults/config/ember-try.js index a68252d8c2..e59f91b33c 100644 --- a/tests/fixtures/addon/defaults/config/ember-try.js +++ b/tests/fixtures/addon/defaults/config/ember-try.js @@ -2,61 +2,61 @@ const getChannelURL = require('ember-source-channel-url'); -module.exports = async function() { +module.exports = async function () { return { scenarios: [ { name: 'ember-lts-3.16', npm: { devDependencies: { - 'ember-source': '~3.16.0' - } - } + 'ember-source': '~3.16.0', + }, + }, }, { name: 'ember-lts-3.20', npm: { devDependencies: { - 'ember-source': '~3.20.5' - } - } + 'ember-source': '~3.20.5', + }, + }, }, { name: 'ember-release', npm: { devDependencies: { - 'ember-source': await getChannelURL('release') - } - } + 'ember-source': await getChannelURL('release'), + }, + }, }, { name: 'ember-beta', npm: { devDependencies: { - 'ember-source': await getChannelURL('beta') - } - } + 'ember-source': await getChannelURL('beta'), + }, + }, }, { name: 'ember-canary', npm: { devDependencies: { - 'ember-source': await getChannelURL('canary') - } - } + 'ember-source': await getChannelURL('canary'), + }, + }, }, { name: 'ember-default-with-jquery', env: { EMBER_OPTIONAL_FEATURES: JSON.stringify({ - 'jquery-integration': true - }) + 'jquery-integration': true, + }), }, npm: { devDependencies: { - '@ember/jquery': '^1.1.0' - } - } + '@ember/jquery': '^1.1.0', + }, + }, }, { name: 'ember-classic', @@ -64,15 +64,15 @@ module.exports = async function() { EMBER_OPTIONAL_FEATURES: JSON.stringify({ 'application-template-wrapper': true, 'default-async-observers': false, - 'template-only-glimmer-components': false - }) + 'template-only-glimmer-components': false, + }), }, npm: { ember: { - edition: 'classic' - } - } - } - ] + edition: 'classic', + }, + }, + }, + ], }; }; diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index 73bb63d539..427ac66fff 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -14,9 +14,12 @@ }, "scripts": { "build": "ember build --environment=production", - "lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'", + "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix", "lint:hbs": "ember-template-lint .", - "lint:js": "eslint .", + "lint:hbs:fix": "ember-template-lint . --fix", + "lint:js": "eslint . --cache", + "lint:js:fix": "eslint . --fix", "start": "ember serve", "test": "npm-run-all lint:* test:*", "test:ember": "ember test", @@ -51,10 +54,13 @@ "ember-template-lint": "^2.14.0", "ember-try": "^1.4.0", "eslint": "^7.11.0", + "eslint-config-prettier": "^6.15.0", "eslint-plugin-ember": "^10.0.1", "eslint-plugin-node": "^11.1.0", + "eslint-plugin-prettier": "^3.1.4", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", + "prettier": "^2.2.1", "qunit": "^2.11.0", "qunit-dom": "^1.6.0-beta.1" }, diff --git a/tests/fixtures/addon/yarn/config/ember-try.js b/tests/fixtures/addon/yarn/config/ember-try.js index 779a4f9a29..f14ac7f50b 100644 --- a/tests/fixtures/addon/yarn/config/ember-try.js +++ b/tests/fixtures/addon/yarn/config/ember-try.js @@ -2,7 +2,7 @@ const getChannelURL = require('ember-source-channel-url'); -module.exports = async function() { +module.exports = async function () { return { useYarn: true, scenarios: [ @@ -10,54 +10,54 @@ module.exports = async function() { name: 'ember-lts-3.16', npm: { devDependencies: { - 'ember-source': '~3.16.0' - } - } + 'ember-source': '~3.16.0', + }, + }, }, { name: 'ember-lts-3.20', npm: { devDependencies: { - 'ember-source': '~3.20.5' - } - } + 'ember-source': '~3.20.5', + }, + }, }, { name: 'ember-release', npm: { devDependencies: { - 'ember-source': await getChannelURL('release') - } - } + 'ember-source': await getChannelURL('release'), + }, + }, }, { name: 'ember-beta', npm: { devDependencies: { - 'ember-source': await getChannelURL('beta') - } - } + 'ember-source': await getChannelURL('beta'), + }, + }, }, { name: 'ember-canary', npm: { devDependencies: { - 'ember-source': await getChannelURL('canary') - } - } + 'ember-source': await getChannelURL('canary'), + }, + }, }, { name: 'ember-default-with-jquery', env: { EMBER_OPTIONAL_FEATURES: JSON.stringify({ - 'jquery-integration': true - }) + 'jquery-integration': true, + }), }, npm: { devDependencies: { - '@ember/jquery': '^1.1.0' - } - } + '@ember/jquery': '^1.1.0', + }, + }, }, { name: 'ember-classic', @@ -65,15 +65,15 @@ module.exports = async function() { EMBER_OPTIONAL_FEATURES: JSON.stringify({ 'application-template-wrapper': true, 'default-async-observers': false, - 'template-only-glimmer-components': false - }) + 'template-only-glimmer-components': false, + }), }, npm: { ember: { - edition: 'classic' - } - } - } - ] + edition: 'classic', + }, + }, + }, + ], }; }; diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 206ccf9351..dd9c9ae090 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -14,9 +14,12 @@ }, "scripts": { "build": "ember build --environment=production", - "lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'", + "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix", "lint:hbs": "ember-template-lint .", - "lint:js": "eslint .", + "lint:hbs:fix": "ember-template-lint . --fix", + "lint:js": "eslint . --cache", + "lint:js:fix": "eslint . --fix", "start": "ember serve", "test": "npm-run-all lint:* test:*", "test:ember": "ember test", @@ -52,10 +55,13 @@ "ember-try": "^1.4.0", "ember-welcome-page": "^4.0.0", "eslint": "^7.11.0", + "eslint-config-prettier": "^6.15.0", "eslint-plugin-ember": "^10.0.1", "eslint-plugin-node": "^11.1.0", + "eslint-plugin-prettier": "^3.1.4", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", + "prettier": "^2.2.1", "qunit": "^2.11.0", "qunit-dom": "^1.6.0-beta.1" }, diff --git a/tests/fixtures/app/.eslintrc.js b/tests/fixtures/app/.eslintrc.js index 26d707835a..da079e309d 100644 --- a/tests/fixtures/app/.eslintrc.js +++ b/tests/fixtures/app/.eslintrc.js @@ -7,18 +7,17 @@ module.exports = { ecmaVersion: 2018, sourceType: 'module', ecmaFeatures: { - legacyDecorators: true - } + legacyDecorators: true, + }, }, - plugins: [ - 'ember' - ], + plugins: ['ember'], extends: [ 'eslint:recommended', - 'plugin:ember/recommended' + 'plugin:ember/recommended', + 'plugin:prettier/recommended', ], env: { - browser: true + browser: true, }, rules: {}, overrides: [ @@ -26,28 +25,29 @@ module.exports = { { files: [ '.eslintrc.js', + '.prettierrc.js', '.template-lintrc.js', 'ember-cli-build.js', 'testem.js', 'blueprints/*/index.js', 'config/**/*.js', 'lib/*/index.js', - 'server/**/*.js' + 'server/**/*.js', ], parserOptions: { - sourceType: 'script' + sourceType: 'script', }, env: { browser: false, - node: true + node: true, }, plugins: ['node'], extends: ['plugin:node/recommended'], rules: { // this can be removed once the following is fixed // https://github.com/mysticatea/eslint-plugin-node/issues/77 - 'node/no-unpublished-require': 'off' - } - } - ] + 'node/no-unpublished-require': 'off', + }, + }, + ], }; diff --git a/tests/fixtures/app/defaults/ember-cli-build.js b/tests/fixtures/app/defaults/ember-cli-build.js index d690a2531e..48e94e9e44 100644 --- a/tests/fixtures/app/defaults/ember-cli-build.js +++ b/tests/fixtures/app/defaults/ember-cli-build.js @@ -2,7 +2,7 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app'); -module.exports = function(defaults) { +module.exports = function (defaults) { let app = new EmberApp(defaults, { // Add options here }); diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index f4f5ba2105..efb74c42ca 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -12,9 +12,12 @@ }, "scripts": { "build": "ember build --environment=production", - "lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'", + "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix", "lint:hbs": "ember-template-lint .", - "lint:js": "eslint .", + "lint:hbs:fix": "ember-template-lint . --fix", + "lint:js": "eslint . --cache", + "lint:js:fix": "eslint . --fix", "start": "ember serve", "test": "npm-run-all lint:* test:*", "test:ember": "ember test" @@ -47,10 +50,13 @@ "ember-template-lint": "^2.14.0", "ember-welcome-page": "^4.0.0", "eslint": "^7.11.0", + "eslint-config-prettier": "^6.15.0", "eslint-plugin-ember": "^10.0.1", "eslint-plugin-node": "^11.1.0", + "eslint-plugin-prettier": "^3.1.4", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", + "prettier": "^2.2.1", "qunit": "^2.11.0", "qunit-dom": "^1.6.0-beta.1" }, diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index d242f00294..9d5fb8ae3f 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -12,9 +12,12 @@ }, "scripts": { "build": "ember build --environment=production", - "lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'", + "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix", "lint:hbs": "ember-template-lint .", - "lint:js": "eslint .", + "lint:hbs:fix": "ember-template-lint . --fix", + "lint:js": "eslint . --cache", + "lint:js:fix": "eslint . --fix", "start": "ember serve", "test": "npm-run-all lint:* test:*", "test:ember": "ember test" @@ -49,10 +52,13 @@ "ember-source": "~3.23.0-beta.1", "ember-template-lint": "^2.14.0", "eslint": "^7.11.0", + "eslint-config-prettier": "^6.15.0", "eslint-plugin-ember": "^10.0.1", "eslint-plugin-node": "^11.1.0", + "eslint-plugin-prettier": "^3.1.4", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", + "prettier": "^2.2.1", "qunit": "^2.11.0", "qunit-dom": "^1.6.0-beta.1" }, diff --git a/tests/fixtures/app/embroider/ember-cli-build.js b/tests/fixtures/app/embroider/ember-cli-build.js index 8433a1242e..35d9cc4169 100644 --- a/tests/fixtures/app/embroider/ember-cli-build.js +++ b/tests/fixtures/app/embroider/ember-cli-build.js @@ -2,7 +2,7 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app'); -module.exports = function(defaults) { +module.exports = function (defaults) { let app = new EmberApp(defaults, { // Add options here }); diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index 9e3d71f20b..ff4c2e4361 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -12,9 +12,12 @@ }, "scripts": { "build": "ember build --environment=production", - "lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'", + "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix", "lint:hbs": "ember-template-lint .", - "lint:js": "eslint .", + "lint:hbs:fix": "ember-template-lint . --fix", + "lint:js": "eslint . --cache", + "lint:js:fix": "eslint . --fix", "start": "ember serve", "test": "npm-run-all lint:* test:*", "test:ember": "ember test" @@ -50,10 +53,13 @@ "ember-template-lint": "^2.14.0", "ember-welcome-page": "^4.0.0", "eslint": "^7.11.0", + "eslint-config-prettier": "^6.15.0", "eslint-plugin-ember": "^10.0.1", "eslint-plugin-node": "^11.1.0", + "eslint-plugin-prettier": "^3.1.4", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", + "prettier": "^2.2.1", "qunit": "^2.11.0", "qunit-dom": "^1.6.0-beta.1" }, diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 32ca58ebee..76fe17a15e 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -12,9 +12,12 @@ }, "scripts": { "build": "ember build --environment=production", - "lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'", + "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix", "lint:hbs": "ember-template-lint .", - "lint:js": "eslint .", + "lint:hbs:fix": "ember-template-lint . --fix", + "lint:js": "eslint . --cache", + "lint:js:fix": "eslint . --fix", "start": "ember serve", "test": "npm-run-all lint:* test:*", "test:ember": "ember test" @@ -46,10 +49,13 @@ "ember-source": "~3.23.0-beta.1", "ember-template-lint": "^2.14.0", "eslint": "^7.11.0", + "eslint-config-prettier": "^6.15.0", "eslint-plugin-ember": "^10.0.1", "eslint-plugin-node": "^11.1.0", + "eslint-plugin-prettier": "^3.1.4", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", + "prettier": "^2.2.1", "qunit": "^2.11.0", "qunit-dom": "^1.6.0-beta.1" }, diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index f4f5ba2105..efb74c42ca 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -12,9 +12,12 @@ }, "scripts": { "build": "ember build --environment=production", - "lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'", + "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix", "lint:hbs": "ember-template-lint .", - "lint:js": "eslint .", + "lint:hbs:fix": "ember-template-lint . --fix", + "lint:js": "eslint . --cache", + "lint:js:fix": "eslint . --fix", "start": "ember serve", "test": "npm-run-all lint:* test:*", "test:ember": "ember test" @@ -47,10 +50,13 @@ "ember-template-lint": "^2.14.0", "ember-welcome-page": "^4.0.0", "eslint": "^7.11.0", + "eslint-config-prettier": "^6.15.0", "eslint-plugin-ember": "^10.0.1", "eslint-plugin-node": "^11.1.0", + "eslint-plugin-prettier": "^3.1.4", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", + "prettier": "^2.2.1", "qunit": "^2.11.0", "qunit-dom": "^1.6.0-beta.1" }, diff --git a/tests/fixtures/brocfile-tests/auto-run-false/ember-cli-build.js b/tests/fixtures/brocfile-tests/auto-run-false/ember-cli-build.js index 9826d0a551..29d08305c7 100644 --- a/tests/fixtures/brocfile-tests/auto-run-false/ember-cli-build.js +++ b/tests/fixtures/brocfile-tests/auto-run-false/ember-cli-build.js @@ -1,6 +1,6 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app'); -module.exports = function(defaults) { +module.exports = function (defaults) { var app = new EmberApp(defaults, { autoRun: false }); diff --git a/tests/fixtures/brocfile-tests/auto-run-true/ember-cli-build.js b/tests/fixtures/brocfile-tests/auto-run-true/ember-cli-build.js index 6a34d1ab79..6f40251905 100644 --- a/tests/fixtures/brocfile-tests/auto-run-true/ember-cli-build.js +++ b/tests/fixtures/brocfile-tests/auto-run-true/ember-cli-build.js @@ -1,6 +1,6 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app'); -module.exports = function(defaults) { +module.exports = function (defaults) { var app = new EmberApp(defaults, { autoRun: true }); diff --git a/tests/fixtures/brocfile-tests/custom-environment-config/ember-cli-build.js b/tests/fixtures/brocfile-tests/custom-environment-config/ember-cli-build.js index 85f5e30644..bfc9e28add 100644 --- a/tests/fixtures/brocfile-tests/custom-environment-config/ember-cli-build.js +++ b/tests/fixtures/brocfile-tests/custom-environment-config/ember-cli-build.js @@ -1,6 +1,6 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app'); -module.exports = function(defaults) { +module.exports = function (defaults) { var app = new EmberApp(defaults, { configPath: 'config/something-else' }); diff --git a/tests/fixtures/brocfile-tests/jshint-addon/lib/ember-random-thing/index.js b/tests/fixtures/brocfile-tests/jshint-addon/lib/ember-random-thing/index.js index e54cf2e76d..bd29a4e196 100644 --- a/tests/fixtures/brocfile-tests/jshint-addon/lib/ember-random-thing/index.js +++ b/tests/fixtures/brocfile-tests/jshint-addon/lib/ember-random-thing/index.js @@ -1,5 +1,5 @@ 'use strict'; module.exports = { - name: require('./package').name + name: require('./package').name, } diff --git a/tests/fixtures/brocfile-tests/multiple-sass-files/ember-cli-build.js b/tests/fixtures/brocfile-tests/multiple-sass-files/ember-cli-build.js index b49e140169..96618a02dd 100644 --- a/tests/fixtures/brocfile-tests/multiple-sass-files/ember-cli-build.js +++ b/tests/fixtures/brocfile-tests/multiple-sass-files/ember-cli-build.js @@ -1,6 +1,6 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app'); -module.exports = function(defaults) { +module.exports = function (defaults) { var app = new EmberApp(defaults, { name: require('./package.json').name, outputPaths: { app: { css: { 'main': '/assets/main.css', 'theme/a': '/assets/theme/a.css' } } } diff --git a/tests/fixtures/missing-before-addon/lib/sample-addon/index.js b/tests/fixtures/missing-before-addon/lib/sample-addon/index.js index 149ef39fa1..3a77c77d62 100644 --- a/tests/fixtures/missing-before-addon/lib/sample-addon/index.js +++ b/tests/fixtures/missing-before-addon/lib/sample-addon/index.js @@ -1,3 +1,3 @@ module.exports = { - name: require('./package').name + name: require('./package').name, }; diff --git a/tests/fixtures/smoke-tests/js-testem-config/testem.js b/tests/fixtures/smoke-tests/js-testem-config/testem.js index a2f44c434d..e60c6e0417 100644 --- a/tests/fixtures/smoke-tests/js-testem-config/testem.js +++ b/tests/fixtures/smoke-tests/js-testem-config/testem.js @@ -4,12 +4,8 @@ module.exports = { "framework": "qunit", "test_page": "tests/index.html?hidepassed", "disable_watching": true, - "launch_in_ci": [ - "Chrome" - ], - "launch_in_dev": [ - "Chrome" - ], + "launch_in_ci": ["Chrome"], + "launch_in_dev": ["Chrome"], "browser_args": { "Chrome": [ // --no-sandbox is needed when running Chrome inside a container @@ -17,7 +13,7 @@ module.exports = { "--headless", "--remote-debugging-port=0", - "--window-size=1440,900" + "--window-size=1440,900", ].filter(Boolean), - } + }, }; From ded731970600459ad03b08be7322459a0132aa79 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 7 Dec 2020 10:54:07 -0500 Subject: [PATCH 580/818] Update blueprint dependencies to latest. This updates all app and addon blueprint dependencies to their latest version (in preparation for ember-cli@3.23.0 release). Some specific call outs: * ember-source@3.23.1 * ember-data@3.23.0 * ember-qunit@5.1.0 * qunit@2.13.0 * qunit-dom@1.6.0 --- blueprints/app/files/package.json | 28 +++++++++---------- tests/fixtures/addon/defaults/package.json | 20 ++++++------- tests/fixtures/addon/yarn/package.json | 20 ++++++------- tests/fixtures/app/defaults/package.json | 22 +++++++-------- .../app/embroider-no-welcome/package.json | 28 +++++++++---------- tests/fixtures/app/embroider/package.json | 28 +++++++++---------- tests/fixtures/app/npm/package.json | 22 +++++++-------- tests/fixtures/app/yarn/package.json | 22 +++++++-------- 8 files changed, 95 insertions(+), 95 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 425894c0c1..335e61cb8a 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -21,15 +21,15 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.0.0<% if (embroider) { %>", - "@embroider/compat": "^0.27.0", - "@embroider/core": "^0.27.0", - "@embroider/webpack": "^0.27.0<% } %>", + "@ember/test-helpers": "^2.1.1<% if (embroider) { %>", + "@embroider/compat": "^0.33.0", + "@embroider/core": "^0.33.0", + "@embroider/webpack": "^0.33.0<% } %>", "@glimmer/component": "^1.0.2", "@glimmer/tracking": "^1.0.2", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.6.0", + "ember-auto-import": "^1.8.0", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^4.0.0", "ember-cli-babel": "^7.23.0", @@ -37,24 +37,24 @@ "ember-cli-htmlbars": "^5.3.1", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", - "ember-cli-terser": "^4.0.0", - "ember-data": "~3.23.0-beta.0", + "ember-cli-terser": "^4.0.1", + "ember-data": "~3.23.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.2", - "ember-load-initializers": "^2.1.1", + "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^5.0.0-beta.4", + "ember-qunit": "^5.1.0", "ember-resolver": "^8.0.2", - "ember-source": "~3.23.0-beta.1", + "ember-source": "~3.23.1", "ember-template-lint": "^2.14.0<% if (welcome) { %>", "ember-welcome-page": "^4.0.0<% } %>", - "eslint": "^7.11.0", - "eslint-plugin-ember": "^9.3.0", + "eslint": "^7.15.0", + "eslint-plugin-ember": "^10.0.2", "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "qunit": "^2.11.0", - "qunit-dom": "^1.6.0-beta.1" + "qunit": "^2.13.0", + "qunit-dom": "^1.6.0" }, "engines": { "node": "10.* || >= 12" diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index e3fadcbbc1..4ca456c7d8 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -28,34 +28,34 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.0.0", + "@ember/test-helpers": "^2.1.1", "@glimmer/component": "^1.0.2", "@glimmer/tracking": "^1.0.2", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.6.0", + "ember-auto-import": "^1.8.0", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", - "ember-cli-terser": "^4.0.0", + "ember-cli-terser": "^4.0.1", "ember-disable-prototype-extensions": "^1.1.3", "ember-export-application-global": "^2.0.1", - "ember-load-initializers": "^2.1.1", + "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^5.0.0-beta.4", + "ember-qunit": "^5.1.0", "ember-resolver": "^8.0.2", - "ember-source": "~3.23.0-beta.1", + "ember-source": "~3.23.1", "ember-source-channel-url": "^3.0.0", "ember-template-lint": "^2.14.0", "ember-try": "^1.4.0", - "eslint": "^7.11.0", - "eslint-plugin-ember": "^9.3.0", + "eslint": "^7.15.0", + "eslint-plugin-ember": "^10.0.2", "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "qunit": "^2.11.0", - "qunit-dom": "^1.6.0-beta.1" + "qunit": "^2.13.0", + "qunit-dom": "^1.6.0" }, "engines": { "node": "10.* || >= 12" diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 45560b042e..4e77c7fc87 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -28,35 +28,35 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.0.0", + "@ember/test-helpers": "^2.1.1", "@glimmer/component": "^1.0.2", "@glimmer/tracking": "^1.0.2", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.6.0", + "ember-auto-import": "^1.8.0", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", - "ember-cli-terser": "^4.0.0", + "ember-cli-terser": "^4.0.1", "ember-disable-prototype-extensions": "^1.1.3", "ember-export-application-global": "^2.0.1", - "ember-load-initializers": "^2.1.1", + "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^5.0.0-beta.4", + "ember-qunit": "^5.1.0", "ember-resolver": "^8.0.2", - "ember-source": "~3.23.0-beta.1", + "ember-source": "~3.23.1", "ember-source-channel-url": "^3.0.0", "ember-template-lint": "^2.14.0", "ember-try": "^1.4.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.11.0", - "eslint-plugin-ember": "^9.3.0", + "eslint": "^7.15.0", + "eslint-plugin-ember": "^10.0.2", "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "qunit": "^2.11.0", - "qunit-dom": "^1.6.0-beta.1" + "qunit": "^2.13.0", + "qunit-dom": "^1.6.0" }, "engines": { "node": "10.* || >= 12" diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index 2ae4618dc6..c9640fe3e8 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -21,12 +21,12 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.0.0", + "@ember/test-helpers": "^2.1.1", "@glimmer/component": "^1.0.2", "@glimmer/tracking": "^1.0.2", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.6.0", + "ember-auto-import": "^1.8.0", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^4.0.0", "ember-cli-babel": "^7.23.0", @@ -34,24 +34,24 @@ "ember-cli-htmlbars": "^5.3.1", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", - "ember-cli-terser": "^4.0.0", - "ember-data": "~3.23.0-beta.0", + "ember-cli-terser": "^4.0.1", + "ember-data": "~3.23.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.2", - "ember-load-initializers": "^2.1.1", + "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^5.0.0-beta.4", + "ember-qunit": "^5.1.0", "ember-resolver": "^8.0.2", - "ember-source": "~3.23.0-beta.1", + "ember-source": "~3.23.1", "ember-template-lint": "^2.14.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.11.0", - "eslint-plugin-ember": "^9.3.0", + "eslint": "^7.15.0", + "eslint-plugin-ember": "^10.0.2", "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "qunit": "^2.11.0", - "qunit-dom": "^1.6.0-beta.1" + "qunit": "^2.13.0", + "qunit-dom": "^1.6.0" }, "engines": { "node": "10.* || >= 12" diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index fa489436b8..78a6e26efc 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -21,15 +21,15 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.0.0", - "@embroider/compat": "^0.27.0", - "@embroider/core": "^0.27.0", - "@embroider/webpack": "^0.27.0", + "@ember/test-helpers": "^2.1.1", + "@embroider/compat": "^0.33.0", + "@embroider/core": "^0.33.0", + "@embroider/webpack": "^0.33.0", "@glimmer/component": "^1.0.2", "@glimmer/tracking": "^1.0.2", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.6.0", + "ember-auto-import": "^1.8.0", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^4.0.0", "ember-cli-babel": "^7.23.0", @@ -37,23 +37,23 @@ "ember-cli-htmlbars": "^5.3.1", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", - "ember-cli-terser": "^4.0.0", - "ember-data": "~3.23.0-beta.0", + "ember-cli-terser": "^4.0.1", + "ember-data": "~3.23.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.2", - "ember-load-initializers": "^2.1.1", + "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^5.0.0-beta.4", + "ember-qunit": "^5.1.0", "ember-resolver": "^8.0.2", - "ember-source": "~3.23.0-beta.1", + "ember-source": "~3.23.1", "ember-template-lint": "^2.14.0", - "eslint": "^7.11.0", - "eslint-plugin-ember": "^9.3.0", + "eslint": "^7.15.0", + "eslint-plugin-ember": "^10.0.2", "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "qunit": "^2.11.0", - "qunit-dom": "^1.6.0-beta.1" + "qunit": "^2.13.0", + "qunit-dom": "^1.6.0" }, "engines": { "node": "10.* || >= 12" diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index 27f6b9a226..bb8682211f 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -21,15 +21,15 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.0.0", - "@embroider/compat": "^0.27.0", - "@embroider/core": "^0.27.0", - "@embroider/webpack": "^0.27.0", + "@ember/test-helpers": "^2.1.1", + "@embroider/compat": "^0.33.0", + "@embroider/core": "^0.33.0", + "@embroider/webpack": "^0.33.0", "@glimmer/component": "^1.0.2", "@glimmer/tracking": "^1.0.2", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.6.0", + "ember-auto-import": "^1.8.0", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^4.0.0", "ember-cli-babel": "^7.23.0", @@ -37,24 +37,24 @@ "ember-cli-htmlbars": "^5.3.1", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", - "ember-cli-terser": "^4.0.0", - "ember-data": "~3.23.0-beta.0", + "ember-cli-terser": "^4.0.1", + "ember-data": "~3.23.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.2", - "ember-load-initializers": "^2.1.1", + "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^5.0.0-beta.4", + "ember-qunit": "^5.1.0", "ember-resolver": "^8.0.2", - "ember-source": "~3.23.0-beta.1", + "ember-source": "~3.23.1", "ember-template-lint": "^2.14.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.11.0", - "eslint-plugin-ember": "^9.3.0", + "eslint": "^7.15.0", + "eslint-plugin-ember": "^10.0.2", "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "qunit": "^2.11.0", - "qunit-dom": "^1.6.0-beta.1" + "qunit": "^2.13.0", + "qunit-dom": "^1.6.0" }, "engines": { "node": "10.* || >= 12" diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index d1635932c9..de7244bfae 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -21,12 +21,12 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.0.0", + "@ember/test-helpers": "^2.1.1", "@glimmer/component": "^1.0.2", "@glimmer/tracking": "^1.0.2", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.6.0", + "ember-auto-import": "^1.8.0", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^4.0.0", "ember-cli-babel": "^7.23.0", @@ -34,23 +34,23 @@ "ember-cli-htmlbars": "^5.3.1", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", - "ember-cli-terser": "^4.0.0", - "ember-data": "~3.23.0-beta.0", + "ember-cli-terser": "^4.0.1", + "ember-data": "~3.23.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.2", - "ember-load-initializers": "^2.1.1", + "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^5.0.0-beta.4", + "ember-qunit": "^5.1.0", "ember-resolver": "^8.0.2", - "ember-source": "~3.23.0-beta.1", + "ember-source": "~3.23.1", "ember-template-lint": "^2.14.0", - "eslint": "^7.11.0", - "eslint-plugin-ember": "^9.3.0", + "eslint": "^7.15.0", + "eslint-plugin-ember": "^10.0.2", "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "qunit": "^2.11.0", - "qunit-dom": "^1.6.0-beta.1" + "qunit": "^2.13.0", + "qunit-dom": "^1.6.0" }, "engines": { "node": "10.* || >= 12" diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 2ae4618dc6..c9640fe3e8 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -21,12 +21,12 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.0.0", + "@ember/test-helpers": "^2.1.1", "@glimmer/component": "^1.0.2", "@glimmer/tracking": "^1.0.2", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.6.0", + "ember-auto-import": "^1.8.0", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^4.0.0", "ember-cli-babel": "^7.23.0", @@ -34,24 +34,24 @@ "ember-cli-htmlbars": "^5.3.1", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", - "ember-cli-terser": "^4.0.0", - "ember-data": "~3.23.0-beta.0", + "ember-cli-terser": "^4.0.1", + "ember-data": "~3.23.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.2", - "ember-load-initializers": "^2.1.1", + "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^5.0.0-beta.4", + "ember-qunit": "^5.1.0", "ember-resolver": "^8.0.2", - "ember-source": "~3.23.0-beta.1", + "ember-source": "~3.23.1", "ember-template-lint": "^2.14.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.11.0", - "eslint-plugin-ember": "^9.3.0", + "eslint": "^7.15.0", + "eslint-plugin-ember": "^10.0.2", "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "qunit": "^2.11.0", - "qunit-dom": "^1.6.0-beta.1" + "qunit": "^2.13.0", + "qunit-dom": "^1.6.0" }, "engines": { "node": "10.* || >= 12" From 38b3087ff9addaf640713155e1fba61c746c4b94 Mon Sep 17 00:00:00 2001 From: Edward Faulkner Date: Wed, 2 Dec 2020 13:42:55 -0500 Subject: [PATCH 581/818] Prevent build cycles when app is within a watched dir Embroider v2 packages can put their source code wherever they want to (as they are "just regular node packages"). That means when we're interactively rebuilding them, we need to watch their root. But if a v2 addon contains its own test suite, and that test suite emits a `dist` folder, we will end up watching our own output, and cause an infinite build loop. This fixes that by always ignoring the build's own output directory. This depends on https://github.com/broccolijs/broccoli/pull/474 and will be updated to stop pointing at my fork once we have a broccoli release. --- lib/models/watcher.js | 2 +- lib/tasks/build-watch.js | 2 ++ lib/tasks/serve.js | 1 + package.json | 2 +- yarn.lock | 8 ++++---- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/models/watcher.js b/lib/models/watcher.js index 38d8416ccc..380867687b 100644 --- a/lib/models/watcher.js +++ b/lib/models/watcher.js @@ -42,7 +42,7 @@ module.exports = class Watcher extends CoreObject { const { Watcher } = require('broccoli'); const { watchedSourceNodeWrappers } = this.builder.builder; - let watcher = new Watcher(this.builder, watchedSourceNodeWrappers, { saneOptions: options }); + let watcher = new Watcher(this.builder, watchedSourceNodeWrappers, { saneOptions: options, ignored: this.ignored }); watcher.start(); diff --git a/lib/tasks/build-watch.js b/lib/tasks/build-watch.js index d3e27550e2..c390088981 100644 --- a/lib/tasks/build-watch.js +++ b/lib/tasks/build-watch.js @@ -1,6 +1,7 @@ 'use strict'; const chalk = require('chalk'); +const path = require('path'); const Task = require('../models/task'); const Watcher = require('../models/watcher'); const Builder = require('../models/builder'); @@ -39,6 +40,7 @@ class BuildWatchTask extends Task { builder, analytics: this.analytics, options, + ignored: [path.resolve(this.project.root, options.outputPath)], }); await watcher; diff --git a/lib/tasks/serve.js b/lib/tasks/serve.js index 64d7c7598e..6f65eaed6c 100644 --- a/lib/tasks/serve.js +++ b/lib/tasks/serve.js @@ -61,6 +61,7 @@ class ServeTask extends Task { analytics: this.analytics, options, serving: true, + ignored: [path.resolve(this.project.root, options.outputPath)], }); let serverRoot = './server'; diff --git a/package.json b/package.json index 979a9fffe4..0308d91260 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "babel-plugin-module-resolver": "^4.0.0", "bower-config": "^1.4.3", "bower-endpoint-parser": "0.2.2", - "broccoli": "^3.4.2", + "broccoli": "^3.5.0", "broccoli-amd-funnel": "^2.0.1", "broccoli-babel-transpiler": "^7.8.0", "broccoli-builder": "^0.18.14", diff --git a/yarn.lock b/yarn.lock index 4162e32c1a..fa0d2ff9e6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1429,10 +1429,10 @@ broccoli@^2.0.0: underscore.string "^3.2.2" watch-detector "^0.1.0" -broccoli@^3.4.2: - version "3.4.2" - resolved "https://registry.yarnpkg.com/broccoli/-/broccoli-3.4.2.tgz#a0c2605bea285c50cac304f482b86670630f4701" - integrity sha512-OZ0QEyL2i08xJWwhg9Fe0x5IScjBur986QRWrj5mAyHRZqF1nShEz01BPFoLt6L2tqJT0gyZsf8nfUvm8CcJgA== +broccoli@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/broccoli/-/broccoli-3.5.0.tgz#bdf96dc32980d1ad9f7ef5e68aaaa19e8d47b602" + integrity sha512-qGYirIs6W5NGzDPMTRtoOnveP3UQJKWFjAWdRRZJjCoAJYN872sXuO48cnNfnc/c1nd9fCR8et4knlTPgI+9yQ== dependencies: "@types/chai" "^4.2.9" "@types/chai-as-promised" "^7.1.2" From e7b04ed854e779225df3689f5e4f7f7891d58e4c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 7 Dec 2020 16:33:11 +0000 Subject: [PATCH 582/818] Bump temp from 0.9.2 to 0.9.4 (#9393) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 979a9fffe4..c5720666f8 100644 --- a/package.json +++ b/package.json @@ -119,7 +119,7 @@ "silent-error": "^1.1.1", "sort-package-json": "^1.48.0", "symlink-or-copy": "^1.3.1", - "temp": "0.9.2", + "temp": "0.9.4", "testem": "^3.2.0", "tiny-lr": "^2.0.0", "tree-sync": "^2.1.0", diff --git a/yarn.lock b/yarn.lock index 4162e32c1a..8c6504c7b5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7093,10 +7093,10 @@ tap-parser@^7.0.0: js-yaml "^3.2.7" minipass "^2.2.0" -temp@0.9.2: - version "0.9.2" - resolved "https://registry.yarnpkg.com/temp/-/temp-0.9.2.tgz#06728e6e4b847e3ea5579c69c44bcc3ee6a47100" - integrity sha512-KLVd6CXeUYsqmI/LBWDLg3bFkdZPg0Xr/Gn79GUuPNiISzp6v/EKUaCOrxqeH1w/wVNmrljyDRgKxhZV9JzyJA== +temp@0.9.4: + version "0.9.4" + resolved "https://registry.yarnpkg.com/temp/-/temp-0.9.4.tgz#cd20a8580cb63635d0e4e9d4bd989d44286e7620" + integrity sha512-yYrrsWnrXMcdsnu/7YMYAofM1ktpL5By7vZhf15CrXijWWrEYZks5AXBudalfSWJLlnen/QUJUB5aoB0kqZUGA== dependencies: mkdirp "^0.5.1" rimraf "~2.6.2" From 71564017636609985171a2d660457cf88e43ec3d Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 7 Dec 2020 18:43:13 +0000 Subject: [PATCH 583/818] Bump is-language-code from 1.0.12 to 2.0.0 (#9395) --- package.json | 4 ++-- yarn.lock | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 425479e89a..edd69cf858 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "http-proxy": "^1.18.1", "inflection": "^1.12.0", "is-git-url": "^1.0.0", - "is-language-code": "^1.0.12", + "is-language-code": "^2.0.0", "isbinaryfile": "^4.0.6", "js-yaml": "^3.14.0", "json-stable-stringify": "^1.0.1", @@ -146,7 +146,7 @@ "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.1.4", "fixturify": "^2.1.0", - "is-language-code": "^1.0.12", + "is-language-code": "^2.0.0", "latest-version": "^5.1.0", "mocha": "^8.2.0", "nock": "^13.0.5", diff --git a/yarn.lock b/yarn.lock index 46fc3e30b3..2579922d19 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4254,10 +4254,10 @@ is-interactive@^1.0.0: resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== -is-language-code@^1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/is-language-code/-/is-language-code-1.0.12.tgz#1623a97cf74e075a8264e0ced4fee0c0ba9ac965" - integrity sha512-0A2rCeoBTALG0w64eUD/8tbymYUOZJS8D71WK/luDWvF41jYpM12EGSHtkY7GAGONuW/XTrnRoJ9RjWFDPasJA== +is-language-code@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-language-code/-/is-language-code-2.0.0.tgz#6f4d59c551d73b98c45cf9f1d3ce65cee060e65b" + integrity sha512-6xKmRRcP2YdmMBZMVS3uiJRPQgcMYolkD6hFw2Y4KjqyIyaJlCGxUt56tuu0iIV8q9r8kMEo0Gjd/GFwKrgjbw== is-negative-zero@^2.0.0: version "2.0.0" From 799f206f7df9f9183070b879a32e41ebe3c452c6 Mon Sep 17 00:00:00 2001 From: Bryan Mishkin <698306+bmish@users.noreply.github.com> Date: Tue, 8 Dec 2020 15:57:01 -0500 Subject: [PATCH 584/818] fix: ensure correct lint scripts run when running test script The test script can just run the top-level lint script, instead of running lint:* which will run the lint:fix too. --- blueprints/app/files/package.json | 2 +- tests/fixtures/addon/defaults/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/defaults/package.json | 2 +- tests/fixtures/app/embroider-no-welcome/package.json | 2 +- tests/fixtures/app/embroider/package.json | 2 +- tests/fixtures/app/npm/package.json | 2 +- tests/fixtures/app/yarn/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 1a4d586092..07e045cfe1 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -19,7 +19,7 @@ "lint:js": "eslint . --cache", "lint:js:fix": "eslint . --fix", "start": "ember serve", - "test": "npm-run-all lint:* test:*", + "test": "npm-run-all lint test:*", "test:ember": "ember test" }, "devDependencies": { diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index 427ac66fff..2b1c2957e7 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -21,7 +21,7 @@ "lint:js": "eslint . --cache", "lint:js:fix": "eslint . --fix", "start": "ember serve", - "test": "npm-run-all lint:* test:*", + "test": "npm-run-all lint test:*", "test:ember": "ember test", "test:ember-compatibility": "ember try:each" }, diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index dd9c9ae090..8a52b2bca4 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -21,7 +21,7 @@ "lint:js": "eslint . --cache", "lint:js:fix": "eslint . --fix", "start": "ember serve", - "test": "npm-run-all lint:* test:*", + "test": "npm-run-all lint test:*", "test:ember": "ember test", "test:ember-compatibility": "ember try:each" }, diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index efb74c42ca..ec309caefb 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -19,7 +19,7 @@ "lint:js": "eslint . --cache", "lint:js:fix": "eslint . --fix", "start": "ember serve", - "test": "npm-run-all lint:* test:*", + "test": "npm-run-all lint test:*", "test:ember": "ember test" }, "devDependencies": { diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index 9d5fb8ae3f..7609f38e77 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -19,7 +19,7 @@ "lint:js": "eslint . --cache", "lint:js:fix": "eslint . --fix", "start": "ember serve", - "test": "npm-run-all lint:* test:*", + "test": "npm-run-all lint test:*", "test:ember": "ember test" }, "devDependencies": { diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index ff4c2e4361..fea0baa8e1 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -19,7 +19,7 @@ "lint:js": "eslint . --cache", "lint:js:fix": "eslint . --fix", "start": "ember serve", - "test": "npm-run-all lint:* test:*", + "test": "npm-run-all lint test:*", "test:ember": "ember test" }, "devDependencies": { diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 76fe17a15e..ed73d7e14d 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -19,7 +19,7 @@ "lint:js": "eslint . --cache", "lint:js:fix": "eslint . --fix", "start": "ember serve", - "test": "npm-run-all lint:* test:*", + "test": "npm-run-all lint test:*", "test:ember": "ember test" }, "devDependencies": { diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index efb74c42ca..ec309caefb 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -19,7 +19,7 @@ "lint:js": "eslint . --cache", "lint:js:fix": "eslint . --fix", "start": "ember serve", - "test": "npm-run-all lint:* test:*", + "test": "npm-run-all lint test:*", "test:ember": "ember test" }, "devDependencies": { From 0c2a8efe53d9ea4586c0d8ac7ed8304ec70fe475 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Tue, 8 Dec 2020 10:16:42 -0500 Subject: [PATCH 585/818] Allows preprocessors to know what type of tree is being transpiled. This will enable things like `ember-auto-import` to more appropriately understand the _type_ of thing being compiled. This is important in a number of circumstances, for example when deciding to add things to `assets/vendor.js` or to `assets/test-support.js`. --- lib/broccoli/default-packager.js | 4 ++++ lib/broccoli/ember-app.js | 1 + lib/models/addon.js | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/lib/broccoli/default-packager.js b/lib/broccoli/default-packager.js index fe72e9ec1a..3d38e26d52 100644 --- a/lib/broccoli/default-packager.js +++ b/lib/broccoli/default-packager.js @@ -443,6 +443,7 @@ module.exports = class DefaultPackager { 'template', preprocessTemplates(preprocessedTemplatesFromAddons, { registry: this.registry, + treeType: 'templates', }) ); } @@ -502,6 +503,7 @@ module.exports = class DefaultPackager { let preprocessedApp = preprocessJs(app, '/', this.name, { registry: this.registry, + treeType: 'app', }); this._cachedProcessedJavascript = callAddonsPostprocessTreeHook(this.project, 'js', preprocessedApp); @@ -550,6 +552,7 @@ module.exports = class DefaultPackager { outputPaths: this.distPaths.appCssFile, registry: this.registry, minifyCSS: this.minifyCSS.options, + treeType: 'styles', }; let stylesAndVendor = callAddonsPreprocessTreeHook(this.project, 'css', tree); @@ -737,6 +740,7 @@ module.exports = class DefaultPackager { const inputPath = '/tests'; let preprocessedTests = preprocessJs(treeToCompile, inputPath, this.name, { registry: this.registry, + treeType: 'test', }); let mergedTestTrees = mergeTrees([addonTestSupportTree, preprocessedTests], { diff --git a/lib/broccoli/ember-app.js b/lib/broccoli/ember-app.js index 983112d6af..8334737380 100644 --- a/lib/broccoli/ember-app.js +++ b/lib/broccoli/ember-app.js @@ -796,6 +796,7 @@ class EmberApp { tree = preprocessJs(tree, '/', '/', { annotation: `_precompileAppJsTree`, registry: this.registry, + treeType: 'app', }); // return the original params because there are multiple diff --git a/lib/models/addon.js b/lib/models/addon.js index 1a8ca0ef3b..c9bdb08ed3 100644 --- a/lib/models/addon.js +++ b/lib/models/addon.js @@ -944,6 +944,7 @@ let addonProto = { if (registryHasPreprocessor(this.registry, 'js')) { return this.preprocessJs(namespacedTree, '/', this.name, { registry: this.registry, + treeType: 'addon-test-support', }); } else { this._warn( @@ -972,6 +973,7 @@ let addonProto = { let processedStylesTree = preprocessCss(preprocessedStylesTree, '/', '/', { outputPaths: { addon: `${this.name}.css` }, registry: this.registry, + treeType: 'addon-styles', }); processedStylesTree = new Funnel(processedStylesTree, { destDir: `${this.name}/__COMPILED_STYLES__`, @@ -1136,6 +1138,7 @@ let addonProto = { let processedTemplateTree = preprocessTemplates(preprocessedTemplateTree, { annotation: `compileTemplates(${this.name})`, registry: this.registry, + treeType: 'addon-templates', }); let postprocessedTemplateTree = this._addonPostprocessTree('template', processedTemplateTree); @@ -1308,6 +1311,7 @@ let addonProto = { let processedAddonJS = this.preprocessJs(preprocessedAddonJS, '/', this.name, { annotation: `processedAddonJsFiles(${this.name})`, registry: this.registry, + treeType: 'addon', }); let postprocessedAddonJs = this._addonPostprocessTree('js', processedAddonJS); From b636119669f9e316d65be681943aa2a3b345cccf Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 10 Dec 2020 18:51:50 +0000 Subject: [PATCH 586/818] [Security] Bump ini from 1.3.5 to 1.3.7 (#9412) --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 2579922d19..612546f8a0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4033,9 +4033,9 @@ inherits@2.0.3: integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== + version "1.3.7" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.7.tgz#a09363e1911972ea16d7a8851005d84cf09a9a84" + integrity sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ== inline-source-map-comment@^1.0.5: version "1.0.5" From c2a352585b71b50d16dd98422119820324ac6dd7 Mon Sep 17 00:00:00 2001 From: Simon Ihmig Date: Thu, 10 Dec 2020 17:03:17 +0100 Subject: [PATCH 587/818] gitignore .eslintcache #9391 added the `-cache` flag to the eslint script, so we should ignore the cache file. --- blueprints/app/files/gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/blueprints/app/files/gitignore b/blueprints/app/files/gitignore index c40a1b2aba..7e0f7ddce8 100644 --- a/blueprints/app/files/gitignore +++ b/blueprints/app/files/gitignore @@ -12,6 +12,7 @@ /.env* /.pnp* /.sass-cache +/.eslintcache /connect.lock /coverage/ /libpeerconnection.log From a12ccab8bf93eb9cdbeaacc1aef7ea733f1c786d Mon Sep 17 00:00:00 2001 From: simonihmig Date: Fri, 11 Dec 2020 15:42:26 +0100 Subject: [PATCH 588/818] npmignore .eslintcache --- blueprints/addon/files/npmignore | 1 + 1 file changed, 1 insertion(+) diff --git a/blueprints/addon/files/npmignore b/blueprints/addon/files/npmignore index bd09adff92..88818f2c82 100644 --- a/blueprints/addon/files/npmignore +++ b/blueprints/addon/files/npmignore @@ -10,6 +10,7 @@ /.editorconfig /.ember-cli /.env* +/.eslintcache /.eslintignore /.eslintrc.js /.git/ From 3efb71f28ff00e631a45c310330d70cae5b02738 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 14 Dec 2020 10:21:44 -0500 Subject: [PATCH 589/818] Revert testing infrastructure updates (temp fix for 3.23.0). This reverts the testing infrastructure updates that have been in the beta cycle since 3.23.0-beta.1 in order to ship ember-cli@3.23.0 (we are already weeks late). At the moment, the current implementation places `qunit` and `es6-promise` into the `assets/vendor.js` (on accident). A number of fixes are on the way but we need to release 3.23.0 before they are ready for adoption. --- blueprints/app/files/package.json | 6 ++---- blueprints/app/files/tests/index.html | 7 ------- tests/fixtures/addon/defaults/package.json | 4 +--- tests/fixtures/addon/yarn/package.json | 4 +--- tests/fixtures/app/defaults/package.json | 4 +--- tests/fixtures/app/embroider-no-welcome/package.json | 4 +--- tests/fixtures/app/embroider/package.json | 4 +--- tests/fixtures/app/npm/package.json | 4 +--- tests/fixtures/app/yarn/package.json | 4 +--- 9 files changed, 9 insertions(+), 32 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 335e61cb8a..d4bd6f6e3c 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -20,8 +20,7 @@ "test:ember": "ember test" }, "devDependencies": { - "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.1<% if (embroider) { %>", + "@ember/optional-features": "^2.0.0<% if (embroider) { %>", "@embroider/compat": "^0.33.0", "@embroider/core": "^0.33.0", "@embroider/webpack": "^0.33.0<% } %>", @@ -43,7 +42,7 @@ "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^5.1.0", + "ember-qunit": "^4.6.0", "ember-resolver": "^8.0.2", "ember-source": "~3.23.1", "ember-template-lint": "^2.14.0<% if (welcome) { %>", @@ -53,7 +52,6 @@ "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "qunit": "^2.13.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/blueprints/app/files/tests/index.html b/blueprints/app/files/tests/index.html index 0f191fece5..140695b91b 100644 --- a/blueprints/app/files/tests/index.html +++ b/blueprints/app/files/tests/index.html @@ -20,13 +20,6 @@ {{content-for "body"}} {{content-for "test-body"}} - -
-
-
-
-
-
diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index 4ca456c7d8..e853bb35fc 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -28,7 +28,6 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.1", "@glimmer/component": "^1.0.2", "@glimmer/tracking": "^1.0.2", "babel-eslint": "^10.1.0", @@ -43,7 +42,7 @@ "ember-export-application-global": "^2.0.1", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^5.1.0", + "ember-qunit": "^4.6.0", "ember-resolver": "^8.0.2", "ember-source": "~3.23.1", "ember-source-channel-url": "^3.0.0", @@ -54,7 +53,6 @@ "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "qunit": "^2.13.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 4e77c7fc87..1ae3f6cd95 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -28,7 +28,6 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.1", "@glimmer/component": "^1.0.2", "@glimmer/tracking": "^1.0.2", "babel-eslint": "^10.1.0", @@ -43,7 +42,7 @@ "ember-export-application-global": "^2.0.1", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^5.1.0", + "ember-qunit": "^4.6.0", "ember-resolver": "^8.0.2", "ember-source": "~3.23.1", "ember-source-channel-url": "^3.0.0", @@ -55,7 +54,6 @@ "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "qunit": "^2.13.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index c9640fe3e8..524841b353 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -21,7 +21,6 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.1", "@glimmer/component": "^1.0.2", "@glimmer/tracking": "^1.0.2", "babel-eslint": "^10.1.0", @@ -40,7 +39,7 @@ "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^5.1.0", + "ember-qunit": "^4.6.0", "ember-resolver": "^8.0.2", "ember-source": "~3.23.1", "ember-template-lint": "^2.14.0", @@ -50,7 +49,6 @@ "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "qunit": "^2.13.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index 78a6e26efc..a6cd698191 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -21,7 +21,6 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.1", "@embroider/compat": "^0.33.0", "@embroider/core": "^0.33.0", "@embroider/webpack": "^0.33.0", @@ -43,7 +42,7 @@ "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^5.1.0", + "ember-qunit": "^4.6.0", "ember-resolver": "^8.0.2", "ember-source": "~3.23.1", "ember-template-lint": "^2.14.0", @@ -52,7 +51,6 @@ "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "qunit": "^2.13.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index bb8682211f..f5549eaeec 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -21,7 +21,6 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.1", "@embroider/compat": "^0.33.0", "@embroider/core": "^0.33.0", "@embroider/webpack": "^0.33.0", @@ -43,7 +42,7 @@ "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^5.1.0", + "ember-qunit": "^4.6.0", "ember-resolver": "^8.0.2", "ember-source": "~3.23.1", "ember-template-lint": "^2.14.0", @@ -53,7 +52,6 @@ "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "qunit": "^2.13.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index de7244bfae..5aa923e28b 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -21,7 +21,6 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.1", "@glimmer/component": "^1.0.2", "@glimmer/tracking": "^1.0.2", "babel-eslint": "^10.1.0", @@ -40,7 +39,7 @@ "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^5.1.0", + "ember-qunit": "^4.6.0", "ember-resolver": "^8.0.2", "ember-source": "~3.23.1", "ember-template-lint": "^2.14.0", @@ -49,7 +48,6 @@ "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "qunit": "^2.13.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index c9640fe3e8..524841b353 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -21,7 +21,6 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.1", "@glimmer/component": "^1.0.2", "@glimmer/tracking": "^1.0.2", "babel-eslint": "^10.1.0", @@ -40,7 +39,7 @@ "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^5.1.0", + "ember-qunit": "^4.6.0", "ember-resolver": "^8.0.2", "ember-source": "~3.23.1", "ember-template-lint": "^2.14.0", @@ -50,7 +49,6 @@ "eslint-plugin-node": "^11.1.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "qunit": "^2.13.0", "qunit-dom": "^1.6.0" }, "engines": { From 9df1be917478634837e63234c567c3a461e9bcf1 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 14 Dec 2020 10:25:04 -0500 Subject: [PATCH 590/818] Revert "Allows preprocessors to know what type of tree is being transpiled." This reverts commit 0c2a8efe53d9ea4586c0d8ac7ed8304ec70fe475 due to the issue reported in https://github.com/ef4/ember-auto-import/pull/330. This will be reverted once https://github.com/ef4/ember-auto-import/pull/330 lands in an ember-auto-import release. --- lib/broccoli/default-packager.js | 4 ---- lib/broccoli/ember-app.js | 1 - lib/models/addon.js | 4 ---- 3 files changed, 9 deletions(-) diff --git a/lib/broccoli/default-packager.js b/lib/broccoli/default-packager.js index 3d38e26d52..fe72e9ec1a 100644 --- a/lib/broccoli/default-packager.js +++ b/lib/broccoli/default-packager.js @@ -443,7 +443,6 @@ module.exports = class DefaultPackager { 'template', preprocessTemplates(preprocessedTemplatesFromAddons, { registry: this.registry, - treeType: 'templates', }) ); } @@ -503,7 +502,6 @@ module.exports = class DefaultPackager { let preprocessedApp = preprocessJs(app, '/', this.name, { registry: this.registry, - treeType: 'app', }); this._cachedProcessedJavascript = callAddonsPostprocessTreeHook(this.project, 'js', preprocessedApp); @@ -552,7 +550,6 @@ module.exports = class DefaultPackager { outputPaths: this.distPaths.appCssFile, registry: this.registry, minifyCSS: this.minifyCSS.options, - treeType: 'styles', }; let stylesAndVendor = callAddonsPreprocessTreeHook(this.project, 'css', tree); @@ -740,7 +737,6 @@ module.exports = class DefaultPackager { const inputPath = '/tests'; let preprocessedTests = preprocessJs(treeToCompile, inputPath, this.name, { registry: this.registry, - treeType: 'test', }); let mergedTestTrees = mergeTrees([addonTestSupportTree, preprocessedTests], { diff --git a/lib/broccoli/ember-app.js b/lib/broccoli/ember-app.js index 8334737380..983112d6af 100644 --- a/lib/broccoli/ember-app.js +++ b/lib/broccoli/ember-app.js @@ -796,7 +796,6 @@ class EmberApp { tree = preprocessJs(tree, '/', '/', { annotation: `_precompileAppJsTree`, registry: this.registry, - treeType: 'app', }); // return the original params because there are multiple diff --git a/lib/models/addon.js b/lib/models/addon.js index c9bdb08ed3..1a8ca0ef3b 100644 --- a/lib/models/addon.js +++ b/lib/models/addon.js @@ -944,7 +944,6 @@ let addonProto = { if (registryHasPreprocessor(this.registry, 'js')) { return this.preprocessJs(namespacedTree, '/', this.name, { registry: this.registry, - treeType: 'addon-test-support', }); } else { this._warn( @@ -973,7 +972,6 @@ let addonProto = { let processedStylesTree = preprocessCss(preprocessedStylesTree, '/', '/', { outputPaths: { addon: `${this.name}.css` }, registry: this.registry, - treeType: 'addon-styles', }); processedStylesTree = new Funnel(processedStylesTree, { destDir: `${this.name}/__COMPILED_STYLES__`, @@ -1138,7 +1136,6 @@ let addonProto = { let processedTemplateTree = preprocessTemplates(preprocessedTemplateTree, { annotation: `compileTemplates(${this.name})`, registry: this.registry, - treeType: 'addon-templates', }); let postprocessedTemplateTree = this._addonPostprocessTree('template', processedTemplateTree); @@ -1311,7 +1308,6 @@ let addonProto = { let processedAddonJS = this.preprocessJs(preprocessedAddonJS, '/', this.name, { annotation: `processedAddonJsFiles(${this.name})`, registry: this.registry, - treeType: 'addon', }); let postprocessedAddonJs = this._addonPostprocessTree('js', processedAddonJS); From 4ced19e088e1840d88a66678d744d124673cc55f Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 14 Dec 2020 10:27:05 -0500 Subject: [PATCH 591/818] Make update-blueprint-dependencies use relative paths. This enables editors to more easily support "jump to file" (since the file is relative to the current one), but doesn't really change what the script actually does. --- dev/update-blueprint-dependencies.js | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/dev/update-blueprint-dependencies.js b/dev/update-blueprint-dependencies.js index 2c47c7ea5a..fff9cd986e 100644 --- a/dev/update-blueprint-dependencies.js +++ b/dev/update-blueprint-dependencies.js @@ -18,6 +18,7 @@ node dev/update-blueprint-dependencies.js --filter eslint } const fs = require('fs'); +const path = require('path'); const util = require('util'); const nopt = require('nopt'); const _latestVersion = require('latest-version'); @@ -38,15 +39,15 @@ const OPTIONS = nopt({ }); const PACKAGE_FILES = [ - 'blueprints/app/files/package.json', - 'blueprints/addon/additional-dev-dependencies.json', - 'tests/fixtures/app/defaults/package.json', - 'tests/fixtures/app/npm/package.json', - 'tests/fixtures/app/yarn/package.json', - 'tests/fixtures/app/embroider/package.json', - 'tests/fixtures/app/embroider-no-welcome/package.json', - 'tests/fixtures/addon/defaults/package.json', - 'tests/fixtures/addon/yarn/package.json', + '../blueprints/app/files/package.json', + '../blueprints/addon/additional-dev-dependencies.json', + '../tests/fixtures/app/defaults/package.json', + '../tests/fixtures/app/npm/package.json', + '../tests/fixtures/app/yarn/package.json', + '../tests/fixtures/app/embroider/package.json', + '../tests/fixtures/app/embroider-no-welcome/package.json', + '../tests/fixtures/addon/defaults/package.json', + '../tests/fixtures/addon/yarn/package.json', ]; function shouldCheckDependency(dependency) { @@ -103,14 +104,15 @@ async function updateDependencies(dependencies) { async function main() { for (let packageFile of PACKAGE_FILES) { - let pkg = JSON.parse(fs.readFileSync(packageFile, { encoding: 'utf8' })); + let filePath = path.join(__dirname, packageFile); + let pkg = JSON.parse(fs.readFileSync(filePath, { encoding: 'utf8' })); await updateDependencies(pkg.dependencies); await updateDependencies(pkg.devDependencies); let output = `${JSON.stringify(pkg, null, 2)}\n`; - fs.writeFileSync(packageFile, output, { encoding: 'utf8' }); + fs.writeFileSync(filePath, output, { encoding: 'utf8' }); } } From 892641416b64d66dff488ef1eb23331c76845c6a Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 14 Dec 2020 13:57:49 -0500 Subject: [PATCH 592/818] Revert "fix: Adds missing qunit-dom setup invocation" This reverts commit c8bf7bbd7257f77818bb3c306d24a8cde7b9fd4c. Temporarily rolls back qunit-dom migration (the change is bound to ember-qunit@5+). --- blueprints/app/files/tests/test-helper.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/blueprints/app/files/tests/test-helper.js b/blueprints/app/files/tests/test-helper.js index 959791ce73..2302100167 100644 --- a/blueprints/app/files/tests/test-helper.js +++ b/blueprints/app/files/tests/test-helper.js @@ -1,12 +1,8 @@ import Application from '<%= modulePrefix %>/app'; import config from '<%= modulePrefix %>/config/environment'; -import * as QUnit from 'qunit'; import { setApplication } from '@ember/test-helpers'; -import { setup } from 'qunit-dom'; import { start } from 'ember-qunit'; setApplication(Application.create(config.APP)); -setup(QUnit.assert); - start(); From fe1da22a80e84617f4aa675134015dc0c25db22f Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 14 Dec 2020 16:49:40 -0500 Subject: [PATCH 593/818] Add v3.23.0 to CHANGELOG.md. --- CHANGELOG.md | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db33252ce3..0369647814 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,32 +1,16 @@ # ember-cli Changelog - -## v3.23.0-beta.2 - -#### Blueprint Changes - -- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.23.0-beta.1...v3.23.0-beta.2) -- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.23.0-beta.1...v3.23.0-beta.2) - -#### Changelog - -- [#9371](https://github.com/ember-cli/ember-cli/pull/9371) Adds missing `qunit-dom` setup invocation [@scalvert](https://github.com/scalvert) - -Thank you to all who took the time to contribute! - -## v3.23.0-beta.1 +## v3.23.0 #### Blueprint Changes -- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.22.0...v3.23.0-beta.1) -- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.22.0...v3.23.0-beta.1) +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.22.0...v3.23.0) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.22.0...v3.23.0) #### Changelog -- [#9340](https://github.com/ember-cli/ember-cli/pull/9340) Update blueprints with new testing configuration [@scalvert](https://github.com/scalvert) -- [#9361](https://github.com/ember-cli/ember-cli/pull/9361) / [#9364](https://github.com/ember-cli/ember-cli/pull/9364) / [#9365](https://github.com/ember-cli/ember-cli/pull/9365) Update dependencies to latest. [@rwjblue](https://github.com/rwjblue) -- [#9368](https://github.com/ember-cli/ember-cli/pull/9368) Update `markdown-it` to latest. [@rwjblue](https://github.com/rwjblue) -- [#9369](https://github.com/ember-cli/ember-cli/pull/9369) Update `ember-source` and `ember-data` for 3.23.0-beta's. [@rwjblue](https://github.com/rwjblue) +- [#9369](https://github.com/ember-cli/ember-cli/pull/9369) / [#9406](https://github.com/ember-cli/ember-cli/pull/9406) Update blueprint dependencies to latest. [@rwjblue](https://github.com/rwjblue) +- [#9361](https://github.com/ember-cli/ember-cli/pull/9361) / [#9364](https://github.com/ember-cli/ember-cli/pull/9364) / [#9365](https://github.com/ember-cli/ember-cli/pull/9365) / [#9368](https://github.com/ember-cli/ember-cli/pull/9368) Update dependencies to latest. [@rwjblue](https://github.com/rwjblue) Thank you to all who took the time to contribute! From 02a62261a0e9e5eda274ea89f261db5be0773b7f Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 14 Dec 2020 16:50:40 -0500 Subject: [PATCH 594/818] Release 3.23.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4364777dfe..193f64f764 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.23.0-beta.2", + "version": "3.23.0", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From 2ece79d6ada478f149a8e5f09eddef3271f3149a Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 14 Dec 2020 17:00:28 -0500 Subject: [PATCH 595/818] Revert "Revert "fix: Adds missing qunit-dom setup invocation"" This reverts commit 892641416b64d66dff488ef1eb23331c76845c6a. --- blueprints/app/files/tests/test-helper.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/blueprints/app/files/tests/test-helper.js b/blueprints/app/files/tests/test-helper.js index 2302100167..959791ce73 100644 --- a/blueprints/app/files/tests/test-helper.js +++ b/blueprints/app/files/tests/test-helper.js @@ -1,8 +1,12 @@ import Application from '<%= modulePrefix %>/app'; import config from '<%= modulePrefix %>/config/environment'; +import * as QUnit from 'qunit'; import { setApplication } from '@ember/test-helpers'; +import { setup } from 'qunit-dom'; import { start } from 'ember-qunit'; setApplication(Application.create(config.APP)); +setup(QUnit.assert); + start(); From ce7f7f508c591d9db416ee72e87deba0625a439c Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 14 Dec 2020 17:01:14 -0500 Subject: [PATCH 596/818] Revert "Revert "Allows preprocessors to know what type of tree is being transpiled."" This reverts commit 9df1be917478634837e63234c567c3a461e9bcf1. --- lib/broccoli/default-packager.js | 4 ++++ lib/broccoli/ember-app.js | 1 + lib/models/addon.js | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/lib/broccoli/default-packager.js b/lib/broccoli/default-packager.js index fe72e9ec1a..3d38e26d52 100644 --- a/lib/broccoli/default-packager.js +++ b/lib/broccoli/default-packager.js @@ -443,6 +443,7 @@ module.exports = class DefaultPackager { 'template', preprocessTemplates(preprocessedTemplatesFromAddons, { registry: this.registry, + treeType: 'templates', }) ); } @@ -502,6 +503,7 @@ module.exports = class DefaultPackager { let preprocessedApp = preprocessJs(app, '/', this.name, { registry: this.registry, + treeType: 'app', }); this._cachedProcessedJavascript = callAddonsPostprocessTreeHook(this.project, 'js', preprocessedApp); @@ -550,6 +552,7 @@ module.exports = class DefaultPackager { outputPaths: this.distPaths.appCssFile, registry: this.registry, minifyCSS: this.minifyCSS.options, + treeType: 'styles', }; let stylesAndVendor = callAddonsPreprocessTreeHook(this.project, 'css', tree); @@ -737,6 +740,7 @@ module.exports = class DefaultPackager { const inputPath = '/tests'; let preprocessedTests = preprocessJs(treeToCompile, inputPath, this.name, { registry: this.registry, + treeType: 'test', }); let mergedTestTrees = mergeTrees([addonTestSupportTree, preprocessedTests], { diff --git a/lib/broccoli/ember-app.js b/lib/broccoli/ember-app.js index 983112d6af..8334737380 100644 --- a/lib/broccoli/ember-app.js +++ b/lib/broccoli/ember-app.js @@ -796,6 +796,7 @@ class EmberApp { tree = preprocessJs(tree, '/', '/', { annotation: `_precompileAppJsTree`, registry: this.registry, + treeType: 'app', }); // return the original params because there are multiple diff --git a/lib/models/addon.js b/lib/models/addon.js index 1a8ca0ef3b..c9bdb08ed3 100644 --- a/lib/models/addon.js +++ b/lib/models/addon.js @@ -944,6 +944,7 @@ let addonProto = { if (registryHasPreprocessor(this.registry, 'js')) { return this.preprocessJs(namespacedTree, '/', this.name, { registry: this.registry, + treeType: 'addon-test-support', }); } else { this._warn( @@ -972,6 +973,7 @@ let addonProto = { let processedStylesTree = preprocessCss(preprocessedStylesTree, '/', '/', { outputPaths: { addon: `${this.name}.css` }, registry: this.registry, + treeType: 'addon-styles', }); processedStylesTree = new Funnel(processedStylesTree, { destDir: `${this.name}/__COMPILED_STYLES__`, @@ -1136,6 +1138,7 @@ let addonProto = { let processedTemplateTree = preprocessTemplates(preprocessedTemplateTree, { annotation: `compileTemplates(${this.name})`, registry: this.registry, + treeType: 'addon-templates', }); let postprocessedTemplateTree = this._addonPostprocessTree('template', processedTemplateTree); @@ -1308,6 +1311,7 @@ let addonProto = { let processedAddonJS = this.preprocessJs(preprocessedAddonJS, '/', this.name, { annotation: `processedAddonJsFiles(${this.name})`, registry: this.registry, + treeType: 'addon', }); let postprocessedAddonJs = this._addonPostprocessTree('js', processedAddonJS); From f5fae0ab2763efef0667a51cd44469449d6488b4 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 14 Dec 2020 17:08:41 -0500 Subject: [PATCH 597/818] Revert "Revert testing infrastructure updates (temp fix for 3.23.0)." This reverts commit 3efb71f28ff00e631a45c310330d70cae5b02738. --- blueprints/app/files/package.json | 6 ++++-- blueprints/app/files/tests/index.html | 7 +++++++ tests/fixtures/addon/defaults/package.json | 4 +++- tests/fixtures/addon/yarn/package.json | 4 +++- tests/fixtures/app/defaults/package.json | 4 +++- tests/fixtures/app/embroider-no-welcome/package.json | 4 +++- tests/fixtures/app/embroider/package.json | 4 +++- tests/fixtures/app/npm/package.json | 4 +++- tests/fixtures/app/yarn/package.json | 4 +++- 9 files changed, 32 insertions(+), 9 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index c14ddfc76f..8b759160c9 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -23,7 +23,8 @@ "test:ember": "ember test" }, "devDependencies": { - "@ember/optional-features": "^2.0.0<% if (embroider) { %>", + "@ember/optional-features": "^2.0.0", + "@ember/test-helpers": "^2.1.1<% if (embroider) { %>", "@embroider/compat": "^0.33.0", "@embroider/core": "^0.33.0", "@embroider/webpack": "^0.33.0<% } %>", @@ -46,7 +47,7 @@ "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.0.3", - "ember-qunit": "^4.6.0", + "ember-qunit": "^5.1.0", "ember-resolver": "^8.0.2", "ember-source": "~3.23.1", "ember-template-lint": "^2.14.0<% if (welcome) { %>", @@ -59,6 +60,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", + "qunit": "^2.13.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/blueprints/app/files/tests/index.html b/blueprints/app/files/tests/index.html index 140695b91b..75e308e746 100644 --- a/blueprints/app/files/tests/index.html +++ b/blueprints/app/files/tests/index.html @@ -21,6 +21,13 @@ {{content-for "body"}} {{content-for "test-body"}} +
+
+
+
+
+
+ diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index c033b720fb..21f715a110 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -31,6 +31,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", + "@ember/test-helpers": "^2.1.1", "@glimmer/component": "^1.0.2", "@glimmer/tracking": "^1.0.2", "babel-eslint": "^10.1.0", @@ -46,7 +47,7 @@ "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.0.3", - "ember-qunit": "^4.6.0", + "ember-qunit": "^5.1.0", "ember-resolver": "^8.0.2", "ember-source": "~3.23.1", "ember-source-channel-url": "^3.0.0", @@ -60,6 +61,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", + "qunit": "^2.13.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 4aabaf3d7b..5dbf3642ef 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -31,6 +31,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", + "@ember/test-helpers": "^2.1.1", "@glimmer/component": "^1.0.2", "@glimmer/tracking": "^1.0.2", "babel-eslint": "^10.1.0", @@ -46,7 +47,7 @@ "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.0.3", - "ember-qunit": "^4.6.0", + "ember-qunit": "^5.1.0", "ember-resolver": "^8.0.2", "ember-source": "~3.23.1", "ember-source-channel-url": "^3.0.0", @@ -61,6 +62,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", + "qunit": "^2.13.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index a322d272bb..e185d1ede1 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -24,6 +24,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", + "@ember/test-helpers": "^2.1.1", "@glimmer/component": "^1.0.2", "@glimmer/tracking": "^1.0.2", "babel-eslint": "^10.1.0", @@ -43,7 +44,7 @@ "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.0.3", - "ember-qunit": "^4.6.0", + "ember-qunit": "^5.1.0", "ember-resolver": "^8.0.2", "ember-source": "~3.23.1", "ember-template-lint": "^2.14.0", @@ -56,6 +57,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", + "qunit": "^2.13.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index df7c3ba8f0..65bec96c18 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -24,6 +24,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", + "@ember/test-helpers": "^2.1.1", "@embroider/compat": "^0.33.0", "@embroider/core": "^0.33.0", "@embroider/webpack": "^0.33.0", @@ -45,8 +46,8 @@ "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^4.6.0", "ember-page-title": "^6.0.3", + "ember-qunit": "^5.1.0", "ember-resolver": "^8.0.2", "ember-source": "~3.23.1", "ember-template-lint": "^2.14.0", @@ -58,6 +59,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", + "qunit": "^2.13.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index c3c8fdc863..a4618971ee 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -24,6 +24,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", + "@ember/test-helpers": "^2.1.1", "@embroider/compat": "^0.33.0", "@embroider/core": "^0.33.0", "@embroider/webpack": "^0.33.0", @@ -45,8 +46,8 @@ "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^4.6.0", "ember-page-title": "^6.0.3", + "ember-qunit": "^5.1.0", "ember-resolver": "^8.0.2", "ember-source": "~3.23.1", "ember-template-lint": "^2.14.0", @@ -59,6 +60,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", + "qunit": "^2.13.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 6b3359eb2f..705cbdf9b0 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -24,6 +24,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", + "@ember/test-helpers": "^2.1.1", "@glimmer/component": "^1.0.2", "@glimmer/tracking": "^1.0.2", "babel-eslint": "^10.1.0", @@ -42,8 +43,8 @@ "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^4.6.0", "ember-page-title": "^6.0.3", + "ember-qunit": "^5.1.0", "ember-resolver": "^8.0.2", "ember-source": "~3.23.1", "ember-template-lint": "^2.14.0", @@ -55,6 +56,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", + "qunit": "^2.13.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 176c559ad3..e185d1ede1 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -24,6 +24,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", + "@ember/test-helpers": "^2.1.1", "@glimmer/component": "^1.0.2", "@glimmer/tracking": "^1.0.2", "babel-eslint": "^10.1.0", @@ -42,8 +43,8 @@ "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^4.6.0", "ember-page-title": "^6.0.3", + "ember-qunit": "^5.1.0", "ember-resolver": "^8.0.2", "ember-source": "~3.23.1", "ember-template-lint": "^2.14.0", @@ -56,6 +57,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", + "qunit": "^2.13.0", "qunit-dom": "^1.6.0" }, "engines": { From 5ae75f2628a172b5322da702334d713cbac4ea7e Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 14 Dec 2020 17:19:45 -0500 Subject: [PATCH 598/818] Update to ember-data + ember-source 3.24.0-beta.x --- blueprints/app/files/package.json | 4 ++-- tests/fixtures/addon/defaults/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/defaults/package.json | 4 ++-- tests/fixtures/app/embroider-no-welcome/package.json | 4 ++-- tests/fixtures/app/embroider/package.json | 4 ++-- tests/fixtures/app/npm/package.json | 4 ++-- tests/fixtures/app/yarn/package.json | 4 ++-- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 8b759160c9..893a06cb5f 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -41,7 +41,7 @@ "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.23.0", + "ember-data": "~3.24.0-beta.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.2", @@ -49,7 +49,7 @@ "ember-page-title": "^6.0.3", "ember-qunit": "^5.1.0", "ember-resolver": "^8.0.2", - "ember-source": "~3.23.1", + "ember-source": "~3.24.0-beta.2", "ember-template-lint": "^2.14.0<% if (welcome) { %>", "ember-welcome-page": "^4.0.0<% } %>", "eslint": "^7.15.0", diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index 21f715a110..adfb014184 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -49,7 +49,7 @@ "ember-page-title": "^6.0.3", "ember-qunit": "^5.1.0", "ember-resolver": "^8.0.2", - "ember-source": "~3.23.1", + "ember-source": "~3.24.0-beta.2", "ember-source-channel-url": "^3.0.0", "ember-template-lint": "^2.14.0", "ember-try": "^1.4.0", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 5dbf3642ef..4a6f1ba68d 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -49,7 +49,7 @@ "ember-page-title": "^6.0.3", "ember-qunit": "^5.1.0", "ember-resolver": "^8.0.2", - "ember-source": "~3.23.1", + "ember-source": "~3.24.0-beta.2", "ember-source-channel-url": "^3.0.0", "ember-template-lint": "^2.14.0", "ember-try": "^1.4.0", diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index e185d1ede1..2311e41efb 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -38,7 +38,7 @@ "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.23.0", + "ember-data": "~3.24.0-beta.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.2", @@ -46,7 +46,7 @@ "ember-page-title": "^6.0.3", "ember-qunit": "^5.1.0", "ember-resolver": "^8.0.2", - "ember-source": "~3.23.1", + "ember-source": "~3.24.0-beta.2", "ember-template-lint": "^2.14.0", "ember-welcome-page": "^4.0.0", "eslint": "^7.15.0", diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index 65bec96c18..eafb61b9f5 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -41,7 +41,7 @@ "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.23.0", + "ember-data": "~3.24.0-beta.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.2", @@ -49,7 +49,7 @@ "ember-page-title": "^6.0.3", "ember-qunit": "^5.1.0", "ember-resolver": "^8.0.2", - "ember-source": "~3.23.1", + "ember-source": "~3.24.0-beta.2", "ember-template-lint": "^2.14.0", "eslint": "^7.15.0", "eslint-config-prettier": "^6.15.0", diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index a4618971ee..5ae74c0498 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -41,7 +41,7 @@ "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.23.0", + "ember-data": "~3.24.0-beta.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.2", @@ -49,7 +49,7 @@ "ember-page-title": "^6.0.3", "ember-qunit": "^5.1.0", "ember-resolver": "^8.0.2", - "ember-source": "~3.23.1", + "ember-source": "~3.24.0-beta.2", "ember-template-lint": "^2.14.0", "ember-welcome-page": "^4.0.0", "eslint": "^7.15.0", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 705cbdf9b0..e29cf6854d 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -38,7 +38,7 @@ "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.23.0", + "ember-data": "~3.24.0-beta.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.2", @@ -46,7 +46,7 @@ "ember-page-title": "^6.0.3", "ember-qunit": "^5.1.0", "ember-resolver": "^8.0.2", - "ember-source": "~3.23.1", + "ember-source": "~3.24.0-beta.2", "ember-template-lint": "^2.14.0", "eslint": "^7.15.0", "eslint-config-prettier": "^6.15.0", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index e185d1ede1..2311e41efb 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -38,7 +38,7 @@ "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.23.0", + "ember-data": "~3.24.0-beta.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.2", @@ -46,7 +46,7 @@ "ember-page-title": "^6.0.3", "ember-qunit": "^5.1.0", "ember-resolver": "^8.0.2", - "ember-source": "~3.23.1", + "ember-source": "~3.24.0-beta.2", "ember-template-lint": "^2.14.0", "ember-welcome-page": "^4.0.0", "eslint": "^7.15.0", From d6d2b4389a55ce55165e2faf0504fd7af708397b Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 14 Dec 2020 17:12:44 -0500 Subject: [PATCH 599/818] Add v3.24.0-beta.1 to CHANGELOG.md. --- CHANGELOG.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0369647814..ea5ec44622 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # ember-cli Changelog + +## v3.24.0-beta.1 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.23.0...v3.24.0-beta.1) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.23.0...v3.24.0-beta.1) + +#### Changelog + +- [#9372](https://github.com/ember-cli/ember-cli/pull/9372) / [#9382](https://github.com/ember-cli/ember-cli/pull/9382) Add `ember-page-title` to app blueprint [@raido](https://github.com/raido) +- [#9391](https://github.com/ember-cli/ember-cli/pull/9391) / [#9407](https://github.com/ember-cli/ember-cli/pull/9407) Add `prettier` to blueprint [@bmish](https://github.com/bmish) +- [#9402](https://github.com/ember-cli/ember-cli/pull/9402) Prevent build cycles when app is within a watched dir [@ef4](https://github.com/ef4) +- [#9403](https://github.com/ember-cli/ember-cli/pull/9403) Update blueprint to eslint-plugin-ember v10 [@bmish](https://github.com/bmish) +- [#9340](https://github.com/ember-cli/ember-cli/pull/9340) / [#9371](https://github.com/ember-cli/ember-cli/pull/9371) Update blueprints with new testing configuration [@scalvert](https://github.com/scalvert) + + +Thank you to all who took the time to contribute! + ## v3.23.0 #### Blueprint Changes From 7c0e785f288c199d844a19405267aa69a689cde4 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 14 Dec 2020 17:21:26 -0500 Subject: [PATCH 600/818] Release 3.24.0-beta.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0383420115..a3780c33dc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.23.0", + "version": "3.24.0-beta.1", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From 967407088892c6e69476e4523e82968948dc9bc8 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 21 Dec 2020 19:09:37 -0500 Subject: [PATCH 601/818] Update dependency update script to allow finer grained control Now allows usage of `--filter` that includes a npm tag. --- dev/update-blueprint-dependencies.js | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/dev/update-blueprint-dependencies.js b/dev/update-blueprint-dependencies.js index fff9cd986e..e097adc77a 100644 --- a/dev/update-blueprint-dependencies.js +++ b/dev/update-blueprint-dependencies.js @@ -13,7 +13,9 @@ Example: node dev/update-blueprint-dependencies.js --ember-source=beta --ember-data=beta -node dev/update-blueprint-dependencies.js --filter eslint +node dev/update-blueprint-dependencies.js --filter /eslint/ + +node dev/update-blueprint-dependencies.js --filter some-package@beta `); } @@ -21,6 +23,7 @@ const fs = require('fs'); const path = require('path'); const util = require('util'); const nopt = require('nopt'); +const npmPackageArg = require('npm-package-arg'); const _latestVersion = require('latest-version'); nopt.typeDefs['regexp'] = { @@ -35,7 +38,7 @@ nopt.typeDefs['regexp'] = { const OPTIONS = nopt({ 'ember-source': String, 'ember-data': String, - filter: RegExp, + filter: String, }); const PACKAGE_FILES = [ @@ -50,9 +53,28 @@ const PACKAGE_FILES = [ '../tests/fixtures/addon/yarn/package.json', ]; +let filter = { + nameRegexp: null, + fetchSpec: null, +}; + +if (OPTIONS.filter) { + if (OPTIONS.filter.startsWith('/')) { + filter.nameRegexp = new RegExp(OPTIONS.filter); + // can only use latest when using a regexp style + filter.fetchSpec = 'latest'; + } else { + let packageArgResult = npmPackageArg(OPTIONS.filter); + filter.nameRegexp = packageArgResult.name; + filter.fetchSpec = packageArgResult.fetchSpec; + } +} + function shouldCheckDependency(dependency) { if (OPTIONS.filter) { - return OPTIONS.filter.test(dependency); + if (OPTIONS.filter.startsWith('/')) { + return OPTIONS.filter.test(dependency); + } } return true; From 1b404af26188de5cbe19ec2a684f7607f51cc8f9 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 1 Jan 2021 04:46:34 +0000 Subject: [PATCH 602/818] Bump markdown-it from 12.0.2 to 12.0.4 (#9418) --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index a3780c33dc..83622b6f8d 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "json-stable-stringify": "^1.0.1", "leek": "0.0.24", "lodash.template": "^4.5.0", - "markdown-it": "^12.0.2", + "markdown-it": "^12.0.4", "markdown-it-terminal": "0.2.1", "minimatch": "^3.0.4", "morgan": "^1.10.0", diff --git a/yarn.lock b/yarn.lock index 612546f8a0..91f534eac0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2521,10 +2521,10 @@ entities@~1.1.1: resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== -entities@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.0.tgz#68d6084cab1b079767540d80e56a39b423e4abf4" - integrity sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw== +entities@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" + integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w== error-ex@^1.3.1: version "1.3.2" @@ -4966,13 +4966,13 @@ markdown-it-terminal@0.2.1: lodash.merge "^4.6.2" markdown-it "^8.3.1" -markdown-it@^12.0.2: - version "12.0.2" - resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-12.0.2.tgz#4401beae8df8aa2221fc6565a7188e60a06ef0ed" - integrity sha512-4Lkvjbv2kK+moL9TbeV+6/NHx+1Q+R/NIdUlFlkqkkzUcTod4uiyTJRiBidKR9qXSdkNFkgv+AELY8KN9vSgVA== +markdown-it@^12.0.4: + version "12.0.4" + resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-12.0.4.tgz#eec8247d296327eac3ba9746bdeec9cfcc751e33" + integrity sha512-34RwOXZT8kyuOJy25oJNJoulO8L0bTHYWXcdZBYZqFnjIy3NgjeoM3FmPXIOFQ26/lSHYMr8oc62B6adxXcb3Q== dependencies: argparse "^2.0.1" - entities "~2.0.0" + entities "~2.1.0" linkify-it "^3.0.1" mdurl "^1.0.1" uc.micro "^1.0.5" From 4512f09ed7940eb154e4cac3997c73a6b12453cf Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 1 Jan 2021 05:46:40 +0000 Subject: [PATCH 603/818] Bump semver from 7.3.2 to 7.3.4 (#9424) --- package.json | 2 +- yarn.lock | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 83622b6f8d..401f6fbbd8 100644 --- a/package.json +++ b/package.json @@ -115,7 +115,7 @@ "resolve": "^1.19.0", "resolve-package-path": "^3.1.0", "sane": "^4.1.0", - "semver": "^7.3.2", + "semver": "^7.3.4", "silent-error": "^1.1.1", "sort-package-json": "^1.48.0", "symlink-or-copy": "^1.3.1", diff --git a/yarn.lock b/yarn.lock index 91f534eac0..47282c15d6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6510,7 +6510,7 @@ semver-diff@^3.1.1: dependencies: semver "^6.3.0" -semver@7.3.2, semver@^7.0.0, semver@^7.2.1, semver@^7.3.2: +semver@7.3.2: version "7.3.2" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== @@ -6525,6 +6525,13 @@ semver@^6.0.0, semver@^6.1.0, semver@^6.2.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +semver@^7.0.0, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4: + version "7.3.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" + integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== + dependencies: + lru-cache "^6.0.0" + send@0.17.1: version "0.17.1" resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" From c7a6c114ec7b4f4f39a32f2a8b27d63fcd789578 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 1 Jan 2021 06:47:26 +0000 Subject: [PATCH 604/818] Bump release-it from 14.2.1 to 14.2.2 (#9421) --- package.json | 2 +- yarn.lock | 85 +++++++++++++++++++++++----------------------------- 2 files changed, 38 insertions(+), 49 deletions(-) diff --git a/package.json b/package.json index 401f6fbbd8..25c2c42506 100644 --- a/package.json +++ b/package.json @@ -152,7 +152,7 @@ "nock": "^13.0.5", "nyc": "^15.1.0", "prettier": "2.1.2", - "release-it": "^14.2.1", + "release-it": "^14.2.2", "rimraf": "^3.0.2", "strip-ansi": "^6.0.0", "supertest": "^5.0.0", diff --git a/yarn.lock b/yarn.lock index 47282c15d6..05114a481a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -318,14 +318,6 @@ resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.0.tgz#eef87a431300f6148c39a7f75f8cfeb218b2547e" integrity sha512-ywoxP68aOT3zHCLgWZgwUJatiENeHE7xJzYjfz8WI0goynp96wETBF+d95b8g/uL4QmS6owPVlaxiz3wyMAzcw== -"@octokit/plugin-rest-endpoint-methods@4.2.0": - version "4.2.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.2.0.tgz#c5a0691b3aba5d8b4ef5dffd6af3649608f167ba" - integrity sha512-1/qn1q1C1hGz6W/iEDm9DoyNoG/xdFDt78E3eZ5hHeUfJTLJgyAMdj9chL/cNBHjcjd+FH5aO1x0VCqR2RE0mw== - dependencies: - "@octokit/types" "^5.5.0" - deprecation "^2.3.1" - "@octokit/plugin-rest-endpoint-methods@4.2.1": version "4.2.1" resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.2.1.tgz#8224833a45c3394836dc6e86f1e6c49269a2c350" @@ -357,17 +349,7 @@ once "^1.4.0" universal-user-agent "^5.0.0" -"@octokit/rest@18.0.7": - version "18.0.7" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.7.tgz#236514417084334bc0ef62416a19f6030db3d907" - integrity sha512-ctz0cMIb3c6gO2ADto+A1r4JI+2hkUkDcD1JRunkhk1SOUrNGQcQ+9FBqZ6UekS1Z/c3xPvF0OoLtX2cQ118+A== - dependencies: - "@octokit/core" "^3.0.0" - "@octokit/plugin-paginate-rest" "^2.2.0" - "@octokit/plugin-request-log" "^1.0.0" - "@octokit/plugin-rest-endpoint-methods" "4.2.0" - -"@octokit/rest@^18.0.9": +"@octokit/rest@18.0.9", "@octokit/rest@^18.0.9": version "18.0.9" resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.9.tgz#964d707d914eb34b1787895fdcacff96de47844d" integrity sha512-CC5+cIx974Ygx9lQNfUn7/oXDQ9kqGiKUC6j1A9bAVZZ7aoTF8K6yxu0pQhQrLBwSl92J6Z3iVDhGhGFgISCZg== @@ -2138,13 +2120,20 @@ debug@2.6.9, debug@^2.1.0, debug@^2.1.1, debug@^2.1.3, debug@^2.2.0, debug@^2.3. dependencies: ms "2.0.0" -debug@4.2.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: +debug@4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/debug/-/debug-4.2.0.tgz#7f150f93920e94c58f5574c2fd01a3110effe7f1" integrity sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg== dependencies: ms "2.1.2" +debug@4.3.1, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" + integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== + dependencies: + ms "2.1.2" + debug@^3.0.0, debug@^3.0.1, debug@^3.1.0, debug@^3.1.1: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" @@ -4241,10 +4230,10 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: dependencies: is-extglob "^2.1.1" -is-installed-globally@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.3.1.tgz#679afef819347a72584617fd19497f010b8ed35f" - integrity sha512-oiEcGoQbGc+3/iijAijrK2qFpkNoNjsHOm/5V5iaeydyrS/hnwaRCEgH5cpW0P3T1lSjV5piB7S5b5lEugNLhg== +is-installed-globally@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.3.2.tgz#fd3efa79ee670d1187233182d5b0a1dd00313141" + integrity sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g== dependencies: global-dirs "^2.0.1" is-path-inside "^3.0.1" @@ -4643,7 +4632,7 @@ klaw@^1.0.0: optionalDependencies: graceful-fs "^4.1.9" -latest-version@^5.0.0, latest-version@^5.1.0: +latest-version@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-5.1.0.tgz#119dfe908fe38d15dfa43ecd13fa12ec8832face" integrity sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA== @@ -6017,10 +6006,10 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -pupa@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pupa/-/pupa-2.0.1.tgz#dbdc9ff48ffbea4a26a069b6f9f7abb051008726" - integrity sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA== +pupa@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/pupa/-/pupa-2.1.1.tgz#f5e8fd4afc2c5d97828faa523549ed8744a20d62" + integrity sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A== dependencies: escape-goat "^2.0.0" @@ -6205,17 +6194,17 @@ registry-url@^5.0.0: dependencies: rc "^1.2.8" -release-it@^14.2.1: - version "14.2.1" - resolved "https://registry.yarnpkg.com/release-it/-/release-it-14.2.1.tgz#e3d7b6daee45162a6fe903ef1b1b022a0d25c325" - integrity sha512-zHXJjU2eOvVcbXTQSfgNC9DcDU7WgTc9qappBFfGRDicK//Bqt1KaOAEhCS6EZ9u4v7YbWBRbUejSrVXOLfCVQ== +release-it@^14.2.2: + version "14.2.2" + resolved "https://registry.yarnpkg.com/release-it/-/release-it-14.2.2.tgz#ec01be53b04c5aa251a45c7a0b29cceace7827b3" + integrity sha512-rnJOzDIXErrwCD9cRMtDgmOZlcLQiL0z0dVyN95G2T1FQVBQNr7AD5EiH3U+K6X7s+EVoK90lF96NXe5QuvG1A== dependencies: "@iarna/toml" "2.2.5" - "@octokit/rest" "18.0.7" + "@octokit/rest" "18.0.9" async-retry "1.3.1" chalk "4.1.0" cosmiconfig "7.0.0" - debug "4.2.0" + debug "4.3.1" deprecated-obj "2.0.0" execa "4.1.0" find-up "5.0.0" @@ -6233,11 +6222,11 @@ release-it@^14.2.1: parse-json "5.1.0" semver "7.3.2" shelljs "0.8.4" - update-notifier "5.0.0" + update-notifier "5.0.1" url-join "4.0.1" uuid "8.3.1" yaml "1.10.0" - yargs-parser "20.2.3" + yargs-parser "20.2.4" release-zalgo@^1.0.0: version "1.0.0" @@ -7484,10 +7473,10 @@ untildify@^2.1.0: dependencies: os-homedir "^1.0.0" -update-notifier@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-5.0.0.tgz#308e0ae772f71d66df0303159a945bc1e1fb819a" - integrity sha512-8tqsiVrMv7aZsKNSjqA6DdBLKJpZG1hRpkj1RbOJu1PgyP69OX+EInAnP1EK/ShX5YdPFgwWdk19oquZ0HTM8g== +update-notifier@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-5.0.1.tgz#1f92d45fb1f70b9e33880a72dd262bc12d22c20d" + integrity sha512-BuVpRdlwxeIOvmc32AGYvO1KVdPlsmqSh8KDDBxS6kDE5VR7R8OMP1d8MdhaVBvxl4H3551k9akXr0Y1iIB2Wg== dependencies: boxen "^4.2.0" chalk "^4.1.0" @@ -7495,11 +7484,11 @@ update-notifier@5.0.0: has-yarn "^2.1.0" import-lazy "^2.1.0" is-ci "^2.0.0" - is-installed-globally "^0.3.1" + is-installed-globally "^0.3.2" is-npm "^5.0.0" is-yarn-global "^0.3.0" - latest-version "^5.0.0" - pupa "^2.0.1" + latest-version "^5.1.0" + pupa "^2.1.1" semver "^7.3.2" semver-diff "^3.1.1" xdg-basedir "^4.0.0" @@ -7859,10 +7848,10 @@ yargs-parser@13.1.2, yargs-parser@^13.1.2: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@20.2.3: - version "20.2.3" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.3.tgz#92419ba867b858c868acf8bae9bf74af0dd0ce26" - integrity sha512-emOFRT9WVHw03QSvN5qor9QQT9+sw5vwxfYweivSMHTcAXPefwVae2FjO7JJjj8hCE4CzPOPeFM83VwT29HCww== +yargs-parser@20.2.4: + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== yargs-parser@^18.1.0: version "18.1.3" From e148e8b269aeed4d4d4d145ad0c25cfd99330117 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 1 Jan 2021 07:50:21 +0000 Subject: [PATCH 605/818] Bump eslint-plugin-prettier from 3.1.4 to 3.3.0 (#9423) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 25c2c42506..0d1f23eb90 100644 --- a/package.json +++ b/package.json @@ -144,7 +144,7 @@ "eslint-plugin-chai-expect": "^2.2.0", "eslint-plugin-mocha": "^8.0.0", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.1.4", + "eslint-plugin-prettier": "^3.3.0", "fixturify": "^2.1.0", "is-language-code": "^2.0.0", "latest-version": "^5.1.0", diff --git a/yarn.lock b/yarn.lock index 05114a481a..997a55affb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2664,10 +2664,10 @@ eslint-plugin-node@^11.1.0: resolve "^1.10.1" semver "^6.1.0" -eslint-plugin-prettier@^3.1.4: - version "3.1.4" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.4.tgz#168ab43154e2ea57db992a2cd097c828171f75c2" - integrity sha512-jZDa8z76klRqo+TdGDTFJSavwbnWK2ZpqGKNZ+VvweMW516pDUMmQ2koXvxEE4JhzNvTv+radye/bWGBmA6jmg== +eslint-plugin-prettier@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.0.tgz#61e295349a65688ffac0b7808ef0a8244bdd8d40" + integrity sha512-tMTwO8iUWlSRZIwS9k7/E4vrTsfvsrcM5p1eftyuqWH25nKsz/o6/54I7jwQ/3zobISyC7wMy9ZsFwgTxOcOpQ== dependencies: prettier-linter-helpers "^1.0.0" From 8d4e4cce5d1714a600d6dc06c2e32022c916d715 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 1 Jan 2021 08:52:35 +0000 Subject: [PATCH 606/818] Bump @babel/core from 7.12.9 to 7.12.10 (#9420) --- package.json | 2 +- yarn.lock | 113 ++++++++++++++++++++++++++++----------------------- 2 files changed, 63 insertions(+), 52 deletions(-) diff --git a/package.json b/package.json index 0d1f23eb90..a1ea238cbb 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "test:slow": "node --unhandled-rejections=strict tests/runner slow" }, "dependencies": { - "@babel/core": "^7.12.9", + "@babel/core": "^7.12.10", "@babel/plugin-transform-modules-amd": "^7.12.1", "amd-name-resolver": "^1.3.1", "babel-plugin-module-resolver": "^4.0.0", diff --git a/yarn.lock b/yarn.lock index 997a55affb..ed4239e5ff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,59 +2,58 @@ # yarn lockfile v1 -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a" - integrity sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg== +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" + integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== dependencies: "@babel/highlight" "^7.10.4" -"@babel/core@^7.12.0", "@babel/core@^7.12.9", "@babel/core@^7.3.4", "@babel/core@^7.7.5": - version "7.12.9" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.9.tgz#fd450c4ec10cdbb980e2928b7aa7a28484593fc8" - integrity sha512-gTXYh3M5wb7FRXQy+FErKFAv90BnlOuNn1QkCK2lREoPAjrQCO49+HVSrFoe5uakFAF5eenS75KbO2vQiLrTMQ== +"@babel/core@^7.12.0", "@babel/core@^7.12.10", "@babel/core@^7.3.4", "@babel/core@^7.7.5": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.10.tgz#b79a2e1b9f70ed3d84bbfb6d8c4ef825f606bccd" + integrity sha512-eTAlQKq65zHfkHZV0sIVODCPGVgoo1HdBlbSLi9CqOzuZanMv2ihzY+4paiKr1mH+XmYESMAmJ/dpZ68eN6d8w== dependencies: "@babel/code-frame" "^7.10.4" - "@babel/generator" "^7.12.5" + "@babel/generator" "^7.12.10" "@babel/helper-module-transforms" "^7.12.1" "@babel/helpers" "^7.12.5" - "@babel/parser" "^7.12.7" + "@babel/parser" "^7.12.10" "@babel/template" "^7.12.7" - "@babel/traverse" "^7.12.9" - "@babel/types" "^7.12.7" + "@babel/traverse" "^7.12.10" + "@babel/types" "^7.12.10" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.1" json5 "^2.1.2" lodash "^4.17.19" - resolve "^1.3.2" semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.12.5": - version "7.12.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.5.tgz#a2c50de5c8b6d708ab95be5e6053936c1884a4de" - integrity sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A== +"@babel/generator@^7.12.10", "@babel/generator@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.11.tgz#98a7df7b8c358c9a37ab07a24056853016aba3af" + integrity sha512-Ggg6WPOJtSi8yYQvLVjG8F/TlpWDlKx0OpS4Kt+xMQPs5OaGYWy+v1A+1TvxI6sAMGZpKWWoAQ1DaeQbImlItA== dependencies: - "@babel/types" "^7.12.5" + "@babel/types" "^7.12.11" jsesc "^2.5.1" source-map "^0.5.0" -"@babel/helper-function-name@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz#d2d3b20c59ad8c47112fa7d2a94bc09d5ef82f1a" - integrity sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ== +"@babel/helper-function-name@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.12.11.tgz#1fd7738aee5dcf53c3ecff24f1da9c511ec47b42" + integrity sha512-AtQKjtYNolKNi6nNNVLQ27CP6D9oFR6bq/HPYSizlzbp7uC1M59XJe8L+0uXjbIaZaUJF99ruHqVGiKXU/7ybA== dependencies: - "@babel/helper-get-function-arity" "^7.10.4" - "@babel/template" "^7.10.4" - "@babel/types" "^7.10.4" + "@babel/helper-get-function-arity" "^7.12.10" + "@babel/template" "^7.12.7" + "@babel/types" "^7.12.11" -"@babel/helper-get-function-arity@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz#98c1cbea0e2332f33f9a4661b8ce1505b2c19ba2" - integrity sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A== +"@babel/helper-get-function-arity@^7.12.10": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.10.tgz#b158817a3165b5faa2047825dfa61970ddcc16cf" + integrity sha512-mm0n5BPjR06wh9mPQaDdXWDoll/j5UpCAPl1x8fS71GHm7HA6Ua2V4ylG1Ju8lvcTOietbPNNPaSilKj+pj+Ag== dependencies: - "@babel/types" "^7.10.4" + "@babel/types" "^7.12.10" "@babel/helper-member-expression-to-functions@^7.12.1": version "7.12.1" @@ -121,11 +120,23 @@ dependencies: "@babel/types" "^7.11.0" +"@babel/helper-split-export-declaration@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.11.tgz#1b4cc424458643c47d37022223da33d76ea4603a" + integrity sha512-LsIVN8j48gHgwzfocYUSkO/hjYAOJqlpJEc7tGXcIm4cubjVUf8LGW6eWRyxEu7gA25q02p0rQUWoCI33HNS5g== + dependencies: + "@babel/types" "^7.12.11" + "@babel/helper-validator-identifier@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== +"@babel/helper-validator-identifier@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed" + integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw== + "@babel/helpers@^7.12.5": version "7.12.5" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.12.5.tgz#1a1ba4a768d9b58310eda516c449913fe647116e" @@ -144,10 +155,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.12.7", "@babel/parser@^7.7.5": - version "7.12.7" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.7.tgz#fee7b39fe809d0e73e5b25eecaf5780ef3d73056" - integrity sha512-oWR02Ubp4xTLCAqPRiNIuMVgNO5Aif/xpXtabhzW2HWUD47XJsAB4Zd/Rg30+XeQA3juXigV7hlquOTmwqLiwg== +"@babel/parser@^7.12.10", "@babel/parser@^7.12.11", "@babel/parser@^7.12.7", "@babel/parser@^7.7.5": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.11.tgz#9ce3595bcd74bc5c466905e86c535b8b25011e79" + integrity sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg== "@babel/plugin-transform-modules-amd@^7.12.1": version "7.12.1" @@ -175,27 +186,27 @@ "@babel/parser" "^7.12.7" "@babel/types" "^7.12.7" -"@babel/traverse@^7.12.1", "@babel/traverse@^7.12.5", "@babel/traverse@^7.12.9", "@babel/traverse@^7.7.4": - version "7.12.9" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.9.tgz#fad26c972eabbc11350e0b695978de6cc8e8596f" - integrity sha512-iX9ajqnLdoU1s1nHt36JDI9KG4k+vmI8WgjK5d+aDTwQbL2fUnzedNedssA645Ede3PM2ma1n8Q4h2ohwXgMXw== - dependencies: - "@babel/code-frame" "^7.10.4" - "@babel/generator" "^7.12.5" - "@babel/helper-function-name" "^7.10.4" - "@babel/helper-split-export-declaration" "^7.11.0" - "@babel/parser" "^7.12.7" - "@babel/types" "^7.12.7" +"@babel/traverse@^7.12.1", "@babel/traverse@^7.12.10", "@babel/traverse@^7.12.5", "@babel/traverse@^7.7.4": + version "7.12.12" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.12.tgz#d0cd87892704edd8da002d674bc811ce64743376" + integrity sha512-s88i0X0lPy45RrLM8b9mz8RPH5FqO9G9p7ti59cToE44xFm1Q+Pjh5Gq4SXBbtb88X7Uy7pexeqRIQDDMNkL0w== + dependencies: + "@babel/code-frame" "^7.12.11" + "@babel/generator" "^7.12.11" + "@babel/helper-function-name" "^7.12.11" + "@babel/helper-split-export-declaration" "^7.12.11" + "@babel/parser" "^7.12.11" + "@babel/types" "^7.12.12" debug "^4.1.0" globals "^11.1.0" lodash "^4.17.19" -"@babel/types@^7.10.4", "@babel/types@^7.11.0", "@babel/types@^7.12.1", "@babel/types@^7.12.5", "@babel/types@^7.12.7": - version "7.12.7" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.7.tgz#6039ff1e242640a29452c9ae572162ec9a8f5d13" - integrity sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ== +"@babel/types@^7.10.4", "@babel/types@^7.11.0", "@babel/types@^7.12.1", "@babel/types@^7.12.10", "@babel/types@^7.12.11", "@babel/types@^7.12.12", "@babel/types@^7.12.5", "@babel/types@^7.12.7": + version "7.12.12" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.12.tgz#4608a6ec313abbd87afa55004d373ad04a96c299" + integrity sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ== dependencies: - "@babel/helper-validator-identifier" "^7.10.4" + "@babel/helper-validator-identifier" "^7.12.11" lodash "^4.17.19" to-fast-properties "^2.0.0" @@ -6342,7 +6353,7 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.1, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.19.0, resolve@^1.3.2: +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.1, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.19.0: version "1.19.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== From e8ba2cc0f6a246bfc100f175984aaa96684e496a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 1 Jan 2021 09:46:38 +0000 Subject: [PATCH 607/818] Bump uuid from 8.3.1 to 8.3.2 (#9422) --- package.json | 2 +- yarn.lock | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a1ea238cbb..913cbc7f09 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,7 @@ "testem": "^3.2.0", "tiny-lr": "^2.0.0", "tree-sync": "^2.1.0", - "uuid": "^8.3.1", + "uuid": "^8.3.2", "walk-sync": "^2.2.0", "watch-detector": "^1.0.0", "workerpool": "^6.0.3", diff --git a/yarn.lock b/yarn.lock index ed4239e5ff..73309e129a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7555,7 +7555,7 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= -uuid@8.3.1, uuid@^8.3.1: +uuid@8.3.1: version "8.3.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.1.tgz#2ba2e6ca000da60fce5a196954ab241131e05a31" integrity sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg== @@ -7565,6 +7565,11 @@ uuid@^3.3.3: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== +uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + v8-compile-cache@^2.0.3: version "2.1.0" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e" From b10749f911db3b242e403812362c92b046deec01 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Tue, 5 Jan 2021 10:00:32 -0500 Subject: [PATCH 608/818] Update blueprint dependecies to latest. A few notable updates: * Updates ember-source and ember-data to 3.24 release versions. * Updates ember-auto-import to avoid issues with new testing harness The rest are "just" updating to latest... --- blueprints/app/files/package.json | 30 +++++++++---------- tests/fixtures/addon/defaults/package.json | 22 +++++++------- tests/fixtures/addon/yarn/package.json | 22 +++++++------- tests/fixtures/app/defaults/package.json | 24 +++++++-------- .../app/embroider-no-welcome/package.json | 30 +++++++++---------- tests/fixtures/app/embroider/package.json | 30 +++++++++---------- tests/fixtures/app/npm/package.json | 24 +++++++-------- tests/fixtures/app/yarn/package.json | 24 +++++++-------- 8 files changed, 103 insertions(+), 103 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 893a06cb5f..b2871ec712 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -24,15 +24,15 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.1<% if (embroider) { %>", - "@embroider/compat": "^0.33.0", - "@embroider/core": "^0.33.0", - "@embroider/webpack": "^0.33.0<% } %>", - "@glimmer/component": "^1.0.2", - "@glimmer/tracking": "^1.0.2", + "@ember/test-helpers": "^2.1.4<% if (embroider) { %>", + "@embroider/compat": "^0.35.0", + "@embroider/core": "^0.35.0", + "@embroider/webpack": "^0.35.0<% } %>", + "@glimmer/component": "^1.0.3", + "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.8.0", + "ember-auto-import": "^1.10.1", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^4.0.0", "ember-cli-babel": "^7.23.0", @@ -41,22 +41,22 @@ "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.24.0-beta.0", + "ember-data": "~3.24.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.0.3", - "ember-qunit": "^5.1.0", + "ember-qunit": "^5.1.1", "ember-resolver": "^8.0.2", - "ember-source": "~3.24.0-beta.2", - "ember-template-lint": "^2.14.0<% if (welcome) { %>", + "ember-source": "~3.24.0", + "ember-template-lint": "^2.15.0<% if (welcome) { %>", "ember-welcome-page": "^4.0.0<% } %>", - "eslint": "^7.15.0", - "eslint-config-prettier": "^6.15.0", - "eslint-plugin-ember": "^10.0.2", + "eslint": "^7.17.0", + "eslint-config-prettier": "^7.1.0", + "eslint-plugin-ember": "^10.1.1", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.1.4", + "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index adfb014184..fe91ac230f 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -31,12 +31,12 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.1", - "@glimmer/component": "^1.0.2", - "@glimmer/tracking": "^1.0.2", + "@ember/test-helpers": "^2.1.4", + "@glimmer/component": "^1.0.3", + "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.8.0", + "ember-auto-import": "^1.10.1", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-inject-live-reload": "^2.0.2", @@ -47,17 +47,17 @@ "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.0.3", - "ember-qunit": "^5.1.0", + "ember-qunit": "^5.1.1", "ember-resolver": "^8.0.2", - "ember-source": "~3.24.0-beta.2", + "ember-source": "~3.24.0", "ember-source-channel-url": "^3.0.0", - "ember-template-lint": "^2.14.0", + "ember-template-lint": "^2.15.0", "ember-try": "^1.4.0", - "eslint": "^7.15.0", - "eslint-config-prettier": "^6.15.0", - "eslint-plugin-ember": "^10.0.2", + "eslint": "^7.17.0", + "eslint-config-prettier": "^7.1.0", + "eslint-plugin-ember": "^10.1.1", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.1.4", + "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 4a6f1ba68d..83599057f7 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -31,12 +31,12 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.1", - "@glimmer/component": "^1.0.2", - "@glimmer/tracking": "^1.0.2", + "@ember/test-helpers": "^2.1.4", + "@glimmer/component": "^1.0.3", + "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.8.0", + "ember-auto-import": "^1.10.1", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-inject-live-reload": "^2.0.2", @@ -47,18 +47,18 @@ "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.0.3", - "ember-qunit": "^5.1.0", + "ember-qunit": "^5.1.1", "ember-resolver": "^8.0.2", - "ember-source": "~3.24.0-beta.2", + "ember-source": "~3.24.0", "ember-source-channel-url": "^3.0.0", - "ember-template-lint": "^2.14.0", + "ember-template-lint": "^2.15.0", "ember-try": "^1.4.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.15.0", - "eslint-config-prettier": "^6.15.0", - "eslint-plugin-ember": "^10.0.2", + "eslint": "^7.17.0", + "eslint-config-prettier": "^7.1.0", + "eslint-plugin-ember": "^10.1.1", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.1.4", + "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index 2311e41efb..7a674959ae 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -24,12 +24,12 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.1", - "@glimmer/component": "^1.0.2", - "@glimmer/tracking": "^1.0.2", + "@ember/test-helpers": "^2.1.4", + "@glimmer/component": "^1.0.3", + "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.8.0", + "ember-auto-import": "^1.10.1", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^4.0.0", "ember-cli-babel": "^7.23.0", @@ -38,22 +38,22 @@ "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.24.0-beta.0", + "ember-data": "~3.24.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.0.3", - "ember-qunit": "^5.1.0", + "ember-qunit": "^5.1.1", "ember-resolver": "^8.0.2", - "ember-source": "~3.24.0-beta.2", - "ember-template-lint": "^2.14.0", + "ember-source": "~3.24.0", + "ember-template-lint": "^2.15.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.15.0", - "eslint-config-prettier": "^6.15.0", - "eslint-plugin-ember": "^10.0.2", + "eslint": "^7.17.0", + "eslint-config-prettier": "^7.1.0", + "eslint-plugin-ember": "^10.1.1", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.1.4", + "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index eafb61b9f5..7df47586c3 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -24,15 +24,15 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.1", - "@embroider/compat": "^0.33.0", - "@embroider/core": "^0.33.0", - "@embroider/webpack": "^0.33.0", - "@glimmer/component": "^1.0.2", - "@glimmer/tracking": "^1.0.2", + "@ember/test-helpers": "^2.1.4", + "@embroider/compat": "^0.35.0", + "@embroider/core": "^0.35.0", + "@embroider/webpack": "^0.35.0", + "@glimmer/component": "^1.0.3", + "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.8.0", + "ember-auto-import": "^1.10.1", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^4.0.0", "ember-cli-babel": "^7.23.0", @@ -41,21 +41,21 @@ "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.24.0-beta.0", + "ember-data": "~3.24.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.0.3", - "ember-qunit": "^5.1.0", + "ember-qunit": "^5.1.1", "ember-resolver": "^8.0.2", - "ember-source": "~3.24.0-beta.2", - "ember-template-lint": "^2.14.0", - "eslint": "^7.15.0", - "eslint-config-prettier": "^6.15.0", - "eslint-plugin-ember": "^10.0.2", + "ember-source": "~3.24.0", + "ember-template-lint": "^2.15.0", + "eslint": "^7.17.0", + "eslint-config-prettier": "^7.1.0", + "eslint-plugin-ember": "^10.1.1", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.1.4", + "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index 5ae74c0498..7c84ec51e8 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -24,15 +24,15 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.1", - "@embroider/compat": "^0.33.0", - "@embroider/core": "^0.33.0", - "@embroider/webpack": "^0.33.0", - "@glimmer/component": "^1.0.2", - "@glimmer/tracking": "^1.0.2", + "@ember/test-helpers": "^2.1.4", + "@embroider/compat": "^0.35.0", + "@embroider/core": "^0.35.0", + "@embroider/webpack": "^0.35.0", + "@glimmer/component": "^1.0.3", + "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.8.0", + "ember-auto-import": "^1.10.1", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^4.0.0", "ember-cli-babel": "^7.23.0", @@ -41,22 +41,22 @@ "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.24.0-beta.0", + "ember-data": "~3.24.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.0.3", - "ember-qunit": "^5.1.0", + "ember-qunit": "^5.1.1", "ember-resolver": "^8.0.2", - "ember-source": "~3.24.0-beta.2", - "ember-template-lint": "^2.14.0", + "ember-source": "~3.24.0", + "ember-template-lint": "^2.15.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.15.0", - "eslint-config-prettier": "^6.15.0", - "eslint-plugin-ember": "^10.0.2", + "eslint": "^7.17.0", + "eslint-config-prettier": "^7.1.0", + "eslint-plugin-ember": "^10.1.1", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.1.4", + "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index e29cf6854d..800219c1a8 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -24,12 +24,12 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.1", - "@glimmer/component": "^1.0.2", - "@glimmer/tracking": "^1.0.2", + "@ember/test-helpers": "^2.1.4", + "@glimmer/component": "^1.0.3", + "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.8.0", + "ember-auto-import": "^1.10.1", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^4.0.0", "ember-cli-babel": "^7.23.0", @@ -38,21 +38,21 @@ "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.24.0-beta.0", + "ember-data": "~3.24.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.0.3", - "ember-qunit": "^5.1.0", + "ember-qunit": "^5.1.1", "ember-resolver": "^8.0.2", - "ember-source": "~3.24.0-beta.2", - "ember-template-lint": "^2.14.0", - "eslint": "^7.15.0", - "eslint-config-prettier": "^6.15.0", - "eslint-plugin-ember": "^10.0.2", + "ember-source": "~3.24.0", + "ember-template-lint": "^2.15.0", + "eslint": "^7.17.0", + "eslint-config-prettier": "^7.1.0", + "eslint-plugin-ember": "^10.1.1", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.1.4", + "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 2311e41efb..7a674959ae 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -24,12 +24,12 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.1", - "@glimmer/component": "^1.0.2", - "@glimmer/tracking": "^1.0.2", + "@ember/test-helpers": "^2.1.4", + "@glimmer/component": "^1.0.3", + "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.8.0", + "ember-auto-import": "^1.10.1", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^4.0.0", "ember-cli-babel": "^7.23.0", @@ -38,22 +38,22 @@ "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.24.0-beta.0", + "ember-data": "~3.24.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.0.3", - "ember-qunit": "^5.1.0", + "ember-qunit": "^5.1.1", "ember-resolver": "^8.0.2", - "ember-source": "~3.24.0-beta.2", - "ember-template-lint": "^2.14.0", + "ember-source": "~3.24.0", + "ember-template-lint": "^2.15.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.15.0", - "eslint-config-prettier": "^6.15.0", - "eslint-plugin-ember": "^10.0.2", + "eslint": "^7.17.0", + "eslint-config-prettier": "^7.1.0", + "eslint-plugin-ember": "^10.1.1", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.1.4", + "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", From eca781942f81659be2fac4e2710f7675cd0eb3a8 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Tue, 5 Jan 2021 14:09:28 -0500 Subject: [PATCH 609/818] Add v3.24.0 to CHANGELOG.md. --- CHANGELOG.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea5ec44622..d1c52e8f20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,15 +1,17 @@ # ember-cli Changelog -## v3.24.0-beta.1 +## v3.24.0 #### Blueprint Changes -- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.23.0...v3.24.0-beta.1) -- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.23.0...v3.24.0-beta.1) +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.23.0...v3.24.0) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.23.0...v3.24.0) #### Changelog +- [#9410](https://github.com/ember-cli/ember-cli/pull/9410) Add `.eslintcache` to `.gitignore` for applications and addons [@simonihmig](https://github.com/simonihmig) +- [#9425](https://github.com/ember-cli/ember-cli/pull/9425) Update blueprint dependecies to latest. [@rwjblue](https://github.com/rwjblue) - [#9372](https://github.com/ember-cli/ember-cli/pull/9372) / [#9382](https://github.com/ember-cli/ember-cli/pull/9382) Add `ember-page-title` to app blueprint [@raido](https://github.com/raido) - [#9391](https://github.com/ember-cli/ember-cli/pull/9391) / [#9407](https://github.com/ember-cli/ember-cli/pull/9407) Add `prettier` to blueprint [@bmish](https://github.com/bmish) - [#9402](https://github.com/ember-cli/ember-cli/pull/9402) Prevent build cycles when app is within a watched dir [@ef4](https://github.com/ef4) From 260546d7ab88de8081c193ebc5ab43ef73e4c044 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Tue, 5 Jan 2021 14:11:34 -0500 Subject: [PATCH 610/818] Release 3.24.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a3780c33dc..c74c2f3706 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.24.0-beta.1", + "version": "3.24.0", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From 5068052d6f2c82e4b83a76b5576d6903608c4248 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Tue, 5 Jan 2021 14:31:03 -0500 Subject: [PATCH 611/818] Update ember-data / ember-source for 3.25.0-beta --- blueprints/app/files/package.json | 4 ++-- tests/fixtures/addon/defaults/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/defaults/package.json | 4 ++-- tests/fixtures/app/embroider-no-welcome/package.json | 4 ++-- tests/fixtures/app/embroider/package.json | 4 ++-- tests/fixtures/app/npm/package.json | 4 ++-- tests/fixtures/app/yarn/package.json | 4 ++-- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index b2871ec712..11ee0d2857 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -41,7 +41,7 @@ "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.24.0", + "ember-data": "~3.25.0-beta.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.2", @@ -49,7 +49,7 @@ "ember-page-title": "^6.0.3", "ember-qunit": "^5.1.1", "ember-resolver": "^8.0.2", - "ember-source": "~3.24.0", + "ember-source": "~3.25.0-beta.1", "ember-template-lint": "^2.15.0<% if (welcome) { %>", "ember-welcome-page": "^4.0.0<% } %>", "eslint": "^7.17.0", diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index fe91ac230f..e4c5c203e4 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -49,7 +49,7 @@ "ember-page-title": "^6.0.3", "ember-qunit": "^5.1.1", "ember-resolver": "^8.0.2", - "ember-source": "~3.24.0", + "ember-source": "~3.25.0-beta.1", "ember-source-channel-url": "^3.0.0", "ember-template-lint": "^2.15.0", "ember-try": "^1.4.0", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 83599057f7..f6d9d86261 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -49,7 +49,7 @@ "ember-page-title": "^6.0.3", "ember-qunit": "^5.1.1", "ember-resolver": "^8.0.2", - "ember-source": "~3.24.0", + "ember-source": "~3.25.0-beta.1", "ember-source-channel-url": "^3.0.0", "ember-template-lint": "^2.15.0", "ember-try": "^1.4.0", diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index 7a674959ae..4f15688aba 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -38,7 +38,7 @@ "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.24.0", + "ember-data": "~3.25.0-beta.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.2", @@ -46,7 +46,7 @@ "ember-page-title": "^6.0.3", "ember-qunit": "^5.1.1", "ember-resolver": "^8.0.2", - "ember-source": "~3.24.0", + "ember-source": "~3.25.0-beta.1", "ember-template-lint": "^2.15.0", "ember-welcome-page": "^4.0.0", "eslint": "^7.17.0", diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index 7df47586c3..5b1ae5a6b9 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -41,7 +41,7 @@ "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.24.0", + "ember-data": "~3.25.0-beta.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.2", @@ -49,7 +49,7 @@ "ember-page-title": "^6.0.3", "ember-qunit": "^5.1.1", "ember-resolver": "^8.0.2", - "ember-source": "~3.24.0", + "ember-source": "~3.25.0-beta.1", "ember-template-lint": "^2.15.0", "eslint": "^7.17.0", "eslint-config-prettier": "^7.1.0", diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index 7c84ec51e8..7b2aeafa93 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -41,7 +41,7 @@ "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.24.0", + "ember-data": "~3.25.0-beta.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.2", @@ -49,7 +49,7 @@ "ember-page-title": "^6.0.3", "ember-qunit": "^5.1.1", "ember-resolver": "^8.0.2", - "ember-source": "~3.24.0", + "ember-source": "~3.25.0-beta.1", "ember-template-lint": "^2.15.0", "ember-welcome-page": "^4.0.0", "eslint": "^7.17.0", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 800219c1a8..a5539a283c 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -38,7 +38,7 @@ "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.24.0", + "ember-data": "~3.25.0-beta.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.2", @@ -46,7 +46,7 @@ "ember-page-title": "^6.0.3", "ember-qunit": "^5.1.1", "ember-resolver": "^8.0.2", - "ember-source": "~3.24.0", + "ember-source": "~3.25.0-beta.1", "ember-template-lint": "^2.15.0", "eslint": "^7.17.0", "eslint-config-prettier": "^7.1.0", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 7a674959ae..4f15688aba 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -38,7 +38,7 @@ "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.24.0", + "ember-data": "~3.25.0-beta.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.2", "ember-load-initializers": "^2.1.2", @@ -46,7 +46,7 @@ "ember-page-title": "^6.0.3", "ember-qunit": "^5.1.1", "ember-resolver": "^8.0.2", - "ember-source": "~3.24.0", + "ember-source": "~3.25.0-beta.1", "ember-template-lint": "^2.15.0", "ember-welcome-page": "^4.0.0", "eslint": "^7.17.0", From 41aed67fb32e57434c2c38378772b62b433e5fd9 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Tue, 5 Jan 2021 14:39:17 -0500 Subject: [PATCH 612/818] Add v3.25.0-beta.1 to CHANGELOG.md --- CHANGELOG.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1c52e8f20..eadbda579c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,21 @@ # ember-cli Changelog +## v3.24.1-beta.0 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.24.0...v3.24.1-beta.0) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.24.0...v3.24.1-beta.0) + +#### Changelog + +- Update `ember-data` and `ember-source` to 3.25.0-beta [@kellyselden](https://github.com/kellyselden) / [@rwjblue](https://github.com/rwjblue) + + +Thank you to all who took the time to contribute! + + ## v3.24.0 #### Blueprint Changes From ee5e7749665f2fd3f018751104abe21db8caf502 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Tue, 5 Jan 2021 14:40:34 -0500 Subject: [PATCH 613/818] Release 3.25.0-beta.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 99bc34635a..ae030c1e8c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.24.0", + "version": "3.25.0-beta.1", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From 83dc2e43faddd68c7635b28d19893e96d522a749 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Tue, 5 Jan 2021 15:05:59 -0500 Subject: [PATCH 614/818] Fixup CHANGELOG for 3.25.0-beta.1. --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eadbda579c..86cd97d8da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,12 @@ # ember-cli Changelog -## v3.24.1-beta.0 +## v3.25.0-beta.1 #### Blueprint Changes -- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.24.0...v3.24.1-beta.0) -- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.24.0...v3.24.1-beta.0) +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.24.0...v3.25.0-beta.1) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.24.0...v3.25.0-beta.1) #### Changelog From f4460c432acf8824843389c23d0d67b59ca3e665 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Tue, 5 Jan 2021 15:07:35 -0500 Subject: [PATCH 615/818] Update release documentation --- RELEASE.md | 162 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 159 insertions(+), 3 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 8744367abb..785ab2d9a7 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,19 +1,175 @@ # Release Process - ember-cli follows the same channel based release process that Ember does: * `release` - This branch represents the `latest` dist-tag on NPM * `beta` - This branch represents the `beta` dist-tag on NPM * `master` - The branch is not released to the NPM registry, but (generally speaking) can be used directly -## General Release Process +## Initial Stable Release + +* Update blueprint dependencies to latest + +``` +node ./dev/update-blueprint-dependencies.js --ember-source=latest --ember-data=latest +``` + +* Commit +* Send pull request to `beta` branch +* Wait for PR (for updating blueprint dependencies) to be merged + +* Checkout the `release` branch + +``` +git fetch origin +git checkout -B release --track origin/release +``` + +* Merge `beta` branch into `release` + +``` +git fetch origin +git merge origin/beta +git push origin release +``` + +* Ensure you have the correct dependencies + +``` +git clean -fdx +yarn +``` -* Checkout the branch being released * Update the CHANGELOG.md * Run `node ./dev/changelog` * Copy output into `CHANGELOG.md` * Edit to make clearer for consumers (remove non-consumer facing entries, etc) + * Ensure blueprint change diff URLs are correct + * Merge any prior beta entries together + * Update changelog header for current release * Commit * Release: `npx release-it` * Update GitHub Release with changelog contents +* Merge `release` into `beta` branch + +``` +git checkout -B beta --track origin/beta +git merge origin/release +git push origin beta +``` + +## Stable Patch Release + +* Checkout the `release` branch + +``` +git fetch origin +git checkout -B release --track origin/release +``` + +* Ensure you have the correct dependencies + +``` +git clean -fdx +yarn +``` + +* Update the CHANGELOG.md + * Run `node ./dev/changelog` + * Copy output into `CHANGELOG.md` + * Edit to make clearer for consumers (remove non-consumer facing entries, etc) + * Ensure blueprint change diff URLs are correct + * Update changelog header for current release + * Commit +* Release: `npx release-it` +* Update GitHub Release with changelog contents +* Merge `release` into `beta` branch + +``` +git checkout -B beta --track origin/beta +git merge origin/release +git push origin beta +``` + +## Intial Beta Release + +* Update `ember-source` and `ember-data` to latest beta + +``` +node ./dev/update-blueprint-dependencies.js --ember-source=beta --ember-data=beta +``` + +* Commit +* Send pull request to `master` branch +* Wait for PR (for updating blueprint dependencies) to be merged +* Checkout the `beta` branch + +``` +git fetch origin +git checkout -B beta --track origin/beta +``` + +* Merge `master` branch into `beta` + +``` +git fetch origin +git merge origin/master +git push origin beta +``` + +* Ensure you have the correct dependencies + +``` +git clean -fdx +yarn +``` + +* Update the CHANGELOG.md + * Run `node ./dev/changelog` + * Copy output into `CHANGELOG.md` + * Edit to make clearer for consumers (remove non-consumer facing entries, etc) + * Ensure blueprint change diff URLs are correct + * Update changelog header for current release + * Commit +* Release: `npx release-it` +* Update GitHub Release with changelog contents +* Merge `beta` into `master` branch + +``` +git checkout master +git merge origin/beta +git push origin master +``` + +## Subsequent Beta Release + +* Checkout the `beta` branch + +``` +git fetch origin +git checkout -B beta --track origin/beta +``` + +* Ensure you have the correct dependencies + +``` +git clean -fdx +yarn +``` + +* Update the CHANGELOG.md + * Run `node ./dev/changelog` + * Copy output into `CHANGELOG.md` + * Edit to make clearer for consumers (remove non-consumer facing entries, etc) + * Ensure blueprint change diff URLs are correct + * Update changelog header for current release + * Commit +* Release: `npx release-it` +* Update GitHub Release with changelog contents +* Merge `beta` into `master` branch + +``` +git checkout master +git merge origin/beta +git push origin master +``` From 095fb48b893505aa7bb1a235b799c76aec8211e2 Mon Sep 17 00:00:00 2001 From: Ricardo Mendes Date: Tue, 5 Jan 2021 20:34:47 +0000 Subject: [PATCH 616/818] Update RELEASE.md --- RELEASE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE.md b/RELEASE.md index 785ab2d9a7..76b67cdbc3 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -91,7 +91,7 @@ git merge origin/release git push origin beta ``` -## Intial Beta Release +## Initial Beta Release * Update `ember-source` and `ember-data` to latest beta From 9c62da1b6d02f04367450a5f9e3972d304fa0f40 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 12 Jan 2021 00:36:40 +0000 Subject: [PATCH 617/818] Bump eslint-config-prettier from 6.15.0 to 7.1.0 (#9419) --- package.json | 2 +- yarn.lock | 15 ++++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index ae030c1e8c..bbb25d724b 100644 --- a/package.json +++ b/package.json @@ -140,7 +140,7 @@ "ember-cli-blueprint-test-helpers": "^0.19.2", "ember-cli-internal-test-helpers": "^0.9.1", "eslint": "^7.11.0", - "eslint-config-prettier": "^6.15.0", + "eslint-config-prettier": "^7.1.0", "eslint-plugin-chai-expect": "^2.2.0", "eslint-plugin-mocha": "^8.0.0", "eslint-plugin-node": "^11.1.0", diff --git a/yarn.lock b/yarn.lock index 73309e129a..e2fadf64a7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2635,12 +2635,10 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= -eslint-config-prettier@^6.15.0: - version "6.15.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz#7f93f6cb7d45a92f1537a70ecc06366e1ac6fed9" - integrity sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw== - dependencies: - get-stdin "^6.0.0" +eslint-config-prettier@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-7.1.0.tgz#5402eb559aa94b894effd6bddfa0b1ca051c858f" + integrity sha512-9sm5/PxaFG7qNJvJzTROMM1Bk1ozXVTKI0buKOyb0Bsr1hrwi0H/TzxF/COtf1uxikIK8SwhX7K6zg78jAzbeA== eslint-plugin-chai-expect@^2.2.0: version "2.2.0" @@ -3484,11 +3482,6 @@ get-stdin@^4.0.1: resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4= -get-stdin@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" - integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== - get-stream@^4.0.0, get-stream@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" From 75b9af9dbfda9e54e1f97d6c15c04ba487548b6d Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 20 Jan 2021 22:36:16 +0000 Subject: [PATCH 618/818] [Security] Bump socket.io from 2.3.0 to 2.4.1 (#9433) --- yarn.lock | 181 ++++++++++++++++++++++++------------------------------ 1 file changed, 81 insertions(+), 100 deletions(-) diff --git a/yarn.lock b/yarn.lock index e2fadf64a7..dce7467737 100644 --- a/yarn.lock +++ b/yarn.lock @@ -839,11 +839,6 @@ async-disk-cache@^1.2.1: rsvp "^3.0.18" username-sync "^1.0.2" -async-limiter@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" - integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== - async-promise-queue@^1.0.3: version "1.0.5" resolved "https://registry.yarnpkg.com/async-promise-queue/-/async-promise-queue-1.0.5.tgz#cb23bce9fce903a133946a700cc85f27f09ea49d" @@ -931,10 +926,10 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= -base64-arraybuffer@0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz#73926771923b5a19747ad666aa5cd4bf9c6e9ce8" - integrity sha1-c5JncZI7Whl0etZmqlzUv5xunOg= +base64-arraybuffer@0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-0.1.4.tgz#9818c79e059b1355f97e0428a017c838e90ba812" + integrity sha1-mBjHngWbE1X5fgQooBfIOOkLqBI= base64id@2.0.0: version "2.0.0" @@ -966,13 +961,6 @@ before-after-hook@^2.1.0: resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.1.0.tgz#b6c03487f44e24200dd30ca5e6a1979c5d2fb635" integrity sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A== -better-assert@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/better-assert/-/better-assert-1.0.2.tgz#40866b9e1b9e0b55b481894311e68faffaebc522" - integrity sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI= - dependencies: - callsite "1.0.0" - binary-extensions@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c" @@ -1554,11 +1542,6 @@ calculate-cache-key-for-tree@^2.0.0: dependencies: json-stable-stringify "^1.0.1" -callsite@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/callsite/-/callsite-1.0.0.tgz#280398e5d664bd74038b6f0905153e6e8af1bc20" - integrity sha1-KAOY5dZkvXQDi28JBRU+borxvCA= - callsites@^3.0.0, callsites@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -1917,7 +1900,7 @@ component-emitter@1.2.1: resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" integrity sha1-E3kY1teCg/ffemt8WmPhQOaUJeY= -component-emitter@^1.2.1, component-emitter@^1.3.0: +component-emitter@^1.2.1, component-emitter@^1.3.0, component-emitter@~1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== @@ -2026,16 +2009,16 @@ cookie-signature@1.0.6: resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= -cookie@0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" - integrity sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s= - cookie@0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== +cookie@~0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.1.tgz#afd713fe26ebd21ba95ceb61f9a8116e50a537d1" + integrity sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA== + cookiejar@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.2.tgz#dd8a235530752f988f9a0844f3fc589e3111125c" @@ -2464,45 +2447,45 @@ end-of-stream@^1.1.0: dependencies: once "^1.4.0" -engine.io-client@~3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-3.4.0.tgz#82a642b42862a9b3f7a188f41776b2deab643700" - integrity sha512-a4J5QO2k99CM2a0b12IznnyQndoEvtA4UAldhGzKqnHf42I3Qs2W5SPnDvatZRcMaNZs4IevVicBPayxYt6FwA== +engine.io-client@~3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-3.5.0.tgz#fc1b4d9616288ce4f2daf06dcf612413dec941c7" + integrity sha512-12wPRfMrugVw/DNyJk34GQ5vIVArEcVMXWugQGGuw2XxUSztFNmJggZmv8IZlLyEdnpO1QB9LkcjeWewO2vxtA== dependencies: - component-emitter "1.2.1" + component-emitter "~1.3.0" component-inherit "0.0.3" - debug "~4.1.0" + debug "~3.1.0" engine.io-parser "~2.2.0" has-cors "1.1.0" indexof "0.0.1" - parseqs "0.0.5" - parseuri "0.0.5" - ws "~6.1.0" + parseqs "0.0.6" + parseuri "0.0.6" + ws "~7.4.2" xmlhttprequest-ssl "~1.5.4" yeast "0.1.2" engine.io-parser@~2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-2.2.0.tgz#312c4894f57d52a02b420868da7b5c1c84af80ed" - integrity sha512-6I3qD9iUxotsC5HEMuuGsKA0cXerGz+4uGcXQEkfBidgKf0amsjrrtwcbwK/nzpZBxclXlV7gGl9dgWvu4LF6w== + version "2.2.1" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-2.2.1.tgz#57ce5611d9370ee94f99641b589f94c97e4f5da7" + integrity sha512-x+dN/fBH8Ro8TFwJ+rkB2AmuVw9Yu2mockR/p3W8f8YtExwFgDvBDi0GWyb4ZLkpahtDGZgtr3zLovanJghPqg== dependencies: after "0.8.2" arraybuffer.slice "~0.0.7" - base64-arraybuffer "0.1.5" + base64-arraybuffer "0.1.4" blob "0.0.5" has-binary2 "~1.0.2" -engine.io@~3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-3.4.0.tgz#3a962cc4535928c252759a00f98519cb46c53ff3" - integrity sha512-XCyYVWzcHnK5cMz7G4VTu2W7zJS7SM1QkcelghyIk/FmobWBtXE7fwhBusEKvCSqc3bMh8fNFMlUkCKTFRxH2w== +engine.io@~3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-3.5.0.tgz#9d6b985c8a39b1fe87cd91eb014de0552259821b" + integrity sha512-21HlvPUKaitDGE4GXNtQ7PLP0Sz4aWLddMPw2VTyFz1FVZqu/kZsJUO8WNpKuE/OCL7nkfRaOui2ZCJloGznGA== dependencies: accepts "~1.3.4" base64id "2.0.0" - cookie "0.3.1" + cookie "~0.4.1" debug "~4.1.0" engine.io-parser "~2.2.0" - ws "^7.1.2" + ws "~7.4.2" enquirer@^2.3.5: version "2.3.6" @@ -5089,7 +5072,12 @@ mime-db@1.44.0, "mime-db@>= 1.43.0 < 2": resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== -mime-types@2.1.27, mime-types@^2.1.12, mime-types@^2.1.18, mime-types@^2.1.19, mime-types@^2.1.26, mime-types@~2.1.24: +mime-db@1.45.0: + version "1.45.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.45.0.tgz#cceeda21ccd7c3a745eba2decd55d4b73e7879ea" + integrity sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w== + +mime-types@2.1.27, mime-types@^2.1.12, mime-types@^2.1.18, mime-types@^2.1.19, mime-types@^2.1.26: version "2.1.27" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== @@ -5101,6 +5089,13 @@ mime-types@~1.0.1: resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-1.0.2.tgz#995ae1392ab8affcbfcb2641dd054e943c0d5dce" integrity sha1-mVrhOSq4r/y/yyZB3QVOlDwNXc4= +mime-types@~2.1.24: + version "2.1.28" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.28.tgz#1160c4757eab2c5363888e005273ecf79d2a0ecd" + integrity sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ== + dependencies: + mime-db "1.45.0" + mime@1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" @@ -5243,11 +5238,16 @@ ms@2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== -ms@2.1.2, ms@^2.1.1: +ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + mustache@^3.0.0: version "3.2.1" resolved "https://registry.yarnpkg.com/mustache/-/mustache-3.2.1.tgz#89e78a9d207d78f2799b1e95764a25bf71a28322" @@ -5473,11 +5473,6 @@ object-assign@4.1.1, object-assign@^4.1.0: resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= -object-component@0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/object-component/-/object-component-0.0.3.tgz#f0c69aa50efc95b866c186f400a33769cb2f1291" - integrity sha1-8MaapQ78lbhmwYb0AKM3acsvEpE= - object-copy@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" @@ -5766,19 +5761,15 @@ parse-url@^5.0.0: parse-path "^4.0.0" protocols "^1.4.0" -parseqs@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/parseqs/-/parseqs-0.0.5.tgz#d5208a3738e46766e291ba2ea173684921a8b89d" - integrity sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0= - dependencies: - better-assert "~1.0.0" +parseqs@0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/parseqs/-/parseqs-0.0.6.tgz#8e4bb5a19d1cdc844a08ac974d34e273afa670d5" + integrity sha512-jeAGzMDbfSHHA091hr0r31eYfTig+29g3GKKE/PPbEQ65X0lmMwlEoqmhzu0iztID5uJpZsFlUPDP8ThPL7M8w== -parseuri@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/parseuri/-/parseuri-0.0.5.tgz#80204a50d4dbb779bfdc6ebe2778d90e4bce320a" - integrity sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo= - dependencies: - better-assert "~1.0.0" +parseuri@0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/parseuri/-/parseuri-0.0.6.tgz#e1496e829e3ac2ff47f39a4dd044b32823c4a25a" + integrity sha512-AUjen8sAkGgao7UyCX6Ahv0gIK2fABKmYjvP4xmy5JaKvcbTRueIqIPHLAfq30xJddqSE033IOMUSOMCcK3Sow== parseurl@~1.3.3: version "1.3.3" @@ -6692,54 +6683,51 @@ socket.io-adapter@~1.1.0: resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz#ab3f0d6f66b8fc7fca3959ab5991f82221789be9" integrity sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g== -socket.io-client@2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-2.3.0.tgz#14d5ba2e00b9bcd145ae443ab96b3f86cbcc1bb4" - integrity sha512-cEQQf24gET3rfhxZ2jJ5xzAOo/xhZwK+mOqtGRg5IowZsMgwvHwnf/mCRapAAkadhM26y+iydgwsXGObBB5ZdA== +socket.io-client@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-2.4.0.tgz#aafb5d594a3c55a34355562fc8aea22ed9119a35" + integrity sha512-M6xhnKQHuuZd4Ba9vltCLT9oa+YvTsP8j9NcEiLElfIg8KeYPyhWOes6x4t+LTAC8enQbE/995AdTem2uNyKKQ== dependencies: backo2 "1.0.2" - base64-arraybuffer "0.1.5" component-bind "1.0.0" - component-emitter "1.2.1" - debug "~4.1.0" - engine.io-client "~3.4.0" + component-emitter "~1.3.0" + debug "~3.1.0" + engine.io-client "~3.5.0" has-binary2 "~1.0.2" - has-cors "1.1.0" indexof "0.0.1" - object-component "0.0.3" - parseqs "0.0.5" - parseuri "0.0.5" + parseqs "0.0.6" + parseuri "0.0.6" socket.io-parser "~3.3.0" to-array "0.1.4" socket.io-parser@~3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-3.3.0.tgz#2b52a96a509fdf31440ba40fed6094c7d4f1262f" - integrity sha512-hczmV6bDgdaEbVqhAeVMM/jfUfzuEZHsQg6eOmLgJht6G3mPKMxYm75w2+qhAQZ+4X+1+ATZ+QFKeOZD5riHng== + version "3.3.2" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-3.3.2.tgz#ef872009d0adcf704f2fbe830191a14752ad50b6" + integrity sha512-FJvDBuOALxdCI9qwRrO/Rfp9yfndRtc1jSgVgV8FDraihmSP/MLGD5PEuJrNfjALvcQ+vMDM/33AWOYP/JSjDg== dependencies: - component-emitter "1.2.1" + component-emitter "~1.3.0" debug "~3.1.0" isarray "2.0.1" socket.io-parser@~3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-3.4.0.tgz#370bb4a151df2f77ce3345ff55a7072cc6e9565a" - integrity sha512-/G/VOI+3DBp0+DJKW4KesGnQkQPFmUCbA/oO2QGT6CWxU7hLGWqU3tyuzeSK/dqcyeHsQg1vTe9jiZI8GU9SCQ== + version "3.4.1" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-3.4.1.tgz#b06af838302975837eab2dc980037da24054d64a" + integrity sha512-11hMgzL+WCLWf1uFtHSNvliI++tcRUWdoeYuwIl+Axvwy9z2gQM+7nJyN3STj1tLj5JyIUH8/gpDGxzAlDdi0A== dependencies: component-emitter "1.2.1" debug "~4.1.0" isarray "2.0.1" socket.io@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-2.3.0.tgz#cd762ed6a4faeca59bc1f3e243c0969311eb73fb" - integrity sha512-2A892lrj0GcgR/9Qk81EaY2gYhCBxurV0PfmmESO6p27QPrUK1J3zdns+5QPqvUYK2q657nSj0guoIil9+7eFg== + version "2.4.1" + resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-2.4.1.tgz#95ad861c9a52369d7f1a68acf0d4a1b16da451d2" + integrity sha512-Si18v0mMXGAqLqCVpTxBa8MGqriHGQh8ccEOhmsmNS3thNCGBwO8WGrwMibANsWtQQ5NStdZwHqZR3naJVFc3w== dependencies: debug "~4.1.0" - engine.io "~3.4.0" + engine.io "~3.5.0" has-binary2 "~1.0.2" socket.io-adapter "~1.1.0" - socket.io-client "2.3.0" + socket.io-client "2.4.0" socket.io-parser "~3.4.0" sort-object-keys@^1.1.3: @@ -7784,17 +7772,10 @@ write@1.0.3: dependencies: mkdirp "^0.5.1" -ws@^7.1.2: - version "7.2.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.2.3.tgz#a5411e1fb04d5ed0efee76d26d5c46d830c39b46" - integrity sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ== - -ws@~6.1.0: - version "6.1.4" - resolved "https://registry.yarnpkg.com/ws/-/ws-6.1.4.tgz#5b5c8800afab925e94ccb29d153c8d02c1776ef9" - integrity sha512-eqZfL+NE/YQc1/ZynhojeV8q+H050oR8AZ2uIev7RU10svA9ZnJUddHcOUZTJLinZ9yEfdA2kSATS2qZK5fhJA== - dependencies: - async-limiter "~1.0.0" +ws@~7.4.2: + version "7.4.2" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.2.tgz#782100048e54eb36fe9843363ab1c68672b261dd" + integrity sha512-T4tewALS3+qsrpGI/8dqNMLIVdq/g/85U98HPMa6F0m6xTbvhXU6RCQLqPH3+SlomNV/LdY6RXEbBpMH6EOJnA== xdg-basedir@^4.0.0: version "4.0.0" From 54b7764f019fdac03c81ba7e70b688f6e8838aea Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Tue, 26 Jan 2021 13:50:05 -0800 Subject: [PATCH 619/818] Enable Embroider test scenario for addons Leverage @embroider/test-setup to add both `embroider-safe` and `embroider-optimized` scenarios to addons test matrix. --- blueprints/addon/additional-dev-dependencies.json | 1 + blueprints/addon/files/.travis.yml | 2 ++ blueprints/addon/files/addon-config/ember-try.js | 3 +++ blueprints/addon/files/ember-cli-build.js | 3 ++- tests/fixtures/addon/defaults/.travis.yml | 2 ++ tests/fixtures/addon/defaults/config/ember-try.js | 3 +++ tests/fixtures/addon/defaults/package.json | 1 + tests/fixtures/addon/yarn/.travis.yml | 2 ++ tests/fixtures/addon/yarn/config/ember-try.js | 3 +++ tests/fixtures/addon/yarn/package.json | 1 + tests/unit/blueprints/addon-test.js | 1 + 11 files changed, 21 insertions(+), 1 deletion(-) diff --git a/blueprints/addon/additional-dev-dependencies.json b/blueprints/addon/additional-dev-dependencies.json index 0786ce7d32..d88dd86220 100644 --- a/blueprints/addon/additional-dev-dependencies.json +++ b/blueprints/addon/additional-dev-dependencies.json @@ -1,5 +1,6 @@ { "devDependencies": { + "@embroider/test-setup": "0.36.0", "ember-disable-prototype-extensions": "^1.1.3", "ember-try": "^1.4.0", "ember-source-channel-url": "^3.0.0" diff --git a/blueprints/addon/files/.travis.yml b/blueprints/addon/files/.travis.yml index 4f9511e4b3..09b764f447 100644 --- a/blueprints/addon/files/.travis.yml +++ b/blueprints/addon/files/.travis.yml @@ -58,6 +58,8 @@ jobs: - env: EMBER_TRY_SCENARIO=ember-canary - env: EMBER_TRY_SCENARIO=ember-default-with-jquery - env: EMBER_TRY_SCENARIO=ember-classic + - env: EMBER_TRY_SCENARIO=embroider-safe + - env: EMBER_TRY_SCENARIO=embroider-optimized <% if (yarn) { %> before_install: - curl -o- -L https://yarnpkg.com/install.sh | bash diff --git a/blueprints/addon/files/addon-config/ember-try.js b/blueprints/addon/files/addon-config/ember-try.js index 657373b209..ba37be916d 100644 --- a/blueprints/addon/files/addon-config/ember-try.js +++ b/blueprints/addon/files/addon-config/ember-try.js @@ -1,6 +1,7 @@ 'use strict'; const getChannelURL = require('ember-source-channel-url'); +const { embroiderSafe, embroiderOptimized } = require('@embroider/test-setup'); module.exports = async function () { return { @@ -74,6 +75,8 @@ module.exports = async function () { }, }, }, + embroiderSafe(), + embroiderOptimized(), ], }; }; diff --git a/blueprints/addon/files/ember-cli-build.js b/blueprints/addon/files/ember-cli-build.js index ba0649dc93..a778499b7f 100644 --- a/blueprints/addon/files/ember-cli-build.js +++ b/blueprints/addon/files/ember-cli-build.js @@ -14,5 +14,6 @@ module.exports = function (defaults) { behave. You most likely want to be modifying `./index.js` or app's build file */ - return app.toTree(); + const { maybeEmbroider } = require('@embroider/test-setup'); + return maybeEmbroider(app); }; diff --git a/tests/fixtures/addon/defaults/.travis.yml b/tests/fixtures/addon/defaults/.travis.yml index 156fd25fad..b9b72cdba0 100644 --- a/tests/fixtures/addon/defaults/.travis.yml +++ b/tests/fixtures/addon/defaults/.travis.yml @@ -54,6 +54,8 @@ jobs: - env: EMBER_TRY_SCENARIO=ember-canary - env: EMBER_TRY_SCENARIO=ember-default-with-jquery - env: EMBER_TRY_SCENARIO=ember-classic + - env: EMBER_TRY_SCENARIO=embroider-safe + - env: EMBER_TRY_SCENARIO=embroider-optimized script: - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO diff --git a/tests/fixtures/addon/defaults/config/ember-try.js b/tests/fixtures/addon/defaults/config/ember-try.js index e59f91b33c..2ab59e5b67 100644 --- a/tests/fixtures/addon/defaults/config/ember-try.js +++ b/tests/fixtures/addon/defaults/config/ember-try.js @@ -1,6 +1,7 @@ 'use strict'; const getChannelURL = require('ember-source-channel-url'); +const { embroiderSafe, embroiderOptimized } = require('@embroider/test-setup'); module.exports = async function () { return { @@ -73,6 +74,8 @@ module.exports = async function () { }, }, }, + embroiderSafe(), + embroiderOptimized(), ], }; }; diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index e4c5c203e4..e8cd512294 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -32,6 +32,7 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.1.4", + "@embroider/test-setup": "0.36.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", diff --git a/tests/fixtures/addon/yarn/.travis.yml b/tests/fixtures/addon/yarn/.travis.yml index 3a7ed03cd8..592dc12478 100644 --- a/tests/fixtures/addon/yarn/.travis.yml +++ b/tests/fixtures/addon/yarn/.travis.yml @@ -53,6 +53,8 @@ jobs: - env: EMBER_TRY_SCENARIO=ember-canary - env: EMBER_TRY_SCENARIO=ember-default-with-jquery - env: EMBER_TRY_SCENARIO=ember-classic + - env: EMBER_TRY_SCENARIO=embroider-safe + - env: EMBER_TRY_SCENARIO=embroider-optimized before_install: - curl -o- -L https://yarnpkg.com/install.sh | bash diff --git a/tests/fixtures/addon/yarn/config/ember-try.js b/tests/fixtures/addon/yarn/config/ember-try.js index f14ac7f50b..72f0ea604c 100644 --- a/tests/fixtures/addon/yarn/config/ember-try.js +++ b/tests/fixtures/addon/yarn/config/ember-try.js @@ -1,6 +1,7 @@ 'use strict'; const getChannelURL = require('ember-source-channel-url'); +const { embroiderSafe, embroiderOptimized } = require('@embroider/test-setup'); module.exports = async function () { return { @@ -74,6 +75,8 @@ module.exports = async function () { }, }, }, + embroiderSafe(), + embroiderOptimized(), ], }; }; diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index f6d9d86261..6adee701bd 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -32,6 +32,7 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.1.4", + "@embroider/test-setup": "0.36.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", diff --git a/tests/unit/blueprints/addon-test.js b/tests/unit/blueprints/addon-test.js index c56cf7e960..e0129e9a01 100644 --- a/tests/unit/blueprints/addon-test.js +++ b/tests/unit/blueprints/addon-test.js @@ -180,6 +180,7 @@ describe('blueprint - addon', function () { delete json.devDependencies['eslint-plugin-node']; delete json.devDependencies['ember-try']; delete json.devDependencies['ember-source-channel-url']; + delete json.devDependencies['@embroider/test-setup']; expect(json.dependencies).to.deep.equal({ a: '1', b: '1' }); expect(json.devDependencies).to.deep.equal({ a: '1', b: '1' }); }); From 9c4ad3ea868d7ce973ca59521e89a3233ce4ac49 Mon Sep 17 00:00:00 2001 From: Bert De Block Date: Sun, 31 Jan 2021 19:40:51 +0100 Subject: [PATCH 620/818] Add Prettier files to .npmignore file in addon blueprint --- blueprints/addon/files/npmignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/blueprints/addon/files/npmignore b/blueprints/addon/files/npmignore index 88818f2c82..1556c4d3c1 100644 --- a/blueprints/addon/files/npmignore +++ b/blueprints/addon/files/npmignore @@ -15,6 +15,8 @@ /.eslintrc.js /.git/ /.gitignore +/.prettierignore +/.prettierrc.js /.template-lintrc.js /.travis.yml /.watchmanconfig From 304fc4060150570a639df070b9f6d213d623d2ed Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 1 Feb 2021 04:55:04 +0000 Subject: [PATCH 621/818] Bump eslint-config-prettier from 7.1.0 to 7.2.0 (#9438) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index bbb25d724b..7917bde616 100644 --- a/package.json +++ b/package.json @@ -140,7 +140,7 @@ "ember-cli-blueprint-test-helpers": "^0.19.2", "ember-cli-internal-test-helpers": "^0.9.1", "eslint": "^7.11.0", - "eslint-config-prettier": "^7.1.0", + "eslint-config-prettier": "^7.2.0", "eslint-plugin-chai-expect": "^2.2.0", "eslint-plugin-mocha": "^8.0.0", "eslint-plugin-node": "^11.1.0", diff --git a/yarn.lock b/yarn.lock index dce7467737..5d48a92908 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2618,10 +2618,10 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= -eslint-config-prettier@^7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-7.1.0.tgz#5402eb559aa94b894effd6bddfa0b1ca051c858f" - integrity sha512-9sm5/PxaFG7qNJvJzTROMM1Bk1ozXVTKI0buKOyb0Bsr1hrwi0H/TzxF/COtf1uxikIK8SwhX7K6zg78jAzbeA== +eslint-config-prettier@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-7.2.0.tgz#f4a4bd2832e810e8cc7c1411ec85b3e85c0c53f9" + integrity sha512-rV4Qu0C3nfJKPOAhFujFxB7RMP+URFyQqqOZW9DMRD7ZDTFyjaIlETU3xzHELt++4ugC0+Jm084HQYkkJe+Ivg== eslint-plugin-chai-expect@^2.2.0: version "2.2.0" From c0dcffe5afeedfcc28edd324c8ff119f60a179e0 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 1 Feb 2021 06:07:33 +0000 Subject: [PATCH 622/818] Bump eslint-plugin-prettier from 3.3.0 to 3.3.1 (#9443) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 7917bde616..6e166af543 100644 --- a/package.json +++ b/package.json @@ -144,7 +144,7 @@ "eslint-plugin-chai-expect": "^2.2.0", "eslint-plugin-mocha": "^8.0.0", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.3.0", + "eslint-plugin-prettier": "^3.3.1", "fixturify": "^2.1.0", "is-language-code": "^2.0.0", "latest-version": "^5.1.0", diff --git a/yarn.lock b/yarn.lock index 5d48a92908..3e476524d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2656,10 +2656,10 @@ eslint-plugin-node@^11.1.0: resolve "^1.10.1" semver "^6.1.0" -eslint-plugin-prettier@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.0.tgz#61e295349a65688ffac0b7808ef0a8244bdd8d40" - integrity sha512-tMTwO8iUWlSRZIwS9k7/E4vrTsfvsrcM5p1eftyuqWH25nKsz/o6/54I7jwQ/3zobISyC7wMy9ZsFwgTxOcOpQ== +eslint-plugin-prettier@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.1.tgz#7079cfa2497078905011e6f82e8dd8453d1371b7" + integrity sha512-Rq3jkcFY8RYeQLgk2cCwuc0P7SEFwDravPhsJZOQ5N4YI4DSg50NyqJ/9gdZHzQlHf8MvafSesbNJCcP/FF6pQ== dependencies: prettier-linter-helpers "^1.0.0" From 59dcd9e0a3d3a8ad018e5b48c2d4bd8a70b7f614 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 1 Feb 2021 07:20:23 +0000 Subject: [PATCH 623/818] Bump fs-extra from 9.0.1 to 9.1.0 (#9439) --- package.json | 2 +- yarn.lock | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 6e166af543..a0c0741a3b 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "find-up": "^5.0.0", "find-yarn-workspace-root": "^2.0.0", "fixturify-project": "^2.1.0", - "fs-extra": "^9.0.1", + "fs-extra": "^9.1.0", "fs-tree-diff": "^2.0.1", "get-caller-file": "^2.0.5", "git-repo-info": "^2.1.1", diff --git a/yarn.lock b/yarn.lock index 3e476524d3..0046a7e7fe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3341,15 +3341,15 @@ fs-extra@^8.0.1, fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@^9.0.1: - version "9.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc" - integrity sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ== +fs-extra@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" + integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== dependencies: at-least-node "^1.0.0" graceful-fs "^4.2.0" jsonfile "^6.0.1" - universalify "^1.0.0" + universalify "^2.0.0" fs-merger@^3.1.0: version "3.1.0" @@ -7445,6 +7445,11 @@ universalify@^1.0.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d" integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug== +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" From a862a4ff0d8213b8a11133d9d7934211a14a58f4 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 1 Feb 2021 08:21:54 +0000 Subject: [PATCH 624/818] Bump @octokit/rest from 18.0.9 to 18.0.15 (#9445) --- package.json | 2 +- yarn.lock | 135 +++++++++++++++++++++++++++++++++------------------ 2 files changed, 89 insertions(+), 48 deletions(-) diff --git a/package.json b/package.json index a0c0741a3b..5bfdf7e0a0 100644 --- a/package.json +++ b/package.json @@ -131,7 +131,7 @@ }, "devDependencies": { "@ember/edition-utils": "^1.2.0", - "@octokit/rest": "^18.0.9", + "@octokit/rest": "^18.0.15", "broccoli-plugin": "^4.0.3", "broccoli-test-helper": "^2.0.0", "chai": "^4.2.0", diff --git a/yarn.lock b/yarn.lock index 0046a7e7fe..81fbfc1cbe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -280,24 +280,24 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" -"@octokit/auth-token@^2.4.0": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.0.tgz#b64178975218b99e4dfe948253f0673cbbb59d9f" - integrity sha512-eoOVMjILna7FVQf96iWc3+ZtE/ZT6y8ob8ZzcqKY1ibSQCnu4O/B7pJvzMx5cyZ/RjAff6DAdEb0O0Cjcxidkg== - dependencies: - "@octokit/types" "^2.0.0" - -"@octokit/core@^3.0.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.1.0.tgz#9c3c9b23f7504668cfa057f143ccbf0c645a0ac9" - integrity sha512-yPyQSmxIXLieEIRikk2w8AEtWkFdfG/LXcw1KvEtK3iP0ENZLW/WYQmdzOKqfSaLhooz4CJ9D+WY79C8ZliACw== - dependencies: - "@octokit/auth-token" "^2.4.0" - "@octokit/graphql" "^4.3.1" - "@octokit/request" "^5.4.0" - "@octokit/types" "^5.0.0" +"@octokit/auth-token@^2.4.4": + version "2.4.5" + resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.5.tgz#568ccfb8cb46f36441fac094ce34f7a875b197f3" + integrity sha512-BpGYsPgJt05M7/L/5FoE1PiAbdxXFZkX/3kDYcsvd1v6UhlnE5e96dTDr0ezX/EFwciQxf3cNV0loipsURU+WA== + dependencies: + "@octokit/types" "^6.0.3" + +"@octokit/core@^3.0.0", "@octokit/core@^3.2.3": + version "3.2.5" + resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.2.5.tgz#57becbd5fd789b0592b915840855f3a5f233d554" + integrity sha512-+DCtPykGnvXKWWQI0E1XD+CCeWSBhB6kwItXqfFmNBlIlhczuDPbg+P6BtLnVBaRJDAjv+1mrUJuRsFSjktopg== + dependencies: + "@octokit/auth-token" "^2.4.4" + "@octokit/graphql" "^4.5.8" + "@octokit/request" "^5.4.12" + "@octokit/types" "^6.0.3" before-after-hook "^2.1.0" - universal-user-agent "^5.0.0" + universal-user-agent "^6.0.0" "@octokit/endpoint@^6.0.1": version "6.0.3" @@ -308,26 +308,31 @@ is-plain-object "^3.0.0" universal-user-agent "^5.0.0" -"@octokit/graphql@^4.3.1": - version "4.3.1" - resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.3.1.tgz#9ee840e04ed2906c7d6763807632de84cdecf418" - integrity sha512-hCdTjfvrK+ilU2keAdqNBWOk+gm1kai1ZcdjRfB30oA3/T6n53UVJb7w0L5cR3/rhU91xT3HSqCd+qbvH06yxA== +"@octokit/graphql@^4.5.8": + version "4.5.9" + resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.5.9.tgz#2365831a1a88f4cb6fd4b0488edb6587d8243024" + integrity sha512-c+0yofIugUNqo+ktrLaBlWSbjSq/UF8ChAyxQzbD3X74k1vAuyLKdDJmPwVExUFSp6+U1FzWe+3OkeRsIqV0vg== dependencies: "@octokit/request" "^5.3.0" - "@octokit/types" "^2.0.0" - universal-user-agent "^4.0.0" + "@octokit/types" "^6.0.3" + universal-user-agent "^6.0.0" -"@octokit/plugin-paginate-rest@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.2.0.tgz#9ae0c14c1b90ec0d96d2ef1b44706b4505a91cee" - integrity sha512-KoNxC3PLNar8UJwR+1VMQOw2IoOrrFdo5YOiDKnBhpVbKpw+zkBKNMNKwM44UWL25Vkn0Sl3nYIEGKY+gW5ebw== +"@octokit/openapi-types@^3.4.1": + version "3.4.1" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-3.4.1.tgz#317f78cede7f387046e6bad2041e01ddf9607e96" + integrity sha512-7Sjm3UwEAM11f+ck9+qlyEfgl8hCk5sSZBU2qcWY8+8ibowjqcwxhhtvY0/pjHPF8mcvmedFpGmmIYs2qM9/+Q== + +"@octokit/plugin-paginate-rest@^2.2.0", "@octokit/plugin-paginate-rest@^2.6.2": + version "2.9.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.9.0.tgz#f52c26850b019584be8dc55c0bd6257339c0fa43" + integrity sha512-XxbOg45r2n/2QpU6hnGDxQNDRrJ7gjYpMXeDbUCigWTHECmjoyFLizkFO2jMEtidMkfiELn7AF8GBAJ/cbPTnA== dependencies: - "@octokit/types" "^2.12.1" + "@octokit/types" "^6.6.0" -"@octokit/plugin-request-log@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.0.tgz#eef87a431300f6148c39a7f75f8cfeb218b2547e" - integrity sha512-ywoxP68aOT3zHCLgWZgwUJatiENeHE7xJzYjfz8WI0goynp96wETBF+d95b8g/uL4QmS6owPVlaxiz3wyMAzcw== +"@octokit/plugin-request-log@^1.0.0", "@octokit/plugin-request-log@^1.0.2": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.3.tgz#70a62be213e1edc04bb8897ee48c311482f9700d" + integrity sha512-4RFU4li238jMJAzLgAwkBAw+4Loile5haQMQr+uhFq27BmyJXcXSKvoQKqh0agsZEiUlW6iSv3FAgvmGkur7OQ== "@octokit/plugin-rest-endpoint-methods@4.2.1": version "4.2.1" @@ -337,6 +342,14 @@ "@octokit/types" "^5.5.0" deprecation "^2.3.1" +"@octokit/plugin-rest-endpoint-methods@4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.8.0.tgz#c1f24f940fc265f0021c8f544e3d8755f3253759" + integrity sha512-2zRpXDveJH8HsXkeeMtRW21do8wuSxVn1xXFdvhILyxlLWqGQrdJUA1/dk5DM7iAAYvwT/P3bDOLs90yL4S2AA== + dependencies: + "@octokit/types" "^6.5.0" + deprecation "^2.3.1" + "@octokit/request-error@^2.0.0": version "2.0.2" resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.0.2.tgz#0e76b83f5d8fdda1db99027ea5f617c2e6ba9ed0" @@ -346,7 +359,7 @@ deprecation "^2.0.0" once "^1.4.0" -"@octokit/request@^5.3.0", "@octokit/request@^5.4.0": +"@octokit/request@^5.3.0": version "5.4.5" resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.5.tgz#8df65bd812047521f7e9db6ff118c06ba84ac10b" integrity sha512-atAs5GAGbZedvJXXdjtKljin+e2SltEs48B3naJjqWupYl2IUBbB/CJisyjbNHcKpHzb3E+OYEZ46G8eakXgQg== @@ -360,7 +373,21 @@ once "^1.4.0" universal-user-agent "^5.0.0" -"@octokit/rest@18.0.9", "@octokit/rest@^18.0.9": +"@octokit/request@^5.4.12": + version "5.4.13" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.13.tgz#eec5987b3e96f984fc5f41967e001170c6d23a18" + integrity sha512-WcNRH5XPPtg7i1g9Da5U9dvZ6YbTffw9BN2rVezYiE7couoSyaRsw0e+Tl8uk1fArHE7Dn14U7YqUDy59WaqEw== + dependencies: + "@octokit/endpoint" "^6.0.1" + "@octokit/request-error" "^2.0.0" + "@octokit/types" "^6.0.3" + deprecation "^2.0.0" + is-plain-object "^5.0.0" + node-fetch "^2.6.1" + once "^1.4.0" + universal-user-agent "^6.0.0" + +"@octokit/rest@18.0.9": version "18.0.9" resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.9.tgz#964d707d914eb34b1787895fdcacff96de47844d" integrity sha512-CC5+cIx974Ygx9lQNfUn7/oXDQ9kqGiKUC6j1A9bAVZZ7aoTF8K6yxu0pQhQrLBwSl92J6Z3iVDhGhGFgISCZg== @@ -370,12 +397,15 @@ "@octokit/plugin-request-log" "^1.0.0" "@octokit/plugin-rest-endpoint-methods" "4.2.1" -"@octokit/types@^2.0.0", "@octokit/types@^2.12.1": - version "2.12.1" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-2.12.1.tgz#4a26b4a85ec121043d3b0745b5798f9d8fd968ca" - integrity sha512-LRLR1tjbcCfAmUElvTmMvLEzstpx6Xt/aQVTg2xvd+kHA2Ekp1eWl5t+gU7bcwjXHYEAzh4hH4WH+kS3vh+wRw== +"@octokit/rest@^18.0.15": + version "18.0.15" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.15.tgz#a690aabd9927a3389e285dee25da67e62b3f14ad" + integrity sha512-MBlZl0KeuvFMJ3210hG5xhh/jtYmMDLd5WmO49Wg4Rfg0odeivntWAyq3KofJDP2G8jskCaaOaZBKo0TeO9tFA== dependencies: - "@types/node" ">= 8" + "@octokit/core" "^3.2.3" + "@octokit/plugin-paginate-rest" "^2.6.2" + "@octokit/plugin-request-log" "^1.0.2" + "@octokit/plugin-rest-endpoint-methods" "4.8.0" "@octokit/types@^5.0.0", "@octokit/types@^5.0.1", "@octokit/types@^5.5.0": version "5.5.0" @@ -384,6 +414,14 @@ dependencies: "@types/node" ">= 8" +"@octokit/types@^6.0.3", "@octokit/types@^6.5.0", "@octokit/types@^6.6.0": + version "6.7.0" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.7.0.tgz#a548ed7a5606620a55c4814e11d64e3d19285f47" + integrity sha512-QiE7y2Brh0Bv61K//kFGJ6jCZihCf4fGL1FP0Oims5h2SlSYtDiAQMJW15s8udyLfjo/jY05G1YlN8ED/c6RNw== + dependencies: + "@octokit/openapi-types" "^3.4.1" + "@types/node" ">= 8" + "@sindresorhus/is@^0.14.0": version "0.14.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" @@ -4291,6 +4329,11 @@ is-plain-object@^3.0.0: dependencies: isobject "^4.0.0" +is-plain-object@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" + integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== + is-promise@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" @@ -5320,7 +5363,7 @@ nock@^13.0.5: lodash.set "^4.3.2" propagate "^2.0.0" -node-fetch@^2.3.0, node-fetch@^2.6.0: +node-fetch@^2.3.0, node-fetch@^2.6.0, node-fetch@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== @@ -7421,13 +7464,6 @@ unique-string@^2.0.0: dependencies: crypto-random-string "^2.0.0" -universal-user-agent@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-4.0.1.tgz#fd8d6cb773a679a709e967ef8288a31fcc03e557" - integrity sha512-LnST3ebHwVL2aNe4mejI9IQh2HfZ1RLo8Io2HugSif8ekzD1TlWpHpColOB/eh8JHMLkGH3Akqf040I+4ylNxg== - dependencies: - os-name "^3.1.0" - universal-user-agent@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-5.0.0.tgz#a3182aa758069bf0e79952570ca757de3579c1d9" @@ -7435,6 +7471,11 @@ universal-user-agent@^5.0.0: dependencies: os-name "^3.1.0" +universal-user-agent@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" + integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== + universalify@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" From e83bf6c2ddc573ad0dbd576907949b4c59b8ffeb Mon Sep 17 00:00:00 2001 From: Bert De Block Date: Sun, 24 Jan 2021 21:05:04 +0100 Subject: [PATCH 625/818] Use "lint:js:fix" script in README files --- blueprints/addon/files/CONTRIBUTING.md | 5 ++--- blueprints/app/files/README.md | 5 ++--- tests/fixtures/addon/defaults/CONTRIBUTING.md | 5 ++--- tests/fixtures/addon/yarn/CONTRIBUTING.md | 5 ++--- tests/fixtures/app/defaults/README.md | 5 ++--- tests/fixtures/app/npm/README.md | 5 ++--- tests/fixtures/app/yarn/README.md | 5 ++--- 7 files changed, 14 insertions(+), 21 deletions(-) diff --git a/blueprints/addon/files/CONTRIBUTING.md b/blueprints/addon/files/CONTRIBUTING.md index 97d3493600..e8a9a70644 100644 --- a/blueprints/addon/files/CONTRIBUTING.md +++ b/blueprints/addon/files/CONTRIBUTING.md @@ -8,9 +8,8 @@ ## Linting -* `<% if (yarn) { %>yarn lint:hbs<% } else { %>npm run lint:hbs<% } %>` -* `<% if (yarn) { %>yarn lint:js<% } else { %>npm run lint:js<% } %>` -* `<% if (yarn) { %>yarn lint:js --fix<% } else { %>npm run lint:js -- --fix<% } %>` +* `<% if (yarn) { %>yarn lint<% } else { %>npm run lint<% } %>` +* `<% if (yarn) { %>yarn lint:fix<% } else { %>npm run lint:fix<% } %>` ## Running tests diff --git a/blueprints/app/files/README.md b/blueprints/app/files/README.md index a970428ca9..469bce68e5 100644 --- a/blueprints/app/files/README.md +++ b/blueprints/app/files/README.md @@ -36,9 +36,8 @@ Make use of the many generators for code, try `ember help generate` for more det ### Linting -* `<% if (yarn) { %>yarn lint:hbs<% } else { %>npm run lint:hbs<% } %>` -* `<% if (yarn) { %>yarn lint:js<% } else { %>npm run lint:js<% } %>` -* `<% if (yarn) { %>yarn lint:js --fix<% } else { %>npm run lint:js -- --fix<% } %>` +* `<% if (yarn) { %>yarn lint<% } else { %>npm run lint<% } %>` +* `<% if (yarn) { %>yarn lint:fix<% } else { %>npm run lint:fix<% } %>` ### Building diff --git a/tests/fixtures/addon/defaults/CONTRIBUTING.md b/tests/fixtures/addon/defaults/CONTRIBUTING.md index 9dc619ac43..fe508af0ed 100644 --- a/tests/fixtures/addon/defaults/CONTRIBUTING.md +++ b/tests/fixtures/addon/defaults/CONTRIBUTING.md @@ -8,9 +8,8 @@ ## Linting -* `npm run lint:hbs` -* `npm run lint:js` -* `npm run lint:js -- --fix` +* `npm run lint` +* `npm run lint:fix` ## Running tests diff --git a/tests/fixtures/addon/yarn/CONTRIBUTING.md b/tests/fixtures/addon/yarn/CONTRIBUTING.md index 249926e03b..9ae5a1bfd5 100644 --- a/tests/fixtures/addon/yarn/CONTRIBUTING.md +++ b/tests/fixtures/addon/yarn/CONTRIBUTING.md @@ -8,9 +8,8 @@ ## Linting -* `yarn lint:hbs` -* `yarn lint:js` -* `yarn lint:js --fix` +* `yarn lint` +* `yarn lint:fix` ## Running tests diff --git a/tests/fixtures/app/defaults/README.md b/tests/fixtures/app/defaults/README.md index c81ac108ab..dba454682e 100644 --- a/tests/fixtures/app/defaults/README.md +++ b/tests/fixtures/app/defaults/README.md @@ -35,9 +35,8 @@ Make use of the many generators for code, try `ember help generate` for more det ### Linting -* `npm run lint:hbs` -* `npm run lint:js` -* `npm run lint:js -- --fix` +* `npm run lint` +* `npm run lint:fix` ### Building diff --git a/tests/fixtures/app/npm/README.md b/tests/fixtures/app/npm/README.md index c81ac108ab..dba454682e 100644 --- a/tests/fixtures/app/npm/README.md +++ b/tests/fixtures/app/npm/README.md @@ -35,9 +35,8 @@ Make use of the many generators for code, try `ember help generate` for more det ### Linting -* `npm run lint:hbs` -* `npm run lint:js` -* `npm run lint:js -- --fix` +* `npm run lint` +* `npm run lint:fix` ### Building diff --git a/tests/fixtures/app/yarn/README.md b/tests/fixtures/app/yarn/README.md index cce6022935..21a6679ce9 100644 --- a/tests/fixtures/app/yarn/README.md +++ b/tests/fixtures/app/yarn/README.md @@ -36,9 +36,8 @@ Make use of the many generators for code, try `ember help generate` for more det ### Linting -* `yarn lint:hbs` -* `yarn lint:js` -* `yarn lint:js --fix` +* `yarn lint` +* `yarn lint:fix` ### Building From 82fe7a5a39c68f4bd970e8c4963b91d48f8e4c2b Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Mon, 1 Feb 2021 09:48:32 -0800 Subject: [PATCH 626/818] Use carat range instead of specific version --- blueprints/addon/additional-dev-dependencies.json | 2 +- tests/fixtures/addon/defaults/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/blueprints/addon/additional-dev-dependencies.json b/blueprints/addon/additional-dev-dependencies.json index d88dd86220..9611d6b9bd 100644 --- a/blueprints/addon/additional-dev-dependencies.json +++ b/blueprints/addon/additional-dev-dependencies.json @@ -1,6 +1,6 @@ { "devDependencies": { - "@embroider/test-setup": "0.36.0", + "@embroider/test-setup": "^0.36.0", "ember-disable-prototype-extensions": "^1.1.3", "ember-try": "^1.4.0", "ember-source-channel-url": "^3.0.0" diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index e8cd512294..78ebc0dcb0 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -32,7 +32,7 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.1.4", - "@embroider/test-setup": "0.36.0", + "@embroider/test-setup": "^0.36.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 6adee701bd..4e899b6671 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -32,7 +32,7 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.1.4", - "@embroider/test-setup": "0.36.0", + "@embroider/test-setup": "^0.36.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", From bec81cbb1a7b6127779251c9b9a0b2bf14e9f49b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 4 Feb 2021 16:43:20 +0000 Subject: [PATCH 627/818] Bump diff from 4.0.2 to 5.0.0 (#9441) --- package.json | 2 +- yarn.lock | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5bfdf7e0a0..6d126ebf66 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "console-ui": "^3.1.2", "core-object": "^3.1.5", "dag-map": "^2.0.2", - "diff": "^4.0.2", + "diff": "^5.0.0", "ember-cli-is-package-missing": "^1.0.0", "ember-cli-lodash-subset": "^2.0.1", "ember-cli-normalize-entity-name": "^1.0.0", diff --git a/yarn.lock b/yarn.lock index 81fbfc1cbe..cef9131747 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2351,11 +2351,16 @@ detect-newline@3.1.0: resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== -diff@4.0.2, diff@^4.0.2: +diff@4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== +diff@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== + dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" From 6c2f2496519a0b03f7c128a0b193246b968f9f3f Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 4 Feb 2021 17:56:13 +0000 Subject: [PATCH 628/818] Bump prettier from 2.1.2 to 2.2.1 (#9444) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 6d126ebf66..edf79c28dc 100644 --- a/package.json +++ b/package.json @@ -151,7 +151,7 @@ "mocha": "^8.2.0", "nock": "^13.0.5", "nyc": "^15.1.0", - "prettier": "2.1.2", + "prettier": "2.2.1", "release-it": "^14.2.2", "rimraf": "^3.0.2", "strip-ansi": "^6.0.0", diff --git a/yarn.lock b/yarn.lock index cef9131747..a8349757c4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5953,10 +5953,10 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.2.tgz#3050700dae2e4c8b67c4c3f666cdb8af405e1ce5" - integrity sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg== +prettier@2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5" + integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q== printf@^0.5.1: version "0.5.2" From 4f1e9df74ce00252dd9704ddbc9294d38e9d4dfd Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 4 Feb 2021 18:58:14 +0000 Subject: [PATCH 629/818] Bump execa from 4.1.0 to 5.0.0 (#9442) --- package.json | 2 +- yarn.lock | 53 ++++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 40 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index edf79c28dc..78fdf84612 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "ember-cli-string-utils": "^1.1.0", "ember-source-channel-url": "^3.0.0", "ensure-posix-path": "^1.1.1", - "execa": "^4.1.0", + "execa": "^5.0.0", "exit": "^0.1.2", "express": "^4.17.1", "filesize": "^6.1.0", diff --git a/yarn.lock b/yarn.lock index a8349757c4..53bfdb0ef6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2106,10 +2106,10 @@ cross-spawn@^6.0.0: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^7.0.0, cross-spawn@^7.0.2: - version "7.0.2" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.2.tgz#d0d7dcfa74e89115c7619f4f721a94e1fdb716d6" - integrity sha512-PD6G8QG3S4FK/XCGFbEQrDqO2AnMMsy0meR7lerlIOHAAbkuavGU/pOqprrlvfTNjvowivTeBsjebAL0NSoMxw== +cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== dependencies: path-key "^3.1.0" shebang-command "^2.0.0" @@ -2847,7 +2847,7 @@ exec-sh@^0.3.2: resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.4.tgz#3a018ceb526cc6f6df2bb504b2bfe8e3a4934ec5" integrity sha512-sEFIkc61v75sWeOe72qyrqg2Qg0OuLESziUDk/O/z2qgS15y2gWVFrI6f2Qn/qw/0/NCfCEsmNA4zOjkwEZT1A== -execa@4.1.0, execa@^4.0.2, execa@^4.1.0: +execa@4.1.0, execa@^4.0.2: version "4.1.0" resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== @@ -2875,6 +2875,21 @@ execa@^1.0.0: signal-exit "^3.0.0" strip-eof "^1.0.0" +execa@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.0.0.tgz#4029b0007998a841fbd1032e5f4de86a3c1e3376" + integrity sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + exists-sync@0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/exists-sync/-/exists-sync-0.0.3.tgz#b910000bedbb113b378b82f5f5a7638107622dcf" @@ -3522,6 +3537,11 @@ get-stream@^5.0.0, get-stream@^5.1.0: dependencies: pump "^3.0.0" +get-stream@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.0.tgz#3e0012cb6827319da2706e601a1583e8629a6718" + integrity sha512-A1B3Bh1UmL0bidM/YX2NsCOTnGJePL9rO/M+Mw3m9f2gUpfokS0hi5Eah0WSUEWZdZhIZtMjkIYS7mDfOqNHbg== + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -3969,6 +3989,11 @@ human-signals@^1.1.1: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + iconv-lite@0.4.24, iconv-lite@^0.4.13, iconv-lite@^0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -5456,7 +5481,7 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" -npm-run-path@^4.0.0: +npm-run-path@^4.0.0, npm-run-path@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== @@ -5595,10 +5620,10 @@ onetime@^2.0.0: dependencies: mimic-fn "^1.0.0" -onetime@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.0.tgz#fff0f3c91617fe62bb50189636e99ac8a6df7be5" - integrity sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q== +onetime@^5.1.0, onetime@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== dependencies: mimic-fn "^2.1.0" @@ -6663,10 +6688,10 @@ shellwords@^0.1.1: resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== -signal-exit@^3.0.0, signal-exit@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= +signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" + integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== silent-error@^1.0.0, silent-error@^1.0.1, silent-error@^1.1.0, silent-error@^1.1.1: version "1.1.1" From d52bbae74f61152048af14286efdb9ca032aa00d Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Mon, 15 Feb 2021 19:29:30 +0000 Subject: [PATCH 630/818] update blueprint deps --- blueprints/app/files/package.json | 32 +++++++++---------- tests/fixtures/addon/defaults/package.json | 22 ++++++------- tests/fixtures/addon/yarn/package.json | 22 ++++++------- tests/fixtures/app/defaults/package.json | 26 +++++++-------- .../app/embroider-no-welcome/package.json | 32 +++++++++---------- tests/fixtures/app/embroider/package.json | 32 +++++++++---------- tests/fixtures/app/npm/package.json | 26 +++++++-------- tests/fixtures/app/yarn/package.json | 26 +++++++-------- 8 files changed, 109 insertions(+), 109 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 11ee0d2857..ad8e202c28 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -24,10 +24,10 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.4<% if (embroider) { %>", - "@embroider/compat": "^0.35.0", - "@embroider/core": "^0.35.0", - "@embroider/webpack": "^0.35.0<% } %>", + "@ember/test-helpers": "^2.2.0<% if (embroider) { %>", + "@embroider/compat": "^0.36.0", + "@embroider/core": "^0.36.0", + "@embroider/webpack": "^0.36.0<% } %>", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", @@ -35,32 +35,32 @@ "ember-auto-import": "^1.10.1", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^4.0.0", - "ember-cli-babel": "^7.23.0", + "ember-cli-babel": "^7.23.1", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^5.3.1", + "ember-cli-htmlbars": "^5.3.2", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.25.0-beta.0", + "ember-data": "~3.25.0", "ember-export-application-global": "^2.0.1", - "ember-fetch": "^8.0.2", + "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-page-title": "^6.0.3", - "ember-qunit": "^5.1.1", + "ember-page-title": "^6.2.1", + "ember-qunit": "^5.1.2", "ember-resolver": "^8.0.2", - "ember-source": "~3.25.0-beta.1", - "ember-template-lint": "^2.15.0<% if (welcome) { %>", + "ember-source": "~3.25.1", + "ember-template-lint": "^2.18.1<% if (welcome) { %>", "ember-welcome-page": "^4.0.0<% } %>", - "eslint": "^7.17.0", - "eslint-config-prettier": "^7.1.0", - "eslint-plugin-ember": "^10.1.1", + "eslint": "^7.20.0", + "eslint-config-prettier": "^7.2.0", + "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.13.0", + "qunit": "^2.14.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index e4c5c203e4..fc3594fa35 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -26,12 +26,12 @@ "test:ember-compatibility": "ember try:each" }, "dependencies": { - "ember-cli-babel": "^7.23.0", - "ember-cli-htmlbars": "^5.3.1" + "ember-cli-babel": "^7.23.1", + "ember-cli-htmlbars": "^5.3.2" }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.4", + "@ember/test-helpers": "^2.2.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", @@ -46,22 +46,22 @@ "ember-export-application-global": "^2.0.1", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-page-title": "^6.0.3", - "ember-qunit": "^5.1.1", + "ember-page-title": "^6.2.1", + "ember-qunit": "^5.1.2", "ember-resolver": "^8.0.2", - "ember-source": "~3.25.0-beta.1", + "ember-source": "~3.25.1", "ember-source-channel-url": "^3.0.0", - "ember-template-lint": "^2.15.0", + "ember-template-lint": "^2.18.1", "ember-try": "^1.4.0", - "eslint": "^7.17.0", - "eslint-config-prettier": "^7.1.0", - "eslint-plugin-ember": "^10.1.1", + "eslint": "^7.20.0", + "eslint-config-prettier": "^7.2.0", + "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.13.0", + "qunit": "^2.14.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index f6d9d86261..d20addd587 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -26,12 +26,12 @@ "test:ember-compatibility": "ember try:each" }, "dependencies": { - "ember-cli-babel": "^7.23.0", - "ember-cli-htmlbars": "^5.3.1" + "ember-cli-babel": "^7.23.1", + "ember-cli-htmlbars": "^5.3.2" }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.4", + "@ember/test-helpers": "^2.2.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", @@ -46,23 +46,23 @@ "ember-export-application-global": "^2.0.1", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-page-title": "^6.0.3", - "ember-qunit": "^5.1.1", + "ember-page-title": "^6.2.1", + "ember-qunit": "^5.1.2", "ember-resolver": "^8.0.2", - "ember-source": "~3.25.0-beta.1", + "ember-source": "~3.25.1", "ember-source-channel-url": "^3.0.0", - "ember-template-lint": "^2.15.0", + "ember-template-lint": "^2.18.1", "ember-try": "^1.4.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.17.0", - "eslint-config-prettier": "^7.1.0", - "eslint-plugin-ember": "^10.1.1", + "eslint": "^7.20.0", + "eslint-config-prettier": "^7.2.0", + "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.13.0", + "qunit": "^2.14.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index 4f15688aba..487d7a3aed 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -24,7 +24,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.4", + "@ember/test-helpers": "^2.2.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", @@ -32,32 +32,32 @@ "ember-auto-import": "^1.10.1", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^4.0.0", - "ember-cli-babel": "^7.23.0", + "ember-cli-babel": "^7.23.1", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^5.3.1", + "ember-cli-htmlbars": "^5.3.2", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.25.0-beta.0", + "ember-data": "~3.25.0", "ember-export-application-global": "^2.0.1", - "ember-fetch": "^8.0.2", + "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-page-title": "^6.0.3", - "ember-qunit": "^5.1.1", + "ember-page-title": "^6.2.1", + "ember-qunit": "^5.1.2", "ember-resolver": "^8.0.2", - "ember-source": "~3.25.0-beta.1", - "ember-template-lint": "^2.15.0", + "ember-source": "~3.25.1", + "ember-template-lint": "^2.18.1", "ember-welcome-page": "^4.0.0", - "eslint": "^7.17.0", - "eslint-config-prettier": "^7.1.0", - "eslint-plugin-ember": "^10.1.1", + "eslint": "^7.20.0", + "eslint-config-prettier": "^7.2.0", + "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.13.0", + "qunit": "^2.14.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index 5b1ae5a6b9..360b38a288 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -24,10 +24,10 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.4", - "@embroider/compat": "^0.35.0", - "@embroider/core": "^0.35.0", - "@embroider/webpack": "^0.35.0", + "@ember/test-helpers": "^2.2.0", + "@embroider/compat": "^0.36.0", + "@embroider/core": "^0.36.0", + "@embroider/webpack": "^0.36.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", @@ -35,31 +35,31 @@ "ember-auto-import": "^1.10.1", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^4.0.0", - "ember-cli-babel": "^7.23.0", + "ember-cli-babel": "^7.23.1", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^5.3.1", + "ember-cli-htmlbars": "^5.3.2", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.25.0-beta.0", + "ember-data": "~3.25.0", "ember-export-application-global": "^2.0.1", - "ember-fetch": "^8.0.2", + "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-page-title": "^6.0.3", - "ember-qunit": "^5.1.1", + "ember-page-title": "^6.2.1", + "ember-qunit": "^5.1.2", "ember-resolver": "^8.0.2", - "ember-source": "~3.25.0-beta.1", - "ember-template-lint": "^2.15.0", - "eslint": "^7.17.0", - "eslint-config-prettier": "^7.1.0", - "eslint-plugin-ember": "^10.1.1", + "ember-source": "~3.25.1", + "ember-template-lint": "^2.18.1", + "eslint": "^7.20.0", + "eslint-config-prettier": "^7.2.0", + "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.13.0", + "qunit": "^2.14.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index 7b2aeafa93..6dd6df7924 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -24,10 +24,10 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.4", - "@embroider/compat": "^0.35.0", - "@embroider/core": "^0.35.0", - "@embroider/webpack": "^0.35.0", + "@ember/test-helpers": "^2.2.0", + "@embroider/compat": "^0.36.0", + "@embroider/core": "^0.36.0", + "@embroider/webpack": "^0.36.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", @@ -35,32 +35,32 @@ "ember-auto-import": "^1.10.1", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^4.0.0", - "ember-cli-babel": "^7.23.0", + "ember-cli-babel": "^7.23.1", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^5.3.1", + "ember-cli-htmlbars": "^5.3.2", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.25.0-beta.0", + "ember-data": "~3.25.0", "ember-export-application-global": "^2.0.1", - "ember-fetch": "^8.0.2", + "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-page-title": "^6.0.3", - "ember-qunit": "^5.1.1", + "ember-page-title": "^6.2.1", + "ember-qunit": "^5.1.2", "ember-resolver": "^8.0.2", - "ember-source": "~3.25.0-beta.1", - "ember-template-lint": "^2.15.0", + "ember-source": "~3.25.1", + "ember-template-lint": "^2.18.1", "ember-welcome-page": "^4.0.0", - "eslint": "^7.17.0", - "eslint-config-prettier": "^7.1.0", - "eslint-plugin-ember": "^10.1.1", + "eslint": "^7.20.0", + "eslint-config-prettier": "^7.2.0", + "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.13.0", + "qunit": "^2.14.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index a5539a283c..32f3610c9c 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -24,7 +24,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.4", + "@ember/test-helpers": "^2.2.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", @@ -32,31 +32,31 @@ "ember-auto-import": "^1.10.1", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^4.0.0", - "ember-cli-babel": "^7.23.0", + "ember-cli-babel": "^7.23.1", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^5.3.1", + "ember-cli-htmlbars": "^5.3.2", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.25.0-beta.0", + "ember-data": "~3.25.0", "ember-export-application-global": "^2.0.1", - "ember-fetch": "^8.0.2", + "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-page-title": "^6.0.3", - "ember-qunit": "^5.1.1", + "ember-page-title": "^6.2.1", + "ember-qunit": "^5.1.2", "ember-resolver": "^8.0.2", - "ember-source": "~3.25.0-beta.1", - "ember-template-lint": "^2.15.0", - "eslint": "^7.17.0", - "eslint-config-prettier": "^7.1.0", - "eslint-plugin-ember": "^10.1.1", + "ember-source": "~3.25.1", + "ember-template-lint": "^2.18.1", + "eslint": "^7.20.0", + "eslint-config-prettier": "^7.2.0", + "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.13.0", + "qunit": "^2.14.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 4f15688aba..487d7a3aed 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -24,7 +24,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.4", + "@ember/test-helpers": "^2.2.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", @@ -32,32 +32,32 @@ "ember-auto-import": "^1.10.1", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^4.0.0", - "ember-cli-babel": "^7.23.0", + "ember-cli-babel": "^7.23.1", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^5.3.1", + "ember-cli-htmlbars": "^5.3.2", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.25.0-beta.0", + "ember-data": "~3.25.0", "ember-export-application-global": "^2.0.1", - "ember-fetch": "^8.0.2", + "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-page-title": "^6.0.3", - "ember-qunit": "^5.1.1", + "ember-page-title": "^6.2.1", + "ember-qunit": "^5.1.2", "ember-resolver": "^8.0.2", - "ember-source": "~3.25.0-beta.1", - "ember-template-lint": "^2.15.0", + "ember-source": "~3.25.1", + "ember-template-lint": "^2.18.1", "ember-welcome-page": "^4.0.0", - "eslint": "^7.17.0", - "eslint-config-prettier": "^7.1.0", - "eslint-plugin-ember": "^10.1.1", + "eslint": "^7.20.0", + "eslint-config-prettier": "^7.2.0", + "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.13.0", + "qunit": "^2.14.0", "qunit-dom": "^1.6.0" }, "engines": { From f3807133cddc85ffa7bee8fbe61489101f52a6cc Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Tue, 16 Feb 2021 10:26:05 +0000 Subject: [PATCH 631/818] update changelog --- CHANGELOG.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86cd97d8da..bd82d966c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,21 +1,19 @@ # ember-cli Changelog - -## v3.25.0-beta.1 +## v3.25.0 #### Blueprint Changes -- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.24.0...v3.25.0-beta.1) -- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.24.0...v3.25.0-beta.1) +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.24.0...v3.25.0) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.24.0...v3.25.0) #### Changelog +- [#9450](https://github.com/ember-cli/ember-cli/pull/9450) update blueprint deps [@kellyselden](https://github.com/kellyselden) - Update `ember-data` and `ember-source` to 3.25.0-beta [@kellyselden](https://github.com/kellyselden) / [@rwjblue](https://github.com/rwjblue) - Thank you to all who took the time to contribute! - ## v3.24.0 #### Blueprint Changes From ff26a0aad0336b1e55a23b92f22a89213abfd322 Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Tue, 16 Feb 2021 10:32:47 +0000 Subject: [PATCH 632/818] Release 3.25.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ae030c1e8c..417d307d83 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.25.0-beta.1", + "version": "3.25.0", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From 6187b4c87deaac94a30dac25214d36dcbaab0095 Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Tue, 16 Feb 2021 12:18:37 +0000 Subject: [PATCH 633/818] update blueprint deps --- blueprints/app/files/package.json | 32 +++++++++---------- tests/fixtures/addon/defaults/package.json | 22 ++++++------- tests/fixtures/addon/yarn/package.json | 22 ++++++------- tests/fixtures/app/defaults/package.json | 26 +++++++-------- .../app/embroider-no-welcome/package.json | 32 +++++++++---------- tests/fixtures/app/embroider/package.json | 32 +++++++++---------- tests/fixtures/app/npm/package.json | 26 +++++++-------- tests/fixtures/app/yarn/package.json | 26 +++++++-------- 8 files changed, 109 insertions(+), 109 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 11ee0d2857..554e5bef61 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -24,10 +24,10 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.4<% if (embroider) { %>", - "@embroider/compat": "^0.35.0", - "@embroider/core": "^0.35.0", - "@embroider/webpack": "^0.35.0<% } %>", + "@ember/test-helpers": "^2.2.0<% if (embroider) { %>", + "@embroider/compat": "^0.36.0", + "@embroider/core": "^0.36.0", + "@embroider/webpack": "^0.36.0<% } %>", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", @@ -35,32 +35,32 @@ "ember-auto-import": "^1.10.1", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^4.0.0", - "ember-cli-babel": "^7.23.0", + "ember-cli-babel": "^7.23.1", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^5.3.1", + "ember-cli-htmlbars": "^5.3.2", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.25.0-beta.0", + "ember-data": "~3.26.0-beta.0", "ember-export-application-global": "^2.0.1", - "ember-fetch": "^8.0.2", + "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-page-title": "^6.0.3", - "ember-qunit": "^5.1.1", + "ember-page-title": "^6.2.1", + "ember-qunit": "^5.1.2", "ember-resolver": "^8.0.2", - "ember-source": "~3.25.0-beta.1", - "ember-template-lint": "^2.15.0<% if (welcome) { %>", + "ember-source": "~3.26.0-beta.2", + "ember-template-lint": "^2.18.1<% if (welcome) { %>", "ember-welcome-page": "^4.0.0<% } %>", - "eslint": "^7.17.0", - "eslint-config-prettier": "^7.1.0", - "eslint-plugin-ember": "^10.1.1", + "eslint": "^7.20.0", + "eslint-config-prettier": "^7.2.0", + "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.13.0", + "qunit": "^2.14.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index 78ebc0dcb0..91c8a0f74f 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -26,12 +26,12 @@ "test:ember-compatibility": "ember try:each" }, "dependencies": { - "ember-cli-babel": "^7.23.0", - "ember-cli-htmlbars": "^5.3.1" + "ember-cli-babel": "^7.23.1", + "ember-cli-htmlbars": "^5.3.2" }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.4", + "@ember/test-helpers": "^2.2.0", "@embroider/test-setup": "^0.36.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", @@ -47,22 +47,22 @@ "ember-export-application-global": "^2.0.1", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-page-title": "^6.0.3", - "ember-qunit": "^5.1.1", + "ember-page-title": "^6.2.1", + "ember-qunit": "^5.1.2", "ember-resolver": "^8.0.2", - "ember-source": "~3.25.0-beta.1", + "ember-source": "~3.26.0-beta.2", "ember-source-channel-url": "^3.0.0", - "ember-template-lint": "^2.15.0", + "ember-template-lint": "^2.18.1", "ember-try": "^1.4.0", - "eslint": "^7.17.0", - "eslint-config-prettier": "^7.1.0", - "eslint-plugin-ember": "^10.1.1", + "eslint": "^7.20.0", + "eslint-config-prettier": "^7.2.0", + "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.13.0", + "qunit": "^2.14.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 4e899b6671..81c1a0c2f8 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -26,12 +26,12 @@ "test:ember-compatibility": "ember try:each" }, "dependencies": { - "ember-cli-babel": "^7.23.0", - "ember-cli-htmlbars": "^5.3.1" + "ember-cli-babel": "^7.23.1", + "ember-cli-htmlbars": "^5.3.2" }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.4", + "@ember/test-helpers": "^2.2.0", "@embroider/test-setup": "^0.36.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", @@ -47,23 +47,23 @@ "ember-export-application-global": "^2.0.1", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-page-title": "^6.0.3", - "ember-qunit": "^5.1.1", + "ember-page-title": "^6.2.1", + "ember-qunit": "^5.1.2", "ember-resolver": "^8.0.2", - "ember-source": "~3.25.0-beta.1", + "ember-source": "~3.26.0-beta.2", "ember-source-channel-url": "^3.0.0", - "ember-template-lint": "^2.15.0", + "ember-template-lint": "^2.18.1", "ember-try": "^1.4.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.17.0", - "eslint-config-prettier": "^7.1.0", - "eslint-plugin-ember": "^10.1.1", + "eslint": "^7.20.0", + "eslint-config-prettier": "^7.2.0", + "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.13.0", + "qunit": "^2.14.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index 4f15688aba..887ab0ad51 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -24,7 +24,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.4", + "@ember/test-helpers": "^2.2.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", @@ -32,32 +32,32 @@ "ember-auto-import": "^1.10.1", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^4.0.0", - "ember-cli-babel": "^7.23.0", + "ember-cli-babel": "^7.23.1", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^5.3.1", + "ember-cli-htmlbars": "^5.3.2", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.25.0-beta.0", + "ember-data": "~3.26.0-beta.0", "ember-export-application-global": "^2.0.1", - "ember-fetch": "^8.0.2", + "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-page-title": "^6.0.3", - "ember-qunit": "^5.1.1", + "ember-page-title": "^6.2.1", + "ember-qunit": "^5.1.2", "ember-resolver": "^8.0.2", - "ember-source": "~3.25.0-beta.1", - "ember-template-lint": "^2.15.0", + "ember-source": "~3.26.0-beta.2", + "ember-template-lint": "^2.18.1", "ember-welcome-page": "^4.0.0", - "eslint": "^7.17.0", - "eslint-config-prettier": "^7.1.0", - "eslint-plugin-ember": "^10.1.1", + "eslint": "^7.20.0", + "eslint-config-prettier": "^7.2.0", + "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.13.0", + "qunit": "^2.14.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index 5b1ae5a6b9..3cf50a417f 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -24,10 +24,10 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.4", - "@embroider/compat": "^0.35.0", - "@embroider/core": "^0.35.0", - "@embroider/webpack": "^0.35.0", + "@ember/test-helpers": "^2.2.0", + "@embroider/compat": "^0.36.0", + "@embroider/core": "^0.36.0", + "@embroider/webpack": "^0.36.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", @@ -35,31 +35,31 @@ "ember-auto-import": "^1.10.1", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^4.0.0", - "ember-cli-babel": "^7.23.0", + "ember-cli-babel": "^7.23.1", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^5.3.1", + "ember-cli-htmlbars": "^5.3.2", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.25.0-beta.0", + "ember-data": "~3.26.0-beta.0", "ember-export-application-global": "^2.0.1", - "ember-fetch": "^8.0.2", + "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-page-title": "^6.0.3", - "ember-qunit": "^5.1.1", + "ember-page-title": "^6.2.1", + "ember-qunit": "^5.1.2", "ember-resolver": "^8.0.2", - "ember-source": "~3.25.0-beta.1", - "ember-template-lint": "^2.15.0", - "eslint": "^7.17.0", - "eslint-config-prettier": "^7.1.0", - "eslint-plugin-ember": "^10.1.1", + "ember-source": "~3.26.0-beta.2", + "ember-template-lint": "^2.18.1", + "eslint": "^7.20.0", + "eslint-config-prettier": "^7.2.0", + "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.13.0", + "qunit": "^2.14.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index 7b2aeafa93..d6b5de43dd 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -24,10 +24,10 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.4", - "@embroider/compat": "^0.35.0", - "@embroider/core": "^0.35.0", - "@embroider/webpack": "^0.35.0", + "@ember/test-helpers": "^2.2.0", + "@embroider/compat": "^0.36.0", + "@embroider/core": "^0.36.0", + "@embroider/webpack": "^0.36.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", @@ -35,32 +35,32 @@ "ember-auto-import": "^1.10.1", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^4.0.0", - "ember-cli-babel": "^7.23.0", + "ember-cli-babel": "^7.23.1", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^5.3.1", + "ember-cli-htmlbars": "^5.3.2", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.25.0-beta.0", + "ember-data": "~3.26.0-beta.0", "ember-export-application-global": "^2.0.1", - "ember-fetch": "^8.0.2", + "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-page-title": "^6.0.3", - "ember-qunit": "^5.1.1", + "ember-page-title": "^6.2.1", + "ember-qunit": "^5.1.2", "ember-resolver": "^8.0.2", - "ember-source": "~3.25.0-beta.1", - "ember-template-lint": "^2.15.0", + "ember-source": "~3.26.0-beta.2", + "ember-template-lint": "^2.18.1", "ember-welcome-page": "^4.0.0", - "eslint": "^7.17.0", - "eslint-config-prettier": "^7.1.0", - "eslint-plugin-ember": "^10.1.1", + "eslint": "^7.20.0", + "eslint-config-prettier": "^7.2.0", + "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.13.0", + "qunit": "^2.14.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index a5539a283c..72aa9fd392 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -24,7 +24,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.4", + "@ember/test-helpers": "^2.2.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", @@ -32,31 +32,31 @@ "ember-auto-import": "^1.10.1", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^4.0.0", - "ember-cli-babel": "^7.23.0", + "ember-cli-babel": "^7.23.1", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^5.3.1", + "ember-cli-htmlbars": "^5.3.2", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.25.0-beta.0", + "ember-data": "~3.26.0-beta.0", "ember-export-application-global": "^2.0.1", - "ember-fetch": "^8.0.2", + "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-page-title": "^6.0.3", - "ember-qunit": "^5.1.1", + "ember-page-title": "^6.2.1", + "ember-qunit": "^5.1.2", "ember-resolver": "^8.0.2", - "ember-source": "~3.25.0-beta.1", - "ember-template-lint": "^2.15.0", - "eslint": "^7.17.0", - "eslint-config-prettier": "^7.1.0", - "eslint-plugin-ember": "^10.1.1", + "ember-source": "~3.26.0-beta.2", + "ember-template-lint": "^2.18.1", + "eslint": "^7.20.0", + "eslint-config-prettier": "^7.2.0", + "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.13.0", + "qunit": "^2.14.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 4f15688aba..887ab0ad51 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -24,7 +24,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.1.4", + "@ember/test-helpers": "^2.2.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", @@ -32,32 +32,32 @@ "ember-auto-import": "^1.10.1", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^4.0.0", - "ember-cli-babel": "^7.23.0", + "ember-cli-babel": "^7.23.1", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^5.3.1", + "ember-cli-htmlbars": "^5.3.2", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.25.0-beta.0", + "ember-data": "~3.26.0-beta.0", "ember-export-application-global": "^2.0.1", - "ember-fetch": "^8.0.2", + "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-page-title": "^6.0.3", - "ember-qunit": "^5.1.1", + "ember-page-title": "^6.2.1", + "ember-qunit": "^5.1.2", "ember-resolver": "^8.0.2", - "ember-source": "~3.25.0-beta.1", - "ember-template-lint": "^2.15.0", + "ember-source": "~3.26.0-beta.2", + "ember-template-lint": "^2.18.1", "ember-welcome-page": "^4.0.0", - "eslint": "^7.17.0", - "eslint-config-prettier": "^7.1.0", - "eslint-plugin-ember": "^10.1.1", + "eslint": "^7.20.0", + "eslint-config-prettier": "^7.2.0", + "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.13.0", + "qunit": "^2.14.0", "qunit-dom": "^1.6.0" }, "engines": { From 9e8d4183ac6ac92c2d0274b04338d7b8e296b9ed Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Tue, 16 Feb 2021 13:41:42 +0000 Subject: [PATCH 634/818] update changelog --- CHANGELOG.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd82d966c2..1ffa5218f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # ember-cli Changelog +## v3.26.0-beta.0 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.25.0...v3.26.0-beta.0) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.25.0...v3.26.0-beta.0) + +#### Changelog + +- [#9437](https://github.com/ember-cli/ember-cli/pull/9437) Add Prettier files to ".npmignore" file in addon blueprint [@bertdeblock](https://github.com/bertdeblock) +- [#9436](https://github.com/ember-cli/ember-cli/pull/9436) Enable Embroider test scenario for addons [@thoov](https://github.com/thoov) +- [#9435](https://github.com/ember-cli/ember-cli/pull/9435) Use "lint:fix" script in app and addon README files [@bertdeblock](https://github.com/bertdeblock) +- [#9451](https://github.com/ember-cli/ember-cli/pull/9451) update blueprint deps [@kellyselden](https://github.com/kellyselden) + +Thank you to all who took the time to contribute! + ## v3.25.0 #### Blueprint Changes From b2d28439dbac04351c5b761281368f4575e1f66f Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Tue, 16 Feb 2021 13:42:57 +0000 Subject: [PATCH 635/818] Release 3.26.0-beta.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f834a7b11d..5cf753c650 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.25.0", + "version": "3.26.0-beta.0", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From 37e23ee5380d949c0c6f98c39b6d9e7107e85757 Mon Sep 17 00:00:00 2001 From: Bert De Block Date: Mon, 22 Feb 2021 10:53:14 +0100 Subject: [PATCH 636/818] Prevent yarn-error.log files being published for addons --- blueprints/addon/files/npmignore | 1 + 1 file changed, 1 insertion(+) diff --git a/blueprints/addon/files/npmignore b/blueprints/addon/files/npmignore index 1556c4d3c1..f30effe9bf 100644 --- a/blueprints/addon/files/npmignore +++ b/blueprints/addon/files/npmignore @@ -26,6 +26,7 @@ /ember-cli-build.js /testem.js /tests/ +/yarn-error.log /yarn.lock .gitkeep From 1de331bcb23cc9bfc16d355802b42e4154da8871 Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Tue, 23 Feb 2021 14:53:10 -0800 Subject: [PATCH 637/818] Add --embroider as an option Enables --embroider along with EMBER_CLI_EMBROIDER to default the build to embroider. --- blueprints/app/index.js | 2 +- lib/commands/init.js | 1 + lib/commands/new.js | 1 + tests/acceptance/new-test.js | 9 +++++++++ tests/fixtures/help/help-with-addon.txt | 2 ++ tests/fixtures/help/help.js | 12 ++++++++++++ tests/fixtures/help/help.txt | 2 ++ tests/fixtures/help/with-addon-blueprints.js | 12 ++++++++++++ tests/fixtures/help/with-addon-commands.js | 12 ++++++++++++ 9 files changed, 52 insertions(+), 1 deletion(-) diff --git a/blueprints/app/index.js b/blueprints/app/index.js index f6a23c38aa..c54ba79881 100644 --- a/blueprints/app/index.js +++ b/blueprints/app/index.js @@ -43,7 +43,7 @@ module.exports = { welcome: options.welcome, blueprint: 'app', blueprintOptions, - embroider: isExperimentEnabled('EMBROIDER'), + embroider: isExperimentEnabled('EMBROIDER') || options.embroider, lang: options.lang, }; }, diff --git a/lib/commands/init.js b/lib/commands/init.js index acc03bb6ff..66e504d42d 100644 --- a/lib/commands/init.js +++ b/lib/commands/init.js @@ -35,6 +35,7 @@ module.exports = Command.extend({ type: String, description: 'Sets the base human language of the application via index.html', }, + { name: 'embroider', type: Boolean, default: false }, ], anonymousOptions: [''], diff --git a/lib/commands/new.js b/lib/commands/new.js index 4adf3150ce..2489ced90a 100644 --- a/lib/commands/new.js +++ b/lib/commands/new.js @@ -34,6 +34,7 @@ module.exports = Command.extend({ type: String, description: 'Sets the base human language of the application via index.html', }, + { name: 'embroider', type: Boolean, default: false }, ], anonymousOptions: [''], diff --git a/tests/acceptance/new-test.js b/tests/acceptance/new-test.js index 67917eac34..45f977ea8b 100644 --- a/tests/acceptance/new-test.js +++ b/tests/acceptance/new-test.js @@ -430,6 +430,15 @@ describe('Acceptance: ember new', function () { expect(pkgJson.devDependencies['@embroider/webpack']).to.exist; }); + it('embroider enabled with --embroider', async function () { + await ember(['new', 'foo', '--skip-npm', '--skip-git', '--skip-bower', '--embroider']); + + let pkgJson = fs.readJsonSync('package.json'); + expect(pkgJson.devDependencies['@embroider/compat']).to.exist; + expect(pkgJson.devDependencies['@embroider/core']).to.exist; + expect(pkgJson.devDependencies['@embroider/webpack']).to.exist; + }); + describe('verify fixtures', function () { function checkEslintConfig(fixturePath) { expect(file('.eslintrc.js')).to.equal(file(path.join(__dirname, '../fixtures', fixturePath, '.eslintrc.js'))); diff --git a/tests/fixtures/help/help-with-addon.txt b/tests/fixtures/help/help-with-addon.txt index 0c387d099b..310060a353 100644 --- a/tests/fixtures/help/help-with-addon.txt +++ b/tests/fixtures/help/help-with-addon.txt @@ -97,6 +97,7 @@ ember init   --name (String) (Default: "") aliases: -n  --lang (String) Sets the base human language of the application via index.html + --embroider (Boolean) (Default: false) ember install   Installs an ember-cli addon from npm. @@ -128,6 +129,7 @@ ember new   --directory (String) aliases: -dir  --lang (String) Sets the base human language of the application via index.html + --embroider (Boolean) (Default: false) ember serve  Builds and serves your app, rebuilding on file changes. diff --git a/tests/fixtures/help/help.js b/tests/fixtures/help/help.js index 64efe78cc3..dc63544c4f 100644 --- a/tests/fixtures/help/help.js +++ b/tests/fixtures/help/help.js @@ -427,6 +427,12 @@ module.exports = { key: 'lang', description: 'Sets the base human language of the application via index.html', required: false + }, + { + default: false, + key: 'embroider', + name: 'embroider', + required: false, } ], anonymousOptions: [''] @@ -538,6 +544,12 @@ module.exports = { key: 'lang', description: 'Sets the base human language of the application via index.html', required: false + }, + { + default: false, + key: 'embroider', + name: 'embroider', + required: false, } ], anonymousOptions: [''] diff --git a/tests/fixtures/help/help.txt b/tests/fixtures/help/help.txt index 9e36c58dfa..1191553d1c 100644 --- a/tests/fixtures/help/help.txt +++ b/tests/fixtures/help/help.txt @@ -97,6 +97,7 @@ ember init   --name (String) (Default: "") aliases: -n  --lang (String) Sets the base human language of the application via index.html + --embroider (Boolean) (Default: false) ember install   Installs an ember-cli addon from npm. @@ -128,6 +129,7 @@ ember new   --directory (String) aliases: -dir  --lang (String) Sets the base human language of the application via index.html + --embroider (Boolean) (Default: false) ember serve  Builds and serves your app, rebuilding on file changes. diff --git a/tests/fixtures/help/with-addon-blueprints.js b/tests/fixtures/help/with-addon-blueprints.js index b46d30700f..7a7b732eaa 100644 --- a/tests/fixtures/help/with-addon-blueprints.js +++ b/tests/fixtures/help/with-addon-blueprints.js @@ -459,6 +459,12 @@ module.exports = { key: 'lang', description: 'Sets the base human language of the application via index.html', required: false + }, + { + default: false, + key: 'embroider', + name: 'embroider', + required: false } ], anonymousOptions: [''] @@ -570,6 +576,12 @@ module.exports = { key: 'lang', description: 'Sets the base human language of the application via index.html', required: false + }, + { + default: false, + key: 'embroider', + name: 'embroider', + required: false } ], anonymousOptions: [''] diff --git a/tests/fixtures/help/with-addon-commands.js b/tests/fixtures/help/with-addon-commands.js index 692a95d7ba..efb9411ded 100644 --- a/tests/fixtures/help/with-addon-commands.js +++ b/tests/fixtures/help/with-addon-commands.js @@ -427,6 +427,12 @@ module.exports = { key: 'lang', description: 'Sets the base human language of the application via index.html', required: false + }, + { + default: false, + key: 'embroider', + name: 'embroider', + required: false } ], anonymousOptions: [''] @@ -538,6 +544,12 @@ module.exports = { key: 'lang', description: 'Sets the base human language of the application via index.html', required: false + }, + { + default: false, + key: 'embroider', + name: 'embroider', + required: false } ], anonymousOptions: [''] From a12253145550557743a3ba82d58011193e6375ac Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Tue, 23 Feb 2021 15:18:50 -0800 Subject: [PATCH 638/818] Move embroider experiment checks to each test As we work to enable each test to work under embroider moving the guards down a level will allow us to introduce smaller PRs enabling a few tests at a time. --- tests/acceptance/brocfile-smoke-test-slow.js | 78 ++++++++++++++++++- .../nested-addons-smoke-test-slow.js | 6 +- .../preprocessor-smoke-test-slow.js | 18 ++++- tests/acceptance/smoke-test-slow.js | 66 +++++++++++++++- 4 files changed, 156 insertions(+), 12 deletions(-) diff --git a/tests/acceptance/brocfile-smoke-test-slow.js b/tests/acceptance/brocfile-smoke-test-slow.js index 6bea490687..d4baf30447 100644 --- a/tests/acceptance/brocfile-smoke-test-slow.js +++ b/tests/acceptance/brocfile-smoke-test-slow.js @@ -24,9 +24,6 @@ describe('Acceptance: brocfile-smoke-test', function () { this.timeout(500000); before(function () { - if (isExperimentEnabled('EMBROIDER')) { - this.skip(); - } return createTestTargets(appName); }); @@ -43,6 +40,9 @@ describe('Acceptance: brocfile-smoke-test', function () { }); it('a custom EmberENV in config/environment.js is used for window.EmberENV', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('brocfile-tests/custom-ember-env'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -57,17 +57,26 @@ describe('Acceptance: brocfile-smoke-test', function () { }); it('a custom environment config can be used in Brocfile.js', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('brocfile-tests/custom-environment-config'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); }); it('without app/templates', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('brocfile-tests/pods-templates'); await fs.remove(path.join(process.cwd(), 'app/templates')); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); }); it('strips app/styles or app/templates from JS', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('brocfile-tests/styles-and-templates-stripped'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -80,6 +89,9 @@ describe('Acceptance: brocfile-smoke-test', function () { }); it('should throw if no build file is found', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } fs.removeSync('./ember-cli-build.js'); try { await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -89,6 +101,9 @@ describe('Acceptance: brocfile-smoke-test', function () { }); it('using autoRun: true', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('brocfile-tests/auto-run-true'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -99,6 +114,9 @@ describe('Acceptance: brocfile-smoke-test', function () { }); it('using autoRun: false', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('brocfile-tests/auto-run-false'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -110,6 +128,9 @@ describe('Acceptance: brocfile-smoke-test', function () { }); it('app.import works properly with test tree files', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('brocfile-tests/app-test-import'); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -127,6 +148,9 @@ describe('Acceptance: brocfile-smoke-test', function () { }); it('app.import works properly with non-js/css files', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('brocfile-tests/app-import'); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -144,6 +168,9 @@ describe('Acceptance: brocfile-smoke-test', function () { }); it('addons can have a public tree that is merged and returned namespaced by default', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('brocfile-tests/public-tree'); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -161,16 +188,25 @@ describe('Acceptance: brocfile-smoke-test', function () { }); it('using pods based templates', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('brocfile-tests/pods-templates'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); }); it('using pods based templates with a podModulePrefix', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('brocfile-tests/pods-with-prefix-templates'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); }); it('addon trees are not jshinted', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('brocfile-tests/jshint-addon'); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -188,6 +224,9 @@ describe('Acceptance: brocfile-smoke-test', function () { }); it('multiple css files in styles/ are output when a preprocessor is not used', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('brocfile-tests/multiple-css-files'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -201,6 +240,9 @@ describe('Acceptance: brocfile-smoke-test', function () { }); it('specifying custom output paths works properly', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('brocfile-tests/custom-output-paths'); let themeCSSPath = path.join(appRoot, 'app', 'styles', 'theme.css'); @@ -226,6 +268,9 @@ describe('Acceptance: brocfile-smoke-test', function () { }); it('specifying outputFile results in an explicitly generated assets', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('brocfile-tests/app-import-output-file'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -238,6 +283,9 @@ describe('Acceptance: brocfile-smoke-test', function () { }); it('can use transformation to turn anonymous AMD into named AMD', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('brocfile-tests/app-import-anonymous-amd'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -262,6 +310,9 @@ describe('Acceptance: brocfile-smoke-test', function () { }); it('can use transformation to turn named UMD into named AMD', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('brocfile-tests/app-import-named-umd'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -286,6 +337,9 @@ describe('Acceptance: brocfile-smoke-test', function () { }); it('can do amd transform from addon', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('brocfile-tests/app-import-custom-transform'); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -316,6 +370,9 @@ describe('Acceptance: brocfile-smoke-test', function () { }); it('can use transformation to turn library into custom transformation', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('brocfile-tests/app-import-custom-transform'); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -336,6 +393,9 @@ describe('Acceptance: brocfile-smoke-test', function () { // skipped because of potentially broken assertion that should be fixed correctly at a later point it.skip('specifying partial `outputPaths` hash deep merges options correctly', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('brocfile-tests/custom-output-paths'); let themeCSSPath = path.join(appRoot, 'app', 'styles', 'theme.css'); @@ -371,6 +431,9 @@ describe('Acceptance: brocfile-smoke-test', function () { }); it('multiple paths can be CSS preprocessed', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('brocfile-tests/multiple-sass-files'); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -389,12 +452,18 @@ describe('Acceptance: brocfile-smoke-test', function () { }); it('app.css is output to .css by default', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); expect(file(`dist/assets/${appName}.css`)).to.exist; }); // for backwards compat. it('app.scss is output to .css by default', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('brocfile-tests/multiple-sass-files'); let brocfilePath = path.join(appRoot, 'ember-cli-build.js'); @@ -416,6 +485,9 @@ describe('Acceptance: brocfile-smoke-test', function () { }); it('additional trees can be passed to the app', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('brocfile-tests/additional-trees'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', { verbose: true }); diff --git a/tests/acceptance/nested-addons-smoke-test-slow.js b/tests/acceptance/nested-addons-smoke-test-slow.js index 8b305bdacf..55ac4727e9 100644 --- a/tests/acceptance/nested-addons-smoke-test-slow.js +++ b/tests/acceptance/nested-addons-smoke-test-slow.js @@ -24,9 +24,6 @@ describe('Acceptance: nested-addons-smoke-test', function () { this.timeout(360000); before(function () { - if (isExperimentEnabled('EMBROIDER')) { - this.skip(); - } return createTestTargets(appName); }); @@ -43,6 +40,9 @@ describe('Acceptance: nested-addons-smoke-test', function () { }); it('addons with nested addons compile correctly', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('addon/with-nested-addons'); let packageJsonPath = path.join(appRoot, 'package.json'); diff --git a/tests/acceptance/preprocessor-smoke-test-slow.js b/tests/acceptance/preprocessor-smoke-test-slow.js index 528eae85e8..9ad0eb44e7 100644 --- a/tests/acceptance/preprocessor-smoke-test-slow.js +++ b/tests/acceptance/preprocessor-smoke-test-slow.js @@ -24,9 +24,6 @@ describe('Acceptance: preprocessor-smoke-test', function () { this.timeout(360000); before(function () { - if (isExperimentEnabled('EMBROIDER')) { - this.skip(); - } return createTestTargets(appName); }); @@ -43,6 +40,9 @@ describe('Acceptance: preprocessor-smoke-test', function () { }); it('addons with standard preprocessors compile correctly', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors`); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -58,6 +58,9 @@ describe('Acceptance: preprocessor-smoke-test', function () { }); it('addon registry entries are added in the proper order', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles(`preprocessor-tests/app-registry-ordering`); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -75,6 +78,9 @@ describe('Acceptance: preprocessor-smoke-test', function () { }); it('addons without preprocessors compile correctly', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles(`preprocessor-tests/app-with-addon-without-preprocessors`); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -97,6 +103,9 @@ describe('Acceptance: preprocessor-smoke-test', function () { |-- preprocessor should not apply to this */ it('addons depending on preprocessor addon preprocesses addon but not app', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors-2`); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -125,6 +134,9 @@ describe('Acceptance: preprocessor-smoke-test', function () { |-- preprocessor should not apply to this */ it('addon N levels deep depending on preprocessor preprocesses that parent addon only', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors-3`); let packageJsonPath = path.join(appRoot, 'package.json'); diff --git a/tests/acceptance/smoke-test-slow.js b/tests/acceptance/smoke-test-slow.js index 6c239fbc90..8440a9aceb 100644 --- a/tests/acceptance/smoke-test-slow.js +++ b/tests/acceptance/smoke-test-slow.js @@ -28,9 +28,6 @@ let appRoot; describe('Acceptance: smoke-test', function () { this.timeout(500000); before(function () { - if (isExperimentEnabled('EMBROIDER')) { - this.skip(); - } return createTestTargets(appName); }); @@ -48,10 +45,16 @@ describe('Acceptance: smoke-test', function () { }); it('ember new foo, clean from scratch', function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } return runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); }); it('ember new foo, make sure addon template overwrites', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await ember(['generate', 'template', 'foo']); await ember(['generate', 'in-repo-addon', 'my-addon']); @@ -78,6 +81,9 @@ describe('Acceptance: smoke-test', function () { }); it('ember test still runs when a JavaScript testem config exists', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('smoke-tests/js-testem-config'); let result = await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); @@ -90,6 +96,9 @@ describe('Acceptance: smoke-test', function () { }); it('eslint passes after running ember new', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } let result = await runCommand(path.join('.', 'node_modules', 'eslint', 'bin', 'eslint.js'), appRoot); let exitCode = result.code; @@ -103,6 +112,9 @@ describe('Acceptance: smoke-test', function () { // here is the error: // test-support-80f2fe63fae0c44478fe0f8af73200a7.js contains the fingerprint (2871106928f813936fdd64f4d16005ac): expected 'test-support-80f2fe63fae0c44478fe0f8af73200a7.js' to include '2871106928f813936fdd64f4d16005ac' it.skip('ember new foo, build production and verify fingerprint', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--environment=production'); let dirPath = path.join(appRoot, 'dist', 'assets'); @@ -132,6 +144,9 @@ describe('Acceptance: smoke-test', function () { }); it('ember test --environment=production', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('smoke-tests/passing-test'); let result = await runCommand( @@ -149,6 +164,9 @@ describe('Acceptance: smoke-test', function () { }); it('ember test --path with previous build', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } let originalWrite = process.stdout.write; let output = []; @@ -180,6 +198,9 @@ describe('Acceptance: smoke-test', function () { }); it('ember test wasm', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } let originalWrite = process.stdout.write; let output = []; @@ -211,6 +232,9 @@ describe('Acceptance: smoke-test', function () { }); it('ember new foo, build development, and verify generated files', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); let dirPath = path.join(appRoot, 'dist'); @@ -220,6 +244,9 @@ describe('Acceptance: smoke-test', function () { }); it('ember build exits with non-zero code when build fails', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } let appJsPath = path.join(appRoot, 'app', 'app.js'); let result = await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -235,6 +262,9 @@ describe('Acceptance: smoke-test', function () { }); it('ember build generates instrumentation files when viz is enabled', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } process.env.BROCCOLI_VIZ = '1'; try { @@ -263,6 +293,9 @@ describe('Acceptance: smoke-test', function () { }); it.skip('ember new foo, build --watch development, and verify rebuilt after change', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } let touched = false; let appJsPath = path.join(appRoot, 'app', 'app.js'); let builtJsPath = path.join(appRoot, 'dist', 'assets', 'some-cool-app.js'); @@ -292,6 +325,9 @@ describe('Acceptance: smoke-test', function () { }); it.skip('ember new foo, build --watch development, and verify rebuilt after multiple changes', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } let buildCount = 0; let touched = false; let appJsPath = path.join(appRoot, 'app', 'app.js'); @@ -334,6 +370,9 @@ describe('Acceptance: smoke-test', function () { }); it('build failures should be logged correctly', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } fs.writeFileSync( `${process.cwd()}/ember-cli-build.js`, ` @@ -373,6 +412,9 @@ module.exports = function() { }); it.skip('ember new foo, server, SIGINT clears tmp/', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } let result = await runCommand( path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'server', @@ -401,6 +443,9 @@ module.exports = function() { }); it('ember new foo, test, SIGINT exits with error and clears tmp/', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } let result = await expect( runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test', '--test-port=25522', { onOutput(string, child) { @@ -426,6 +471,9 @@ module.exports = function() { }); it('ember new foo, build production and verify css files are concatenated', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('with-styles'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--environment=production'); @@ -443,6 +491,9 @@ module.exports = function() { }); it('ember new foo, build production and verify css files are minified', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('with-unminified-styles'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--environment=production'); @@ -459,6 +510,9 @@ module.exports = function() { }); it('ember new foo, build production and verify single "use strict";', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--environment=production'); let dirPath = path.join(appRoot, 'dist', 'assets'); @@ -474,6 +528,9 @@ module.exports = function() { }); it('ember can override and reuse the built-in blueprints', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('addon/with-blueprint-override'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'generate', 'component', 'foo-bar'); @@ -485,6 +542,9 @@ module.exports = function() { }); it('template linting works properly for pods and classic structured templates', async function () { + if (isExperimentEnabled('EMBROIDER')) { + this.skip(); + } await copyFixtureFiles('smoke-tests/with-template-failing-linting'); let packageJsonPath = 'package.json'; From 89f18c095169b2e51f8a15b3577edcd06be94c7f Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Tue, 23 Feb 2021 17:37:33 -0800 Subject: [PATCH 639/818] adding description --- lib/commands/init.js | 2 +- lib/commands/new.js | 2 +- tests/fixtures/help/help-with-addon.txt | 4 ++-- tests/fixtures/help/help.js | 2 ++ tests/fixtures/help/help.txt | 4 ++-- tests/fixtures/help/with-addon-blueprints.js | 2 ++ tests/fixtures/help/with-addon-commands.js | 2 ++ 7 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/commands/init.js b/lib/commands/init.js index 66e504d42d..121256cd2f 100644 --- a/lib/commands/init.js +++ b/lib/commands/init.js @@ -35,7 +35,7 @@ module.exports = Command.extend({ type: String, description: 'Sets the base human language of the application via index.html', }, - { name: 'embroider', type: Boolean, default: false }, + { name: 'embroider', type: Boolean, default: false, description: 'Enables the build system to use Embroider' }, ], anonymousOptions: [''], diff --git a/lib/commands/new.js b/lib/commands/new.js index 2489ced90a..148c43df04 100644 --- a/lib/commands/new.js +++ b/lib/commands/new.js @@ -34,7 +34,7 @@ module.exports = Command.extend({ type: String, description: 'Sets the base human language of the application via index.html', }, - { name: 'embroider', type: Boolean, default: false }, + { name: 'embroider', type: Boolean, default: false, description: 'Enables the build system to use Embroider' }, ], anonymousOptions: [''], diff --git a/tests/fixtures/help/help-with-addon.txt b/tests/fixtures/help/help-with-addon.txt index 310060a353..691f6328be 100644 --- a/tests/fixtures/help/help-with-addon.txt +++ b/tests/fixtures/help/help-with-addon.txt @@ -97,7 +97,7 @@ ember init   --name (String) (Default: "") aliases: -n  --lang (String) Sets the base human language of the application via index.html - --embroider (Boolean) (Default: false) + --embroider (Boolean) (Default: false) Enables the build system to use Embroider ember install   Installs an ember-cli addon from npm. @@ -129,7 +129,7 @@ ember new   --directory (String) aliases: -dir  --lang (String) Sets the base human language of the application via index.html - --embroider (Boolean) (Default: false) + --embroider (Boolean) (Default: false) Enables the build system to use Embroider ember serve  Builds and serves your app, rebuilding on file changes. diff --git a/tests/fixtures/help/help.js b/tests/fixtures/help/help.js index dc63544c4f..ce6ef34eb2 100644 --- a/tests/fixtures/help/help.js +++ b/tests/fixtures/help/help.js @@ -432,6 +432,7 @@ module.exports = { default: false, key: 'embroider', name: 'embroider', + description: 'Enables the build system to use Embroider', required: false, } ], @@ -549,6 +550,7 @@ module.exports = { default: false, key: 'embroider', name: 'embroider', + description: 'Enables the build system to use Embroider', required: false, } ], diff --git a/tests/fixtures/help/help.txt b/tests/fixtures/help/help.txt index 1191553d1c..ced81391cd 100644 --- a/tests/fixtures/help/help.txt +++ b/tests/fixtures/help/help.txt @@ -97,7 +97,7 @@ ember init   --name (String) (Default: "") aliases: -n  --lang (String) Sets the base human language of the application via index.html - --embroider (Boolean) (Default: false) + --embroider (Boolean) (Default: false) Enables the build system to use Embroider ember install   Installs an ember-cli addon from npm. @@ -129,7 +129,7 @@ ember new   --directory (String) aliases: -dir  --lang (String) Sets the base human language of the application via index.html - --embroider (Boolean) (Default: false) + --embroider (Boolean) (Default: false) Enables the build system to use Embroider ember serve  Builds and serves your app, rebuilding on file changes. diff --git a/tests/fixtures/help/with-addon-blueprints.js b/tests/fixtures/help/with-addon-blueprints.js index 7a7b732eaa..a2ab7ebf03 100644 --- a/tests/fixtures/help/with-addon-blueprints.js +++ b/tests/fixtures/help/with-addon-blueprints.js @@ -464,6 +464,7 @@ module.exports = { default: false, key: 'embroider', name: 'embroider', + description: 'Enables the build system to use Embroider', required: false } ], @@ -581,6 +582,7 @@ module.exports = { default: false, key: 'embroider', name: 'embroider', + description: 'Enables the build system to use Embroider', required: false } ], diff --git a/tests/fixtures/help/with-addon-commands.js b/tests/fixtures/help/with-addon-commands.js index efb9411ded..80b80c80d8 100644 --- a/tests/fixtures/help/with-addon-commands.js +++ b/tests/fixtures/help/with-addon-commands.js @@ -432,6 +432,7 @@ module.exports = { default: false, key: 'embroider', name: 'embroider', + description: 'Enables the build system to use Embroider', required: false } ], @@ -549,6 +550,7 @@ module.exports = { default: false, key: 'embroider', name: 'embroider', + description: 'Enables the build system to use Embroider', required: false } ], From e4d82c897cfb34a5757be6b72cf28a42430a0701 Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Tue, 23 Feb 2021 17:44:22 -0800 Subject: [PATCH 640/818] add return statement --- tests/acceptance/brocfile-smoke-test-slow.js | 50 +++++++++---------- .../nested-addons-smoke-test-slow.js | 2 +- .../preprocessor-smoke-test-slow.js | 10 ++-- tests/acceptance/smoke-test-slow.js | 42 ++++++++-------- 4 files changed, 52 insertions(+), 52 deletions(-) diff --git a/tests/acceptance/brocfile-smoke-test-slow.js b/tests/acceptance/brocfile-smoke-test-slow.js index d4baf30447..ded8ab18d9 100644 --- a/tests/acceptance/brocfile-smoke-test-slow.js +++ b/tests/acceptance/brocfile-smoke-test-slow.js @@ -41,7 +41,7 @@ describe('Acceptance: brocfile-smoke-test', function () { it('a custom EmberENV in config/environment.js is used for window.EmberENV', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('brocfile-tests/custom-ember-env'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -58,7 +58,7 @@ describe('Acceptance: brocfile-smoke-test', function () { it('a custom environment config can be used in Brocfile.js', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('brocfile-tests/custom-environment-config'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); @@ -66,7 +66,7 @@ describe('Acceptance: brocfile-smoke-test', function () { it('without app/templates', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('brocfile-tests/pods-templates'); await fs.remove(path.join(process.cwd(), 'app/templates')); @@ -75,7 +75,7 @@ describe('Acceptance: brocfile-smoke-test', function () { it('strips app/styles or app/templates from JS', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('brocfile-tests/styles-and-templates-stripped'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -90,7 +90,7 @@ describe('Acceptance: brocfile-smoke-test', function () { it('should throw if no build file is found', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } fs.removeSync('./ember-cli-build.js'); try { @@ -102,7 +102,7 @@ describe('Acceptance: brocfile-smoke-test', function () { it('using autoRun: true', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('brocfile-tests/auto-run-true'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -115,7 +115,7 @@ describe('Acceptance: brocfile-smoke-test', function () { it('using autoRun: false', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('brocfile-tests/auto-run-false'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -129,7 +129,7 @@ describe('Acceptance: brocfile-smoke-test', function () { it('app.import works properly with test tree files', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('brocfile-tests/app-test-import'); @@ -149,7 +149,7 @@ describe('Acceptance: brocfile-smoke-test', function () { it('app.import works properly with non-js/css files', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('brocfile-tests/app-import'); @@ -169,7 +169,7 @@ describe('Acceptance: brocfile-smoke-test', function () { it('addons can have a public tree that is merged and returned namespaced by default', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('brocfile-tests/public-tree'); @@ -189,7 +189,7 @@ describe('Acceptance: brocfile-smoke-test', function () { it('using pods based templates', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('brocfile-tests/pods-templates'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); @@ -197,7 +197,7 @@ describe('Acceptance: brocfile-smoke-test', function () { it('using pods based templates with a podModulePrefix', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('brocfile-tests/pods-with-prefix-templates'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); @@ -205,7 +205,7 @@ describe('Acceptance: brocfile-smoke-test', function () { it('addon trees are not jshinted', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('brocfile-tests/jshint-addon'); @@ -225,7 +225,7 @@ describe('Acceptance: brocfile-smoke-test', function () { it('multiple css files in styles/ are output when a preprocessor is not used', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('brocfile-tests/multiple-css-files'); @@ -241,7 +241,7 @@ describe('Acceptance: brocfile-smoke-test', function () { it('specifying custom output paths works properly', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('brocfile-tests/custom-output-paths'); @@ -269,7 +269,7 @@ describe('Acceptance: brocfile-smoke-test', function () { it('specifying outputFile results in an explicitly generated assets', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('brocfile-tests/app-import-output-file'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -284,7 +284,7 @@ describe('Acceptance: brocfile-smoke-test', function () { it('can use transformation to turn anonymous AMD into named AMD', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('brocfile-tests/app-import-anonymous-amd'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -311,7 +311,7 @@ describe('Acceptance: brocfile-smoke-test', function () { it('can use transformation to turn named UMD into named AMD', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('brocfile-tests/app-import-named-umd'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -338,7 +338,7 @@ describe('Acceptance: brocfile-smoke-test', function () { it('can do amd transform from addon', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('brocfile-tests/app-import-custom-transform'); @@ -371,7 +371,7 @@ describe('Acceptance: brocfile-smoke-test', function () { it('can use transformation to turn library into custom transformation', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('brocfile-tests/app-import-custom-transform'); @@ -394,7 +394,7 @@ describe('Acceptance: brocfile-smoke-test', function () { // skipped because of potentially broken assertion that should be fixed correctly at a later point it.skip('specifying partial `outputPaths` hash deep merges options correctly', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('brocfile-tests/custom-output-paths'); @@ -432,7 +432,7 @@ describe('Acceptance: brocfile-smoke-test', function () { it('multiple paths can be CSS preprocessed', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('brocfile-tests/multiple-sass-files'); @@ -453,7 +453,7 @@ describe('Acceptance: brocfile-smoke-test', function () { it('app.css is output to .css by default', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); expect(file(`dist/assets/${appName}.css`)).to.exist; @@ -462,7 +462,7 @@ describe('Acceptance: brocfile-smoke-test', function () { // for backwards compat. it('app.scss is output to .css by default', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('brocfile-tests/multiple-sass-files'); @@ -486,7 +486,7 @@ describe('Acceptance: brocfile-smoke-test', function () { it('additional trees can be passed to the app', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('brocfile-tests/additional-trees'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', { verbose: true }); diff --git a/tests/acceptance/nested-addons-smoke-test-slow.js b/tests/acceptance/nested-addons-smoke-test-slow.js index 55ac4727e9..b114f842cb 100644 --- a/tests/acceptance/nested-addons-smoke-test-slow.js +++ b/tests/acceptance/nested-addons-smoke-test-slow.js @@ -41,7 +41,7 @@ describe('Acceptance: nested-addons-smoke-test', function () { it('addons with nested addons compile correctly', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('addon/with-nested-addons'); diff --git a/tests/acceptance/preprocessor-smoke-test-slow.js b/tests/acceptance/preprocessor-smoke-test-slow.js index 9ad0eb44e7..743a8dbd46 100644 --- a/tests/acceptance/preprocessor-smoke-test-slow.js +++ b/tests/acceptance/preprocessor-smoke-test-slow.js @@ -41,7 +41,7 @@ describe('Acceptance: preprocessor-smoke-test', function () { it('addons with standard preprocessors compile correctly', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors`); @@ -59,7 +59,7 @@ describe('Acceptance: preprocessor-smoke-test', function () { it('addon registry entries are added in the proper order', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles(`preprocessor-tests/app-registry-ordering`); @@ -79,7 +79,7 @@ describe('Acceptance: preprocessor-smoke-test', function () { it('addons without preprocessors compile correctly', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles(`preprocessor-tests/app-with-addon-without-preprocessors`); @@ -104,7 +104,7 @@ describe('Acceptance: preprocessor-smoke-test', function () { */ it('addons depending on preprocessor addon preprocesses addon but not app', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors-2`); @@ -135,7 +135,7 @@ describe('Acceptance: preprocessor-smoke-test', function () { */ it('addon N levels deep depending on preprocessor preprocesses that parent addon only', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors-3`); diff --git a/tests/acceptance/smoke-test-slow.js b/tests/acceptance/smoke-test-slow.js index 8440a9aceb..b25309c57d 100644 --- a/tests/acceptance/smoke-test-slow.js +++ b/tests/acceptance/smoke-test-slow.js @@ -46,14 +46,14 @@ describe('Acceptance: smoke-test', function () { it('ember new foo, clean from scratch', function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } return runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); }); it('ember new foo, make sure addon template overwrites', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await ember(['generate', 'template', 'foo']); await ember(['generate', 'in-repo-addon', 'my-addon']); @@ -82,7 +82,7 @@ describe('Acceptance: smoke-test', function () { it('ember test still runs when a JavaScript testem config exists', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('smoke-tests/js-testem-config'); @@ -97,7 +97,7 @@ describe('Acceptance: smoke-test', function () { it('eslint passes after running ember new', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } let result = await runCommand(path.join('.', 'node_modules', 'eslint', 'bin', 'eslint.js'), appRoot); @@ -113,7 +113,7 @@ describe('Acceptance: smoke-test', function () { // test-support-80f2fe63fae0c44478fe0f8af73200a7.js contains the fingerprint (2871106928f813936fdd64f4d16005ac): expected 'test-support-80f2fe63fae0c44478fe0f8af73200a7.js' to include '2871106928f813936fdd64f4d16005ac' it.skip('ember new foo, build production and verify fingerprint', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--environment=production'); @@ -145,7 +145,7 @@ describe('Acceptance: smoke-test', function () { it('ember test --environment=production', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('smoke-tests/passing-test'); @@ -165,7 +165,7 @@ describe('Acceptance: smoke-test', function () { it('ember test --path with previous build', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } let originalWrite = process.stdout.write; let output = []; @@ -199,7 +199,7 @@ describe('Acceptance: smoke-test', function () { it('ember test wasm', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } let originalWrite = process.stdout.write; let output = []; @@ -233,7 +233,7 @@ describe('Acceptance: smoke-test', function () { it('ember new foo, build development, and verify generated files', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -245,7 +245,7 @@ describe('Acceptance: smoke-test', function () { it('ember build exits with non-zero code when build fails', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } let appJsPath = path.join(appRoot, 'app', 'app.js'); @@ -263,7 +263,7 @@ describe('Acceptance: smoke-test', function () { it('ember build generates instrumentation files when viz is enabled', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } process.env.BROCCOLI_VIZ = '1'; @@ -294,7 +294,7 @@ describe('Acceptance: smoke-test', function () { it.skip('ember new foo, build --watch development, and verify rebuilt after change', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } let touched = false; let appJsPath = path.join(appRoot, 'app', 'app.js'); @@ -326,7 +326,7 @@ describe('Acceptance: smoke-test', function () { it.skip('ember new foo, build --watch development, and verify rebuilt after multiple changes', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } let buildCount = 0; let touched = false; @@ -371,7 +371,7 @@ describe('Acceptance: smoke-test', function () { it('build failures should be logged correctly', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } fs.writeFileSync( `${process.cwd()}/ember-cli-build.js`, @@ -413,7 +413,7 @@ module.exports = function() { it.skip('ember new foo, server, SIGINT clears tmp/', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } let result = await runCommand( path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), @@ -444,7 +444,7 @@ module.exports = function() { it('ember new foo, test, SIGINT exits with error and clears tmp/', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } let result = await expect( runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test', '--test-port=25522', { @@ -472,7 +472,7 @@ module.exports = function() { it('ember new foo, build production and verify css files are concatenated', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('with-styles'); @@ -492,7 +492,7 @@ module.exports = function() { it('ember new foo, build production and verify css files are minified', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('with-unminified-styles'); @@ -511,7 +511,7 @@ module.exports = function() { it('ember new foo, build production and verify single "use strict";', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--environment=production'); @@ -529,7 +529,7 @@ module.exports = function() { it('ember can override and reuse the built-in blueprints', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('addon/with-blueprint-override'); @@ -543,7 +543,7 @@ module.exports = function() { it('template linting works properly for pods and classic structured templates', async function () { if (isExperimentEnabled('EMBROIDER')) { - this.skip(); + return this.skip(); } await copyFixtureFiles('smoke-tests/with-template-failing-linting'); From 3013ce056fb64ebbb24e19de522cfb347bfd6286 Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Wed, 24 Feb 2021 05:02:22 +0000 Subject: [PATCH 641/818] retrigger actions From 603fc6a409e0f5ce5db890dc7cb26cc2dfdf6347 Mon Sep 17 00:00:00 2001 From: Godfrey Chan Date: Tue, 23 Feb 2021 23:17:44 -0800 Subject: [PATCH 642/818] Add `.*/` to eslint ignore `!.*` was added to ensure js-based config files are linted (#8070) However, this was probably too broad. An unintended consequence of that change was that the `.git` directory is now linted by eslint. The easiest way to observe this is to create a branch with `.js` in the name: ```shell git checkout -b "foo.js" yarn lint:js ``` This will now error since git created a file called `foo.js` in `.git` to maintain the metadata for this branch, but the file does not contain valid JavaScript. In addition to these error scenarios, it causes unnecessary file scans. There are probably other caches by other tools other than git that could cause problems here as well. --- blueprints/app/files/.eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/blueprints/app/files/.eslintignore b/blueprints/app/files/.eslintignore index 9221655522..701947ed3a 100644 --- a/blueprints/app/files/.eslintignore +++ b/blueprints/app/files/.eslintignore @@ -13,6 +13,7 @@ # misc /coverage/ !.* +.*/ .eslintcache # ember-try From 2b2c0383989076856cb958cd760d95cd74f595af Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 24 Feb 2021 21:08:05 +0000 Subject: [PATCH 643/818] Bump supertest from 5.0.0 to 6.1.3 (#9440) --- package.json | 2 +- yarn.lock | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 5cf753c650..99adabe12e 100644 --- a/package.json +++ b/package.json @@ -155,7 +155,7 @@ "release-it": "^14.2.2", "rimraf": "^3.0.2", "strip-ansi": "^6.0.0", - "supertest": "^5.0.0", + "supertest": "^6.1.3", "testdouble": "^3.16.1", "tmp": "^0.2.1", "websocket": "^1.0.32", diff --git a/yarn.lock b/yarn.lock index 53bfdb0ef6..e82c637229 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5108,7 +5108,7 @@ merge2@^1.2.3, merge2@^1.3.0: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.3.0.tgz#5b366ee83b2f1582c48f87e47cf1a9352103ca81" integrity sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw== -methods@1.1.2, methods@^1.1.2, methods@~1.1.2: +methods@^1.1.2, methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= @@ -7075,7 +7075,7 @@ sum-up@^1.0.1: dependencies: chalk "^1.0.0" -superagent@6.1.0: +superagent@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/superagent/-/superagent-6.1.0.tgz#09f08807bc41108ef164cfb4be293cebd480f4a6" integrity sha512-OUDHEssirmplo3F+1HWKUrUjvnQuA+nZI6i/JJBdXb5eq9IyEQwPyPpqND+SSsxf6TygpBEkUjISVRN4/VOpeg== @@ -7092,13 +7092,13 @@ superagent@6.1.0: readable-stream "^3.6.0" semver "^7.3.2" -supertest@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/supertest/-/supertest-5.0.0.tgz#771aedfeb0a95466cc5d100d5d11288736fd25da" - integrity sha512-2JAWpPrUOZF4hHH5ZTCN2xjKXvJS3AEwPNXl0HUseHsfcXFvMy9kcsufIHCNAmQ5hlGCvgeAqaR5PBEouN3hlQ== +supertest@^6.1.3: + version "6.1.3" + resolved "https://registry.yarnpkg.com/supertest/-/supertest-6.1.3.tgz#3f49ea964514c206c334073e8dc4e70519c7403f" + integrity sha512-v2NVRyP73XDewKb65adz+yug1XMtmvij63qIWHZzSX8tp6wiq6xBLUy4SUAd2NII6wIipOmHT/FD9eicpJwdgQ== dependencies: - methods "1.1.2" - superagent "6.1.0" + methods "^1.1.2" + superagent "^6.1.0" supports-color@7.2.0, supports-color@^7.1.0: version "7.2.0" From 0a9236901f95a79dfbeecb34e7914d997fb752c3 Mon Sep 17 00:00:00 2001 From: Bryan Mishkin <698306+bmish@users.noreply.github.com> Date: Mon, 30 Nov 2020 16:40:35 -0500 Subject: [PATCH 644/818] feat: add eslint-plugin-qunit to blueprint [eslint-plugin-qunit](https://github.com/platinumazure/eslint-plugin-qunit) a great plugin for enforcing QUnit best practices in tests, and I consider it to be the most useful/relevant linting plugin that we haven't added to the blueprint yet. I use in many of my Ember apps/addons. https://github.com/emberjs/rfcs/blob/master/text/0702-eslint-plugin-qunit.md --- blueprints/app/files/.eslintrc.js | 5 +++++ blueprints/app/files/package.json | 1 + tests/fixtures/addon/.eslintrc.js | 5 +++++ tests/fixtures/addon/defaults/package.json | 1 + tests/fixtures/addon/yarn/package.json | 1 + tests/fixtures/app/.eslintrc.js | 5 +++++ tests/fixtures/app/defaults/package.json | 1 + tests/fixtures/app/embroider-no-welcome/package.json | 1 + tests/fixtures/app/embroider/package.json | 1 + tests/fixtures/app/npm/package.json | 1 + tests/fixtures/app/yarn/package.json | 1 + 11 files changed, 23 insertions(+) diff --git a/blueprints/app/files/.eslintrc.js b/blueprints/app/files/.eslintrc.js index 256132080e..9a6981b630 100644 --- a/blueprints/app/files/.eslintrc.js +++ b/blueprints/app/files/.eslintrc.js @@ -57,5 +57,10 @@ module.exports = { 'node/no-unpublished-require': 'off', },<% } %> }, + { + // Test files: + files: ['tests/**/*-test.{js,ts}'], + extends: ['plugin:qunit/recommended', 'plugin:qunit/two'], + }, ], }; diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 554e5bef61..e9e86984a7 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -57,6 +57,7 @@ "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", + "eslint-plugin-qunit": "^5.3.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", diff --git a/tests/fixtures/addon/.eslintrc.js b/tests/fixtures/addon/.eslintrc.js index 2504063f68..355bbe1218 100644 --- a/tests/fixtures/addon/.eslintrc.js +++ b/tests/fixtures/addon/.eslintrc.js @@ -50,5 +50,10 @@ module.exports = { plugins: ['node'], extends: ['plugin:node/recommended'], }, + { + // Test files: + files: ['tests/**/*-test.{js,ts}'], + extends: ['plugin:qunit/recommended', 'plugin:qunit/two'], + }, ], }; diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index 91c8a0f74f..4334fdd55f 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -59,6 +59,7 @@ "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", + "eslint-plugin-qunit": "^5.3.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 81c1a0c2f8..59dae0a711 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -60,6 +60,7 @@ "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", + "eslint-plugin-qunit": "^5.3.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", diff --git a/tests/fixtures/app/.eslintrc.js b/tests/fixtures/app/.eslintrc.js index da079e309d..043d572ca1 100644 --- a/tests/fixtures/app/.eslintrc.js +++ b/tests/fixtures/app/.eslintrc.js @@ -49,5 +49,10 @@ module.exports = { 'node/no-unpublished-require': 'off', }, }, + { + // Test files: + files: ['tests/**/*-test.{js,ts}'], + extends: ['plugin:qunit/recommended', 'plugin:qunit/two'], + }, ], }; diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index 887ab0ad51..a6a808d817 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -54,6 +54,7 @@ "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", + "eslint-plugin-qunit": "^5.3.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index 3cf50a417f..601c3863af 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -56,6 +56,7 @@ "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", + "eslint-plugin-qunit": "^5.3.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index d6b5de43dd..49b4436904 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -57,6 +57,7 @@ "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", + "eslint-plugin-qunit": "^5.3.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 72aa9fd392..23cb47193a 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -53,6 +53,7 @@ "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", + "eslint-plugin-qunit": "^5.3.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 887ab0ad51..a6a808d817 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -54,6 +54,7 @@ "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", + "eslint-plugin-qunit": "^5.3.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", From ddcd1cc4610c584f34d371f633509d756995dd4e Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 1 Mar 2021 04:49:29 +0000 Subject: [PATCH 645/818] Bump fixturify-project from 2.1.0 to 2.1.1 (#9461) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 99adabe12e..ecd91280d5 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "filesize": "^6.1.0", "find-up": "^5.0.0", "find-yarn-workspace-root": "^2.0.0", - "fixturify-project": "^2.1.0", + "fixturify-project": "^2.1.1", "fs-extra": "^9.1.0", "fs-tree-diff": "^2.0.1", "get-caller-file": "^2.0.5", diff --git a/yarn.lock b/yarn.lock index e82c637229..b0061478c8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3224,10 +3224,10 @@ fireworm@^0.7.0: lodash.flatten "^3.0.2" minimatch "^3.0.2" -fixturify-project@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fixturify-project/-/fixturify-project-2.1.0.tgz#1677be3f116ec3f6b2b2ebb75b393d5860c4668e" - integrity sha512-B59wD4I5HDbokvmZatZTyNIjuSBjZzcZoEYdr9kdG9qRc/FSDjzUzzvHbrZL7oWfu9qsbyJBjzf0R0WC5hIZsA== +fixturify-project@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/fixturify-project/-/fixturify-project-2.1.1.tgz#a511dd26700c6b64ac271ef4393e7124f153c81f" + integrity sha512-sP0gGMTr4iQ8Kdq5Ez0CVJOZOGWqzP5dv/veOTdFNywioKjkNWCHBi1q65DMpcNGUGeoOUWehyji274Q2wRgxA== dependencies: fixturify "^2.1.0" tmp "^0.0.33" From b2285fbd826fe0fb5a605ae1678111307ff961df Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 1 Mar 2021 06:02:21 +0000 Subject: [PATCH 646/818] Bump release-it from 14.2.2 to 14.4.1 (#9462) --- package.json | 2 +- yarn.lock | 415 ++++++++++++++++++++++++++++----------------------- 2 files changed, 229 insertions(+), 188 deletions(-) diff --git a/package.json b/package.json index ecd91280d5..dc17e2be3e 100644 --- a/package.json +++ b/package.json @@ -152,7 +152,7 @@ "nock": "^13.0.5", "nyc": "^15.1.0", "prettier": "2.2.1", - "release-it": "^14.2.2", + "release-it": "^14.4.1", "rimraf": "^3.0.2", "strip-ansi": "^6.0.0", "supertest": "^6.1.3", diff --git a/yarn.lock b/yarn.lock index b0061478c8..a4f9e81f5b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -287,7 +287,7 @@ dependencies: "@octokit/types" "^6.0.3" -"@octokit/core@^3.0.0", "@octokit/core@^3.2.3": +"@octokit/core@^3.2.3": version "3.2.5" resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.2.5.tgz#57becbd5fd789b0592b915840855f3a5f233d554" integrity sha512-+DCtPykGnvXKWWQI0E1XD+CCeWSBhB6kwItXqfFmNBlIlhczuDPbg+P6BtLnVBaRJDAjv+1mrUJuRsFSjktopg== @@ -322,32 +322,29 @@ resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-3.4.1.tgz#317f78cede7f387046e6bad2041e01ddf9607e96" integrity sha512-7Sjm3UwEAM11f+ck9+qlyEfgl8hCk5sSZBU2qcWY8+8ibowjqcwxhhtvY0/pjHPF8mcvmedFpGmmIYs2qM9/+Q== -"@octokit/plugin-paginate-rest@^2.2.0", "@octokit/plugin-paginate-rest@^2.6.2": +"@octokit/openapi-types@^5.2.1": + version "5.2.1" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-5.2.1.tgz#5e846f86104aef96ace20091d8afb6be27979d8a" + integrity sha512-Bf7MBvQ1nMpv15ANaQtRBsC7YnwQFPM0eUztp3luQs9L6sBEiQ6ArM1Wx5CG+N7tXETtd0oE0DMcU4wbLlCZIw== + +"@octokit/plugin-paginate-rest@^2.6.2": version "2.9.0" resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.9.0.tgz#f52c26850b019584be8dc55c0bd6257339c0fa43" integrity sha512-XxbOg45r2n/2QpU6hnGDxQNDRrJ7gjYpMXeDbUCigWTHECmjoyFLizkFO2jMEtidMkfiELn7AF8GBAJ/cbPTnA== dependencies: "@octokit/types" "^6.6.0" -"@octokit/plugin-request-log@^1.0.0", "@octokit/plugin-request-log@^1.0.2": +"@octokit/plugin-request-log@^1.0.2": version "1.0.3" resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.3.tgz#70a62be213e1edc04bb8897ee48c311482f9700d" integrity sha512-4RFU4li238jMJAzLgAwkBAw+4Loile5haQMQr+uhFq27BmyJXcXSKvoQKqh0agsZEiUlW6iSv3FAgvmGkur7OQ== -"@octokit/plugin-rest-endpoint-methods@4.2.1": - version "4.2.1" - resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.2.1.tgz#8224833a45c3394836dc6e86f1e6c49269a2c350" - integrity sha512-QyFr4Bv807Pt1DXZOC5a7L5aFdrwz71UHTYoHVajYV5hsqffWm8FUl9+O7nxRu5PDMtB/IKrhFqTmdBTK5cx+A== +"@octokit/plugin-rest-endpoint-methods@4.12.0": + version "4.12.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.12.0.tgz#1cec405cd4eaf0bdb58cb7d2a9b3d8473b3a70e8" + integrity sha512-RgnQ1aoetdOJjZYC37LV5FNlL7GY/v1CdC5dur1Zp/UiADJlbRFbAz/xLx26ovXw67dK7EUtwCghS+6QyiI9RA== dependencies: - "@octokit/types" "^5.5.0" - deprecation "^2.3.1" - -"@octokit/plugin-rest-endpoint-methods@4.8.0": - version "4.8.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.8.0.tgz#c1f24f940fc265f0021c8f544e3d8755f3253759" - integrity sha512-2zRpXDveJH8HsXkeeMtRW21do8wuSxVn1xXFdvhILyxlLWqGQrdJUA1/dk5DM7iAAYvwT/P3bDOLs90yL4S2AA== - dependencies: - "@octokit/types" "^6.5.0" + "@octokit/types" "^6.10.0" deprecation "^2.3.1" "@octokit/request-error@^2.0.0": @@ -387,34 +384,24 @@ once "^1.4.0" universal-user-agent "^6.0.0" -"@octokit/rest@18.0.9": - version "18.0.9" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.9.tgz#964d707d914eb34b1787895fdcacff96de47844d" - integrity sha512-CC5+cIx974Ygx9lQNfUn7/oXDQ9kqGiKUC6j1A9bAVZZ7aoTF8K6yxu0pQhQrLBwSl92J6Z3iVDhGhGFgISCZg== - dependencies: - "@octokit/core" "^3.0.0" - "@octokit/plugin-paginate-rest" "^2.2.0" - "@octokit/plugin-request-log" "^1.0.0" - "@octokit/plugin-rest-endpoint-methods" "4.2.1" - -"@octokit/rest@^18.0.15": - version "18.0.15" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.15.tgz#a690aabd9927a3389e285dee25da67e62b3f14ad" - integrity sha512-MBlZl0KeuvFMJ3210hG5xhh/jtYmMDLd5WmO49Wg4Rfg0odeivntWAyq3KofJDP2G8jskCaaOaZBKo0TeO9tFA== +"@octokit/rest@18.2.0", "@octokit/rest@^18.0.15": + version "18.2.0" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.2.0.tgz#b75c87870bb1f7bc9f37ae0e9acb3a411a34a25f" + integrity sha512-xsp6bIqL2sb/NmgLXTxw96caegobRw+YHnzdIi70ruquHtPPDW2cBAONhDYMUuAOeXx0JH2auOeplpk4SQJy1w== dependencies: "@octokit/core" "^3.2.3" "@octokit/plugin-paginate-rest" "^2.6.2" "@octokit/plugin-request-log" "^1.0.2" - "@octokit/plugin-rest-endpoint-methods" "4.8.0" + "@octokit/plugin-rest-endpoint-methods" "4.12.0" -"@octokit/types@^5.0.0", "@octokit/types@^5.0.1", "@octokit/types@^5.5.0": +"@octokit/types@^5.0.0", "@octokit/types@^5.0.1": version "5.5.0" resolved "https://registry.yarnpkg.com/@octokit/types/-/types-5.5.0.tgz#e5f06e8db21246ca102aa28444cdb13ae17a139b" integrity sha512-UZ1pErDue6bZNjYOotCNveTXArOMZQFG6hKJfOnGnulVCMcVVi7YIIuuR4WfBhjo7zgpmzn/BkPDnUXtNx+PcQ== dependencies: "@types/node" ">= 8" -"@octokit/types@^6.0.3", "@octokit/types@^6.5.0", "@octokit/types@^6.6.0": +"@octokit/types@^6.0.3", "@octokit/types@^6.6.0": version "6.7.0" resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.7.0.tgz#a548ed7a5606620a55c4814e11d64e3d19285f47" integrity sha512-QiE7y2Brh0Bv61K//kFGJ6jCZihCf4fGL1FP0Oims5h2SlSYtDiAQMJW15s8udyLfjo/jY05G1YlN8ED/c6RNw== @@ -422,6 +409,13 @@ "@octokit/openapi-types" "^3.4.1" "@types/node" ">= 8" +"@octokit/types@^6.10.0": + version "6.11.1" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.11.1.tgz#54ece128029526fa99bd71e757b9e35478403d95" + integrity sha512-UiSRTG2lrFbMUMwhKNR0uSV33Fzv4bNu1n5iFuuNOg80XCh0VYNhR4TQWgrkLhVxdDuej6s61aP3eQvVm6K6uA== + dependencies: + "@octokit/openapi-types" "^5.2.1" + "@sindresorhus/is@^0.14.0": version "0.14.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" @@ -969,6 +963,11 @@ base64-arraybuffer@0.1.4: resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-0.1.4.tgz#9818c79e059b1355f97e0428a017c838e90ba812" integrity sha1-mBjHngWbE1X5fgQooBfIOOkLqBI= +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + base64id@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/base64id/-/base64id-2.0.0.tgz#2770ac6bc47d312af97a8bf9a634342e0cd25cb6" @@ -1009,6 +1008,15 @@ binary-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/binaryextensions/-/binaryextensions-2.2.0.tgz#e7c6ba82d4f5f5758c26078fe8eea28881233311" integrity sha512-bHhs98rj/7i/RZpCSJ3uk55pLXOItjIrh2sRQZSM6OoktScX+LxJzvlU+FELp9j3TdcddTmmYArLSGptCTwjuw== +bl@^4.0.3: + version "4.1.0" + resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" + integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== + dependencies: + buffer "^5.5.0" + inherits "^2.0.4" + readable-stream "^3.4.0" + blank-object@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/blank-object/-/blank-object-1.0.2.tgz#f990793fbe9a8c8dd013fb3219420bec81d5f4b9" @@ -1074,19 +1082,19 @@ bower-endpoint-parser@0.2.2: resolved "https://registry.yarnpkg.com/bower-endpoint-parser/-/bower-endpoint-parser-0.2.2.tgz#00b565adbfab6f2d35addde977e97962acbcb3f6" integrity sha1-ALVlrb+rby01rd3pd+l5Yqy8s/Y= -boxen@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/boxen/-/boxen-4.2.0.tgz#e411b62357d6d6d36587c8ac3d5d974daa070e64" - integrity sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ== +boxen@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/boxen/-/boxen-5.0.0.tgz#64fe9b16066af815f51057adcc800c3730120854" + integrity sha512-5bvsqw+hhgUi3oYGK0Vf4WpIkyemp60WBInn7+WNfoISzAqk/HX4L7WNROq38E6UR/y3YADpv6pEm4BfkeEAdA== dependencies: ansi-align "^3.0.0" - camelcase "^5.3.1" - chalk "^3.0.0" - cli-boxes "^2.2.0" - string-width "^4.1.0" - term-size "^2.1.0" - type-fest "^0.8.1" + camelcase "^6.2.0" + chalk "^4.1.0" + cli-boxes "^2.2.1" + string-width "^4.2.0" + type-fest "^0.20.2" widest-line "^3.1.0" + wrap-ansi "^7.0.0" brace-expansion@^1.1.7: version "1.1.11" @@ -1490,6 +1498,14 @@ bser@2.1.1: dependencies: node-int64 "^0.4.0" +buffer@^5.5.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + bufferutil@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.1.tgz#3a177e8e5819a1243fe16b63a199951a7ad8d4a7" @@ -1595,6 +1611,11 @@ camelcase@^6.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.1.0.tgz#27dc176173725fb0adf8a48b647f4d7871944d78" integrity sha512-WCMml9ivU60+8rEJgELlFp1gxFcEGxwYleE3bziHEDeqsqAWGHdimB7beBFGjLzVNgPGyDsfgXLQEYMpmIFnVQ== +camelcase@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" + integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== + can-symlink@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/can-symlink/-/can-symlink-1.0.0.tgz#97b607d8a84bb6c6e228b902d864ecb594b9d219" @@ -1687,14 +1708,6 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.1, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" - integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - chardet@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" @@ -1732,6 +1745,11 @@ ci-info@^2.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== +ci-info@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.1.1.tgz#9a32fcefdf7bcdb6f0a7e1c0f8098ec57897b80a" + integrity sha512-kdRWLBIJwdsYJWYJFtAFFYxybguqeF91qpZaggjG5Nf8QKdizFG2hjqvaTXbxFIcYbSaD74KpAXv6BSm17DHEQ== + class-utils@^0.3.5: version "0.3.6" resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" @@ -1774,10 +1792,10 @@ clean-up-path@^1.0.0: resolved "https://registry.yarnpkg.com/clean-up-path/-/clean-up-path-1.0.0.tgz#de9e8196519912e749c9eaf67c13d64fac72a3e5" integrity sha512-PHGlEF0Z6976qQyN6gM7kKH6EH0RdfZcc8V+QhFe36eRxV0SMH5OUBZG7Bxa9YcreNzyNbK63cGiZxdSZgosRw== -cli-boxes@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.0.tgz#538ecae8f9c6ca508e3c3c95b453fe93cb4c168d" - integrity sha512-gpaBrMAizVEANOpfZp/EEUixTXDyGt7DFzdK5hU+UbWt/J0lB0w20ncZj59Z9a93xHb9u12zF5BS6i9RKbtg4w== +cli-boxes@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.1.tgz#ddd5035d25094fce220e9cab40a45840a440318f" + integrity sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw== cli-cursor@^2.1.0: version "2.1.0" @@ -1793,11 +1811,16 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" -cli-spinners@^2.0.0, cli-spinners@^2.4.0: +cli-spinners@^2.0.0: version "2.4.0" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.4.0.tgz#c6256db216b878cfba4720e719cec7cf72685d7f" integrity sha512-sJAofoarcm76ZGpuooaO0eDy8saEy+YoZBLjC4h8srt4jeBnkYeOgqxgsJQTpyt2LjI5PTfLJHSL+41Yu4fEJA== +cli-spinners@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.5.0.tgz#12763e47251bf951cb75c201dfa58ff1bcb2d047" + integrity sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ== + cli-table@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.1.tgz#f53b05266a8b1a0b934b3d0821e6e2dc5914ae23" @@ -2847,19 +2870,19 @@ exec-sh@^0.3.2: resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.4.tgz#3a018ceb526cc6f6df2bb504b2bfe8e3a4934ec5" integrity sha512-sEFIkc61v75sWeOe72qyrqg2Qg0OuLESziUDk/O/z2qgS15y2gWVFrI6f2Qn/qw/0/NCfCEsmNA4zOjkwEZT1A== -execa@4.1.0, execa@^4.0.2: - version "4.1.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" - integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== +execa@5.0.0, execa@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.0.0.tgz#4029b0007998a841fbd1032e5f4de86a3c1e3376" + integrity sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ== dependencies: - cross-spawn "^7.0.0" - get-stream "^5.0.0" - human-signals "^1.1.1" + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" is-stream "^2.0.0" merge-stream "^2.0.0" - npm-run-path "^4.0.0" - onetime "^5.1.0" - signal-exit "^3.0.2" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" strip-final-newline "^2.0.0" execa@^1.0.0: @@ -2875,19 +2898,19 @@ execa@^1.0.0: signal-exit "^3.0.0" strip-eof "^1.0.0" -execa@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-5.0.0.tgz#4029b0007998a841fbd1032e5f4de86a3c1e3376" - integrity sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ== +execa@^4.0.2: + version "4.1.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" + integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.0" - human-signals "^2.1.0" + cross-spawn "^7.0.0" + get-stream "^5.0.0" + human-signals "^1.1.1" is-stream "^2.0.0" merge-stream "^2.0.0" - npm-run-path "^4.0.1" - onetime "^5.1.2" - signal-exit "^3.0.3" + npm-run-path "^4.0.0" + onetime "^5.1.0" + signal-exit "^3.0.2" strip-final-newline "^2.0.0" exists-sync@0.0.3: @@ -3297,7 +3320,16 @@ forever-agent@~0.5.0: resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.5.2.tgz#6d0e09c4921f94a27f63d3b49c5feff1ea4c5130" integrity sha1-bQ4JxJIflKJ/Y9O0nF/v8epMUTA= -form-data@3.0.0, form-data@^3.0.0: +form-data@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +form-data@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.0.tgz#31b7e39c85f1355b7139ee0c647cf0de7f83c682" integrity sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg== @@ -3565,10 +3597,10 @@ git-up@^4.0.0: is-ssh "^1.3.0" parse-url "^5.0.0" -git-url-parse@11.4.0: - version "11.4.0" - resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-11.4.0.tgz#f2bb1f2b00f05552540e95a62e31399a639a6aa6" - integrity sha512-KlIa5jvMYLjXMQXkqpFzobsyD/V2K5DRHl5OAf+6oDFPlPLxrGDVQlIdI63c4/Kt6kai4kALENSALlzTGST3GQ== +git-url-parse@11.4.4: + version "11.4.4" + resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-11.4.4.tgz#5d747debc2469c17bc385719f7d0427802d83d77" + integrity sha512-Y4o9o7vQngQDIU9IjyCmRJBin5iYjI5u9ZITnddRZpD7dcCFQj2sL2XuMNbLRE4b4B/4ENPsp2Q8P44fjAZ0Pw== dependencies: git-up "^4.0.0" @@ -3602,12 +3634,12 @@ glob@^5.0.10: once "^1.3.0" path-is-absolute "^1.0.0" -global-dirs@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-2.0.1.tgz#acdf3bb6685bcd55cb35e8a052266569e9469201" - integrity sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A== +global-dirs@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-3.0.0.tgz#70a76fe84ea315ab37b1f5576cbde7d48ef72686" + integrity sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA== dependencies: - ini "^1.3.5" + ini "2.0.0" global-modules@^1.0.0: version "1.0.0" @@ -3655,10 +3687,10 @@ globby@10.0.0: merge2 "^1.2.3" slash "^3.0.0" -globby@11.0.1: - version "11.0.1" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.1.tgz#9a2bf107a068f3ffeabc49ad702c79ede8cfd357" - integrity sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ== +globby@11.0.2: + version "11.0.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.2.tgz#1af538b766a3b540ebfb58a32b2e2d5897321d83" + integrity sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og== dependencies: array-union "^2.1.0" dir-glob "^3.0.1" @@ -3667,10 +3699,10 @@ globby@11.0.1: merge2 "^1.3.0" slash "^3.0.0" -got@11.8.0: - version "11.8.0" - resolved "https://registry.yarnpkg.com/got/-/got-11.8.0.tgz#be0920c3586b07fd94add3b5b27cb28f49e6545f" - integrity sha512-k9noyoIIY9EejuhaBNLyZ31D5328LeqnyPNXJQb2XlJZcKakLqN5m6O/ikhq/0lw56kUYS54fVm+D1x57YC9oQ== +got@11.8.1: + version "11.8.1" + resolved "https://registry.yarnpkg.com/got/-/got-11.8.1.tgz#df04adfaf2e782babb3daabc79139feec2f7e85d" + integrity sha512-9aYdZL+6nHmvJwHALLwKSUZ0hMwGaJGYv3hoPLPgnT8BoBXm1SjnZeky+91tfwJaDzun2s4RsBRy48IEYv2q2Q== dependencies: "@sindresorhus/is" "^4.0.0" "@szmarczak/http-timer" "^4.0.5" @@ -4001,6 +4033,11 @@ iconv-lite@0.4.24, iconv-lite@^0.4.13, iconv-lite@^0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" +ieee754@^1.1.13: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + ignore@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" @@ -4066,7 +4103,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -4076,7 +4113,12 @@ inherits@2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= -ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: +ini@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ini/-/ini-2.0.0.tgz#e5fd556ecdd5726be978fa1001862eacb0a94bc5" + integrity sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA== + +ini@^1.3.4, ini@~1.3.0: version "1.3.7" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.7.tgz#a09363e1911972ea16d7a8851005d84cf09a9a84" integrity sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ== @@ -4181,7 +4223,14 @@ is-callable@^1.1.4, is-callable@^1.2.2: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.2.tgz#c7c6715cd22d4ddb48d3e19970223aceabb080d9" integrity sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA== -is-ci@2.0.0, is-ci@^2.0.0: +is-ci@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-3.0.0.tgz#c7e7be3c9d8eef7d0fa144390bd1e4b88dc4c994" + integrity sha512-kDXyttuLeslKAHYL/K28F2YkM3x5jvFPEw3yXbRptXydjD9rpLEz+C5K5iutY9ZiUu6AP41JdvRQwF4Iqs4ZCQ== + dependencies: + ci-info "^3.1.1" + +is-ci@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== @@ -4285,13 +4334,13 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: dependencies: is-extglob "^2.1.1" -is-installed-globally@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.3.2.tgz#fd3efa79ee670d1187233182d5b0a1dd00313141" - integrity sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g== +is-installed-globally@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.4.0.tgz#9a0fd407949c30f86eb6959ef1b7994ed0b7b520" + integrity sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ== dependencies: - global-dirs "^2.0.1" - is-path-inside "^3.0.1" + global-dirs "^3.0.0" + is-path-inside "^3.0.2" is-interactive@^1.0.0: version "1.0.0" @@ -4330,7 +4379,7 @@ is-obj@^2.0.0: resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== -is-path-inside@^3.0.1: +is-path-inside@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.2.tgz#f5220fc82a3e233757291dddc9c5877f2a1f3017" integrity sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg== @@ -5140,35 +5189,28 @@ micromatch@^4.0.2: braces "^3.0.1" picomatch "^2.0.5" -mime-db@1.44.0, "mime-db@>= 1.43.0 < 2": +mime-db@1.46.0: + version "1.46.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.46.0.tgz#6267748a7f799594de3cbc8cde91def349661cee" + integrity sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ== + +"mime-db@>= 1.43.0 < 2": version "1.44.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== -mime-db@1.45.0: - version "1.45.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.45.0.tgz#cceeda21ccd7c3a745eba2decd55d4b73e7879ea" - integrity sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w== - -mime-types@2.1.27, mime-types@^2.1.12, mime-types@^2.1.18, mime-types@^2.1.19, mime-types@^2.1.26: - version "2.1.27" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" - integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== +mime-types@2.1.29, mime-types@^2.1.12, mime-types@^2.1.18, mime-types@^2.1.19, mime-types@^2.1.26, mime-types@~2.1.24: + version "2.1.29" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.29.tgz#1d4ab77da64b91f5f72489df29236563754bb1b2" + integrity sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ== dependencies: - mime-db "1.44.0" + mime-db "1.46.0" mime-types@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-1.0.2.tgz#995ae1392ab8affcbfcb2641dd054e943c0d5dce" integrity sha1-mVrhOSq4r/y/yyZB3QVOlDwNXc4= -mime-types@~2.1.24: - version "2.1.28" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.28.tgz#1160c4757eab2c5363888e005273ecf79d2a0ecd" - integrity sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ== - dependencies: - mime-db "1.45.0" - mime@1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" @@ -5647,17 +5689,17 @@ optionator@^0.9.1: type-check "^0.4.0" word-wrap "^1.2.3" -ora@5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/ora/-/ora-5.1.0.tgz#b188cf8cd2d4d9b13fd25383bc3e5cba352c94f8" - integrity sha512-9tXIMPvjZ7hPTbk8DFq1f7Kow/HU/pQYB60JbNq+QnGwcyhWVZaQ4hM9zQDEsPxw/muLpgiHSaumUZxCAmod/w== +ora@5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/ora/-/ora-5.3.0.tgz#fb832899d3a1372fe71c8b2c534bbfe74961bb6f" + integrity sha512-zAKMgGXUim0Jyd6CXK9lraBnD3H5yPGBPPOkC23a2BG6hsm4Zu6OQSjQuEtV0BHDf4aKHcUFvJiGRrFuW3MG8g== dependencies: + bl "^4.0.3" chalk "^4.1.0" cli-cursor "^3.1.0" - cli-spinners "^2.4.0" + cli-spinners "^2.5.0" is-interactive "^1.0.0" log-symbols "^4.0.0" - mute-stream "0.0.8" strip-ansi "^6.0.0" wcwidth "^1.0.1" @@ -5801,10 +5843,10 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -parse-json@5.1.0, parse-json@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.1.0.tgz#f96088cdf24a8faa9aea9a009f2d9d942c999646" - integrity sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ== +parse-json@5.2.0, parse-json@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== dependencies: "@babel/code-frame" "^7.0.0" error-ex "^1.3.1" @@ -6190,7 +6232,7 @@ readable-stream@^2.0.6: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@^3.6.0: +readable-stream@^3.4.0, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -6262,39 +6304,39 @@ registry-url@^5.0.0: dependencies: rc "^1.2.8" -release-it@^14.2.2: - version "14.2.2" - resolved "https://registry.yarnpkg.com/release-it/-/release-it-14.2.2.tgz#ec01be53b04c5aa251a45c7a0b29cceace7827b3" - integrity sha512-rnJOzDIXErrwCD9cRMtDgmOZlcLQiL0z0dVyN95G2T1FQVBQNr7AD5EiH3U+K6X7s+EVoK90lF96NXe5QuvG1A== +release-it@^14.4.1: + version "14.4.1" + resolved "https://registry.yarnpkg.com/release-it/-/release-it-14.4.1.tgz#7b7dac839e22521853e81aa67d833c40a4094c43" + integrity sha512-fNvl2hIiTA3wKOQMu/cS07acuvibaTlvLUJmhuHarPsYJZpwX+nugb0a4PG20vlpuU5jKfnhkP8uPmvKXtRfuw== dependencies: "@iarna/toml" "2.2.5" - "@octokit/rest" "18.0.9" + "@octokit/rest" "18.2.0" async-retry "1.3.1" chalk "4.1.0" cosmiconfig "7.0.0" debug "4.3.1" deprecated-obj "2.0.0" - execa "4.1.0" + execa "5.0.0" find-up "5.0.0" - form-data "3.0.0" - git-url-parse "11.4.0" - globby "11.0.1" - got "11.8.0" + form-data "4.0.0" + git-url-parse "11.4.4" + globby "11.0.2" + got "11.8.1" import-cwd "3.0.0" inquirer "7.3.3" - is-ci "2.0.0" + is-ci "3.0.0" lodash "4.17.20" - mime-types "2.1.27" - ora "5.1.0" + mime-types "2.1.29" + ora "5.3.0" os-name "4.0.0" - parse-json "5.1.0" - semver "7.3.2" + parse-json "5.2.0" + semver "7.3.4" shelljs "0.8.4" - update-notifier "5.0.1" + update-notifier "5.1.0" url-join "4.0.1" - uuid "8.3.1" + uuid "8.3.2" yaml "1.10.0" - yargs-parser "20.2.4" + yargs-parser "20.2.5" release-zalgo@^1.0.0: version "1.0.0" @@ -6567,10 +6609,12 @@ semver-diff@^3.1.1: dependencies: semver "^6.3.0" -semver@7.3.2: - version "7.3.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" - integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== +semver@7.3.4, semver@^7.0.0, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4: + version "7.3.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" + integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== + dependencies: + lru-cache "^6.0.0" semver@^5.4.1, semver@^5.5.0: version "5.7.1" @@ -6582,13 +6626,6 @@ semver@^6.0.0, semver@^6.1.0, semver@^6.2.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.0.0, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4: - version "7.3.4" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" - integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== - dependencies: - lru-cache "^6.0.0" - send@0.17.1: version "0.17.1" resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" @@ -7162,11 +7199,6 @@ temp@0.9.4: mkdirp "^0.5.1" rimraf "~2.6.2" -term-size@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/term-size/-/term-size-2.2.0.tgz#1f16adedfe9bdc18800e1776821734086fcc6753" - integrity sha512-a6sumDlzyHVJWb8+YofY4TW112G6p2FCPEAFk+59gIYHv3XHRhm9ltVQ9kli4hNWeQBwSpe8cRN25x0ROunMOw== - test-exclude@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" @@ -7421,6 +7453,11 @@ type-fest@^0.11.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1" integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ== +type-fest@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + type-fest@^0.8.0, type-fest@^0.8.1: version "0.8.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" @@ -7541,23 +7578,23 @@ untildify@^2.1.0: dependencies: os-homedir "^1.0.0" -update-notifier@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-5.0.1.tgz#1f92d45fb1f70b9e33880a72dd262bc12d22c20d" - integrity sha512-BuVpRdlwxeIOvmc32AGYvO1KVdPlsmqSh8KDDBxS6kDE5VR7R8OMP1d8MdhaVBvxl4H3551k9akXr0Y1iIB2Wg== +update-notifier@5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-5.1.0.tgz#4ab0d7c7f36a231dd7316cf7729313f0214d9ad9" + integrity sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw== dependencies: - boxen "^4.2.0" + boxen "^5.0.0" chalk "^4.1.0" configstore "^5.0.1" has-yarn "^2.1.0" import-lazy "^2.1.0" is-ci "^2.0.0" - is-installed-globally "^0.3.2" + is-installed-globally "^0.4.0" is-npm "^5.0.0" is-yarn-global "^0.3.0" latest-version "^5.1.0" pupa "^2.1.1" - semver "^7.3.2" + semver "^7.3.4" semver-diff "^3.1.1" xdg-basedir "^4.0.0" @@ -7612,21 +7649,16 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= -uuid@8.3.1: - version "8.3.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.1.tgz#2ba2e6ca000da60fce5a196954ab241131e05a31" - integrity sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg== +uuid@8.3.2, uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== uuid@^3.3.3: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== -uuid@^8.3.2: - version "8.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" - integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== - v8-compile-cache@^2.0.3: version "2.1.0" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e" @@ -7826,6 +7858,15 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -7914,10 +7955,10 @@ yargs-parser@13.1.2, yargs-parser@^13.1.2: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@20.2.4: - version "20.2.4" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" - integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== +yargs-parser@20.2.5: + version "20.2.5" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.5.tgz#5d37729146d3f894f39fc94b6796f5b239513186" + integrity sha512-jYRGS3zWy20NtDtK2kBgo/TlAoy5YUuhD9/LZ7z7W4j1Fdw2cqD0xEEclf8fxc8xjD6X5Qr+qQQwCEsP8iRiYg== yargs-parser@^18.1.0: version "18.1.3" From 957520f3bf0f12f6ec39cb84737bddbb7fe8d375 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 1 Mar 2021 06:56:48 +0000 Subject: [PATCH 647/818] Bump resolve from 1.19.0 to 1.20.0 (#9464) --- package.json | 2 +- yarn.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index dc17e2be3e..a3cf4d9b4d 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,7 @@ "promise-map-series": "^0.3.0", "promise.hash.helper": "^1.0.7", "quick-temp": "^0.1.8", - "resolve": "^1.19.0", + "resolve": "^1.20.0", "resolve-package-path": "^3.1.0", "sane": "^4.1.0", "semver": "^7.3.4", diff --git a/yarn.lock b/yarn.lock index a4f9e81f5b..736bf26a23 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4237,7 +4237,7 @@ is-ci@^2.0.0: dependencies: ci-info "^2.0.0" -is-core-module@^2.1.0: +is-core-module@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== @@ -6452,12 +6452,12 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.1, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.19.0: - version "1.19.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" - integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.1, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.20.0: + version "1.20.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" + integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== dependencies: - is-core-module "^2.1.0" + is-core-module "^2.2.0" path-parse "^1.0.6" responselike@^1.0.2: From d80be39b7010d89a8b46763d1cb249b1481e3ae0 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 1 Mar 2021 08:00:43 +0000 Subject: [PATCH 648/818] Bump @babel/core from 7.12.10 to 7.13.8 (#9460) --- package.json | 2 +- yarn.lock | 327 +++++++++++++++++++++++++++++---------------------- 2 files changed, 187 insertions(+), 142 deletions(-) diff --git a/package.json b/package.json index a3cf4d9b4d..b56619eaa0 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "test:slow": "node --unhandled-rejections=strict tests/runner slow" }, "dependencies": { - "@babel/core": "^7.12.10", + "@babel/core": "^7.13.8", "@babel/plugin-transform-modules-amd": "^7.12.1", "amd-name-resolver": "^1.3.1", "babel-plugin-module-resolver": "^4.0.0", diff --git a/yarn.lock b/yarn.lock index 736bf26a23..7985b6ddf5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,163 +2,172 @@ # yarn lockfile v1 -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.11": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" - integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== - dependencies: - "@babel/highlight" "^7.10.4" - -"@babel/core@^7.12.0", "@babel/core@^7.12.10", "@babel/core@^7.3.4", "@babel/core@^7.7.5": - version "7.12.10" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.10.tgz#b79a2e1b9f70ed3d84bbfb6d8c4ef825f606bccd" - integrity sha512-eTAlQKq65zHfkHZV0sIVODCPGVgoo1HdBlbSLi9CqOzuZanMv2ihzY+4paiKr1mH+XmYESMAmJ/dpZ68eN6d8w== - dependencies: - "@babel/code-frame" "^7.10.4" - "@babel/generator" "^7.12.10" - "@babel/helper-module-transforms" "^7.12.1" - "@babel/helpers" "^7.12.5" - "@babel/parser" "^7.12.10" - "@babel/template" "^7.12.7" - "@babel/traverse" "^7.12.10" - "@babel/types" "^7.12.10" +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658" + integrity sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g== + dependencies: + "@babel/highlight" "^7.12.13" + +"@babel/compat-data@^7.13.8": + version "7.13.8" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.13.8.tgz#5b783b9808f15cef71547f1b691f34f8ff6003a6" + integrity sha512-EaI33z19T4qN3xLXsGf48M2cDqa6ei9tPZlfLdb2HC+e/cFtREiRd8hdSqDbwdLB0/+gLwqJmCYASH0z2bUdog== + +"@babel/core@^7.12.0", "@babel/core@^7.13.8", "@babel/core@^7.3.4", "@babel/core@^7.7.5": + version "7.13.8" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.13.8.tgz#c191d9c5871788a591d69ea1dc03e5843a3680fb" + integrity sha512-oYapIySGw1zGhEFRd6lzWNLWFX2s5dA/jm+Pw/+59ZdXtjyIuwlXbrId22Md0rgZVop+aVoqow2riXhBLNyuQg== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/generator" "^7.13.0" + "@babel/helper-compilation-targets" "^7.13.8" + "@babel/helper-module-transforms" "^7.13.0" + "@babel/helpers" "^7.13.0" + "@babel/parser" "^7.13.4" + "@babel/template" "^7.12.13" + "@babel/traverse" "^7.13.0" + "@babel/types" "^7.13.0" convert-source-map "^1.7.0" debug "^4.1.0" - gensync "^1.0.0-beta.1" + gensync "^1.0.0-beta.2" json5 "^2.1.2" lodash "^4.17.19" - semver "^5.4.1" + semver "^6.3.0" source-map "^0.5.0" -"@babel/generator@^7.12.10", "@babel/generator@^7.12.11": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.11.tgz#98a7df7b8c358c9a37ab07a24056853016aba3af" - integrity sha512-Ggg6WPOJtSi8yYQvLVjG8F/TlpWDlKx0OpS4Kt+xMQPs5OaGYWy+v1A+1TvxI6sAMGZpKWWoAQ1DaeQbImlItA== +"@babel/generator@^7.13.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.13.0.tgz#bd00d4394ca22f220390c56a0b5b85568ec1ec0c" + integrity sha512-zBZfgvBB/ywjx0Rgc2+BwoH/3H+lDtlgD4hBOpEv5LxRnYsm/753iRuLepqnYlynpjC3AdQxtxsoeHJoEEwOAw== dependencies: - "@babel/types" "^7.12.11" + "@babel/types" "^7.13.0" jsesc "^2.5.1" source-map "^0.5.0" -"@babel/helper-function-name@^7.12.11": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.12.11.tgz#1fd7738aee5dcf53c3ecff24f1da9c511ec47b42" - integrity sha512-AtQKjtYNolKNi6nNNVLQ27CP6D9oFR6bq/HPYSizlzbp7uC1M59XJe8L+0uXjbIaZaUJF99ruHqVGiKXU/7ybA== +"@babel/helper-compilation-targets@^7.13.8": + version "7.13.8" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.8.tgz#02bdb22783439afb11b2f009814bdd88384bd468" + integrity sha512-pBljUGC1y3xKLn1nrx2eAhurLMA8OqBtBP/JwG4U8skN7kf8/aqwwxpV1N6T0e7r6+7uNitIa/fUxPFagSXp3A== + dependencies: + "@babel/compat-data" "^7.13.8" + "@babel/helper-validator-option" "^7.12.17" + browserslist "^4.14.5" + semver "^6.3.0" + +"@babel/helper-function-name@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz#93ad656db3c3c2232559fd7b2c3dbdcbe0eb377a" + integrity sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA== dependencies: - "@babel/helper-get-function-arity" "^7.12.10" - "@babel/template" "^7.12.7" - "@babel/types" "^7.12.11" + "@babel/helper-get-function-arity" "^7.12.13" + "@babel/template" "^7.12.13" + "@babel/types" "^7.12.13" -"@babel/helper-get-function-arity@^7.12.10": - version "7.12.10" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.10.tgz#b158817a3165b5faa2047825dfa61970ddcc16cf" - integrity sha512-mm0n5BPjR06wh9mPQaDdXWDoll/j5UpCAPl1x8fS71GHm7HA6Ua2V4ylG1Ju8lvcTOietbPNNPaSilKj+pj+Ag== +"@babel/helper-get-function-arity@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz#bc63451d403a3b3082b97e1d8b3fe5bd4091e583" + integrity sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg== dependencies: - "@babel/types" "^7.12.10" + "@babel/types" "^7.12.13" -"@babel/helper-member-expression-to-functions@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.1.tgz#fba0f2fcff3fba00e6ecb664bb5e6e26e2d6165c" - integrity sha512-k0CIe3tXUKTRSoEx1LQEPFU9vRQfqHtl+kf8eNnDqb4AUJEy5pz6aIiog+YWtVm2jpggjS1laH68bPsR+KWWPQ== +"@babel/helper-member-expression-to-functions@^7.13.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.0.tgz#6aa4bb678e0f8c22f58cdb79451d30494461b091" + integrity sha512-yvRf8Ivk62JwisqV1rFRMxiSMDGnN6KH1/mDMmIrij4jztpQNRoHqqMG3U6apYbGRPJpgPalhva9Yd06HlUxJQ== dependencies: - "@babel/types" "^7.12.1" + "@babel/types" "^7.13.0" -"@babel/helper-module-imports@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.12.1.tgz#1644c01591a15a2f084dd6d092d9430eb1d1216c" - integrity sha512-ZeC1TlMSvikvJNy1v/wPIazCu3NdOwgYZLIkmIyAsGhqkNpiDoQQRmaCK8YP4Pq3GPTLPV9WXaPCJKvx06JxKA== +"@babel/helper-module-imports@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.12.13.tgz#ec67e4404f41750463e455cc3203f6a32e93fcb0" + integrity sha512-NGmfvRp9Rqxy0uHSSVP+SRIW1q31a7Ji10cLBcqSDUngGentY4FRiHOFZFE1CLU5eiL0oE8reH7Tg1y99TDM/g== dependencies: - "@babel/types" "^7.12.1" + "@babel/types" "^7.12.13" -"@babel/helper-module-transforms@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz#7954fec71f5b32c48e4b303b437c34453fd7247c" - integrity sha512-QQzehgFAZ2bbISiCpmVGfiGux8YVFXQ0abBic2Envhej22DVXV9nCFaS5hIQbkyo1AdGb+gNME2TSh3hYJVV/w== - dependencies: - "@babel/helper-module-imports" "^7.12.1" - "@babel/helper-replace-supers" "^7.12.1" - "@babel/helper-simple-access" "^7.12.1" - "@babel/helper-split-export-declaration" "^7.11.0" - "@babel/helper-validator-identifier" "^7.10.4" - "@babel/template" "^7.10.4" - "@babel/traverse" "^7.12.1" - "@babel/types" "^7.12.1" +"@babel/helper-module-transforms@^7.12.1", "@babel/helper-module-transforms@^7.13.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.13.0.tgz#42eb4bd8eea68bab46751212c357bfed8b40f6f1" + integrity sha512-Ls8/VBwH577+pw7Ku1QkUWIyRRNHpYlts7+qSqBBFCW3I8QteB9DxfcZ5YJpOwH6Ihe/wn8ch7fMGOP1OhEIvw== + dependencies: + "@babel/helper-module-imports" "^7.12.13" + "@babel/helper-replace-supers" "^7.13.0" + "@babel/helper-simple-access" "^7.12.13" + "@babel/helper-split-export-declaration" "^7.12.13" + "@babel/helper-validator-identifier" "^7.12.11" + "@babel/template" "^7.12.13" + "@babel/traverse" "^7.13.0" + "@babel/types" "^7.13.0" lodash "^4.17.19" -"@babel/helper-optimise-call-expression@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz#50dc96413d594f995a77905905b05893cd779673" - integrity sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg== +"@babel/helper-optimise-call-expression@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz#5c02d171b4c8615b1e7163f888c1c81c30a2aaea" + integrity sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA== dependencies: - "@babel/types" "^7.10.4" + "@babel/types" "^7.12.13" "@babel/helper-plugin-utils@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375" integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== -"@babel/helper-replace-supers@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.12.1.tgz#f15c9cc897439281891e11d5ce12562ac0cf3fa9" - integrity sha512-zJjTvtNJnCFsCXVi5rUInstLd/EIVNmIKA1Q9ynESmMBWPWd+7sdR+G4/wdu+Mppfep0XLyG2m7EBPvjCeFyrw== +"@babel/helper-replace-supers@^7.13.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.13.0.tgz#6034b7b51943094cb41627848cb219cb02be1d24" + integrity sha512-Segd5me1+Pz+rmN/NFBOplMbZG3SqRJOBlY+mA0SxAv6rjj7zJqr1AVr3SfzUVTLCv7ZLU5FycOM/SBGuLPbZw== dependencies: - "@babel/helper-member-expression-to-functions" "^7.12.1" - "@babel/helper-optimise-call-expression" "^7.10.4" - "@babel/traverse" "^7.12.1" - "@babel/types" "^7.12.1" + "@babel/helper-member-expression-to-functions" "^7.13.0" + "@babel/helper-optimise-call-expression" "^7.12.13" + "@babel/traverse" "^7.13.0" + "@babel/types" "^7.13.0" -"@babel/helper-simple-access@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.12.1.tgz#32427e5aa61547d38eb1e6eaf5fd1426fdad9136" - integrity sha512-OxBp7pMrjVewSSC8fXDFrHrBcJATOOFssZwv16F3/6Xtc138GHybBfPbm9kfiqQHKhYQrlamWILwlDCeyMFEaA== +"@babel/helper-simple-access@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.12.13.tgz#8478bcc5cacf6aa1672b251c1d2dde5ccd61a6c4" + integrity sha512-0ski5dyYIHEfwpWGx5GPWhH35j342JaflmCeQmsPWcrOQDtCN6C1zKAVRFVbK53lPW2c9TsuLLSUDf0tIGJ5hA== dependencies: - "@babel/types" "^7.12.1" + "@babel/types" "^7.12.13" -"@babel/helper-split-export-declaration@^7.11.0": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz#f8a491244acf6a676158ac42072911ba83ad099f" - integrity sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg== +"@babel/helper-split-export-declaration@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz#e9430be00baf3e88b0e13e6f9d4eaf2136372b05" + integrity sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg== dependencies: - "@babel/types" "^7.11.0" - -"@babel/helper-split-export-declaration@^7.12.11": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.11.tgz#1b4cc424458643c47d37022223da33d76ea4603a" - integrity sha512-LsIVN8j48gHgwzfocYUSkO/hjYAOJqlpJEc7tGXcIm4cubjVUf8LGW6eWRyxEu7gA25q02p0rQUWoCI33HNS5g== - dependencies: - "@babel/types" "^7.12.11" - -"@babel/helper-validator-identifier@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" - integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== + "@babel/types" "^7.12.13" "@babel/helper-validator-identifier@^7.12.11": version "7.12.11" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed" integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw== -"@babel/helpers@^7.12.5": - version "7.12.5" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.12.5.tgz#1a1ba4a768d9b58310eda516c449913fe647116e" - integrity sha512-lgKGMQlKqA8meJqKsW6rUnc4MdUk35Ln0ATDqdM1a/UpARODdI4j5Y5lVfUScnSNkJcdCRAaWkspykNoFg9sJA== +"@babel/helper-validator-option@^7.12.17": + version "7.12.17" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz#d1fbf012e1a79b7eebbfdc6d270baaf8d9eb9831" + integrity sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw== + +"@babel/helpers@^7.13.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.13.0.tgz#7647ae57377b4f0408bf4f8a7af01c42e41badc0" + integrity sha512-aan1MeFPxFacZeSz6Ld7YZo5aPuqnKlD7+HZY75xQsueczFccP9A7V05+oe0XpLwHK3oLorPe9eaAUljL7WEaQ== dependencies: - "@babel/template" "^7.10.4" - "@babel/traverse" "^7.12.5" - "@babel/types" "^7.12.5" + "@babel/template" "^7.12.13" + "@babel/traverse" "^7.13.0" + "@babel/types" "^7.13.0" -"@babel/highlight@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143" - integrity sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA== +"@babel/highlight@^7.12.13": + version "7.13.8" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.13.8.tgz#10b2dac78526424dfc1f47650d0e415dfd9dc481" + integrity sha512-4vrIhfJyfNf+lCtXC2ck1rKSzDwciqF7IWFhXXrSOUC2O5DrVp+w4c6ed4AllTxhTkUP5x2tYj41VaxdVMMRDw== dependencies: - "@babel/helper-validator-identifier" "^7.10.4" + "@babel/helper-validator-identifier" "^7.12.11" chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.12.10", "@babel/parser@^7.12.11", "@babel/parser@^7.12.7", "@babel/parser@^7.7.5": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.11.tgz#9ce3595bcd74bc5c466905e86c535b8b25011e79" - integrity sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg== +"@babel/parser@^7.12.13", "@babel/parser@^7.13.0", "@babel/parser@^7.13.4", "@babel/parser@^7.7.5": + version "7.13.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.4.tgz#340211b0da94a351a6f10e63671fa727333d13ab" + integrity sha512-uvoOulWHhI+0+1f9L4BoozY7U5cIkZ9PgJqvb041d6vypgUmtVPG4vmGm4pSggjl8BELzvHyUeJSUyEMY6b+qA== "@babel/plugin-transform-modules-amd@^7.12.1": version "7.12.1" @@ -177,34 +186,34 @@ core-js "^2.6.5" regenerator-runtime "^0.13.4" -"@babel/template@^7.10.4", "@babel/template@^7.12.7", "@babel/template@^7.7.4": - version "7.12.7" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.7.tgz#c817233696018e39fbb6c491d2fb684e05ed43bc" - integrity sha512-GkDzmHS6GV7ZeXfJZ0tLRBhZcMcY0/Lnb+eEbXDBfCAcZCjrZKe6p3J4we/D24O9Y8enxWAg1cWwof59yLh2ow== - dependencies: - "@babel/code-frame" "^7.10.4" - "@babel/parser" "^7.12.7" - "@babel/types" "^7.12.7" - -"@babel/traverse@^7.12.1", "@babel/traverse@^7.12.10", "@babel/traverse@^7.12.5", "@babel/traverse@^7.7.4": - version "7.12.12" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.12.tgz#d0cd87892704edd8da002d674bc811ce64743376" - integrity sha512-s88i0X0lPy45RrLM8b9mz8RPH5FqO9G9p7ti59cToE44xFm1Q+Pjh5Gq4SXBbtb88X7Uy7pexeqRIQDDMNkL0w== - dependencies: - "@babel/code-frame" "^7.12.11" - "@babel/generator" "^7.12.11" - "@babel/helper-function-name" "^7.12.11" - "@babel/helper-split-export-declaration" "^7.12.11" - "@babel/parser" "^7.12.11" - "@babel/types" "^7.12.12" +"@babel/template@^7.12.13", "@babel/template@^7.7.4": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.13.tgz#530265be8a2589dbb37523844c5bcb55947fb327" + integrity sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/parser" "^7.12.13" + "@babel/types" "^7.12.13" + +"@babel/traverse@^7.13.0", "@babel/traverse@^7.7.4": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.13.0.tgz#6d95752475f86ee7ded06536de309a65fc8966cc" + integrity sha512-xys5xi5JEhzC3RzEmSGrs/b3pJW/o87SypZ+G/PhaE7uqVQNv/jlmVIBXuoh5atqQ434LfXV+sf23Oxj0bchJQ== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/generator" "^7.13.0" + "@babel/helper-function-name" "^7.12.13" + "@babel/helper-split-export-declaration" "^7.12.13" + "@babel/parser" "^7.13.0" + "@babel/types" "^7.13.0" debug "^4.1.0" globals "^11.1.0" lodash "^4.17.19" -"@babel/types@^7.10.4", "@babel/types@^7.11.0", "@babel/types@^7.12.1", "@babel/types@^7.12.10", "@babel/types@^7.12.11", "@babel/types@^7.12.12", "@babel/types@^7.12.5", "@babel/types@^7.12.7": - version "7.12.12" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.12.tgz#4608a6ec313abbd87afa55004d373ad04a96c299" - integrity sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ== +"@babel/types@^7.12.13", "@babel/types@^7.13.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.13.0.tgz#74424d2816f0171b4100f0ab34e9a374efdf7f80" + integrity sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA== dependencies: "@babel/helper-validator-identifier" "^7.12.11" lodash "^4.17.19" @@ -1491,6 +1500,17 @@ browser-stdout@1.3.1: resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== +browserslist@^4.14.5: + version "4.16.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.3.tgz#340aa46940d7db878748567c5dea24a48ddf3717" + integrity sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw== + dependencies: + caniuse-lite "^1.0.30001181" + colorette "^1.2.1" + electron-to-chromium "^1.3.649" + escalade "^3.1.1" + node-releases "^1.1.70" + bser@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" @@ -1623,6 +1643,11 @@ can-symlink@^1.0.0: dependencies: tmp "0.0.28" +caniuse-lite@^1.0.30001181: + version "1.0.30001192" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001192.tgz#b848ebc0ab230cf313d194a4775a30155d50ae40" + integrity sha512-63OrUnwJj5T1rUmoyqYTdRWBqFFxZFlyZnRRjDR8NSUQFB6A+j/uBORU/SyJ5WzDLg4SPiZH40hQCBNdZ/jmAw== + capture-exit@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" @@ -1910,6 +1935,11 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +colorette@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" + integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== + colors@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" @@ -2420,6 +2450,11 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= +electron-to-chromium@^1.3.649: + version "1.3.675" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.675.tgz#7ad29f98d7b48da581554eb28bb9a71fd5fd4956" + integrity sha512-GEQw+6dNWjueXGkGfjgm7dAMtXfEqrfDG3uWcZdeaD4cZ3dKYdPRQVruVXQRXtPLtOr5GNVVlNLRMChOZ611pQ== + ember-cli-blueprint-test-helpers@^0.19.2: version "0.19.2" resolved "https://registry.yarnpkg.com/ember-cli-blueprint-test-helpers/-/ember-cli-blueprint-test-helpers-0.19.2.tgz#9e563cd81ab39931253ced0982c5d02475895401" @@ -2664,6 +2699,11 @@ es6-symbol@^3.1.1, es6-symbol@~3.1.3: d "^1.0.1" ext "^1.1.2" +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + escape-goat@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/escape-goat/-/escape-goat-2.1.1.tgz#1b2dc77003676c457ec760b2dc68edb648188675" @@ -3530,10 +3570,10 @@ gauge@~2.7.3: strip-ansi "^3.0.1" wide-align "^1.1.0" -gensync@^1.0.0-beta.1: - version "1.0.0-beta.1" - resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" - integrity sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg== +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== get-caller-file@^2.0.1, get-caller-file@^2.0.5: version "2.0.5" @@ -5473,6 +5513,11 @@ node-preload@^0.2.1: dependencies: process-on-spawn "^1.0.0" +node-releases@^1.1.70: + version "1.1.71" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.71.tgz#cb1334b179896b1c89ecfdd4b725fb7bbdfc7dbb" + integrity sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg== + node-uuid@~1.4.0: version "1.4.8" resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.8.tgz#b040eb0923968afabf8d32fb1f17f1167fdab907" From 477c9d9fda6511dbd089bd586d7f68066a4f9a6f Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 1 Mar 2021 09:01:28 +0000 Subject: [PATCH 649/818] Bump mocha from 8.2.0 to 8.3.0 (#9465) --- package.json | 2 +- yarn.lock | 182 ++++++++++++++++++++++++--------------------------- 2 files changed, 88 insertions(+), 96 deletions(-) diff --git a/package.json b/package.json index b56619eaa0..4e04db43bd 100644 --- a/package.json +++ b/package.json @@ -148,7 +148,7 @@ "fixturify": "^2.1.0", "is-language-code": "^2.0.0", "latest-version": "^5.1.0", - "mocha": "^8.2.0", + "mocha": "^8.3.0", "nock": "^13.0.5", "nyc": "^15.1.0", "prettier": "2.2.1", diff --git a/yarn.lock b/yarn.lock index 7985b6ddf5..8609f2eefd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1750,10 +1750,10 @@ check-error@^1.0.2: resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= -chokidar@3.4.3: - version "3.4.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.3.tgz#c1df38231448e45ca4ac588e6c79573ba6a57d5b" - integrity sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ== +chokidar@3.5.1: + version "3.5.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a" + integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw== dependencies: anymatch "~3.1.1" braces "~3.0.2" @@ -1763,7 +1763,7 @@ chokidar@3.4.3: normalize-path "~3.0.0" readdirp "~3.5.0" optionalDependencies: - fsevents "~2.1.2" + fsevents "~2.3.1" ci-info@^2.0.0: version "2.0.0" @@ -1863,15 +1863,6 @@ cli-width@^3.0.0: resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== -cliui@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" - integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== - dependencies: - string-width "^3.1.0" - strip-ansi "^5.2.0" - wrap-ansi "^5.1.0" - cliui@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" @@ -1881,6 +1872,15 @@ cliui@^6.0.0: strip-ansi "^6.0.0" wrap-ansi "^6.2.0" +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + clone-response@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" @@ -2205,13 +2205,6 @@ debug@2.6.9, debug@^2.1.0, debug@^2.1.1, debug@^2.1.3, debug@^2.2.0, debug@^2.3. dependencies: ms "2.0.0" -debug@4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.2.0.tgz#7f150f93920e94c58f5574c2fd01a3110effe7f1" - integrity sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg== - dependencies: - ms "2.1.2" - debug@4.3.1, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: version "4.3.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" @@ -2404,12 +2397,7 @@ detect-newline@3.1.0: resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== -diff@4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" - integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== - -diff@^5.0.0: +diff@5.0.0, diff@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== @@ -3541,10 +3529,10 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -fsevents@~2.1.2: - version "2.1.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" - integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== +fsevents@~2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== function-bind@^1.1.1: version "1.1.1" @@ -4641,7 +4629,14 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@3.14.0, js-yaml@^3.13.1, js-yaml@^3.14.0, js-yaml@^3.2.5, js-yaml@^3.2.7: +js-yaml@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.0.0.tgz#f426bc0ff4b4051926cd588c71113183409a121f" + integrity sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q== + dependencies: + argparse "^2.0.1" + +js-yaml@^3.13.1, js-yaml@^3.14.0, js-yaml@^3.2.5, js-yaml@^3.2.7: version "3.14.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== @@ -5336,35 +5331,35 @@ mktemp@~0.4.0: resolved "https://registry.yarnpkg.com/mktemp/-/mktemp-0.4.0.tgz#6d0515611c8a8c84e484aa2000129b98e981ff0b" integrity sha1-bQUVYRyKjITkhKogABKbmOmB/ws= -mocha@^8.2.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.2.0.tgz#f8aa79110b4b5a6580c65d4dd8083c425282624e" - integrity sha512-lEWEMq2LMfNJMKeuEwb5UELi+OgFDollXaytR5ggQcHpzG3NP/R7rvixAvF+9/lLsTWhWG+4yD2M70GsM06nxw== +mocha@^8.3.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.3.0.tgz#a83a7432d382ae1ca29686062d7fdc2c36f63fe5" + integrity sha512-TQqyC89V1J/Vxx0DhJIXlq9gbbL9XFNdeLQ1+JsnZsVaSOV1z3tWfw0qZmQJGQRIfkvZcs7snQnZnOCKoldq1Q== dependencies: "@ungap/promise-all-settled" "1.1.2" ansi-colors "4.1.1" browser-stdout "1.3.1" - chokidar "3.4.3" - debug "4.2.0" - diff "4.0.2" + chokidar "3.5.1" + debug "4.3.1" + diff "5.0.0" escape-string-regexp "4.0.0" find-up "5.0.0" glob "7.1.6" growl "1.10.5" he "1.2.0" - js-yaml "3.14.0" + js-yaml "4.0.0" log-symbols "4.0.0" minimatch "3.0.4" - ms "2.1.2" - nanoid "3.1.12" + ms "2.1.3" + nanoid "3.1.20" serialize-javascript "5.0.1" strip-json-comments "3.1.1" - supports-color "7.2.0" + supports-color "8.1.1" which "2.0.2" wide-align "1.1.3" - workerpool "6.0.2" - yargs "13.3.2" - yargs-parser "13.1.2" + workerpool "6.1.0" + yargs "16.2.0" + yargs-parser "20.2.4" yargs-unparser "2.0.0" morgan@^1.10.0: @@ -5398,7 +5393,7 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@^2.1.1: +ms@2.1.3, ms@^2.1.1: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -5418,10 +5413,10 @@ mute-stream@0.0.8: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== -nanoid@3.1.12: - version "3.1.12" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.12.tgz#6f7736c62e8d39421601e4a0c77623a97ea69654" - integrity sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A== +nanoid@3.1.20: + version "3.1.20" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.20.tgz#badc263c6b1dcf14b71efaa85f6ab4c1d6cfc788" + integrity sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw== nanomatch@^1.2.9: version "1.2.13" @@ -7026,7 +7021,7 @@ string-width@^1.0.1: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -string-width@^3.0.0, string-width@^3.1.0: +string-width@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== @@ -7106,7 +7101,7 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" -strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: +strip-ansi@^5.1.0, strip-ansi@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== @@ -7182,10 +7177,10 @@ supertest@^6.1.3: methods "^1.1.2" superagent "^6.1.0" -supports-color@7.2.0, supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== +supports-color@8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== dependencies: has-flag "^4.0.0" @@ -7201,6 +7196,13 @@ supports-color@^5.3.0: dependencies: has-flag "^3.0.0" +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + symlink-or-copy@^1.0.0, symlink-or-copy@^1.0.1, symlink-or-copy@^1.1.8, symlink-or-copy@^1.2.0, symlink-or-copy@^1.3.0, symlink-or-copy@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/symlink-or-copy/-/symlink-or-copy-1.3.1.tgz#9506dd64d8e98fa21dcbf4018d1eab23e77f71fe" @@ -7866,10 +7868,10 @@ wordwrap@^0.0.3, wordwrap@~0.0.2: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= -workerpool@6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.0.2.tgz#e241b43d8d033f1beb52c7851069456039d1d438" - integrity sha512-DSNyvOpFKrNusaaUwk+ej6cBj1bmhLcBfj80elGk+ZIo5JSkq+unB1dLKEOcNfJDZgjGICfhQ0Q5TbP0PvF4+Q== +workerpool@6.1.0, workerpool@^6.0.3: + version "6.1.0" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.0.tgz#a8e038b4c94569596852de7a8ea4228eefdeb37b" + integrity sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg== workerpool@^3.1.1: version "3.1.2" @@ -7880,20 +7882,6 @@ workerpool@^3.1.1: object-assign "4.1.1" rsvp "^4.8.4" -workerpool@^6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.0.3.tgz#3f80ba4d914fe7bb8d933628c26e5d7ff820c703" - integrity sha512-meU8ZzO+ipcx/njxtKUcbu2K95085q5WYDo8fR6PMW3hCY4driteIsNsEowYV7dzOtvq0HotUKsReJkK8gKXgg== - -wrap-ansi@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" - integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== - dependencies: - ansi-styles "^3.2.0" - string-width "^3.0.0" - strip-ansi "^5.0.0" - wrap-ansi@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" @@ -7964,6 +7952,11 @@ y18n@^4.0.0: resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== +y18n@^5.0.5: + version "5.0.5" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.5.tgz#8769ec08d03b1ea2df2500acef561743bbb9ab18" + integrity sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg== + yaeti@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" @@ -7992,13 +7985,10 @@ yaml@1.10.0, yaml@^1.10.0: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e" integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg== -yargs-parser@13.1.2, yargs-parser@^13.1.2: - version "13.1.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" - integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" +yargs-parser@20.2.4: + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== yargs-parser@20.2.5: version "20.2.5" @@ -8013,6 +8003,11 @@ yargs-parser@^18.1.0: camelcase "^5.0.0" decamelize "^1.2.0" +yargs-parser@^20.2.2: + version "20.2.6" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.6.tgz#69f920addf61aafc0b8b89002f5d66e28f2d8b20" + integrity sha512-AP1+fQIWSM/sMiET8fyayjx/J+JmTPt2Mr0FkrgqB4todtfa53sOsrSAcIrJRD5XS20bKUwaDIuMkWKCEiQLKA== + yargs-unparser@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" @@ -8023,21 +8018,18 @@ yargs-unparser@2.0.0: flat "^5.0.2" is-plain-obj "^2.1.0" -yargs@13.3.2: - version "13.3.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" - integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== +yargs@16.2.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== dependencies: - cliui "^5.0.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^13.1.2" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" yargs@^15.0.2: version "15.3.0" From d488c5a9fedbda90e539aa8dbb5ea8eb7cf0b215 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 1 Mar 2021 10:04:59 +0000 Subject: [PATCH 650/818] Bump broccoli from 3.5.0 to 3.5.1 (#9463) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 4e04db43bd..11374acdfd 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "babel-plugin-module-resolver": "^4.0.0", "bower-config": "^1.4.3", "bower-endpoint-parser": "0.2.2", - "broccoli": "^3.5.0", + "broccoli": "^3.5.1", "broccoli-amd-funnel": "^2.0.1", "broccoli-babel-transpiler": "^7.8.0", "broccoli-builder": "^0.18.14", diff --git a/yarn.lock b/yarn.lock index 8609f2eefd..6233e06e3e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1465,10 +1465,10 @@ broccoli@^2.0.0: underscore.string "^3.2.2" watch-detector "^0.1.0" -broccoli@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/broccoli/-/broccoli-3.5.0.tgz#bdf96dc32980d1ad9f7ef5e68aaaa19e8d47b602" - integrity sha512-qGYirIs6W5NGzDPMTRtoOnveP3UQJKWFjAWdRRZJjCoAJYN872sXuO48cnNfnc/c1nd9fCR8et4knlTPgI+9yQ== +broccoli@^3.5.1: + version "3.5.1" + resolved "https://registry.yarnpkg.com/broccoli/-/broccoli-3.5.1.tgz#371bc63cabe700bae3a2b80cac3e978f94664418" + integrity sha512-2Rvl40E6JgALX1JQN5PjCgP1apFAP24vVol+coX5TpVVy0Lsqzl3Mabbe3fVQcu3lMRfPJ6DyBKqBlo52XPSRg== dependencies: "@types/chai" "^4.2.9" "@types/chai-as-promised" "^7.1.2" From f39e21ad3eeab476ed66becc0e8f7ab5fcbc411a Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Mon, 1 Mar 2021 16:28:24 -0700 Subject: [PATCH 651/818] [BUGFIX] face race conditions in tests/integration/models/blueprint-test.js blueprint.install returns a promise, we should wait for it, if we do not we will have sporadic test failures (Which motivated this PR). Worked with @dcombslinkedin on this one --- tests/integration/models/blueprint-test.js | 59 +++++++++++++--------- 1 file changed, 36 insertions(+), 23 deletions(-) diff --git a/tests/integration/models/blueprint-test.js b/tests/integration/models/blueprint-test.js index 2d81ce793f..c0057af883 100644 --- a/tests/integration/models/blueprint-test.js +++ b/tests/integration/models/blueprint-test.js @@ -498,32 +498,42 @@ describe('Blueprint', function () { }); }); - it('throws error when there is a trailing forward slash in entityName', function () { - options.entity = { name: 'foo/' }; - expect(() => { - blueprint.install(options); - }).to.throw( - /You specified "foo\/", but you can't use a trailing slash as an entity name with generators. Please re-run the command with "foo"./ - ); + it('throws error when there is a trailing forward slash in entityName', async function () { + try { + options.entity = { name: 'foo/' }; + await blueprint.install(options); + expect.fail('expected rejection'); + } catch (e) { + expect(e.message).to.match( + /You specified "foo\/", but you can't use a trailing slash as an entity name with generators. Please re-run the command with "foo"./ + ); + } - options.entity = { name: 'foo\\' }; - expect(() => { - blueprint.install(options); - }).to.throw( - /You specified "foo\\", but you can't use a trailing slash as an entity name with generators. Please re-run the command with "foo"./ - ); + try { + options.entity = { name: 'foo\\' }; + await blueprint.install(options); + expect.fail('expected rejection'); + } catch (e) { + expect(e.message).to.match( + /You specified "foo\\", but you can't use a trailing slash as an entity name with generators. Please re-run the command with "foo"./ + ); + } options.entity = { name: 'foo' }; - expect(() => { - blueprint.install(options); - }).not.to.throw(); + await blueprint.install(options); }); - it('throws error when an entityName is not provided', function () { - options.entity = {}; - expect(() => { - blueprint.install(options); - }).to.throw(SilentError, /The `ember generate ` command requires an entity name to be specified./); + it('throws error when an entityName is not provided', async function () { + try { + options.entity = {}; + await blueprint.install(options); + expect.fail('expected rejection)'); + } catch (e) { + expect(e).to.be.instanceof(SilentError); + expect(e.message).to.match( + /The `ember generate ` command requires an entity name to be specified./ + ); + } }); it('throws error when an action does not exist', async function () { @@ -560,16 +570,19 @@ describe('Blueprint', function () { expect(actualFiles).to.not.contain('app/basics/mock-project.txt'); }); - it('calls normalizeEntityName before locals hook is called', function (done) { + it('calls normalizeEntityName before locals hook is called', async function () { blueprint.normalizeEntityName = function () { return 'foo'; }; + let done; + const waitForLocals = new Promise((resolve) => (done = resolve)); blueprint.locals = function (options) { expect(options.entity.name).to.equal('foo'); done(); }; options.entity = { name: 'bar' }; - blueprint.install(options); + await blueprint.install(options); + await waitForLocals; }); it('calls appropriate hooks with correct arguments', async function () { From b6a94da7502ccaeb0667605532d1c6f533356950 Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Thu, 25 Feb 2021 14:31:35 -0800 Subject: [PATCH 652/818] Enable Embroider tests with new Dist Checker Some tests check the contents of explicit files which under embroider are different as they become "chunks". This PR introduces Dist Checker which allows us to ask questions about assets in the dist folder without going off of filenames. --- package.json | 1 + .../preprocessor-smoke-test-slow.js | 104 ++-- .../components/should-not-be-preprocessed.js | 2 +- .../addon/components/clitest-example.js | 2 +- .../components/should-not-be-preprocessed.js | 2 +- tests/helpers/dist-checker.js | 42 ++ yarn.lock | 532 +++++++++++++++++- 7 files changed, 622 insertions(+), 63 deletions(-) create mode 100644 tests/helpers/dist-checker.js diff --git a/package.json b/package.json index 11374acdfd..a823e23a2e 100644 --- a/package.json +++ b/package.json @@ -147,6 +147,7 @@ "eslint-plugin-prettier": "^3.3.1", "fixturify": "^2.1.0", "is-language-code": "^2.0.0", + "jsdom": "^16.4.0", "latest-version": "^5.1.0", "mocha": "^8.3.0", "nock": "^13.0.5", diff --git a/tests/acceptance/preprocessor-smoke-test-slow.js b/tests/acceptance/preprocessor-smoke-test-slow.js index 743a8dbd46..052bcad466 100644 --- a/tests/acceptance/preprocessor-smoke-test-slow.js +++ b/tests/acceptance/preprocessor-smoke-test-slow.js @@ -5,8 +5,8 @@ const fs = require('fs-extra'); const runCommand = require('../helpers/run-command'); const acceptance = require('../helpers/acceptance'); +const DistChecker = require('../helpers/dist-checker'); const copyFixtureFiles = require('../helpers/copy-fixture-files'); -const { isExperimentEnabled } = require('../../lib/experiments'); let createTestTargets = acceptance.createTestTargets; let teardownTestTargets = acceptance.teardownTestTargets; let linkDependencies = acceptance.linkDependencies; @@ -14,7 +14,6 @@ let cleanupRun = acceptance.cleanupRun; const chai = require('../chai'); let expect = chai.expect; -let file = chai.file; let dir = chai.dir; let appName = 'some-cool-app'; @@ -40,9 +39,6 @@ describe('Acceptance: preprocessor-smoke-test', function () { }); it('addons with standard preprocessors compile correctly', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors`); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -53,14 +49,13 @@ describe('Acceptance: preprocessor-smoke-test', function () { await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - expect(file('dist/assets/some-cool-app.css')).to.contain('app styles included'); - expect(file('dist/assets/vendor.css')).to.contain('addon styles included'); + let checker = new DistChecker(path.join(appRoot, 'dist')); + + expect(checker.contains('css', 'app styles included')).to.be; + expect(checker.contains('css', 'addon styles included')).to.be; }); it('addon registry entries are added in the proper order', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles(`preprocessor-tests/app-registry-ordering`); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -71,16 +66,14 @@ describe('Acceptance: preprocessor-smoke-test', function () { await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - expect(file('dist/assets/some-cool-app.js')) - .to.contain('replacedByPreprocessor', 'token should have been replaced in app bundle') - .to.not.contain('__SECOND_PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should not be contained') - .to.not.contain('__FIRST_PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should not be contained'); + let checker = new DistChecker(path.join(appRoot, 'dist')); + + expect(checker.contains('js', 'replacedByPreprocessor'), 'token should have been replaced in app bundle').to.be; + expect(checker.contains('js', '__SECOND_PREPROCESSOR_REPLACEMENT_TOKEN__'), 'token should not be contained').to.not.be; + expect(checker.contains('js', '__FIRST_PREPROCESSOR_REPLACEMENT_TOKEN__'), 'token should not be contained').to.not.be; }); it('addons without preprocessors compile correctly', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles(`preprocessor-tests/app-with-addon-without-preprocessors`); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -91,8 +84,10 @@ describe('Acceptance: preprocessor-smoke-test', function () { await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - expect(file('dist/assets/some-cool-app.css')).to.contain('app styles included'); - expect(file('dist/assets/vendor.css')).to.contain('addon styles included'); + let checker = new DistChecker(path.join(appRoot, 'dist')); + + expect(checker.contains('css', 'app styles included')).to.be; + expect(checker.contains('css', 'addon styles included')).to.be; }); /* @@ -103,9 +98,6 @@ describe('Acceptance: preprocessor-smoke-test', function () { |-- preprocessor should not apply to this */ it('addons depending on preprocessor addon preprocesses addon but not app', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors-2`); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -115,13 +107,25 @@ describe('Acceptance: preprocessor-smoke-test', function () { await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - expect(file('dist/assets/some-cool-app.js')) - .to.contain('__PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should not have been replaced in app bundle') - .to.not.contain('replacedByPreprocessor', 'token should not have been replaced in app bundle'); - - expect(file('dist/assets/vendor.js')) - .to.contain('replacedByPreprocessor', 'token should have been replaced in vendor bundle') - .to.not.contain('__PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should have been replaced in vendor bundle'); + let checker = new DistChecker(path.join(appRoot, 'dist')); + + expect( + checker.contains('js', 'foo_in_app: __PREPROCESSOR_REPLACEMENT_TOKEN__'), + 'token should not have been replaced in app bundle' + ).to.be; + expect( + checker.contains('js', 'foo_in_app: "replacedByPreprocessor"'), + 'token should not have been replaced in app bundle' + ).to.not.be; + + expect( + checker.contains('js', 'foo_in_addon: "replacedByPreprocessor"'), + 'token should have been replaced in vendor bundle' + ).to.be; + expect( + checker.contains('js', 'foo_in_addon: __PREPROCESSOR_REPLACEMENT_TOKEN__'), + 'token should have been replaced in vendor bundle' + ).to.not.be; }); /* @@ -134,9 +138,6 @@ describe('Acceptance: preprocessor-smoke-test', function () { |-- preprocessor should not apply to this */ it('addon N levels deep depending on preprocessor preprocesses that parent addon only', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors-3`); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -147,17 +148,32 @@ describe('Acceptance: preprocessor-smoke-test', function () { await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - expect(file('dist/assets/some-cool-app.js')) - .to.contain('__PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should not have been replaced in app bundle') - .to.not.contain('replacedByPreprocessor', 'token should not have been replaced in app bundle'); - - expect(file('dist/assets/vendor.js')) - .to.contain('deep: "replacedByPreprocessor"', 'token should have been replaced in deep component') - .to.contain( - 'shallow: __PREPROCESSOR_REPLACEMENT_TOKEN__', - 'token should not have been replaced in shallow component' - ) - .to.not.contain('deep: __PREPROCESSOR_REPLACEMENT_TOKEN__', 'token should have been replaced in deep component') - .to.not.contain('shallow: "replacedByPreprocessor"', 'token should not have been replaced in shallow component'); + let checker = new DistChecker(path.join(appRoot, 'dist')); + + expect( + checker.contains('js', 'foo_in_app: __PREPROCESSOR_REPLACEMENT_TOKEN__'), + 'token should not have been replaced in app bundle' + ).to.be; + expect( + checker.contains('js', 'foo_in_app: "replacedByPreprocessor"'), + 'token should not have been replaced in app bundle' + ).to.not.be; + + expect( + checker.contains('js', 'deep: "replacedByPreprocessor"'), + 'token should have been replaced in deep component' + ).to.be; + expect( + checker.contains('js', 'shallow: __PREPROCESSOR_REPLACEMENT_TOKEN__'), + 'token should not have been replaced in shallow component' + ).to.be; + expect( + checker.contains('js', 'deep: __PREPROCESSOR_REPLACEMENT_TOKEN__'), + 'token should have been replaced in deep component' + ).to.not.be; + expect( + checker.contains('js', 'shallow: "replacedByPreprocessor"'), + 'token should not have been replaced in shallow component' + ).to.not.be; }); }); diff --git a/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors-2/app/components/should-not-be-preprocessed.js b/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors-2/app/components/should-not-be-preprocessed.js index 8d9ad15e5a..003ba9c8a7 100644 --- a/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors-2/app/components/should-not-be-preprocessed.js +++ b/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors-2/app/components/should-not-be-preprocessed.js @@ -1,5 +1,5 @@ import Component from '@ember/component'; export default Component.extend({ - foo: __PREPROCESSOR_REPLACEMENT_TOKEN__ + foo_in_app: __PREPROCESSOR_REPLACEMENT_TOKEN__ }); diff --git a/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors-2/node_modules/ember-cool-addon/addon/components/clitest-example.js b/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors-2/node_modules/ember-cool-addon/addon/components/clitest-example.js index 8d9ad15e5a..b83229f6d2 100644 --- a/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors-2/node_modules/ember-cool-addon/addon/components/clitest-example.js +++ b/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors-2/node_modules/ember-cool-addon/addon/components/clitest-example.js @@ -1,5 +1,5 @@ import Component from '@ember/component'; export default Component.extend({ - foo: __PREPROCESSOR_REPLACEMENT_TOKEN__ + foo_in_addon: __PREPROCESSOR_REPLACEMENT_TOKEN__ }); diff --git a/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors-3/app/components/should-not-be-preprocessed.js b/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors-3/app/components/should-not-be-preprocessed.js index 8d9ad15e5a..003ba9c8a7 100644 --- a/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors-3/app/components/should-not-be-preprocessed.js +++ b/tests/fixtures/preprocessor-tests/app-with-addon-with-preprocessors-3/app/components/should-not-be-preprocessed.js @@ -1,5 +1,5 @@ import Component from '@ember/component'; export default Component.extend({ - foo: __PREPROCESSOR_REPLACEMENT_TOKEN__ + foo_in_app: __PREPROCESSOR_REPLACEMENT_TOKEN__ }); diff --git a/tests/helpers/dist-checker.js b/tests/helpers/dist-checker.js new file mode 100644 index 0000000000..1f7b014b49 --- /dev/null +++ b/tests/helpers/dist-checker.js @@ -0,0 +1,42 @@ +'use strict'; + +const fs = require('fs'); +const path = require('path'); +const { JSDOM } = require('jsdom'); + +class DistChecker { + constructor(distPath) { + this.distPath = distPath; + + let html = fs.readFileSync(path.join(distPath, 'index.html'), 'utf8'); + this.dom = new JSDOM(html); + this.scripts = this.dom.window.document.querySelectorAll('script'); + this.links = this.dom.window.document.querySelectorAll('link'); + } + + contains(fileType, token) { + if (fileType === 'js') { + for (let element of this.scripts) { + let src = element.getAttribute('src'); + let content = fs.readFileSync(path.join(this.distPath, src), 'utf8'); + + if (content.includes(token)) { + return true; + } + } + } else if (fileType === 'css') { + for (let element of this.links) { + let src = element.getAttribute('href'); + let content = fs.readFileSync(path.join(this.distPath, src), 'utf8'); + + if (content.includes(token)) { + return true; + } + } + } + + return false; + } +} + +module.exports = DistChecker; diff --git a/yarn.lock b/yarn.lock index 6233e06e3e..64f0ff21eb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -604,6 +604,11 @@ resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== +abab@^2.0.3: + version "2.0.5" + resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a" + integrity sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q== + abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" @@ -617,12 +622,25 @@ accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: mime-types "~2.1.24" negotiator "0.6.2" +acorn-globals@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-6.0.0.tgz#46cdd39f0f8ff08a876619b55f5ac8a6dc770b45" + integrity sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg== + dependencies: + acorn "^7.1.1" + acorn-walk "^7.1.1" + acorn-jsx@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.2.0.tgz#4c66069173d6fdd68ed85239fc256226182b2ebe" integrity sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ== -acorn@^7.4.0: +acorn-walk@^7.1.1: + version "7.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" + integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== + +acorn@^7.1.1, acorn@^7.4.0: version "7.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== @@ -640,7 +658,7 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" -ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.4: +ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.3, ajv@^6.12.4: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -847,6 +865,18 @@ asn1@0.1.11: resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.1.11.tgz#559be18376d08a4ec4dbe80877d27818639b2df7" integrity sha1-VZvhg3bQik7E2+gId9J4GGObLfc= +asn1@~0.2.3: + version "0.2.4" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== + dependencies: + safer-buffer "~2.1.0" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= + assert-plus@^0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.1.5.tgz#ee74009413002d84cec7219c6ac811812e723160" @@ -932,6 +962,16 @@ aws-sign2@~0.5.0: resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.5.0.tgz#c57103f7a17fc037f02d7c2e64b602ea223f7d63" integrity sha1-xXED96F/wDfwLXwuZLYC6iI/fWM= +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= + +aws4@^1.8.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" + integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== + babel-plugin-dynamic-import-node@^2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz#84fda19c976ec5c6defef57f9427b3def66e17a3" @@ -1002,6 +1042,13 @@ basic-auth@~2.0.1: dependencies: safe-buffer "5.1.2" +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= + dependencies: + tweetnacl "^0.14.3" + before-after-hook@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.1.0.tgz#b6c03487f44e24200dd30ca5e6a1979c5d2fb635" @@ -1495,6 +1542,11 @@ broccoli@^3.5.1: underscore.string "^3.2.2" watch-detector "^1.0.0" +browser-process-hrtime@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" + integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== + browser-stdout@1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" @@ -1663,6 +1715,11 @@ cardinal@^1.0.0: ansicolors "~0.2.1" redeyed "~1.0.0" +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + chai-as-promised@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-6.0.0.tgz#1a02a433a6f24dafac63b9c96fa1684db1aa8da6" @@ -1945,7 +2002,7 @@ colors@1.0.3: resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" integrity sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs= -combined-stream@^1.0.8: +combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -2132,7 +2189,7 @@ core-object@^3.1.5: dependencies: chalk "^2.0.0" -core-util-is@~1.0.0: +core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= @@ -2180,6 +2237,23 @@ crypto-random-string@^2.0.0: resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== +cssom@^0.4.4: + version "0.4.4" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" + integrity sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw== + +cssom@~0.3.6: + version "0.3.8" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" + integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== + +cssstyle@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852" + integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A== + dependencies: + cssom "~0.3.6" + ctype@0.5.3: version "0.5.3" resolved "https://registry.yarnpkg.com/ctype/-/ctype-0.5.3.tgz#82c18c2461f74114ef16c135224ad0b9144ca12f" @@ -2198,6 +2272,22 @@ dag-map@^2.0.2: resolved "https://registry.yarnpkg.com/dag-map/-/dag-map-2.0.2.tgz#9714b472de82a1843de2fba9b6876938cab44c68" integrity sha1-lxS0ct6CoYQ94vuptodpOMq0TGg= +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= + dependencies: + assert-plus "^1.0.0" + +data-urls@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" + integrity sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ== + dependencies: + abab "^2.0.3" + whatwg-mimetype "^2.3.0" + whatwg-url "^8.0.0" + debug@2.6.9, debug@^2.1.0, debug@^2.1.1, debug@^2.1.3, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -2243,6 +2333,11 @@ decamelize@^4.0.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== +decimal.js@^10.2.0: + version "10.2.1" + resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.2.1.tgz#238ae7b0f0c793d3e3cea410108b35a2c01426a3" + integrity sha512-KaL7+6Fw6i5A2XSnsbhm/6B+NuEA7TZ4vqxnd5tXz9sbKtrN9Srj8ab4vKVdK8YAqZO9P1kg45Y6YLoduPf+kw== + decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" @@ -2281,7 +2376,7 @@ deep-extend@^0.6.0: resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== -deep-is@^0.1.3: +deep-is@^0.1.3, deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= @@ -2416,6 +2511,13 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" +domexception@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/domexception/-/domexception-2.0.1.tgz#fb44aefba793e1574b0af6aed2801d057529f304" + integrity sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg== + dependencies: + webidl-conversions "^5.0.0" + dot-prop@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.2.0.tgz#c34ecc29556dc45f1f4c22697b6f4904e0cc4fcb" @@ -2428,6 +2530,14 @@ duplexer3@^0.1.4: resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + editions@^1.1.1: version "1.3.4" resolved "https://registry.yarnpkg.com/editions/-/editions-1.3.4.tgz#3662cb592347c3168eb8e498a0ff73271d67f50b" @@ -2712,6 +2822,18 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= +escodegen@^1.14.1: + version "1.14.3" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503" + integrity sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw== + dependencies: + esprima "^4.0.1" + estraverse "^4.2.0" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.6.1" + eslint-config-prettier@^7.2.0: version "7.2.0" resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-7.2.0.tgz#f4a4bd2832e810e8cc7c1411ec85b3e85c0c53f9" @@ -2839,7 +2961,7 @@ espree@^7.3.0: acorn-jsx "^5.2.0" eslint-visitor-keys "^1.3.0" -esprima@^4.0.0: +esprima@^4.0.0, esprima@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== @@ -2863,7 +2985,7 @@ esrecurse@^4.3.0: dependencies: estraverse "^5.2.0" -estraverse@^4.1.1: +estraverse@^4.1.1, estraverse@^4.2.0: version "4.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== @@ -3029,6 +3151,11 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2: assign-symbols "^1.0.0" is-extendable "^1.0.1" +extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + external-editor@^3.0.3: version "3.1.0" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" @@ -3057,6 +3184,16 @@ extract-stack@^2.0.0: resolved "https://registry.yarnpkg.com/extract-stack/-/extract-stack-2.0.0.tgz#11367bc865bfcd9bc0db3123e5edb57786f11f9b" integrity sha512-AEo4zm+TenK7zQorGK1f9mJ8L14hnTDi2ZQPR+Mub1NX8zimka1mXpV5LpH8x9HoUmFSHZCfLHqWvp0Y4FxxzQ== +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= + fast-deep-equal@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" @@ -3084,7 +3221,7 @@ fast-json-stable-stringify@^2.0.0: resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== -fast-levenshtein@^2.0.6: +fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= @@ -3348,6 +3485,11 @@ forever-agent@~0.5.0: resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.5.2.tgz#6d0e09c4921f94a27f63d3b49c5feff1ea4c5130" integrity sha1-bQ4JxJIflKJ/Y9O0nF/v8epMUTA= +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= + form-data@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" @@ -3375,6 +3517,15 @@ form-data@~0.1.0: combined-stream "~0.0.4" mime "~1.2.11" +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + formidable@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/formidable/-/formidable-1.2.2.tgz#bf69aea2972982675f00865342b982986f6b8dd9" @@ -3607,6 +3758,13 @@ get-value@^2.0.3, get-value@^2.0.6: resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= + dependencies: + assert-plus "^1.0.0" + git-hooks-list@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/git-hooks-list/-/git-hooks-list-1.0.3.tgz#be5baaf78203ce342f2f844a9d2b03dba1b45156" @@ -3792,6 +3950,19 @@ handlebars@^4.0.11, handlebars@^4.0.4, handlebars@^4.7.3: optionalDependencies: uglify-js "^3.1.4" +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= + +har-validator@~5.1.3: + version "5.1.5" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" + integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== + dependencies: + ajv "^6.12.3" + har-schema "^2.0.0" + has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" @@ -3966,6 +4137,13 @@ hosted-git-info@^3.0.6: dependencies: lru-cache "^6.0.0" +html-encoding-sniffer@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz#42a6dc4fd33f00281176e8b23759ca4e4fa185f3" + integrity sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ== + dependencies: + whatwg-encoding "^1.0.5" + html-escaper@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.0.tgz#71e87f931de3fe09e56661ab9a29aadec707b491" @@ -4031,6 +4209,15 @@ http-signature@~0.10.0: assert-plus "^0.1.5" ctype "0.5.3" +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + http2-wrapper@^1.0.0-beta.5.2: version "1.0.0-beta.5.2" resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-1.0.0-beta.5.2.tgz#8b923deb90144aea65cf834b016a340fc98556f3" @@ -4441,6 +4628,11 @@ is-plain-object@^5.0.0: resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== +is-potential-custom-element-name@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.0.tgz#0c52e54bcca391bb2c494b21e8626d7336c6e397" + integrity sha1-DFLlS8yjkbssSUsh6GJtczbG45c= + is-promise@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" @@ -4489,7 +4681,7 @@ is-type@0.0.1: dependencies: core-util-is "~1.0.0" -is-typedarray@^1.0.0: +is-typedarray@^1.0.0, is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= @@ -4551,6 +4743,11 @@ isobject@^4.0.0: resolved "https://registry.yarnpkg.com/isobject/-/isobject-4.0.0.tgz#3f1c9155e73b192022a80819bacd0343711697b0" integrity sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA== +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.0.0-alpha.1: version "3.0.0" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz#f5944a37c70b550b02a78a5c3b2055b280cec8ec" @@ -4644,6 +4841,43 @@ js-yaml@^3.13.1, js-yaml@^3.14.0, js-yaml@^3.2.5, js-yaml@^3.2.7: argparse "^1.0.7" esprima "^4.0.0" +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= + +jsdom@^16.4.0: + version "16.4.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.4.0.tgz#36005bde2d136f73eee1a830c6d45e55408edddb" + integrity sha512-lYMm3wYdgPhrl7pDcRmvzPhhrGVBeVhPIqeHjzeiHN3DFmD1RBpbExbi8vU7BJdH8VAZYovR8DMt0PNNDM7k8w== + dependencies: + abab "^2.0.3" + acorn "^7.1.1" + acorn-globals "^6.0.0" + cssom "^0.4.4" + cssstyle "^2.2.0" + data-urls "^2.0.0" + decimal.js "^10.2.0" + domexception "^2.0.1" + escodegen "^1.14.1" + html-encoding-sniffer "^2.0.1" + is-potential-custom-element-name "^1.0.0" + nwsapi "^2.2.0" + parse5 "5.1.1" + request "^2.88.2" + request-promise-native "^1.0.8" + saxes "^5.0.0" + symbol-tree "^3.2.4" + tough-cookie "^3.0.1" + w3c-hr-time "^1.0.2" + w3c-xmlserializer "^2.0.0" + webidl-conversions "^6.1.0" + whatwg-encoding "^1.0.5" + whatwg-mimetype "^2.3.0" + whatwg-url "^8.0.0" + ws "^7.2.3" + xml-name-validator "^3.0.0" + jsesc@^2.5.1: version "2.5.2" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" @@ -4674,6 +4908,11 @@ json-schema-traverse@^0.4.1: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= + json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" @@ -4686,7 +4925,7 @@ json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: dependencies: jsonify "~0.0.0" -json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.0: +json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.0, json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= @@ -4731,6 +4970,16 @@ jsonify@~0.0.0: resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + keyv@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9" @@ -4800,6 +5049,14 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" +levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + lines-and-columns@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" @@ -4996,6 +5253,11 @@ lodash.set@^4.3.2: resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23" integrity sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM= +lodash.sortby@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" + integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= + lodash.template@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" @@ -5224,6 +5486,11 @@ micromatch@^4.0.2: braces "^3.0.1" picomatch "^2.0.5" +mime-db@1.45.0: + version "1.45.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.45.0.tgz#cceeda21ccd7c3a745eba2decd55d4b73e7879ea" + integrity sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w== + mime-db@1.46.0: version "1.46.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.46.0.tgz#6267748a7f799594de3cbc8cde91def349661cee" @@ -5234,18 +5501,32 @@ mime-db@1.46.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== -mime-types@2.1.29, mime-types@^2.1.12, mime-types@^2.1.18, mime-types@^2.1.19, mime-types@^2.1.26, mime-types@~2.1.24: +mime-types@2.1.29, mime-types@~2.1.19: version "2.1.29" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.29.tgz#1d4ab77da64b91f5f72489df29236563754bb1b2" integrity sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ== dependencies: mime-db "1.46.0" +mime-types@^2.1.12, mime-types@^2.1.18, mime-types@^2.1.19, mime-types@^2.1.26: + version "2.1.27" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" + integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== + dependencies: + mime-db "1.44.0" + mime-types@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-1.0.2.tgz#995ae1392ab8affcbfcb2641dd054e943c0d5dce" integrity sha1-mVrhOSq4r/y/yyZB3QVOlDwNXc4= +mime-types@~2.1.24: + version "2.1.28" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.28.tgz#1160c4757eab2c5363888e005273ecf79d2a0ecd" + integrity sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ== + dependencies: + mime-db "1.45.0" + mime@1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" @@ -5585,6 +5866,11 @@ number-is-nan@^1.0.0: resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= +nwsapi@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7" + integrity sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ== + nyc@^15.1.0: version "15.1.0" resolved "https://registry.yarnpkg.com/nyc/-/nyc-15.1.0.tgz#1335dae12ddc87b6e249d5a1994ca4bdaea75f02" @@ -5623,6 +5909,11 @@ oauth-sign@~0.3.0: resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.3.0.tgz#cb540f93bb2b22a7d5941691a288d60e8ea9386e" integrity sha1-y1QPk7srIqfVlBaRoojWDo6pOG4= +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== + object-assign@4.1.1, object-assign@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -5717,6 +6008,18 @@ optimist@^0.6.1: minimist "~0.0.1" wordwrap "~0.0.2" +optionator@^0.8.1: + version "0.8.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.6" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + word-wrap "~1.2.3" + optionator@^0.9.1: version "0.9.1" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" @@ -5916,6 +6219,11 @@ parse-url@^5.0.0: parse-path "^4.0.0" protocols "^1.4.0" +parse5@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178" + integrity sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug== + parseqs@0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/parseqs/-/parseqs-0.0.6.tgz#8e4bb5a19d1cdc844a08ac974d34e273afa670d5" @@ -5998,6 +6306,11 @@ pathval@^1.1.0: resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" integrity sha1-uULm1L3mUwBe9rcTYd74cn0GReA= +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.1.tgz#21bac888b6ed8601f831ce7816e335bc779f0a4a" @@ -6048,6 +6361,11 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= + prepend-http@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" @@ -6183,6 +6501,11 @@ qs@~1.0.0: resolved "https://registry.yarnpkg.com/qs/-/qs-1.0.2.tgz#50a93e2b5af6691c31bcea5dae78ee6ea1903768" integrity sha1-UKk+K1r2aRwxvOpdrnjubqGQN2g= +qs@~6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== + quibble@^0.6.4: version "0.6.4" resolved "https://registry.yarnpkg.com/quibble/-/quibble-0.6.4.tgz#a8a4d6a4f3b7f1785a7edacb945082c046601c13" @@ -6400,6 +6723,48 @@ repeat-string@^1.6.1: resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= +request-promise-core@1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.4.tgz#3eedd4223208d419867b78ce815167d10593a22f" + integrity sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw== + dependencies: + lodash "^4.17.19" + +request-promise-native@^1.0.8: + version "1.0.9" + resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.9.tgz#e407120526a5efdc9a39b28a5679bf47b9d9dc28" + integrity sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g== + dependencies: + request-promise-core "1.1.4" + stealthy-require "^1.1.1" + tough-cookie "^2.3.3" + +request@^2.88.2: + version "2.88.2" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" + integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.5.0" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + request@~2.40.0: version "2.40.0" resolved "https://registry.yarnpkg.com/request/-/request-2.40.0.tgz#4dd670f696f1e6e842e66b4b5e839301ab9beb67" @@ -6605,7 +6970,7 @@ safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@>=5.1.0, safe-buffer@^5.1.0, safe-buffer@^5.1.2, safe-buffer@~5.2.0: +safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.2, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -6622,7 +6987,7 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" -"safer-buffer@>= 2.1.2 < 3": +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== @@ -6642,6 +7007,13 @@ sane@^4.0.0, sane@^4.1.0: minimist "^1.1.1" walker "~1.0.5" +saxes@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d" + integrity sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw== + dependencies: + xmlchars "^2.2.0" + semver-diff@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-3.1.1.tgz#05f77ce59f325e00e2706afd67bb506ddb1ca32b" @@ -6986,6 +7358,21 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= +sshpk@^1.7.0: + version "1.16.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" + integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + static-extend@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" @@ -6999,6 +7386,11 @@ static-extend@^0.1.1: resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= +stealthy-require@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" + integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= + string-template@~0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/string-template/-/string-template-0.2.1.tgz#42932e598a352d01fc22ec3367d9d84eec6c9add" @@ -7203,6 +7595,11 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" +symbol-tree@^3.2.4: + version "3.2.4" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" + integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== + symlink-or-copy@^1.0.0, symlink-or-copy@^1.0.1, symlink-or-copy@^1.1.8, symlink-or-copy@^1.2.0, symlink-or-copy@^1.3.0, symlink-or-copy@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/symlink-or-copy/-/symlink-or-copy-1.3.1.tgz#9506dd64d8e98fa21dcbf4018d1eab23e77f71fe" @@ -7432,7 +7829,7 @@ toidentifier@1.0.0: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== -tough-cookie@>=0.12.0: +tough-cookie@>=0.12.0, tough-cookie@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-3.0.1.tgz#9df4f57e739c26930a018184887f4adb7dca73b2" integrity sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg== @@ -7441,6 +7838,21 @@ tough-cookie@>=0.12.0: psl "^1.1.28" punycode "^2.1.1" +tough-cookie@^2.3.3, tough-cookie@~2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + +tr46@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-2.0.2.tgz#03273586def1595ae08fedb38d7733cee91d2479" + integrity sha512-3n1qG+/5kg+jrbTzwAykB5yRYtQCTqOGKq5U5PE3b0a1/mzo6snDhjGS0zJVJunO0NrT3Dg1MLy5TjWP/UJppg== + dependencies: + punycode "^2.1.1" + tree-sync@^1.2.2: version "1.4.0" resolved "https://registry.yarnpkg.com/tree-sync/-/tree-sync-1.4.0.tgz#314598d13abaf752547d9335b8f95d9a137100d6" @@ -7468,11 +7880,23 @@ tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35" integrity sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA== +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + dependencies: + safe-buffer "^5.0.1" + tunnel-agent@~0.4.0: version "0.4.3" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" integrity sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us= +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= + type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" @@ -7480,6 +7904,13 @@ type-check@^0.4.0, type-check@~0.4.0: dependencies: prelude-ls "^1.2.1" +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= + dependencies: + prelude-ls "~1.1.2" + type-detect@0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822" @@ -7701,7 +8132,7 @@ uuid@8.3.2, uuid@^8.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== -uuid@^3.3.3: +uuid@^3.3.2, uuid@^3.3.3: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== @@ -7723,6 +8154,29 @@ vary@~1.1.2: resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +w3c-hr-time@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" + integrity sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ== + dependencies: + browser-process-hrtime "^1.0.0" + +w3c-xmlserializer@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz#3e7104a05b75146cc60f564380b7f683acf1020a" + integrity sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA== + dependencies: + xml-name-validator "^3.0.0" + walk-sync@^0.3.0, walk-sync@^0.3.1, walk-sync@^0.3.3: version "0.3.4" resolved "https://registry.yarnpkg.com/walk-sync/-/walk-sync-0.3.4.tgz#cf78486cc567d3a96b5b2237c6108017a5ffb9a4" @@ -7785,6 +8239,16 @@ wcwidth@^1.0.1: dependencies: defaults "^1.0.3" +webidl-conversions@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff" + integrity sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA== + +webidl-conversions@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" + integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== + websocket-driver@>=0.5.1: version "0.7.3" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.3.tgz#a2d4e0d4f4f116f1e6297eba58b05d430100e9f9" @@ -7811,6 +8275,27 @@ websocket@^1.0.32: utf-8-validate "^5.0.2" yaeti "^0.0.6" +whatwg-encoding@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" + integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw== + dependencies: + iconv-lite "0.4.24" + +whatwg-mimetype@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" + integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== + +whatwg-url@^8.0.0: + version "8.4.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.4.0.tgz#50fb9615b05469591d2b2bd6dfaed2942ed72837" + integrity sha512-vwTUFf6V4zhcPkWp/4CQPr1TW9Ml6SF4lVyaIMBdJw5i6qUUJ1QWM4Z6YYVkfka0OUIzVo/0aNtGVGk256IKWw== + dependencies: + lodash.sortby "^4.7.0" + tr46 "^2.0.2" + webidl-conversions "^6.1.0" + which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" @@ -7858,7 +8343,7 @@ windows-release@^4.0.0: dependencies: execa "^4.0.2" -word-wrap@^1.2.3: +word-wrap@^1.2.3, word-wrap@~1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== @@ -7922,6 +8407,11 @@ write@1.0.3: dependencies: mkdirp "^0.5.1" +ws@^7.2.3: + version "7.4.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.3.tgz#1f9643de34a543b8edb124bdcbc457ae55a6e5cd" + integrity sha512-hr6vCR76GsossIRsr8OLR9acVVm1jyfEWvhbNjtgPOrfvAlKzvyeg/P6r8RuDjRyrcQoPQT7K0DGEPc7Ae6jzA== + ws@~7.4.2: version "7.4.2" resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.2.tgz#782100048e54eb36fe9843363ab1c68672b261dd" @@ -7932,6 +8422,16 @@ xdg-basedir@^4.0.0: resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-4.0.0.tgz#4bc8d9984403696225ef83a1573cbbcb4e79db13" integrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q== +xml-name-validator@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" + integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== + +xmlchars@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" + integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== + xmldom@^0.1.19: version "0.1.31" resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.31.tgz#b76c9a1bd9f0a9737e5a72dc37231cf38375e2ff" From fb9489f47fc8f70cfec8128854a11bed30dd3de0 Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Thu, 25 Feb 2021 14:47:43 -0800 Subject: [PATCH 653/818] fix lint errors --- tests/acceptance/preprocessor-smoke-test-slow.js | 6 ++++-- tests/helpers/dist-checker.js | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/acceptance/preprocessor-smoke-test-slow.js b/tests/acceptance/preprocessor-smoke-test-slow.js index 052bcad466..651f61a3e6 100644 --- a/tests/acceptance/preprocessor-smoke-test-slow.js +++ b/tests/acceptance/preprocessor-smoke-test-slow.js @@ -69,8 +69,10 @@ describe('Acceptance: preprocessor-smoke-test', function () { let checker = new DistChecker(path.join(appRoot, 'dist')); expect(checker.contains('js', 'replacedByPreprocessor'), 'token should have been replaced in app bundle').to.be; - expect(checker.contains('js', '__SECOND_PREPROCESSOR_REPLACEMENT_TOKEN__'), 'token should not be contained').to.not.be; - expect(checker.contains('js', '__FIRST_PREPROCESSOR_REPLACEMENT_TOKEN__'), 'token should not be contained').to.not.be; + expect(checker.contains('js', '__SECOND_PREPROCESSOR_REPLACEMENT_TOKEN__'), 'token should not be contained').to.not + .be; + expect(checker.contains('js', '__FIRST_PREPROCESSOR_REPLACEMENT_TOKEN__'), 'token should not be contained').to.not + .be; }); it('addons without preprocessors compile correctly', async function () { diff --git a/tests/helpers/dist-checker.js b/tests/helpers/dist-checker.js index 1f7b014b49..5fe094c459 100644 --- a/tests/helpers/dist-checker.js +++ b/tests/helpers/dist-checker.js @@ -2,6 +2,7 @@ const fs = require('fs'); const path = require('path'); +// eslint-disable-next-line node/no-unpublished-require const { JSDOM } = require('jsdom'); class DistChecker { From a13141dbdc7411ba6f8409aedd935b6f99a99fd8 Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Tue, 2 Mar 2021 11:54:28 -0800 Subject: [PATCH 654/818] skip embroider until embroider is released --- tests/acceptance/preprocessor-smoke-test-slow.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/acceptance/preprocessor-smoke-test-slow.js b/tests/acceptance/preprocessor-smoke-test-slow.js index 651f61a3e6..0185bce0f5 100644 --- a/tests/acceptance/preprocessor-smoke-test-slow.js +++ b/tests/acceptance/preprocessor-smoke-test-slow.js @@ -7,6 +7,7 @@ const runCommand = require('../helpers/run-command'); const acceptance = require('../helpers/acceptance'); const DistChecker = require('../helpers/dist-checker'); const copyFixtureFiles = require('../helpers/copy-fixture-files'); +const { isExperimentEnabled } = require('../../lib/experiments'); let createTestTargets = acceptance.createTestTargets; let teardownTestTargets = acceptance.teardownTestTargets; let linkDependencies = acceptance.linkDependencies; @@ -39,6 +40,9 @@ describe('Acceptance: preprocessor-smoke-test', function () { }); it('addons with standard preprocessors compile correctly', async function () { + if (isExperimentEnabled('EMBROIDER')) { + return this.skip(); + } await copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors`); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -56,6 +60,9 @@ describe('Acceptance: preprocessor-smoke-test', function () { }); it('addon registry entries are added in the proper order', async function () { + if (isExperimentEnabled('EMBROIDER')) { + return this.skip(); + } await copyFixtureFiles(`preprocessor-tests/app-registry-ordering`); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -76,6 +83,9 @@ describe('Acceptance: preprocessor-smoke-test', function () { }); it('addons without preprocessors compile correctly', async function () { + if (isExperimentEnabled('EMBROIDER')) { + return this.skip(); + } await copyFixtureFiles(`preprocessor-tests/app-with-addon-without-preprocessors`); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -100,6 +110,9 @@ describe('Acceptance: preprocessor-smoke-test', function () { |-- preprocessor should not apply to this */ it('addons depending on preprocessor addon preprocesses addon but not app', async function () { + if (isExperimentEnabled('EMBROIDER')) { + return this.skip(); + } await copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors-2`); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -140,6 +153,9 @@ describe('Acceptance: preprocessor-smoke-test', function () { |-- preprocessor should not apply to this */ it('addon N levels deep depending on preprocessor preprocesses that parent addon only', async function () { + if (isExperimentEnabled('EMBROIDER')) { + return this.skip(); + } await copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors-3`); let packageJsonPath = path.join(appRoot, 'package.json'); From 35324f88e14ff5319f20838926889f8c70db69e8 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 2 Mar 2021 23:04:11 +0000 Subject: [PATCH 655/818] Bump npm-package-arg from 8.1.0 to 8.1.1 (#9459) --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index a823e23a2e..0fa2fa4cb4 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "minimatch": "^3.0.4", "morgan": "^1.10.0", "nopt": "^3.0.6", - "npm-package-arg": "^8.1.0", + "npm-package-arg": "^8.1.1", "p-defer": "^3.0.0", "portfinder": "^1.0.28", "promise-map-series": "^0.3.0", diff --git a/yarn.lock b/yarn.lock index 64f0ff21eb..67ef3ba514 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5486,6 +5486,11 @@ micromatch@^4.0.2: braces "^3.0.1" picomatch "^2.0.5" +mime-db@1.44.0, "mime-db@>= 1.43.0 < 2": + version "1.44.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" + integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== + mime-db@1.45.0: version "1.45.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.45.0.tgz#cceeda21ccd7c3a745eba2decd55d4b73e7879ea" @@ -5496,11 +5501,6 @@ mime-db@1.46.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.46.0.tgz#6267748a7f799594de3cbc8cde91def349661cee" integrity sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ== -"mime-db@>= 1.43.0 < 2": - version "1.44.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" - integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== - mime-types@2.1.29, mime-types@~2.1.19: version "2.1.29" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.29.tgz#1d4ab77da64b91f5f72489df29236563754bb1b2" @@ -5828,10 +5828,10 @@ normalize-url@^4.1.0: resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129" integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ== -npm-package-arg@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-8.1.0.tgz#b5f6319418c3246a1c38e1a8fbaa06231bc5308f" - integrity sha512-/ep6QDxBkm9HvOhOg0heitSd7JHA1U7y1qhhlRlteYYAi9Pdb/ZV7FW5aHpkrpM8+P+4p/jjR8zCyKPBMBjSig== +npm-package-arg@^8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-8.1.1.tgz#00ebf16ac395c63318e67ce66780a06db6df1b04" + integrity sha512-CsP95FhWQDwNqiYS+Q0mZ7FAEDytDZAkNxQqea6IaAFJTAY9Lhhqyl0irU/6PMc7BGfUmnsbHcqxJD7XuVM/rg== dependencies: hosted-git-info "^3.0.6" semver "^7.0.0" From 647d32f1aca06a5b2aa33403d2333b95a4062b0c Mon Sep 17 00:00:00 2001 From: Edward Faulkner Date: Mon, 1 Mar 2021 14:53:17 -0500 Subject: [PATCH 656/818] defer tests warning If you load your tests via `` + `` ); break; From 2c1272217fad3ed5a5bec8778af8cf789745f4d2 Mon Sep 17 00:00:00 2001 From: Edward Faulkner Date: Mon, 1 Mar 2021 15:35:41 -0500 Subject: [PATCH 657/818] updating test to match --- tests/unit/utilities/ember-app-utils-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/utilities/ember-app-utils-test.js b/tests/unit/utilities/ember-app-utils-test.js index f4f87b74f2..faafc3c4c1 100644 --- a/tests/unit/utilities/ember-app-utils-test.js +++ b/tests/unit/utilities/ember-app-utils-test.js @@ -211,7 +211,7 @@ describe('ember-app-utils', function () { let output = contentFor(config, defaultMatch, 'test-body-footer', defaultOptions); expect(output, 'includes `` + `` ); }); }); From fbc17a26c5a2a0e324b8046b28ff25875fb47dd4 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Tue, 2 Mar 2021 18:49:18 -0500 Subject: [PATCH 658/818] Add 3.25.1 to CHANGELOG.md. --- CHANGELOG.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd82d966c2..cb43c176de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # ember-cli Changelog + +## v3.25.1 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.25.0...v3.25.1) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.25.0...v3.25.1) + +#### Changelog + +- [#9467](https://github.com/ember-cli/ember-cli/pull/9467) Defer `The tests file was not loaded.` warning until after `DOMContentLoaded` [@ef4](https://github.com/ef4) + + +Thank you to all who took the time to contribute! + + ## v3.25.0 #### Blueprint Changes From d25f09619df8f064a4cd7b8510b9c6e3dc06b831 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Tue, 2 Mar 2021 18:50:15 -0500 Subject: [PATCH 659/818] Release 3.25.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 417d307d83..8a8cfdb875 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.25.0", + "version": "3.25.1", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From acb40c0e8ce3cb47181571ce492ced80b56fe3bb Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 3 Mar 2021 00:18:51 +0000 Subject: [PATCH 660/818] Bump babel-plugin-module-resolver from 4.0.0 to 4.1.0 (#9458) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 0fa2fa4cb4..04c7e5cd7e 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "@babel/core": "^7.13.8", "@babel/plugin-transform-modules-amd": "^7.12.1", "amd-name-resolver": "^1.3.1", - "babel-plugin-module-resolver": "^4.0.0", + "babel-plugin-module-resolver": "^4.1.0", "bower-config": "^1.4.3", "bower-endpoint-parser": "0.2.2", "broccoli": "^3.5.1", diff --git a/yarn.lock b/yarn.lock index 67ef3ba514..96d27091cc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -979,10 +979,10 @@ babel-plugin-dynamic-import-node@^2.3.3: dependencies: object.assign "^4.1.0" -babel-plugin-module-resolver@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/babel-plugin-module-resolver/-/babel-plugin-module-resolver-4.0.0.tgz#8f3a3d9d48287dc1d3b0d5595113adabd36a847f" - integrity sha512-3pdEq3PXALilSJ6dnC4wMWr0AZixHRM4utpdpBR9g5QG7B7JwWyukQv7a9hVxkbGFl+nQbrHDqqQOIBtTXTP/Q== +babel-plugin-module-resolver@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/babel-plugin-module-resolver/-/babel-plugin-module-resolver-4.1.0.tgz#22a4f32f7441727ec1fbf4967b863e1e3e9f33e2" + integrity sha512-MlX10UDheRr3lb3P0WcaIdtCSRlxdQsB1sBqL7W0raF070bGl1HQQq5K3T2vf2XAYie+ww+5AKC/WrkjRO2knA== dependencies: find-babel-config "^1.2.0" glob "^7.1.6" From 01414c179540a641c1e5cc7fbcd2a8e5dffa4a1a Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Thu, 4 Mar 2021 13:29:36 -0800 Subject: [PATCH 661/818] Allow dist-checker to evaluate scripts to test window properties Add evalScripts to dist-checker so we can add tests like: ``` let checker = new DistChecker(path.join(appRoot, 'dist')); await checker.evalScripts(); let { window } = checker; expect(window.EmberENV.foo).to.eql('bar'); ``` --- tests/helpers/dist-checker.js | 49 ++++++++++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/tests/helpers/dist-checker.js b/tests/helpers/dist-checker.js index 5fe094c459..12e540e99b 100644 --- a/tests/helpers/dist-checker.js +++ b/tests/helpers/dist-checker.js @@ -3,19 +3,62 @@ const fs = require('fs'); const path = require('path'); // eslint-disable-next-line node/no-unpublished-require -const { JSDOM } = require('jsdom'); +const jsdom = require('jsdom'); + +class CustomResourceLoader extends jsdom.ResourceLoader { + constructor(distPath) { + super(); + this.distPath = distPath; + } + + fetch(url) { + let content = fs.readFileSync(path.join(this.distPath, url.replace('file://./', '')), 'utf8'); + return Promise.resolve(Buffer.from(content)); + } +} class DistChecker { constructor(distPath) { this.distPath = distPath; + } - let html = fs.readFileSync(path.join(distPath, 'index.html'), 'utf8'); - this.dom = new JSDOM(html); + _evalHtml(options = {}) { + let html = fs.readFileSync(path.join(this.distPath, 'index.html'), 'utf8'); + this.dom = new jsdom.JSDOM(html, options); this.scripts = this.dom.window.document.querySelectorAll('script'); this.links = this.dom.window.document.querySelectorAll('link'); } + evalScripts(timeout = 15000) { + this._evalHtml({ + url: `file://.`, + runScripts: 'dangerously', + resources: new CustomResourceLoader(this.distPath), + }); + + // ember-data expects window.crypto to exists however JSDom does not + // impliment this: https://github.com/jsdom/jsdom/issues/1612 + this.dom.window.crypto = () => {}; + return new Promise((resolve, reject) => { + // reject if the scripts take longer than 15 seconds to load. + let timeoutId = setTimeout(reject, timeout); + + this.dom.window.addEventListener('load', () => { + clearTimeout(timeoutId); + return resolve(); + }); + }); + } + + get window() { + return this.dom.window; + } + contains(fileType, token) { + if (!this.dom) { + this._evalHtml({}); + } + if (fileType === 'js') { for (let element of this.scripts) { let src = element.getAttribute('src'); From 9d52efdabc397dcaeb5fcea3aba6f7b6ce3cd86e Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Thu, 4 Mar 2021 14:52:09 -0800 Subject: [PATCH 662/818] Convert nested-addon-smoke-test to use DistChecker for Embroider DistChecker allows us to test against classic and Embroider builds for tests that explicitly check for file assets in dist (Embroider does not make any guaranties about file names in dist) --- .../nested-addons-smoke-test-slow.js | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/tests/acceptance/nested-addons-smoke-test-slow.js b/tests/acceptance/nested-addons-smoke-test-slow.js index b114f842cb..8c41da9773 100644 --- a/tests/acceptance/nested-addons-smoke-test-slow.js +++ b/tests/acceptance/nested-addons-smoke-test-slow.js @@ -7,6 +7,7 @@ const runCommand = require('../helpers/run-command'); const acceptance = require('../helpers/acceptance'); const copyFixtureFiles = require('../helpers/copy-fixture-files'); const { isExperimentEnabled } = require('../../lib/experiments'); +const DistChecker = require('../helpers/dist-checker'); let createTestTargets = acceptance.createTestTargets; let teardownTestTargets = acceptance.teardownTestTargets; let linkDependencies = acceptance.linkDependencies; @@ -14,7 +15,6 @@ let cleanupRun = acceptance.cleanupRun; const chai = require('../chai'); let expect = chai.expect; -let file = chai.file; let dir = chai.dir; let appName = 'some-cool-app'; @@ -52,27 +52,24 @@ describe('Acceptance: nested-addons-smoke-test', function () { await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - expect(file('dist/assets/vendor.js')).to.contain('INNER_ADDON_IMPORT_WITH_APP_IMPORT'); - expect(file('dist/assets/vendor.js')).to.contain('INNER_ADDON_IMPORT_WITH_THIS_IMPORT'); + let checker = new DistChecker(path.join(appRoot, 'dist')); + + expect(checker.contains('js', 'INNER_ADDON_IMPORT_WITH_APP_IMPORT')).to.be; + expect(checker.contains('js', 'INNER_ADDON_IMPORT_WITH_THIS_IMPORT')).to.be; // RAW comments should have been converted to PREPROCESSED by // tests/fixtures/addon/with-nested-addons/node_modules/ember-top-addon/node_modules/preprocesstree-addon // then from PREPROCESSED to POSTPROCESSED by // tests/fixtures/addon/with-nested-addons/node_modules/ember-top-addon/node_modules/postprocesstree-addon - expect(file('dist/assets/vendor.js')).to.contain( - 'POSTPROCESSED node_modules/ember-top-addon/addon/templates/application.hbs' - ); - expect(file('dist/assets/vendor.js')).to.contain('POSTPROCESSED node_modules/ember-top-addon/addon/index.js'); - expect(file('dist/assets/vendor.css')).to.contain( - 'POSTPROCESSED node_modules/ember-top-addon/addon/styles/app.css' - ); + expect(checker.contains('js', 'POSTPROCESSED node_modules/ember-top-addon/addon/templates/application.hbs')).to.be; + expect(checker.contains('js', 'POSTPROCESSED node_modules/ember-top-addon/addon/index.js')).to.be; + expect(checker.contains('css', 'POSTPROCESSED node_modules/ember-top-addon/addon/styles/app.css')).to.be; // the pre/post process tree hooks above should *not* have changed RAW's in the current app - expect(file('dist/assets/some-cool-app.js')).to.contain('RAW app/foo.js'); + expect(checker.contains('js', 'RAW app/foo.js')).to.be; // should *not* have changed RAW's in sibling addons - expect(file('dist/assets/vendor.js')).to.contain( - 'RAW node_modules/ember-top-addon/node_modules/ember-inner-addon/addon/index.js' - ); + expect(checker.contains('js', 'RAW node_modules/ember-top-addon/node_modules/ember-inner-addon/addon/index.js')).to + .be; }); }); From 2e3ee0c0c1cea611514e8578b2549c16a07f3afa Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Thu, 4 Mar 2021 15:02:33 -0800 Subject: [PATCH 663/818] rerun tests From 8c9270dc9e606b9cc04bbf4b20927b6e8909051b Mon Sep 17 00:00:00 2001 From: Edward Faulkner Date: Fri, 5 Mar 2021 09:44:17 -0500 Subject: [PATCH 664/818] Better error message for missing addon main When an addon's main file is missing, you get a very cryptic message and stack trace that don't tell you which addon is responsible: ``` - stack: TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received undefined at validateString (internal/validators.js:124:11) at Module.require (internal/modules/cjs/loader.js:945:3) at require (internal/modules/cjs/helpers.js:88:18) at PackageInfo.getAddonConstructor (/Users/edward/hacking/ember-auto-import/node_modules/ember-cli/lib/models/package-info-cache/package-info.js:384:18) at /Users/edward/hacking/ember-auto-import/node_modules/ember-cli/lib/models/instantiate-addons.js:71:38 at Vertices.each (/Users/edward/hacking/ember-auto-import/node_modules/dag-map/dag-map.umd.js:197:13) at Vertices.walk (/Users/edward/hacking/ember-auto-import/node_modules/dag-map/dag-map.umd.js:125:14) at DAG.each (/Users/edward/hacking/ember-auto-import/node_modules/dag-map/dag-map.umd.js:68:24) at instantiateAddons (/Users/edward/hacking/ember-auto-import/node_modules/ember-cli/lib/models/instantiate-addons.js:52:9) at Project.initializeAddons (/Users/edward/hacking/ember-auto-import/node_modules/ember-cli/lib/models/project.js:476:19) ``` This is especially painful if it's happening in CI because, for example, some precompile step is being missed. This PR makes the error much nicer: ``` - stack: Error: ember-auto-import at /Users/edward/hacking/ember-auto-import/packages/ember-auto-import is missing its addon main file at PackageInfo.getAddonConstructor (/Users/edward/hacking/ember-cli/lib/models/package-info-cache/package-info.js:386:13) at /Users/edward/hacking/ember-cli/lib/models/instantiate-addons.js:71:38 at Vertices.each (/Users/edward/hacking/ember-cli/node_modules/dag-map/dag-map.umd.js:197:13) at Vertices.walk (/Users/edward/hacking/ember-cli/node_modules/dag-map/dag-map.umd.js:125:14) at DAG.each (/Users/edward/hacking/ember-cli/node_modules/dag-map/dag-map.umd.js:68:24) at instantiateAddons (/Users/edward/hacking/ember-cli/lib/models/instantiate-addons.js:52:9) at Project.initializeAddons (/Users/edward/hacking/ember-cli/lib/models/project.js:457:19) at Project.eachAddonCommand (/Users/edward/hacking/ember-cli/lib/models/project.js:518:12) at module.exports (/Users/edward/hacking/ember-cli/lib/cli/lookup-command.js:33:13) at CLI.maybeMakeCommand (/Users/edward/hacking/ember-cli/lib/cli/cli.js:94:26) ``` I found that there was [already some code](https://github.com/ember-cli/ember-cli/blob/7217cf7ed29fccf33a1187e08477d7ac271fa434/lib/models/package-info-cache/index.js#L535) to detect this error condition, but the only place that actually checks that error status is in a test. --- lib/models/package-info-cache/package-info.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/models/package-info-cache/package-info.js b/lib/models/package-info-cache/package-info.js index d7863d4a4e..491b799fc2 100644 --- a/lib/models/package-info-cache/package-info.js +++ b/lib/models/package-info-cache/package-info.js @@ -382,6 +382,10 @@ class PackageInfo { return this.addonConstructor; } + if (!this.addonMainPath) { + throw new Error(`${this.pkg.name} at ${this.realPath} is missing its addon main file`); + } + // Load the addon. // TODO: Future work - allow a time budget for loading each addon and warn // or error for those that take too long. From 8ebcdfc7eaedb51122fd1260f18776a2f9af35ed Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sat, 6 Mar 2021 13:35:40 -0500 Subject: [PATCH 665/818] Update CHANGELOG.md for 3.25.2. --- CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb43c176de..877ddf4117 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,20 @@ # ember-cli Changelog +## v3.25.2 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.25.1...v3.25.2) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.25.1...v3.25.2) + +#### Changelog + +- [#9473](https://github.com/ember-cli/ember-cli/pull/9473) Issue a better error message for add-on's missing an entry point (e.g. invalid `ember-addon.main` path) [@ef4](https://github.com/ef4) + +Thank you to all who took the time to contribute! + + ## v3.25.1 #### Blueprint Changes From c7cb5800d9ddbe7140d1c112504f3ccd66d1e767 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sat, 6 Mar 2021 13:37:24 -0500 Subject: [PATCH 666/818] Release 3.25.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8a8cfdb875..3cdf2adb4b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.25.1", + "version": "3.25.2", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From 140f7f50d55e8e7109e27fe9da9e097a0071fcc8 Mon Sep 17 00:00:00 2001 From: rpemberton Date: Tue, 2 Mar 2021 12:31:38 +0000 Subject: [PATCH 667/818] feat: lint fix after blueprint generation #9429 --- lib/commands/generate.js | 1 + lib/commands/init.js | 1 + lib/models/blueprint.js | 2 + lib/tasks/generate-from-blueprint.js | 29 ++++++-- lib/tasks/install-blueprint.js | 12 +++- lib/utilities/lint-fix.js | 32 +++++++++ tests/acceptance/generate-test.js | 11 +++ tests/acceptance/init-test.js | 20 ++++++ tests/acceptance/smoke-test-slow.js | 45 ++++++++++++ .../.eslintrc.js | 53 ++++++++++++++ .../.prettierrc.js | 5 ++ .../.template-lintrc.js | 8 +++ .../.travis.yml | 25 +++++++ .../README.md | 56 +++++++++++++++ .../app/templates/application.hbs | 7 ++ .../files/app/components/__name__.hbs | 1 + .../files/app/components/__name__.js | 1 + .../config/ember-cli-update.json | 18 +++++ .../ember-cli-build.js | 24 +++++++ .../package.json | 69 +++++++++++++++++++ tests/fixtures/help/generate-blueprint.txt | 2 + tests/fixtures/help/generate-with-addon.txt | 2 + tests/fixtures/help/help-with-addon.txt | 4 ++ tests/fixtures/help/help.js | 14 ++++ tests/fixtures/help/help.txt | 4 ++ tests/fixtures/help/with-addon-blueprints.js | 14 ++++ tests/fixtures/help/with-addon-commands.js | 14 ++++ tests/helpers/ember.js | 5 ++ 28 files changed, 473 insertions(+), 6 deletions(-) create mode 100644 lib/utilities/lint-fix.js create mode 100644 tests/fixtures/app/with-blueprint-override-lint-fail/.eslintrc.js create mode 100644 tests/fixtures/app/with-blueprint-override-lint-fail/.prettierrc.js create mode 100644 tests/fixtures/app/with-blueprint-override-lint-fail/.template-lintrc.js create mode 100644 tests/fixtures/app/with-blueprint-override-lint-fail/.travis.yml create mode 100644 tests/fixtures/app/with-blueprint-override-lint-fail/README.md create mode 100644 tests/fixtures/app/with-blueprint-override-lint-fail/app/templates/application.hbs create mode 100644 tests/fixtures/app/with-blueprint-override-lint-fail/blueprints/component/files/app/components/__name__.hbs create mode 100644 tests/fixtures/app/with-blueprint-override-lint-fail/blueprints/component/files/app/components/__name__.js create mode 100644 tests/fixtures/app/with-blueprint-override-lint-fail/config/ember-cli-update.json create mode 100644 tests/fixtures/app/with-blueprint-override-lint-fail/ember-cli-build.js create mode 100644 tests/fixtures/app/with-blueprint-override-lint-fail/package.json diff --git a/lib/commands/generate.js b/lib/commands/generate.js index 6d488abe52..d1ba325632 100644 --- a/lib/commands/generate.js +++ b/lib/commands/generate.js @@ -22,6 +22,7 @@ module.exports = Command.extend({ { name: 'classic', type: Boolean, default: false, aliases: ['c'] }, { name: 'dummy', type: Boolean, default: false, aliases: ['dum', 'id'] }, { name: 'in-repo-addon', type: String, default: null, aliases: ['in-repo', 'ir'] }, + { name: 'skip-lint-fix', type: Boolean, default: false, aliases: ['slf'] }, { name: 'in', type: String, diff --git a/lib/commands/init.js b/lib/commands/init.js index 121256cd2f..a6dd2fd8d6 100644 --- a/lib/commands/init.js +++ b/lib/commands/init.js @@ -22,6 +22,7 @@ module.exports = Command.extend({ { name: 'blueprint', type: String, aliases: ['b'] }, { name: 'skip-npm', type: Boolean, default: false, aliases: ['sn'] }, { name: 'skip-bower', type: Boolean, default: false, aliases: ['sb'] }, + { name: 'skip-lint-fix', type: Boolean, default: false, aliases: ['slf'] }, { name: 'welcome', type: Boolean, diff --git a/lib/models/blueprint.js b/lib/models/blueprint.js index 0736c9753f..a6e251a907 100644 --- a/lib/models/blueprint.js +++ b/lib/models/blueprint.js @@ -433,6 +433,8 @@ let Blueprint = CoreObject.extend({ // run afterInstall/afterUninstall userland hooks await afterHook.call(this, options); + + return fileInfos; }, /** diff --git a/lib/tasks/generate-from-blueprint.js b/lib/tasks/generate-from-blueprint.js index 45ab47d74a..0e8bbc6870 100644 --- a/lib/tasks/generate-from-blueprint.js +++ b/lib/tasks/generate-from-blueprint.js @@ -4,6 +4,8 @@ const Blueprint = require('../models/blueprint'); const Task = require('../models/task'); const parseOptions = require('../utilities/parse-options'); const merge = require('ember-cli-lodash-subset').merge; +const logger = require('heimdalljs-logger')('ember-cli:generate-from-blueprint'); +const lintFix = require('../utilities/lint-fix'); class GenerateTask extends Task { constructor(options) { @@ -12,6 +14,19 @@ class GenerateTask extends Task { } async run(options) { + let fileInfos = await this.createBlueprints(options); + + if (!options.skipLintFix) { + try { + let fileDisplayPaths = fileInfos.map(({ displayPath }) => displayPath); + await lintFix.run(fileDisplayPaths); + } catch (error) { + logger.error('Lint fix failed'); + } + } + } + + async createBlueprints(options) { let name = options.args[0]; let noAddonBlueprint = ['mixin', 'blueprint-test']; @@ -61,7 +76,8 @@ class GenerateTask extends Task { blueprintOptions = merge(blueprintOptions, options || {}); - await mainBlueprint[this.blueprintFunction](blueprintOptions); + let mainBlueprintFiles = await mainBlueprint[this.blueprintFunction](blueprintOptions); + let testBlueprintFiles = []; if (testBlueprint) { if (testBlueprint.locals === Blueprint.prototype.locals) { testBlueprint.locals = function (options) { @@ -70,14 +86,15 @@ class GenerateTask extends Task { } let testBlueprintOptions = merge({}, blueprintOptions, { installingTest: true }); - await testBlueprint[this.blueprintFunction](testBlueprintOptions); + + testBlueprintFiles = await testBlueprint[this.blueprintFunction](testBlueprintOptions); } if (!addonBlueprint || name.match(/-addon/)) { - return; + return [...mainBlueprintFiles, ...testBlueprintFiles]; } if (!this.project.isEmberCLIAddon() && blueprintOptions.inRepoAddon === null) { - return; + return [...mainBlueprintFiles, ...testBlueprintFiles]; } if (addonBlueprint.locals === Blueprint.prototype.locals) { @@ -88,7 +105,9 @@ class GenerateTask extends Task { let addonBlueprintOptions = merge({}, blueprintOptions, { installingAddon: true }); - return addonBlueprint[this.blueprintFunction](addonBlueprintOptions); + let addonBlueprintFiles = await addonBlueprint[this.blueprintFunction](addonBlueprintOptions); + + return [...mainBlueprintFiles, ...testBlueprintFiles, ...addonBlueprintFiles]; } lookupBlueprint(name, ignoreMissing) { diff --git a/lib/tasks/install-blueprint.js b/lib/tasks/install-blueprint.js index 65a1c68483..b31f04030a 100644 --- a/lib/tasks/install-blueprint.js +++ b/lib/tasks/install-blueprint.js @@ -10,6 +10,7 @@ const merge = require('ember-cli-lodash-subset').merge; const execa = require('../utilities/execa'); const SilentError = require('silent-error'); const npa = require('npm-package-arg'); +const lintFix = require('../utilities/lint-fix'); const logger = require('heimdalljs-logger')('ember-cli:tasks:install-blueprint'); @@ -45,7 +46,16 @@ class InstallBlueprintTask extends Task { let blueprint = await this._resolveBlueprint(blueprintOption); logger.info(`Installing blueprint into "${target}" ...`); - return blueprint.install(installOptions); + let fileInfos = await blueprint.install(installOptions); + + if (!options.skipLintFix) { + try { + let fileDisplayPaths = fileInfos.map(({ displayPath }) => displayPath); + await lintFix.run(fileDisplayPaths); + } catch (error) { + logger.error('Lint fix failed'); + } + } } async _resolveBlueprint(name) { diff --git a/lib/utilities/lint-fix.js b/lib/utilities/lint-fix.js new file mode 100644 index 0000000000..51f285f1d0 --- /dev/null +++ b/lib/utilities/lint-fix.js @@ -0,0 +1,32 @@ +'use strict'; + +const execa = require('execa'); + +function eslint(filePaths) { + return execa('eslint', [...filePaths, '--fix'], { cwd: process.cwd(), preferLocal: true }); +} + +function emberTemplateLint(filePaths) { + return execa('ember-template-lint', [...filePaths, '--fix'], { cwd: process.cwd(), preferLocal: true }); +} + +function run(filePaths = []) { + let jsPaths = filePaths.filter((path) => path.endsWith('.js')); + let hbsPaths = filePaths.filter((path) => path.endsWith('.hbs')); + + let lintFixProcesses = []; + + if (jsPaths.length) { + lintFixProcesses.push(eslint(jsPaths)); + } + + if (hbsPaths.length) { + lintFixProcesses.push(emberTemplateLint(hbsPaths)); + } + + return Promise.all(lintFixProcesses); +} + +module.exports = { + run, +}; diff --git a/tests/acceptance/generate-test.js b/tests/acceptance/generate-test.js index bbf16bb516..612c15c71b 100755 --- a/tests/acceptance/generate-test.js +++ b/tests/acceptance/generate-test.js @@ -12,6 +12,8 @@ let tmproot = path.join(root, 'tmp'); const Blueprint = require('../../lib/models/blueprint'); const BlueprintNpmTask = require('ember-cli-internal-test-helpers/lib/helpers/disable-npm-on-blueprint'); const mkTmpDirIn = require('../../lib/utilities/mk-tmp-dir-in'); +const td = require('testdouble'); +const lintFix = require('../../lib/utilities/lint-fix'); const chai = require('../chai'); let expect = chai.expect; @@ -37,6 +39,7 @@ describe('Acceptance: ember generate', function () { }); afterEach(function () { + td.reset(); process.chdir(root); return remove(tmproot); }); @@ -343,4 +346,12 @@ describe('Acceptance: ember generate', function () { expect(file('app/foos/bar.js')).to.contain('export default Ember.Object.extend({ foo: two });'); }); + + it('lint fixes blueprints', async function () { + let lintFixStub = td.replace(lintFix, 'run'); + + await generate(['blueprint', 'foo', '--skip-lint-fix=false']); + + td.verify(lintFixStub([path.join('blueprints', 'foo', 'index.js')]), { times: 1 }); + }); }); diff --git a/tests/acceptance/init-test.js b/tests/acceptance/init-test.js index 497473f780..780cca9ef9 100644 --- a/tests/acceptance/init-test.js +++ b/tests/acceptance/init-test.js @@ -14,6 +14,8 @@ let intersect = lodash.intersection; let remove = lodash.remove; let forEach = lodash.forEach; const EOL = require('os').EOL; +const td = require('testdouble'); +const lintFix = require('../../lib/utilities/lint-fix'); const chai = require('../chai'); let expect = chai.expect; @@ -34,6 +36,7 @@ describe('Acceptance: ember init', function () { }); afterEach(function () { + td.reset(); return tmp.teardown(tmpPath); }); @@ -166,4 +169,21 @@ describe('Acceptance: ember init', function () { expect(dir('.git')).to.not.exist; }); + + it('init includes lint fix', async function () { + let lintFixStub = td.replace(lintFix, 'run'); + + await ember(['init', '--skip-npm', '--skip-bower', '--skip-lint-fix=false']); + + td.verify( + lintFixStub( + td.matchers.argThat(function (arr) { + return arr.length > 0 && typeof arr[0] === 'string'; + }) + ), + { times: 1 } + ); + + confirmBlueprinted(); + }); }); diff --git a/tests/acceptance/smoke-test-slow.js b/tests/acceptance/smoke-test-slow.js index b25309c57d..31f12a46b0 100644 --- a/tests/acceptance/smoke-test-slow.js +++ b/tests/acceptance/smoke-test-slow.js @@ -5,6 +5,7 @@ const fs = require('fs-extra'); const crypto = require('crypto'); const walkSync = require('walk-sync'); const EOL = require('os').EOL; +const execa = require('execa'); const acceptance = require('../helpers/acceptance'); const copyFixtureFiles = require('../helpers/copy-fixture-files'); @@ -561,4 +562,48 @@ module.exports = function() { expect(output).to.match(/fail\s+2/, 'two templates failed linting'); expect(result.code).to.equal(1); }); + + describe('ember generate skip-lint-fix argument', function () { + beforeEach(async function () { + await copyFixtureFiles('app/with-blueprint-override-lint-fail'); + }); + + let newComponent = 'foo-bar'; + let newFiles = { + js: path.join('app', 'components', 'foo-bar.js'), + hbs: path.join('app', 'components', 'foo-bar.hbs'), + }; + + it('does not fix lint errors when --skip-lint-fix=true', async function () { + await ember([ + 'generate', + 'component', + newComponent, + '--component-class=@ember/component', + '--skip-lint-fix=true', + ]); + + await expect(execa('eslint', [newFiles.js], { cwd: appRoot, preferLocal: true })).to.eventually.be.rejectedWith( + newFiles.js + ); + + await expect( + execa('ember-template-lint', [newFiles.hbs], { cwd: appRoot, preferLocal: true }) + ).to.eventually.be.rejectedWith(newFiles.hbs); + }); + + it('does fix lint errors when --skip-lint-fix=false', async function () { + await ember([ + 'generate', + 'component', + newComponent, + '--component-class=@ember/component', + '--skip-lint-fix=false', + ]); + + await expect(execa('eslint', [newFiles.js], { cwd: appRoot, preferLocal: true })).to.eventually.be.ok; + await expect(execa('ember-template-lint', [newFiles.hbs], { cwd: appRoot, preferLocal: true })).to.eventually.be + .ok; + }); + }); }); diff --git a/tests/fixtures/app/with-blueprint-override-lint-fail/.eslintrc.js b/tests/fixtures/app/with-blueprint-override-lint-fail/.eslintrc.js new file mode 100644 index 0000000000..da079e309d --- /dev/null +++ b/tests/fixtures/app/with-blueprint-override-lint-fail/.eslintrc.js @@ -0,0 +1,53 @@ +'use strict'; + +module.exports = { + root: true, + parser: 'babel-eslint', + parserOptions: { + ecmaVersion: 2018, + sourceType: 'module', + ecmaFeatures: { + legacyDecorators: true, + }, + }, + plugins: ['ember'], + extends: [ + 'eslint:recommended', + 'plugin:ember/recommended', + 'plugin:prettier/recommended', + ], + env: { + browser: true, + }, + rules: {}, + overrides: [ + // node files + { + files: [ + '.eslintrc.js', + '.prettierrc.js', + '.template-lintrc.js', + 'ember-cli-build.js', + 'testem.js', + 'blueprints/*/index.js', + 'config/**/*.js', + 'lib/*/index.js', + 'server/**/*.js', + ], + parserOptions: { + sourceType: 'script', + }, + env: { + browser: false, + node: true, + }, + plugins: ['node'], + extends: ['plugin:node/recommended'], + rules: { + // this can be removed once the following is fixed + // https://github.com/mysticatea/eslint-plugin-node/issues/77 + 'node/no-unpublished-require': 'off', + }, + }, + ], +}; diff --git a/tests/fixtures/app/with-blueprint-override-lint-fail/.prettierrc.js b/tests/fixtures/app/with-blueprint-override-lint-fail/.prettierrc.js new file mode 100644 index 0000000000..6d05baa3d4 --- /dev/null +++ b/tests/fixtures/app/with-blueprint-override-lint-fail/.prettierrc.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = { + singleQuote: true, // blueprint overrides use double quotes +}; diff --git a/tests/fixtures/app/with-blueprint-override-lint-fail/.template-lintrc.js b/tests/fixtures/app/with-blueprint-override-lint-fail/.template-lintrc.js new file mode 100644 index 0000000000..6f77a224e9 --- /dev/null +++ b/tests/fixtures/app/with-blueprint-override-lint-fail/.template-lintrc.js @@ -0,0 +1,8 @@ +'use strict'; + +module.exports = { + extends: 'octane', + rules: { + 'require-button-type': true, // blueprint override has missing button type + }, +}; diff --git a/tests/fixtures/app/with-blueprint-override-lint-fail/.travis.yml b/tests/fixtures/app/with-blueprint-override-lint-fail/.travis.yml new file mode 100644 index 0000000000..5b5ce9da2c --- /dev/null +++ b/tests/fixtures/app/with-blueprint-override-lint-fail/.travis.yml @@ -0,0 +1,25 @@ +--- +language: node_js +node_js: + - "10" + +dist: xenial + +addons: + chrome: stable + +cache: + directories: + - $HOME/.npm + +env: + global: + # See https://git.io/vdao3 for details. + - JOBS=1 + +branches: + only: + - master + +script: + - npm test diff --git a/tests/fixtures/app/with-blueprint-override-lint-fail/README.md b/tests/fixtures/app/with-blueprint-override-lint-fail/README.md new file mode 100644 index 0000000000..dba454682e --- /dev/null +++ b/tests/fixtures/app/with-blueprint-override-lint-fail/README.md @@ -0,0 +1,56 @@ +# foo + +This README outlines the details of collaborating on this Ember application. +A short introduction of this app could easily go here. + +## Prerequisites + +You will need the following things properly installed on your computer. + +* [Git](https://git-scm.com/) +* [Node.js](https://nodejs.org/) (with npm) +* [Ember CLI](https://ember-cli.com/) +* [Google Chrome](https://google.com/chrome/) + +## Installation + +* `git clone ` this repository +* `cd foo` +* `npm install` + +## Running / Development + +* `ember serve` +* Visit your app at [http://localhost:4200](http://localhost:4200). +* Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests). + +### Code Generators + +Make use of the many generators for code, try `ember help generate` for more details + +### Running Tests + +* `ember test` +* `ember test --server` + +### Linting + +* `npm run lint` +* `npm run lint:fix` + +### Building + +* `ember build` (development) +* `ember build --environment production` (production) + +### Deploying + +Specify what it takes to deploy your app. + +## Further Reading / Useful Links + +* [ember.js](https://emberjs.com/) +* [ember-cli](https://ember-cli.com/) +* Development Browser Extensions + * [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi) + * [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/) diff --git a/tests/fixtures/app/with-blueprint-override-lint-fail/app/templates/application.hbs b/tests/fixtures/app/with-blueprint-override-lint-fail/app/templates/application.hbs new file mode 100644 index 0000000000..c50aa5fb7c --- /dev/null +++ b/tests/fixtures/app/with-blueprint-override-lint-fail/app/templates/application.hbs @@ -0,0 +1,7 @@ +{{page-title "Foo"}} + +{{!-- The following component displays Ember's default welcome message. --}} + +{{!-- Feel free to remove this! --}} + +{{outlet}} \ No newline at end of file diff --git a/tests/fixtures/app/with-blueprint-override-lint-fail/blueprints/component/files/app/components/__name__.hbs b/tests/fixtures/app/with-blueprint-override-lint-fail/blueprints/component/files/app/components/__name__.hbs new file mode 100644 index 0000000000..f72a7ea3e6 --- /dev/null +++ b/tests/fixtures/app/with-blueprint-override-lint-fail/blueprints/component/files/app/components/__name__.hbs @@ -0,0 +1 @@ + diff --git a/tests/fixtures/app/with-blueprint-override-lint-fail/blueprints/component/files/app/components/__name__.js b/tests/fixtures/app/with-blueprint-override-lint-fail/blueprints/component/files/app/components/__name__.js new file mode 100644 index 0000000000..85ce559e8f --- /dev/null +++ b/tests/fixtures/app/with-blueprint-override-lint-fail/blueprints/component/files/app/components/__name__.js @@ -0,0 +1 @@ +console.log("foo"); diff --git a/tests/fixtures/app/with-blueprint-override-lint-fail/config/ember-cli-update.json b/tests/fixtures/app/with-blueprint-override-lint-fail/config/ember-cli-update.json new file mode 100644 index 0000000000..a0462c3b6e --- /dev/null +++ b/tests/fixtures/app/with-blueprint-override-lint-fail/config/ember-cli-update.json @@ -0,0 +1,18 @@ +{ + "schemaVersion": "1.0.0", + "packages": [ + { + "name": "ember-cli", + "version": "<%= emberCLIVersion %>", + "blueprints": [ + { + "name": "app", + "outputRepo": "https://github.com/ember-cli/ember-new-output", + "codemodsSource": "ember-app-codemods-manifest@1", + "isBaseBlueprint": true, + "options": [] + } + ] + } + ] +} diff --git a/tests/fixtures/app/with-blueprint-override-lint-fail/ember-cli-build.js b/tests/fixtures/app/with-blueprint-override-lint-fail/ember-cli-build.js new file mode 100644 index 0000000000..48e94e9e44 --- /dev/null +++ b/tests/fixtures/app/with-blueprint-override-lint-fail/ember-cli-build.js @@ -0,0 +1,24 @@ +'use strict'; + +const EmberApp = require('ember-cli/lib/broccoli/ember-app'); + +module.exports = function (defaults) { + let app = new EmberApp(defaults, { + // Add options here + }); + + // Use `app.import` to add additional libraries to the generated + // output files. + // + // If you need to use different assets in different + // environments, specify an object as the first parameter. That + // object's keys should be the environment name and the values + // should be the asset to use in that environment. + // + // If the library that you are including contains AMD or ES6 + // modules that you would like to import into your application + // please specify an object with the list of modules as keys + // along with the exports of each module as its value. + + return app.toTree(); +}; diff --git a/tests/fixtures/app/with-blueprint-override-lint-fail/package.json b/tests/fixtures/app/with-blueprint-override-lint-fail/package.json new file mode 100644 index 0000000000..887ab0ad51 --- /dev/null +++ b/tests/fixtures/app/with-blueprint-override-lint-fail/package.json @@ -0,0 +1,69 @@ +{ + "name": "foo", + "version": "0.0.0", + "private": true, + "description": "Small description for foo goes here", + "repository": "", + "license": "MIT", + "author": "", + "directories": { + "doc": "doc", + "test": "tests" + }, + "scripts": { + "build": "ember build --environment=production", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'", + "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix", + "lint:hbs": "ember-template-lint .", + "lint:hbs:fix": "ember-template-lint . --fix", + "lint:js": "eslint . --cache", + "lint:js:fix": "eslint . --fix", + "start": "ember serve", + "test": "npm-run-all lint test:*", + "test:ember": "ember test" + }, + "devDependencies": { + "@ember/optional-features": "^2.0.0", + "@ember/test-helpers": "^2.2.0", + "@glimmer/component": "^1.0.3", + "@glimmer/tracking": "^1.0.3", + "babel-eslint": "^10.1.0", + "broccoli-asset-rev": "^3.0.0", + "ember-auto-import": "^1.10.1", + "ember-cli": "~<%= emberCLIVersion %>", + "ember-cli-app-version": "^4.0.0", + "ember-cli-babel": "^7.23.1", + "ember-cli-dependency-checker": "^3.2.0", + "ember-cli-htmlbars": "^5.3.2", + "ember-cli-inject-live-reload": "^2.0.2", + "ember-cli-sri": "^2.1.1", + "ember-cli-terser": "^4.0.1", + "ember-data": "~3.26.0-beta.0", + "ember-export-application-global": "^2.0.1", + "ember-fetch": "^8.0.4", + "ember-load-initializers": "^2.1.2", + "ember-maybe-import-regenerator": "^0.1.6", + "ember-page-title": "^6.2.1", + "ember-qunit": "^5.1.2", + "ember-resolver": "^8.0.2", + "ember-source": "~3.26.0-beta.2", + "ember-template-lint": "^2.18.1", + "ember-welcome-page": "^4.0.0", + "eslint": "^7.20.0", + "eslint-config-prettier": "^7.2.0", + "eslint-plugin-ember": "^10.2.0", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-prettier": "^3.3.1", + "loader.js": "^4.7.0", + "npm-run-all": "^4.1.5", + "prettier": "^2.2.1", + "qunit": "^2.14.0", + "qunit-dom": "^1.6.0" + }, + "engines": { + "node": "10.* || >= 12" + }, + "ember": { + "edition": "octane" + } +} diff --git a/tests/fixtures/help/generate-blueprint.txt b/tests/fixtures/help/generate-blueprint.txt index cd34778deb..4c09b8a357 100644 --- a/tests/fixtures/help/generate-blueprint.txt +++ b/tests/fixtures/help/generate-blueprint.txt @@ -15,6 +15,8 @@ ember generate \u001b[33m\u001b[39m \u001b[36m\u001b[39m \u001b[90maliases: -dum, -id\u001b[39m \u001b[36m--in-repo-addon\u001b[39m \u001b[36m(String)\u001b[39m \u001b[36m(Default: null)\u001b[39m \u001b[90maliases: --in-repo , -ir \u001b[39m + \u001b[36m--skip-lint-fix\u001b[39m \u001b[36m(Boolean)\u001b[39m \u001b[36m(Default: false)\u001b[39m + \u001b[90maliases: -slf\u001b[39m \u001b[36m--in\u001b[39m \u001b[36m(String)\u001b[39m \u001b[36m(Default: null)\u001b[39m Runs a blueprint against an in repo addon. A path is expected, relative to the root of the project. blueprint \u001b[33m\u001b[39m diff --git a/tests/fixtures/help/generate-with-addon.txt b/tests/fixtures/help/generate-with-addon.txt index b82663f1f8..085a57e504 100644 --- a/tests/fixtures/help/generate-with-addon.txt +++ b/tests/fixtures/help/generate-with-addon.txt @@ -15,6 +15,8 @@ ember generate   aliases: -dum, -id --in-repo-addon (String) (Default: null) aliases: --in-repo , -ir  + --skip-lint-fix (Boolean) (Default: false) + aliases: -slf --in (String) (Default: null) Runs a blueprint against an in repo addon. A path is expected, relative to the root of the project. diff --git a/tests/fixtures/help/help-with-addon.txt b/tests/fixtures/help/help-with-addon.txt index 691f6328be..984e6a74a6 100644 --- a/tests/fixtures/help/help-with-addon.txt +++ b/tests/fixtures/help/help-with-addon.txt @@ -71,6 +71,8 @@ ember generate   aliases: -dum, -id --in-repo-addon (String) (Default: null) aliases: --in-repo , -ir  + --skip-lint-fix (Boolean) (Default: false) + aliases: -slf --in (String) (Default: null) Runs a blueprint against an in repo addon. A path is expected, relative to the root of the project. ember help   @@ -92,6 +94,8 @@ ember init   aliases: -sn --skip-bower (Boolean) (Default: false) aliases: -sb + --skip-lint-fix (Boolean) (Default: false) + aliases: -slf --welcome (Boolean) (Default: true) Installs and uses {{ember-welcome-page}}. Use --no-welcome to skip it. --yarn (Boolean) --name (String) (Default: "") diff --git a/tests/fixtures/help/help.js b/tests/fixtures/help/help.js index ce6ef34eb2..80e6670d2e 100644 --- a/tests/fixtures/help/help.js +++ b/tests/fixtures/help/help.js @@ -255,6 +255,13 @@ module.exports = { key: 'inRepoAddon', required: false }, + { + name: 'skip-lint-fix', + default: false, + aliases: ['slf'], + key: 'skipLintFix', + required: false + }, { name: 'in', default: null, @@ -403,6 +410,13 @@ module.exports = { key: 'skipBower', required: false }, + { + name: 'skip-lint-fix', + default: false, + aliases: ['slf'], + key: 'skipLintFix', + required: false + }, { name: 'welcome', key: 'welcome', diff --git a/tests/fixtures/help/help.txt b/tests/fixtures/help/help.txt index ced81391cd..d23a3b535d 100644 --- a/tests/fixtures/help/help.txt +++ b/tests/fixtures/help/help.txt @@ -71,6 +71,8 @@ ember generate   aliases: -dum, -id --in-repo-addon (String) (Default: null) aliases: --in-repo , -ir  + --skip-lint-fix (Boolean) (Default: false) + aliases: -slf --in (String) (Default: null) Runs a blueprint against an in repo addon. A path is expected, relative to the root of the project. ember help   @@ -92,6 +94,8 @@ ember init   aliases: -sn --skip-bower (Boolean) (Default: false) aliases: -sb + --skip-lint-fix (Boolean) (Default: false) + aliases: -slf --welcome (Boolean) (Default: true) Installs and uses {{ember-welcome-page}}. Use --no-welcome to skip it. --yarn (Boolean) --name (String) (Default: "") diff --git a/tests/fixtures/help/with-addon-blueprints.js b/tests/fixtures/help/with-addon-blueprints.js index a2ab7ebf03..025a16fb08 100644 --- a/tests/fixtures/help/with-addon-blueprints.js +++ b/tests/fixtures/help/with-addon-blueprints.js @@ -255,6 +255,13 @@ module.exports = { key: 'inRepoAddon', required: false }, + { + name: 'skip-lint-fix', + default: false, + aliases: ['slf'], + key: 'skipLintFix', + required: false + }, { name: 'in', default: null, @@ -435,6 +442,13 @@ module.exports = { key: 'skipBower', required: false }, + { + name: 'skip-lint-fix', + default: false, + aliases: ['slf'], + key: 'skipLintFix', + required: false + }, { name: 'welcome', key: 'welcome', diff --git a/tests/fixtures/help/with-addon-commands.js b/tests/fixtures/help/with-addon-commands.js index 80b80c80d8..7b3f52c0ca 100644 --- a/tests/fixtures/help/with-addon-commands.js +++ b/tests/fixtures/help/with-addon-commands.js @@ -255,6 +255,13 @@ module.exports = { key: 'inRepoAddon', required: false }, + { + name: 'skip-lint-fix', + default: false, + aliases: ['slf'], + key: 'skipLintFix', + required: false + }, { name: 'in', default: null, @@ -403,6 +410,13 @@ module.exports = { key: 'skipBower', required: false }, + { + name: 'skip-lint-fix', + default: false, + aliases: ['slf'], + key: 'skipLintFix', + required: false + }, { name: 'welcome', key: 'welcome', diff --git a/tests/helpers/ember.js b/tests/helpers/ember.js index 36afba0ef7..8322fd885f 100644 --- a/tests/helpers/ember.js +++ b/tests/helpers/ember.js @@ -66,6 +66,11 @@ module.exports = function ember(args, options) { args.push('--skipGit'); } + // Most tests don't npm install so let's disable lint fixing by default + if (!args.some((arg) => arg.startsWith('--skip-lint-fix'))) { + args.push('--skip-lint-fix'); + } + willInterruptProcess.release(); cliInstance = cli({ From cda25c37aa4998690f84ff44bfd8a868bcb3d430 Mon Sep 17 00:00:00 2001 From: rpemberton Date: Wed, 3 Mar 2021 11:24:10 +0000 Subject: [PATCH 668/818] remove skip-lint-fix alias --- lib/commands/generate.js | 2 +- lib/commands/init.js | 2 +- tests/fixtures/help/generate-blueprint.txt | 1 - tests/fixtures/help/generate-with-addon.txt | 1 - tests/fixtures/help/help-with-addon.txt | 2 -- tests/fixtures/help/help.js | 2 -- tests/fixtures/help/help.txt | 2 -- tests/fixtures/help/with-addon-blueprints.js | 2 -- tests/fixtures/help/with-addon-commands.js | 2 -- 9 files changed, 2 insertions(+), 14 deletions(-) diff --git a/lib/commands/generate.js b/lib/commands/generate.js index d1ba325632..bc5de4aa29 100644 --- a/lib/commands/generate.js +++ b/lib/commands/generate.js @@ -22,7 +22,7 @@ module.exports = Command.extend({ { name: 'classic', type: Boolean, default: false, aliases: ['c'] }, { name: 'dummy', type: Boolean, default: false, aliases: ['dum', 'id'] }, { name: 'in-repo-addon', type: String, default: null, aliases: ['in-repo', 'ir'] }, - { name: 'skip-lint-fix', type: Boolean, default: false, aliases: ['slf'] }, + { name: 'skip-lint-fix', type: Boolean, default: false }, { name: 'in', type: String, diff --git a/lib/commands/init.js b/lib/commands/init.js index a6dd2fd8d6..a43bc473ba 100644 --- a/lib/commands/init.js +++ b/lib/commands/init.js @@ -22,7 +22,7 @@ module.exports = Command.extend({ { name: 'blueprint', type: String, aliases: ['b'] }, { name: 'skip-npm', type: Boolean, default: false, aliases: ['sn'] }, { name: 'skip-bower', type: Boolean, default: false, aliases: ['sb'] }, - { name: 'skip-lint-fix', type: Boolean, default: false, aliases: ['slf'] }, + { name: 'skip-lint-fix', type: Boolean, default: false }, { name: 'welcome', type: Boolean, diff --git a/tests/fixtures/help/generate-blueprint.txt b/tests/fixtures/help/generate-blueprint.txt index 4c09b8a357..dd40ddfb2f 100644 --- a/tests/fixtures/help/generate-blueprint.txt +++ b/tests/fixtures/help/generate-blueprint.txt @@ -16,7 +16,6 @@ ember generate \u001b[33m\u001b[39m \u001b[36m\u001b[39m \u001b[36m--in-repo-addon\u001b[39m \u001b[36m(String)\u001b[39m \u001b[36m(Default: null)\u001b[39m \u001b[90maliases: --in-repo , -ir \u001b[39m \u001b[36m--skip-lint-fix\u001b[39m \u001b[36m(Boolean)\u001b[39m \u001b[36m(Default: false)\u001b[39m - \u001b[90maliases: -slf\u001b[39m \u001b[36m--in\u001b[39m \u001b[36m(String)\u001b[39m \u001b[36m(Default: null)\u001b[39m Runs a blueprint against an in repo addon. A path is expected, relative to the root of the project. blueprint \u001b[33m\u001b[39m diff --git a/tests/fixtures/help/generate-with-addon.txt b/tests/fixtures/help/generate-with-addon.txt index 085a57e504..4fbc401e42 100644 --- a/tests/fixtures/help/generate-with-addon.txt +++ b/tests/fixtures/help/generate-with-addon.txt @@ -16,7 +16,6 @@ ember generate   --in-repo-addon (String) (Default: null) aliases: --in-repo , -ir  --skip-lint-fix (Boolean) (Default: false) - aliases: -slf --in (String) (Default: null) Runs a blueprint against an in repo addon. A path is expected, relative to the root of the project. diff --git a/tests/fixtures/help/help-with-addon.txt b/tests/fixtures/help/help-with-addon.txt index 984e6a74a6..b54d53045e 100644 --- a/tests/fixtures/help/help-with-addon.txt +++ b/tests/fixtures/help/help-with-addon.txt @@ -72,7 +72,6 @@ ember generate   --in-repo-addon (String) (Default: null) aliases: --in-repo , -ir  --skip-lint-fix (Boolean) (Default: false) - aliases: -slf --in (String) (Default: null) Runs a blueprint against an in repo addon. A path is expected, relative to the root of the project. ember help   @@ -95,7 +94,6 @@ ember init   --skip-bower (Boolean) (Default: false) aliases: -sb --skip-lint-fix (Boolean) (Default: false) - aliases: -slf --welcome (Boolean) (Default: true) Installs and uses {{ember-welcome-page}}. Use --no-welcome to skip it. --yarn (Boolean) --name (String) (Default: "") diff --git a/tests/fixtures/help/help.js b/tests/fixtures/help/help.js index 80e6670d2e..10ec68b277 100644 --- a/tests/fixtures/help/help.js +++ b/tests/fixtures/help/help.js @@ -258,7 +258,6 @@ module.exports = { { name: 'skip-lint-fix', default: false, - aliases: ['slf'], key: 'skipLintFix', required: false }, @@ -413,7 +412,6 @@ module.exports = { { name: 'skip-lint-fix', default: false, - aliases: ['slf'], key: 'skipLintFix', required: false }, diff --git a/tests/fixtures/help/help.txt b/tests/fixtures/help/help.txt index d23a3b535d..2b9a6d5597 100644 --- a/tests/fixtures/help/help.txt +++ b/tests/fixtures/help/help.txt @@ -72,7 +72,6 @@ ember generate   --in-repo-addon (String) (Default: null) aliases: --in-repo , -ir  --skip-lint-fix (Boolean) (Default: false) - aliases: -slf --in (String) (Default: null) Runs a blueprint against an in repo addon. A path is expected, relative to the root of the project. ember help   @@ -95,7 +94,6 @@ ember init   --skip-bower (Boolean) (Default: false) aliases: -sb --skip-lint-fix (Boolean) (Default: false) - aliases: -slf --welcome (Boolean) (Default: true) Installs and uses {{ember-welcome-page}}. Use --no-welcome to skip it. --yarn (Boolean) --name (String) (Default: "") diff --git a/tests/fixtures/help/with-addon-blueprints.js b/tests/fixtures/help/with-addon-blueprints.js index 025a16fb08..dd7171514b 100644 --- a/tests/fixtures/help/with-addon-blueprints.js +++ b/tests/fixtures/help/with-addon-blueprints.js @@ -258,7 +258,6 @@ module.exports = { { name: 'skip-lint-fix', default: false, - aliases: ['slf'], key: 'skipLintFix', required: false }, @@ -445,7 +444,6 @@ module.exports = { { name: 'skip-lint-fix', default: false, - aliases: ['slf'], key: 'skipLintFix', required: false }, diff --git a/tests/fixtures/help/with-addon-commands.js b/tests/fixtures/help/with-addon-commands.js index 7b3f52c0ca..19589ff3bd 100644 --- a/tests/fixtures/help/with-addon-commands.js +++ b/tests/fixtures/help/with-addon-commands.js @@ -258,7 +258,6 @@ module.exports = { { name: 'skip-lint-fix', default: false, - aliases: ['slf'], key: 'skipLintFix', required: false }, @@ -413,7 +412,6 @@ module.exports = { { name: 'skip-lint-fix', default: false, - aliases: ['slf'], key: 'skipLintFix', required: false }, From 2dec55b44958045e9aa5e4c51bfbb73dea0b884f Mon Sep 17 00:00:00 2001 From: rpemberton Date: Wed, 3 Mar 2021 11:28:57 +0000 Subject: [PATCH 669/818] add more context to lint fix error logging --- lib/tasks/generate-from-blueprint.js | 2 +- lib/tasks/install-blueprint.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tasks/generate-from-blueprint.js b/lib/tasks/generate-from-blueprint.js index 0e8bbc6870..59737a718d 100644 --- a/lib/tasks/generate-from-blueprint.js +++ b/lib/tasks/generate-from-blueprint.js @@ -21,7 +21,7 @@ class GenerateTask extends Task { let fileDisplayPaths = fileInfos.map(({ displayPath }) => displayPath); await lintFix.run(fileDisplayPaths); } catch (error) { - logger.error('Lint fix failed'); + logger.error('Lint fix failed: %s', error.shortMessage); } } } diff --git a/lib/tasks/install-blueprint.js b/lib/tasks/install-blueprint.js index b31f04030a..f33ac8d23d 100644 --- a/lib/tasks/install-blueprint.js +++ b/lib/tasks/install-blueprint.js @@ -53,7 +53,7 @@ class InstallBlueprintTask extends Task { let fileDisplayPaths = fileInfos.map(({ displayPath }) => displayPath); await lintFix.run(fileDisplayPaths); } catch (error) { - logger.error('Lint fix failed'); + logger.error('Lint fix failed: %s', error.shortMessage); } } } From 4d695c3774c1a61cbdc2a1a7c42ab54035593251 Mon Sep 17 00:00:00 2001 From: rpemberton Date: Wed, 3 Mar 2021 11:46:06 +0000 Subject: [PATCH 670/818] refactor: rename skip-lint-fix to lint-fix --- lib/commands/generate.js | 2 +- lib/commands/init.js | 2 +- lib/tasks/generate-from-blueprint.js | 2 +- lib/tasks/install-blueprint.js | 2 +- tests/acceptance/generate-test.js | 2 +- tests/acceptance/init-test.js | 2 +- tests/acceptance/smoke-test-slow.js | 22 +++++--------------- tests/fixtures/help/generate-blueprint.txt | 2 +- tests/fixtures/help/generate-with-addon.txt | 2 +- tests/fixtures/help/help-with-addon.txt | 4 ++-- tests/fixtures/help/help.js | 12 +++++------ tests/fixtures/help/help.txt | 4 ++-- tests/fixtures/help/with-addon-blueprints.js | 12 +++++------ tests/fixtures/help/with-addon-commands.js | 12 +++++------ tests/helpers/ember.js | 4 ++-- 15 files changed, 37 insertions(+), 49 deletions(-) diff --git a/lib/commands/generate.js b/lib/commands/generate.js index bc5de4aa29..92a7ffe165 100644 --- a/lib/commands/generate.js +++ b/lib/commands/generate.js @@ -22,7 +22,7 @@ module.exports = Command.extend({ { name: 'classic', type: Boolean, default: false, aliases: ['c'] }, { name: 'dummy', type: Boolean, default: false, aliases: ['dum', 'id'] }, { name: 'in-repo-addon', type: String, default: null, aliases: ['in-repo', 'ir'] }, - { name: 'skip-lint-fix', type: Boolean, default: false }, + { name: 'lint-fix', type: Boolean, default: true }, { name: 'in', type: String, diff --git a/lib/commands/init.js b/lib/commands/init.js index a43bc473ba..a486a945f7 100644 --- a/lib/commands/init.js +++ b/lib/commands/init.js @@ -22,7 +22,7 @@ module.exports = Command.extend({ { name: 'blueprint', type: String, aliases: ['b'] }, { name: 'skip-npm', type: Boolean, default: false, aliases: ['sn'] }, { name: 'skip-bower', type: Boolean, default: false, aliases: ['sb'] }, - { name: 'skip-lint-fix', type: Boolean, default: false }, + { name: 'lint-fix', type: Boolean, default: true }, { name: 'welcome', type: Boolean, diff --git a/lib/tasks/generate-from-blueprint.js b/lib/tasks/generate-from-blueprint.js index 59737a718d..784bfd5052 100644 --- a/lib/tasks/generate-from-blueprint.js +++ b/lib/tasks/generate-from-blueprint.js @@ -16,7 +16,7 @@ class GenerateTask extends Task { async run(options) { let fileInfos = await this.createBlueprints(options); - if (!options.skipLintFix) { + if (options.lintFix) { try { let fileDisplayPaths = fileInfos.map(({ displayPath }) => displayPath); await lintFix.run(fileDisplayPaths); diff --git a/lib/tasks/install-blueprint.js b/lib/tasks/install-blueprint.js index f33ac8d23d..607700b2f6 100644 --- a/lib/tasks/install-blueprint.js +++ b/lib/tasks/install-blueprint.js @@ -48,7 +48,7 @@ class InstallBlueprintTask extends Task { logger.info(`Installing blueprint into "${target}" ...`); let fileInfos = await blueprint.install(installOptions); - if (!options.skipLintFix) { + if (options.lintFix) { try { let fileDisplayPaths = fileInfos.map(({ displayPath }) => displayPath); await lintFix.run(fileDisplayPaths); diff --git a/tests/acceptance/generate-test.js b/tests/acceptance/generate-test.js index 612c15c71b..f6393cd2ef 100755 --- a/tests/acceptance/generate-test.js +++ b/tests/acceptance/generate-test.js @@ -350,7 +350,7 @@ describe('Acceptance: ember generate', function () { it('lint fixes blueprints', async function () { let lintFixStub = td.replace(lintFix, 'run'); - await generate(['blueprint', 'foo', '--skip-lint-fix=false']); + await generate(['blueprint', 'foo', '--lint-fix']); td.verify(lintFixStub([path.join('blueprints', 'foo', 'index.js')]), { times: 1 }); }); diff --git a/tests/acceptance/init-test.js b/tests/acceptance/init-test.js index 780cca9ef9..38e4b4397f 100644 --- a/tests/acceptance/init-test.js +++ b/tests/acceptance/init-test.js @@ -173,7 +173,7 @@ describe('Acceptance: ember init', function () { it('init includes lint fix', async function () { let lintFixStub = td.replace(lintFix, 'run'); - await ember(['init', '--skip-npm', '--skip-bower', '--skip-lint-fix=false']); + await ember(['init', '--skip-npm', '--skip-bower', '--lint-fix']); td.verify( lintFixStub( diff --git a/tests/acceptance/smoke-test-slow.js b/tests/acceptance/smoke-test-slow.js index 31f12a46b0..9ed381d6e0 100644 --- a/tests/acceptance/smoke-test-slow.js +++ b/tests/acceptance/smoke-test-slow.js @@ -563,7 +563,7 @@ module.exports = function() { expect(result.code).to.equal(1); }); - describe('ember generate skip-lint-fix argument', function () { + describe('ember generate lint-fix argument', function () { beforeEach(async function () { await copyFixtureFiles('app/with-blueprint-override-lint-fail'); }); @@ -574,14 +574,8 @@ module.exports = function() { hbs: path.join('app', 'components', 'foo-bar.hbs'), }; - it('does not fix lint errors when --skip-lint-fix=true', async function () { - await ember([ - 'generate', - 'component', - newComponent, - '--component-class=@ember/component', - '--skip-lint-fix=true', - ]); + it('does not fix lint errors with --no-lint-fix', async function () { + await ember(['generate', 'component', newComponent, '--component-class=@ember/component', '--no-lint-fix']); await expect(execa('eslint', [newFiles.js], { cwd: appRoot, preferLocal: true })).to.eventually.be.rejectedWith( newFiles.js @@ -592,14 +586,8 @@ module.exports = function() { ).to.eventually.be.rejectedWith(newFiles.hbs); }); - it('does fix lint errors when --skip-lint-fix=false', async function () { - await ember([ - 'generate', - 'component', - newComponent, - '--component-class=@ember/component', - '--skip-lint-fix=false', - ]); + it('does fix lint errors with --lint-fix', async function () { + await ember(['generate', 'component', newComponent, '--component-class=@ember/component', '--lint-fix']); await expect(execa('eslint', [newFiles.js], { cwd: appRoot, preferLocal: true })).to.eventually.be.ok; await expect(execa('ember-template-lint', [newFiles.hbs], { cwd: appRoot, preferLocal: true })).to.eventually.be diff --git a/tests/fixtures/help/generate-blueprint.txt b/tests/fixtures/help/generate-blueprint.txt index dd40ddfb2f..f0337babbc 100644 --- a/tests/fixtures/help/generate-blueprint.txt +++ b/tests/fixtures/help/generate-blueprint.txt @@ -15,7 +15,7 @@ ember generate \u001b[33m\u001b[39m \u001b[36m\u001b[39m \u001b[90maliases: -dum, -id\u001b[39m \u001b[36m--in-repo-addon\u001b[39m \u001b[36m(String)\u001b[39m \u001b[36m(Default: null)\u001b[39m \u001b[90maliases: --in-repo , -ir \u001b[39m - \u001b[36m--skip-lint-fix\u001b[39m \u001b[36m(Boolean)\u001b[39m \u001b[36m(Default: false)\u001b[39m + \u001b[36m--lint-fix\u001b[39m \u001b[36m(Boolean)\u001b[39m \u001b[36m(Default: true)\u001b[39m \u001b[36m--in\u001b[39m \u001b[36m(String)\u001b[39m \u001b[36m(Default: null)\u001b[39m Runs a blueprint against an in repo addon. A path is expected, relative to the root of the project. blueprint \u001b[33m\u001b[39m diff --git a/tests/fixtures/help/generate-with-addon.txt b/tests/fixtures/help/generate-with-addon.txt index 4fbc401e42..79380f5f64 100644 --- a/tests/fixtures/help/generate-with-addon.txt +++ b/tests/fixtures/help/generate-with-addon.txt @@ -15,7 +15,7 @@ ember generate   aliases: -dum, -id --in-repo-addon (String) (Default: null) aliases: --in-repo , -ir  - --skip-lint-fix (Boolean) (Default: false) + --lint-fix (Boolean) (Default: true) --in (String) (Default: null) Runs a blueprint against an in repo addon. A path is expected, relative to the root of the project. diff --git a/tests/fixtures/help/help-with-addon.txt b/tests/fixtures/help/help-with-addon.txt index b54d53045e..a2e6f46d2b 100644 --- a/tests/fixtures/help/help-with-addon.txt +++ b/tests/fixtures/help/help-with-addon.txt @@ -71,7 +71,7 @@ ember generate   aliases: -dum, -id --in-repo-addon (String) (Default: null) aliases: --in-repo , -ir  - --skip-lint-fix (Boolean) (Default: false) + --lint-fix (Boolean) (Default: true) --in (String) (Default: null) Runs a blueprint against an in repo addon. A path is expected, relative to the root of the project. ember help   @@ -93,7 +93,7 @@ ember init   aliases: -sn --skip-bower (Boolean) (Default: false) aliases: -sb - --skip-lint-fix (Boolean) (Default: false) + --lint-fix (Boolean) (Default: true) --welcome (Boolean) (Default: true) Installs and uses {{ember-welcome-page}}. Use --no-welcome to skip it. --yarn (Boolean) --name (String) (Default: "") diff --git a/tests/fixtures/help/help.js b/tests/fixtures/help/help.js index 10ec68b277..5028c78fbf 100644 --- a/tests/fixtures/help/help.js +++ b/tests/fixtures/help/help.js @@ -256,9 +256,9 @@ module.exports = { required: false }, { - name: 'skip-lint-fix', - default: false, - key: 'skipLintFix', + name: 'lint-fix', + default: true, + key: 'lintFix', required: false }, { @@ -410,9 +410,9 @@ module.exports = { required: false }, { - name: 'skip-lint-fix', - default: false, - key: 'skipLintFix', + name: 'lint-fix', + default: true, + key: 'lintFix', required: false }, { diff --git a/tests/fixtures/help/help.txt b/tests/fixtures/help/help.txt index 2b9a6d5597..68ebccf8a2 100644 --- a/tests/fixtures/help/help.txt +++ b/tests/fixtures/help/help.txt @@ -71,7 +71,7 @@ ember generate   aliases: -dum, -id --in-repo-addon (String) (Default: null) aliases: --in-repo , -ir  - --skip-lint-fix (Boolean) (Default: false) + --lint-fix (Boolean) (Default: true) --in (String) (Default: null) Runs a blueprint against an in repo addon. A path is expected, relative to the root of the project. ember help   @@ -93,7 +93,7 @@ ember init   aliases: -sn --skip-bower (Boolean) (Default: false) aliases: -sb - --skip-lint-fix (Boolean) (Default: false) + --lint-fix (Boolean) (Default: true) --welcome (Boolean) (Default: true) Installs and uses {{ember-welcome-page}}. Use --no-welcome to skip it. --yarn (Boolean) --name (String) (Default: "") diff --git a/tests/fixtures/help/with-addon-blueprints.js b/tests/fixtures/help/with-addon-blueprints.js index dd7171514b..f8aaec5c50 100644 --- a/tests/fixtures/help/with-addon-blueprints.js +++ b/tests/fixtures/help/with-addon-blueprints.js @@ -256,9 +256,9 @@ module.exports = { required: false }, { - name: 'skip-lint-fix', - default: false, - key: 'skipLintFix', + name: 'lint-fix', + default: true, + key: 'lintFix', required: false }, { @@ -442,9 +442,9 @@ module.exports = { required: false }, { - name: 'skip-lint-fix', - default: false, - key: 'skipLintFix', + name: 'lint-fix', + default: true, + key: 'lintFix', required: false }, { diff --git a/tests/fixtures/help/with-addon-commands.js b/tests/fixtures/help/with-addon-commands.js index 19589ff3bd..d12d54cc6a 100644 --- a/tests/fixtures/help/with-addon-commands.js +++ b/tests/fixtures/help/with-addon-commands.js @@ -256,9 +256,9 @@ module.exports = { required: false }, { - name: 'skip-lint-fix', - default: false, - key: 'skipLintFix', + name: 'lint-fix', + default: true, + key: 'lintFix', required: false }, { @@ -410,9 +410,9 @@ module.exports = { required: false }, { - name: 'skip-lint-fix', - default: false, - key: 'skipLintFix', + name: 'lint-fix', + default: true, + key: 'lintFix', required: false }, { diff --git a/tests/helpers/ember.js b/tests/helpers/ember.js index 8322fd885f..e18b89b4a4 100644 --- a/tests/helpers/ember.js +++ b/tests/helpers/ember.js @@ -67,8 +67,8 @@ module.exports = function ember(args, options) { } // Most tests don't npm install so let's disable lint fixing by default - if (!args.some((arg) => arg.startsWith('--skip-lint-fix'))) { - args.push('--skip-lint-fix'); + if (!args.some((arg) => arg.startsWith('--lint-fix'))) { + args.push('--no-lint-fix'); } willInterruptProcess.release(); From da9178b983e05dc7a5e37053dbaef416805ff5ec Mon Sep 17 00:00:00 2001 From: rpemberton Date: Thu, 4 Mar 2021 10:38:12 +0000 Subject: [PATCH 671/818] refactor: use lint:fix instead of eslint/ember-template-lint --- lib/models/blueprint.js | 2 -- lib/tasks/generate-from-blueprint.js | 21 +++++++----------- lib/tasks/install-blueprint.js | 7 +++--- lib/utilities/lint-fix.js | 32 ++++++++++++---------------- tests/acceptance/generate-test.js | 4 ++-- tests/acceptance/init-test.js | 11 ++-------- tests/acceptance/smoke-test-slow.js | 26 +++++++++------------- 7 files changed, 39 insertions(+), 64 deletions(-) diff --git a/lib/models/blueprint.js b/lib/models/blueprint.js index a6e251a907..0736c9753f 100644 --- a/lib/models/blueprint.js +++ b/lib/models/blueprint.js @@ -433,8 +433,6 @@ let Blueprint = CoreObject.extend({ // run afterInstall/afterUninstall userland hooks await afterHook.call(this, options); - - return fileInfos; }, /** diff --git a/lib/tasks/generate-from-blueprint.js b/lib/tasks/generate-from-blueprint.js index 784bfd5052..542a0d2bd1 100644 --- a/lib/tasks/generate-from-blueprint.js +++ b/lib/tasks/generate-from-blueprint.js @@ -14,14 +14,13 @@ class GenerateTask extends Task { } async run(options) { - let fileInfos = await this.createBlueprints(options); + await this.createBlueprints(options); if (options.lintFix) { try { - let fileDisplayPaths = fileInfos.map(({ displayPath }) => displayPath); - await lintFix.run(fileDisplayPaths); + await lintFix.run(); } catch (error) { - logger.error('Lint fix failed: %s', error.shortMessage); + logger.warn('Lint fix failed: %s', error.shortMessage); } } } @@ -76,8 +75,7 @@ class GenerateTask extends Task { blueprintOptions = merge(blueprintOptions, options || {}); - let mainBlueprintFiles = await mainBlueprint[this.blueprintFunction](blueprintOptions); - let testBlueprintFiles = []; + await mainBlueprint[this.blueprintFunction](blueprintOptions); if (testBlueprint) { if (testBlueprint.locals === Blueprint.prototype.locals) { testBlueprint.locals = function (options) { @@ -86,15 +84,14 @@ class GenerateTask extends Task { } let testBlueprintOptions = merge({}, blueprintOptions, { installingTest: true }); - - testBlueprintFiles = await testBlueprint[this.blueprintFunction](testBlueprintOptions); + await testBlueprint[this.blueprintFunction](testBlueprintOptions); } if (!addonBlueprint || name.match(/-addon/)) { - return [...mainBlueprintFiles, ...testBlueprintFiles]; + return; } if (!this.project.isEmberCLIAddon() && blueprintOptions.inRepoAddon === null) { - return [...mainBlueprintFiles, ...testBlueprintFiles]; + return; } if (addonBlueprint.locals === Blueprint.prototype.locals) { @@ -105,9 +102,7 @@ class GenerateTask extends Task { let addonBlueprintOptions = merge({}, blueprintOptions, { installingAddon: true }); - let addonBlueprintFiles = await addonBlueprint[this.blueprintFunction](addonBlueprintOptions); - - return [...mainBlueprintFiles, ...testBlueprintFiles, ...addonBlueprintFiles]; + return addonBlueprint[this.blueprintFunction](addonBlueprintOptions); } lookupBlueprint(name, ignoreMissing) { diff --git a/lib/tasks/install-blueprint.js b/lib/tasks/install-blueprint.js index 607700b2f6..770e667e12 100644 --- a/lib/tasks/install-blueprint.js +++ b/lib/tasks/install-blueprint.js @@ -46,14 +46,13 @@ class InstallBlueprintTask extends Task { let blueprint = await this._resolveBlueprint(blueprintOption); logger.info(`Installing blueprint into "${target}" ...`); - let fileInfos = await blueprint.install(installOptions); + await blueprint.install(installOptions); if (options.lintFix) { try { - let fileDisplayPaths = fileInfos.map(({ displayPath }) => displayPath); - await lintFix.run(fileDisplayPaths); + await lintFix.run(); } catch (error) { - logger.error('Lint fix failed: %s', error.shortMessage); + logger.warn('Lint fix failed: %s', error.shortMessage); } } } diff --git a/lib/utilities/lint-fix.js b/lib/utilities/lint-fix.js index 51f285f1d0..0fb587d4f5 100644 --- a/lib/utilities/lint-fix.js +++ b/lib/utilities/lint-fix.js @@ -1,30 +1,26 @@ 'use strict'; +const chalk = require('chalk'); const execa = require('execa'); -function eslint(filePaths) { - return execa('eslint', [...filePaths, '--fix'], { cwd: process.cwd(), preferLocal: true }); -} - -function emberTemplateLint(filePaths) { - return execa('ember-template-lint', [...filePaths, '--fix'], { cwd: process.cwd(), preferLocal: true }); -} +async function run() { + let lintFixScriptName = `lint:fix`; + let cwd = process.cwd(); + let npmRunResult = await execa('npm', ['run'], { cwd }); + let lintFixScriptRegex = new RegExp(`^ ${lintFixScriptName}$`, 'm'); + let hasLintFixScript = lintFixScriptRegex.test(npmRunResult.stdout); -function run(filePaths = []) { - let jsPaths = filePaths.filter((path) => path.endsWith('.js')); - let hbsPaths = filePaths.filter((path) => path.endsWith('.hbs')); + if (!hasLintFixScript) { + let warningMessage = `'${lintFixScriptName}' not found in package.json scripts`; - let lintFixProcesses = []; - - if (jsPaths.length) { - lintFixProcesses.push(eslint(jsPaths)); - } + console.warn(chalk.yellow('Lint fix skipped:', warningMessage)); - if (hbsPaths.length) { - lintFixProcesses.push(emberTemplateLint(hbsPaths)); + return Promise.reject({ + shortMessage: warningMessage, + }); } - return Promise.all(lintFixProcesses); + await execa('npm', ['run', lintFixScriptName], { cwd }); } module.exports = { diff --git a/tests/acceptance/generate-test.js b/tests/acceptance/generate-test.js index f6393cd2ef..d0ac444fb1 100755 --- a/tests/acceptance/generate-test.js +++ b/tests/acceptance/generate-test.js @@ -347,11 +347,11 @@ describe('Acceptance: ember generate', function () { expect(file('app/foos/bar.js')).to.contain('export default Ember.Object.extend({ foo: two });'); }); - it('lint fixes blueprints', async function () { + it('calls lint fix function', async function () { let lintFixStub = td.replace(lintFix, 'run'); await generate(['blueprint', 'foo', '--lint-fix']); - td.verify(lintFixStub([path.join('blueprints', 'foo', 'index.js')]), { times: 1 }); + td.verify(lintFixStub(), { times: 1 }); }); }); diff --git a/tests/acceptance/init-test.js b/tests/acceptance/init-test.js index 38e4b4397f..702a368927 100644 --- a/tests/acceptance/init-test.js +++ b/tests/acceptance/init-test.js @@ -170,19 +170,12 @@ describe('Acceptance: ember init', function () { expect(dir('.git')).to.not.exist; }); - it('init includes lint fix', async function () { + it('calls lint fix function', async function () { let lintFixStub = td.replace(lintFix, 'run'); await ember(['init', '--skip-npm', '--skip-bower', '--lint-fix']); - td.verify( - lintFixStub( - td.matchers.argThat(function (arr) { - return arr.length > 0 && typeof arr[0] === 'string'; - }) - ), - { times: 1 } - ); + td.verify(lintFixStub(), { times: 1 }); confirmBlueprinted(); }); diff --git a/tests/acceptance/smoke-test-slow.js b/tests/acceptance/smoke-test-slow.js index 9ed381d6e0..e009a1e636 100644 --- a/tests/acceptance/smoke-test-slow.js +++ b/tests/acceptance/smoke-test-slow.js @@ -563,35 +563,29 @@ module.exports = function() { expect(result.code).to.equal(1); }); - describe('ember generate lint-fix argument', function () { + describe('lint fixing after file generation', function () { beforeEach(async function () { await copyFixtureFiles('app/with-blueprint-override-lint-fail'); }); - let newComponent = 'foo-bar'; - let newFiles = { - js: path.join('app', 'components', 'foo-bar.js'), - hbs: path.join('app', 'components', 'foo-bar.hbs'), - }; + let componentName = 'foo-bar'; it('does not fix lint errors with --no-lint-fix', async function () { - await ember(['generate', 'component', newComponent, '--component-class=@ember/component', '--no-lint-fix']); + await ember(['generate', 'component', componentName, '--component-class=@ember/component', '--no-lint-fix']); - await expect(execa('eslint', [newFiles.js], { cwd: appRoot, preferLocal: true })).to.eventually.be.rejectedWith( - newFiles.js + await expect(execa('eslint', ['.'], { cwd: appRoot, preferLocal: true })).to.eventually.be.rejectedWith( + `${componentName}.js` ); - await expect( - execa('ember-template-lint', [newFiles.hbs], { cwd: appRoot, preferLocal: true }) - ).to.eventually.be.rejectedWith(newFiles.hbs); + execa('ember-template-lint', ['.'], { cwd: appRoot, preferLocal: true }) + ).to.eventually.be.rejectedWith(`${componentName}.hbs`); }); it('does fix lint errors with --lint-fix', async function () { - await ember(['generate', 'component', newComponent, '--component-class=@ember/component', '--lint-fix']); + await ember(['generate', 'component', componentName, '--component-class=@ember/component', '--lint-fix']); - await expect(execa('eslint', [newFiles.js], { cwd: appRoot, preferLocal: true })).to.eventually.be.ok; - await expect(execa('ember-template-lint', [newFiles.hbs], { cwd: appRoot, preferLocal: true })).to.eventually.be - .ok; + await expect(execa('eslint', ['.'], { cwd: appRoot, preferLocal: true })).to.eventually.be.ok; + await expect(execa('ember-template-lint', ['.'], { cwd: appRoot, preferLocal: true })).to.eventually.be.ok; }); }); }); From 2b5fa8fd83908d05ef660f922c0179c3c22e95c2 Mon Sep 17 00:00:00 2001 From: rpemberton Date: Fri, 5 Mar 2021 10:39:47 +0000 Subject: [PATCH 672/818] make lint fix command npm/yarn specific --- lib/tasks/generate-from-blueprint.js | 2 +- lib/tasks/install-blueprint.js | 2 +- lib/utilities/lint-fix.js | 22 +++++++++++++--------- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/lib/tasks/generate-from-blueprint.js b/lib/tasks/generate-from-blueprint.js index 542a0d2bd1..bcc8b58275 100644 --- a/lib/tasks/generate-from-blueprint.js +++ b/lib/tasks/generate-from-blueprint.js @@ -20,7 +20,7 @@ class GenerateTask extends Task { try { await lintFix.run(); } catch (error) { - logger.warn('Lint fix failed: %s', error.shortMessage); + logger.warn('Lint fix failed: %o', error); } } } diff --git a/lib/tasks/install-blueprint.js b/lib/tasks/install-blueprint.js index 770e667e12..0d20132ded 100644 --- a/lib/tasks/install-blueprint.js +++ b/lib/tasks/install-blueprint.js @@ -52,7 +52,7 @@ class InstallBlueprintTask extends Task { try { await lintFix.run(); } catch (error) { - logger.warn('Lint fix failed: %s', error.shortMessage); + logger.warn('Lint fix failed: %o', error); } } } diff --git a/lib/utilities/lint-fix.js b/lib/utilities/lint-fix.js index 0fb587d4f5..3d7b586cf1 100644 --- a/lib/utilities/lint-fix.js +++ b/lib/utilities/lint-fix.js @@ -1,26 +1,30 @@ 'use strict'; +const fs = require('fs-extra'); const chalk = require('chalk'); const execa = require('execa'); async function run() { - let lintFixScriptName = `lint:fix`; + let lintFixScriptName = 'lint:fix'; let cwd = process.cwd(); - let npmRunResult = await execa('npm', ['run'], { cwd }); - let lintFixScriptRegex = new RegExp(`^ ${lintFixScriptName}$`, 'm'); - let hasLintFixScript = lintFixScriptRegex.test(npmRunResult.stdout); + let packageJson = fs.readJsonSync('package.json'); + let hasLintFixScript = !!packageJson.scripts[lintFixScriptName]; if (!hasLintFixScript) { - let warningMessage = `'${lintFixScriptName}' not found in package.json scripts`; + let warningMessage = `"${lintFixScriptName}" not found in package.json scripts`; console.warn(chalk.yellow('Lint fix skipped:', warningMessage)); - return Promise.reject({ - shortMessage: warningMessage, - }); + throw new Error(warningMessage); } - await execa('npm', ['run', lintFixScriptName], { cwd }); + let usingYarn = fs.existsSync('yarn.lock'); + + if (usingYarn) { + await execa('yarn', [lintFixScriptName], { cwd }); + } else { + await execa('npm', ['run', lintFixScriptName], { cwd }); + } } module.exports = { From 0e1f268727703de3176932c4d4762d56f78a3613 Mon Sep 17 00:00:00 2001 From: rpemberton Date: Fri, 5 Mar 2021 14:37:14 +0000 Subject: [PATCH 673/818] refactor: make lint test blueprint file path dynamic --- .../files/{app/components => __root__/__path__}/__name__.hbs | 0 .../files/{app/components => __root__/__path__}/__name__.js | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename tests/fixtures/app/with-blueprint-override-lint-fail/blueprints/component/files/{app/components => __root__/__path__}/__name__.hbs (100%) rename tests/fixtures/app/with-blueprint-override-lint-fail/blueprints/component/files/{app/components => __root__/__path__}/__name__.js (100%) diff --git a/tests/fixtures/app/with-blueprint-override-lint-fail/blueprints/component/files/app/components/__name__.hbs b/tests/fixtures/app/with-blueprint-override-lint-fail/blueprints/component/files/__root__/__path__/__name__.hbs similarity index 100% rename from tests/fixtures/app/with-blueprint-override-lint-fail/blueprints/component/files/app/components/__name__.hbs rename to tests/fixtures/app/with-blueprint-override-lint-fail/blueprints/component/files/__root__/__path__/__name__.hbs diff --git a/tests/fixtures/app/with-blueprint-override-lint-fail/blueprints/component/files/app/components/__name__.js b/tests/fixtures/app/with-blueprint-override-lint-fail/blueprints/component/files/__root__/__path__/__name__.js similarity index 100% rename from tests/fixtures/app/with-blueprint-override-lint-fail/blueprints/component/files/app/components/__name__.js rename to tests/fixtures/app/with-blueprint-override-lint-fail/blueprints/component/files/__root__/__path__/__name__.js From 643cb4fb4ff5be15e35079ce2f29e7ced1b40cf4 Mon Sep 17 00:00:00 2001 From: rpemberton Date: Mon, 8 Mar 2021 10:43:38 +0000 Subject: [PATCH 674/818] add console-ui warning message --- lib/tasks/generate-from-blueprint.js | 5 +++-- lib/tasks/install-blueprint.js | 5 +++-- lib/utilities/lint-fix.js | 14 +++++++------- tests/acceptance/generate-test.js | 2 +- tests/acceptance/init-test.js | 2 +- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/lib/tasks/generate-from-blueprint.js b/lib/tasks/generate-from-blueprint.js index bcc8b58275..b0aea072ff 100644 --- a/lib/tasks/generate-from-blueprint.js +++ b/lib/tasks/generate-from-blueprint.js @@ -18,9 +18,10 @@ class GenerateTask extends Task { if (options.lintFix) { try { - await lintFix.run(); + await lintFix.run(this.ui); } catch (error) { - logger.warn('Lint fix failed: %o', error); + this.ui.writeError('Lint fix failed'); + logger.error('Lint fix failed: %o', error); } } } diff --git a/lib/tasks/install-blueprint.js b/lib/tasks/install-blueprint.js index 0d20132ded..b6063a8008 100644 --- a/lib/tasks/install-blueprint.js +++ b/lib/tasks/install-blueprint.js @@ -50,9 +50,10 @@ class InstallBlueprintTask extends Task { if (options.lintFix) { try { - await lintFix.run(); + await lintFix.run(this.ui); } catch (error) { - logger.warn('Lint fix failed: %o', error); + this.ui.writeError('Lint fix failed'); + logger.error('Lint fix failed: %o', error); } } } diff --git a/lib/utilities/lint-fix.js b/lib/utilities/lint-fix.js index 3d7b586cf1..4d40dcba08 100644 --- a/lib/utilities/lint-fix.js +++ b/lib/utilities/lint-fix.js @@ -1,21 +1,21 @@ 'use strict'; const fs = require('fs-extra'); -const chalk = require('chalk'); -const execa = require('execa'); +const execa = require('../utilities/execa'); -async function run() { +async function run(ui) { let lintFixScriptName = 'lint:fix'; let cwd = process.cwd(); let packageJson = fs.readJsonSync('package.json'); + let hasLintFixScript = !!packageJson.scripts[lintFixScriptName]; if (!hasLintFixScript) { - let warningMessage = `"${lintFixScriptName}" not found in package.json scripts`; - - console.warn(chalk.yellow('Lint fix skipped:', warningMessage)); + ui.writeWarnLine( + 'Lint fix skipped: "lint:fix" not found in package.json scripts. New files might not pass linting.' + ); - throw new Error(warningMessage); + return; } let usingYarn = fs.existsSync('yarn.lock'); diff --git a/tests/acceptance/generate-test.js b/tests/acceptance/generate-test.js index d0ac444fb1..49aef43485 100755 --- a/tests/acceptance/generate-test.js +++ b/tests/acceptance/generate-test.js @@ -352,6 +352,6 @@ describe('Acceptance: ember generate', function () { await generate(['blueprint', 'foo', '--lint-fix']); - td.verify(lintFixStub(), { times: 1 }); + td.verify(lintFixStub(), { ignoreExtraArgs: true, times: 1 }); }); }); diff --git a/tests/acceptance/init-test.js b/tests/acceptance/init-test.js index 702a368927..1407df2797 100644 --- a/tests/acceptance/init-test.js +++ b/tests/acceptance/init-test.js @@ -175,7 +175,7 @@ describe('Acceptance: ember init', function () { await ember(['init', '--skip-npm', '--skip-bower', '--lint-fix']); - td.verify(lintFixStub(), { times: 1 }); + td.verify(lintFixStub(), { ignoreExtraArgs: true, times: 1 }); confirmBlueprinted(); }); From c79a978957c8a7db13325b8a3b7ca615ed4c3e3a Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Mon, 8 Mar 2021 11:37:13 -0800 Subject: [PATCH 675/818] Bump embroider to 0.37.0 This includes a fix for when a project's node_modules are symlinked which is the case for how ember-cli's test suite works: https://github.com/embroider-build/embroider/pull/702 --- blueprints/addon/additional-dev-dependencies.json | 2 +- blueprints/app/files/package.json | 6 +++--- tests/fixtures/addon/defaults/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/embroider-no-welcome/package.json | 6 +++--- tests/fixtures/app/embroider/package.json | 6 +++--- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/blueprints/addon/additional-dev-dependencies.json b/blueprints/addon/additional-dev-dependencies.json index 9611d6b9bd..168bcb5b25 100644 --- a/blueprints/addon/additional-dev-dependencies.json +++ b/blueprints/addon/additional-dev-dependencies.json @@ -1,6 +1,6 @@ { "devDependencies": { - "@embroider/test-setup": "^0.36.0", + "@embroider/test-setup": "^0.37.0", "ember-disable-prototype-extensions": "^1.1.3", "ember-try": "^1.4.0", "ember-source-channel-url": "^3.0.0" diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index e9e86984a7..00881532bd 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -25,9 +25,9 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.2.0<% if (embroider) { %>", - "@embroider/compat": "^0.36.0", - "@embroider/core": "^0.36.0", - "@embroider/webpack": "^0.36.0<% } %>", + "@embroider/compat": "^0.37.0", + "@embroider/core": "^0.37.0", + "@embroider/webpack": "^0.37.0<% } %>", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index 4334fdd55f..d6de0f21e6 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -32,7 +32,7 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.2.0", - "@embroider/test-setup": "^0.36.0", + "@embroider/test-setup": "^0.37.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 59dae0a711..cc61586605 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -32,7 +32,7 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.2.0", - "@embroider/test-setup": "^0.36.0", + "@embroider/test-setup": "^0.37.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index 601c3863af..8b0fc2e43f 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -25,9 +25,9 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.2.0", - "@embroider/compat": "^0.36.0", - "@embroider/core": "^0.36.0", - "@embroider/webpack": "^0.36.0", + "@embroider/compat": "^0.37.0", + "@embroider/core": "^0.37.0", + "@embroider/webpack": "^0.37.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index 49b4436904..422b6cc5d4 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -25,9 +25,9 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.2.0", - "@embroider/compat": "^0.36.0", - "@embroider/core": "^0.36.0", - "@embroider/webpack": "^0.36.0", + "@embroider/compat": "^0.37.0", + "@embroider/core": "^0.37.0", + "@embroider/webpack": "^0.37.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", From 3642afc3ee6a33f97c4ced7e579779c681b41ebe Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Mon, 8 Mar 2021 13:20:02 -0800 Subject: [PATCH 676/818] Remove guarded embroider tests Enabling tests that were skipped under embroider as they now pass --- .../acceptance/nested-addons-smoke-test-slow.js | 4 ---- tests/acceptance/preprocessor-smoke-test-slow.js | 16 ---------------- 2 files changed, 20 deletions(-) diff --git a/tests/acceptance/nested-addons-smoke-test-slow.js b/tests/acceptance/nested-addons-smoke-test-slow.js index 8c41da9773..6b5654ae7e 100644 --- a/tests/acceptance/nested-addons-smoke-test-slow.js +++ b/tests/acceptance/nested-addons-smoke-test-slow.js @@ -6,7 +6,6 @@ const fs = require('fs-extra'); const runCommand = require('../helpers/run-command'); const acceptance = require('../helpers/acceptance'); const copyFixtureFiles = require('../helpers/copy-fixture-files'); -const { isExperimentEnabled } = require('../../lib/experiments'); const DistChecker = require('../helpers/dist-checker'); let createTestTargets = acceptance.createTestTargets; let teardownTestTargets = acceptance.teardownTestTargets; @@ -40,9 +39,6 @@ describe('Acceptance: nested-addons-smoke-test', function () { }); it('addons with nested addons compile correctly', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles('addon/with-nested-addons'); let packageJsonPath = path.join(appRoot, 'package.json'); diff --git a/tests/acceptance/preprocessor-smoke-test-slow.js b/tests/acceptance/preprocessor-smoke-test-slow.js index 0185bce0f5..651f61a3e6 100644 --- a/tests/acceptance/preprocessor-smoke-test-slow.js +++ b/tests/acceptance/preprocessor-smoke-test-slow.js @@ -7,7 +7,6 @@ const runCommand = require('../helpers/run-command'); const acceptance = require('../helpers/acceptance'); const DistChecker = require('../helpers/dist-checker'); const copyFixtureFiles = require('../helpers/copy-fixture-files'); -const { isExperimentEnabled } = require('../../lib/experiments'); let createTestTargets = acceptance.createTestTargets; let teardownTestTargets = acceptance.teardownTestTargets; let linkDependencies = acceptance.linkDependencies; @@ -40,9 +39,6 @@ describe('Acceptance: preprocessor-smoke-test', function () { }); it('addons with standard preprocessors compile correctly', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors`); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -60,9 +56,6 @@ describe('Acceptance: preprocessor-smoke-test', function () { }); it('addon registry entries are added in the proper order', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles(`preprocessor-tests/app-registry-ordering`); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -83,9 +76,6 @@ describe('Acceptance: preprocessor-smoke-test', function () { }); it('addons without preprocessors compile correctly', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles(`preprocessor-tests/app-with-addon-without-preprocessors`); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -110,9 +100,6 @@ describe('Acceptance: preprocessor-smoke-test', function () { |-- preprocessor should not apply to this */ it('addons depending on preprocessor addon preprocesses addon but not app', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors-2`); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -153,9 +140,6 @@ describe('Acceptance: preprocessor-smoke-test', function () { |-- preprocessor should not apply to this */ it('addon N levels deep depending on preprocessor preprocesses that parent addon only', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles(`preprocessor-tests/app-with-addon-with-preprocessors-3`); let packageJsonPath = path.join(appRoot, 'package.json'); From 12b081ea8a767f5af377d3aa54d0658d9ecfd3af Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Tue, 9 Mar 2021 11:50:46 -0500 Subject: [PATCH 677/818] Pin QUnit to 2.13.0 due to strict mode regression in 2.14.0. QUnit 2.14 introduced issues when using QUnit in strict mode, which causes errors during Embroider builds. --- blueprints/app/files/package.json | 2 +- tests/fixtures/addon/defaults/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/defaults/package.json | 2 +- tests/fixtures/app/embroider-no-welcome/package.json | 2 +- tests/fixtures/app/embroider/package.json | 2 +- tests/fixtures/app/npm/package.json | 2 +- .../fixtures/app/with-blueprint-override-lint-fail/package.json | 2 +- tests/fixtures/app/yarn/package.json | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 00881532bd..7360a4ff64 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -61,7 +61,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.14.0", + "qunit": "~2.13.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index d6de0f21e6..a24c700d98 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -63,7 +63,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.14.0", + "qunit": "~2.13.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index cc61586605..9d7c85f109 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -64,7 +64,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.14.0", + "qunit": "~2.13.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index a6a808d817..84a9cfad2c 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -58,7 +58,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.14.0", + "qunit": "~2.13.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index 8b0fc2e43f..5b16b7d055 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -60,7 +60,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.14.0", + "qunit": "~2.13.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index 422b6cc5d4..9e034a68b8 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -61,7 +61,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.14.0", + "qunit": "~2.13.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 23cb47193a..a2331dc9b8 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -57,7 +57,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.14.0", + "qunit": "~2.13.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/with-blueprint-override-lint-fail/package.json b/tests/fixtures/app/with-blueprint-override-lint-fail/package.json index 887ab0ad51..8bebe0d2a2 100644 --- a/tests/fixtures/app/with-blueprint-override-lint-fail/package.json +++ b/tests/fixtures/app/with-blueprint-override-lint-fail/package.json @@ -57,7 +57,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.14.0", + "qunit": "~2.13.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index a6a808d817..84a9cfad2c 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -58,7 +58,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.14.0", + "qunit": "~2.13.0", "qunit-dom": "^1.6.0" }, "engines": { From 691f6028c76f5d967f6d8cc9bde85c402304d95c Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Tue, 9 Mar 2021 12:45:50 -0500 Subject: [PATCH 678/818] Update ember-qunit to allow for qunit@2.13.0. --- blueprints/app/files/package.json | 2 +- tests/fixtures/addon/defaults/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/defaults/package.json | 2 +- tests/fixtures/app/embroider-no-welcome/package.json | 2 +- tests/fixtures/app/embroider/package.json | 2 +- tests/fixtures/app/npm/package.json | 2 +- tests/fixtures/app/yarn/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 7360a4ff64..ce8fa9de6f 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -47,7 +47,7 @@ "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.1", - "ember-qunit": "^5.1.2", + "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", "ember-source": "~3.26.0-beta.2", "ember-template-lint": "^2.18.1<% if (welcome) { %>", diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index a24c700d98..65ae8cce1f 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -48,7 +48,7 @@ "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.1", - "ember-qunit": "^5.1.2", + "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", "ember-source": "~3.26.0-beta.2", "ember-source-channel-url": "^3.0.0", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 9d7c85f109..c8b69284df 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -48,7 +48,7 @@ "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.1", - "ember-qunit": "^5.1.2", + "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", "ember-source": "~3.26.0-beta.2", "ember-source-channel-url": "^3.0.0", diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index 84a9cfad2c..e4dbec59e0 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -44,7 +44,7 @@ "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.1", - "ember-qunit": "^5.1.2", + "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", "ember-source": "~3.26.0-beta.2", "ember-template-lint": "^2.18.1", diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index 5b16b7d055..81596fe1b2 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -47,7 +47,7 @@ "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.1", - "ember-qunit": "^5.1.2", + "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", "ember-source": "~3.26.0-beta.2", "ember-template-lint": "^2.18.1", diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index 9e034a68b8..a5bbdfccb4 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -47,7 +47,7 @@ "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.1", - "ember-qunit": "^5.1.2", + "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", "ember-source": "~3.26.0-beta.2", "ember-template-lint": "^2.18.1", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index a2331dc9b8..9424291faa 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -44,7 +44,7 @@ "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.1", - "ember-qunit": "^5.1.2", + "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", "ember-source": "~3.26.0-beta.2", "ember-template-lint": "^2.18.1", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 84a9cfad2c..e4dbec59e0 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -44,7 +44,7 @@ "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.1", - "ember-qunit": "^5.1.2", + "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", "ember-source": "~3.26.0-beta.2", "ember-template-lint": "^2.18.1", From 9f811abf68014647cb22b6e5b3ee3f7acc5ecde6 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Tue, 9 Mar 2021 12:47:01 -0500 Subject: [PATCH 679/818] Fix support for filtering in internal `dev/update-blueprint-dependencies.js` script --- dev/update-blueprint-dependencies.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/dev/update-blueprint-dependencies.js b/dev/update-blueprint-dependencies.js index e097adc77a..c0703dc585 100644 --- a/dev/update-blueprint-dependencies.js +++ b/dev/update-blueprint-dependencies.js @@ -60,7 +60,7 @@ let filter = { if (OPTIONS.filter) { if (OPTIONS.filter.startsWith('/')) { - filter.nameRegexp = new RegExp(OPTIONS.filter); + filter.nameRegexp = new RegExp(OPTIONS.filter.substring(1, OPTIONS.filter.length - 1)); // can only use latest when using a regexp style filter.fetchSpec = 'latest'; } else { @@ -71,10 +71,8 @@ if (OPTIONS.filter) { } function shouldCheckDependency(dependency) { - if (OPTIONS.filter) { - if (OPTIONS.filter.startsWith('/')) { - return OPTIONS.filter.test(dependency); - } + if (filter.nameRegexp) { + return filter.nameRegexp.test(dependency); } return true; From 7d634b8a0877f76cd5e2e5ef55e159d0a98fbcaf Mon Sep 17 00:00:00 2001 From: Cartmanishere Date: Tue, 23 Feb 2021 23:04:25 +0530 Subject: [PATCH 680/818] Refactor getPort and only check required port --- lib/commands/serve.js | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/lib/commands/serve.js b/lib/commands/serve.js index dffdc16610..b65906f8c4 100644 --- a/lib/commands/serve.js +++ b/lib/commands/serve.js @@ -107,15 +107,25 @@ module.exports = Command.extend({ }, async _checkExpressPort(commandOptions) { - let foundPort = await getPort({ port: commandOptions.port, host: commandOptions.host }); - if (commandOptions.port !== foundPort && commandOptions.port !== 0) { - let message = `Port ${commandOptions.port} is already in use.`; - return Promise.reject(new SilentError(message)); + let portOptions = { port: commandOptions.port, host: commandOptions.host }; + if (commandOptions.port !== 0) { + portOptions.stopPort = commandOptions.port; + } + try { + let foundPort = await getPort(portOptions); + commandOptions.port = foundPort; + commandOptions.liveReloadPort = commandOptions.liveReloadPort || commandOptions.port; + return commandOptions; + } catch (err) { + let message; + if (commandOptions.port === 0) { + message = `No open port found above ${commandOptions.port}`; + } else if (commandOptions.port < 1024) { + message = `Port ${commandOptions.port} is already in use or you do not have permissions to use this port.`; + } else { + message = `Port ${commandOptions.port} is already in use.`; + } + throw new SilentError(message); } - - // otherwise, our found port is good - commandOptions.port = foundPort; - commandOptions.liveReloadPort = commandOptions.liveReloadPort || commandOptions.port; - return commandOptions; }, }); From 974c338d24675934c970597b861cf1b2a797b1b4 Mon Sep 17 00:00:00 2001 From: Bryan Mishkin <698306+bmish@users.noreply.github.com> Date: Sun, 14 Mar 2021 23:24:13 -0400 Subject: [PATCH 681/818] Update eslint-plugin-qunit to v6 in blueprint The `two` config has been merged into the `recommended` config so this simplifies things for us even more. https://github.com/platinumazure/eslint-plugin-qunit/blob/master/CHANGELOG.md#600 --- blueprints/app/files/.eslintrc.js | 2 +- blueprints/app/files/package.json | 2 +- tests/fixtures/addon/.eslintrc.js | 2 +- tests/fixtures/addon/defaults/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/.eslintrc.js | 2 +- tests/fixtures/app/defaults/package.json | 2 +- tests/fixtures/app/embroider-no-welcome/package.json | 2 +- tests/fixtures/app/embroider/package.json | 2 +- tests/fixtures/app/npm/package.json | 2 +- tests/fixtures/app/yarn/package.json | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/blueprints/app/files/.eslintrc.js b/blueprints/app/files/.eslintrc.js index 9a6981b630..5d8554f79d 100644 --- a/blueprints/app/files/.eslintrc.js +++ b/blueprints/app/files/.eslintrc.js @@ -60,7 +60,7 @@ module.exports = { { // Test files: files: ['tests/**/*-test.{js,ts}'], - extends: ['plugin:qunit/recommended', 'plugin:qunit/two'], + extends: ['plugin:qunit/recommended'], }, ], }; diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index ce8fa9de6f..9611f21505 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -57,7 +57,7 @@ "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", - "eslint-plugin-qunit": "^5.3.0", + "eslint-plugin-qunit": "^6.0.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", diff --git a/tests/fixtures/addon/.eslintrc.js b/tests/fixtures/addon/.eslintrc.js index 355bbe1218..f96283aad0 100644 --- a/tests/fixtures/addon/.eslintrc.js +++ b/tests/fixtures/addon/.eslintrc.js @@ -53,7 +53,7 @@ module.exports = { { // Test files: files: ['tests/**/*-test.{js,ts}'], - extends: ['plugin:qunit/recommended', 'plugin:qunit/two'], + extends: ['plugin:qunit/recommended'], }, ], }; diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index 65ae8cce1f..117e2cdadb 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -59,7 +59,7 @@ "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", - "eslint-plugin-qunit": "^5.3.0", + "eslint-plugin-qunit": "^6.0.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index c8b69284df..7d3fdf376c 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -60,7 +60,7 @@ "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", - "eslint-plugin-qunit": "^5.3.0", + "eslint-plugin-qunit": "^6.0.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", diff --git a/tests/fixtures/app/.eslintrc.js b/tests/fixtures/app/.eslintrc.js index 043d572ca1..81790af63d 100644 --- a/tests/fixtures/app/.eslintrc.js +++ b/tests/fixtures/app/.eslintrc.js @@ -52,7 +52,7 @@ module.exports = { { // Test files: files: ['tests/**/*-test.{js,ts}'], - extends: ['plugin:qunit/recommended', 'plugin:qunit/two'], + extends: ['plugin:qunit/recommended'], }, ], }; diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index e4dbec59e0..b239ca2545 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -54,7 +54,7 @@ "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", - "eslint-plugin-qunit": "^5.3.0", + "eslint-plugin-qunit": "^6.0.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index 81596fe1b2..c08cdd4fe8 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -56,7 +56,7 @@ "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", - "eslint-plugin-qunit": "^5.3.0", + "eslint-plugin-qunit": "^6.0.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index a5bbdfccb4..0bf1734ff7 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -57,7 +57,7 @@ "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", - "eslint-plugin-qunit": "^5.3.0", + "eslint-plugin-qunit": "^6.0.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 9424291faa..76d9351f89 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -53,7 +53,7 @@ "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", - "eslint-plugin-qunit": "^5.3.0", + "eslint-plugin-qunit": "^6.0.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index e4dbec59e0..b239ca2545 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -54,7 +54,7 @@ "eslint-plugin-ember": "^10.2.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", - "eslint-plugin-qunit": "^5.3.0", + "eslint-plugin-qunit": "^6.0.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", From c3d65fe0b1a1ff70fdeaf967fac8ff426ca43ef5 Mon Sep 17 00:00:00 2001 From: Bert De Block Date: Tue, 16 Mar 2021 07:54:40 +0100 Subject: [PATCH 682/818] Add Ember 3.24 LTS to ember-try configuration --- blueprints/addon/files/.travis.yml | 2 +- blueprints/addon/files/addon-config/ember-try.js | 8 ++++---- tests/fixtures/addon/defaults/.travis.yml | 2 +- tests/fixtures/addon/defaults/config/ember-try.js | 8 ++++---- tests/fixtures/addon/yarn/.travis.yml | 2 +- tests/fixtures/addon/yarn/config/ember-try.js | 8 ++++---- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/blueprints/addon/files/.travis.yml b/blueprints/addon/files/.travis.yml index 09b764f447..b8a36f02da 100644 --- a/blueprints/addon/files/.travis.yml +++ b/blueprints/addon/files/.travis.yml @@ -51,8 +51,8 @@ jobs: # we recommend new addons test the current and previous LTS # as well as latest stable release (bonus points to beta/canary) - - env: EMBER_TRY_SCENARIO=ember-lts-3.16 - env: EMBER_TRY_SCENARIO=ember-lts-3.20 + - env: EMBER_TRY_SCENARIO=ember-lts-3.24 - env: EMBER_TRY_SCENARIO=ember-release - env: EMBER_TRY_SCENARIO=ember-beta - env: EMBER_TRY_SCENARIO=ember-canary diff --git a/blueprints/addon/files/addon-config/ember-try.js b/blueprints/addon/files/addon-config/ember-try.js index ba37be916d..885aa9a250 100644 --- a/blueprints/addon/files/addon-config/ember-try.js +++ b/blueprints/addon/files/addon-config/ember-try.js @@ -8,18 +8,18 @@ module.exports = async function () { <% if (yarn) { %>useYarn: true, <% } %>scenarios: [ { - name: 'ember-lts-3.16', + name: 'ember-lts-3.20', npm: { devDependencies: { - 'ember-source': '~3.16.0', + 'ember-source': '~3.20.5', }, }, }, { - name: 'ember-lts-3.20', + name: 'ember-lts-3.24', npm: { devDependencies: { - 'ember-source': '~3.20.5', + 'ember-source': '~3.24.3', }, }, }, diff --git a/tests/fixtures/addon/defaults/.travis.yml b/tests/fixtures/addon/defaults/.travis.yml index b9b72cdba0..22e0715e9a 100644 --- a/tests/fixtures/addon/defaults/.travis.yml +++ b/tests/fixtures/addon/defaults/.travis.yml @@ -47,8 +47,8 @@ jobs: # we recommend new addons test the current and previous LTS # as well as latest stable release (bonus points to beta/canary) - - env: EMBER_TRY_SCENARIO=ember-lts-3.16 - env: EMBER_TRY_SCENARIO=ember-lts-3.20 + - env: EMBER_TRY_SCENARIO=ember-lts-3.24 - env: EMBER_TRY_SCENARIO=ember-release - env: EMBER_TRY_SCENARIO=ember-beta - env: EMBER_TRY_SCENARIO=ember-canary diff --git a/tests/fixtures/addon/defaults/config/ember-try.js b/tests/fixtures/addon/defaults/config/ember-try.js index 2ab59e5b67..e6ef3ad925 100644 --- a/tests/fixtures/addon/defaults/config/ember-try.js +++ b/tests/fixtures/addon/defaults/config/ember-try.js @@ -7,18 +7,18 @@ module.exports = async function () { return { scenarios: [ { - name: 'ember-lts-3.16', + name: 'ember-lts-3.20', npm: { devDependencies: { - 'ember-source': '~3.16.0', + 'ember-source': '~3.20.5', }, }, }, { - name: 'ember-lts-3.20', + name: 'ember-lts-3.24', npm: { devDependencies: { - 'ember-source': '~3.20.5', + 'ember-source': '~3.24.3', }, }, }, diff --git a/tests/fixtures/addon/yarn/.travis.yml b/tests/fixtures/addon/yarn/.travis.yml index 592dc12478..3fb60c5426 100644 --- a/tests/fixtures/addon/yarn/.travis.yml +++ b/tests/fixtures/addon/yarn/.travis.yml @@ -46,8 +46,8 @@ jobs: # we recommend new addons test the current and previous LTS # as well as latest stable release (bonus points to beta/canary) - - env: EMBER_TRY_SCENARIO=ember-lts-3.16 - env: EMBER_TRY_SCENARIO=ember-lts-3.20 + - env: EMBER_TRY_SCENARIO=ember-lts-3.24 - env: EMBER_TRY_SCENARIO=ember-release - env: EMBER_TRY_SCENARIO=ember-beta - env: EMBER_TRY_SCENARIO=ember-canary diff --git a/tests/fixtures/addon/yarn/config/ember-try.js b/tests/fixtures/addon/yarn/config/ember-try.js index 72f0ea604c..d8bd6f97de 100644 --- a/tests/fixtures/addon/yarn/config/ember-try.js +++ b/tests/fixtures/addon/yarn/config/ember-try.js @@ -8,18 +8,18 @@ module.exports = async function () { useYarn: true, scenarios: [ { - name: 'ember-lts-3.16', + name: 'ember-lts-3.20', npm: { devDependencies: { - 'ember-source': '~3.16.0', + 'ember-source': '~3.20.5', }, }, }, { - name: 'ember-lts-3.20', + name: 'ember-lts-3.24', npm: { devDependencies: { - 'ember-source': '~3.20.5', + 'ember-source': '~3.24.3', }, }, }, From 22428b5ff49f04ce742efc4481ddc71df86920e8 Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Tue, 16 Mar 2021 18:35:35 -0700 Subject: [PATCH 683/818] Revert "Pin QUnit to 2.13.0 due to strict mode regression in 2.14.0." This reverts commit 12b081ea8a767f5af377d3aa54d0658d9ecfd3af. --- blueprints/app/files/package.json | 2 +- tests/fixtures/addon/defaults/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/defaults/package.json | 2 +- tests/fixtures/app/embroider-no-welcome/package.json | 2 +- tests/fixtures/app/embroider/package.json | 2 +- tests/fixtures/app/npm/package.json | 2 +- .../fixtures/app/with-blueprint-override-lint-fail/package.json | 2 +- tests/fixtures/app/yarn/package.json | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 9611f21505..9a00f121e0 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -61,7 +61,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "~2.13.0", + "qunit": "^2.14.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index 117e2cdadb..08006be1ca 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -63,7 +63,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "~2.13.0", + "qunit": "^2.14.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 7d3fdf376c..26384d942a 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -64,7 +64,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "~2.13.0", + "qunit": "^2.14.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index b239ca2545..e091089fd1 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -58,7 +58,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "~2.13.0", + "qunit": "^2.14.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index c08cdd4fe8..d50257aaf0 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -60,7 +60,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "~2.13.0", + "qunit": "^2.14.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index 0bf1734ff7..7ea5321314 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -61,7 +61,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "~2.13.0", + "qunit": "^2.14.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 76d9351f89..1c148596d4 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -57,7 +57,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "~2.13.0", + "qunit": "^2.14.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/with-blueprint-override-lint-fail/package.json b/tests/fixtures/app/with-blueprint-override-lint-fail/package.json index 8bebe0d2a2..887ab0ad51 100644 --- a/tests/fixtures/app/with-blueprint-override-lint-fail/package.json +++ b/tests/fixtures/app/with-blueprint-override-lint-fail/package.json @@ -57,7 +57,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "~2.13.0", + "qunit": "^2.14.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index b239ca2545..e091089fd1 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -58,7 +58,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "~2.13.0", + "qunit": "^2.14.0", "qunit-dom": "^1.6.0" }, "engines": { From 23694bf58f435f584abfca212acf4ccde1b172ab Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Tue, 16 Mar 2021 18:36:24 -0700 Subject: [PATCH 684/818] Bump to 2.14.1 of qunit for window global fix --- tests/fixtures/addon/defaults/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/defaults/package.json | 2 +- tests/fixtures/app/embroider-no-welcome/package.json | 2 +- tests/fixtures/app/embroider/package.json | 2 +- tests/fixtures/app/npm/package.json | 2 +- .../fixtures/app/with-blueprint-override-lint-fail/package.json | 2 +- tests/fixtures/app/yarn/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index 08006be1ca..562ff6c1de 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -63,7 +63,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.14.0", + "qunit": "^2.14.1", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 26384d942a..1267e676d3 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -64,7 +64,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.14.0", + "qunit": "^2.14.1", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index e091089fd1..299fa4a217 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -58,7 +58,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.14.0", + "qunit": "^2.14.1", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index d50257aaf0..0f55ecc1bb 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -60,7 +60,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.14.0", + "qunit": "^2.14.1", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index 7ea5321314..b7a1f646f4 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -61,7 +61,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.14.0", + "qunit": "^2.14.1", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 1c148596d4..031761338c 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -57,7 +57,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.14.0", + "qunit": "^2.14.1", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/with-blueprint-override-lint-fail/package.json b/tests/fixtures/app/with-blueprint-override-lint-fail/package.json index 887ab0ad51..a85f579c66 100644 --- a/tests/fixtures/app/with-blueprint-override-lint-fail/package.json +++ b/tests/fixtures/app/with-blueprint-override-lint-fail/package.json @@ -57,7 +57,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.14.0", + "qunit": "^1", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index e091089fd1..299fa4a217 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -58,7 +58,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.14.0", + "qunit": "^2.14.1", "qunit-dom": "^1.6.0" }, "engines": { From 23e7ff11e69945d51cfa9c781cf8d2262b26de0b Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Tue, 16 Mar 2021 18:39:04 -0700 Subject: [PATCH 685/818] fixing typo --- .../fixtures/app/with-blueprint-override-lint-fail/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fixtures/app/with-blueprint-override-lint-fail/package.json b/tests/fixtures/app/with-blueprint-override-lint-fail/package.json index a85f579c66..436dbb6980 100644 --- a/tests/fixtures/app/with-blueprint-override-lint-fail/package.json +++ b/tests/fixtures/app/with-blueprint-override-lint-fail/package.json @@ -57,7 +57,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^1", + "qunit": "^2.14.1", "qunit-dom": "^1.6.0" }, "engines": { From 0bb0a109ae25e2e9db4d6913be2d9a78afcc8c32 Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Tue, 16 Mar 2021 19:00:13 -0700 Subject: [PATCH 686/818] adding missing upgrade --- blueprints/app/files/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 9a00f121e0..6f5fb9927f 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -61,7 +61,7 @@ "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.14.0", + "qunit": "^2.14.1", "qunit-dom": "^1.6.0" }, "engines": { From 785fc7ca077f6553d9bd1e9aba06c13db9ac8385 Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Tue, 9 Mar 2021 12:08:35 -0800 Subject: [PATCH 687/818] Remove EMBROIDER guards from smoke-test-slow Enables embroider experiment to run on the smoke tests as they now pass! --- tests/acceptance/smoke-test-slow.js | 145 +++++++--------------------- 1 file changed, 36 insertions(+), 109 deletions(-) diff --git a/tests/acceptance/smoke-test-slow.js b/tests/acceptance/smoke-test-slow.js index e009a1e636..fd40358bd2 100644 --- a/tests/acceptance/smoke-test-slow.js +++ b/tests/acceptance/smoke-test-slow.js @@ -13,6 +13,7 @@ const killCliProcess = require('../helpers/kill-cli-process'); const ember = require('../helpers/ember'); const runCommand = require('../helpers/run-command'); const { isExperimentEnabled } = require('../../lib/experiments'); +const DistChecker = require('../helpers/dist-checker'); let createTestTargets = acceptance.createTestTargets; let teardownTestTargets = acceptance.teardownTestTargets; let linkDependencies = acceptance.linkDependencies; @@ -46,16 +47,10 @@ describe('Acceptance: smoke-test', function () { }); it('ember new foo, clean from scratch', function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } return runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); }); it('ember new foo, make sure addon template overwrites', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await ember(['generate', 'template', 'foo']); await ember(['generate', 'in-repo-addon', 'my-addon']); @@ -82,9 +77,6 @@ describe('Acceptance: smoke-test', function () { }); it('ember test still runs when a JavaScript testem config exists', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles('smoke-tests/js-testem-config'); let result = await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); @@ -97,9 +89,6 @@ describe('Acceptance: smoke-test', function () { }); it('eslint passes after running ember new', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } let result = await runCommand(path.join('.', 'node_modules', 'eslint', 'bin', 'eslint.js'), appRoot); let exitCode = result.code; @@ -112,42 +101,42 @@ describe('Acceptance: smoke-test', function () { // when run in isolation, it passes // here is the error: // test-support-80f2fe63fae0c44478fe0f8af73200a7.js contains the fingerprint (2871106928f813936fdd64f4d16005ac): expected 'test-support-80f2fe63fae0c44478fe0f8af73200a7.js' to include '2871106928f813936fdd64f4d16005ac' - it.skip('ember new foo, build production and verify fingerprint', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--environment=production'); + if (!isExperimentEnabled('EMBROIDER')) { + it.skip('ember new foo, build production and verify fingerprint', async function () { + await runCommand( + path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), + 'build', + '--environment=production' + ); - let dirPath = path.join(appRoot, 'dist', 'assets'); - let dir = fs.readdirSync(dirPath); - let files = []; + let dirPath = path.join(appRoot, 'dist', 'assets'); + let dir = fs.readdirSync(dirPath); + let files = []; - dir.forEach(function (filepath) { - if (filepath === '.gitkeep') { - return; - } + dir.forEach(function (filepath) { + if (filepath === '.gitkeep') { + return; + } - files.push(filepath); + files.push(filepath); - let file = fs.readFileSync(path.join(dirPath, filepath), { encoding: null }); + let file = fs.readFileSync(path.join(dirPath, filepath), { encoding: null }); - let md5 = crypto.createHash('md5'); - md5.update(file); - let hex = md5.digest('hex'); + let md5 = crypto.createHash('md5'); + md5.update(file); + let hex = md5.digest('hex'); - expect(filepath).to.contain(hex, `${filepath} contains the fingerprint (${hex})`); - }); + expect(filepath).to.contain(hex, `${filepath} contains the fingerprint (${hex})`); + }); - let indexHtml = file('dist/index.html'); - files.forEach(function (filename) { - expect(indexHtml).to.contain(filename); + let indexHtml = file('dist/index.html'); + files.forEach(function (filename) { + expect(indexHtml).to.contain(filename); + }); }); - }); + } it('ember test --environment=production', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles('smoke-tests/passing-test'); let result = await runCommand( @@ -165,9 +154,6 @@ describe('Acceptance: smoke-test', function () { }); it('ember test --path with previous build', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } let originalWrite = process.stdout.write; let output = []; @@ -199,9 +185,6 @@ describe('Acceptance: smoke-test', function () { }); it('ember test wasm', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } let originalWrite = process.stdout.write; let output = []; @@ -233,9 +216,6 @@ describe('Acceptance: smoke-test', function () { }); it('ember new foo, build development, and verify generated files', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); let dirPath = path.join(appRoot, 'dist'); @@ -245,9 +225,6 @@ describe('Acceptance: smoke-test', function () { }); it('ember build exits with non-zero code when build fails', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } let appJsPath = path.join(appRoot, 'app', 'app.js'); let result = await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -263,9 +240,6 @@ describe('Acceptance: smoke-test', function () { }); it('ember build generates instrumentation files when viz is enabled', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } process.env.BROCCOLI_VIZ = '1'; try { @@ -293,24 +267,20 @@ describe('Acceptance: smoke-test', function () { }); }); - it.skip('ember new foo, build --watch development, and verify rebuilt after change', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } + it('ember new foo, build --watch development, and verify rebuilt after change', async function () { let touched = false; let appJsPath = path.join(appRoot, 'app', 'app.js'); - let builtJsPath = path.join(appRoot, 'dist', 'assets', 'some-cool-app.js'); let text = 'anotuhaonteuhanothunaothanoteh'; let line = `console.log("${text}");`; + let checker = new DistChecker(path.join(appRoot, 'dist')); + try { await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--watch', { onOutput(string, child) { if (touched) { if (string.match(/Build successful/)) { - // build after change to app.js - let contents = fs.readFileSync(builtJsPath).toString(); - expect(contents).to.contain(text, 'must contain changed line after rebuild'); + expect(checker.contains('js', text)).to.be; killCliProcess(child); } } else if (string.match(/Build successful/)) { @@ -325,19 +295,17 @@ describe('Acceptance: smoke-test', function () { } }); - it.skip('ember new foo, build --watch development, and verify rebuilt after multiple changes', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } + it('ember new foo, build --watch development, and verify rebuilt after multiple changes', async function () { let buildCount = 0; let touched = false; let appJsPath = path.join(appRoot, 'app', 'app.js'); - let builtJsPath = path.join(appRoot, 'dist', 'assets', 'some-cool-app.js'); let firstText = 'anotuhaonteuhanothunaothanoteh'; let firstLine = `console.log("${firstText}");`; let secondText = 'aahsldfjlwioruoiiononociwewqwr'; let secondLine = `console.log("${secondText}");`; + let checker = new DistChecker(path.join(appRoot, 'dist')); + try { await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--watch', { onOutput(string, child) { @@ -357,9 +325,7 @@ describe('Acceptance: smoke-test', function () { } } else if (touched && buildCount === 2) { if (string.match(/Build successful/)) { - // build after change to app.js - let contents = fs.readFileSync(builtJsPath).toString(); - expect(contents).to.contain(secondText, 'must contain second changed line after rebuild'); + expect(checker.contains('js', secondText)).to.be; killCliProcess(child); } } @@ -371,9 +337,6 @@ describe('Acceptance: smoke-test', function () { }); it('build failures should be logged correctly', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } fs.writeFileSync( `${process.cwd()}/ember-cli-build.js`, ` @@ -412,10 +375,7 @@ module.exports = function() { ); }); - it.skip('ember new foo, server, SIGINT clears tmp/', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } + it('ember new foo, server, SIGINT clears tmp/', async function () { let result = await runCommand( path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'server', @@ -444,9 +404,6 @@ module.exports = function() { }); it('ember new foo, test, SIGINT exits with error and clears tmp/', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } let result = await expect( runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test', '--test-port=25522', { onOutput(string, child) { @@ -472,9 +429,6 @@ module.exports = function() { }); it('ember new foo, build production and verify css files are concatenated', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles('with-styles'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--environment=production'); @@ -492,9 +446,6 @@ module.exports = function() { }); it('ember new foo, build production and verify css files are minified', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles('with-unminified-styles'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--environment=production'); @@ -510,28 +461,7 @@ module.exports = function() { }); }); - it('ember new foo, build production and verify single "use strict";', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', '--environment=production'); - - let dirPath = path.join(appRoot, 'dist', 'assets'); - let dir = fs.readdirSync(dirPath); - let appNameRE = new RegExp(`${appName}-([a-f0-9]+)\\.js`, 'i'); - dir.forEach(function (filepath) { - if (appNameRE.test(filepath)) { - let contents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', filepath), { encoding: 'utf8' }); - let count = (contents.match(/(["'])use strict\1;/g) || []).length; - expect(count).to.equal(1); - } - }); - }); - it('ember can override and reuse the built-in blueprints', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles('addon/with-blueprint-override'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'generate', 'component', 'foo-bar'); @@ -543,9 +473,6 @@ module.exports = function() { }); it('template linting works properly for pods and classic structured templates', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles('smoke-tests/with-template-failing-linting'); let packageJsonPath = 'package.json'; From 040e95c98000d0d5ab388b35667cf6f99928b179 Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Tue, 16 Mar 2021 18:27:15 -0700 Subject: [PATCH 688/818] add ignore and skip for testem and qunit --- blueprints/app/files/ember-cli-build.js | 6 +++++- blueprints/app/files/tests/index.html | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/blueprints/app/files/ember-cli-build.js b/blueprints/app/files/ember-cli-build.js index e12881816b..0f78f2696a 100644 --- a/blueprints/app/files/ember-cli-build.js +++ b/blueprints/app/files/ember-cli-build.js @@ -21,5 +21,9 @@ module.exports = function (defaults) { // along with the exports of each module as its value. <% if (embroider) { %>const { Webpack } = require('@embroider/webpack'); - return require('@embroider/compat').compatBuild(app, Webpack);<% } else { %>return app.toTree();<% } %> + return require('@embroider/compat').compatBuild(app, Webpack, { + skipBabel: [{ + package: 'qunit', + }], + });<% } else { %>return app.toTree();<% } %> }; diff --git a/blueprints/app/files/tests/index.html b/blueprints/app/files/tests/index.html index 75e308e746..ae7ad9ff8d 100644 --- a/blueprints/app/files/tests/index.html +++ b/blueprints/app/files/tests/index.html @@ -28,7 +28,7 @@
- + From 612c220ad0426b37ead40110e522101906b79b67 Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Tue, 16 Mar 2021 19:12:40 -0700 Subject: [PATCH 689/818] fixing fixture --- tests/fixtures/app/embroider/ember-cli-build.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/fixtures/app/embroider/ember-cli-build.js b/tests/fixtures/app/embroider/ember-cli-build.js index 35d9cc4169..a291cb78b0 100644 --- a/tests/fixtures/app/embroider/ember-cli-build.js +++ b/tests/fixtures/app/embroider/ember-cli-build.js @@ -21,5 +21,9 @@ module.exports = function (defaults) { // along with the exports of each module as its value. const { Webpack } = require('@embroider/webpack'); - return require('@embroider/compat').compatBuild(app, Webpack); + return require('@embroider/compat').compatBuild(app, Webpack, { + skipBabel: [{ + package: 'qunit' + }] + }); }; From 8759c1cb6729389c029adf5268a5158b7c5ec43f Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Tue, 16 Mar 2021 20:08:05 -0700 Subject: [PATCH 690/818] fix fixture data --- tests/fixtures/app/embroider/ember-cli-build.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/fixtures/app/embroider/ember-cli-build.js b/tests/fixtures/app/embroider/ember-cli-build.js index a291cb78b0..06148a5a1d 100644 --- a/tests/fixtures/app/embroider/ember-cli-build.js +++ b/tests/fixtures/app/embroider/ember-cli-build.js @@ -23,7 +23,7 @@ module.exports = function (defaults) { const { Webpack } = require('@embroider/webpack'); return require('@embroider/compat').compatBuild(app, Webpack, { skipBabel: [{ - package: 'qunit' - }] + package: 'qunit', + }], }); }; From 116c2890a3162d7c46d7f632d4b3b87771a96d52 Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Tue, 16 Mar 2021 22:56:36 -0700 Subject: [PATCH 691/818] fixing linting --- blueprints/app/files/ember-cli-build.js | 8 +++++--- tests/fixtures/app/embroider/ember-cli-build.js | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/blueprints/app/files/ember-cli-build.js b/blueprints/app/files/ember-cli-build.js index 0f78f2696a..2e9b033636 100644 --- a/blueprints/app/files/ember-cli-build.js +++ b/blueprints/app/files/ember-cli-build.js @@ -22,8 +22,10 @@ module.exports = function (defaults) { <% if (embroider) { %>const { Webpack } = require('@embroider/webpack'); return require('@embroider/compat').compatBuild(app, Webpack, { - skipBabel: [{ - package: 'qunit', - }], + skipBabel: [ + { + package: 'qunit', + }, + ], });<% } else { %>return app.toTree();<% } %> }; diff --git a/tests/fixtures/app/embroider/ember-cli-build.js b/tests/fixtures/app/embroider/ember-cli-build.js index 06148a5a1d..1d9b7e50ef 100644 --- a/tests/fixtures/app/embroider/ember-cli-build.js +++ b/tests/fixtures/app/embroider/ember-cli-build.js @@ -22,8 +22,10 @@ module.exports = function (defaults) { const { Webpack } = require('@embroider/webpack'); return require('@embroider/compat').compatBuild(app, Webpack, { - skipBabel: [{ - package: 'qunit', - }], + skipBabel: [ + { + package: 'qunit', + }, + ], }); }; From 7291af43314340284846b528e5b5b8977b4a32a8 Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Mon, 8 Mar 2021 11:33:46 -0800 Subject: [PATCH 692/818] Remove embroider guards around brocfile tests Enabling brocfile tests under embroider expect for the case of specifing outputPaths as they will be deprecated for embroider. --- tests/acceptance/brocfile-smoke-test-slow.js | 288 +++++++----------- .../additional-trees/ember-cli-build.js | 8 + .../ember-cli-build.js | 6 + .../ember-cli-build.js | 7 +- .../app-import-named-umd/ember-cli-build.js | 6 + .../app-import-output-file/ember-cli-build.js | 6 + .../brocfile-tests/auto-run-false/app/app.js | 17 ++ .../auto-run-false/ember-cli-build.js | 6 + .../brocfile-tests/auto-run-true/app/app.js | 17 ++ .../auto-run-true/ember-cli-build.js | 6 + .../custom-ember-env/config/environment.js | 1 + .../config/environment.js | 2 +- .../config/something-else.js | 2 +- .../ember-cli-build.js | 7 + .../custom-output-paths/ember-cli-build.js | 6 + .../multiple-sass-files/ember-cli-build.js | 6 + 16 files changed, 215 insertions(+), 176 deletions(-) create mode 100644 tests/fixtures/brocfile-tests/auto-run-false/app/app.js create mode 100644 tests/fixtures/brocfile-tests/auto-run-true/app/app.js diff --git a/tests/acceptance/brocfile-smoke-test-slow.js b/tests/acceptance/brocfile-smoke-test-slow.js index ded8ab18d9..60296bf6ed 100644 --- a/tests/acceptance/brocfile-smoke-test-slow.js +++ b/tests/acceptance/brocfile-smoke-test-slow.js @@ -7,6 +7,7 @@ const { isExperimentEnabled } = require('../../lib/experiments'); const runCommand = require('../helpers/run-command'); const acceptance = require('../helpers/acceptance'); const copyFixtureFiles = require('../helpers/copy-fixture-files'); +const DistChecker = require('../helpers/dist-checker'); let createTestTargets = acceptance.createTestTargets; let teardownTestTargets = acceptance.teardownTestTargets; let linkDependencies = acceptance.linkDependencies; @@ -40,58 +41,43 @@ describe('Acceptance: brocfile-smoke-test', function () { }); it('a custom EmberENV in config/environment.js is used for window.EmberENV', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles('brocfile-tests/custom-ember-env'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - let vendorContents = fs.readFileSync(path.join('dist', 'assets', 'vendor.js'), { - encoding: 'utf8', - }); + let checker = new DistChecker(path.join(appRoot, 'dist')); + await checker.evalScripts(); + let { window } = checker; // Changes in config/optional-features.json end up being set in EmberENV - let expected = - '(window.EmberENV || {}, {"asdflkmawejf":";jlnu3yr23","_APPLICATION_TEMPLATE_WRAPPER":false,"_DEFAULT_ASYNC_OBSERVERS":true,"_JQUERY_INTEGRATION":false,"_TEMPLATE_ONLY_GLIMMER_COMPONENTS":true});'; - expect(vendorContents).to.contain(expected, 'EmberENV should be in assets/vendor.js'); + expect(window.EmberENV.asdflkmawejf).to.eql(';jlnu3yr23'); + expect(window.EmberENV._APPLICATION_TEMPLATE_WRAPPER).to.be.false; + expect(window.EmberENV._DEFAULT_ASYNC_OBSERVERS).to.be.true; + expect(window.EmberENV._JQUERY_INTEGRATION).to.be.false; + expect(window.EmberENV._TEMPLATE_ONLY_GLIMMER_COMPONENTS).to.be.true; }); it('a custom environment config can be used in Brocfile.js', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles('brocfile-tests/custom-environment-config'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); }); it('without app/templates', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles('brocfile-tests/pods-templates'); await fs.remove(path.join(process.cwd(), 'app/templates')); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); }); it('strips app/styles or app/templates from JS', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles('brocfile-tests/styles-and-templates-stripped'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - let appFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', `${appName}.js`), { - encoding: 'utf8', - }); + let checker = new DistChecker(path.join(appRoot, 'dist')); - expect(appFileContents).to.include('//app/templates-stuff.js'); - expect(appFileContents).to.include('//app/styles-manager.js'); + expect(checker.contains('js', '//app/templates-stuff.js')).to.be; + expect(checker.contains('js', '//app/styles-manager.js')).to.be; }); it('should throw if no build file is found', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } fs.removeSync('./ember-cli-build.js'); try { await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -101,56 +87,47 @@ describe('Acceptance: brocfile-smoke-test', function () { }); it('using autoRun: true', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles('brocfile-tests/auto-run-true'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - let appFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', `${appName}.js`), { - encoding: 'utf8', - }); - expect(appFileContents).to.match(/\/app"\)\["default"\]\.create\(/); + let checker = new DistChecker(path.join(appRoot, 'dist')); + await checker.evalScripts(); + + let { window } = checker; + + expect(window.APP_HAS_LOADED).to.be.true; }); it('using autoRun: false', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles('brocfile-tests/auto-run-false'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - let appFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', `${appName}.js`), { - encoding: 'utf8', - }); + let checker = new DistChecker(path.join(appRoot, 'dist')); + await checker.evalScripts(); + + let { window } = checker; - expect(appFileContents).to.not.match(/\/app"\)\["default"\]\.create\(/); + expect(window.APP_HAS_LOADED).to.be.undefined; }); - it('app.import works properly with test tree files', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } - await copyFixtureFiles('brocfile-tests/app-test-import'); + // we dont run postprocessTree in embroider + if (!isExperimentEnabled('EMBROIDER')) { + it('app.import works properly with test tree files', async function () { + await copyFixtureFiles('brocfile-tests/app-test-import'); - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-test-addon'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-test-addon'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - let subjectFileContents = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'test-support.js'), { - encoding: 'utf8', + let checker = new DistChecker(path.join(appRoot, 'dist')); + expect(checker.contains('js', '// File for test tree imported and added via postprocessTree()')).to.be; }); - - expect(subjectFileContents).to.contain('// File for test tree imported and added via postprocessTree()'); - }); + } it('app.import works properly with non-js/css files', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles('brocfile-tests/app-import'); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -168,9 +145,6 @@ describe('Acceptance: brocfile-smoke-test', function () { }); it('addons can have a public tree that is merged and returned namespaced by default', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles('brocfile-tests/public-tree'); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -188,25 +162,16 @@ describe('Acceptance: brocfile-smoke-test', function () { }); it('using pods based templates', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles('brocfile-tests/pods-templates'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); }); it('using pods based templates with a podModulePrefix', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles('brocfile-tests/pods-with-prefix-templates'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'test'); }); it('addon trees are not jshinted', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles('brocfile-tests/jshint-addon'); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -224,9 +189,6 @@ describe('Acceptance: brocfile-smoke-test', function () { }); it('multiple css files in styles/ are output when a preprocessor is not used', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles('brocfile-tests/multiple-css-files'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -239,38 +201,35 @@ describe('Acceptance: brocfile-smoke-test', function () { }); }); - it('specifying custom output paths works properly', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } - await copyFixtureFiles('brocfile-tests/custom-output-paths'); + // custom outputPaths are deprecated under embroider + if (!isExperimentEnabled('EMBROIDER')) { + it('specifying custom output paths works properly', async function () { + await copyFixtureFiles('brocfile-tests/custom-output-paths'); - let themeCSSPath = path.join(appRoot, 'app', 'styles', 'theme.css'); - fs.writeFileSync(themeCSSPath, 'html, body { margin: 20%; }'); + let themeCSSPath = path.join(appRoot, 'app', 'styles', 'theme.css'); + fs.writeFileSync(themeCSSPath, 'html, body { margin: 20%; }'); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - - let files = [ - '/css/app.css', - '/css/theme/a.css', - '/js/app.js', - '/css/vendor.css', - '/js/vendor.js', - '/css/test-support.css', - '/js/test-support.js', - '/my-app.html', - ]; + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - let basePath = path.join(appRoot, 'dist'); - files.forEach(function (f) { - expect(file(path.join(basePath, f))).to.exist; + let files = [ + '/css/app.css', + '/css/theme/a.css', + '/js/app.js', + '/css/vendor.css', + '/js/vendor.js', + '/css/test-support.css', + '/js/test-support.js', + '/my-app.html', + ]; + + let basePath = path.join(appRoot, 'dist'); + files.forEach(function (f) { + expect(file(path.join(basePath, f))).to.exist; + }); }); - }); + } it('specifying outputFile results in an explicitly generated assets', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles('brocfile-tests/app-import-output-file'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -283,9 +242,6 @@ describe('Acceptance: brocfile-smoke-test', function () { }); it('can use transformation to turn anonymous AMD into named AMD', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles('brocfile-tests/app-import-anonymous-amd'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -310,9 +266,6 @@ describe('Acceptance: brocfile-smoke-test', function () { }); it('can use transformation to turn named UMD into named AMD', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles('brocfile-tests/app-import-named-umd'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); @@ -337,9 +290,6 @@ describe('Acceptance: brocfile-smoke-test', function () { }); it('can do amd transform from addon', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles('brocfile-tests/app-import-custom-transform'); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -370,9 +320,6 @@ describe('Acceptance: brocfile-smoke-test', function () { }); it('can use transformation to turn library into custom transformation', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles('brocfile-tests/app-import-custom-transform'); let packageJsonPath = path.join(appRoot, 'package.json'); @@ -382,88 +329,86 @@ describe('Acceptance: brocfile-smoke-test', function () { await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - let outputJS = fs.readFileSync(path.join(appRoot, 'dist', 'assets', 'output.js'), { - encoding: 'utf8', - }); + let checker = new DistChecker(path.join(appRoot, 'dist')); - expect(outputJS).to.be.equal( - 'if (typeof FastBoot === \'undefined\') { window.hello = "hello world"; }//# sourceMappingURL=output.map\n' - ); + expect( + checker.contains( + 'js', + 'if (typeof FastBoot === \'undefined\') { window.hello = "hello world"; }//# sourceMappingURL=output.map\n' + ) + ).to.be; }); - // skipped because of potentially broken assertion that should be fixed correctly at a later point - it.skip('specifying partial `outputPaths` hash deep merges options correctly', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } - await copyFixtureFiles('brocfile-tests/custom-output-paths'); + // custom outputPaths are deprecated under embroider + if (!isExperimentEnabled('EMBROIDER')) { + // skipped because of potentially broken assertion that should be fixed correctly at a later point + it.skip('specifying partial `outputPaths` hash deep merges options correctly', async function () { + await copyFixtureFiles('brocfile-tests/custom-output-paths'); - let themeCSSPath = path.join(appRoot, 'app', 'styles', 'theme.css'); - fs.writeFileSync(themeCSSPath, 'html, body { margin: 20%; }'); - - let brocfilePath = path.join(appRoot, 'ember-cli-build.js'); - let brocfile = fs.readFileSync(brocfilePath, 'utf8'); + let themeCSSPath = path.join(appRoot, 'app', 'styles', 'theme.css'); + fs.writeFileSync(themeCSSPath, 'html, body { margin: 20%; }'); - // remove outputPaths.app.js option - brocfile = brocfile.replace(/js: '\/js\/app.js'/, ''); - // remove outputPaths.app.css.app option - brocfile = brocfile.replace(/'app': '\/css\/app\.css',/, ''); + let brocfilePath = path.join(appRoot, 'ember-cli-build.js'); + let brocfile = fs.readFileSync(brocfilePath, 'utf8'); - fs.writeFileSync(brocfilePath, brocfile, 'utf8'); + // remove outputPaths.app.js option + brocfile = brocfile.replace(/js: '\/js\/app.js'/, ''); + // remove outputPaths.app.css.app option + brocfile = brocfile.replace(/'app': '\/css\/app\.css',/, ''); - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + fs.writeFileSync(brocfilePath, brocfile, 'utf8'); - let files = [ - '/css/theme/a.css', - '/assets/some-cool-app.js', - '/css/vendor.css', - '/js/vendor.js', - '/css/test-support.css', - '/js/test-support.js', - ]; + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - let basePath = path.join(appRoot, 'dist'); - files.forEach(function (f) { - expect(file(path.join(basePath, f))).to.exist; + let files = [ + '/css/theme/a.css', + '/assets/some-cool-app.js', + '/css/vendor.css', + '/js/vendor.js', + '/css/test-support.css', + '/js/test-support.js', + ]; + + let basePath = path.join(appRoot, 'dist'); + files.forEach(function (f) { + expect(file(path.join(basePath, f))).to.exist; + }); + + expect(file(path.join(basePath, '/assets/some-cool-app.css'))).to.not.exist; }); + } - expect(file(path.join(basePath, '/assets/some-cool-app.css'))).to.not.exist; - }); + // custom outputPaths are deprecated under embroider + if (!isExperimentEnabled('EMBROIDER')) { + it('multiple paths can be CSS preprocessed', async function () { + await copyFixtureFiles('brocfile-tests/multiple-sass-files'); - it('multiple paths can be CSS preprocessed', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } - await copyFixtureFiles('brocfile-tests/multiple-sass-files'); + let packageJsonPath = path.join(appRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + packageJson.devDependencies['ember-cli-sass'] = 'latest'; + fs.writeJsonSync(packageJsonPath, packageJson); - let packageJsonPath = path.join(appRoot, 'package.json'); - let packageJson = fs.readJsonSync(packageJsonPath); - packageJson.devDependencies['ember-cli-sass'] = 'latest'; - fs.writeJsonSync(packageJsonPath, packageJson); - - await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); + await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); - expect(file('dist/assets/main.css')).to.equal('body { background: black; }\n', 'main.css contains correct content'); + expect(file('dist/assets/main.css')).to.equal( + 'body { background: black; }\n', + 'main.css contains correct content' + ); - expect(file('dist/assets/theme/a.css')).to.equal( - '.theme { color: red; }\n', - 'theme/a.css contains correct content' - ); - }); + expect(file('dist/assets/theme/a.css')).to.equal( + '.theme { color: red; }\n', + 'theme/a.css contains correct content' + ); + }); + } it('app.css is output to .css by default', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); expect(file(`dist/assets/${appName}.css`)).to.exist; }); // for backwards compat. it('app.scss is output to .css by default', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles('brocfile-tests/multiple-sass-files'); let brocfilePath = path.join(appRoot, 'ember-cli-build.js'); @@ -485,9 +430,6 @@ describe('Acceptance: brocfile-smoke-test', function () { }); it('additional trees can be passed to the app', async function () { - if (isExperimentEnabled('EMBROIDER')) { - return this.skip(); - } await copyFixtureFiles('brocfile-tests/additional-trees'); await runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build', { verbose: true }); diff --git a/tests/fixtures/brocfile-tests/additional-trees/ember-cli-build.js b/tests/fixtures/brocfile-tests/additional-trees/ember-cli-build.js index 7b496cd57f..19c8b96588 100644 --- a/tests/fixtures/brocfile-tests/additional-trees/ember-cli-build.js +++ b/tests/fixtures/brocfile-tests/additional-trees/ember-cli-build.js @@ -1,5 +1,6 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app'); const Funnel = require('broccoli-funnel'); +const { isExperimentEnabled } = require('ember-cli/lib/experiments'); module.exports = function (defaults) { let app = new EmberApp(defaults, {}); @@ -9,5 +10,12 @@ module.exports = function (defaults) { destDir: '/assets' }); + if (isExperimentEnabled('EMBROIDER')) { + const { Webpack } = require('@embroider/webpack'); + return require('@embroider/compat').compatBuild(app, Webpack, { + extraPublicTrees: [funnel] + }); + } + return app.toTree(funnel); }; diff --git a/tests/fixtures/brocfile-tests/app-import-anonymous-amd/ember-cli-build.js b/tests/fixtures/brocfile-tests/app-import-anonymous-amd/ember-cli-build.js index 2102fc85dc..def1e548cc 100644 --- a/tests/fixtures/brocfile-tests/app-import-anonymous-amd/ember-cli-build.js +++ b/tests/fixtures/brocfile-tests/app-import-anonymous-amd/ember-cli-build.js @@ -1,4 +1,5 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app'); +const { isExperimentEnabled } = require('ember-cli/lib/experiments'); module.exports = function (defaults) { var app = new EmberApp(defaults, { @@ -18,5 +19,10 @@ module.exports = function (defaults) { outputFile: '/assets/output.js' }); + if (isExperimentEnabled('EMBROIDER')) { + const { Webpack } = require('@embroider/webpack'); + return require('@embroider/compat').compatBuild(app, Webpack); + } + return app.toTree(); }; diff --git a/tests/fixtures/brocfile-tests/app-import-custom-transform/ember-cli-build.js b/tests/fixtures/brocfile-tests/app-import-custom-transform/ember-cli-build.js index 850f677281..a7986a6f81 100644 --- a/tests/fixtures/brocfile-tests/app-import-custom-transform/ember-cli-build.js +++ b/tests/fixtures/brocfile-tests/app-import-custom-transform/ember-cli-build.js @@ -1,5 +1,5 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app'); -const map = require('broccoli-stew').map; +const { isExperimentEnabled } = require('ember-cli/lib/experiments'); module.exports = function (defaults) { var app = new EmberApp(defaults, { @@ -14,5 +14,10 @@ module.exports = function (defaults) { outputFile: '/assets/output.js' }); + if (isExperimentEnabled('EMBROIDER')) { + const { Webpack } = require('@embroider/webpack'); + return require('@embroider/compat').compatBuild(app, Webpack); + } + return app.toTree(); }; \ No newline at end of file diff --git a/tests/fixtures/brocfile-tests/app-import-named-umd/ember-cli-build.js b/tests/fixtures/brocfile-tests/app-import-named-umd/ember-cli-build.js index 66b5df4e81..7a95a3fc55 100644 --- a/tests/fixtures/brocfile-tests/app-import-named-umd/ember-cli-build.js +++ b/tests/fixtures/brocfile-tests/app-import-named-umd/ember-cli-build.js @@ -1,4 +1,5 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app'); +const { isExperimentEnabled } = require('ember-cli/lib/experiments'); module.exports = function (defaults) { var app = new EmberApp(defaults, { @@ -18,5 +19,10 @@ module.exports = function (defaults) { outputFile: '/assets/output.js' }); + if (isExperimentEnabled('EMBROIDER')) { + const { Webpack } = require('@embroider/webpack'); + return require('@embroider/compat').compatBuild(app, Webpack); + } + return app.toTree(); }; diff --git a/tests/fixtures/brocfile-tests/app-import-output-file/ember-cli-build.js b/tests/fixtures/brocfile-tests/app-import-output-file/ember-cli-build.js index 60c6e1ab90..5cfadb2569 100644 --- a/tests/fixtures/brocfile-tests/app-import-output-file/ember-cli-build.js +++ b/tests/fixtures/brocfile-tests/app-import-output-file/ember-cli-build.js @@ -1,4 +1,5 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app'); +const { isExperimentEnabled } = require('ember-cli/lib/experiments'); module.exports = function (defaults) { var app = new EmberApp(defaults, {}); @@ -6,5 +7,10 @@ module.exports = function (defaults) { app.import('vendor/custom-output-file.js', {outputFile: '/assets/output-file.js'}); app.import('vendor/custom-output-file.css', {outputFile: '/assets/output-file.css'}); + if (isExperimentEnabled('EMBROIDER')) { + const { Webpack } = require('@embroider/webpack'); + return require('@embroider/compat').compatBuild(app, Webpack); + } + return app.toTree(); }; diff --git a/tests/fixtures/brocfile-tests/auto-run-false/app/app.js b/tests/fixtures/brocfile-tests/auto-run-false/app/app.js new file mode 100644 index 0000000000..d3809c8ca7 --- /dev/null +++ b/tests/fixtures/brocfile-tests/auto-run-false/app/app.js @@ -0,0 +1,17 @@ +import Application from '@ember/application'; +import Resolver from 'ember-resolver'; +import loadInitializers from 'ember-load-initializers'; +import config from 'some-cool-app/config/environment'; + +export default class App extends Application { + modulePrefix = config.modulePrefix; + podModulePrefix = config.podModulePrefix; + Resolver = Resolver; + + init() { + super.init(); + window.APP_HAS_LOADED = true; + } +} + +loadInitializers(App, config.modulePrefix); \ No newline at end of file diff --git a/tests/fixtures/brocfile-tests/auto-run-false/ember-cli-build.js b/tests/fixtures/brocfile-tests/auto-run-false/ember-cli-build.js index 29d08305c7..f71a75a3c4 100644 --- a/tests/fixtures/brocfile-tests/auto-run-false/ember-cli-build.js +++ b/tests/fixtures/brocfile-tests/auto-run-false/ember-cli-build.js @@ -1,9 +1,15 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app'); +const { isExperimentEnabled } = require('ember-cli/lib/experiments'); module.exports = function (defaults) { var app = new EmberApp(defaults, { autoRun: false }); + if (isExperimentEnabled('EMBROIDER')) { + const { Webpack } = require('@embroider/webpack'); + return require('@embroider/compat').compatBuild(app, Webpack); + } + return app.toTree(); }; diff --git a/tests/fixtures/brocfile-tests/auto-run-true/app/app.js b/tests/fixtures/brocfile-tests/auto-run-true/app/app.js new file mode 100644 index 0000000000..d3809c8ca7 --- /dev/null +++ b/tests/fixtures/brocfile-tests/auto-run-true/app/app.js @@ -0,0 +1,17 @@ +import Application from '@ember/application'; +import Resolver from 'ember-resolver'; +import loadInitializers from 'ember-load-initializers'; +import config from 'some-cool-app/config/environment'; + +export default class App extends Application { + modulePrefix = config.modulePrefix; + podModulePrefix = config.podModulePrefix; + Resolver = Resolver; + + init() { + super.init(); + window.APP_HAS_LOADED = true; + } +} + +loadInitializers(App, config.modulePrefix); \ No newline at end of file diff --git a/tests/fixtures/brocfile-tests/auto-run-true/ember-cli-build.js b/tests/fixtures/brocfile-tests/auto-run-true/ember-cli-build.js index 6f40251905..320ff492c4 100644 --- a/tests/fixtures/brocfile-tests/auto-run-true/ember-cli-build.js +++ b/tests/fixtures/brocfile-tests/auto-run-true/ember-cli-build.js @@ -1,9 +1,15 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app'); +const { isExperimentEnabled } = require('ember-cli/lib/experiments'); module.exports = function (defaults) { var app = new EmberApp(defaults, { autoRun: true }); + if (isExperimentEnabled('EMBROIDER')) { + const { Webpack } = require('@embroider/webpack'); + return require('@embroider/compat').compatBuild(app, Webpack); + } + return app.toTree(); }; diff --git a/tests/fixtures/brocfile-tests/custom-ember-env/config/environment.js b/tests/fixtures/brocfile-tests/custom-ember-env/config/environment.js index e93f8a1357..19c57d2ff2 100644 --- a/tests/fixtures/brocfile-tests/custom-ember-env/config/environment.js +++ b/tests/fixtures/brocfile-tests/custom-ember-env/config/environment.js @@ -1,6 +1,7 @@ module.exports = function() { return { modulePrefix: 'some-cool-app', + rootURL: '/', EmberENV: { asdflkmawejf: ';jlnu3yr23' }, diff --git a/tests/fixtures/brocfile-tests/custom-environment-config/config/environment.js b/tests/fixtures/brocfile-tests/custom-environment-config/config/environment.js index 8b9b53f050..2eefbf4eeb 100644 --- a/tests/fixtures/brocfile-tests/custom-environment-config/config/environment.js +++ b/tests/fixtures/brocfile-tests/custom-environment-config/config/environment.js @@ -2,7 +2,7 @@ module.exports = function() { return { modulePrefix: 'some-cool-app', fileUsed: 'config/environment.js', - baseURL: '/', + rootURL: '/', locationType: 'auto', }; }; diff --git a/tests/fixtures/brocfile-tests/custom-environment-config/config/something-else.js b/tests/fixtures/brocfile-tests/custom-environment-config/config/something-else.js index 2494f79005..5b444a9174 100644 --- a/tests/fixtures/brocfile-tests/custom-environment-config/config/something-else.js +++ b/tests/fixtures/brocfile-tests/custom-environment-config/config/something-else.js @@ -2,7 +2,7 @@ module.exports = function() { return { modulePrefix: 'some-cool-app', fileUsed: 'config/something-else.js', - baseURL: '/', + rootURL: '/', locationType: 'auto', APP: { autoboot: false diff --git a/tests/fixtures/brocfile-tests/custom-environment-config/ember-cli-build.js b/tests/fixtures/brocfile-tests/custom-environment-config/ember-cli-build.js index bfc9e28add..a9786ee6e1 100644 --- a/tests/fixtures/brocfile-tests/custom-environment-config/ember-cli-build.js +++ b/tests/fixtures/brocfile-tests/custom-environment-config/ember-cli-build.js @@ -1,9 +1,16 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app'); +const { isExperimentEnabled } = require('ember-cli/lib/experiments'); module.exports = function (defaults) { var app = new EmberApp(defaults, { configPath: 'config/something-else' }); + + if (isExperimentEnabled('EMBROIDER')) { + const { Webpack } = require('@embroider/webpack'); + return require('@embroider/compat').compatBuild(app, Webpack); + } + return app.toTree(); }; diff --git a/tests/fixtures/brocfile-tests/custom-output-paths/ember-cli-build.js b/tests/fixtures/brocfile-tests/custom-output-paths/ember-cli-build.js index 92dabd3c69..190b32c3d6 100644 --- a/tests/fixtures/brocfile-tests/custom-output-paths/ember-cli-build.js +++ b/tests/fixtures/brocfile-tests/custom-output-paths/ember-cli-build.js @@ -1,4 +1,5 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app'); +const { isExperimentEnabled } = require('ember-cli/lib/experiments'); module.exports = function (defaults) { var app = new EmberApp(defaults, { @@ -25,5 +26,10 @@ module.exports = function (defaults) { } }); + if (isExperimentEnabled('EMBROIDER')) { + const { Webpack } = require('@embroider/webpack'); + return require('@embroider/compat').compatBuild(app, Webpack); + } + return app.toTree(); }; diff --git a/tests/fixtures/brocfile-tests/multiple-sass-files/ember-cli-build.js b/tests/fixtures/brocfile-tests/multiple-sass-files/ember-cli-build.js index 96618a02dd..bc8e1d4db8 100644 --- a/tests/fixtures/brocfile-tests/multiple-sass-files/ember-cli-build.js +++ b/tests/fixtures/brocfile-tests/multiple-sass-files/ember-cli-build.js @@ -1,4 +1,5 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app'); +const { isExperimentEnabled } = require('ember-cli/lib/experiments'); module.exports = function (defaults) { var app = new EmberApp(defaults, { @@ -6,5 +7,10 @@ module.exports = function (defaults) { outputPaths: { app: { css: { 'main': '/assets/main.css', 'theme/a': '/assets/theme/a.css' } } } }); + if (isExperimentEnabled('EMBROIDER')) { + const { Webpack } = require('@embroider/webpack'); + return require('@embroider/compat').compatBuild(app, Webpack); + } + return app.toTree(); }; From ff21298a5ea92b0e51393745cf0af654272da93a Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Mon, 8 Mar 2021 15:51:40 -0800 Subject: [PATCH 693/818] remove extra whitespace --- .../brocfile-tests/custom-environment-config/ember-cli-build.js | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/fixtures/brocfile-tests/custom-environment-config/ember-cli-build.js b/tests/fixtures/brocfile-tests/custom-environment-config/ember-cli-build.js index a9786ee6e1..ef5f7a6ce5 100644 --- a/tests/fixtures/brocfile-tests/custom-environment-config/ember-cli-build.js +++ b/tests/fixtures/brocfile-tests/custom-environment-config/ember-cli-build.js @@ -6,7 +6,6 @@ module.exports = function (defaults) { configPath: 'config/something-else' }); - if (isExperimentEnabled('EMBROIDER')) { const { Webpack } = require('@embroider/webpack'); return require('@embroider/compat').compatBuild(app, Webpack); From 086c5fab906b089662e58f59580fe4b91ff2adb0 Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Wed, 17 Mar 2021 09:06:06 -0700 Subject: [PATCH 694/818] fix fixture data --- .../custom-environment-config/ember-cli-build.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/fixtures/brocfile-tests/custom-environment-config/ember-cli-build.js b/tests/fixtures/brocfile-tests/custom-environment-config/ember-cli-build.js index ef5f7a6ce5..2f439b757e 100644 --- a/tests/fixtures/brocfile-tests/custom-environment-config/ember-cli-build.js +++ b/tests/fixtures/brocfile-tests/custom-environment-config/ember-cli-build.js @@ -8,7 +8,11 @@ module.exports = function (defaults) { if (isExperimentEnabled('EMBROIDER')) { const { Webpack } = require('@embroider/webpack'); - return require('@embroider/compat').compatBuild(app, Webpack); + return require('@embroider/compat').compatBuild(app, Webpack, { + skipBabel: [{ + package: 'qunit' + }] + }); } return app.toTree(); From 2e780ce718d47666ef1de0941ca3e2c29684b12b Mon Sep 17 00:00:00 2001 From: Bert De Block Date: Thu, 18 Mar 2021 15:48:13 +0100 Subject: [PATCH 695/818] Update supported Ember version in addon blueprint --- blueprints/addon/files/README.md | 2 +- tests/fixtures/addon/defaults/README.md | 2 +- tests/fixtures/addon/yarn/README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/blueprints/addon/files/README.md b/blueprints/addon/files/README.md index c229f9afd9..3218c4025a 100644 --- a/blueprints/addon/files/README.md +++ b/blueprints/addon/files/README.md @@ -7,7 +7,7 @@ Compatibility ------------------------------------------------------------------------------ -* Ember.js v3.16 or above +* Ember.js v3.20 or above * Ember CLI v2.13 or above * Node.js v10 or above diff --git a/tests/fixtures/addon/defaults/README.md b/tests/fixtures/addon/defaults/README.md index 246839130b..6c9c95bd08 100644 --- a/tests/fixtures/addon/defaults/README.md +++ b/tests/fixtures/addon/defaults/README.md @@ -7,7 +7,7 @@ foo Compatibility ------------------------------------------------------------------------------ -* Ember.js v3.16 or above +* Ember.js v3.20 or above * Ember CLI v2.13 or above * Node.js v10 or above diff --git a/tests/fixtures/addon/yarn/README.md b/tests/fixtures/addon/yarn/README.md index 246839130b..6c9c95bd08 100644 --- a/tests/fixtures/addon/yarn/README.md +++ b/tests/fixtures/addon/yarn/README.md @@ -7,7 +7,7 @@ foo Compatibility ------------------------------------------------------------------------------ -* Ember.js v3.16 or above +* Ember.js v3.20 or above * Ember CLI v2.13 or above * Node.js v10 or above From 97f8f4e0b4b7ee42f549301e3fac9bf2db011769 Mon Sep 17 00:00:00 2001 From: Bert De Block Date: Fri, 19 Mar 2021 16:36:18 +0100 Subject: [PATCH 696/818] Update supported Ember CLI version in addon blueprint --- blueprints/addon/files/README.md | 2 +- tests/fixtures/addon/defaults/README.md | 2 +- tests/fixtures/addon/yarn/README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/blueprints/addon/files/README.md b/blueprints/addon/files/README.md index 3218c4025a..e6972a912a 100644 --- a/blueprints/addon/files/README.md +++ b/blueprints/addon/files/README.md @@ -8,7 +8,7 @@ Compatibility ------------------------------------------------------------------------------ * Ember.js v3.20 or above -* Ember CLI v2.13 or above +* Ember CLI v3.20 or above * Node.js v10 or above diff --git a/tests/fixtures/addon/defaults/README.md b/tests/fixtures/addon/defaults/README.md index 6c9c95bd08..f863b52d51 100644 --- a/tests/fixtures/addon/defaults/README.md +++ b/tests/fixtures/addon/defaults/README.md @@ -8,7 +8,7 @@ Compatibility ------------------------------------------------------------------------------ * Ember.js v3.20 or above -* Ember CLI v2.13 or above +* Ember CLI v3.20 or above * Node.js v10 or above diff --git a/tests/fixtures/addon/yarn/README.md b/tests/fixtures/addon/yarn/README.md index 6c9c95bd08..f863b52d51 100644 --- a/tests/fixtures/addon/yarn/README.md +++ b/tests/fixtures/addon/yarn/README.md @@ -8,7 +8,7 @@ Compatibility ------------------------------------------------------------------------------ * Ember.js v3.20 or above -* Ember CLI v2.13 or above +* Ember CLI v3.20 or above * Node.js v10 or above From cd0fa8b7b08887d60663fceb907623f37eb82619 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 19 Mar 2021 10:23:58 -0400 Subject: [PATCH 697/818] Prevent window.Ember deprecation on Ember 3.27+. Accessing `window.Ember` (e.g. without importing) will issue a deprecation in Ember 3.27 and higher, and ultimately removed in Ember 4. --- lib/utilities/ember-app-utils.js | 8 +++++++- tests/unit/utilities/ember-app-utils-test.js | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/utilities/ember-app-utils.js b/lib/utilities/ember-app-utils.js index cf6e732020..f3f31508e7 100644 --- a/lib/utilities/ember-app-utils.js +++ b/lib/utilities/ember-app-utils.js @@ -129,7 +129,13 @@ function contentFor(config, match, type, options) { break; case 'test-body-footer': content.push( - `` + `` ); break; diff --git a/tests/unit/utilities/ember-app-utils-test.js b/tests/unit/utilities/ember-app-utils-test.js index faafc3c4c1..8d76738cb8 100644 --- a/tests/unit/utilities/ember-app-utils-test.js +++ b/tests/unit/utilities/ember-app-utils-test.js @@ -211,7 +211,13 @@ describe('ember-app-utils', function () { let output = contentFor(config, defaultMatch, 'test-body-footer', defaultOptions); expect(output, 'includes `` + `` ); }); }); From c7a8bfddee1526e74c70b6f3488302a2cdfbcc47 Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Fri, 19 Mar 2021 11:27:28 -0700 Subject: [PATCH 698/818] ensure --embroider is saved as blueprint options --- blueprints/app/index.js | 9 ++- tests/acceptance/new-test.js | 11 +-- .../config/ember-cli-update.json | 21 ++++++ .../config/ember-cli-update.json | 21 ++++++ .../fixtures/app/embroider-yarn/package.json | 73 +++++++++++++++++++ .../embroider/config/ember-cli-update.json | 20 +++++ 6 files changed, 145 insertions(+), 10 deletions(-) create mode 100644 tests/fixtures/app/embroider-no-welcome/config/ember-cli-update.json create mode 100644 tests/fixtures/app/embroider-yarn/config/ember-cli-update.json create mode 100644 tests/fixtures/app/embroider-yarn/package.json create mode 100644 tests/fixtures/app/embroider/config/ember-cli-update.json diff --git a/blueprints/app/index.js b/blueprints/app/index.js index c54ba79881..73d3c8db7c 100644 --- a/blueprints/app/index.js +++ b/blueprints/app/index.js @@ -21,8 +21,9 @@ module.exports = { let rawName = entity.name; let name = stringUtil.dasherize(rawName); let namespace = stringUtil.classify(rawName); + let embroider = isExperimentEnabled('EMBROIDER') || options.embroider; - let hasOptions = !options.welcome || options.yarn; + let hasOptions = !options.welcome || options.yarn || embroider; let blueprintOptions = ''; if (hasOptions) { let indent = `\n `; @@ -30,7 +31,9 @@ module.exports = { blueprintOptions = indent + - [!options.welcome && '"--no-welcome"', options.yarn && '"--yarn"'].filter(Boolean).join(',\n ') + + [!options.welcome && '"--no-welcome"', options.yarn && '"--yarn"', embroider && '"--embroider"'] + .filter(Boolean) + .join(',\n ') + outdent; } @@ -43,7 +46,7 @@ module.exports = { welcome: options.welcome, blueprint: 'app', blueprintOptions, - embroider: isExperimentEnabled('EMBROIDER') || options.embroider, + embroider, lang: options.lang, }; }, diff --git a/tests/acceptance/new-test.js b/tests/acceptance/new-test.js index 45f977ea8b..a3137036ac 100644 --- a/tests/acceptance/new-test.js +++ b/tests/acceptance/new-test.js @@ -470,12 +470,11 @@ describe('Acceptance: ember new', function () { expect(file(filePath)).to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath))); }); - checkFileWithEmberCLIVersionReplacement(fixturePath, 'config/ember-cli-update.json'); - if (isExperimentEnabled('EMBROIDER')) { fixturePath = `${namespace}/embroider`; } + checkFileWithEmberCLIVersionReplacement(fixturePath, 'config/ember-cli-update.json'); checkFileWithEmberCLIVersionReplacement(fixturePath, 'package.json'); checkEmberCLIBuild(fixturePath, 'ember-cli-build.js'); @@ -522,12 +521,11 @@ describe('Acceptance: ember new', function () { expect(file(filePath)).to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath))); }); - checkFileWithEmberCLIVersionReplacement(fixturePath, 'config/ember-cli-update.json'); - if (isExperimentEnabled('EMBROIDER')) { fixturePath = 'app/embroider-no-welcome'; } + checkFileWithEmberCLIVersionReplacement(fixturePath, 'config/ember-cli-update.json'); checkFileWithEmberCLIVersionReplacement(fixturePath, 'package.json'); // option independent, but piggy-backing on an existing generate for speed checkEslintConfig(namespace); @@ -542,12 +540,11 @@ describe('Acceptance: ember new', function () { expect(file(filePath)).to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath))); }); - checkFileWithEmberCLIVersionReplacement(fixturePath, 'config/ember-cli-update.json'); - if (isExperimentEnabled('EMBROIDER')) { - fixturePath = 'app/embroider'; + fixturePath = 'app/embroider-yarn'; } + checkFileWithEmberCLIVersionReplacement(fixturePath, 'config/ember-cli-update.json'); checkFileWithEmberCLIVersionReplacement(fixturePath, 'package.json'); }); diff --git a/tests/fixtures/app/embroider-no-welcome/config/ember-cli-update.json b/tests/fixtures/app/embroider-no-welcome/config/ember-cli-update.json new file mode 100644 index 0000000000..4322ddea26 --- /dev/null +++ b/tests/fixtures/app/embroider-no-welcome/config/ember-cli-update.json @@ -0,0 +1,21 @@ +{ + "schemaVersion": "1.0.0", + "packages": [ + { + "name": "ember-cli", + "version": "<%= emberCLIVersion %>", + "blueprints": [ + { + "name": "app", + "outputRepo": "https://github.com/ember-cli/ember-new-output", + "codemodsSource": "ember-app-codemods-manifest@1", + "isBaseBlueprint": true, + "options": [ + "--no-welcome", + "--embroider" + ] + } + ] + } + ] +} diff --git a/tests/fixtures/app/embroider-yarn/config/ember-cli-update.json b/tests/fixtures/app/embroider-yarn/config/ember-cli-update.json new file mode 100644 index 0000000000..140099c30a --- /dev/null +++ b/tests/fixtures/app/embroider-yarn/config/ember-cli-update.json @@ -0,0 +1,21 @@ +{ + "schemaVersion": "1.0.0", + "packages": [ + { + "name": "ember-cli", + "version": "<%= emberCLIVersion %>", + "blueprints": [ + { + "name": "app", + "outputRepo": "https://github.com/ember-cli/ember-new-output", + "codemodsSource": "ember-app-codemods-manifest@1", + "isBaseBlueprint": true, + "options": [ + "--yarn", + "--embroider" + ] + } + ] + } + ] +} diff --git a/tests/fixtures/app/embroider-yarn/package.json b/tests/fixtures/app/embroider-yarn/package.json new file mode 100644 index 0000000000..b7a1f646f4 --- /dev/null +++ b/tests/fixtures/app/embroider-yarn/package.json @@ -0,0 +1,73 @@ +{ + "name": "foo", + "version": "0.0.0", + "private": true, + "description": "Small description for foo goes here", + "repository": "", + "license": "MIT", + "author": "", + "directories": { + "doc": "doc", + "test": "tests" + }, + "scripts": { + "build": "ember build --environment=production", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'", + "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix", + "lint:hbs": "ember-template-lint .", + "lint:hbs:fix": "ember-template-lint . --fix", + "lint:js": "eslint . --cache", + "lint:js:fix": "eslint . --fix", + "start": "ember serve", + "test": "npm-run-all lint test:*", + "test:ember": "ember test" + }, + "devDependencies": { + "@ember/optional-features": "^2.0.0", + "@ember/test-helpers": "^2.2.0", + "@embroider/compat": "^0.37.0", + "@embroider/core": "^0.37.0", + "@embroider/webpack": "^0.37.0", + "@glimmer/component": "^1.0.3", + "@glimmer/tracking": "^1.0.3", + "babel-eslint": "^10.1.0", + "broccoli-asset-rev": "^3.0.0", + "ember-auto-import": "^1.10.1", + "ember-cli": "~<%= emberCLIVersion %>", + "ember-cli-app-version": "^4.0.0", + "ember-cli-babel": "^7.23.1", + "ember-cli-dependency-checker": "^3.2.0", + "ember-cli-htmlbars": "^5.3.2", + "ember-cli-inject-live-reload": "^2.0.2", + "ember-cli-sri": "^2.1.1", + "ember-cli-terser": "^4.0.1", + "ember-data": "~3.26.0-beta.0", + "ember-export-application-global": "^2.0.1", + "ember-fetch": "^8.0.4", + "ember-load-initializers": "^2.1.2", + "ember-maybe-import-regenerator": "^0.1.6", + "ember-page-title": "^6.2.1", + "ember-qunit": "^5.1.4", + "ember-resolver": "^8.0.2", + "ember-source": "~3.26.0-beta.2", + "ember-template-lint": "^2.18.1", + "ember-welcome-page": "^4.0.0", + "eslint": "^7.20.0", + "eslint-config-prettier": "^7.2.0", + "eslint-plugin-ember": "^10.2.0", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-prettier": "^3.3.1", + "eslint-plugin-qunit": "^6.0.0", + "loader.js": "^4.7.0", + "npm-run-all": "^4.1.5", + "prettier": "^2.2.1", + "qunit": "^2.14.1", + "qunit-dom": "^1.6.0" + }, + "engines": { + "node": "10.* || >= 12" + }, + "ember": { + "edition": "octane" + } +} diff --git a/tests/fixtures/app/embroider/config/ember-cli-update.json b/tests/fixtures/app/embroider/config/ember-cli-update.json new file mode 100644 index 0000000000..2cd80dfc9d --- /dev/null +++ b/tests/fixtures/app/embroider/config/ember-cli-update.json @@ -0,0 +1,20 @@ +{ + "schemaVersion": "1.0.0", + "packages": [ + { + "name": "ember-cli", + "version": "<%= emberCLIVersion %>", + "blueprints": [ + { + "name": "app", + "outputRepo": "https://github.com/ember-cli/ember-new-output", + "codemodsSource": "ember-app-codemods-manifest@1", + "isBaseBlueprint": true, + "options": [ + "--embroider" + ] + } + ] + } + ] +} From 782f95abd49c5280bed060acb139aaf129857c46 Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Mon, 22 Mar 2021 13:10:37 -0700 Subject: [PATCH 699/818] add classic case for CI --- .github/workflows/ci.yml | 1 + lib/experiments/index.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 743d3b7d92..855499fdec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,6 +79,7 @@ jobs: - ENABLE_ALL_EXPERIMENTS - PACKAGER - EMBROIDER + - CLASSIC steps: - uses: actions/checkout@v2 diff --git a/lib/experiments/index.js b/lib/experiments/index.js index b3b4cc1ce1..d9459089c4 100644 --- a/lib/experiments/index.js +++ b/lib/experiments/index.js @@ -20,6 +20,10 @@ function isExperimentEnabled(experimentName) { return true; } + if (process.env.EMBER_CLI_CLASSIC && experimentName === 'EMBROIDER') { + return false; + } + let experimentEnvironmentVariable = `EMBER_CLI_${experimentName}`; let experimentValue = process.env[experimentEnvironmentVariable]; From 40c7ff6bf9414c21e58f18826a521ea80f07a34b Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Mon, 22 Mar 2021 23:34:47 -0700 Subject: [PATCH 700/818] fixing failing tests --- tests/acceptance/new-test.js | 32 +++++++++++++++++--------------- tests/unit/experiments-test.js | 7 +++++++ 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/tests/acceptance/new-test.js b/tests/acceptance/new-test.js index a3137036ac..0ced6d107b 100644 --- a/tests/acceptance/new-test.js +++ b/tests/acceptance/new-test.js @@ -413,22 +413,24 @@ describe('Acceptance: ember new', function () { expect(pkgJson.name).to.equal('@foo/bar', 'uses addon name for package name'); }); - it('embroider experiment creates the correct files', async function () { - let ORIGINAL_PROCESS_ENV = process.env.EMBER_CLI_EMBROIDER; - process.env['EMBER_CLI_EMBROIDER'] = 'true'; - await ember(['new', 'foo', '--skip-npm', '--skip-git', '--skip-bower']); - - if (ORIGINAL_PROCESS_ENV === undefined) { - delete process.env['EMBER_CLI_EMBROIDER']; - } else { - process.env['EMBER_CLI_EMBROIDER'] = ORIGINAL_PROCESS_ENV; - } + if (!isExperimentEnabled('CLASSIC')) { + it('embroider experiment creates the correct files', async function () { + let ORIGINAL_PROCESS_ENV = process.env.EMBER_CLI_EMBROIDER; + process.env['EMBER_CLI_EMBROIDER'] = 'true'; + await ember(['new', 'foo', '--skip-npm', '--skip-git', '--skip-bower']); + + if (ORIGINAL_PROCESS_ENV === undefined) { + delete process.env['EMBER_CLI_EMBROIDER']; + } else { + process.env['EMBER_CLI_EMBROIDER'] = ORIGINAL_PROCESS_ENV; + } - let pkgJson = fs.readJsonSync('package.json'); - expect(pkgJson.devDependencies['@embroider/compat']).to.exist; - expect(pkgJson.devDependencies['@embroider/core']).to.exist; - expect(pkgJson.devDependencies['@embroider/webpack']).to.exist; - }); + let pkgJson = fs.readJsonSync('package.json'); + expect(pkgJson.devDependencies['@embroider/compat']).to.exist; + expect(pkgJson.devDependencies['@embroider/core']).to.exist; + expect(pkgJson.devDependencies['@embroider/webpack']).to.exist; + }); + } it('embroider enabled with --embroider', async function () { await ember(['new', 'foo', '--skip-npm', '--skip-git', '--skip-bower', '--embroider']); diff --git a/tests/unit/experiments-test.js b/tests/unit/experiments-test.js index 5de1c7d5d4..391ad1d822 100644 --- a/tests/unit/experiments-test.js +++ b/tests/unit/experiments-test.js @@ -32,6 +32,7 @@ describe('experiments', function () { // afterEach delete process.env.EMBER_CLI_ENABLE_ALL_EXPERIMENTS; delete process.env.EMBER_CLI_EMBROIDER; + delete process.env.EMBER_CLI_CLASSIC; warnings = []; console.warn = (warning) => warnings.push(warning); @@ -53,6 +54,12 @@ describe('experiments', function () { it('should return true when an experiment is enabled via environment variable', function () { process.env.EMBER_CLI_EMBROIDER = 'true'; + process.env.CLASSIC = 'true'; + + // classic experiment will disable embroider + expect(isExperimentEnabled('EMBROIDER')).to.be.false; + + delete process.env.CLASSIC; expect(isExperimentEnabled('EMBROIDER')).to.be.true; From f7e3f9a82d09baf6912daeea1ea8d1ea217913dd Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Tue, 23 Mar 2021 00:16:29 -0700 Subject: [PATCH 701/818] fixing env name --- tests/unit/experiments-test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/experiments-test.js b/tests/unit/experiments-test.js index 391ad1d822..676d83fae4 100644 --- a/tests/unit/experiments-test.js +++ b/tests/unit/experiments-test.js @@ -54,12 +54,12 @@ describe('experiments', function () { it('should return true when an experiment is enabled via environment variable', function () { process.env.EMBER_CLI_EMBROIDER = 'true'; - process.env.CLASSIC = 'true'; + process.env.EMBER_CLI_CLASSIC = 'true'; // classic experiment will disable embroider expect(isExperimentEnabled('EMBROIDER')).to.be.false; - delete process.env.CLASSIC; + delete process.env.EMBER_CLI_CLASSIC; expect(isExperimentEnabled('EMBROIDER')).to.be.true; From 16bb02e62caef4a8e8a0fe66b0e0f3981633e552 Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Tue, 23 Mar 2021 10:29:23 -0700 Subject: [PATCH 702/818] Adding CLASSIC as an experiment --- lib/experiments/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/experiments/index.js b/lib/experiments/index.js index d9459089c4..6cbbc155da 100644 --- a/lib/experiments/index.js +++ b/lib/experiments/index.js @@ -1,7 +1,7 @@ 'use strict'; const chalk = require('chalk'); -const availableExperiments = Object.freeze(['PACKAGER', 'EMBROIDER']); +const availableExperiments = Object.freeze(['PACKAGER', 'EMBROIDER', 'CLASSIC']); const deprecatedExperiments = Object.freeze(['BROCCOLI_WATCHER', 'PACKAGER']); const enabledExperiments = Object.freeze([]); From de1f29e5fdaa46b37f30bba2e7d056550f33b2c4 Mon Sep 17 00:00:00 2001 From: Esquith Allen <18001622+esquith@users.noreply.github.com> Date: Fri, 26 Mar 2021 00:48:25 -0400 Subject: [PATCH 703/818] Update hardware-info.js --- lib/models/hardware-info.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/models/hardware-info.js b/lib/models/hardware-info.js index 6e63fe6989..cfb1a4aa1d 100644 --- a/lib/models/hardware-info.js +++ b/lib/models/hardware-info.js @@ -230,7 +230,7 @@ function memorySwapUsedWindows() { const hwinfo = { /** - * Inidcates whether the host is running on battery power. This can cause + * Indicates whether the host is running on battery power. This can cause * performance degredation. * * @private From dcbdad79efef1e0e5b721d8e34151b161a609517 Mon Sep 17 00:00:00 2001 From: Esquith Allen Date: Fri, 26 Mar 2021 01:01:55 -0400 Subject: [PATCH 704/818] Fix typos --- lib/models/addon.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/models/addon.js b/lib/models/addon.js index c9bdb08ed3..c479b65350 100644 --- a/lib/models/addon.js +++ b/lib/models/addon.js @@ -985,7 +985,7 @@ let addonProto = { /** Looks in the addon/ and addon/templates trees to determine if template files - exists that need to be precompiled. + exist that need to be precompiled. This is executed once when building, but not on rebuilds. @@ -999,7 +999,7 @@ let addonProto = { /** Looks in the addon/ and addon/templates trees to determine if template files - exists in the pods format that need to be precompiled. + exist in the pods format that need to be precompiled. This is executed once when building, but not on rebuilds. @@ -1028,7 +1028,7 @@ let addonProto = { addonTemplatesTreeInAddonTree && addonTemplatesTreePath.replace(`${addonTreePath}/`, ''); let podTemplateMatcher = new RegExp(`template.(${templateExtensions.join('|')})$`); let hasPodTemplates = files.some((file) => { - // short circuit if this is actually a `addon/templates` file + // short circuit if this is actually an `addon/templates` file if (addonTemplatesTreeInAddonTree && file.indexOf(addonTemplatesRelativeToAddonPath) === 0) { return false; } @@ -1204,7 +1204,7 @@ let addonProto = { }, /** - Returns a tree with JSHhint output for all addon JS. + Returns a tree with JSHint output for all addon JS. @private @method jshintAddonTree @@ -1367,7 +1367,7 @@ let addonProto = { }, /** - Augments the applications configuration settings. + Augments the application's configuration settings. Object returned from this hook is merged with the application's configuration object. From e1e5d0c05f1607a152dc3715ad25b2753c65974f Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 19 Mar 2021 10:23:58 -0400 Subject: [PATCH 705/818] Prevent window.Ember deprecation on Ember 3.27+. Accessing `window.Ember` (e.g. without importing) will issue a deprecation in Ember 3.27 and higher, and ultimately removed in Ember 4. (cherry picked from commit cd0fa8b7b08887d60663fceb907623f37eb82619) --- lib/utilities/ember-app-utils.js | 8 +++++++- tests/unit/utilities/ember-app-utils-test.js | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/utilities/ember-app-utils.js b/lib/utilities/ember-app-utils.js index cf6e732020..f3f31508e7 100644 --- a/lib/utilities/ember-app-utils.js +++ b/lib/utilities/ember-app-utils.js @@ -129,7 +129,13 @@ function contentFor(config, match, type, options) { break; case 'test-body-footer': content.push( - `` + `` ); break; diff --git a/tests/unit/utilities/ember-app-utils-test.js b/tests/unit/utilities/ember-app-utils-test.js index faafc3c4c1..8d76738cb8 100644 --- a/tests/unit/utilities/ember-app-utils-test.js +++ b/tests/unit/utilities/ember-app-utils-test.js @@ -211,7 +211,13 @@ describe('ember-app-utils', function () { let output = contentFor(config, defaultMatch, 'test-body-footer', defaultOptions); expect(output, 'includes `` + `` ); }); }); From c6b30bb8da3a98811e110f82308451609630ed65 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 29 Mar 2021 13:08:01 -0400 Subject: [PATCH 706/818] Add v3.25.3 to CHANGELOG.md. --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 877ddf4117..0e49cb45d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,19 @@ # ember-cli Changelog +## v3.25.3 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.25.2...v3.25.3) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.25.2...v3.25.3) + +#### Changelog + +- [#9490](https://github.com/ember-cli/ember-cli/pull/9490) Prevent `window.Ember` deprecation when testing (for Ember 3.27+) [@rwjblue](https://github.com/rwjblue) + +Thank you to all who took the time to contribute! + ## v3.25.2 #### Blueprint Changes From 67afb8728ee54ce37ec006ceadef5d9ea8b3875b Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 29 Mar 2021 13:09:42 -0400 Subject: [PATCH 707/818] Release 3.25.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3cdf2adb4b..8bb4cb2083 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.25.2", + "version": "3.25.3", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From e922dee91ec91716a1cdd3ea4f0610c3a99edb8f Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 29 Mar 2021 13:12:52 -0400 Subject: [PATCH 708/818] Update app / addon blueprint dependencies. --- .../addon/additional-dev-dependencies.json | 2 +- blueprints/app/files/package.json | 36 +++++++++---------- tests/fixtures/addon/defaults/package.json | 28 +++++++-------- tests/fixtures/addon/yarn/package.json | 28 +++++++-------- tests/fixtures/app/defaults/package.json | 30 ++++++++-------- .../app/embroider-no-welcome/package.json | 36 +++++++++---------- tests/fixtures/app/embroider/package.json | 36 +++++++++---------- tests/fixtures/app/npm/package.json | 30 ++++++++-------- tests/fixtures/app/yarn/package.json | 30 ++++++++-------- 9 files changed, 128 insertions(+), 128 deletions(-) diff --git a/blueprints/addon/additional-dev-dependencies.json b/blueprints/addon/additional-dev-dependencies.json index 9611d6b9bd..168bcb5b25 100644 --- a/blueprints/addon/additional-dev-dependencies.json +++ b/blueprints/addon/additional-dev-dependencies.json @@ -1,6 +1,6 @@ { "devDependencies": { - "@embroider/test-setup": "^0.36.0", + "@embroider/test-setup": "^0.37.0", "ember-disable-prototype-extensions": "^1.1.3", "ember-try": "^1.4.0", "ember-source-channel-url": "^3.0.0" diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 554e5bef61..7129736790 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -24,43 +24,43 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.2.0<% if (embroider) { %>", - "@embroider/compat": "^0.36.0", - "@embroider/core": "^0.36.0", - "@embroider/webpack": "^0.36.0<% } %>", - "@glimmer/component": "^1.0.3", - "@glimmer/tracking": "^1.0.3", + "@ember/test-helpers": "^2.2.5<% if (embroider) { %>", + "@embroider/compat": "^0.37.0", + "@embroider/core": "^0.37.0", + "@embroider/webpack": "^0.37.0<% } %>", + "@glimmer/component": "^1.0.4", + "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.10.1", + "ember-auto-import": "^1.11.2", "ember-cli": "~<%= emberCLIVersion %>", - "ember-cli-app-version": "^4.0.0", - "ember-cli-babel": "^7.23.1", + "ember-cli-app-version": "^5.0.0", + "ember-cli-babel": "^7.26.3", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^5.3.2", + "ember-cli-htmlbars": "^5.7.1", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.26.0-beta.0", + "ember-data": "~3.26.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.1", - "ember-qunit": "^5.1.2", + "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.26.0-beta.2", - "ember-template-lint": "^2.18.1<% if (welcome) { %>", + "ember-source": "~3.26.1", + "ember-template-lint": "^3.2.0<% if (welcome) { %>", "ember-welcome-page": "^4.0.0<% } %>", - "eslint": "^7.20.0", - "eslint-config-prettier": "^7.2.0", - "eslint-plugin-ember": "^10.2.0", + "eslint": "^7.23.0", + "eslint-config-prettier": "^8.1.0", + "eslint-plugin-ember": "^10.3.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.14.0", + "qunit": "^2.14.1", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index 91c8a0f74f..ca3ec928e3 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -26,18 +26,18 @@ "test:ember-compatibility": "ember try:each" }, "dependencies": { - "ember-cli-babel": "^7.23.1", - "ember-cli-htmlbars": "^5.3.2" + "ember-cli-babel": "^7.26.3", + "ember-cli-htmlbars": "^5.7.1" }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.2.0", - "@embroider/test-setup": "^0.36.0", - "@glimmer/component": "^1.0.3", - "@glimmer/tracking": "^1.0.3", + "@ember/test-helpers": "^2.2.5", + "@embroider/test-setup": "^0.37.0", + "@glimmer/component": "^1.0.4", + "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.10.1", + "ember-auto-import": "^1.11.2", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-inject-live-reload": "^2.0.2", @@ -48,21 +48,21 @@ "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.1", - "ember-qunit": "^5.1.2", + "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.26.0-beta.2", + "ember-source": "~3.26.1", "ember-source-channel-url": "^3.0.0", - "ember-template-lint": "^2.18.1", + "ember-template-lint": "^3.2.0", "ember-try": "^1.4.0", - "eslint": "^7.20.0", - "eslint-config-prettier": "^7.2.0", - "eslint-plugin-ember": "^10.2.0", + "eslint": "^7.23.0", + "eslint-config-prettier": "^8.1.0", + "eslint-plugin-ember": "^10.3.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.14.0", + "qunit": "^2.14.1", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 81c1a0c2f8..f1b83cde2f 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -26,18 +26,18 @@ "test:ember-compatibility": "ember try:each" }, "dependencies": { - "ember-cli-babel": "^7.23.1", - "ember-cli-htmlbars": "^5.3.2" + "ember-cli-babel": "^7.26.3", + "ember-cli-htmlbars": "^5.7.1" }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.2.0", - "@embroider/test-setup": "^0.36.0", - "@glimmer/component": "^1.0.3", - "@glimmer/tracking": "^1.0.3", + "@ember/test-helpers": "^2.2.5", + "@embroider/test-setup": "^0.37.0", + "@glimmer/component": "^1.0.4", + "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.10.1", + "ember-auto-import": "^1.11.2", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-inject-live-reload": "^2.0.2", @@ -48,22 +48,22 @@ "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.1", - "ember-qunit": "^5.1.2", + "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.26.0-beta.2", + "ember-source": "~3.26.1", "ember-source-channel-url": "^3.0.0", - "ember-template-lint": "^2.18.1", + "ember-template-lint": "^3.2.0", "ember-try": "^1.4.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.20.0", - "eslint-config-prettier": "^7.2.0", - "eslint-plugin-ember": "^10.2.0", + "eslint": "^7.23.0", + "eslint-config-prettier": "^8.1.0", + "eslint-plugin-ember": "^10.3.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.14.0", + "qunit": "^2.14.1", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index 887ab0ad51..59959f73a8 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -24,40 +24,40 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.2.0", - "@glimmer/component": "^1.0.3", - "@glimmer/tracking": "^1.0.3", + "@ember/test-helpers": "^2.2.5", + "@glimmer/component": "^1.0.4", + "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.10.1", + "ember-auto-import": "^1.11.2", "ember-cli": "~<%= emberCLIVersion %>", - "ember-cli-app-version": "^4.0.0", - "ember-cli-babel": "^7.23.1", + "ember-cli-app-version": "^5.0.0", + "ember-cli-babel": "^7.26.3", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^5.3.2", + "ember-cli-htmlbars": "^5.7.1", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.26.0-beta.0", + "ember-data": "~3.26.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.1", - "ember-qunit": "^5.1.2", + "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.26.0-beta.2", - "ember-template-lint": "^2.18.1", + "ember-source": "~3.26.1", + "ember-template-lint": "^3.2.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.20.0", - "eslint-config-prettier": "^7.2.0", - "eslint-plugin-ember": "^10.2.0", + "eslint": "^7.23.0", + "eslint-config-prettier": "^8.1.0", + "eslint-plugin-ember": "^10.3.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.14.0", + "qunit": "^2.14.1", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index 3cf50a417f..3adc4dded4 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -24,42 +24,42 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.2.0", - "@embroider/compat": "^0.36.0", - "@embroider/core": "^0.36.0", - "@embroider/webpack": "^0.36.0", - "@glimmer/component": "^1.0.3", - "@glimmer/tracking": "^1.0.3", + "@ember/test-helpers": "^2.2.5", + "@embroider/compat": "^0.37.0", + "@embroider/core": "^0.37.0", + "@embroider/webpack": "^0.37.0", + "@glimmer/component": "^1.0.4", + "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.10.1", + "ember-auto-import": "^1.11.2", "ember-cli": "~<%= emberCLIVersion %>", - "ember-cli-app-version": "^4.0.0", - "ember-cli-babel": "^7.23.1", + "ember-cli-app-version": "^5.0.0", + "ember-cli-babel": "^7.26.3", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^5.3.2", + "ember-cli-htmlbars": "^5.7.1", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.26.0-beta.0", + "ember-data": "~3.26.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.1", - "ember-qunit": "^5.1.2", + "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.26.0-beta.2", - "ember-template-lint": "^2.18.1", - "eslint": "^7.20.0", - "eslint-config-prettier": "^7.2.0", - "eslint-plugin-ember": "^10.2.0", + "ember-source": "~3.26.1", + "ember-template-lint": "^3.2.0", + "eslint": "^7.23.0", + "eslint-config-prettier": "^8.1.0", + "eslint-plugin-ember": "^10.3.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.14.0", + "qunit": "^2.14.1", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index d6b5de43dd..318a628023 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -24,43 +24,43 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.2.0", - "@embroider/compat": "^0.36.0", - "@embroider/core": "^0.36.0", - "@embroider/webpack": "^0.36.0", - "@glimmer/component": "^1.0.3", - "@glimmer/tracking": "^1.0.3", + "@ember/test-helpers": "^2.2.5", + "@embroider/compat": "^0.37.0", + "@embroider/core": "^0.37.0", + "@embroider/webpack": "^0.37.0", + "@glimmer/component": "^1.0.4", + "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.10.1", + "ember-auto-import": "^1.11.2", "ember-cli": "~<%= emberCLIVersion %>", - "ember-cli-app-version": "^4.0.0", - "ember-cli-babel": "^7.23.1", + "ember-cli-app-version": "^5.0.0", + "ember-cli-babel": "^7.26.3", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^5.3.2", + "ember-cli-htmlbars": "^5.7.1", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.26.0-beta.0", + "ember-data": "~3.26.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.1", - "ember-qunit": "^5.1.2", + "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.26.0-beta.2", - "ember-template-lint": "^2.18.1", + "ember-source": "~3.26.1", + "ember-template-lint": "^3.2.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.20.0", - "eslint-config-prettier": "^7.2.0", - "eslint-plugin-ember": "^10.2.0", + "eslint": "^7.23.0", + "eslint-config-prettier": "^8.1.0", + "eslint-plugin-ember": "^10.3.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.14.0", + "qunit": "^2.14.1", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 72aa9fd392..03844919fa 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -24,39 +24,39 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.2.0", - "@glimmer/component": "^1.0.3", - "@glimmer/tracking": "^1.0.3", + "@ember/test-helpers": "^2.2.5", + "@glimmer/component": "^1.0.4", + "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.10.1", + "ember-auto-import": "^1.11.2", "ember-cli": "~<%= emberCLIVersion %>", - "ember-cli-app-version": "^4.0.0", - "ember-cli-babel": "^7.23.1", + "ember-cli-app-version": "^5.0.0", + "ember-cli-babel": "^7.26.3", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^5.3.2", + "ember-cli-htmlbars": "^5.7.1", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.26.0-beta.0", + "ember-data": "~3.26.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.1", - "ember-qunit": "^5.1.2", + "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.26.0-beta.2", - "ember-template-lint": "^2.18.1", - "eslint": "^7.20.0", - "eslint-config-prettier": "^7.2.0", - "eslint-plugin-ember": "^10.2.0", + "ember-source": "~3.26.1", + "ember-template-lint": "^3.2.0", + "eslint": "^7.23.0", + "eslint-config-prettier": "^8.1.0", + "eslint-plugin-ember": "^10.3.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.14.0", + "qunit": "^2.14.1", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 887ab0ad51..59959f73a8 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -24,40 +24,40 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.2.0", - "@glimmer/component": "^1.0.3", - "@glimmer/tracking": "^1.0.3", + "@ember/test-helpers": "^2.2.5", + "@glimmer/component": "^1.0.4", + "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.10.1", + "ember-auto-import": "^1.11.2", "ember-cli": "~<%= emberCLIVersion %>", - "ember-cli-app-version": "^4.0.0", - "ember-cli-babel": "^7.23.1", + "ember-cli-app-version": "^5.0.0", + "ember-cli-babel": "^7.26.3", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^5.3.2", + "ember-cli-htmlbars": "^5.7.1", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.26.0-beta.0", + "ember-data": "~3.26.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.1", - "ember-qunit": "^5.1.2", + "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.26.0-beta.2", - "ember-template-lint": "^2.18.1", + "ember-source": "~3.26.1", + "ember-template-lint": "^3.2.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.20.0", - "eslint-config-prettier": "^7.2.0", - "eslint-plugin-ember": "^10.2.0", + "eslint": "^7.23.0", + "eslint-config-prettier": "^8.1.0", + "eslint-plugin-ember": "^10.3.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "qunit": "^2.14.0", + "qunit": "^2.14.1", "qunit-dom": "^1.6.0" }, "engines": { From d49377e25ce03610b91747c6a24de5ecf6a95230 Mon Sep 17 00:00:00 2001 From: Lupestro Date: Mon, 29 Mar 2021 14:53:13 -0400 Subject: [PATCH 709/818] Implemented one-line change (+ test fixtures) --- blueprints/app/files/package.json | 2 +- tests/fixtures/addon/defaults/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/defaults/package.json | 2 +- tests/fixtures/app/embroider-no-welcome/package.json | 2 +- tests/fixtures/app/embroider-yarn/package.json | 2 +- tests/fixtures/app/embroider/package.json | 2 +- tests/fixtures/app/npm/package.json | 2 +- .../fixtures/app/with-blueprint-override-lint-fail/package.json | 2 +- tests/fixtures/app/yarn/package.json | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 6f5fb9927f..276c10635a 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -12,7 +12,7 @@ }, "scripts": { "build": "ember build --environment=production", - "lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"", "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix", "lint:hbs": "ember-template-lint .", "lint:hbs:fix": "ember-template-lint . --fix", diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index 562ff6c1de..39062fa441 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -14,7 +14,7 @@ }, "scripts": { "build": "ember build --environment=production", - "lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"", "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix", "lint:hbs": "ember-template-lint .", "lint:hbs:fix": "ember-template-lint . --fix", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 1267e676d3..e79e3f944e 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -14,7 +14,7 @@ }, "scripts": { "build": "ember build --environment=production", - "lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"", "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix", "lint:hbs": "ember-template-lint .", "lint:hbs:fix": "ember-template-lint . --fix", diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index 299fa4a217..0f675af6ae 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -12,7 +12,7 @@ }, "scripts": { "build": "ember build --environment=production", - "lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"", "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix", "lint:hbs": "ember-template-lint .", "lint:hbs:fix": "ember-template-lint . --fix", diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index 0f55ecc1bb..682035d8e0 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -12,7 +12,7 @@ }, "scripts": { "build": "ember build --environment=production", - "lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"", "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix", "lint:hbs": "ember-template-lint .", "lint:hbs:fix": "ember-template-lint . --fix", diff --git a/tests/fixtures/app/embroider-yarn/package.json b/tests/fixtures/app/embroider-yarn/package.json index b7a1f646f4..0d5b09edad 100644 --- a/tests/fixtures/app/embroider-yarn/package.json +++ b/tests/fixtures/app/embroider-yarn/package.json @@ -12,7 +12,7 @@ }, "scripts": { "build": "ember build --environment=production", - "lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"", "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix", "lint:hbs": "ember-template-lint .", "lint:hbs:fix": "ember-template-lint . --fix", diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index b7a1f646f4..0d5b09edad 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -12,7 +12,7 @@ }, "scripts": { "build": "ember build --environment=production", - "lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"", "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix", "lint:hbs": "ember-template-lint .", "lint:hbs:fix": "ember-template-lint . --fix", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 031761338c..a0920e837d 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -12,7 +12,7 @@ }, "scripts": { "build": "ember build --environment=production", - "lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"", "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix", "lint:hbs": "ember-template-lint .", "lint:hbs:fix": "ember-template-lint . --fix", diff --git a/tests/fixtures/app/with-blueprint-override-lint-fail/package.json b/tests/fixtures/app/with-blueprint-override-lint-fail/package.json index 436dbb6980..b97c73cb9c 100644 --- a/tests/fixtures/app/with-blueprint-override-lint-fail/package.json +++ b/tests/fixtures/app/with-blueprint-override-lint-fail/package.json @@ -12,7 +12,7 @@ }, "scripts": { "build": "ember build --environment=production", - "lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"", "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix", "lint:hbs": "ember-template-lint .", "lint:hbs:fix": "ember-template-lint . --fix", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 299fa4a217..0f675af6ae 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -12,7 +12,7 @@ }, "scripts": { "build": "ember build --environment=production", - "lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"", "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix", "lint:hbs": "ember-template-lint .", "lint:hbs:fix": "ember-template-lint . --fix", From 6023cab4b3a7cd4ff3b4c7ed1d7a3fa552ab188a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 29 Mar 2021 19:09:13 +0000 Subject: [PATCH 710/818] [Security] Bump y18n from 4.0.0 to 4.0.1 (#9499) --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 96d27091cc..97e9644822 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8448,9 +8448,9 @@ xtend@^4.0.0: integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== y18n@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" - integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== + version "4.0.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.1.tgz#8db2b83c31c5d75099bb890b23f3094891e247d4" + integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ== y18n@^5.0.5: version "5.0.5" From f4d92761b240a07c5b576330c698d3001dcaa260 Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Thu, 25 Mar 2021 10:57:49 -0700 Subject: [PATCH 711/818] Enable Embroider by default --- lib/experiments/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/experiments/index.js b/lib/experiments/index.js index 6cbbc155da..404f8e01ca 100644 --- a/lib/experiments/index.js +++ b/lib/experiments/index.js @@ -4,7 +4,7 @@ const chalk = require('chalk'); const availableExperiments = Object.freeze(['PACKAGER', 'EMBROIDER', 'CLASSIC']); const deprecatedExperiments = Object.freeze(['BROCCOLI_WATCHER', 'PACKAGER']); -const enabledExperiments = Object.freeze([]); +const enabledExperiments = Object.freeze(['EMBROIDER']); const deprecatedExperimentsDeprecationsIssued = []; function isExperimentEnabled(experimentName) { From 25f8d69a60272f8bba3b8dc3b2cf5a19473d2d40 Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Tue, 30 Mar 2021 17:15:42 -0700 Subject: [PATCH 712/818] bump embroider to 0.38 --- blueprints/addon/additional-dev-dependencies.json | 2 +- blueprints/app/files/package.json | 6 +++--- tests/fixtures/addon/defaults/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/embroider-no-welcome/package.json | 6 +++--- tests/fixtures/app/embroider-yarn/package.json | 6 +++--- tests/fixtures/app/embroider/package.json | 6 +++--- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/blueprints/addon/additional-dev-dependencies.json b/blueprints/addon/additional-dev-dependencies.json index 168bcb5b25..8d9bd9d5da 100644 --- a/blueprints/addon/additional-dev-dependencies.json +++ b/blueprints/addon/additional-dev-dependencies.json @@ -1,6 +1,6 @@ { "devDependencies": { - "@embroider/test-setup": "^0.37.0", + "@embroider/test-setup": "^0.38.0", "ember-disable-prototype-extensions": "^1.1.3", "ember-try": "^1.4.0", "ember-source-channel-url": "^3.0.0" diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 6f5fb9927f..9cad1caa86 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -25,9 +25,9 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.2.0<% if (embroider) { %>", - "@embroider/compat": "^0.37.0", - "@embroider/core": "^0.37.0", - "@embroider/webpack": "^0.37.0<% } %>", + "@embroider/compat": "^0.38.0", + "@embroider/core": "^0.38.0", + "@embroider/webpack": "^0.38.0<% } %>", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index 562ff6c1de..90466e45e2 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -32,7 +32,7 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.2.0", - "@embroider/test-setup": "^0.37.0", + "@embroider/test-setup": "^0.38.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 1267e676d3..9d9f03def7 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -32,7 +32,7 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.2.0", - "@embroider/test-setup": "^0.37.0", + "@embroider/test-setup": "^0.38.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index 0f55ecc1bb..1482922289 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -25,9 +25,9 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.2.0", - "@embroider/compat": "^0.37.0", - "@embroider/core": "^0.37.0", - "@embroider/webpack": "^0.37.0", + "@embroider/compat": "^0.38.0", + "@embroider/core": "^0.38.0", + "@embroider/webpack": "^0.38.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", diff --git a/tests/fixtures/app/embroider-yarn/package.json b/tests/fixtures/app/embroider-yarn/package.json index b7a1f646f4..37d5a1046f 100644 --- a/tests/fixtures/app/embroider-yarn/package.json +++ b/tests/fixtures/app/embroider-yarn/package.json @@ -25,9 +25,9 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.2.0", - "@embroider/compat": "^0.37.0", - "@embroider/core": "^0.37.0", - "@embroider/webpack": "^0.37.0", + "@embroider/compat": "^0.38.0", + "@embroider/core": "^0.38.0", + "@embroider/webpack": "^0.38.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index b7a1f646f4..37d5a1046f 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -25,9 +25,9 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.2.0", - "@embroider/compat": "^0.37.0", - "@embroider/core": "^0.37.0", - "@embroider/webpack": "^0.37.0", + "@embroider/compat": "^0.38.0", + "@embroider/core": "^0.38.0", + "@embroider/webpack": "^0.38.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", From d02b4117050911ff5c6cd74316d5f582ac18dd1f Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Tue, 30 Mar 2021 18:10:41 -0700 Subject: [PATCH 713/818] bump embroider to 0.39 --- blueprints/addon/additional-dev-dependencies.json | 2 +- blueprints/app/files/package.json | 6 +++--- tests/fixtures/addon/defaults/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/embroider-no-welcome/package.json | 6 +++--- tests/fixtures/app/embroider-yarn/package.json | 6 +++--- tests/fixtures/app/embroider/package.json | 6 +++--- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/blueprints/addon/additional-dev-dependencies.json b/blueprints/addon/additional-dev-dependencies.json index 8d9bd9d5da..3948e72ac3 100644 --- a/blueprints/addon/additional-dev-dependencies.json +++ b/blueprints/addon/additional-dev-dependencies.json @@ -1,6 +1,6 @@ { "devDependencies": { - "@embroider/test-setup": "^0.38.0", + "@embroider/test-setup": "^0.39.0", "ember-disable-prototype-extensions": "^1.1.3", "ember-try": "^1.4.0", "ember-source-channel-url": "^3.0.0" diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 9cad1caa86..638363253d 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -25,9 +25,9 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.2.0<% if (embroider) { %>", - "@embroider/compat": "^0.38.0", - "@embroider/core": "^0.38.0", - "@embroider/webpack": "^0.38.0<% } %>", + "@embroider/compat": "^0.39.0", + "@embroider/core": "^0.39.0", + "@embroider/webpack": "^0.39.0<% } %>", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index 90466e45e2..ca01c23675 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -32,7 +32,7 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.2.0", - "@embroider/test-setup": "^0.38.0", + "@embroider/test-setup": "^0.39.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 9d9f03def7..5cd5eb6834 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -32,7 +32,7 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.2.0", - "@embroider/test-setup": "^0.38.0", + "@embroider/test-setup": "^0.39.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index 1482922289..6d4b2f4f74 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -25,9 +25,9 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.2.0", - "@embroider/compat": "^0.38.0", - "@embroider/core": "^0.38.0", - "@embroider/webpack": "^0.38.0", + "@embroider/compat": "^0.39.0", + "@embroider/core": "^0.39.0", + "@embroider/webpack": "^0.39.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", diff --git a/tests/fixtures/app/embroider-yarn/package.json b/tests/fixtures/app/embroider-yarn/package.json index 37d5a1046f..023303cba6 100644 --- a/tests/fixtures/app/embroider-yarn/package.json +++ b/tests/fixtures/app/embroider-yarn/package.json @@ -25,9 +25,9 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.2.0", - "@embroider/compat": "^0.38.0", - "@embroider/core": "^0.38.0", - "@embroider/webpack": "^0.38.0", + "@embroider/compat": "^0.39.0", + "@embroider/core": "^0.39.0", + "@embroider/webpack": "^0.39.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index 37d5a1046f..023303cba6 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -25,9 +25,9 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.2.0", - "@embroider/compat": "^0.38.0", - "@embroider/core": "^0.38.0", - "@embroider/webpack": "^0.38.0", + "@embroider/compat": "^0.39.0", + "@embroider/core": "^0.39.0", + "@embroider/webpack": "^0.39.0", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", From 4fc54d5b4e7e7815ed735900eda3f26ab66d16cd Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Tue, 30 Mar 2021 20:54:21 -0700 Subject: [PATCH 714/818] bump embroider to 0.39.1 --- blueprints/addon/additional-dev-dependencies.json | 2 +- blueprints/app/files/package.json | 6 +++--- tests/fixtures/addon/defaults/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/embroider-yarn/package.json | 6 +++--- tests/fixtures/app/embroider/package.json | 6 +++--- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/blueprints/addon/additional-dev-dependencies.json b/blueprints/addon/additional-dev-dependencies.json index 3948e72ac3..0abb16a5d2 100644 --- a/blueprints/addon/additional-dev-dependencies.json +++ b/blueprints/addon/additional-dev-dependencies.json @@ -1,6 +1,6 @@ { "devDependencies": { - "@embroider/test-setup": "^0.39.0", + "@embroider/test-setup": "^0.39.1", "ember-disable-prototype-extensions": "^1.1.3", "ember-try": "^1.4.0", "ember-source-channel-url": "^3.0.0" diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 638363253d..3d7edce613 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -25,9 +25,9 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.2.0<% if (embroider) { %>", - "@embroider/compat": "^0.39.0", - "@embroider/core": "^0.39.0", - "@embroider/webpack": "^0.39.0<% } %>", + "@embroider/compat": "^0.39.1", + "@embroider/core": "^0.39.1", + "@embroider/webpack": "^0.39.1<% } %>", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index ca01c23675..f3ec239390 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -32,7 +32,7 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.2.0", - "@embroider/test-setup": "^0.39.0", + "@embroider/test-setup": "^0.39.1", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 5cd5eb6834..93452d2415 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -32,7 +32,7 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.2.0", - "@embroider/test-setup": "^0.39.0", + "@embroider/test-setup": "^0.39.1", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", diff --git a/tests/fixtures/app/embroider-yarn/package.json b/tests/fixtures/app/embroider-yarn/package.json index 023303cba6..dfecf6d8f5 100644 --- a/tests/fixtures/app/embroider-yarn/package.json +++ b/tests/fixtures/app/embroider-yarn/package.json @@ -25,9 +25,9 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.2.0", - "@embroider/compat": "^0.39.0", - "@embroider/core": "^0.39.0", - "@embroider/webpack": "^0.39.0", + "@embroider/compat": "^0.39.1", + "@embroider/core": "^0.39.1", + "@embroider/webpack": "^0.39.1", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index 023303cba6..dfecf6d8f5 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -25,9 +25,9 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.2.0", - "@embroider/compat": "^0.39.0", - "@embroider/core": "^0.39.0", - "@embroider/webpack": "^0.39.0", + "@embroider/compat": "^0.39.1", + "@embroider/core": "^0.39.1", + "@embroider/webpack": "^0.39.1", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", From f3cf30d7c26006122882c9490231a0edb997edfb Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Tue, 30 Mar 2021 21:06:18 -0700 Subject: [PATCH 715/818] forgot a few entries --- tests/fixtures/app/embroider-no-welcome/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index 6d4b2f4f74..5e8738892d 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -25,9 +25,9 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.2.0", - "@embroider/compat": "^0.39.0", - "@embroider/core": "^0.39.0", - "@embroider/webpack": "^0.39.0", + "@embroider/compat": "^0.39.1", + "@embroider/core": "^0.39.1", + "@embroider/webpack": "^0.39.1", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", "babel-eslint": "^10.1.0", From 22b799b51410546d8e07685c9b621da8c11998d7 Mon Sep 17 00:00:00 2001 From: Dave Combs Date: Tue, 30 Mar 2021 14:58:01 -0700 Subject: [PATCH 716/818] adding PerBundleAddonCache feature to optimize the number of addon instances --- lib/models/instantiate-addons.js | 31 +- lib/models/package-info-cache/index.js | 2 +- lib/models/package-info-cache/package-info.js | 150 ++++++- .../per-bundle-addon-cache/addon-proxy.js | 92 ++++ lib/models/per-bundle-addon-cache/index.js | 402 ++++++++++++++++++ lib/models/project.js | 26 +- lib/utilities/is-engine.js | 5 + lib/utilities/is-lazy-engine.js | 31 ++ 8 files changed, 697 insertions(+), 42 deletions(-) create mode 100644 lib/models/per-bundle-addon-cache/addon-proxy.js create mode 100644 lib/models/per-bundle-addon-cache/index.js create mode 100644 lib/utilities/is-engine.js create mode 100644 lib/utilities/is-lazy-engine.js diff --git a/lib/models/instantiate-addons.js b/lib/models/instantiate-addons.js index e48d422617..469ca995c8 100644 --- a/lib/models/instantiate-addons.js +++ b/lib/models/instantiate-addons.js @@ -58,8 +58,6 @@ function instantiateAddons(parent, project, addonPackages) { addonInitializationNode: true, }); - let start = Date.now(); - let pkgInfo = parent.packageInfoCache.getEntry(addonInfo.path); if (!pkgInfo || !pkgInfo.valid) { @@ -68,28 +66,9 @@ function instantiateAddons(parent, project, addonPackages) { ); } - let AddonConstructor = pkgInfo.getAddonConstructor(); - - let addon; - - try { - addon = new AddonConstructor(parent, project); - } catch (e) { - if (parent && parent.ui) { - parent.ui.writeError(e); - } - const SilentError = require('silent-error'); - throw new SilentError(`An error occurred in the constructor for ${addonInfo.name} at ${addonInfo.path}`); - } - - if (addon.initializeAddons) { - addon.initializeAddons(); - } else { - addon.addons = []; - } + // get an instance of the addon. If that fails it will throw. + let addon = pkgInfo.getAddonInstance(parent, project); - AddonConstructor._meta_.initializeIn = Date.now() - start; - addon.constructor = AddonConstructor; initializeAddonToken.stop(); addons.push(addon); @@ -101,8 +80,10 @@ function instantiateAddons(parent, project, addonPackages) { addons.map((addon) => ({ name: addon.name, times: { - initialize: addon.constructor._meta_.initializeIn, - lookup: addon.constructor._meta_.lookupIn, + //initialize: addon.constructor._meta_.initializeIn, + //lookup: addon.constructor._meta_.lookupIn, + initialize: 0, + lookup: 0, }, })) ); diff --git a/lib/models/package-info-cache/index.js b/lib/models/package-info-cache/index.js index 1e307e0552..70eb96baa4 100644 --- a/lib/models/package-info-cache/index.js +++ b/lib/models/package-info-cache/index.js @@ -511,7 +511,7 @@ class PackageInfoCache { // If we have an ember-addon, check that the main exists and points // to a valid file. - if (pkgInfo.isAddon()) { + if (pkgInfo.isForAddon()) { logger.info('%s is an addon', pkg.name); // Note: when we have both 'main' and ember-addon:main, the latter takes precedence diff --git a/lib/models/package-info-cache/package-info.js b/lib/models/package-info-cache/package-info.js index 491b799fc2..9462eb1e38 100644 --- a/lib/models/package-info-cache/package-info.js +++ b/lib/models/package-info-cache/package-info.js @@ -5,7 +5,10 @@ const ErrorList = require('./error-list'); const Errors = require('./errors'); const AddonInfo = require('../addon-info'); const isAddon = require('../../utilities/is-addon'); +const isEngine = require('../../utilities/is-engine'); +const isLazyEngine = require('../../utilities/is-lazy-engine'); const logger = require('heimdalljs-logger')('ember-cli:package-info-cache:package-info'); +const PerBundleAddonCache = require('../per-bundle-addon-cache'); function lexicographically(a, b) { const aIsString = typeof a.name === 'string'; @@ -80,7 +83,7 @@ class PackageInfo { // not actually be used. this.valid = true; - this.mayHaveAddons = isRoot || this.isAddon(); // mayHaveAddons used in index.js + this.mayHaveAddons = isRoot || this.isForAddon(); // mayHaveAddons used in index.js this._hasDumpedInvalidAddonPackages = false; } @@ -162,7 +165,7 @@ class PackageInfo { * been added to the cache. * * Note: this is for ALL dependencies, not just addons. To get just - * addons, filter the result by calling pkgInfo.isAddon(). + * addons, filter the result by calling pkgInfo.isForAddon(). * * Note: this is only intended for use from PackageInfoCache._resolveDependencies. * It is not to be called directly by anything else. @@ -220,10 +223,49 @@ class PackageInfo { return packages; } - isAddon() { + /** + * Indicate if this packageInfo is for a project. Should be called only after the project + * has been loaded. + * + * @method isForProject + * @return {Boolean} true if this packageInfo is for a Project, false otherwise. + */ + isForProject() { + return !!this.project && this.project.isEmberCLIProject && this.project.isEmberCLIProject(); + } + + /** + * Indicate if this packageInfo is for an Addon. + * + * @method isForAddon + * @return {Boolean} true if this packageInfo is for an Addon, false otherwise. + */ + isForAddon() { return isAddon(this.pkg.keywords); } + /** + * Indicate if this packageInfo represents a lazy engine. + * + * @method isForLazyEngine + * @return {Boolean} true if this pkgInfo is configured as an engine and the + * module this represents has lazyLoading enabled, false otherwise. + */ + isForLazyEngine() { + return isEngine(this.pkg.keywords) && isLazyEngine(require(this.addonMainPath)); + } + + /** + * For use with the PerBundleAddonCache, is this packageInfo representing a + * bundle host (for now, a Project or a lazy engine). + * + * @method isForBundleHost + * @return {Boolean} true if this pkgInfo is for a bundle host, false otherwise. + */ + isForBundleHost() { + return this.isForProject() || this.isForLazyEngine(); + } + /** * Add to a list of child addon PackageInfos for this packageInfo. * @@ -274,7 +316,7 @@ class PackageInfo { this.addPackages( addonPackageList, this.dependencyPackages, - (pkgInfo) => !pkgInfo.isAddon() || pkgInfo.name === 'ember-cli' + (pkgInfo) => !pkgInfo.isForAddon() || pkgInfo.name === 'ember-cli' ); this.addPackages(addonPackageList, this.inRepoAddons); @@ -294,8 +336,8 @@ class PackageInfo { this.addPackages(addonPackageList, project.isEmberCLIAddon() ? [this] : null); this.addPackages(addonPackageList, this.cliInfo ? this.cliInfo.inRepoAddons : null); this.addPackages(addonPackageList, this.internalAddons); - this.addPackages(addonPackageList, this.devDependencyPackages, (pkgInfo) => !pkgInfo.isAddon()); - this.addPackages(addonPackageList, this.dependencyPackages, (pkgInfo) => !pkgInfo.isAddon()); + this.addPackages(addonPackageList, this.devDependencyPackages, (pkgInfo) => !pkgInfo.isForAddon()); + this.addPackages(addonPackageList, this.dependencyPackages, (pkgInfo) => !pkgInfo.isForAddon()); this.addPackages(addonPackageList, this.inRepoAddons); return addonPackageList; @@ -373,6 +415,7 @@ class PackageInfo { * Also, the assumption here is that this PackageInfo really is for an * Addon, so we don't need to check each time. * + * @private * @method getAddonConstructor * @return {AddonConstructor} an instance of a constructor function for the Addon class * whose package information is stored in this object. @@ -400,7 +443,6 @@ class PackageInfo { ctor.prototype.pkg = ctor.prototype.pkg || this.pkg; } else { const Addon = require('../addon'); // done here because of circular dependency - ctor = Addon.extend(Object.assign({ root: mainDir, pkg: this.pkg }, module)); } @@ -415,6 +457,100 @@ class PackageInfo { return (this.addonConstructor = ctor); } + + /** + * Indicate if a constructor (function or class) has the 'allowCachingPerBundle' flag + * set either on itself or on its prototype. Depending on how addon modules or constructor + * functions are set up, it could be in either. Needed for per-bundle addon caching. + * + * @method allowCachingPerBundle + * @param {Function|Class} ctor + * @return {Boolean} true if the given constructor function or class supports caching per bundle, false otherwise + */ + allowCachingPerBundle(ctor) { + let val = !!ctor && (ctor.allowCachingPerBundle || ctor.prototype.allowCachingPerBundle); + return val; + } + + /** + * Construct an addon instance. + * + * NOTE: this does NOT call constructors for the child addons. That is left to + * the caller to do, so they can insert any other logic they want. + * + * @private + * @method constructAddonInstance + * @param {Project|Addon} parent the parent that directly contains this addon + * @param {Project} project the project that is/contains this addon + */ + constructAddonInstance(parent, project) { + let start = Date.now(); + + let AddonConstructor = this.getAddonConstructor(); + + let addonInstance; + + try { + addonInstance = new AddonConstructor(parent, project); + } catch (e) { + if (parent && parent.ui) { + parent.ui.writeError(e); + } + const SilentError = require('silent-error'); + throw new SilentError(`An error occurred in the constructor for ${this.name} at ${this.realPath}`); + } + + AddonConstructor._meta_.initializeIn = Date.now() - start; + addonInstance.constructor = AddonConstructor; + + return addonInstance; + } + + /** + * Create an instance of the addon represented by this packageInfo or (if we + * are supporting per-bundle caching and this is an allow-caching-per-bundle addon) + * check if we should be creating a proxy instead. + * + * NOTE: we assume that the value of 'allowCachingPerBundle' does not change between + * calls to the constructor! A given addon is either allowing or not allowing caching + * for an entire run. + * + * @method getAddonInstance + * @param {} parent the addon/project that is to be the direct parent of the + * addon instance created here + * @param {*} project the project that is to contain this addon instance + * @return {Object} the constructed instance of the addon + */ + getAddonInstance(parent, project) { + let ctor = this.getAddonConstructor(); + let addonInstance; + + if (PerBundleAddonCache.SUPPORT_ADDON_INSTANCE_CACHING && this.allowCachingPerBundle(ctor)) { + addonInstance = project.perBundleAddonCache.getAddonInstance(parent, this); + } else { + addonInstance = this.constructAddonInstance(parent, project); + this.initChildAddons(addonInstance); + } + + return addonInstance; + } + + /** + * Initialize the child addons array of a newly-created addon instance. Normally when + * an addon derives from Addon, child addons will be created during 'setupRegistry' and + * this code is essentially unnecessary. But if an addon is created with custom constructors + * that don't call 'setupRegistry', any child addons may not yet be initialized. + * + * @method initChildAddons + * @param {Addon} addonInstance + */ + initChildAddons(addonInstance) { + if (addonInstance.initializeAddons) { + addonInstance.initializeAddons(); + } else { + addonInstance.addons = []; + } + } } module.exports = PackageInfo; diff --git a/lib/models/per-bundle-addon-cache/addon-proxy.js b/lib/models/per-bundle-addon-cache/addon-proxy.js new file mode 100644 index 0000000000..040bb5e292 --- /dev/null +++ b/lib/models/per-bundle-addon-cache/addon-proxy.js @@ -0,0 +1,92 @@ +'use strict'; + +const TARGET_INSTANCE = Symbol.for('_targetInstance_'); + +/** + * Returns a proxy to a target with specific handling for the + * `parent` property, as well has to handle the `app` property; + * that is, the proxy should maintain correct local state in + * closure scope for the `app` property if it happens to be set + * by `ember-cli`. Other than `parent` & `app`, this function also + * proxies _almost_ everything to `target[TARGET_INSTANCE] with a few + * exceptions: we trap & return `[]` for `addons`, and we don't return + * the original `included` (it's already called on the "real" addon + * by `ember-cli`). + * + * Note: the target is NOT the per-bundle cacheable instance of the addon. Rather, + * it is a cache entry POJO from PerBundleAddonCache. + * + * @method getAddonProxy + * @param targetCacheEntry the PerBundleAddonCache cache entry we are to proxy. It + * has one interesting property, the real addon instance the proxy is forwarding + * calls to (that property is not globally exposed). + * @param parent the parent object of the proxy being created (the same as + * the 'parent' property of a normal addon instance) + * @return Proxy + */ +function getAddonProxy(targetCacheEntry, parent) { + let _app; + let addonProxy = new Proxy(targetCacheEntry, { + get(targetCacheEntry, property) { + if (property === 'parent') { + return parent; + } + + if (property === 'app') { + return _app; + } + + // keep proxies from even trying to set or initialize addons + if (property === 'initializeAddons') { + return undefined; + } + + // See the {@link index.js} file for a discussion of why the proxy 'addons' + // property returns an empty array. + if (property === 'addons') { + return []; + } + + // allow access to the property pointing to the real instance. + if (property === TARGET_INSTANCE) { + return targetCacheEntry[TARGET_INSTANCE]; + } + + // `included` will be called on the "real" addon, so there's no need for it to be + // called again; instead we return a no-op implementation here + if (property === 'included') { + return () => undefined; + } + + if (targetCacheEntry[TARGET_INSTANCE]) { + if (property !== 'constructor' && typeof targetCacheEntry[TARGET_INSTANCE][property] === 'function') { + // If we fall through to the Reflect.get just below, the 'this' context of the function when + // invoked is the proxy, not the original instance (so its local state is incorrect). + // Wrap the original methods to maintain the correct 'this' context. + return function _originalAddonPropMethodWrapper() { + return targetCacheEntry[TARGET_INSTANCE][property](...arguments); + }; + } + + return Reflect.get(targetCacheEntry[TARGET_INSTANCE], property); + } + + return Reflect.get(targetCacheEntry, property); + }, + set(targetCacheEntry, property, value) { + if (property === 'app') { + _app = value; + return true; + } + + if (targetCacheEntry[TARGET_INSTANCE]) { + return Reflect.set(targetCacheEntry[TARGET_INSTANCE], property, value); + } + + return Reflect.set(targetCacheEntry, property, value); + }, + }); + + return addonProxy; +} +module.exports = { getAddonProxy }; diff --git a/lib/models/per-bundle-addon-cache/index.js b/lib/models/per-bundle-addon-cache/index.js new file mode 100644 index 0000000000..d3fa148b28 --- /dev/null +++ b/lib/models/per-bundle-addon-cache/index.js @@ -0,0 +1,402 @@ +'use strict'; + +const isLazyEngine = require('../../utilities/is-lazy-engine'); +const { getAddonProxy } = require('./addon-proxy'); +const PROJECT_BUNDLE_HOST_NAME = '__PROJECT__'; +const logger = require('heimdalljs-logger')('ember-cli:per-bundle-addon-cache'); +const TARGET_INSTANCE = Symbol.for('_targetInstance_'); + +/** + * For large applications with many addons (and many instances of each, resulting in + * potentially many millions of addon instances during a build), the build can become + * very, very slow (tens of minutes) partially due to the sheer number of addon instances. + * The PerBundleAddonCache deals with this slowness by doing 3 things: + * + * (1) Making only a single copy of each of certain addons and their dependent addons + * (2) Replacing any other instances of those addons with Proxy copies to the single instance + * (3) Having the Proxies return an empty array for their dependent addons, rather + * than proxying to the contents of the single addon instance. This gives up the + * ability of the Proxies to traverse downward into their child addons, + * something that many addons do not do anyway, for the huge reduction in duplications + * of those child addons. For applications that enable `ember-engines` dedupe logic, + * that logic is stateful, and having the Proxies allow access to the child addons array + * just breaks everything, because that logic will try multiple times to remove items + * it thinks are duplicated, messing up the single copy of the child addon array. + * See the explanation of the dedupe logic in + * {@link https://github.com/ember-engines/ember-engines/blob/master/packages/ember-engines/lib/utils/deeply-non-duplicated-addon.js} + * + * What follows are the more technical details of how the PerBundleAddonCache implements + * the above 3 behaviors. + * + * This class supports per-bundle-host (bundle host = project or lazy engine) + * caching of addon instances. During addon initialization we cannot add a + * cache to each bundle host object AFTER it is instantiated because running the + * addon constructor ultimately causes Addon class `setupRegistry` code to + * run which instantiates child addons, which need the cache to already be + * in place for the parent bundle host. + * We handle this by providing a global cache that exists independent of the + * bundle host objects. That is this object. + * + * There are a number of "behaviors" being implemented by this object and + * its contents. They are: + * (1) Any addon that is a lazy engine has only a single real instance per + * project - all other references to the lazy engine are to be proxies. These + * lazy engines are compared by name, not by packageInfo.realPath. + * (2) Any addon that is not a lazy engine, there is only a single real instance + * of the addon per "bundle host" (i.e. lazy engine or project). + * (3) An optimization - any addon that is in a lazy engine but that is also + * in the project (outside of all lazy engines) - the single instance is the + * one in the project. All other instances (in any lazy engine) are proxies. + * NOTE: the optimization is only enabled if the environment variable that controls that + * ember-engine deduplication (process.env.EMBER_ENGINES_ADDON_DEDUPE) is set + * to a truthy value. + * + * Some implementation details given the above desired behavior: + * (1) There are actually 2 types of caches in this object: + * (1a) the first is keyed by lazy engine name. Note: the real instance of + * the lazy engine is created as it is encountered while traversing the addon + * tree (just like any real addon instance), it's just also referenced + * in this cache so we can create proxies to this single instance from + * anywhere in the addon tree. + * (2) The cache (one item per lazy engine + project) of real addon instances + * found while traversing the dependency tree. + * + * @public + * @class PerBundleAddonCache { + */ +class PerBundleAddonCache { + constructor(project) { + this.project = project; + + // cache of the addon packageInfos for addons that are descendants of the project + // (excluding going into lazy engines). Lazy engines that refer to any of these + // will defer to the project-level one. + this.bundledProjectAddonPkgInfos = this._setupBundledProjectAddonPackageInfos(); + + // The cache of bundle-host instances and their individual addon caches. + // The cache is keyed by name (since there is only a single instance of any given + // engine name, even if 2 engine addons have the same engine name). + // To allow the project in the cache, it will use the empty string for a name, + // to not collide with any possible engine name. + // Each cache entry consists of the bundle host instance (Project or Lazy engine) + // and an addon instance cache to bundle with that bundle host. + this.bundleHostCache = this._setupBundleHostCache(); + + // Indicate if ember-engines deduping is supported. + this.engineAddonDedupeEnabled = !!process.env.EMBER_ENGINES_ADDON_DEDUPE; + + // For stats purposes, counts on the # addons and proxies created. Addons we + // can compare against the bundleHostCache addon caches. Proxies, not so much, + // but we'll count them here. + this.numAddonInstances = 0; + this.numProxies = 0; + } + + /** + * Get the list of addon PackageInfo objects that are a dependency of this project, + * directly or transitively. Do not check any dependency that is itself a bundle host. + * This is used as part of the per-bundle addon-caching optimization. + * + * @private + * @method _setupBundledProjectAddonPackageInfos + * @return {Set} a Set of {PackageInfo} objects. + */ + _setupBundledProjectAddonPackageInfos() { + let pkgInfos = new Set(); + + let findAddons = (pkgInfo) => { + if (!pkgInfo.valid || !pkgInfo.addonMainPath) { + return; + } + + if (pkgInfos.has(pkgInfo)) { + return; + } + + if (pkgInfo.isForBundleHost()) { + return; + } + + pkgInfos.add(pkgInfo); + + let addonPackageList = pkgInfo.discoverAddonAddons(); + addonPackageList.forEach((pkgInfo) => findAddons(pkgInfo)); + }; + + let addonPackageList = this.project._packageInfo.discoverProjectAddons(); + addonPackageList.forEach((pkgInfo) => findAddons(pkgInfo)); + + return pkgInfos; + } + + /** + * Set up the cache of bundle host instances. Each entry is keyed by name (project is given + * empty string for a name, the lazy engines use their engineName, since those are unique) + * Each cache entry has the bundle host instance (Project or lazy engine) and the addon instance + * cache for any addon instances to bundle with that bundle host. + * + * @private + * @method _setupBundleHostCache + * @return {Map} the bundle-host cache + */ + _setupBundleHostCache() { + // get all the lazy engine packageInfos, but only keep the first one + // with any given engine name. + let lazyEnginePkgInfos = new Map(); + + let findAddons = (pkgInfo) => { + if (!pkgInfo.valid || !pkgInfo.addonMainPath) { + return; + } + + if (pkgInfo.isForLazyEngine()) { + if (lazyEnginePkgInfos.has(pkgInfo.name)) { + return; + } + + lazyEnginePkgInfos.set(pkgInfo.name, pkgInfo); + } + + let addonPackageList = pkgInfo.discoverAddonAddons(); + addonPackageList.forEach(findAddons); + }; + + let addonPackageList = this.project._packageInfo.discoverProjectAddons(); + addonPackageList.forEach(findAddons); + + // Create the cache + let cache = new Map(); + cache.set( + PROJECT_BUNDLE_HOST_NAME, + this.createBundleHostCacheEntry(this.project, this.project._packageInfo.realPath) + ); + + lazyEnginePkgInfos.forEach((pkgInfo) => { + cache.set(pkgInfo.name, this.createBundleHostCacheEntry(null, pkgInfo.realPath)); + }); + + return cache; + } + + /** + * Create a cache entry the bundleHostCache. Because we want to use the same sort of proxy + * for both bundle hosts and for 'regular' addon instances (though their cache entries have + * slightly different structures) we'll use the Symbol from getAddonProxy. + * + * @method createBundleHostCacheEntry + * @param {Project|LazyEngine} bundleHostInstance the instance of the Project or lazy engine + * @param {String} bundleHostRealPath bundle host's pkgInfo.realPath + * @return {Object} an object in the form of a bundle-host cache entry + */ + createBundleHostCacheEntry(bundleHostInstance, bundleHostRealPath) { + return { [TARGET_INSTANCE]: bundleHostInstance, realPath: bundleHostRealPath, addonInstanceCache: new Map() }; + } + + /** + * Create a cache entry object for a given (non-bundle-host) addon to put into + * an addon cache. + * + * @method createAddonCacheEntry + * @param {Addon} addonInstance the addon instance to cache + * @param {String} addonRealPath the addon's pkgInfo.realPath + * @return {Object} an object in the form of an addon-cache entry + */ + createAddonCacheEntry(addonInstance, addonRealPath) { + return { [TARGET_INSTANCE]: addonInstance, realPath: addonRealPath }; + } + + /** + * Given a parent object of a potential addon (another addon or the project), + * go up the 'parent' chain to find the potential addon's bundle host object + * (i.e. lazy engine or project.) Because Projects are always bundle hosts, + * this should always pass, but we'll throw if somehow it doesn't work. + * + * @method findBundleHost + * @param {Project|Addon} addonParent the direct parent object of a (potential or real) addon. + * @param {PackageInfo} addonPkgInfo the PackageInfo for an addon being instantiated. This is only + * used for information if an error is going to be thrown. + * @return {Object} the object in the 'parent' chain that is a bundle host. + * @throws {Error} if there is not bundle host + */ + findBundleHost(addonParent, addonPkgInfo) { + let curr = addonParent; + while (curr) { + if (curr === this.project || isLazyEngine(curr)) { + return curr; + } + + curr = curr.parent; + } + + // the following should not be able to happen given that Projects are always + // bundle hosts, but just in case, throw an error if we didn't find one. + throw new Error(`Addon at path\n ${addonPkgInfo.realPath}\n has 'allowCachingPerBundle' but has no bundleHost`); + } + + /** + * An optimization we support from lazy engines is the following: + * if an addon instance is supposed to be bundled with a particular lazy engine, and + * same addon is also to be bundled in the project, prefer the one in the project. + * + * NOTE: this only applies if this.engineAddonDedupeEnabled is truthy. If it is not, the + * bundle host always "owns" the addon instance. + * + * If deduping is enabled and the project does also depend on the same addon, + * the lazy-engine instances of the addon will all be proxies to the one in + * the project. This function indicates whether the bundle host passed in (either the + * project or a lazy engine) is really the bundle host to "own" the new addon. + * + * @method bundleHostOwnsInstance + * @param (Object} bundleHost the project or lazy engine that is trying to "own" + * the new addon instance specified by addonPkgInfo + * @param {PackageInfo} addonPkgInfo the PackageInfo of the potential new addon instance + * @return {Boolean} true if the bundle host is to "own" the instance, false otherwise. + */ + bundleHostOwnsInstance(bundleHost, addonPkgInfo) { + return ( + bundleHost === this.project || + !this.engineAddonDedupeEnabled || + !this.bundledProjectAddonPkgInfos.has(addonPkgInfo) + ); + } + + /** + * Get the name of a bundle host (used as the key for the bundleHostCache). + * Projects have a fake name. + * + * @method getBundleHostName + * @param {Project|Addon} bundleHost the bundle host whose name is desired. + * @return {String} the name of the bundle host + */ + getBundleHostName(bundleHost) { + return bundleHost === this.project ? PROJECT_BUNDLE_HOST_NAME : bundleHost.name; + } + + /** + * Called from PackageInfo.getAddonInstance(), return an instance of the requested + * addon or a Proxy, based on the type of addon and its bundle host. + * + * @method getAddonInstance + * @param {Addon|Project} parent the parent Addon or Project this addon instance is + * a child of. + * @param {*} addonPkgInfo the PackageInfo for the addon being created. + * @return {Addon|Proxy} An addon instance (for the first copy of the addon) or a Proxy. + * An addon that is a lazy engine will only ever have a single copy in the cache. + * An addon that is not will have 1 copy per bundle host (Project or lazy engine), + * except if it is an addon that's also owned by the project and + * is truthy, in which case it will only have a single copy in the project's addon cache. + */ + getAddonInstance(parent, addonPkgInfo) { + // If the new addon is itself a bundle host (i.e. lazy engine), there is only one + // instance of the bundle host, and it's in the entries of the bundleHostCache, outside + // of the 'regular' addon caches. Because 'setupBundleHostCache' ran during construction, + // we know that an entry is in the cache with this engine name. + if (addonPkgInfo.isForBundleHost()) { + let cacheEntry = this.bundleHostCache.get(addonPkgInfo.name); + if (cacheEntry[TARGET_INSTANCE]) { + logger.debug(`About to construct BR PROXY to cache entry for addon at: ${addonPkgInfo.realPath}`); + this.numProxies++; + return getAddonProxy(cacheEntry, parent); + } else { + // create an instance, put it in the pre-existing cache entry, then + // return it (as the first instance of the lazy engine.) + logger.debug(`About to fill in BR EXISTING cache entry for addon at: ${addonPkgInfo.realPath}`); + this.numAddonInstances++; + let addon = addonPkgInfo.constructAddonInstance(parent, this.project); + cacheEntry[TARGET_INSTANCE] = addon; // cache BEFORE initializing child addons + addonPkgInfo.initChildAddons(addon); + return addon; + } + } + + // We know now we're asking for a 'regular' (non-bundle-host) addon instance. + + let bundleHost = this.findBundleHost(parent, addonPkgInfo); + + // if the bundle host "owns" the new addon instance + // * Do we already have an instance of the addon cached? + // * If so, make a proxy for it. + // * If not, make a new instance of the addon and cache it in the + // bundle host's addon cache. + // If not, it means the bundle host is a lazy engine but the project also uses + // the addon and deduping is enabled + // * If the project already has a cached entry, return a proxy to that + // * If it does not, create a 'blank' cache entry and return a proxy to that. + // When the addon is encountered later when processing the project's addons, + // fill in the instance. + if (this.bundleHostOwnsInstance(bundleHost, addonPkgInfo)) { + let bundleHostName = this.getBundleHostName(bundleHost); + let bundleHostCacheEntry = this.bundleHostCache.get(bundleHostName); + let addonInstanceCache = bundleHostCacheEntry.addonInstanceCache; + let addonCacheEntry = addonInstanceCache.get(addonPkgInfo.realPath); + let addonInstance; + + if (addonCacheEntry) { + if (addonCacheEntry[TARGET_INSTANCE]) { + logger.debug(`About to construct REGULAR ADDON PROXY for addon at: ${addonPkgInfo.realPath}`); + this.numProxies++; + return getAddonProxy(addonCacheEntry, parent); + } else { + // the cache entry was created 'empty' by an earlier call, indicating + // an addon that is used in a lazy engine but also used in the project, + // and we're now creating the instance for the project. + // Fill in the entry and return the new instance. + logger.debug(`About to fill in REGULAR ADDON EXISTING cache entry for addon at: ${addonPkgInfo.realPath}`); + this.numAddonInstances++; + addonInstance = addonPkgInfo.constructAddonInstance(parent, this.project); + addonCacheEntry[TARGET_INSTANCE] = addonInstance; // cache BEFORE initializing child addons + addonPkgInfo.initChildAddons(addonInstance); + return addonInstance; + } + } + + // There is no entry for this addon in the bundleHost's addon cache. Create a new + // instance, cache it in the addon cache, and return it. + logger.debug(`About to construct REGULAR ADDON NEW cache entry for addon at: ${addonPkgInfo.realPath}`); + this.numAddonInstances++; + addonInstance = addonPkgInfo.constructAddonInstance(parent, this.project); + addonCacheEntry = this.createAddonCacheEntry(addonInstance, addonPkgInfo.realPath); + addonInstanceCache.set(addonPkgInfo.realPath, addonCacheEntry); // cache BEFORE initializing child addons + addonPkgInfo.initChildAddons(addonInstance); + return addonInstance; + } else { + // The bundleHost is not the project but the project bundles the addon too and + // deduping is enabled, so the cache entry needs to go in the project's cache. + // Get/create an empty cache entry and return a proxy to it. The project will + // set the instance later (see above). + let bundleHostCacheEntry = this.bundleHostCache.get(PROJECT_BUNDLE_HOST_NAME); + let addonCacheEntry = bundleHostCacheEntry.addonInstanceCache.get(addonPkgInfo.realPath); + if (!addonCacheEntry) { + logger.debug(`About to construct REGULAR ADDON EMPTY cache entry for addon at: ${addonPkgInfo.realPath}`); + addonCacheEntry = this.createAddonCacheEntry(null, addonPkgInfo.realPath); + bundleHostCacheEntry.addonInstanceCache.set(addonPkgInfo.realPath, addonCacheEntry); + } + + logger.debug(`About to construct REGULAR ADDON PROXY for EMPTY addon at: ${addonPkgInfo.realPath}`); + this.numProxies++; + return getAddonProxy(addonCacheEntry, parent); + } + } + + /** + * Called by engine-addon when it needs to retrieve the real child addons for a given + * object (i.e., during ancestorHostAddons), even though the object might be a proxy. + * + * @method getAddonAddons + * @param {Addon|Proxy} addonInstance an instance of an addon or a Proxy generated by this class + * @return {Array} an array of addon instances + */ + getAddonAddons(addonInstance) { + let result = + addonInstance[TARGET_INSTANCE] && addonInstance[TARGET_INSTANCE].addons + ? addonInstance[TARGET_INSTANCE].addons + : addonInstance.addons; + return result; + } +} + +module.exports = PerBundleAddonCache; + +// Support for per-bundle addon caching is opt OUT. Caching any particular +// addon class is currently opt IN. +module.exports.SUPPORT_ADDON_INSTANCE_CACHING = process.env.EMBER_CLI_ADDON_INSTANCE_CACHING !== 'false'; diff --git a/lib/models/project.js b/lib/models/project.js index ec35a9cc02..c4f2a979b5 100644 --- a/lib/models/project.js +++ b/lib/models/project.js @@ -14,9 +14,10 @@ const versionUtils = require('../utilities/version-utils'); const emberCLIVersion = versionUtils.emberCLIVersion; const findAddonByName = require('../utilities/find-addon-by-name'); const heimdall = require('heimdalljs'); -const PackageInfoCache = require('../models/package-info-cache'); +const PackageInfoCache = require('./package-info-cache'); +const PerBundleAddonCache = require('./per-bundle-addon-cache'); -const instantiateAddons = require('../models/instantiate-addons'); +const instantiateAddons = require('./instantiate-addons'); let processCwd = process.cwd(); @@ -96,6 +97,10 @@ class Project { if (this.packageInfoCache.hasErrors()) { this.packageInfoCache.showErrors(); } + + if (PerBundleAddonCache.SUPPORT_ADDON_INSTANCE_CACHING) { + this.perBundleAddonCache = new PerBundleAddonCache(this); + } } /** @@ -203,7 +208,7 @@ class Project { @return {Boolean} Whether or not this is an Ember CLI Addon. */ isEmberCLIAddon() { - return !!this.pkg.keywords && this.pkg.keywords.indexOf('ember-addon') > -1; + return !!this.pkg && !!this.pkg.keywords && this.pkg.keywords.indexOf('ember-addon') > -1; } /** @@ -429,13 +434,11 @@ class Project { return; } - let pkgInfo = this.packageInfoCache.getEntry(this.root); - - let addonPackageList = pkgInfo.discoverProjectAddons(); - this.addonPackages = pkgInfo.generateAddonPackages(addonPackageList); + let addonPackageList = this._packageInfo.discoverProjectAddons(); + this.addonPackages = this._packageInfo.generateAddonPackages(addonPackageList); // in case any child addons are invalid, dump to the console about them. - pkgInfo.dumpInvalidAddonPackages(addonPackageList); + this._packageInfo.dumpInvalidAddonPackages(addonPackageList); } /** @@ -575,7 +578,8 @@ class Project { } /** - Reloads package.json + Reloads package.json of the project. Clears and reloads the packageInfo and + per-bundle addon cache, too. @private @method reloadPkg @@ -589,6 +593,10 @@ class Project { this.packageInfoCache.reloadProjects(); + if (PerBundleAddonCache.SUPPORT_ADDON_INSTANCE_CACHING) { + this.perBundleAddonCache = new PerBundleAddonCache(this); + } + return this.pkg; } diff --git a/lib/utilities/is-engine.js b/lib/utilities/is-engine.js new file mode 100644 index 0000000000..36192481f3 --- /dev/null +++ b/lib/utilities/is-engine.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function isEngine(keywords) { + return Array.isArray(keywords) && keywords.indexOf('ember-engine') >= 0; +}; diff --git a/lib/utilities/is-lazy-engine.js b/lib/utilities/is-lazy-engine.js new file mode 100644 index 0000000000..7571808578 --- /dev/null +++ b/lib/utilities/is-lazy-engine.js @@ -0,0 +1,31 @@ +'use strict'; + +/** + * Indicate if a given object is a constructor function or class or an instance of an Addon. + * + * @module is-lazy-engine + * @param {Object} addonCtorOrInstance the constructor function/class or an instance of an Addon. + * @return {Boolean} True if the addonCtorOrInstance is a lazy engine, False otherwise. + */ +module.exports = function isLazyEngine(addonCtorOrInstance) { + if (!addonCtorOrInstance) { + return false; + } + + if (addonCtorOrInstance.lazyLoading) { + return addonCtorOrInstance.lazyLoading.enabled === true; + } else if (addonCtorOrInstance.options) { + return addonCtorOrInstance.options.lazyLoading && addonCtorOrInstance.options.lazyLoading.enabled === true; + } else if (addonCtorOrInstance.prototype) { + if (addonCtorOrInstance.prototype.lazyLoading) { + return addonCtorOrInstance.prototype.lazyLoading.enabled === true; + } else if (addonCtorOrInstance.prototype.options) { + return ( + addonCtorOrInstance.prototype.options.lazyLoading && + addonCtorOrInstance.prototype.options.lazyLoading.enabled === true + ); + } + } + + return false; +}; From 16611535b597e2e5b9c1019b404aed54258a6d40 Mon Sep 17 00:00:00 2001 From: Dave Combs Date: Thu, 1 Apr 2021 16:58:32 -0700 Subject: [PATCH 717/818] fixing ember-cli ticket 9502 --- lib/models/instantiate-addons.js | 11 ++++++----- lib/models/package-info-cache/package-info.js | 5 ----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/lib/models/instantiate-addons.js b/lib/models/instantiate-addons.js index e48d422617..38577018e1 100644 --- a/lib/models/instantiate-addons.js +++ b/lib/models/instantiate-addons.js @@ -49,6 +49,8 @@ function instantiateAddons(parent, project, addonPackages) { }); let addons = []; + let timings = new Map(); + graph.each((key, value) => { let addonInfo = value; if (addonInfo) { @@ -88,8 +90,10 @@ function instantiateAddons(parent, project, addonPackages) { addon.addons = []; } - AddonConstructor._meta_.initializeIn = Date.now() - start; addon.constructor = AddonConstructor; + + timings.set(addon, Date.now() - start); + initializeAddonToken.stop(); addons.push(addon); @@ -100,10 +104,7 @@ function instantiateAddons(parent, project, addonPackages) { ' addon info %o', addons.map((addon) => ({ name: addon.name, - times: { - initialize: addon.constructor._meta_.initializeIn, - lookup: addon.constructor._meta_.lookupIn, - }, + initializeTotalMillis: timings.get(addon), })) ); diff --git a/lib/models/package-info-cache/package-info.js b/lib/models/package-info-cache/package-info.js index 491b799fc2..6e30cf80b1 100644 --- a/lib/models/package-info-cache/package-info.js +++ b/lib/models/package-info-cache/package-info.js @@ -404,13 +404,8 @@ class PackageInfo { ctor = Addon.extend(Object.assign({ root: mainDir, pkg: this.pkg }, module)); } - // XXX Probably want to store the timings here in PackageInfo, - // rather than adding _meta_ to the constructor. - // XXX Will also need to remove calls to it from various places. ctor._meta_ = { modulePath: this.addonMainPath, - lookupDuration: 0, - initializeIn: 0, }; return (this.addonConstructor = ctor); From 806008f9320bd99a0d3a96a6a7afa01cbabe0f2b Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 12 Apr 2021 10:37:28 -0400 Subject: [PATCH 718/818] Add v3.26.0 to CHANGELOG.md --- CHANGELOG.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 38588b9e7c..85d07045db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,16 @@ # ember-cli Changelog -## v3.26.0-beta.0 + +## v3.26.0 #### Blueprint Changes -- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.25.0...v3.26.0-beta.0) -- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.25.0...v3.26.0-beta.0) +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.25.3...v3.26.0) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.25.3...v3.26.0) #### Changelog +- [#9473](https://github.com/ember-cli/ember-cli/pull/9473) Issue a better error message for add-on's missing an entry point (e.g. invalid `ember-addon.main` path) [@ef4](https://github.com/ef4) - [#9437](https://github.com/ember-cli/ember-cli/pull/9437) Add Prettier files to ".npmignore" file in addon blueprint [@bertdeblock](https://github.com/bertdeblock) - [#9436](https://github.com/ember-cli/ember-cli/pull/9436) Enable Embroider test scenario for addons [@thoov](https://github.com/thoov) - [#9435](https://github.com/ember-cli/ember-cli/pull/9435) Use "lint:fix" script in app and addon README files [@bertdeblock](https://github.com/bertdeblock) From 05a1df2b4eabe45083f862556e24ad13f5712c14 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 12 Apr 2021 10:38:22 -0400 Subject: [PATCH 719/818] Release 3.26.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5cf753c650..873c847378 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.26.0-beta.0", + "version": "3.26.0", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From 1c09a18990699591c45582727ece25852c29c94a Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 12 Apr 2021 10:53:56 -0400 Subject: [PATCH 720/818] Add new fixture files to dev/update-blueprint-dependencies.js --- dev/update-blueprint-dependencies.js | 1 + 1 file changed, 1 insertion(+) diff --git a/dev/update-blueprint-dependencies.js b/dev/update-blueprint-dependencies.js index c0703dc585..eed2250d77 100644 --- a/dev/update-blueprint-dependencies.js +++ b/dev/update-blueprint-dependencies.js @@ -48,6 +48,7 @@ const PACKAGE_FILES = [ '../tests/fixtures/app/npm/package.json', '../tests/fixtures/app/yarn/package.json', '../tests/fixtures/app/embroider/package.json', + '../tests/fixtures/app/embroider-yarn/package.json', '../tests/fixtures/app/embroider-no-welcome/package.json', '../tests/fixtures/addon/defaults/package.json', '../tests/fixtures/addon/yarn/package.json', From 57f3ac112a6f7725c47473c21b37e819b41ac0ae Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 12 Apr 2021 10:55:00 -0400 Subject: [PATCH 721/818] Update blueprint dependencies to latest (including 3.27-betas). --- blueprints/app/files/package.json | 6 +++--- tests/fixtures/addon/defaults/package.json | 4 ++-- tests/fixtures/addon/yarn/package.json | 4 ++-- tests/fixtures/app/defaults/package.json | 6 +++--- tests/fixtures/app/embroider-no-welcome/package.json | 6 +++--- tests/fixtures/app/embroider-yarn/package.json | 6 +++--- tests/fixtures/app/embroider/package.json | 6 +++--- tests/fixtures/app/npm/package.json | 6 +++--- tests/fixtures/app/yarn/package.json | 6 +++--- 9 files changed, 25 insertions(+), 25 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 2a904056d6..310d77e4e8 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -41,7 +41,7 @@ "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.26.0", + "ember-data": "~3.27.0-beta.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", @@ -49,10 +49,10 @@ "ember-page-title": "^6.2.1", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.26.1", + "ember-source": "~3.27.0-beta.3", "ember-template-lint": "^3.2.0<% if (welcome) { %>", "ember-welcome-page": "^4.0.0<% } %>", - "eslint": "^7.23.0", + "eslint": "^7.24.0", "eslint-config-prettier": "^8.1.0", "eslint-plugin-ember": "^10.3.0", "eslint-plugin-node": "^11.1.0", diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index bcdc4ec91d..e2f55cc755 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -50,11 +50,11 @@ "ember-page-title": "^6.2.1", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.26.1", + "ember-source": "~3.27.0-beta.3", "ember-source-channel-url": "^3.0.0", "ember-template-lint": "^3.2.0", "ember-try": "^1.4.0", - "eslint": "^7.23.0", + "eslint": "^7.24.0", "eslint-config-prettier": "^8.1.0", "eslint-plugin-ember": "^10.3.0", "eslint-plugin-node": "^11.1.0", diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 17aea7943d..18a321888d 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -50,12 +50,12 @@ "ember-page-title": "^6.2.1", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.26.1", + "ember-source": "~3.27.0-beta.3", "ember-source-channel-url": "^3.0.0", "ember-template-lint": "^3.2.0", "ember-try": "^1.4.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.23.0", + "eslint": "^7.24.0", "eslint-config-prettier": "^8.1.0", "eslint-plugin-ember": "^10.3.0", "eslint-plugin-node": "^11.1.0", diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index 38ed3a3535..e0c367f64a 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -38,7 +38,7 @@ "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.26.0", + "ember-data": "~3.27.0-beta.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", @@ -46,10 +46,10 @@ "ember-page-title": "^6.2.1", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.26.1", + "ember-source": "~3.27.0-beta.3", "ember-template-lint": "^3.2.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.23.0", + "eslint": "^7.24.0", "eslint-config-prettier": "^8.1.0", "eslint-plugin-ember": "^10.3.0", "eslint-plugin-node": "^11.1.0", diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index b403f6c034..4358386939 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -41,7 +41,7 @@ "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.26.0", + "ember-data": "~3.27.0-beta.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", @@ -49,9 +49,9 @@ "ember-page-title": "^6.2.1", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.26.1", + "ember-source": "~3.27.0-beta.3", "ember-template-lint": "^3.2.0", - "eslint": "^7.23.0", + "eslint": "^7.24.0", "eslint-config-prettier": "^8.1.0", "eslint-plugin-ember": "^10.3.0", "eslint-plugin-node": "^11.1.0", diff --git a/tests/fixtures/app/embroider-yarn/package.json b/tests/fixtures/app/embroider-yarn/package.json index 4a9ac7bbd4..cacb82513c 100644 --- a/tests/fixtures/app/embroider-yarn/package.json +++ b/tests/fixtures/app/embroider-yarn/package.json @@ -41,7 +41,7 @@ "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.26.0", + "ember-data": "~3.27.0-beta.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", @@ -49,10 +49,10 @@ "ember-page-title": "^6.2.1", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.26.1", + "ember-source": "~3.27.0-beta.3", "ember-template-lint": "^3.2.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.23.0", + "eslint": "^7.24.0", "eslint-config-prettier": "^8.1.0", "eslint-plugin-ember": "^10.3.0", "eslint-plugin-node": "^11.1.0", diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index 4a9ac7bbd4..cacb82513c 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -41,7 +41,7 @@ "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.26.0", + "ember-data": "~3.27.0-beta.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", @@ -49,10 +49,10 @@ "ember-page-title": "^6.2.1", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.26.1", + "ember-source": "~3.27.0-beta.3", "ember-template-lint": "^3.2.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.23.0", + "eslint": "^7.24.0", "eslint-config-prettier": "^8.1.0", "eslint-plugin-ember": "^10.3.0", "eslint-plugin-node": "^11.1.0", diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 8fad44ff7f..b90a4cae2d 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -38,7 +38,7 @@ "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.26.0", + "ember-data": "~3.27.0-beta.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", @@ -46,9 +46,9 @@ "ember-page-title": "^6.2.1", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.26.1", + "ember-source": "~3.27.0-beta.3", "ember-template-lint": "^3.2.0", - "eslint": "^7.23.0", + "eslint": "^7.24.0", "eslint-config-prettier": "^8.1.0", "eslint-plugin-ember": "^10.3.0", "eslint-plugin-node": "^11.1.0", diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 38ed3a3535..e0c367f64a 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -38,7 +38,7 @@ "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.1", - "ember-data": "~3.26.0", + "ember-data": "~3.27.0-beta.0", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", @@ -46,10 +46,10 @@ "ember-page-title": "^6.2.1", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.26.1", + "ember-source": "~3.27.0-beta.3", "ember-template-lint": "^3.2.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.23.0", + "eslint": "^7.24.0", "eslint-config-prettier": "^8.1.0", "eslint-plugin-ember": "^10.3.0", "eslint-plugin-node": "^11.1.0", From ebd01272499b10896db23806616588d71b549b03 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 12 Apr 2021 11:17:16 -0400 Subject: [PATCH 722/818] Add v3.27.0-beta.1 to CHANGELOG.md. --- CHANGELOG.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85d07045db..63647b44f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,29 @@ # ember-cli Changelog +## v3.26.1-beta.0 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.26.0...v3.27.0-beta.1) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.26.0...v3.27.0-beta.1) + +#### Changelog + +- [#9453](https://github.com/ember-cli/ember-cli/pull/9453) Prevent "yarn-error.log" files being published for addons [@bertdeblock](https://github.com/bertdeblock) +- [#9392](https://github.com/ember-cli/ember-cli/pull/9392) / [#9484](https://github.com/ember-cli/ember-cli/pull/9484) Add eslint-plugin-qunit to blueprint [@bmish](https://github.com/bmish) +- [#9454](https://github.com/ember-cli/ember-cli/pull/9454) / [#9492](https://github.com/ember-cli/ember-cli/pull/9492) Add --embroider as an option for new and init [@thoov](https://github.com/thoov) +- [#9456](https://github.com/ember-cli/ember-cli/pull/9456) Add `.*/` to eslint ignore [@chancancode](https://github.com/chancancode) +- [#9469](https://github.com/ember-cli/ember-cli/pull/9469) Run `lint:fix` script automatically after blueprint generation [@rpemberton](https://github.com/rpemberton) +- [#9480](https://github.com/ember-cli/ember-cli/pull/9480) Refactor getPort to only check required port [@Cartmanishere](https://github.com/Cartmanishere) +- [#9485](https://github.com/ember-cli/ember-cli/pull/9485) Add Ember 3.24 LTS to ember-try configuration [@bertdeblock](https://github.com/bertdeblock) +- [#9488](https://github.com/ember-cli/ember-cli/pull/9488) Update supported Ember version in addon blueprint [@bertdeblock](https://github.com/bertdeblock) +- [#9490](https://github.com/ember-cli/ember-cli/pull/9490) Prevent window.Ember deprecation on Ember 3.27+. [@rwjblue](https://github.com/rwjblue) +- [#9491](https://github.com/ember-cli/ember-cli/pull/9491) Update supported Ember CLI version in addon blueprint [@bertdeblock](https://github.com/bertdeblock) +- [#9495](https://github.com/ember-cli/ember-cli/pull/9495) Enable Embroider by default for new projects [@thoov](https://github.com/thoov) +- [#9500](https://github.com/ember-cli/ember-cli/pull/9500) Fix `lint:fix` script for Windows users [@lupestro](https://github.com/lupestro) + +Thank you to all who took the time to contribute! + ## v3.26.0 From 028688c07cdf220471ffbacc88f474f019475156 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 12 Apr 2021 11:18:34 -0400 Subject: [PATCH 723/818] Release 3.27.0-beta.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a399f9aefe..3a5aa4f142 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.26.0", + "version": "3.27.0-beta.1", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From 84c6fce04e44010960f412acd7e836e506fe41f1 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 12 Apr 2021 11:18:58 -0400 Subject: [PATCH 724/818] Fix header in CHANGELOG.md for 3.27.0-beta.1. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63647b44f4..4ccc088d98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # ember-cli Changelog -## v3.26.1-beta.0 +## v3.27.1-beta.0 #### Blueprint Changes From fb43c1feada6d03464bcf86eefd79ee6f9757935 Mon Sep 17 00:00:00 2001 From: Dave Combs Date: Mon, 12 Apr 2021 18:32:25 -0700 Subject: [PATCH 725/818] updates for TARGET_INSTANCE after merging 3.26.0 official release --- lib/models/instantiate-addons.js | 4 ++-- lib/models/package-info-cache/package-info.js | 2 +- lib/models/per-bundle-addon-cache/addon-proxy.js | 2 +- lib/models/per-bundle-addon-cache/index.js | 13 +++++++------ .../per-bundle-addon-cache/target-instance.js | 14 ++++++++++++++ 5 files changed, 25 insertions(+), 10 deletions(-) create mode 100644 lib/models/per-bundle-addon-cache/target-instance.js diff --git a/lib/models/instantiate-addons.js b/lib/models/instantiate-addons.js index 1400978512..e7a820a4c7 100644 --- a/lib/models/instantiate-addons.js +++ b/lib/models/instantiate-addons.js @@ -60,6 +60,8 @@ function instantiateAddons(parent, project, addonPackages) { addonInitializationNode: true, }); + let start = Date.now(); + let pkgInfo = parent.packageInfoCache.getEntry(addonInfo.path); if (!pkgInfo || !pkgInfo.valid) { @@ -71,8 +73,6 @@ function instantiateAddons(parent, project, addonPackages) { // get an instance of the addon. If that fails it will throw. let addon = pkgInfo.getAddonInstance(parent, project); - addon.constructor = AddonConstructor; - timings.set(addon, Date.now() - start); initializeAddonToken.stop(); diff --git a/lib/models/package-info-cache/package-info.js b/lib/models/package-info-cache/package-info.js index 642c7f0e6c..f8a9d154f4 100644 --- a/lib/models/package-info-cache/package-info.js +++ b/lib/models/package-info-cache/package-info.js @@ -225,7 +225,7 @@ class PackageInfo { /** * Indicate if this packageInfo is for a project. Should be called only after the project - * has been loaded. + * has been loaded (see {@link PackageInfoCache#loadProject} for details). * * @method isForProject * @return {Boolean} true if this packageInfo is for a Project, false otherwise. diff --git a/lib/models/per-bundle-addon-cache/addon-proxy.js b/lib/models/per-bundle-addon-cache/addon-proxy.js index 040bb5e292..a1b5612b67 100644 --- a/lib/models/per-bundle-addon-cache/addon-proxy.js +++ b/lib/models/per-bundle-addon-cache/addon-proxy.js @@ -1,6 +1,6 @@ 'use strict'; -const TARGET_INSTANCE = Symbol.for('_targetInstance_'); +const { TARGET_INSTANCE } = require('./target-instance'); /** * Returns a proxy to a target with specific handling for the diff --git a/lib/models/per-bundle-addon-cache/index.js b/lib/models/per-bundle-addon-cache/index.js index d3fa148b28..70f5df877f 100644 --- a/lib/models/per-bundle-addon-cache/index.js +++ b/lib/models/per-bundle-addon-cache/index.js @@ -4,7 +4,7 @@ const isLazyEngine = require('../../utilities/is-lazy-engine'); const { getAddonProxy } = require('./addon-proxy'); const PROJECT_BUNDLE_HOST_NAME = '__PROJECT__'; const logger = require('heimdalljs-logger')('ember-cli:per-bundle-addon-cache'); -const TARGET_INSTANCE = Symbol.for('_targetInstance_'); +const { TARGET_INSTANCE } = require('./target-instance'); /** * For large applications with many addons (and many instances of each, resulting in @@ -83,7 +83,7 @@ class PerBundleAddonCache { this.bundleHostCache = this._setupBundleHostCache(); // Indicate if ember-engines deduping is supported. - this.engineAddonDedupeEnabled = !!process.env.EMBER_ENGINES_ADDON_DEDUPE; + this.engineAddonTransitiveDedupeEnabled = !!process.env.EMBER_ENGINES_ADDON_DEDUPE; // For stats purposes, counts on the # addons and proxies created. Addons we // can compare against the bundleHostCache addon caches. Proxies, not so much, @@ -238,7 +238,7 @@ class PerBundleAddonCache { * if an addon instance is supposed to be bundled with a particular lazy engine, and * same addon is also to be bundled in the project, prefer the one in the project. * - * NOTE: this only applies if this.engineAddonDedupeEnabled is truthy. If it is not, the + * NOTE: this only applies if this.engineAddonTransitiveDedupeEnabled is truthy. If it is not, the * bundle host always "owns" the addon instance. * * If deduping is enabled and the project does also depend on the same addon, @@ -255,7 +255,7 @@ class PerBundleAddonCache { bundleHostOwnsInstance(bundleHost, addonPkgInfo) { return ( bundleHost === this.project || - !this.engineAddonDedupeEnabled || + !this.engineAddonTransitiveDedupeEnabled || !this.bundledProjectAddonPkgInfos.has(addonPkgInfo) ); } @@ -397,6 +397,7 @@ class PerBundleAddonCache { module.exports = PerBundleAddonCache; -// Support for per-bundle addon caching is opt OUT. Caching any particular -// addon class is currently opt IN. +// Support for per-bundle addon caching is GLOBAL opt OUT (unless you explicitly set +// EMBER_CLI_ADDON_INSTANCE_CACHING to false, it will be enabled.) If you opt out, that +// overrides setting `allowCachingPerBundle` for any particular addon type to true. module.exports.SUPPORT_ADDON_INSTANCE_CACHING = process.env.EMBER_CLI_ADDON_INSTANCE_CACHING !== 'false'; diff --git a/lib/models/per-bundle-addon-cache/target-instance.js b/lib/models/per-bundle-addon-cache/target-instance.js new file mode 100644 index 0000000000..ed3f23eb53 --- /dev/null +++ b/lib/models/per-bundle-addon-cache/target-instance.js @@ -0,0 +1,14 @@ +'use strict'; + +/** + * A Symbol constant for sharing between index.js and addon-proxy.js rather than + * putting the symbol into the Symbol global cache. The symbol is used in per-bundle + * cache entries to refer to the field that points at the real instance that a Proxy + * refers to. + * @property + * @type Symbol + * @final + */ +const TARGET_INSTANCE = Symbol('_targetInstance_'); + +module.exports.TARGET_INSTANCE = TARGET_INSTANCE; From 8b1c2b3edf1ff405d269b5d44e926d7122f7873f Mon Sep 17 00:00:00 2001 From: Brenden Palmer Date: Mon, 19 Apr 2021 12:52:15 -0400 Subject: [PATCH 726/818] pass `realPath` as `root` rather than the dirname for `addonMainPath` --- lib/models/package-info-cache/package-info.js | 5 +- .../lib/ember-with-addon-main/lib/main.js | 5 ++ .../lib/ember-with-addon-main/package.json | 9 +++ .../lib/ember-super-button/package.json | 7 +- tests/fixtures/addon/simple/package.json | 7 +- .../package-info-cache-test.js | 71 +++++++++++++++++-- tests/unit/models/project-test.js | 1 + 7 files changed, 94 insertions(+), 11 deletions(-) create mode 100644 tests/fixtures/addon/simple/lib/ember-super-button/lib/ember-with-addon-main/lib/main.js create mode 100644 tests/fixtures/addon/simple/lib/ember-super-button/lib/ember-with-addon-main/package.json diff --git a/lib/models/package-info-cache/package-info.js b/lib/models/package-info-cache/package-info.js index 6e30cf80b1..2d10470f7d 100644 --- a/lib/models/package-info-cache/package-info.js +++ b/lib/models/package-info-cache/package-info.js @@ -390,18 +390,17 @@ class PackageInfo { // TODO: Future work - allow a time budget for loading each addon and warn // or error for those that take too long. let module = require(this.addonMainPath); - let mainDir = path.dirname(this.addonMainPath); let ctor; if (typeof module === 'function') { ctor = module; - ctor.prototype.root = ctor.prototype.root || mainDir; + ctor.prototype.root = ctor.prototype.root || this.realPath; ctor.prototype.pkg = ctor.prototype.pkg || this.pkg; } else { const Addon = require('../addon'); // done here because of circular dependency - ctor = Addon.extend(Object.assign({ root: mainDir, pkg: this.pkg }, module)); + ctor = Addon.extend(Object.assign({ root: this.realPath, pkg: this.pkg }, module)); } ctor._meta_ = { diff --git a/tests/fixtures/addon/simple/lib/ember-super-button/lib/ember-with-addon-main/lib/main.js b/tests/fixtures/addon/simple/lib/ember-super-button/lib/ember-with-addon-main/lib/main.js new file mode 100644 index 0000000000..3ad817af82 --- /dev/null +++ b/tests/fixtures/addon/simple/lib/ember-super-button/lib/ember-with-addon-main/lib/main.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = { + name: require('../package').name, +}; diff --git a/tests/fixtures/addon/simple/lib/ember-super-button/lib/ember-with-addon-main/package.json b/tests/fixtures/addon/simple/lib/ember-super-button/lib/ember-with-addon-main/package.json new file mode 100644 index 0000000000..6cf2ccf370 --- /dev/null +++ b/tests/fixtures/addon/simple/lib/ember-super-button/lib/ember-with-addon-main/package.json @@ -0,0 +1,9 @@ +{ + "name": "ember-with-addon-main", + "keywords": [ + "ember-addon" + ], + "ember-addon": { + "main": "lib/main.js" + } +} diff --git a/tests/fixtures/addon/simple/lib/ember-super-button/package.json b/tests/fixtures/addon/simple/lib/ember-super-button/package.json index d493c4084b..a2c50d4bbf 100644 --- a/tests/fixtures/addon/simple/lib/ember-super-button/package.json +++ b/tests/fixtures/addon/simple/lib/ember-super-button/package.json @@ -4,9 +4,12 @@ "ember-addon" ], "ember-addon": { - "paths": ["./lib/ember-ng"] + "paths": [ + "./lib/ember-ng", + "./lib/ember-with-addon-main" + ] }, "dependencies": { "ember-yagni": "0" } -} +} \ No newline at end of file diff --git a/tests/fixtures/addon/simple/package.json b/tests/fixtures/addon/simple/package.json index e1db417e4b..ef32076f98 100644 --- a/tests/fixtures/addon/simple/package.json +++ b/tests/fixtures/addon/simple/package.json @@ -5,7 +5,10 @@ "something-else": "latest" }, "ember-addon": { - "paths": ["./lib/ember-super-button"] + "paths": [ + "./lib/ember-super-button", + "./lib/ember-super-button/lib/ember-with-addon-main" + ] }, "devDependencies": { "ember-resolver": "^7.0.0", @@ -20,4 +23,4 @@ "ember-addon-with-dependencies": "latest", "loader.js": "latest" } -} +} \ No newline at end of file diff --git a/tests/unit/models/package-info-cache/package-info-cache-test.js b/tests/unit/models/package-info-cache/package-info-cache-test.js index 3687a48fb0..ea3d2cfe57 100644 --- a/tests/unit/models/package-info-cache/package-info-cache-test.js +++ b/tests/unit/models/package-info-cache/package-info-cache-test.js @@ -64,13 +64,13 @@ describe('models/package-info-cache/package-info-cache-test.js', function () { }); describe('packageInfo contents tests on valid project', function () { - let projectPath, packageJsonPath, packageContents, projectPackageInfo; + let project, projectPath, packageJsonPath, packageContents, projectPackageInfo; beforeEach(function () { projectPath = path.resolve(addonFixturePath, 'simple'); packageJsonPath = path.join(projectPath, 'package.json'); packageContents = require(packageJsonPath); - let project = new Project(projectPath, packageContents, ui, cli); + project = new Project(projectPath, packageContents, ui, cli); let pic = project.packageInfoCache; projectPackageInfo = pic.getEntry(projectPath); @@ -151,12 +151,21 @@ describe('models/package-info-cache/package-info-cache-test.js', function () { expect(packageAndErrorNames).to.deep.equal(devDependencyNames); }); - it('shows projectPackageInfo has 1 in-repo addon named "ember-super-button"', function () { + it('shows projectPackageInfo has 2 in-repo addons', function () { let inRepoAddons = projectPackageInfo.inRepoAddons; + expect(inRepoAddons).to.exist; - expect(inRepoAddons.length).to.equal(1); + expect(inRepoAddons.length).to.equal(2); + expect(inRepoAddons[0].realPath.indexOf(`simple${path.sep}lib${path.sep}ember-super-button`)).to.be.above(0); expect(inRepoAddons[0].pkg.name).to.equal('ember-super-button'); + + expect( + inRepoAddons[1].realPath.indexOf( + `simple${path.sep}lib${path.sep}ember-super-button${path.sep}lib${path.sep}ember-with-addon-main` + ) + ).to.be.above(0); + expect(inRepoAddons[1].pkg.name).to.equal('ember-with-addon-main'); }); it('shows projectPackageInfo has 7 internal addon packages', function () { @@ -172,6 +181,60 @@ describe('models/package-info-cache/package-info-cache-test.js', function () { expect(nodeModules.entries).to.exist; expect(Object.keys(nodeModules.entries).length).to.equal(9); }); + + it('returns stable package infos for a package info representing the same addon', function () { + project.initializeAddons(); + + const findAddonsByName = (projectOrAddon, addonToFind, _foundAddons = []) => { + if (!projectOrAddon) { + return _foundAddons; + } + + projectOrAddon.addons.forEach((addon) => { + if (addon.name === addonToFind) { + _foundAddons.push(addon); + } + + findAddonsByName(addon, addonToFind, _foundAddons); + }); + + return _foundAddons; + }; + + const findAllInRepoPackageInfosByPredicate = (packageInfo, predicate, _foundPackageInfos = []) => { + if (predicate(packageInfo)) { + _foundPackageInfos.push(packageInfo); + } + + (packageInfo.inRepoAddons || []).forEach((addonPackageInfo) => + findAllInRepoPackageInfosByPredicate(addonPackageInfo, predicate, _foundPackageInfos) + ); + + return _foundPackageInfos; + }; + + let allAddonsWithAddonMain = findAddonsByName(project, 'ember-with-addon-main'); + + let projectAddonWithMainPackageInfo = findAllInRepoPackageInfosByPredicate( + project._packageInfo, + (packageInfo) => + typeof packageInfo.addonMainPath === 'string' && + packageInfo.addonMainPath.endsWith('ember-with-addon-main/lib/main.js') + ); + + let allPackageInfosForAddonWithMain = [ + ...allAddonsWithAddonMain.map((addon) => addon._packageInfo), + ...projectAddonWithMainPackageInfo, + ]; + + let areAllPackageInfosEqual = allPackageInfosForAddonWithMain.every( + (packageInfo) => packageInfo === allPackageInfosForAddonWithMain[0] + ); + + expect(allAddonsWithAddonMain.length).to.equal(2); + expect(allPackageInfosForAddonWithMain.length).to.equal(4); + expect(areAllPackageInfosEqual).to.equal(true); + }); }); describe('packageInfo', function () { diff --git a/tests/unit/models/project-test.js b/tests/unit/models/project-test.js index 2e58930915..654fa4cecc 100644 --- a/tests/unit/models/project-test.js +++ b/tests/unit/models/project-test.js @@ -347,6 +347,7 @@ describe('models/project.js', function () { 'ember-non-root-addon', 'ember-random-addon', 'ember-super-button', + 'ember-with-addon-main', ]; expect(Object.keys(project.addonPackages)).to.deep.equal(expected); }); From b2b8909a2d06241959435b08f2dea412b98b53f1 Mon Sep 17 00:00:00 2001 From: Brenden Palmer Date: Mon, 19 Apr 2021 13:24:11 -0400 Subject: [PATCH 727/818] update test --- tests/unit/models/package-info-cache/package-info-cache-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/models/package-info-cache/package-info-cache-test.js b/tests/unit/models/package-info-cache/package-info-cache-test.js index ea3d2cfe57..0de1cddc7a 100644 --- a/tests/unit/models/package-info-cache/package-info-cache-test.js +++ b/tests/unit/models/package-info-cache/package-info-cache-test.js @@ -219,7 +219,7 @@ describe('models/package-info-cache/package-info-cache-test.js', function () { project._packageInfo, (packageInfo) => typeof packageInfo.addonMainPath === 'string' && - packageInfo.addonMainPath.endsWith('ember-with-addon-main/lib/main.js') + packageInfo.addonMainPath.endsWith(path.join('ember-with-addon-main', 'lib', 'main.js')) ); let allPackageInfosForAddonWithMain = [ From 4093ea61990d4830f6e993633525a0589ec4e5f4 Mon Sep 17 00:00:00 2001 From: Brenden Palmer Date: Thu, 15 Apr 2021 18:54:35 -0400 Subject: [PATCH 728/818] bump `broccoli-concat` --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 873c847378..b1bb0152fe 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "broccoli-amd-funnel": "^2.0.1", "broccoli-babel-transpiler": "^7.8.0", "broccoli-builder": "^0.18.14", - "broccoli-concat": "^4.2.4", + "broccoli-concat": "^4.2.5", "broccoli-config-loader": "^1.0.1", "broccoli-config-replace": "^1.1.2", "broccoli-debug": "^0.6.5", diff --git a/yarn.lock b/yarn.lock index 53bfdb0ef6..a10243ea08 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1180,10 +1180,10 @@ broccoli-clean-css@^1.1.0: inline-source-map-comment "^1.0.5" json-stable-stringify "^1.0.0" -broccoli-concat@^4.2.4: - version "4.2.4" - resolved "https://registry.yarnpkg.com/broccoli-concat/-/broccoli-concat-4.2.4.tgz#78e359ddc540b999d815355163bf3cfb6bd67322" - integrity sha512-NgdBIE57r+U/AslBohQr0mCS7PopIWL8dihMI1CzqffQkisAgqWMuddjYmizqRBQlml7crBFaBeUnPDHhf4/RQ== +broccoli-concat@^4.2.5: + version "4.2.5" + resolved "https://registry.yarnpkg.com/broccoli-concat/-/broccoli-concat-4.2.5.tgz#d578f00094048b5fc87195e82fbdbde20d838d29" + integrity sha512-dFB5ATPwOyV8S2I7a07HxCoutoq23oY//LhM6Mou86cWUTB174rND5aQLR7Fu8FjFFLxoTbkk7y0VPITJ1IQrw== dependencies: broccoli-debug "^0.6.5" broccoli-kitchen-sink-helpers "^0.3.1" From e5875388747c5ea5a740f58ef94375b98ed30157 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 19 Apr 2021 16:33:31 -0400 Subject: [PATCH 729/818] Update CHANGELOG.md for 3.26.1. --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85d07045db..c9310e4cbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,19 @@ # ember-cli Changelog +## v3.26.1 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.26.0...v3.26.1) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.26.0...v3.26.1) + +#### Changelog + +- [#9504](https://github.com/ember-cli/ember-cli/pull/9504) Update `broccoli-concat` to avoid a cache invalidation problem in files larger than 10000 characters. [@brendenpalmer](https://github.com/brendenpalmer) + +Thank you to all who took the time to contribute! + ## v3.26.0 #### Blueprint Changes From 638aba9d69932d8070916204b7433c3eccdb62f8 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 19 Apr 2021 16:34:43 -0400 Subject: [PATCH 730/818] Release 3.26.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b1bb0152fe..a36e92407b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.26.0", + "version": "3.26.1", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From d84da71a62aacccd5bcb40eebc9dc8b8e3f86a17 Mon Sep 17 00:00:00 2001 From: Brenden Palmer Date: Mon, 19 Apr 2021 15:53:33 -0400 Subject: [PATCH 731/818] Pass `realPath` as `root` for addons that export a function for its constructor --- lib/models/package-info-cache/package-info.js | 2 +- .../lib/extend-from-addon-directly/index.js | 7 ++++ .../extend-from-addon-directly/package.json | 7 ++++ .../simple/lib/odd-inheritance-addon/index.js | 7 ++++ .../lib/odd-inheritance-addon/package.json | 7 ++++ tests/fixtures/addon/simple/package.json | 4 +- .../package-info-cache-test.js | 40 ++++++++++++++++++- tests/unit/models/project-test.js | 2 + 8 files changed, 72 insertions(+), 4 deletions(-) create mode 100644 tests/fixtures/addon/simple/lib/extend-from-addon-directly/index.js create mode 100644 tests/fixtures/addon/simple/lib/extend-from-addon-directly/package.json create mode 100644 tests/fixtures/addon/simple/lib/odd-inheritance-addon/index.js create mode 100644 tests/fixtures/addon/simple/lib/odd-inheritance-addon/package.json diff --git a/lib/models/package-info-cache/package-info.js b/lib/models/package-info-cache/package-info.js index 2d10470f7d..9e4358f7b2 100644 --- a/lib/models/package-info-cache/package-info.js +++ b/lib/models/package-info-cache/package-info.js @@ -395,7 +395,7 @@ class PackageInfo { if (typeof module === 'function') { ctor = module; - ctor.prototype.root = ctor.prototype.root || this.realPath; + ctor.prototype.root = this.realPath; ctor.prototype.pkg = ctor.prototype.pkg || this.pkg; } else { const Addon = require('../addon'); // done here because of circular dependency diff --git a/tests/fixtures/addon/simple/lib/extend-from-addon-directly/index.js b/tests/fixtures/addon/simple/lib/extend-from-addon-directly/index.js new file mode 100644 index 0000000000..03ebd576ca --- /dev/null +++ b/tests/fixtures/addon/simple/lib/extend-from-addon-directly/index.js @@ -0,0 +1,7 @@ +'use strict'; + +const Addon = require('../../../../../../lib/models/addon'); + +module.exports = Addon.extend({ + name: require('./package').name, +}); diff --git a/tests/fixtures/addon/simple/lib/extend-from-addon-directly/package.json b/tests/fixtures/addon/simple/lib/extend-from-addon-directly/package.json new file mode 100644 index 0000000000..c7c4edefde --- /dev/null +++ b/tests/fixtures/addon/simple/lib/extend-from-addon-directly/package.json @@ -0,0 +1,7 @@ +{ + "name": "extend-from-addon-directly", + "keywords": [ + "ember-addon" + ], + "dependencies": {} +} \ No newline at end of file diff --git a/tests/fixtures/addon/simple/lib/odd-inheritance-addon/index.js b/tests/fixtures/addon/simple/lib/odd-inheritance-addon/index.js new file mode 100644 index 0000000000..a2803136ef --- /dev/null +++ b/tests/fixtures/addon/simple/lib/odd-inheritance-addon/index.js @@ -0,0 +1,7 @@ +'use strict'; + +const AddonToExtendFrom = require('../extend-from-addon-directly'); + +module.exports = AddonToExtendFrom.extend({ + name: require('./package').name, +}); diff --git a/tests/fixtures/addon/simple/lib/odd-inheritance-addon/package.json b/tests/fixtures/addon/simple/lib/odd-inheritance-addon/package.json new file mode 100644 index 0000000000..a96531aca7 --- /dev/null +++ b/tests/fixtures/addon/simple/lib/odd-inheritance-addon/package.json @@ -0,0 +1,7 @@ +{ + "name": "odd-inheritance-addon", + "keywords": [ + "ember-addon" + ], + "dependencies": {} +} \ No newline at end of file diff --git a/tests/fixtures/addon/simple/package.json b/tests/fixtures/addon/simple/package.json index ef32076f98..54a32d9555 100644 --- a/tests/fixtures/addon/simple/package.json +++ b/tests/fixtures/addon/simple/package.json @@ -7,7 +7,9 @@ "ember-addon": { "paths": [ "./lib/ember-super-button", - "./lib/ember-super-button/lib/ember-with-addon-main" + "./lib/ember-super-button/lib/ember-with-addon-main", + "./lib/extend-from-addon-directly", + "./lib/odd-inheritance-addon" ] }, "devDependencies": { diff --git a/tests/unit/models/package-info-cache/package-info-cache-test.js b/tests/unit/models/package-info-cache/package-info-cache-test.js index 0de1cddc7a..0541d4cc09 100644 --- a/tests/unit/models/package-info-cache/package-info-cache-test.js +++ b/tests/unit/models/package-info-cache/package-info-cache-test.js @@ -151,11 +151,11 @@ describe('models/package-info-cache/package-info-cache-test.js', function () { expect(packageAndErrorNames).to.deep.equal(devDependencyNames); }); - it('shows projectPackageInfo has 2 in-repo addons', function () { + it('shows projectPackageInfo has 4 in-repo addons', function () { let inRepoAddons = projectPackageInfo.inRepoAddons; expect(inRepoAddons).to.exist; - expect(inRepoAddons.length).to.equal(2); + expect(inRepoAddons.length).to.equal(4); expect(inRepoAddons[0].realPath.indexOf(`simple${path.sep}lib${path.sep}ember-super-button`)).to.be.above(0); expect(inRepoAddons[0].pkg.name).to.equal('ember-super-button'); @@ -166,6 +166,14 @@ describe('models/package-info-cache/package-info-cache-test.js', function () { ) ).to.be.above(0); expect(inRepoAddons[1].pkg.name).to.equal('ember-with-addon-main'); + + expect(inRepoAddons[2].realPath.indexOf(`simple${path.sep}lib${path.sep}extend-from-addon-directly`)).to.be.above( + 0 + ); + expect(inRepoAddons[2].pkg.name).to.equal('extend-from-addon-directly'); + + expect(inRepoAddons[3].realPath.indexOf(`simple${path.sep}lib${path.sep}odd-inheritance-addon`)).to.be.above(0); + expect(inRepoAddons[3].pkg.name).to.equal('odd-inheritance-addon'); }); it('shows projectPackageInfo has 7 internal addon packages', function () { @@ -235,6 +243,34 @@ describe('models/package-info-cache/package-info-cache-test.js', function () { expect(allPackageInfosForAddonWithMain.length).to.equal(4); expect(areAllPackageInfosEqual).to.equal(true); }); + + it('returns has the correct `root` for addons that export a function for its constructor', function () { + project.initializeAddons(); + + let inRepoAddons = projectPackageInfo.inRepoAddons; + + let ExtendFromAddonDirectlyConstructor = inRepoAddons[2].getAddonConstructor(); + let OddInheritanceAddonConstructor = inRepoAddons[3].getAddonConstructor(); + + expect(ExtendFromAddonDirectlyConstructor.prototype.root).to.equal( + path.resolve(__dirname, '../../../fixtures/addon/simple/lib/extend-from-addon-directly') + ); + + expect(OddInheritanceAddonConstructor.prototype.root).to.equal( + path.resolve(__dirname, '../../../fixtures/addon/simple/lib/odd-inheritance-addon') + ); + + let extendFromAddonInstance = new ExtendFromAddonDirectlyConstructor(project, project); + let oddInheritanceAddonInstance = new OddInheritanceAddonConstructor(project, project); + + expect(extendFromAddonInstance.root).to.equal( + path.resolve(__dirname, '../../../fixtures/addon/simple/lib/extend-from-addon-directly') + ); + + expect(oddInheritanceAddonInstance.root).to.equal( + path.resolve(__dirname, '../../../fixtures/addon/simple/lib/odd-inheritance-addon') + ); + }); }); describe('packageInfo', function () { diff --git a/tests/unit/models/project-test.js b/tests/unit/models/project-test.js index 654fa4cecc..49f3037f63 100644 --- a/tests/unit/models/project-test.js +++ b/tests/unit/models/project-test.js @@ -348,6 +348,8 @@ describe('models/project.js', function () { 'ember-random-addon', 'ember-super-button', 'ember-with-addon-main', + 'extend-from-addon-directly', + 'odd-inheritance-addon', ]; expect(Object.keys(project.addonPackages)).to.deep.equal(expected); }); From b93decdc513dbdbfed3d7303b08799e954325534 Mon Sep 17 00:00:00 2001 From: Brenden Palmer Date: Mon, 19 Apr 2021 23:30:52 -0400 Subject: [PATCH 732/818] Add a new config, `pkg.ember.projectRoot`, to specify the location of the project --- lib/models/project.js | 19 ++++- .../app/templates/application.hbs | 7 ++ .../actual-project/ember-cli-build.js | 24 +++++++ .../actual-project/package.json | 70 +++++++++++++++++++ .../fixtures/app/nested-project/package.json | 6 ++ .../ember-cli-build.js | 0 .../package.json | 6 ++ tests/unit/models/project-test.js | 18 +++++ 8 files changed, 148 insertions(+), 2 deletions(-) create mode 100644 tests/fixtures/app/nested-project/actual-project/app/templates/application.hbs create mode 100644 tests/fixtures/app/nested-project/actual-project/ember-cli-build.js create mode 100644 tests/fixtures/app/nested-project/actual-project/package.json create mode 100644 tests/fixtures/app/nested-project/package.json create mode 100644 tests/fixtures/app/project-root-with-ember-cli-build/ember-cli-build.js create mode 100644 tests/fixtures/app/project-root-with-ember-cli-build/package.json diff --git a/lib/models/project.js b/lib/models/project.js index ec35a9cc02..6ccde5cc07 100644 --- a/lib/models/project.js +++ b/lib/models/project.js @@ -643,9 +643,13 @@ class Project { } /** - Returns a new project based on the first package.json that is found + Returns a new project based on the first `package.json` that is found in `pathName`. + If the above `package.json` specifies `ember-addon.projectRoot`, we load + the project based on the relative path between this directory and the + specified `projectRoot`. + @private @static @method closestSync @@ -659,15 +663,26 @@ class Project { let ui = ensureUI(_ui); let directory = findupPath(pathName); + let pkg = fs.readJsonSync(path.join(directory, 'package.json')); logger.info('found package.json at %s', directory); + // allow `package.json` files to specify where the actual project lives + if (pkg && pkg['ember-addon'] && typeof pkg['ember-addon'].projectRoot === 'string') { + if (fs.existsSync(path.join(directory, 'ember-cli-build.js'))) { + throw new Error( + `Both \`ember-addon.projectRoot\` and \`ember-cli-build.js\` exist as part of \`${directory}\`` + ); + } + + return Project.closestSync(path.join(directory, pkg['ember-addon'].projectRoot), _ui, _cli); + } + let relative = path.relative(directory, pathName); if (relative.indexOf('tmp') === 0) { logger.info('ignoring parent project since we are in the tmp folder of the project'); return Project.nullProject(_ui, _cli); } - let pkg = fs.readJsonSync(path.join(directory, 'package.json')); logger.info('project name: %s', pkg && pkg.name); if (!isEmberCliProject(pkg)) { diff --git a/tests/fixtures/app/nested-project/actual-project/app/templates/application.hbs b/tests/fixtures/app/nested-project/actual-project/app/templates/application.hbs new file mode 100644 index 0000000000..41f167ffc2 --- /dev/null +++ b/tests/fixtures/app/nested-project/actual-project/app/templates/application.hbs @@ -0,0 +1,7 @@ +{{page-title "Actual Project"}} + +{{!-- The following component displays Ember's default welcome message. --}} + +{{!-- Feel free to remove this! --}} + +{{outlet}} diff --git a/tests/fixtures/app/nested-project/actual-project/ember-cli-build.js b/tests/fixtures/app/nested-project/actual-project/ember-cli-build.js new file mode 100644 index 0000000000..48e94e9e44 --- /dev/null +++ b/tests/fixtures/app/nested-project/actual-project/ember-cli-build.js @@ -0,0 +1,24 @@ +'use strict'; + +const EmberApp = require('ember-cli/lib/broccoli/ember-app'); + +module.exports = function (defaults) { + let app = new EmberApp(defaults, { + // Add options here + }); + + // Use `app.import` to add additional libraries to the generated + // output files. + // + // If you need to use different assets in different + // environments, specify an object as the first parameter. That + // object's keys should be the environment name and the values + // should be the asset to use in that environment. + // + // If the library that you are including contains AMD or ES6 + // modules that you would like to import into your application + // please specify an object with the list of modules as keys + // along with the exports of each module as its value. + + return app.toTree(); +}; diff --git a/tests/fixtures/app/nested-project/actual-project/package.json b/tests/fixtures/app/nested-project/actual-project/package.json new file mode 100644 index 0000000000..34a2011b02 --- /dev/null +++ b/tests/fixtures/app/nested-project/actual-project/package.json @@ -0,0 +1,70 @@ +{ + "name": "actual-project", + "version": "0.0.0", + "private": true, + "description": "Small description for actual-project goes here", + "repository": "", + "license": "MIT", + "author": "", + "directories": { + "doc": "doc", + "test": "tests" + }, + "scripts": { + "build": "ember build --environment=production", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"", + "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix", + "lint:hbs": "ember-template-lint .", + "lint:hbs:fix": "ember-template-lint . --fix", + "lint:js": "eslint . --cache", + "lint:js:fix": "eslint . --fix", + "start": "ember serve", + "test": "npm-run-all lint test:*", + "test:ember": "ember test" + }, + "devDependencies": { + "@ember/optional-features": "^2.0.0", + "@ember/test-helpers": "^2.2.5", + "@glimmer/component": "^1.0.4", + "@glimmer/tracking": "^1.0.4", + "babel-eslint": "^10.1.0", + "broccoli-asset-rev": "^3.0.0", + "ember-auto-import": "^1.11.2", + "ember-cli": "~<%= emberCLIVersion %>", + "ember-cli-app-version": "^5.0.0", + "ember-cli-babel": "^7.26.3", + "ember-cli-dependency-checker": "^3.2.0", + "ember-cli-htmlbars": "^5.7.1", + "ember-cli-inject-live-reload": "^2.0.2", + "ember-cli-sri": "^2.1.1", + "ember-cli-terser": "^4.0.1", + "ember-data": "~3.27.0-beta.0", + "ember-export-application-global": "^2.0.1", + "ember-fetch": "^8.0.4", + "ember-load-initializers": "^2.1.2", + "ember-maybe-import-regenerator": "^0.1.6", + "ember-page-title": "^6.2.1", + "ember-qunit": "^5.1.4", + "ember-resolver": "^8.0.2", + "ember-source": "~3.27.0-beta.3", + "ember-template-lint": "^3.2.0", + "ember-welcome-page": "^4.0.0", + "eslint": "^7.24.0", + "eslint-config-prettier": "^8.1.0", + "eslint-plugin-ember": "^10.3.0", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-prettier": "^3.3.1", + "eslint-plugin-qunit": "^6.0.0", + "loader.js": "^4.7.0", + "npm-run-all": "^4.1.5", + "prettier": "^2.2.1", + "qunit": "^2.14.1", + "qunit-dom": "^1.6.0" + }, + "engines": { + "node": "10.* || >= 12" + }, + "ember": { + "edition": "octane" + } +} diff --git a/tests/fixtures/app/nested-project/package.json b/tests/fixtures/app/nested-project/package.json new file mode 100644 index 0000000000..1c6ac30bdd --- /dev/null +++ b/tests/fixtures/app/nested-project/package.json @@ -0,0 +1,6 @@ +{ + "name": "nested-project", + "ember-addon": { + "projectRoot": "./actual-project" + } +} \ No newline at end of file diff --git a/tests/fixtures/app/project-root-with-ember-cli-build/ember-cli-build.js b/tests/fixtures/app/project-root-with-ember-cli-build/ember-cli-build.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/fixtures/app/project-root-with-ember-cli-build/package.json b/tests/fixtures/app/project-root-with-ember-cli-build/package.json new file mode 100644 index 0000000000..da66aad832 --- /dev/null +++ b/tests/fixtures/app/project-root-with-ember-cli-build/package.json @@ -0,0 +1,6 @@ +{ + "name": "project-root-with-ember-cli-build", + "ember-addon": { + "projectRoot": "./actual-project" + } +} \ No newline at end of file diff --git a/tests/unit/models/project-test.js b/tests/unit/models/project-test.js index 49f3037f63..77d262214b 100644 --- a/tests/unit/models/project-test.js +++ b/tests/unit/models/project-test.js @@ -672,4 +672,22 @@ describe('models/project.js', function () { ); }); }); + + describe('Project.closestSync', function () { + it('should use the `actual-project` specified by `ember-addon.projectRoot` in the top-level `package.json`', function () { + let cli = new MockCLI(); + projectPath = path.resolve(__dirname, '../../fixtures/app/nested-project'); + project = Project.closestSync(projectPath, cli.ui, cli); + expect(project.root).to.equal(path.resolve(__dirname, '../../fixtures/app/nested-project/actual-project')); + }); + + it('should throw if both `ember-addon.projectRoot` and `ember-cli-build.js` exist', function () { + let cli = new MockCLI(); + projectPath = path.resolve(__dirname, '../../fixtures/app/project-root-with-ember-cli-build'); + + expect(() => Project.closestSync(projectPath, cli.ui, cli)).to.throw( + `Both \`ember-addon.projectRoot\` and \`ember-cli-build.js\` exist as part of \`${projectPath}\`` + ); + }); + }); }); From 58e8efbb79680ec375f158eee710587171af4cea Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 28 Apr 2021 16:45:21 +0000 Subject: [PATCH 733/818] Upgrade to GitHub-native Dependabot --- .github/dependabot.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..9bf1f33fe6 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,28 @@ +version: 2 +updates: +- package-ecosystem: npm + directory: "/" + schedule: + interval: monthly + time: "03:00" + open-pull-requests-limit: 10 + versioning-strategy: increase + ignore: + - dependency-name: mocha-eslint + versions: + - "> 4.1.0" + - dependency-name: js-yaml + versions: + - 4.0.0 + - dependency-name: broccoli-funnel + versions: + - 3.0.3 + - dependency-name: supertest + versions: + - 6.1.1 +- package-ecosystem: github-actions + directory: "/" + schedule: + interval: monthly + time: "03:00" + open-pull-requests-limit: 10 From f6945e7aa35d8c1d6fba1c38486d47e3c18c264e Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 1 May 2021 04:38:03 +0000 Subject: [PATCH 734/818] Bump mocha from 8.3.0 to 8.3.2 (#9515) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 5321e7b2f9..aa462d8efe 100644 --- a/package.json +++ b/package.json @@ -149,7 +149,7 @@ "is-language-code": "^2.0.0", "jsdom": "^16.4.0", "latest-version": "^5.1.0", - "mocha": "^8.3.0", + "mocha": "^8.3.2", "nock": "^13.0.5", "nyc": "^15.1.0", "prettier": "2.2.1", diff --git a/yarn.lock b/yarn.lock index 4de9af41f0..4d667ae56c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5612,10 +5612,10 @@ mktemp@~0.4.0: resolved "https://registry.yarnpkg.com/mktemp/-/mktemp-0.4.0.tgz#6d0515611c8a8c84e484aa2000129b98e981ff0b" integrity sha1-bQUVYRyKjITkhKogABKbmOmB/ws= -mocha@^8.3.0: - version "8.3.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.3.0.tgz#a83a7432d382ae1ca29686062d7fdc2c36f63fe5" - integrity sha512-TQqyC89V1J/Vxx0DhJIXlq9gbbL9XFNdeLQ1+JsnZsVaSOV1z3tWfw0qZmQJGQRIfkvZcs7snQnZnOCKoldq1Q== +mocha@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.3.2.tgz#53406f195fa86fbdebe71f8b1c6fb23221d69fcc" + integrity sha512-UdmISwr/5w+uXLPKspgoV7/RXZwKRTiTjJ2/AC5ZiEztIoOYdfKb19+9jNmEInzx5pBsCyJQzarAxqIGBNYJhg== dependencies: "@ungap/promise-all-settled" "1.1.2" ansi-colors "4.1.1" From 32247b013c5d590e8e28229f1ad6bb3c6195d869 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 1 May 2021 07:56:49 +0000 Subject: [PATCH 735/818] Bump sort-package-json from 1.48.0 to 1.49.0 (#9521) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index aa462d8efe..058903e072 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,7 @@ "sane": "^4.1.0", "semver": "^7.3.4", "silent-error": "^1.1.1", - "sort-package-json": "^1.48.0", + "sort-package-json": "^1.49.0", "symlink-or-copy": "^1.3.1", "temp": "0.9.4", "testem": "^3.2.0", diff --git a/yarn.lock b/yarn.lock index 4d667ae56c..f9900d18d9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7257,10 +7257,10 @@ sort-object-keys@^1.1.3: resolved "https://registry.yarnpkg.com/sort-object-keys/-/sort-object-keys-1.1.3.tgz#bff833fe85cab147b34742e45863453c1e190b45" integrity sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg== -sort-package-json@^1.48.0: - version "1.48.0" - resolved "https://registry.yarnpkg.com/sort-package-json/-/sort-package-json-1.48.0.tgz#476043cdde65346900296d5035a0b20560c954e5" - integrity sha512-VAC5THvyGFQFeVLbKcGNPzny5u/heOwks9tzTTLvL8nX9v7zZjpx36/itcJtqp8gI+r57Rw1RVYT6Ecy+3N6+Q== +sort-package-json@^1.49.0: + version "1.49.0" + resolved "https://registry.yarnpkg.com/sort-package-json/-/sort-package-json-1.49.0.tgz#82845ab598501bb35875f326e4768a5ab5f15335" + integrity sha512-3YuqFGThwc9X0TZLYohOUJJ/P6uJIVcTeuJOc6ZWw4f1fHpTHIfVysKer4qXtrZ2zvwwU2aEcb555Bo+2fwIgQ== dependencies: detect-indent "^6.0.0" detect-newline "3.1.0" From 7c5dc558727b284cca55ca424e56ac8924dee52b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 1 May 2021 10:05:44 +0000 Subject: [PATCH 736/818] Bump eslint-plugin-mocha from 8.0.0 to 8.1.0 (#9516) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 058903e072..f0806cd03d 100644 --- a/package.json +++ b/package.json @@ -142,7 +142,7 @@ "eslint": "^7.11.0", "eslint-config-prettier": "^7.2.0", "eslint-plugin-chai-expect": "^2.2.0", - "eslint-plugin-mocha": "^8.0.0", + "eslint-plugin-mocha": "^8.1.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.3.1", "fixturify": "^2.1.0", diff --git a/yarn.lock b/yarn.lock index f9900d18d9..587c5898e1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2852,10 +2852,10 @@ eslint-plugin-es@^3.0.0: eslint-utils "^2.0.0" regexpp "^3.0.0" -eslint-plugin-mocha@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-8.0.0.tgz#7ec5d228bcb3735301701dfbc3376320a1ca3791" - integrity sha512-n67etbWDz6NQM+HnTwZHyBwz/bLlYPOxUbw7bPuCyFujv7ZpaT/Vn6KTAbT02gf7nRljtYIjWcTxK/n8a57rQQ== +eslint-plugin-mocha@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-8.1.0.tgz#b9aebbede46a808e46e622c8fd99d2a2f353e725" + integrity sha512-1EgHvXKRl7W3mq3sntZAi5T24agRMyiTPL4bSXe+B4GksYOjAPEWYx+J3eJg4It1l2NMNZJtk0gQyQ6mfiPhQg== dependencies: eslint-utils "^2.1.0" ramda "^0.27.1" From e1e059eede6fb125c295e03af69703dd1f8d49dd Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 1 May 2021 11:31:46 +0000 Subject: [PATCH 737/818] Bump workerpool from 6.1.0 to 6.1.4 (#9517) --- package.json | 2 +- yarn.lock | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f0806cd03d..56b00a62ea 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ "uuid": "^8.3.2", "walk-sync": "^2.2.0", "watch-detector": "^1.0.0", - "workerpool": "^6.0.3", + "workerpool": "^6.1.4", "yam": "^1.0.0" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index 587c5898e1..a8f3d91a54 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8353,7 +8353,7 @@ wordwrap@^0.0.3, wordwrap@~0.0.2: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= -workerpool@6.1.0, workerpool@^6.0.3: +workerpool@6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.0.tgz#a8e038b4c94569596852de7a8ea4228eefdeb37b" integrity sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg== @@ -8367,6 +8367,11 @@ workerpool@^3.1.1: object-assign "4.1.1" rsvp "^4.8.4" +workerpool@^6.1.4: + version "6.1.4" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.4.tgz#6a972b6df82e38d50248ee2820aa98e2d0ad3090" + integrity sha512-jGWPzsUqzkow8HoAvqaPWTUPCrlPJaJ5tY8Iz7n1uCz3tTp6s3CDG0FF1NsX42WNlkRSW6Mr+CDZGnNoSsKa7g== + wrap-ansi@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" From 788898e9eb0ea342e51610ff271ca14e2df1edbf Mon Sep 17 00:00:00 2001 From: Brenden Palmer Date: Tue, 4 May 2021 17:09:54 -0400 Subject: [PATCH 738/818] Revert "Pass `realPath` as `root` for addons that export a function for its constructor" This reverts commit d84da71a62aacccd5bcb40eebc9dc8b8e3f86a17. --- lib/models/package-info-cache/package-info.js | 2 +- .../lib/extend-from-addon-directly/index.js | 7 ---- .../extend-from-addon-directly/package.json | 7 ---- .../simple/lib/odd-inheritance-addon/index.js | 7 ---- .../lib/odd-inheritance-addon/package.json | 7 ---- tests/fixtures/addon/simple/package.json | 4 +- .../package-info-cache-test.js | 40 +------------------ tests/unit/models/project-test.js | 2 - 8 files changed, 4 insertions(+), 72 deletions(-) delete mode 100644 tests/fixtures/addon/simple/lib/extend-from-addon-directly/index.js delete mode 100644 tests/fixtures/addon/simple/lib/extend-from-addon-directly/package.json delete mode 100644 tests/fixtures/addon/simple/lib/odd-inheritance-addon/index.js delete mode 100644 tests/fixtures/addon/simple/lib/odd-inheritance-addon/package.json diff --git a/lib/models/package-info-cache/package-info.js b/lib/models/package-info-cache/package-info.js index 9e4358f7b2..2d10470f7d 100644 --- a/lib/models/package-info-cache/package-info.js +++ b/lib/models/package-info-cache/package-info.js @@ -395,7 +395,7 @@ class PackageInfo { if (typeof module === 'function') { ctor = module; - ctor.prototype.root = this.realPath; + ctor.prototype.root = ctor.prototype.root || this.realPath; ctor.prototype.pkg = ctor.prototype.pkg || this.pkg; } else { const Addon = require('../addon'); // done here because of circular dependency diff --git a/tests/fixtures/addon/simple/lib/extend-from-addon-directly/index.js b/tests/fixtures/addon/simple/lib/extend-from-addon-directly/index.js deleted file mode 100644 index 03ebd576ca..0000000000 --- a/tests/fixtures/addon/simple/lib/extend-from-addon-directly/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -const Addon = require('../../../../../../lib/models/addon'); - -module.exports = Addon.extend({ - name: require('./package').name, -}); diff --git a/tests/fixtures/addon/simple/lib/extend-from-addon-directly/package.json b/tests/fixtures/addon/simple/lib/extend-from-addon-directly/package.json deleted file mode 100644 index c7c4edefde..0000000000 --- a/tests/fixtures/addon/simple/lib/extend-from-addon-directly/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "extend-from-addon-directly", - "keywords": [ - "ember-addon" - ], - "dependencies": {} -} \ No newline at end of file diff --git a/tests/fixtures/addon/simple/lib/odd-inheritance-addon/index.js b/tests/fixtures/addon/simple/lib/odd-inheritance-addon/index.js deleted file mode 100644 index a2803136ef..0000000000 --- a/tests/fixtures/addon/simple/lib/odd-inheritance-addon/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -const AddonToExtendFrom = require('../extend-from-addon-directly'); - -module.exports = AddonToExtendFrom.extend({ - name: require('./package').name, -}); diff --git a/tests/fixtures/addon/simple/lib/odd-inheritance-addon/package.json b/tests/fixtures/addon/simple/lib/odd-inheritance-addon/package.json deleted file mode 100644 index a96531aca7..0000000000 --- a/tests/fixtures/addon/simple/lib/odd-inheritance-addon/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "odd-inheritance-addon", - "keywords": [ - "ember-addon" - ], - "dependencies": {} -} \ No newline at end of file diff --git a/tests/fixtures/addon/simple/package.json b/tests/fixtures/addon/simple/package.json index 54a32d9555..ef32076f98 100644 --- a/tests/fixtures/addon/simple/package.json +++ b/tests/fixtures/addon/simple/package.json @@ -7,9 +7,7 @@ "ember-addon": { "paths": [ "./lib/ember-super-button", - "./lib/ember-super-button/lib/ember-with-addon-main", - "./lib/extend-from-addon-directly", - "./lib/odd-inheritance-addon" + "./lib/ember-super-button/lib/ember-with-addon-main" ] }, "devDependencies": { diff --git a/tests/unit/models/package-info-cache/package-info-cache-test.js b/tests/unit/models/package-info-cache/package-info-cache-test.js index 0541d4cc09..0de1cddc7a 100644 --- a/tests/unit/models/package-info-cache/package-info-cache-test.js +++ b/tests/unit/models/package-info-cache/package-info-cache-test.js @@ -151,11 +151,11 @@ describe('models/package-info-cache/package-info-cache-test.js', function () { expect(packageAndErrorNames).to.deep.equal(devDependencyNames); }); - it('shows projectPackageInfo has 4 in-repo addons', function () { + it('shows projectPackageInfo has 2 in-repo addons', function () { let inRepoAddons = projectPackageInfo.inRepoAddons; expect(inRepoAddons).to.exist; - expect(inRepoAddons.length).to.equal(4); + expect(inRepoAddons.length).to.equal(2); expect(inRepoAddons[0].realPath.indexOf(`simple${path.sep}lib${path.sep}ember-super-button`)).to.be.above(0); expect(inRepoAddons[0].pkg.name).to.equal('ember-super-button'); @@ -166,14 +166,6 @@ describe('models/package-info-cache/package-info-cache-test.js', function () { ) ).to.be.above(0); expect(inRepoAddons[1].pkg.name).to.equal('ember-with-addon-main'); - - expect(inRepoAddons[2].realPath.indexOf(`simple${path.sep}lib${path.sep}extend-from-addon-directly`)).to.be.above( - 0 - ); - expect(inRepoAddons[2].pkg.name).to.equal('extend-from-addon-directly'); - - expect(inRepoAddons[3].realPath.indexOf(`simple${path.sep}lib${path.sep}odd-inheritance-addon`)).to.be.above(0); - expect(inRepoAddons[3].pkg.name).to.equal('odd-inheritance-addon'); }); it('shows projectPackageInfo has 7 internal addon packages', function () { @@ -243,34 +235,6 @@ describe('models/package-info-cache/package-info-cache-test.js', function () { expect(allPackageInfosForAddonWithMain.length).to.equal(4); expect(areAllPackageInfosEqual).to.equal(true); }); - - it('returns has the correct `root` for addons that export a function for its constructor', function () { - project.initializeAddons(); - - let inRepoAddons = projectPackageInfo.inRepoAddons; - - let ExtendFromAddonDirectlyConstructor = inRepoAddons[2].getAddonConstructor(); - let OddInheritanceAddonConstructor = inRepoAddons[3].getAddonConstructor(); - - expect(ExtendFromAddonDirectlyConstructor.prototype.root).to.equal( - path.resolve(__dirname, '../../../fixtures/addon/simple/lib/extend-from-addon-directly') - ); - - expect(OddInheritanceAddonConstructor.prototype.root).to.equal( - path.resolve(__dirname, '../../../fixtures/addon/simple/lib/odd-inheritance-addon') - ); - - let extendFromAddonInstance = new ExtendFromAddonDirectlyConstructor(project, project); - let oddInheritanceAddonInstance = new OddInheritanceAddonConstructor(project, project); - - expect(extendFromAddonInstance.root).to.equal( - path.resolve(__dirname, '../../../fixtures/addon/simple/lib/extend-from-addon-directly') - ); - - expect(oddInheritanceAddonInstance.root).to.equal( - path.resolve(__dirname, '../../../fixtures/addon/simple/lib/odd-inheritance-addon') - ); - }); }); describe('packageInfo', function () { diff --git a/tests/unit/models/project-test.js b/tests/unit/models/project-test.js index 77d262214b..f03b754225 100644 --- a/tests/unit/models/project-test.js +++ b/tests/unit/models/project-test.js @@ -348,8 +348,6 @@ describe('models/project.js', function () { 'ember-random-addon', 'ember-super-button', 'ember-with-addon-main', - 'extend-from-addon-directly', - 'odd-inheritance-addon', ]; expect(Object.keys(project.addonPackages)).to.deep.equal(expected); }); From b4be0bf1c9405f2efca3fe3c3c820ee7e6c448b0 Mon Sep 17 00:00:00 2001 From: Brenden Palmer Date: Tue, 4 May 2021 17:10:46 -0400 Subject: [PATCH 739/818] Revert "pass `realPath` as `root` rather than the dirname for `addonMainPath`" This reverts commit 8b1c2b3edf1ff405d269b5d44e926d7122f7873f. --- lib/models/package-info-cache/package-info.js | 5 +- .../lib/ember-with-addon-main/lib/main.js | 5 -- .../lib/ember-with-addon-main/package.json | 9 --- .../lib/ember-super-button/package.json | 7 +- tests/fixtures/addon/simple/package.json | 7 +- .../package-info-cache-test.js | 71 ++----------------- tests/unit/models/project-test.js | 1 - 7 files changed, 11 insertions(+), 94 deletions(-) delete mode 100644 tests/fixtures/addon/simple/lib/ember-super-button/lib/ember-with-addon-main/lib/main.js delete mode 100644 tests/fixtures/addon/simple/lib/ember-super-button/lib/ember-with-addon-main/package.json diff --git a/lib/models/package-info-cache/package-info.js b/lib/models/package-info-cache/package-info.js index 2d10470f7d..6e30cf80b1 100644 --- a/lib/models/package-info-cache/package-info.js +++ b/lib/models/package-info-cache/package-info.js @@ -390,17 +390,18 @@ class PackageInfo { // TODO: Future work - allow a time budget for loading each addon and warn // or error for those that take too long. let module = require(this.addonMainPath); + let mainDir = path.dirname(this.addonMainPath); let ctor; if (typeof module === 'function') { ctor = module; - ctor.prototype.root = ctor.prototype.root || this.realPath; + ctor.prototype.root = ctor.prototype.root || mainDir; ctor.prototype.pkg = ctor.prototype.pkg || this.pkg; } else { const Addon = require('../addon'); // done here because of circular dependency - ctor = Addon.extend(Object.assign({ root: this.realPath, pkg: this.pkg }, module)); + ctor = Addon.extend(Object.assign({ root: mainDir, pkg: this.pkg }, module)); } ctor._meta_ = { diff --git a/tests/fixtures/addon/simple/lib/ember-super-button/lib/ember-with-addon-main/lib/main.js b/tests/fixtures/addon/simple/lib/ember-super-button/lib/ember-with-addon-main/lib/main.js deleted file mode 100644 index 3ad817af82..0000000000 --- a/tests/fixtures/addon/simple/lib/ember-super-button/lib/ember-with-addon-main/lib/main.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -module.exports = { - name: require('../package').name, -}; diff --git a/tests/fixtures/addon/simple/lib/ember-super-button/lib/ember-with-addon-main/package.json b/tests/fixtures/addon/simple/lib/ember-super-button/lib/ember-with-addon-main/package.json deleted file mode 100644 index 6cf2ccf370..0000000000 --- a/tests/fixtures/addon/simple/lib/ember-super-button/lib/ember-with-addon-main/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "ember-with-addon-main", - "keywords": [ - "ember-addon" - ], - "ember-addon": { - "main": "lib/main.js" - } -} diff --git a/tests/fixtures/addon/simple/lib/ember-super-button/package.json b/tests/fixtures/addon/simple/lib/ember-super-button/package.json index a2c50d4bbf..d493c4084b 100644 --- a/tests/fixtures/addon/simple/lib/ember-super-button/package.json +++ b/tests/fixtures/addon/simple/lib/ember-super-button/package.json @@ -4,12 +4,9 @@ "ember-addon" ], "ember-addon": { - "paths": [ - "./lib/ember-ng", - "./lib/ember-with-addon-main" - ] + "paths": ["./lib/ember-ng"] }, "dependencies": { "ember-yagni": "0" } -} \ No newline at end of file +} diff --git a/tests/fixtures/addon/simple/package.json b/tests/fixtures/addon/simple/package.json index ef32076f98..e1db417e4b 100644 --- a/tests/fixtures/addon/simple/package.json +++ b/tests/fixtures/addon/simple/package.json @@ -5,10 +5,7 @@ "something-else": "latest" }, "ember-addon": { - "paths": [ - "./lib/ember-super-button", - "./lib/ember-super-button/lib/ember-with-addon-main" - ] + "paths": ["./lib/ember-super-button"] }, "devDependencies": { "ember-resolver": "^7.0.0", @@ -23,4 +20,4 @@ "ember-addon-with-dependencies": "latest", "loader.js": "latest" } -} \ No newline at end of file +} diff --git a/tests/unit/models/package-info-cache/package-info-cache-test.js b/tests/unit/models/package-info-cache/package-info-cache-test.js index 0de1cddc7a..3687a48fb0 100644 --- a/tests/unit/models/package-info-cache/package-info-cache-test.js +++ b/tests/unit/models/package-info-cache/package-info-cache-test.js @@ -64,13 +64,13 @@ describe('models/package-info-cache/package-info-cache-test.js', function () { }); describe('packageInfo contents tests on valid project', function () { - let project, projectPath, packageJsonPath, packageContents, projectPackageInfo; + let projectPath, packageJsonPath, packageContents, projectPackageInfo; beforeEach(function () { projectPath = path.resolve(addonFixturePath, 'simple'); packageJsonPath = path.join(projectPath, 'package.json'); packageContents = require(packageJsonPath); - project = new Project(projectPath, packageContents, ui, cli); + let project = new Project(projectPath, packageContents, ui, cli); let pic = project.packageInfoCache; projectPackageInfo = pic.getEntry(projectPath); @@ -151,21 +151,12 @@ describe('models/package-info-cache/package-info-cache-test.js', function () { expect(packageAndErrorNames).to.deep.equal(devDependencyNames); }); - it('shows projectPackageInfo has 2 in-repo addons', function () { + it('shows projectPackageInfo has 1 in-repo addon named "ember-super-button"', function () { let inRepoAddons = projectPackageInfo.inRepoAddons; - expect(inRepoAddons).to.exist; - expect(inRepoAddons.length).to.equal(2); - + expect(inRepoAddons.length).to.equal(1); expect(inRepoAddons[0].realPath.indexOf(`simple${path.sep}lib${path.sep}ember-super-button`)).to.be.above(0); expect(inRepoAddons[0].pkg.name).to.equal('ember-super-button'); - - expect( - inRepoAddons[1].realPath.indexOf( - `simple${path.sep}lib${path.sep}ember-super-button${path.sep}lib${path.sep}ember-with-addon-main` - ) - ).to.be.above(0); - expect(inRepoAddons[1].pkg.name).to.equal('ember-with-addon-main'); }); it('shows projectPackageInfo has 7 internal addon packages', function () { @@ -181,60 +172,6 @@ describe('models/package-info-cache/package-info-cache-test.js', function () { expect(nodeModules.entries).to.exist; expect(Object.keys(nodeModules.entries).length).to.equal(9); }); - - it('returns stable package infos for a package info representing the same addon', function () { - project.initializeAddons(); - - const findAddonsByName = (projectOrAddon, addonToFind, _foundAddons = []) => { - if (!projectOrAddon) { - return _foundAddons; - } - - projectOrAddon.addons.forEach((addon) => { - if (addon.name === addonToFind) { - _foundAddons.push(addon); - } - - findAddonsByName(addon, addonToFind, _foundAddons); - }); - - return _foundAddons; - }; - - const findAllInRepoPackageInfosByPredicate = (packageInfo, predicate, _foundPackageInfos = []) => { - if (predicate(packageInfo)) { - _foundPackageInfos.push(packageInfo); - } - - (packageInfo.inRepoAddons || []).forEach((addonPackageInfo) => - findAllInRepoPackageInfosByPredicate(addonPackageInfo, predicate, _foundPackageInfos) - ); - - return _foundPackageInfos; - }; - - let allAddonsWithAddonMain = findAddonsByName(project, 'ember-with-addon-main'); - - let projectAddonWithMainPackageInfo = findAllInRepoPackageInfosByPredicate( - project._packageInfo, - (packageInfo) => - typeof packageInfo.addonMainPath === 'string' && - packageInfo.addonMainPath.endsWith(path.join('ember-with-addon-main', 'lib', 'main.js')) - ); - - let allPackageInfosForAddonWithMain = [ - ...allAddonsWithAddonMain.map((addon) => addon._packageInfo), - ...projectAddonWithMainPackageInfo, - ]; - - let areAllPackageInfosEqual = allPackageInfosForAddonWithMain.every( - (packageInfo) => packageInfo === allPackageInfosForAddonWithMain[0] - ); - - expect(allAddonsWithAddonMain.length).to.equal(2); - expect(allPackageInfosForAddonWithMain.length).to.equal(4); - expect(areAllPackageInfosEqual).to.equal(true); - }); }); describe('packageInfo', function () { diff --git a/tests/unit/models/project-test.js b/tests/unit/models/project-test.js index f03b754225..c24f0fbe44 100644 --- a/tests/unit/models/project-test.js +++ b/tests/unit/models/project-test.js @@ -347,7 +347,6 @@ describe('models/project.js', function () { 'ember-non-root-addon', 'ember-random-addon', 'ember-super-button', - 'ember-with-addon-main', ]; expect(Object.keys(project.addonPackages)).to.deep.equal(expected); }); From fddc9222069c912f3548dba55e72952ec6375b4d Mon Sep 17 00:00:00 2001 From: Logan Rosen Date: Tue, 4 May 2021 17:29:20 -0400 Subject: [PATCH 740/818] Update CONTRIBUTING.md to reference cli.emberjs.com It currently references ember-cli.com (and its archived source repo). I've updated it to reference cli.emberjs.com and its corresponding source repo. --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4f028ea4fa..3b5e31947e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -210,8 +210,8 @@ updating or writing new documentation: #### Website -The codebase for the website [ember-cli.com](https://ember-cli.com) is located -at: https://github.com/ember-cli/ember-cli.github.io +The codebase for the website [cli.emberjs.com](https://cli.emberjs.com) is located +at: https://github.com/ember-learn/cli-guides #### Code Words From 95c540a90adbe3b69d924761048baa9d54253bb2 Mon Sep 17 00:00:00 2001 From: Dave Combs Date: Mon, 10 May 2021 12:19:09 -0700 Subject: [PATCH 741/818] adding test support for per-bundle-addon-cache --- lib/models/per-bundle-addon-cache/index.js | 34 +-- lib/utilities/is-engine.js | 2 +- lib/utilities/is-lazy-engine.js | 4 +- tests/helpers/fixturify-project.js | 70 +++++- .../helpers/per-bundle-addon-cache-helpers.js | 166 ++++++++++++++ .../cache-bundle-hosts-test.js | 59 +++++ .../enable-cache-test.js | 57 +++++ .../per-bundle-addon-cache/proxy-test.js | 209 ++++++++++++++++++ tests/unit/utilities/is-engine-test.js | 19 ++ tests/unit/utilities/is-lazy-engine-test.js | 18 ++ 10 files changed, 607 insertions(+), 31 deletions(-) create mode 100644 tests/helpers/per-bundle-addon-cache-helpers.js create mode 100644 tests/unit/models/per-bundle-addon-cache/cache-bundle-hosts-test.js create mode 100644 tests/unit/models/per-bundle-addon-cache/enable-cache-test.js create mode 100644 tests/unit/models/per-bundle-addon-cache/proxy-test.js create mode 100644 tests/unit/utilities/is-engine-test.js create mode 100644 tests/unit/utilities/is-lazy-engine-test.js diff --git a/lib/models/per-bundle-addon-cache/index.js b/lib/models/per-bundle-addon-cache/index.js index 70f5df877f..8e481115a9 100644 --- a/lib/models/per-bundle-addon-cache/index.js +++ b/lib/models/per-bundle-addon-cache/index.js @@ -131,7 +131,7 @@ class PerBundleAddonCache { /** * Set up the cache of bundle host instances. Each entry is keyed by name (project is given - * empty string for a name, the lazy engines use their engineName, since those are unique) + * the name '__PROJECT__', the lazy engines use their engineName, since those are unique) * Each cache entry has the bundle host instance (Project or lazy engine) and the addon instance * cache for any addon instances to bundle with that bundle host. * @@ -205,6 +205,22 @@ class PerBundleAddonCache { return { [TARGET_INSTANCE]: addonInstance, realPath: addonRealPath }; } + /** + * For help with testing, given a bundleHostName and an addon name, return + * a list of the addon cache entries that have that addon name. + */ + findAddonCacheEntriesByName(bundleHostName, addonName) { + let bundleHostCacheEntry = this.bundleHostCache.get(bundleHostName); + if (!bundleHostCacheEntry) { + return null; + } + + let addonInstanceCache = bundleHostCacheEntry.addonInstanceCache; + let cacheEntries = Array.from(addonInstanceCache.values()); + let addonEntries = cacheEntries.filter((entry) => entry[TARGET_INSTANCE].name === addonName); + return addonEntries; + } + /** * Given a parent object of a potential addon (another addon or the project), * go up the 'parent' chain to find the potential addon's bundle host object @@ -377,22 +393,6 @@ class PerBundleAddonCache { return getAddonProxy(addonCacheEntry, parent); } } - - /** - * Called by engine-addon when it needs to retrieve the real child addons for a given - * object (i.e., during ancestorHostAddons), even though the object might be a proxy. - * - * @method getAddonAddons - * @param {Addon|Proxy} addonInstance an instance of an addon or a Proxy generated by this class - * @return {Array} an array of addon instances - */ - getAddonAddons(addonInstance) { - let result = - addonInstance[TARGET_INSTANCE] && addonInstance[TARGET_INSTANCE].addons - ? addonInstance[TARGET_INSTANCE].addons - : addonInstance.addons; - return result; - } } module.exports = PerBundleAddonCache; diff --git a/lib/utilities/is-engine.js b/lib/utilities/is-engine.js index 36192481f3..352f7ee5e1 100644 --- a/lib/utilities/is-engine.js +++ b/lib/utilities/is-engine.js @@ -1,5 +1,5 @@ 'use strict'; module.exports = function isEngine(keywords) { - return Array.isArray(keywords) && keywords.indexOf('ember-engine') >= 0; + return !!(Array.isArray(keywords) && keywords.indexOf('ember-engine') >= 0); }; diff --git a/lib/utilities/is-lazy-engine.js b/lib/utilities/is-lazy-engine.js index 7571808578..4b2be5e0af 100644 --- a/lib/utilities/is-lazy-engine.js +++ b/lib/utilities/is-lazy-engine.js @@ -15,12 +15,12 @@ module.exports = function isLazyEngine(addonCtorOrInstance) { if (addonCtorOrInstance.lazyLoading) { return addonCtorOrInstance.lazyLoading.enabled === true; } else if (addonCtorOrInstance.options) { - return addonCtorOrInstance.options.lazyLoading && addonCtorOrInstance.options.lazyLoading.enabled === true; + return !!(addonCtorOrInstance.options.lazyLoading && addonCtorOrInstance.options.lazyLoading.enabled === true); } else if (addonCtorOrInstance.prototype) { if (addonCtorOrInstance.prototype.lazyLoading) { return addonCtorOrInstance.prototype.lazyLoading.enabled === true; } else if (addonCtorOrInstance.prototype.options) { - return ( + return !!( addonCtorOrInstance.prototype.options.lazyLoading && addonCtorOrInstance.prototype.options.lazyLoading.enabled === true ); diff --git a/tests/helpers/fixturify-project.js b/tests/helpers/fixturify-project.js index e072f34b62..96bb4bd509 100644 --- a/tests/helpers/fixturify-project.js +++ b/tests/helpers/fixturify-project.js @@ -25,9 +25,11 @@ module.exports = class EmberCLIFixturifyProject extends FixturifyProject { super.writeSync(...arguments); this._hasWritten = true; } + addFiles(filesObj) { merge(this.files, filesObj); } + buildProjectModel(ProjectClass = ProjectWithoutInternalAddons) { if (!this._hasWritten) { this.writeSync(); @@ -43,7 +45,6 @@ module.exports = class EmberCLIFixturifyProject extends FixturifyProject { addAddon(name, version = '0.0.0', cb) { return this.addDependency(name, version, (addon) => { prepareAddon(addon); - if (typeof cb === 'function') { cb(addon); } @@ -59,21 +60,46 @@ module.exports = class EmberCLIFixturifyProject extends FixturifyProject { }); } + addEngine(name, version = '0.0.0', isLazy = true, cb) { + return this.addAddon(name, version, (addon) => { + addon.pkg.keywords.push('ember-engine'); + addon.files['index.js'] = ` +const { name } = require('./package.json'); + +module.exports = { + name, + moduleName: () => name, + lazyLoading: { + enabled: ${isLazy} + } +}; +`; + if (typeof cb === 'function') { + cb(addon); + } + }); + } + addInRepoAddon(name, version = '0.0.0', cb) { - const inRepoAddon = new FixturifyProject(name, version, (project) => { - project.pkg.keywords.push('ember-addon'); - project.pkg['ember-addon'] = {}; - project.files['index.js'] = 'module.exports = { name: require("./package").name };'; + const inRepoAddon = new EmberCLIFixturifyProject(name, version, (addon) => { + addon.pkg.keywords.push('ember-addon'); + addon.pkg['ember-addon'] = {}; + addon.files['index.js'] = 'module.exports = { name: require("./package").name };'; if (typeof cb === 'function') { - cb(project); + cb(addon); } }); - // configure the current project to have an ember-addon configured at the appropriate path + // configure the current project to have an ember-addon configured at the + // appropriate path, i.e. under a common root directory (lib). + const addonRootDir = 'lib'; + + // Add to ember-addon.paths list let addon = (this.pkg['ember-addon'] = this.pkg['ember-addon'] || {}); addon.paths = addon.paths || []; - const addonPath = `lib/${name}`; + + const addonPath = `${addonRootDir}/${name}`; if (addon.paths.find((path) => path.toLowerCase() === addonPath.toLowerCase())) { throw new Error(`project: ${this.name} already contains the in-repo-addon: ${name}`); @@ -81,9 +107,31 @@ module.exports = class EmberCLIFixturifyProject extends FixturifyProject { addon.paths.push(addonPath); - this.files.lib = this.files.lib || {}; + this.files[addonRootDir] = this.files[addonRootDir] || {}; + + let addonJSON = inRepoAddon.toJSON(); + Object.assign(this.files[addonRootDir], addonJSON); + } + + addInRepoEngine(name, version = '0.0.0', isLazy = true, cb) { + return this.addInRepoAddon(name, version, (addon) => { + addon.pkg.keywords.push('ember-engine'); + addon.files['index.js'] = ` +'use strict'; + +const { name } = require('./package.json'); - // insert inRepoAddon into files - Object.assign(this.files.lib, inRepoAddon.toJSON()); +module.exports = { + name, + moduleName: () => name, + lazyLoading: { + enabled: ${isLazy}, + }, +}; +`; + if (typeof cb === 'function') { + cb(addon); + } + }); } }; diff --git a/tests/helpers/per-bundle-addon-cache-helpers.js b/tests/helpers/per-bundle-addon-cache-helpers.js new file mode 100644 index 0000000000..68d450e581 --- /dev/null +++ b/tests/helpers/per-bundle-addon-cache-helpers.js @@ -0,0 +1,166 @@ +'use strict'; + +const FixturifyProject = require('./fixturify-project'); + +const { TARGET_INSTANCE } = require('../../lib/models/per-bundle-addon-cache/target-instance'); + +class AddonCounts { + _countAddons(addon) { + addon.addons.forEach((addon) => { + this.count.add(addon); + this.totalCount++; + if (addon[TARGET_INSTANCE]) { + this.proxyCount++; + } + + const addonName = addon.name || addon.constructor.name; + if (!this.byName[addonName]) { + this.byName[addonName] = new Set(); + } + this.byName[addonName].add(addon); + this._countAddons(addon); + }); + } + + constructor(projectOrAddon) { + this.root = projectOrAddon; + this.count = new Set(); + this.totalCount = 0; + this.proxyCount = 0; + this.byName = {}; + + this._countAddons(projectOrAddon); + } + + /** + * Return the total count of instances and proxies for a given addon name. + * @param {String} addonName + * @returns {Object} 2 fields: 'instances' and 'proxies'. + */ + countInstancesAndProxies(addonName) { + let instances = 0; + let proxies = 0; + this.byName[addonName].forEach((addon) => { + if (addon[TARGET_INSTANCE]) { + proxies++; + } else { + instances++; + } + }); + + return { instances, proxies }; + } +} + +/** + * Simple utilities to help test the PerBundleAddonCache feature. + */ +module.exports = { + /** + * Allow configuration of the main filename and the 'allowCachingPerBundle' setting in + * an addon fixture. + * + * @param {FixturifyProject} addon the addon to be configured + * @param {String} mainFileName the name of the main file, defaulting to 'index.js' + * @param {Boolean} allowCachingPerBundle whether the addon should allow caching per + * bundle, defaulting to false. + */ + configureAddonMainFileContents(addon, allowCachingPerBundle = false, mainFileName = 'index.js') { + addon.files[mainFileName] = ` +const { name } = require('./package.json'); + +module.exports = { + name, + allowCachingPerBundle: ${allowCachingPerBundle}, +}; + `; + }, + + /** + * Add a 'dependencies' entry to the toJSON() data for a FixturifyProject (or its + * internal descendants via a path, without adding a corresponding FixturifyProject + * to its node_modules. This will show up in package.json only. + * + * @param {Object} fixtureData the result of taking a FixturifyProject (the root + * one that will ultimately be written out and running toJSON() on it.) We pass it + * in because we want to allow multiple paths to be updated. + * @param {Array} path a string with slashes as separators, the path from the fixtureData root object + * to the object that's actually going to be modified. + * @param {String} the version + */ + addInheritedDependency(fixtureData, path, addonName) { + let pathSegments = path.split('/'); + + let node = fixtureData; + pathSegments.forEach((segment) => { + node = node[segment]; + }); + + let pkg = JSON.parse(node['package.json']); + pkg.dependencies[addonName] = '*'; + node['package.json'] = JSON.stringify(pkg, null, 2); + return fixtureData; + }, + + /** + * Generate the file structure used for the cache-bundle-hosts and enable-cache tests. + * Puts it into the usual temporary location defined by ECFP. + * + * In this fixture, all the addon definitions are to be held in PROJECT/lib, even + * though the project itself doesn't directly depend on a few of them. This is so + * it's easier to create a single reference to a particular addon path, to enable + * the proxy code to function. + */ + createStandardCacheFixture() { + let fp = new FixturifyProject('test-ember-project', '1.0.0', (project) => { + project.addInRepoAddon('test-addon-a', '1.0.0', (addonA) => { + this.configureAddonMainFileContents(addonA); + addonA.addInRepoAddon('test-addon-dep', '1.0.0', (addonDep) => { + this.configureAddonMainFileContents(addonDep); + }); + + // At this point, TAD has been run through toJSON inside of TAA. + // TAD itself has no issues. + // in TAA, we want to store all the inrepo addons, at any level, in + // PROJ/lib, so move TAD from TAA and change its path in TAA. + addonA.pkg['ember-addon'].paths = ['../test-addon-dep']; + project.files.lib = project.files.lib || {}; + project.files.lib['test-addon-dep'] = addonA.files.lib['test-addon-dep']; + delete addonA.files.lib; + }); + + project.addInRepoEngine('lazy-engine-a', '1.0.0', true, (lazyEngineA) => { + lazyEngineA.addInRepoAddon('test-engine-dep', '1.0.0', (engineDep) => { + this.configureAddonMainFileContents(engineDep); + }); + + // Similar to above + lazyEngineA.pkg['ember-addon'].paths = ['../test-engine-dep']; + project.files.lib['test-engine-dep'] = lazyEngineA.files.lib['test-engine-dep']; + delete lazyEngineA.files.lib; + }); + + project.addInRepoEngine('lazy-engine-b', '1.0.0', true, (lazyEngineB) => { + lazyEngineB.addInRepoAddon('test-engine-dep', '1.0.0'); + lazyEngineB.addInRepoAddon('test-addon-dep', '1.0.0'); + + // These two addon definitions have already been moved to project, so just + // fix the ember-addon.paths and remove the files.lib entry. + lazyEngineB.pkg['ember-addon'].paths = ['../test-engine-dep', '../test-addon-dep']; + delete lazyEngineB.files.lib; + }); + + project.addInRepoEngine('regular-engine-c', '1.0.0', false, (regularEngineC) => { + regularEngineC.addInRepoAddon('test-engine-dep', '1.0.0'); + + // Similar to above + regularEngineC.pkg['ember-addon'].paths = ['../test-engine-dep']; + delete regularEngineC.files.lib; + }); + }); + + return fp; + }, + + AddonCounts, +}; diff --git a/tests/unit/models/per-bundle-addon-cache/cache-bundle-hosts-test.js b/tests/unit/models/per-bundle-addon-cache/cache-bundle-hosts-test.js new file mode 100644 index 0000000000..184539f7e3 --- /dev/null +++ b/tests/unit/models/per-bundle-addon-cache/cache-bundle-hosts-test.js @@ -0,0 +1,59 @@ +'use strict'; + +/** + * Tests for checking that the list of 'bundle hosts' in the cache is correct. + * A 'bundle host' is either the project or a lazy engine. + */ +const path = require('path'); +const expect = require('chai').expect; + +const projectRootPath = path.resolve(__dirname, '../../../..'); +const Helpers = require(`${projectRootPath}/tests/helpers/per-bundle-addon-cache-helpers`); +const Project = require(`${projectRootPath}/lib/models/project`); + +const TARGET_INSTANCE = require(`${projectRootPath}/lib/models/per-bundle-addon-cache/target-instance`); + +describe('Unit | per-bundle-addon-cache bundle host', function () { + let project; + + before('setup fixture', function setup() { + let fixture = Helpers.createStandardCacheFixture(); + project = fixture.buildProjectModel(Project); + project.initializeAddons(); + }); + + it('Should have 4 inRepo addons in project', function () { + // project should contain 4 children, 3 of which are engines and 1 is a regular addon. + expect(project._packageInfo.inRepoAddons.length).to.equal(4); + }); + + it('project.perBundleAddonCache should exist', function () { + expect(project.perBundleAddonCache).to.exist; + }); + + it('Should have 3 bundle hosts (project, lazy-engine-a, lazy-engine-b)', function () { + const bundleHostCache = project.perBundleAddonCache.bundleHostCache; + + expect(bundleHostCache.size).to.equal(3); // project, lazy engine A, lazy engine B + + const keys = Array.from(bundleHostCache.keys()); + expect(keys.includes('__PROJECT__')).to.equal(true); + expect(keys.includes('lazy-engine-a')).to.equal(true); + expect(keys.includes('lazy-engine-b')).to.equal(true); + }); + + it('Should not have any addonInstanceCache entries', function () { + const bundleHostCache = project.perBundleAddonCache.bundleHostCache; + + // check the form of the cache entries - nobody is flagged as allowCachingPerBundle + // in this test. + const keys = Array.from(bundleHostCache.keys()); + + keys.forEach((key) => { + let value = bundleHostCache.get(key); + expect(value.addonInstanceCache && value.addonInstanceCache.size).to.equal(0); + expect(value.realPath).to.exist; + expect(value[TARGET_INSTANCE]).not.to.exist; + }); + }); +}); diff --git a/tests/unit/models/per-bundle-addon-cache/enable-cache-test.js b/tests/unit/models/per-bundle-addon-cache/enable-cache-test.js new file mode 100644 index 0000000000..170756253c --- /dev/null +++ b/tests/unit/models/per-bundle-addon-cache/enable-cache-test.js @@ -0,0 +1,57 @@ +'use strict'; + +/** + * Tests for enabling and disabling per-bundle-addon-cache support + */ +const path = require('path'); +const expect = require('chai').expect; + +const projectRootPath = path.resolve(__dirname, '../../../..'); +const Helpers = require(`${projectRootPath}/tests/helpers/per-bundle-addon-cache-helpers`); + +function enablePerBundleAddonCache(explicitValue) { + // default is opt-out + if (explicitValue !== null && explicitValue !== undefined) { + process.env.EMBER_CLI_ADDON_INSTANCE_CACHING = explicitValue; + } else { + delete process.env.EMBER_CLI_ADDON_INSTANCE_CACHING; + } +} + +function disablePerBundleAddonCache() { + process.env.EMBER_CLI_ADDON_INSTANCE_CACHING = false; +} + +function rerequire(modulePath) { + delete require.cache[require.resolve(modulePath)]; + return require(modulePath); +} + +// To test environment vars, we have to purge the require cache of 'Project' and 'PerBundleAddonCache' and rerequire it. +// For simplicity we'll do that here. +function createProject() { + rerequire(`${projectRootPath}/lib/models/per-bundle-addon-cache`); + const Project = rerequire(`${projectRootPath}/lib/models/project`); + + let fixture = Helpers.createStandardCacheFixture(); + let project = fixture.buildProjectModel(Project); + return project; +} + +describe('Unit | per-bundle-addon-cache enable caching', function () { + it('perBundleAddonCache should be set in Project if EMBER_CLI_ADDON_INSTANCE_CACHING is not false', function () { + enablePerBundleAddonCache('foo'); + let project = createProject(); + expect(project.perBundleAddonCache).to.exist; + + enablePerBundleAddonCache(); + project = createProject(); + expect(project.perBundleAddonCache).to.exist; + }); + + it('perBundleAddonCache should not be set in Project if EMBER_CLI_ADDON_INSTANCE_CACHING is false', function () { + disablePerBundleAddonCache(); + let project = createProject(); + expect(project.perBundleAddonCache).not.to.exist; + }); +}); diff --git a/tests/unit/models/per-bundle-addon-cache/proxy-test.js b/tests/unit/models/per-bundle-addon-cache/proxy-test.js new file mode 100644 index 0000000000..d00fbbcb1d --- /dev/null +++ b/tests/unit/models/per-bundle-addon-cache/proxy-test.js @@ -0,0 +1,209 @@ +'use strict'; + +/** + * Tests for the various proxies and instances once the project has initialized + * its addons + */ + +const path = require('path'); +const expect = require('chai').expect; + +const projectRootPath = path.resolve(__dirname, '../../../..'); +const FixturifyProject = require(`${projectRootPath}/tests/helpers/fixturify-project`); + +const Helpers = require(`${projectRootPath}/tests/helpers/per-bundle-addon-cache-helpers`); +const Project = require(`${projectRootPath}/lib/models/project`); + +// hack reference to 'fixturify' so we can do our own fiddling with the result of toJSON() to add +// a reference in the right place. +const fixturify = require('fixturify'); + +describe('Unit | per-bundle-addon-cache basic proxy checks', function () { + it(`no 'allowCachingPerBundle' set, no proxies, verify instance counts`, function () { + let fixture = Helpers.createStandardCacheFixture(); + let project = fixture.buildProjectModel(Project); + project.initializeAddons(); + + let counts = new Helpers.AddonCounts(project); + + expect(counts.proxyCount).to.equal(0); + expect(counts.byName['test-addon-a'].size).to.equal(1); + expect(counts.byName['test-addon-dep'].size).to.equal(2); + expect(counts.byName['test-engine-dep'].size).to.equal(3); + expect(counts.byName['lazy-engine-a'].size).to.equal(1); + expect(counts.byName['lazy-engine-b'].size).to.equal(1); + expect(counts.byName['regular-engine-c'].size).to.equal(1); + + // addon cache should also have 0 proxies. test-addon-b was the only addon marked as cacheable, + // so it will end up in the count of addon instances for the addon cache, but have no proxies. + expect(project.perBundleAddonCache.numProxies).to.equal(0); + }); + + it(`addon with allowCachingPerBundle, 1 instance, the rest proxies`, function () { + // PROJ to TAA, TAB, TAC and TAD. TAB, TAC and TAD have TAA underneath. + let fixture = new FixturifyProject('test-ember-project', '1.0.0', (project) => { + project.addAddon('test-addon-a', '1.0.0', (addonA) => { + Helpers.configureAddonMainFileContents(addonA, true); + }); + + project.addAddon('test-addon-b', '1.0.0', (addonB) => { + Helpers.configureAddonMainFileContents(addonB, false); + }); + + project.addAddon('test-addon-c', '1.0.0', (addonC) => { + Helpers.configureAddonMainFileContents(addonC, false); + }); + + project.addAddon('test-addon-d', '1.0.0', (addonD) => { + Helpers.configureAddonMainFileContents(addonD, false); + }); + }); + + // Add our inherited dependencies, build the model and verify the counts. + let fixtureData = fixture.toJSON(); + + Helpers.addInheritedDependency(fixtureData, 'test-ember-project/node_modules/test-addon-b', 'test-addon-a'); + Helpers.addInheritedDependency(fixtureData, 'test-ember-project/node_modules/test-addon-c', 'test-addon-a'); + Helpers.addInheritedDependency(fixtureData, 'test-ember-project/node_modules/test-addon-d', 'test-addon-a'); + + fixturify.writeSync(fixture.root, fixtureData); + fixture._hasWritten = true; // so buildProjectModel doesn't try again. + + let project = fixture.buildProjectModel(Project); + project.initializeAddons(); + + let counts = new Helpers.AddonCounts(project); + + expect(counts.proxyCount).to.equal(3); + expect(project.perBundleAddonCache.numProxies).to.equal(3); + expect(counts.byName['test-addon-a'].size).to.equal(4); + let addonACounts = counts.countInstancesAndProxies('test-addon-a'); + expect(addonACounts.instances).to.equal(1); + expect(addonACounts.proxies).to.equal(3); + + expect(counts.byName['test-addon-b'].size).to.equal(1); + expect(counts.byName['test-addon-c'].size).to.equal(1); + }); + + it(`addon with allowCachingPerBundle, 1 in lazy engine, one in regular`, function () { + // PROJ to LEA, REB, LEA and REB both depend on TAA + // Neither instance of test-addon-a is declared in the project, but the one in engine B + // will be 'owned' by Project as far as PerBundleAddonCache is concerned. + // Should end with 2 instances of test-addon-a, one in PROJECT, one in lazy-engine-a, + // and no proxies. + let fixture = new FixturifyProject('test-ember-project', '1.0.0', (project) => { + project.addEngine('lazy-engine-a', '1.0.0', true, (engine) => { + engine.addAddon('test-addon-a', '1.0.0', (addonA) => { + Helpers.configureAddonMainFileContents(addonA, true); + }); + }); + + project.addEngine('regular-engine-b', '1.0.0', false, (engine) => { + engine.addAddon('test-addon-a', '1.0.0', (addonA) => { + Helpers.configureAddonMainFileContents(addonA, true); + }); + }); + }); + + fixture.writeSync(); + + let project = fixture.buildProjectModel(Project); + project.initializeAddons(); + + let counts = new Helpers.AddonCounts(project); + + expect(counts.byName['lazy-engine-a'].size).to.equal(1); + expect(counts.byName['regular-engine-b'].size).to.equal(1); + + expect(counts.proxyCount).to.equal(0); + expect(project.perBundleAddonCache.numProxies).to.equal(0); + let addonACounts = counts.countInstancesAndProxies('test-addon-a'); + expect(addonACounts.instances).to.equal(2); + expect(addonACounts.proxies).to.equal(0); + let cacheEntries = project.perBundleAddonCache.findAddonCacheEntriesByName('lazy-engine-a', 'test-addon-a'); + expect(cacheEntries).to.exist; + expect(cacheEntries.length).to.equal(1); + cacheEntries = project.perBundleAddonCache.findAddonCacheEntriesByName('__PROJECT__', 'test-addon-a'); + expect(cacheEntries).to.exist; + expect(cacheEntries.length).to.equal(1); + }); + + it(`addon with allowCachingPerBundle, 1 in each of 2 lazy engines`, function () { + // Same as above, but regular-engine-b is now lazy-engine-b + // Should have 2 instances, 1 in LEA, 1 in LEB + let fixture = new FixturifyProject('test-ember-project', '1.0.0', (project) => { + project.addEngine('lazy-engine-a', '1.0.0', true, (engine) => { + engine.addAddon('test-addon-a', '1.0.0', (addonA) => { + Helpers.configureAddonMainFileContents(addonA, true); + }); + }); + + project.addEngine('lazy-engine-b', '1.0.0', true, (engine) => { + engine.addAddon('test-addon-a', '1.0.0', (addonA) => { + Helpers.configureAddonMainFileContents(addonA, true); + }); + }); + }); + + fixture.writeSync(); + + let project = fixture.buildProjectModel(Project); + project.initializeAddons(); + + let counts = new Helpers.AddonCounts(project); + + expect(counts.byName['lazy-engine-a'].size).to.equal(1); + expect(counts.byName['lazy-engine-b'].size).to.equal(1); + + expect(counts.proxyCount).to.equal(0); + expect(project.perBundleAddonCache.numProxies).to.equal(0); + let addonACounts = counts.countInstancesAndProxies('test-addon-a'); + expect(addonACounts.instances).to.equal(2); + expect(addonACounts.proxies).to.equal(0); + let cacheEntries = project.perBundleAddonCache.findAddonCacheEntriesByName('lazy-engine-a', 'test-addon-a'); + expect(cacheEntries).to.exist; + expect(cacheEntries.length).to.equal(1); + cacheEntries = project.perBundleAddonCache.findAddonCacheEntriesByName('lazy-engine-b', 'test-addon-a'); + expect(cacheEntries).to.exist; + expect(cacheEntries.length).to.equal(1); + }); + + /* + it(`addon with allowCachingPerBundle, 2 regular engines - cache entries in project`, function () { + // Same as above, now both are regular engines. + // Should have 1 instance, 1 proxy, both in project. + let fixture = new FixturifyProject('test-ember-project', '1.0.0', (project) => { + project.addEngine('regular-engine-a', '1.0.0', false, (engine) => { + engine.addAddon('test-addon-a', '1.0.0', (addonA) => { + Helpers.configureAddonMainFileContents(addonA, true); + }); + }); + + project.addEngine('regular-engine-b', '1.0.0', false, (engine) => { + engine.addAddon('test-addon-a', '1.0.0', (addonA) => { + Helpers.configureAddonMainFileContents(addonA, true); + }); + }); + }); + + fixture.writeSync(); + + let project = fixture.buildProjectModel(Project); + project.initializeAddons(); + + let counts = new Helpers.AddonCounts(project); + + expect(counts.byName['regular-engine-a'].size).to.equal(1); + expect(counts.byName['regular-engine-b'].size).to.equal(1); + + expect(counts.proxyCount).to.equal(1); + expect(project.perBundleAddonCache.numProxies).to.equal(1); + let addonACounts = counts.countInstancesAndProxies('test-addon-a'); + expect(addonACounts.instances).to.equal(1); + expect(addonACounts.proxies).to.equal(1); + let cacheEntries = project.perBundleAddonCache.findAddonCacheEntriesByName('__PROJECT__', 'test-addon-a'); + expect(cacheEntries).to.exist; + expect(cacheEntries.length).to.equal(1); + }); + */ +}); diff --git a/tests/unit/utilities/is-engine-test.js b/tests/unit/utilities/is-engine-test.js new file mode 100644 index 0000000000..b29e26aa75 --- /dev/null +++ b/tests/unit/utilities/is-engine-test.js @@ -0,0 +1,19 @@ +'use strict'; + +const expect = require('chai').expect; +const isEngine = require(`../../../lib/utilities/is-engine`); + +describe('Unit | is-engine', function () { + it('it identifies an engine correctly', function () { + expect(isEngine([null, 'ember-engine', 'foo', 'bar'])).to.equal(true); + expect(isEngine(['ember-engine'])).to.equal(true); + }); + + it("it returns false if it's not an engine", function () { + expect(isEngine({ 'ember-engine': true })).to.equal(false); + expect(isEngine('ember-engine')).to.equal(false); + expect(isEngine(['foo', 'bar'])).to.equal(false); + expect(isEngine({})).to.equal(false); + expect(isEngine(undefined)).to.equal(false); + }); +}); diff --git a/tests/unit/utilities/is-lazy-engine-test.js b/tests/unit/utilities/is-lazy-engine-test.js new file mode 100644 index 0000000000..3a14c1bdc4 --- /dev/null +++ b/tests/unit/utilities/is-lazy-engine-test.js @@ -0,0 +1,18 @@ +'use strict'; + +const expect = require('chai').expect; +const isLazyEngine = require(`../../../lib/utilities/is-lazy-engine`); + +describe('Unit | is-lazy-engine', function () { + it('it identifies a lazy engine correctly', function () { + expect(isLazyEngine({ options: { lazyLoading: { enabled: true } } })).to.equal(true); + }); + + it("it returns false if it's not a lazy engine", function () { + expect(isLazyEngine({ options: { lazyLoading: { enabled: false } } })).to.equal(false); + expect(isLazyEngine({ options: { lazyLoading: {} } })).to.equal(false); + expect(isLazyEngine({ options: {} })).equal(false); + expect(isLazyEngine({})).to.equal(false); + expect(isLazyEngine()).to.equal(false); + }); +}); From 0a7c5521563386aa8deecd89b169d64342e9339d Mon Sep 17 00:00:00 2001 From: Dave Combs Date: Mon, 10 May 2021 12:19:09 -0700 Subject: [PATCH 742/818] refactor + add tests --- tests/helpers/fixturify-project.js | 221 ++++++--- .../helpers/per-bundle-addon-cache-helpers.js | 301 ++++++------ .../cache-bundle-hosts-test.js | 25 +- .../enable-cache-test.js | 9 +- .../per-bundle-addon-cache/proxy-test.js | 464 ++++++++++++------ 5 files changed, 642 insertions(+), 378 deletions(-) diff --git a/tests/helpers/fixturify-project.js b/tests/helpers/fixturify-project.js index 96bb4bd509..26f554237c 100644 --- a/tests/helpers/fixturify-project.js +++ b/tests/helpers/fixturify-project.js @@ -1,6 +1,7 @@ 'use strict'; const path = require('path'); +const fs = require('fs-extra'); const merge = require('ember-cli-lodash-subset').merge; const FixturifyProject = require('fixturify-project'); const Project = require('../../lib/models/project'); @@ -14,15 +15,70 @@ class ProjectWithoutInternalAddons extends Project { } } -function prepareAddon(addon) { +function prepareAddon(addon, options) { addon.pkg.keywords.push('ember-addon'); addon.pkg['ember-addon'] = {}; - addon.files['index.js'] = 'module.exports = { name: require("./package").name };'; + addon.files['index.js'] = `module.exports = { + name: require("./package").name, + allowCachingPerBundle: ${Boolean(options.allowCachingPerBundle)}, + ${options.additionalContent || ''} + };`; +} + +/** + * Gets a normalized object with provided defaults. If the 2nd argument is a function, + * we add this to the returned object with `callback` as its key. + * + * @name getOptionsObjectWithCallbackFunction + * @param {Object} defaultOptions The default options + * @param {Object|Function} optionsOrCallback The options object or callback function + * @returns {Object} The normalized options object + */ +function getOptionsObjectWithCallbackFunction(defaultOptions, optionsOrCallback) { + return Object.assign( + {}, + defaultOptions, + typeof optionsOrCallback === 'function' ? { callback: optionsOrCallback } : optionsOrCallback + ); } module.exports = class EmberCLIFixturifyProject extends FixturifyProject { + // we can't do this in the constructor since we need access to this as part of + // `super`; we create the `Set` as necessary upon first access, and subsequently + // we just return the previously created `Set` + get _inRepoAddonsWithSharedDependencies() { + if (!this.__inRepoAddonsWithSharedDependencies) { + this.__inRepoAddonsWithSharedDependencies = new Set(); + } + + return this.__inRepoAddonsWithSharedDependencies; + } + + // same reason as above, we can't do this in the constructor since we need access + // to this as part of `super` + get _addonsWithSharedDependencies() { + if (!this.__addonsWithSharedDependencies) { + this.__addonsWithSharedDependencies = new Set(); + } + + return this.__addonsWithSharedDependencies; + } + writeSync() { super.writeSync(...arguments); + + // remove in-repo addons `node_modules` that should be hoisted + for (const name of this._inRepoAddonsWithSharedDependencies) { + const pathToAddonNodeModules = path.join(this.baseDir, 'lib', name, 'node_modules'); + fs.removeSync(pathToAddonNodeModules); + } + + // remove addons in `node_modules` that should be hoisted + for (const name of this._addonsWithSharedDependencies) { + const pathToAddonNodeModules = path.join(this.baseDir, 'node_modules', name, 'node_modules'); + fs.removeSync(pathToAddonNodeModules); + } + this._hasWritten = true; } @@ -42,52 +98,102 @@ module.exports = class EmberCLIFixturifyProject extends FixturifyProject { return new ProjectClass(root, pkg, cli.ui, cli); } - addAddon(name, version = '0.0.0', cb) { - return this.addDependency(name, version, (addon) => { - prepareAddon(addon); - if (typeof cb === 'function') { - cb(addon); - } - }); + addDependency(name, version, optionsOrCallback) { + const options = getOptionsObjectWithCallbackFunction({ shouldShareDependencies: false }, optionsOrCallback); + + // if we should share dependencies (i.e., if these dependencies are hoisted) + if (options.shouldShareDependencies) { + this._addonsWithSharedDependencies.add(name); + } + + return super.addDependency(name, version, options.callback); } - addDevAddon(name, version = '0.0.0', cb) { - return this.addDevDependency(name, version, (addon) => { - prepareAddon(addon); - if (typeof cb === 'function') { - cb(addon); - } + addDevDependency(name, version, optionsOrCallback) { + const options = getOptionsObjectWithCallbackFunction({ shouldShareDependencies: false }, optionsOrCallback); + + // if we should share dependencies (i.e., if these dependencies are hoisted) + if (options.shouldShareDependencies) { + this._addonsWithSharedDependencies.add(name); + } + + return super.addDevDependency(name, version, options.callback); + } + + addAddon(name, version = '0.0.0', optionsOrCallback) { + const options = getOptionsObjectWithCallbackFunction({ allowCachingPerBundle: false }, optionsOrCallback); + + return this.addDependency(name, version, { + ...options, + callback: (addon) => { + prepareAddon(addon, options); + + // call original `options.callback` if it exists + if (typeof options.callback === 'function') { + options.callback(addon); + } + }, }); } - addEngine(name, version = '0.0.0', isLazy = true, cb) { - return this.addAddon(name, version, (addon) => { - addon.pkg.keywords.push('ember-engine'); - addon.files['index.js'] = ` -const { name } = require('./package.json'); - -module.exports = { - name, - moduleName: () => name, - lazyLoading: { - enabled: ${isLazy} + addDevAddon(name, version = '0.0.0', optionsOrCallback) { + const options = getOptionsObjectWithCallbackFunction({ allowCachingPerBundle: false }, optionsOrCallback); + + return this.addDevDependency(name, version, { + ...options, + callback: (addon) => { + prepareAddon(addon, options); + + // call original `options.callback` if it exists + if (typeof options.callback === 'function') { + options.callback(addon); + } + }, + }); } -}; -`; - if (typeof cb === 'function') { - cb(addon); + + addEngine( + name, + version = '0.0.0', + options = { allowCachingPerBundle: false, shouldShareDependencies: false, enableLazyLoading: false } + ) { + const callback = (engine) => { + engine.pkg.keywords.push('ember-engine'); + + // call original callback if it exists + if (typeof options.callback === 'function') { + options.callback(engine); } - }); + }; + + if (options.enableLazyLoading) { + return this.addAddon(name, version, { + ...options, + additionalContent: 'lazyLoading: { enabled: true },', + callback, + }); + } + + return this.addAddon(name, version, { ...options, callback }); } - addInRepoAddon(name, version = '0.0.0', cb) { + addInRepoAddon(name, version = '0.0.0', optionsOrCallback) { + const options = getOptionsObjectWithCallbackFunction( + { allowCachingPerBundle: false, shouldShareDependencies: true }, + optionsOrCallback + ); + + // if we should share dependencies (in-repo addons (in general) do not have a local `node_modules`) + // this defaults to `true` for in-repo addons/engines + if (options.shouldShareDependencies) { + this._inRepoAddonsWithSharedDependencies.add(name); + } + const inRepoAddon = new EmberCLIFixturifyProject(name, version, (addon) => { - addon.pkg.keywords.push('ember-addon'); - addon.pkg['ember-addon'] = {}; - addon.files['index.js'] = 'module.exports = { name: require("./package").name };'; + prepareAddon(addon, options); - if (typeof cb === 'function') { - cb(addon); + if (typeof options.callback === 'function') { + options.callback(addon); } }); @@ -113,25 +219,28 @@ module.exports = { Object.assign(this.files[addonRootDir], addonJSON); } - addInRepoEngine(name, version = '0.0.0', isLazy = true, cb) { - return this.addInRepoAddon(name, version, (addon) => { - addon.pkg.keywords.push('ember-engine'); - addon.files['index.js'] = ` -'use strict'; - -const { name } = require('./package.json'); - -module.exports = { - name, - moduleName: () => name, - lazyLoading: { - enabled: ${isLazy}, - }, -}; -`; - if (typeof cb === 'function') { - cb(addon); + addInRepoEngine( + name, + version = '0.0.0', + options = { allowCachingPerBundle: false, shouldShareDependencies: true, enableLazyLoading: false } + ) { + const callback = (engine) => { + engine.pkg.keywords.push('ember-engine'); + + // call original callback if it exists + if (typeof options.callback === 'function') { + options.callback(engine); } - }); + }; + + if (options.enableLazyLoading) { + return this.addInRepoAddon(name, version, { + ...options, + additionalContent: 'lazyLoading: { enabled: true },', + callback, + }); + } + + return this.addInRepoAddon(name, version, { ...options, callback }); } }; diff --git a/tests/helpers/per-bundle-addon-cache-helpers.js b/tests/helpers/per-bundle-addon-cache-helpers.js index 68d450e581..c23163d785 100644 --- a/tests/helpers/per-bundle-addon-cache-helpers.js +++ b/tests/helpers/per-bundle-addon-cache-helpers.js @@ -1,166 +1,173 @@ 'use strict'; const FixturifyProject = require('./fixturify-project'); - const { TARGET_INSTANCE } = require('../../lib/models/per-bundle-addon-cache/target-instance'); +const isLazyEngine = require('../../lib/utilities/is-lazy-engine'); -class AddonCounts { - _countAddons(addon) { - addon.addons.forEach((addon) => { - this.count.add(addon); - this.totalCount++; - if (addon[TARGET_INSTANCE]) { - this.proxyCount++; - } - - const addonName = addon.name || addon.constructor.name; - if (!this.byName[addonName]) { - this.byName[addonName] = new Set(); - } - this.byName[addonName].add(addon); - this._countAddons(addon); - }); +/** + * This collects all addons by name within a given host; it stops traversing when it + * encounters another host (i.e., a lazy engine). Within a given host we should expect + * at most 1 real addon, otherwise this is an error condition. We otherwise add all + * proxies to `config.proxies` + * + * @name getAllAddonsByNameWithinHost + * @param {Project|Addon} projectOrAddon + * @param {string} addonName + * @param {Object} [config] + * @returns {{proxies: Proxy[], realAddon: Addon}} + */ +function getAllAddonsByNameWithinHost(projectOrAddon, addonName, config = { proxies: [] }) { + if (!config.originalHost) { + config.originalHost = projectOrAddon; } - constructor(projectOrAddon) { - this.root = projectOrAddon; - this.count = new Set(); - this.totalCount = 0; - this.proxyCount = 0; - this.byName = {}; - - this._countAddons(projectOrAddon); - } + projectOrAddon.addons.forEach((addon) => { + // stop traversing within another host + if (isLazyEngine(addon)) { + return; + } + + if (addon.name === addonName) { + if (config.realAddon && !addon[TARGET_INSTANCE]) { + throw new Error( + `The real addon (\`${addon.name}\`) has already been set for a given host (\`${ + typeof config.originalHost.name === 'function' ? config.originalHost.name() : config.originalHost.name + }\`); the proxy for addon caching is not working correctly` + ); + } - /** - * Return the total count of instances and proxies for a given addon name. - * @param {String} addonName - * @returns {Object} 2 fields: 'instances' and 'proxies'. - */ - countInstancesAndProxies(addonName) { - let instances = 0; - let proxies = 0; - this.byName[addonName].forEach((addon) => { if (addon[TARGET_INSTANCE]) { - proxies++; + config.proxies.push(addon); } else { - instances++; + config.realAddon = addon; } - }); + } else { + getAllAddonsByNameWithinHost(addon, addonName, config); + } + }); - return { instances, proxies }; - } + return config; } /** - * Simple utilities to help test the PerBundleAddonCache feature. + * Returns whether all instances within a given host are equal (i.e., that there's a single + * "real addon") and all proxies have the `TARGET_INSTANCE` property that's strictly equal to + * the aforementioned real addon + * + * @name areAllInstancesEqualWithinHost + * @param {Project|Addon} projectOrAddon + * @param {string} addonName + * @returns {boolean} */ -module.exports = { - /** - * Allow configuration of the main filename and the 'allowCachingPerBundle' setting in - * an addon fixture. - * - * @param {FixturifyProject} addon the addon to be configured - * @param {String} mainFileName the name of the main file, defaulting to 'index.js' - * @param {Boolean} allowCachingPerBundle whether the addon should allow caching per - * bundle, defaulting to false. - */ - configureAddonMainFileContents(addon, allowCachingPerBundle = false, mainFileName = 'index.js') { - addon.files[mainFileName] = ` -const { name } = require('./package.json'); +function areAllInstancesEqualWithinHost(projectOrAddon, addonName) { + const { realAddon, proxies } = getAllAddonsByNameWithinHost(projectOrAddon, addonName); + return proxies.length > 0 && proxies.every((proxy) => proxy[TARGET_INSTANCE] === realAddon); +} +/** + * For a given project/addon, this counts addon instances within said project/addon; + * specifically we're interested in the number of "real" addon instances, and proxy + * objects. + * + * @name countAddons + * @param {Project|Addon} projectOrAddon + * @param {Object} [config] + * @returns {{byName: Object, proxyCount: number, realAddonInstanceCount: number}} + */ +function countAddons(projectOrAddon, config = { byName: {}, proxyCount: 0, realAddonInstanceCount: 0 }) { + projectOrAddon.addons.forEach((addon) => { + const addonName = addon.name; + + if (!config.byName[addonName]) { + config.byName[addonName] = { + addons: [], + proxyCount: 0, + realAddonInstanceCount: 0, + }; + } + + if (addon[TARGET_INSTANCE]) { + config.proxyCount++; + config.byName[addonName].proxyCount++; + } else { + config.realAddonInstanceCount++; + config.byName[addonName].realAddonInstanceCount++; + } + + config.byName[addonName].addons.push(addon); + countAddons(addon, config); + }); + + return config; +} + +/** + * Generate the file structure used for the cache-bundle-hosts and enable-cache tests. + * Puts it into the usual temporary location defined by ECFP. + * + * In this fixture, all the addon definitions are to be held in PROJECT/lib, even + * though the project itself doesn't directly depend on a few of them. This is so + * it's easier to create a single reference to a particular addon path, to enable + * the proxy code to function. + * + * @name createStandardCacheFixture + */ +function createStandardCacheFixture() { + let project = new FixturifyProject('test-ember-project', '1.0.0'); + + project.addInRepoAddon('test-addon-a', '1.0.0', { + callback: (addonA) => { + addonA.addInRepoAddon('test-addon-dep', '1.0.0'); + + // At this point, TAD has been run through toJSON inside of TAA. + // TAD itself has no issues. + // in TAA, we want to store all the inrepo addons, at any level, in + // PROJ/lib, so move TAD from TAA and change its path in TAA. + addonA.pkg['ember-addon'].paths = ['../test-addon-dep']; + project.files.lib = project.files.lib || {}; + project.files.lib['test-addon-dep'] = addonA.files.lib['test-addon-dep']; + delete addonA.files.lib; + }, + }); + + project.addInRepoEngine('lazy-engine-a', '1.0.0', { + enableLazyLoading: true, + callback: (lazyEngineA) => { + lazyEngineA.addInRepoAddon('test-engine-dep', '1.0.0'); + + // Similar to above + lazyEngineA.pkg['ember-addon'].paths = ['../test-engine-dep']; + project.files.lib['test-engine-dep'] = lazyEngineA.files.lib['test-engine-dep']; + delete lazyEngineA.files.lib; + }, + }); + + project.addInRepoEngine('lazy-engine-b', '1.0.0', { + enableLazyLoading: true, + callback: (lazyEngineB) => { + // These two addon definitions have already been moved to project, so just + // fix the ember-addon.paths and remove the files.lib entry. + lazyEngineB.pkg['ember-addon'].paths = ['../test-engine-dep', '../test-addon-dep']; + delete lazyEngineB.files.lib; + }, + }); + + project.addInRepoEngine('regular-engine-c', '1.0.0', { + callback: (regularEngineC) => { + regularEngineC.pkg['ember-addon'].paths = ['../test-engine-dep']; + delete regularEngineC.files.lib; + }, + }); + + return project; +} + +/** + * Simple utilities to help test the PerBundleAddonCache feature. + */ module.exports = { - name, - allowCachingPerBundle: ${allowCachingPerBundle}, -}; - `; - }, - - /** - * Add a 'dependencies' entry to the toJSON() data for a FixturifyProject (or its - * internal descendants via a path, without adding a corresponding FixturifyProject - * to its node_modules. This will show up in package.json only. - * - * @param {Object} fixtureData the result of taking a FixturifyProject (the root - * one that will ultimately be written out and running toJSON() on it.) We pass it - * in because we want to allow multiple paths to be updated. - * @param {Array} path a string with slashes as separators, the path from the fixtureData root object - * to the object that's actually going to be modified. - * @param {String} the version - */ - addInheritedDependency(fixtureData, path, addonName) { - let pathSegments = path.split('/'); - - let node = fixtureData; - pathSegments.forEach((segment) => { - node = node[segment]; - }); - - let pkg = JSON.parse(node['package.json']); - pkg.dependencies[addonName] = '*'; - node['package.json'] = JSON.stringify(pkg, null, 2); - return fixtureData; - }, - - /** - * Generate the file structure used for the cache-bundle-hosts and enable-cache tests. - * Puts it into the usual temporary location defined by ECFP. - * - * In this fixture, all the addon definitions are to be held in PROJECT/lib, even - * though the project itself doesn't directly depend on a few of them. This is so - * it's easier to create a single reference to a particular addon path, to enable - * the proxy code to function. - */ - createStandardCacheFixture() { - let fp = new FixturifyProject('test-ember-project', '1.0.0', (project) => { - project.addInRepoAddon('test-addon-a', '1.0.0', (addonA) => { - this.configureAddonMainFileContents(addonA); - addonA.addInRepoAddon('test-addon-dep', '1.0.0', (addonDep) => { - this.configureAddonMainFileContents(addonDep); - }); - - // At this point, TAD has been run through toJSON inside of TAA. - // TAD itself has no issues. - // in TAA, we want to store all the inrepo addons, at any level, in - // PROJ/lib, so move TAD from TAA and change its path in TAA. - addonA.pkg['ember-addon'].paths = ['../test-addon-dep']; - project.files.lib = project.files.lib || {}; - project.files.lib['test-addon-dep'] = addonA.files.lib['test-addon-dep']; - delete addonA.files.lib; - }); - - project.addInRepoEngine('lazy-engine-a', '1.0.0', true, (lazyEngineA) => { - lazyEngineA.addInRepoAddon('test-engine-dep', '1.0.0', (engineDep) => { - this.configureAddonMainFileContents(engineDep); - }); - - // Similar to above - lazyEngineA.pkg['ember-addon'].paths = ['../test-engine-dep']; - project.files.lib['test-engine-dep'] = lazyEngineA.files.lib['test-engine-dep']; - delete lazyEngineA.files.lib; - }); - - project.addInRepoEngine('lazy-engine-b', '1.0.0', true, (lazyEngineB) => { - lazyEngineB.addInRepoAddon('test-engine-dep', '1.0.0'); - lazyEngineB.addInRepoAddon('test-addon-dep', '1.0.0'); - - // These two addon definitions have already been moved to project, so just - // fix the ember-addon.paths and remove the files.lib entry. - lazyEngineB.pkg['ember-addon'].paths = ['../test-engine-dep', '../test-addon-dep']; - delete lazyEngineB.files.lib; - }); - - project.addInRepoEngine('regular-engine-c', '1.0.0', false, (regularEngineC) => { - regularEngineC.addInRepoAddon('test-engine-dep', '1.0.0'); - - // Similar to above - regularEngineC.pkg['ember-addon'].paths = ['../test-engine-dep']; - delete regularEngineC.files.lib; - }); - }); - - return fp; - }, - - AddonCounts, + createStandardCacheFixture, + getAllAddonsByNameWithinHost, + areAllInstancesEqualWithinHost, + countAddons, }; diff --git a/tests/unit/models/per-bundle-addon-cache/cache-bundle-hosts-test.js b/tests/unit/models/per-bundle-addon-cache/cache-bundle-hosts-test.js index 184539f7e3..a16171c05b 100644 --- a/tests/unit/models/per-bundle-addon-cache/cache-bundle-hosts-test.js +++ b/tests/unit/models/per-bundle-addon-cache/cache-bundle-hosts-test.js @@ -4,14 +4,9 @@ * Tests for checking that the list of 'bundle hosts' in the cache is correct. * A 'bundle host' is either the project or a lazy engine. */ -const path = require('path'); const expect = require('chai').expect; - -const projectRootPath = path.resolve(__dirname, '../../../..'); -const Helpers = require(`${projectRootPath}/tests/helpers/per-bundle-addon-cache-helpers`); -const Project = require(`${projectRootPath}/lib/models/project`); - -const TARGET_INSTANCE = require(`${projectRootPath}/lib/models/per-bundle-addon-cache/target-instance`); +const Helpers = require('../../../../tests/helpers/per-bundle-addon-cache-helpers'); +const Project = require('../../../../lib/models/project'); describe('Unit | per-bundle-addon-cache bundle host', function () { let project; @@ -36,24 +31,18 @@ describe('Unit | per-bundle-addon-cache bundle host', function () { expect(bundleHostCache.size).to.equal(3); // project, lazy engine A, lazy engine B - const keys = Array.from(bundleHostCache.keys()); - expect(keys.includes('__PROJECT__')).to.equal(true); - expect(keys.includes('lazy-engine-a')).to.equal(true); - expect(keys.includes('lazy-engine-b')).to.equal(true); + expect(bundleHostCache.has('__PROJECT__')).to.equal(true); + expect(bundleHostCache.has('lazy-engine-a')).to.equal(true); + expect(bundleHostCache.has('lazy-engine-b')).to.equal(true); }); it('Should not have any addonInstanceCache entries', function () { const bundleHostCache = project.perBundleAddonCache.bundleHostCache; - // check the form of the cache entries - nobody is flagged as allowCachingPerBundle - // in this test. - const keys = Array.from(bundleHostCache.keys()); - - keys.forEach((key) => { + for (const [key] of bundleHostCache) { let value = bundleHostCache.get(key); expect(value.addonInstanceCache && value.addonInstanceCache.size).to.equal(0); expect(value.realPath).to.exist; - expect(value[TARGET_INSTANCE]).not.to.exist; - }); + } }); }); diff --git a/tests/unit/models/per-bundle-addon-cache/enable-cache-test.js b/tests/unit/models/per-bundle-addon-cache/enable-cache-test.js index 170756253c..1cf2c1b736 100644 --- a/tests/unit/models/per-bundle-addon-cache/enable-cache-test.js +++ b/tests/unit/models/per-bundle-addon-cache/enable-cache-test.js @@ -3,11 +3,8 @@ /** * Tests for enabling and disabling per-bundle-addon-cache support */ -const path = require('path'); const expect = require('chai').expect; - -const projectRootPath = path.resolve(__dirname, '../../../..'); -const Helpers = require(`${projectRootPath}/tests/helpers/per-bundle-addon-cache-helpers`); +const Helpers = require('../../../../tests/helpers/per-bundle-addon-cache-helpers'); function enablePerBundleAddonCache(explicitValue) { // default is opt-out @@ -30,8 +27,8 @@ function rerequire(modulePath) { // To test environment vars, we have to purge the require cache of 'Project' and 'PerBundleAddonCache' and rerequire it. // For simplicity we'll do that here. function createProject() { - rerequire(`${projectRootPath}/lib/models/per-bundle-addon-cache`); - const Project = rerequire(`${projectRootPath}/lib/models/project`); + rerequire('../../../../lib/models/per-bundle-addon-cache'); + const Project = rerequire('../../../../lib/models/project'); let fixture = Helpers.createStandardCacheFixture(); let project = fixture.buildProjectModel(Project); diff --git a/tests/unit/models/per-bundle-addon-cache/proxy-test.js b/tests/unit/models/per-bundle-addon-cache/proxy-test.js index d00fbbcb1d..51b96e05f5 100644 --- a/tests/unit/models/per-bundle-addon-cache/proxy-test.js +++ b/tests/unit/models/per-bundle-addon-cache/proxy-test.js @@ -4,206 +4,368 @@ * Tests for the various proxies and instances once the project has initialized * its addons */ - -const path = require('path'); const expect = require('chai').expect; +const FixturifyProject = require('../../../../tests/helpers/fixturify-project'); -const projectRootPath = path.resolve(__dirname, '../../../..'); -const FixturifyProject = require(`${projectRootPath}/tests/helpers/fixturify-project`); +const { + createStandardCacheFixture, + getAllAddonsByNameWithinHost, + areAllInstancesEqualWithinHost, + countAddons, +} = require('../../../../tests/helpers/per-bundle-addon-cache-helpers'); -const Helpers = require(`${projectRootPath}/tests/helpers/per-bundle-addon-cache-helpers`); -const Project = require(`${projectRootPath}/lib/models/project`); +const Project = require('../../../../lib/models/project'); +const { TARGET_INSTANCE } = require('../../../../lib/models/per-bundle-addon-cache/target-instance'); -// hack reference to 'fixturify' so we can do our own fiddling with the result of toJSON() to add -// a reference in the right place. -const fixturify = require('fixturify'); +describe('models/per-bundle-addon-cache', function () { + let fixturifyProject; -describe('Unit | per-bundle-addon-cache basic proxy checks', function () { - it(`no 'allowCachingPerBundle' set, no proxies, verify instance counts`, function () { - let fixture = Helpers.createStandardCacheFixture(); - let project = fixture.buildProjectModel(Project); - project.initializeAddons(); + beforeEach(function () { + fixturifyProject = new FixturifyProject('awesome-proj', '1.0.0'); + fixturifyProject.addDevDependency('ember-cli', '*'); + }); + + afterEach(function () { + fixturifyProject.dispose(); + }); - let counts = new Helpers.AddonCounts(project); + it('simple case: bundle addon caching within a single project host', function () { + fixturifyProject.addInRepoAddon('foo', '1.0.0', { allowCachingPerBundle: true }); + fixturifyProject.addInRepoAddon('foo-bar', '1.0.0', { + callback: (inRepoAddon) => { + inRepoAddon.pkg['ember-addon'].paths = ['../foo']; + }, + }); + + fixturifyProject.writeSync(); + let project = fixturifyProject.buildProjectModel(); - expect(counts.proxyCount).to.equal(0); - expect(counts.byName['test-addon-a'].size).to.equal(1); - expect(counts.byName['test-addon-dep'].size).to.equal(2); - expect(counts.byName['test-engine-dep'].size).to.equal(3); - expect(counts.byName['lazy-engine-a'].size).to.equal(1); - expect(counts.byName['lazy-engine-b'].size).to.equal(1); - expect(counts.byName['regular-engine-c'].size).to.equal(1); + project.initializeAddons(); - // addon cache should also have 0 proxies. test-addon-b was the only addon marked as cacheable, - // so it will end up in the count of addon instances for the addon cache, but have no proxies. - expect(project.perBundleAddonCache.numProxies).to.equal(0); + expect(areAllInstancesEqualWithinHost(project, 'foo')).to.be.true; }); - it(`addon with allowCachingPerBundle, 1 instance, the rest proxies`, function () { - // PROJ to TAA, TAB, TAC and TAD. TAB, TAC and TAD have TAA underneath. - let fixture = new FixturifyProject('test-ember-project', '1.0.0', (project) => { - project.addAddon('test-addon-a', '1.0.0', (addonA) => { - Helpers.configureAddonMainFileContents(addonA, true); - }); + it('it should create multiple proxies within a project host', function () { + fixturifyProject.addInRepoAddon('foo', '1.0.0', { allowCachingPerBundle: true }); - project.addAddon('test-addon-b', '1.0.0', (addonB) => { - Helpers.configureAddonMainFileContents(addonB, false); + for (let i = 0; i < 10; i++) { + fixturifyProject.addInRepoAddon(`foo-bar-${i}`, '1.0.0', { + callback: (inRepoAddon) => { + inRepoAddon.pkg['ember-addon'].paths = ['../foo']; + }, }); + } - project.addAddon('test-addon-c', '1.0.0', (addonC) => { - Helpers.configureAddonMainFileContents(addonC, false); - }); + fixturifyProject.writeSync(); + let project = fixturifyProject.buildProjectModel(); - project.addAddon('test-addon-d', '1.0.0', (addonD) => { - Helpers.configureAddonMainFileContents(addonD, false); + project.initializeAddons(); + + expect(areAllInstancesEqualWithinHost(project, 'foo')).to.be.true; + }); + + it('it should create a proxy for a regular addon when added as a dependency to a regular addon', function () { + fixturifyProject.addAddon('foo', '1.0.0', { allowCachingPerBundle: true }); + + for (let i = 0; i < 10; i++) { + fixturifyProject.addAddon(`foo-bar-${i}`, '1.0.0', { + shouldShareDependencies: true, + callback: (inRepoAddon) => { + inRepoAddon.addDependency('foo', '1.0.0'); + }, }); - }); + } + + fixturifyProject.writeSync(); + let project = fixturifyProject.buildProjectModel(); + + project.initializeAddons(); - // Add our inherited dependencies, build the model and verify the counts. - let fixtureData = fixture.toJSON(); + expect(areAllInstancesEqualWithinHost(project, 'foo')).to.be.true; + }); + + it('it should create a proxy for a regular addon when added as a dependency to an in-repo addon', function () { + fixturifyProject.addAddon('foo', '1.0.0', { allowCachingPerBundle: true }); - Helpers.addInheritedDependency(fixtureData, 'test-ember-project/node_modules/test-addon-b', 'test-addon-a'); - Helpers.addInheritedDependency(fixtureData, 'test-ember-project/node_modules/test-addon-c', 'test-addon-a'); - Helpers.addInheritedDependency(fixtureData, 'test-ember-project/node_modules/test-addon-d', 'test-addon-a'); + for (let i = 0; i < 10; i++) { + fixturifyProject.addAddon(`foo-bar-${i}`, '1.0.0', { + shouldShareDependencies: true, + callback: (inRepoAddon) => { + inRepoAddon.addDependency('foo', '1.0.0'); + }, + }); + } - fixturify.writeSync(fixture.root, fixtureData); - fixture._hasWritten = true; // so buildProjectModel doesn't try again. + fixturifyProject.writeSync(); + let project = fixturifyProject.buildProjectModel(); - let project = fixture.buildProjectModel(Project); project.initializeAddons(); - let counts = new Helpers.AddonCounts(project); + expect(areAllInstancesEqualWithinHost(project, 'foo')).to.be.true; + }); + + it('it should create a proxy to a target "real addon" per host', function () { + fixturifyProject.addAddon('foo', '1.0.0', { allowCachingPerBundle: true }); - expect(counts.proxyCount).to.equal(3); - expect(project.perBundleAddonCache.numProxies).to.equal(3); - expect(counts.byName['test-addon-a'].size).to.equal(4); - let addonACounts = counts.countInstancesAndProxies('test-addon-a'); - expect(addonACounts.instances).to.equal(1); - expect(addonACounts.proxies).to.equal(3); + fixturifyProject.addInRepoEngine('in-repo-lazy-engine', '1.0.0', { + enableLazyLoading: true, + callback: (lazyEngine) => { + lazyEngine.addDependency('foo', '1.0.0'); + lazyEngine.addDependency('foo-bar', '1.0.0'); + }, + }); + + fixturifyProject.addAddon('foo-bar', '1.0.0', { + shouldShareDependencies: true, + callback: (inRepoAddon) => { + inRepoAddon.addDependency('foo', '1.0.0'); + }, + }); - expect(counts.byName['test-addon-b'].size).to.equal(1); - expect(counts.byName['test-addon-c'].size).to.equal(1); + fixturifyProject.writeSync(); + let project = fixturifyProject.buildProjectModel(); + + project.initializeAddons(); + + expect(areAllInstancesEqualWithinHost(project, 'foo')).to.be.true; + + // addons within lazy engine host are cached + expect( + areAllInstancesEqualWithinHost( + project.addons.find((addon) => addon.name === 'in-repo-lazy-engine'), + 'foo' + ) + ).to.be.true; }); - it(`addon with allowCachingPerBundle, 1 in lazy engine, one in regular`, function () { - // PROJ to LEA, REB, LEA and REB both depend on TAA - // Neither instance of test-addon-a is declared in the project, but the one in engine B - // will be 'owned' by Project as far as PerBundleAddonCache is concerned. - // Should end with 2 instances of test-addon-a, one in PROJECT, one in lazy-engine-a, - // and no proxies. - let fixture = new FixturifyProject('test-ember-project', '1.0.0', (project) => { - project.addEngine('lazy-engine-a', '1.0.0', true, (engine) => { - engine.addAddon('test-addon-a', '1.0.0', (addonA) => { - Helpers.configureAddonMainFileContents(addonA, true); - }); + describe('when `EMBER_ENGINES_ADDON_DEDUPE` is enabled', function () { + beforeEach(function () { + process.env.EMBER_ENGINES_ADDON_DEDUPE = true; + }); + + afterEach(function () { + delete process.env.EMBER_ENGINES_ADDON_DEDUPE; + }); + + it('it should create a proxy to a target "real addon" using the project host', function () { + fixturifyProject.addAddon('foo', '1.0.0', { allowCachingPerBundle: true }); + + fixturifyProject.addInRepoEngine('in-repo-lazy-engine', '1.0.0', { + enableLazyLoading: true, + callback: (lazyEngine) => { + lazyEngine.addDependency('foo', '1.0.0'); + lazyEngine.addDependency('foo-bar', '1.0.0'); + }, }); - project.addEngine('regular-engine-b', '1.0.0', false, (engine) => { - engine.addAddon('test-addon-a', '1.0.0', (addonA) => { - Helpers.configureAddonMainFileContents(addonA, true); - }); + fixturifyProject.addAddon('foo-bar', '1.0.0', { + shouldShareDependencies: true, + callback: (inRepoAddon) => { + inRepoAddon.addDependency('foo', '1.0.0'); + }, }); - }); - fixture.writeSync(); + fixturifyProject.writeSync(); + let project = fixturifyProject.buildProjectModel(); - let project = fixture.buildProjectModel(Project); - project.initializeAddons(); + project.initializeAddons(); - let counts = new Helpers.AddonCounts(project); - - expect(counts.byName['lazy-engine-a'].size).to.equal(1); - expect(counts.byName['regular-engine-b'].size).to.equal(1); - - expect(counts.proxyCount).to.equal(0); - expect(project.perBundleAddonCache.numProxies).to.equal(0); - let addonACounts = counts.countInstancesAndProxies('test-addon-a'); - expect(addonACounts.instances).to.equal(2); - expect(addonACounts.proxies).to.equal(0); - let cacheEntries = project.perBundleAddonCache.findAddonCacheEntriesByName('lazy-engine-a', 'test-addon-a'); - expect(cacheEntries).to.exist; - expect(cacheEntries.length).to.equal(1); - cacheEntries = project.perBundleAddonCache.findAddonCacheEntriesByName('__PROJECT__', 'test-addon-a'); - expect(cacheEntries).to.exist; - expect(cacheEntries.length).to.equal(1); + // we use project addon instance as the "real addon" + expect(areAllInstancesEqualWithinHost(project, 'foo')).to.be.true; + + const { realAddon: realAddonForProject, proxies: proxiesForProject } = getAllAddonsByNameWithinHost( + project, + 'foo' + ); + const { proxies: proxiesForEngine } = getAllAddonsByNameWithinHost( + project.addons.find((addon) => addon.name === 'in-repo-lazy-engine'), + 'foo' + ); + + expect( + [...proxiesForProject, ...proxiesForEngine].every((proxy) => proxy[TARGET_INSTANCE] === realAddonForProject) + ).to.be.true; + }); }); - it(`addon with allowCachingPerBundle, 1 in each of 2 lazy engines`, function () { - // Same as above, but regular-engine-b is now lazy-engine-b - // Should have 2 instances, 1 in LEA, 1 in LEB - let fixture = new FixturifyProject('test-ember-project', '1.0.0', (project) => { - project.addEngine('lazy-engine-a', '1.0.0', true, (engine) => { - engine.addAddon('test-addon-a', '1.0.0', (addonA) => { - Helpers.configureAddonMainFileContents(addonA, true); - }); + describe('proxy checks with addon counts', function () { + it('no `allowCachingPerBundle` set, no proxies, verify instance counts', function () { + let fixture = createStandardCacheFixture(); + let project = fixture.buildProjectModel(Project); + project.initializeAddons(); + + let counts = countAddons(project); + + expect(counts.proxyCount).to.equal(0); + expect(counts.byName['test-addon-a'].addons.length).to.equal(1); + expect(counts.byName['test-addon-dep'].addons.length).to.equal(2); + expect(counts.byName['test-engine-dep'].addons.length).to.equal(3); + expect(counts.byName['lazy-engine-a'].addons.length).to.equal(1); + expect(counts.byName['lazy-engine-b'].addons.length).to.equal(1); + expect(counts.byName['regular-engine-c'].addons.length).to.equal(1); + + // addon cache should also have 0 proxies. test-addon-b was the only addon marked as cacheable, + // so it will end up in the count of addon instances for the addon cache, but have no proxies. + expect(project.perBundleAddonCache.numProxies).to.equal(0); + }); + + it('addon with allowCachingPerBundle, 1 instance, the rest proxies', function () { + // PROJ to TAA, TAB, TAC and TAD. TAB, TAC and TAD have TAA underneath. + fixturifyProject.addAddon('test-addon-a', '1.0.0', { allowCachingPerBundle: true }); + fixturifyProject.addAddon('test-addon-b', '1.0.0', { + shouldShareDependencies: true, + callback: (addon) => { + addon.addAddon('test-addon-a', '1.0.0'); + }, }); - project.addEngine('lazy-engine-b', '1.0.0', true, (engine) => { - engine.addAddon('test-addon-a', '1.0.0', (addonA) => { - Helpers.configureAddonMainFileContents(addonA, true); - }); + fixturifyProject.addAddon('test-addon-c', '1.0.0', { + shouldShareDependencies: true, + callback: (addon) => { + addon.addAddon('test-addon-a', '1.0.0'); + }, }); + + fixturifyProject.addAddon('test-addon-d', '1.0.0', { + shouldShareDependencies: true, + callback: (addon) => { + addon.addAddon('test-addon-a', '1.0.0'); + }, + }); + + let project = fixturifyProject.buildProjectModel(); + project.initializeAddons(); + + let counts = countAddons(project); + expect(counts.proxyCount).to.equal(3); + expect(project.perBundleAddonCache.numProxies).to.equal(3); + expect(counts.byName['test-addon-a'].addons.length).to.equal(4); + + expect(counts.byName['test-addon-a'].realAddonInstanceCount).to.equal(1); + expect(counts.byName['test-addon-a'].proxyCount).to.equal(3); + + expect(counts.byName['test-addon-b'].addons.length).to.equal(1); + expect(counts.byName['test-addon-c'].addons.length).to.equal(1); }); - fixture.writeSync(); + it('addon with `allowCachingPerBundle`, 1 in lazy engine, one in regular', function () { + // PROJ to LEA, REB, LEA and REB both depend on TAA + // Neither instance of test-addon-a is declared in the project, but the one in engine B + // will be 'owned' by Project as far as PerBundleAddonCache is concerned. + // Should end with 2 instances of test-addon-a, one in PROJECT, one in lazy-engine-a, + // and no proxies. + fixturifyProject.addEngine('lazy-engine-a', '1.0.0', { + enableLazyLoading: true, + callback: (engine) => { + engine.addAddon('test-addon-a', '1.0.0', { allowCachingPerBundle: true }); + }, + }); - let project = fixture.buildProjectModel(Project); - project.initializeAddons(); + fixturifyProject.addEngine('regular-engine-b', '1.0.0', { + callback: (engine) => { + engine.addAddon('test-addon-a', '1.0.0', { allowCachingPerBundle: true }); + }, + }); - let counts = new Helpers.AddonCounts(project); - - expect(counts.byName['lazy-engine-a'].size).to.equal(1); - expect(counts.byName['lazy-engine-b'].size).to.equal(1); - - expect(counts.proxyCount).to.equal(0); - expect(project.perBundleAddonCache.numProxies).to.equal(0); - let addonACounts = counts.countInstancesAndProxies('test-addon-a'); - expect(addonACounts.instances).to.equal(2); - expect(addonACounts.proxies).to.equal(0); - let cacheEntries = project.perBundleAddonCache.findAddonCacheEntriesByName('lazy-engine-a', 'test-addon-a'); - expect(cacheEntries).to.exist; - expect(cacheEntries.length).to.equal(1); - cacheEntries = project.perBundleAddonCache.findAddonCacheEntriesByName('lazy-engine-b', 'test-addon-a'); - expect(cacheEntries).to.exist; - expect(cacheEntries.length).to.equal(1); - }); + let project = fixturifyProject.buildProjectModel(); + project.initializeAddons(); + + let counts = countAddons(project); + + expect(counts.byName['lazy-engine-a'].addons.length).to.equal(1); + expect(counts.byName['regular-engine-b'].addons.length).to.equal(1); + + expect(counts.proxyCount).to.equal(0); + expect(project.perBundleAddonCache.numProxies).to.equal(0); + + expect(counts.byName['test-addon-a'].realAddonInstanceCount).to.equal(2); + expect(counts.byName['test-addon-a'].proxyCount).to.equal(0); - /* - it(`addon with allowCachingPerBundle, 2 regular engines - cache entries in project`, function () { - // Same as above, now both are regular engines. - // Should have 1 instance, 1 proxy, both in project. - let fixture = new FixturifyProject('test-ember-project', '1.0.0', (project) => { - project.addEngine('regular-engine-a', '1.0.0', false, (engine) => { - engine.addAddon('test-addon-a', '1.0.0', (addonA) => { - Helpers.configureAddonMainFileContents(addonA, true); - }); + let cacheEntries = project.perBundleAddonCache.findAddonCacheEntriesByName('lazy-engine-a', 'test-addon-a'); + expect(cacheEntries).to.exist; + expect(cacheEntries.length).to.equal(1); + + cacheEntries = project.perBundleAddonCache.findAddonCacheEntriesByName('__PROJECT__', 'test-addon-a'); + expect(cacheEntries).to.exist; + expect(cacheEntries.length).to.equal(1); + }); + + it('addon with allowCachingPerBundle, 1 in each of 2 lazy engines', function () { + // Same as above, but regular-engine-b is now lazy-engine-b + // Should have 2 instances, 1 in LEA, 1 in LEB + fixturifyProject.addEngine('lazy-engine-a', '1.0.0', { + enableLazyLoading: true, + callback: (engine) => { + engine.addAddon('test-addon-a', '1.0.0', { allowCachingPerBundle: true }); + }, }); - project.addEngine('regular-engine-b', '1.0.0', false, (engine) => { - engine.addAddon('test-addon-a', '1.0.0', (addonA) => { - Helpers.configureAddonMainFileContents(addonA, true); - }); + fixturifyProject.addEngine('lazy-engine-b', '1.0.0', { + enableLazyLoading: true, + callback: (engine) => { + engine.addAddon('test-addon-a', '1.0.0', { allowCachingPerBundle: true }); + }, }); + + let project = fixturifyProject.buildProjectModel(); + project.initializeAddons(); + + let counts = countAddons(project); + + expect(counts.byName['lazy-engine-a'].addons.length).to.equal(1); + expect(counts.byName['lazy-engine-b'].addons.length).to.equal(1); + + expect(counts.proxyCount).to.equal(0); + expect(project.perBundleAddonCache.numProxies).to.equal(0); + + expect(counts.byName['test-addon-a'].realAddonInstanceCount).to.equal(2); + expect(counts.byName['test-addon-a'].proxyCount).to.equal(0); + + let cacheEntries = project.perBundleAddonCache.findAddonCacheEntriesByName('lazy-engine-a', 'test-addon-a'); + expect(cacheEntries).to.exist; + expect(cacheEntries.length).to.equal(1); + + cacheEntries = project.perBundleAddonCache.findAddonCacheEntriesByName('lazy-engine-b', 'test-addon-a'); + expect(cacheEntries).to.exist; + expect(cacheEntries.length).to.equal(1); }); - fixture.writeSync(); + it('addon with allowCachingPerBundle, 2 regular engines - cache entries in project', function () { + // Same as above, now both are regular engines. + // Should have 1 instance, 2 proxies, both in project. + fixturifyProject.addAddon('test-addon-a', '1.0.0', { allowCachingPerBundle: true }); - let project = fixture.buildProjectModel(Project); - project.initializeAddons(); + fixturifyProject.addEngine('regular-engine-a', '1.0.0', { + shouldShareDependencies: true, + callback: (engine) => { + engine.addAddon('test-addon-a', '1.0.0'); + }, + }); + + fixturifyProject.addEngine('regular-engine-b', '1.0.0', { + shouldShareDependencies: true, + callback: (engine) => { + engine.addAddon('test-addon-a', '1.0.0'); + }, + }); - let counts = new Helpers.AddonCounts(project); + let project = fixturifyProject.buildProjectModel(); + project.initializeAddons(); - expect(counts.byName['regular-engine-a'].size).to.equal(1); - expect(counts.byName['regular-engine-b'].size).to.equal(1); + let { proxyCount, byName } = countAddons(project); - expect(counts.proxyCount).to.equal(1); - expect(project.perBundleAddonCache.numProxies).to.equal(1); - let addonACounts = counts.countInstancesAndProxies('test-addon-a'); - expect(addonACounts.instances).to.equal(1); - expect(addonACounts.proxies).to.equal(1); - let cacheEntries = project.perBundleAddonCache.findAddonCacheEntriesByName('__PROJECT__', 'test-addon-a'); - expect(cacheEntries).to.exist; - expect(cacheEntries.length).to.equal(1); + expect(byName['regular-engine-a'].addons.length).to.equal(1); + expect(byName['regular-engine-b'].addons.length).to.equal(1); + + expect(proxyCount).to.equal(2); + expect(project.perBundleAddonCache.numProxies).to.equal(2); + + expect(byName['test-addon-a'].realAddonInstanceCount).to.equal(1); + expect(byName['test-addon-a'].proxyCount).to.equal(2); + + let cacheEntries = project.perBundleAddonCache.findAddonCacheEntriesByName('__PROJECT__', 'test-addon-a'); + expect(cacheEntries).to.exist; + expect(cacheEntries.length).to.equal(1); + }); }); - */ }); From 1e538120c3f93769b01f204b92b699f54d9bde03 Mon Sep 17 00:00:00 2001 From: Brenden Palmer Date: Mon, 10 May 2021 19:33:20 -0400 Subject: [PATCH 743/818] move test helper to `tests/helpers/per-bundle-addon-cache-helpers.js` --- lib/models/per-bundle-addon-cache/index.js | 16 -------------- .../helpers/per-bundle-addon-cache-helpers.js | 21 +++++++++++++++++++ .../per-bundle-addon-cache/proxy-test.js | 11 +++++----- 3 files changed, 27 insertions(+), 21 deletions(-) diff --git a/lib/models/per-bundle-addon-cache/index.js b/lib/models/per-bundle-addon-cache/index.js index 8e481115a9..226a8ffaa3 100644 --- a/lib/models/per-bundle-addon-cache/index.js +++ b/lib/models/per-bundle-addon-cache/index.js @@ -205,22 +205,6 @@ class PerBundleAddonCache { return { [TARGET_INSTANCE]: addonInstance, realPath: addonRealPath }; } - /** - * For help with testing, given a bundleHostName and an addon name, return - * a list of the addon cache entries that have that addon name. - */ - findAddonCacheEntriesByName(bundleHostName, addonName) { - let bundleHostCacheEntry = this.bundleHostCache.get(bundleHostName); - if (!bundleHostCacheEntry) { - return null; - } - - let addonInstanceCache = bundleHostCacheEntry.addonInstanceCache; - let cacheEntries = Array.from(addonInstanceCache.values()); - let addonEntries = cacheEntries.filter((entry) => entry[TARGET_INSTANCE].name === addonName); - return addonEntries; - } - /** * Given a parent object of a potential addon (another addon or the project), * go up the 'parent' chain to find the potential addon's bundle host object diff --git a/tests/helpers/per-bundle-addon-cache-helpers.js b/tests/helpers/per-bundle-addon-cache-helpers.js index c23163d785..dc13d3a730 100644 --- a/tests/helpers/per-bundle-addon-cache-helpers.js +++ b/tests/helpers/per-bundle-addon-cache-helpers.js @@ -162,10 +162,31 @@ function createStandardCacheFixture() { return project; } +/** + * For help with testing, given a bundleHostName and an addon name, return + * a list of the addon cache entries that have that addon name. + * + * @name findAddonCacheEntriesByName + */ +function findAddonCacheEntriesByName(perBundleAddonCacheInstance, bundleHostName, addonName) { + let bundleHostCacheEntry = perBundleAddonCacheInstance.bundleHostCache.get(bundleHostName); + + if (!bundleHostCacheEntry) { + return null; + } + + let addonInstanceCache = bundleHostCacheEntry.addonInstanceCache; + let cacheEntries = Array.from(addonInstanceCache.values()); + let addonEntries = cacheEntries.filter((entry) => entry[TARGET_INSTANCE].name === addonName); + + return addonEntries; +} + /** * Simple utilities to help test the PerBundleAddonCache feature. */ module.exports = { + findAddonCacheEntriesByName, createStandardCacheFixture, getAllAddonsByNameWithinHost, areAllInstancesEqualWithinHost, diff --git a/tests/unit/models/per-bundle-addon-cache/proxy-test.js b/tests/unit/models/per-bundle-addon-cache/proxy-test.js index 51b96e05f5..0167b21d85 100644 --- a/tests/unit/models/per-bundle-addon-cache/proxy-test.js +++ b/tests/unit/models/per-bundle-addon-cache/proxy-test.js @@ -8,6 +8,7 @@ const expect = require('chai').expect; const FixturifyProject = require('../../../../tests/helpers/fixturify-project'); const { + findAddonCacheEntriesByName, createStandardCacheFixture, getAllAddonsByNameWithinHost, areAllInstancesEqualWithinHost, @@ -281,11 +282,11 @@ describe('models/per-bundle-addon-cache', function () { expect(counts.byName['test-addon-a'].realAddonInstanceCount).to.equal(2); expect(counts.byName['test-addon-a'].proxyCount).to.equal(0); - let cacheEntries = project.perBundleAddonCache.findAddonCacheEntriesByName('lazy-engine-a', 'test-addon-a'); + let cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-a', 'test-addon-a'); expect(cacheEntries).to.exist; expect(cacheEntries.length).to.equal(1); - cacheEntries = project.perBundleAddonCache.findAddonCacheEntriesByName('__PROJECT__', 'test-addon-a'); + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, '__PROJECT__', 'test-addon-a'); expect(cacheEntries).to.exist; expect(cacheEntries.length).to.equal(1); }); @@ -321,11 +322,11 @@ describe('models/per-bundle-addon-cache', function () { expect(counts.byName['test-addon-a'].realAddonInstanceCount).to.equal(2); expect(counts.byName['test-addon-a'].proxyCount).to.equal(0); - let cacheEntries = project.perBundleAddonCache.findAddonCacheEntriesByName('lazy-engine-a', 'test-addon-a'); + let cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-a', 'test-addon-a'); expect(cacheEntries).to.exist; expect(cacheEntries.length).to.equal(1); - cacheEntries = project.perBundleAddonCache.findAddonCacheEntriesByName('lazy-engine-b', 'test-addon-a'); + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-b', 'test-addon-a'); expect(cacheEntries).to.exist; expect(cacheEntries.length).to.equal(1); }); @@ -363,7 +364,7 @@ describe('models/per-bundle-addon-cache', function () { expect(byName['test-addon-a'].realAddonInstanceCount).to.equal(1); expect(byName['test-addon-a'].proxyCount).to.equal(2); - let cacheEntries = project.perBundleAddonCache.findAddonCacheEntriesByName('__PROJECT__', 'test-addon-a'); + let cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, '__PROJECT__', 'test-addon-a'); expect(cacheEntries).to.exist; expect(cacheEntries.length).to.equal(1); }); From 1a7f9e6f4e3d67ae311fd97f07ceeb13d844215a Mon Sep 17 00:00:00 2001 From: Brenden Palmer Date: Mon, 10 May 2021 20:09:28 -0400 Subject: [PATCH 744/818] add test-case --- .../per-bundle-addon-cache/proxy-test.js | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/tests/unit/models/per-bundle-addon-cache/proxy-test.js b/tests/unit/models/per-bundle-addon-cache/proxy-test.js index 0167b21d85..32ca3e9fe8 100644 --- a/tests/unit/models/per-bundle-addon-cache/proxy-test.js +++ b/tests/unit/models/per-bundle-addon-cache/proxy-test.js @@ -187,6 +187,52 @@ describe('models/per-bundle-addon-cache', function () { [...proxiesForProject, ...proxiesForEngine].every((proxy) => proxy[TARGET_INSTANCE] === realAddonForProject) ).to.be.true; }); + + it('addon with `allowCachingPerBundle`, 1 in each of 2 lazy engines; project also depends on this addon', function () { + fixturifyProject.addAddon('test-addon-a', '1.0.0', { allowCachingPerBundle: true }); + + fixturifyProject.addEngine('lazy-engine-a', '1.0.0', { + enableLazyLoading: true, + shouldShareDependencies: true, + callback: (engine) => { + engine.addAddon('test-addon-a', '1.0.0'); + }, + }); + + fixturifyProject.addEngine('lazy-engine-b', '1.0.0', { + enableLazyLoading: true, + shouldShareDependencies: true, + callback: (engine) => { + engine.addAddon('test-addon-a', '1.0.0'); + }, + }); + + let project = fixturifyProject.buildProjectModel(); + project.initializeAddons(); + + let counts = countAddons(project); + + expect(counts.byName['lazy-engine-a'].addons.length).to.equal(1); + expect(counts.byName['lazy-engine-b'].addons.length).to.equal(1); + + expect(counts.proxyCount).to.equal(2); + expect(project.perBundleAddonCache.numProxies).to.equal(2); + + expect(counts.byName['test-addon-a'].realAddonInstanceCount).to.equal(1); + expect(counts.byName['test-addon-a'].proxyCount).to.equal(2); + + let cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-a', 'test-addon-a'); + expect(cacheEntries).to.exist; + + // project cache should be used + expect(cacheEntries.length).to.equal(0); + + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-b', 'test-addon-a'); + expect(cacheEntries).to.exist; + + // project cache should be used + expect(cacheEntries.length).to.equal(0); + }); }); describe('proxy checks with addon counts', function () { @@ -331,6 +377,48 @@ describe('models/per-bundle-addon-cache', function () { expect(cacheEntries.length).to.equal(1); }); + it('addon with `allowCachingPerBundle`, 1 in each of 2 lazy engines; project also depends on this addon', function () { + fixturifyProject.addAddon('test-addon-a', '1.0.0', { allowCachingPerBundle: true }); + + fixturifyProject.addEngine('lazy-engine-a', '1.0.0', { + enableLazyLoading: true, + shouldShareDependencies: true, + callback: (engine) => { + engine.addAddon('test-addon-a', '1.0.0'); + }, + }); + + fixturifyProject.addEngine('lazy-engine-b', '1.0.0', { + enableLazyLoading: true, + shouldShareDependencies: true, + callback: (engine) => { + engine.addAddon('test-addon-a', '1.0.0'); + }, + }); + + let project = fixturifyProject.buildProjectModel(); + project.initializeAddons(); + + let counts = countAddons(project); + + expect(counts.byName['lazy-engine-a'].addons.length).to.equal(1); + expect(counts.byName['lazy-engine-b'].addons.length).to.equal(1); + + expect(counts.proxyCount).to.equal(0); + expect(project.perBundleAddonCache.numProxies).to.equal(0); + + expect(counts.byName['test-addon-a'].realAddonInstanceCount).to.equal(3); + expect(counts.byName['test-addon-a'].proxyCount).to.equal(0); + + let cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-a', 'test-addon-a'); + expect(cacheEntries).to.exist; + expect(cacheEntries.length).to.equal(1); + + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-b', 'test-addon-a'); + expect(cacheEntries).to.exist; + expect(cacheEntries.length).to.equal(1); + }); + it('addon with allowCachingPerBundle, 2 regular engines - cache entries in project', function () { // Same as above, now both are regular engines. // Should have 1 instance, 2 proxies, both in project. From 3d6d472bf5f0a379be7000145b69ce9314b2cb80 Mon Sep 17 00:00:00 2001 From: Dave Combs Date: Mon, 10 May 2021 17:49:03 -0700 Subject: [PATCH 745/818] adding more proxy test cases --- ...e-helpers.js => per-bundle-addon-cache.js} | 0 .../cache-bundle-hosts-test.js | 5 +- .../enable-cache-test.js | 4 +- .../per-bundle-addon-cache/proxy-test.js | 53 ++++++++++++++++++- 4 files changed, 56 insertions(+), 6 deletions(-) rename tests/helpers/{per-bundle-addon-cache-helpers.js => per-bundle-addon-cache.js} (100%) diff --git a/tests/helpers/per-bundle-addon-cache-helpers.js b/tests/helpers/per-bundle-addon-cache.js similarity index 100% rename from tests/helpers/per-bundle-addon-cache-helpers.js rename to tests/helpers/per-bundle-addon-cache.js diff --git a/tests/unit/models/per-bundle-addon-cache/cache-bundle-hosts-test.js b/tests/unit/models/per-bundle-addon-cache/cache-bundle-hosts-test.js index a16171c05b..dd253f9811 100644 --- a/tests/unit/models/per-bundle-addon-cache/cache-bundle-hosts-test.js +++ b/tests/unit/models/per-bundle-addon-cache/cache-bundle-hosts-test.js @@ -5,14 +5,15 @@ * A 'bundle host' is either the project or a lazy engine. */ const expect = require('chai').expect; -const Helpers = require('../../../../tests/helpers/per-bundle-addon-cache-helpers'); const Project = require('../../../../lib/models/project'); +const { createStandardCacheFixture } = require('../../../../tests/helpers/per-bundle-addon-cache'); + describe('Unit | per-bundle-addon-cache bundle host', function () { let project; before('setup fixture', function setup() { - let fixture = Helpers.createStandardCacheFixture(); + let fixture = createStandardCacheFixture(); project = fixture.buildProjectModel(Project); project.initializeAddons(); }); diff --git a/tests/unit/models/per-bundle-addon-cache/enable-cache-test.js b/tests/unit/models/per-bundle-addon-cache/enable-cache-test.js index 1cf2c1b736..538a80330c 100644 --- a/tests/unit/models/per-bundle-addon-cache/enable-cache-test.js +++ b/tests/unit/models/per-bundle-addon-cache/enable-cache-test.js @@ -4,7 +4,7 @@ * Tests for enabling and disabling per-bundle-addon-cache support */ const expect = require('chai').expect; -const Helpers = require('../../../../tests/helpers/per-bundle-addon-cache-helpers'); +const { createStandardCacheFixture } = require('../../../../tests/helpers/per-bundle-addon-cache'); function enablePerBundleAddonCache(explicitValue) { // default is opt-out @@ -30,7 +30,7 @@ function createProject() { rerequire('../../../../lib/models/per-bundle-addon-cache'); const Project = rerequire('../../../../lib/models/project'); - let fixture = Helpers.createStandardCacheFixture(); + let fixture = createStandardCacheFixture(); let project = fixture.buildProjectModel(Project); return project; } diff --git a/tests/unit/models/per-bundle-addon-cache/proxy-test.js b/tests/unit/models/per-bundle-addon-cache/proxy-test.js index 32ca3e9fe8..0b9d88f319 100644 --- a/tests/unit/models/per-bundle-addon-cache/proxy-test.js +++ b/tests/unit/models/per-bundle-addon-cache/proxy-test.js @@ -13,7 +13,7 @@ const { getAllAddonsByNameWithinHost, areAllInstancesEqualWithinHost, countAddons, -} = require('../../../../tests/helpers/per-bundle-addon-cache-helpers'); +} = require('../../../../tests/helpers/per-bundle-addon-cache'); const Project = require('../../../../lib/models/project'); const { TARGET_INSTANCE } = require('../../../../lib/models/per-bundle-addon-cache/target-instance'); @@ -417,9 +417,56 @@ describe('models/per-bundle-addon-cache', function () { cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-b', 'test-addon-a'); expect(cacheEntries).to.exist; expect(cacheEntries.length).to.equal(1); + }); + + + it('addon with allowCachingPerBundle, 2 regular engines - cache entries in project but not declared there', function () { + // Project declares an in-repo addon TAA. Then remove the ember-addon.paths entry so the project + // "doesn't know" about it but it's available for engines. Declare 2 non-lazy in-repo engines. + // Then have them add a shared in-repo dependency to TAA, with the path pointing to the one in + // PROJ/lib (i.e. '../test-addon-a') + // Should have 1 instance, 1 proxy, both in project. + fixturifyProject.addInRepoAddon('test-addon-a', '1.0.0', { allowCachingPerBundle: true }); + fixturifyProject.pkg['ember-addon'].paths = []; // remove the 'dependency' (file still exists) + + fixturifyProject.addInRepoEngine('regular-engine-a', '1.0.0', { + enableLazyLoading: false, + shouldShareDependencies: true, + callback: (inRepoEngine) => { + inRepoEngine.pkg['ember-addon'].paths = ['../test-addon-a']; + }, + }); + + fixturifyProject.addInRepoEngine('regular-engine-b', '1.0.0', { + enableLazyLoading: false, + shouldShareDependencies: true, + callback: (inRepoEngine) => { + inRepoEngine.pkg['ember-addon'].paths = ['../test-addon-a']; + }, + }); + + fixturifyProject.writeSync(); + + let project = fixturifyProject.buildProjectModel(); + project.initializeAddons(); + + let { proxyCount, byName } = countAddons(project); + + expect(byName['regular-engine-a'].addons.length).to.equal(1); + expect(byName['regular-engine-b'].addons.length).to.equal(1); + + expect(proxyCount).to.equal(1); + expect(project.perBundleAddonCache.numProxies).to.equal(1); + + expect(byName['test-addon-a'].realAddonInstanceCount).to.equal(1); + expect(byName['test-addon-a'].proxyCount).to.equal(1); + + let cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, '__PROJECT__', 'test-addon-a'); + expect(cacheEntries).to.exist; + expect(cacheEntries.length).to.equal(1); }); - it('addon with allowCachingPerBundle, 2 regular engines - cache entries in project', function () { + it('addon with allowCachingPerBundle, 2 regular engines - cache entries in project (also declared there)', function () { // Same as above, now both are regular engines. // Should have 1 instance, 2 proxies, both in project. fixturifyProject.addAddon('test-addon-a', '1.0.0', { allowCachingPerBundle: true }); @@ -438,6 +485,8 @@ describe('models/per-bundle-addon-cache', function () { }, }); + fixturifyProject.writeSync(); + let project = fixturifyProject.buildProjectModel(); project.initializeAddons(); From 68b7c5a6560de437e5e6f36d1249c4fe1c05b75a Mon Sep 17 00:00:00 2001 From: Brenden Palmer Date: Mon, 10 May 2021 20:45:04 -0400 Subject: [PATCH 746/818] more test-cases --- .../per-bundle-addon-cache/proxy-test.js | 174 ++++++++++++++++++ 1 file changed, 174 insertions(+) diff --git a/tests/unit/models/per-bundle-addon-cache/proxy-test.js b/tests/unit/models/per-bundle-addon-cache/proxy-test.js index 0b9d88f319..c1ad8524c0 100644 --- a/tests/unit/models/per-bundle-addon-cache/proxy-test.js +++ b/tests/unit/models/per-bundle-addon-cache/proxy-test.js @@ -233,6 +233,76 @@ describe('models/per-bundle-addon-cache', function () { // project cache should be used expect(cacheEntries.length).to.equal(0); }); + + it('2 lazy engines; each depend on two addons; project also depends on these addons, ensure project cache is used', function () { + fixturifyProject.addInRepoAddon('test-addon-a', '1.0.0', { + allowCachingPerBundle: true, + callback: (addon) => { + addon.pkg['ember-addon'].paths = ['../test-addon-b']; + }, + }); + + fixturifyProject.addInRepoAddon('test-addon-b', '1.0.0', { allowCachingPerBundle: true }); + + fixturifyProject.addInRepoEngine('lazy-engine-a', '1.0.0', { + allowCachingPerBundle: true, + enableLazyLoading: true, + shouldShareDependencies: true, + callback: (engine) => { + engine.pkg['ember-addon'].paths = ['../test-addon-a', '../test-addon-b']; + }, + }); + + fixturifyProject.addInRepoEngine('lazy-engine-b', '1.0.0', { + allowCachingPerBundle: true, + enableLazyLoading: true, + shouldShareDependencies: true, + callback: (engine) => { + engine.pkg['ember-addon'].paths = ['../test-addon-a', '../test-addon-b']; + }, + }); + + let project = fixturifyProject.buildProjectModel(); + project.initializeAddons(); + + let { byName } = countAddons(project); + + expect(byName['lazy-engine-a'].realAddonInstanceCount).to.equal(1); + expect(byName['lazy-engine-a'].proxyCount).to.equal(0); + + expect(byName['lazy-engine-b'].realAddonInstanceCount).to.equal(1); + expect(byName['lazy-engine-b'].proxyCount).to.equal(0); + + expect(byName['test-addon-a'].realAddonInstanceCount).to.equal(1); + expect(byName['test-addon-a'].proxyCount).to.equal(2); + + expect(byName['test-addon-b'].realAddonInstanceCount).to.equal(1); + expect(byName['test-addon-b'].proxyCount).to.equal(3); + + let cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-a', 'test-addon-a'); + expect(cacheEntries).to.exist; + + // project cache should be used + expect(cacheEntries.length).to.equal(0); + + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-a', 'test-addon-b'); + expect(cacheEntries).to.exist; + + // project cache should be used + expect(cacheEntries.length).to.equal(0); + + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-b', 'test-addon-a'); + expect(cacheEntries).to.exist; + + // project cache should be used + expect(cacheEntries.length).to.equal(0); + + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-b', 'test-addon-b'); + expect(cacheEntries).to.exist; + + // project cache should be used + expect(cacheEntries.length).to.equal(0); + }); }); describe('proxy checks with addon counts', function () { @@ -505,5 +575,109 @@ describe('models/per-bundle-addon-cache', function () { expect(cacheEntries).to.exist; expect(cacheEntries.length).to.equal(1); }); + + it('2 lazy engines; each depend on two addons; ensure that each lazy engine has proxy for subsequent instantiations of duplicate addons', function () { + fixturifyProject.addInRepoAddon('test-addon-a', '1.0.0', { + allowCachingPerBundle: true, + callback: (addon) => { + addon.pkg['ember-addon'].paths = ['../test-addon-b']; + }, + }); + + fixturifyProject.addInRepoAddon('test-addon-b', '1.0.0', { allowCachingPerBundle: true }); + fixturifyProject.pkg['ember-addon'].paths = []; + + fixturifyProject.addInRepoEngine('lazy-engine-a', '1.0.0', { + allowCachingPerBundle: true, + enableLazyLoading: true, + callback: (engine) => { + engine.pkg['ember-addon'].paths = ['../test-addon-a', '../test-addon-b']; + }, + }); + + fixturifyProject.addInRepoEngine('lazy-engine-b', '1.0.0', { + allowCachingPerBundle: true, + enableLazyLoading: true, + callback: (engine) => { + engine.pkg['ember-addon'].paths = ['../test-addon-a', '../test-addon-b']; + }, + }); + + let project = fixturifyProject.buildProjectModel(); + project.initializeAddons(); + + let { byName } = countAddons(project); + + expect(byName['lazy-engine-a'].realAddonInstanceCount).to.equal(1); + expect(byName['lazy-engine-a'].proxyCount).to.equal(0); + + expect(byName['lazy-engine-b'].realAddonInstanceCount).to.equal(1); + expect(byName['lazy-engine-b'].proxyCount).to.equal(0); + + expect(byName['test-addon-a'].realAddonInstanceCount).to.equal(2); + expect(byName['test-addon-a'].proxyCount).to.equal(0); + + expect(byName['test-addon-b'].realAddonInstanceCount).to.equal(2); + expect(byName['test-addon-b'].proxyCount).to.equal(2); + + let cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-a', 'test-addon-a'); + expect(cacheEntries).to.exist; + expect(cacheEntries.length).to.equal(1); + + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-a', 'test-addon-b'); + expect(cacheEntries).to.exist; + expect(cacheEntries.length).to.equal(1); + + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-b', 'test-addon-a'); + expect(cacheEntries).to.exist; + expect(cacheEntries.length).to.equal(1); + + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-b', 'test-addon-b'); + expect(cacheEntries).to.exist; + expect(cacheEntries.length).to.equal(1); + }); + + it('2 regular engines; each depend on two addons; ensure that project cache is used', function () { + fixturifyProject.addInRepoAddon('test-addon-a', '1.0.0', { + allowCachingPerBundle: true, + callback: (addon) => { + addon.pkg['ember-addon'].paths = ['../test-addon-b']; + }, + }); + + fixturifyProject.addInRepoAddon('test-addon-b', '1.0.0', { allowCachingPerBundle: true }); + fixturifyProject.pkg['ember-addon'].paths = []; + + fixturifyProject.addInRepoEngine('engine-a', '1.0.0', { + allowCachingPerBundle: true, + callback: (engine) => { + engine.pkg['ember-addon'].paths = ['../test-addon-a', '../test-addon-b']; + }, + }); + + fixturifyProject.addInRepoEngine('engine-b', '1.0.0', { + allowCachingPerBundle: true, + callback: (engine) => { + engine.pkg['ember-addon'].paths = ['../test-addon-a', '../test-addon-b']; + }, + }); + + let project = fixturifyProject.buildProjectModel(); + project.initializeAddons(); + + let { byName } = countAddons(project); + + expect(byName['engine-a'].realAddonInstanceCount).to.equal(1); + expect(byName['engine-a'].proxyCount).to.equal(0); + + expect(byName['engine-b'].realAddonInstanceCount).to.equal(1); + expect(byName['engine-b'].proxyCount).to.equal(0); + + expect(byName['test-addon-a'].realAddonInstanceCount).to.equal(1); + expect(byName['test-addon-a'].proxyCount).to.equal(1); + + expect(byName['test-addon-b'].realAddonInstanceCount).to.equal(1); + expect(byName['test-addon-b'].proxyCount).to.equal(2); + }); }); }); From 283476ae58513df27840c3025a09f2e416505745 Mon Sep 17 00:00:00 2001 From: Dave Combs Date: Mon, 10 May 2021 17:57:38 -0700 Subject: [PATCH 747/818] fixing lint errors --- tests/unit/models/per-bundle-addon-cache/proxy-test.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/unit/models/per-bundle-addon-cache/proxy-test.js b/tests/unit/models/per-bundle-addon-cache/proxy-test.js index c1ad8524c0..3dcbc98eb5 100644 --- a/tests/unit/models/per-bundle-addon-cache/proxy-test.js +++ b/tests/unit/models/per-bundle-addon-cache/proxy-test.js @@ -487,8 +487,7 @@ describe('models/per-bundle-addon-cache', function () { cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-b', 'test-addon-a'); expect(cacheEntries).to.exist; expect(cacheEntries.length).to.equal(1); - }); - + }); it('addon with allowCachingPerBundle, 2 regular engines - cache entries in project but not declared there', function () { // Project declares an in-repo addon TAA. Then remove the ember-addon.paths entry so the project @@ -497,7 +496,7 @@ describe('models/per-bundle-addon-cache', function () { // PROJ/lib (i.e. '../test-addon-a') // Should have 1 instance, 1 proxy, both in project. fixturifyProject.addInRepoAddon('test-addon-a', '1.0.0', { allowCachingPerBundle: true }); - fixturifyProject.pkg['ember-addon'].paths = []; // remove the 'dependency' (file still exists) + fixturifyProject.pkg['ember-addon'].paths = []; // remove the 'dependency' (file still exists) fixturifyProject.addInRepoEngine('regular-engine-a', '1.0.0', { enableLazyLoading: false, From ced941d1528a375f5bafc1e2c528cd9f1235405e Mon Sep 17 00:00:00 2001 From: Brenden Palmer Date: Mon, 10 May 2021 21:04:01 -0400 Subject: [PATCH 748/818] one more test-case for lazy engines --- tests/helpers/per-bundle-addon-cache.js | 10 +++--- .../per-bundle-addon-cache/proxy-test.js | 35 +++++++++++++++++++ 2 files changed, 39 insertions(+), 6 deletions(-) diff --git a/tests/helpers/per-bundle-addon-cache.js b/tests/helpers/per-bundle-addon-cache.js index dc13d3a730..909c5e95c8 100644 --- a/tests/helpers/per-bundle-addon-cache.js +++ b/tests/helpers/per-bundle-addon-cache.js @@ -22,11 +22,6 @@ function getAllAddonsByNameWithinHost(projectOrAddon, addonName, config = { prox } projectOrAddon.addons.forEach((addon) => { - // stop traversing within another host - if (isLazyEngine(addon)) { - return; - } - if (addon.name === addonName) { if (config.realAddon && !addon[TARGET_INSTANCE]) { throw new Error( @@ -41,7 +36,10 @@ function getAllAddonsByNameWithinHost(projectOrAddon, addonName, config = { prox } else { config.realAddon = addon; } - } else { + } + + // stop traversing within another host + if (!isLazyEngine(addon)) { getAllAddonsByNameWithinHost(addon, addonName, config); } }); diff --git a/tests/unit/models/per-bundle-addon-cache/proxy-test.js b/tests/unit/models/per-bundle-addon-cache/proxy-test.js index 3dcbc98eb5..9dc2652b19 100644 --- a/tests/unit/models/per-bundle-addon-cache/proxy-test.js +++ b/tests/unit/models/per-bundle-addon-cache/proxy-test.js @@ -678,5 +678,40 @@ describe('models/per-bundle-addon-cache', function () { expect(byName['test-addon-b'].realAddonInstanceCount).to.equal(1); expect(byName['test-addon-b'].proxyCount).to.equal(2); }); + + it('multiple references to a single lazy engine that has opted-in to `allowCachingPerBundle`', function () { + fixturifyProject.addInRepoEngine('lazy-engine-a', '1.0.0', { + allowCachingPerBundle: true, + enableLazyLoading: true, + }); + + fixturifyProject.addInRepoAddon('test-addon-a', '1.0.0', { + callback: (addon) => { + addon.pkg['ember-addon'].paths = ['../lazy-engine-a']; + }, + }); + + fixturifyProject.addInRepoAddon('test-addon-b', '1.0.0', { + callback: (addon) => { + addon.pkg['ember-addon'].paths = ['../lazy-engine-a']; + }, + }); + + fixturifyProject.addInRepoAddon('test-addon-c', '1.0.0', { + callback: (addon) => { + addon.pkg['ember-addon'].paths = ['../lazy-engine-a']; + }, + }); + + let project = fixturifyProject.buildProjectModel(); + project.initializeAddons(); + + let { byName } = countAddons(project); + + expect(byName['lazy-engine-a'].realAddonInstanceCount).to.equal(1); + expect(byName['lazy-engine-a'].proxyCount).to.equal(3); + + expect(areAllInstancesEqualWithinHost(project, 'lazy-engine-a')).to.be.true; + }); }); }); From ded1c3160982740bba2c157118e107e322d5fe48 Mon Sep 17 00:00:00 2001 From: Dave Combs Date: Mon, 10 May 2021 19:06:06 -0700 Subject: [PATCH 749/818] re-trigger builds and tests From 5873398091a60271aaf53cb8bbfc271a6cea8b1b Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 10 May 2021 12:11:23 -0400 Subject: [PATCH 750/818] Drop Node 10 support Follow the Node support policy this drops support for Node 10 which reached end of life on 2021-04-30. --- .github/workflows/ci.yml | 2 +- blueprints/addon/files/.travis.yml | 2 +- blueprints/addon/files/README.md | 2 +- blueprints/app/files/.travis.yml | 2 +- docs/node-support.md | 4 +--- package.json | 2 +- tests/fixtures/addon/defaults/.travis.yml | 2 +- tests/fixtures/addon/defaults/README.md | 2 +- tests/fixtures/addon/yarn/.travis.yml | 2 +- tests/fixtures/addon/yarn/README.md | 2 +- tests/fixtures/app/defaults/.travis.yml | 2 +- tests/fixtures/app/npm/.travis.yml | 2 +- .../app/with-blueprint-override-lint-fail/.travis.yml | 2 +- tests/fixtures/app/yarn/.travis.yml | 2 +- tests/unit/utilities/platform-checker-test.js | 2 +- 15 files changed, 15 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 855499fdec..4779dc117e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,7 +54,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [10.x, 12.x, 14.x] + node-version: [12.x, 14.x] os: [ubuntu, windows] steps: diff --git a/blueprints/addon/files/.travis.yml b/blueprints/addon/files/.travis.yml index b8a36f02da..a13eaecc50 100644 --- a/blueprints/addon/files/.travis.yml +++ b/blueprints/addon/files/.travis.yml @@ -3,7 +3,7 @@ language: node_js node_js: # we recommend testing addons with the same minimum supported node version as Ember CLI # so that your addon works for all apps - - "10" + - "12" dist: xenial diff --git a/blueprints/addon/files/README.md b/blueprints/addon/files/README.md index e6972a912a..2ec7757b7d 100644 --- a/blueprints/addon/files/README.md +++ b/blueprints/addon/files/README.md @@ -9,7 +9,7 @@ Compatibility * Ember.js v3.20 or above * Ember CLI v3.20 or above -* Node.js v10 or above +* Node.js v12 or above Installation diff --git a/blueprints/app/files/.travis.yml b/blueprints/app/files/.travis.yml index 6547c86481..bf9a217b21 100644 --- a/blueprints/app/files/.travis.yml +++ b/blueprints/app/files/.travis.yml @@ -1,7 +1,7 @@ --- language: node_js node_js: - - "10" + - "12" dist: xenial diff --git a/docs/node-support.md b/docs/node-support.md index 4360be0653..98216207b6 100644 --- a/docs/node-support.md +++ b/docs/node-support.md @@ -12,7 +12,7 @@ | 7.x | 2.10.0 - 2.16.x | | 8.x | 2.13.3 - 3.16.x | | 9.x | 2.16.2 - 3.2.x | -| 10.x | 3.1.3 - Current | +| 10.x | 3.1.3 - 3.28.0 | | 11.x | 3.9.0 - 3.13.0 | | 12.x | 3.10.0 - Current | | 13.x | 3.15.0 - 3.20.0 | @@ -30,8 +30,6 @@ Node.js](https://github.com/nodejs/LTS#lts_schedule). ## Current support: -* v10: Released as stable version then converted to LTS. - * Supported by ember-cli/ember-cli#master until: 2021-04-30. * v12: Released as stable version then converted to LTS. * Supported by ember-cli/ember-cli#master until: 2022-04-30. * v14: Released as stable version then converted to LTS. diff --git a/package.json b/package.json index 56b00a62ea..63b89225d9 100644 --- a/package.json +++ b/package.json @@ -165,7 +165,7 @@ "yuidocjs": "0.10.2" }, "engines": { - "node": "10.* || >= 12" + "node": ">= 12" }, "publishConfig": { "registry": "https://registry.npmjs.org" diff --git a/tests/fixtures/addon/defaults/.travis.yml b/tests/fixtures/addon/defaults/.travis.yml index 22e0715e9a..7c3c348097 100644 --- a/tests/fixtures/addon/defaults/.travis.yml +++ b/tests/fixtures/addon/defaults/.travis.yml @@ -3,7 +3,7 @@ language: node_js node_js: # we recommend testing addons with the same minimum supported node version as Ember CLI # so that your addon works for all apps - - "10" + - "12" dist: xenial diff --git a/tests/fixtures/addon/defaults/README.md b/tests/fixtures/addon/defaults/README.md index f863b52d51..c4dcf008b6 100644 --- a/tests/fixtures/addon/defaults/README.md +++ b/tests/fixtures/addon/defaults/README.md @@ -9,7 +9,7 @@ Compatibility * Ember.js v3.20 or above * Ember CLI v3.20 or above -* Node.js v10 or above +* Node.js v12 or above Installation diff --git a/tests/fixtures/addon/yarn/.travis.yml b/tests/fixtures/addon/yarn/.travis.yml index 3fb60c5426..14cf05af64 100644 --- a/tests/fixtures/addon/yarn/.travis.yml +++ b/tests/fixtures/addon/yarn/.travis.yml @@ -3,7 +3,7 @@ language: node_js node_js: # we recommend testing addons with the same minimum supported node version as Ember CLI # so that your addon works for all apps - - "10" + - "12" dist: xenial diff --git a/tests/fixtures/addon/yarn/README.md b/tests/fixtures/addon/yarn/README.md index f863b52d51..c4dcf008b6 100644 --- a/tests/fixtures/addon/yarn/README.md +++ b/tests/fixtures/addon/yarn/README.md @@ -9,7 +9,7 @@ Compatibility * Ember.js v3.20 or above * Ember CLI v3.20 or above -* Node.js v10 or above +* Node.js v12 or above Installation diff --git a/tests/fixtures/app/defaults/.travis.yml b/tests/fixtures/app/defaults/.travis.yml index 5b5ce9da2c..bf02ddcad6 100644 --- a/tests/fixtures/app/defaults/.travis.yml +++ b/tests/fixtures/app/defaults/.travis.yml @@ -1,7 +1,7 @@ --- language: node_js node_js: - - "10" + - "12" dist: xenial diff --git a/tests/fixtures/app/npm/.travis.yml b/tests/fixtures/app/npm/.travis.yml index 5b5ce9da2c..bf02ddcad6 100644 --- a/tests/fixtures/app/npm/.travis.yml +++ b/tests/fixtures/app/npm/.travis.yml @@ -1,7 +1,7 @@ --- language: node_js node_js: - - "10" + - "12" dist: xenial diff --git a/tests/fixtures/app/with-blueprint-override-lint-fail/.travis.yml b/tests/fixtures/app/with-blueprint-override-lint-fail/.travis.yml index 5b5ce9da2c..bf02ddcad6 100644 --- a/tests/fixtures/app/with-blueprint-override-lint-fail/.travis.yml +++ b/tests/fixtures/app/with-blueprint-override-lint-fail/.travis.yml @@ -1,7 +1,7 @@ --- language: node_js node_js: - - "10" + - "12" dist: xenial diff --git a/tests/fixtures/app/yarn/.travis.yml b/tests/fixtures/app/yarn/.travis.yml index aa771282fb..d908403ee5 100644 --- a/tests/fixtures/app/yarn/.travis.yml +++ b/tests/fixtures/app/yarn/.travis.yml @@ -1,7 +1,7 @@ --- language: node_js node_js: - - "10" + - "12" dist: xenial diff --git a/tests/unit/utilities/platform-checker-test.js b/tests/unit/utilities/platform-checker-test.js index ca2212756a..e29ce4b003 100644 --- a/tests/unit/utilities/platform-checker-test.js +++ b/tests/unit/utilities/platform-checker-test.js @@ -15,7 +15,7 @@ describe('platform-checker', function () { } check('v8.0.0', { isTested: false, isDeprecated: true, isValid: false }); - check('v10.0.0', { isTested: true, isDeprecated: false, isValid: true }); + check('v10.0.0', { isTested: false, isDeprecated: true, isValid: false }); check('v12.0.0', { isTested: true, isDeprecated: false, isValid: true }); check('v13.0.0', { isTested: false, isDeprecated: false, isValid: true }); check('v14.0.0', { isTested: true, isDeprecated: false, isValid: true }); From 0fcb6687674bce2c71159ccb2b874267882ce486 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Tue, 11 May 2021 11:03:15 -0400 Subject: [PATCH 751/818] Disable Embroider by default. There are still a number of rough edges to be worked through with Embroider rolling out as the default (e.g. some very popular addons that are not fully compatibile), follow along with the Embroider RFC for more details. --- lib/experiments/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/experiments/index.js b/lib/experiments/index.js index 404f8e01ca..6cbbc155da 100644 --- a/lib/experiments/index.js +++ b/lib/experiments/index.js @@ -4,7 +4,7 @@ const chalk = require('chalk'); const availableExperiments = Object.freeze(['PACKAGER', 'EMBROIDER', 'CLASSIC']); const deprecatedExperiments = Object.freeze(['BROCCOLI_WATCHER', 'PACKAGER']); -const enabledExperiments = Object.freeze(['EMBROIDER']); +const enabledExperiments = Object.freeze([]); const deprecatedExperimentsDeprecationsIssued = []; function isExperimentEnabled(experimentName) { From d5761c1696648f127032c225594cd8da64052d5f Mon Sep 17 00:00:00 2001 From: Brenden Palmer Date: Thu, 6 May 2021 10:18:56 -0600 Subject: [PATCH 752/818] Ensure package-info objects are stable when they represent the same addon --- lib/models/package-info-cache/index.js | 2 +- lib/models/package-info-cache/package-info.js | 3 +- .../lib/ember-with-addon-main/lib/main.js | 5 ++ .../lib/ember-with-addon-main/package.json | 9 +++ .../lib/ember-super-button/package.json | 7 +- tests/fixtures/addon/simple/package.json | 7 +- .../package-info-cache-test.js | 71 +++++++++++++++++-- tests/unit/models/project-test.js | 1 + 8 files changed, 95 insertions(+), 10 deletions(-) create mode 100644 tests/fixtures/addon/simple/lib/ember-super-button/lib/ember-with-addon-main/lib/main.js create mode 100644 tests/fixtures/addon/simple/lib/ember-super-button/lib/ember-with-addon-main/package.json diff --git a/lib/models/package-info-cache/index.js b/lib/models/package-info-cache/index.js index 1e307e0552..d2a32a36ff 100644 --- a/lib/models/package-info-cache/index.js +++ b/lib/models/package-info-cache/index.js @@ -244,7 +244,7 @@ class PackageInfoCache { * No copy is made. */ loadAddon(addonInstance) { - let pkgInfo = this._readPackage(addonInstance.root, addonInstance.pkg); + let pkgInfo = this._readPackage(addonInstance.packageRoot, addonInstance.pkg); // NOTE: the returned pkgInfo may contain errors, or may contain // other packages that have errors. We will try to process diff --git a/lib/models/package-info-cache/package-info.js b/lib/models/package-info-cache/package-info.js index 6e30cf80b1..f4d4904ad3 100644 --- a/lib/models/package-info-cache/package-info.js +++ b/lib/models/package-info-cache/package-info.js @@ -397,11 +397,12 @@ class PackageInfo { if (typeof module === 'function') { ctor = module; ctor.prototype.root = ctor.prototype.root || mainDir; + ctor.prototype.packageRoot = ctor.prototype.packageRoot || this.realPath; ctor.prototype.pkg = ctor.prototype.pkg || this.pkg; } else { const Addon = require('../addon'); // done here because of circular dependency - ctor = Addon.extend(Object.assign({ root: mainDir, pkg: this.pkg }, module)); + ctor = Addon.extend(Object.assign({ root: mainDir, packageRoot: this.realPath, pkg: this.pkg }, module)); } ctor._meta_ = { diff --git a/tests/fixtures/addon/simple/lib/ember-super-button/lib/ember-with-addon-main/lib/main.js b/tests/fixtures/addon/simple/lib/ember-super-button/lib/ember-with-addon-main/lib/main.js new file mode 100644 index 0000000000..3ad817af82 --- /dev/null +++ b/tests/fixtures/addon/simple/lib/ember-super-button/lib/ember-with-addon-main/lib/main.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = { + name: require('../package').name, +}; diff --git a/tests/fixtures/addon/simple/lib/ember-super-button/lib/ember-with-addon-main/package.json b/tests/fixtures/addon/simple/lib/ember-super-button/lib/ember-with-addon-main/package.json new file mode 100644 index 0000000000..6cf2ccf370 --- /dev/null +++ b/tests/fixtures/addon/simple/lib/ember-super-button/lib/ember-with-addon-main/package.json @@ -0,0 +1,9 @@ +{ + "name": "ember-with-addon-main", + "keywords": [ + "ember-addon" + ], + "ember-addon": { + "main": "lib/main.js" + } +} diff --git a/tests/fixtures/addon/simple/lib/ember-super-button/package.json b/tests/fixtures/addon/simple/lib/ember-super-button/package.json index d493c4084b..a2c50d4bbf 100644 --- a/tests/fixtures/addon/simple/lib/ember-super-button/package.json +++ b/tests/fixtures/addon/simple/lib/ember-super-button/package.json @@ -4,9 +4,12 @@ "ember-addon" ], "ember-addon": { - "paths": ["./lib/ember-ng"] + "paths": [ + "./lib/ember-ng", + "./lib/ember-with-addon-main" + ] }, "dependencies": { "ember-yagni": "0" } -} +} \ No newline at end of file diff --git a/tests/fixtures/addon/simple/package.json b/tests/fixtures/addon/simple/package.json index e1db417e4b..ef32076f98 100644 --- a/tests/fixtures/addon/simple/package.json +++ b/tests/fixtures/addon/simple/package.json @@ -5,7 +5,10 @@ "something-else": "latest" }, "ember-addon": { - "paths": ["./lib/ember-super-button"] + "paths": [ + "./lib/ember-super-button", + "./lib/ember-super-button/lib/ember-with-addon-main" + ] }, "devDependencies": { "ember-resolver": "^7.0.0", @@ -20,4 +23,4 @@ "ember-addon-with-dependencies": "latest", "loader.js": "latest" } -} +} \ No newline at end of file diff --git a/tests/unit/models/package-info-cache/package-info-cache-test.js b/tests/unit/models/package-info-cache/package-info-cache-test.js index 3687a48fb0..0de1cddc7a 100644 --- a/tests/unit/models/package-info-cache/package-info-cache-test.js +++ b/tests/unit/models/package-info-cache/package-info-cache-test.js @@ -64,13 +64,13 @@ describe('models/package-info-cache/package-info-cache-test.js', function () { }); describe('packageInfo contents tests on valid project', function () { - let projectPath, packageJsonPath, packageContents, projectPackageInfo; + let project, projectPath, packageJsonPath, packageContents, projectPackageInfo; beforeEach(function () { projectPath = path.resolve(addonFixturePath, 'simple'); packageJsonPath = path.join(projectPath, 'package.json'); packageContents = require(packageJsonPath); - let project = new Project(projectPath, packageContents, ui, cli); + project = new Project(projectPath, packageContents, ui, cli); let pic = project.packageInfoCache; projectPackageInfo = pic.getEntry(projectPath); @@ -151,12 +151,21 @@ describe('models/package-info-cache/package-info-cache-test.js', function () { expect(packageAndErrorNames).to.deep.equal(devDependencyNames); }); - it('shows projectPackageInfo has 1 in-repo addon named "ember-super-button"', function () { + it('shows projectPackageInfo has 2 in-repo addons', function () { let inRepoAddons = projectPackageInfo.inRepoAddons; + expect(inRepoAddons).to.exist; - expect(inRepoAddons.length).to.equal(1); + expect(inRepoAddons.length).to.equal(2); + expect(inRepoAddons[0].realPath.indexOf(`simple${path.sep}lib${path.sep}ember-super-button`)).to.be.above(0); expect(inRepoAddons[0].pkg.name).to.equal('ember-super-button'); + + expect( + inRepoAddons[1].realPath.indexOf( + `simple${path.sep}lib${path.sep}ember-super-button${path.sep}lib${path.sep}ember-with-addon-main` + ) + ).to.be.above(0); + expect(inRepoAddons[1].pkg.name).to.equal('ember-with-addon-main'); }); it('shows projectPackageInfo has 7 internal addon packages', function () { @@ -172,6 +181,60 @@ describe('models/package-info-cache/package-info-cache-test.js', function () { expect(nodeModules.entries).to.exist; expect(Object.keys(nodeModules.entries).length).to.equal(9); }); + + it('returns stable package infos for a package info representing the same addon', function () { + project.initializeAddons(); + + const findAddonsByName = (projectOrAddon, addonToFind, _foundAddons = []) => { + if (!projectOrAddon) { + return _foundAddons; + } + + projectOrAddon.addons.forEach((addon) => { + if (addon.name === addonToFind) { + _foundAddons.push(addon); + } + + findAddonsByName(addon, addonToFind, _foundAddons); + }); + + return _foundAddons; + }; + + const findAllInRepoPackageInfosByPredicate = (packageInfo, predicate, _foundPackageInfos = []) => { + if (predicate(packageInfo)) { + _foundPackageInfos.push(packageInfo); + } + + (packageInfo.inRepoAddons || []).forEach((addonPackageInfo) => + findAllInRepoPackageInfosByPredicate(addonPackageInfo, predicate, _foundPackageInfos) + ); + + return _foundPackageInfos; + }; + + let allAddonsWithAddonMain = findAddonsByName(project, 'ember-with-addon-main'); + + let projectAddonWithMainPackageInfo = findAllInRepoPackageInfosByPredicate( + project._packageInfo, + (packageInfo) => + typeof packageInfo.addonMainPath === 'string' && + packageInfo.addonMainPath.endsWith(path.join('ember-with-addon-main', 'lib', 'main.js')) + ); + + let allPackageInfosForAddonWithMain = [ + ...allAddonsWithAddonMain.map((addon) => addon._packageInfo), + ...projectAddonWithMainPackageInfo, + ]; + + let areAllPackageInfosEqual = allPackageInfosForAddonWithMain.every( + (packageInfo) => packageInfo === allPackageInfosForAddonWithMain[0] + ); + + expect(allAddonsWithAddonMain.length).to.equal(2); + expect(allPackageInfosForAddonWithMain.length).to.equal(4); + expect(areAllPackageInfosEqual).to.equal(true); + }); }); describe('packageInfo', function () { diff --git a/tests/unit/models/project-test.js b/tests/unit/models/project-test.js index c24f0fbe44..f03b754225 100644 --- a/tests/unit/models/project-test.js +++ b/tests/unit/models/project-test.js @@ -347,6 +347,7 @@ describe('models/project.js', function () { 'ember-non-root-addon', 'ember-random-addon', 'ember-super-button', + 'ember-with-addon-main', ]; expect(Object.keys(project.addonPackages)).to.deep.equal(expected); }); From b7fb4683d8e5f35283398d66099a0cc37a813fda Mon Sep 17 00:00:00 2001 From: Brenden Palmer Date: Tue, 11 May 2021 11:05:36 -0400 Subject: [PATCH 753/818] update tests --- tests/unit/broccoli/addon/linting-test.js | 1 + tests/unit/broccoli/addon/module-name-test.js | 1 + tests/unit/broccoli/ember-app-test.js | 2 ++ .../broccoli/template-precompilation-test.js | 1 + tests/unit/models/addon-test.js | 17 ++++++++++++++++- 5 files changed, 21 insertions(+), 1 deletion(-) diff --git a/tests/unit/broccoli/addon/linting-test.js b/tests/unit/broccoli/addon/linting-test.js index e999de66e0..6d18f159d6 100644 --- a/tests/unit/broccoli/addon/linting-test.js +++ b/tests/unit/broccoli/addon/linting-test.js @@ -18,6 +18,7 @@ describe('Addon - linting', function () { let MockAddon = Addon.extend({ name: 'first', root: input.path(), + packageRoot: input.path(), }); lintTrees = []; let cli = new MockCLI(); diff --git a/tests/unit/broccoli/addon/module-name-test.js b/tests/unit/broccoli/addon/module-name-test.js index f265f74dae..9a4daf7316 100644 --- a/tests/unit/broccoli/addon/module-name-test.js +++ b/tests/unit/broccoli/addon/module-name-test.js @@ -18,6 +18,7 @@ describe('Addon - moduleName', function () { input = await createTempDir(); let MockAddon = Addon.extend({ root: input.path(), + packageRoot: input.path(), name: 'fake-addon', moduleName() { return 'totes-not-fake-addon'; diff --git a/tests/unit/broccoli/ember-app-test.js b/tests/unit/broccoli/ember-app-test.js index 7c51260fbb..a982a63a33 100644 --- a/tests/unit/broccoli/ember-app-test.js +++ b/tests/unit/broccoli/ember-app-test.js @@ -299,6 +299,7 @@ describe('EmberApp', function () { let AddonFoo = Addon.extend({ root: 'foo', + packageRoot: 'foo', name: 'foo', }); let addonFoo = new AddonFoo(app, project); @@ -330,6 +331,7 @@ describe('EmberApp', function () { let AddonFoo = Addon.extend({ root: 'foo', + packageRoot: 'foo', name: 'foo', treeForStyles() { return addonFooStyles.path(); diff --git a/tests/unit/broccoli/template-precompilation-test.js b/tests/unit/broccoli/template-precompilation-test.js index 1a321a5193..c1aeddc894 100644 --- a/tests/unit/broccoli/template-precompilation-test.js +++ b/tests/unit/broccoli/template-precompilation-test.js @@ -60,6 +60,7 @@ describe('template preprocessors', function () { input = await createTempDir(); let MockAddon = Addon.extend({ root: input.path(), + packageRoot: input.path(), name: 'fake-addon', }); let cli = new MockCLI(); diff --git a/tests/unit/models/addon-test.js b/tests/unit/models/addon-test.js index 4098150535..b77ec380f9 100644 --- a/tests/unit/models/addon-test.js +++ b/tests/unit/models/addon-test.js @@ -37,6 +37,7 @@ describe('models/addon.js', function () { let TheAddon = Addon.extend({ name: 'such name', root: path.resolve(fixturePath, 'simple'), + packageRoot: path.resolve(fixturePath, 'simple'), _warn(message) { warning = `${message}`; }, @@ -62,6 +63,7 @@ describe('models/addon.js', function () { FirstAddon = Addon.extend({ name: 'first', root: projectPath, + packageRoot: projectPath, init() { this._super.apply(this, arguments); @@ -73,6 +75,7 @@ describe('models/addon.js', function () { SecondAddon = Addon.extend({ name: 'first', root: projectPath, + packageRoot: projectPath, init() { this._super.apply(this, arguments); @@ -271,7 +274,7 @@ describe('models/addon.js', function () { }); it('must define a `name` property', function () { - let Foo = Addon.extend({ root: 'foo' }); + let Foo = Addon.extend({ root: 'foo', packageRoot: 'foo' }); expect(() => { new Foo(project); @@ -285,6 +288,7 @@ describe('models/addon.js', function () { let MyAddon = Addon.extend({ name: 'test-project', root: 'foo', + packageRoot: 'foo', }); let projectPath = path.resolve(fixturePath, 'simple'); @@ -362,6 +366,7 @@ describe('models/addon.js', function () { describe('findOwnAddonByName', function () { let ThisAddon = Addon.extend({ root: 'foo', + packageRoot: 'foo', name: 'this-addon', }); @@ -400,6 +405,7 @@ describe('models/addon.js', function () { let MyAddon = Addon.extend({ name: 'test-project', root: 'foo', + packageRoot: 'foo', }); let projectPath = path.resolve(fixturePath, 'simple'); @@ -690,6 +696,7 @@ describe('models/addon.js', function () { let AddonTemp = Addon.extend({ name: 'temp', root: 'foo', + packageRoot: 'foo', }); addon = new AddonTemp(project, project); @@ -714,6 +721,7 @@ describe('models/addon.js', function () { let BaseAddon = Addon.extend({ name: 'test-project', root: projectPath, + packageRoot: projectPath, }); addon = new BaseAddon(project, project); @@ -742,6 +750,7 @@ describe('models/addon.js', function () { let MyAddon = Addon.extend({ name: 'test-project', root: 'foo', + packageRoot: 'foo', }); let projectPath = path.resolve(fixturePath, 'simple'); @@ -807,6 +816,7 @@ describe('models/addon.js', function () { Addon.extend({ name: 'test-project', root: 'foo', + packageRoot: 'foo', treeForApp() {}, }) ); @@ -819,6 +829,7 @@ describe('models/addon.js', function () { Addon.extend({ name: 'test-project', root: 'foo', + packageRoot: 'foo', compileAddon() {}, }) ); @@ -831,6 +842,7 @@ describe('models/addon.js', function () { Addon.extend({ name: 'test-project', root: 'foo', + packageRoot: 'foo', init() { this._super && this._super.init.apply(this, arguments); @@ -847,6 +859,7 @@ describe('models/addon.js', function () { Addon.extend({ name: 'test-project', root: 'foo', + packageRoot: 'foo', }) ); @@ -863,6 +876,7 @@ describe('models/addon.js', function () { Addon.extend({ name: 'test-project', root: path.join(projectPath, 'node_modules', 'ember-generated-with-export-addon'), + packageRoot: path.join(projectPath, 'node_modules', 'ember-generated-with-export-addon'), treeForAddon(tree) { return tree; }, @@ -879,6 +893,7 @@ describe('models/addon.js', function () { let addonProto = { name: 'test-project', root: path.join(projectPath, 'node_modules', 'ember-generated-with-export-addon'), + packageRoot: path.join(projectPath, 'node_modules', 'ember-generated-with-export-addon'), treeForAddon(tree) { return tree; }, From 69c236c2a158d5a33bb34aac92a9c0e462b8fc3b Mon Sep 17 00:00:00 2001 From: Brenden Palmer Date: Tue, 11 May 2021 11:14:57 -0400 Subject: [PATCH 754/818] empty From 11c42cf82cc4d819c8246ba4d595f57b82db73e8 Mon Sep 17 00:00:00 2001 From: Dave Combs Date: Tue, 11 May 2021 12:15:57 -0700 Subject: [PATCH 755/818] replaced SUPPORT_ADDON_INSTANCE_CACHING (one-time eval) with function isEnabled to eval every time if caching enabled. --- lib/models/package-info-cache/package-info.js | 2 +- lib/models/per-bundle-addon-cache/index.js | 6 +++++- lib/models/project.js | 4 ++-- .../per-bundle-addon-cache/enable-cache-test.js | 15 +++++---------- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/lib/models/package-info-cache/package-info.js b/lib/models/package-info-cache/package-info.js index f8a9d154f4..b3e96b986d 100644 --- a/lib/models/package-info-cache/package-info.js +++ b/lib/models/package-info-cache/package-info.js @@ -520,7 +520,7 @@ class PackageInfo { let ctor = this.getAddonConstructor(); let addonInstance; - if (PerBundleAddonCache.SUPPORT_ADDON_INSTANCE_CACHING && this.allowCachingPerBundle(ctor)) { + if (PerBundleAddonCache.isEnabled() && this.allowCachingPerBundle(ctor)) { addonInstance = project.perBundleAddonCache.getAddonInstance(parent, this); } else { addonInstance = this.constructAddonInstance(parent, project); diff --git a/lib/models/per-bundle-addon-cache/index.js b/lib/models/per-bundle-addon-cache/index.js index 226a8ffaa3..e5e5064b99 100644 --- a/lib/models/per-bundle-addon-cache/index.js +++ b/lib/models/per-bundle-addon-cache/index.js @@ -384,4 +384,8 @@ module.exports = PerBundleAddonCache; // Support for per-bundle addon caching is GLOBAL opt OUT (unless you explicitly set // EMBER_CLI_ADDON_INSTANCE_CACHING to false, it will be enabled.) If you opt out, that // overrides setting `allowCachingPerBundle` for any particular addon type to true. -module.exports.SUPPORT_ADDON_INSTANCE_CACHING = process.env.EMBER_CLI_ADDON_INSTANCE_CACHING !== 'false'; +// To help make testing easier, we'll expose the setting as a function so it can be +// called multiple times and evaluate each time. +module.exports.isEnabled = function () { + return process.env.EMBER_CLI_ADDON_INSTANCE_CACHING !== 'false'; +}; diff --git a/lib/models/project.js b/lib/models/project.js index b058387043..f613d3982b 100644 --- a/lib/models/project.js +++ b/lib/models/project.js @@ -98,7 +98,7 @@ class Project { this.packageInfoCache.showErrors(); } - if (PerBundleAddonCache.SUPPORT_ADDON_INSTANCE_CACHING) { + if (PerBundleAddonCache.isEnabled()) { this.perBundleAddonCache = new PerBundleAddonCache(this); } } @@ -593,7 +593,7 @@ class Project { this.packageInfoCache.reloadProjects(); - if (PerBundleAddonCache.SUPPORT_ADDON_INSTANCE_CACHING) { + if (PerBundleAddonCache.isEnabled()) { this.perBundleAddonCache = new PerBundleAddonCache(this); } diff --git a/tests/unit/models/per-bundle-addon-cache/enable-cache-test.js b/tests/unit/models/per-bundle-addon-cache/enable-cache-test.js index 538a80330c..b89d9f6222 100644 --- a/tests/unit/models/per-bundle-addon-cache/enable-cache-test.js +++ b/tests/unit/models/per-bundle-addon-cache/enable-cache-test.js @@ -5,6 +5,7 @@ */ const expect = require('chai').expect; const { createStandardCacheFixture } = require('../../../../tests/helpers/per-bundle-addon-cache'); +const Project = require('../../../../lib/models/project'); function enablePerBundleAddonCache(explicitValue) { // default is opt-out @@ -19,23 +20,17 @@ function disablePerBundleAddonCache() { process.env.EMBER_CLI_ADDON_INSTANCE_CACHING = false; } -function rerequire(modulePath) { - delete require.cache[require.resolve(modulePath)]; - return require(modulePath); -} - -// To test environment vars, we have to purge the require cache of 'Project' and 'PerBundleAddonCache' and rerequire it. -// For simplicity we'll do that here. function createProject() { - rerequire('../../../../lib/models/per-bundle-addon-cache'); - const Project = rerequire('../../../../lib/models/project'); - let fixture = createStandardCacheFixture(); let project = fixture.buildProjectModel(Project); return project; } describe('Unit | per-bundle-addon-cache enable caching', function () { + afterEach(function () { + enablePerBundleAddonCache(); + }); + it('perBundleAddonCache should be set in Project if EMBER_CLI_ADDON_INSTANCE_CACHING is not false', function () { enablePerBundleAddonCache('foo'); let project = createProject(); From 6231ac18e241758400730bf93e77b5f1a16e8ea1 Mon Sep 17 00:00:00 2001 From: Dave Combs Date: Tue, 11 May 2021 18:57:37 -0700 Subject: [PATCH 756/818] trigger CI From b54474a2dc5c48d1abd10ca83e82f1b8d0e62cda Mon Sep 17 00:00:00 2001 From: Dave Combs Date: Fri, 14 May 2021 16:38:20 -0700 Subject: [PATCH 757/818] reworked to use new methods addReferenceDependency, addReferenceDevDependency and added method documentation --- tests/helpers/fixturify-project.js | 244 +++++++++++++----- .../per-bundle-addon-cache/proxy-test.js | 65 ++--- 2 files changed, 204 insertions(+), 105 deletions(-) diff --git a/tests/helpers/fixturify-project.js b/tests/helpers/fixturify-project.js index 26f554237c..292b0ac6c1 100644 --- a/tests/helpers/fixturify-project.js +++ b/tests/helpers/fixturify-project.js @@ -1,7 +1,6 @@ 'use strict'; const path = require('path'); -const fs = require('fs-extra'); const merge = require('ember-cli-lodash-subset').merge; const FixturifyProject = require('fixturify-project'); const Project = require('../../lib/models/project'); @@ -43,42 +42,8 @@ function getOptionsObjectWithCallbackFunction(defaultOptions, optionsOrCallback) } module.exports = class EmberCLIFixturifyProject extends FixturifyProject { - // we can't do this in the constructor since we need access to this as part of - // `super`; we create the `Set` as necessary upon first access, and subsequently - // we just return the previously created `Set` - get _inRepoAddonsWithSharedDependencies() { - if (!this.__inRepoAddonsWithSharedDependencies) { - this.__inRepoAddonsWithSharedDependencies = new Set(); - } - - return this.__inRepoAddonsWithSharedDependencies; - } - - // same reason as above, we can't do this in the constructor since we need access - // to this as part of `super` - get _addonsWithSharedDependencies() { - if (!this.__addonsWithSharedDependencies) { - this.__addonsWithSharedDependencies = new Set(); - } - - return this.__addonsWithSharedDependencies; - } - writeSync() { super.writeSync(...arguments); - - // remove in-repo addons `node_modules` that should be hoisted - for (const name of this._inRepoAddonsWithSharedDependencies) { - const pathToAddonNodeModules = path.join(this.baseDir, 'lib', name, 'node_modules'); - fs.removeSync(pathToAddonNodeModules); - } - - // remove addons in `node_modules` that should be hoisted - for (const name of this._addonsWithSharedDependencies) { - const pathToAddonNodeModules = path.join(this.baseDir, 'node_modules', name, 'node_modules'); - fs.removeSync(pathToAddonNodeModules); - } - this._hasWritten = true; } @@ -98,28 +63,98 @@ module.exports = class EmberCLIFixturifyProject extends FixturifyProject { return new ProjectClass(root, pkg, cli.ui, cli); } + /** + * Add an entry for this object's `dependencies` list. When this object is written out, the + * dependency will also then write out appropriate files in this object's `node_modules' subdirectory. + * + * @param {String} name name of the dependency to add + * @param {String} version version of the dependency to add + * @param {Object|Function} optionsOrCallback options to configure the new FixturifyProject, or a callback function to call after creating + * the dependency's FixturifyProject. If the parameter is a function, it will be assumed to be a callback function. If instead + * the parameter is an object, a callback function can be provided using the property 'callback' in the object. + * @returns the new FixturifyProject + */ addDependency(name, version, optionsOrCallback) { - const options = getOptionsObjectWithCallbackFunction({ shouldShareDependencies: false }, optionsOrCallback); + const options = getOptionsObjectWithCallbackFunction(optionsOrCallback); + return super.addDependency(name, version, options.callback); + } - // if we should share dependencies (i.e., if these dependencies are hoisted) - if (options.shouldShareDependencies) { - this._addonsWithSharedDependencies.add(name); + /** + * Add a 'reference' entry to this object's `dependencies` list. A 'reference' dependency is + * an entry in `dependencies` where the caller knows the dependency's source files are being + * created elsewhere in the project tree, so no source files should be created locally in + * `node_modules`, which is the standard FixturifyProject (and node-fixturify-project) behavior. + * We do this by adding the necessary reference to `dependencies` during `toJSON`. + * + * This is used when two addons wish to share a single definition on disk for a dependency (various parts of + * ember-cli optimize processing based on paths on disk.) + * + * Because there is no FixturifyProject being created, no callback is given as in other methods. + * + * @param {String} name name of the dependency + * @param {String} version version of the dependency, defaults to '*'. For our purposes, '*' means + * "whatever version was specified elsewhere." + */ + addReferenceDependency(name, version = '*') { + if (!this._referenceDependencies) { + this._referenceDependencies = {}; } - return super.addDependency(name, version, options.callback); + this._referenceDependencies[name] = version; } + /** + * Add an entry to this object's `devDependencies` list. When this object is written out, the + * dependency will also then write out appropriate files in this object's `node_modules' subdirectory. + * + * @param {String} name name of the dev dependency to add + * @param {String} version version of the dev dependency to add + * @param {Object|Function} optionsOrCallback options to configure the new FixturifyProject, or a callback function to call after creating + * the dependency's FixturifyProject. If the parameter is a function, it will be assumed to be a callback function. If instead + * the parameter is an object, a callback function can be provided using the property 'callback' in the object. + * @returns the new FixturifyProject + */ addDevDependency(name, version, optionsOrCallback) { - const options = getOptionsObjectWithCallbackFunction({ shouldShareDependencies: false }, optionsOrCallback); + const options = getOptionsObjectWithCallbackFunction(optionsOrCallback); + return super.addDevDependency(name, version, options.callback); + } - // if we should share dependencies (i.e., if these dependencies are hoisted) - if (options.shouldShareDependencies) { - this._addonsWithSharedDependencies.add(name); + /** + * Add a 'reference' entry to this object's `devDependencies` list. A 'reference' devDependency is + * an entry in `devDependencies` where the caller knows the dependency's source files are being + * created elsewhere in the project tree, so no source files should be created locally in + * `node_modules`, which is the standard FixturifyProject (and node-fixturify-project) behavior. + * We do this by adding the necessary reference to `devDependencies` during `toJSON`. + * + * This is used when two addons wish to share a single definition on disk for a devDependency + * (various parts of ember-cli optimize processing based on paths on disk.) + * + * Because there is no FixturifyProject being created, no callback is given as in other methods. + * + * @param {String} name name of the devDependency + * @param {String} version version of the devDependency, defaults to '*'. For our purposes, '*' means + * "whatever version was specified elsewhere." + */ + addReferenceDevDependency(name, version = '*') { + if (!this._referenceDevDependencies) { + this._referenceDevDependencies = {}; } - return super.addDevDependency(name, version, options.callback); + this._referenceDevDependencies[name] = version; } + /** + * Add an addon to this object's `dependencies` list. The addon files will be written in + * this object's `node_modules/` directory when this object is written out. + * + * @param {String} name name of the addon + * @param {String} version version of the addon, defaults to '0.0.0' + * @param {Object|Function} optionsOrCallback an object consisting of properties and values to apply when creating + * the addon, or a callback function to pass the newly-created FixturifyProject to. Important options + * include 'allowCachingPerBundle' (true if the addon can be proxied, defaults to false) and 'callback' (if you want to include + * a callback function while also specifying other properties.) + * @returns {FixturifyProject} the newly-created addon + */ addAddon(name, version = '0.0.0', optionsOrCallback) { const options = getOptionsObjectWithCallbackFunction({ allowCachingPerBundle: false }, optionsOrCallback); @@ -136,6 +171,18 @@ module.exports = class EmberCLIFixturifyProject extends FixturifyProject { }); } + /** + * Add an addon to this object's `devDependencies` list. The addon files will be written in + * this object's `node_modules/` directory when this object is written out. + * + * @param {String} name name of the addon + * @param {String} version version of the addon, defaults to '0.0.0' + * @param {Object|Function} optionsOrCallback an object consisting of properties and values to apply when creating + * the addon, or a callback function to pass the newly-created FixturifyProject to. Important options + * include 'allowCachingPerBundle' (true if the addon can be proxied, defaults to false) and 'callback' (if you want to include + * a callback function while also specifying other properties.) + * @returns {FixturifyProject} the newly-created addon + */ addDevAddon(name, version = '0.0.0', optionsOrCallback) { const options = getOptionsObjectWithCallbackFunction({ allowCachingPerBundle: false }, optionsOrCallback); @@ -152,11 +199,20 @@ module.exports = class EmberCLIFixturifyProject extends FixturifyProject { }); } - addEngine( - name, - version = '0.0.0', - options = { allowCachingPerBundle: false, shouldShareDependencies: false, enableLazyLoading: false } - ) { + /** + * Add an addon to this object's `dependencies` list. The engine's addon files will be written in + * this object's `node_modules/` directory when this object is written out. + * + * @param {String} name name of the engine + * @param {String} version version of the engine, defaults to '0.0.0' + * @param {Object|Function} optionsOrCallback an object consisting of properties and values to apply when creating + * the engine, or a callback function to pass the newly-created FixturifyProject to. Important options + * include 'allowCachingPerBundle' (true if the engine can be proxied, defaults to false), 'enableLazyLoading' (true + * if the engine is to be lazily loaded, defaults to false) and 'callback' (if you want to include + * a callback function while also specifying other properties.) + * @returns {FixturifyProject} the newly-created engine addon + */ + addEngine(name, version = '0.0.0', options = { allowCachingPerBundle: false, enableLazyLoading: false }) { const callback = (engine) => { engine.pkg.keywords.push('ember-engine'); @@ -177,17 +233,20 @@ module.exports = class EmberCLIFixturifyProject extends FixturifyProject { return this.addAddon(name, version, { ...options, callback }); } + /** + * Add an in-repo addon to this object. The addon files will be written in + * this object's `lib/` directory when this object is written out. + * + * @param {String} name name of the addon + * @param {String} version version of the addon, defaults to '0.0.0' + * @param {Object|Function} optionsOrCallback an object consisting of properties and values to apply when creating + * the addon, or a callback function to pass the newly-created FixturifyProject to. Important options + * include 'allowCachingPerBundle' (true if the addon can be proxied, defaults to false) and 'callback' (if you want to include + * a callback function while also specifying other properties.) + * @returns {FixturifyProject} the newly-created addon + */ addInRepoAddon(name, version = '0.0.0', optionsOrCallback) { - const options = getOptionsObjectWithCallbackFunction( - { allowCachingPerBundle: false, shouldShareDependencies: true }, - optionsOrCallback - ); - - // if we should share dependencies (in-repo addons (in general) do not have a local `node_modules`) - // this defaults to `true` for in-repo addons/engines - if (options.shouldShareDependencies) { - this._inRepoAddonsWithSharedDependencies.add(name); - } + const options = getOptionsObjectWithCallbackFunction({ allowCachingPerBundle: false }, optionsOrCallback); const inRepoAddon = new EmberCLIFixturifyProject(name, version, (addon) => { prepareAddon(addon, options); @@ -219,11 +278,20 @@ module.exports = class EmberCLIFixturifyProject extends FixturifyProject { Object.assign(this.files[addonRootDir], addonJSON); } - addInRepoEngine( - name, - version = '0.0.0', - options = { allowCachingPerBundle: false, shouldShareDependencies: true, enableLazyLoading: false } - ) { + /** + * Add an in-repo engine to this object. The engine files will be written in + * this object's `lib/` directory when this object is written out. + * + * @param {String} name name of the engine + * @param {String} version version of the engine, defaults to '0.0.0' + * @param {Object|Function} optionsOrCallback an object consisting of properties and values to apply when creating + * the engine, or a callback function to pass the newly-created FixturifyProject to. Important options + * include 'allowCachingPerBundle' (true if the addon can be proxied, defaults to false), 'enableLazyLoading' (true + * if the engine is to be lazily loaded, defaults to false) and 'callback' (if you want to include + * a callback function while also specifying other properties.) + * @returns {FixturifyProject} the newly-created addon + */ + addInRepoEngine(name, version = '0.0.0', options = { allowCachingPerBundle: false, enableLazyLoading: false }) { const callback = (engine) => { engine.pkg.keywords.push('ember-engine'); @@ -243,4 +311,50 @@ module.exports = class EmberCLIFixturifyProject extends FixturifyProject { return this.addInRepoAddon(name, version, { ...options, callback }); } + + /** + * Convert the object into a data structure suitable for passing to `fixturify`. + * + * @param {String} key optional key. If specified, the object will be run through toJSON, then the given + * property extracted and returned. + * @returns {Object} the `toJSON` value of the object (wrapped) or the toJSON value of the specified field + * (not wrapped.) + */ + toJSON(key) { + if (key) { + return super.toJSON(key); + } + + let jsonData = super.toJSON(); + let pkg; + + if (this._referenceDependencies) { + pkg = JSON.parse(jsonData[this.name]['package.json']); + if (!pkg.dependencies) { + pkg.dependencies = {}; + } + + Object.assign(pkg.dependencies, this._referenceDependencies); + } + + if (this._referenceDevDependencies) { + pkg = pkg || JSON.parse(jsonData[this.name]['package.json']); + if (!pkg.devDependencies) { + pkg.devDependencies = {}; + } + Object.assign(pkg.devDependencies, this._referenceDevDependencies); + } + + if (pkg) { + jsonData[this.name]['package.json'] = JSON.stringify(pkg); + } + + // an optimization to remove any node_modules declaration that has nothing in it, + // to avoid creating extra directories for no reason. + if (jsonData[this.name]['node_modules'] && Object.keys(jsonData[this.name]['node_modules']).length === 0) { + delete jsonData[this.name]['node_modules']; + } + + return jsonData; + } }; diff --git a/tests/unit/models/per-bundle-addon-cache/proxy-test.js b/tests/unit/models/per-bundle-addon-cache/proxy-test.js index 9dc2652b19..b99c27ff5d 100644 --- a/tests/unit/models/per-bundle-addon-cache/proxy-test.js +++ b/tests/unit/models/per-bundle-addon-cache/proxy-test.js @@ -65,14 +65,13 @@ describe('models/per-bundle-addon-cache', function () { expect(areAllInstancesEqualWithinHost(project, 'foo')).to.be.true; }); - it('it should create a proxy for a regular addon when added as a dependency to a regular addon', function () { + it('it should create a proxy for a regular addon when added as a dependency to an in-repo addon', function () { fixturifyProject.addAddon('foo', '1.0.0', { allowCachingPerBundle: true }); for (let i = 0; i < 10; i++) { - fixturifyProject.addAddon(`foo-bar-${i}`, '1.0.0', { - shouldShareDependencies: true, + fixturifyProject.addInRepoAddon(`foo-bar-${i}`, '1.0.0', { callback: (inRepoAddon) => { - inRepoAddon.addDependency('foo', '1.0.0'); + inRepoAddon.addReferenceDependency('foo', '1.0.0'); }, }); } @@ -85,14 +84,13 @@ describe('models/per-bundle-addon-cache', function () { expect(areAllInstancesEqualWithinHost(project, 'foo')).to.be.true; }); - it('it should create a proxy for a regular addon when added as a dependency to an in-repo addon', function () { + it('it should create a proxy for a regular addon when added as a dependency to a regular addon', function () { fixturifyProject.addAddon('foo', '1.0.0', { allowCachingPerBundle: true }); for (let i = 0; i < 10; i++) { fixturifyProject.addAddon(`foo-bar-${i}`, '1.0.0', { - shouldShareDependencies: true, - callback: (inRepoAddon) => { - inRepoAddon.addDependency('foo', '1.0.0'); + callback: (addon) => { + addon.addReferenceDependency('foo', '1.0.0'); }, }); } @@ -111,15 +109,14 @@ describe('models/per-bundle-addon-cache', function () { fixturifyProject.addInRepoEngine('in-repo-lazy-engine', '1.0.0', { enableLazyLoading: true, callback: (lazyEngine) => { - lazyEngine.addDependency('foo', '1.0.0'); - lazyEngine.addDependency('foo-bar', '1.0.0'); + lazyEngine.addReferenceDependency('foo', '1.0.0'); + lazyEngine.addReferenceDependency('foo-bar', '1.0.0'); }, }); fixturifyProject.addAddon('foo-bar', '1.0.0', { - shouldShareDependencies: true, - callback: (inRepoAddon) => { - inRepoAddon.addDependency('foo', '1.0.0'); + callback: (addon) => { + addon.addReferenceDependency('foo', '1.0.0'); }, }); @@ -154,15 +151,14 @@ describe('models/per-bundle-addon-cache', function () { fixturifyProject.addInRepoEngine('in-repo-lazy-engine', '1.0.0', { enableLazyLoading: true, callback: (lazyEngine) => { - lazyEngine.addDependency('foo', '1.0.0'); - lazyEngine.addDependency('foo-bar', '1.0.0'); + lazyEngine.addReferenceDependency('foo', '1.0.0'); + lazyEngine.addReferenceDependency('foo-bar', '1.0.0'); }, }); fixturifyProject.addAddon('foo-bar', '1.0.0', { - shouldShareDependencies: true, - callback: (inRepoAddon) => { - inRepoAddon.addDependency('foo', '1.0.0'); + callback: (addon) => { + addon.addReferenceDependency('foo', '1.0.0'); }, }); @@ -193,17 +189,15 @@ describe('models/per-bundle-addon-cache', function () { fixturifyProject.addEngine('lazy-engine-a', '1.0.0', { enableLazyLoading: true, - shouldShareDependencies: true, callback: (engine) => { - engine.addAddon('test-addon-a', '1.0.0'); + engine.addReferenceDependency('test-addon-a', '1.0.0'); }, }); fixturifyProject.addEngine('lazy-engine-b', '1.0.0', { enableLazyLoading: true, - shouldShareDependencies: true, callback: (engine) => { - engine.addAddon('test-addon-a', '1.0.0'); + engine.addReferenceDependency('test-addon-a', '1.0.0'); }, }); @@ -247,7 +241,6 @@ describe('models/per-bundle-addon-cache', function () { fixturifyProject.addInRepoEngine('lazy-engine-a', '1.0.0', { allowCachingPerBundle: true, enableLazyLoading: true, - shouldShareDependencies: true, callback: (engine) => { engine.pkg['ember-addon'].paths = ['../test-addon-a', '../test-addon-b']; }, @@ -256,7 +249,6 @@ describe('models/per-bundle-addon-cache', function () { fixturifyProject.addInRepoEngine('lazy-engine-b', '1.0.0', { allowCachingPerBundle: true, enableLazyLoading: true, - shouldShareDependencies: true, callback: (engine) => { engine.pkg['ember-addon'].paths = ['../test-addon-a', '../test-addon-b']; }, @@ -330,23 +322,20 @@ describe('models/per-bundle-addon-cache', function () { // PROJ to TAA, TAB, TAC and TAD. TAB, TAC and TAD have TAA underneath. fixturifyProject.addAddon('test-addon-a', '1.0.0', { allowCachingPerBundle: true }); fixturifyProject.addAddon('test-addon-b', '1.0.0', { - shouldShareDependencies: true, callback: (addon) => { - addon.addAddon('test-addon-a', '1.0.0'); + addon.addReferenceDependency('test-addon-a', '*'); }, }); fixturifyProject.addAddon('test-addon-c', '1.0.0', { - shouldShareDependencies: true, callback: (addon) => { - addon.addAddon('test-addon-a', '1.0.0'); + addon.addReferenceDependency('test-addon-a', '*'); }, }); fixturifyProject.addAddon('test-addon-d', '1.0.0', { - shouldShareDependencies: true, callback: (addon) => { - addon.addAddon('test-addon-a', '1.0.0'); + addon.addReferenceDependency('test-addon-a', '1.0.0'); }, }); @@ -409,7 +398,7 @@ describe('models/per-bundle-addon-cache', function () { it('addon with allowCachingPerBundle, 1 in each of 2 lazy engines', function () { // Same as above, but regular-engine-b is now lazy-engine-b - // Should have 2 instances, 1 in LEA, 1 in LEB + // Should have 2 instances, 1 in LEA, 1 in LEB, separate paths. fixturifyProject.addEngine('lazy-engine-a', '1.0.0', { enableLazyLoading: true, callback: (engine) => { @@ -452,17 +441,15 @@ describe('models/per-bundle-addon-cache', function () { fixturifyProject.addEngine('lazy-engine-a', '1.0.0', { enableLazyLoading: true, - shouldShareDependencies: true, callback: (engine) => { - engine.addAddon('test-addon-a', '1.0.0'); + engine.addReferenceDependency('test-addon-a'); }, }); fixturifyProject.addEngine('lazy-engine-b', '1.0.0', { enableLazyLoading: true, - shouldShareDependencies: true, callback: (engine) => { - engine.addAddon('test-addon-a', '1.0.0'); + engine.addReferenceDependency('test-addon-a'); }, }); @@ -541,16 +528,14 @@ describe('models/per-bundle-addon-cache', function () { fixturifyProject.addAddon('test-addon-a', '1.0.0', { allowCachingPerBundle: true }); fixturifyProject.addEngine('regular-engine-a', '1.0.0', { - shouldShareDependencies: true, callback: (engine) => { - engine.addAddon('test-addon-a', '1.0.0'); + engine.addReferenceDependency('test-addon-a', '1.0.0'); }, }); fixturifyProject.addEngine('regular-engine-b', '1.0.0', { - shouldShareDependencies: true, callback: (engine) => { - engine.addAddon('test-addon-a', '1.0.0'); + engine.addReferenceDependency('test-addon-a', '1.0.0'); }, }); @@ -584,7 +569,7 @@ describe('models/per-bundle-addon-cache', function () { }); fixturifyProject.addInRepoAddon('test-addon-b', '1.0.0', { allowCachingPerBundle: true }); - fixturifyProject.pkg['ember-addon'].paths = []; + fixturifyProject.pkg['ember-addon'].paths = []; // project now 'doesn't know' about test-addon-b fixturifyProject.addInRepoEngine('lazy-engine-a', '1.0.0', { allowCachingPerBundle: true, From 00245ad46535cead33d447aeefc8ae590c2f294f Mon Sep 17 00:00:00 2001 From: Dave Combs Date: Fri, 14 May 2021 21:46:28 -0700 Subject: [PATCH 758/818] updated to support package names with scopes during toJSON() --- tests/helpers/fixturify-project.js | 53 ++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 17 deletions(-) diff --git a/tests/helpers/fixturify-project.js b/tests/helpers/fixturify-project.js index 292b0ac6c1..7a64ec04a9 100644 --- a/tests/helpers/fixturify-project.js +++ b/tests/helpers/fixturify-project.js @@ -41,6 +41,19 @@ function getOptionsObjectWithCallbackFunction(defaultOptions, optionsOrCallback) ); } +// Essentially a copy of the function in node-fixturify-project, converted from TS to JS. +// We need this for use during toJSON(). +function parseScoped(name) { + let matched = name.match(/(@[^@\/]+)\/(.*)/); + if (matched) { + return { + scope: matched[1], + name: matched[2], + }; + } + return null; +} + module.exports = class EmberCLIFixturifyProject extends FixturifyProject { writeSync() { super.writeSync(...arguments); @@ -326,33 +339,39 @@ module.exports = class EmberCLIFixturifyProject extends FixturifyProject { } let jsonData = super.toJSON(); - let pkg; - if (this._referenceDependencies) { - pkg = JSON.parse(jsonData[this.name]['package.json']); - if (!pkg.dependencies) { - pkg.dependencies = {}; + let scoped = parseScoped(this.name); + + // Allowing for scoped names, get the object in the JSON structure that corresponds + // to this FixturifyProject. + let container = scoped ? jsonData[scoped.scope][scoped.name] : jsonData[this.name]; + + if (this._referenceDependencies || this._referenceDevDependencies) { + let pkg = JSON.parse(container['package.json']); + + if (this._referenceDependencies) { + if (!pkg.dependencies) { + pkg.dependencies = {}; + } + + Object.assign(pkg.dependencies, this._referenceDependencies); } - Object.assign(pkg.dependencies, this._referenceDependencies); - } + if (this._referenceDevDependencies) { + if (!pkg.devDependencies) { + pkg.devDependencies = {}; + } - if (this._referenceDevDependencies) { - pkg = pkg || JSON.parse(jsonData[this.name]['package.json']); - if (!pkg.devDependencies) { - pkg.devDependencies = {}; + Object.assign(pkg.devDependencies, this._referenceDevDependencies); } - Object.assign(pkg.devDependencies, this._referenceDevDependencies); - } - if (pkg) { - jsonData[this.name]['package.json'] = JSON.stringify(pkg); + container['package.json'] = JSON.stringify(pkg); } // an optimization to remove any node_modules declaration that has nothing in it, // to avoid creating extra directories for no reason. - if (jsonData[this.name]['node_modules'] && Object.keys(jsonData[this.name]['node_modules']).length === 0) { - delete jsonData[this.name]['node_modules']; + if (container['node_modules'] && Object.keys(container['node_modules']).length === 0) { + delete container['node_modules']; } return jsonData; From 81e37f19f0ce577f64c67018ca3c4f93cf24495e Mon Sep 17 00:00:00 2001 From: Dave Combs Date: Fri, 14 May 2021 22:59:03 -0700 Subject: [PATCH 759/818] fixing lint error --- tests/helpers/fixturify-project.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/helpers/fixturify-project.js b/tests/helpers/fixturify-project.js index 7a64ec04a9..6ff426e918 100644 --- a/tests/helpers/fixturify-project.js +++ b/tests/helpers/fixturify-project.js @@ -44,7 +44,7 @@ function getOptionsObjectWithCallbackFunction(defaultOptions, optionsOrCallback) // Essentially a copy of the function in node-fixturify-project, converted from TS to JS. // We need this for use during toJSON(). function parseScoped(name) { - let matched = name.match(/(@[^@\/]+)\/(.*)/); + let matched = name.match(/(@[^@/]+)\/(.*)/); if (matched) { return { scope: matched[1], From 80b81e7fbe3dd9b39818eb27375b4897d166ef3c Mon Sep 17 00:00:00 2001 From: Brenden Palmer Date: Thu, 20 May 2021 12:12:26 -0400 Subject: [PATCH 760/818] ensure backwards compatibility is maintained with `root` --- lib/models/package-info-cache/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/models/package-info-cache/index.js b/lib/models/package-info-cache/index.js index 71f4b1004c..295c45bbe9 100644 --- a/lib/models/package-info-cache/index.js +++ b/lib/models/package-info-cache/index.js @@ -244,7 +244,9 @@ class PackageInfoCache { * No copy is made. */ loadAddon(addonInstance) { - let pkgInfo = this._readPackage(addonInstance.packageRoot, addonInstance.pkg); + // to maintain backwards compatibility for consumers who create a new instance + // of the base addon model class directly and don't set `packageRoot` + let pkgInfo = this._readPackage(addonInstance.packageRoot || addonInstance.root, addonInstance.pkg); // NOTE: the returned pkgInfo may contain errors, or may contain // other packages that have errors. We will try to process From 1c55f97bd6f49f7f0c30a67b415d82102bf5ef85 Mon Sep 17 00:00:00 2001 From: Brenden Palmer Date: Fri, 21 May 2021 16:29:31 -0400 Subject: [PATCH 761/818] avoid setting `root` as `realPath` from the package-info object --- lib/models/addon.js | 8 +++---- tests/acceptance/addon-smoke-test-slow.js | 21 +++++++++++++++++++ .../addon/nested-addon-main/package.json | 18 ++++++++++++++++ .../src/addon/components/simple-component.js | 6 ++++++ .../templates/components/simple-component.hbs | 1 + .../addon/nested-addon-main/src/main.js | 5 +++++ 6 files changed, 55 insertions(+), 4 deletions(-) create mode 100644 tests/fixtures/addon/nested-addon-main/package.json create mode 100644 tests/fixtures/addon/nested-addon-main/src/addon/components/simple-component.js create mode 100644 tests/fixtures/addon/nested-addon-main/src/addon/templates/components/simple-component.hbs create mode 100644 tests/fixtures/addon/nested-addon-main/src/main.js diff --git a/lib/models/addon.js b/lib/models/addon.js index c479b65350..dabc6b9127 100644 --- a/lib/models/addon.js +++ b/lib/models/addon.js @@ -317,9 +317,6 @@ let addonProto = { this._packageInfo = this.packageInfoCache.loadAddon(this); - // force us to use the real path as the root. - this.root = this._packageInfo.realPath; - p.setupRegistry(this); this._initDefaultBabelOptions(); @@ -444,7 +441,10 @@ let addonProto = { * @method discoverAddons */ discoverAddons() { - let pkgInfo = this.packageInfoCache.getEntry(this.root); + // prefer `packageRoot`, fallback to `root`; this is to maintain backwards compatibility for + // consumers who create a new instance of the base addon model class directly and don't set + // `packageRoot` + let pkgInfo = this.packageInfoCache.getEntry(this.packageRoot || this.root); if (pkgInfo) { let addonPackageList = pkgInfo.discoverAddonAddons(); diff --git a/tests/acceptance/addon-smoke-test-slow.js b/tests/acceptance/addon-smoke-test-slow.js index 06596f112c..af51a70250 100644 --- a/tests/acceptance/addon-smoke-test-slow.js +++ b/tests/acceptance/addon-smoke-test-slow.js @@ -99,6 +99,27 @@ describe('Acceptance: addon-smoke-test', function () { expect(result.code).to.eql(0); }); + it("works for addon's that specify a nested addon entry point", async function () { + await copyFixtureFiles('addon/nested-addon-main'); + + let packageJsonPath = path.join(addonRoot, 'package.json'); + let packageJson = fs.readJsonSync(packageJsonPath); + + expect(packageJson.devDependencies['ember-source']).to.not.be.empty; + expect(packageJson.devDependencies['ember-cli']).to.not.be.empty; + + fs.writeJsonSync(packageJsonPath, packageJson); + + let result = await runCommand('node_modules/ember-cli/bin/ember', 'build'); + + expect(result.code).to.eql(0); + let contents; + + let indexPath = path.join(addonRoot, 'dist', 'assets', 'vendor.js'); + contents = fs.readFileSync(indexPath, { encoding: 'utf8' }); + expect(contents).to.contain('"nested-addon-main/components/simple-component"'); + }); + it('npm pack does not include unnecessary files', async function () { let handleError = function (error, commandName) { if (error.code === 'ENOENT') { diff --git a/tests/fixtures/addon/nested-addon-main/package.json b/tests/fixtures/addon/nested-addon-main/package.json new file mode 100644 index 0000000000..78a5d6a7c9 --- /dev/null +++ b/tests/fixtures/addon/nested-addon-main/package.json @@ -0,0 +1,18 @@ +{ + "name": "nested-addon-main", + "version": "0.0.1", + "keywords": [ + "ember-addon" + ], + "dependencies": { + "ember-cli-htmlbars": "latest", + "ember-cli-babel": "latest" + }, + "devDependencies": { + "ember-source": "latest", + "ember-cli": "latest" + }, + "ember-addon": { + "main": "src/main.js" + } +} diff --git a/tests/fixtures/addon/nested-addon-main/src/addon/components/simple-component.js b/tests/fixtures/addon/nested-addon-main/src/addon/components/simple-component.js new file mode 100644 index 0000000000..dde1898656 --- /dev/null +++ b/tests/fixtures/addon/nested-addon-main/src/addon/components/simple-component.js @@ -0,0 +1,6 @@ +import Component from '@ember/component'; +import layout from '../templates/components/simple-component'; + +export default Component.extend({ + layout +}); \ No newline at end of file diff --git a/tests/fixtures/addon/nested-addon-main/src/addon/templates/components/simple-component.hbs b/tests/fixtures/addon/nested-addon-main/src/addon/templates/components/simple-component.hbs new file mode 100644 index 0000000000..bb3feb913a --- /dev/null +++ b/tests/fixtures/addon/nested-addon-main/src/addon/templates/components/simple-component.hbs @@ -0,0 +1 @@ +

This is a simple component

diff --git a/tests/fixtures/addon/nested-addon-main/src/main.js b/tests/fixtures/addon/nested-addon-main/src/main.js new file mode 100644 index 0000000000..3ad817af82 --- /dev/null +++ b/tests/fixtures/addon/nested-addon-main/src/main.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = { + name: require('../package').name, +}; From b973766f10b629b9f9a277e42f304dad2f0d8905 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 21 May 2021 22:49:43 +0000 Subject: [PATCH 762/818] [Security] Bump handlebars from 4.7.3 to 4.7.7 (#9525) --- yarn.lock | 46 ++++++++++++++++++---------------------------- 1 file changed, 18 insertions(+), 28 deletions(-) diff --git a/yarn.lock b/yarn.lock index a8f3d91a54..149fb7bdca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2023,7 +2023,7 @@ commander@2.8.x: dependencies: graceful-readlink ">= 1.0.0" -commander@^2.15.1, commander@^2.6.0, commander@~2.20.3: +commander@^2.15.1, commander@^2.6.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -3940,13 +3940,14 @@ growly@^1.3.0: integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= handlebars@^4.0.11, handlebars@^4.0.4, handlebars@^4.7.3: - version "4.7.3" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.3.tgz#8ece2797826886cf8082d1726ff21d2a022550ee" - integrity sha512-SRGwSYuNfx8DwHD/6InAPzD6RgeruWLT+B8e8a7gGs8FWgHzlExpTFMEq2IA6QpAfOClpKHy6+8IqTjeBCu6Kg== + version "4.7.7" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" + integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== dependencies: + minimist "^1.2.5" neo-async "^2.6.0" - optimist "^0.6.1" source-map "^0.6.1" + wordwrap "^1.0.0" optionalDependencies: uglify-js "^3.1.4" @@ -5579,11 +5580,6 @@ minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== -minimist@~0.0.1: - version "0.0.10" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" - integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= - minipass@^2.2.0: version "2.9.0" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" @@ -5727,9 +5723,9 @@ negotiator@0.6.2: integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== neo-async@^2.6.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" - integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== + version "2.6.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== next-tick@~1.0.0: version "1.0.0" @@ -6000,14 +5996,6 @@ onetime@^5.1.0, onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -optimist@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" - integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY= - dependencies: - minimist "~0.0.1" - wordwrap "~0.0.2" - optionator@^0.8.1: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" @@ -7972,12 +7960,9 @@ uc.micro@^1.0.0, uc.micro@^1.0.1, uc.micro@^1.0.5: integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== uglify-js@^3.1.4: - version "3.8.0" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.8.0.tgz#f3541ae97b2f048d7e7e3aa4f39fd8a1f5d7a805" - integrity sha512-ugNSTT8ierCsDHso2jkBHXYrU8Y5/fY2ZUprfrJUiD7YpuFvV4jODLFmb3h4btQjqr5Nh4TX4XtgDfCU1WdioQ== - dependencies: - commander "~2.20.3" - source-map "~0.6.1" + version "3.13.7" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.13.7.tgz#25468a3b39b1c875df03f0937b2b7036a93f3fee" + integrity sha512-1Psi2MmnZJbnEsgJJIlfnd7tFlJfitusmR7zDI8lXlFI0ACD4/Rm/xdrU8bh6zF0i74aiVoBtkRiFulkrmh3AA== underscore.string@^3.2.2, underscore.string@~3.3.4: version "3.3.5" @@ -8348,11 +8333,16 @@ word-wrap@^1.2.3, word-wrap@~1.2.3: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== -wordwrap@^0.0.3, wordwrap@~0.0.2: +wordwrap@^0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= +wordwrap@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= + workerpool@6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.0.tgz#a8e038b4c94569596852de7a8ea4228eefdeb37b" From 0ee45344d1faf1176b2bccc05b46301160a3ae6d Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 22 May 2021 00:25:07 +0000 Subject: [PATCH 763/818] [Security] Bump underscore from 1.9.2 to 1.13.1 (#9526) --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 149fb7bdca..a196855ccb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7973,9 +7973,9 @@ underscore.string@^3.2.2, underscore.string@~3.3.4: util-deprecate "^1.0.2" underscore@>=1.8.3: - version "1.9.2" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.2.tgz#0c8d6f536d6f378a5af264a72f7bec50feb7cf2f" - integrity sha512-D39qtimx0c1fI3ya1Lnhk3E9nONswSKhnffBI0gME9C99fYOkNi04xs8K6pePLhvl1frbDemkaBQ5ikWllR2HQ== + version "1.13.1" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.1.tgz#0c1c6bd2df54b6b69f2314066d65b6cde6fcf9d1" + integrity sha512-hzSoAVtJF+3ZtiFX0VgfFPHEDRm7Y/QPjGyNo4TVdnDTdft3tr8hEkD25a1jC+TjTuE7tkHGKkhwCgs9dgBB2g== union-value@^1.0.0: version "1.0.1" From c1b924354cbcc799ba96e80ed8b91fd396ec3932 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 22 May 2021 02:02:35 +0000 Subject: [PATCH 764/818] [Security] Bump hosted-git-info from 3.0.7 to 3.0.8 (#9527) --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index a196855ccb..f1e23c2a67 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4132,9 +4132,9 @@ homedir-polyfill@^1.0.1: parse-passwd "^1.0.0" hosted-git-info@^3.0.6: - version "3.0.7" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-3.0.7.tgz#a30727385ea85acfcee94e0aad9e368c792e036c" - integrity sha512-fWqc0IcuXs+BmE9orLDyVykAG9GJtGLGuZAAqgcckPgv5xad4AcXGIv8galtQvlwutxSlaMcdw7BUtq2EIvqCQ== + version "3.0.8" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-3.0.8.tgz#6e35d4cc87af2c5f816e4cb9ce350ba87a3f370d" + integrity sha512-aXpmwoOhRBrw6X3j0h5RloK4x1OzsxMPyxqIHyNfSe2pypkVTZFpEiRoSipPEPlMrh0HW/XsjkJ5WgnCirpNUw== dependencies: lru-cache "^6.0.0" From cd598807c4e2cda8178ee9867abe33b3b1407a88 Mon Sep 17 00:00:00 2001 From: Brenden Palmer Date: Thu, 15 Apr 2021 14:03:24 -0400 Subject: [PATCH 765/818] implement LCA host/host addons logic in `ember-cli` --- lib/models/host-info-cache.js | 334 +++++++++++++++ lib/models/package-info-cache/package-info.js | 13 +- lib/models/per-bundle-addon-cache/index.js | 249 +++++------- lib/models/project.js | 3 +- tests/helpers/fixturify-project.js | 14 +- tests/helpers/per-bundle-addon-cache.js | 4 +- tests/unit/models/host-info-cache-test.js | 192 +++++++++ .../cache-bundle-hosts-test.js | 9 +- .../per-bundle-addon-cache/proxy-test.js | 381 ++++++++++++++++-- 9 files changed, 995 insertions(+), 204 deletions(-) create mode 100644 lib/models/host-info-cache.js create mode 100644 tests/unit/models/host-info-cache-test.js diff --git a/lib/models/host-info-cache.js b/lib/models/host-info-cache.js new file mode 100644 index 0000000000..53bae7b2b6 --- /dev/null +++ b/lib/models/host-info-cache.js @@ -0,0 +1,334 @@ +'use strict'; + +function allPkgInfosEqualAtIndex(paths, index) { + const itemToCheck = paths[0][index]; + return paths.every((pathToLazyEngine) => pathToLazyEngine[index] === itemToCheck); +} + +class HostInfoCache { + constructor(project) { + this.project = project; + this._bundledPackageInfoCache = new Map(); + this._hostAddonInfoCache = new Map(); + this._lcaHostCache = new Map(); + } + + /** + * Given a path (calculated as part of `getHostAddonInfo`), return the correct + * "bundle host". A bundle host is considered the project or lazy engine. + * + * For example, given the following package structure: + * + * --Project-- + * / \ + * / \ + * Lazy Engine A \ + * Addon A + * | + * | + * Lazy Engine B + * / \ + * / \ + * Lazy Engine A Lazy Engine C + * + * The provided paths for lazy engine A would look like: + * + * - [Project] + * - [Project, Addon A, Lazy Engine B] + * + * For this project structure, this function would return [Project, [Project]] + * + * Similarly, given the following project structure: + * + * --Project-- + * / \ + * / \ + * Lazy Engine A \ + * / Lazy Engine B + * / | + * / | + * Lazy Engine C Lazy Engine C + * + * The provided paths for lazy engine C would look like: + * + * - [Project, Lazy Engine A] + * - [Project, Lazy Engine B] + * + * In this case, the host is the project and would also return [Project, [Project]] + * + * @method _findNearestBundleHost + * @param {Array} paths The found paths to a given bundle host + * @return {[PackageInfo, PackageInfo[]]} + * @private + */ + _findNearestBundleHost(paths, pkgInfoForLazyEngine) { + // building an engine in isolation (it's considered the project, but it's + // also added as a dependency to the project by `ember-cli`) + if (this.project._packageInfo === pkgInfoForLazyEngine) { + return [this.project._packageInfo, [this.project._packageInfo]]; + } + + const shortestPath = paths.reduce( + (acc, pathToLazyEngine) => Math.min(acc, pathToLazyEngine.length), + Number.POSITIVE_INFINITY + ); + + const pathsEqualToShortest = paths.filter((pathToLazyEngine) => pathToLazyEngine.length === shortestPath); + const [firstPath] = pathsEqualToShortest; + + for (let i = firstPath.length - 1; i >= 0; i--) { + const pkgInfo = firstPath[i]; + + if (pkgInfo.isForBundleHost() && allPkgInfosEqualAtIndex(pathsEqualToShortest, i)) { + return [pkgInfo, firstPath.slice(0, i + 1)]; + } + } + + // this should _never_ be triggered + throw new Error( + `[ember-cli] Could not find a common host for: \`${pkgInfoForLazyEngine.name}\` (located at \`${pkgInfoForLazyEngine.realPath}\`)` + ); + } + + /** + * Returns a `Set` of package-info objects that a given bundle host is + * _directly_ responsible for bundling (i.e., it excludes other bundle + * hosts/lazy engines when it encounters these) + * + * @method _getBundledPackageInfos + * @param {PackageInfo} pkgInfoToStartAt + * @return {Set} + * @private + */ + _getBundledPackageInfos(pkgInfoToStartAt) { + let pkgInfos = this._bundledPackageInfoCache.get(pkgInfoToStartAt); + + if (pkgInfos) { + return pkgInfos; + } + + if (!pkgInfoToStartAt.isForBundleHost()) { + throw new Error( + `[ember-cli] \`${pkgInfoToStartAt.name}\` is not a bundle host; \`getBundledPackageInfos\` should only be used to find bundled package infos for a project or lazy engine` + ); + } + + pkgInfos = new Set(); + this._bundledPackageInfoCache.set(pkgInfoToStartAt, pkgInfos); + + let findAddons = (currentPkgInfo) => { + if (!currentPkgInfo.valid || !currentPkgInfo.addonMainPath) { + return; + } + + if (pkgInfos.has(currentPkgInfo)) { + return; + } + + if (currentPkgInfo.isForBundleHost()) { + return; + } + + pkgInfos.add(currentPkgInfo); + + let addonPackageList = currentPkgInfo.discoverAddonAddons(); + addonPackageList.forEach((pkgInfo) => findAddons(pkgInfo)); + }; + + let addonPackageList = pkgInfoToStartAt.project + ? pkgInfoToStartAt.discoverProjectAddons() + : pkgInfoToStartAt.discoverAddonAddons(); + + addonPackageList.forEach((pkgInfo) => findAddons(pkgInfo)); + + return pkgInfos; + } + + /** + * This function intends to return a common host for a bundle host (lazy engine). The root + * package info should be the starting point (i.e., the project's package info). We do this + * by performing a breadth-first traversal until we find the intended lazy engine (represented + * as a package-info & the 1st argument passed to this function). As part of the traversal, we keep + * track of all paths to said engine; then, once we find the intended engine we use this to determine + * the nearest common host amongst all shortest paths. + * + * Some context: + * + * For a given engine/bundle host, this finds the lowest common ancestor that is considered a + * host amongst _all_ engines by the same name in the project. + * + * For example, given the following package structure: + * + * --Project-- + * / \ + * / \ + * Lazy Engine A \ + * Addon A + * | + * | + * Lazy Engine B + * / \ + * / \ + * Lazy Engine A Lazy Engine C + * + * - The LCA host for Lazy Engine A is the project + * - The LCA host for Lazy Engine B is the project + * - The LCA host for Lazy Engine C is Lazy Engine B + * + * This also returns `hostAndAncestorBundledPackageInfos`, which are all bundled addons above a given host: + * + * - `hostAndAncestorBundledPackageInfos` for lazy engine A includes all non-lazy dependencies of its LCA host & above (in this case, just the project) + * - `hostAndAncestorBundledPackageInfos` for lazy engine B includes all non-lazy dependencies of its LCA host & above (in this case, just the project) + * - `hostAndAncestorBundledPackageInfos` for lazy engine C includes non-lazy deps of lazy engine B & non-lazy deps of the project (LCA host & above) + * + * This is intended to mimic the behavior of `ancestorHostAddons` in `ember-engines`: + * https://github.com/ember-engines/ember-engines/blob/master/packages/ember-engines/lib/engine-addon.js#L333 + * + * Unfortunately, we can't easily repurpose the logic in `ember-engines` since the algorithm has to be different; + * in `ember-engines` we need access to the actual addon instance, however, this is intended to be used _during_ + * addon instantiation, so we only have access to package-info objects. In having said this, we _can_ repurpose + * the `hostPackageInfo` to determine the LCA host; see below `findLCAHost`. + * + * @method getHostAddonInfo + * @param {PackageInfo} packageInfoForLazyEngine + * @return {{ hostPackageInfo: PackageInfo, hostAndAncestorBundledPackageInfos: Set }} + */ + getHostAddonInfo(packageInfoForLazyEngine) { + const cacheKey = `${this.project._packageInfo.realPath}-${packageInfoForLazyEngine.realPath}`; + + let hostInfoCacheEntry = this._hostAddonInfoCache.get(cacheKey); + + if (hostInfoCacheEntry) { + return hostInfoCacheEntry; + } + + if (!packageInfoForLazyEngine.isForEngine()) { + throw new Error( + `[ember-cli] \`${packageInfoForLazyEngine.name}\` is not an engine; \`getHostAddonInfo\` should only be used to find host information about engines` + ); + } + + const queue = [{ pkgInfo: this.project._packageInfo, path: [] }]; + const visited = new Set(); + const foundPaths = []; + + while (queue.length) { + const { pkgInfo: currentPackageInfo, path } = queue.shift(); + + const { + addonMainPath, + inRepoAddons = [], + dependencyPackages = {}, + devDependencyPackages = {}, + } = currentPackageInfo; + + const isCurrentPackageInfoProject = this.project._packageInfo === currentPackageInfo; + + // don't process non-ember addons + if (!isCurrentPackageInfoProject && typeof addonMainPath !== 'string') { + continue; + } + + // store found paths + if (currentPackageInfo === packageInfoForLazyEngine) { + foundPaths.push([...path]); + } + + // don't process a given `PackageInfo` object more than once + if (!visited.has(currentPackageInfo)) { + visited.add(currentPackageInfo); + + // add current package info to current path + path.push(currentPackageInfo); + + queue.push( + ...[ + ...inRepoAddons, + ...Object.values(dependencyPackages), + ...Object.values(devDependencyPackages), + ].map((pkgInfo) => ({ pkgInfo, path: [...path] })) + ); + } + } + + const [hostPackageInfo, foundPath] = this._findNearestBundleHost(foundPaths, packageInfoForLazyEngine); + + const hostAndAncestorBundledPackageInfos = foundPath + .filter((pkgInfo) => pkgInfo.isForBundleHost()) + .reduce((acc, curr) => { + acc.push(...this._getBundledPackageInfos(curr)); + return acc; + }, []); + + hostInfoCacheEntry = { + hostPackageInfo, + hostAndAncestorBundledPackageInfos: new Set(hostAndAncestorBundledPackageInfos), + }; + + this._hostAddonInfoCache.set(cacheKey, hostInfoCacheEntry); + return hostInfoCacheEntry; + } + + /** + * This returns the LCA host for a given engine; we use the associated package info + * to compute this (see `getHostAddonInfo` above); this finds the lowest common ancestor + * that is considered a host amongst _all_ engines by the same name in the project. This + * function is intended to replace the original behavior in `ember-engines`. + * + * For more info, see the original implementation here: + * + * https://github.com/ember-engines/ember-engines/blob/master/packages/ember-engines/lib/utils/find-lca-host.js + * + * @method findLCAHost + * @param {EngineAddon} engineInstance + * @return {EngineAddon|EmberApp} + */ + findLCAHost(engineInstance) { + // only compute once for a given engine + // we're using the engine name as the cache key here because regardless of its + // version, lazy engines will always get output to: `engines-dist/${engineName}` + let lcaHost = this._lcaHostCache.get(engineInstance.name); + + if (lcaHost) { + return lcaHost; + } + + if (!engineInstance._packageInfo.isForEngine()) { + throw new Error( + `[ember-cli] \`findLCAHost\` should only be used for engines; \`${engineInstance.name}\` is not an engine` + ); + } + + const { hostPackageInfo } = this.getHostAddonInfo(engineInstance._packageInfo); + + let curr = engineInstance; + + while (curr && curr.parent) { + if (curr.app) { + lcaHost = curr.app; + break; + } + + if (curr._packageInfo === hostPackageInfo) { + lcaHost = curr; + break; + } + + curr = curr.parent; + } + + if (lcaHost) { + this._lcaHostCache.set(engineInstance.name, lcaHost); + return lcaHost; + } + + // this should _never_ be triggered + throw new Error( + `[ember-cli] Could not find an LCA host for: \`${engineInstance.name}\` (located at \`${ + engineInstance.packageRoot || engineInstance.root + }\`)` + ); + } +} + +module.exports = HostInfoCache; diff --git a/lib/models/package-info-cache/package-info.js b/lib/models/package-info-cache/package-info.js index 34f48e1be3..66f35d3d5b 100644 --- a/lib/models/package-info-cache/package-info.js +++ b/lib/models/package-info-cache/package-info.js @@ -244,6 +244,16 @@ class PackageInfo { return isAddon(this.pkg.keywords); } + /** + * Indicate if this packageInfo represents an engine. + * + * @method isForEngine + * @return {Boolean} true if this pkgInfo is configured as an engine & false otherwise + */ + isForEngine() { + return isEngine(this.pkg.keywords); + } + /** * Indicate if this packageInfo represents a lazy engine. * @@ -252,7 +262,7 @@ class PackageInfo { * module this represents has lazyLoading enabled, false otherwise. */ isForLazyEngine() { - return isEngine(this.pkg.keywords) && isLazyEngine(require(this.addonMainPath)); + return this.isForEngine() && isLazyEngine(require(this.addonMainPath)); } /** @@ -493,6 +503,7 @@ class PackageInfo { if (parent && parent.ui) { parent.ui.writeError(e); } + const SilentError = require('silent-error'); throw new SilentError(`An error occurred in the constructor for ${this.name} at ${this.realPath}`); } diff --git a/lib/models/per-bundle-addon-cache/index.js b/lib/models/per-bundle-addon-cache/index.js index e5e5064b99..2f80da8d95 100644 --- a/lib/models/per-bundle-addon-cache/index.js +++ b/lib/models/per-bundle-addon-cache/index.js @@ -2,7 +2,6 @@ const isLazyEngine = require('../../utilities/is-lazy-engine'); const { getAddonProxy } = require('./addon-proxy'); -const PROJECT_BUNDLE_HOST_NAME = '__PROJECT__'; const logger = require('heimdalljs-logger')('ember-cli:per-bundle-addon-cache'); const { TARGET_INSTANCE } = require('./target-instance'); @@ -45,21 +44,13 @@ const { TARGET_INSTANCE } = require('./target-instance'); * (2) Any addon that is not a lazy engine, there is only a single real instance * of the addon per "bundle host" (i.e. lazy engine or project). * (3) An optimization - any addon that is in a lazy engine but that is also - * in the project (outside of all lazy engines) - the single instance is the - * one in the project. All other instances (in any lazy engine) are proxies. - * NOTE: the optimization is only enabled if the environment variable that controls that - * ember-engine deduplication (process.env.EMBER_ENGINES_ADDON_DEDUPE) is set - * to a truthy value. + * in bundled by its LCA host - the single instance is the one bundled by this + * host. All other instances (in any lazy engine) are proxies. * - * Some implementation details given the above desired behavior: - * (1) There are actually 2 types of caches in this object: - * (1a) the first is keyed by lazy engine name. Note: the real instance of - * the lazy engine is created as it is encountered while traversing the addon - * tree (just like any real addon instance), it's just also referenced - * in this cache so we can create proxies to this single instance from - * anywhere in the addon tree. - * (2) The cache (one item per lazy engine + project) of real addon instances - * found while traversing the dependency tree. + * NOTE: the optimization is only enabled if the environment variable that controls + * `ember-engines` transitive deduplication (process.env.EMBER_ENGINES_ADDON_DEDUPE) + * is set to a truthy value. For more info, see: + * https://github.com/ember-engines/ember-engines/blob/master/packages/ember-engines/lib/engine-addon.js#L396 * * @public * @class PerBundleAddonCache { @@ -68,21 +59,12 @@ class PerBundleAddonCache { constructor(project) { this.project = project; - // cache of the addon packageInfos for addons that are descendants of the project - // (excluding going into lazy engines). Lazy engines that refer to any of these - // will defer to the project-level one. - this.bundledProjectAddonPkgInfos = this._setupBundledProjectAddonPackageInfos(); - - // The cache of bundle-host instances and their individual addon caches. - // The cache is keyed by name (since there is only a single instance of any given - // engine name, even if 2 engine addons have the same engine name). - // To allow the project in the cache, it will use the empty string for a name, - // to not collide with any possible engine name. - // Each cache entry consists of the bundle host instance (Project or Lazy engine) - // and an addon instance cache to bundle with that bundle host. - this.bundleHostCache = this._setupBundleHostCache(); - - // Indicate if ember-engines deduping is supported. + // The cache of bundle-host package infos and their individual addon caches. + // The cache is keyed by package info (representing a bundle host (project or + // lazy engine)) and an addon instance cache to bundle with that bundle host. + this.bundleHostCache = new Map(); + + // Indicate if ember-engines transitive dedupe is enabled. this.engineAddonTransitiveDedupeEnabled = !!process.env.EMBER_ENGINES_ADDON_DEDUPE; // For stats purposes, counts on the # addons and proxies created. Addons we @@ -93,103 +75,16 @@ class PerBundleAddonCache { } /** - * Get the list of addon PackageInfo objects that are a dependency of this project, - * directly or transitively. Do not check any dependency that is itself a bundle host. - * This is used as part of the per-bundle addon-caching optimization. - * - * @private - * @method _setupBundledProjectAddonPackageInfos - * @return {Set} a Set of {PackageInfo} objects. - */ - _setupBundledProjectAddonPackageInfos() { - let pkgInfos = new Set(); - - let findAddons = (pkgInfo) => { - if (!pkgInfo.valid || !pkgInfo.addonMainPath) { - return; - } - - if (pkgInfos.has(pkgInfo)) { - return; - } - - if (pkgInfo.isForBundleHost()) { - return; - } - - pkgInfos.add(pkgInfo); - - let addonPackageList = pkgInfo.discoverAddonAddons(); - addonPackageList.forEach((pkgInfo) => findAddons(pkgInfo)); - }; - - let addonPackageList = this.project._packageInfo.discoverProjectAddons(); - addonPackageList.forEach((pkgInfo) => findAddons(pkgInfo)); - - return pkgInfos; - } - - /** - * Set up the cache of bundle host instances. Each entry is keyed by name (project is given - * the name '__PROJECT__', the lazy engines use their engineName, since those are unique) - * Each cache entry has the bundle host instance (Project or lazy engine) and the addon instance - * cache for any addon instances to bundle with that bundle host. - * - * @private - * @method _setupBundleHostCache - * @return {Map} the bundle-host cache - */ - _setupBundleHostCache() { - // get all the lazy engine packageInfos, but only keep the first one - // with any given engine name. - let lazyEnginePkgInfos = new Map(); - - let findAddons = (pkgInfo) => { - if (!pkgInfo.valid || !pkgInfo.addonMainPath) { - return; - } - - if (pkgInfo.isForLazyEngine()) { - if (lazyEnginePkgInfos.has(pkgInfo.name)) { - return; - } - - lazyEnginePkgInfos.set(pkgInfo.name, pkgInfo); - } - - let addonPackageList = pkgInfo.discoverAddonAddons(); - addonPackageList.forEach(findAddons); - }; - - let addonPackageList = this.project._packageInfo.discoverProjectAddons(); - addonPackageList.forEach(findAddons); - - // Create the cache - let cache = new Map(); - cache.set( - PROJECT_BUNDLE_HOST_NAME, - this.createBundleHostCacheEntry(this.project, this.project._packageInfo.realPath) - ); - - lazyEnginePkgInfos.forEach((pkgInfo) => { - cache.set(pkgInfo.name, this.createBundleHostCacheEntry(null, pkgInfo.realPath)); - }); - - return cache; - } - - /** - * Create a cache entry the bundleHostCache. Because we want to use the same sort of proxy + * Creates a cache entry for the bundleHostCache. Because we want to use the same sort of proxy * for both bundle hosts and for 'regular' addon instances (though their cache entries have * slightly different structures) we'll use the Symbol from getAddonProxy. * * @method createBundleHostCacheEntry - * @param {Project|LazyEngine} bundleHostInstance the instance of the Project or lazy engine - * @param {String} bundleHostRealPath bundle host's pkgInfo.realPath + * @param {PackageInfo} bundleHostPkgInfo bundle host's pkgInfo.realPath * @return {Object} an object in the form of a bundle-host cache entry */ - createBundleHostCacheEntry(bundleHostInstance, bundleHostRealPath) { - return { [TARGET_INSTANCE]: bundleHostInstance, realPath: bundleHostRealPath, addonInstanceCache: new Map() }; + createBundleHostCacheEntry(bundleHostPkgInfo) { + return { [TARGET_INSTANCE]: null, realPath: bundleHostPkgInfo.realPath, addonInstanceCache: new Map() }; } /** @@ -220,8 +115,19 @@ class PerBundleAddonCache { */ findBundleHost(addonParent, addonPkgInfo) { let curr = addonParent; + while (curr) { - if (curr === this.project || isLazyEngine(curr)) { + if (curr === this.project) { + return curr; + } + + if (isLazyEngine(curr)) { + // if we're building a lazy engine in isolation, prefer that the bundle host is + // the project, not the lazy engine addon instance + if (curr.parent === this.project && curr._packageInfo === this.project._packageInfo) { + return this.project; + } + return curr; } @@ -235,16 +141,19 @@ class PerBundleAddonCache { /** * An optimization we support from lazy engines is the following: - * if an addon instance is supposed to be bundled with a particular lazy engine, and - * same addon is also to be bundled in the project, prefer the one in the project. * - * NOTE: this only applies if this.engineAddonTransitiveDedupeEnabled is truthy. If it is not, the - * bundle host always "owns" the addon instance. + * If an addon instance is supposed to be bundled with a particular lazy engine, and + * same addon is also to be bundled by a common LCA host, prefer the one bundled by the + * host (since it's ultimately going to be deduped later by `ember-engines`). + * + * NOTE: this only applies if this.engineAddonTransitiveDedupeEnabled is truthy. If it is not, + * the bundle host always "owns" the addon instance. * - * If deduping is enabled and the project does also depend on the same addon, + * If deduping is enabled and the LCA host also depends on the same addon, * the lazy-engine instances of the addon will all be proxies to the one in - * the project. This function indicates whether the bundle host passed in (either the - * project or a lazy engine) is really the bundle host to "own" the new addon. + * the LCA host. This function indicates whether the bundle host passed in + * (either the project or a lazy engine) is really the bundle host to "own" the + * new addon. * * @method bundleHostOwnsInstance * @param (Object} bundleHost the project or lazy engine that is trying to "own" @@ -253,23 +162,32 @@ class PerBundleAddonCache { * @return {Boolean} true if the bundle host is to "own" the instance, false otherwise. */ bundleHostOwnsInstance(bundleHost, addonPkgInfo) { - return ( - bundleHost === this.project || - !this.engineAddonTransitiveDedupeEnabled || - !this.bundledProjectAddonPkgInfos.has(addonPkgInfo) - ); + if (isLazyEngine(bundleHost)) { + return ( + !this.engineAddonTransitiveDedupeEnabled || + !this.project.hostInfoCache + .getHostAddonInfo(bundleHost._packageInfo) + .hostAndAncestorBundledPackageInfos.has(addonPkgInfo) + ); + } + + return true; } - /** - * Get the name of a bundle host (used as the key for the bundleHostCache). - * Projects have a fake name. - * - * @method getBundleHostName - * @param {Project|Addon} bundleHost the bundle host whose name is desired. - * @return {String} the name of the bundle host - */ - getBundleHostName(bundleHost) { - return bundleHost === this.project ? PROJECT_BUNDLE_HOST_NAME : bundleHost.name; + findBundleOwner(bundleHost, addonPkgInfo) { + if (bundleHost === this.project._packageInfo) { + return bundleHost; + } + + let { hostPackageInfo, hostAndAncestorBundledPackageInfos } = this.project.hostInfoCache.getHostAddonInfo( + bundleHost + ); + + if (!hostAndAncestorBundledPackageInfos.has(addonPkgInfo)) { + return bundleHost; + } + + return this.findBundleOwner(hostPackageInfo, addonPkgInfo); } /** @@ -283,8 +201,9 @@ class PerBundleAddonCache { * @return {Addon|Proxy} An addon instance (for the first copy of the addon) or a Proxy. * An addon that is a lazy engine will only ever have a single copy in the cache. * An addon that is not will have 1 copy per bundle host (Project or lazy engine), - * except if it is an addon that's also owned by the project and - * is truthy, in which case it will only have a single copy in the project's addon cache. + * except if it is an addon that's also owned by a given LCA host and transitive + * dedupe is enabled (`engineAddonTransitiveDedupeEnabled`), in which case it will + * only have a single copy in the project's addon cache. */ getAddonInstance(parent, addonPkgInfo) { // If the new addon is itself a bundle host (i.e. lazy engine), there is only one @@ -292,7 +211,8 @@ class PerBundleAddonCache { // of the 'regular' addon caches. Because 'setupBundleHostCache' ran during construction, // we know that an entry is in the cache with this engine name. if (addonPkgInfo.isForBundleHost()) { - let cacheEntry = this.bundleHostCache.get(addonPkgInfo.name); + let cacheEntry = this._getBundleHostCacheEntry(addonPkgInfo); + if (cacheEntry[TARGET_INSTANCE]) { logger.debug(`About to construct BR PROXY to cache entry for addon at: ${addonPkgInfo.realPath}`); this.numProxies++; @@ -318,15 +238,14 @@ class PerBundleAddonCache { // * If so, make a proxy for it. // * If not, make a new instance of the addon and cache it in the // bundle host's addon cache. - // If not, it means the bundle host is a lazy engine but the project also uses + // If not, it means the bundle host is a lazy engine but the LCA host also uses // the addon and deduping is enabled - // * If the project already has a cached entry, return a proxy to that + // * If the LCA host already has a cached entry, return a proxy to that // * If it does not, create a 'blank' cache entry and return a proxy to that. - // When the addon is encountered later when processing the project's addons, + // When the addon is encountered later when processing the LCA host's addons, // fill in the instance. if (this.bundleHostOwnsInstance(bundleHost, addonPkgInfo)) { - let bundleHostName = this.getBundleHostName(bundleHost); - let bundleHostCacheEntry = this.bundleHostCache.get(bundleHostName); + let bundleHostCacheEntry = this._getBundleHostCacheEntry(bundleHost._packageInfo); let addonInstanceCache = bundleHostCacheEntry.addonInstanceCache; let addonCacheEntry = addonInstanceCache.get(addonPkgInfo.realPath); let addonInstance; @@ -338,8 +257,8 @@ class PerBundleAddonCache { return getAddonProxy(addonCacheEntry, parent); } else { // the cache entry was created 'empty' by an earlier call, indicating - // an addon that is used in a lazy engine but also used in the project, - // and we're now creating the instance for the project. + // an addon that is used in a lazy engine but also used by its LCA host, + // and we're now creating the instance for the LCA host. // Fill in the entry and return the new instance. logger.debug(`About to fill in REGULAR ADDON EXISTING cache entry for addon at: ${addonPkgInfo.realPath}`); this.numAddonInstances++; @@ -360,12 +279,15 @@ class PerBundleAddonCache { addonPkgInfo.initChildAddons(addonInstance); return addonInstance; } else { - // The bundleHost is not the project but the project bundles the addon too and - // deduping is enabled, so the cache entry needs to go in the project's cache. - // Get/create an empty cache entry and return a proxy to it. The project will + // The bundleHost is not the project but the some ancestor bundles the addon and + // deduping is enabled, so the cache entry needs to go in the bundle owner's cache. + // Get/create an empty cache entry and return a proxy to it. The bundle owner will // set the instance later (see above). - let bundleHostCacheEntry = this.bundleHostCache.get(PROJECT_BUNDLE_HOST_NAME); + let bundleHostCacheEntry = this._getBundleHostCacheEntry( + this.findBundleOwner(bundleHost._packageInfo, addonPkgInfo) + ); let addonCacheEntry = bundleHostCacheEntry.addonInstanceCache.get(addonPkgInfo.realPath); + if (!addonCacheEntry) { logger.debug(`About to construct REGULAR ADDON EMPTY cache entry for addon at: ${addonPkgInfo.realPath}`); addonCacheEntry = this.createAddonCacheEntry(null, addonPkgInfo.realPath); @@ -377,6 +299,17 @@ class PerBundleAddonCache { return getAddonProxy(addonCacheEntry, parent); } } + + _getBundleHostCacheEntry(pkgInfo) { + let cacheEntry = this.bundleHostCache.get(pkgInfo); + + if (!cacheEntry) { + cacheEntry = this.createBundleHostCacheEntry(pkgInfo); + this.bundleHostCache.set(pkgInfo, cacheEntry); + } + + return cacheEntry; + } } module.exports = PerBundleAddonCache; diff --git a/lib/models/project.js b/lib/models/project.js index f613d3982b..a1849b8e74 100644 --- a/lib/models/project.js +++ b/lib/models/project.js @@ -16,8 +16,8 @@ const findAddonByName = require('../utilities/find-addon-by-name'); const heimdall = require('heimdalljs'); const PackageInfoCache = require('./package-info-cache'); const PerBundleAddonCache = require('./per-bundle-addon-cache'); - const instantiateAddons = require('./instantiate-addons'); +const HostInfoCache = require('./host-info-cache'); let processCwd = process.cwd(); @@ -49,6 +49,7 @@ class Project { this.liveReloadFilterPatterns = []; this.setupBowerDirectory(); this.configCache = new Map(); + this.hostInfoCache = new HostInfoCache(this); /** Set when the `Watcher.detectWatchman` helper method finishes running, diff --git a/tests/helpers/fixturify-project.js b/tests/helpers/fixturify-project.js index 6ff426e918..fc519b83e8 100644 --- a/tests/helpers/fixturify-project.js +++ b/tests/helpers/fixturify-project.js @@ -76,6 +76,18 @@ module.exports = class EmberCLIFixturifyProject extends FixturifyProject { return new ProjectClass(root, pkg, cli.ui, cli); } + buildProjectModelForInRepoAddon(addonName, ProjectClass = ProjectWithoutInternalAddons) { + if (!this._hasWritten) { + this.writeSync(); + } + + let pkg = JSON.parse(this.files.lib[addonName]['package.json']); + let cli = new MockCLI(); + let root = path.join(this.root, this.name, 'lib', addonName); + + return new ProjectClass(root, pkg, cli.ui, cli); + } + /** * Add an entry for this object's `dependencies` list. When this object is written out, the * dependency will also then write out appropriate files in this object's `node_modules' subdirectory. @@ -365,7 +377,7 @@ module.exports = class EmberCLIFixturifyProject extends FixturifyProject { Object.assign(pkg.devDependencies, this._referenceDevDependencies); } - container['package.json'] = JSON.stringify(pkg); + container['package.json'] = JSON.stringify(pkg, undefined, 2); } // an optimization to remove any node_modules declaration that has nothing in it, diff --git a/tests/helpers/per-bundle-addon-cache.js b/tests/helpers/per-bundle-addon-cache.js index 909c5e95c8..4df1e4b4d6 100644 --- a/tests/helpers/per-bundle-addon-cache.js +++ b/tests/helpers/per-bundle-addon-cache.js @@ -166,8 +166,8 @@ function createStandardCacheFixture() { * * @name findAddonCacheEntriesByName */ -function findAddonCacheEntriesByName(perBundleAddonCacheInstance, bundleHostName, addonName) { - let bundleHostCacheEntry = perBundleAddonCacheInstance.bundleHostCache.get(bundleHostName); +function findAddonCacheEntriesByName(perBundleAddonCacheInstance, bundleHostPkgInfo, addonName) { + let bundleHostCacheEntry = perBundleAddonCacheInstance.bundleHostCache.get(bundleHostPkgInfo); if (!bundleHostCacheEntry) { return null; diff --git a/tests/unit/models/host-info-cache-test.js b/tests/unit/models/host-info-cache-test.js new file mode 100644 index 0000000000..99d8c16116 --- /dev/null +++ b/tests/unit/models/host-info-cache-test.js @@ -0,0 +1,192 @@ +'use strict'; + +/** + * Tests for the various proxies and instances once the project has initialized + * its addons + */ +const expect = require('chai').expect; +const FixturifyProject = require('../../helpers/fixturify-project'); + +describe('Unit | host-addons-utils', function () { + let fixturifyProject; + + beforeEach(function () { + fixturifyProject = new FixturifyProject('awesome-proj', '1.0.0'); + fixturifyProject.addDevDependency('ember-cli', '*'); + }); + + afterEach(function () { + fixturifyProject.dispose(); + }); + + it('multiple lazy engines in project, including nested lazy engines', function () { + fixturifyProject.addEngine('lazy-engine-a', '1.0.0', { enableLazyLoading: true }); + + fixturifyProject.addAddon('addon-a', '1.0.0', { + enableLazyLoading: true, + callback: (addon) => { + addon.addEngine('lazy-engine-b', '1.0.0', { + enableLazyLoading: true, + callback: (engine) => { + engine.addReferenceDependency('lazy-engine-a'); + engine.addEngine('lazy-engine-c', '1.0.0', { enableLazyLoading: true }); + }, + }); + }, + }); + + fixturifyProject.writeSync(); + let project = fixturifyProject.buildProjectModel(); + + project.initializeAddons(); + + const app = {}; + + const lazyEngineA = project.addons.find((addon) => addon.name === 'lazy-engine-a'); + lazyEngineA.app = app; + const pkgInfoLazyEngineA = lazyEngineA._packageInfo; + + const addonA = project.addons.find((addon) => addon.name === 'addon-a'); + addonA.app = app; + const pkgInfoAddonA = addonA._packageInfo; + + let { hostPackageInfo, hostAndAncestorBundledPackageInfos } = project.hostInfoCache.getHostAddonInfo( + pkgInfoLazyEngineA + ); + + expect(hostPackageInfo).to.equal(project._packageInfo, 'host package-info for lazy-engine A is the project'); + expect(project.hostInfoCache.findLCAHost(lazyEngineA)).to.equal(lazyEngineA.app, 'LCA host is the app'); + + expect(hostAndAncestorBundledPackageInfos).to.deep.equal( + new Set([pkgInfoAddonA]), + 'host packge-infos for lazy-engine A includes only addon-a' + ); + + const lazyEngineB = project.addons + .find((addon) => addon.name === 'addon-a') + .addons.find((addon) => addon.name === 'lazy-engine-b'); + + const pkgInfoLazyEngineB = lazyEngineB._packageInfo; + + ({ hostPackageInfo, hostAndAncestorBundledPackageInfos } = project.hostInfoCache.getHostAddonInfo( + pkgInfoLazyEngineB + )); + + expect(hostPackageInfo).to.equal(project._packageInfo, 'host package-info for lazy-engine B is the project'); + expect(project.hostInfoCache.findLCAHost(lazyEngineB)).to.equal(lazyEngineA.app, 'LCA host is the app'); + expect(hostAndAncestorBundledPackageInfos).to.deep.equal( + new Set([pkgInfoAddonA]), + 'host packge-infos for lazy-engine B includes only addon-a' + ); + + const lazyEngineC = project.addons + .find((addon) => addon.name === 'addon-a') + .addons.find((addon) => addon.name === 'lazy-engine-b') + .addons.find((addon) => addon.name === 'lazy-engine-c'); + + const pkgInfoLazyEngineC = lazyEngineC._packageInfo; + + ({ hostPackageInfo, hostAndAncestorBundledPackageInfos } = project.hostInfoCache.getHostAddonInfo( + pkgInfoLazyEngineC + )); + + expect(hostPackageInfo).to.equal(pkgInfoLazyEngineB, 'host package-info for lazy-engine C is lazy engine B'); + + expect(project.hostInfoCache.findLCAHost(lazyEngineC)).to.equal( + lazyEngineB, + 'LCA host for lazy engine C is lazy engine B' + ); + + expect(hostAndAncestorBundledPackageInfos).to.deep.equal( + new Set([pkgInfoAddonA]), + 'host packge-infos for lazy-engine C includes addon-a' + ); + }); + + it('multiple lazy engines in project, including nested lazy engines; some nested lazy engines have non-lazy deps', function () { + fixturifyProject.addEngine('lazy-engine-a', '1.0.0', { enableLazyLoading: true }); + + fixturifyProject.addAddon('addon-a', '1.0.0', { + enableLazyLoading: true, + callback: (addon) => { + addon.addEngine('lazy-engine-b', '1.0.0', { + enableLazyLoading: true, + callback: (engine) => { + engine.addReferenceDependency('lazy-engine-a'); + engine.addAddon('addon-b', '1.0.0'); + engine.addEngine('lazy-engine-c', '1.0.0', { enableLazyLoading: true }); + }, + }); + }, + }); + + fixturifyProject.writeSync(); + let project = fixturifyProject.buildProjectModel(); + + project.initializeAddons(); + + const pkgInfoAddonA = project.addons.find((addon) => addon.name === 'addon-a')._packageInfo; + + const pkgInfoLazyEngineB = project.addons + .find((addon) => addon.name === 'addon-a') + .addons.find((addon) => addon.name === 'lazy-engine-b')._packageInfo; + + const pkgInfoAddonB = project.addons + .find((addon) => addon.name === 'addon-a') + .addons.find((addon) => addon.name === 'lazy-engine-b') + .addons.find((addon) => addon.name === 'addon-b')._packageInfo; + + const pkgInfoLazyEngineC = project.addons + .find((addon) => addon.name === 'addon-a') + .addons.find((addon) => addon.name === 'lazy-engine-b') + .addons.find((addon) => addon.name === 'lazy-engine-c')._packageInfo; + + let { hostPackageInfo, hostAndAncestorBundledPackageInfos } = project.hostInfoCache.getHostAddonInfo( + pkgInfoLazyEngineC + ); + + expect(hostPackageInfo).to.equal(pkgInfoLazyEngineB, 'host package-info for lazy-engine C is lazy engine B'); + expect(hostAndAncestorBundledPackageInfos).to.deep.equal( + new Set([pkgInfoAddonA, pkgInfoAddonB]), + 'host packge-infos for lazy-engine C includes addon-a, addon-b' + ); + }); + + it('multiple lazy engines at same level with a common ancestor host', function () { + fixturifyProject.addInRepoEngine('lazy-engine-a', '1.0.0', { enableLazyLoading: true }); + fixturifyProject.pkg['ember-addon'].paths = []; + + fixturifyProject.addInRepoEngine('lazy-engine-b', '1.0.0', { + enableLazyLoading: true, + callback: (engine) => { + engine.pkg['ember-addon'].paths = ['../lazy-engine-a']; + }, + }); + + fixturifyProject.addInRepoEngine('lazy-engine-c', '1.0.0', { + enableLazyLoading: true, + callback: (engine) => { + engine.pkg['ember-addon'].paths = ['../lazy-engine-a']; + }, + }); + + fixturifyProject.writeSync(); + let project = fixturifyProject.buildProjectModel(); + + project.initializeAddons(); + + const pkgInfoLazyEngineA = project.addons + .find((addon) => addon.name === 'lazy-engine-b') + .addons.find((addon) => addon.name === 'lazy-engine-a')._packageInfo; + + let { hostPackageInfo, hostAndAncestorBundledPackageInfos } = project.hostInfoCache.getHostAddonInfo( + pkgInfoLazyEngineA + ); + + expect(hostPackageInfo).to.equal(project._packageInfo, 'host package-info for lazy-engine A is the project'); + expect(hostAndAncestorBundledPackageInfos).to.deep.equal( + new Set([]), + 'host packge-infos for lazy-engine A has no non-lazy deps' + ); + }); +}); diff --git a/tests/unit/models/per-bundle-addon-cache/cache-bundle-hosts-test.js b/tests/unit/models/per-bundle-addon-cache/cache-bundle-hosts-test.js index dd253f9811..26db85fe72 100644 --- a/tests/unit/models/per-bundle-addon-cache/cache-bundle-hosts-test.js +++ b/tests/unit/models/per-bundle-addon-cache/cache-bundle-hosts-test.js @@ -27,14 +27,9 @@ describe('Unit | per-bundle-addon-cache bundle host', function () { expect(project.perBundleAddonCache).to.exist; }); - it('Should have 3 bundle hosts (project, lazy-engine-a, lazy-engine-b)', function () { + it("Should have 0 bundle hosts since they're constructed lazily", function () { const bundleHostCache = project.perBundleAddonCache.bundleHostCache; - - expect(bundleHostCache.size).to.equal(3); // project, lazy engine A, lazy engine B - - expect(bundleHostCache.has('__PROJECT__')).to.equal(true); - expect(bundleHostCache.has('lazy-engine-a')).to.equal(true); - expect(bundleHostCache.has('lazy-engine-b')).to.equal(true); + expect(bundleHostCache.size).to.equal(0); }); it('Should not have any addonInstanceCache entries', function () { diff --git a/tests/unit/models/per-bundle-addon-cache/proxy-test.js b/tests/unit/models/per-bundle-addon-cache/proxy-test.js index b99c27ff5d..8a69fe1ffb 100644 --- a/tests/unit/models/per-bundle-addon-cache/proxy-test.js +++ b/tests/unit/models/per-bundle-addon-cache/proxy-test.js @@ -215,17 +215,17 @@ describe('models/per-bundle-addon-cache', function () { expect(counts.byName['test-addon-a'].realAddonInstanceCount).to.equal(1); expect(counts.byName['test-addon-a'].proxyCount).to.equal(2); - let cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-a', 'test-addon-a'); - expect(cacheEntries).to.exist; + const lazyEngineAPkgInfo = project.addons.find((addon) => addon.name === 'lazy-engine-a')._packageInfo; + let cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, lazyEngineAPkgInfo, 'test-addon-a'); // project cache should be used - expect(cacheEntries.length).to.equal(0); + expect(cacheEntries).to.not.exist; - cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-b', 'test-addon-a'); - expect(cacheEntries).to.exist; + const lazyEngineBPkgInfo = project.addons.find((addon) => addon.name === 'lazy-engine-b')._packageInfo; + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, lazyEngineBPkgInfo, 'test-addon-a'); // project cache should be used - expect(cacheEntries.length).to.equal(0); + expect(cacheEntries).to.not.exist; }); it('2 lazy engines; each depend on two addons; project also depends on these addons, ensure project cache is used', function () { @@ -271,29 +271,335 @@ describe('models/per-bundle-addon-cache', function () { expect(byName['test-addon-b'].realAddonInstanceCount).to.equal(1); expect(byName['test-addon-b'].proxyCount).to.equal(3); - let cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-a', 'test-addon-a'); - expect(cacheEntries).to.exist; + const projectPkgInfo = project._packageInfo; + let cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, projectPkgInfo, 'test-addon-a'); + expect(cacheEntries.length).to.equal(1, 'project cache should have an entry for `test-addon-a`'); - // project cache should be used - expect(cacheEntries.length).to.equal(0); + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, projectPkgInfo, 'test-addon-b'); + expect(cacheEntries.length).to.equal(1, 'project cache should have an entry for `test-addon-b`'); - cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-a', 'test-addon-b'); - expect(cacheEntries).to.exist; + const lazyEngineAPkgInfo = project.addons.find((addon) => addon.name === 'lazy-engine-a')._packageInfo; + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, lazyEngineAPkgInfo, 'test-addon-a'); + expect(cacheEntries).to.deep.equal( + [], + 'should exist; lazy-engine A has opted-in to bundle caching, but should have no entries for `test-addon-a`' + ); - // project cache should be used - expect(cacheEntries.length).to.equal(0); + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, lazyEngineAPkgInfo, 'test-addon-b'); + expect(cacheEntries).to.deep.equal( + [], + 'should exist; lazy-engine A has opted-in to bundle caching, but should have no entries for `test-addon-b`' + ); - cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-b', 'test-addon-a'); - expect(cacheEntries).to.exist; + const lazyEngineBPkgInfo = project.addons.find((addon) => addon.name === 'lazy-engine-b')._packageInfo; + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, lazyEngineBPkgInfo, 'test-addon-a'); + expect(cacheEntries).to.deep.equal( + [], + 'should exist; lazy engine B has opted into bundle caching, but should have no entries for `test-addon-a`' + ); - // project cache should be used - expect(cacheEntries.length).to.equal(0); + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, lazyEngineBPkgInfo, 'test-addon-b'); + expect(cacheEntries).to.deep.equal( + [], + 'should exist; lazy engine B has opted into bundle caching, but should have no entries for `test-addon-b`' + ); + }); - cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-b', 'test-addon-b'); - expect(cacheEntries).to.exist; + it('should work for a common ancestor host that is not the project; i.e., another a lazy engine', function () { + fixturifyProject.addEngine('lazy-engine-a', '1.0.0', { + enableLazyLoading: true, + allowCachingPerBundle: true, + callback: (engine) => { + engine.addAddon('test-addon-a', '1.0.0', { + allowCachingPerBundle: true, + }); - // project cache should be used - expect(cacheEntries.length).to.equal(0); + engine.addEngine('lazy-engine-b', '1.0.0', { + enableLazyLoading: true, + allowCachingPerBundle: true, + callback: (engine) => { + engine.addReferenceDependency('test-addon-a', '1.0.0'); + }, + }); + + engine.addEngine('lazy-engine-c', '1.0.0', { + enableLazyLoading: true, + callback: (engine) => { + engine.addReferenceDependency('test-addon-a', '1.0.0'); + }, + }); + }, + }); + + let project = fixturifyProject.buildProjectModel(); + project.initializeAddons(); + + let { byName } = countAddons(project); + + expect(byName['lazy-engine-a'].realAddonInstanceCount).to.equal(1); + expect(byName['lazy-engine-a'].proxyCount).to.equal(0); + + expect(byName['lazy-engine-b'].realAddonInstanceCount).to.equal(1); + expect(byName['lazy-engine-b'].proxyCount).to.equal(0); + + expect(byName['lazy-engine-c'].realAddonInstanceCount).to.equal(1); + expect(byName['lazy-engine-c'].proxyCount).to.equal(0); + + expect(byName['test-addon-a'].realAddonInstanceCount).to.equal(1); + expect(byName['test-addon-a'].proxyCount).to.equal(2); + + const lazyEngineAPkgInfo = project.addons.find((addon) => addon.name === 'lazy-engine-a')._packageInfo; + let cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, lazyEngineAPkgInfo, 'test-addon-a'); + + expect(cacheEntries.length).to.equal(1, 'should exist; lazy-engine A depends on a non-project addon'); + + const lazyEngineBPkgInfo = project.addons + .find((addon) => addon.name === 'lazy-engine-a') + .addons.find((addon) => addon.name === 'lazy-engine-b')._packageInfo; + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, lazyEngineBPkgInfo, 'test-addon-a'); + + expect(cacheEntries).to.deep.equal( + [], + "lazy engine B's should exist, but be unusued; ultimately lazy engine A is responsible for bundling" + ); + + const lazyEngineCPkgInfo = project.addons + .find((addon) => addon.name === 'lazy-engine-a') + .addons.find((addon) => addon.name === 'lazy-engine-c')._packageInfo; + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, lazyEngineCPkgInfo, 'test-addon-a'); + + expect(cacheEntries).to.be.equal(null, 'should not exist; lazy-engine C has not opted-in to bundle caching'); + }); + + it('should work for a common ancestor host that is not the project where multiple hosts bundle the same addon', function () { + fixturifyProject.addInRepoEngine('test-addon-a', '1.0.0', { + allowCachingPerBundle: true, + }); + + fixturifyProject.pkg['ember-addon'].paths = []; + + fixturifyProject.addInRepoEngine('lazy-engine-a', '1.0.0', { + enableLazyLoading: true, + allowCachingPerBundle: true, + callback: (engine) => { + engine.pkg['ember-addon'].paths = ['../test-addon-a']; + + engine.addInRepoEngine('lazy-engine-a-lazy-engine-dep', '1.0.0', { + enableLazyLoading: true, + allowCachingPerBundle: true, + callback: (engine) => { + engine.pkg['ember-addon'].paths = ['../../../test-addon-a']; + }, + }); + }, + }); + + fixturifyProject.addInRepoEngine('lazy-engine-b', '1.0.0', { + enableLazyLoading: true, + allowCachingPerBundle: true, + callback: (engine) => { + engine.pkg['ember-addon'].paths = ['../test-addon-a']; + + engine.addInRepoEngine('lazy-engine-b-lazy-engine-dep', '1.0.0', { + enableLazyLoading: true, + allowCachingPerBundle: true, + callback: (engine) => { + engine.pkg['ember-addon'].paths = ['../../../test-addon-a']; + }, + }); + }, + }); + + let project = fixturifyProject.buildProjectModel(); + project.initializeAddons(); + + let { byName } = countAddons(project); + + expect(byName['lazy-engine-a'].realAddonInstanceCount).to.equal(1); + expect(byName['lazy-engine-a'].proxyCount).to.equal(0); + + expect(byName['lazy-engine-b'].realAddonInstanceCount).to.equal(1); + expect(byName['lazy-engine-b'].proxyCount).to.equal(0); + + expect(byName['test-addon-a'].realAddonInstanceCount).to.equal(2); + expect(byName['test-addon-a'].proxyCount).to.equal(2); + + const lazyEngineAPkgInfo = project.addons.find((addon) => addon.name === 'lazy-engine-a')._packageInfo; + let cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, lazyEngineAPkgInfo, 'test-addon-a'); + + expect(cacheEntries.length).to.equal(1, 'should exist; lazy-engine A depends on a non-project addon'); + + const lazyEngineBPkgInfo = project.addons.find((addon) => addon.name === 'lazy-engine-b')._packageInfo; + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, lazyEngineBPkgInfo, 'test-addon-a'); + + expect(cacheEntries.length).to.equal(1, 'should exist; lazy-engine B depends on a non-project addon'); + }); + + it('should work for a common ancestor host that is not the project with an addon bundled by a different host', function () { + fixturifyProject.addAddon('test-addon-a', '1.0.0', { + allowCachingPerBundle: true, + }); + + fixturifyProject.addAddon('test-addon-b', '1.0.0', (addon) => { + addon.addReferenceDependency('test-addon-a', '1.0.0'); + }); + + fixturifyProject.addEngine('lazy-engine-a', '1.0.0', { + enableLazyLoading: true, + allowCachingPerBundle: true, + callback: (engine) => { + engine.addReferenceDependency('test-addon-a', '1.0.0'); + + engine.addEngine('lazy-engine-b', '1.0.0', { + enableLazyLoading: true, + allowCachingPerBundle: true, + callback: (engine) => { + engine.addReferenceDependency('test-addon-a', '1.0.0'); + }, + }); + + engine.addEngine('lazy-engine-c', '1.0.0', { + enableLazyLoading: true, + callback: (engine) => { + engine.addReferenceDependency('test-addon-a', '1.0.0'); + }, + }); + }, + }); + + let project = fixturifyProject.buildProjectModel(); + project.initializeAddons(); + + let { byName } = countAddons(project); + + expect(byName['lazy-engine-a'].realAddonInstanceCount).to.equal(1); + expect(byName['lazy-engine-a'].proxyCount).to.equal(0); + + expect(byName['lazy-engine-b'].realAddonInstanceCount).to.equal(1); + expect(byName['lazy-engine-b'].proxyCount).to.equal(0); + + expect(byName['lazy-engine-c'].realAddonInstanceCount).to.equal(1); + expect(byName['lazy-engine-c'].proxyCount).to.equal(0); + + expect(byName['test-addon-a'].realAddonInstanceCount).to.equal(1); + expect(byName['test-addon-a'].proxyCount).to.equal(4); + + let cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, project._packageInfo, 'test-addon-a'); + + expect(cacheEntries.length).to.equal(1, 'project cache should be used'); + + const lazyEngineAPkgInfo = project.addons.find((addon) => addon.name === 'lazy-engine-a')._packageInfo; + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, lazyEngineAPkgInfo, 'test-addon-a'); + + expect(cacheEntries.length).to.equal(0, 'lazy engine A cache should not be used'); + + const lazyEngineBPkgInfo = project.addons + .find((addon) => addon.name === 'lazy-engine-a') + .addons.find((addon) => addon.name === 'lazy-engine-b')._packageInfo; + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, lazyEngineBPkgInfo, 'test-addon-a'); + + expect(cacheEntries).to.deep.equal([], 'should exist; lazy-engine B has opted-in to bundle caching'); + + expect(cacheEntries.length).to.equal(0, 'lazy engine B should have no entries; the project has bundled this'); + + const lazyEngineCPkgInfo = project.addons + .find((addon) => addon.name === 'lazy-engine-a') + .addons.find((addon) => addon.name === 'lazy-engine-c')._packageInfo; + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, lazyEngineCPkgInfo, 'test-addon-a'); + + expect(cacheEntries).to.be.equal(null, 'should not exist; lazy-engine C has not opted-in to bundle caching'); + }); + + it('should work for a common ancestor host that is not the project with an addon bundled by a different host when building a lazy engine independently', function () { + fixturifyProject.addAddon('test-addon-a', '1.0.0', { + allowCachingPerBundle: true, + }); + + fixturifyProject.addInRepoEngine('lazy-engine-a-project', '1.0.0', { + enableLazyLoading: true, + callback: (projectLazyEngine) => { + projectLazyEngine.addReferenceDependency('test-addon-a', '1.0.0'); + + projectLazyEngine.addAddon('test-addon-b', '1.0.0', { + allowCachingPerBundle: true, + callback: (addon) => { + addon.addReferenceDependency('test-addon-a', '1.0.0'); + }, + }); + + projectLazyEngine.addEngine('lazy-engine-a', '1.0.0', { + enableLazyLoading: true, + allowCachingPerBundle: true, + callback: (engine) => { + engine.addReferenceDependency('test-addon-a', '1.0.0'); + + engine.addEngine('lazy-engine-b', '1.0.0', { + enableLazyLoading: true, + allowCachingPerBundle: true, + callback: (engine) => { + engine.addReferenceDependency('test-addon-a', '1.0.0'); + }, + }); + + engine.addEngine('lazy-engine-c', '1.0.0', { + enableLazyLoading: true, + callback: (engine) => { + engine.addReferenceDependency('test-addon-a', '1.0.0'); + }, + }); + }, + }); + }, + }); + + let project = fixturifyProject.buildProjectModelForInRepoAddon('lazy-engine-a-project'); + project.initializeAddons(); + + let { byName } = countAddons(project); + + expect(byName['lazy-engine-a'].realAddonInstanceCount).to.equal(1); + expect(byName['lazy-engine-a'].proxyCount).to.equal( + 1, + 'engine should be added as a dependency to `ember-cli`, so we should have 1 proxy' + ); + + expect(byName['lazy-engine-b'].realAddonInstanceCount).to.equal(1); + expect(byName['lazy-engine-b'].proxyCount).to.equal(0); + + expect(byName['lazy-engine-c'].realAddonInstanceCount).to.equal(1); + expect(byName['lazy-engine-c'].proxyCount).to.equal(0); + + expect(byName['test-addon-a'].realAddonInstanceCount).to.equal(1); + expect(byName['test-addon-a'].proxyCount).to.equal(5); + + let cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, project._packageInfo, 'test-addon-a'); + + expect(cacheEntries.length).to.equal(1, 'project cache should not be used'); + + const lazyEngineAPkgInfo = project.addons + .find((addon) => addon.name === 'lazy-engine-a-project') + .addons.find((addon) => addon.name === 'lazy-engine-a')._packageInfo; + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, lazyEngineAPkgInfo, 'test-addon-a'); + + expect(cacheEntries.length).to.equal(0, 'lazy engine A cache should not be used'); + + const lazyEngineBPkgInfo = project.addons + .find((addon) => addon.name === 'lazy-engine-a-project') + .addons.find((addon) => addon.name === 'lazy-engine-a') + .addons.find((addon) => addon.name === 'lazy-engine-b')._packageInfo; + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, lazyEngineBPkgInfo, 'test-addon-a'); + + expect(cacheEntries).to.deep.equal([], 'should exist; lazy-engine B has opted-in to bundle caching'); + + expect(cacheEntries.length).to.equal(0, 'lazy engine B should have no entries; the project has bundled this'); + + const lazyEngineCPkgInfo = project.addons + .find((addon) => addon.name === 'lazy-engine-a-project') + .addons.find((addon) => addon.name === 'lazy-engine-a') + .addons.find((addon) => addon.name === 'lazy-engine-c')._packageInfo; + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, lazyEngineCPkgInfo, 'test-addon-a'); + + expect(cacheEntries).to.be.equal(null, 'should not exist; lazy-engine C has not opted-in to bundle caching'); }); }); @@ -387,11 +693,12 @@ describe('models/per-bundle-addon-cache', function () { expect(counts.byName['test-addon-a'].realAddonInstanceCount).to.equal(2); expect(counts.byName['test-addon-a'].proxyCount).to.equal(0); - let cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-a', 'test-addon-a'); + const lazyEngineAPkgInfo = project.addons.find((addon) => addon.name === 'lazy-engine-a')._packageInfo; + let cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, lazyEngineAPkgInfo, 'test-addon-a'); expect(cacheEntries).to.exist; expect(cacheEntries.length).to.equal(1); - cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, '__PROJECT__', 'test-addon-a'); + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, project._packageInfo, 'test-addon-a'); expect(cacheEntries).to.exist; expect(cacheEntries.length).to.equal(1); }); @@ -427,11 +734,13 @@ describe('models/per-bundle-addon-cache', function () { expect(counts.byName['test-addon-a'].realAddonInstanceCount).to.equal(2); expect(counts.byName['test-addon-a'].proxyCount).to.equal(0); - let cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-a', 'test-addon-a'); + const lazyEngineAPkgInfo = project.addons.find((addon) => addon.name === 'lazy-engine-a')._packageInfo; + let cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, lazyEngineAPkgInfo, 'test-addon-a'); expect(cacheEntries).to.exist; expect(cacheEntries.length).to.equal(1); - cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-b', 'test-addon-a'); + const lazyEngineBPkgInfo = project.addons.find((addon) => addon.name === 'lazy-engine-b')._packageInfo; + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, lazyEngineBPkgInfo, 'test-addon-a'); expect(cacheEntries).to.exist; expect(cacheEntries.length).to.equal(1); }); @@ -467,11 +776,13 @@ describe('models/per-bundle-addon-cache', function () { expect(counts.byName['test-addon-a'].realAddonInstanceCount).to.equal(3); expect(counts.byName['test-addon-a'].proxyCount).to.equal(0); - let cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-a', 'test-addon-a'); + const lazyEngineAPkgInfo = project.addons.find((addon) => addon.name === 'lazy-engine-a')._packageInfo; + let cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, lazyEngineAPkgInfo, 'test-addon-a'); expect(cacheEntries).to.exist; expect(cacheEntries.length).to.equal(1); - cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-b', 'test-addon-a'); + const lazyEngineBPkgInfo = project.addons.find((addon) => addon.name === 'lazy-engine-b')._packageInfo; + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, lazyEngineBPkgInfo, 'test-addon-a'); expect(cacheEntries).to.exist; expect(cacheEntries.length).to.equal(1); }); @@ -517,7 +828,7 @@ describe('models/per-bundle-addon-cache', function () { expect(byName['test-addon-a'].realAddonInstanceCount).to.equal(1); expect(byName['test-addon-a'].proxyCount).to.equal(1); - let cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, '__PROJECT__', 'test-addon-a'); + let cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, project._packageInfo, 'test-addon-a'); expect(cacheEntries).to.exist; expect(cacheEntries.length).to.equal(1); }); @@ -555,7 +866,7 @@ describe('models/per-bundle-addon-cache', function () { expect(byName['test-addon-a'].realAddonInstanceCount).to.equal(1); expect(byName['test-addon-a'].proxyCount).to.equal(2); - let cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, '__PROJECT__', 'test-addon-a'); + let cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, project._packageInfo, 'test-addon-a'); expect(cacheEntries).to.exist; expect(cacheEntries.length).to.equal(1); }); @@ -604,19 +915,21 @@ describe('models/per-bundle-addon-cache', function () { expect(byName['test-addon-b'].realAddonInstanceCount).to.equal(2); expect(byName['test-addon-b'].proxyCount).to.equal(2); - let cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-a', 'test-addon-a'); + const lazyEngineAPkgInfo = project.addons.find((addon) => addon.name === 'lazy-engine-a')._packageInfo; + let cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, lazyEngineAPkgInfo, 'test-addon-a'); expect(cacheEntries).to.exist; expect(cacheEntries.length).to.equal(1); - cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-a', 'test-addon-b'); + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, lazyEngineAPkgInfo, 'test-addon-b'); expect(cacheEntries).to.exist; expect(cacheEntries.length).to.equal(1); - cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-b', 'test-addon-a'); + const lazyEngineBPkgInfo = project.addons.find((addon) => addon.name === 'lazy-engine-b')._packageInfo; + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, lazyEngineBPkgInfo, 'test-addon-a'); expect(cacheEntries).to.exist; expect(cacheEntries.length).to.equal(1); - cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, 'lazy-engine-b', 'test-addon-b'); + cacheEntries = findAddonCacheEntriesByName(project.perBundleAddonCache, lazyEngineBPkgInfo, 'test-addon-b'); expect(cacheEntries).to.exist; expect(cacheEntries.length).to.equal(1); }); From eef31df15662e137828f10f980bd7877b226a16d Mon Sep 17 00:00:00 2001 From: Logan Rosen Date: Sat, 22 May 2021 21:01:06 -0400 Subject: [PATCH 766/818] Use relative override paths in blueprint ESLint config --- blueprints/app/files/.eslintrc.js | 30 ++++++++----------- tests/fixtures/addon/.eslintrc.js | 24 ++++++--------- tests/fixtures/app/.eslintrc.js | 18 +++++------ .../.eslintrc.js | 18 +++++------ 4 files changed, 39 insertions(+), 51 deletions(-) diff --git a/blueprints/app/files/.eslintrc.js b/blueprints/app/files/.eslintrc.js index 5d8554f79d..13f59d4928 100644 --- a/blueprints/app/files/.eslintrc.js +++ b/blueprints/app/files/.eslintrc.js @@ -24,24 +24,18 @@ module.exports = { // node files { files: [ - '.eslintrc.js', - '.prettierrc.js', - '.template-lintrc.js', - 'ember-cli-build.js',<% if (blueprint !== 'app') { %> - 'index.js',<% } %> - 'testem.js', - 'blueprints/*/index.js', - 'config/**/*.js',<% if (blueprint === 'app') { %> - 'lib/*/index.js', - 'server/**/*.js',<% } else { %> - 'tests/dummy/config/**/*.js',<% } %> - ],<% if (blueprint !== 'app') { %> - excludedFiles: [ - 'addon/**', - 'addon-test-support/**', - 'app/**', - 'tests/dummy/app/**', - ],<% } %> + './.eslintrc.js', + './.prettierrc.js', + './.template-lintrc.js', + './ember-cli-build.js',<% if (blueprint !== 'app') { %> + './index.js',<% } %> + './testem.js', + './blueprints/*/index.js', + './config/**/*.js',<% if (blueprint === 'app') { %> + './lib/*/index.js', + './server/**/*.js',<% } else { %> + './tests/dummy/config/**/*.js',<% } %> + ], parserOptions: { sourceType: 'script', }, diff --git a/tests/fixtures/addon/.eslintrc.js b/tests/fixtures/addon/.eslintrc.js index f96283aad0..ab627f4f0c 100644 --- a/tests/fixtures/addon/.eslintrc.js +++ b/tests/fixtures/addon/.eslintrc.js @@ -24,21 +24,15 @@ module.exports = { // node files { files: [ - '.eslintrc.js', - '.prettierrc.js', - '.template-lintrc.js', - 'ember-cli-build.js', - 'index.js', - 'testem.js', - 'blueprints/*/index.js', - 'config/**/*.js', - 'tests/dummy/config/**/*.js', - ], - excludedFiles: [ - 'addon/**', - 'addon-test-support/**', - 'app/**', - 'tests/dummy/app/**', + './.eslintrc.js', + './.prettierrc.js', + './.template-lintrc.js', + './ember-cli-build.js', + './index.js', + './testem.js', + './blueprints/*/index.js', + './config/**/*.js', + './tests/dummy/config/**/*.js', ], parserOptions: { sourceType: 'script', diff --git a/tests/fixtures/app/.eslintrc.js b/tests/fixtures/app/.eslintrc.js index 81790af63d..41a1a43d82 100644 --- a/tests/fixtures/app/.eslintrc.js +++ b/tests/fixtures/app/.eslintrc.js @@ -24,15 +24,15 @@ module.exports = { // node files { files: [ - '.eslintrc.js', - '.prettierrc.js', - '.template-lintrc.js', - 'ember-cli-build.js', - 'testem.js', - 'blueprints/*/index.js', - 'config/**/*.js', - 'lib/*/index.js', - 'server/**/*.js', + './.eslintrc.js', + './.prettierrc.js', + './.template-lintrc.js', + './ember-cli-build.js', + './testem.js', + './blueprints/*/index.js', + './config/**/*.js', + './lib/*/index.js', + './server/**/*.js', ], parserOptions: { sourceType: 'script', diff --git a/tests/fixtures/app/with-blueprint-override-lint-fail/.eslintrc.js b/tests/fixtures/app/with-blueprint-override-lint-fail/.eslintrc.js index da079e309d..056424da73 100644 --- a/tests/fixtures/app/with-blueprint-override-lint-fail/.eslintrc.js +++ b/tests/fixtures/app/with-blueprint-override-lint-fail/.eslintrc.js @@ -24,15 +24,15 @@ module.exports = { // node files { files: [ - '.eslintrc.js', - '.prettierrc.js', - '.template-lintrc.js', - 'ember-cli-build.js', - 'testem.js', - 'blueprints/*/index.js', - 'config/**/*.js', - 'lib/*/index.js', - 'server/**/*.js', + './.eslintrc.js', + './.prettierrc.js', + './.template-lintrc.js', + './ember-cli-build.js', + './testem.js', + './blueprints/*/index.js', + './config/**/*.js', + './lib/*/index.js', + './server/**/*.js', ], parserOptions: { sourceType: 'script', From 821bc7a3d5eb8b168a58ea31bc6da56e46ef0b8f Mon Sep 17 00:00:00 2001 From: Phil Gengler Date: Sat, 22 May 2021 21:19:26 -0400 Subject: [PATCH 767/818] Use a better dummy package than fs-extra in a test The 'fs-extra' package, as of version 10, has dropped Node 10 support, leading to failing builds for beta (which still has Node 10 support). This changes the test that uses that package (via a blueprint) to instead use the 'ember-try-test-suite-helper' package (which was created as a dummy package for ember-try to use). Since that package doesn't have any dependencies/devDependencies or an 'engines' statement it should not end up with any conflicts down the line. --- tests/acceptance/new-test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/acceptance/new-test.js b/tests/acceptance/new-test.js index 0ced6d107b..eac5c1ee0d 100644 --- a/tests/acceptance/new-test.js +++ b/tests/acceptance/new-test.js @@ -321,13 +321,13 @@ describe('Acceptance: ember new', function () { fs.mkdirsSync('my_blueprint/files'); fs.writeFileSync('my_blueprint/index.js', 'module.exports = {};'); - fs.writeFileSync('my_blueprint/files/package.json', '{ "name": "foo", "dependencies": { "fs-extra": "*" }}'); + fs.writeFileSync('my_blueprint/files/package.json', '{ "name": "foo", "dependencies": { "ember-try-test-suite-helper": "*" }}'); fs.writeFileSync('my_blueprint/files/yarn.lock', ''); await ember(['new', 'foo', '--skip-git', '--blueprint=./my_blueprint']); expect(file('yarn.lock')).to.not.be.empty; - expect(dir('node_modules/fs-extra')).to.not.be.empty; + expect(dir('node_modules/ember-try-test-suite-helper')).to.not.be.empty; }); it('ember new without skip-git flag creates .git dir', async function () { From 2794f8eb6eac39ec309a8a7cca1eb1af6f0e8b61 Mon Sep 17 00:00:00 2001 From: Phil Gengler Date: Sat, 22 May 2021 22:31:21 -0400 Subject: [PATCH 768/818] Fix lint failure --- tests/acceptance/new-test.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/acceptance/new-test.js b/tests/acceptance/new-test.js index eac5c1ee0d..e9e85414a2 100644 --- a/tests/acceptance/new-test.js +++ b/tests/acceptance/new-test.js @@ -321,7 +321,10 @@ describe('Acceptance: ember new', function () { fs.mkdirsSync('my_blueprint/files'); fs.writeFileSync('my_blueprint/index.js', 'module.exports = {};'); - fs.writeFileSync('my_blueprint/files/package.json', '{ "name": "foo", "dependencies": { "ember-try-test-suite-helper": "*" }}'); + fs.writeFileSync( + 'my_blueprint/files/package.json', + '{ "name": "foo", "dependencies": { "ember-try-test-suite-helper": "*" }}' + ); fs.writeFileSync('my_blueprint/files/yarn.lock', ''); await ember(['new', 'foo', '--skip-git', '--blueprint=./my_blueprint']); From 54853ba90c2cebb6f043a9588cd8d43e5f77ce98 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 24 May 2021 14:21:58 +0000 Subject: [PATCH 769/818] Bump broccoli-funnel from 2.0.2 to 3.0.5 Bumps [broccoli-funnel](https://github.com/broccolijs/broccoli-funnel) from 2.0.2 to 3.0.5. - [Release notes](https://github.com/broccolijs/broccoli-funnel/releases) - [Changelog](https://github.com/broccolijs/broccoli-funnel/blob/master/CHANGELOG.md) - [Commits](https://github.com/broccolijs/broccoli-funnel/compare/v2.0.2...v3.0.5) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 59 ++++++++++++++++++++++++++++++++-------------------- 2 files changed, 38 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index 63b89225d9..a6c0f9cfd2 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "broccoli-config-loader": "^1.0.1", "broccoli-config-replace": "^1.1.2", "broccoli-debug": "^0.6.5", - "broccoli-funnel": "^2.0.2", + "broccoli-funnel": "^3.0.5", "broccoli-funnel-reducer": "^1.0.0", "broccoli-merge-trees": "^3.0.2", "broccoli-middleware": "^2.1.1", diff --git a/yarn.lock b/yarn.lock index f1e23c2a67..62b598d6d0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1314,6 +1314,22 @@ broccoli-funnel@^2.0.0, broccoli-funnel@^2.0.1, broccoli-funnel@^2.0.2: symlink-or-copy "^1.0.0" walk-sync "^0.3.1" +broccoli-funnel@^3.0.5: + version "3.0.5" + resolved "https://registry.yarnpkg.com/broccoli-funnel/-/broccoli-funnel-3.0.5.tgz#60da33d060fae2936b3d78217bd4008a6eea5e41" + integrity sha512-fcjvQIWq4lpKyzQ7FWRo/V8/nOALjIrAoRMFCLgFeO2xhOC1+i7QWbMndLTwpnLCoXpTa+luBu3WSFoxQ3VPlw== + dependencies: + array-equal "^1.0.0" + blank-object "^1.0.1" + broccoli-plugin "^4.0.7" + debug "^4.1.1" + fast-ordered-set "^1.0.0" + fs-tree-diff "^2.0.1" + heimdalljs "^0.2.0" + minimatch "^3.0.0" + path-posix "^1.0.0" + walk-sync "^2.0.2" + broccoli-kitchen-sink-helpers@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/broccoli-kitchen-sink-helpers/-/broccoli-kitchen-sink-helpers-0.3.1.tgz#77c7c18194b9664163ec4fcee2793444926e0c06" @@ -1355,10 +1371,10 @@ broccoli-node-info@^2.1.0: resolved "https://registry.yarnpkg.com/broccoli-node-info/-/broccoli-node-info-2.1.0.tgz#ca84560e8570ff78565bea1699866ddbf58ad644" integrity sha512-l6qDuboJThHfRVVWQVaTs++bFdrFTP0gJXgsWenczc1PavRVUmL1Eyb2swTAXXMpDOnr2zhNOBLx4w9AxkqbPQ== -broccoli-output-wrapper@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/broccoli-output-wrapper/-/broccoli-output-wrapper-3.2.1.tgz#8f9d1092afe0c1a4b7a1b6f0d2c62f1c403e82ad" - integrity sha512-mhOTy8AyzEsqgefR2ejbv5QTy3dbY2bvDfkARo55Xml52r2MU0CehQu4T/CH6oPcAXkdVYG/hGm9UpV1vU9Ohg== +broccoli-output-wrapper@^3.2.5: + version "3.2.5" + resolved "https://registry.yarnpkg.com/broccoli-output-wrapper/-/broccoli-output-wrapper-3.2.5.tgz#514b17801c92922a2c2f87fd145df2a25a11bc5f" + integrity sha512-bQAtwjSrF4Nu0CK0JOy5OZqw9t5U0zzv2555EA/cF8/a8SLDTIetk9UgrtMVw7qKLKdSpOZ2liZNeZZDaKgayw== dependencies: fs-extra "^8.1.0" heimdalljs-logger "^0.1.10" @@ -1423,18 +1439,18 @@ broccoli-plugin@^2.1.0: rimraf "^2.3.4" symlink-or-copy "^1.1.8" -broccoli-plugin@^4.0.2, broccoli-plugin@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/broccoli-plugin/-/broccoli-plugin-4.0.3.tgz#9dcfbfb6a1b27a37cc22e65c071719ce9f92bc1e" - integrity sha512-CtAIEYq5K+4yQv8c/BHymOteuyjDAJfvy/asu4LudIWcMSS7dTn3yGI5gNBkwHG+qlRangYkHJNVAcDZMQbSVQ== +broccoli-plugin@^4.0.2, broccoli-plugin@^4.0.3, broccoli-plugin@^4.0.7: + version "4.0.7" + resolved "https://registry.yarnpkg.com/broccoli-plugin/-/broccoli-plugin-4.0.7.tgz#dd176a85efe915ed557d913744b181abe05047db" + integrity sha512-a4zUsWtA1uns1K7p9rExYVYG99rdKeGRymW0qOCNkvDPHQxVi3yVyJHhQbM3EZwdt2E0mnhr5e0c/bPpJ7p3Wg== dependencies: - broccoli-node-api "^1.6.0" - broccoli-output-wrapper "^3.2.1" - fs-merger "^3.1.0" - promise-map-series "^0.2.1" - quick-temp "^0.1.3" - rimraf "^3.0.0" - symlink-or-copy "^1.3.0" + broccoli-node-api "^1.7.0" + broccoli-output-wrapper "^3.2.5" + fs-merger "^3.2.1" + promise-map-series "^0.3.0" + quick-temp "^0.1.8" + rimraf "^3.0.2" + symlink-or-copy "^1.3.1" broccoli-slow-trees@^3.0.1, broccoli-slow-trees@^3.1.0: version "3.1.0" @@ -3620,17 +3636,16 @@ fs-extra@^9.1.0: jsonfile "^6.0.1" universalify "^2.0.0" -fs-merger@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/fs-merger/-/fs-merger-3.1.0.tgz#f30f74f6c70b2ff7333ec074f3d2f22298152f3b" - integrity sha512-RZ9JtqugaE8Rkt7idO5NSwcxEGSDZpLmVFjtVQUm3f+bWun7JAU6fKyU6ZJUeUnKdJwGx8uaro+K4QQfOR7vpA== +fs-merger@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/fs-merger/-/fs-merger-3.2.1.tgz#a225b11ae530426138294b8fbb19e82e3d4e0b3b" + integrity sha512-AN6sX12liy0JE7C2evclwoo0aCG3PFulLjrTLsJpWh/2mM+DinhpSGqYLbHBBbIW1PLRNcFhJG8Axtz8mQW3ug== dependencies: broccoli-node-api "^1.7.0" broccoli-node-info "^2.1.0" fs-extra "^8.0.1" fs-tree-diff "^2.0.1" - rimraf "^2.6.3" - walk-sync "^2.0.2" + walk-sync "^2.2.0" fs-sync@^1.0.4: version "1.0.6" @@ -7588,7 +7603,7 @@ symbol-tree@^3.2.4: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== -symlink-or-copy@^1.0.0, symlink-or-copy@^1.0.1, symlink-or-copy@^1.1.8, symlink-or-copy@^1.2.0, symlink-or-copy@^1.3.0, symlink-or-copy@^1.3.1: +symlink-or-copy@^1.0.0, symlink-or-copy@^1.0.1, symlink-or-copy@^1.1.8, symlink-or-copy@^1.2.0, symlink-or-copy@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/symlink-or-copy/-/symlink-or-copy-1.3.1.tgz#9506dd64d8e98fa21dcbf4018d1eab23e77f71fe" integrity sha512-0K91MEXFpBUaywiwSSkmKjnGcasG/rVBXFLJz5DrgGabpYD6N+3yZrfD6uUIfpuTu65DZLHi7N8CizHc07BPZA== From 8fd2b2c5cbb7e22e31e163b83709f656d8e31dd0 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 24 May 2021 10:32:46 -0400 Subject: [PATCH 770/818] Remove ignored versions from Dependabot config --- .github/dependabot.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 9bf1f33fe6..4df07ddd67 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,19 +7,6 @@ updates: time: "03:00" open-pull-requests-limit: 10 versioning-strategy: increase - ignore: - - dependency-name: mocha-eslint - versions: - - "> 4.1.0" - - dependency-name: js-yaml - versions: - - 4.0.0 - - dependency-name: broccoli-funnel - versions: - - 3.0.3 - - dependency-name: supertest - versions: - - 6.1.1 - package-ecosystem: github-actions directory: "/" schedule: From f097bfb823fe1e81e6c334c622f6d28757baa14c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 May 2021 19:10:44 +0000 Subject: [PATCH 771/818] Bump actions/setup-node from 1 to 2.1.5 Bumps [actions/setup-node](https://github.com/actions/setup-node) from 1 to 2.1.5. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v1...v2.1.5) Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 8 ++++---- .github/workflows/coverage.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4779dc117e..1c2145ae80 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v2.1.5 with: node-version: 12.x @@ -38,7 +38,7 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v2.1.5 with: node-version: 12.x @@ -59,7 +59,7 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v2.1.5 with: node-version: ${{ matrix.node-version }} @@ -83,7 +83,7 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v2.1.5 with: node-version: 12.x diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 26213873b6..0ee64934fd 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v2.1.5 with: node-version: 12.x From 944f29dc80dfbd45c66716f1c97db768b0570b27 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 May 2021 22:16:33 +0000 Subject: [PATCH 772/818] Bump paambaati/codeclimate-action from 2.5.5 to 2.7.5 Bumps [paambaati/codeclimate-action](https://github.com/paambaati/codeclimate-action) from 2.5.5 to 2.7.5. - [Release notes](https://github.com/paambaati/codeclimate-action/releases) - [Changelog](https://github.com/paambaati/codeclimate-action/blob/master/CHANGELOG.md) - [Commits](https://github.com/paambaati/codeclimate-action/compare/v2.5.5...v2.7.5) Signed-off-by: dependabot[bot] --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 0ee64934fd..dabece3db2 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -18,7 +18,7 @@ jobs: - run: yarn install --frozen-lockfile --non-interactive - name: Test && Report to Code Climate - uses: paambaati/codeclimate-action@v2.5.5 + uses: paambaati/codeclimate-action@v2.7.5 env: CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} with: From c6a8e76d3a084b99896de3a197ddf700eafa3c5c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 May 2021 01:24:32 +0000 Subject: [PATCH 773/818] Bump chai from 4.2.0 to 4.3.4 Bumps [chai](https://github.com/chaijs/chai) from 4.2.0 to 4.3.4. - [Release notes](https://github.com/chaijs/chai/releases) - [Changelog](https://github.com/chaijs/chai/blob/main/History.md) - [Commits](https://github.com/chaijs/chai/compare/4.2.0...v4.3.4) Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index a6c0f9cfd2..661414d95b 100644 --- a/package.json +++ b/package.json @@ -134,7 +134,7 @@ "@octokit/rest": "^18.0.15", "broccoli-plugin": "^4.0.3", "broccoli-test-helper": "^2.0.0", - "chai": "^4.2.0", + "chai": "^4.3.4", "chai-as-promised": "^7.1.1", "chai-files": "^1.4.0", "ember-cli-blueprint-test-helpers": "^0.19.2", diff --git a/yarn.lock b/yarn.lock index 62b598d6d0..f85a2c04e4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1766,16 +1766,16 @@ chai@^3.3.0: deep-eql "^0.1.3" type-detect "^1.0.0" -chai@^4.1.0, chai@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.2.0.tgz#760aa72cf20e3795e84b12877ce0e83737aa29e5" - integrity sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw== +chai@^4.1.0, chai@^4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.4.tgz#b55e655b31e1eac7099be4c08c21964fce2e6c49" + integrity sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA== dependencies: assertion-error "^1.1.0" check-error "^1.0.2" deep-eql "^3.0.1" get-func-name "^2.0.0" - pathval "^1.1.0" + pathval "^1.1.1" type-detect "^4.0.5" chalk@4.1.0, chalk@^4.0.0, chalk@^4.1.0: @@ -6304,10 +6304,10 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -pathval@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" - integrity sha1-uULm1L3mUwBe9rcTYd74cn0GReA= +pathval@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" + integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== performance-now@^2.1.0: version "2.1.0" From d1cd874e767a0fba5c1242deb72ed2c23f38fc54 Mon Sep 17 00:00:00 2001 From: Brenden Palmer Date: Sun, 23 May 2021 01:20:41 -0400 Subject: [PATCH 774/818] add validation for addon instance bundle caching --- lib/broccoli/ember-app.js | 24 ++++++ .../per-bundle-addon-cache/addon-proxy.js | 52 ++++++++++++- lib/models/per-bundle-addon-cache/index.js | 30 +++++--- tests/unit/broccoli/ember-app-test.js | 74 +++++++++++++++++++ .../per-bundle-addon-cache/proxy-test.js | 72 +++++++++++++++++- 5 files changed, 238 insertions(+), 14 deletions(-) diff --git a/lib/broccoli/ember-app.js b/lib/broccoli/ember-app.js index 8334737380..0b52fe442a 100644 --- a/lib/broccoli/ember-app.js +++ b/lib/broccoli/ember-app.js @@ -168,6 +168,30 @@ class EmberApp { this._isPackageHookSupplied = typeof this.options.package === 'function'; this._cachedAddonBundles = {}; + + if (this.project.perBundleAddonCache && this.project.perBundleAddonCache.numProxies > 0) { + if (this.options.addons.whitelist && this.options.addons.whitelist.length) { + throw new Error( + [ + '[ember-cli] addon bundle caching is disabled for apps that specify an addon `whitelist`', + '', + 'All addons using bundle caching:', + ...this.project.perBundleAddonCache.getPathsToAddonsOptedIn(), + ].join('\n') + ); + } + + if (this.options.addons.blacklist && this.options.addons.blacklist.length) { + throw new Error( + [ + '[ember-cli] addon bundle caching is disabled for apps that specify an addon `blacklist`', + '', + 'All addons using bundle caching:', + ...this.project.perBundleAddonCache.getPathsToAddonsOptedIn(), + ].join('\n') + ); + } + } } /** diff --git a/lib/models/per-bundle-addon-cache/addon-proxy.js b/lib/models/per-bundle-addon-cache/addon-proxy.js index a1b5612b67..9c41b3c7db 100644 --- a/lib/models/per-bundle-addon-cache/addon-proxy.js +++ b/lib/models/per-bundle-addon-cache/addon-proxy.js @@ -2,6 +2,43 @@ const { TARGET_INSTANCE } = require('./target-instance'); +const CACHE_KEY_FOR_TREE_TRACKER = Symbol('CACHE_KEY_FOR_TREE_TRACKER'); + +/** + * Validates that a new cache key for a given tree type matches the previous + * cache key for the same tree type. To opt-in to bundle addon caching for + * a given addon it's assumed that it returns stable cache keys; specifically + * this is because the interplay between bundle addon caching and `ember-engines` + * when transitive deduplication is enabled assumes stable cache keys, so we validate + * for this case here. + * + * @method validateCacheKey + * @param {Addon} realAddonInstance The real addon instance + * @param {string} treeType + * @param {string} newCacheKey + * @throws {Error} If the new cache key doesn't match the previous cache key + */ +function validateCacheKey(realAddonInstance, treeType, newCacheKey) { + let cacheKeyTracker = realAddonInstance[CACHE_KEY_FOR_TREE_TRACKER]; + + if (!cacheKeyTracker) { + cacheKeyTracker = {}; + realAddonInstance[CACHE_KEY_FOR_TREE_TRACKER] = cacheKeyTracker; + } + + cacheKeyTracker[treeType] = treeType in cacheKeyTracker ? cacheKeyTracker[treeType] : newCacheKey; + + if (cacheKeyTracker[treeType] !== newCacheKey) { + throw new Error( + `[ember-cli] addon bundle caching can only be used on addons that have stable cache keys (previously \`${ + cacheKeyTracker[treeType] + }\`, now \`${newCacheKey}\`; for addon \`${realAddonInstance.name}\` located at \`${ + realAddonInstance.packageRoot || realAddonInstance.root + }\`)` + ); + } +} + /** * Returns a proxy to a target with specific handling for the * `parent` property, as well has to handle the `app` property; @@ -26,7 +63,8 @@ const { TARGET_INSTANCE } = require('./target-instance'); */ function getAddonProxy(targetCacheEntry, parent) { let _app; - let addonProxy = new Proxy(targetCacheEntry, { + + return new Proxy(targetCacheEntry, { get(targetCacheEntry, property) { if (property === 'parent') { return parent; @@ -64,7 +102,14 @@ function getAddonProxy(targetCacheEntry, parent) { // invoked is the proxy, not the original instance (so its local state is incorrect). // Wrap the original methods to maintain the correct 'this' context. return function _originalAddonPropMethodWrapper() { - return targetCacheEntry[TARGET_INSTANCE][property](...arguments); + let originalReturnValue = targetCacheEntry[TARGET_INSTANCE][property](...arguments); + + if (property === 'cacheKeyForTree') { + const treeType = arguments[0]; + validateCacheKey(targetCacheEntry[TARGET_INSTANCE], treeType, originalReturnValue); + } + + return originalReturnValue; }; } @@ -86,7 +131,6 @@ function getAddonProxy(targetCacheEntry, parent) { return Reflect.set(targetCacheEntry, property, value); }, }); - - return addonProxy; } + module.exports = { getAddonProxy }; diff --git a/lib/models/per-bundle-addon-cache/index.js b/lib/models/per-bundle-addon-cache/index.js index 2f80da8d95..b3f05b5fa6 100644 --- a/lib/models/per-bundle-addon-cache/index.js +++ b/lib/models/per-bundle-addon-cache/index.js @@ -300,6 +300,18 @@ class PerBundleAddonCache { } } + getPathsToAddonsOptedIn() { + const addonSet = new Set(); + + for (const [, { addonInstanceCache }] of this.bundleHostCache) { + Array.from(addonInstanceCache.keys()).forEach((realPath) => { + addonSet.add(realPath); + }); + } + + return Array.from(addonSet); + } + _getBundleHostCacheEntry(pkgInfo) { let cacheEntry = this.bundleHostCache.get(pkgInfo); @@ -310,15 +322,15 @@ class PerBundleAddonCache { return cacheEntry; } + + // Support for per-bundle addon caching is GLOBAL opt OUT (unless you explicitly set + // EMBER_CLI_ADDON_INSTANCE_CACHING to false, it will be enabled.) If you opt out, that + // overrides setting `allowCachingPerBundle` for any particular addon type to true. + // To help make testing easier, we'll expose the setting as a function so it can be + // called multiple times and evaluate each time. + static isEnabled() { + return process.env.EMBER_CLI_ADDON_INSTANCE_CACHING !== 'false'; + } } module.exports = PerBundleAddonCache; - -// Support for per-bundle addon caching is GLOBAL opt OUT (unless you explicitly set -// EMBER_CLI_ADDON_INSTANCE_CACHING to false, it will be enabled.) If you opt out, that -// overrides setting `allowCachingPerBundle` for any particular addon type to true. -// To help make testing easier, we'll expose the setting as a function so it can be -// called multiple times and evaluate each time. -module.exports.isEnabled = function () { - return process.env.EMBER_CLI_ADDON_INSTANCE_CACHING !== 'false'; -}; diff --git a/tests/unit/broccoli/ember-app-test.js b/tests/unit/broccoli/ember-app-test.js index a982a63a33..65673a1f8f 100644 --- a/tests/unit/broccoli/ember-app-test.js +++ b/tests/unit/broccoli/ember-app-test.js @@ -1,6 +1,7 @@ 'use strict'; const path = require('path'); +const FixturifyProject = require('../../helpers/fixturify-project'); const Project = require('../../../lib/models/project'); const expect = require('chai').expect; const td = require('testdouble'); @@ -1221,6 +1222,79 @@ describe('EmberApp', function () { }); }); + describe('addon instance bundle caching validation (when used within the project)', function () { + let fixturifyProject; + + beforeEach(function () { + fixturifyProject = new FixturifyProject('awesome-proj', '1.0.0'); + fixturifyProject.addDevDependency('ember-cli', '*'); + }); + + afterEach(function () { + fixturifyProject.dispose(); + }); + + it('throws an error if an addon `whitelist` is specified', function () { + fixturifyProject.addInRepoAddon('foo', '1.0.0', { allowCachingPerBundle: true }); + fixturifyProject.addInRepoAddon('foo-bar', '1.0.0', { + callback: (inRepoAddon) => { + inRepoAddon.pkg['ember-addon'].paths = ['../foo']; + }, + }); + + fixturifyProject.writeSync(); + + let projectWithBundleCaching = fixturifyProject.buildProjectModel(); + projectWithBundleCaching.initializeAddons(); + + expect(() => { + new EmberApp({ + project: projectWithBundleCaching, + addons: { + whitelist: ['foo'], + }, + }); + }).to.throw( + [ + '[ember-cli] addon bundle caching is disabled for apps that specify an addon `whitelist`', + '', + 'All addons using bundle caching:', + projectWithBundleCaching.addons.find((addon) => addon.name === 'foo').packageRoot, + ].join('\n') + ); + }); + + it('throws an error if an addon `blacklist` is specified', function () { + fixturifyProject.addInRepoAddon('foo', '1.0.0', { allowCachingPerBundle: true }); + fixturifyProject.addInRepoAddon('foo-bar', '1.0.0', { + callback: (inRepoAddon) => { + inRepoAddon.pkg['ember-addon'].paths = ['../foo']; + }, + }); + + fixturifyProject.writeSync(); + + let projectWithBundleCaching = fixturifyProject.buildProjectModel(); + projectWithBundleCaching.initializeAddons(); + + expect(() => { + new EmberApp({ + project: projectWithBundleCaching, + addons: { + blacklist: ['foo'], + }, + }); + }).to.throw( + [ + '[ember-cli] addon bundle caching is disabled for apps that specify an addon `blacklist`', + '', + 'All addons using bundle caching:', + projectWithBundleCaching.addons.find((addon) => addon.name === 'foo').packageRoot, + ].join('\n') + ); + }); + }); + describe('addonLintTree', function () { beforeEach(function () { addon = { diff --git a/tests/unit/models/per-bundle-addon-cache/proxy-test.js b/tests/unit/models/per-bundle-addon-cache/proxy-test.js index 8a69fe1ffb..6be9aa2c08 100644 --- a/tests/unit/models/per-bundle-addon-cache/proxy-test.js +++ b/tests/unit/models/per-bundle-addon-cache/proxy-test.js @@ -5,7 +5,8 @@ * its addons */ const expect = require('chai').expect; -const FixturifyProject = require('../../../../tests/helpers/fixturify-project'); +const path = require('path'); +const FixturifyProject = require('../../../helpers/fixturify-project'); const { findAddonCacheEntriesByName, @@ -1012,4 +1013,73 @@ describe('models/per-bundle-addon-cache', function () { expect(areAllInstancesEqualWithinHost(project, 'lazy-engine-a')).to.be.true; }); }); + + describe('validation', function () { + function findAllAddonsByName(projectOrAddon, addonToFind, _foundAddons = []) { + projectOrAddon.addons.forEach((addon) => { + if (addon.name === addonToFind) { + _foundAddons.push(addon); + } + + findAllAddonsByName(addon, addonToFind, _foundAddons); + }); + + return _foundAddons; + } + + it('does not throw if the addon returns a stable cache key', function () { + fixturifyProject.addInRepoAddon('foo', '1.0.0', { + allowCachingPerBundle: true, + }); + + fixturifyProject.addInRepoAddon('foo-bar', '1.0.0', { + callback: (inRepoAddon) => { + inRepoAddon.pkg['ember-addon'].paths = ['../foo']; + }, + }); + + fixturifyProject.writeSync(); + let project = fixturifyProject.buildProjectModel(); + + project.initializeAddons(); + + findAllAddonsByName(project, 'foo').forEach((addon) => { + addon.cacheKeyForTree(); + addon.cacheKeyForTree(); + + addon.cacheKeyForTree('addon'); + addon.cacheKeyForTree('addon'); + }); + }); + + it('throws an error for addons that do not have stable cache keys', function () { + fixturifyProject.addInRepoAddon('foo', '1.0.0', { + allowCachingPerBundle: true, + additionalContent: `init() {this._super.init.apply(this, arguments); this.current = 0;}, cacheKeyForTree() {return this.current++;},`, + }); + + fixturifyProject.addInRepoAddon('foo-bar', '1.0.0', { + callback: (inRepoAddon) => { + inRepoAddon.pkg['ember-addon'].paths = ['../foo']; + }, + }); + + fixturifyProject.writeSync(); + let project = fixturifyProject.buildProjectModel(); + + project.initializeAddons(); + + expect(() => { + findAllAddonsByName(project, 'foo').forEach((addon) => { + addon.cacheKeyForTree(); + addon.cacheKeyForTree(); + }); + }).to.throw( + `[ember-cli] addon bundle caching can only be used on addons that have stable cache keys (previously \`2\`, now \`3\`; for addon \`foo\` located at \`${path.join( + fixturifyProject.baseDir, + 'lib/foo' + )}\`)` + ); + }); + }); }); From 9c625763ff9893d3a60e925071e5b2e9a5b0a264 Mon Sep 17 00:00:00 2001 From: Brenden Palmer Date: Thu, 20 May 2021 22:09:53 -0400 Subject: [PATCH 775/818] add ability to specify a custom `per-bundle-addon-cache.js` utility --- lib/models/package-info-cache/package-info.js | 22 ++------ lib/models/per-bundle-addon-cache/index.js | 55 +++++++++++++++++++ .../per-bundle-addon-cache/proxy-test.js | 50 +++++++++++++++++ 3 files changed, 111 insertions(+), 16 deletions(-) diff --git a/lib/models/package-info-cache/package-info.js b/lib/models/package-info-cache/package-info.js index 66f35d3d5b..65890f10e3 100644 --- a/lib/models/package-info-cache/package-info.js +++ b/lib/models/package-info-cache/package-info.js @@ -465,20 +465,6 @@ class PackageInfo { return (this.addonConstructor = ctor); } - /** - * Indicate if a constructor (function or class) has the 'allowCachingPerBundle' flag - * set either on itself or on its prototype. Depending on how addon modules or constructor - * functions are set up, it could be in either. Needed for per-bundle addon caching. - * - * @method allowCachingPerBundle - * @param {Function|Class} ctor - * @return {Boolean} true if the given constructor function or class supports caching per bundle, false otherwise - */ - allowCachingPerBundle(ctor) { - let val = !!ctor && (ctor.allowCachingPerBundle || ctor.prototype.allowCachingPerBundle); - return val; - } - /** * Construct an addon instance. * @@ -530,10 +516,14 @@ class PackageInfo { * @return {Object} the constructed instance of the addon */ getAddonInstance(parent, project) { - let ctor = this.getAddonConstructor(); + let addonEntryPointModule = require(this.addonMainPath); let addonInstance; - if (PerBundleAddonCache.isEnabled() && this.allowCachingPerBundle(ctor)) { + if ( + PerBundleAddonCache.isEnabled() && + project && + project.perBundleAddonCache.allowCachingPerBundle(addonEntryPointModule) + ) { addonInstance = project.perBundleAddonCache.getAddonInstance(parent, this); } else { addonInstance = this.constructAddonInstance(parent, project); diff --git a/lib/models/per-bundle-addon-cache/index.js b/lib/models/per-bundle-addon-cache/index.js index b3f05b5fa6..064a0cc748 100644 --- a/lib/models/per-bundle-addon-cache/index.js +++ b/lib/models/per-bundle-addon-cache/index.js @@ -1,10 +1,48 @@ 'use strict'; +const fs = require('fs'); +const path = require('path'); const isLazyEngine = require('../../utilities/is-lazy-engine'); const { getAddonProxy } = require('./addon-proxy'); const logger = require('heimdalljs-logger')('ember-cli:per-bundle-addon-cache'); const { TARGET_INSTANCE } = require('./target-instance'); +function defaultAllowCachingPerBundle({ addonEntryPointModule }) { + return ( + addonEntryPointModule.allowCachingPerBundle || + (addonEntryPointModule.prototype && addonEntryPointModule.prototype.allowCachingPerBundle) + ); +} + +/** + * Resolves the perBundleAddonCacheUtil; this prefers the custom provided version by + * the consuming application, and defaults to an internal implementation here. + * + * @method resolvePerBundleAddonCacheUtil + * @param {Project} project + * @return {{allowCachingPerBundle: Function}} + */ +function resolvePerBundleAddonCacheUtil(project) { + const relativePathToUtil = + project.pkg && project.pkg['ember-addon'] && project.pkg['ember-addon'].perBundleAddonCacheUtil; + + if (typeof relativePathToUtil === 'string') { + const absolutePathToUtil = path.resolve(project.root, relativePathToUtil); + + if (!fs.existsSync(absolutePathToUtil)) { + throw new Error( + `[ember-cli] the provided \`${relativePathToUtil}\` for \`ember-addon.perBundleAddonCacheUtil\` does not exist` + ); + } + + return require(absolutePathToUtil); + } + + return { + allowCachingPerBundle: defaultAllowCachingPerBundle, + }; +} + /** * For large applications with many addons (and many instances of each, resulting in * potentially many millions of addon instances during a build), the build can become @@ -66,6 +104,7 @@ class PerBundleAddonCache { // Indicate if ember-engines transitive dedupe is enabled. this.engineAddonTransitiveDedupeEnabled = !!process.env.EMBER_ENGINES_ADDON_DEDUPE; + this._perBundleAddonCacheUtil = resolvePerBundleAddonCacheUtil(this.project); // For stats purposes, counts on the # addons and proxies created. Addons we // can compare against the bundleHostCache addon caches. Proxies, not so much, @@ -74,6 +113,22 @@ class PerBundleAddonCache { this.numProxies = 0; } + /** + * The default implementation here is to indicate if the original addon entry point has + * the `allowCachingPerBundle` flag set either on itself or on its prototype. + * + * If a consuming application specifies a relative path to a custom utility via the + * `ember-addon.perBundleAddonCacheUtil` configuration, we prefer the custom implementation + * provided by the consumer. + * + * @method allowCachingPerBundle + * @param {Object|Function} addonEntryPointModule + * @return {Boolean} true if the given constructor function or class supports caching per bundle, false otherwise + */ + allowCachingPerBundle(addonEntryPointModule) { + return this._perBundleAddonCacheUtil.allowCachingPerBundle({ addonEntryPointModule }); + } + /** * Creates a cache entry for the bundleHostCache. Because we want to use the same sort of proxy * for both bundle hosts and for 'regular' addon instances (though their cache entries have diff --git a/tests/unit/models/per-bundle-addon-cache/proxy-test.js b/tests/unit/models/per-bundle-addon-cache/proxy-test.js index 6be9aa2c08..3bac12306e 100644 --- a/tests/unit/models/per-bundle-addon-cache/proxy-test.js +++ b/tests/unit/models/per-bundle-addon-cache/proxy-test.js @@ -1012,6 +1012,56 @@ describe('models/per-bundle-addon-cache', function () { expect(areAllInstancesEqualWithinHost(project, 'lazy-engine-a')).to.be.true; }); + + it('uses the custom `per-bundle-addon-cache.js` util if it exists', function () { + fixturifyProject.addInRepoAddon('test-addon-a', '1.0.0'); + + fixturifyProject.addInRepoAddon('test-addon-b', '1.0.0', (addon) => { + addon.pkg['ember-addon'].paths = ['../test-addon-a']; + }); + + fixturifyProject.pkg['ember-addon'].perBundleAddonCacheUtil = './per-bundle-addon-cache.js'; + + fixturifyProject.files['per-bundle-addon-cache.js'] = ` +'use strict'; + +function allowCachingPerBundle({ addonEntryPointModule }) { + if (addonEntryPointModule.name === 'test-addon-a') { + return true; + } + + return false; +} + +module.exports = { + allowCachingPerBundle, +}; + `; + + let project = fixturifyProject.buildProjectModel(); + project.initializeAddons(); + + let { byName } = countAddons(project); + + expect(byName['test-addon-a'].realAddonInstanceCount).to.equal(1); + expect(byName['test-addon-a'].proxyCount).to.equal(1); + }); + + it('throws an error if the provided `perBundleAddonCacheUtil` does not exist', function () { + fixturifyProject.addInRepoAddon('test-addon-a', '1.0.0'); + + fixturifyProject.addInRepoAddon('test-addon-b', '1.0.0', (addon) => { + addon.pkg['ember-addon'].paths = ['../test-addon-a']; + }); + + fixturifyProject.pkg['ember-addon'].perBundleAddonCacheUtil = './per-bundle-addon-cache.js'; + + expect(() => { + fixturifyProject.buildProjectModel(); + }).to.throw( + '[ember-cli] the provided `./per-bundle-addon-cache.js` for `ember-addon.perBundleAddonCacheUtil` does not exist' + ); + }); }); describe('validation', function () { From 63e5583c695fbd875bd386a531913a19554ae2f0 Mon Sep 17 00:00:00 2001 From: Brenden Palmer Date: Wed, 26 May 2021 19:34:54 -0400 Subject: [PATCH 776/818] address feedback; add test-case for `prototype.allowCachingPerBundle` --- lib/models/package-info-cache/package-info.js | 31 +++++++++++++------ tests/helpers/fixturify-project.js | 4 ++- .../per-bundle-addon-cache/proxy-test.js | 24 ++++++++++++++ 3 files changed, 48 insertions(+), 11 deletions(-) diff --git a/lib/models/package-info-cache/package-info.js b/lib/models/package-info-cache/package-info.js index 65890f10e3..4ec686024a 100644 --- a/lib/models/package-info-cache/package-info.js +++ b/lib/models/package-info-cache/package-info.js @@ -262,7 +262,7 @@ class PackageInfo { * module this represents has lazyLoading enabled, false otherwise. */ isForLazyEngine() { - return this.isForEngine() && isLazyEngine(require(this.addonMainPath)); + return this.isForEngine() && isLazyEngine(this._getAddonEntryPoint()); } /** @@ -435,14 +435,7 @@ class PackageInfo { return this.addonConstructor; } - if (!this.addonMainPath) { - throw new Error(`${this.pkg.name} at ${this.realPath} is missing its addon main file`); - } - - // Load the addon. - // TODO: Future work - allow a time budget for loading each addon and warn - // or error for those that take too long. - let module = require(this.addonMainPath); + let module = this._getAddonEntryPoint(); let mainDir = path.dirname(this.addonMainPath); let ctor; @@ -516,7 +509,7 @@ class PackageInfo { * @return {Object} the constructed instance of the addon */ getAddonInstance(parent, project) { - let addonEntryPointModule = require(this.addonMainPath); + let addonEntryPointModule = this._getAddonEntryPoint(); let addonInstance; if ( @@ -549,6 +542,24 @@ class PackageInfo { addonInstance.addons = []; } } + + /** + * Gets the addon entry point + * + * @method _getAddonEntryPoint + * @return {Object|Function} The exported addon entry point + * @private + */ + _getAddonEntryPoint() { + if (!this.addonMainPath) { + throw new Error(`${this.pkg.name} at ${this.realPath} is missing its addon main file`); + } + + // Load the addon. + // TODO: Future work - allow a time budget for loading each addon and warn + // or error for those that take too long. + return require(this.addonMainPath); + } } module.exports = PackageInfo; diff --git a/tests/helpers/fixturify-project.js b/tests/helpers/fixturify-project.js index fc519b83e8..96c43bb1f1 100644 --- a/tests/helpers/fixturify-project.js +++ b/tests/helpers/fixturify-project.js @@ -17,7 +17,9 @@ class ProjectWithoutInternalAddons extends Project { function prepareAddon(addon, options) { addon.pkg.keywords.push('ember-addon'); addon.pkg['ember-addon'] = {}; - addon.files['index.js'] = `module.exports = { + addon.files['index.js'] = + options.addonEntryPoint || + `module.exports = { name: require("./package").name, allowCachingPerBundle: ${Boolean(options.allowCachingPerBundle)}, ${options.additionalContent || ''} diff --git a/tests/unit/models/per-bundle-addon-cache/proxy-test.js b/tests/unit/models/per-bundle-addon-cache/proxy-test.js index 3bac12306e..b1373fd8f0 100644 --- a/tests/unit/models/per-bundle-addon-cache/proxy-test.js +++ b/tests/unit/models/per-bundle-addon-cache/proxy-test.js @@ -1062,6 +1062,30 @@ module.exports = { '[ember-cli] the provided `./per-bundle-addon-cache.js` for `ember-addon.perBundleAddonCacheUtil` does not exist' ); }); + + it('bundle caching works for addons that opt-in via `prototype.allowCachingPerBundle`', function () { + fixturifyProject.addInRepoAddon('test-addon-a', '1.0.0', { + addonEntryPoint: ` + function Addon() {} + Addon.prototype.allowCachingPerBundle = true; + Addon.prototype.pkg = require('./package.json'); + Addon.prototype.name = 'test-addon-a'; + module.exports = Addon; + `, + }); + + fixturifyProject.addInRepoAddon('test-addon-b', '1.0.0', (addon) => { + addon.pkg['ember-addon'].paths = ['../test-addon-a']; + }); + + let project = fixturifyProject.buildProjectModel(); + project.initializeAddons(); + + let { byName } = countAddons(project); + + expect(byName['test-addon-a'].realAddonInstanceCount).to.equal(1); + expect(byName['test-addon-a'].proxyCount).to.equal(1); + }); }); describe('validation', function () { From 50ca947d4a3237033ebeb2bd661685019816e06f Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Thu, 27 May 2021 13:37:49 -0400 Subject: [PATCH 777/818] Update app and addon blueprint dependencies to latest. Keep ember-auto-import@1 while we continue to support Node 10. --- .../addon/additional-dev-dependencies.json | 2 +- blueprints/app/files/package.json | 34 +++++++++---------- tests/fixtures/addon/defaults/package.json | 28 +++++++-------- tests/fixtures/addon/yarn/package.json | 28 +++++++-------- tests/fixtures/app/defaults/package.json | 28 +++++++-------- .../app/embroider-no-welcome/package.json | 34 +++++++++---------- .../fixtures/app/embroider-yarn/package.json | 34 +++++++++---------- tests/fixtures/app/embroider/package.json | 34 +++++++++---------- tests/fixtures/app/npm/package.json | 28 +++++++-------- tests/fixtures/app/yarn/package.json | 28 +++++++-------- 10 files changed, 139 insertions(+), 139 deletions(-) diff --git a/blueprints/addon/additional-dev-dependencies.json b/blueprints/addon/additional-dev-dependencies.json index 0abb16a5d2..23be64cc34 100644 --- a/blueprints/addon/additional-dev-dependencies.json +++ b/blueprints/addon/additional-dev-dependencies.json @@ -1,6 +1,6 @@ { "devDependencies": { - "@embroider/test-setup": "^0.39.1", + "@embroider/test-setup": "^0.41.0", "ember-disable-prototype-extensions": "^1.1.3", "ember-try": "^1.4.0", "ember-source-channel-url": "^3.0.0" diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 310d77e4e8..2d0e92f44b 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -25,43 +25,43 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.2.5<% if (embroider) { %>", - "@embroider/compat": "^0.39.1", - "@embroider/core": "^0.39.1", - "@embroider/webpack": "^0.39.1<% } %>", + "@embroider/compat": "^0.41.0", + "@embroider/core": "^0.41.0", + "@embroider/webpack": "^0.41.0<% } %>", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.11.2", + "ember-auto-import": "^1.11.3", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^5.0.0", - "ember-cli-babel": "^7.26.3", + "ember-cli-babel": "^7.26.6", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-htmlbars": "^5.7.1", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", - "ember-cli-terser": "^4.0.1", - "ember-data": "~3.27.0-beta.0", + "ember-cli-terser": "^4.0.2", + "ember-data": "~3.27.1", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-page-title": "^6.2.1", + "ember-page-title": "^6.2.2", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.27.0-beta.3", - "ember-template-lint": "^3.2.0<% if (welcome) { %>", + "ember-source": "~3.27.2", + "ember-template-lint": "^3.4.2<% if (welcome) { %>", "ember-welcome-page": "^4.0.0<% } %>", - "eslint": "^7.24.0", - "eslint-config-prettier": "^8.1.0", - "eslint-plugin-ember": "^10.3.0", + "eslint": "^7.27.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-ember": "^10.4.2", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.3.1", - "eslint-plugin-qunit": "^6.0.0", + "eslint-plugin-prettier": "^3.4.0", + "eslint-plugin-qunit": "^6.1.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.2.1", - "qunit": "^2.14.1", + "prettier": "^2.3.0", + "qunit": "^2.15.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index e2f55cc755..360078a550 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -26,44 +26,44 @@ "test:ember-compatibility": "ember try:each" }, "dependencies": { - "ember-cli-babel": "^7.26.3", + "ember-cli-babel": "^7.26.6", "ember-cli-htmlbars": "^5.7.1" }, "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.2.5", - "@embroider/test-setup": "^0.39.1", + "@embroider/test-setup": "^0.41.0", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.11.2", + "ember-auto-import": "^1.11.3", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", - "ember-cli-terser": "^4.0.1", + "ember-cli-terser": "^4.0.2", "ember-disable-prototype-extensions": "^1.1.3", "ember-export-application-global": "^2.0.1", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-page-title": "^6.2.1", + "ember-page-title": "^6.2.2", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.27.0-beta.3", + "ember-source": "~3.27.2", "ember-source-channel-url": "^3.0.0", - "ember-template-lint": "^3.2.0", + "ember-template-lint": "^3.4.2", "ember-try": "^1.4.0", - "eslint": "^7.24.0", - "eslint-config-prettier": "^8.1.0", - "eslint-plugin-ember": "^10.3.0", + "eslint": "^7.27.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-ember": "^10.4.2", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.3.1", - "eslint-plugin-qunit": "^6.0.0", + "eslint-plugin-prettier": "^3.4.0", + "eslint-plugin-qunit": "^6.1.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.2.1", - "qunit": "^2.14.1", + "prettier": "^2.3.0", + "qunit": "^2.15.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 18a321888d..1ff4f05d87 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -26,45 +26,45 @@ "test:ember-compatibility": "ember try:each" }, "dependencies": { - "ember-cli-babel": "^7.26.3", + "ember-cli-babel": "^7.26.6", "ember-cli-htmlbars": "^5.7.1" }, "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.2.5", - "@embroider/test-setup": "^0.39.1", + "@embroider/test-setup": "^0.41.0", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.11.2", + "ember-auto-import": "^1.11.3", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", - "ember-cli-terser": "^4.0.1", + "ember-cli-terser": "^4.0.2", "ember-disable-prototype-extensions": "^1.1.3", "ember-export-application-global": "^2.0.1", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-page-title": "^6.2.1", + "ember-page-title": "^6.2.2", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.27.0-beta.3", + "ember-source": "~3.27.2", "ember-source-channel-url": "^3.0.0", - "ember-template-lint": "^3.2.0", + "ember-template-lint": "^3.4.2", "ember-try": "^1.4.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.24.0", - "eslint-config-prettier": "^8.1.0", - "eslint-plugin-ember": "^10.3.0", + "eslint": "^7.27.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-ember": "^10.4.2", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.3.1", - "eslint-plugin-qunit": "^6.0.0", + "eslint-plugin-prettier": "^3.4.0", + "eslint-plugin-qunit": "^6.1.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.2.1", - "qunit": "^2.14.1", + "prettier": "^2.3.0", + "qunit": "^2.15.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index e0c367f64a..5c43bc47f5 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -29,36 +29,36 @@ "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.11.2", + "ember-auto-import": "^1.11.3", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^5.0.0", - "ember-cli-babel": "^7.26.3", + "ember-cli-babel": "^7.26.6", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-htmlbars": "^5.7.1", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", - "ember-cli-terser": "^4.0.1", - "ember-data": "~3.27.0-beta.0", + "ember-cli-terser": "^4.0.2", + "ember-data": "~3.27.1", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-page-title": "^6.2.1", + "ember-page-title": "^6.2.2", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.27.0-beta.3", - "ember-template-lint": "^3.2.0", + "ember-source": "~3.27.2", + "ember-template-lint": "^3.4.2", "ember-welcome-page": "^4.0.0", - "eslint": "^7.24.0", - "eslint-config-prettier": "^8.1.0", - "eslint-plugin-ember": "^10.3.0", + "eslint": "^7.27.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-ember": "^10.4.2", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.3.1", - "eslint-plugin-qunit": "^6.0.0", + "eslint-plugin-prettier": "^3.4.0", + "eslint-plugin-qunit": "^6.1.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.2.1", - "qunit": "^2.14.1", + "prettier": "^2.3.0", + "qunit": "^2.15.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index 4358386939..cb4be7ba5a 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -25,42 +25,42 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.2.5", - "@embroider/compat": "^0.39.1", - "@embroider/core": "^0.39.1", - "@embroider/webpack": "^0.39.1", + "@embroider/compat": "^0.41.0", + "@embroider/core": "^0.41.0", + "@embroider/webpack": "^0.41.0", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.11.2", + "ember-auto-import": "^1.11.3", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^5.0.0", - "ember-cli-babel": "^7.26.3", + "ember-cli-babel": "^7.26.6", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-htmlbars": "^5.7.1", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", - "ember-cli-terser": "^4.0.1", - "ember-data": "~3.27.0-beta.0", + "ember-cli-terser": "^4.0.2", + "ember-data": "~3.27.1", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-page-title": "^6.2.1", + "ember-page-title": "^6.2.2", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.27.0-beta.3", - "ember-template-lint": "^3.2.0", - "eslint": "^7.24.0", - "eslint-config-prettier": "^8.1.0", - "eslint-plugin-ember": "^10.3.0", + "ember-source": "~3.27.2", + "ember-template-lint": "^3.4.2", + "eslint": "^7.27.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-ember": "^10.4.2", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.3.1", - "eslint-plugin-qunit": "^6.0.0", + "eslint-plugin-prettier": "^3.4.0", + "eslint-plugin-qunit": "^6.1.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.2.1", - "qunit": "^2.14.1", + "prettier": "^2.3.0", + "qunit": "^2.15.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/embroider-yarn/package.json b/tests/fixtures/app/embroider-yarn/package.json index cacb82513c..c7dc889c34 100644 --- a/tests/fixtures/app/embroider-yarn/package.json +++ b/tests/fixtures/app/embroider-yarn/package.json @@ -25,43 +25,43 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.2.5", - "@embroider/compat": "^0.39.1", - "@embroider/core": "^0.39.1", - "@embroider/webpack": "^0.39.1", + "@embroider/compat": "^0.41.0", + "@embroider/core": "^0.41.0", + "@embroider/webpack": "^0.41.0", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.11.2", + "ember-auto-import": "^1.11.3", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^5.0.0", - "ember-cli-babel": "^7.26.3", + "ember-cli-babel": "^7.26.6", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-htmlbars": "^5.7.1", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", - "ember-cli-terser": "^4.0.1", - "ember-data": "~3.27.0-beta.0", + "ember-cli-terser": "^4.0.2", + "ember-data": "~3.27.1", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-page-title": "^6.2.1", + "ember-page-title": "^6.2.2", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.27.0-beta.3", - "ember-template-lint": "^3.2.0", + "ember-source": "~3.27.2", + "ember-template-lint": "^3.4.2", "ember-welcome-page": "^4.0.0", - "eslint": "^7.24.0", - "eslint-config-prettier": "^8.1.0", - "eslint-plugin-ember": "^10.3.0", + "eslint": "^7.27.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-ember": "^10.4.2", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.3.1", - "eslint-plugin-qunit": "^6.0.0", + "eslint-plugin-prettier": "^3.4.0", + "eslint-plugin-qunit": "^6.1.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.2.1", - "qunit": "^2.14.1", + "prettier": "^2.3.0", + "qunit": "^2.15.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index cacb82513c..c7dc889c34 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -25,43 +25,43 @@ "devDependencies": { "@ember/optional-features": "^2.0.0", "@ember/test-helpers": "^2.2.5", - "@embroider/compat": "^0.39.1", - "@embroider/core": "^0.39.1", - "@embroider/webpack": "^0.39.1", + "@embroider/compat": "^0.41.0", + "@embroider/core": "^0.41.0", + "@embroider/webpack": "^0.41.0", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.11.2", + "ember-auto-import": "^1.11.3", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^5.0.0", - "ember-cli-babel": "^7.26.3", + "ember-cli-babel": "^7.26.6", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-htmlbars": "^5.7.1", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", - "ember-cli-terser": "^4.0.1", - "ember-data": "~3.27.0-beta.0", + "ember-cli-terser": "^4.0.2", + "ember-data": "~3.27.1", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-page-title": "^6.2.1", + "ember-page-title": "^6.2.2", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.27.0-beta.3", - "ember-template-lint": "^3.2.0", + "ember-source": "~3.27.2", + "ember-template-lint": "^3.4.2", "ember-welcome-page": "^4.0.0", - "eslint": "^7.24.0", - "eslint-config-prettier": "^8.1.0", - "eslint-plugin-ember": "^10.3.0", + "eslint": "^7.27.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-ember": "^10.4.2", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.3.1", - "eslint-plugin-qunit": "^6.0.0", + "eslint-plugin-prettier": "^3.4.0", + "eslint-plugin-qunit": "^6.1.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.2.1", - "qunit": "^2.14.1", + "prettier": "^2.3.0", + "qunit": "^2.15.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index b90a4cae2d..16f68b78ee 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -29,35 +29,35 @@ "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.11.2", + "ember-auto-import": "^1.11.3", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^5.0.0", - "ember-cli-babel": "^7.26.3", + "ember-cli-babel": "^7.26.6", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-htmlbars": "^5.7.1", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", - "ember-cli-terser": "^4.0.1", - "ember-data": "~3.27.0-beta.0", + "ember-cli-terser": "^4.0.2", + "ember-data": "~3.27.1", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-page-title": "^6.2.1", + "ember-page-title": "^6.2.2", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.27.0-beta.3", - "ember-template-lint": "^3.2.0", - "eslint": "^7.24.0", - "eslint-config-prettier": "^8.1.0", - "eslint-plugin-ember": "^10.3.0", + "ember-source": "~3.27.2", + "ember-template-lint": "^3.4.2", + "eslint": "^7.27.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-ember": "^10.4.2", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.3.1", - "eslint-plugin-qunit": "^6.0.0", + "eslint-plugin-prettier": "^3.4.0", + "eslint-plugin-qunit": "^6.1.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.2.1", - "qunit": "^2.14.1", + "prettier": "^2.3.0", + "qunit": "^2.15.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index e0c367f64a..5c43bc47f5 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -29,36 +29,36 @@ "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.11.2", + "ember-auto-import": "^1.11.3", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^5.0.0", - "ember-cli-babel": "^7.26.3", + "ember-cli-babel": "^7.26.6", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-htmlbars": "^5.7.1", "ember-cli-inject-live-reload": "^2.0.2", "ember-cli-sri": "^2.1.1", - "ember-cli-terser": "^4.0.1", - "ember-data": "~3.27.0-beta.0", + "ember-cli-terser": "^4.0.2", + "ember-data": "~3.27.1", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.4", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-page-title": "^6.2.1", + "ember-page-title": "^6.2.2", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.27.0-beta.3", - "ember-template-lint": "^3.2.0", + "ember-source": "~3.27.2", + "ember-template-lint": "^3.4.2", "ember-welcome-page": "^4.0.0", - "eslint": "^7.24.0", - "eslint-config-prettier": "^8.1.0", - "eslint-plugin-ember": "^10.3.0", + "eslint": "^7.27.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-ember": "^10.4.2", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.3.1", - "eslint-plugin-qunit": "^6.0.0", + "eslint-plugin-prettier": "^3.4.0", + "eslint-plugin-qunit": "^6.1.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.2.1", - "qunit": "^2.14.1", + "prettier": "^2.3.0", + "qunit": "^2.15.0", "qunit-dom": "^1.6.0" }, "engines": { From 6ac4004762067862badecbc1521595bf5911998b Mon Sep 17 00:00:00 2001 From: Bryan Mishkin <698306+bmish@users.noreply.github.com> Date: Thu, 27 May 2021 14:07:33 -0400 Subject: [PATCH 778/818] chore(lint): switch from octane template lint config to recommended ember-template-lint v3 promoted "octane" config (now deprecated) to be "recommended". https://github.com/ember-template-lint/ember-template-lint/blob/master/CHANGELOG.md#v300-2021-03-02 --- blueprints/app/files/.template-lintrc.js | 2 +- .../app/with-blueprint-override-lint-fail/.template-lintrc.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/blueprints/app/files/.template-lintrc.js b/blueprints/app/files/.template-lintrc.js index 3b0b9af953..f35f61c7b3 100644 --- a/blueprints/app/files/.template-lintrc.js +++ b/blueprints/app/files/.template-lintrc.js @@ -1,5 +1,5 @@ 'use strict'; module.exports = { - extends: 'octane', + extends: 'recommended', }; diff --git a/tests/fixtures/app/with-blueprint-override-lint-fail/.template-lintrc.js b/tests/fixtures/app/with-blueprint-override-lint-fail/.template-lintrc.js index 6f77a224e9..8360c930a4 100644 --- a/tests/fixtures/app/with-blueprint-override-lint-fail/.template-lintrc.js +++ b/tests/fixtures/app/with-blueprint-override-lint-fail/.template-lintrc.js @@ -1,7 +1,7 @@ 'use strict'; module.exports = { - extends: 'octane', + extends: 'recommended', rules: { 'require-button-type': true, // blueprint override has missing button type }, From 4f3ead2580bc5b2db9a5111e0a6615ed49895808 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 28 May 2021 14:35:43 -0400 Subject: [PATCH 779/818] Add `webpack@5` when `embroider` is going to be used --- blueprints/app/files/package.json | 3 ++- tests/fixtures/app/embroider-no-welcome/package.json | 3 ++- tests/fixtures/app/embroider-yarn/package.json | 3 ++- tests/fixtures/app/embroider/package.json | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 2d0e92f44b..2e5df34c8a 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -62,7 +62,8 @@ "npm-run-all": "^4.1.5", "prettier": "^2.3.0", "qunit": "^2.15.0", - "qunit-dom": "^1.6.0" + "qunit-dom": "^1.6.0<% if (embroider) { %>", + "webpack": "^5.38.1<% } %>" }, "engines": { "node": "10.* || >= 12" diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index cb4be7ba5a..2e691a41de 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -61,7 +61,8 @@ "npm-run-all": "^4.1.5", "prettier": "^2.3.0", "qunit": "^2.15.0", - "qunit-dom": "^1.6.0" + "qunit-dom": "^1.6.0", + "webpack": "^5.38.1" }, "engines": { "node": "10.* || >= 12" diff --git a/tests/fixtures/app/embroider-yarn/package.json b/tests/fixtures/app/embroider-yarn/package.json index c7dc889c34..957bc318fb 100644 --- a/tests/fixtures/app/embroider-yarn/package.json +++ b/tests/fixtures/app/embroider-yarn/package.json @@ -62,7 +62,8 @@ "npm-run-all": "^4.1.5", "prettier": "^2.3.0", "qunit": "^2.15.0", - "qunit-dom": "^1.6.0" + "qunit-dom": "^1.6.0", + "webpack": "^5.38.1" }, "engines": { "node": "10.* || >= 12" diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index c7dc889c34..957bc318fb 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -62,7 +62,8 @@ "npm-run-all": "^4.1.5", "prettier": "^2.3.0", "qunit": "^2.15.0", - "qunit-dom": "^1.6.0" + "qunit-dom": "^1.6.0", + "webpack": "^5.38.1" }, "engines": { "node": "10.* || >= 12" From db6beb78337e6afcfffb6fec37fcb1604da965db Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 28 May 2021 19:07:14 -0400 Subject: [PATCH 780/818] Add v3.27.0-beta.2 to CHANGELOG.md. --- CHANGELOG.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b6d796058..7c41453cca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,23 @@ # ember-cli Changelog -## v3.27.1-beta.0 + +## v3.27.0-beta.2 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.27.0-beta.1...v3.27.0-beta.2) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.27.0-beta.1...v3.27.0-beta.2) + +#### Changelog + +- [#9504](https://github.com/ember-cli/ember-cli/pull/9504) Update minimum version of broccoli-concat to address a major issue with cache invalidation [@brendenpalmer](https://github.com/brendenpalmer) +- [#9535](https://github.com/ember-cli/ember-cli/pull/9535) Disable Embroider by default. [@rwjblue](https://github.com/rwjblue) +- [#9557](https://github.com/ember-cli/ember-cli/pull/9557) Update app and addon blueprint dependencies to latest. [@rwjblue](https://github.com/rwjblue) +- [#9558](https://github.com/ember-cli/ember-cli/pull/9558) Switch from `octane` template lint config to `recommended` [@bmish](https://github.com/bmish) + +Thank you to all who took the time to contribute! + +## v3.27.1-beta.1 #### Blueprint Changes From 59420cfa02a2ba77e836e128c3b7692099bf4f1c Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 28 May 2021 19:08:30 -0400 Subject: [PATCH 781/818] Release 3.27.0-beta.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5321e7b2f9..0ebe80aac9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.27.0-beta.1", + "version": "3.27.0-beta.2", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From 417e1362c9904fb95e86bf83b07aa59355e1f174 Mon Sep 17 00:00:00 2001 From: Brenden Palmer Date: Wed, 2 Jun 2021 13:22:05 -0400 Subject: [PATCH 782/818] Update `addon-proxy` to support Embroider --- .../per-bundle-addon-cache/addon-proxy.js | 22 +++++++++ .../addon-proxy-test.js | 48 +++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 tests/unit/models/per-bundle-addon-cache/addon-proxy-test.js diff --git a/lib/models/per-bundle-addon-cache/addon-proxy.js b/lib/models/per-bundle-addon-cache/addon-proxy.js index 9c41b3c7db..ce1ccd1cef 100644 --- a/lib/models/per-bundle-addon-cache/addon-proxy.js +++ b/lib/models/per-bundle-addon-cache/addon-proxy.js @@ -64,6 +64,18 @@ function validateCacheKey(realAddonInstance, treeType, newCacheKey) { function getAddonProxy(targetCacheEntry, parent) { let _app; + // handle `preprocessJs` separately for Embroider + // + // some context here: + // + // Embroider patches `preprocessJs`, so we want to maintain local state within the + // proxy rather than allowing a patched `preprocessJs` set on the original addon + // instance itself + // + // for more info as to where this happens, see: + // https://github.com/embroider-build/embroider/blob/master/packages/compat/src/v1-addon.ts#L634 + let _preprocessJs; + return new Proxy(targetCacheEntry, { get(targetCacheEntry, property) { if (property === 'parent') { @@ -74,6 +86,11 @@ function getAddonProxy(targetCacheEntry, parent) { return _app; } + // only return `_preprocessJs` here if it was previously set to a patched version + if (property === 'preprocessJs' && _preprocessJs) { + return _preprocessJs; + } + // keep proxies from even trying to set or initialize addons if (property === 'initializeAddons') { return undefined; @@ -124,6 +141,11 @@ function getAddonProxy(targetCacheEntry, parent) { return true; } + if (property === 'preprocessJs') { + _preprocessJs = value; + return true; + } + if (targetCacheEntry[TARGET_INSTANCE]) { return Reflect.set(targetCacheEntry[TARGET_INSTANCE], property, value); } diff --git a/tests/unit/models/per-bundle-addon-cache/addon-proxy-test.js b/tests/unit/models/per-bundle-addon-cache/addon-proxy-test.js new file mode 100644 index 0000000000..6e7231bf28 --- /dev/null +++ b/tests/unit/models/per-bundle-addon-cache/addon-proxy-test.js @@ -0,0 +1,48 @@ +'use strict'; + +const expect = require('chai').expect; + +const { getAddonProxy } = require('../../../../lib/models/per-bundle-addon-cache/addon-proxy'); +const { TARGET_INSTANCE } = require('../../../../lib/models/per-bundle-addon-cache/target-instance'); + +describe('Unit | addon-proxy-test', function () { + it('it allows a patched `preprocessJs` and is never set on the original addon instance', function () { + const realAddon = { + addons: ['foo'], + preprocessJs() {}, + }; + + const proxy1 = getAddonProxy({ [TARGET_INSTANCE]: realAddon }, {}); + const proxy2 = getAddonProxy({ [TARGET_INSTANCE]: realAddon }, {}); + + const originalPreprocessJs1 = proxy1.preprocessJs; + const originalPreprocessJs2 = proxy2.preprocessJs; + + proxy1.preprocessJs = () => {}; + + expect(proxy1[TARGET_INSTANCE].preprocessJs).to.equal( + realAddon.preprocessJs, + "original addon's `preprocessJs` has not been modified" + ); + + proxy2.preprocessJs = () => {}; + + expect(proxy2[TARGET_INSTANCE].preprocessJs).to.equal( + realAddon.preprocessJs, + "original addon's `preprocessJs` has not been modified" + ); + + proxy1.preprocessJs(); + + // restore original + proxy1.preprocessJs = originalPreprocessJs1; + + proxy2.preprocessJs(); + + // restore original + proxy2.preprocessJs = originalPreprocessJs2; + + proxy1.preprocessJs(); + proxy2.preprocessJs(); + }); +}); From 41579a6bc33a4fce1df502ee8947da40e70a782d Mon Sep 17 00:00:00 2001 From: Jordan Hawker Date: Thu, 3 Jun 2021 12:06:57 -0700 Subject: [PATCH 783/818] Drop Node 10 support in blueprint engine spec This appears to have been missed in #9530 --- blueprints/app/files/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 310d77e4e8..f27b5bc0b9 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -65,7 +65,7 @@ "qunit-dom": "^1.6.0" }, "engines": { - "node": "10.* || >= 12" + "node": ">= 12" }, "ember": { "edition": "octane" From c325ee1b12f303a8f8b95a2eb6ab47b32b16809e Mon Sep 17 00:00:00 2001 From: Jordan Hawker Date: Thu, 3 Jun 2021 12:10:43 -0700 Subject: [PATCH 784/818] Explicitly support Node 12, 14, and 16+ Co-authored-by: Robert Jackson --- blueprints/app/files/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index f27b5bc0b9..7eedda6d24 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -65,7 +65,7 @@ "qunit-dom": "^1.6.0" }, "engines": { - "node": ">= 12" + "node": "12.* || 14.* || >= 16" }, "ember": { "edition": "octane" From 3cd37be0f32c126237f19e30842db7962c4dfcac Mon Sep 17 00:00:00 2001 From: Jordan Hawker Date: Thu, 3 Jun 2021 12:25:30 -0700 Subject: [PATCH 785/818] Update test fixtures to match new node support for blueprint --- tests/fixtures/addon/defaults/package.json | 2 +- tests/fixtures/addon/yarn/package.json | 2 +- tests/fixtures/app/defaults/package.json | 2 +- tests/fixtures/app/embroider-no-welcome/package.json | 2 +- tests/fixtures/app/embroider-yarn/package.json | 2 +- tests/fixtures/app/embroider/package.json | 2 +- tests/fixtures/app/nested-project/actual-project/package.json | 2 +- tests/fixtures/app/npm/package.json | 2 +- .../fixtures/app/with-blueprint-override-lint-fail/package.json | 2 +- tests/fixtures/app/yarn/package.json | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index e2f55cc755..3859bb6bab 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -67,7 +67,7 @@ "qunit-dom": "^1.6.0" }, "engines": { - "node": "10.* || >= 12" + "node": "12.* || 14.* || >= 16" }, "ember": { "edition": "octane" diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 18a321888d..72fbe6f931 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -68,7 +68,7 @@ "qunit-dom": "^1.6.0" }, "engines": { - "node": "10.* || >= 12" + "node": "12.* || 14.* || >= 16" }, "ember": { "edition": "octane" diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index e0c367f64a..14bbb98032 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -62,7 +62,7 @@ "qunit-dom": "^1.6.0" }, "engines": { - "node": "10.* || >= 12" + "node": "12.* || 14.* || >= 16" }, "ember": { "edition": "octane" diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index 4358386939..48cee1b050 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -64,7 +64,7 @@ "qunit-dom": "^1.6.0" }, "engines": { - "node": "10.* || >= 12" + "node": "12.* || 14.* || >= 16" }, "ember": { "edition": "octane" diff --git a/tests/fixtures/app/embroider-yarn/package.json b/tests/fixtures/app/embroider-yarn/package.json index cacb82513c..8a23c3b37a 100644 --- a/tests/fixtures/app/embroider-yarn/package.json +++ b/tests/fixtures/app/embroider-yarn/package.json @@ -65,7 +65,7 @@ "qunit-dom": "^1.6.0" }, "engines": { - "node": "10.* || >= 12" + "node": "12.* || 14.* || >= 16" }, "ember": { "edition": "octane" diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index cacb82513c..8a23c3b37a 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -65,7 +65,7 @@ "qunit-dom": "^1.6.0" }, "engines": { - "node": "10.* || >= 12" + "node": "12.* || 14.* || >= 16" }, "ember": { "edition": "octane" diff --git a/tests/fixtures/app/nested-project/actual-project/package.json b/tests/fixtures/app/nested-project/actual-project/package.json index 34a2011b02..736721e65f 100644 --- a/tests/fixtures/app/nested-project/actual-project/package.json +++ b/tests/fixtures/app/nested-project/actual-project/package.json @@ -62,7 +62,7 @@ "qunit-dom": "^1.6.0" }, "engines": { - "node": "10.* || >= 12" + "node": "12.* || 14.* || >= 16" }, "ember": { "edition": "octane" diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index b90a4cae2d..de5e251685 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -61,7 +61,7 @@ "qunit-dom": "^1.6.0" }, "engines": { - "node": "10.* || >= 12" + "node": "12.* || 14.* || >= 16" }, "ember": { "edition": "octane" diff --git a/tests/fixtures/app/with-blueprint-override-lint-fail/package.json b/tests/fixtures/app/with-blueprint-override-lint-fail/package.json index b97c73cb9c..965063373d 100644 --- a/tests/fixtures/app/with-blueprint-override-lint-fail/package.json +++ b/tests/fixtures/app/with-blueprint-override-lint-fail/package.json @@ -61,7 +61,7 @@ "qunit-dom": "^1.6.0" }, "engines": { - "node": "10.* || >= 12" + "node": "12.* || 14.* || >= 16" }, "ember": { "edition": "octane" diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index e0c367f64a..14bbb98032 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -62,7 +62,7 @@ "qunit-dom": "^1.6.0" }, "engines": { - "node": "10.* || >= 12" + "node": "12.* || 14.* || >= 16" }, "ember": { "edition": "octane" From f4e493b0126aeff0dc63ed310144f7ceb1fd94a8 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Tue, 8 Jun 2021 17:09:55 -0400 Subject: [PATCH 786/818] 3.28.0-alpha.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fb47cddb95..2bac524b54 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.27.0-beta.2", + "version": "3.28.0-alpha.1", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From 1243d03b530b08d1613d1381488f8791a2f73c93 Mon Sep 17 00:00:00 2001 From: Camille TJHOA Date: Wed, 9 Jun 2021 16:46:08 +0000 Subject: [PATCH 787/818] [BUGFIX release] Skip babel for qunit with embroider https://github.com/embroider-build/embroider/issues/677 https://github.com/ember-cli/ember-cli/pull/9483 --- blueprints/addon/files/ember-cli-build.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/blueprints/addon/files/ember-cli-build.js b/blueprints/addon/files/ember-cli-build.js index a778499b7f..e211c63343 100644 --- a/blueprints/addon/files/ember-cli-build.js +++ b/blueprints/addon/files/ember-cli-build.js @@ -15,5 +15,11 @@ module.exports = function (defaults) { */ const { maybeEmbroider } = require('@embroider/test-setup'); - return maybeEmbroider(app); + return maybeEmbroider(app, { + skipBabel: [ + { + package: 'qunit', + }, + ], + }); }; From 4373c5c3fb623cb6c4eaac7f21710c2ecc3945c8 Mon Sep 17 00:00:00 2001 From: Godfrey Chan Date: Fri, 11 Jun 2021 12:12:12 -0700 Subject: [PATCH 788/818] [BUGFIX beta] Comment out IE11 for new apps to avoid deprecation ember-source warns about having IE11 in targets, so we are removing it from the blueprints for a better out-of-the-box experience. In order to make it easier to notice for apps running ember-cli-update a big block of comment was added so it's more likely to be caught. --- blueprints/app/files/config/targets.js | 20 ++++++++++++++------ tests/acceptance/new-test.js | 2 +- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/blueprints/app/files/config/targets.js b/blueprints/app/files/config/targets.js index 4b33327e86..3cd797ab4f 100644 --- a/blueprints/app/files/config/targets.js +++ b/blueprints/app/files/config/targets.js @@ -6,12 +6,20 @@ const browsers = [ 'last 1 Safari versions', ]; -const isCI = Boolean(process.env.CI); -const isProduction = process.env.EMBER_ENV === 'production'; - -if (isCI || isProduction) { - browsers.push('ie 11'); -} +// Ember's browser support policy is changing, and IE11 support will end in +// v4.0 onwards. +// +// See https://deprecations.emberjs.com/v3.x#toc_3-0-browser-support-policy +// +// If you need IE11 support on a version of Ember that still offers support +// for it, uncomment the code block below. +// +// const isCI = Boolean(process.env.CI); +// const isProduction = process.env.EMBER_ENV === 'production'; +// +// if (isCI || isProduction) { +// browsers.push('ie 11'); +// } module.exports = { browsers, diff --git a/tests/acceptance/new-test.js b/tests/acceptance/new-test.js index e9e85414a2..e619998f67 100644 --- a/tests/acceptance/new-test.js +++ b/tests/acceptance/new-test.js @@ -156,7 +156,7 @@ describe('Acceptance: ember new', function () { await ember(['new', 'foo', '--skip-npm', '--skip-bower']); process.env.CI = true; - const defaultTargets = require('../../lib/utilities/default-targets').browsers; + const defaultTargets = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions']; const blueprintTargets = require(path.resolve('config/targets.js')).browsers; expect(blueprintTargets).to.have.same.deep.members(defaultTargets); }); From a0d130d43cb8a85edaa56c0544e6737853e6a117 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 11 Jun 2021 17:08:41 -0400 Subject: [PATCH 789/818] Ensure tests fixtures transpile to be evaluated in Node These specific test fixutres are evaluated in a Node context (by the `DistChecker` using JSDom), so the resulting assets must be transpiled for the current Node environment. --- .../brocfile-tests/auto-run-false/config/targets.js | 10 ++++++++++ .../brocfile-tests/auto-run-true/config/targets.js | 10 ++++++++++ .../brocfile-tests/custom-ember-env/config/targets.js | 10 ++++++++++ 3 files changed, 30 insertions(+) create mode 100644 tests/fixtures/brocfile-tests/auto-run-false/config/targets.js create mode 100644 tests/fixtures/brocfile-tests/auto-run-true/config/targets.js create mode 100644 tests/fixtures/brocfile-tests/custom-ember-env/config/targets.js diff --git a/tests/fixtures/brocfile-tests/auto-run-false/config/targets.js b/tests/fixtures/brocfile-tests/auto-run-false/config/targets.js new file mode 100644 index 0000000000..b55f37e561 --- /dev/null +++ b/tests/fixtures/brocfile-tests/auto-run-false/config/targets.js @@ -0,0 +1,10 @@ +const browsers = [ + 'last 1 Chrome versions', + 'last 1 Firefox versions', + 'last 1 Safari versions', +]; + +module.exports = { + browsers, + node: 'current', +}; diff --git a/tests/fixtures/brocfile-tests/auto-run-true/config/targets.js b/tests/fixtures/brocfile-tests/auto-run-true/config/targets.js new file mode 100644 index 0000000000..b55f37e561 --- /dev/null +++ b/tests/fixtures/brocfile-tests/auto-run-true/config/targets.js @@ -0,0 +1,10 @@ +const browsers = [ + 'last 1 Chrome versions', + 'last 1 Firefox versions', + 'last 1 Safari versions', +]; + +module.exports = { + browsers, + node: 'current', +}; diff --git a/tests/fixtures/brocfile-tests/custom-ember-env/config/targets.js b/tests/fixtures/brocfile-tests/custom-ember-env/config/targets.js new file mode 100644 index 0000000000..b55f37e561 --- /dev/null +++ b/tests/fixtures/brocfile-tests/custom-ember-env/config/targets.js @@ -0,0 +1,10 @@ +const browsers = [ + 'last 1 Chrome versions', + 'last 1 Firefox versions', + 'last 1 Safari versions', +]; + +module.exports = { + browsers, + node: 'current', +}; From 3a98e35dd0d0f2c23e044aed3f14ee8e0ec1670c Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Fri, 25 Jun 2021 14:50:34 -0700 Subject: [PATCH 790/818] update changelog --- CHANGELOG.md | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c41453cca..c1059fcd23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,11 @@ # ember-cli Changelog - -## v3.27.0-beta.2 +## v3.27.0 #### Blueprint Changes -- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.27.0-beta.1...v3.27.0-beta.2) -- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.27.0-beta.1...v3.27.0-beta.2) +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.26.0...v3.27.0) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.26.0-beta.2...v3.27.0) #### Changelog @@ -14,18 +13,6 @@ - [#9535](https://github.com/ember-cli/ember-cli/pull/9535) Disable Embroider by default. [@rwjblue](https://github.com/rwjblue) - [#9557](https://github.com/ember-cli/ember-cli/pull/9557) Update app and addon blueprint dependencies to latest. [@rwjblue](https://github.com/rwjblue) - [#9558](https://github.com/ember-cli/ember-cli/pull/9558) Switch from `octane` template lint config to `recommended` [@bmish](https://github.com/bmish) - -Thank you to all who took the time to contribute! - -## v3.27.1-beta.1 - -#### Blueprint Changes - -- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.26.0...v3.27.0-beta.1) -- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.26.0...v3.27.0-beta.1) - -#### Changelog - - [#9453](https://github.com/ember-cli/ember-cli/pull/9453) Prevent "yarn-error.log" files being published for addons [@bertdeblock](https://github.com/bertdeblock) - [#9392](https://github.com/ember-cli/ember-cli/pull/9392) / [#9484](https://github.com/ember-cli/ember-cli/pull/9484) Add eslint-plugin-qunit to blueprint [@bmish](https://github.com/bmish) - [#9454](https://github.com/ember-cli/ember-cli/pull/9454) / [#9492](https://github.com/ember-cli/ember-cli/pull/9492) Add --embroider as an option for new and init [@thoov](https://github.com/thoov) From 9ecd4f6c65c633dd9585f3ddcad7e71e3817a382 Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Fri, 25 Jun 2021 14:55:22 -0700 Subject: [PATCH 791/818] Release 3.27.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0ebe80aac9..b4ab4fd2cf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.27.0-beta.2", + "version": "3.27.0", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From 68aebc6428ff2f03ca0cc87ae24402562a5510cd Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Fri, 25 Jun 2021 15:02:19 -0700 Subject: [PATCH 792/818] update deps before release --- .../addon/additional-dev-dependencies.json | 2 +- blueprints/app/files/package.json | 28 +++++++++---------- tests/fixtures/addon/defaults/package.json | 18 ++++++------ tests/fixtures/addon/yarn/package.json | 18 ++++++------ tests/fixtures/app/defaults/package.json | 20 ++++++------- .../app/embroider-no-welcome/package.json | 28 +++++++++---------- .../fixtures/app/embroider-yarn/package.json | 28 +++++++++---------- tests/fixtures/app/embroider/package.json | 28 +++++++++---------- tests/fixtures/app/npm/package.json | 20 ++++++------- tests/fixtures/app/yarn/package.json | 20 ++++++------- 10 files changed, 105 insertions(+), 105 deletions(-) diff --git a/blueprints/addon/additional-dev-dependencies.json b/blueprints/addon/additional-dev-dependencies.json index 23be64cc34..3f2fab91c2 100644 --- a/blueprints/addon/additional-dev-dependencies.json +++ b/blueprints/addon/additional-dev-dependencies.json @@ -1,6 +1,6 @@ { "devDependencies": { - "@embroider/test-setup": "^0.41.0", + "@embroider/test-setup": "^0.42.2", "ember-disable-prototype-extensions": "^1.1.3", "ember-try": "^1.4.0", "ember-source-channel-url": "^3.0.0" diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 3b096f358d..249fe11a0a 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -24,10 +24,10 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.2.5<% if (embroider) { %>", - "@embroider/compat": "^0.41.0", - "@embroider/core": "^0.41.0", - "@embroider/webpack": "^0.41.0<% } %>", + "@ember/test-helpers": "^2.2.8<% if (embroider) { %>", + "@embroider/compat": "^0.42.2", + "@embroider/core": "^0.42.2", + "@embroider/webpack": "^0.42.2<% } %>", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", @@ -38,32 +38,32 @@ "ember-cli-babel": "^7.26.6", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-htmlbars": "^5.7.1", - "ember-cli-inject-live-reload": "^2.0.2", + "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.2", - "ember-data": "~3.27.1", + "ember-data": "~3.28.0-beta.1", "ember-export-application-global": "^2.0.1", - "ember-fetch": "^8.0.4", + "ember-fetch": "^8.1.0", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.2", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.27.2", - "ember-template-lint": "^3.4.2<% if (welcome) { %>", + "ember-source": "~3.28.0-beta.6", + "ember-template-lint": "^3.5.0<% if (welcome) { %>", "ember-welcome-page": "^4.0.0<% } %>", - "eslint": "^7.27.0", + "eslint": "^7.29.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.4.2", + "eslint-plugin-ember": "^10.5.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.4.0", "eslint-plugin-qunit": "^6.1.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.3.0", - "qunit": "^2.15.0", + "prettier": "^2.3.1", + "qunit": "^2.16.0", "qunit-dom": "^1.6.0<% if (embroider) { %>", - "webpack": "^5.38.1<% } %>" + "webpack": "^5.40.0<% } %>" }, "engines": { "node": "12.* || 14.* || >= 16" diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index 8260e33ee2..bfa7e36f3e 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -31,8 +31,8 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.2.5", - "@embroider/test-setup": "^0.41.0", + "@ember/test-helpers": "^2.2.8", + "@embroider/test-setup": "^0.42.2", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", @@ -40,7 +40,7 @@ "ember-auto-import": "^1.11.3", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-inject-live-reload": "^2.0.2", + "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.2", "ember-disable-prototype-extensions": "^1.1.3", @@ -50,20 +50,20 @@ "ember-page-title": "^6.2.2", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.27.2", + "ember-source": "~3.28.0-beta.6", "ember-source-channel-url": "^3.0.0", - "ember-template-lint": "^3.4.2", + "ember-template-lint": "^3.5.0", "ember-try": "^1.4.0", - "eslint": "^7.27.0", + "eslint": "^7.29.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.4.2", + "eslint-plugin-ember": "^10.5.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.4.0", "eslint-plugin-qunit": "^6.1.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.3.0", - "qunit": "^2.15.0", + "prettier": "^2.3.1", + "qunit": "^2.16.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 2b3bffccd7..5bec89957f 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -31,8 +31,8 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.2.5", - "@embroider/test-setup": "^0.41.0", + "@ember/test-helpers": "^2.2.8", + "@embroider/test-setup": "^0.42.2", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", @@ -40,7 +40,7 @@ "ember-auto-import": "^1.11.3", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-inject-live-reload": "^2.0.2", + "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.2", "ember-disable-prototype-extensions": "^1.1.3", @@ -50,21 +50,21 @@ "ember-page-title": "^6.2.2", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.27.2", + "ember-source": "~3.28.0-beta.6", "ember-source-channel-url": "^3.0.0", - "ember-template-lint": "^3.4.2", + "ember-template-lint": "^3.5.0", "ember-try": "^1.4.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.27.0", + "eslint": "^7.29.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.4.2", + "eslint-plugin-ember": "^10.5.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.4.0", "eslint-plugin-qunit": "^6.1.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.3.0", - "qunit": "^2.15.0", + "prettier": "^2.3.1", + "qunit": "^2.16.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index 679e500cdf..c7ec52d5a7 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -24,7 +24,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.2.5", + "@ember/test-helpers": "^2.2.8", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", @@ -35,30 +35,30 @@ "ember-cli-babel": "^7.26.6", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-htmlbars": "^5.7.1", - "ember-cli-inject-live-reload": "^2.0.2", + "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.2", - "ember-data": "~3.27.1", + "ember-data": "~3.28.0-beta.1", "ember-export-application-global": "^2.0.1", - "ember-fetch": "^8.0.4", + "ember-fetch": "^8.1.0", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.2", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.27.2", - "ember-template-lint": "^3.4.2", + "ember-source": "~3.28.0-beta.6", + "ember-template-lint": "^3.5.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.27.0", + "eslint": "^7.29.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.4.2", + "eslint-plugin-ember": "^10.5.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.4.0", "eslint-plugin-qunit": "^6.1.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.3.0", - "qunit": "^2.15.0", + "prettier": "^2.3.1", + "qunit": "^2.16.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index 6da194aa88..d41e0da8c5 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -24,10 +24,10 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.2.5", - "@embroider/compat": "^0.41.0", - "@embroider/core": "^0.41.0", - "@embroider/webpack": "^0.41.0", + "@ember/test-helpers": "^2.2.8", + "@embroider/compat": "^0.42.2", + "@embroider/core": "^0.42.2", + "@embroider/webpack": "^0.42.2", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", @@ -38,31 +38,31 @@ "ember-cli-babel": "^7.26.6", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-htmlbars": "^5.7.1", - "ember-cli-inject-live-reload": "^2.0.2", + "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.2", - "ember-data": "~3.27.1", + "ember-data": "~3.28.0-beta.1", "ember-export-application-global": "^2.0.1", - "ember-fetch": "^8.0.4", + "ember-fetch": "^8.1.0", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.2", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.27.2", - "ember-template-lint": "^3.4.2", - "eslint": "^7.27.0", + "ember-source": "~3.28.0-beta.6", + "ember-template-lint": "^3.5.0", + "eslint": "^7.29.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.4.2", + "eslint-plugin-ember": "^10.5.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.4.0", "eslint-plugin-qunit": "^6.1.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.3.0", - "qunit": "^2.15.0", + "prettier": "^2.3.1", + "qunit": "^2.16.0", "qunit-dom": "^1.6.0", - "webpack": "^5.38.1" + "webpack": "^5.40.0" }, "engines": { "node": "12.* || 14.* || >= 16" diff --git a/tests/fixtures/app/embroider-yarn/package.json b/tests/fixtures/app/embroider-yarn/package.json index 24e0e3c67c..994c6d8c49 100644 --- a/tests/fixtures/app/embroider-yarn/package.json +++ b/tests/fixtures/app/embroider-yarn/package.json @@ -24,10 +24,10 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.2.5", - "@embroider/compat": "^0.41.0", - "@embroider/core": "^0.41.0", - "@embroider/webpack": "^0.41.0", + "@ember/test-helpers": "^2.2.8", + "@embroider/compat": "^0.42.2", + "@embroider/core": "^0.42.2", + "@embroider/webpack": "^0.42.2", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", @@ -38,32 +38,32 @@ "ember-cli-babel": "^7.26.6", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-htmlbars": "^5.7.1", - "ember-cli-inject-live-reload": "^2.0.2", + "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.2", - "ember-data": "~3.27.1", + "ember-data": "~3.28.0-beta.1", "ember-export-application-global": "^2.0.1", - "ember-fetch": "^8.0.4", + "ember-fetch": "^8.1.0", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.2", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.27.2", - "ember-template-lint": "^3.4.2", + "ember-source": "~3.28.0-beta.6", + "ember-template-lint": "^3.5.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.27.0", + "eslint": "^7.29.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.4.2", + "eslint-plugin-ember": "^10.5.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.4.0", "eslint-plugin-qunit": "^6.1.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.3.0", - "qunit": "^2.15.0", + "prettier": "^2.3.1", + "qunit": "^2.16.0", "qunit-dom": "^1.6.0", - "webpack": "^5.38.1" + "webpack": "^5.40.0" }, "engines": { "node": "12.* || 14.* || >= 16" diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index 24e0e3c67c..994c6d8c49 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -24,10 +24,10 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.2.5", - "@embroider/compat": "^0.41.0", - "@embroider/core": "^0.41.0", - "@embroider/webpack": "^0.41.0", + "@ember/test-helpers": "^2.2.8", + "@embroider/compat": "^0.42.2", + "@embroider/core": "^0.42.2", + "@embroider/webpack": "^0.42.2", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", @@ -38,32 +38,32 @@ "ember-cli-babel": "^7.26.6", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-htmlbars": "^5.7.1", - "ember-cli-inject-live-reload": "^2.0.2", + "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.2", - "ember-data": "~3.27.1", + "ember-data": "~3.28.0-beta.1", "ember-export-application-global": "^2.0.1", - "ember-fetch": "^8.0.4", + "ember-fetch": "^8.1.0", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.2", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.27.2", - "ember-template-lint": "^3.4.2", + "ember-source": "~3.28.0-beta.6", + "ember-template-lint": "^3.5.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.27.0", + "eslint": "^7.29.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.4.2", + "eslint-plugin-ember": "^10.5.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.4.0", "eslint-plugin-qunit": "^6.1.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.3.0", - "qunit": "^2.15.0", + "prettier": "^2.3.1", + "qunit": "^2.16.0", "qunit-dom": "^1.6.0", - "webpack": "^5.38.1" + "webpack": "^5.40.0" }, "engines": { "node": "12.* || 14.* || >= 16" diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index 420dbdca86..c8b3daa97b 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -24,7 +24,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.2.5", + "@ember/test-helpers": "^2.2.8", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", @@ -35,29 +35,29 @@ "ember-cli-babel": "^7.26.6", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-htmlbars": "^5.7.1", - "ember-cli-inject-live-reload": "^2.0.2", + "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.2", - "ember-data": "~3.27.1", + "ember-data": "~3.28.0-beta.1", "ember-export-application-global": "^2.0.1", - "ember-fetch": "^8.0.4", + "ember-fetch": "^8.1.0", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.2", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.27.2", - "ember-template-lint": "^3.4.2", - "eslint": "^7.27.0", + "ember-source": "~3.28.0-beta.6", + "ember-template-lint": "^3.5.0", + "eslint": "^7.29.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.4.2", + "eslint-plugin-ember": "^10.5.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.4.0", "eslint-plugin-qunit": "^6.1.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.3.0", - "qunit": "^2.15.0", + "prettier": "^2.3.1", + "qunit": "^2.16.0", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 679e500cdf..c7ec52d5a7 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -24,7 +24,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.2.5", + "@ember/test-helpers": "^2.2.8", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", @@ -35,30 +35,30 @@ "ember-cli-babel": "^7.26.6", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-htmlbars": "^5.7.1", - "ember-cli-inject-live-reload": "^2.0.2", + "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.2", - "ember-data": "~3.27.1", + "ember-data": "~3.28.0-beta.1", "ember-export-application-global": "^2.0.1", - "ember-fetch": "^8.0.4", + "ember-fetch": "^8.1.0", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.2", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.27.2", - "ember-template-lint": "^3.4.2", + "ember-source": "~3.28.0-beta.6", + "ember-template-lint": "^3.5.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.27.0", + "eslint": "^7.29.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.4.2", + "eslint-plugin-ember": "^10.5.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.4.0", "eslint-plugin-qunit": "^6.1.1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.3.0", - "qunit": "^2.15.0", + "prettier": "^2.3.1", + "qunit": "^2.16.0", "qunit-dom": "^1.6.0" }, "engines": { From 2062733366cd812896373636b9a738b443538f47 Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Thu, 26 Aug 2021 14:24:05 -0700 Subject: [PATCH 793/818] update changelog --- CHANGELOG.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1059fcd23..8ec83d73a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,34 @@ # ember-cli Changelog + +## v3.28.0-beta.1 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.27.0...v3.28.0-beta.1) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.27.0...v3.28.0-beta.1) + +#### Changelog + +- [#9505](https://github.com/ember-cli/ember-cli/pull/9505) Pass `realPath` as `root` rather than the dirname for `addonMainPath` [@brendenpalmer](https://github.com/brendenpalmer) +- [#9507](https://github.com/ember-cli/ember-cli/pull/9507) Add a new config, `ember-addon.projectRoot`, to specify the location of the project [@brendenpalmer](https://github.com/brendenpalmer) +- [#9530](https://github.com/ember-cli/ember-cli/pull/9530) Drop Node 10 support [@rwjblue](https://github.com/rwjblue) +- [#9487](https://github.com/ember-cli/ember-cli/pull/9487) Add support for creating a single addon instance per bundle root (which enables dramatically reducing the total number of addon instances) [@davecombs](https://github.com/davecombs) +- [#9524](https://github.com/ember-cli/ember-cli/pull/9524) Update CONTRIBUTING.md to reference cli.emberjs.com [@loganrosen](https://github.com/loganrosen) +- [#9533](https://github.com/ember-cli/ember-cli/pull/9533) Ensure package-info objects are stable when they represent the same addon [@brendenpalmer](https://github.com/brendenpalmer) +- [#9538](https://github.com/ember-cli/ember-cli/pull/9538) ensure backwards compatibility is maintained with `packageRoot` and `root` [@brendenpalmer](https://github.com/brendenpalmer) +- [#9539](https://github.com/ember-cli/ember-cli/pull/9539) avoid setting `root` as `realPath` from the package-info object [@brendenpalmer](https://github.com/brendenpalmer) +- [#9537](https://github.com/ember-cli/ember-cli/pull/9537) Implement LCA host/host addons logic in `ember-cli` [@brendenpalmer](https://github.com/brendenpalmer) +- [#9540](https://github.com/ember-cli/ember-cli/pull/9540) Use relative override paths in blueprint ESLint config [@loganrosen](https://github.com/loganrosen) +- [#9542](https://github.com/ember-cli/ember-cli/pull/9542) Add validation checks for addon instance bundle caching [@brendenpalmer](https://github.com/brendenpalmer) +- [#9543](https://github.com/ember-cli/ember-cli/pull/9543) Add ability to specify a custom `ember-addon.perBundleAddonCacheUtil` utility [@brendenpalmer](https://github.com/brendenpalmer) +- [#9562](https://github.com/ember-cli/ember-cli/pull/9562) Update `addon-proxy` to support Embroider [@brendenpalmer](https://github.com/brendenpalmer) +- [#9565](https://github.com/ember-cli/ember-cli/pull/9565) Drop Node 10 support in blueprint engine spec [@elwayman02](https://github.com/elwayman02) +- [#9568](https://github.com/ember-cli/ember-cli/pull/9568) [BUGFIX release] Skip babel for qunit with embroider [@ctjhoa](https://github.com/ctjhoa) + +Thank you to all who took the time to contribute! + + ## v3.27.0 #### Blueprint Changes From 704c2047849f5637bc03dbe146788bbb46859cdc Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Thu, 26 Aug 2021 14:28:24 -0700 Subject: [PATCH 794/818] Release 3.28.0-beta.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f1600a080c..f07c802fa7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.27.0", + "version": "3.28.0-beta.1", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From 8b2b4dfe5b5d72cb327aa069c71b4b3c1855379f Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Fri, 27 Aug 2021 09:37:25 -0700 Subject: [PATCH 795/818] update deps before release --- .../addon/additional-dev-dependencies.json | 2 +- blueprints/app/files/package.json | 28 +++++++++---------- tests/fixtures/addon/defaults/package.json | 18 ++++++------ tests/fixtures/addon/yarn/package.json | 18 ++++++------ tests/fixtures/app/defaults/package.json | 20 ++++++------- .../app/embroider-no-welcome/package.json | 28 +++++++++---------- .../fixtures/app/embroider-yarn/package.json | 28 +++++++++---------- tests/fixtures/app/embroider/package.json | 28 +++++++++---------- tests/fixtures/app/npm/package.json | 20 ++++++------- tests/fixtures/app/yarn/package.json | 20 ++++++------- 10 files changed, 105 insertions(+), 105 deletions(-) diff --git a/blueprints/addon/additional-dev-dependencies.json b/blueprints/addon/additional-dev-dependencies.json index 3f2fab91c2..e5a1479947 100644 --- a/blueprints/addon/additional-dev-dependencies.json +++ b/blueprints/addon/additional-dev-dependencies.json @@ -1,6 +1,6 @@ { "devDependencies": { - "@embroider/test-setup": "^0.42.2", + "@embroider/test-setup": "^0.43.5", "ember-disable-prototype-extensions": "^1.1.3", "ember-try": "^1.4.0", "ember-source-channel-url": "^3.0.0" diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 249fe11a0a..18371334e3 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -24,10 +24,10 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.2.8<% if (embroider) { %>", - "@embroider/compat": "^0.42.2", - "@embroider/core": "^0.42.2", - "@embroider/webpack": "^0.42.2<% } %>", + "@ember/test-helpers": "^2.4.2<% if (embroider) { %>", + "@embroider/compat": "^0.43.5", + "@embroider/core": "^0.43.5", + "@embroider/webpack": "^0.43.5<% } %>", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", @@ -41,29 +41,29 @@ "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.2", - "ember-data": "~3.28.0-beta.1", + "ember-data": "~3.28.0", "ember-export-application-global": "^2.0.1", - "ember-fetch": "^8.1.0", + "ember-fetch": "^8.1.1", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.2", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.28.0-beta.6", - "ember-template-lint": "^3.5.0<% if (welcome) { %>", + "ember-source": "~3.28.0", + "ember-template-lint": "^3.6.0<% if (welcome) { %>", "ember-welcome-page": "^4.0.0<% } %>", - "eslint": "^7.29.0", + "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.5.1", + "eslint-plugin-ember": "^10.5.4", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.4.0", - "eslint-plugin-qunit": "^6.1.1", + "eslint-plugin-prettier": "^3.4.1", + "eslint-plugin-qunit": "^6.2.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.3.1", + "prettier": "^2.3.2", "qunit": "^2.16.0", "qunit-dom": "^1.6.0<% if (embroider) { %>", - "webpack": "^5.40.0<% } %>" + "webpack": "^5.51.1<% } %>" }, "engines": { "node": "12.* || 14.* || >= 16" diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index bfa7e36f3e..8d4ca02d85 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -31,8 +31,8 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.2.8", - "@embroider/test-setup": "^0.42.2", + "@ember/test-helpers": "^2.4.2", + "@embroider/test-setup": "^0.43.5", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", @@ -50,19 +50,19 @@ "ember-page-title": "^6.2.2", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.28.0-beta.6", + "ember-source": "~3.28.0", "ember-source-channel-url": "^3.0.0", - "ember-template-lint": "^3.5.0", + "ember-template-lint": "^3.6.0", "ember-try": "^1.4.0", - "eslint": "^7.29.0", + "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.5.1", + "eslint-plugin-ember": "^10.5.4", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.4.0", - "eslint-plugin-qunit": "^6.1.1", + "eslint-plugin-prettier": "^3.4.1", + "eslint-plugin-qunit": "^6.2.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.3.1", + "prettier": "^2.3.2", "qunit": "^2.16.0", "qunit-dom": "^1.6.0" }, diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 5bec89957f..591fdff297 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -31,8 +31,8 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.2.8", - "@embroider/test-setup": "^0.42.2", + "@ember/test-helpers": "^2.4.2", + "@embroider/test-setup": "^0.43.5", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", @@ -50,20 +50,20 @@ "ember-page-title": "^6.2.2", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.28.0-beta.6", + "ember-source": "~3.28.0", "ember-source-channel-url": "^3.0.0", - "ember-template-lint": "^3.5.0", + "ember-template-lint": "^3.6.0", "ember-try": "^1.4.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.29.0", + "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.5.1", + "eslint-plugin-ember": "^10.5.4", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.4.0", - "eslint-plugin-qunit": "^6.1.1", + "eslint-plugin-prettier": "^3.4.1", + "eslint-plugin-qunit": "^6.2.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.3.1", + "prettier": "^2.3.2", "qunit": "^2.16.0", "qunit-dom": "^1.6.0" }, diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index c7ec52d5a7..42f3330464 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -24,7 +24,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.2.8", + "@ember/test-helpers": "^2.4.2", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", @@ -38,26 +38,26 @@ "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.2", - "ember-data": "~3.28.0-beta.1", + "ember-data": "~3.28.0", "ember-export-application-global": "^2.0.1", - "ember-fetch": "^8.1.0", + "ember-fetch": "^8.1.1", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.2", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.28.0-beta.6", - "ember-template-lint": "^3.5.0", + "ember-source": "~3.28.0", + "ember-template-lint": "^3.6.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.29.0", + "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.5.1", + "eslint-plugin-ember": "^10.5.4", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.4.0", - "eslint-plugin-qunit": "^6.1.1", + "eslint-plugin-prettier": "^3.4.1", + "eslint-plugin-qunit": "^6.2.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.3.1", + "prettier": "^2.3.2", "qunit": "^2.16.0", "qunit-dom": "^1.6.0" }, diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index d41e0da8c5..529bdc9490 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -24,10 +24,10 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.2.8", - "@embroider/compat": "^0.42.2", - "@embroider/core": "^0.42.2", - "@embroider/webpack": "^0.42.2", + "@ember/test-helpers": "^2.4.2", + "@embroider/compat": "^0.43.5", + "@embroider/core": "^0.43.5", + "@embroider/webpack": "^0.43.5", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", @@ -41,28 +41,28 @@ "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.2", - "ember-data": "~3.28.0-beta.1", + "ember-data": "~3.28.0", "ember-export-application-global": "^2.0.1", - "ember-fetch": "^8.1.0", + "ember-fetch": "^8.1.1", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.2", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.28.0-beta.6", - "ember-template-lint": "^3.5.0", - "eslint": "^7.29.0", + "ember-source": "~3.28.0", + "ember-template-lint": "^3.6.0", + "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.5.1", + "eslint-plugin-ember": "^10.5.4", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.4.0", - "eslint-plugin-qunit": "^6.1.1", + "eslint-plugin-prettier": "^3.4.1", + "eslint-plugin-qunit": "^6.2.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.3.1", + "prettier": "^2.3.2", "qunit": "^2.16.0", "qunit-dom": "^1.6.0", - "webpack": "^5.40.0" + "webpack": "^5.51.1" }, "engines": { "node": "12.* || 14.* || >= 16" diff --git a/tests/fixtures/app/embroider-yarn/package.json b/tests/fixtures/app/embroider-yarn/package.json index 994c6d8c49..353ce52f01 100644 --- a/tests/fixtures/app/embroider-yarn/package.json +++ b/tests/fixtures/app/embroider-yarn/package.json @@ -24,10 +24,10 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.2.8", - "@embroider/compat": "^0.42.2", - "@embroider/core": "^0.42.2", - "@embroider/webpack": "^0.42.2", + "@ember/test-helpers": "^2.4.2", + "@embroider/compat": "^0.43.5", + "@embroider/core": "^0.43.5", + "@embroider/webpack": "^0.43.5", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", @@ -41,29 +41,29 @@ "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.2", - "ember-data": "~3.28.0-beta.1", + "ember-data": "~3.28.0", "ember-export-application-global": "^2.0.1", - "ember-fetch": "^8.1.0", + "ember-fetch": "^8.1.1", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.2", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.28.0-beta.6", - "ember-template-lint": "^3.5.0", + "ember-source": "~3.28.0", + "ember-template-lint": "^3.6.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.29.0", + "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.5.1", + "eslint-plugin-ember": "^10.5.4", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.4.0", - "eslint-plugin-qunit": "^6.1.1", + "eslint-plugin-prettier": "^3.4.1", + "eslint-plugin-qunit": "^6.2.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.3.1", + "prettier": "^2.3.2", "qunit": "^2.16.0", "qunit-dom": "^1.6.0", - "webpack": "^5.40.0" + "webpack": "^5.51.1" }, "engines": { "node": "12.* || 14.* || >= 16" diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index 994c6d8c49..353ce52f01 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -24,10 +24,10 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.2.8", - "@embroider/compat": "^0.42.2", - "@embroider/core": "^0.42.2", - "@embroider/webpack": "^0.42.2", + "@ember/test-helpers": "^2.4.2", + "@embroider/compat": "^0.43.5", + "@embroider/core": "^0.43.5", + "@embroider/webpack": "^0.43.5", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", @@ -41,29 +41,29 @@ "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.2", - "ember-data": "~3.28.0-beta.1", + "ember-data": "~3.28.0", "ember-export-application-global": "^2.0.1", - "ember-fetch": "^8.1.0", + "ember-fetch": "^8.1.1", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.2", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.28.0-beta.6", - "ember-template-lint": "^3.5.0", + "ember-source": "~3.28.0", + "ember-template-lint": "^3.6.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.29.0", + "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.5.1", + "eslint-plugin-ember": "^10.5.4", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.4.0", - "eslint-plugin-qunit": "^6.1.1", + "eslint-plugin-prettier": "^3.4.1", + "eslint-plugin-qunit": "^6.2.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.3.1", + "prettier": "^2.3.2", "qunit": "^2.16.0", "qunit-dom": "^1.6.0", - "webpack": "^5.40.0" + "webpack": "^5.51.1" }, "engines": { "node": "12.* || 14.* || >= 16" diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index c8b3daa97b..c16db4257a 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -24,7 +24,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.2.8", + "@ember/test-helpers": "^2.4.2", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", @@ -38,25 +38,25 @@ "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.2", - "ember-data": "~3.28.0-beta.1", + "ember-data": "~3.28.0", "ember-export-application-global": "^2.0.1", - "ember-fetch": "^8.1.0", + "ember-fetch": "^8.1.1", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.2", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.28.0-beta.6", - "ember-template-lint": "^3.5.0", - "eslint": "^7.29.0", + "ember-source": "~3.28.0", + "ember-template-lint": "^3.6.0", + "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.5.1", + "eslint-plugin-ember": "^10.5.4", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.4.0", - "eslint-plugin-qunit": "^6.1.1", + "eslint-plugin-prettier": "^3.4.1", + "eslint-plugin-qunit": "^6.2.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.3.1", + "prettier": "^2.3.2", "qunit": "^2.16.0", "qunit-dom": "^1.6.0" }, diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index c7ec52d5a7..42f3330464 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -24,7 +24,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.2.8", + "@ember/test-helpers": "^2.4.2", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", @@ -38,26 +38,26 @@ "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.2", - "ember-data": "~3.28.0-beta.1", + "ember-data": "~3.28.0", "ember-export-application-global": "^2.0.1", - "ember-fetch": "^8.1.0", + "ember-fetch": "^8.1.1", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.2", "ember-qunit": "^5.1.4", "ember-resolver": "^8.0.2", - "ember-source": "~3.28.0-beta.6", - "ember-template-lint": "^3.5.0", + "ember-source": "~3.28.0", + "ember-template-lint": "^3.6.0", "ember-welcome-page": "^4.0.0", - "eslint": "^7.29.0", + "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.5.1", + "eslint-plugin-ember": "^10.5.4", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.4.0", - "eslint-plugin-qunit": "^6.1.1", + "eslint-plugin-prettier": "^3.4.1", + "eslint-plugin-qunit": "^6.2.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.3.1", + "prettier": "^2.3.2", "qunit": "^2.16.0", "qunit-dom": "^1.6.0" }, From 3e8b9351b3506b208dc494c11305f0b7e6a96ab7 Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Fri, 27 Aug 2021 10:26:40 -0700 Subject: [PATCH 796/818] update changelog --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ec83d73a8..3dc035dd30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,12 @@ # ember-cli Changelog -## v3.28.0-beta.1 +## v3.28.0 #### Blueprint Changes -- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.27.0...v3.28.0-beta.1) -- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.27.0...v3.28.0-beta.1) +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.27.0...v3.28.0) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.27.0...v3.28.0) #### Changelog From 154e950e17dcb2aad066f41df826051eabc43ae0 Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Fri, 27 Aug 2021 10:27:41 -0700 Subject: [PATCH 797/818] Release 3.28.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f07c802fa7..db74054f1d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.28.0-beta.1", + "version": "3.28.0", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From eaa423e581c44132dd998f457c5d168403763c6c Mon Sep 17 00:00:00 2001 From: Brenden Palmer Date: Thu, 9 Sep 2021 15:03:37 -0400 Subject: [PATCH 798/818] reload pkginfo as part of `reloadPkg` (cherry picked from commit 2e56840fac96501d2e5b3849582ec38b8b738a8a) --- lib/models/project.js | 5 +++++ tests/unit/models/project-test.js | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/lib/models/project.js b/lib/models/project.js index a1849b8e74..d1c53a11f1 100644 --- a/lib/models/project.js +++ b/lib/models/project.js @@ -594,6 +594,11 @@ class Project { this.packageInfoCache.reloadProjects(); + // update `_packageInfo` after reloading projects from the `PackageInfoCache` instance + // if we don't do this we get into a state where `_packageInfo` is referencing the old + // pkginfo object that hasn't been updated/reloaded + this._packageInfo = this.packageInfoCache.loadProject(this); + if (PerBundleAddonCache.isEnabled()) { this.perBundleAddonCache = new PerBundleAddonCache(this); } diff --git a/tests/unit/models/project-test.js b/tests/unit/models/project-test.js index f03b754225..173e6b3be1 100644 --- a/tests/unit/models/project-test.js +++ b/tests/unit/models/project-test.js @@ -495,6 +495,7 @@ describe('models/project.js', function () { describe('reloadPkg', function () { let newProjectPath, oldPkg; + beforeEach(function () { projectPath = path.resolve(__dirname, '../../fixtures/addon/simple'); packageContents = require(path.join(projectPath, 'package.json')); @@ -514,6 +515,14 @@ describe('models/project.js', function () { expect(oldPkg).to.not.deep.equal(project.pkg); }); + + it('reloads the pkginfo', function () { + let pkgInfo = project._packageInfo; + + project.reloadPkg(); + + expect(pkgInfo).to.not.equal(project._packageInfo); + }); }); describe('emberCLIVersion', function () { From 15b9b494414a745b622748329247e0e09e8cc450 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 4 Oct 2021 14:57:40 -0400 Subject: [PATCH 799/818] Add v3.28.1 to CHANGELOG.md. --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3dc035dd30..491c396595 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # ember-cli Changelog +## v3.28.1 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.28.0...v3.28.1) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.28.0...v3.28.1) + +#### Changelog + +- [#9618](https://github.com/ember-cli/ember-cli/pull/9618) Ensure discovered addons are refreshed after `ember install` (fix usage of default blueprints) [@brendenpalmer](https://github.com/brendenpalmer) ## v3.28.0 From 49f89c699470f2c48621dcfdd826572f1537331b Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 4 Oct 2021 14:59:32 -0400 Subject: [PATCH 800/818] Release 3.28.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index db74054f1d..147fe8b440 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.28.0", + "version": "3.28.1", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From 2e344a2f49cd2cb0434a4a1064ea7b8a765c97d9 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 6 Oct 2021 17:49:59 -0400 Subject: [PATCH 801/818] Ensure `ember-classic` ember-try scenario uses Ember 3.x As we approach Ember 4.0.0, we need to help addons ensure that they only test ember-classic's set of optional features when running under 3.x. This updates the default ember-try config to hard code the `ember-classic` scenario to Ember 3.28 (the last 3.x Ember version). --- blueprints/addon/files/addon-config/ember-try.js | 3 +++ tests/fixtures/addon/defaults/config/ember-try.js | 3 +++ tests/fixtures/addon/yarn/config/ember-try.js | 3 +++ 3 files changed, 9 insertions(+) diff --git a/blueprints/addon/files/addon-config/ember-try.js b/blueprints/addon/files/addon-config/ember-try.js index 885aa9a250..09bba25073 100644 --- a/blueprints/addon/files/addon-config/ember-try.js +++ b/blueprints/addon/files/addon-config/ember-try.js @@ -70,6 +70,9 @@ module.exports = async function () { }), }, npm: { + devDependencies: { + 'ember-source': '~3.28.0', + }, ember: { edition: 'classic', }, diff --git a/tests/fixtures/addon/defaults/config/ember-try.js b/tests/fixtures/addon/defaults/config/ember-try.js index e6ef3ad925..d563ed58d0 100644 --- a/tests/fixtures/addon/defaults/config/ember-try.js +++ b/tests/fixtures/addon/defaults/config/ember-try.js @@ -69,6 +69,9 @@ module.exports = async function () { }), }, npm: { + devDependencies: { + 'ember-source': '~3.28.0', + }, ember: { edition: 'classic', }, diff --git a/tests/fixtures/addon/yarn/config/ember-try.js b/tests/fixtures/addon/yarn/config/ember-try.js index d8bd6f97de..c9d0dd7931 100644 --- a/tests/fixtures/addon/yarn/config/ember-try.js +++ b/tests/fixtures/addon/yarn/config/ember-try.js @@ -70,6 +70,9 @@ module.exports = async function () { }), }, npm: { + devDependencies: { + 'ember-source': '~3.28.0', + }, ember: { edition: 'classic', }, From c8c2fd754fab13ec9ebe136f84439b17bd4cb7ee Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 13 Oct 2021 14:02:56 -0400 Subject: [PATCH 802/818] Add v3.28.2 to CHANGELOG.md. --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 491c396595..2ab7c31029 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # ember-cli Changelog +## v3.28.2 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.28.1...v3.28.2) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.28.1...v3.28.2) + +#### Changelog + +- [#9659](https://github.com/ember-cli/ember-cli/pull/9659) Ensure `ember-classic` ember-try scenario uses Ember 3.x [@rwjblue](https://github.com/rwjblue) + +Thank you to all who took the time to contribute! + ## v3.28.1 #### Blueprint Changes From 1488c55ebf90b0b1ab8ed8ee677693e2ee1ffefa Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 13 Oct 2021 14:05:02 -0400 Subject: [PATCH 803/818] Release 3.28.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 147fe8b440..f9599ba205 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.28.1", + "version": "3.28.2", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From f4de4e4e050fa730e8ca77b787e5293141734b54 Mon Sep 17 00:00:00 2001 From: Bert De Block Date: Mon, 18 Oct 2021 18:17:39 +0200 Subject: [PATCH 804/818] Don't emit an error when the `lint:fix` script fails post blueprint generation --- lib/tasks/generate-from-blueprint.js | 1 - lib/tasks/install-blueprint.js | 1 - 2 files changed, 2 deletions(-) diff --git a/lib/tasks/generate-from-blueprint.js b/lib/tasks/generate-from-blueprint.js index b0aea072ff..2dff8a1428 100644 --- a/lib/tasks/generate-from-blueprint.js +++ b/lib/tasks/generate-from-blueprint.js @@ -20,7 +20,6 @@ class GenerateTask extends Task { try { await lintFix.run(this.ui); } catch (error) { - this.ui.writeError('Lint fix failed'); logger.error('Lint fix failed: %o', error); } } diff --git a/lib/tasks/install-blueprint.js b/lib/tasks/install-blueprint.js index b6063a8008..2e5cbc7689 100644 --- a/lib/tasks/install-blueprint.js +++ b/lib/tasks/install-blueprint.js @@ -52,7 +52,6 @@ class InstallBlueprintTask extends Task { try { await lintFix.run(this.ui); } catch (error) { - this.ui.writeError('Lint fix failed'); logger.error('Lint fix failed: %o', error); } } From 97d091cb519a7b3ef78d0945e4c6c5edd3f6718f Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 18 Oct 2021 17:37:28 -0400 Subject: [PATCH 805/818] Add v3.28.3 to CHANGELOG.md. --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ab7c31029..d18cc71cbe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # ember-cli Changelog +## v3.28.3 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.28.2...v3.28.3) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.28.2...v3.28.3) + +#### Changelog + +- [#9670](https://github.com/ember-cli/ember-cli/pull/9670) Don't emit an error when the `lint:fix` script fails post blueprint generation [@bertdeblock](https://github.com/bertdeblock) + +Thank you to all who took the time to contribute! + ## v3.28.2 #### Blueprint Changes From 5f4528176303884e7447f0b237289ee0749b9f2a Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 18 Oct 2021 17:38:24 -0400 Subject: [PATCH 806/818] Release 3.28.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f9599ba205..9f2c90e276 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.28.2", + "version": "3.28.3", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From 2d542d3b544873d09c4ca04f0c913bdb18e92783 Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Mon, 8 Nov 2021 12:13:13 -0800 Subject: [PATCH 807/818] test in node 16 LTS This should remove the warning for untested node 16. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1c2145ae80..e6ee336d03 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,7 +54,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [12.x, 14.x] + node-version: [12.x, 14.x, 16.x] os: [ubuntu, windows] steps: From f17c6d053628ffd1c8f8767d0e4f060257bc196e Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Wed, 10 Nov 2021 13:17:19 -0800 Subject: [PATCH 808/818] update changelog --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d18cc71cbe..b4eadcade6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # ember-cli Changelog +## v3.28.4 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.28.3...v3.28.4) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.28.3...v3.28.4) + +#### Changelog + +- [#9694](https://github.com/ember-cli/ember-cli/pull/9694) test in node 16 LTS [@kellyselden](https://github.com/kellyselden) + +Thank you to all who took the time to contribute! + ## v3.28.3 #### Blueprint Changes From d0c9c31be4fd0b417db0d7661d069ef8749c4c7f Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Wed, 10 Nov 2021 13:19:25 -0800 Subject: [PATCH 809/818] Release 3.28.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9f2c90e276..b50ba6f904 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.28.3", + "version": "3.28.4", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From 913b5d169de33ae5e88f402d0ebf5d25d3114fef Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Mon, 20 Dec 2021 18:00:46 -0800 Subject: [PATCH 810/818] update embroider deps in LTS --- .../addon/additional-dev-dependencies.json | 2 +- blueprints/app/files/package.json | 34 +++++++++---------- tests/fixtures/addon/defaults/package.json | 24 ++++++------- tests/fixtures/addon/yarn/package.json | 26 +++++++------- tests/fixtures/app/defaults/package.json | 26 +++++++------- .../app/embroider-no-welcome/package.json | 32 ++++++++--------- .../fixtures/app/embroider-yarn/package.json | 34 +++++++++---------- tests/fixtures/app/embroider/package.json | 34 +++++++++---------- tests/fixtures/app/npm/package.json | 24 ++++++------- tests/fixtures/app/yarn/package.json | 26 +++++++------- 10 files changed, 131 insertions(+), 131 deletions(-) diff --git a/blueprints/addon/additional-dev-dependencies.json b/blueprints/addon/additional-dev-dependencies.json index e5a1479947..5f279ee559 100644 --- a/blueprints/addon/additional-dev-dependencies.json +++ b/blueprints/addon/additional-dev-dependencies.json @@ -1,6 +1,6 @@ { "devDependencies": { - "@embroider/test-setup": "^0.43.5", + "@embroider/test-setup": "^0.48.1", "ember-disable-prototype-extensions": "^1.1.3", "ember-try": "^1.4.0", "ember-source-channel-url": "^3.0.0" diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json index 18371334e3..ca5b590b2d 100644 --- a/blueprints/app/files/package.json +++ b/blueprints/app/files/package.json @@ -24,46 +24,46 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.4.2<% if (embroider) { %>", - "@embroider/compat": "^0.43.5", - "@embroider/core": "^0.43.5", - "@embroider/webpack": "^0.43.5<% } %>", + "@ember/test-helpers": "^2.6.0<% if (embroider) { %>", + "@embroider/compat": "^0.48.1", + "@embroider/core": "^0.48.1", + "@embroider/webpack": "^0.48.1<% } %>", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.11.3", + "ember-auto-import": "^1.12.0", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^5.0.0", - "ember-cli-babel": "^7.26.6", + "ember-cli-babel": "^7.26.10", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^5.7.1", + "ember-cli-htmlbars": "^5.7.2", "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.2", - "ember-data": "~3.28.0", + "ember-data": "~3.28.6", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.1.1", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.2", - "ember-qunit": "^5.1.4", - "ember-resolver": "^8.0.2", - "ember-source": "~3.28.0", - "ember-template-lint": "^3.6.0<% if (welcome) { %>", - "ember-welcome-page": "^4.0.0<% } %>", + "ember-qunit": "^5.1.5", + "ember-resolver": "^8.0.3", + "ember-source": "~3.28.8", + "ember-template-lint": "^3.15.0<% if (welcome) { %>", + "ember-welcome-page": "^4.1.0<% } %>", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.5.4", + "eslint-plugin-ember": "^10.5.8", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.4.1", "eslint-plugin-qunit": "^6.2.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.3.2", - "qunit": "^2.16.0", + "prettier": "^2.5.1", + "qunit": "^2.17.2", "qunit-dom": "^1.6.0<% if (embroider) { %>", - "webpack": "^5.51.1<% } %>" + "webpack": "^5.65.0<% } %>" }, "engines": { "node": "12.* || 14.* || >= 16" diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json index 8d4ca02d85..9888cde77c 100644 --- a/tests/fixtures/addon/defaults/package.json +++ b/tests/fixtures/addon/defaults/package.json @@ -26,18 +26,18 @@ "test:ember-compatibility": "ember try:each" }, "dependencies": { - "ember-cli-babel": "^7.26.6", - "ember-cli-htmlbars": "^5.7.1" + "ember-cli-babel": "^7.26.10", + "ember-cli-htmlbars": "^5.7.2" }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.4.2", - "@embroider/test-setup": "^0.43.5", + "@ember/test-helpers": "^2.6.0", + "@embroider/test-setup": "^0.48.1", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.11.3", + "ember-auto-import": "^1.12.0", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-inject-live-reload": "^2.1.0", @@ -48,22 +48,22 @@ "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.2", - "ember-qunit": "^5.1.4", - "ember-resolver": "^8.0.2", - "ember-source": "~3.28.0", + "ember-qunit": "^5.1.5", + "ember-resolver": "^8.0.3", + "ember-source": "~3.28.8", "ember-source-channel-url": "^3.0.0", - "ember-template-lint": "^3.6.0", + "ember-template-lint": "^3.15.0", "ember-try": "^1.4.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.5.4", + "eslint-plugin-ember": "^10.5.8", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.4.1", "eslint-plugin-qunit": "^6.2.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.3.2", - "qunit": "^2.16.0", + "prettier": "^2.5.1", + "qunit": "^2.17.2", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json index 591fdff297..ebec47e82f 100644 --- a/tests/fixtures/addon/yarn/package.json +++ b/tests/fixtures/addon/yarn/package.json @@ -26,18 +26,18 @@ "test:ember-compatibility": "ember try:each" }, "dependencies": { - "ember-cli-babel": "^7.26.6", - "ember-cli-htmlbars": "^5.7.1" + "ember-cli-babel": "^7.26.10", + "ember-cli-htmlbars": "^5.7.2" }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.4.2", - "@embroider/test-setup": "^0.43.5", + "@ember/test-helpers": "^2.6.0", + "@embroider/test-setup": "^0.48.1", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.11.3", + "ember-auto-import": "^1.12.0", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-dependency-checker": "^3.2.0", "ember-cli-inject-live-reload": "^2.1.0", @@ -48,23 +48,23 @@ "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.2", - "ember-qunit": "^5.1.4", - "ember-resolver": "^8.0.2", - "ember-source": "~3.28.0", + "ember-qunit": "^5.1.5", + "ember-resolver": "^8.0.3", + "ember-source": "~3.28.8", "ember-source-channel-url": "^3.0.0", - "ember-template-lint": "^3.6.0", + "ember-template-lint": "^3.15.0", "ember-try": "^1.4.0", - "ember-welcome-page": "^4.0.0", + "ember-welcome-page": "^4.1.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.5.4", + "eslint-plugin-ember": "^10.5.8", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.4.1", "eslint-plugin-qunit": "^6.2.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.3.2", - "qunit": "^2.16.0", + "prettier": "^2.5.1", + "qunit": "^2.17.2", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json index 42f3330464..ba9a25733e 100644 --- a/tests/fixtures/app/defaults/package.json +++ b/tests/fixtures/app/defaults/package.json @@ -24,41 +24,41 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.4.2", + "@ember/test-helpers": "^2.6.0", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.11.3", + "ember-auto-import": "^1.12.0", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^5.0.0", - "ember-cli-babel": "^7.26.6", + "ember-cli-babel": "^7.26.10", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^5.7.1", + "ember-cli-htmlbars": "^5.7.2", "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.2", - "ember-data": "~3.28.0", + "ember-data": "~3.28.6", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.1.1", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.2", - "ember-qunit": "^5.1.4", - "ember-resolver": "^8.0.2", - "ember-source": "~3.28.0", - "ember-template-lint": "^3.6.0", - "ember-welcome-page": "^4.0.0", + "ember-qunit": "^5.1.5", + "ember-resolver": "^8.0.3", + "ember-source": "~3.28.8", + "ember-template-lint": "^3.15.0", + "ember-welcome-page": "^4.1.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.5.4", + "eslint-plugin-ember": "^10.5.8", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.4.1", "eslint-plugin-qunit": "^6.2.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.3.2", - "qunit": "^2.16.0", + "prettier": "^2.5.1", + "qunit": "^2.17.2", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json index 529bdc9490..6fb63f6814 100644 --- a/tests/fixtures/app/embroider-no-welcome/package.json +++ b/tests/fixtures/app/embroider-no-welcome/package.json @@ -24,45 +24,45 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.4.2", - "@embroider/compat": "^0.43.5", - "@embroider/core": "^0.43.5", - "@embroider/webpack": "^0.43.5", + "@ember/test-helpers": "^2.6.0", + "@embroider/compat": "^0.48.1", + "@embroider/core": "^0.48.1", + "@embroider/webpack": "^0.48.1", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.11.3", + "ember-auto-import": "^1.12.0", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^5.0.0", - "ember-cli-babel": "^7.26.6", + "ember-cli-babel": "^7.26.10", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^5.7.1", + "ember-cli-htmlbars": "^5.7.2", "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.2", - "ember-data": "~3.28.0", + "ember-data": "~3.28.6", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.1.1", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.2", - "ember-qunit": "^5.1.4", - "ember-resolver": "^8.0.2", - "ember-source": "~3.28.0", - "ember-template-lint": "^3.6.0", + "ember-qunit": "^5.1.5", + "ember-resolver": "^8.0.3", + "ember-source": "~3.28.8", + "ember-template-lint": "^3.15.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.5.4", + "eslint-plugin-ember": "^10.5.8", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.4.1", "eslint-plugin-qunit": "^6.2.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.3.2", - "qunit": "^2.16.0", + "prettier": "^2.5.1", + "qunit": "^2.17.2", "qunit-dom": "^1.6.0", - "webpack": "^5.51.1" + "webpack": "^5.65.0" }, "engines": { "node": "12.* || 14.* || >= 16" diff --git a/tests/fixtures/app/embroider-yarn/package.json b/tests/fixtures/app/embroider-yarn/package.json index 353ce52f01..001418ba75 100644 --- a/tests/fixtures/app/embroider-yarn/package.json +++ b/tests/fixtures/app/embroider-yarn/package.json @@ -24,46 +24,46 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.4.2", - "@embroider/compat": "^0.43.5", - "@embroider/core": "^0.43.5", - "@embroider/webpack": "^0.43.5", + "@ember/test-helpers": "^2.6.0", + "@embroider/compat": "^0.48.1", + "@embroider/core": "^0.48.1", + "@embroider/webpack": "^0.48.1", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.11.3", + "ember-auto-import": "^1.12.0", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^5.0.0", - "ember-cli-babel": "^7.26.6", + "ember-cli-babel": "^7.26.10", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^5.7.1", + "ember-cli-htmlbars": "^5.7.2", "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.2", - "ember-data": "~3.28.0", + "ember-data": "~3.28.6", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.1.1", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.2", - "ember-qunit": "^5.1.4", - "ember-resolver": "^8.0.2", - "ember-source": "~3.28.0", - "ember-template-lint": "^3.6.0", - "ember-welcome-page": "^4.0.0", + "ember-qunit": "^5.1.5", + "ember-resolver": "^8.0.3", + "ember-source": "~3.28.8", + "ember-template-lint": "^3.15.0", + "ember-welcome-page": "^4.1.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.5.4", + "eslint-plugin-ember": "^10.5.8", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.4.1", "eslint-plugin-qunit": "^6.2.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.3.2", - "qunit": "^2.16.0", + "prettier": "^2.5.1", + "qunit": "^2.17.2", "qunit-dom": "^1.6.0", - "webpack": "^5.51.1" + "webpack": "^5.65.0" }, "engines": { "node": "12.* || 14.* || >= 16" diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json index 353ce52f01..001418ba75 100644 --- a/tests/fixtures/app/embroider/package.json +++ b/tests/fixtures/app/embroider/package.json @@ -24,46 +24,46 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.4.2", - "@embroider/compat": "^0.43.5", - "@embroider/core": "^0.43.5", - "@embroider/webpack": "^0.43.5", + "@ember/test-helpers": "^2.6.0", + "@embroider/compat": "^0.48.1", + "@embroider/core": "^0.48.1", + "@embroider/webpack": "^0.48.1", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.11.3", + "ember-auto-import": "^1.12.0", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^5.0.0", - "ember-cli-babel": "^7.26.6", + "ember-cli-babel": "^7.26.10", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^5.7.1", + "ember-cli-htmlbars": "^5.7.2", "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.2", - "ember-data": "~3.28.0", + "ember-data": "~3.28.6", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.1.1", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.2", - "ember-qunit": "^5.1.4", - "ember-resolver": "^8.0.2", - "ember-source": "~3.28.0", - "ember-template-lint": "^3.6.0", - "ember-welcome-page": "^4.0.0", + "ember-qunit": "^5.1.5", + "ember-resolver": "^8.0.3", + "ember-source": "~3.28.8", + "ember-template-lint": "^3.15.0", + "ember-welcome-page": "^4.1.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.5.4", + "eslint-plugin-ember": "^10.5.8", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.4.1", "eslint-plugin-qunit": "^6.2.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.3.2", - "qunit": "^2.16.0", + "prettier": "^2.5.1", + "qunit": "^2.17.2", "qunit-dom": "^1.6.0", - "webpack": "^5.51.1" + "webpack": "^5.65.0" }, "engines": { "node": "12.* || 14.* || >= 16" diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json index c16db4257a..113cc926b8 100644 --- a/tests/fixtures/app/npm/package.json +++ b/tests/fixtures/app/npm/package.json @@ -24,40 +24,40 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.4.2", + "@ember/test-helpers": "^2.6.0", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.11.3", + "ember-auto-import": "^1.12.0", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^5.0.0", - "ember-cli-babel": "^7.26.6", + "ember-cli-babel": "^7.26.10", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^5.7.1", + "ember-cli-htmlbars": "^5.7.2", "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.2", - "ember-data": "~3.28.0", + "ember-data": "~3.28.6", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.1.1", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.2", - "ember-qunit": "^5.1.4", - "ember-resolver": "^8.0.2", - "ember-source": "~3.28.0", - "ember-template-lint": "^3.6.0", + "ember-qunit": "^5.1.5", + "ember-resolver": "^8.0.3", + "ember-source": "~3.28.8", + "ember-template-lint": "^3.15.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.5.4", + "eslint-plugin-ember": "^10.5.8", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.4.1", "eslint-plugin-qunit": "^6.2.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.3.2", - "qunit": "^2.16.0", + "prettier": "^2.5.1", + "qunit": "^2.17.2", "qunit-dom": "^1.6.0" }, "engines": { diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json index 42f3330464..ba9a25733e 100644 --- a/tests/fixtures/app/yarn/package.json +++ b/tests/fixtures/app/yarn/package.json @@ -24,41 +24,41 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.4.2", + "@ember/test-helpers": "^2.6.0", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.11.3", + "ember-auto-import": "^1.12.0", "ember-cli": "~<%= emberCLIVersion %>", "ember-cli-app-version": "^5.0.0", - "ember-cli-babel": "^7.26.6", + "ember-cli-babel": "^7.26.10", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^5.7.1", + "ember-cli-htmlbars": "^5.7.2", "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sri": "^2.1.1", "ember-cli-terser": "^4.0.2", - "ember-data": "~3.28.0", + "ember-data": "~3.28.6", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.1.1", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.2", - "ember-qunit": "^5.1.4", - "ember-resolver": "^8.0.2", - "ember-source": "~3.28.0", - "ember-template-lint": "^3.6.0", - "ember-welcome-page": "^4.0.0", + "ember-qunit": "^5.1.5", + "ember-resolver": "^8.0.3", + "ember-source": "~3.28.8", + "ember-template-lint": "^3.15.0", + "ember-welcome-page": "^4.1.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.5.4", + "eslint-plugin-ember": "^10.5.8", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.4.1", "eslint-plugin-qunit": "^6.2.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.3.2", - "qunit": "^2.16.0", + "prettier": "^2.5.1", + "qunit": "^2.17.2", "qunit-dom": "^1.6.0" }, "engines": { From ef13f785e8e5e9e9f9f01b940f1ded20165bba9e Mon Sep 17 00:00:00 2001 From: Bert De Block Date: Sun, 21 Nov 2021 09:26:08 +0100 Subject: [PATCH 811/818] Add Ember v3.28 LTS to `addon` blueprint (drop support for Ember v3.20 LTS) --- blueprints/addon/files/.travis.yml | 2 +- blueprints/addon/files/README.md | 4 ++-- blueprints/addon/files/addon-config/ember-try.js | 8 ++++---- tests/fixtures/addon/defaults/.travis.yml | 2 +- tests/fixtures/addon/defaults/README.md | 4 ++-- tests/fixtures/addon/defaults/config/ember-try.js | 8 ++++---- tests/fixtures/addon/yarn/.travis.yml | 2 +- tests/fixtures/addon/yarn/README.md | 4 ++-- tests/fixtures/addon/yarn/config/ember-try.js | 8 ++++---- 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/blueprints/addon/files/.travis.yml b/blueprints/addon/files/.travis.yml index a13eaecc50..aac2d419fe 100644 --- a/blueprints/addon/files/.travis.yml +++ b/blueprints/addon/files/.travis.yml @@ -51,8 +51,8 @@ jobs: # we recommend new addons test the current and previous LTS # as well as latest stable release (bonus points to beta/canary) - - env: EMBER_TRY_SCENARIO=ember-lts-3.20 - env: EMBER_TRY_SCENARIO=ember-lts-3.24 + - env: EMBER_TRY_SCENARIO=ember-lts-3.28 - env: EMBER_TRY_SCENARIO=ember-release - env: EMBER_TRY_SCENARIO=ember-beta - env: EMBER_TRY_SCENARIO=ember-canary diff --git a/blueprints/addon/files/README.md b/blueprints/addon/files/README.md index 2ec7757b7d..8622b2f86b 100644 --- a/blueprints/addon/files/README.md +++ b/blueprints/addon/files/README.md @@ -7,8 +7,8 @@ Compatibility ------------------------------------------------------------------------------ -* Ember.js v3.20 or above -* Ember CLI v3.20 or above +* Ember.js v3.24 or above +* Ember CLI v3.24 or above * Node.js v12 or above diff --git a/blueprints/addon/files/addon-config/ember-try.js b/blueprints/addon/files/addon-config/ember-try.js index 09bba25073..cc564ade16 100644 --- a/blueprints/addon/files/addon-config/ember-try.js +++ b/blueprints/addon/files/addon-config/ember-try.js @@ -8,18 +8,18 @@ module.exports = async function () { <% if (yarn) { %>useYarn: true, <% } %>scenarios: [ { - name: 'ember-lts-3.20', + name: 'ember-lts-3.24', npm: { devDependencies: { - 'ember-source': '~3.20.5', + 'ember-source': '~3.24.3', }, }, }, { - name: 'ember-lts-3.24', + name: 'ember-lts-3.28', npm: { devDependencies: { - 'ember-source': '~3.24.3', + 'ember-source': '~3.28.0', }, }, }, diff --git a/tests/fixtures/addon/defaults/.travis.yml b/tests/fixtures/addon/defaults/.travis.yml index 7c3c348097..9b3dfabbdb 100644 --- a/tests/fixtures/addon/defaults/.travis.yml +++ b/tests/fixtures/addon/defaults/.travis.yml @@ -47,8 +47,8 @@ jobs: # we recommend new addons test the current and previous LTS # as well as latest stable release (bonus points to beta/canary) - - env: EMBER_TRY_SCENARIO=ember-lts-3.20 - env: EMBER_TRY_SCENARIO=ember-lts-3.24 + - env: EMBER_TRY_SCENARIO=ember-lts-3.28 - env: EMBER_TRY_SCENARIO=ember-release - env: EMBER_TRY_SCENARIO=ember-beta - env: EMBER_TRY_SCENARIO=ember-canary diff --git a/tests/fixtures/addon/defaults/README.md b/tests/fixtures/addon/defaults/README.md index c4dcf008b6..378fb8a256 100644 --- a/tests/fixtures/addon/defaults/README.md +++ b/tests/fixtures/addon/defaults/README.md @@ -7,8 +7,8 @@ foo Compatibility ------------------------------------------------------------------------------ -* Ember.js v3.20 or above -* Ember CLI v3.20 or above +* Ember.js v3.24 or above +* Ember CLI v3.24 or above * Node.js v12 or above diff --git a/tests/fixtures/addon/defaults/config/ember-try.js b/tests/fixtures/addon/defaults/config/ember-try.js index d563ed58d0..2612023fa0 100644 --- a/tests/fixtures/addon/defaults/config/ember-try.js +++ b/tests/fixtures/addon/defaults/config/ember-try.js @@ -7,18 +7,18 @@ module.exports = async function () { return { scenarios: [ { - name: 'ember-lts-3.20', + name: 'ember-lts-3.24', npm: { devDependencies: { - 'ember-source': '~3.20.5', + 'ember-source': '~3.24.3', }, }, }, { - name: 'ember-lts-3.24', + name: 'ember-lts-3.28', npm: { devDependencies: { - 'ember-source': '~3.24.3', + 'ember-source': '~3.28.0', }, }, }, diff --git a/tests/fixtures/addon/yarn/.travis.yml b/tests/fixtures/addon/yarn/.travis.yml index 14cf05af64..1ab83d9aa4 100644 --- a/tests/fixtures/addon/yarn/.travis.yml +++ b/tests/fixtures/addon/yarn/.travis.yml @@ -46,8 +46,8 @@ jobs: # we recommend new addons test the current and previous LTS # as well as latest stable release (bonus points to beta/canary) - - env: EMBER_TRY_SCENARIO=ember-lts-3.20 - env: EMBER_TRY_SCENARIO=ember-lts-3.24 + - env: EMBER_TRY_SCENARIO=ember-lts-3.28 - env: EMBER_TRY_SCENARIO=ember-release - env: EMBER_TRY_SCENARIO=ember-beta - env: EMBER_TRY_SCENARIO=ember-canary diff --git a/tests/fixtures/addon/yarn/README.md b/tests/fixtures/addon/yarn/README.md index c4dcf008b6..378fb8a256 100644 --- a/tests/fixtures/addon/yarn/README.md +++ b/tests/fixtures/addon/yarn/README.md @@ -7,8 +7,8 @@ foo Compatibility ------------------------------------------------------------------------------ -* Ember.js v3.20 or above -* Ember CLI v3.20 or above +* Ember.js v3.24 or above +* Ember CLI v3.24 or above * Node.js v12 or above diff --git a/tests/fixtures/addon/yarn/config/ember-try.js b/tests/fixtures/addon/yarn/config/ember-try.js index c9d0dd7931..8e178a63ca 100644 --- a/tests/fixtures/addon/yarn/config/ember-try.js +++ b/tests/fixtures/addon/yarn/config/ember-try.js @@ -8,18 +8,18 @@ module.exports = async function () { useYarn: true, scenarios: [ { - name: 'ember-lts-3.20', + name: 'ember-lts-3.24', npm: { devDependencies: { - 'ember-source': '~3.20.5', + 'ember-source': '~3.24.3', }, }, }, { - name: 'ember-lts-3.24', + name: 'ember-lts-3.28', npm: { devDependencies: { - 'ember-source': '~3.24.3', + 'ember-source': '~3.28.0', }, }, }, From 6d6786ca250d5c1a657770649b3ecba3519faf66 Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Mon, 20 Dec 2021 19:26:42 -0800 Subject: [PATCH 812/818] update changelog --- CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4eadcade6..4943a24712 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # ember-cli Changelog +## v3.28.5 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.28.4...v3.28.5) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.28.4...v3.28.5) + +#### Changelog + +- [#9730](https://github.com/ember-cli/ember-cli/pull/9730) Add Ember v3.28 LTS to `addon` blueprint (drop support for Ember v3.20 LTS) [@kellyselden](https://github.com/kellyselden) +- [#9740](https://github.com/ember-cli/ember-cli/pull/9740) update embroider deps in LTS [@kellyselden](https://github.com/kellyselden) + +Thank you to all who took the time to contribute! + ## v3.28.4 #### Blueprint Changes From 53b5dcc903abc96a3d66f16804fa56b85e32c101 Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Mon, 20 Dec 2021 19:29:06 -0800 Subject: [PATCH 813/818] Release 3.28.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b50ba6f904..7abea164fd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.28.4", + "version": "3.28.5", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From f4a55cf2bc81b6e97effdec72e4b1af470bfcc4e Mon Sep 17 00:00:00 2001 From: Bert De Block Date: Fri, 20 May 2022 21:34:49 +0200 Subject: [PATCH 814/818] Temporarily skip failing ember new test for npm versions <= v6.0.0 (cherry picked from commit d051954d0784132c9eb35510f703e4bdb37b7c03) --- tests/acceptance/new-test.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/acceptance/new-test.js b/tests/acceptance/new-test.js index e619998f67..9b2c908617 100644 --- a/tests/acceptance/new-test.js +++ b/tests/acceptance/new-test.js @@ -1,5 +1,7 @@ 'use strict'; +const execa = require('execa'); +const semver = require('semver'); const fs = require('fs-extra'); const ember = require('../helpers/ember'); const walkSync = require('walk-sync'); @@ -270,6 +272,13 @@ describe('Acceptance: ember new', function () { }); it('ember new with shorthand git blueprint and ref checks out the blueprint with the correct ref and uses it', async function () { + // Temporarily skipped for npm versions <= v6.0.0. + // See https://github.com/npm/cli/issues/4896 for more info. + let { stdout: npmVersion } = await execa('npm', ['-v']); + if (semver.major(npmVersion) <= 6) { + this.skip(); + } + this.timeout(20000); // relies on GH network stuff await ember([ From 4a36187772dcc5603e355d64f280b8025c3ca5c0 Mon Sep 17 00:00:00 2001 From: Ben Demboski Date: Wed, 3 Aug 2022 09:57:13 -0700 Subject: [PATCH 815/818] Handle rebuild failures without exiting When a rebuild fails, mark it as a builder failure so the watcher doesn't re-throw it, causing it to be an unhandled error that results in the process exiting. Fixes #9584 --- lib/models/builder.js | 4 ++++ tests/unit/models/builder-test.js | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/lib/models/builder.js b/lib/models/builder.js index 16b86a4174..12e7562030 100644 --- a/lib/models/builder.js +++ b/lib/models/builder.js @@ -221,6 +221,10 @@ class Builder extends CoreObject { } catch (error) { await this.processAddonBuildSteps('buildError', error); + // Mark this as a builder error so the watcher knows it has been handled + // and won't re-throw it + error.isBuilderError = true; + throw error; } finally { clearInterval(uiProgressIntervalID); diff --git a/tests/unit/models/builder-test.js b/tests/unit/models/builder-test.js index f00f5f180f..d92af85661 100644 --- a/tests/unit/models/builder-test.js +++ b/tests/unit/models/builder-test.js @@ -478,6 +478,20 @@ describe('models/builder.js', function () { await expect(builder.build()).to.be.rejected; expect(hooksCalled).to.deep.equal(['preBuild', 'build', 'postBuild', 'outputReady', 'buildError']); }); + + it('sets `isBuilderError` on handled addon errors', async function () { + addon.postBuild = function () { + return Promise.reject(new Error('preBuild Error')); + }; + + let error; + try { + await builder.build(); + } catch (e) { + error = e; + } + expect(error).to.haveOwnProperty('isBuilderError', true); + }); }); describe('fallback from broccoli 2 to broccoli-builder', function () { From 241e1a81f6fccf53b92e1db34e2fca15b0bcd694 Mon Sep 17 00:00:00 2001 From: Ben Demboski Date: Wed, 10 Aug 2022 19:50:17 -0700 Subject: [PATCH 816/818] Don't exit process when requesting a failed build If the most recent build failed and an HTTP request came in, the history middleware would throw an uncaught exception causing the process to exit. Instead, catch and ignore. --- lib/tasks/server/middleware/history-support/index.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/tasks/server/middleware/history-support/index.js b/lib/tasks/server/middleware/history-support/index.js index 3d31dc14ad..0635fa461a 100644 --- a/lib/tasks/server/middleware/history-support/index.js +++ b/lib/tasks/server/middleware/history-support/index.js @@ -49,7 +49,16 @@ class HistorySupportAddon { app.use(async (req, _, next) => { try { - const results = await watcher; + let results; + try { + results = await watcher; + } catch (e) { + // This means there was a build error, so we won't actually be serving + // index.html, and we have nothing to do. We have to catch it here, + // though, or it will go uncaught and cause the process to exit. + return; + } + if (this.shouldHandleRequest(req, options)) { let assetPath = req.path.slice(baseURL.length); let isFile = false; From 23a0d98b599df2975a1dc9c2a8bb90d331d24c7b Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Tue, 4 Oct 2022 10:24:56 -0700 Subject: [PATCH 817/818] update changelog --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4943a24712..bd96a49d98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # ember-cli Changelog +## v3.28.6 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.28.5...v3.28.6) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.28.5...v3.28.6) + +#### Changelog + +- [#10013](https://github.com/ember-cli/ember-cli/pull/10013) [BUGFIX] Handle rebuild failures without exiting [@bendemboski](https://github.com/bendemboski) + +Thank you to all who took the time to contribute! + ## v3.28.5 #### Blueprint Changes From b334c61dd77fe661bb1b6cab6401076a701acab3 Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Tue, 4 Oct 2022 10:25:53 -0700 Subject: [PATCH 818/818] Release 3.28.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7abea164fd..ae33c31cc9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "3.28.5", + "version": "3.28.6", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app",