Skip to content

Commit

Permalink
Merge branch 'main' into renovate/core-js-3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan authored Nov 4, 2024
2 parents 2561677 + de12799 commit f39fbff
Show file tree
Hide file tree
Showing 40 changed files with 553 additions and 469 deletions.
4 changes: 2 additions & 2 deletions e2e/cases/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"name": "@e2e/svelte",
"version": "1.0.0",
"dependencies": {
"svelte": "^5.0.3"
"svelte": "^5.1.9"
},
"devDependencies": {
"less": "^4.2.0",
"sass": "^1.80.4",
"sass": "^1.80.6",
"stylus": "0.64.0"
}
}
6 changes: 3 additions & 3 deletions e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@rsbuild/plugin-less": "workspace:*",
"@rsbuild/plugin-preact": "workspace:*",
"@rsbuild/plugin-react": "workspace:*",
"@rsbuild/plugin-rem": "^1.0.1",
"@rsbuild/plugin-rem": "^1.0.2",
"@rsbuild/plugin-sass": "workspace:*",
"@rsbuild/plugin-solid": "workspace:*",
"@rsbuild/plugin-stylus": "workspace:*",
Expand All @@ -38,10 +38,10 @@
"@rsbuild/plugin-vue": "workspace:*",
"@rsbuild/plugin-vue-jsx": "^1.0.1",
"@rsbuild/webpack": "workspace:*",
"@module-federation/rspack": "0.6.13",
"@module-federation/rspack": "0.6.15",
"@scripts/test-helper": "workspace:*",
"@types/fs-extra": "^11.0.4",
"@types/lodash": "^4.17.12",
"@types/lodash": "^4.17.13",
"@types/node": "18.x",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/module-federation-v2/host/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"react-dom": "^18.3.1"
},
"devDependencies": {
"@module-federation/rspack": "0.6.13",
"@module-federation/rspack": "0.6.15",
"@rsbuild/core": "workspace:*",
"@rsbuild/plugin-react": "workspace:*"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/module-federation-v2/remote/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"react-dom": "^18.3.1"
},
"devDependencies": {
"@module-federation/rspack": "0.6.13",
"@module-federation/rspack": "0.6.15",
"@rsbuild/core": "workspace:*",
"@rsbuild/plugin-react": "workspace:*"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"preview": "rsbuild preview"
},
"dependencies": {
"svelte": "^5.0.3"
"svelte": "^5.1.9"
},
"devDependencies": {
"@rsbuild/core": "workspace:*",
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,18 @@
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@changesets/cli": "^2.27.9",
"@modern-js/module-tools": "^2.60.5",
"@modern-js/module-tools": "^2.60.6",
"@rsbuild/config": "workspace:*",
"@rslib/core": "0.0.14",
"@rslib/core": "0.0.15",
"@scripts/test-helper": "workspace:*",
"cross-env": "^7.0.3",
"cspell-ban-words": "^0.0.4",
"nano-staged": "^0.8.0",
"nx": "^20.0.6",
"nx": "^20.0.8",
"prettier": "^3.3.3",
"simple-git-hooks": "^2.11.1",
"typescript": "^5.6.3",
"vitest": "^2.1.3"
"vitest": "^2.1.4"
},
"packageManager": "[email protected]",
"engines": {
Expand Down
4 changes: 2 additions & 2 deletions packages/compat/plugin-webpack-swc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
"devDependencies": {
"@rsbuild/core": "workspace:*",
"@rsbuild/webpack": "workspace:*",
"@types/lodash": "^4.17.12",
"@types/lodash": "^4.17.13",
"@types/semver": "^7.5.8",
"typescript": "^5.6.3",
"webpack": "^5.95.0"
"webpack": "^5.96.1"
},
"peerDependencies": {
"@rsbuild/core": "1.x"
Expand Down
4 changes: 2 additions & 2 deletions packages/compat/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
},
"dependencies": {
"copy-webpack-plugin": "11.0.0",
"mini-css-extract-plugin": "2.9.1",
"mini-css-extract-plugin": "2.9.2",
"picocolors": "^1.1.1",
"reduce-configs": "^1.0.0",
"tsconfig-paths-webpack-plugin": "4.1.0",
"webpack": "^5.95.0"
"webpack": "^5.96.1"
},
"devDependencies": {
"@rsbuild/core": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"@types/node": "18.x",
"@types/on-finished": "2.3.4",
"@types/webpack-bundle-analyzer": "4.7.0",
"@types/ws": "^8.5.12",
"@types/ws": "^8.5.13",
"browserslist-load-config": "0.1.1",
"chokidar": "3.6.0",
"commander": "^12.1.0",
Expand Down Expand Up @@ -94,7 +94,7 @@
"style-loader": "3.3.4",
"tsc-alias": "^1.8.10",
"typescript": "^5.6.3",
"webpack": "^5.95.0",
"webpack": "^5.96.1",
"webpack-bundle-analyzer": "^4.10.2",
"webpack-merge": "6.0.1",
"ws": "^8.18.0"
Expand Down
10 changes: 7 additions & 3 deletions packages/core/src/server/cliShortcuts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ export const isCliShortcutsEnabled = (
): boolean => devConfig.cliShortcuts && isTTY('stdin');

export function setupCliShortcuts({
help = true,
openPage,
closeServer,
printUrls,
restartServer,
customShortcuts,
}: {
help?: boolean;
openPage: () => Promise<void>;
closeServer: () => Promise<void>;
printUrls: () => void;
Expand Down Expand Up @@ -68,9 +70,11 @@ export function setupCliShortcuts({
}
}

logger.log(
` ➜ ${color.dim('press')} ${color.bold('h + enter')} ${color.dim('to show shortcuts')}\n`,
);
if (help) {
logger.log(
` ➜ ${color.dim('press')} ${color.bold('h + enter')} ${color.dim('to show shortcuts')}\n`,
);
}

const rl = readline.createInterface({
input: process.stdin,
Expand Down
11 changes: 7 additions & 4 deletions packages/core/src/server/devServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,15 +220,18 @@ export async function createDevServer<
printUrls();

if (cliShortcutsEnabled) {
const shortcutsOptions =
typeof devConfig.cliShortcuts === 'boolean'
? {}
: devConfig.cliShortcuts;

setupCliShortcuts({
openPage,
closeServer,
printUrls,
restartServer: () => restartDevServer({ clear: false }),
customShortcuts:
typeof devConfig.cliShortcuts === 'boolean'
? undefined
: devConfig.cliShortcuts.custom,
help: shortcutsOptions.help,
customShortcuts: shortcutsOptions.custom,
});
}

Expand Down
11 changes: 7 additions & 4 deletions packages/core/src/server/prodServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,17 @@ export async function startProdServer(
printUrls();

if (cliShortcutsEnabled) {
const shortcutsOptions =
typeof config.dev.cliShortcuts === 'boolean'
? {}
: config.dev.cliShortcuts;

setupCliShortcuts({
openPage,
closeServer,
printUrls,
customShortcuts:
typeof config.dev.cliShortcuts === 'boolean'
? undefined
: config.dev.cliShortcuts.custom,
help: shortcutsOptions.help,
customShortcuts: shortcutsOptions.custom,
});
}

Expand Down
5 changes: 5 additions & 0 deletions packages/core/src/types/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1310,6 +1310,11 @@ export interface DevConfig {
* @returns - The customized CLI shortcuts.
*/
custom?: (shortcuts?: CliShortcut[]) => CliShortcut[];
/**
* Whether to print the help hint when the server is started.
* @default true
*/
help?: boolean;
};
/**
* Provides the ability to execute a custom function and apply custom middlewares.
Expand Down
2 changes: 1 addition & 1 deletion packages/create-rsbuild/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"start": "node ./dist/index.js"
},
"dependencies": {
"create-rstack": "1.0.8"
"create-rstack": "1.0.9"
},
"devDependencies": {
"@types/node": "18.x",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-rsbuild/template-lit-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"lit": "^3.2.1"
},
"devDependencies": {
"@rsbuild/core": "^1.0.18"
"@rsbuild/core": "^1.0.19"
}
}
2 changes: 1 addition & 1 deletion packages/create-rsbuild/template-lit-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"lit": "^3.2.1"
},
"devDependencies": {
"@rsbuild/core": "^1.0.18",
"@rsbuild/core": "^1.0.19",
"typescript": "^5.6.3"
}
}
4 changes: 2 additions & 2 deletions packages/create-rsbuild/template-preact-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"preact": "^10.24.3"
},
"devDependencies": {
"@rsbuild/core": "^1.0.18",
"@rsbuild/plugin-preact": "^1.1.0"
"@rsbuild/core": "^1.0.19",
"@rsbuild/plugin-preact": "^1.1.1"
}
}
4 changes: 2 additions & 2 deletions packages/create-rsbuild/template-preact-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"preact": "^10.24.3"
},
"devDependencies": {
"@rsbuild/core": "^1.0.18",
"@rsbuild/plugin-preact": "^1.1.0",
"@rsbuild/core": "^1.0.19",
"@rsbuild/plugin-preact": "^1.1.1",
"typescript": "^5.6.3"
}
}
4 changes: 2 additions & 2 deletions packages/create-rsbuild/template-react-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"react-dom": "^18.3.1"
},
"devDependencies": {
"@rsbuild/core": "^1.0.18",
"@rsbuild/plugin-react": "^1.0.5"
"@rsbuild/core": "^1.0.19",
"@rsbuild/plugin-react": "^1.0.6"
}
}
4 changes: 2 additions & 2 deletions packages/create-rsbuild/template-react-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"react-dom": "^18.3.1"
},
"devDependencies": {
"@rsbuild/core": "^1.0.18",
"@rsbuild/plugin-react": "^1.0.5",
"@rsbuild/core": "^1.0.19",
"@rsbuild/plugin-react": "^1.0.6",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"typescript": "^5.6.3"
Expand Down
6 changes: 3 additions & 3 deletions packages/create-rsbuild/template-solid-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"solid-js": "^1.9.3"
},
"devDependencies": {
"@rsbuild/core": "^1.0.18",
"@rsbuild/plugin-babel": "^1.0.2",
"@rsbuild/plugin-solid": "^1.0.3"
"@rsbuild/core": "^1.0.19",
"@rsbuild/plugin-babel": "^1.0.3",
"@rsbuild/plugin-solid": "^1.0.4"
}
}
6 changes: 3 additions & 3 deletions packages/create-rsbuild/template-solid-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"solid-js": "^1.9.3"
},
"devDependencies": {
"@rsbuild/core": "^1.0.18",
"@rsbuild/plugin-babel": "^1.0.2",
"@rsbuild/plugin-solid": "^1.0.3",
"@rsbuild/core": "^1.0.19",
"@rsbuild/plugin-babel": "^1.0.3",
"@rsbuild/plugin-solid": "^1.0.4",
"typescript": "^5.6.3"
}
}
4 changes: 2 additions & 2 deletions packages/create-rsbuild/template-svelte-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"svelte": "^5.1.9"
},
"devDependencies": {
"@rsbuild/core": "^1.0.18",
"@rsbuild/plugin-svelte": "^1.0.2"
"@rsbuild/core": "^1.0.19",
"@rsbuild/plugin-svelte": "^1.0.3"
}
}
4 changes: 2 additions & 2 deletions packages/create-rsbuild/template-svelte-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"svelte": "^5.1.9"
},
"devDependencies": {
"@rsbuild/core": "^1.0.18",
"@rsbuild/plugin-svelte": "^1.0.2",
"@rsbuild/core": "^1.0.19",
"@rsbuild/plugin-svelte": "^1.0.3",
"svelte-check": "^4.0.5",
"typescript": "^5.6.3"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/create-rsbuild/template-svelte4-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"svelte": "^5.1.9"
},
"devDependencies": {
"@rsbuild/core": "^1.0.18",
"@rsbuild/plugin-svelte": "^1.0.2"
"@rsbuild/core": "^1.0.19",
"@rsbuild/plugin-svelte": "^1.0.3"
}
}
4 changes: 2 additions & 2 deletions packages/create-rsbuild/template-svelte4-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"svelte": "^5.1.9"
},
"devDependencies": {
"@rsbuild/core": "^1.0.18",
"@rsbuild/plugin-svelte": "^1.0.2",
"@rsbuild/core": "^1.0.19",
"@rsbuild/plugin-svelte": "^1.0.3",
"svelte-check": "^4.0.5",
"typescript": "^5.6.3"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/create-rsbuild/template-vanilla-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"preview": "rsbuild preview"
},
"devDependencies": {
"@rsbuild/core": "^1.0.18"
"@rsbuild/core": "^1.0.19"
}
}
2 changes: 1 addition & 1 deletion packages/create-rsbuild/template-vanilla-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"preview": "rsbuild preview"
},
"devDependencies": {
"@rsbuild/core": "^1.0.18",
"@rsbuild/core": "^1.0.19",
"typescript": "^5.6.3"
}
}
2 changes: 1 addition & 1 deletion packages/create-rsbuild/template-vue2-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"vue": "^2.7.16"
},
"devDependencies": {
"@rsbuild/core": "^1.0.18",
"@rsbuild/core": "^1.0.19",
"@rsbuild/plugin-vue2": "^1.0.1"
}
}
2 changes: 1 addition & 1 deletion packages/create-rsbuild/template-vue2-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"vue": "^2.7.16"
},
"devDependencies": {
"@rsbuild/core": "^1.0.18",
"@rsbuild/core": "^1.0.19",
"@rsbuild/plugin-vue2": "^1.0.1",
"typescript": "^5.6.3"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/create-rsbuild/template-vue3-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"vue": "^3.5.12"
},
"devDependencies": {
"@rsbuild/core": "^1.0.18",
"@rsbuild/plugin-vue": "^1.0.2"
"@rsbuild/core": "^1.0.19",
"@rsbuild/plugin-vue": "^1.0.3"
}
}
Loading

0 comments on commit f39fbff

Please sign in to comment.