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

feat: upgrade to ember 3.28 #153

Merged
merged 1 commit into from
Oct 12, 2021
Merged
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: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# misc
/coverage/
!.*
.*/
.eslintcache

# ember-try
Expand Down
29 changes: 14 additions & 15 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,15 @@ module.exports = {
// node files
{
files: [
'.eslintrc.js',
'.prettierrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'tests/dummy/config/**/*.js',
],
excludedFiles: [
'addon/**',
'addon-test-support/**',
'app/**',
'tests/dummy/app/**',
'./.eslintrc.js',
'./.prettierrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./index.js',
'./testem.js',
'./blueprints/*/index.js',
'./config/**/*.js',
'./tests/dummy/config/**/*.js',
],
parserOptions: {
sourceType: 'script',
Expand All @@ -54,5 +48,10 @@ module.exports = {
plugins: ['node'],
extends: ['plugin:node/recommended'],
},
{
// Test files:
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
],
}
30 changes: 15 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
# not change them. Doing so could break upgrade flow.
#
#$ browsers:
#$ - chrome
#$ - Chrome
#$ emberTryScenarios:
#$ - scenario: ember-lts-3.16
#$ - scenario: ember-lts-3.20
#$ - scenario: ember-lts-3.24
#$ - scenario: ember-release
#$ - scenario: ember-default-with-jquery
#$ - scenario: ember-classic
#$ nodeVersion: 12.x
#$ nodeVersion: '12'
#$ packageManager: yarn
#

Expand All @@ -33,7 +33,7 @@ on:
pull_request:

env:
NODE_VERSION: '12.x'
NODE_VERSION: '12'

jobs:
lint:
Expand All @@ -44,7 +44,7 @@ jobs:
with:
fetch-depth: 1

- uses: actions/setup-node@v2-beta
- uses: actions/setup-node@v2
with:
node-version: '${{ env.NODE_VERSION }}'

Expand Down Expand Up @@ -82,14 +82,14 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
browser: [chrome]
browser: [Chrome]

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1

- uses: actions/setup-node@v2-beta
- uses: actions/setup-node@v2
with:
node-version: '${{ env.NODE_VERSION }}'

Expand Down Expand Up @@ -127,14 +127,14 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
browser: [chrome]
browser: [Chrome]

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1

- uses: actions/setup-node@v2-beta
- uses: actions/setup-node@v2
with:
node-version: '${{ env.NODE_VERSION }}'

Expand Down Expand Up @@ -170,19 +170,19 @@ jobs:
fail-fast: true
matrix:
ember-try-scenario: [
lts-3.20,
lts-3.24,
release,
default-with-jquery,
classic
ember-lts-3.20,
ember-lts-3.24,
ember-release,
ember-default-with-jquery,
ember-classic
]

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1

- uses: actions/setup-node@v2-beta
- uses: actions/setup-node@v2
with:
node-version: '${{ env.NODE_VERSION }}'

Expand Down
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
/.eslintrc.js
/.git/
/.gitignore
/.prettierignore
/.prettierrc.js
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
Expand All @@ -24,6 +26,7 @@
/ember-cli-build.js
/testem.js
/tests/
/yarn-error.log
/yarn.lock
.gitkeep

Expand Down
5 changes: 2 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@

## Linting

* `yarn lint:hbs`
* `yarn lint:js`
* `yarn lint:js --fix`
* `yarn lint`
* `yarn lint:fix`

## Running tests

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Hot plug your features: `ember-feature-controls` provides an administration pane

## Compatibility

* Ember.js v3.16 or above
* Ember CLI v2.13 or above
* Ember.js v3.20 or above
* Ember CLI v3.20 or above
* Node.js v12 or above

## Installation
Expand Down
26 changes: 21 additions & 5 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,47 @@ module.exports = async function () {
useYarn: true,
scenarios: [
{
name: 'lts-3.20',
name: 'ember-lts-3.20',
npm: {
devDependencies: {
'ember-source': '~3.20.5',
},
},
},
{
name: 'lts-3.24',
name: 'ember-lts-3.24',
npm: {
devDependencies: {
'ember-source': '~3.24.3',
},
},
},
{
name: 'release',
name: 'ember-release',
npm: {
devDependencies: {
'ember-source': await getChannelURL('release'),
},
},
},
{
name: 'default-with-jquery',
name: 'ember-beta',
npm: {
devDependencies: {
'ember-source': await getChannelURL('beta'),
},
},
},
{
name: 'ember-canary',
npm: {
devDependencies: {
'ember-source': await getChannelURL('canary'),
},
},
},
Comment on lines +35 to +49
Copy link
Member

@MrChocolatine MrChocolatine Oct 11, 2021

Choose a reason for hiding this comment

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

Do we really to add back the scenarios beta and canary? (see #139)
I thought we wanted to get rid of these from all our Ember.js projects.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's not in the CI, juste configured in try
I don't see any reasons to not keep it here for the future ^^ as long as it's disabled on the CI

Copy link
Member

@MrChocolatine MrChocolatine Oct 11, 2021

Choose a reason for hiding this comment

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

Ah my bad, I went too fast and thought the CI would run again these 2 scenarios.

{
name: 'ember-default-with-jquery',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'jquery-integration': true,
Expand All @@ -45,7 +61,7 @@ module.exports = async function () {
},
},
{
name: 'classic',
name: 'ember-classic',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'application-template-wrapper': true,
Expand Down
11 changes: 9 additions & 2 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict'

const EmberAddon = require('ember-cli/lib/broccoli/ember-addon')
const { maybeEmbroider } = require('@embroider/test-setup')

module.exports = function (defaults) {
let app = new EmberAddon(defaults, {
Expand All @@ -14,6 +13,14 @@ module.exports = function (defaults) {
This build file does *not* influence how the addon or the app using it
behave. You most likely want to be modifying `./index.js` or app's build file
*/
app.import('node_modules/milligram/dist/milligram.css')

return maybeEmbroider(app)
const { maybeEmbroider } = require('@embroider/test-setup')
return maybeEmbroider(app, {
skipBabel: [
{
package: 'qunit',
},
],
})
}
50 changes: 24 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"scripts": {
"build": "ember build --environment=production",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
Expand All @@ -32,57 +32,55 @@
"test:ember-compatibility": "ember try:each"
},
"dependencies": {
"ember-cli-babel": "^7.23.0",
"ember-cli-htmlbars": "^5.3.1",
"ember-cli-babel": "^7.26.6",
"ember-cli-htmlbars": "^5.7.1",
"ember-feature-flags": "^6.0.0",
"ember-get-config": "^0.3.0",
"ember-local-storage": "^1.4.1",
"ember-local-storage": "^1.7.2",
"ember-truth-helpers": "^3.0.0"
},
"devDependencies": {
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.1.4",
"@ember/test-helpers": "^2.4.2",
"@embroider/test-setup": "^0.43.5",
"@glimmer/component": "^1.0.3",
"@glimmer/tracking": "^1.0.3",
"@glimmer/component": "^1.0.4",
"@glimmer/tracking": "^1.0.4",
"babel-eslint": "^10.1.0",
"broccoli-asset-rev": "^3.0.0",
"ember-auto-import": "^1.10.1",
"ember-cli": "~3.24.0",
"ember-auto-import": "^1.11.3",
"ember-cli": "~3.28.1",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-github-pages": "0.2.2",
"ember-cli-inject-live-reload": "^2.0.2",
"ember-cli-sass": "^10.0.1",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.1",
"ember-cli-terser": "^4.0.2",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.1",
"ember-load-initializers": "^2.1.2",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-milligram": "^0.3.0",
"ember-page-title": "^6.0.3",
"ember-qunit": "^5.1.1",
"ember-page-title": "^6.2.2",
"ember-qunit": "^5.1.4",
"ember-resolver": "^8.0.2",
"ember-source": "~3.24.0",
"ember-source": "~3.28.0",
"ember-source-channel-url": "^3.0.0",
"ember-template-lint": "^3.6.0",
"ember-test-selectors": "^6.0.0",
"ember-try": "^1.4.0",
"eslint": "^7.17.0",
"eslint-config-prettier": "^7.1.0",
"eslint-plugin-ember": "^10.1.1",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-ember": "^10.5.4",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-prettier": "^3.4.1",
"eslint-plugin-qunit": "^6.2.0",
"loader.js": "^4.7.0",
"milligram": "^1.3.0",
"milligram": "^1.4.1",
"npm-run-all": "^4.1.5",
"prettier": "^2.2.1",
"qunit": "^2.13.0",
"qunit-dom": "^2.0.0",
"sass": "^1.32.11"
"prettier": "^2.3.2",
"qunit": "^2.16.0",
"qunit-dom": "^2.0.0"
},
"engines": {
"node": "12.* || >= 14"
"node": "12.* || 14.* || >= 16"
},
"ember": {
"edition": "octane"
Expand Down
1 change: 0 additions & 1 deletion tests/dummy/app/styles/app.scss

This file was deleted.

2 changes: 1 addition & 1 deletion tests/dummy/config/ember-cli-update.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"name": "ember-cli",
"version": "3.20.2",
"version": "3.28.1",
"blueprints": [
{
"name": "addon",
Expand Down
20 changes: 14 additions & 6 deletions tests/dummy/config/targets.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,20 @@ const browsers = [
'last 1 Safari versions',
]

const isCI = Boolean(process.env.CI)
const isProduction = process.env.EMBER_ENV === 'production'

if (isCI || isProduction) {
browsers.push('ie 11')
}
// Ember's browser support policy is changing, and IE11 support will end in
// v4.0 onwards.
//
// See https://deprecations.emberjs.com/v3.x#toc_3-0-browser-support-policy
//
// If you need IE11 support on a version of Ember that still offers support
// for it, uncomment the code block below.
//
// const isCI = Boolean(process.env.CI);
// const isProduction = process.env.EMBER_ENV === 'production';
//
// if (isCI || isProduction) {
// browsers.push('ie 11');
// }

module.exports = {
browsers,
Expand Down
Loading