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

upgrade to ember-cli 3.27 blueprint #73

Merged
merged 2 commits into from
Jul 14, 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
5 changes: 5 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,10 @@ module.exports = {
plugins: ['node'],
extends: ['plugin:node/recommended'],
},
{
// Test files:
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
],
};
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
strategy:
matrix:
node-version: [12.x]
ember-try: [ember-lts-3.12, ember-lts-3.16, ember-release, ember-beta, ember-canary, ember-default-with-jquery, ember-classic, embroider-safe, embroider-optimized]
ember-try: [ember-lts-3.12, ember-lts-3.16, ember-lts-3.20, ember-lts-3.24, ember-release, ember-beta, ember-canary, ember-default-with-jquery, ember-classic, embroider-safe, embroider-optimized]
include:
- ember-try: ember-canary
continue-on-error: true
Expand Down
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,5 +1,5 @@
'use strict';

module.exports = {
extends: 'octane',
extends: 'recommended',
};
8 changes: 8 additions & 0 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ module.exports = async function () {
},
},
},
{
name: 'ember-lts-3.24',
npm: {
devDependencies: {
'ember-source': '~3.24.3',
},
},
},
{
name: 'ember-release',
npm: {
Expand Down
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"scripts": {
"build": "ember build --environment=production",
"changelog": "lerna-changelog --from=v0.1.0 > CHANGELOG.md",
"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 @@ -27,14 +27,14 @@
"test:ember-compatibility": "ember try:each"
},
"dependencies": {
"ember-cli-babel": "^7.26.3",
"ember-cli-babel": "^7.26.6",
"ember-cli-htmlbars": "^5.7.1",
"ember-modifier": "^2.1.0"
},
"devDependencies": {
"@ember/optional-features": "2.0.0",
"@ember/test-helpers": "2.2.8",
"@embroider/test-setup": "0.39.1",
"@embroider/test-setup": "0.43.0",
"@glimmer/component": "1.0.4",
"@glimmer/tracking": "1.0.4",
"babel-eslint": "10.1.0",
Expand All @@ -61,6 +61,7 @@
"eslint-plugin-ember": "10.5.1",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-prettier": "3.4.0",
"eslint-plugin-qunit": "^6.1.1",
"lerna-changelog": "1.0.1",
"loader.js": "4.7.0",
"npm-run-all": "4.1.5",
Expand All @@ -76,5 +77,8 @@
},
"ember-addon": {
"configPath": "tests/dummy/config"
},
"volta": {
"node": "16.4.2"
}
}
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.0",
"version": "3.27.0",
"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
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
7 changes: 3 additions & 4 deletions tests/integration/modifiers/did-pan-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ module('Integration | Modifier | did-pan', function (hooks) {

this.threshold = 30;
this.handlePanStart = (e) => {
assert.equal(
assert.true(
e.current.distanceX > this.threshold,
true,
`distanceX (${e.current.distanceX}) should be bigger than threshold (${this.threshold})`
);
didStart = true;
Expand All @@ -66,7 +65,7 @@ module('Integration | Modifier | did-pan', function (hooks) {
);
await pan('.did-pan', 'right');

assert.equal(didStart, true, 'onPanStart should have been called');
assert.true(didStart, 'onPanStart should have been called');
});

test(`it does not fire the passed hooks when the threshold isn't met`, async function (assert) {
Expand All @@ -85,7 +84,7 @@ module('Integration | Modifier | did-pan', function (hooks) {
);
await pan('.did-pan', 'right');

assert.equal(didStart, false, 'onPanStart should not have been called');
assert.false(didStart, 'onPanStart should not have been called');
});

test(`it sets the correct touch-action for the passed axis`, async function (assert) {
Expand Down
16 changes: 8 additions & 8 deletions tests/unit/utils/parse-touch-data-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,19 @@ module('Unit | Utility | parse-touch-data', function () {

let e2 = createMockPointerEvent('pointermove', 42, 33, 52);
let touchData = parseTouchData(initialTouchData, e2);
assert.equal(isHorizontal(touchData), true);
assert.true(isHorizontal(touchData));

e2 = createMockPointerEvent('pointermove', -42, -33, 52);
touchData = parseTouchData(initialTouchData, e2);
assert.equal(isHorizontal(touchData), true);
assert.true(isHorizontal(touchData));

e2 = createMockPointerEvent('pointermove', 0, 0, 52);
touchData = parseTouchData(initialTouchData, e2);
assert.equal(isHorizontal(touchData), false);
assert.false(isHorizontal(touchData));

e2 = createMockPointerEvent('pointermove', -33, -42, 52);
touchData = parseTouchData(initialTouchData, e2);
assert.equal(isHorizontal(touchData), false);
assert.false(isHorizontal(touchData));
});

test('it detects a touch as vertical', function (assert) {
Expand All @@ -105,18 +105,18 @@ module('Unit | Utility | parse-touch-data', function () {

let e2 = createMockPointerEvent('pointermove', 42, 33, 52);
let touchData = parseTouchData(initialTouchData, e2);
assert.equal(isVertical(touchData), false);
assert.false(isVertical(touchData));

e2 = createMockPointerEvent('pointermove', -42, -33, 52);
touchData = parseTouchData(initialTouchData, e2);
assert.equal(isVertical(touchData), false);
assert.false(isVertical(touchData));

e2 = createMockPointerEvent('pointermove', 0, 0, 52);
touchData = parseTouchData(initialTouchData, e2);
assert.equal(isVertical(touchData), false);
assert.false(isVertical(touchData));

e2 = createMockPointerEvent('pointermove', -33, -42, 52);
touchData = parseTouchData(initialTouchData, e2);
assert.equal(isVertical(touchData), true);
assert.true(isVertical(touchData));
});
});
24 changes: 16 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1084,13 +1084,13 @@
resolve "^1.8.1"
semver "^7.3.2"

"@embroider/test-setup@0.39.1":
version "0.39.1"
resolved "https://registry.yarnpkg.com/@embroider/test-setup/-/test-setup-0.39.1.tgz#3b87c9a3a029711f43f7ac89952eaaddf30196fd"
integrity sha512-EYlsiPiK6FfxeB9Yq9/c/dXwTjo1T5xD6UUfK6rv0PLGP5W1OqYd0Kyf8LGpLKeaRzLD6GfOeb+GXpx9IgPyeg==
"@embroider/test-setup@0.43.0":
version "0.43.0"
resolved "https://registry.yarnpkg.com/@embroider/test-setup/-/test-setup-0.43.0.tgz#c549bec9b3597ad30793ba008fcc9f6eafbfa03e"
integrity sha512-8LWpqqdPw283yb0LWxbXwf75LTbnpka6kCnTYcFh8MIRR6yraEXNu2BL6xezI5PCbYqc+fhNQGA8gUHbxAOfYw==
dependencies:
lodash "^4.17.20"
resolve "^1.17.0"
lodash "^4.17.21"
resolve "^1.20.0"

"@eslint/eslintrc@^0.4.2":
version "0.4.2"
Expand Down Expand Up @@ -4667,7 +4667,7 @@ ember-cli-babel@^6.0.0-beta.4:
ember-cli-version-checker "^2.1.2"
semver "^5.5.0"

ember-cli-babel@^7.0.0, ember-cli-babel@^7.10.0, ember-cli-babel@^7.13.0, ember-cli-babel@^7.13.2, ember-cli-babel@^7.22.1, ember-cli-babel@^7.23.0, ember-cli-babel@^7.23.1, ember-cli-babel@^7.26.2, ember-cli-babel@^7.26.3, ember-cli-babel@^7.26.6, ember-cli-babel@^7.7.3:
ember-cli-babel@^7.0.0, ember-cli-babel@^7.10.0, ember-cli-babel@^7.13.0, ember-cli-babel@^7.13.2, ember-cli-babel@^7.22.1, ember-cli-babel@^7.23.0, ember-cli-babel@^7.23.1, ember-cli-babel@^7.26.2, ember-cli-babel@^7.26.6, ember-cli-babel@^7.7.3:
version "7.26.6"
resolved "https://registry.yarnpkg.com/ember-cli-babel/-/ember-cli-babel-7.26.6.tgz#322fbbd3baad9dd99e3276ff05bc6faef5e54b39"
integrity sha512-040svtfj2RC35j/WMwdWJFusZaXmNoytLAMyBDGLMSlRvznudTxZjGlPV6UupmtTBApy58cEF8Fq4a+COWoEmQ==
Expand Down Expand Up @@ -5482,6 +5482,14 @@ [email protected]:
dependencies:
prettier-linter-helpers "^1.0.0"

eslint-plugin-qunit@^6.1.1:
version "6.2.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-qunit/-/eslint-plugin-qunit-6.2.0.tgz#f4efda29da99523e560848d9592c39c0590c308d"
integrity sha512-KvPmkIC2MHpfRxs/r8WUeeGkG6y+3qwSi2AZIBtjcM/YG6Z3k0GxW5Hbu3l7X0TDhljVCeBb9Q5puUkHzl83Mw==
dependencies:
eslint-utils "^3.0.0"
requireindex "^1.2.0"

eslint-scope@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848"
Expand Down Expand Up @@ -8015,7 +8023,7 @@ lodash.uniqby@^4.7.0:
resolved "https://registry.yarnpkg.com/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz#d99c07a669e9e6d24e1362dfe266c67616af1302"
integrity sha1-2ZwHpmnp5tJOE2Lf4mbGdhavEwI=

lodash@^4.17.10, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.4, lodash@^4.6.1, lodash@^4.7.0:
lodash@^4.17.10, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.6.1, lodash@^4.7.0:
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
Expand Down