Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ember 3.28 upgrade #350

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

BryanCrotaz
Copy link

No description provided.

package.json Outdated Show resolved Hide resolved
@tehhowch
Copy link

Thanks for walking the ember-auto-import update back 👍

I wonder if the CI needs to be switched to GitHub actions too; that'd be something to do in a different PR, possibly first, to ensure the compatibility checks are run and shown here on GitHub

@BryanCrotaz
Copy link
Author

BryanCrotaz commented Sep 16, 2022

Ship this one first, then move to GitHub actions. Don't let perfect get in the way of better.

Copy link

@tehhowch tehhowch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating the configs for the ember 4 scenarios as suggested in my comments let me obtain this locally:

------ RESULTS ------

Scenario ember-lts-3.4: SUCCESS
Command run: ember test
┌────────────────────┬────────────────────┬──────────────────────────────┬──────────┐
│ Dependency         │ Expected           │ Used                         │ Type     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ ember-source       │ ~3.4.0             │ 3.4.8                        │ yarn     │
└────────────────────┴────────────────────┴──────────────────────────────┴──────────┘

Scenario ember-lts-3.28: SUCCESS
Command run: ember test
┌────────────────────┬────────────────────┬──────────────────────────────┬──────────┐
│ Dependency         │ Expected           │ Used                         │ Type     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ ember-source       │ ~3.28.0            │ 3.28.9                       │ yarn     │
└────────────────────┴────────────────────┴──────────────────────────────┴──────────┘

Scenario ember-release: SUCCESS
Command run: ember test
┌────────────────────┬────────────────────┬──────────────────────────────┬──────────┐
│ Dependency         │ Expected           │ Used                         │ Type     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ ember-source       │ https://s3.amazon… │ 4.7.0-release+0c59b21b       │ yarn     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ ember-auto-import  │ ^2                 │ 2.4.2                        │ yarn     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ webpack            │ ^5                 │ 5.74.0                       │ yarn     │
└────────────────────┴────────────────────┴──────────────────────────────┴──────────┘

Scenario ember-beta: SUCCESS
Command run: ember test
┌────────────────────┬────────────────────┬──────────────────────────────┬──────────┐
│ Dependency         │ Expected           │ Used                         │ Type     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ ember-source       │ https://s3.amazon… │ 4.8.0-beta.3.beta+dd86f3d4   │ yarn     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ ember-auto-import  │ ^2                 │ 2.4.2                        │ yarn     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ webpack            │ ^5                 │ 5.74.0                       │ yarn     │
└────────────────────┴────────────────────┴──────────────────────────────┴──────────┘

Scenario ember-canary: SUCCESS
Command run: ember test
┌────────────────────┬────────────────────┬──────────────────────────────┬──────────┐
│ Dependency         │ Expected           │ Used                         │ Type     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ ember-source       │ https://s3.amazon… │ 4.9.0-alpha.1.canary+f4e074… │ yarn     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ ember-auto-import  │ ^2                 │ 2.4.2                        │ yarn     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ webpack            │ ^5                 │ 5.74.0                       │ yarn     │
└────────────────────┴────────────────────┴──────────────────────────────┴──────────┘

Scenario ember-default-with-jquery: SUCCESS
Command run: ember test
with env: {
  "EMBER_OPTIONAL_FEATURES": "{\"jquery-integration\":true}"
}
┌────────────────────┬────────────────────┬──────────────────────────────┬──────────┐
│ Dependency         │ Expected           │ Used                         │ Type     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ @ember/jquery      │ ^1.1.0             │ 1.1.0                        │ yarn     │
└────────────────────┴────────────────────┴──────────────────────────────┴──────────┘

Scenario ember-classic: SUCCESS
Command run: ember test
with env: {
  "EMBER_OPTIONAL_FEATURES": "{\"application-template-wrapper\":true,\"default-async-observers\":false,\"template-only-glimmer-components\":false}"
}
Scenario embroider-safe: SUCCESS
Command run: ember test
with env: {
  "EMBROIDER_TEST_SETUP_OPTIONS": "safe"
}
┌────────────────────┬────────────────────┬──────────────────────────────┬──────────┐
│ Dependency         │ Expected           │ Used                         │ Type     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ @embroider/core    │ 0.43.5             │ 0.43.5                       │ yarn     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ @embroider/webpack │ 0.43.5             │ 0.43.5                       │ yarn     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ @embroider/compat  │ 0.43.5             │ 0.43.5                       │ yarn     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ webpack            │ ^5                 │ 5.74.0                       │ yarn     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ ember-auto-import  │ ^2                 │ 2.4.2                        │ yarn     │
└────────────────────┴────────────────────┴──────────────────────────────┴──────────┘

