refactor: 💡 upgrade addons/core to Ember 3.24
This commit is contained in:
33 files changed
+185
-194
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import Application from "@ember/application";
|
||||
import Resolver from "ember-resolver";
|
||||
import loadInitializers from "ember-load-initializers";
|
||||
import config from "dummy/config/environment";
|
||||
import Application from '@ember/application';
|
||||
import Resolver from 'ember-resolver';
|
||||
import loadInitializers from 'ember-load-initializers';
|
||||
import config from 'dummy/config/environment';
|
||||
|
||||
export default class App extends Application {
|
||||
modulePrefix = config.modulePrefix;
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
export default {
|
||||
time: {
|
||||
hhmmss: {
|
||||
hour: "numeric",
|
||||
minute: "numeric",
|
||||
second: "numeric",
|
||||
hour: 'numeric',
|
||||
minute: 'numeric',
|
||||
second: 'numeric',
|
||||
},
|
||||
},
|
||||
date: {
|
||||
hhmmss: {
|
||||
hour: "numeric",
|
||||
minute: "numeric",
|
||||
second: "numeric",
|
||||
hour: 'numeric',
|
||||
minute: 'numeric',
|
||||
second: 'numeric',
|
||||
},
|
||||
},
|
||||
number: {
|
||||
compact: { notation: "compact" },
|
||||
compact: { notation: 'compact' },
|
||||
EUR: {
|
||||
style: "currency",
|
||||
currency: "EUR",
|
||||
style: 'currency',
|
||||
currency: 'EUR',
|
||||
minimumFractionDigits: 2,
|
||||
maximumFractionDigits: 2,
|
||||
},
|
||||
USD: {
|
||||
style: "currency",
|
||||
currency: "USD",
|
||||
style: 'currency',
|
||||
currency: 'USD',
|
||||
minimumFractionDigits: 2,
|
||||
maximumFractionDigits: 2,
|
||||
},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import EmberRouter from "@ember/routing/router";
|
||||
import config from "dummy/config/environment";
|
||||
import EmberRouter from '@ember/routing/router';
|
||||
import config from 'dummy/config/environment';
|
||||
|
||||
export default class Router extends EmberRouter {
|
||||
location = config.locationType;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"packages": [
|
||||
{
|
||||
"name": "ember-cli",
|
||||
"version": "3.20.2",
|
||||
"version": "3.24.0",
|
||||
"blueprints": [
|
||||
{
|
||||
"name": "addon",
|
||||
|
||||
@@ -25,7 +25,7 @@ module.exports = function (/* environment */) {
|
||||
* @type {String}
|
||||
* @default "'translations'"
|
||||
*/
|
||||
inputPath: "../../translations",
|
||||
inputPath: '../../translations',
|
||||
|
||||
/**
|
||||
* Prevents the translations from being bundled with the application code.
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
"use strict";
|
||||
'use strict';
|
||||
|
||||
module.exports = function (environment) {
|
||||
let ENV = {
|
||||
modulePrefix: "dummy",
|
||||
modulePrefix: 'dummy',
|
||||
environment,
|
||||
rootURL: "/",
|
||||
locationType: "auto",
|
||||
rootURL: '/',
|
||||
locationType: 'auto',
|
||||
EmberENV: {
|
||||
FEATURES: {
|
||||
// Here you can enable experimental features on an ember canary build
|
||||
@@ -29,7 +29,7 @@ module.exports = function (environment) {
|
||||
baseURL: 'https://boundaryproject.io/help/admin-ui',
|
||||
topics: {
|
||||
account: '/accounts',
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
api: {
|
||||
@@ -38,13 +38,13 @@ module.exports = function (environment) {
|
||||
},
|
||||
|
||||
'ember-cli-mirage': {
|
||||
directory: '../api/mirage'
|
||||
directory: '../api/mirage',
|
||||
},
|
||||
|
||||
enableConfirmService: false
|
||||
enableConfirmService: false,
|
||||
};
|
||||
|
||||
if (environment === "development") {
|
||||
if (environment === 'development') {
|
||||
// ENV.APP.LOG_RESOLVER = true;
|
||||
// ENV.APP.LOG_ACTIVE_GENERATION = true;
|
||||
// ENV.APP.LOG_TRANSITIONS = true;
|
||||
@@ -52,19 +52,19 @@ module.exports = function (environment) {
|
||||
// ENV.APP.LOG_VIEW_LOOKUPS = true;
|
||||
}
|
||||
|
||||
if (environment === "test") {
|
||||
if (environment === 'test') {
|
||||
// Testem prefers this...
|
||||
ENV.locationType = "none";
|
||||
ENV.locationType = 'none';
|
||||
|
||||
// keep test console output quieter
|
||||
ENV.APP.LOG_ACTIVE_GENERATION = false;
|
||||
ENV.APP.LOG_VIEW_LOOKUPS = false;
|
||||
|
||||
ENV.APP.rootElement = "#ember-testing";
|
||||
ENV.APP.rootElement = '#ember-testing';
|
||||
ENV.APP.autoboot = false;
|
||||
}
|
||||
|
||||
if (environment === "production") {
|
||||
if (environment === 'production') {
|
||||
// here you can enable a production-specific feature
|
||||
}
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
"use strict";
|
||||
'use strict';
|
||||
|
||||
const browsers = [
|
||||
"last 1 Chrome versions",
|
||||
"last 1 Firefox versions",
|
||||
"last 1 Safari versions",
|
||||
'last 1 Chrome versions',
|
||||
'last 1 Firefox versions',
|
||||
'last 1 Safari versions',
|
||||
];
|
||||
|
||||
const isCI = Boolean(process.env.CI);
|
||||
const isProduction = process.env.EMBER_ENV === "production";
|
||||
const isProduction = process.env.EMBER_ENV === 'production';
|
||||
|
||||
if (isCI || isProduction) {
|
||||
browsers.push("ie 11");
|
||||
browsers.push('ie 11');
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
||||
@@ -21,6 +21,13 @@
|
||||
{{content-for "body"}}
|
||||
{{content-for "test-body"}}
|
||||
|
||||
<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=""></script>
|
||||
<script src="{{rootURL}}assets/vendor.js"></script>
|
||||
<script src="{{rootURL}}assets/test-support.js"></script>
|
||||
|
||||
@@ -60,7 +60,7 @@ module('Integration | Component | error/message', function (hooks) {
|
||||
);
|
||||
assert.equal(
|
||||
find('.rose-message-description').textContent.trim(),
|
||||
'We\'re not sure what happened. Please contact your administrator or try again later.'
|
||||
"We're not sure what happened. Please contact your administrator or try again later."
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -10,6 +10,9 @@ module('Integration | Helper | company-copyright', function (hooks) {
|
||||
assert.expect(1);
|
||||
const currentYear = new Date().getFullYear();
|
||||
await render(hbs`{{company-copyright}}`);
|
||||
assert.equal(this.element.textContent.trim(), `© ${currentYear} Company Name`);
|
||||
assert.equal(
|
||||
this.element.textContent.trim(),
|
||||
`© ${currentYear} Company Name`
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -1,8 +1,12 @@
|
||||
import Application from "dummy/app";
|
||||
import config from "dummy/config/environment";
|
||||
import { setApplication } from "@ember/test-helpers";
|
||||
import { start } from "ember-qunit";
|
||||
import Application from 'dummy/app';
|
||||
import config from 'dummy/config/environment';
|
||||
import * as QUnit from 'qunit';
|
||||
import { setApplication } from '@ember/test-helpers';
|
||||
import { setup } from 'qunit-dom';
|
||||
import { start } from 'ember-qunit';
|
||||
|
||||
setApplication(Application.create(config.APP));
|
||||
|
||||
setup(QUnit.assert);
|
||||
|
||||
start();
|
||||
Reference in new issue
Block a user