Skip to content

Commit

Permalink
fix: vite warning
Browse files Browse the repository at this point in the history
Signed-off-by: Andres Correa Casablanca <[email protected]>
  • Loading branch information
castarco committed Mar 31, 2024
1 parent ceaf828 commit 9bfaadf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion @kindspells/astro-shield/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kindspells/astro-shield",
"version": "1.3.2",
"version": "1.3.3",
"description": "Astro integration to enhance your website's security with SubResource Integrity hashes, Content-Security-Policy headers, and other techniques.",
"private": false,
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion @kindspells/astro-shield/src/core.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ const loadVirtualMiddlewareModule = async (
if (!shouldRegenerateHashesModule) {
try {
const hashesModule = /** @type {HashesModule} */ (
await import(sri.hashesModule)
await import(/* @vite-ignore */ sri.hashesModule)
)

for (const allowedScript of sri.scriptsAllowListUrls) {
Expand Down
4 changes: 2 additions & 2 deletions @kindspells/astro-shield/tests/core.test.mts
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ describe('updateStaticPageSriHashes', () => {
<title>My Test Page</title>
</head>
<body>
<script type="module" src="/core.mjs" integrity="sha256-XJRisMK9wQvjjOmHgwTyaPbBdQ7sIaEh6BiqErhW4f8="></script>
<script type="module" src="/core.mjs" integrity="sha256-26MA71l0ZDlgA73URL13JbJ0hGMnRJgoHHJmSPLSspk="></script>
</body>
</html>`

Expand All @@ -382,7 +382,7 @@ describe('updateStaticPageSriHashes', () => {
expect(h.extScriptHashes.size).toBe(1)
expect(
h.extScriptHashes.has(
'sha256-XJRisMK9wQvjjOmHgwTyaPbBdQ7sIaEh6BiqErhW4f8=',
'sha256-26MA71l0ZDlgA73URL13JbJ0hGMnRJgoHHJmSPLSspk=',
),
).toBe(true)
expect(h.inlineScriptHashes.size).toBe(0)
Expand Down

0 comments on commit 9bfaadf

Please sign in to comment.