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

chore(deps): bump Rspack and Rsbuild to v1.1 #591

Merged
merged 4 commits into from
Nov 14, 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
8 changes: 4 additions & 4 deletions e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@
"vue": "^3.5.12"
},
"devDependencies": {
"webpack": "^5.95.0",
"@playwright/test": "1.33.0",
"@rsdoctor/cli": "workspace:*",
"@rsdoctor/core": "workspace:*",
"@rsdoctor/rspack-plugin": "workspace:*",
"@rsdoctor/sdk": "workspace:*",
"@rsdoctor/types": "workspace:*",
"@rsdoctor/utils": "workspace:*",
"@rsdoctor/webpack-plugin": "workspace:*",
"@rsdoctor/cli": "workspace:*",
"@rspack/core": "1.0.14",
"@rspack/core": "^1.1.1",
"@types/lodash": "^4.17.13",
"@types/node": "^16",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"fast-glob": "^3.3.2",
"loader-utils": "^2.0.4",
"playwright": "1.33.0",
"typescript": "^5.2.2"
"typescript": "^5.2.2",
"webpack": "^5.95.0"
}
}
2 changes: 1 addition & 1 deletion examples/modern-minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"react-dom": "^18"
},
"devDependencies": {
"@modern-js/app-tools": "^2.60.3",
"@modern-js/runtime": "^2.60.3",
"@rsdoctor/webpack-plugin": "workspace:*",
"@modern-js/app-tools": "^2.60.3",
"@types/node": "^16",
"@types/react": "^18",
"@types/react-dom": "^18",
Expand Down
4 changes: 2 additions & 2 deletions examples/multiple-minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"devDependencies": {
"@arco-design/web-react": "2.29.2",
"@arco-plugins/webpack-react": "1.4.9-beta.2",
"@rsdoctor/tsconfig": "workspace:*",
"@rsdoctor/webpack-plugin": "workspace:*",
"@types/node": "^16",
"@types/react": "^18",
"@types/react-dom": "18.0.8",
"@rsdoctor/tsconfig": "workspace:*",
"@rsdoctor/webpack-plugin": "workspace:*",
"css-loader": "6.7.3",
"eslint": "8.22.0",
"less-loader": "11.1.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/rsbuild-minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"semver7": "npm:[email protected]"
},
"devDependencies": {
"@rsbuild/core": "0.7.5",
"@rsbuild/plugin-react": "0.7.5",
"@rsbuild/core": "^1.1.1",
"@rsbuild/plugin-react": "^1.0.7",
"@rsdoctor/core": "workspace:*",
"@rsdoctor/rspack-plugin": "workspace:*",
"@types/react": "^18",
Expand Down
6 changes: 3 additions & 3 deletions examples/rspack-banner-minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"tsm": "2.3.0",
"@rsdoctor/rspack-plugin": "workspace:*",
"@rspack/cli": "1.0.0",
"@rspack/core": "1.0.0",
"@rspack/cli": "^1.1.1",
"@rspack/core": "^1.1.1",
"@rspack/plugin-react-refresh": "1.0.0",
"@types/react": "^18.0.25",
"@types/react-dom": "^18.0.8",
"react-refresh": "^0.14.0",
"tsm": "2.3.0",
"web-vitals": "^2.1.4"
},
"browserslist": {
Expand Down
6 changes: 3 additions & 3 deletions examples/rspack-minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"tsm": "2.3.0",
"@rsdoctor/rspack-plugin": "workspace:*",
"@rspack/cli": "1.0.0",
"@rspack/core": "1.0.0",
"@rspack/cli": "^1.1.1",
"@rspack/core": "^1.1.1",
"@rspack/plugin-react-refresh": "1.0.0",
"@types/react": "^18.0.25",
"@types/react-dom": "^18.0.8",
"react-refresh": "^0.14.0",
"tsm": "2.3.0",
"web-vitals": "^2.1.4"
},
"browserslist": {
Expand Down
10 changes: 5 additions & 5 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
"dist/"
],
"devDependencies": {
"@rsbuild/core": "0.7.10",
"@rsbuild/plugin-node-polyfill": "0.7.10",
"@rsbuild/plugin-react": "0.7.10",
"@rsbuild/plugin-sass": "0.7.10",
"@rsbuild/plugin-type-check": "0.7.10",
"@rsbuild/core": "^1.1.1",
"@rsbuild/plugin-node-polyfill": "^1.2.0",
"@rsbuild/plugin-react": "^1.0.7",
"@rsbuild/plugin-sass": "^1.1.0",
"@rsbuild/plugin-type-check": "^1.0.1",
"@rsdoctor/components": "workspace:*",
"@rsdoctor/types": "workspace:*",
"@types/node": "^16",
Expand Down
2 changes: 1 addition & 1 deletion packages/client/rsbuild.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,10 @@ export default defineConfig(({ env }) => {
server: {
port: PortForWeb,
historyApiFallback: true,
open: ENABLE_CLIENT_SERVER ? undefined : true,
},

dev: {
startUrl: ENABLE_CLIENT_SERVER ? undefined : true,
setupMiddlewares: [
(middlewares) => {
if (fs.existsSync(WebpackRsdoctorDirPath)) {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"webpack-bundle-analyzer": "^4.10.2"
},
"devDependencies": {
"@rspack/core": "1.0.14",
"@rspack/core": "^1.1.1",
"@scripts/test-helper": "workspace:*",
"@types/fs-extra": "^11.0.4",
"@types/lodash": "^4.17.13",
Expand Down
20 changes: 13 additions & 7 deletions packages/core/src/inner-plugins/utils/config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { Common, Linter, Plugin, SDK } from '@rsdoctor/types';
import assert from 'assert';
import type { RuleSetCondition as RspackRuleSetCondition } from '@rspack/core';
import type {
RuleSetCondition as RspackRuleSetCondition,
RuleSetRule as RspackRuleSetRule,
} from '@rspack/core';
import {
RuleSetCondition,
RuleSetConditionAbsolute,
RuleSetRule,
RuleSetCondition as WebpackRuleSetCondition,
RuleSetConditionAbsolute as WebpackRuleSetConditionAbsolute,
RuleSetRule as WebpackRuleSetRule,
} from 'webpack';
import {
RsdoctorWebpackPluginOptions,
Expand Down Expand Up @@ -119,9 +122,9 @@ export function normalizeUserConfig<Rules extends Linter.ExtendRuleData[]>(

export function makeRuleSetSerializable(
item:
| RuleSetConditionAbsolute
| RuleSetCondition
| RspackRuleSetCondition
| WebpackRuleSetConditionAbsolute
| WebpackRuleSetCondition
| void,
) {
if (!item) return;
Expand All @@ -139,7 +142,10 @@ export function makeRuleSetSerializable(
}

export function makeRulesSerializable(
rules: Plugin.RuleSetRule[] | RuleSetRule['oneOf'],
rules:
| Plugin.RuleSetRule[]
| RspackRuleSetRule['oneOf']
| WebpackRuleSetRule['oneOf'],
) {
if (!Array.isArray(rules)) return;

Expand Down
4 changes: 2 additions & 2 deletions packages/document/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
},
"devDependencies": {
"@rsdoctor/types": "workspace:*",
"@rspress/plugin-rss": "^1.33.1",
"@types/node": "^16",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
Expand All @@ -34,12 +35,11 @@
"rsbuild-plugin-open-graph": "^1.0.2",
"rspress-plugin-font-open-sans": "^1.0.0",
"rspress-plugin-sitemap": "^1.1.1",
"@rspress/plugin-rss": "^1.33.1",
"typescript": "^5.2.2"
},
"dependencies": {
"react-markdown": "^9.0.1",
"@rstack-dev/doc-ui": "1.5.3",
"react-markdown": "^9.0.1",
"rspress": "^1.33.1"
}
}
6 changes: 3 additions & 3 deletions packages/rspack-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
"@rsdoctor/core": "workspace:*",
"@rsdoctor/graph": "workspace:*",
"@rsdoctor/sdk": "workspace:*",
"@rsdoctor/types": "workspace:*",
"@rsdoctor/utils": "workspace:*",
"lodash": "^4.17.21",
"@rsdoctor/types": "workspace:*"
"lodash": "^4.17.21"
},
"devDependencies": {
"@rspack/core": "1.0.14",
"@rspack/core": "^1.1.1",
"@types/lodash": "^4.17.13",
"@types/node": "^16",
"@types/tapable": "2.2.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/sdk/sdk/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ export class RsdoctorSDK<
// Extract scripts and links from the HTML
const scriptSrcs = Array.from(
htmlContent.matchAll(
/<script\s+defer="defer"\s+src=["'](.+?)["']><\/script>/g,
/<script\s+(?:defer="defer"|defer)\s+src=["'](.+?)["']><\/script>/g,
),
(m) => m[1],
);
Expand Down
4 changes: 2 additions & 2 deletions packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
"source-map": "^0.7.4"
},
"devDependencies": {
"@rspack/core": "^1.1.1",
"@types/node": "^16",
"@types/react": "^18.3.12",
"tslib": "2.7.0",
"typescript": "^5.2.2",
"@rspack/core": "1.0.14"
"typescript": "^5.2.2"
},
"peerDependencies": {
"@rspack/core": "*",
Expand Down
8 changes: 4 additions & 4 deletions packages/webpack-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@
},
"dependencies": {
"@rsdoctor/core": "workspace:*",
"@rsdoctor/sdk": "workspace:*",
"@rsdoctor/graph": "workspace:*",
"@rsdoctor/utils": "workspace:*",
"@rsdoctor/sdk": "workspace:*",
"@rsdoctor/types": "workspace:*",
"@rsdoctor/utils": "workspace:*",
"fs-extra": "^11.1.1",
"lodash": "^4.17.21"
},
"devDependencies": {
"webpack": "^5.95.0",
"@types/fs-extra": "^11.0.4",
"@types/lodash": "^4.17.13",
"@types/node": "^16",
"@types/tapable": "2.2.7",
"tslib": "2.7.0",
"typescript": "^5.2.2"
"typescript": "^5.2.2",
"webpack": "^5.95.0"
},
"peerDependencies": {
"webpack": "5.x"
Expand Down
Loading