Skip to content

Commit d029738

Browse files
authored
fix: replace serve with http-server to resolve production CVEs (#9655)
2 parents c247ff0 + 322a06d commit d029738

File tree

8 files changed

+94
-161
lines changed

8 files changed

+94
-161
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"$schema": "https://unpkg.com/knip@5/schema.json",
3-
"ignore": ["public/{assets,components,theme}/**", "tests/hydration.webdriver.ts"],
3+
"ignore": ["tests/hydration.webdriver.ts"],
44
"ignoreDependencies": [
55
"@public-ui/components",
66
"@public-ui/theme-default",
77
"@wdio/local-runner",
88
"@wdio/mocha-framework",
99
"@wdio/spec-reporter",
1010
"chromedriver",
11-
"serve"
11+
"http-server"
1212
],
1313
"project": ["tests/**/*.ts"]
1414
}

packages/tools/benchmark-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"prettier": "3.8.1",
5151
"prettier-plugin-organize-imports": "4.3.0",
5252
"rimraf": "6.1.3",
53-
"serve": "14.2.5",
53+
"http-server": "14.1.0",
5454
"typescript": "5.9.3"
5555
}
5656
}

packages/tools/benchmark-tests/playwright.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default defineConfig({
2020
},
2121
],
2222
webServer: {
23-
command: 'npx serve -p 3000',
23+
command: 'npx http-server -p 3000',
2424
cwd: 'public',
2525
reuseExistingServer: false,
2626
url: 'http://localhost:3000',

packages/tools/visual-tests/.knip.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://unpkg.com/knip@5/schema.json",
3-
"ignoreDependencies": ["@public-ui/sample-react", "serve"],
3+
"ignoreDependencies": ["@public-ui/sample-react", "http-server"],
44
"rules": {
55
"classMembers": "warn"
66
}

packages/tools/visual-tests/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
"@axe-core/playwright": "4.11.1",
3535
"@public-ui/sample-react": "workspace:*",
3636
"axe-html-reporter": "2.2.11",
37-
"portfinder": "1.0.38",
38-
"serve": "14.2.5"
37+
"http-server": "14.1.0",
38+
"portfinder": "1.0.38"
3939
},
4040
"devDependencies": {
4141
"@babel/eslint-parser": "7.28.6",

packages/tools/visual-tests/playwright.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export default defineConfig({
7373

7474
/* Run your local dev server before starting the tests */
7575
webServer: {
76-
command: `npx serve -p ${PORT}`,
76+
command: `npx http-server -p ${PORT}`,
7777
cwd: path.resolve(BUILD_PATH),
7878
url: BASE_URL,
7979
reuseExistingServer: false,

packages/tools/visual-tests/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ void (async () => {
7777

7878
if (process.env.KOLIBRI_CLEANUP === '0') {
7979
console.log('Skipping cleanup up build folder.');
80-
console.log(`You can serve this build with "npx serve ${buildPath}".`);
80+
console.log(`You can serve this build with "npx http-server ${buildPath}".`);
8181
} else {
8282
console.log('Cleaning up build folder …');
8383
fs.rmSync(buildPath, { recursive: true, force: true });

0 commit comments

Comments
 (0)