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

Update ember to 5.5, drop Nodes below 18, drop Mocha support #1125

Merged
merged 18 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .bowerrc

This file was deleted.

8 changes: 3 additions & 5 deletions .ember-cli
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
/**
Ember CLI sends analytics information by default. The data is completely
anonymous, but there are times when you might want to disable this behavior.

Setting `disableAnalytics` to true will prevent any data from being sent.
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
*/
"disableAnalytics": false
"isTypeScriptProject": false
}
9 changes: 1 addition & 8 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*
.*/

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
47 changes: 22 additions & 25 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@

module.exports = {
root: true,
parser: 'babel-eslint',
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 2018,
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true,
requireConfigFile: false,
babelOptions: {
plugins: [
['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }],
],
},
},
plugins: ['ember'],
Expand All @@ -24,25 +27,20 @@ module.exports = {
// node files
{
files: [
'.eslintrc.js',
'.prettierrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'testem.multiple-test-page.js',
'testem.no-test-page.js',
'testem.simple-test-page.js',
'blueprints/*/index.js',
'config/**/*.js',
'tests/dummy/config/**/*.js',
'lib/**/*',
],
excludedFiles: [
'addon/**',
'addon-test-support/**',
'app/**',
'tests/dummy/app/**',
'./.eslintrc.js',
'./.prettierrc.js',
'./.stylelintrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./index.js',
'./testem.js',
'./testem.multiple-test-page.js',
'./testem.no-test-page.js',
'./testem.simple-test-page.js',
'./blueprints/*/index.js',
'./config/**/*.js',
'./tests/dummy/config/**/*.js',
'./lib/**/*',
],
parserOptions: {
sourceType: 'script',
Expand All @@ -51,8 +49,7 @@ module.exports = {
browser: false,
node: true,
},
plugins: ['node'],
extends: ['plugin:node/recommended'],
extends: ['plugin:n/recommended'],
},
{
files: ['node-tests/**/*'],
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ on:
pull_request:
branches: [ master ]

concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
test:
name: Tests
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v2
Expand All @@ -22,6 +26,7 @@ jobs:
floating-dependencies:
name: "Floating Dependencies"
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v2
Expand All @@ -31,9 +36,8 @@ jobs:

try-scenarios:
name: "Try: ${{ matrix.ember-try-scenario }}"

runs-on: ubuntu-latest

timeout-minutes: 10
needs: test

strategy:
Expand All @@ -47,8 +51,8 @@ jobs:
- embroider-safe-with-mocha
- embroider-optimized
- embroider-optimized-with-mocha
- ember-lts-3.24
- ember-lts-3.20
- ember-lts-4.8
- ember-lts-4.12
- ember-release
- ember-beta
- ember-canary
Expand All @@ -58,7 +62,7 @@ jobs:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1
with:
node-version: 12.x
node-version: 18
- name: install dependencies
run: yarn install --frozen-lockfile
- name: test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
node-version: 18
registry-url: 'https://registry.npmjs.org'

- run: yarn install
Expand Down
16 changes: 10 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist/
/tmp/
/declarations/

# dependencies
/bower_components/
/node_modules/

# misc
/.sass-cache
/connect.lock
/.env*
/.pnp*
/.eslintcache
/coverage/
/libpeerconnection.log
/npm-debug.log*
Expand All @@ -19,6 +18,11 @@

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/.nyc_output/
/package-lock.json.ember-try
/yarn.lock.ember-try

# broccoli-debug
/DEBUG/
28 changes: 19 additions & 9 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,23 @@
/dist/
/tmp/

# dependencies
/bower_components/

# misc
.eslintrc
/.*
/bin/
/bower.json
/.editorconfig
/.ember-cli
/.env*
/.eslintcache
/.eslintignore
/.eslintrc.js
/.git/
/.github/
/.gitignore
/.prettierignore
/.prettierrc.js
/.stylelintignore
/.stylelintrc.js
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
/CHANGELOG.md
/CONTRIBUTING.md
/config/
Expand All @@ -24,7 +33,8 @@

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/.nyc_output/
/config/addon-docs.js
/package-lock.json.ember-try
/yarn.lock.ember-try
14 changes: 1 addition & 13 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*
.eslintcache
.lint-todo/
.*/

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
9 changes: 8 additions & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
'use strict';

module.exports = {
singleQuote: true,
overrides: [
{
files: '*.{js,ts}',
options: {
singleQuote: true,
},
},
],
};
8 changes: 8 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# unconventional files
/blueprints/*/files/

# compiled output
/dist/

# addons
/.node_modules.ember-try/
8 changes: 8 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use strict';

module.exports = {
extends: ['stylelint-config-standard', 'stylelint-prettier/recommended'],
rules: {
'selector-class-pattern': null,
},
};
2 changes: 1 addition & 1 deletion .watchmanconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ignore_dirs": ["tmp", "dist"]
"ignore_dirs": ["dist"]
}
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@

## Running tests

- `ember test` – Runs the test suite on the current Ember version
- `ember test --server` – Runs the test suite in "watch mode"
- `yarn test:ember` – Runs the test suite on the current Ember version
- `yarn test:ember --server` – Runs the test suite in "watch mode"
- `yarn test:node` - Runs the node tests
- `yarn test:all` – Runs the test suite against multiple Ember versions

## Running the dummy application

- `ember serve`
- `yarn start`
- Visit the dummy application at [http://localhost:4200](http://localhost:4200).

For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
For more information on using ember-cli, visit [https://cli.emberjs.com/release/](https://cli.emberjs.com/release/).
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The [documentation website](https://ember-cli.github.io/ember-exam/) contains ex

## Table of Contents

- [Compatibility](#compatibility)
- [Installation](#installation)
- [How To Use](#how-to-use)
* [Version < `3.0.0`](#version--300)
Expand All @@ -29,6 +30,11 @@ The [documentation website](https://ember-cli.github.io/ember-exam/) contains ex
* [Ember Try & CI Integration](#ember-try--ci-integration)
* [Test Suite Segmentation](#test-suite-segmentation)

## Compatibility

* Ember.js v4.8 or above
* Ember CLI v4.8 or above
* Node.js v18 or above

## Installation

Expand Down Expand Up @@ -282,7 +288,7 @@ $ ember exam --file-path='/my-application/tests/unit/*.js'
$ ember exam --parallel=<num> --load-balance
```

The `load-balance` option allows you to load balance test files against multiple browsers. It will order the test files by test types, e.g. acceptance | integration | unit | eslint, and load balance the ordered test files between the browsers dynamically rather than statically.
The `load-balance` option allows you to load balance test files against multiple browsers. It will order the test files by test types, e.g. acceptance | integration | unit, and load balance the ordered test files between the browsers dynamically rather than statically.
**Note:** parallel must be used along with load-balance to specify a number of browser(s)

The `load-balance` option was added to version 1.1 to address execution performance when running against a large test suite.
Expand Down Expand Up @@ -386,7 +392,7 @@ ok 1 Chrome 66.0 - Exam Partition 1 - browser Id 1 - some test
ok 2 Chrome 66.0 - Exam Partition 1 - browser Id 2 - another test
ok 3 Chrome 66.0 - Exam Partition 1 - browser Id 3 - some the other test
```
However, if you change the amount of parallelization, or randomize across partitions, the output will change for the same test, which may be an issue if you are tracking test insights over time.
However, if you change the amount of parallelization, or randomize across partitions, the output will change for the same test, which may be an issue if you are tracking test insights over time.

```bash
# ember exam --split=2 --partition=1 --parallel=2 --load-balance
Expand Down
Loading