Skip to content

Commit

Permalink
chore(deps): update ember and other dependencies
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Require `ember-auto-import` v2+
  • Loading branch information
anehx committed Oct 8, 2021
1 parent cee7373 commit 41e099c
Show file tree
Hide file tree
Showing 16 changed files with 4,008 additions and 3,211 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# misc
/coverage/
!.*
.*/
.eslintcache

# ember-try
/.node_modules.ember-try/
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/.env*
/.pnp*
/.sass-cache
/.eslintcache
/connect.lock
/coverage/
/libpeerconnection.log
Expand Down
4 changes: 4 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
/.editorconfig
/.ember-cli
/.env*
/.eslintcache
/.eslintignore
/.eslintrc.js
/.git/
/.gitignore
/.prettierignore
/.prettierrc.js
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
Expand All @@ -23,6 +26,7 @@
/ember-cli-build.js
/testem.js
/tests/
/yarn-error.log
/yarn.lock
.gitkeep

Expand Down
22 changes: 21 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
package.json
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*
.eslintcache

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
7 changes: 3 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@

- `git clone <repository-url>`
- `cd ember-validated-form`
- `npm install`
- `yarn install`

## Linting

- `npm run lint:hbs`
- `npm run lint:js`
- `npm run lint:js -- --fix`
- `yarn lint`
- `yarn lint:fix`

## Running tests

Expand Down
47 changes: 47 additions & 0 deletions config/ember-try.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use strict";

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

module.exports = async function () {
Expand Down Expand Up @@ -30,6 +31,52 @@ module.exports = async function () {
},
},
},
{
name: "ember-beta",
npm: {
devDependencies: {
"ember-source": await getChannelURL("beta"),
},
},
},
{
name: "ember-canary",
npm: {
devDependencies: {
"ember-source": await getChannelURL("canary"),
},
},
},
{
name: "ember-default-with-jquery",
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
"jquery-integration": true,
}),
},
npm: {
devDependencies: {
"@ember/jquery": "^1.1.0",
},
},
},
{
name: "ember-classic",
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
"application-template-wrapper": true,
"default-async-observers": false,
"template-only-glimmer-components": false,
}),
},
npm: {
ember: {
edition: "classic",
},
},
},
embroiderSafe(),
embroiderOptimized(),
],
};
};
2 changes: 1 addition & 1 deletion config/environment.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use strict";

