Skip to content

Commit

Permalink
Merge pull request #217 from ember-cli/fix/update
Browse files Browse the repository at this point in the history
fix: Update Ember version and use new Embroider testing setup
  • Loading branch information
knownasilya authored Oct 25, 2021
2 parents a886af4 + 5040f24 commit 6dcfd68
Show file tree
Hide file tree
Showing 20 changed files with 2,117 additions and 2,155 deletions.
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 @@ -24,21 +24,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 @@ -50,5 +44,10 @@ module.exports = {
plugins: ['node'],
extends: ['plugin:node/recommended'],
},
{
// Test files:
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
],
};
19 changes: 10 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fetch-depth: 1
- uses: actions/setup-node@v2-beta
with:
node-version: '10.x'
node-version: '12.x'
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Lint
Expand All @@ -36,7 +36,7 @@ jobs:
fetch-depth: 1
- uses: actions/setup-node@v2-beta
with:
node-version: '10.x'
node-version: '12.x'
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Test
Expand All @@ -59,7 +59,7 @@ jobs:
fetch-depth: 1
- uses: actions/setup-node@v2-beta
with:
node-version: '10.x'
node-version: '12.x'
- name: Install Dependencies
run: yarn install --no-lockfile --non-interactive
- name: Test
Expand All @@ -76,19 +76,20 @@ jobs:
fail-fast: true
matrix:
ember-try-scenario: [
ember-lts-3.16,
ember-lts-3.20,
ember-lts-3.24,
ember-lts-3.28,
ember-release,
ember-beta,
ember-default-with-jquery,
ember-classic
ember-classic,
embroider-safe,
embroider-optimized
]
allow-failure: [false]
include:
- ember-try-scenario: ember-canary
- ember-try-scenario: ember-beta # We temporarily allow it to fail, so we can cut major release for current v3.x Ember and then upgrade to Embroider 2.x with another major release.
allow-failure: true
- ember-try-scenario: embroider-tests
- ember-try-scenario: ember-canary
allow-failure: true

steps:
Expand All @@ -97,7 +98,7 @@ jobs:
fetch-depth: 1
- uses: actions/setup-node@v2-beta
with:
node-version: '10.x'
node-version: '12.x'
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Test
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
/tmp/

# dependencies
/node_modules/
/bower_components/
/node_modules/

# misc
/.env*
Expand All @@ -17,12 +17,13 @@
/coverage/
/libpeerconnection.log
/npm-debug.log*
/yarn-error.log
/testem.log
/yarn-error.log

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

# editors
/.idea/
2 changes: 1 addition & 1 deletion .template-lintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';

module.exports = {
extends: 'octane',
extends: 'recommended',
};
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ ember install ember-page-title

### Compatibility

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

<details>
<summary>Fastboot vs Non-Fastboot Notes</summary>
Expand Down
2 changes: 1 addition & 1 deletion addon/services/page-title-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default class PageTitleListService extends Service {
@service('page-title')
pageTitle;

@service
@service('router')
router;

// in fastboot context "document" is instance of
Expand Down
28 changes: 12 additions & 16 deletions config/ember-try.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
'use strict';

const getChannelURL = require('ember-source-channel-url');
const { embroiderSafe, embroiderOptimized } = require('@embroider/test-setup');

module.exports = async function () {
return {
useYarn: true,
scenarios: [
{
name: 'ember-lts-3.16',
name: 'ember-lts-3.20',
npm: {
devDependencies: {
'ember-source': '~3.16.0',
'ember-source': '~3.20.5',
},
},
},
{
name: 'ember-lts-3.20',
name: 'ember-lts-3.24',
npm: {
devDependencies: {
'ember-source': '~3.20.5',
'ember-source': '~3.24.3',
},
},
},
{
name: 'ember-lts-3.24',
name: 'ember-lts-3.28',
npm: {
devDependencies: {
'ember-source': '~3.24.3',
'ember-source': '~3.28.3',
},
},
},
Expand Down Expand Up @@ -77,21 +78,16 @@ module.exports = async function () {
}),
},
npm: {
devDependencies: {
'ember-source': '~3.28.0',
},
ember: {
edition: 'classic',
},
},
},
{
name: 'embroider-tests',
npm: {
devDependencies: {
'@embroider/core': '*',
'@embroider/webpack': '*',
'@embroider/compat': '*',
},
},
},
embroiderSafe(),
embroiderOptimized(),
],
};
};
29 changes: 12 additions & 17 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,16 @@ module.exports = function (defaults) {
behave. You most likely want to be modifying `./index.js` or app's build file
*/

if ('@embroider/webpack' in app.dependencies()) {
const { Webpack } = require('@embroider/webpack'); // eslint-disable-line
return require('@embroider/compat') // eslint-disable-line
.compatBuild(app, Webpack, {
staticAddonTestSupportTrees: true,
staticAddonTrees: true,
staticHelpers: true,
staticComponents: true,
skipBabel: [
{
package: 'qunit',
},
],
});
}

return app.toTree();
const { maybeEmbroider } = require('@embroider/test-setup');
return maybeEmbroider(app, {
staticAddonTestSupportTrees: true,
staticAddonTrees: true,
staticHelpers: true,
staticComponents: true,
skipBabel: [
{
package: 'qunit',
},
],
});
};
63 changes: 33 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@
"license": "MIT",
"author": "Tim Evans <[email protected]>",
"directories": {
"doc": "doc",
"test": "tests"
},
"repository": "https://github.com/ember-cli/ember-page-title",
"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,52 +33,54 @@
"release": "standard-version"
},
"dependencies": {
"ember-cli-babel": "^7.23.1"
"ember-cli-babel": "^7.26.6"
},
"devDependencies": {
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.2.0",
"@glimmer/component": "^1.0.3",
"@glimmer/tracking": "^1.0.3",
"@ember/test-helpers": "^2.4.2",
"@embroider/test-setup": "^0.47.0",
"@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.25.2",
"ember-auto-import": "^1.11.3",
"ember-cli": "~3.28.3",
"ember-cli-code-coverage": "^1.0.0",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-fastboot": "^2.2.3",
"ember-cli-fastboot-testing": "^0.4.0",
"ember-cli-github-pages": "^0.2.0",
"ember-cli-htmlbars": "^5.3.2",
"ember-cli-inject-live-reload": "^2.0.2",
"ember-cli-fastboot": "^3.2.0-beta.4",
"ember-cli-fastboot-testing": "^0.5.0",
"ember-cli-github-pages": "^0.2.2",
"ember-cli-htmlbars": "^5.7.1",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-sass": "^10.0.1",
"ember-cli-terser": "^4.0.1",
"ember-cli-update": "^0.54.0",
"ember-cli-terser": "^4.0.2",
"ember-cli-update": "^1.0.1",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-inline-svg": "^1.0.0",
"ember-load-initializers": "^2.1.2",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-qunit": "^5.1.4",
"ember-resolver": "^8.0.2",
"ember-source": "~3.25.3",
"ember-maybe-import-regenerator": "^1.0.0",
"ember-qunit": "^5.1.5",
"ember-resolver": "^8.0.3",
"ember-source": "~3.28.3",
"ember-source-channel-url": "^3.0.0",
"ember-template-lint": "^2.18.1",
"ember-truth-helpers": "^2.1.0",
"ember-template-lint": "^3.6.0",
"ember-truth-helpers": "^3.0.0",
"ember-try": "^1.4.0",
"eslint": "^7.20.0",
"eslint-config-prettier": "^7.2.0",
"eslint-plugin-ember": "^10.2.0",
"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",
"npm-run-all": "^4.1.5",
"prettier": "^2.2.1",
"qunit": "^2.14.1",
"sass": "^1.26.0",
"standard-version": "^9.0.0"
"prettier": "^2.3.2",
"qunit": "^2.16.0",
"sass": "^1.43.3",
"standard-version": "^9.3.2"
},
"engines": {
"node": "10.* || >= 12"
"node": "12.* || 14.* || >= 16"
},
"ember": {
"edition": "octane"
Expand All @@ -88,6 +91,6 @@
},
"homepage": "https://ember-cli.github.io/ember-page-title",
"volta": {
"node": "10.22.1"
"node": "12.22.1"
}
}
5 changes: 0 additions & 5 deletions tests/.eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion tests/dummy/app/controllers/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import Controller from '@ember/controller';
import { inject as service } from '@ember/service';

export default class ApplicationController extends Controller {
@service
@service('router')
router;
}
Loading

0 comments on commit 6dcfd68

Please sign in to comment.