From 4dce444d17ce2a4abec3f167ed70427201484baa Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Tue, 20 Jun 2023 11:18:06 -0400 Subject: [PATCH 1/9] [BUGFIX] Do not try to wire up Testem unless a test framework is detected -- this is for legacy compat -- modern libraries, such as ember-qunit, call hookIntoTestFramework themselves, because it has better knowledge of when Testem needs to be configured Update test to reflect changes to internal default-packager files --- lib/broccoli/test-support-suffix.js | 2 +- tests/unit/broccoli/default-packager/ember-cli-internal-test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/broccoli/test-support-suffix.js b/lib/broccoli/test-support-suffix.js index fe5620bf97..b284e2474e 100644 --- a/lib/broccoli/test-support-suffix.js +++ b/lib/broccoli/test-support-suffix.js @@ -1,6 +1,6 @@ runningTests = true; -if (window.Testem) { +if (typeof Testem !== 'undefined' && (typeof QUnit !== 'undefined' || typeof Mocha !== 'undefined')) { window.Testem.hookIntoTestFramework(); } 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 9ecfccaed2..bb8100eacd 100644 --- a/tests/unit/broccoli/default-packager/ember-cli-internal-test.js +++ b/tests/unit/broccoli/default-packager/ember-cli-internal-test.js @@ -138,7 +138,7 @@ describe('Default Packager: Ember CLI Internal', function () { ); expect(testSupportPrefixFileContent).to.equal(''); expect(testSupportSuffixFileContent).to.contain( - 'runningTests = true;\n\nif (window.Testem) {\n window.Testem.hookIntoTestFramework();\n}' + `runningTests = true;\n\nif (typeof Testem !== 'undefined' && (typeof QUnit !== 'undefined' || typeof Mocha !== 'undefined')) {\n window.Testem.hookIntoTestFramework();\n}` ); expect(vendorPrefixFileContent).to.contain(`window.EmberENV = (function(EmberENV, extra) { From b3a1f0a4b9191c0d36eb773f5a43198a7e6281e7 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Thu, 27 Jul 2023 14:52:04 -0400 Subject: [PATCH 2/9] Skip the typescript tests due to node 14 incompatibility --- 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 f6a426db52..c0d33bb4f9 100644 --- a/tests/acceptance/new-test.js +++ b/tests/acceptance/new-test.js @@ -625,7 +625,7 @@ describe('Acceptance: ember new', function () { checkFileWithEmberCLIVersionReplacement(fixturePath, 'tests/dummy/config/ember-cli-update.json'); }); - it('app + typescript', async function () { + it.skip('app + typescript', async function () { // This is a very slow test, as the blueprint installs ember-cli-typescript, which requires installing all dependencies, // regardless of --skip-npm this.timeout(600000); @@ -660,7 +660,7 @@ describe('Acceptance: ember new', function () { expect(file('tsconfig.json')).to.exist; }); - it('addon + typescript', async function () { + it.skip('addon + typescript', async function () { this.timeout(600000); await ember(['addon', 'foo', '--typescript', '--skip-npm', '--skip-bower', '--skip-git', '--yarn']); From b4a042c07ba6cab9b868a5d09d2a669f0ae1980c Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Thu, 27 Jul 2023 16:24:38 -0400 Subject: [PATCH 3/9] Try interpreting the node version from the environment via execa.sync --- tests/acceptance/new-test.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tests/acceptance/new-test.js b/tests/acceptance/new-test.js index c0d33bb4f9..2713ec0eaf 100644 --- a/tests/acceptance/new-test.js +++ b/tests/acceptance/new-test.js @@ -21,6 +21,10 @@ const assertVersionLock = require('../helpers/assert-version-lock'); let tmpDir = './tmp/new-test'; +let { stdout: nodeOut } = execa.sync('node', ['--version']); + +let isNode14 = semver.satisfies(nodeOut, '14.x'); + describe('Acceptance: ember new', function () { this.timeout(300000); let ORIGINAL_PROCESS_ENV_CI; @@ -625,7 +629,10 @@ describe('Acceptance: ember new', function () { checkFileWithEmberCLIVersionReplacement(fixturePath, 'tests/dummy/config/ember-cli-update.json'); }); - it.skip('app + typescript', async function () { + it('app + typescript', async function () { + if (isNode14) { + this.skip(); + } // This is a very slow test, as the blueprint installs ember-cli-typescript, which requires installing all dependencies, // regardless of --skip-npm this.timeout(600000); @@ -660,7 +667,11 @@ describe('Acceptance: ember new', function () { expect(file('tsconfig.json')).to.exist; }); - it.skip('addon + typescript', async function () { + it('addon + typescript', async function () { + if (isNode14) { + this.skip(); + } + this.timeout(600000); await ember(['addon', 'foo', '--typescript', '--skip-npm', '--skip-bower', '--skip-git', '--yarn']); From 5f24efdcb60e11a294d9a0753591d18235a7c16d Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Tue, 8 Aug 2023 07:29:45 -0700 Subject: [PATCH 4/9] update changelog --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26589f9032..d041f7173c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # ember-cli Changelog +## v4.12.2 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v4.12.1...v4.12.2) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v4.12.1...v4.12.2) + +#### Changelog + +- [#10314](https://github.com/ember-cli/ember-cli/pull/10314) [BUGFIX] Do not try to wire up Testem unless a test framework is deteā€¦ [@NullVoxPopuli](https://github.com/NullVoxPopuli) + +Thank you to all who took the time to contribute! + ## v4.12.1 #### Blueprint Changes From e4f2d2d8b586b9178945459146a48b11253c3585 Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Tue, 8 Aug 2023 07:30:26 -0700 Subject: [PATCH 5/9] Release 4.12.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a4d7ed686b..fcc582ce44 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "4.12.1", + "version": "4.12.2", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app", From 46a6ca0c5d189950066375f6b92ecc36343a0edf Mon Sep 17 00:00:00 2001 From: Joshua Gorner Date: Mon, 22 Apr 2024 14:10:08 -0400 Subject: [PATCH 6/9] Use Lodash's `_.template` instead of `lodash.template` package --- lib/tasks/git-init.js | 2 +- lib/utilities/process-template.js | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/tasks/git-init.js b/lib/tasks/git-init.js index a120906c43..9e198621ed 100644 --- a/lib/tasks/git-init.js +++ b/lib/tasks/git-init.js @@ -47,7 +47,7 @@ module.exports = class GitInitTask extends Task { } async _gitCommit() { - const template = require('lodash.template'); + const template = require('lodash/template'); let commitTemplate = fs.readFileSync(path.join(__dirname, '../utilities/COMMIT_MESSAGE.txt')); let commitMessage = template(commitTemplate)(pkg); let env = this.buildGitEnvironment(); diff --git a/lib/utilities/process-template.js b/lib/utilities/process-template.js index c07b82169e..7f888ac9dd 100644 --- a/lib/utilities/process-template.js +++ b/lib/utilities/process-template.js @@ -6,5 +6,5 @@ module.exports = function processTemplate(content, context) { interpolate: /<%=([\s\S]+?)%>/g, escape: /<%-([\s\S]+?)%>/g, }; - return require('lodash.template')(content, options)(context); + return require('lodash/template')(content, options)(context); }; diff --git a/package.json b/package.json index fcc582ce44..b4a40729dd 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "isbinaryfile": "^5.0.0", "js-yaml": "^4.1.0", "leek": "0.0.24", - "lodash.template": "^4.5.0", + "lodash": "^4.17.21", "markdown-it": "^13.0.1", "markdown-it-terminal": "^0.4.0", "minimatch": "^7.4.1", From ecae1a06b8fc386d970f76fe3a40fc3ede5d52c8 Mon Sep 17 00:00:00 2001 From: Joshua Gorner Date: Mon, 22 Apr 2024 15:10:48 -0400 Subject: [PATCH 7/9] Bump fast-sourcemap-concat to 2.1.1 --- yarn.lock | 54 +++--------------------------------------------------- 1 file changed, 3 insertions(+), 51 deletions(-) diff --git a/yarn.lock b/yarn.lock index 1af28ab53a..8b9edd998a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3506,9 +3506,9 @@ fast-safe-stringify@^2.1.1: integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== fast-sourcemap-concat@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-sourcemap-concat/-/fast-sourcemap-concat-2.1.0.tgz#12dd36bfc38c804093e4bd1de61dd6216f574211" - integrity sha512-L9uADEnnHOeF4U5Kc3gzEs3oFpNCFkiTJXvT+nKmR0zcFqHZJJbszWT7dv4t9558FJRGpCj8UxUpTgz2zwiIZA== + version "2.1.1" + resolved "https://registry.yarnpkg.com/fast-sourcemap-concat/-/fast-sourcemap-concat-2.1.1.tgz#3647fd5876deace53d9a1c418061199417911801" + integrity sha512-7h9/x25c6AQwdU3mA8MZDUMR3UCy50f237egBrBkuwjnUZSmfu4ptCf91PZSKzON2Uh5VvIHozYKWcPPgcjxIw== dependencies: chalk "^2.0.0" fs-extra "^5.0.0" @@ -3517,7 +3517,6 @@ fast-sourcemap-concat@^2.1.0: mkdirp "^0.5.0" source-map "^0.4.2" source-map-url "^0.3.0" - sourcemap-validator "^1.1.0" fastq@^1.6.0: version "1.14.0" @@ -5408,11 +5407,6 @@ jsesc@^2.5.1: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== -jsesc@~0.3.x: - version "0.3.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.3.0.tgz#1bf5ee63b4539fe2e26d0c1e99c240b97a457972" - integrity sha512-UHQmAeTXV+iwEk0aHheJRqo6Or90eDxI6KIYpHSjKLXKuKlPt1CQ7tGBerFcFA8uKU5mYxiPMlckmFptd5XZzA== - json-buffer@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" @@ -5677,11 +5671,6 @@ lodash._isiterateecall@^3.0.0: resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" integrity sha512-De+ZbrMu6eThFti/CSzhRvTKMgQToLxbij58LMfM8JnYDNSOjkjTCIaa8ixglOeGh2nyPlakbt5bJWJ7gvpYlQ== -lodash._reinterpolate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" - integrity sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA== - lodash.assign@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-3.2.0.tgz#3ce9f0234b4b2223e296b8fa0ac1fee8ebca64fa" @@ -5731,11 +5720,6 @@ lodash.flattendeep@^4.4.0: resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" integrity sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ== -lodash.foreach@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz#1a6a35eace401280c7f06dddec35165ab27e3e53" - integrity sha512-aEXTF4d+m05rVOAUG3z4vZZ4xVexLKZGF0lIxuHZ1Hplpk/3B6Z1+/ICICYRLm7c41Z2xiejbkCkJoTlypoXhQ== - lodash.isarguments@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" @@ -5770,21 +5754,6 @@ lodash.restparam@^3.0.0: resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" integrity sha512-L4/arjjuq4noiUJpt3yS6KIKDtJwNe2fIYgMqyYYKoeIfV1iEqvPwhCx23o+R9dzouGihDAPN1dTIRWa7zk8tw== -lodash.template@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" - integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== - dependencies: - lodash._reinterpolate "^3.0.0" - lodash.templatesettings "^4.0.0" - -lodash.templatesettings@^4.0.0: - 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 "^3.0.0" - lodash.uniq@^4.2.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" @@ -8023,23 +7992,6 @@ source-map@^0.6.1, source-map@~0.6.1: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -source-map@~0.1.x: - version "0.1.43" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" - integrity sha512-VtCvB9SIQhk3aF6h+N85EaqIaBFIAfZ9Cu+NJHHVvc8BbEcnvDcFw6sqQ2dQrT6SlOrZq3tIvyD9+EGq/lJryQ== - dependencies: - amdefine ">=0.0.4" - -sourcemap-validator@^1.1.0: - 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 "^4.5.0" - lodash.template "^4.5.0" - source-map "~0.1.x" - spawn-args@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/spawn-args/-/spawn-args-0.2.0.tgz#fb7d0bd1d70fd4316bd9e3dec389e65f9d6361bb" From 40dcf919333a75bae4d42d87b093781e559c1503 Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Fri, 26 Apr 2024 12:50:28 -0700 Subject: [PATCH 8/9] update changelog --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d041f7173c..41e257c799 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # ember-cli Changelog +## v4.12.3 + +#### Blueprint Changes + +- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v4.12.2...v4.12.3) +- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v4.12.2...v4.12.3) + +#### Changelog + +- [#10458](https://github.com/ember-cli/ember-cli/pull/10458) Use Lodash's `_.template` instead of `lodash.template` package [@gorner](https://github.com/gorner) + +Thank you to all who took the time to contribute! + ## v4.12.2 #### Blueprint Changes From ad783d1fd5d8826a8d870e82619bb55ff878bf50 Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Fri, 26 Apr 2024 13:00:03 -0700 Subject: [PATCH 9/9] Release 4.12.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b4a40729dd..71342095c3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli", - "version": "4.12.2", + "version": "4.12.3", "description": "Command line tool for developing ambitious ember.js apps", "keywords": [ "app",