module.exports = function (/* environment, appConfig */) {
return { historySupportMiddleware: true };
return {};
};
12 changes: 8 additions & 4 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ const EmberAddon = require("ember-cli/lib/broccoli/ember-addon");
module.exports = function (defaults) {
const app = new EmberAddon(defaults, {
snippetPaths: ["tests/dummy/app/snippets"],
"ember-cli-babel": {
includePolyfill: process.env.EMBER_ENV === "production",
},
});

/*
Expand All @@ -17,5 +14,12 @@ module.exports = function (defaults) {
behave. You most likely want to be modifying `./index.js` or app's build file
*/

return app.toTree();
const { maybeEmbroider } = require("@embroider/test-setup");
return maybeEmbroider(app, {
skipBabel: [
{
package: "qunit",
},
],
});
};
54 changes: 31 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@
},
"scripts": {
"build": "ember build --environment=production",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*",
"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:js": "eslint .",
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"start": "ember serve",
"test": "npm-run-all lint:* test:*",
"test": "npm-run-all lint test:*",
"test:ember": "ember test",
"test:ember-compatibility": "ember try:each"
},
Expand All @@ -35,27 +38,29 @@
]
},
"dependencies": {
"ember-auto-import": "^1.11.2",
"ember-cli-babel": "^7.26.3",
"ember-auto-import": "^2.2.0",
"ember-cli-babel": "^7.26.6",
"ember-cli-htmlbars": "^5.7.1",
"ember-one-way-select": "^4.0.1",
"ember-truth-helpers": "^3.0.0"
},
"devDependencies": {
"@adfinis-sygroup/eslint-config": "1.3.2",
"@adfinis-sygroup/semantic-release-config": "3.1.0",
"@babel/core": "7.14.8",
"@babel/core": "7.15.8",
"@ember/optional-features": "2.0.0",
"@ember/test-helpers": "2.5.0",
"@embroider/test-setup": "0.45.0",
"@fortawesome/ember-fontawesome": "0.2.3",
"@fortawesome/free-solid-svg-icons": "5.15.3",
"@fortawesome/free-solid-svg-icons": "5.15.4",
"@glimmer/component": "1.0.4",
"@glimmer/tracking": "1.0.4",
"babel-eslint": "10.1.0",
"broccoli-asset-rev": "3.0.0",
"ember-changeset": "3.14.1",
"ember-changeset-validations": "3.15.2",
"ember-cli": "3.27.0",
"ember-cli-addon-docs": "3.0.0",
"ember-changeset": "3.15.0",
"ember-changeset-validations": "3.16.0",
"ember-cli": "3.28.1",
"ember-cli-addon-docs": "4.0.3",
"ember-cli-dependency-checker": "3.2.0",
"ember-cli-deploy": "1.0.2",
"ember-cli-deploy-build": "2.0.0",
Expand All @@ -67,14 +72,14 @@
"ember-cli-terser": "4.0.2",
"ember-cli-test-loader": "3.0.0",
"ember-concurrency": "2.1.2",
"ember-data": "3.27.1",
"ember-data": "3.28.3",
"ember-disable-prototype-extensions": "1.1.3",
"ember-load-initializers": "2.1.2",
"ember-maybe-import-regenerator": "0.1.6",
"ember-maybe-import-regenerator": "1.0.0",
"ember-power-select": "4.1.6",
"ember-qunit": "4.6.0",
"ember-resolver": "8.0.2",
"ember-source": "3.27.5",
"ember-qunit": "5.1.5",
"ember-resolver": "8.0.3",
"ember-source": "3.28.1",
"ember-source-channel-url": "3.0.0",
"ember-template-lint": "2.21.0",
"ember-try": "1.4.0",
Expand All @@ -84,18 +89,21 @@
"eslint-plugin-import": "2.23.4",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-prettier": "3.4.0",
"husky": "7.0.1",
"lint-staged": "11.1.1",
"husky": "7.0.2",
"lint-staged": "11.2.0",
"loader.js": "4.7.0",
"npm-run-all": "4.1.5",
"prettier": "2.3.2",
"qunit-dom": "1.6.0"
},
"resolutions": {
"graceful-fs": ">=4.2.0"
"qunit": "2.17.2",
"qunit-dom": "2.0.0",
"webpack": "5.58.0"
},

"engines": {
"node": "14.* || >= 16"
"node": "12.* || 14.* || >= 16"
},
"ember": {
"edition": "octane"
},
"ember-addon": {
"configPath": "tests/dummy/config",
Expand Down
1 change: 0 additions & 1 deletion testem.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ module.exports = {
// --no-sandbox is needed when running Chrome inside a container
process.env.CI ? "--no-sandbox" : null,
"--headless",
"--disable-gpu",
"--disable-dev-shm-usage",
"--disable-software-rasterizer",
"--mute-audio",
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.22.0",
"version": "3.28.1",
"blueprints": [
{
"name": "addon",
Expand Down
3 changes: 0 additions & 3 deletions tests/dummy/config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ module.exports = function (environment) {
rootURL: "/",
locationType: "auto",
historySupportMiddleware: true,
i18n: {
defaultLocale: "fr",
},
"ember-validated-form": {
theme: "bootstrap",
defaults: {
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
9 changes: 8 additions & 1 deletion tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@
{{content-for "body"}}
{{content-for "test-body"}}

<script src="/testem.js" integrity=""></script>
<div id="qunit"></div>
<div id="qunit-fixture">
<div id="ember-testing-container">
<div id="ember-testing"></div>
</div>
</div>

<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
4 changes: 4 additions & 0 deletions tests/test-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import { setApplication } from "@ember/test-helpers";
import Application from "dummy/app";
import config from "dummy/config/environment";
import { start } from "ember-qunit";
import * as QUnit from "qunit";
import { setup } from "qunit-dom";

setApplication(Application.create(config.APP));

setup(QUnit.assert);

start();
Loading

0 comments on commit 41e099c

Please sign in to comment.