From 93e9edd5cd6efab7172a794b04d690f1f7b777c8 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Wed, 1 Nov 2017 22:08:02 +0100 Subject: [PATCH] refactor(jQuery): Remove $.ajax, use async/await, move custom paths to their own test - I wanted to remove $.ajax, so replaced it with fetch - Used async/await hopefully makes the tests easier to follow - We were testing custom paths using `posts` model in every test, moved testing of this behaviour into it's own test and removed from all other tests. --- package.json | 1 + .../server/resource-shorthand-test.js | 612 ++++++++---------- yarn.lock | 101 ++- 3 files changed, 352 insertions(+), 362 deletions(-) diff --git a/package.json b/package.json index 217c4a26a..5f4faf9dc 100644 --- a/package.json +++ b/package.json @@ -68,6 +68,7 @@ "ember-disable-prototype-extensions": "^1.1.2", "ember-export-application-global": "^2.0.0", "ember-fastboot-addon-tests": "^0.4.0", + "ember-fetch": "^3.4.3", "ember-load-initializers": "^1.0.0", "ember-resolver": "^4.0.0", "ember-sinon": "0.5.1", diff --git a/tests/integration/server/resource-shorthand-test.js b/tests/integration/server/resource-shorthand-test.js index bb4edbf40..1fd61880c 100644 --- a/tests/integration/server/resource-shorthand-test.js +++ b/tests/integration/server/resource-shorthand-test.js @@ -1,6 +1,7 @@ import {module, test} from 'qunit'; import { Model, ActiveModelSerializer } from 'ember-cli-mirage'; import Server from 'ember-cli-mirage/server'; +import fetch from 'fetch'; module('Integration | Server | Resource shorthand', function(hooks) { hooks.beforeEach(function() { @@ -22,294 +23,218 @@ module('Integration | Server | Resource shorthand', function(hooks) { this.server.shutdown(); }); - test('resource generates get shorthand for index action', function(assert) { - assert.expect(3); - let done = assert.async(2); + test('resource generates get shorthand for index action', async function(assert) { + assert.expect(2); this.server.db.loadData({ contacts: [ { id: 1, name: 'Link' }, { id: 2, name: 'Zelda' } - ], - blogPosts: [ - { id: 1, title: 'Post 1' }, - { id: 2, title: 'Post 2' } ] }); this.server.resource('contacts'); - this.server.resource('blog-posts', { path: '/posts' }); - - $.ajax({ - method: 'GET', - url: '/contacts' - }).done(function(res, status, xhr) { - assert.equal(xhr.status, 200); - assert.deepEqual(res, { contacts: [{ id: '1', name: 'Link' }, { id: '2', name: 'Zelda' }] }); - done(); - }); - $.ajax({ - method: 'GET', - url: '/posts' - }).fail((xhr, textStatus, error) => { - assert.ok(false, 'failed to find custom path'); - done(); - }).done(function(res, status, xhr) { - assert.ok(true); - done(); - }); + let response = await fetch('/contacts'); + assert.equal(response.status, 200, 'Should receive a 200 response from resource index action'); + let results = await response.json(); + assert.deepEqual( + results, + { contacts: [{ id: '1', name: 'Link' }, { id: '2', name: 'Zelda' }] }, + 'Should receive all resources from the DB' + ); }); - test('resource generates get shorthand for show action', function(assert) { - assert.expect(3); - let done = assert.async(2); + test('resource generates get shorthand for show action', async function(assert) { + assert.expect(2); this.server.db.loadData({ contacts: [ { id: 1, name: 'Link' }, { id: 2, name: 'Zelda' } - ], - blogPosts: [ - { id: 1, title: 'Post 1' }, - { id: 2, title: 'Post 2' } ] }); this.server.resource('contacts'); - this.server.resource('blog-posts', { path: '/posts' }); - - $.ajax({ - method: 'GET', - url: '/contacts/2' - }).done(function(res, status, xhr) { - assert.equal(xhr.status, 200); - assert.deepEqual(res, { contact: { id: '2', name: 'Zelda' } }); - done(); - }); - $.ajax({ - method: 'GET', - url: '/posts/2' - }).fail((xhr, textStatus, error) => { - assert.ok(false, 'failed to find custom path'); - done(); - }).done(function(res, status, xhr) { - assert.ok(true); - done(); - }); + let response = await fetch('/contacts/2'); + assert.equal(response.status, 200, 'Should receive a 200 response from resource show action'); + let results = await response.json(); + assert.deepEqual( + results, + { contact: { id: '2', name: 'Zelda' } }, + 'Should receive the requested resource from the DB' + ); }); - test('resource generates post shorthand', function(assert) { + test('resource generates post shorthand for create action', async function(assert) { let { server } = this; - assert.expect(3); - let done = assert.async(2); + assert.expect(2); server.resource('contacts'); - server.resource('blog-posts', { path: '/posts' }); - $.ajax({ + let options = { method: 'POST', - url: '/contacts', - data: JSON.stringify({ + body: JSON.stringify({ contact: { name: 'Zelda' } }) - }).done((res, status, xhr) => { - assert.equal(xhr.status, 201); - assert.equal(server.db.contacts.length, 1); - done(); - }); + }; - $.ajax({ - method: 'POST', - url: '/posts', - data: JSON.stringify({ - blog_post: { - name: 'Post 1' - } - }) - }).fail((xhr, textStatus, error) => { - assert.ok(false, 'failed to find custom path'); - done(); - }).done((res, status, xhr) => { - assert.ok(true); - done(); - }); + let response = await fetch('/contacts', options); + assert.equal(response.status, 201, 'Should receive 201 response from resource create action'); + assert.equal(server.db.contacts.length, 1, 'Should create a new record in the DB'); }); - test('resource generates put shorthand', function(assert) { + test('resource generates put shorthand for update action', async function(assert) { let { server } = this; - assert.expect(3); - let done = assert.async(2); + assert.expect(2); this.server.db.loadData({ contacts: [ { id: 1, name: 'Link' } - ], - blogPosts: [ - { id: 1, title: 'Post 1' } ] }); server.resource('contacts'); - server.resource('blog-posts', { path: '/posts' }); - $.ajax({ + let options = { method: 'PUT', - url: '/contacts/1', - data: JSON.stringify({ + body: JSON.stringify({ contact: { name: 'Zelda' } }) - }).done((res, status, xhr) => { - assert.equal(xhr.status, 200); - assert.equal(server.db.contacts[0].name, 'Zelda'); - done(); - }); + }; - $.ajax({ - method: 'PUT', - url: '/posts/1', - data: JSON.stringify({ - blog_post: { - name: 'Post 2' - } - }) - }).fail((xhr, textStatus, error) => { - assert.ok(false, 'failed to find custom path'); - done(); - }).done((res, status, xhr) => { - assert.ok(true); - done(); - }); + let response = await fetch('/contacts/1', options); + assert.equal(response.status, 200, 'Should receive 200 response from resource update action'); + assert.equal(server.db.contacts[0].name, 'Zelda', 'Should update record in the DB'); }); - test('resource generates patch shorthand', function(assert) { + test('resource generates patch shorthand for update action', async function(assert) { let { server } = this; - assert.expect(3); - let done = assert.async(2); + assert.expect(2); this.server.db.loadData({ contacts: [ { id: 1, name: 'Link' } - ], - blogPosts: [ - { id: 1, title: 'Post 1' } ] }); server.resource('contacts'); - server.resource('blog-posts', { path: '/posts' }); - $.ajax({ + let options = { method: 'PATCH', - url: '/contacts/1', - data: JSON.stringify({ + body: JSON.stringify({ contact: { name: 'Zelda' } }) - }).done((res, status, xhr) => { - assert.equal(xhr.status, 200); - assert.equal(server.db.contacts[0].name, 'Zelda'); - done(); - }); + }; - $.ajax({ - method: 'PATCH', - url: '/posts/1', - data: JSON.stringify({ - blog_post: { - name: 'Post 2' - } - }) - }).fail((xhr, textStatus, error) => { - assert.ok(false, 'failed to find custom path'); - done(); - }).done((res, status, xhr) => { - assert.ok(true); - done(); - }); + let response = await fetch('/contacts/1', options); + assert.equal(response.status, 200, 'Should receive 200 response from resource update action'); + assert.equal(server.db.contacts[0].name, 'Zelda', 'Should update record in the DB'); }); - test('resource generates delete shorthand works', function(assert) { + test('resource generates delete shorthand for delete action', async function(assert) { let { server } = this; - assert.expect(3); - let done = assert.async(2); + assert.expect(2); this.server.db.loadData({ contacts: [ { id: 1, name: 'Link' } - ], - blogPosts: [ - { id: 1, title: 'Post 1' } ] }); server.resource('contacts'); - server.resource('blog-posts', { path: '/posts' }); - - $.ajax({ - method: 'DELETE', - url: '/contacts/1' - }).done((res, status, xhr) => { - assert.equal(xhr.status, 204); - assert.equal(server.db.contacts.length, 0); - done(); - }); - $.ajax({ - method: 'DELETE', - url: '/posts/1' - }).fail((xhr, textStatus, error) => { - assert.ok(false, 'failed to find custom path'); - done(); - }).done((res, status, xhr) => { - assert.ok(true); - done(); - }); + let response = await fetch('/contacts/1', { method: 'DELETE' }); + assert.equal(response.status, 204, 'Should receive 204 response from the resource delete action'); + assert.equal(server.db.contacts.length, 0, 'Should delete record in the DB'); }); - test('resource accepts singular name', function(assert) { - assert.expect(3); - let done = assert.async(2); + test('resource accepts a custom path for a resource', async function(assert) { + assert.expect(6); this.server.db.loadData({ - contacts: [ - { id: 1, name: 'Link' }, - { id: 2, name: 'Zelda' } - ], blogPosts: [ { id: 1, title: 'Post 1' }, { id: 2, title: 'Post 2' } ] }); - this.server.resource('contact'); - this.server.resource('blog-post', { path: '/posts' }); - - $.ajax({ - method: 'GET', - url: '/contacts' - }).done(function(res, status, xhr) { - assert.equal(xhr.status, 200); - assert.deepEqual(res, { contacts: [{ id: '1', name: 'Link' }, { id: '2', name: 'Zelda' }] }); - done(); - }); + this.server.resource('blog-posts', { path: '/custom-posts-path' }); + + let response = await fetch('/custom-posts-path'); + assert.equal(response.status, 200, 'Should receive a 200 response from resource index action'); + + response = await fetch('/custom-posts-path/2'); + assert.equal(response.status, 200, 'Should receive a 200 response from resource show action'); + + let options = { + method: 'POST', + body: JSON.stringify({ + blogPost: { + title: 'Post 3' + } + }) + }; + + response = await fetch('/custom-posts-path', options); + assert.equal(response.status, 201, 'Should receive 201 response from resource create action'); + + options = { + method: 'PUT', + body: JSON.stringify({ + contact: { + name: 'Zelda' + } + }) + }; - $.ajax({ - method: 'GET', - url: '/posts' - }).fail((xhr, textStatus, error) => { - assert.ok(false, 'failed to find custom path'); - done(); - }).done(function(res, status, xhr) { - assert.ok(true); - done(); + response = await fetch('/custom-posts-path/1', options); + assert.equal(response.status, 200, 'Should receive 200 response from resource update action with PUT'); + + options = { + method: 'PATCH', + body: JSON.stringify({ + contact: { + name: 'Zelda' + } + }) + }; + + response = await fetch('/custom-posts-path/1', options); + assert.equal(response.status, 200, 'Should receive 200 response from resource update action with PATCH'); + + response = await fetch('/custom-posts-path/1', { method: 'DELETE' }); + assert.equal(response.status, 204, 'Should receive 204 response from the resource delete action'); + }); + + test('resource accepts singular name', async function(assert) { + assert.expect(2); + + this.server.db.loadData({ + contacts: [ + { id: 1, name: 'Link' }, + { id: 2, name: 'Zelda' } + ] }); + + this.server.resource('contact'); + // this.server.resource('blog-post', { path: '/posts' }); + + let response = await fetch('/contacts'); + assert.equal(response.status, 200, 'Should receive a 200 response from resource index action'); + let results = await response.json(); + assert.deepEqual( + results, + { contacts: [{ id: '1', name: 'Link' }, { id: '2', name: 'Zelda' }] }, + 'Should receive all resources from the DB' + ); }); test('resource does not accept both :all and :except options', function(assert) { @@ -320,10 +245,9 @@ module('Integration | Server | Resource shorthand', function(hooks) { }, 'cannot use both :only and :except options'); }); - test('resource generates shorthands which are whitelisted by :only option', function(assert) { + test('resource generates shorthands which are whitelisted by :only option', async function(assert) { let { server } = this; - assert.expect(2); - let done = assert.async(2); + assert.expect(1); server.db.loadData({ contacts: [ @@ -333,29 +257,12 @@ module('Integration | Server | Resource shorthand', function(hooks) { }); server.resource('contacts', { only: ['index'] }); - server.resource('blog-posts', { path: '/posts', only: ['index'] }); - - $.ajax({ - method: 'GET', - url: '/contacts' - }).done((res, status, xhr) => { - assert.equal(xhr.status, 200); - done(); - }); - $.ajax({ - method: 'GET', - url: '/posts' - }).fail(function() { - assert.ok(false, 'failed to find custom path'); - done(); - }).done((res, status, xhr) => { - assert.equal(xhr.status, 200); - done(); - }); + let response = await fetch('/contacts'); + assert.equal(response.status, 200, 'Should receive a 200 response from resource index action'); }); - test('resource does not generate shorthands which are not whitelisted with :only option', function(assert) { + test('resource does not generate shorthands which are not whitelisted with :only option', async function(assert) { let { server } = this; assert.expect(5); @@ -367,73 +274,77 @@ module('Integration | Server | Resource shorthand', function(hooks) { server.resource('contacts', { only: ['index'] }); - let doneForShow = assert.async(); - - $.ajax({ - method: 'GET', - url: '/contacts/1' - }).fail((xhr, textStatus, error) => { - assert.ok(error.message.indexOf("Mirage: Your Ember app tried to GET '/contacts/1'") !== -1); - doneForShow(); - }); - - let doneForCreate = assert.async(); - - $.ajax({ - method: 'POST', - url: '/contacts', - data: JSON.stringify({ - contact: { - name: 'Zelda' - } - }) - }).fail((xhr, textStatus, error) => { - assert.ok(error.message.indexOf("Mirage: Your Ember app tried to POST '/contacts'") !== -1); - doneForCreate(); - }); - - let doneForPut = assert.async(); - - $.ajax({ - method: 'PUT', - url: '/contacts/1', - data: JSON.stringify({ - contact: { - name: 'Zelda' - } - }) - }).fail((xhr, textStatus, error) => { - assert.ok(error.message.indexOf("Mirage: Your Ember app tried to PUT '/contacts/1'") !== -1); - doneForPut(); - }); - - let doneForPatch = assert.async(); - - $.ajax({ - method: 'PATCH', - url: '/contacts/1', - data: JSON.stringify({ - contact: { - name: 'Zelda' - } - }) - }).fail((xhr, textStatus, error) => { - assert.ok(error.message.indexOf("Mirage: Your Ember app tried to PATCH '/contacts/1'") !== -1); - doneForPatch(); - }); - - let doneForDelete = assert.async(); - - $.ajax({ - method: 'DELETE', - url: '/contacts/1' - }).fail((xhr, textStatus, error) => { - assert.ok(error.message.indexOf("Mirage: Your Ember app tried to DELETE '/contacts/1'") !== -1); - doneForDelete(); - }); + try { + await fetch('/contacts/1'); + } catch(e) { + assert.ok( + e.message.indexOf("Mirage: Your Ember app tried to GET '/contacts/1'") > -1, + 'Should receive an error from Mirage when requesting the show action' + ); + } + + try { + let options = { + method: 'POST', + data: JSON.stringify({ + contact: { + name: 'Zelda' + } + }) + }; + await fetch('/contacts', options); + } catch(e) { + assert.ok( + e.message.indexOf("Mirage: Your Ember app tried to POST '/contacts'") > -1, + 'Should receive an error from Mirage when requesting the create action' + ); + } + + try { + let options = { + method: 'PUT', + data: JSON.stringify({ + contact: { + name: 'Zelda' + } + }) + }; + await fetch('/contacts/1', options); + } catch(e) { + assert.ok( + e.message.indexOf("Mirage: Your Ember app tried to PUT '/contacts/1'") > -1, + 'Should receive an error from Mirage when requesting the update action with PUT' + ); + } + + try { + let options = { + method: 'PATCH', + data: JSON.stringify({ + contact: { + name: 'Zelda' + } + }) + }; + await fetch('/contacts/1', options); + } catch(e) { + assert.ok( + e.message.indexOf("Mirage: Your Ember app tried to PATCH '/contacts/1'") > -1, + 'Should receive an error from Mirage when requesting the update action with PATCH' + ); + } + + try { + await fetch('/contacts/1', { method: 'DELETE' }); + } catch(e) { + assert.ok( + e.message.indexOf("Mirage: Your Ember app tried to DELETE '/contacts/1'") > -1, + 'Should receive an error from Mirage when requesting the delet action' + ); + } }); - test('resource generates shorthands which are not blacklisted by :except option', function(assert) { + test('resource generates shorthands which are not blacklisted by :except option', async function(assert) { let { server } = this; assert.expect(2); @@ -445,28 +356,14 @@ module('Integration | Server | Resource shorthand', function(hooks) { server.resource('contacts', { except: ['create', 'update', 'delete'] }); - let doneForIndex = assert.async(); - - $.ajax({ - method: 'GET', - url: '/contacts' - }).done((res, status, xhr) => { - assert.equal(xhr.status, 200); - doneForIndex(); - }); + let response = await fetch('/contacts'); + assert.equal(response.status, 200, 'Should receive a 200 response from resource index action'); - let doneForShow = assert.async(); - - $.ajax({ - method: 'GET', - url: '/contacts' - }).done((res, status, xhr) => { - assert.equal(xhr.status, 200); - doneForShow(); - }); + response = await fetch('/contacts/1'); + assert.equal(response.status, 200, 'Should receive a 200 response from resource show action'); }); - test('resource does not generate shorthands which are blacklisted by :except option', function(assert) { + test('resource does not generate shorthands which are blacklisted by :except option', async function(assert) { let { server } = this; assert.expect(4); @@ -478,59 +375,64 @@ module('Integration | Server | Resource shorthand', function(hooks) { server.resource('contacts', { except: ['create', 'update', 'delete'] }); - let doneForCreate = assert.async(); - - $.ajax({ - method: 'POST', - url: '/contacts', - data: JSON.stringify({ - contact: { - name: 'Zelda' - } - }) - }).fail((xhr, textStatus, error) => { - assert.ok(error.message.indexOf("Mirage: Your Ember app tried to POST '/contacts'") !== -1); - doneForCreate(); - }); - - let doneForPut = assert.async(); - - $.ajax({ - method: 'PUT', - url: '/contacts/1', - data: JSON.stringify({ - contact: { - name: 'Zelda' - } - }) - }).fail((xhr, textStatus, error) => { - assert.ok(error.message.indexOf("Mirage: Your Ember app tried to PUT '/contacts/1'") !== -1); - doneForPut(); - }); - - let doneForPatch = assert.async(); - - $.ajax({ - method: 'PATCH', - url: '/contacts/1', - data: JSON.stringify({ - contact: { - name: 'Zelda' - } - }) - }).fail((xhr, textStatus, error) => { - assert.ok(error.message.indexOf("Mirage: Your Ember app tried to PATCH '/contacts/1'") !== -1); - doneForPatch(); - }); - - let doneForDelete = assert.async(); - - $.ajax({ - method: 'DELETE', - url: '/contacts/1' - }).fail((xhr, textStatus, error) => { - assert.ok(error.message.indexOf("Mirage: Your Ember app tried to DELETE '/contacts/1'") !== -1); - doneForDelete(); - }); + try { + let options = { + method: 'POST', + data: JSON.stringify({ + contact: { + name: 'Zelda' + } + }) + }; + await fetch('/contacts', options); + } catch(e) { + assert.ok( + e.message.indexOf("Mirage: Your Ember app tried to POST '/contacts'") > -1, + 'Should receive an error from Mirage when requesting the create action' + ); + } + + try { + let options = { + method: 'PUT', + data: JSON.stringify({ + contact: { + name: 'Zelda' + } + }) + }; + await fetch('/contacts/1', options); + } catch(e) { + assert.ok( + e.message.indexOf("Mirage: Your Ember app tried to PUT '/contacts/1'") > -1, + 'Should receive an error from Mirage when requesting the update action with PUT' + ); + } + + try { + let options = { + method: 'PATCH', + data: JSON.stringify({ + contact: { + name: 'Zelda' + } + }) + }; + await fetch('/contacts/1', options); + } catch(e) { + assert.ok( + e.message.indexOf("Mirage: Your Ember app tried to PATCH '/contacts/1'") > -1, + 'Should receive an error from Mirage when requesting the update action with PATCH' + ); + } + + try { + await fetch('/contacts/1', { method: 'DELETE' }); + } catch(e) { + assert.ok( + e.message.indexOf("Mirage: Your Ember app tried to DELETE '/contacts/1'") > -1, + 'Should receive an error from Mirage when requesting the delet action' + ); + } }); }); diff --git a/yarn.lock b/yarn.lock index e9e08bbd9..0d8b9f89c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1311,6 +1311,19 @@ broccoli-file-creator@^1.0.0, broccoli-file-creator@^1.1.1: rsvp "~3.0.6" symlink-or-copy "^1.0.1" +broccoli-filter@^0.1.11: + version "0.1.14" + resolved "https://registry.yarnpkg.com/broccoli-filter/-/broccoli-filter-0.1.14.tgz#23cae3891ff9ebb7b4d7db00c6dcf03535daf7ad" + dependencies: + broccoli-kitchen-sink-helpers "^0.2.6" + broccoli-writer "^0.1.1" + mkdirp "^0.3.5" + promise-map-series "^0.2.1" + quick-temp "^0.1.2" + rsvp "^3.0.16" + symlink-or-copy "^1.0.1" + walk-sync "^0.1.3" + broccoli-filter@^1.2.2, broccoli-filter@^1.2.3: version "1.2.4" resolved "https://registry.yarnpkg.com/broccoli-filter/-/broccoli-filter-1.2.4.tgz#409afb94b9a3a6da9fac8134e91e205f40cc7330" @@ -1366,7 +1379,7 @@ broccoli-funnel@^2.0.0, broccoli-funnel@^2.0.1: symlink-or-copy "^1.0.0" walk-sync "^0.3.1" -broccoli-kitchen-sink-helpers@^0.2.5, broccoli-kitchen-sink-helpers@~0.2.0: +broccoli-kitchen-sink-helpers@^0.2.5, broccoli-kitchen-sink-helpers@^0.2.6, broccoli-kitchen-sink-helpers@~0.2.0: version "0.2.9" resolved "https://registry.yarnpkg.com/broccoli-kitchen-sink-helpers/-/broccoli-kitchen-sink-helpers-0.2.9.tgz#a5e0986ed8d76fb5984b68c3f0450d3a96e36ecc" dependencies: @@ -1475,7 +1488,7 @@ broccoli-sri-hash@^2.1.0: sri-toolbox "^0.2.0" symlink-or-copy "^1.0.1" -broccoli-stew@^1.2.0, broccoli-stew@^1.3.3, broccoli-stew@^1.5.0: +broccoli-stew@^1.2.0, broccoli-stew@^1.3.3, broccoli-stew@^1.4.2, broccoli-stew@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/broccoli-stew/-/broccoli-stew-1.5.0.tgz#d7af8c18511dce510e49d308a62e5977f461883c" dependencies: @@ -1501,6 +1514,14 @@ broccoli-string-replace@^0.1.1: broccoli-persistent-filter "^1.1.5" minimatch "^3.0.3" +broccoli-templater@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/broccoli-templater/-/broccoli-templater-1.0.0.tgz#7c054aacf596d1868d1a44291f9ec7b907d30ecf" + dependencies: + broccoli-filter "^0.1.11" + broccoli-stew "^1.2.0" + lodash.template "^3.3.2" + broccoli-uglify-sourcemap@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/broccoli-uglify-sourcemap/-/broccoli-uglify-sourcemap-2.0.0.tgz#2dc574e9d330c2e0dcc834b3d24c794b405a3803" @@ -1521,7 +1542,7 @@ broccoli-unwatched-tree@^0.1.1: dependencies: broccoli-source "^1.1.0" -broccoli-writer@~0.1.1: +broccoli-writer@^0.1.1, broccoli-writer@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/broccoli-writer/-/broccoli-writer-0.1.1.tgz#d4d71aa8f2afbc67a3866b91a2da79084b96ab2d" dependencies: @@ -2570,6 +2591,17 @@ ember-fastboot-addon-tests@^0.4.0: request "^2.74.0" rsvp "^3.3.1" +ember-fetch@^3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/ember-fetch/-/ember-fetch-3.4.3.tgz#fb8ba73148bb2399a82b037e4fdf9a953cd496ba" + dependencies: + broccoli-funnel "^1.2.0" + broccoli-stew "^1.4.2" + broccoli-templater "^1.0.0" + ember-cli-babel "^6.8.1" + node-fetch "^2.0.0-alpha.9" + whatwg-fetch "^2.0.3" + ember-get-config@^0.2.2: version "0.2.3" resolved "https://registry.yarnpkg.com/ember-get-config/-/ember-get-config-0.2.3.tgz#546e77c991792fffde2f6757a5edb0c5dd122c0e" @@ -4182,6 +4214,14 @@ lodash._baseflatten@^3.0.0: lodash.isarguments "^3.0.0" lodash.isarray "^3.0.0" +lodash._basetostring@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz#d1861d877f824a52f669832dcaf3ee15566a07d5" + +lodash._basevalues@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz#5b775762802bde3d3297503e26300820fdf661b7" + lodash._bindcallback@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" @@ -4228,14 +4268,14 @@ lodash._objecttypes@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/lodash._objecttypes/-/lodash._objecttypes-2.3.0.tgz#6a3ea3987dd6eeb8021b2d5c9c303549cc2bae1e" +lodash._reinterpolate@^3.0.0, lodash._reinterpolate@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + lodash._reinterpolate@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-2.3.0.tgz#03ee9d85c0e55cbd590d71608a295bdda51128ec" -lodash._reinterpolate@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" - lodash._renative@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/lodash._renative/-/lodash._renative-2.3.0.tgz#77d8edd4ced26dd5971f9e15a5f772e4e317fbd3" @@ -4247,6 +4287,10 @@ lodash._reunescapedhtml@~2.3.0: lodash._htmlescapes "~2.3.0" lodash.keys "~2.3.0" +lodash._root@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692" + lodash._setbinddata@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/lodash._setbinddata/-/lodash._setbinddata-2.3.0.tgz#e5610490acd13277d59858d95b5f2727f1508f04" @@ -4313,6 +4357,12 @@ lodash.defaultsdeep@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.0.tgz#bec1024f85b1bd96cbea405b23c14ad6443a6f81" +lodash.escape@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698" + dependencies: + lodash._root "^3.0.0" + lodash.escape@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-2.3.0.tgz#844c38c58f844e1362ebe96726159b62cf5f2a58" @@ -4407,6 +4457,20 @@ lodash.support@~2.3.0: dependencies: lodash._renative "~2.3.0" +lodash.template@^3.3.2: + version "3.6.2" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-3.6.2.tgz#f8cdecc6169a255be9098ae8b0c53d378931d14f" + dependencies: + lodash._basecopy "^3.0.0" + lodash._basetostring "^3.0.0" + lodash._basevalues "^3.0.0" + lodash._isiterateecall "^3.0.0" + lodash._reinterpolate "^3.0.0" + lodash.escape "^3.0.0" + lodash.keys "^3.0.0" + lodash.restparam "^3.0.0" + lodash.templatesettings "^3.0.0" + lodash.template@^4.2.5: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0" @@ -4426,6 +4490,13 @@ lodash.template@~2.3.x: lodash.templatesettings "~2.3.0" lodash.values "~2.3.0" +lodash.templatesettings@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz#fb307844753b66b9f1afa54e262c745307dba8e5" + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.escape "^3.0.0" + lodash.templatesettings@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz#2b4d4e95ba440d915ff08bc899e4553666713316" @@ -4643,6 +4714,10 @@ mkdirp@0.5.1, mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdi dependencies: minimist "0.0.8" +mkdirp@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.3.5.tgz#de3e5f8961c88c787ee1368df849ac4413eca8d7" + mktemp@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/mktemp/-/mktemp-0.4.0.tgz#6d0515611c8a8c84e484aa2000129b98e981ff0b" @@ -4735,6 +4810,10 @@ node-fetch@^1.3.3: encoding "^0.1.11" is-stream "^1.0.1" +node-fetch@^2.0.0-alpha.9: + version "2.0.0-alpha.9" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.0.0-alpha.9.tgz#990c0634f510f76449a0d6f6eaec96b22f273628" + node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" @@ -6214,6 +6293,10 @@ walk-sync@0.3.1: ensure-posix-path "^1.0.0" matcher-collection "^1.0.0" +walk-sync@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/walk-sync/-/walk-sync-0.1.3.tgz#8a07261a00bda6cfb1be25e9f100fad57546f583" + walk-sync@^0.2.5, walk-sync@^0.2.7: version "0.2.7" resolved "https://registry.yarnpkg.com/walk-sync/-/walk-sync-0.2.7.tgz#b49be4ee6867657aeb736978b56a29d10fa39969" @@ -6263,6 +6346,10 @@ whatwg-encoding@^1.0.1: dependencies: iconv-lite "0.4.13" +whatwg-fetch@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84" + whatwg-url@^4.3.0: version "4.8.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-4.8.0.tgz#d2981aa9148c1e00a41c5a6131166ab4683bbcc0"