Scenario embroider-optimized: SUCCESS
Command run: ember test
with env: {
  "EMBROIDER_TEST_SETUP_OPTIONS": "optimized"
}
┌────────────────────┬────────────────────┬──────────────────────────────┬──────────┐
│ Dependency         │ Expected           │ Used                         │ Type     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ @embroider/core    │ 0.43.5             │ 0.43.5                       │ yarn     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ @embroider/webpack │ 0.43.5             │ 0.43.5                       │ yarn     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ @embroider/compat  │ 0.43.5             │ 0.43.5                       │ yarn     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ webpack            │ ^5                 │ 5.74.0                       │ yarn     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ ember-auto-import  │ ^2                 │ 2.4.2                        │ yarn     │
└────────────────────┴────────────────────┴──────────────────────────────┴──────────┘


All 9 scenarios succeeded

Comment on lines 19 to +32
name: 'ember-lts-3.8',
npm: {
devDependencies: {
'ember-source': '~3.8.0'
}
}
'ember-source': '~3.8.0',
},
},
},
{
name: 'ember-lts-3.20',
npm: {
devDependencies: {
'ember-source': '~3.8.0',
},
},

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than add 3.20, i suggest modifying the 3.8 entry to test compatibility with 3.28.

So:

  1. keep 3.4 for now, since you are not dropping support for it
  2. remove 3.20 entry
  3. change 3.8 to 3.28 (and update the source dependency)

Comment on lines +38 to +56
'ember-source': await getChannelURL('release'),
},
},
},
{
name: 'ember-beta',
npm: {
devDependencies: {
'ember-source': await getChannelURL('beta')
}
}
'ember-source': await getChannelURL('beta'),
},
},
},
{
name: 'ember-canary',
npm: {
devDependencies: {
'ember-source': await getChannelURL('canary')
}
}
'ember-source': await getChannelURL('canary'),
},
},

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These three scenarios, plus the 2 embroider scenarios, all need to include webpack and ember-auto-import v2 as devDependencies as well.

I suggest defining that at the top of this file as

const ember4AddtlDeps = {
  'ember-auto-import': '^2',
  'webpack': '^5',
};

and then update the configs here to be e.g.

npm: {
  devDependencies: {
    ...ember4AddtlDeps,
    'ember-source': await getChannelURL(...),
  },
},

Comment on lines +86 to +87
embroiderSafe(),
embroiderOptimized(),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two scenarios fail with

not ok 1 Chrome 105.0 - [undefined ms] - Global error: Uncaught Error: Could not find module `qunit` imported from `(require)` at http://localhost:7357/assets/vendor.js, line 256
    ---
        browser log: |
            {"type":"error","text":"Uncaught Error: Could not find module `qunit` imported from `(require)` at http://localhost:7357/assets/vendor.js, line 256\n","testContext":{}}
    ...
not ok 2 Chrome 105.0 - [undefined ms] - Global error: Uncaught Error: The tests file was not loaded. Make sure your tests index.html includes "assets/tests.js". at http://localhost:7357/2331987804929543/tests/index.html?hidepassed, line 53
    ---
        browser log: |
            {"type":"error","text":"Uncaught Error: The tests file was not loaded. Make sure your tests index.html includes \"assets/tests.js\". at http://localhost:7357/2331987804929543/tests/index.html?hidepassed, line 53\n","testContext":{"state":"complete"}}

The resolution is similar:

Suggested change
embroiderSafe(),
embroiderOptimized(),
embroiderSafe({
npm: {
devDependencies: { ...ember4AddtlDeps },
},
}),
embroiderOptimized({
npm: {
devDependencies: { ...ember4AddtlDeps },
},
}),

@tehhowch
Copy link

tehhowch commented Nov 9, 2022

@BryanCrotaz ping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants