Skip to content

Commit

Permalink
Bump es-module-shims to 1.5.8
Browse files Browse the repository at this point in the history
  • Loading branch information
tonysm committed Jun 27, 2022
1 parent 630f5b9 commit 21db811
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion resources/views/tags.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

@if (config('importmap.use_shim'))
@if ($nonce) <script type="esms-options" nonce="{{ $nonce }}">{"nonce":"{{ $nonce }}"}</script> @endif
<script async src="https://ga.jspm.io/npm:es-module-shims@1.5.5/dist/es-module-shims.js" data-turbo-track="reload"@if ($nonce) nonce="{{ $nonce }}"@endif></script>
<script async src="https://ga.jspm.io/npm:es-module-shims@1.5.8/dist/es-module-shims.js" data-turbo-track="reload"@if ($nonce) nonce="{{ $nonce }}"@endif></script>
@endif

<script type="module" data-turbo-track="reload"@if ($nonce) nonce="{{ $nonce }}" @endif>import '{{ $entrypoint }}';</script>
4 changes: 2 additions & 2 deletions tests/TagsComponentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
$this->blade('<x-importmap-tags />')
->assertSee('<link rel="modulepreload" href="https://cdn.skypack.dev/md5" />', escape: false)
->assertDontSee('<script type="esms-options"', escape: false)
->assertSee('<script async src="https://ga.jspm.io/npm:es-module-shims@1.5.5/dist/es-module-shims.js" data-turbo-track="reload"></script>', escape: false);
->assertSee('<script async src="https://ga.jspm.io/npm:es-module-shims@1.5.8/dist/es-module-shims.js" data-turbo-track="reload"></script>', escape: false);
});

it('uses given CSP nonce', function () {
$this->blade('<x-importmap-tags nonce="h3ll0" />')
->assertSee('<link rel="modulepreload" href="https://cdn.skypack.dev/md5" nonce="h3ll0" />', escape: false)
->assertSee('<script type="esms-options" nonce="h3ll0">{"nonce":"h3ll0"}</script>', escape: false)
->assertSee('<script async src="https://ga.jspm.io/npm:es-module-shims@1.5.5/dist/es-module-shims.js" data-turbo-track="reload" nonce="h3ll0"></script>', escape: false);
->assertSee('<script async src="https://ga.jspm.io/npm:es-module-shims@1.5.8/dist/es-module-shims.js" data-turbo-track="reload" nonce="h3ll0"></script>', escape: false);
});

0 comments on commit 21db811

Please sign in to comment.