Skip to content

Commit

Permalink
Merge branch 'main' into feat/new-code-splitting
Browse files Browse the repository at this point in the history
  • Loading branch information
JSerFeng authored Jan 23, 2025
2 parents a4613bf + 389db82 commit 7239506
Show file tree
Hide file tree
Showing 434 changed files with 7,180 additions and 3,021 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ jobs:
- uses: ./.github/actions/rustup
with:
shared-key: check
- uses: cargo-bins/[email protected].21
- uses: cargo-bins/[email protected].22
- run: cargo binstall --no-confirm cargo-shear
- run: cargo shear

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ on:
permissions:
# To publish packages with provenance
id-token: write
# Allow commenting on issues for `reusable-build.yml`
issues: write

jobs:
get-runner-labels:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,8 @@ jobs:
tool: cargo-codspeed

- name: Build Benchmark
env:
RUSTFLAGS: "-C debuginfo=1 -C strip=none -g --cfg codspeed"
run: cargo codspeed build -p rspack_benchmark --features codspeed

- name: Run benchmark
Expand Down
1 change: 1 addition & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ extend-exclude = [
JSerFeng = "JSerFeng"

[default.extend-words]
Colum = "Colum"
Nd = "Nd"
fo = "fo"
splitted = "splitted"
Expand Down
18 changes: 14 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ rayon = { version = "1.10.0" }
regex = { version = "1.11.1" }
ropey = "1.6.1"
rspack_resolver = { features = ["package_json_raw_json_api"], version = "0.5.0" }
rspack_sources = { version = "0.4.1" }
rspack_sources = { version = "0.4.4" }
rustc-hash = { version = "2.1.0" }
serde = { version = "1.0.217" }
serde_json = { version = "1.0.134" }
Expand Down Expand Up @@ -105,7 +105,7 @@ swc_node_comments = { version = "=5.0.0" }

pnp = { version = "0.9.0" }

rspack_dojang = { version = "0.1.9" }
rspack_dojang = { version = "0.1.10" }


# all rspack workspace dependencies
Expand Down
1 change: 1 addition & 0 deletions crates/node_binding/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ rspack_napi = { workspace = true }
rspack_paths = { workspace = true }
rspack_plugin_html = { workspace = true }
rspack_plugin_javascript = { workspace = true }
rspack_plugin_runtime = { workspace = true }
rspack_util = { workspace = true }

rspack_tracing = { workspace = true }
Expand Down
51 changes: 47 additions & 4 deletions crates/node_binding/binding.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export declare class JsChunk {
export declare class JsChunkGraph {
getChunkModules(chunk: JsChunk): JsModule[]
getChunkEntryModules(chunk: JsChunk): JsModule[]
getNumberOfEntryModules(chunk: JsChunk): number
getChunkEntryDependentChunksIterable(chunk: JsChunk): JsChunk[]
getChunkModulesIterableBySourceType(chunk: JsChunk, sourceType: string): JsModule[]
getModuleChunks(module: JsModule): JsChunk[]
Expand Down Expand Up @@ -224,7 +225,7 @@ export declare class JsModule {
get nameForCondition(): string | undefined
get request(): string | undefined
get userRequest(): string | undefined
set userRequest(val: string)
set userRequest(val: string | undefined)
get rawRequest(): string | undefined
get factoryMeta(): JsFactoryMeta | undefined
get type(): string
Expand Down Expand Up @@ -591,6 +592,11 @@ export interface JsCreateData {
resource: string
}

export interface JsCreateScriptData {
code: string
chunk: JsChunk
}

export interface JsDefaultObjectRedirectWarnObject {
ignore: boolean
}
Expand Down Expand Up @@ -718,6 +724,16 @@ export interface JsLibraryOptions {
amdContainer?: string
}

export interface JsLinkPrefetchData {
code: string
chunk: JsChunk
}

export interface JsLinkPreloadData {
code: string
chunk: JsChunk
}

export interface JsLoaderContext {
resourceData: Readonly<JsResourceData>
/** Will be deprecated. Use module.module_identifier instead */
Expand Down Expand Up @@ -1043,11 +1059,19 @@ export interface JsStatsModuleReason {
moduleChunks?: number
type?: string
userRequest?: string
explanation?: string
active: boolean
loc?: string
}

export interface JsStatsModuleTrace {
origin: JsStatsModuleTraceModule
module: JsStatsModuleTraceModule
dependencies: Array<JsStatsModuleTraceDependency>
}

export interface JsStatsModuleTraceDependency {
loc: string
}

export interface JsStatsModuleTraceModule {
Expand Down Expand Up @@ -1143,6 +1167,7 @@ export interface RawAssetGeneratorOptions {
outputPath?: JsFilename
publicPath?: "auto" | JsFilename
dataUrl?: RawAssetGeneratorDataUrlOptions | ((source: Buffer, context: RawAssetGeneratorDataUrlFnCtx) => string)
importMode?: "url" | "preserve"
}

export interface RawAssetInlineGeneratorOptions {
Expand All @@ -1167,6 +1192,7 @@ export interface RawAssetResourceGeneratorOptions {
filename?: JsFilename
outputPath?: JsFilename
publicPath?: "auto" | JsFilename
importMode?: "url" | "preserve"
}

export interface RawBannerPluginOptions {
Expand Down Expand Up @@ -1374,6 +1400,16 @@ export interface RawEnvironment {
const?: boolean
arrowFunction?: boolean
nodePrefixForCoreModules?: boolean
asyncFunction?: boolean
bigIntLiteral?: boolean
destructuring?: boolean
document?: boolean
dynamicImport?: boolean
forOf?: boolean
globalThis?: boolean
module?: boolean
optionalChaining?: boolean
templateLiteral?: boolean
}

export interface RawEvalDevToolModulePluginOptions {
Expand Down Expand Up @@ -1983,6 +2019,7 @@ export interface RawSourceMapDevToolPluginOptions {
test?: string | RegExp | (string | RegExp)[]
include?: string | RegExp | (string | RegExp)[]
exclude?: string | RegExp | (string | RegExp)[]
debugIds?: boolean
}

export interface RawSplitChunkSizes {
Expand Down Expand Up @@ -2095,7 +2132,10 @@ export declare enum RegisterJsTapKind {
HtmlPluginAlterAssetTagGroups = 37,
HtmlPluginAfterTemplateExecution = 38,
HtmlPluginBeforeEmit = 39,
HtmlPluginAfterEmit = 40
HtmlPluginAfterEmit = 40,
RuntimePluginCreateScript = 41,
RuntimePluginLinkPreload = 42,
RuntimePluginLinkPrefetch = 43
}

export interface RegisterJsTaps {
Expand All @@ -2111,8 +2151,8 @@ export interface RegisterJsTaps {
registerCompilationStillValidModuleTaps: (stages: Array<number>) => Array<{ function: ((arg: JsModule) => void); stage: number; }>
registerCompilationSucceedModuleTaps: (stages: Array<number>) => Array<{ function: ((arg: JsModule) => void); stage: number; }>
registerCompilationExecuteModuleTaps: (stages: Array<number>) => Array<{ function: ((arg: JsExecuteModuleArg) => void); stage: number; }>
registerCompilationAdditionalTreeRuntimeRequirements: (stages: Array<number>) => Array<{ function: ((arg: JsAdditionalTreeRuntimeRequirementsArg) => JsAdditionalTreeRuntimeRequirementsResult | undefined); stage: number; }>
registerCompilationRuntimeRequirementInTree: (stages: Array<number>) => Array<{ function: ((arg: JsRuntimeRequirementInTreeArg) => JsRuntimeRequirementInTreeResult | undefined); stage: number; }>
registerCompilationAdditionalTreeRuntimeRequirementsTaps: (stages: Array<number>) => Array<{ function: ((arg: JsAdditionalTreeRuntimeRequirementsArg) => JsAdditionalTreeRuntimeRequirementsResult | undefined); stage: number; }>
registerCompilationRuntimeRequirementInTreeTaps: (stages: Array<number>) => Array<{ function: ((arg: JsRuntimeRequirementInTreeArg) => JsRuntimeRequirementInTreeResult | undefined); stage: number; }>
registerCompilationRuntimeModuleTaps: (stages: Array<number>) => Array<{ function: ((arg: JsRuntimeModuleArg) => JsRuntimeModule | undefined); stage: number; }>
registerCompilationFinishModulesTaps: (stages: Array<number>) => Array<{ function: ((arg: JsCompilation) => Promise<void>); stage: number; }>
registerCompilationOptimizeModulesTaps: (stages: Array<number>) => Array<{ function: (() => boolean | undefined); stage: number; }>
Expand Down Expand Up @@ -2140,6 +2180,9 @@ export interface RegisterJsTaps {
registerHtmlPluginAfterTemplateExecutionTaps: (stages: Array<number>) => Array<{ function: ((arg: JsAfterTemplateExecutionData) => JsAfterTemplateExecutionData); stage: number; }>
registerHtmlPluginBeforeEmitTaps: (stages: Array<number>) => Array<{ function: ((arg: JsBeforeEmitData) => JsBeforeEmitData); stage: number; }>
registerHtmlPluginAfterEmitTaps: (stages: Array<number>) => Array<{ function: ((arg: JsAfterEmitData) => JsAfterEmitData); stage: number; }>
registerRuntimePluginCreateScriptTaps: (stages: Array<number>) => Array<{ function: ((arg: JsCreateScriptData) => String); stage: number; }>
registerRuntimePluginLinkPreloadTaps: (stages: Array<number>) => Array<{ function: ((arg: JsLinkPreloadData) => String); stage: number; }>
registerRuntimePluginLinkPrefetchTaps: (stages: Array<number>) => Array<{ function: ((arg: JsLinkPrefetchData) => String); stage: number; }>
}

export interface ThreadsafeNodeFS {
Expand Down
2 changes: 1 addition & 1 deletion crates/node_binding/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rspack/binding",
"version": "1.2.0-beta.0",
"version": "1.2.1",
"license": "MIT",
"description": "Node binding for rspack",
"main": "binding.js",
Expand Down
Loading

0 comments on commit 7239506

Please sign in to comment.