From a2bd401ecbe706778b511d945b3227bfc0db8080 Mon Sep 17 00:00:00 2001 From: ignace Date: Thu, 27 Jul 2023 21:10:05 +0200 Subject: [PATCH 01/18] Add loose/strict flags Add failing test for strict flag Add file name mapping for strict flag Add gjs template blueprint Filter files depending on loose/strict flag Add gjs test fixture fix component import path Add component-test strict blueprint filter blueprint files for component-test Add strict component test test (no typo) Add component test strict fixture Use authoringFormat option instead of explicit flags Use authoringFormat option instead of flags in component Revert explicit fileMapTokens for strict format Only log skippedJsFiles in loose mode Don't store filteresJsFiles for authoring format do not log skippedJsFiles in component-test either fix afterInstall param location Fix blueprint closing tags Remove log fix: add components to import path Add yield to template-only gjs Make component blueprint ts by default Add js blueprints Move test to outside of pod remove default template test gjs check rfc fixture fix: nested component invocation remove log feat: add template tag aliasses chore: rename param to component-authoring-format fix: remove assert on test chore: update test doc comments to reflect new test waiter api chore: update doc help --- .../__testType__/__path__/__test__.gjs | 38 +++++++++++++++++++ .../__templatepath__/__templatename__.gjs | 3 ++ .../__testType__/__path__/__test__.gts | 38 +++++++++++++++++++ blueprints/component-test/index.js | 35 ++++++++++++++++- .../__templatepath__/__templatename__.gts | 3 ++ blueprints/component/index.js | 35 +++++++++++++---- node-tests/blueprints/component-test-test.js | 8 ++++ node-tests/blueprints/component-test.js | 11 ++++++ node-tests/fixtures/component-test/rfc232.gjs | 28 ++++++++++++++ 9 files changed, 191 insertions(+), 8 deletions(-) create mode 100644 blueprints-js/component-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.gjs create mode 100644 blueprints-js/component/files/__root__/__templatepath__/__templatename__.gjs create mode 100644 blueprints/component-test/files/__root__/__testType__/__path__/__test__.gts create mode 100644 blueprints/component/files/__root__/__templatepath__/__templatename__.gts create mode 100644 node-tests/fixtures/component-test/rfc232.gjs diff --git a/blueprints-js/component-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.gjs b/blueprints-js/component-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.gjs new file mode 100644 index 00000000000..33449bb5877 --- /dev/null +++ b/blueprints-js/component-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.gjs @@ -0,0 +1,38 @@ +<% if (testType === 'integration') { %>import { module, test } from 'qunit'; +import { setupRenderingTest } from '<%= modulePrefix %>/tests/helpers'; +import { render } from '@ember/test-helpers'; +import <%= componentName %> from '<%= modulePrefix %>/components/<%= componentPathName %>'; + +module('<%= friendlyTestDescription %>', function (hooks) { + setupRenderingTest(hooks); + + test('it renders', async function (assert) { + // Updating values is achieved using autotracking, just like in app code. For example: + // class State { @tracked myProperty = 0; }; const state = new State(); + // and update using state.myProperty = 1; await rerender(); + // Handle any actions with function myAction(val) { ... }; + + await render(); + + assert.dom().hasText(''); + + // Template block usage: + await render(); + + assert.dom().hasText('template block text'); + }); +});<% } else if (testType === 'unit') { %>import { module, test } from 'qunit'; +import { setupTest } from '<%= modulePrefix %>/tests/helpers'; + +module('<%= friendlyTestDescription %>', function (hooks) { + setupTest(hooks); + + test('it exists', function (assert) { + let component = this.owner.factoryFor('component:<%= componentPathName %>').create(); + assert.ok(component); + }); +}); <% } %> diff --git a/blueprints-js/component/files/__root__/__templatepath__/__templatename__.gjs b/blueprints-js/component/files/__root__/__templatepath__/__templatename__.gjs new file mode 100644 index 00000000000..e8d9d219abd --- /dev/null +++ b/blueprints-js/component/files/__root__/__templatepath__/__templatename__.gjs @@ -0,0 +1,3 @@ + diff --git a/blueprints/component-test/files/__root__/__testType__/__path__/__test__.gts b/blueprints/component-test/files/__root__/__testType__/__path__/__test__.gts new file mode 100644 index 00000000000..33449bb5877 --- /dev/null +++ b/blueprints/component-test/files/__root__/__testType__/__path__/__test__.gts @@ -0,0 +1,38 @@ +<% if (testType === 'integration') { %>import { module, test } from 'qunit'; +import { setupRenderingTest } from '<%= modulePrefix %>/tests/helpers'; +import { render } from '@ember/test-helpers'; +import <%= componentName %> from '<%= modulePrefix %>/components/<%= componentPathName %>'; + +module('<%= friendlyTestDescription %>', function (hooks) { + setupRenderingTest(hooks); + + test('it renders', async function (assert) { + // Updating values is achieved using autotracking, just like in app code. For example: + // class State { @tracked myProperty = 0; }; const state = new State(); + // and update using state.myProperty = 1; await rerender(); + // Handle any actions with function myAction(val) { ... }; + + await render(); + + assert.dom().hasText(''); + + // Template block usage: + await render(); + + assert.dom().hasText('template block text'); + }); +});<% } else if (testType === 'unit') { %>import { module, test } from 'qunit'; +import { setupTest } from '<%= modulePrefix %>/tests/helpers'; + +module('<%= friendlyTestDescription %>', function (hooks) { + setupTest(hooks); + + test('it exists', function (assert) { + let component = this.owner.factoryFor('component:<%= componentPathName %>').create(); + assert.ok(component); + }); +}); <% } %> diff --git a/blueprints/component-test/index.js b/blueprints/component-test/index.js index 6178bed0e84..b366f07bc18 100644 --- a/blueprints/component-test/index.js +++ b/blueprints/component-test/index.js @@ -14,6 +14,12 @@ function invocationFor(options) { return parts.map((p) => stringUtil.classify(p)).join('::'); } +function invocationForStrictComponentAuthoringFormat(options) { + let parts = options.entity.name.split('/'); + let componentName = parts[parts.length - 1]; + return stringUtil.classify(componentName); +} + module.exports = { description: 'Generates a component integration or unit test.', @@ -36,6 +42,17 @@ module.exports = { { unit: 'unit' }, ], }, + { + name: 'component-authoring-format', + type: ['loose', 'strict'], + default: 'loose', + aliases: [ + { loose: 'loose' }, + { strict: 'strict' }, + { 'template-tag': 'strict' }, + { tt: 'strict' }, + ], + }, ], fileMapTokens: function () { @@ -55,6 +72,19 @@ module.exports = { }; }, + files() { + let files = this._super.files.apply(this, arguments); + + if (this.options.componentAuthoringFormat === 'strict') { + files = files.filter((file) => !(file.endsWith('.js') || file.endsWith('.ts'))); + } + if (this.options.componentAuthoringFormat === 'loose') { + files = files.filter((file) => !(file.endsWith('.gjs') || file.endsWith('.gts'))); + } + + return files; + }, + locals: function (options) { let dasherizedModuleName = stringUtil.dasherize(options.entity.name); let componentPathName = dasherizedModuleName; @@ -74,7 +104,10 @@ module.exports = { ? "import { hbs } from 'ember-cli-htmlbars';" : "import hbs from 'htmlbars-inline-precompile';"; - let templateInvocation = invocationFor(options); + let templateInvocation = + this.options.componentAuthoringFormat === 'strict' + ? invocationForStrictComponentAuthoringFormat(options) + : invocationFor(options); let componentName = templateInvocation; let openComponent = (descriptor) => `<${descriptor}>`; let closeComponent = (descriptor) => ``; diff --git a/blueprints/component/files/__root__/__templatepath__/__templatename__.gts b/blueprints/component/files/__root__/__templatepath__/__templatename__.gts new file mode 100644 index 00000000000..e8d9d219abd --- /dev/null +++ b/blueprints/component/files/__root__/__templatepath__/__templatename__.gts @@ -0,0 +1,3 @@ + diff --git a/blueprints/component/index.js b/blueprints/component/index.js index 1014c6c8261..98f24c5b2be 100644 --- a/blueprints/component/index.js +++ b/blueprints/component/index.js @@ -40,6 +40,17 @@ module.exports = { default: 'flat', aliases: [{ fs: 'flat' }, { ns: 'nested' }], }, + { + name: 'component-authoring-format', + type: ['loose', 'strict'], + default: 'loose', + aliases: [ + { loose: 'loose' }, + { strict: 'strict' }, + { 'template-tag': 'strict' }, + { tt: 'strict' }, + ], + }, ], init() { @@ -78,14 +89,16 @@ module.exports = { afterInstall(options) { this._super.afterInstall.apply(this, arguments); - this.skippedJsFiles.forEach((file) => { - let mapped = this.mapFile(file, this.savedLocals); - this.ui.writeLine(` ${chalk.yellow('skip')} ${mapped}`); - }); + if (options.componentAuthoringFormat === 'loose') { + this.skippedJsFiles.forEach((file) => { + let mapped = this.mapFile(file, this.savedLocals); + this.ui.writeLine(` ${chalk.yellow('skip')} ${mapped}`); + }); - if (this.skippedJsFiles.size > 0) { - let command = `ember generate component-class ${options.entity.name}`; - this.ui.writeLine(` ${chalk.cyan('tip')} to add a class, run \`${command}\``); + if (this.skippedJsFiles.size > 0) { + let command = `ember generate component-class ${options.entity.name}`; + this.ui.writeLine(` ${chalk.cyan('tip')} to add a class, run \`${command}\``); + } } }, @@ -135,6 +148,14 @@ module.exports = { } }); } + if (this.options.componentAuthoringFormat === 'strict') { + files = files.filter( + (file) => !(file.endsWith('.js') || file.endsWith('.ts') || file.endsWith('.hbs')) + ); + } + if (this.options.componentAuthoringFormat === 'loose') { + files = files.filter((file) => !(file.endsWith('.gjs') || file.endsWith('.gts'))); + } return files; }, diff --git a/node-tests/blueprints/component-test-test.js b/node-tests/blueprints/component-test-test.js index cc6416543ed..febebbccf1d 100644 --- a/node-tests/blueprints/component-test-test.js +++ b/node-tests/blueprints/component-test-test.js @@ -29,6 +29,14 @@ describe('Blueprint: component-test', function () { }) ); }); + + it('component-test x-foo --strict', function () { + return emberGenerateDestroy(['component-test', 'x-foo', '--strict'], (_file) => { + expect(_file('tests/integration/components/x-foo-test.gjs')).to.equal( + fixture('component-test/rfc232.gjs') + ); + }); + }); }); it('component-test x-foo --unit', function () { diff --git a/node-tests/blueprints/component-test.js b/node-tests/blueprints/component-test.js index ccecd0f7d99..928bbd24e7c 100644 --- a/node-tests/blueprints/component-test.js +++ b/node-tests/blueprints/component-test.js @@ -25,6 +25,11 @@ const templateOnlyContents = `import templateOnly from '@ember/component/templat export default templateOnly(); `; +const templateTagContents = ` +`; + describe('Blueprint: component', function () { setupTestHooks(this); @@ -261,6 +266,12 @@ describe('Blueprint: component', function () { } ); }); + + it('component foo --strict', function () { + return emberGenerateDestroy(['component', 'foo', '--strict'], (_file) => { + expect(_file('app/components/foo.gjs')).to.equal(templateTagContents); + }); + }); }); describe('in addon', function () { diff --git a/node-tests/fixtures/component-test/rfc232.gjs b/node-tests/fixtures/component-test/rfc232.gjs new file mode 100644 index 00000000000..f030d391ba7 --- /dev/null +++ b/node-tests/fixtures/component-test/rfc232.gjs @@ -0,0 +1,28 @@ +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'my-app/tests/helpers'; +import { render } from '@ember/test-helpers'; +import XFoo from 'my-app/components/x-foo'; + +module('Integration | Component | x-foo', function (hooks) { + setupRenderingTest(hooks); + + test('it renders', async function (assert) { + // Updating values is achieved using autotracking, just like in app code. For example: + // class State { @tracked myProperty = 0; }; const state = new State(); + // and update using state.myProperty = 1; await rerender(); + // Handle any actions with function myAction(val) { ... }; + + await render(); + + assert.dom().hasText(''); + + // Template block usage: + await render(); + + assert.dom().hasText('template block text'); + }); +}); From 05fca8d2c828865c65e2c9dd0ed18fb8bf6117e1 Mon Sep 17 00:00:00 2001 From: Sam Van Campenhout Date: Thu, 23 Jan 2025 17:24:32 +0100 Subject: [PATCH 02/18] Update to ember-cli v6.2 ember-cli is used in the tests, and some tests need the newer features to work as expected. We also need a version that uses the `babel-remove-types` package that includes the fixes for .gts detyping to work. Because of this update, some slight adjustments are needed to some pod related tests. The `usePods` option of ember-cli-blueprint-test-helpers' `setupPodConfig` util isn't compatible with newer ember-cli versions. As a workaround we use the `--pod` argument when generating files. --- node-tests/blueprints/template-test.js | 21 +- package.json | 2 +- pnpm-lock.yaml | 433 ++++++++----------------- 3 files changed, 141 insertions(+), 315 deletions(-) diff --git a/node-tests/blueprints/template-test.js b/node-tests/blueprints/template-test.js index 6891380775d..bbffe775dc4 100644 --- a/node-tests/blueprints/template-test.js +++ b/node-tests/blueprints/template-test.js @@ -36,54 +36,49 @@ describe('Blueprint: template', function () { }); }); - describe('with usePods', function () { - beforeEach(function () { - setupPodConfig({ usePods: true }); - }); - + describe('with --pod', function () { it('template foo', function () { - return emberGenerateDestroy(['template', 'foo'], (_file) => { + return emberGenerateDestroy(['template', 'foo', '--pod'], (_file) => { expect(_file('app/foo/template.hbs')).to.equal(''); }); }); it('template foo.hbs', function () { - return emberGenerateDestroy(['template', 'foo.hbs'], (_file) => { + return emberGenerateDestroy(['template', 'foo.hbs', '--pod'], (_file) => { expect(_file('app/foo.hbs/template.hbs')).to.not.exist; expect(_file('app/foo/template.hbs')).to.equal(''); }); }); it('template foo/bar', function () { - return emberGenerateDestroy(['template', 'foo/bar'], (_file) => { + return emberGenerateDestroy(['template', 'foo/bar', '--pod'], (_file) => { expect(_file('app/foo/bar/template.hbs')).to.equal(''); }); }); }); - describe('with usePods + podModulePrefix', function () { + describe('with --pods + podModulePrefix', function () { beforeEach(function () { setupPodConfig({ - usePods: true, podModulePrefix: true, }); }); it('template foo', function () { - return emberGenerateDestroy(['template', 'foo'], (_file) => { + return emberGenerateDestroy(['template', 'foo', '--pod'], (_file) => { expect(_file('app/pods/foo/template.hbs')).to.equal(''); }); }); it('template foo.hbs', function () { - return emberGenerateDestroy(['template', 'foo.hbs'], (_file) => { + return emberGenerateDestroy(['template', 'foo.hbs', '--pod'], (_file) => { expect(_file('app/pods/foo.hbs/template.hbs')).to.not.exist; expect(_file('app/pods/foo/template.hbs')).to.equal(''); }); }); it('template foo/bar', function () { - return emberGenerateDestroy(['template', 'foo/bar'], (_file) => { + return emberGenerateDestroy(['template', 'foo/bar', '--pod'], (_file) => { expect(_file('app/pods/foo/bar/template.hbs')).to.equal(''); }); }); diff --git a/package.json b/package.json index 7519304532c..ec1830f1f68 100644 --- a/package.json +++ b/package.json @@ -127,7 +127,7 @@ "babel-plugin-ember-template-compilation": "^2.1.1", "dag-map": "^2.0.2", "decorator-transforms": "2.0.0", - "ember-cli": "^4.10.0", + "ember-cli": "^6.2.0", "ember-cli-blueprint-test-helpers": "^0.19.2", "ember-cli-browserstack": "^2.0.1", "ember-cli-dependency-checker": "^3.3.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c6023c87933..f547c58712b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -194,8 +194,8 @@ importers: specifier: 2.0.0 version: 2.0.0(@babel/core@7.26.9) ember-cli: - specifier: ^4.10.0 - version: 4.12.3(handlebars@4.7.8)(underscore@1.13.7) + specifier: ^6.2.0 + version: 6.2.2(handlebars@4.7.8)(underscore@1.13.7) ember-cli-blueprint-test-helpers: specifier: ^0.19.2 version: 0.19.2 @@ -204,7 +204,7 @@ importers: version: 2.1.0 ember-cli-dependency-checker: specifier: ^3.3.1 - version: 3.3.3(ember-cli@4.12.3(handlebars@4.7.8)(underscore@1.13.7)) + version: 3.3.3(ember-cli@6.2.2(handlebars@4.7.8)(underscore@1.13.7)) ember-cli-yuidoc: specifier: ^0.9.1 version: 0.9.1 @@ -4366,12 +4366,6 @@ packages: resolution: {integrity: sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==} engines: {node: '>= 0.4'} - array-to-error@1.1.1: - resolution: {integrity: sha512-kqcQ8s7uQfg3UViYON3kCMcck3A9exxgq+riVuKy08Mx00VN4EJhK30L2VpjE58LQHKhcE/GRpvbVUhqTvqzGQ==} - - array-to-sentence@1.1.0: - resolution: {integrity: sha512-YkwkMmPA2+GSGvXj1s9NZ6cc2LBtR+uSeWTy2IGi5MR1Wag4DdrcjTxA/YV/Fw+qKlBeXomneZgThEbm/wvZbw==} - array-union@2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} @@ -4552,10 +4546,6 @@ packages: resolution: {integrity: sha512-tjR0GvSndzPew/Iayf4uICWZqjBwnlMWjSx6brryfQ81F9rxBVqwDJtFCV8oOs0+vJeefK9TmdZtkIFdFe1UnA==} engines: {node: '>= 6.0.0'} - babel-plugin-module-resolver@4.1.0: - resolution: {integrity: sha512-MlX10UDheRr3lb3P0WcaIdtCSRlxdQsB1sBqL7W0raF070bGl1HQQq5K3T2vf2XAYie+ww+5AKC/WrkjRO2knA==} - engines: {node: '>= 8.0.0'} - babel-plugin-module-resolver@5.0.2: resolution: {integrity: sha512-9KtaCazHee2xc0ibfqsDeamwDps6FZNo5S0Q81dUqEuFzVwPhcT4J5jOqIVvgCA3Q/wO9hKYxN/Ds3tIsp5ygg==} @@ -4582,6 +4572,9 @@ packages: babel-plugin-syntax-dynamic-import@6.18.0: resolution: {integrity: sha512-MioUE+LfjCEz65Wf7Z/Rm4XCP5k2c+TbMd2Z2JKc7U9uwjBhAfNPE48KC4GTGKhppMeYVepwDBNO/nGY6NYHBA==} + babel-remove-types@1.0.1: + resolution: {integrity: sha512-au+oEGwCCxqb8R0x8EwccTVtWCP4lFkNpHV5skNZnNCwvar3DBBkmGZbx2B1A3RaCHVLQrxF6qv6rR/ZDRPW+A==} + babylon@6.18.0: resolution: {integrity: sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==} hasBin: true @@ -4685,14 +4678,6 @@ packages: engines: {node: '>=0.8.0'} deprecated: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). - bower-config@1.4.3: - resolution: {integrity: sha512-MVyyUk3d1S7d2cl6YISViwJBc2VXCkxF5AUFykvN0PQj5FsUiMNSgAYTso18oRFfyZ6XEtjrgg9MAaufHbOwNw==} - engines: {node: '>=0.8.0'} - - bower-endpoint-parser@0.2.2: - resolution: {integrity: sha512-YWZHhWkPdXtIfH3VRu3QIV95sa75O9vrQWBOHjexWCLBCTy5qJvRr36LXTqFwTchSXVlzy5piYJOjzHr7qhsNg==} - engines: {node: '>=0.8.0'} - bowser@2.11.0: resolution: {integrity: sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==} @@ -4714,10 +4699,6 @@ packages: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} - broccoli-amd-funnel@2.0.1: - resolution: {integrity: sha512-VRE+0PYAN4jQfkIq3GKRj4U/4UV9rVpLan5ll6fVYV4ziVg4OEfR5GUnILEg++QtR4xSaugRxCPU5XJLDy3bNQ==} - engines: {node: '>=6'} - broccoli-asset-rev@3.0.0: resolution: {integrity: sha512-gAHQZnwvtl74tGevUqGuWoyOdJUdMMv0TjGSMzbdyGImr9fZcnM6xmggDA8bUawrMto9NFi00ZtNUgA4dQiUBw==} @@ -4747,9 +4728,6 @@ packages: broccoli-caching-writer@3.0.3: resolution: {integrity: sha512-g644Kb5uBPsy+6e2DvO3sOc+/cXZQQNgQt64QQzjA9TSdP0dl5qvetpoNIx4sy/XIjrPYG1smEidq9Z9r61INw==} - broccoli-clean-css@1.1.0: - resolution: {integrity: sha512-S7/RWWX+lL42aGc5+fXVLnwDdMtS0QEWUFalDp03gJ9Na7zj1rWa351N2HZ687E2crM9g+eDWXKzD17cbcTepg==} - broccoli-concat@4.2.5: resolution: {integrity: sha512-dFB5ATPwOyV8S2I7a07HxCoutoq23oY//LhM6Mou86cWUTB174rND5aQLR7Fu8FjFFLxoTbkk7y0VPITJ1IQrw==} engines: {node: 10.* || >= 12.*} @@ -5049,14 +5027,6 @@ packages: clean-base-url@1.0.0: resolution: {integrity: sha512-9q6ZvUAhbKOSRFY7A/irCQ/rF0KIpa3uXpx6izm8+fp7b2H4hLeUJ+F1YYk9+gDQ/X8Q0MEyYs+tG3cht//HTg==} - clean-css-promise@0.1.1: - resolution: {integrity: sha512-tzWkANXMD70ETa/wAu2TXAAxYWS0ZjVUFM2dVik8RQBoAbGMFJv4iVluz3RpcoEbo++fX4RV/BXfgGoOjp8o3Q==} - - clean-css@3.4.28: - resolution: {integrity: sha512-aTWyttSdI2mYi07kWqHi24NUU9YlELFKGOAgFzZjDN1064DMAOy2FBuoyGmkKRlXkbpXd0EVHmiVkbKhKoirTw==} - engines: {node: '>=0.10.0'} - hasBin: true - clean-stack@2.2.0: resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} engines: {node: '>=6'} @@ -5172,10 +5142,6 @@ packages: commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} - commander@2.8.1: - resolution: {integrity: sha512-+pJLBFVk+9ZZdlAOB5WuIElVPPth47hILFkmGym57aq8kwxsowvByvB0DHs1vQAhyMZzdcpTtF0VDKGkSDR4ZQ==} - engines: {node: '>= 0.6.x'} - commander@4.1.1: resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} engines: {node: '>= 6'} @@ -5676,6 +5642,10 @@ packages: resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} engines: {node: '>=8'} + detect-indent@7.0.1: + resolution: {integrity: sha512-Mc7QhQ8s+cLrnUfU/Ji94vG/r8M26m8f++vyres4ZoojaRDpZ1eSIh/EpzLNwlWuvzSZ3UbDFspjFvTDXe6e/g==} + engines: {node: '>=12.20'} + detect-libc@2.0.3: resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} engines: {node: '>=8'} @@ -5684,6 +5654,10 @@ packages: resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} engines: {node: '>=8'} + detect-newline@4.0.1: + resolution: {integrity: sha512-qE3Veg1YXzGHQhlA6jzebZN2qVf6NX+A7m7qlhCGG30dJixrAQhYOsJjsnBjJkCSmuOPpCk30145fr8FV0bzog==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + devtools-protocol@0.0.1402036: resolution: {integrity: sha512-JwAYQgEvm3yD45CHB+RmF5kMbWtXBaOGwuxa87sZogHcLCv8c/IqnThaoQ1y60d7pXWjSKWQphPEc+1rAScVdg==} @@ -5807,9 +5781,6 @@ packages: ember-cli-path-utils@1.0.0: resolution: {integrity: sha512-Qq0vvquzf4cFHoDZavzkOy3Izc893r/5spspWgyzLCPTaG78fM3HsrjZm7UWEltbXUqwHHYrqZd/R0jS08NqSA==} - ember-cli-preprocess-registry@3.3.0: - resolution: {integrity: sha512-60GYpw7VPeB7TvzTLZTuLTlHdOXvayxjAQ+IxM2T04Xkfyu75O2ItbWlftQW7NZVGkaCsXSRAmn22PG03VpLMA==} - ember-cli-preprocess-registry@5.0.1: resolution: {integrity: sha512-Jb2zbE5Kfe56Nf4IpdaQ10zZ72p/RyLdgE5j5/lKG3I94QHlq+7AkAd18nPpb5OUeRUT13yQTAYpU+MbjpKTtg==} engines: {node: 16.* || >= 18} @@ -5855,16 +5826,16 @@ packages: resolution: {integrity: sha512-4pb3OKXhHCeUux6a7SDKziLDWdDciJwzmUld3Fumt60RLcH/nIk5lPdI0o+UXJ9NfP+WcSvvpWWroFmWqWAWWA==} engines: {node: '>= 4.0.0'} - ember-cli@4.12.3: - resolution: {integrity: sha512-Ilap7fVGx0+sF6y5O1id+xVPYlc2cJ8OAG6faEQPyvbaCCUsCZnAEr7EMA+5qg0kNqjawIIHJTgnQesdbaDwtg==} - engines: {node: '>= 14'} - hasBin: true - ember-cli@5.7.0: resolution: {integrity: sha512-MKHVcRpDk1ENUCCRGGqZ8yfkCsszvSUbwO09h14vqcfaqcJkOWI+p0oynmdZQMM8OkZp484oLe3+CZCsXO9LfA==} engines: {node: '>= 18'} hasBin: true + ember-cli@6.2.2: + resolution: {integrity: sha512-PJNJ3Ib1IP85NJlw/AdzX76ZIDcyAAFJfDz/wFJQ+hqTFNWsjVjXl20X3ePQkKfZZlF421EC5nsLBOwbHqsh9g==} + engines: {node: '>= 18'} + hasBin: true + ember-data@5.3.11: resolution: {integrity: sha512-AXoEHbQ6jqScoSk63h+ayghn3f+kxwP4S7SjmnY6/uCvOGnLw7eGqmEYXuAYVNVfLu30OmaTToydsh/vKbxeFA==} engines: {node: '>= 18.20.4'} @@ -6411,6 +6382,14 @@ packages: fd-slicer@1.1.0: resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} + fdir@6.4.3: + resolution: {integrity: sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + figures@2.0.0: resolution: {integrity: sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==} engines: {node: '>=4'} @@ -6716,6 +6695,9 @@ packages: git-hooks-list@1.0.3: resolution: {integrity: sha512-Y7wLWcrLUXwk2noSka166byGCvhMtDRpgHdzCno1UQv/n/Hegp++a2xBWJL1lJarnKD3SWaljD+0z1ztqxuKyQ==} + git-hooks-list@3.2.0: + resolution: {integrity: sha512-ZHG9a1gEhUMX1TvGrLdyWb9kDopCBbTnI8z4JgRMYxsijWipgjSEYoPWqBuIB0DnRnvqlQSEeVmzpeuPm7NdFQ==} + git-repo-info@1.4.1: resolution: {integrity: sha512-oqzBH6cNvE8Cq3p61ps4m0POZrVMKlARntc2BxLnuqTK+HeWpKfUMJQ7H1CvescHRINj+0a7TKA+Pp/bOq5F1Q==} @@ -6823,9 +6805,6 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - graceful-readlink@1.0.1: - resolution: {integrity: sha512-8tLu60LgxF6XpdbK8OW3FA+IfTNBn1ZHGHKF4KQbEeSkajYw5PlYJcKluntgegDPTg8UkHjpet1T82vk6TQ68w==} - graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} @@ -6949,6 +6928,10 @@ packages: resolution: {integrity: sha512-HVJyzUrLIL1c0QmviVh5E8VGyUS7xCFPS6yydaVd1UegW+ibV/CohqTH9MkOLDp5o+rb82DMo77PTuc9F/8GKw==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + hosted-git-info@8.0.2: + resolution: {integrity: sha512-sYKnA7eGln5ov8T8gnYlkSOxFJvywzEx9BueN6xo/GKO8PGiI6uK6xx+DIGe45T3bdVjLAQDQW1aicT8z8JwQg==} + engines: {node: ^18.17.0 || >=20.5.0} + html-differ@1.4.0: resolution: {integrity: sha512-7kW2niHCIVOsRaligGdwV4B44YsVxKrOaRNec+u7Ab2r1sBziXcaWxWJ5lj0apIGaTZprprQAg2t2SUkGoPaUw==} engines: {node: '>=0.8.0', npm: '>=1.2.10'} @@ -7083,10 +7066,6 @@ packages: resolution: {integrity: sha512-it4HyVAUTKBc6m8e1iXWvXSTdndF7HbdN713+kvLrymxTaU4AUBWrJ4vEooP+V7fexnVD3LKcBshjGGPefSMUQ==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} - inline-source-map-comment@1.0.5: - resolution: {integrity: sha512-a3/m6XgooVCXkZCduOb7pkuvUtNKt4DaqaggKKJrMQHQsqt6JcJXEreExeZiiK4vWL/cM/uF6+chH05pz2/TdQ==} - hasBin: true - inquirer@6.5.2: resolution: {integrity: sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==} engines: {node: '>=6.0.0'} @@ -7095,10 +7074,6 @@ packages: resolution: {integrity: sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==} engines: {node: '>=8.0.0'} - inquirer@8.2.6: - resolution: {integrity: sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==} - engines: {node: '>=12.0.0'} - inquirer@9.3.7: resolution: {integrity: sha512-LJKFHCSeIRq9hanN14IlOtPSTe3lNES7TYDTE2xxdAy1LS5rYphajK1qtwvj3YmQXvvk0U2Vbmcni8P9EIQW9w==} engines: {node: '>=18'} @@ -7265,6 +7240,10 @@ packages: resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} engines: {node: '>=8'} + is-plain-obj@4.1.0: + resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} + engines: {node: '>=12'} + is-plain-object@2.0.4: resolution: {integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==} engines: {node: '>=0.10.0'} @@ -7512,9 +7491,6 @@ packages: resolution: {integrity: sha512-M6T051+5QCGLBQb8id3hdvIW8+zeFV2FyBGFS9IEK5H9Wt4MueD4bW1eWikpHgZp+5xR3l5c8pZUkQsIA0BFZg==} engines: {node: '>=8'} - leek@0.0.24: - resolution: {integrity: sha512-6PVFIYXxlYF0o6hrAsHtGpTmi06otkwNrMcmQ0K96SeSRHPREPa9J3nJZ1frliVH7XT0XFswoJFQoXsDukzGNQ==} - levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} @@ -7577,21 +7553,9 @@ packages: resolution: {integrity: sha512-2voC/VK0CVYUYOpA91EsHiTuPbJUbuaLlykWHK3skyCba+Ps6e+LqjY06UEhan6y7jB2Oz1oaFFifJrg18vO1w==} deprecated: This package is discontinued. Use lodash@^4.0.0. - lodash._baseassign@3.2.0: - resolution: {integrity: sha512-t3N26QR2IdSN+gqSy9Ds9pBu/J1EAFEshKlUHpJG3rvyJOYgcELIxcIeKKfZk7sjOz11cFfzJRsyFry/JyabJQ==} - - lodash._basecopy@3.0.1: - resolution: {integrity: sha512-rFR6Vpm4HeCK1WPGvjZSJ+7yik8d8PVUdCJx5rT2pogG4Ve/2ZS7kfmO5l5T2o5V2mqlNIfSF5MZlr1+xOoYQQ==} - lodash._baseflatten@3.1.4: resolution: {integrity: sha512-fESngZd+X4k+GbTxdMutf8ohQa0s3sJEHIcwtu4/LsIQ2JTDzdRxDCMQjW+ezzwRitLmHnacVVmosCbxifefbw==} - lodash._bindcallback@3.0.1: - resolution: {integrity: sha512-2wlI0JRAGX8WEf4Gm1p/mv/SZ+jLijpj0jyaE/AXeuQphzCgD8ZQW4oSpoN8JAopujOFGU3KMuq7qfHBWlGpjQ==} - - lodash._createassigner@3.1.1: - resolution: {integrity: sha512-LziVL7IDnJjQeeV95Wvhw6G28Z8Q6da87LWKOPWmzBLv4u6FAT/x5v00pyGW0u38UoogNF2JnD3bGgZZDaNEBw==} - lodash._getnative@3.9.1: resolution: {integrity: sha512-RrL9VxMEPyDMHOd9uFbvMe8X55X16/cGM5IgOKgRElQZutpX89iS6vwl64duTV1/16w5JY7tuFNXqoekmh1EmA==} @@ -7601,9 +7565,6 @@ packages: lodash._reinterpolate@3.0.0: resolution: {integrity: sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA==} - lodash.assign@3.2.0: - resolution: {integrity: sha512-/VVxzgGBmbphasTg51FrztxQJ/VgAUpol6zmJuSVSGcNg4g7FA4z7rQV8Ovr9V3vFBNWZhvKWHfpAytjTVUfFA==} - lodash.camelcase@4.3.0: resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} @@ -7631,9 +7592,6 @@ packages: lodash.kebabcase@4.1.1: resolution: {integrity: sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==} - lodash.keys@3.1.2: - resolution: {integrity: sha512-CuBsapFjcubOGMn3VD+24HOAPxM79tH+V6ivJL3CHYjtrawauDJHUk//Yew9Hvc6e9rbCrURGk8z6PC+8WJBfQ==} - lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} @@ -7641,9 +7599,6 @@ packages: resolution: {integrity: sha512-XeqSp49hNGmlkj2EJlfrQFIzQ6lXdNro9sddtQzcJY8QaoC2GO0DT7xaIokHeyM+mIT0mPMlPvkYzg2xCuHdZg==} deprecated: This package is deprecated. Use destructuring assignment syntax instead. - lodash.restparam@3.6.1: - resolution: {integrity: sha512-L4/arjjuq4noiUJpt3yS6KIKDtJwNe2fIYgMqyYYKoeIfV1iEqvPwhCx23o+R9dzouGihDAPN1dTIRWa7zk8tw==} - lodash.template@4.5.0: resolution: {integrity: sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==} deprecated: This package is deprecated. Use https://socket.dev/npm/package/eta instead. @@ -7886,9 +7841,6 @@ packages: resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} engines: {node: '>= 6'} - minimist@0.2.4: - resolution: {integrity: sha512-Pkrrm8NjyQ8yVt8Am9M+yUt74zE3iokhzbG1bFVNjLB92vwM71hf40RkEsryg98BujhVOncKm/C1xROxZ030LQ==} - minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} @@ -7941,9 +7893,6 @@ packages: resolution: {integrity: sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==} engines: {node: '>= 0.8.0'} - mout@1.2.4: - resolution: {integrity: sha512-mZb9uOruMWgn/fw28DG4/yE3Kehfk1zKCLhuDU2O3vlKdnBBr4XaOCqVTflJ5aODavGUPqFHZgrFX3NJVuxGhQ==} - ms@2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} @@ -8005,9 +7954,6 @@ packages: node-int64@0.4.0: resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} - node-modules-path@1.0.2: - resolution: {integrity: sha512-6Gbjq+d7uhkO7epaKi5DNgUJn7H0gEyA4Jg0Mo1uQOi3Rk50G83LtmhhFyw0LxnAFhtlspkiiw52ISP13qzcBg==} - node-notifier@10.0.1: resolution: {integrity: sha512-YX7TSyDukOZ0g+gmzjB6abKu+hTGvO8+8+gIFDsRCU2t8fLV/P2unmt+LGFaIa4y64aX98Qksa97rgz4vMNeLQ==} @@ -8065,6 +8011,10 @@ packages: resolution: {integrity: sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + npm-package-arg@12.0.2: + resolution: {integrity: sha512-f1NpFjNI9O4VbKMOlA5QoBq/vSQPORHcTZ2feJpFkTHJ9eQkdlmZEKSjcAhxTGInC7RlEyScT9ui67NaOsjFWA==} + engines: {node: ^18.17.0 || >=20.5.0} + npm-packlist@5.1.3: resolution: {integrity: sha512-263/0NGrn32YFYi4J533qzrQ/krmmrWwhKkzwTuM4f/07ug51odoaNjUexxO4vxlzURHcmYMH1QjvHjsNDKLVg==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} @@ -8431,14 +8381,6 @@ packages: resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==} engines: {node: '>=4'} - pinkie-promise@2.0.1: - resolution: {integrity: sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==} - engines: {node: '>=0.10.0'} - - pinkie@2.0.4: - resolution: {integrity: sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==} - engines: {node: '>=0.10.0'} - pirates@4.0.6: resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} engines: {node: '>= 6'} @@ -8559,8 +8501,9 @@ packages: resolution: {integrity: sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - process-relative-require@1.0.0: - resolution: {integrity: sha512-r8G5WJPozMJAiv8sDdVWKgJ4In/zBXqwJdMCGAXQt2Kd3HdbAuJVzWYM4JW150hWoaI9DjhtbjcsCCHIMxm8RA==} + proc-log@5.0.0: + resolution: {integrity: sha512-Azwzvl90HaF0aCz1JrDdXQykFakSSNPaPoiZ9fm5qJIMHioDZEi7OAdRwSm6rSoPtY3Qutnm3L7ogmg3dc+wbQ==} + engines: {node: ^18.17.0 || >=20.5.0} progress@2.0.3: resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==} @@ -9208,6 +9151,10 @@ packages: resolution: {integrity: sha512-FYsjYn2dHTRb41wqnv+uEqCUvBpK3jZcTp9rbz2qDTmel7Pmdtf+i2rLaaPMRZeSVM60V3Se31GyWFpmKs4Q5Q==} hasBin: true + sort-package-json@2.15.0: + resolution: {integrity: sha512-wpKu3DvFuymcRvPqJR7VN5J6wnqR+SYZ4SZmnJa9ckpV+BuoE0XYHZYsoWaJbt6oz8OwOXb4eoMjlEBM6hwhBw==} + hasBin: true + source-map-js@1.2.1: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} @@ -9415,9 +9362,6 @@ packages: styled_string@0.0.1: resolution: {integrity: sha512-DU2KZiB6VbPkO2tGSqQ9n96ZstUPjW7X4sGO6V2m1myIQluX0p1Ol8BrA/l6/EesqhMqXOIXs3cJNOy1UuU2BA==} - sum-up@1.0.3: - resolution: {integrity: sha512-zw5P8gnhiqokJUWRdR6F4kIIIke0+ubQSGyYUY506GCbJWtV7F6Xuy0j6S125eSX2oF+a8KdivsZ8PlVEH0Mcw==} - supports-color@1.3.1: resolution: {integrity: sha512-OHbMkscHFRcNWEcW80fYhCrzAjheSIBwJChpFaBqA6zEz53nxumqi6ukciRb/UA0/v2nDNMk28ce/uBbYRDsng==} engines: {node: '>=0.8.0'} @@ -9552,6 +9496,10 @@ packages: tiny-lr@2.0.0: resolution: {integrity: sha512-f6nh0VMRvhGx4KCeK1lQ/jaL0Zdb5WdR+Jk8q9OSUQnaSDxAEGH1fgqLZ+cMl5EW3F2MGnCsalBO1IsnnogW1Q==} + tinyglobby@0.2.12: + resolution: {integrity: sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==} + engines: {node: '>=12.0.0'} + tldts-core@6.1.78: resolution: {integrity: sha512-jS0svNsB99jR6AJBmfmEWuKIgz91Haya91Z43PATaeHJ24BkMoNRb/jlaD37VYjb0mYf6gRL/HOnvS1zEnYBiw==} @@ -9803,10 +9751,6 @@ packages: resolution: {integrity: sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==} engines: {node: '>=0.10.0'} - untildify@2.1.0: - resolution: {integrity: sha512-sJjbDp2GodvkB0FZZcn7k6afVisqX5BZD7Yq3xp4nN2O15BBK0cLm3Vwn2vQaF7UDS0UUsrQMkkplmDI5fskig==} - engines: {node: '>=0.10.0'} - upath@2.0.1: resolution: {integrity: sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w==} engines: {node: '>=4'} @@ -9871,6 +9815,10 @@ packages: resolution: {integrity: sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + validate-npm-package-name@6.0.0: + resolution: {integrity: sha512-d7KLgL1LD3U3fgnvWEY1cQXoO/q6EQ1BSz48Sa149V/5zVTAbgmZIpyI8TRi6U9/JNyeYLlTKsEMPtLC27RFUg==} + engines: {node: ^18.17.0 || >=20.5.0} + validate-peer-dependencies@1.2.0: resolution: {integrity: sha512-nd2HUpKc6RWblPZQ2GDuI65sxJ2n/UqZwSBVtj64xlWjMx0m7ZB2m9b2JS3v1f+n9VWH/dd1CMhkHfP6pIdckA==} @@ -10044,10 +9992,6 @@ packages: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} engines: {node: '>=0.10.0'} - wordwrap@0.0.3: - resolution: {integrity: sha512-1tMA907+V4QmxV7dbRvb4/8MaRALK6q9Abid3ndMYnbyo8piisCmeONVqVSXqQA3KaP4SLt5b7ud6E2sqP8TFw==} - engines: {node: '>=0.4.0'} - wordwrap@1.0.0: resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} @@ -10057,6 +10001,9 @@ packages: workerpool@6.5.1: resolution: {integrity: sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==} + workerpool@9.2.0: + resolution: {integrity: sha512-PKZqBOCo6CYkVOwAxWxQaSF2Fvb5Iv2fCeTP7buyWI2GiynWr46NcXSgK/idoV6e60dgCBfgYc+Un3HMvmqP8w==} + wrap-ansi@6.2.0: resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} engines: {node: '>=8'} @@ -10118,10 +10065,6 @@ packages: xmlchars@2.2.0: resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} - xtend@4.0.2: - resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} - engines: {node: '>=0.4'} - y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} @@ -13715,12 +13658,6 @@ snapshots: get-intrinsic: 1.3.0 is-string: 1.1.1 - array-to-error@1.1.1: - dependencies: - array-to-sentence: 1.1.0 - - array-to-sentence@1.1.0: {} - array-union@2.1.0: {} array-unique@0.3.2: {} @@ -13947,14 +13884,6 @@ snapshots: reselect: 3.0.1 resolve: 1.22.10 - babel-plugin-module-resolver@4.1.0: - dependencies: - find-babel-config: 1.2.2 - glob: 7.2.3 - pkg-up: 3.1.0 - reselect: 4.1.8 - resolve: 1.22.10 - babel-plugin-module-resolver@5.0.2: dependencies: find-babel-config: 2.1.2 @@ -13997,6 +13926,15 @@ snapshots: babel-plugin-syntax-dynamic-import@6.18.0: {} + babel-remove-types@1.0.1: + dependencies: + '@babel/core': 7.26.9(supports-color@8.1.1) + '@babel/plugin-syntax-decorators': 7.25.9(@babel/core@7.26.9) + '@babel/plugin-transform-typescript': 7.26.8(@babel/core@7.26.9) + prettier: 2.8.8 + transitivePeerDependencies: + - supports-color + babylon@6.18.0: {} backbone@1.6.0: @@ -14119,17 +14057,6 @@ snapshots: hoek: 0.9.1 optional: true - bower-config@1.4.3: - dependencies: - graceful-fs: 4.2.11 - minimist: 0.2.4 - mout: 1.2.4 - osenv: 0.1.5 - untildify: 2.1.0 - wordwrap: 0.0.3 - - bower-endpoint-parser@0.2.2: {} - bowser@2.11.0: {} boxen@5.1.2: @@ -14171,11 +14098,6 @@ snapshots: dependencies: fill-range: 7.1.1 - broccoli-amd-funnel@2.0.1: - dependencies: - broccoli-plugin: 1.3.1 - symlink-or-copy: 1.3.1 - broccoli-asset-rev@3.0.0: dependencies: broccoli-asset-rewrite: 2.0.0 @@ -14271,15 +14193,6 @@ snapshots: transitivePeerDependencies: - supports-color - broccoli-clean-css@1.1.0: - dependencies: - broccoli-persistent-filter: 1.4.6 - clean-css-promise: 0.1.1 - inline-source-map-comment: 1.0.5 - json-stable-stringify: 1.2.1 - transitivePeerDependencies: - - supports-color - broccoli-concat@4.2.5: dependencies: broccoli-debug: 0.6.5 @@ -14826,17 +14739,6 @@ snapshots: clean-base-url@1.0.0: {} - clean-css-promise@0.1.1: - dependencies: - array-to-error: 1.1.1 - clean-css: 3.4.28 - pinkie-promise: 2.0.1 - - clean-css@3.4.28: - dependencies: - commander: 2.8.1 - source-map: 0.4.4 - clean-stack@2.2.0: {} clean-up-path@1.0.0: {} @@ -14937,10 +14839,6 @@ snapshots: commander@2.20.3: {} - commander@2.8.1: - dependencies: - graceful-readlink: 1.0.1 - commander@4.1.1: {} commander@7.2.0: {} @@ -15279,10 +15177,14 @@ snapshots: detect-indent@6.1.0: {} + detect-indent@7.0.1: {} + detect-libc@2.0.3: {} detect-newline@3.1.0: {} + detect-newline@4.0.1: {} + devtools-protocol@0.0.1402036: {} diff@1.0.8: {} @@ -15477,19 +15379,19 @@ snapshots: transitivePeerDependencies: - supports-color - ember-cli-dependency-checker@3.3.3(ember-cli@4.12.3(handlebars@4.7.8)(underscore@1.13.7)): + ember-cli-dependency-checker@3.3.3(ember-cli@5.7.0): dependencies: chalk: 2.4.2 - ember-cli: 4.12.3(handlebars@4.7.8)(underscore@1.13.7) + ember-cli: 5.7.0 find-yarn-workspace-root: 2.0.0 is-git-url: 1.0.0 resolve: 1.22.10 semver: 5.7.2 - ember-cli-dependency-checker@3.3.3(ember-cli@5.7.0): + ember-cli-dependency-checker@3.3.3(ember-cli@6.2.2(handlebars@4.7.8)(underscore@1.13.7)): dependencies: chalk: 2.4.2 - ember-cli: 5.7.0 + ember-cli: 6.2.2(handlebars@4.7.8)(underscore@1.13.7) find-yarn-workspace-root: 2.0.0 is-git-url: 1.0.0 resolve: 1.22.10 @@ -15550,15 +15452,6 @@ snapshots: ember-cli-path-utils@1.0.0: {} - ember-cli-preprocess-registry@3.3.0: - dependencies: - broccoli-clean-css: 1.1.0 - broccoli-funnel: 2.0.2 - debug: 3.2.7 - process-relative-require: 1.0.0 - transitivePeerDependencies: - - supports-color - ember-cli-preprocess-registry@5.0.1: dependencies: broccoli-funnel: 3.0.8 @@ -15646,17 +15539,10 @@ snapshots: transitivePeerDependencies: - supports-color - ember-cli@4.12.3(handlebars@4.7.8)(underscore@1.13.7): + ember-cli@5.7.0: dependencies: - '@babel/core': 7.26.9(supports-color@8.1.1) - '@babel/plugin-transform-modules-amd': 7.25.9(@babel/core@7.26.9)(supports-color@8.1.1) - amd-name-resolver: 1.3.1 - babel-plugin-module-resolver: 4.1.0 - bower-config: 1.4.3 - bower-endpoint-parser: 0.2.2 + '@pnpm/find-workspace-dir': 6.0.3 broccoli: 3.5.2 - broccoli-amd-funnel: 2.0.1 - broccoli-babel-transpiler: 7.8.1 broccoli-builder: 0.18.14 broccoli-concat: 4.2.5 broccoli-config-loader: 1.0.1 @@ -15683,8 +15569,9 @@ snapshots: 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-preprocess-registry: 5.0.1 ember-cli-string-utils: 1.1.0 + ember-template-tag: 2.3.16 ensure-posix-path: 1.1.1 execa: 5.1.1 exit: 0.1.2 @@ -15704,13 +15591,11 @@ snapshots: heimdalljs-logger: 0.1.10 http-proxy: 1.18.1 inflection: 2.0.1 - inquirer: 8.2.6 + inquirer: 9.3.7 is-git-url: 1.0.0 is-language-code: 3.1.0 isbinaryfile: 5.0.4 - js-yaml: 4.1.0 - leek: 0.0.24 - lodash: 4.17.21 + lodash.template: 4.5.0 markdown-it: 13.0.2 markdown-it-terminal: 0.4.0(markdown-it@13.0.2) minimatch: 7.4.6 @@ -15736,7 +15621,6 @@ snapshots: testem: 3.15.2(handlebars@4.7.8)(underscore@1.13.7) tiny-lr: 2.0.0 tree-sync: 2.1.0 - uuid: 9.0.1 walk-sync: 3.0.0 watch-detector: 1.0.2 workerpool: 6.5.1 @@ -15798,9 +15682,10 @@ snapshots: - walrus - whiskers - ember-cli@5.7.0: + ember-cli@6.2.2(handlebars@4.7.8)(underscore@1.13.7): dependencies: - '@pnpm/find-workspace-dir': 6.0.3 + '@pnpm/find-workspace-dir': 7.0.3 + babel-remove-types: 1.0.1 broccoli: 3.5.2 broccoli-builder: 0.18.14 broccoli-concat: 4.2.5 @@ -15817,20 +15702,19 @@ snapshots: calculate-cache-key-for-tree: 2.0.0 capture-exit: 2.0.0 chalk: 4.1.2 - ci-info: 3.9.0 + ci-info: 4.1.0 clean-base-url: 1.0.0 compression: 1.8.0 configstore: 5.0.1 console-ui: 3.1.2 + content-tag: 2.0.3 core-object: 3.1.5 dag-map: 2.0.2 diff: 5.2.0 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: 5.0.1 ember-cli-string-utils: 1.1.0 - ember-template-tag: 2.3.16 ensure-posix-path: 1.1.1 execa: 5.1.1 exit: 0.1.2 @@ -15854,27 +15738,26 @@ snapshots: is-git-url: 1.0.0 is-language-code: 3.1.0 isbinaryfile: 5.0.4 - lodash.template: 4.5.0 + lodash: 4.17.21 markdown-it: 13.0.2 markdown-it-terminal: 0.4.0(markdown-it@13.0.2) minimatch: 7.4.6 morgan: 1.10.0 nopt: 3.0.6 - npm-package-arg: 10.1.0 + npm-package-arg: 12.0.2 os-locale: 5.0.0 p-defer: 3.0.0 portfinder: 1.0.32 promise-map-series: 0.3.0 promise.hash.helper: 1.0.8 quick-temp: 0.1.8 - remove-types: 1.0.0 resolve: 1.22.10 resolve-package-path: 4.0.3 safe-stable-stringify: 2.5.0 sane: 5.0.1 semver: 7.7.1 silent-error: 1.1.1 - sort-package-json: 1.57.0 + sort-package-json: 2.15.0 symlink-or-copy: 1.3.1 temp: 0.9.4 testem: 3.15.2(handlebars@4.7.8)(underscore@1.13.7) @@ -15882,7 +15765,7 @@ snapshots: tree-sync: 2.1.0 walk-sync: 3.0.0 watch-detector: 1.0.2 - workerpool: 6.5.1 + workerpool: 9.2.0 yam: 1.0.0 transitivePeerDependencies: - arc-templates @@ -16798,6 +16681,10 @@ snapshots: dependencies: pend: 1.2.0 + fdir@6.4.3(picomatch@4.0.2): + optionalDependencies: + picomatch: 4.0.2 + figures@2.0.0: dependencies: escape-string-regexp: 1.0.5 @@ -17226,6 +17113,8 @@ snapshots: git-hooks-list@1.0.3: {} + git-hooks-list@3.2.0: {} + git-repo-info@1.4.1: {} git-repo-info@2.1.1: {} @@ -17366,8 +17255,6 @@ snapshots: graceful-fs@4.2.11: {} - graceful-readlink@1.0.1: {} - graphemer@1.4.0: {} growly@1.3.0: {} @@ -17502,6 +17389,10 @@ snapshots: dependencies: lru-cache: 7.18.3 + hosted-git-info@8.0.2: + dependencies: + lru-cache: 10.4.3 + html-differ@1.4.0: dependencies: chalk: 1.0.0 @@ -17638,14 +17529,6 @@ snapshots: ini@3.0.1: {} - inline-source-map-comment@1.0.5: - dependencies: - chalk: 1.1.3 - get-stdin: 4.0.1 - minimist: 1.2.8 - sum-up: 1.0.3 - xtend: 4.0.2 - inquirer@6.5.2: dependencies: ansi-escapes: 3.2.0 @@ -17678,24 +17561,6 @@ snapshots: strip-ansi: 6.0.1 through: 2.3.8 - inquirer@8.2.6: - dependencies: - ansi-escapes: 4.3.2 - chalk: 4.1.2 - cli-cursor: 3.1.0 - cli-width: 3.0.0 - external-editor: 3.1.0 - figures: 3.2.0 - lodash: 4.17.21 - mute-stream: 0.0.8 - ora: 5.4.1 - run-async: 2.4.1 - rxjs: 7.8.2 - string-width: 4.2.3 - strip-ansi: 6.0.1 - through: 2.3.8 - wrap-ansi: 6.2.0 - inquirer@9.3.7: dependencies: '@inquirer/figures': 1.0.10 @@ -17860,6 +17725,8 @@ snapshots: is-plain-obj@2.1.0: {} + is-plain-obj@4.1.0: {} + is-plain-object@2.0.4: dependencies: isobject: 3.0.1 @@ -18096,14 +17963,6 @@ snapshots: dependencies: invert-kv: 3.0.1 - leek@0.0.24: - dependencies: - debug: 2.6.9 - lodash.assign: 3.2.0 - rsvp: 3.6.2 - transitivePeerDependencies: - - supports-color - levn@0.4.1: dependencies: prelude-ls: 1.2.1 @@ -18174,38 +18033,17 @@ snapshots: lodash-node@3.10.2: {} - lodash._baseassign@3.2.0: - dependencies: - lodash._basecopy: 3.0.1 - lodash.keys: 3.1.2 - - lodash._basecopy@3.0.1: {} - lodash._baseflatten@3.1.4: dependencies: lodash.isarguments: 3.1.0 lodash.isarray: 3.0.4 - lodash._bindcallback@3.0.1: {} - - lodash._createassigner@3.1.1: - dependencies: - lodash._bindcallback: 3.0.1 - lodash._isiterateecall: 3.0.9 - lodash.restparam: 3.6.1 - lodash._getnative@3.9.1: {} lodash._isiterateecall@3.0.9: {} lodash._reinterpolate@3.0.0: {} - lodash.assign@3.2.0: - dependencies: - lodash._baseassign: 3.2.0 - lodash._createassigner: 3.1.1 - lodash.keys: 3.1.2 - lodash.camelcase@4.3.0: {} lodash.clonedeep@4.5.0: {} @@ -18229,18 +18067,10 @@ snapshots: lodash.kebabcase@4.1.1: {} - lodash.keys@3.1.2: - dependencies: - lodash._getnative: 3.9.1 - lodash.isarguments: 3.1.0 - lodash.isarray: 3.0.4 - lodash.merge@4.6.2: {} lodash.omit@4.5.0: {} - lodash.restparam@3.6.1: {} - lodash.template@4.5.0: dependencies: lodash._reinterpolate: 3.0.0 @@ -18495,8 +18325,6 @@ snapshots: is-plain-obj: 1.1.0 kind-of: 6.0.3 - minimist@0.2.4: {} - minimist@1.2.8: {} minipass@2.9.0: @@ -18564,8 +18392,6 @@ snapshots: transitivePeerDependencies: - supports-color - mout@1.2.4: {} - ms@2.0.0: {} ms@2.1.3: {} @@ -18623,8 +18449,6 @@ snapshots: node-int64@0.4.0: {} - node-modules-path@1.0.2: {} - node-notifier@10.0.1: dependencies: growly: 1.3.0 @@ -18683,6 +18507,13 @@ snapshots: semver: 7.7.1 validate-npm-package-name: 5.0.1 + npm-package-arg@12.0.2: + dependencies: + hosted-git-info: 8.0.2 + proc-log: 5.0.0 + semver: 7.7.1 + validate-npm-package-name: 6.0.0 + npm-packlist@5.1.3: dependencies: glob: 8.1.0 @@ -19056,12 +18887,6 @@ snapshots: pify@3.0.0: {} - pinkie-promise@2.0.1: - dependencies: - pinkie: 2.0.4 - - pinkie@2.0.4: {} - pirates@4.0.6: {} pkg-dir@4.2.0: @@ -19156,9 +18981,7 @@ snapshots: proc-log@3.0.0: {} - process-relative-require@1.0.0: - dependencies: - node-modules-path: 1.0.2 + proc-log@5.0.0: {} progress@2.0.3: {} @@ -19970,6 +19793,17 @@ snapshots: is-plain-obj: 2.1.0 sort-object-keys: 1.1.3 + sort-package-json@2.15.0: + dependencies: + detect-indent: 7.0.1 + detect-newline: 4.0.1 + get-stdin: 9.0.0 + git-hooks-list: 3.2.0 + is-plain-obj: 4.1.0 + semver: 7.7.1 + sort-object-keys: 1.1.3 + tinyglobby: 0.2.12 + source-map-js@1.2.1: {} source-map-resolve@0.5.3: @@ -20196,10 +20030,6 @@ snapshots: styled_string@0.0.1: {} - sum-up@1.0.3: - dependencies: - chalk: 1.1.3 - supports-color@1.3.1: {} supports-color@2.0.0: {} @@ -20516,6 +20346,11 @@ snapshots: transitivePeerDependencies: - supports-color + tinyglobby@0.2.12: + dependencies: + fdir: 6.4.3(picomatch@4.0.2) + picomatch: 4.0.2 + tldts-core@6.1.78: {} tldts@6.1.78: @@ -20759,10 +20594,6 @@ snapshots: has-value: 0.3.1 isobject: 3.0.1 - untildify@2.1.0: - dependencies: - os-homedir: 1.0.2 - upath@2.0.1: {} update-browserslist-db@1.1.2(browserslist@4.24.4): @@ -20816,6 +20647,8 @@ snapshots: validate-npm-package-name@5.0.1: {} + validate-npm-package-name@6.0.0: {} + validate-peer-dependencies@1.2.0: dependencies: resolve-package-path: 3.1.0 @@ -21052,8 +20885,6 @@ snapshots: word-wrap@1.2.5: {} - wordwrap@0.0.3: {} - wordwrap@1.0.0: {} workerpool@3.1.2: @@ -21066,6 +20897,8 @@ snapshots: workerpool@6.5.1: {} + workerpool@9.2.0: {} + wrap-ansi@6.2.0: dependencies: ansi-styles: 4.3.0 @@ -21112,8 +20945,6 @@ snapshots: xmlchars@2.2.0: {} - xtend@4.0.2: {} - y18n@5.0.8: {} yallist@3.1.1: {} From 21d1fd4884d5f276f35d714dcdc6847bd96fe222 Mon Sep 17 00:00:00 2001 From: Sam Van Campenhout Date: Sun, 2 Mar 2025 18:12:46 +0100 Subject: [PATCH 03/18] Patch ember-cli to fix a .gts detype problem This applies the same changes as https://github.com/ember-cli/ember-cli/pull/10659 so we don't need to wait for a new ember-cli release. --- package.json | 5 ++- patches/ember-cli@6.2.2.patch | 57 +++++++++++++++++++++++++++++++++++ pnpm-lock.yaml | 15 ++++++--- 3 files changed, 71 insertions(+), 6 deletions(-) create mode 100644 patches/ember-cli@6.2.2.patch diff --git a/package.json b/package.json index ec1830f1f68..fcf22caee03 100644 --- a/package.json +++ b/package.json @@ -177,7 +177,10 @@ "core-js", "esbuild", "puppeteer" - ] + ], + "patchedDependencies": { + "ember-cli@6.2.2": "patches/ember-cli@6.2.2.patch" + } }, "peerDependencies": { "@glimmer/component": ">= 1.1.2" diff --git a/patches/ember-cli@6.2.2.patch b/patches/ember-cli@6.2.2.patch new file mode 100644 index 00000000000..e835c88ee27 --- /dev/null +++ b/patches/ember-cli@6.2.2.patch @@ -0,0 +1,57 @@ +diff --git a/lib/models/blueprint.js b/lib/models/blueprint.js +index ad4853950b4109d143b3a4d560cdf8b430e55691..a1eed678b08ff9759b571fb54b684a6c578f6034 100644 +--- a/lib/models/blueprint.js ++++ b/lib/models/blueprint.js +@@ -15,12 +15,7 @@ const inflector = require('inflection'); + const minimatch = require('minimatch'); + const path = require('path'); + const stringUtils = require('ember-cli-string-utils'); +-const merge = require('lodash/merge'); +-const zipObject = require('lodash/zipObject'); +-const intersection = require('lodash/intersection'); +-const cloneDeep = require('lodash/cloneDeep'); +-const compact = require('lodash/compact'); +-const uniq = require('lodash/uniq'); ++const { merge, zipObject, intersection, cloneDeep, compact, uniq } = require('ember-cli-lodash-subset'); + const walkSync = require('walk-sync'); + const SilentError = require('silent-error'); + const CoreObject = require('core-object'); +@@ -540,14 +535,18 @@ let Blueprint = CoreObject.extend({ + const { Preprocessor } = require('content-tag'); + const preprocessor = new Preprocessor(); + // Strip template tags +- const templateTagIdentifier = (index) => `template = __TEMPLATE_TAG_${index}__;`; +- const templateTagIdentifierBraces = (index) => `(template = __TEMPLATE_TAG_${index}__);`; ++ const replacementClassMember = (i) => `template = __TEMPLATE_TAG_${i}__;`; ++ const replacementExpression = (i) => `__TEMPLATE_TAG_${i}__`; + const templateTagMatches = preprocessor.parse(code); + let strippedCode = code; + for (let i = 0; i < templateTagMatches.length; i++) { + const match = templateTagMatches[i]; + const templateTag = substringBytes(code, match.range.start, match.range.end); +- strippedCode = strippedCode.replace(templateTag, templateTagIdentifier(i)); ++ if (match.type === 'class-member') { ++ strippedCode = strippedCode.replace(templateTag, replacementClassMember(i)); ++ } else { ++ strippedCode = strippedCode.replace(templateTag, replacementExpression(i)); ++ } + } + + // Remove types +@@ -558,8 +557,14 @@ let Blueprint = CoreObject.extend({ + for (let i = 0; i < templateTagMatches.length; i++) { + const match = templateTagMatches[i]; + const templateTag = substringBytes(code, match.range.start, match.range.end); +- transformedWithTemplateTag = transformedWithTemplateTag.replace(templateTagIdentifier(i), templateTag); +- transformedWithTemplateTag = transformedWithTemplateTag.replace(templateTagIdentifierBraces(i), templateTag); ++ if (match.type === 'class-member') { ++ transformedWithTemplateTag = transformedWithTemplateTag.replace(replacementClassMember(i), templateTag); ++ } else { ++ // babel-remove-types uses prettier under the hood, and adds trailing `;` where allowed, ++ // so we need to take that into account when restoring the template tags: ++ transformedWithTemplateTag = transformedWithTemplateTag.replace(`${replacementExpression(i)};`, templateTag); ++ transformedWithTemplateTag = transformedWithTemplateTag.replace(replacementExpression(i), templateTag); ++ } + } + + return transformedWithTemplateTag; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f547c58712b..98bc1a5156f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,11 @@ overrides: socket.io: ^4.7.0 rollup: ^4.2.0 +patchedDependencies: + ember-cli@6.2.2: + hash: 7649c0d1386f77161a35436a9475d20553cb0a841a76fe0681b0939ab96d2347 + path: patches/ember-cli@6.2.2.patch + importers: .: @@ -195,7 +200,7 @@ importers: version: 2.0.0(@babel/core@7.26.9) ember-cli: specifier: ^6.2.0 - version: 6.2.2(handlebars@4.7.8)(underscore@1.13.7) + version: 6.2.2(patch_hash=7649c0d1386f77161a35436a9475d20553cb0a841a76fe0681b0939ab96d2347)(handlebars@4.7.8)(underscore@1.13.7) ember-cli-blueprint-test-helpers: specifier: ^0.19.2 version: 0.19.2 @@ -204,7 +209,7 @@ importers: version: 2.1.0 ember-cli-dependency-checker: specifier: ^3.3.1 - version: 3.3.3(ember-cli@6.2.2(handlebars@4.7.8)(underscore@1.13.7)) + version: 3.3.3(ember-cli@6.2.2(patch_hash=7649c0d1386f77161a35436a9475d20553cb0a841a76fe0681b0939ab96d2347)(handlebars@4.7.8)(underscore@1.13.7)) ember-cli-yuidoc: specifier: ^0.9.1 version: 0.9.1 @@ -15388,10 +15393,10 @@ snapshots: resolve: 1.22.10 semver: 5.7.2 - ember-cli-dependency-checker@3.3.3(ember-cli@6.2.2(handlebars@4.7.8)(underscore@1.13.7)): + ember-cli-dependency-checker@3.3.3(ember-cli@6.2.2(patch_hash=7649c0d1386f77161a35436a9475d20553cb0a841a76fe0681b0939ab96d2347)(handlebars@4.7.8)(underscore@1.13.7)): dependencies: chalk: 2.4.2 - ember-cli: 6.2.2(handlebars@4.7.8)(underscore@1.13.7) + ember-cli: 6.2.2(patch_hash=7649c0d1386f77161a35436a9475d20553cb0a841a76fe0681b0939ab96d2347)(handlebars@4.7.8)(underscore@1.13.7) find-yarn-workspace-root: 2.0.0 is-git-url: 1.0.0 resolve: 1.22.10 @@ -15682,7 +15687,7 @@ snapshots: - walrus - whiskers - ember-cli@6.2.2(handlebars@4.7.8)(underscore@1.13.7): + ember-cli@6.2.2(patch_hash=7649c0d1386f77161a35436a9475d20553cb0a841a76fe0681b0939ab96d2347)(handlebars@4.7.8)(underscore@1.13.7): dependencies: '@pnpm/find-workspace-dir': 7.0.3 babel-remove-types: 1.0.1 From e90c7a5a06d1def967f6d40d5512ba08a8f3533f Mon Sep 17 00:00:00 2001 From: Sam Van Campenhout Date: Fri, 14 Mar 2025 15:44:16 +0100 Subject: [PATCH 04/18] Work work --- .../__templatepath__/__templatename__.gts | 12 ++++- blueprints/component/index.js | 14 ++++++ node-tests/blueprints/component-test.js | 48 ++++++++++++++++--- .../fixtures/component/glimmer-component.gjs | 7 +++ .../fixtures/component/glimmer-component.gts | 18 +++++++ .../component/template-only-component.gjs | 3 ++ .../component/template-only-component.gts | 16 +++++++ 7 files changed, 111 insertions(+), 7 deletions(-) create mode 100644 node-tests/fixtures/component/glimmer-component.gjs create mode 100644 node-tests/fixtures/component/glimmer-component.gts create mode 100644 node-tests/fixtures/component/template-only-component.gjs create mode 100644 node-tests/fixtures/component/template-only-component.gts diff --git a/blueprints/component/files/__root__/__templatepath__/__templatename__.gts b/blueprints/component/files/__root__/__templatepath__/__templatename__.gts index e8d9d219abd..cc1615af47c 100644 --- a/blueprints/component/files/__root__/__templatepath__/__templatename__.gts +++ b/blueprints/component/files/__root__/__templatepath__/__templatename__.gts @@ -1,3 +1,13 @@ +<% if (componentClass === '@glimmer/component') {%>import Component from '@glimmer/component'; + +<%= componentSignature %> +export default class <%= classifiedModuleName %> extends Component<<%= classifiedModuleName %>Signature> { + +}<%} else {%>import type { TOC } from '@ember/component/template-only'; + +<%= componentSignature %> + satisfies TOC<<%= classifiedModuleName %>Signature>;<%}%> diff --git a/blueprints/component/index.js b/blueprints/component/index.js index 98f24c5b2be..2f7f59296c8 100644 --- a/blueprints/component/index.js +++ b/blueprints/component/index.js @@ -4,6 +4,7 @@ const chalk = require('chalk'); const stringUtil = require('ember-cli-string-utils'); const getPathOption = require('ember-cli-get-component-path-option'); const normalizeEntityName = require('ember-cli-normalize-entity-name'); +const SilentError = require('silent-error'); const { generateComponentSignature } = require('../-utils'); const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill'); @@ -69,6 +70,18 @@ module.exports = { options.componentClass = ''; } + if (options.componentAuthoringFormat === 'strict') { + if (options.componentClass === '@ember/component') { + throw new SilentError( + 'The "@ember/component" component class cannot be used in combination with the "--strict" flag' + ); + } + + if (options.componentClass === '') { + options.componentClass = '@ember/component/template-only'; + } + } + return this._super.install.apply(this, arguments); }, @@ -193,6 +206,7 @@ module.exports = { } return { + classifiedModuleName, importTemplate, importComponent, componentSignature, diff --git a/node-tests/blueprints/component-test.js b/node-tests/blueprints/component-test.js index 928bbd24e7c..ea6909ab760 100644 --- a/node-tests/blueprints/component-test.js +++ b/node-tests/blueprints/component-test.js @@ -3,6 +3,7 @@ const blueprintHelpers = require('ember-cli-blueprint-test-helpers/helpers'); const setupTestHooks = blueprintHelpers.setupTestHooks; const emberNew = blueprintHelpers.emberNew; +const emberGenerate = blueprintHelpers.emberGenerate; const emberGenerateDestroy = blueprintHelpers.emberGenerateDestroy; const chai = require('ember-cli-blueprint-test-helpers/chai'); @@ -25,11 +26,6 @@ const templateOnlyContents = `import templateOnly from '@ember/component/templat export default templateOnly(); `; -const templateTagContents = ` -`; - describe('Blueprint: component', function () { setupTestHooks(this); @@ -269,9 +265,49 @@ describe('Blueprint: component', function () { it('component foo --strict', function () { return emberGenerateDestroy(['component', 'foo', '--strict'], (_file) => { - expect(_file('app/components/foo.gjs')).to.equal(templateTagContents); + expect(_file('app/components/foo.gjs')).to.equal( + fixture('component/template-only-component.gjs') + ); + }); + }); + + it('component foo --strict --component-class=@glimmer/component', function () { + return emberGenerateDestroy( + ['component', 'foo', '--strict', '--component-class=@glimmer/component'], + (_file) => { + expect(_file('app/components/foo.gjs')).to.equal( + fixture('component/glimmer-component.gjs') + ); + } + ); + }); + + it('component foo --strict --component-class=@ember/component', async function () { + await expect( + emberGenerate(['component', 'foo', '--strict', '--component-class=@ember/component']) + ).to.be.rejectedWith( + 'The "@ember/component" component class cannot be used in combination with the "--strict" flag' + ); + }); + + it('component foo --strict --typescript', function () { + return emberGenerateDestroy(['component', 'foo', '--strict', '--typescript'], (_file) => { + expect(_file('app/components/foo.gts')).to.equal( + fixture('component/template-only-component.gts') + ); }); }); + + it('component foo --strict --component-class=@glimmer/component --typescript', function () { + return emberGenerateDestroy( + ['component', 'foo', '--strict', '--component-class=@glimmer/component', '--typescript'], + (_file) => { + expect(_file('app/components/foo.gts')).to.equal( + fixture('component/glimmer-component.gts') + ); + } + ); + }); }); describe('in addon', function () { diff --git a/node-tests/fixtures/component/glimmer-component.gjs b/node-tests/fixtures/component/glimmer-component.gjs new file mode 100644 index 00000000000..7a4e588e270 --- /dev/null +++ b/node-tests/fixtures/component/glimmer-component.gjs @@ -0,0 +1,7 @@ +import Component from '@glimmer/component'; + +export default class Foo extends Component { + +} diff --git a/node-tests/fixtures/component/glimmer-component.gts b/node-tests/fixtures/component/glimmer-component.gts new file mode 100644 index 00000000000..b3347c648e1 --- /dev/null +++ b/node-tests/fixtures/component/glimmer-component.gts @@ -0,0 +1,18 @@ +import Component from '@glimmer/component'; + +export interface FooSignature { + // The arguments accepted by the component + Args: {}; + // Any blocks yielded by the component + Blocks: { + default: [] + }; + // The element to which `...attributes` is applied in the component template + Element: null; +} + +export default class Foo extends Component { + +} diff --git a/node-tests/fixtures/component/template-only-component.gjs b/node-tests/fixtures/component/template-only-component.gjs new file mode 100644 index 00000000000..e8d9d219abd --- /dev/null +++ b/node-tests/fixtures/component/template-only-component.gjs @@ -0,0 +1,3 @@ + diff --git a/node-tests/fixtures/component/template-only-component.gts b/node-tests/fixtures/component/template-only-component.gts new file mode 100644 index 00000000000..b3e658c4720 --- /dev/null +++ b/node-tests/fixtures/component/template-only-component.gts @@ -0,0 +1,16 @@ +import type { TOC } from '@ember/component/template-only'; + +export interface FooSignature { + // The arguments accepted by the component + Args: {}; + // Any blocks yielded by the component + Blocks: { + default: [] + }; + // The element to which `...attributes` is applied in the component template + Element: null; +} + + satisfies TOC; From e13638c461068117645d280f93ee1e5e79e31514 Mon Sep 17 00:00:00 2001 From: Sam Van Campenhout Date: Sun, 16 Mar 2025 10:32:23 +0100 Subject: [PATCH 05/18] Update the component-test tests - add gts - make the gjs consistent. --- node-tests/blueprints/component-test-test.js | 46 +++++++++++++++++-- node-tests/fixtures/component-test/rfc232.gjs | 12 ++--- node-tests/fixtures/component-test/rfc232.gts | 28 +++++++++++ 3 files changed, 76 insertions(+), 10 deletions(-) create mode 100644 node-tests/fixtures/component-test/rfc232.gts diff --git a/node-tests/blueprints/component-test-test.js b/node-tests/blueprints/component-test-test.js index febebbccf1d..07329d644f9 100644 --- a/node-tests/blueprints/component-test-test.js +++ b/node-tests/blueprints/component-test-test.js @@ -30,10 +30,26 @@ describe('Blueprint: component-test', function () { ); }); - it('component-test x-foo --strict', function () { - return emberGenerateDestroy(['component-test', 'x-foo', '--strict'], (_file) => { - expect(_file('tests/integration/components/x-foo-test.gjs')).to.equal( - fixture('component-test/rfc232.gjs') + it('component-test foo --strict', function () { + return emberGenerateDestroy(['component-test', 'foo', '--strict'], (_file) => { + expect(_file('tests/integration/components/foo-test.gjs')).to.equal( + fixture('component-test/rfc232.gjs', { + replace: { + modulePrefix: 'my-app' + } + }) + ); + }); + }); + + it('component-test foo --strict --typescript', function () { + return emberGenerateDestroy(['component-test', 'foo', '--strict', '--typescript'], (_file) => { + expect(_file('tests/integration/components/foo-test.gts')).to.equal( + fixture('component-test/rfc232.gts', { + replace: { + modulePrefix: 'my-app' + } + }) ); }); }); @@ -72,6 +88,28 @@ describe('Blueprint: component-test', function () { fixture('component-test/addon-unit.js') ); }); + + it('component-test foo --strict', function () { + return emberGenerateDestroy(['component-test', 'foo', '--strict'], (_file) => { + expect(_file('tests/integration/components/foo-test.gjs')).to.equal( + fixture('component-test/rfc232.gjs', { + replace: { + modulePrefix: 'dummy' + } + }) + ); + }); + }); + + it('component-test foo --strict --typescript', function () { + return emberGenerateDestroy(['component-test', 'foo', '--strict', '--typescript'], (_file) => { + expect(_file('tests/integration/components/foo-test.gts')).to.equal( + fixture('component-test/rfc232.gts', { replace: { + modulePrefix: 'dummy' + }}) + ); + }); + }); }); }); diff --git a/node-tests/fixtures/component-test/rfc232.gjs b/node-tests/fixtures/component-test/rfc232.gjs index f030d391ba7..76555953899 100644 --- a/node-tests/fixtures/component-test/rfc232.gjs +++ b/node-tests/fixtures/component-test/rfc232.gjs @@ -1,9 +1,9 @@ import { module, test } from 'qunit'; -import { setupRenderingTest } from 'my-app/tests/helpers'; +import { setupRenderingTest } from '<%= modulePrefix =%>/tests/helpers'; import { render } from '@ember/test-helpers'; -import XFoo from 'my-app/components/x-foo'; +import Foo from '<%= modulePrefix =%>/components/foo'; -module('Integration | Component | x-foo', function (hooks) { +module('Integration | Component | foo', function (hooks) { setupRenderingTest(hooks); test('it renders', async function (assert) { @@ -12,15 +12,15 @@ module('Integration | Component | x-foo', function (hooks) { // and update using state.myProperty = 1; await rerender(); // Handle any actions with function myAction(val) { ... }; - await render(); + await render(); assert.dom().hasText(''); // Template block usage: await render(); assert.dom().hasText('template block text'); diff --git a/node-tests/fixtures/component-test/rfc232.gts b/node-tests/fixtures/component-test/rfc232.gts new file mode 100644 index 00000000000..76555953899 --- /dev/null +++ b/node-tests/fixtures/component-test/rfc232.gts @@ -0,0 +1,28 @@ +import { module, test } from 'qunit'; +import { setupRenderingTest } from '<%= modulePrefix =%>/tests/helpers'; +import { render } from '@ember/test-helpers'; +import Foo from '<%= modulePrefix =%>/components/foo'; + +module('Integration | Component | foo', function (hooks) { + setupRenderingTest(hooks); + + test('it renders', async function (assert) { + // Updating values is achieved using autotracking, just like in app code. For example: + // class State { @tracked myProperty = 0; }; const state = new State(); + // and update using state.myProperty = 1; await rerender(); + // Handle any actions with function myAction(val) { ... }; + + await render(); + + assert.dom().hasText(''); + + // Template block usage: + await render(); + + assert.dom().hasText('template block text'); + }); +}); From b387662a0c5873e56b742597489c77f7edcea3a6 Mon Sep 17 00:00:00 2001 From: Sam Van Campenhout Date: Sun, 16 Mar 2025 14:09:33 +0100 Subject: [PATCH 06/18] Add some more tests --- node-tests/blueprints/component-test.js | 90 +++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/node-tests/blueprints/component-test.js b/node-tests/blueprints/component-test.js index ea6909ab760..f6e9e627db5 100644 --- a/node-tests/blueprints/component-test.js +++ b/node-tests/blueprints/component-test.js @@ -268,6 +268,14 @@ describe('Blueprint: component', function () { expect(_file('app/components/foo.gjs')).to.equal( fixture('component/template-only-component.gjs') ); + + expect(_file('tests/integration/components/foo-test.gjs')).to.equal( + fixture('component-test/rfc232.gjs', { + replace: { + modulePrefix: 'my-app', + }, + }) + ); }); }); @@ -278,6 +286,14 @@ describe('Blueprint: component', function () { expect(_file('app/components/foo.gjs')).to.equal( fixture('component/glimmer-component.gjs') ); + + expect(_file('tests/integration/components/foo-test.gjs')).to.equal( + fixture('component-test/rfc232.gjs', { + replace: { + modulePrefix: 'my-app', + }, + }) + ); } ); }); @@ -295,6 +311,14 @@ describe('Blueprint: component', function () { expect(_file('app/components/foo.gts')).to.equal( fixture('component/template-only-component.gts') ); + + expect(_file('tests/integration/components/foo-test.gts')).to.equal( + fixture('component-test/rfc232.gts', { + replace: { + modulePrefix: 'my-app', + }, + }) + ); }); }); @@ -305,6 +329,14 @@ describe('Blueprint: component', function () { expect(_file('app/components/foo.gts')).to.equal( fixture('component/glimmer-component.gts') ); + + expect(_file('tests/integration/components/foo-test.gts')).to.equal( + fixture('component-test/rfc232.gts', { + replace: { + modulePrefix: 'my-app', + }, + }) + ); } ); }); @@ -362,6 +394,64 @@ describe('Blueprint: component', function () { }); }); + + it('component foo --strict', function () { + return emberGenerateDestroy(['component', 'foo', '--strict'], (_file) => { + expect(_file('addon/components/foo.js')).to.not.exist; + expect(_file('addon/components/foo.gjs')).to.equal( + fixture('component/template-only-component.gjs') + ); + + expect(_file('app/components/foo.js')).to.contain( + "export { default } from 'my-addon/components/foo';" + ); + }); + }); + + it('component foo --strict --component-class=@glimmer/component', function () { + return emberGenerateDestroy( + ['component', 'foo', '--strict', '--component-class=@glimmer/component'], + (_file) => { + expect(_file('addon/components/foo.js')).to.not.exist; + expect(_file('addon/components/foo.gjs')).to.equal( + fixture('component/glimmer-component.gjs') + ); + + expect(_file('app/components/foo.js')).to.contain( + "export { default } from 'my-addon/components/foo';" + ); + } + ); + }); + + it('component foo --strict --typescript', function () { + return emberGenerateDestroy(['component', 'foo', '--strict', '--typescript'], (_file) => { + expect(_file('addon/components/foo.ts')).to.not.exist; + expect(_file('addon/components/foo.gts')).to.equal( + fixture('component/template-only-component.gts') + ); + + expect(_file('app/components/foo.js')).to.contain( + "export { default } from 'my-addon/components/foo';" + ); + }); + }); + + it('component foo --strict --component-class=@glimmer/component --typescript', function () { + return emberGenerateDestroy( + ['component', 'foo', '--strict', '--component-class=@glimmer/component', '--typescript'], + (_file) => { + expect(_file('addon/components/foo.gts')).to.equal( + fixture('component/glimmer-component.gts') + ); + + expect(_file('app/components/foo.js')).to.contain( + "export { default } from 'my-addon/components/foo';" + ); + } + ); + }); + it('component foo/x-foo', function () { return emberGenerateDestroy(['component', 'foo/x-foo'], (_file) => { expect(_file('addon/components/foo/x-foo.js')).to.not.exist; From 2bde172cfa0e76cdc6dccb9a876c048dc847a19b Mon Sep 17 00:00:00 2001 From: Sam Van Campenhout Date: Mon, 17 Mar 2025 09:24:57 +0100 Subject: [PATCH 07/18] fixup tests --- node-tests/blueprints/component-test-test.js | 48 ++++++++++++-------- node-tests/blueprints/component-test.js | 1 - 2 files changed, 28 insertions(+), 21 deletions(-) diff --git a/node-tests/blueprints/component-test-test.js b/node-tests/blueprints/component-test-test.js index 07329d644f9..654bc597077 100644 --- a/node-tests/blueprints/component-test-test.js +++ b/node-tests/blueprints/component-test-test.js @@ -35,23 +35,26 @@ describe('Blueprint: component-test', function () { expect(_file('tests/integration/components/foo-test.gjs')).to.equal( fixture('component-test/rfc232.gjs', { replace: { - modulePrefix: 'my-app' - } + modulePrefix: 'my-app', + }, }) ); }); }); it('component-test foo --strict --typescript', function () { - return emberGenerateDestroy(['component-test', 'foo', '--strict', '--typescript'], (_file) => { - expect(_file('tests/integration/components/foo-test.gts')).to.equal( - fixture('component-test/rfc232.gts', { - replace: { - modulePrefix: 'my-app' - } - }) - ); - }); + return emberGenerateDestroy( + ['component-test', 'foo', '--strict', '--typescript'], + (_file) => { + expect(_file('tests/integration/components/foo-test.gts')).to.equal( + fixture('component-test/rfc232.gts', { + replace: { + modulePrefix: 'my-app', + }, + }) + ); + } + ); }); }); @@ -94,21 +97,26 @@ describe('Blueprint: component-test', function () { expect(_file('tests/integration/components/foo-test.gjs')).to.equal( fixture('component-test/rfc232.gjs', { replace: { - modulePrefix: 'dummy' - } + modulePrefix: 'dummy', + }, }) ); }); }); it('component-test foo --strict --typescript', function () { - return emberGenerateDestroy(['component-test', 'foo', '--strict', '--typescript'], (_file) => { - expect(_file('tests/integration/components/foo-test.gts')).to.equal( - fixture('component-test/rfc232.gts', { replace: { - modulePrefix: 'dummy' - }}) - ); - }); + return emberGenerateDestroy( + ['component-test', 'foo', '--strict', '--typescript'], + (_file) => { + expect(_file('tests/integration/components/foo-test.gts')).to.equal( + fixture('component-test/rfc232.gts', { + replace: { + modulePrefix: 'dummy', + }, + }) + ); + } + ); }); }); }); diff --git a/node-tests/blueprints/component-test.js b/node-tests/blueprints/component-test.js index f6e9e627db5..ed4a13e1773 100644 --- a/node-tests/blueprints/component-test.js +++ b/node-tests/blueprints/component-test.js @@ -394,7 +394,6 @@ describe('Blueprint: component', function () { }); }); - it('component foo --strict', function () { return emberGenerateDestroy(['component', 'foo', '--strict'], (_file) => { expect(_file('addon/components/foo.js')).to.not.exist; From 90f27da46a98e48c395afddc34e4ae06920853d3 Mon Sep 17 00:00:00 2001 From: Sam Van Campenhout Date: Sat, 22 Mar 2025 09:46:21 +0100 Subject: [PATCH 08/18] Update to ember-cli 6.3.0-beta.3 6.3.0 hasn't been released yet, but we need the content-tag v3 dependency to fix an issue when detyping the blueprint files. --- package.json | 4 +- ...2.2.patch => ember-cli@6.3.0-beta.3.patch} | 0 pnpm-lock.yaml | 88 +++++++++++++++---- 3 files changed, 71 insertions(+), 21 deletions(-) rename patches/{ember-cli@6.2.2.patch => ember-cli@6.3.0-beta.3.patch} (100%) diff --git a/package.json b/package.json index fcf22caee03..f3783bcd309 100644 --- a/package.json +++ b/package.json @@ -127,7 +127,7 @@ "babel-plugin-ember-template-compilation": "^2.1.1", "dag-map": "^2.0.2", "decorator-transforms": "2.0.0", - "ember-cli": "^6.2.0", + "ember-cli": "^6.3.0-beta.3", "ember-cli-blueprint-test-helpers": "^0.19.2", "ember-cli-browserstack": "^2.0.1", "ember-cli-dependency-checker": "^3.3.1", @@ -179,7 +179,7 @@ "puppeteer" ], "patchedDependencies": { - "ember-cli@6.2.2": "patches/ember-cli@6.2.2.patch" + "ember-cli@6.3.0-beta.3": "patches/ember-cli@6.3.0-beta.3.patch" } }, "peerDependencies": { diff --git a/patches/ember-cli@6.2.2.patch b/patches/ember-cli@6.3.0-beta.3.patch similarity index 100% rename from patches/ember-cli@6.2.2.patch rename to patches/ember-cli@6.3.0-beta.3.patch diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 98bc1a5156f..d563e2ac044 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,9 +9,9 @@ overrides: rollup: ^4.2.0 patchedDependencies: - ember-cli@6.2.2: + ember-cli@6.3.0-beta.3: hash: 7649c0d1386f77161a35436a9475d20553cb0a841a76fe0681b0939ab96d2347 - path: patches/ember-cli@6.2.2.patch + path: patches/ember-cli@6.3.0-beta.3.patch importers: @@ -199,8 +199,8 @@ importers: specifier: 2.0.0 version: 2.0.0(@babel/core@7.26.9) ember-cli: - specifier: ^6.2.0 - version: 6.2.2(patch_hash=7649c0d1386f77161a35436a9475d20553cb0a841a76fe0681b0939ab96d2347)(handlebars@4.7.8)(underscore@1.13.7) + specifier: ^6.3.0-beta.3 + version: 6.3.0-beta.3(patch_hash=7649c0d1386f77161a35436a9475d20553cb0a841a76fe0681b0939ab96d2347)(handlebars@4.7.8)(underscore@1.13.7) ember-cli-blueprint-test-helpers: specifier: ^0.19.2 version: 0.19.2 @@ -209,7 +209,7 @@ importers: version: 2.1.0 ember-cli-dependency-checker: specifier: ^3.3.1 - version: 3.3.3(ember-cli@6.2.2(patch_hash=7649c0d1386f77161a35436a9475d20553cb0a841a76fe0681b0939ab96d2347)(handlebars@4.7.8)(underscore@1.13.7)) + version: 3.3.3(ember-cli@6.3.0-beta.3(patch_hash=7649c0d1386f77161a35436a9475d20553cb0a841a76fe0681b0939ab96d2347)(handlebars@4.7.8)(underscore@1.13.7)) ember-cli-yuidoc: specifier: ^0.9.1 version: 0.9.1 @@ -5373,8 +5373,8 @@ packages: content-tag@2.0.3: resolution: {integrity: sha512-htLIdtfhhKW2fHlFLnZH7GFzHSdSpHhDLrWVswkNiiPMZ5uXq5JfrGboQKFhNQuAAFF8VNB2EYUj3MsdJrKKpg==} - content-tag@3.1.1: - resolution: {integrity: sha512-94puwVk6X8oJcbRIEY03UM80zWzA3dYgGkOiRJzeY1vXgwrFUh3OolDDi/D7YBa6Vsx+CgAvuk4uXlB8loZ1FA==} + content-tag@3.1.2: + resolution: {integrity: sha512-Z+MGhZfnFFKzYC+pUTWXnoDYhfiXP9ojZe3JbwsYufmDuoeq2EvuDyeFAJ/RnKokUwz5s9bQhDOrbvSYRShcrQ==} content-type@1.0.5: resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} @@ -5674,6 +5674,10 @@ packages: resolution: {integrity: sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==} engines: {node: '>=0.3.1'} + diff@7.0.0: + resolution: {integrity: sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==} + engines: {node: '>=0.3.1'} + dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -5836,8 +5840,8 @@ packages: engines: {node: '>= 18'} hasBin: true - ember-cli@6.2.2: - resolution: {integrity: sha512-PJNJ3Ib1IP85NJlw/AdzX76ZIDcyAAFJfDz/wFJQ+hqTFNWsjVjXl20X3ePQkKfZZlF421EC5nsLBOwbHqsh9g==} + ember-cli@6.3.0-beta.3: + resolution: {integrity: sha512-YnsRt7Y8jK5hxMhDzRxulZFrq4K3EjwIdAQS9cRhJL/gJGLRjqcug8yBm8vfVip8uP7mEMPg+1gCgrib3Tkk/g==} engines: {node: '>= 18'} hasBin: true @@ -7512,6 +7516,9 @@ packages: linkify-it@4.0.1: resolution: {integrity: sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==} + linkify-it@5.0.0: + resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} + livereload-js@3.4.1: resolution: {integrity: sha512-5MP0uUeVCec89ZbNOT/i97Mc+q3SxXmiUGhRFOTmhrGPn//uWVQdCvcLJDy64MSBR5MidFdOR7B9viumoavy6g==} @@ -7695,6 +7702,10 @@ packages: resolution: {integrity: sha512-FtwnEuuK+2yVU7goGn/MJ0WBZMM9ZPgU9spqlFs7/A/pDIUNSOQZhUgOqYCficIuR2QaFnrt8LHqBWsbTAoI5w==} hasBin: true + markdown-it@14.1.0: + resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} + hasBin: true + markdown-it@4.4.0: resolution: {integrity: sha512-Rl8dHHeLuAh3E72OPY0tY7CLvlxgHiLhlshIYswAAabAg4YDBLa6e/LTgNkkxBO2K61ESzoquPQFMw/iMrT1PA==} hasBin: true @@ -7725,6 +7736,9 @@ packages: mdurl@1.0.1: resolution: {integrity: sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==} + mdurl@2.0.0: + resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} + media-typer@0.3.0: resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} @@ -8550,6 +8564,10 @@ packages: pump@3.0.2: resolution: {integrity: sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==} + punycode.js@2.3.1: + resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} + engines: {node: '>=6'} + punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} @@ -8568,6 +8586,7 @@ packages: engines: {node: '>=0.6.0', teleport: '>=0.2.0'} deprecated: |- You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other. + (For a CapTP with native promises, see @endo/eventual-send and @endo/captp) qs@1.0.2: @@ -9690,6 +9709,9 @@ packages: uc.micro@1.0.6: resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==} + uc.micro@2.1.0: + resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} + uglify-js@3.19.3: resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==} engines: {node: '>=0.8.0'} @@ -14924,7 +14946,7 @@ snapshots: content-tag@2.0.3: {} - content-tag@3.1.1: {} + content-tag@3.1.2: {} content-type@1.0.5: {} @@ -15196,6 +15218,8 @@ snapshots: diff@5.2.0: {} + diff@7.0.0: {} + dir-glob@3.0.1: dependencies: path-type: 4.0.0 @@ -15393,10 +15417,10 @@ snapshots: resolve: 1.22.10 semver: 5.7.2 - ember-cli-dependency-checker@3.3.3(ember-cli@6.2.2(patch_hash=7649c0d1386f77161a35436a9475d20553cb0a841a76fe0681b0939ab96d2347)(handlebars@4.7.8)(underscore@1.13.7)): + ember-cli-dependency-checker@3.3.3(ember-cli@6.3.0-beta.3(patch_hash=7649c0d1386f77161a35436a9475d20553cb0a841a76fe0681b0939ab96d2347)(handlebars@4.7.8)(underscore@1.13.7)): dependencies: chalk: 2.4.2 - ember-cli: 6.2.2(patch_hash=7649c0d1386f77161a35436a9475d20553cb0a841a76fe0681b0939ab96d2347)(handlebars@4.7.8)(underscore@1.13.7) + ember-cli: 6.3.0-beta.3(patch_hash=7649c0d1386f77161a35436a9475d20553cb0a841a76fe0681b0939ab96d2347)(handlebars@4.7.8)(underscore@1.13.7) find-yarn-workspace-root: 2.0.0 is-git-url: 1.0.0 resolve: 1.22.10 @@ -15687,12 +15711,11 @@ snapshots: - walrus - whiskers - ember-cli@6.2.2(patch_hash=7649c0d1386f77161a35436a9475d20553cb0a841a76fe0681b0939ab96d2347)(handlebars@4.7.8)(underscore@1.13.7): + ember-cli@6.3.0-beta.3(patch_hash=7649c0d1386f77161a35436a9475d20553cb0a841a76fe0681b0939ab96d2347)(handlebars@4.7.8)(underscore@1.13.7): dependencies: '@pnpm/find-workspace-dir': 7.0.3 babel-remove-types: 1.0.1 broccoli: 3.5.2 - broccoli-builder: 0.18.14 broccoli-concat: 4.2.5 broccoli-config-loader: 1.0.1 broccoli-config-replace: 1.1.2 @@ -15712,10 +15735,10 @@ snapshots: compression: 1.8.0 configstore: 5.0.1 console-ui: 3.1.2 - content-tag: 2.0.3 + content-tag: 3.1.2 core-object: 3.1.5 dag-map: 2.0.2 - diff: 5.2.0 + diff: 7.0.0 ember-cli-is-package-missing: 1.0.0 ember-cli-normalize-entity-name: 1.0.0 ember-cli-preprocess-registry: 5.0.1 @@ -15744,8 +15767,8 @@ snapshots: is-language-code: 3.1.0 isbinaryfile: 5.0.4 lodash: 4.17.21 - markdown-it: 13.0.2 - markdown-it-terminal: 0.4.0(markdown-it@13.0.2) + markdown-it: 14.1.0 + markdown-it-terminal: 0.4.0(markdown-it@14.1.0) minimatch: 7.4.6 morgan: 1.10.0 nopt: 3.0.6 @@ -15936,7 +15959,7 @@ snapshots: ember-template-imports@4.3.0: dependencies: broccoli-stew: 3.0.0 - content-tag: 3.1.1 + content-tag: 3.1.2 ember-cli-version-checker: 5.1.2 transitivePeerDependencies: - supports-color @@ -17988,6 +18011,10 @@ snapshots: dependencies: uc.micro: 1.0.6 + linkify-it@5.0.0: + dependencies: + uc.micro: 2.1.0 + livereload-js@3.4.1: {} load-json-file@4.0.0: @@ -18158,6 +18185,14 @@ snapshots: lodash.merge: 4.6.2 markdown-it: 13.0.2 + markdown-it-terminal@0.4.0(markdown-it@14.1.0): + dependencies: + ansi-styles: 3.2.1 + cardinal: 1.0.0 + cli-table: 0.3.11 + lodash.merge: 4.6.2 + markdown-it: 14.1.0 + markdown-it@13.0.2: dependencies: argparse: 2.0.1 @@ -18166,6 +18201,15 @@ snapshots: mdurl: 1.0.1 uc.micro: 1.0.6 + markdown-it@14.1.0: + dependencies: + argparse: 2.0.1 + entities: 4.5.0 + linkify-it: 5.0.0 + mdurl: 2.0.0 + punycode.js: 2.3.1 + uc.micro: 2.1.0 + markdown-it@4.4.0: dependencies: argparse: 1.0.10 @@ -18195,6 +18239,8 @@ snapshots: mdurl@1.0.1: {} + mdurl@2.0.0: {} + media-typer@0.3.0: {} mem@5.1.1: @@ -19035,6 +19081,8 @@ snapshots: end-of-stream: 1.4.4 once: 1.4.0 + punycode.js@2.3.1: {} + punycode@2.3.1: {} puppeteer-core@24.3.0: @@ -20543,6 +20591,8 @@ snapshots: uc.micro@1.0.6: {} + uc.micro@2.1.0: {} + uglify-js@3.19.3: optional: true From 1ce86fac2b800dca6821708a9051df4069818ae1 Mon Sep 17 00:00:00 2001 From: Sam Van Campenhout Date: Sat, 22 Mar 2025 19:21:29 +0100 Subject: [PATCH 09/18] don't depend on .gts type removal The .gts type removal is buggy at the moment, and causes this PR to be blocked. We now add .gjs blueprints and strip the version we don't need, which bypasses the detyping problems. --- .../__testType__/__path__/__test__.gjs | 38 +++++++++++++++++++ blueprints/component-test/index.js | 6 +-- .../__templatepath__/__templatename__.gjs | 9 +++++ blueprints/component/index.js | 6 +-- 4 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 blueprints/component-test/files/__root__/__testType__/__path__/__test__.gjs create mode 100644 blueprints/component/files/__root__/__templatepath__/__templatename__.gjs diff --git a/blueprints/component-test/files/__root__/__testType__/__path__/__test__.gjs b/blueprints/component-test/files/__root__/__testType__/__path__/__test__.gjs new file mode 100644 index 00000000000..33449bb5877 --- /dev/null +++ b/blueprints/component-test/files/__root__/__testType__/__path__/__test__.gjs @@ -0,0 +1,38 @@ +<% if (testType === 'integration') { %>import { module, test } from 'qunit'; +import { setupRenderingTest } from '<%= modulePrefix %>/tests/helpers'; +import { render } from '@ember/test-helpers'; +import <%= componentName %> from '<%= modulePrefix %>/components/<%= componentPathName %>'; + +module('<%= friendlyTestDescription %>', function (hooks) { + setupRenderingTest(hooks); + + test('it renders', async function (assert) { + // Updating values is achieved using autotracking, just like in app code. For example: + // class State { @tracked myProperty = 0; }; const state = new State(); + // and update using state.myProperty = 1; await rerender(); + // Handle any actions with function myAction(val) { ... }; + + await render(); + + assert.dom().hasText(''); + + // Template block usage: + await render(); + + assert.dom().hasText('template block text'); + }); +});<% } else if (testType === 'unit') { %>import { module, test } from 'qunit'; +import { setupTest } from '<%= modulePrefix %>/tests/helpers'; + +module('<%= friendlyTestDescription %>', function (hooks) { + setupTest(hooks); + + test('it exists', function (assert) { + let component = this.owner.factoryFor('component:<%= componentPathName %>').create(); + assert.ok(component); + }); +}); <% } %> diff --git a/blueprints/component-test/index.js b/blueprints/component-test/index.js index b366f07bc18..7d2a4504c75 100644 --- a/blueprints/component-test/index.js +++ b/blueprints/component-test/index.js @@ -76,9 +76,9 @@ module.exports = { let files = this._super.files.apply(this, arguments); if (this.options.componentAuthoringFormat === 'strict') { - files = files.filter((file) => !(file.endsWith('.js') || file.endsWith('.ts'))); - } - if (this.options.componentAuthoringFormat === 'loose') { + const strictFilesToRemove = this.options.isTypeScriptProject || this.options.typescript ? '.gjs' : '.gts'; + files = files.filter((file) => !(file.endsWith('.js') || file.endsWith('.ts') || strictFilesToRemove)); + } else { files = files.filter((file) => !(file.endsWith('.gjs') || file.endsWith('.gts'))); } diff --git a/blueprints/component/files/__root__/__templatepath__/__templatename__.gjs b/blueprints/component/files/__root__/__templatepath__/__templatename__.gjs new file mode 100644 index 00000000000..5e4278dca53 --- /dev/null +++ b/blueprints/component/files/__root__/__templatepath__/__templatename__.gjs @@ -0,0 +1,9 @@ +<% if (componentClass === '@glimmer/component') {%>import Component from '@glimmer/component'; + +export default class <%= classifiedModuleName %> extends Component { + +}<%} else {%><%}%> diff --git a/blueprints/component/index.js b/blueprints/component/index.js index 2f7f59296c8..e3058290b9b 100644 --- a/blueprints/component/index.js +++ b/blueprints/component/index.js @@ -162,11 +162,11 @@ module.exports = { }); } if (this.options.componentAuthoringFormat === 'strict') { + const strictFilesToRemove = this.options.isTypeScriptProject || this.options.typescript ? '.gjs' : '.gts'; files = files.filter( - (file) => !(file.endsWith('.js') || file.endsWith('.ts') || file.endsWith('.hbs')) + (file) => !(file.endsWith('.js') || file.endsWith('.ts') || file.endsWith('.hbs') || file.endsWith(strictFilesToRemove)) ); - } - if (this.options.componentAuthoringFormat === 'loose') { + } else { files = files.filter((file) => !(file.endsWith('.gjs') || file.endsWith('.gts'))); } From dcecf844b325b189edf3669a25b6c5e59ef562f2 Mon Sep 17 00:00:00 2001 From: Sam Van Campenhout Date: Sat, 22 Mar 2025 19:22:38 +0100 Subject: [PATCH 10/18] Remove the ember-cli-patch We no longer need it since we don't depend on the type removal feature. --- package.json | 5 +-- patches/ember-cli@6.3.0-beta.3.patch | 57 ---------------------------- pnpm-lock.yaml | 15 +++----- 3 files changed, 6 insertions(+), 71 deletions(-) delete mode 100644 patches/ember-cli@6.3.0-beta.3.patch diff --git a/package.json b/package.json index f3783bcd309..5220e76e9c2 100644 --- a/package.json +++ b/package.json @@ -177,10 +177,7 @@ "core-js", "esbuild", "puppeteer" - ], - "patchedDependencies": { - "ember-cli@6.3.0-beta.3": "patches/ember-cli@6.3.0-beta.3.patch" - } + ] }, "peerDependencies": { "@glimmer/component": ">= 1.1.2" diff --git a/patches/ember-cli@6.3.0-beta.3.patch b/patches/ember-cli@6.3.0-beta.3.patch deleted file mode 100644 index e835c88ee27..00000000000 --- a/patches/ember-cli@6.3.0-beta.3.patch +++ /dev/null @@ -1,57 +0,0 @@ -diff --git a/lib/models/blueprint.js b/lib/models/blueprint.js -index ad4853950b4109d143b3a4d560cdf8b430e55691..a1eed678b08ff9759b571fb54b684a6c578f6034 100644 ---- a/lib/models/blueprint.js -+++ b/lib/models/blueprint.js -@@ -15,12 +15,7 @@ const inflector = require('inflection'); - const minimatch = require('minimatch'); - const path = require('path'); - const stringUtils = require('ember-cli-string-utils'); --const merge = require('lodash/merge'); --const zipObject = require('lodash/zipObject'); --const intersection = require('lodash/intersection'); --const cloneDeep = require('lodash/cloneDeep'); --const compact = require('lodash/compact'); --const uniq = require('lodash/uniq'); -+const { merge, zipObject, intersection, cloneDeep, compact, uniq } = require('ember-cli-lodash-subset'); - const walkSync = require('walk-sync'); - const SilentError = require('silent-error'); - const CoreObject = require('core-object'); -@@ -540,14 +535,18 @@ let Blueprint = CoreObject.extend({ - const { Preprocessor } = require('content-tag'); - const preprocessor = new Preprocessor(); - // Strip template tags -- const templateTagIdentifier = (index) => `template = __TEMPLATE_TAG_${index}__;`; -- const templateTagIdentifierBraces = (index) => `(template = __TEMPLATE_TAG_${index}__);`; -+ const replacementClassMember = (i) => `template = __TEMPLATE_TAG_${i}__;`; -+ const replacementExpression = (i) => `__TEMPLATE_TAG_${i}__`; - const templateTagMatches = preprocessor.parse(code); - let strippedCode = code; - for (let i = 0; i < templateTagMatches.length; i++) { - const match = templateTagMatches[i]; - const templateTag = substringBytes(code, match.range.start, match.range.end); -- strippedCode = strippedCode.replace(templateTag, templateTagIdentifier(i)); -+ if (match.type === 'class-member') { -+ strippedCode = strippedCode.replace(templateTag, replacementClassMember(i)); -+ } else { -+ strippedCode = strippedCode.replace(templateTag, replacementExpression(i)); -+ } - } - - // Remove types -@@ -558,8 +557,14 @@ let Blueprint = CoreObject.extend({ - for (let i = 0; i < templateTagMatches.length; i++) { - const match = templateTagMatches[i]; - const templateTag = substringBytes(code, match.range.start, match.range.end); -- transformedWithTemplateTag = transformedWithTemplateTag.replace(templateTagIdentifier(i), templateTag); -- transformedWithTemplateTag = transformedWithTemplateTag.replace(templateTagIdentifierBraces(i), templateTag); -+ if (match.type === 'class-member') { -+ transformedWithTemplateTag = transformedWithTemplateTag.replace(replacementClassMember(i), templateTag); -+ } else { -+ // babel-remove-types uses prettier under the hood, and adds trailing `;` where allowed, -+ // so we need to take that into account when restoring the template tags: -+ transformedWithTemplateTag = transformedWithTemplateTag.replace(`${replacementExpression(i)};`, templateTag); -+ transformedWithTemplateTag = transformedWithTemplateTag.replace(replacementExpression(i), templateTag); -+ } - } - - return transformedWithTemplateTag; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d563e2ac044..aee8488863e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,11 +8,6 @@ overrides: socket.io: ^4.7.0 rollup: ^4.2.0 -patchedDependencies: - ember-cli@6.3.0-beta.3: - hash: 7649c0d1386f77161a35436a9475d20553cb0a841a76fe0681b0939ab96d2347 - path: patches/ember-cli@6.3.0-beta.3.patch - importers: .: @@ -200,7 +195,7 @@ importers: version: 2.0.0(@babel/core@7.26.9) ember-cli: specifier: ^6.3.0-beta.3 - version: 6.3.0-beta.3(patch_hash=7649c0d1386f77161a35436a9475d20553cb0a841a76fe0681b0939ab96d2347)(handlebars@4.7.8)(underscore@1.13.7) + version: 6.3.0-beta.3(handlebars@4.7.8)(underscore@1.13.7) ember-cli-blueprint-test-helpers: specifier: ^0.19.2 version: 0.19.2 @@ -209,7 +204,7 @@ importers: version: 2.1.0 ember-cli-dependency-checker: specifier: ^3.3.1 - version: 3.3.3(ember-cli@6.3.0-beta.3(patch_hash=7649c0d1386f77161a35436a9475d20553cb0a841a76fe0681b0939ab96d2347)(handlebars@4.7.8)(underscore@1.13.7)) + version: 3.3.3(ember-cli@6.3.0-beta.3(handlebars@4.7.8)(underscore@1.13.7)) ember-cli-yuidoc: specifier: ^0.9.1 version: 0.9.1 @@ -15417,10 +15412,10 @@ snapshots: resolve: 1.22.10 semver: 5.7.2 - ember-cli-dependency-checker@3.3.3(ember-cli@6.3.0-beta.3(patch_hash=7649c0d1386f77161a35436a9475d20553cb0a841a76fe0681b0939ab96d2347)(handlebars@4.7.8)(underscore@1.13.7)): + ember-cli-dependency-checker@3.3.3(ember-cli@6.3.0-beta.3(handlebars@4.7.8)(underscore@1.13.7)): dependencies: chalk: 2.4.2 - ember-cli: 6.3.0-beta.3(patch_hash=7649c0d1386f77161a35436a9475d20553cb0a841a76fe0681b0939ab96d2347)(handlebars@4.7.8)(underscore@1.13.7) + ember-cli: 6.3.0-beta.3(handlebars@4.7.8)(underscore@1.13.7) find-yarn-workspace-root: 2.0.0 is-git-url: 1.0.0 resolve: 1.22.10 @@ -15711,7 +15706,7 @@ snapshots: - walrus - whiskers - ember-cli@6.3.0-beta.3(patch_hash=7649c0d1386f77161a35436a9475d20553cb0a841a76fe0681b0939ab96d2347)(handlebars@4.7.8)(underscore@1.13.7): + ember-cli@6.3.0-beta.3(handlebars@4.7.8)(underscore@1.13.7): dependencies: '@pnpm/find-workspace-dir': 7.0.3 babel-remove-types: 1.0.1 From bced5eb62bc47a30227b26af2f5099c41ebee194 Mon Sep 17 00:00:00 2001 From: Sam Van Campenhout Date: Sat, 22 Mar 2025 19:35:03 +0100 Subject: [PATCH 11/18] fixup stop detyping --- blueprints/component-test/index.js | 8 ++++++-- blueprints/component/index.js | 11 +++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/blueprints/component-test/index.js b/blueprints/component-test/index.js index 7d2a4504c75..ae055dc0148 100644 --- a/blueprints/component-test/index.js +++ b/blueprints/component-test/index.js @@ -76,8 +76,12 @@ module.exports = { let files = this._super.files.apply(this, arguments); if (this.options.componentAuthoringFormat === 'strict') { - const strictFilesToRemove = this.options.isTypeScriptProject || this.options.typescript ? '.gjs' : '.gts'; - files = files.filter((file) => !(file.endsWith('.js') || file.endsWith('.ts') || strictFilesToRemove)); + const strictFilesToRemove = + this.options.isTypeScriptProject || this.options.typescript ? '.gjs' : '.gts'; + files = files.filter( + (file) => + !(file.endsWith('.js') || file.endsWith('.ts') || file.endsWith(strictFilesToRemove)) + ); } else { files = files.filter((file) => !(file.endsWith('.gjs') || file.endsWith('.gts'))); } diff --git a/blueprints/component/index.js b/blueprints/component/index.js index e3058290b9b..dc7b1a64166 100644 --- a/blueprints/component/index.js +++ b/blueprints/component/index.js @@ -162,9 +162,16 @@ module.exports = { }); } if (this.options.componentAuthoringFormat === 'strict') { - const strictFilesToRemove = this.options.isTypeScriptProject || this.options.typescript ? '.gjs' : '.gts'; + const strictFilesToRemove = + this.options.isTypeScriptProject || this.options.typescript ? '.gjs' : '.gts'; files = files.filter( - (file) => !(file.endsWith('.js') || file.endsWith('.ts') || file.endsWith('.hbs') || file.endsWith(strictFilesToRemove)) + (file) => + !( + file.endsWith('.js') || + file.endsWith('.ts') || + file.endsWith('.hbs') || + file.endsWith(strictFilesToRemove) + ) ); } else { files = files.filter((file) => !(file.endsWith('.gjs') || file.endsWith('.gts'))); From 3d1d21ee3926bf4e2091f815ac37b151d33f99ca Mon Sep 17 00:00:00 2001 From: Sam Van Campenhout Date: Sat, 22 Mar 2025 19:40:49 +0100 Subject: [PATCH 12/18] Remove the blueprint-js files That folder is no longer used. --- .../__testType__/__path__/__test__.gjs | 38 ------------------- .../__templatepath__/__templatename__.gjs | 3 -- 2 files changed, 41 deletions(-) delete mode 100644 blueprints-js/component-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.gjs delete mode 100644 blueprints-js/component/files/__root__/__templatepath__/__templatename__.gjs diff --git a/blueprints-js/component-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.gjs b/blueprints-js/component-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.gjs deleted file mode 100644 index 33449bb5877..00000000000 --- a/blueprints-js/component-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.gjs +++ /dev/null @@ -1,38 +0,0 @@ -<% if (testType === 'integration') { %>import { module, test } from 'qunit'; -import { setupRenderingTest } from '<%= modulePrefix %>/tests/helpers'; -import { render } from '@ember/test-helpers'; -import <%= componentName %> from '<%= modulePrefix %>/components/<%= componentPathName %>'; - -module('<%= friendlyTestDescription %>', function (hooks) { - setupRenderingTest(hooks); - - test('it renders', async function (assert) { - // Updating values is achieved using autotracking, just like in app code. For example: - // class State { @tracked myProperty = 0; }; const state = new State(); - // and update using state.myProperty = 1; await rerender(); - // Handle any actions with function myAction(val) { ... }; - - await render(); - - assert.dom().hasText(''); - - // Template block usage: - await render(); - - assert.dom().hasText('template block text'); - }); -});<% } else if (testType === 'unit') { %>import { module, test } from 'qunit'; -import { setupTest } from '<%= modulePrefix %>/tests/helpers'; - -module('<%= friendlyTestDescription %>', function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let component = this.owner.factoryFor('component:<%= componentPathName %>').create(); - assert.ok(component); - }); -}); <% } %> diff --git a/blueprints-js/component/files/__root__/__templatepath__/__templatename__.gjs b/blueprints-js/component/files/__root__/__templatepath__/__templatename__.gjs deleted file mode 100644 index e8d9d219abd..00000000000 --- a/blueprints-js/component/files/__root__/__templatepath__/__templatename__.gjs +++ /dev/null @@ -1,3 +0,0 @@ - From 1c3a48f9912ce031f9cb33cf5bda5fd71078e420 Mon Sep 17 00:00:00 2001 From: Sam Van Campenhout Date: Sat, 22 Mar 2025 20:17:07 +0100 Subject: [PATCH 13/18] rename the fixtures This is in line with the PR that cleans up ember-cli-qunit tests --- node-tests/blueprints/component-test-test.js | 24 +++------------- node-tests/blueprints/component-test.js | 24 +++------------- .../component-test/{rfc232.gjs => addon.gjs} | 4 +-- .../component-test/{rfc232.gts => addon.gts} | 4 +-- node-tests/fixtures/component-test/app.gjs | 28 +++++++++++++++++++ node-tests/fixtures/component-test/app.gts | 28 +++++++++++++++++++ 6 files changed, 68 insertions(+), 44 deletions(-) rename node-tests/fixtures/component-test/{rfc232.gjs => addon.gjs} (85%) rename node-tests/fixtures/component-test/{rfc232.gts => addon.gts} (85%) create mode 100644 node-tests/fixtures/component-test/app.gjs create mode 100644 node-tests/fixtures/component-test/app.gts diff --git a/node-tests/blueprints/component-test-test.js b/node-tests/blueprints/component-test-test.js index 654bc597077..b6f007a8c49 100644 --- a/node-tests/blueprints/component-test-test.js +++ b/node-tests/blueprints/component-test-test.js @@ -33,11 +33,7 @@ describe('Blueprint: component-test', function () { it('component-test foo --strict', function () { return emberGenerateDestroy(['component-test', 'foo', '--strict'], (_file) => { expect(_file('tests/integration/components/foo-test.gjs')).to.equal( - fixture('component-test/rfc232.gjs', { - replace: { - modulePrefix: 'my-app', - }, - }) + fixture('component-test/app.gjs') ); }); }); @@ -47,11 +43,7 @@ describe('Blueprint: component-test', function () { ['component-test', 'foo', '--strict', '--typescript'], (_file) => { expect(_file('tests/integration/components/foo-test.gts')).to.equal( - fixture('component-test/rfc232.gts', { - replace: { - modulePrefix: 'my-app', - }, - }) + fixture('component-test/app.gts') ); } ); @@ -95,11 +87,7 @@ describe('Blueprint: component-test', function () { it('component-test foo --strict', function () { return emberGenerateDestroy(['component-test', 'foo', '--strict'], (_file) => { expect(_file('tests/integration/components/foo-test.gjs')).to.equal( - fixture('component-test/rfc232.gjs', { - replace: { - modulePrefix: 'dummy', - }, - }) + fixture('component-test/addon.gjs') ); }); }); @@ -109,11 +97,7 @@ describe('Blueprint: component-test', function () { ['component-test', 'foo', '--strict', '--typescript'], (_file) => { expect(_file('tests/integration/components/foo-test.gts')).to.equal( - fixture('component-test/rfc232.gts', { - replace: { - modulePrefix: 'dummy', - }, - }) + fixture('component-test/addon.gts') ); } ); diff --git a/node-tests/blueprints/component-test.js b/node-tests/blueprints/component-test.js index ed4a13e1773..d772d0ecd4a 100644 --- a/node-tests/blueprints/component-test.js +++ b/node-tests/blueprints/component-test.js @@ -270,11 +270,7 @@ describe('Blueprint: component', function () { ); expect(_file('tests/integration/components/foo-test.gjs')).to.equal( - fixture('component-test/rfc232.gjs', { - replace: { - modulePrefix: 'my-app', - }, - }) + fixture('component-test/app.gjs') ); }); }); @@ -288,11 +284,7 @@ describe('Blueprint: component', function () { ); expect(_file('tests/integration/components/foo-test.gjs')).to.equal( - fixture('component-test/rfc232.gjs', { - replace: { - modulePrefix: 'my-app', - }, - }) + fixture('component-test/app.gjs') ); } ); @@ -313,11 +305,7 @@ describe('Blueprint: component', function () { ); expect(_file('tests/integration/components/foo-test.gts')).to.equal( - fixture('component-test/rfc232.gts', { - replace: { - modulePrefix: 'my-app', - }, - }) + fixture('component-test/app.gts') ); }); }); @@ -331,11 +319,7 @@ describe('Blueprint: component', function () { ); expect(_file('tests/integration/components/foo-test.gts')).to.equal( - fixture('component-test/rfc232.gts', { - replace: { - modulePrefix: 'my-app', - }, - }) + fixture('component-test/app.gts') ); } ); diff --git a/node-tests/fixtures/component-test/rfc232.gjs b/node-tests/fixtures/component-test/addon.gjs similarity index 85% rename from node-tests/fixtures/component-test/rfc232.gjs rename to node-tests/fixtures/component-test/addon.gjs index 76555953899..e1730d07137 100644 --- a/node-tests/fixtures/component-test/rfc232.gjs +++ b/node-tests/fixtures/component-test/addon.gjs @@ -1,7 +1,7 @@ import { module, test } from 'qunit'; -import { setupRenderingTest } from '<%= modulePrefix =%>/tests/helpers'; +import { setupRenderingTest } from 'dummy/tests/helpers'; import { render } from '@ember/test-helpers'; -import Foo from '<%= modulePrefix =%>/components/foo'; +import Foo from 'dummy/components/foo'; module('Integration | Component | foo', function (hooks) { setupRenderingTest(hooks); diff --git a/node-tests/fixtures/component-test/rfc232.gts b/node-tests/fixtures/component-test/addon.gts similarity index 85% rename from node-tests/fixtures/component-test/rfc232.gts rename to node-tests/fixtures/component-test/addon.gts index 76555953899..e1730d07137 100644 --- a/node-tests/fixtures/component-test/rfc232.gts +++ b/node-tests/fixtures/component-test/addon.gts @@ -1,7 +1,7 @@ import { module, test } from 'qunit'; -import { setupRenderingTest } from '<%= modulePrefix =%>/tests/helpers'; +import { setupRenderingTest } from 'dummy/tests/helpers'; import { render } from '@ember/test-helpers'; -import Foo from '<%= modulePrefix =%>/components/foo'; +import Foo from 'dummy/components/foo'; module('Integration | Component | foo', function (hooks) { setupRenderingTest(hooks); diff --git a/node-tests/fixtures/component-test/app.gjs b/node-tests/fixtures/component-test/app.gjs new file mode 100644 index 00000000000..889ab8807a5 --- /dev/null +++ b/node-tests/fixtures/component-test/app.gjs @@ -0,0 +1,28 @@ +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'my-app/tests/helpers'; +import { render } from '@ember/test-helpers'; +import Foo from 'my-app/components/foo'; + +module('Integration | Component | foo', function (hooks) { + setupRenderingTest(hooks); + + test('it renders', async function (assert) { + // Updating values is achieved using autotracking, just like in app code. For example: + // class State { @tracked myProperty = 0; }; const state = new State(); + // and update using state.myProperty = 1; await rerender(); + // Handle any actions with function myAction(val) { ... }; + + await render(); + + assert.dom().hasText(''); + + // Template block usage: + await render(); + + assert.dom().hasText('template block text'); + }); +}); diff --git a/node-tests/fixtures/component-test/app.gts b/node-tests/fixtures/component-test/app.gts new file mode 100644 index 00000000000..889ab8807a5 --- /dev/null +++ b/node-tests/fixtures/component-test/app.gts @@ -0,0 +1,28 @@ +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'my-app/tests/helpers'; +import { render } from '@ember/test-helpers'; +import Foo from 'my-app/components/foo'; + +module('Integration | Component | foo', function (hooks) { + setupRenderingTest(hooks); + + test('it renders', async function (assert) { + // Updating values is achieved using autotracking, just like in app code. For example: + // class State { @tracked myProperty = 0; }; const state = new State(); + // and update using state.myProperty = 1; await rerender(); + // Handle any actions with function myAction(val) { ... }; + + await render(); + + assert.dom().hasText(''); + + // Template block usage: + await render(); + + assert.dom().hasText('template block text'); + }); +}); From 05b60f0618af5537915f6b162e5ac30a92a55bad Mon Sep 17 00:00:00 2001 From: Sam Van Campenhout Date: Sat, 5 Apr 2025 10:14:37 +0200 Subject: [PATCH 14/18] Update the component import path in addon tests We now use the addon name instead of the modulePrefix. --- .../files/__root__/__testType__/__path__/__test__.gjs | 2 +- .../files/__root__/__testType__/__path__/__test__.gts | 2 +- blueprints/component-test/index.js | 1 + node-tests/fixtures/component-test/addon.gjs | 2 +- node-tests/fixtures/component-test/addon.gts | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/blueprints/component-test/files/__root__/__testType__/__path__/__test__.gjs b/blueprints/component-test/files/__root__/__testType__/__path__/__test__.gjs index 33449bb5877..4d1e283fc9e 100644 --- a/blueprints/component-test/files/__root__/__testType__/__path__/__test__.gjs +++ b/blueprints/component-test/files/__root__/__testType__/__path__/__test__.gjs @@ -1,7 +1,7 @@ <% if (testType === 'integration') { %>import { module, test } from 'qunit'; import { setupRenderingTest } from '<%= modulePrefix %>/tests/helpers'; import { render } from '@ember/test-helpers'; -import <%= componentName %> from '<%= modulePrefix %>/components/<%= componentPathName %>'; +import <%= componentName %> from '<%= pkgName %>/components/<%= componentPathName %>'; module('<%= friendlyTestDescription %>', function (hooks) { setupRenderingTest(hooks); diff --git a/blueprints/component-test/files/__root__/__testType__/__path__/__test__.gts b/blueprints/component-test/files/__root__/__testType__/__path__/__test__.gts index 33449bb5877..4d1e283fc9e 100644 --- a/blueprints/component-test/files/__root__/__testType__/__path__/__test__.gts +++ b/blueprints/component-test/files/__root__/__testType__/__path__/__test__.gts @@ -1,7 +1,7 @@ <% if (testType === 'integration') { %>import { module, test } from 'qunit'; import { setupRenderingTest } from '<%= modulePrefix %>/tests/helpers'; import { render } from '@ember/test-helpers'; -import <%= componentName %> from '<%= modulePrefix %>/components/<%= componentPathName %>'; +import <%= componentName %> from '<%= pkgName %>/components/<%= componentPathName %>'; module('<%= friendlyTestDescription %>', function (hooks) { setupRenderingTest(hooks); diff --git a/blueprints/component-test/index.js b/blueprints/component-test/index.js index ae055dc0148..36f5807483c 100644 --- a/blueprints/component-test/index.js +++ b/blueprints/component-test/index.js @@ -129,6 +129,7 @@ module.exports = { selfCloseComponent, friendlyTestDescription, hbsImportStatement, + pkgName: options.project.pkg.name, }; }, diff --git a/node-tests/fixtures/component-test/addon.gjs b/node-tests/fixtures/component-test/addon.gjs index e1730d07137..f68723e10ca 100644 --- a/node-tests/fixtures/component-test/addon.gjs +++ b/node-tests/fixtures/component-test/addon.gjs @@ -1,7 +1,7 @@ import { module, test } from 'qunit'; import { setupRenderingTest } from 'dummy/tests/helpers'; import { render } from '@ember/test-helpers'; -import Foo from 'dummy/components/foo'; +import Foo from 'my-addon/components/foo'; module('Integration | Component | foo', function (hooks) { setupRenderingTest(hooks); diff --git a/node-tests/fixtures/component-test/addon.gts b/node-tests/fixtures/component-test/addon.gts index e1730d07137..f68723e10ca 100644 --- a/node-tests/fixtures/component-test/addon.gts +++ b/node-tests/fixtures/component-test/addon.gts @@ -1,7 +1,7 @@ import { module, test } from 'qunit'; import { setupRenderingTest } from 'dummy/tests/helpers'; import { render } from '@ember/test-helpers'; -import Foo from 'dummy/components/foo'; +import Foo from 'my-addon/components/foo'; module('Integration | Component | foo', function (hooks) { setupRenderingTest(hooks); From 6077a9c094eecb832ce47b12fcb357fd3ff70d0d Mon Sep 17 00:00:00 2001 From: Sam Van Campenhout Date: Mon, 28 Apr 2025 14:36:52 +0200 Subject: [PATCH 15/18] Remove the `unit` test type for strict components --- .../__root__/__testType__/__path__/__test__.gjs | 14 ++------------ .../__root__/__testType__/__path__/__test__.gts | 14 ++------------ 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/blueprints/component-test/files/__root__/__testType__/__path__/__test__.gjs b/blueprints/component-test/files/__root__/__testType__/__path__/__test__.gjs index 4d1e283fc9e..9907ba38222 100644 --- a/blueprints/component-test/files/__root__/__testType__/__path__/__test__.gjs +++ b/blueprints/component-test/files/__root__/__testType__/__path__/__test__.gjs @@ -1,4 +1,4 @@ -<% if (testType === 'integration') { %>import { module, test } from 'qunit'; +import { module, test } from 'qunit'; import { setupRenderingTest } from '<%= modulePrefix %>/tests/helpers'; import { render } from '@ember/test-helpers'; import <%= componentName %> from '<%= pkgName %>/components/<%= componentPathName %>'; @@ -25,14 +25,4 @@ module('<%= friendlyTestDescription %>', function (hooks) { assert.dom().hasText('template block text'); }); -});<% } else if (testType === 'unit') { %>import { module, test } from 'qunit'; -import { setupTest } from '<%= modulePrefix %>/tests/helpers'; - -module('<%= friendlyTestDescription %>', function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let component = this.owner.factoryFor('component:<%= componentPathName %>').create(); - assert.ok(component); - }); -}); <% } %> +}); diff --git a/blueprints/component-test/files/__root__/__testType__/__path__/__test__.gts b/blueprints/component-test/files/__root__/__testType__/__path__/__test__.gts index 4d1e283fc9e..9907ba38222 100644 --- a/blueprints/component-test/files/__root__/__testType__/__path__/__test__.gts +++ b/blueprints/component-test/files/__root__/__testType__/__path__/__test__.gts @@ -1,4 +1,4 @@ -<% if (testType === 'integration') { %>import { module, test } from 'qunit'; +import { module, test } from 'qunit'; import { setupRenderingTest } from '<%= modulePrefix %>/tests/helpers'; import { render } from '@ember/test-helpers'; import <%= componentName %> from '<%= pkgName %>/components/<%= componentPathName %>'; @@ -25,14 +25,4 @@ module('<%= friendlyTestDescription %>', function (hooks) { assert.dom().hasText('template block text'); }); -});<% } else if (testType === 'unit') { %>import { module, test } from 'qunit'; -import { setupTest } from '<%= modulePrefix %>/tests/helpers'; - -module('<%= friendlyTestDescription %>', function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let component = this.owner.factoryFor('component:<%= componentPathName %>').create(); - assert.ok(component); - }); -}); <% } %> +}); From 9bcf063cb989111634581d59f9b5a10078c13df2 Mon Sep 17 00:00:00 2001 From: Sam Van Campenhout Date: Mon, 28 Apr 2025 14:42:28 +0200 Subject: [PATCH 16/18] fix lint issue it seems I messed up during the rebase. --- node-tests/blueprints/component-test-test.js | 164 +++++++++---------- 1 file changed, 79 insertions(+), 85 deletions(-) diff --git a/node-tests/blueprints/component-test-test.js b/node-tests/blueprints/component-test-test.js index b6f007a8c49..8d5331143cf 100644 --- a/node-tests/blueprints/component-test-test.js +++ b/node-tests/blueprints/component-test-test.js @@ -29,112 +29,106 @@ describe('Blueprint: component-test', function () { }) ); }); - - it('component-test foo --strict', function () { - return emberGenerateDestroy(['component-test', 'foo', '--strict'], (_file) => { - expect(_file('tests/integration/components/foo-test.gjs')).to.equal( - fixture('component-test/app.gjs') - ); - }); - }); - - it('component-test foo --strict --typescript', function () { - return emberGenerateDestroy( - ['component-test', 'foo', '--strict', '--typescript'], - (_file) => { - expect(_file('tests/integration/components/foo-test.gts')).to.equal( - fixture('component-test/app.gts') - ); - } - ); - }); }); - it('component-test x-foo --unit', function () { - return emberGenerateDestroy(['component-test', 'x-foo', '--unit'], (_file) => { - expect(_file('tests/unit/components/x-foo-test.js')).to.equal( - fixture('component-test/unit.js') + it('component-test foo --strict', function () { + return emberGenerateDestroy(['component-test', 'foo', '--strict'], (_file) => { + expect(_file('tests/integration/components/foo-test.gjs')).to.equal( + fixture('component-test/app.gjs') ); }); }); - }); - describe('in addon', function () { - beforeEach(function () { - return emberNew({ target: 'addon' }); + it('component-test foo --strict --typescript', function () { + return emberGenerateDestroy( + ['component-test', 'foo', '--strict', '--typescript'], + (_file) => { + expect(_file('tests/integration/components/foo-test.gts')).to.equal( + fixture('component-test/app.gts') + ); + } + ); }); + }); - it('component-test foo', function () { - return emberGenerateDestroy(['component-test', 'foo'], (_file) => { - expect(_file('tests/integration/components/foo-test.js')).to.equal( - fixture('component-test/addon.js', { - replace: { - component: 'foo', - componentInvocation: 'Foo', - }, - }) - ); - }); + it('component-test x-foo --unit', function () { + return emberGenerateDestroy(['component-test', 'x-foo', '--unit'], (_file) => { + expect(_file('tests/unit/components/x-foo-test.js')).to.equal( + fixture('component-test/unit.js') + ); }); + }); +}); - it('component-test foo --unit', function () { - return emberGenerateDestroy(['component-test', 'foo', '--unit'], (_file) => { - expect(_file('tests/unit/components/foo-test.js')).to.equal( - fixture('component-test/addon-unit.js') - ); - }); +describe('in addon', function () { + beforeEach(function () { + return emberNew({ target: 'addon' }); + }); - it('component-test foo --strict', function () { - return emberGenerateDestroy(['component-test', 'foo', '--strict'], (_file) => { - expect(_file('tests/integration/components/foo-test.gjs')).to.equal( - fixture('component-test/addon.gjs') - ); - }); - }); + it('component-test foo', function () { + return emberGenerateDestroy(['component-test', 'foo'], (_file) => { + expect(_file('tests/integration/components/foo-test.js')).to.equal( + fixture('component-test/addon.js', { + replace: { + component: 'foo', + componentInvocation: 'Foo', + }, + }) + ); + }); + }); - it('component-test foo --strict --typescript', function () { - return emberGenerateDestroy( - ['component-test', 'foo', '--strict', '--typescript'], - (_file) => { - expect(_file('tests/integration/components/foo-test.gts')).to.equal( - fixture('component-test/addon.gts') - ); - } - ); - }); + it('component-test foo --unit', function () { + return emberGenerateDestroy(['component-test', 'foo', '--unit'], (_file) => { + expect(_file('tests/unit/components/foo-test.js')).to.equal( + fixture('component-test/addon-unit.js') + ); }); }); - describe('in in-repo-addon', function () { - beforeEach(function () { - return emberNew({ target: 'in-repo-addon' }); + it('component-test foo --strict', function () { + return emberGenerateDestroy(['component-test', 'foo', '--strict'], (_file) => { + expect(_file('tests/integration/components/foo-test.gjs')).to.equal( + fixture('component-test/addon.gjs') + ); }); + }); - it('component-test foo --in-repo-addon=my-addon', function () { - return emberGenerateDestroy( - ['component-test', 'foo', '--in-repo-addon=my-addon'], - (_file) => { - expect(_file('tests/integration/components/foo-test.js')).to.equal( - fixture('component-test/app.js', { - replace: { - component: 'foo', - componentInvocation: 'Foo', - }, - }) - ); - } + it('component-test foo --strict --typescript', function () { + return emberGenerateDestroy(['component-test', 'foo', '--strict', '--typescript'], (_file) => { + expect(_file('tests/integration/components/foo-test.gts')).to.equal( + fixture('component-test/addon.gts') ); }); + }); +}); - it('component-test x-foo --in-repo-addon=my-addon --unit', function () { - return emberGenerateDestroy( - ['component-test', 'x-foo', '--in-repo-addon=my-addon', '--unit'], - (_file) => { - expect(_file('tests/unit/components/x-foo-test.js')).to.equal( - fixture('component-test/unit.js') - ); - } +describe('in in-repo-addon', function () { + beforeEach(function () { + return emberNew({ target: 'in-repo-addon' }); + }); + + it('component-test foo --in-repo-addon=my-addon', function () { + return emberGenerateDestroy(['component-test', 'foo', '--in-repo-addon=my-addon'], (_file) => { + expect(_file('tests/integration/components/foo-test.js')).to.equal( + fixture('component-test/app.js', { + replace: { + component: 'foo', + componentInvocation: 'Foo', + }, + }) ); }); }); + + it('component-test x-foo --in-repo-addon=my-addon --unit', function () { + return emberGenerateDestroy( + ['component-test', 'x-foo', '--in-repo-addon=my-addon', '--unit'], + (_file) => { + expect(_file('tests/unit/components/x-foo-test.js')).to.equal( + fixture('component-test/unit.js') + ); + } + ); + }); }); From 57902a6d8d4250164e4252ff9f0e8cebf6204034 Mon Sep 17 00:00:00 2001 From: Sam Van Campenhout Date: Mon, 28 Apr 2025 14:56:09 +0200 Subject: [PATCH 17/18] fix attempt 2.. mondays <3 --- node-tests/blueprints/component-test-test.js | 130 ++++++++++--------- 1 file changed, 68 insertions(+), 62 deletions(-) diff --git a/node-tests/blueprints/component-test-test.js b/node-tests/blueprints/component-test-test.js index 8d5331143cf..99c4a9273b6 100644 --- a/node-tests/blueprints/component-test-test.js +++ b/node-tests/blueprints/component-test-test.js @@ -49,86 +49,92 @@ describe('Blueprint: component-test', function () { } ); }); - }); - it('component-test x-foo --unit', function () { - return emberGenerateDestroy(['component-test', 'x-foo', '--unit'], (_file) => { - expect(_file('tests/unit/components/x-foo-test.js')).to.equal( - fixture('component-test/unit.js') - ); + it('component-test x-foo --unit', function () { + return emberGenerateDestroy(['component-test', 'x-foo', '--unit'], (_file) => { + expect(_file('tests/unit/components/x-foo-test.js')).to.equal( + fixture('component-test/unit.js') + ); + }); }); }); -}); -describe('in addon', function () { - beforeEach(function () { - return emberNew({ target: 'addon' }); - }); + describe('in addon', function () { + beforeEach(function () { + return emberNew({ target: 'addon' }); + }); - it('component-test foo', function () { - return emberGenerateDestroy(['component-test', 'foo'], (_file) => { - expect(_file('tests/integration/components/foo-test.js')).to.equal( - fixture('component-test/addon.js', { - replace: { - component: 'foo', - componentInvocation: 'Foo', - }, - }) - ); + it('component-test foo', function () { + return emberGenerateDestroy(['component-test', 'foo'], (_file) => { + expect(_file('tests/integration/components/foo-test.js')).to.equal( + fixture('component-test/addon.js', { + replace: { + component: 'foo', + componentInvocation: 'Foo', + }, + }) + ); + }); }); - }); - it('component-test foo --unit', function () { - return emberGenerateDestroy(['component-test', 'foo', '--unit'], (_file) => { - expect(_file('tests/unit/components/foo-test.js')).to.equal( - fixture('component-test/addon-unit.js') - ); + it('component-test foo --unit', function () { + return emberGenerateDestroy(['component-test', 'foo', '--unit'], (_file) => { + expect(_file('tests/unit/components/foo-test.js')).to.equal( + fixture('component-test/addon-unit.js') + ); + }); }); - }); - it('component-test foo --strict', function () { - return emberGenerateDestroy(['component-test', 'foo', '--strict'], (_file) => { - expect(_file('tests/integration/components/foo-test.gjs')).to.equal( - fixture('component-test/addon.gjs') - ); + it('component-test foo --strict', function () { + return emberGenerateDestroy(['component-test', 'foo', '--strict'], (_file) => { + expect(_file('tests/integration/components/foo-test.gjs')).to.equal( + fixture('component-test/addon.gjs') + ); + }); }); - }); - it('component-test foo --strict --typescript', function () { - return emberGenerateDestroy(['component-test', 'foo', '--strict', '--typescript'], (_file) => { - expect(_file('tests/integration/components/foo-test.gts')).to.equal( - fixture('component-test/addon.gts') + it('component-test foo --strict --typescript', function () { + return emberGenerateDestroy( + ['component-test', 'foo', '--strict', '--typescript'], + (_file) => { + expect(_file('tests/integration/components/foo-test.gts')).to.equal( + fixture('component-test/addon.gts') + ); + } ); }); }); -}); -describe('in in-repo-addon', function () { - beforeEach(function () { - return emberNew({ target: 'in-repo-addon' }); - }); + describe('in in-repo-addon', function () { + beforeEach(function () { + return emberNew({ target: 'in-repo-addon' }); + }); - it('component-test foo --in-repo-addon=my-addon', function () { - return emberGenerateDestroy(['component-test', 'foo', '--in-repo-addon=my-addon'], (_file) => { - expect(_file('tests/integration/components/foo-test.js')).to.equal( - fixture('component-test/app.js', { - replace: { - component: 'foo', - componentInvocation: 'Foo', - }, - }) + it('component-test foo --in-repo-addon=my-addon', function () { + return emberGenerateDestroy( + ['component-test', 'foo', '--in-repo-addon=my-addon'], + (_file) => { + expect(_file('tests/integration/components/foo-test.js')).to.equal( + fixture('component-test/app.js', { + replace: { + component: 'foo', + componentInvocation: 'Foo', + }, + }) + ); + } ); }); - }); - it('component-test x-foo --in-repo-addon=my-addon --unit', function () { - return emberGenerateDestroy( - ['component-test', 'x-foo', '--in-repo-addon=my-addon', '--unit'], - (_file) => { - expect(_file('tests/unit/components/x-foo-test.js')).to.equal( - fixture('component-test/unit.js') - ); - } - ); + it('component-test x-foo --in-repo-addon=my-addon --unit', function () { + return emberGenerateDestroy( + ['component-test', 'x-foo', '--in-repo-addon=my-addon', '--unit'], + (_file) => { + expect(_file('tests/unit/components/x-foo-test.js')).to.equal( + fixture('component-test/unit.js') + ); + } + ); + }); }); }); From 9f040311e1c97d284ad24e5b85bc10d416d7a66c Mon Sep 17 00:00:00 2001 From: Katie Gengler Date: Mon, 28 Apr 2025 15:09:57 -0400 Subject: [PATCH 18/18] Update to published ember-cli 6.3 --- package.json | 2 +- pnpm-lock.yaml | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 5220e76e9c2..c4c6efa883b 100644 --- a/package.json +++ b/package.json @@ -127,7 +127,7 @@ "babel-plugin-ember-template-compilation": "^2.1.1", "dag-map": "^2.0.2", "decorator-transforms": "2.0.0", - "ember-cli": "^6.3.0-beta.3", + "ember-cli": "^6.3.0", "ember-cli-blueprint-test-helpers": "^0.19.2", "ember-cli-browserstack": "^2.0.1", "ember-cli-dependency-checker": "^3.3.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index aee8488863e..5faa646fb92 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -194,8 +194,8 @@ importers: specifier: 2.0.0 version: 2.0.0(@babel/core@7.26.9) ember-cli: - specifier: ^6.3.0-beta.3 - version: 6.3.0-beta.3(handlebars@4.7.8)(underscore@1.13.7) + specifier: ^6.3.0 + version: 6.3.1(handlebars@4.7.8)(underscore@1.13.7) ember-cli-blueprint-test-helpers: specifier: ^0.19.2 version: 0.19.2 @@ -204,7 +204,7 @@ importers: version: 2.1.0 ember-cli-dependency-checker: specifier: ^3.3.1 - version: 3.3.3(ember-cli@6.3.0-beta.3(handlebars@4.7.8)(underscore@1.13.7)) + version: 3.3.3(ember-cli@6.3.1(handlebars@4.7.8)(underscore@1.13.7)) ember-cli-yuidoc: specifier: ^0.9.1 version: 0.9.1 @@ -5835,8 +5835,8 @@ packages: engines: {node: '>= 18'} hasBin: true - ember-cli@6.3.0-beta.3: - resolution: {integrity: sha512-YnsRt7Y8jK5hxMhDzRxulZFrq4K3EjwIdAQS9cRhJL/gJGLRjqcug8yBm8vfVip8uP7mEMPg+1gCgrib3Tkk/g==} + ember-cli@6.3.1: + resolution: {integrity: sha512-RtQ78/zl8qUbqaBNIY3+wzcoxVxPkr0zwfU/JycY6Wd4JRviBL9bAkWrfSQqy+xTxou5fV7BPxjekDvoBaB1yw==} engines: {node: '>= 18'} hasBin: true @@ -15412,10 +15412,10 @@ snapshots: resolve: 1.22.10 semver: 5.7.2 - ember-cli-dependency-checker@3.3.3(ember-cli@6.3.0-beta.3(handlebars@4.7.8)(underscore@1.13.7)): + ember-cli-dependency-checker@3.3.3(ember-cli@6.3.1(handlebars@4.7.8)(underscore@1.13.7)): dependencies: chalk: 2.4.2 - ember-cli: 6.3.0-beta.3(handlebars@4.7.8)(underscore@1.13.7) + ember-cli: 6.3.1(handlebars@4.7.8)(underscore@1.13.7) find-yarn-workspace-root: 2.0.0 is-git-url: 1.0.0 resolve: 1.22.10 @@ -15706,7 +15706,7 @@ snapshots: - walrus - whiskers - ember-cli@6.3.0-beta.3(handlebars@4.7.8)(underscore@1.13.7): + ember-cli@6.3.1(handlebars@4.7.8)(underscore@1.13.7): dependencies: '@pnpm/find-workspace-dir': 7.0.3 babel-remove-types: 1.0.1