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

breaking: drops Ember < 3.28, upgrades to Ember 4.12, supports Ember 5 #1

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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
1 change: 0 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

root = true


[*]
end_of_line = lf
charset = utf-8
Expand Down
8 changes: 7 additions & 1 deletion .ember-cli
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,11 @@

Setting `disableAnalytics` to true will prevent any data from being sent.
*/
"disableAnalytics": false
"disableAnalytics": false,

/**
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.
*/
"isTypeScriptProject": true
}
7 changes: 5 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@
# misc
/coverage/
!.*
.*/
.eslintcache

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

test/fixtures
/package-lock.json.ember-try
/yarn.lock.ember-try
91 changes: 51 additions & 40 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,42 @@
'use strict';

module.exports = {
root: true,
parser: 'babel-eslint',
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module'
ecmaVersion: 'latest',
sourceType: 'module',
requireConfigFile: false,
babelOptions: {
plugins: [
['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }],
],
},
},
plugins: ['ember'],
extends: ['eslint:recommended', 'plugin:ember/recommended'],
extends: [
'eslint:recommended',
'plugin:ember/recommended',
'plugin:prettier/recommended',
],
env: {
browser: true
browser: true,
},
globals: {
fetch: 'off',
Headers: 'off',
Request: 'off',
Response: 'off',
AbortController: 'off'
require: true,
beforeEach: true,
it: true,
describe: true,
afterEach: true,
process: true,
module: true,
},
rules: {
'ember/no-new-mixins': 'off',
'ember/no-jquery': 'error',
'no-console': ['error', { allow: ['warn'] }]
'no-console': ['error', { allow: ['warn'] }],
'ember/no-classic-classes': 'off',
'ember/no-actions-hash': 'off',
},
overrides: [
// TypeScript files
Expand All @@ -30,45 +46,40 @@ module.exports = {
plugins: ['@typescript-eslint'],
rules: {
'no-undef': 'off',
'no-unused-var': 'off'
}
'no-unused-var': 'off',
},
},
// node files
{
files: [
'.eslintrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'test/**/*.js',
'tests/dummy/config/**/*.js'
'./.eslintrc.js',
'./.prettierrc.js',
'./.stylelintrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./index.js',
'./testem.js',
'./blueprints/*/index.js',
'./config/**/*.js',
'./tests/dummy/config/**/*.js',
],
excludedFiles: ['app/**', 'addon-test-support/**', 'addon/**', 'tests/dummy/app/**'],
parserOptions: {
sourceType: 'script'
sourceType: 'script',
},
env: {
browser: false,
node: true
},
plugins: ['node'],
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
// add your custom rules and overrides for node files here
})
},
// node tests
{
files: ['test/**/*.js'],
env: {
mocha: true
node: true,
},
extends: ['plugin:n/recommended'],
rules: {
'node/no-unpublished-require': 'off',
'node/no-extraneous-require': 'off'
}
}
]
'node/no-extraneous-require': 'off',
},
},
{
// test files
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
],
};
83 changes: 55 additions & 28 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,102 +11,129 @@ on:
tags:
- "*"

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

jobs:
lint:
name: "Linting"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: yarn install --frozen-lockfile --non-interactive
- run: yarn lint:js
- run: yarn lint

ember-tests:
ember-default-tests:
needs: lint
name: "Tests: ubuntu (node@${{ matrix.node-version }})"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ["12"]
node-version:
- 16.14
- 18
- 20

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn install --frozen-lockfile --non-interactive
- run: yarn test

prefer-native-tests:
needs: ember-tests
prefer-native-ember-default-tests:
needs: ember-default-tests
name: "PREFER_NATIVE=true Tests: ubuntu (node@${{ matrix.node-version }})"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ["12"]
node-version:
- 16.14
- 18
- 20

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn install --frozen-lockfile --non-interactive
- run: PREFER_NATIVE=true yarn test

native-promise-tests:
needs: ember-tests
native-promise-ember-default-tests:
needs: ember-default-tests
name: "NATIVE_PROMISE=true Tests: ubuntu (node@${{ matrix.node-version }})"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ["12"]
node-version:
- 16.14
- 18
- 20

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile --non-interactive
- run: NATIVE_PROMISE=true yarn test

node-tests:
needs: ember-tests
needs: ember-default-tests
name: "Node Tests: ubuntu (node@${{ matrix.node-version }})"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ["12"]
node-version:
- 16.14
- 18
- 20

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile --non-interactive
- run: yarn run test:node

try-scenarios:
ember-try-scenarios:
name: Tests - ${{ matrix.ember-try-scenario }}
timeout-minutes: 60
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.allow-failure }}
needs: ember-tests
needs: ember-default-tests

strategy:
fail-fast: true
matrix:
ember-try-scenario:
- ember-lts-3.4
- ember-lts-3.8
- ember-lts-3.12
- ember-lts-3.16
- ember-lts-3.20
- ember-lts-3.24
- ember-lts-3.28
- ember-lts-4.4
- ember-lts-4.8
- ember-release
- ember-beta
allow-failure: [false]
include:
- ember-try-scenario: ember-beta
allow-failure: true
- ember-try-scenario: ember-canary
allow-failure: true
- ember-try-scenario: embroider-safe
allow-failure: true
- ember-try-scenario: embroider-optimized
allow-failure: true

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 12.x
node-version: 16.14
- name: install dependencies
run: yarn install
- name: test
Expand Down
13 changes: 10 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

# misc
/.sass-cache
/.eslintcache
/connect.lock
/coverage/*
/libpeerconnection.log
Expand All @@ -19,6 +20,12 @@ yarn-error.log
testem.log

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.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

# broccoli-debug
/DEBUG/
10 changes: 9 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,30 @@
/.eslintignore
/.eslintrc.js
/.git/
/.github/
/.gitignore
/.prettierignore
/.prettierrc.js
/.stylelintignore
/.stylelintrc.js
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
/bower.json
/config/ember-try.js
/CONTRIBUTING.md
/ember-cli-build.js
/npm-debug.log*
/testem.js
/tests/
/yarn-error.log
/yarn.lock
/yarn-error.log
.gitkeep

# 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
Loading
Loading