Skip to content

Commit

Permalink
fix: JsPathData type (#6265)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahabhgk authored Apr 17, 2024
1 parent 0a72d41 commit c11d422
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions crates/node_binding/binding.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ export class JsCompilation {
pushDiagnostic(severity: "error" | "warning", title: string, message: string): void
pushNativeDiagnostics(diagnostics: ExternalObject<'Diagnostic[]'>): void
getStats(): JsStats
getAssetPath(filename: string | ((pathData: PathData, assetInfo?: JsAssetInfo) => string), data: JsPathData): string
getAssetPathWithInfo(filename: string | ((pathData: PathData, assetInfo?: JsAssetInfo) => string), data: JsPathData): PathWithInfo
getPath(filename: string | ((pathData: PathData, assetInfo?: JsAssetInfo) => string), data: JsPathData): string
getPathWithInfo(filename: string | ((pathData: PathData, assetInfo?: JsAssetInfo) => string), data: JsPathData): PathWithInfo
getAssetPath(filename: string | ((pathData: JsPathData, assetInfo?: JsAssetInfo) => string), data: JsPathData): string
getAssetPathWithInfo(filename: string | ((pathData: JsPathData, assetInfo?: JsAssetInfo) => string), data: JsPathData): PathWithInfo
getPath(filename: string | ((pathData: JsPathData, assetInfo?: JsAssetInfo) => string), data: JsPathData): string
getPathWithInfo(filename: string | ((pathData: JsPathData, assetInfo?: JsAssetInfo) => string), data: JsPathData): PathWithInfo
addFileDependencies(deps: Array<string>): void
addContextDependencies(deps: Array<string>): void
addMissingDependencies(deps: Array<string>): void
Expand Down
8 changes: 4 additions & 4 deletions crates/rspack_binding_values/src/compilation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ impl JsCompilation {
#[napi]
pub fn get_asset_path(
&self,
#[napi(ts_arg_type = "string | ((pathData: PathData, assetInfo?: JsAssetInfo) => string)")]
#[napi(ts_arg_type = "string | ((pathData: JsPathData, assetInfo?: JsAssetInfo) => string)")]
filename: LocalJsFilename,
data: JsPathData,
) -> napi::Result<String> {
Expand All @@ -345,7 +345,7 @@ impl JsCompilation {
#[napi]
pub fn get_asset_path_with_info(
&self,
#[napi(ts_arg_type = "string | ((pathData: PathData, assetInfo?: JsAssetInfo) => string)")]
#[napi(ts_arg_type = "string | ((pathData: JsPathData, assetInfo?: JsAssetInfo) => string)")]
filename: LocalJsFilename,
data: JsPathData,
) -> napi::Result<PathWithInfo> {
Expand All @@ -358,7 +358,7 @@ impl JsCompilation {
#[napi]
pub fn get_path(
&self,
#[napi(ts_arg_type = "string | ((pathData: PathData, assetInfo?: JsAssetInfo) => string)")]
#[napi(ts_arg_type = "string | ((pathData: JsPathData, assetInfo?: JsAssetInfo) => string)")]
filename: LocalJsFilename,
data: JsPathData,
) -> napi::Result<String> {
Expand All @@ -368,7 +368,7 @@ impl JsCompilation {
#[napi]
pub fn get_path_with_info(
&self,
#[napi(ts_arg_type = "string | ((pathData: PathData, assetInfo?: JsAssetInfo) => string)")]
#[napi(ts_arg_type = "string | ((pathData: JsPathData, assetInfo?: JsAssetInfo) => string)")]
filename: LocalJsFilename,
data: JsPathData,
) -> napi::Result<PathWithInfo> {
Expand Down

2 comments on commit c11d422

@rspack-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Benchmark detail: Open

Name Base (2024-04-17 a6841aa) Current Change
10000_development-mode + exec 2.68 s ± 18 ms 2.68 s ± 40 ms +0.02 %
10000_development-mode_hmr + exec 685 ms ± 6.1 ms 689 ms ± 6.8 ms +0.59 %
10000_production-mode + exec 2.48 s ± 22 ms 2.51 s ± 46 ms +1.07 %
arco-pro_development-mode + exec 2.54 s ± 66 ms 2.55 s ± 81 ms +0.37 %
arco-pro_development-mode_hmr + exec 430 ms ± 1.3 ms 431 ms ± 2.6 ms +0.13 %
arco-pro_development-mode_hmr_intercept-plugin + exec 441 ms ± 2.7 ms 440 ms ± 3.5 ms -0.05 %
arco-pro_development-mode_intercept-plugin + exec 3.3 s ± 69 ms 3.27 s ± 98 ms -0.98 %
arco-pro_production-mode + exec 4.02 s ± 48 ms 3.97 s ± 77 ms -1.10 %
arco-pro_production-mode_intercept-plugin + exec 4.75 s ± 97 ms 4.81 s ± 89 ms +1.24 %
threejs_development-mode_10x + exec 2.05 s ± 27 ms 2.06 s ± 32 ms +0.36 %
threejs_development-mode_10x_hmr + exec 757 ms ± 13 ms 752 ms ± 8.7 ms -0.68 %
threejs_production-mode_10x + exec 5.14 s ± 40 ms 5.17 s ± 41 ms +0.46 %

@rspack-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Ran ecosystem CI: Open

suite result
modernjs, self-hosted, Linux, ci ✅ success
_selftest, ubuntu-latest ✅ success
nx, ubuntu-latest ✅ success
rspress, ubuntu-latest ✅ success
rsbuild, ubuntu-latest ✅ success
compat, ubuntu-latest ✅ success
examples, ubuntu-latest ✅ success

Please sign in to comment.