Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: vite warning #60

Merged
merged 1 commit into from
Mar 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading