Skip to content

Commit

Permalink
[BREAKING] Update dependencies, including ember-auto-import and add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemelia committed May 31, 2022
1 parent d66a91d commit f91b6d2
Show file tree
Hide file tree
Showing 17 changed files with 2,464 additions and 1,719 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'],
},
],
};
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- commit-message:
include: "scope"
prefix: "chore"
directory: "/"
open-pull-requests-limit: 10
package-ecosystem: "npm"
schedule:
interval: "weekly"
time: "10:00"
versioning-strategy: "increase"
78 changes: 78 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: CI

on:
push:
branches:
- main
- master
pull_request: {}

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

jobs:
test:
name: "Tests"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: 12.x
cache: yarn
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Lint
run: yarn lint
- name: Run Tests
run: yarn test:ember

floating:
name: "Floating Dependencies"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12.x
cache: yarn
- name: Install Dependencies
run: yarn install --no-lockfile
- name: Run Tests
run: yarn test:ember

try-scenarios:
name: ${{ matrix.try-scenario }}
runs-on: ubuntu-latest
needs: "test"

strategy:
fail-fast: false
matrix:
try-scenario:
- ember-lts-3.16
- ember-lts-3.20
- ember-lts-3.24
- ember-lts-3.28
- ember-release
- ember-beta
- ember-canary
- ember-classic
- embroider-safe
- embroider-optimized

steps:
- uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: 12.x
cache: yarn
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
/ember-cli-build.js
/testem.js
/tests/
/yarn-error.log
/yarn.lock
.gitkeep

Expand Down
2 changes: 1 addition & 1 deletion .template-lintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

module.exports = {
extends: 'octane',
extends: 'recommended',
rules: {
'no-positive-tabindex': 'off',
},
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ language: node_js
node_js:
# we recommend testing addons with the same minimum supported node version as Ember CLI
# so that your addon works for all apps
- "10"
- "12"

dist: xenial

Expand Down Expand Up @@ -46,8 +46,8 @@ jobs:

# we recommend new addons test the current and previous LTS
# as well as latest stable release (bonus points to beta/canary)
- env: EMBER_TRY_SCENARIO=ember-lts-3.16
- env: EMBER_TRY_SCENARIO=ember-lts-3.20
- env: EMBER_TRY_SCENARIO=ember-lts-3.24
- env: EMBER_TRY_SCENARIO=ember-release
- env: EMBER_TRY_SCENARIO=ember-beta
- env: EMBER_TRY_SCENARIO=ember-canary
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ A `radio-button` will be in a checked state when the `value` property matches th

Clicking on a `radio-button` will set `groupValue` to its `value`.

## Usage
* Ember.js v3.20 or above
* Ember CLI v3.20 or above
* Node.js v12 or above

## Usage
### Block Form

The block form emits a label wrapping the input element and any elements passed to the block.
Expand Down
8 changes: 4 additions & 4 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ module.exports = async function () {
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',
},
},
},
Expand Down
8 changes: 7 additions & 1 deletion ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,11 @@ module.exports = function (defaults) {
*/

const { maybeEmbroider } = require('@embroider/test-setup');
return maybeEmbroider(app);
return maybeEmbroider(app, {
skipBabel: [
{
package: 'qunit',
},
],
});
};
56 changes: 29 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,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 @@ -26,48 +26,50 @@
"test:ember-compatibility": "ember try:each"
},
"dependencies": {
"ember-cli-babel": "^7.26.3",
"ember-cli-htmlbars": "^5.7.1"
"ember-cli-babel": "^7.26.11",
"ember-cli-htmlbars": "^5.7.1",
"webpack": "^5.72.1"
},
"devDependencies": {
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.2.5",
"@embroider/test-setup": "^0.37.0",
"@glimmer/component": "^1.0.4",
"@glimmer/tracking": "^1.0.4",
"@ember/test-helpers": "^2.4.2",
"@embroider/test-setup": "^1.7.1",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2",
"babel-eslint": "^10.1.0",
"broccoli-asset-rev": "^3.0.0",
"ember-auto-import": "^1.11.2",
"ember-cli": "~3.26.1",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-inject-live-reload": "^2.0.2",
"ember-auto-import": "^2.4.2",
"ember-cli": "~3.28.0",
"ember-cli-dependency-checker": "^3.3.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-page-title": "^6.2.1",
"ember-qunit": "^5.1.4",
"ember-resolver": "^8.0.2",
"ember-source": "~3.26.1",
"ember-maybe-import-regenerator": "^1.0.0",
"ember-page-title": "^7.0.0",
"ember-qunit": "^5.1.5",
"ember-resolver": "^8.0.3",
"ember-source": "~3.28.0",
"ember-source-channel-url": "^3.0.0",
"ember-template-lint": "^3.2.0",
"ember-template-lint": "^3.6.0",
"ember-try": "^1.4.0",
"ember-welcome-page": "^4.0.0",
"eslint": "^7.23.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-ember": "^10.3.0",
"ember-welcome-page": "^6.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",
"qunit-dom": "^1.6.0"
"prettier": "^2.3.2",
"qunit": "^2.16.0",
"qunit-dom": "^2.0.0"
},
"engines": {
"node": "14.* || >= 16"
"node": "12.* || 14.* || >= 16"
},
"ember": {
"edition": "octane"
Expand Down
3 changes: 3 additions & 0 deletions tests/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/* eslint-disable no-undef */
'use strict';

module.exports = {
env: {
embertest: true,
Expand Down
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.26.1",
"version": "3.28.0",
"blueprints": [
{
"name": "addon",
Expand Down
15 changes: 15 additions & 0 deletions tests/dummy/config/targets.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ const browsers = [
'last 1 Safari versions',
];

// 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,
};
2 changes: 1 addition & 1 deletion tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</div>
</div>

<script src="/testem.js" integrity=""></script>
<script src="/testem.js" integrity="" data-embroider-ignore></script>
<script src="{{rootURL}}assets/vendor.js"></script>
<script src="{{rootURL}}assets/test-support.js"></script>
<script src="{{rootURL}}assets/dummy.js"></script>
Expand Down
1 change: 1 addition & 0 deletions tests/integration/components/radio-button-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ module('Integration | Components | Radio Button', function (hooks) {
});

test('it updates when the browser change event is fired', async function (assert) {
assert.expect(5);
let changedActionCallCount = 0;
this.set('changed', function (newValue) {
changedActionCallCount++;
Expand Down
Loading

0 comments on commit f91b6d2

Please sign in to comment.