chore: 🤖 upgrade api addon to ember lts 3.20

This commit is contained in:
Randall Morey committed 2020-10-06 10:31:00 -04:00
1 parent cc37ea767a
commit 4f2ec5044b
16 files changed
+66 -107

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
import Application from '@ember/application';
import Resolver from 'ember-resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';
import config from 'dummy/config/environment';
export default class App extends Application {
modulePrefix = config.modulePrefix;
+1 -1
View File
@@ -1,5 +1,5 @@
import EmberRouter from '@ember/routing/router';
import config from './config/environment';
import config from 'dummy/config/environment';
export default class Router extends EmberRouter {
location = config.locationType;
@@ -0,0 +1,20 @@
{
"schemaVersion": "1.0.0",
"packages": [
{
"name": "ember-cli",
"version": "3.20.2",
"blueprints": [
{
"name": "addon",
"outputRepo": "https://github.com/ember-cli/ember-addon-output",
"codemodsSource": "ember-addon-codemods-manifest@1",
"isBaseBlueprint": true,
"options": [
"--no-welcome"
]
}
]
}
]
}
+1 -1
View File
@@ -6,7 +6,7 @@ const browsers = [
'last 1 Safari versions',
];
const isCI = !!process.env.CI;
const isCI = Boolean(process.env.CI);
const isProduction = process.env.EMBER_ENV === 'production';
if (isCI || isProduction) {
+2 -2
View File
@@ -1,5 +1,5 @@
import Application from '../app';
import config from '../config/environment';
import Application from 'dummy/app';
import config from 'dummy/config/environment';
import { setApplication } from '@ember/test-helpers';
import { start } from 'ember-qunit';
@@ -1,4 +1,5 @@
import RESTAdapter from '@ember-data/adapter/rest';
/* eslint-disable-next-line ember/no-mixins */
import AdapterBuildURLMixin from 'api/mixins/adapter-build-url';
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
@@ -8,6 +9,7 @@ module('Unit | Mixin | build-url', function (hooks) {
test('it does not interfere with basic URLs', function (assert) {
assert.expect(1);
/* eslint-disable-next-line ember/no-new-mixins */
const Adapter = RESTAdapter.extend(AdapterBuildURLMixin);
this.owner.register('adapter:adapter', Adapter);
const adapter = this.owner.lookup('adapter:adapter');
@@ -17,6 +19,7 @@ module('Unit | Mixin | build-url', function (hooks) {
test('it does not interfere with namespaced URLs', function (assert) {
assert.expect(1);
/* eslint-disable-next-line ember/no-new-mixins */
const Adapter = RESTAdapter.extend(AdapterBuildURLMixin, {
namespace: 'api/v1',
});
@@ -28,6 +31,7 @@ module('Unit | Mixin | build-url', function (hooks) {
test('it can prepend a prefix', function (assert) {
assert.expect(1);
/* eslint-disable-next-line ember/no-new-mixins */
const Adapter = RESTAdapter.extend(AdapterBuildURLMixin, {
urlPrefix() {
return '/foo/bars';
@@ -41,6 +45,7 @@ module('Unit | Mixin | build-url', function (hooks) {
test('it can append a suffix', function (assert) {
assert.expect(1);
/* eslint-disable-next-line ember/no-new-mixins */
const Adapter = RESTAdapter.extend(AdapterBuildURLMixin, {
urlSuffix() {
return ':method';