Skip to content

Commit b9b7fb9

Browse files
committed
Build assets
1 parent be3d7bd commit b9b7fb9

File tree

8 files changed

+167
-17
lines changed

8 files changed

+167
-17
lines changed

dist/livewire.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/livewire.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"/livewire.js":"/livewire.js?id=dc2b31d7c22a76c62c92"}
1+
{"/livewire.js":"/livewire.js?id=95f9f00385b2fd5a2e92"}

js/connection/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,21 @@ export default class Connection {
2222

2323
// Forward the query string for the ajax requests.
2424
fetch(
25-
`${ window.livewire_app_url }/livewire/message/${ payload.fingerprint.name }`,
25+
`${window.livewire_app_url}/livewire/message/${payload.fingerprint.name}`,
2626
{
2727
method: 'POST',
2828
body: JSON.stringify(payload),
2929
// This enables "cookies".
3030
credentials: 'same-origin',
3131
headers: {
3232
'Content-Type': 'application/json',
33-
Accept: 'text/html, application/xhtml+xml',
33+
'Accept': 'text/html, application/xhtml+xml',
3434
'X-CSRF-TOKEN': getCsrfToken(),
3535
'X-Socket-ID': this.getSocketId(),
3636
'X-Livewire': true,
3737

3838
// We'll set this explicitly to mitigate potential interference from ad-blockers/etc.
39-
Referrer: window.location.href,
39+
'Referrer': window.location.href,
4040
},
4141
}
4242
)

package-lock.json

+148
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"@babel/plugin-proposal-object-rest-spread": "^7.11.0",
1313
"@babel/preset-env": "^7.11.5",
1414
"@rollup/plugin-alias": "^3.1.1",
15+
"@rollup/plugin-commonjs": "^15.0.0",
1516
"@rollup/plugin-node-resolve": "^7.1.3",
1617
"core-js": "^3.6.5",
1718
"fs-extra": "^8.1.0",
@@ -21,6 +22,7 @@
2122
"rollup-plugin-babel": "^4.3.3",
2223
"rollup-plugin-commonjs": "^10.1.0",
2324
"rollup-plugin-filesize": "^6.2.1",
25+
"rollup-plugin-node-resolve": "^5.2.0",
2426
"rollup-plugin-output-manifest": "^1.0.2",
2527
"rollup-plugin-terser": "^7.0.1",
2628
"whatwg-fetch": "^3.4.0"

src/LivewireServiceProvider.php

-8
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,6 @@ protected function registerViews()
116116
protected function registerRoutes()
117117
{
118118
if ($this->app->runningUnitTests()) {
119-
// This needs to be registered for Dusk to test the route-parameter binding
120-
if (PHP_VERSION_ID > 70400) {
121-
RouteFacade::get(
122-
'/livewire-dusk/tests/browser/sync-history/{step}',
123-
\Tests\Browser\SyncHistory\Component::class
124-
)->middleware('web')->name('sync-history');
125-
}
126-
127119
RouteFacade::get('/livewire-dusk/{component}', function ($component) {
128120
$class = urldecode($component);
129121

tests/Browser/TestCase.php

+10-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Throwable;
99
use Laravel\Dusk\Browser;
1010
use Illuminate\Support\Facades\File;
11+
use Illuminate\Support\Facades\Route;
1112
use Livewire\LivewireServiceProvider;
1213
use Illuminate\Support\Facades\Artisan;
1314
use PHPUnit\Framework\Assert as PHPUnit;
@@ -68,12 +69,19 @@ public function setUp(): void
6869
app('livewire')->component(\Tests\Browser\Nesting\NestedComponent::class);
6970
app('livewire')->component(\Tests\Browser\Extensions\Component::class);
7071
app('livewire')->component(\Tests\Browser\Defer\Component::class);
71-
72+
7273
if (PHP_VERSION_ID > 70400) {
7374
app('livewire')->component(\Tests\Browser\SyncHistory\Component::class);
7475
app('livewire')->component(\Tests\Browser\SyncHistory\ChildComponent::class);
76+
77+
// This needs to be registered for Dusk to test the route-parameter binding
78+
// See: \Tests\Browser\SyncHistory\Test.php
79+
Route::get(
80+
'/livewire-dusk/tests/browser/sync-history/{step}',
81+
\Tests\Browser\SyncHistory\Component::class
82+
)->middleware('web')->name('sync-history');
7583
}
76-
84+
7785
app('session')->put('_token', 'this-is-a-hack-because-something-about-validating-the-csrf-token-is-broken');
7886

7987
app('config')->set('view.paths', [

0 commit comments

Comments
 (0)