From bd15867d6341b5139d6e15cf57d4c51ee195c8fc Mon Sep 17 00:00:00 2001 From: Edward Faulkner Date: Thu, 22 Aug 2024 17:01:55 -0400 Subject: [PATCH 1/4] Back onto real canary releases This switches our canary scenarios back to actualy latest published alpha. Previously they had been locked into an older fixed snapshot. --- pnpm-lock.yaml | 120 ++++++++++++++++------------------- tests/scenarios/package.json | 4 +- 2 files changed, 58 insertions(+), 66 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 14e9e146d..cefd8aa8a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1851,8 +1851,8 @@ importers: specifier: npm:ember-source@beta version: /ember-source@5.12.0-beta.1(webpack@5.94.0) ember-source-canary: - specifier: https://s3.amazonaws.com/builds.emberjs.com/canary/shas/370cf34f9e86df17b880f11fef35a5a0f24ff38a.tgz - version: '@s3.amazonaws.com/builds.emberjs.com/canary/shas/370cf34f9e86df17b880f11fef35a5a0f24ff38a.tgz(@babel/core@7.25.2)(webpack@5.94.0)' + specifier: npm:ember-source@alpha + version: /ember-source@6.0.0-alpha.1(webpack@5.94.0) ember-source-latest: specifier: npm:ember-source@latest version: /ember-source@5.11.0(webpack@5.94.0) @@ -16393,6 +16393,60 @@ packages: dev: true patched: true + /ember-source@6.0.0-alpha.1(webpack@5.94.0): + resolution: {integrity: sha512-ZEAWeV/YLbJRdTyZO3z/umlajryFkRTzgLN7nRnVLDDapp/LVBmwlosJE46hEYa3VtytpBl8giQ/38Y1isjYgw==} + engines: {node: '>= 18.*'} + peerDependencies: + '@glimmer/component': ^1.1.2 + dependencies: + '@babel/core': 7.25.2 + '@ember/edition-utils': 1.2.0 + '@glimmer/compiler': 0.92.0 + '@glimmer/destroyable': 0.92.0 + '@glimmer/env': 0.1.7 + '@glimmer/global-context': 0.92.0 + '@glimmer/interfaces': 0.92.0 + '@glimmer/manager': 0.92.0 + '@glimmer/node': 0.92.0 + '@glimmer/opcode-compiler': 0.92.0 + '@glimmer/owner': 0.92.0 + '@glimmer/program': 0.92.0 + '@glimmer/reference': 0.92.0 + '@glimmer/runtime': 0.92.0 + '@glimmer/syntax': 0.92.0 + '@glimmer/util': 0.92.0 + '@glimmer/validator': 0.92.0 + '@glimmer/vm': 0.92.0 + '@glimmer/vm-babel-plugins': 0.92.0(@babel/core@7.25.2) + '@simple-dom/interface': 1.4.0 + backburner.js: 2.8.0 + broccoli-file-creator: 2.1.1 + broccoli-funnel: 3.0.8 + broccoli-merge-trees: 4.2.0 + chalk: 4.1.2 + ember-auto-import: 2.7.4(@glint/template@1.4.0)(webpack@5.94.0) + ember-cli-babel: 8.2.0(@babel/core@7.25.2) + ember-cli-get-component-path-option: 1.0.0 + ember-cli-is-package-missing: 1.0.0 + ember-cli-normalize-entity-name: 1.0.0 + ember-cli-path-utils: 1.0.0 + ember-cli-string-utils: 1.1.0 + ember-cli-typescript-blueprint-polyfill: 0.1.0 + ember-cli-version-checker: 5.1.2 + ember-router-generator: 2.0.0 + inflection: 2.0.1 + route-recognizer: 0.3.4 + router_js: 8.0.6(route-recognizer@0.3.4) + semver: 7.6.3 + silent-error: 1.1.1 + simple-html-tokenizer: 0.5.11 + transitivePeerDependencies: + - '@glint/template' + - rsvp + - supports-color + - webpack + dev: true + /ember-style-modifier@0.8.0(@babel/core@7.25.2): resolution: {integrity: sha512-I7M+oZ+poYYOP7n521rYv7kkYZbxotL8VbtHYxLQ3tasRZYQJ21qfu3vVjydSjwyE3w7EZRgKngBoMhKSAEZnw==} engines: {node: 12.* || 14.* || >= 16} @@ -25432,65 +25486,3 @@ packages: resolution: {integrity: sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==} engines: {node: '>=18'} dev: true - - '@s3.amazonaws.com/builds.emberjs.com/canary/shas/370cf34f9e86df17b880f11fef35a5a0f24ff38a.tgz(@babel/core@7.25.2)(webpack@5.94.0)': - resolution: {tarball: https://s3.amazonaws.com/builds.emberjs.com/canary/shas/370cf34f9e86df17b880f11fef35a5a0f24ff38a.tgz} - id: '@s3.amazonaws.com/builds.emberjs.com/canary/shas/370cf34f9e86df17b880f11fef35a5a0f24ff38a.tgz' - name: ember-source - version: 5.7.0-alpha.1.canary - engines: {node: '>= 16.*'} - dependencies: - '@babel/helper-module-imports': 7.24.7(supports-color@8.1.1) - '@ember/edition-utils': 1.2.0 - '@glimmer/compiler': 0.87.1 - '@glimmer/component': 1.1.2(@babel/core@7.25.2) - '@glimmer/destroyable': 0.87.1 - '@glimmer/env': 0.1.7 - '@glimmer/global-context': 0.87.1 - '@glimmer/interfaces': 0.87.1 - '@glimmer/manager': 0.87.1 - '@glimmer/node': 0.87.1 - '@glimmer/opcode-compiler': 0.87.1 - '@glimmer/owner': 0.87.1 - '@glimmer/program': 0.87.1 - '@glimmer/reference': 0.87.1 - '@glimmer/runtime': 0.87.1 - '@glimmer/syntax': 0.87.1 - '@glimmer/util': 0.87.1 - '@glimmer/validator': 0.87.1 - '@glimmer/vm': 0.87.1 - '@glimmer/vm-babel-plugins': 0.87.1(@babel/core@7.25.2) - '@simple-dom/interface': 1.4.0 - babel-plugin-debug-macros: 0.3.4(@babel/core@7.25.2) - babel-plugin-ember-template-compilation: 2.2.5 - babel-plugin-filter-imports: 4.0.0 - backburner.js: 2.8.0 - broccoli-concat: 4.2.5 - broccoli-debug: 0.6.5 - broccoli-file-creator: 2.1.1 - broccoli-funnel: 3.0.8 - broccoli-merge-trees: 4.2.0 - chalk: 4.1.2 - ember-auto-import: 2.7.4(@glint/template@1.4.0)(webpack@5.94.0) - ember-cli-babel: 7.26.11 - ember-cli-get-component-path-option: 1.0.0 - ember-cli-is-package-missing: 1.0.0 - ember-cli-normalize-entity-name: 1.0.0 - ember-cli-path-utils: 1.0.0 - ember-cli-string-utils: 1.1.0 - ember-cli-typescript-blueprint-polyfill: 0.1.0 - ember-cli-version-checker: 5.1.2 - ember-router-generator: 2.0.0 - inflection: 2.0.1 - route-recognizer: 0.3.4 - router_js: 8.0.6(route-recognizer@0.3.4) - semver: 7.6.3 - silent-error: 1.1.1 - simple-html-tokenizer: 0.5.11 - transitivePeerDependencies: - - '@babel/core' - - '@glint/template' - - rsvp - - supports-color - - webpack - dev: true diff --git a/tests/scenarios/package.json b/tests/scenarios/package.json index a01b9d34e..6ebef2cc2 100644 --- a/tests/scenarios/package.json +++ b/tests/scenarios/package.json @@ -93,7 +93,7 @@ "ember-source-5.4": "npm:ember-source@~5.4.0", "ember-source-5.8": "npm:ember-source@~5.8.0", "ember-source-beta": "npm:ember-source@beta", - "ember-source-canary": "https://s3.amazonaws.com/builds.emberjs.com/canary/shas/370cf34f9e86df17b880f11fef35a5a0f24ff38a.tgz", + "ember-source-canary": "npm:ember-source@alpha", "ember-source-latest": "npm:ember-source@latest", "ember-test-helpers-2": "npm:@ember/test-helpers@^2.0.0", "ember-truth-helpers": "^3.0.0", @@ -106,4 +106,4 @@ "typescript": "^5.4.5", "webpack": "^5.90.3" } -} \ No newline at end of file +} From c32cffde0ff86f029b2e7970ec147dcacdaaefa7 Mon Sep 17 00:00:00 2001 From: Edward Faulkner Date: Thu, 22 Aug 2024 18:13:28 -0400 Subject: [PATCH 2/4] cleaning up ember 6.0 api removals in test suite --- packages/macros/tests/glimmer/macro-maybe-attrs.test.ts | 4 ++-- .../sample-transforms/tests/dummy/config/environment.js | 5 +---- tests/fixtures/fastboot-app/config/environment.js | 5 +---- tests/fixtures/macro-test/config/environment.js | 5 +---- .../tests/integration/components/macro-if-test.js | 2 +- tests/scenarios/compat-route-split-test.ts | 8 ++------ tests/scenarios/compat-template-colocation-test.ts | 4 +--- 7 files changed, 9 insertions(+), 24 deletions(-) diff --git a/packages/macros/tests/glimmer/macro-maybe-attrs.test.ts b/packages/macros/tests/glimmer/macro-maybe-attrs.test.ts index 98b0aed4f..8b6347794 100644 --- a/packages/macros/tests/glimmer/macro-maybe-attrs.test.ts +++ b/packages/macros/tests/glimmer/macro-maybe-attrs.test.ts @@ -23,9 +23,9 @@ describe(`macroMaybeAttrs`, function () { test('macroMaybeAttrs leaves other modifiers alone', function () { let code = transform( - `
` + `
` ); - expect(code).toMatch(/
` + hbs`
` ); let target = this.element.querySelector('[data-test-target]'); await click(target); diff --git a/tests/scenarios/compat-route-split-test.ts b/tests/scenarios/compat-route-split-test.ts index 116b1f2b5..5d631e1d4 100644 --- a/tests/scenarios/compat-route-split-test.ts +++ b/tests/scenarios/compat-route-split-test.ts @@ -327,9 +327,7 @@ splitScenarios EmberENV: { FEATURES: { }, - EXTEND_PROTOTYPES: { - Date: false - } + EXTEND_PROTOTYPES: false, }, APP: {} }; @@ -503,9 +501,7 @@ splitScenarios EmberENV: { FEATURES: { }, - EXTEND_PROTOTYPES: { - Date: false - } + EXTEND_PROTOTYPES: false, }, APP: {} }; diff --git a/tests/scenarios/compat-template-colocation-test.ts b/tests/scenarios/compat-template-colocation-test.ts index 02e4a0c39..395412ea5 100644 --- a/tests/scenarios/compat-template-colocation-test.ts +++ b/tests/scenarios/compat-template-colocation-test.ts @@ -332,9 +332,7 @@ appScenarios EmberENV: { FEATURES: { }, - EXTEND_PROTOTYPES: { - Date: false - } + EXTEND_PROTOTYPES: false, }, APP: {} }; From 46379114711ba7753c01408d1f023c6fbab2d5ec Mon Sep 17 00:00:00 2001 From: Edward Faulkner Date: Thu, 22 Aug 2024 23:41:22 -0400 Subject: [PATCH 3/4] remove unsupported non-colocated component template --- tests/scenarios/compat-stage2-test.ts | 33 +++++---------------------- 1 file changed, 6 insertions(+), 27 deletions(-) diff --git a/tests/scenarios/compat-stage2-test.ts b/tests/scenarios/compat-stage2-test.ts index 53b6ceb0a..43a4736c2 100644 --- a/tests/scenarios/compat-stage2-test.ts +++ b/tests/scenarios/compat-stage2-test.ts @@ -389,20 +389,11 @@ stage2Scenarios - `, 'curly.hbs': ` {{hello-world useDynamic="first-choice" }} {{hello-world useDynamic=(component "third-choice") }} `, - components: { - 'first-choice.hbs': 'first', - 'second-choice.hbs': 'second', - 'third-choice.hbs': 'third', - 'module-name-check': { - 'index.hbs': '
hello world
', - }, - }, }, components: { 'uses-inline-template.js': ` @@ -411,6 +402,12 @@ stage2Scenarios layout: hbs${'`'}${'`'} }) `, + 'first-choice.hbs': 'first', + 'second-choice.hbs': 'second', + 'third-choice.hbs': 'third', + 'module-name-check': { + 'index.hbs': '
hello world
', + }, }, 'use-deep-addon.js': `import thing from 'deep-addon'`, 'custom-babel-needed.js': `console.log('embroider-sample-transforms-target');`, @@ -488,9 +485,6 @@ stage2Scenarios }, templates: { 'app-example.hbs': `{{component this.stuff}}`, - components: { - 'direct-template-reexport.js': `export { default } from 'my-addon/templates/components/hello-world';`, - }, }, }, public: { @@ -690,21 +684,6 @@ stage2Scenarios }); }); - test('app/templates/components/direct-template-reexport.js', function (assert) { - expectAudit - .module('./templates/index.hbs') - .resolves(/my-addon\/_app_\/templates\/components\/direct-template-reexport\.js\/-embroider-pair-component/) - .toModule() - .resolves(/my-addon\/_app_\/templates\/components\/direct-template-reexport\.js/) - .toModule() - .withContents(contents => { - assert.ok( - /export { default } from ".*\/my-addon\/templates\/components\/hello-world.hbs.*";/.test(contents) - ); - return true; - }); - }); - test('uses-inline-template.js', function (assert) { expectAudit .module('./components/uses-inline-template.js') From e1f9c1eeddf2fc65fe9bce6e258b7effc8d60890 Mon Sep 17 00:00:00 2001 From: Edward Faulkner Date: Fri, 23 Aug 2024 10:59:17 -0400 Subject: [PATCH 4/4] make CommandWatcher dump logs at shutdown() when a command has failed --- tests/scenarios/helpers/command-watcher.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/scenarios/helpers/command-watcher.ts b/tests/scenarios/helpers/command-watcher.ts index ca9d145eb..817ec1cf1 100644 --- a/tests/scenarios/helpers/command-watcher.ts +++ b/tests/scenarios/helpers/command-watcher.ts @@ -105,6 +105,7 @@ export default class CommandWatcher { async shutdown(): Promise { if (this.exitCode != null) { + this.maybeEmitLogs(); return; } @@ -119,6 +120,14 @@ export default class CommandWatcher { }); await this.waitForExit(); + this.maybeEmitLogs(); + } + + private maybeEmitLogs() { + if (this.exitCode !== 0) { + console.error(`CommandWatcher saw non-zero exit, dumping logs:`); + console.error(this.lines.join('\n')); + } } async waitForExit(): Promise {