Skip to content

Commit 91175ab

Browse files
authored
Merge pull request #655 from DuendeSoftware/powershell-svgfix
Fix SVG validation and update dev environment configuration
2 parents e259462 + 6fa3cd7 commit 91175ab

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

.devcontainer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"vscode": {
55
"extensions": [
66
"astro-build.astro-vscode",
7-
"esbenp.prettier-vscode"
7+
"esbenp.prettier-vscode",
8+
"ms-vscode.powershell"
89
]
910
}
1011
},

fix-svg.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
(Get-Content node_modules\astro\dist\assets\utils\vendor\image-size\types\svg.js) -replace 'validate: \(input\) => svgReg.test\(toUTF8String\(input, 0, 1e3\)\)', 'validate: (input) => svgReg.test(toUTF8String(input))' | Set-Content node_modules\astro\dist\assets\utils\vendor\image-size\types\svg.js

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"validateredirects": "cd _to-migrate/urls && node test-urls.js",
2121
"linkchecker": " npm run build && lychee --no-progress --max-concurrency 16 --exclude-loopback --require-https --exclude sample.duendesoftware.com --exclude docs.duendesoftware.com --exclude sitemap --exclude github --root-dir \"$PWD/dist\" dist/**",
2222
"FYI": "https://github.com/withastro/astro/issues/13006",
23-
"postinstall": "chmod +x fix-svg.sh && ./fix-svg.sh"
23+
"postinstall": "pwsh fix-svg.ps1"
2424
},
2525
"dependencies": {
2626
"@astrojs/markdown-remark": "^6.3.1",

0 commit comments

Comments
 (0)