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 to ember-cli@3.20 blueprint. #746

Merged
merged 1 commit into from
Aug 18, 2020
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: 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
20 changes: 20 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 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
29 changes: 24 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = {
root: true,
extends: ['eslint:recommended', 'plugin:prettier/recommended'],
plugins: ['prettier'],
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module',
Expand All @@ -13,12 +14,24 @@ module.exports = {
},
rules: {},
overrides: [
// node files
{
files: [
'./index.js',
'./.eslintrc.js',
'./.prettierrc.js',
'./config/ember-try.js',
'.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/**',
'tests/dummy/app/**',
'vendor/**',
],
parserOptions: {
sourceType: 'script',
Expand All @@ -27,15 +40,21 @@ module.exports = {
browser: false,
node: true,
},
plugins: ['node'],
extends: ['plugin:node/recommended'],
},

// test files
{
files: ['tests/**/*.js'],
env: {
qunit: true,
},
},

// ensure we do not accidentally land async/await in shipped addon-test-support
{
files: ['./index.js', 'addon-test-support/**/*.js'],
files: ['addon-test-support/**/*.js'],
plugins: ['disable-features'],
rules: {
'disable-features/disable-async-await': 'error',
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: volta-cli/action@v1
- run: yarn install --frozen-lockfile
- run: yarn lint
- run: yarn test
- run: yarn test:ember

floating-dependencies:
name: "Floating Dependencies"
Expand All @@ -29,7 +29,7 @@ jobs:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1
- run: yarn install --no-lockfile
- run: yarn test
- run: yarn test:ember

try-scenarios:
name: "Try: ${{ matrix.ember-try-scenario }}"
Expand Down
26 changes: 14 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/dist/
/tmp/
/.eslintcache

# dependencies
/node_modules
/bower_components
/bower_components/
/node_modules/

# misc
/.eslintcache
/.env*
/.pnp*
/.sass-cache
/connect.lock
/coverage/*
/coverage/
/libpeerconnection.log
npm-debug.log*
yarn-error.log
testem.log
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
48 changes: 31 additions & 17 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
/bower_components
# compiled output
/dist/
/tmp/

# dependencies
/bower_components/

# misc
/.bowerrc
/.editorconfig
/.ember-cli
/.env*
/.eslintignore
/.eslintrc.js
/.git/
/.gitignore
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
/bower.json
/config/ember-try.js
/dist
/tests
/tmp
**/.gitkeep
.bowerrc
.editorconfig
.ember-cli
.eslintcache
.gitignore
.eslintrc.js
.watchmanconfig
.travis.yml
bower.json
ember-cli-build.js
testem.js
yarn.lock
/CONTRIBUTING.md
/ember-cli-build.js
/testem.js
/tests/
/yarn.lock
.gitkeep

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
2 changes: 1 addition & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

module.exports = {
singleQuote: true,
}
};
26 changes: 26 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# How To Contribute

## Installation

* `git clone <repository-url>`
* `cd ember-qunit`
* `yarn install`

## Linting

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

## Running tests

* `ember test` – Runs the test suite on the current Ember version
* `ember test --server` – Runs the test suite in "watch mode"
* `ember try:each` – Runs the test suite against multiple Ember versions

## Running the dummy application

* `ember serve`
* 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/).
35 changes: 20 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,46 +21,51 @@
"test": "tests"
},
"scripts": {
"build": "ember build",
"changelog": "lerna-changelog",
"lint": "eslint . --cache",
"start": "ember server",
"test": "ember try:each"
"build": "ember build --environment=production",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*",
"lint:js": "eslint --cache .",
"start": "ember serve",
"test": "npm-run-all lint:* test:*",
"test:ember": "ember test",
"test:ember-compatibility": "ember try:each"
},
"dependencies": {
"broccoli-funnel": "^3.0.3",
"broccoli-merge-trees": "^3.0.2",
"common-tags": "^1.4.0",
"common-tags": "^1.8.0",
"ember-cli-babel": "^7.22.1",
"ember-cli-test-loader": "^3.0.0",
"ember-cli-version-checker": "^5.1.1",
"silent-error": "^1.1.1"
},
"devDependencies": {
"@ember/test-helpers": "^1.7.1",
"babel-eslint": "^10.1.0",
"ember-cli": "~3.20.0",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-htmlbars": "^5.2.0",
"ember-cli-htmlbars": "^5.3.1",
"ember-cli-inject-live-reload": "^2.0.2",
"ember-disable-prototype-extensions": "^1.1.2",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-load-initializers": "^2.1.1",
"ember-resolver": "^8.0.0",
"ember-resolver": "^8.0.2",
"ember-source": "~3.20.4",
"ember-source-channel-url": "^1.0.1",
"ember-source-channel-url": "^3.0.0",
"ember-try": "^1.4.0",
"eslint": "^7.6.0",
"eslint": "^7.7.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-disable-features": "^0.1.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.1.4",
"loader.js": "^4.2.3",
"loader.js": "^4.7.0",
"npm-run-all": "^4.1.5",
"prettier": "2.0.5",
"qunit": "^2.10.1",
"release-it": "^13.6.6",
"qunit": "^2.11.0",
"release-it": "^13.6.7",
"release-it-lerna-changelog": "^2.3.0"
},
"peerDependencies": {
"@ember/test-helpers": "^1.7.1",
"qunit": "^2.10.1"
"qunit": "^2.11.0"
},
"engines": {
"node": "10.* || 12.* || >= 14.*"
Expand Down
18 changes: 11 additions & 7 deletions testem.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
/* eslint-env node */
'use strict';

module.exports = {
test_page: 'tests/index.html?hidepassed',
disable_watching: true,
launch_in_ci: ['Chrome'],
launch_in_dev: ['Chrome'],
browser_start_timeout: 120,
browser_args: {
Chrome: {
mode: 'ci',
args: [
'--disable-gpu',
ci: [
// --no-sandbox is needed when running Chrome inside a container
process.env.CI ? '--no-sandbox' : null,
'--headless',
'--no-sandbox',
'--remote-debugging-port=9222',
'--disable-dev-shm-usage',
'--disable-software-rasterizer',
'--mute-audio',
'--remote-debugging-port=0',
'--window-size=1440,900',
],
].filter(Boolean),
},
},
};
16 changes: 7 additions & 9 deletions tests/dummy/app/app.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import Ember from 'ember';
import Application from '@ember/application';
import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';
import config from 'dummy/config/environment';

const App = Ember.Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver,
});
export default class App extends Application {
modulePrefix = config.modulePrefix;
podModulePrefix = config.podModulePrefix;
Resolver = Resolver;
}

loadInitializers(App, config.modulePrefix);

export default App;
14 changes: 6 additions & 8 deletions tests/dummy/app/router.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import Ember from 'ember';
import config from './config/environment';
import EmberRouter from '@ember/routing/router';
import config from 'dummy/config/environment';

const Router = Ember.Router.extend({
location: config.locationType,
rootURL: config.rootURL,
});
export default class Router extends EmberRouter {
location = config.locationType;
rootURL = config.rootURL;
}

Router.map(function () {});

export default Router;
4 changes: 0 additions & 4 deletions tests/dummy/app/templates/application.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
{{!-- The following component displays Ember's default welcome message. --}}
{{welcome-page}}
{{!-- Feel free to remove this! --}}

{{outlet}}
21 changes: 21 additions & 0 deletions tests/dummy/config/ember-cli-update.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"schemaVersion": "1.0.0",
"packages": [
{
"name": "ember-cli",
"version": "3.20.0",
"blueprints": [
{
"name": "addon",
"outputRepo": "https://github.com/ember-cli/ember-addon-output",
"codemodsSource": "ember-addon-codemods-manifest@1",
"isBaseBlueprint": true,
"options": [
"--welcome",
"--yarn"
]
}
]
}
]
}
Loading