-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
Update ember to 5.5, drop Nodes below 18, drop Mocha support #1125
Conversation
# Conflicts: # .eslintignore # .eslintrc.js # .github/workflows/ci.yml # .gitignore # .npmignore # .prettierignore # CONTRIBUTING.md # README.md # ember-cli-build.js # tests/dummy/app/index.html # tests/dummy/app/styles/app.css # tests/dummy/config/addon-docs.js # tests/dummy/config/deploy.js # tests/dummy/config/ember-try.js # tests/index.html
- ember-data was using @ember/string which is deprecated to use, so it had to be bumped to the latest v5.3.0 - ember-cli-addon-docs is using ember-data and need to be bumped to the latest version v7.0.0 in order to make it work with the latest ember-data. - ember-cli-clipboard (a dependency of ember-cli-addon-docs) depends on @ember/string and doesn't specify it as dependency. So, we need to specify it as our dependency here. - Bump @embroider/macros to the latest version to let it properly detect presence of the ember-qunit/ember-mocha.
Long time ago linters were run as tests. And ember-exam was splitting tests into partitions in lint aware style because linting tests are much faster than regular tests. Nowadays we don't run linters as tests and this feature is no longer necessary. Remove it from the code to avoid the confusion of the future generations. The initial driver for this change was a failing test which was complaining on something related to jshint and potentially it was caused by removal of jshint support from ember-cli.
`yarn lint:js --fix`
eslint-plugin-node was replaced by eslint-plugin-n
It is no longer supported by ember-cli
Update all dependencies to the latest `execa` and `chalk` are ESM now, thus we need to import them asynchronously. `rimraf` offers different imports now `istanbul` is not needed as a dependency as `nyc` is used instead. `release-it-lerna-changelog` was renamed to `@release-it-plugins/lerna-changelog` `testdouble` wasn't used anywhere `yarn upgrade`
The scenario wasn't working with ember-cli@5 and ember-qunit has been out for a while.
They are no longer working with ember-cli@5.5.0
By some reason ember-try is checking for bower looking at scenario.bower, scenario.dependencies and scenario.devDependencies: https://github.com/ember-cli/ember-try/blob/8fca8fc3aad863c5902a965287d728415a4a4663/lib/utils/dependency-manager-adapter-factory.js#L20 Fix the error by moving devDependencies into npm object which is correct anyway, not sure how it worked before. Seems that peerDependencies also should be nullified as otherwise there is an error: ``` ember-exam tried to import "ember-qunit" in "ember-exam/test-support/-private/ember-exam-qunit-test-loader.js" but the package was not resolvable from <path>/ember-exam ```
We can use Object.assign instead
ember-mocha is not compatible with ember@5 and its support is dropped, so, we can remove mocha support from ember-exam now. @embroider/macros is not needed anymore as we can use static imports now everywhere. qunit and ember-qunit are required peer dependencies now. Normalize test modules to use the same syntax: tests are defined in the scope of module, use non-arrow functions in modules and tests definitions. Normalize `ember-qunit` name everywhere in the docs.
`qunit` in path is now redundant as it is the only supported testing framework now,
We run eslint as a standalone check
The behavior was changed here but the tests were not updated accordingly: #750
Actualise number of tests. Remove `ember-test` from the list of tests which doesn't actually exist.
const { execa: originalExeca } = await import('execa'); | ||
return originalExeca(command, args); | ||
} | ||
|
||
describe('Acceptance | Exam Iterate Command', function () { | ||
this.timeout(300000); | ||
|
||
it('should build the app, test it a number of times, and clean it up', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, here, you could pass an async function as the second arg to it
and use await
tests/dummy/config/ember-try.js
Outdated
'ember-cli-chai': '*', | ||
'ember-mocha': '*', | ||
'ember-qunit': null, | ||
npm: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It probably wasn't working before 😬
Thank you for doing this, and thank you for the focused commits; made it so much easier to review! |
No description provided.