Skip to content

Commit

Permalink
chore: api update
Browse files Browse the repository at this point in the history
  • Loading branch information
SyMind committed Oct 23, 2024
1 parent 79a4c53 commit 0bf074e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion crates/node_binding/binding.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export function __chunk_graph_inner_get_chunk_entry_dependent_chunks_iterable(js

export function __chunk_graph_inner_get_chunk_entry_modules(jsChunkUkey: number, compilation: JsCompilation): Array<JsModule>

export function __chunk_graph_inner_get_chunk_modules(jsChunkUkey: number, compilation: JsCompilation): Array<ModuleDTOWrapper>
export function __chunk_graph_inner_get_chunk_modules(jsChunkUkey: number, compilation: JsCompilation): ModuleDTO[]

export function __chunk_graph_inner_get_chunk_modules_iterable_by_source_type(jsChunkUkey: number, sourceType: string, compilation: JsCompilation): Array<JsModule>

Expand Down
5 changes: 4 additions & 1 deletion crates/rspack_binding_values/src/chunk_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ use rspack_napi::napi::Result;

use crate::{JsChunk, JsCompilation, JsModule, ModuleDTOWrapper, ToJsModule};

#[napi(js_name = "__chunk_graph_inner_get_chunk_modules")]
#[napi(
js_name = "__chunk_graph_inner_get_chunk_modules",
ts_return_type = "ModuleDTO[]"
)]
pub fn get_chunk_modules(js_chunk_ukey: u32, compilation: &JsCompilation) -> Vec<ModuleDTOWrapper> {
let compilation = &compilation.0;
let module_graph = compilation.get_module_graph();
Expand Down
16 changes: 9 additions & 7 deletions packages/rspack/etc/core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import type { JsStatsError } from '@rspack/binding';
import type { JsStatsWarning } from '@rspack/binding';
import * as liteTapable from '@rspack/lite-tapable';
import { Logger as Logger_2 } from './logging/Logger';
import type { ModuleDTO } from '@rspack/binding';
import { ModuleDto } from '@rspack/binding';
import { RawCopyPattern } from '@rspack/binding';
import { RawCssExtractPluginOption } from '@rspack/binding';
import type { RawFuncUseCtx } from '@rspack/binding';
Expand Down Expand Up @@ -3196,9 +3196,9 @@ export type Mode = "development" | "production" | "none";

// @public (undocumented)
export class Module {
constructor(module: JsModule | ModuleDTO, compilation?: Compilation);
constructor(module: JsModule | ModuleDto, compilation?: Compilation);
// (undocumented)
static __from_binding(module: JsModule | ModuleDTO, compilation?: Compilation): Module;
static __from_binding(module: JsModule | ModuleDto, compilation?: Compilation): Module;
// (undocumented)
get blocks(): DependenciesBlock[];
buildInfo: Record<string, any>;
Expand All @@ -3212,6 +3212,8 @@ export class Module {
// (undocumented)
layer: null | string;
// (undocumented)
readonly modules: Module[] | undefined;
// (undocumented)
nameForCondition(): string | null;
// (undocumented)
originalSource(): Source | null;
Expand Down Expand Up @@ -6015,13 +6017,13 @@ export const rspackOptions: z.ZodObject<{
errorsSpace: z.ZodOptional<z.ZodNumber>;
warningsSpace: z.ZodOptional<z.ZodNumber>;
}, "strict", z.ZodTypeAny, {
modules?: boolean | undefined;
source?: boolean | undefined;
publicPath?: boolean | undefined;
all?: boolean | undefined;
preset?: boolean | "verbose" | "normal" | "none" | "errors-only" | "errors-warnings" | "minimal" | "detailed" | "summary" | undefined;
assets?: boolean | undefined;
chunks?: boolean | undefined;
modules?: boolean | undefined;
entrypoints?: boolean | "auto" | undefined;
chunkGroups?: boolean | undefined;
warnings?: boolean | undefined;
Expand Down Expand Up @@ -6092,13 +6094,13 @@ export const rspackOptions: z.ZodObject<{
errorsSpace?: number | undefined;
warningsSpace?: number | undefined;
}, {
modules?: boolean | undefined;
source?: boolean | undefined;
publicPath?: boolean | undefined;
all?: boolean | undefined;
preset?: boolean | "verbose" | "normal" | "none" | "errors-only" | "errors-warnings" | "minimal" | "detailed" | "summary" | undefined;
assets?: boolean | undefined;
chunks?: boolean | undefined;
modules?: boolean | undefined;
entrypoints?: boolean | "auto" | undefined;
chunkGroups?: boolean | undefined;
warnings?: boolean | undefined;
Expand Down Expand Up @@ -7975,13 +7977,13 @@ export const rspackOptions: z.ZodObject<{
} | undefined;
watch?: boolean | undefined;
stats?: boolean | "verbose" | "normal" | "none" | "errors-only" | "errors-warnings" | "minimal" | "detailed" | "summary" | {
modules?: boolean | undefined;
source?: boolean | undefined;
publicPath?: boolean | undefined;
all?: boolean | undefined;
preset?: boolean | "verbose" | "normal" | "none" | "errors-only" | "errors-warnings" | "minimal" | "detailed" | "summary" | undefined;
assets?: boolean | undefined;
chunks?: boolean | undefined;
modules?: boolean | undefined;
entrypoints?: boolean | "auto" | undefined;
chunkGroups?: boolean | undefined;
warnings?: boolean | undefined;
Expand Down Expand Up @@ -8574,13 +8576,13 @@ export const rspackOptions: z.ZodObject<{
} | undefined;
watch?: boolean | undefined;
stats?: boolean | "verbose" | "normal" | "none" | "errors-only" | "errors-warnings" | "minimal" | "detailed" | "summary" | {
modules?: boolean | undefined;
source?: boolean | undefined;
publicPath?: boolean | undefined;
all?: boolean | undefined;
preset?: boolean | "verbose" | "normal" | "none" | "errors-only" | "errors-warnings" | "minimal" | "detailed" | "summary" | undefined;
assets?: boolean | undefined;
chunks?: boolean | undefined;
modules?: boolean | undefined;
entrypoints?: boolean | "auto" | undefined;
chunkGroups?: boolean | undefined;
warnings?: boolean | undefined;
Expand Down

0 comments on commit 0bf074e

Please sign in to comment.