Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rspack/binding

Package Overview
Dependencies
Maintainers
1
Versions
1105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rspack/binding - npm Package Compare versions

Comparing version 0.0.0-9a86d8579-20221114102256 to 0.0.0-a9dce2b609-20221128040415

137

binding.d.ts

@@ -107,8 +107,31 @@ /* tslint:disable */

}
export interface RawModuleRuleCondition {
/** Condition can be either a `string` or `Regexp`. */
type: "string" | "regexp"
/**
* Based on the condition type, the value can be either a `string` or `Regexp`.
* - "string": The value will be matched against the string.
* - "regexp": The value will be matched against the raw regexp source from JS side.
*/
matcher?: string
}
export interface RawModuleRule {
test?: string
resource?: string
resourceQuery?: string
/**
* A condition matcher matching an absolute path.
* - String: To match the input must start with the provided string. I. e. an absolute directory path, or absolute path to the file.
* - Regexp: It's tested with the input.
*/
test?: RawModuleRuleCondition
/**
* A condition matcher matching an absolute path.
* See `test` above
*/
resource?: RawModuleRuleCondition
/**
* A condition matcher against the resource query.
* TODO: align with webpack's `?` prefixed `resourceQuery`
*/
resourceQuery?: RawModuleRuleCondition
func?: (...args: any[]) => any
uses?: Array<RawModuleRuleUse>
use?: Array<RawModuleRuleUse>
type?: "js" | "jsx" | "ts" | "tsx" | "css" | "json" | "asset" | "asset/resource" | "asset/source" | "asset/inline"

@@ -138,2 +161,4 @@ }

chunkFilename?: string
cssFilename?: string
cssChunkFilename?: string
uniqueName?: string

@@ -153,3 +178,3 @@ }

export interface RawSplitChunksOptions {
cacheGroups: Record<string, RawCacheGroupOptions>
cacheGroups?: Record<string, RawCacheGroupOptions>
/** What kind of chunks should be selected. */

@@ -183,14 +208,6 @@ chunks?: string

}
export interface AssetContent {
buffer?: Buffer
source?: string
}
export interface UpdateAssetOptions {
asset: AssetContent
filename: string
}
export interface AssetInfoRelated {
export interface JsAssetInfoRelated {
sourceMap?: string
}
export interface AssetInfo {
export interface JsAssetInfo {
/**

@@ -211,20 +228,27 @@ * if the asset can be long term cached forever (contains a hash)

development: boolean
/** when asset ships data for updating an existing application (HMR) */
hotModuleReplacement: boolean
/**
* when asset ships data for updating an existing application (HMR)
* when asset is javascript and an ESM
* related object to other assets, keyed by type of relation (only points from parent to child)
*/
related: AssetInfoRelated
related: JsAssetInfoRelated
}
export interface Asset {
export interface JsAsset {
name: string
source: JsCompatSource
info: AssetInfo
info: JsAssetInfo
}
export interface PluginCallbacks {
doneCallback: (...args: any[]) => any
processAssetsCallback: (...args: any[]) => any
compilationCallback: (...args: any[]) => any
thisCompilationCallback: (...args: any[]) => any
export interface JsChunk {
files: Array<string>
}
export interface JsChunkGroup {
chunks: Array<JsChunk>
}
export interface JsHooks {
done: (...args: any[]) => any
processAssets: (...args: any[]) => any
compilation: (...args: any[]) => any
thisCompilation: (...args: any[]) => any
}
export interface JsCompatSource {

@@ -238,24 +262,11 @@ /** Whether the underlying data structure is a `RawSource` */

}
export const enum DiffStatKind {
Changed = 0,
Deleted = 1,
Added = 2
}
export interface DiffStat {
content: string
kind: DiffStatKind
}
export interface RebuildResult {
diff: Record<string, DiffStat>
stats: StatsCompilation
}
export interface StatsError {
export interface JsStatsError {
message: string
formatted: string
}
export interface StatsWarning {
export interface JsStatsWarning {
message: string
formatted: string
}
export interface StatsAsset {
export interface JsStatsAsset {
type: string

@@ -266,8 +277,10 @@ name: string

chunkNames: Array<string>
info: StatsAssetInfo
info: JsStatsAssetInfo
emitted: boolean
}
export interface StatsAssetInfo {
export interface JsStatsAssetInfo {
development: boolean
hotModuleReplacement: boolean
}
export interface StatsModule {
export interface JsStatsModule {
type: string

@@ -281,3 +294,3 @@ moduleType: string

}
export interface StatsChunk {
export interface JsStatsChunk {
type: string

@@ -291,34 +304,34 @@ files: Array<string>

}
export interface StatsEntrypointAsset {
export interface JsStatsEntrypointAsset {
name: string
size: number
}
export interface StatsEntrypoint {
export interface JsStatsEntrypoint {
name: string
assets: Array<StatsEntrypointAsset>
assets: Array<JsStatsEntrypointAsset>
chunks: Array<string>
assetsSize: number
}
export interface StatsCompilation {
assets: Array<StatsAsset>
modules: Array<StatsModule>
chunks: Array<StatsChunk>
entrypoints: Array<StatsEntrypoint>
errors: Array<StatsError>
export interface JsStatsCompilation {
assets: Array<JsStatsAsset>
modules: Array<JsStatsModule>
chunks: Array<JsStatsChunk>
entrypoints: Array<JsStatsEntrypoint>
errors: Array<JsStatsError>
errorsCount: number
warnings: Array<StatsWarning>
warnings: Array<JsStatsWarning>
warningsCount: number
}
export interface OnLoadContext {
id: string
}
export function initCustomTraceSubscriber(): void
export class JsCompilation {
updateAsset(filename: string, newSourceOrFunction: JsCompatSource | ((source: JsCompatSource) => JsCompatSource), assetInfoUpdateOrFunction?: AssetInfo | ((assetInfo: AssetInfo) => AssetInfo)): void
getAssets(): Readonly<Asset>[]
emitAsset(filename: string, source: JsCompatSource, assetInfo: AssetInfo): void
updateAsset(filename: string, newSourceOrFunction: JsCompatSource | ((source: JsCompatSource) => JsCompatSource), assetInfoUpdateOrFunction?: JsAssetInfo | ((assetInfo: JsAssetInfo) => JsAssetInfo)): void
getAssets(): Readonly<JsAsset>[]
getAsset(name: string): JsAsset | null
emitAsset(filename: string, source: JsCompatSource, assetInfo: JsAssetInfo): void
deleteAsset(filename: string): void
get assets(): Record<string, JsCompatSource>
get entrypoints(): Record<string, JsChunkGroup>
}
export class Rspack {
constructor(options: RawOptions, pluginCallbacks?: PluginCallbacks | undefined | null)
constructor(options: RawOptions, jsHooks?: JsHooks | undefined | null)
/**

@@ -330,3 +343,3 @@ * Build with the given option passed to the constructor

*/
unsafe_build(callback: (err: null | Error, result: StatsCompilation) => void): void
unsafe_build(callback: (err: null | Error, result: JsStatsCompilation) => void): void
/**

@@ -333,0 +346,0 @@ * Rebuild with the given option passed to the constructor

{
"name": "@rspack/binding",
"version": "0.0.0-9a86d8579-20221114102256",
"version": "0.0.0-a9dce2b609-20221128040415",
"description": "Node binding for rspack",

@@ -20,9 +20,12 @@ "main": "binding.js",

"@napi-rs/cli": "^2.6.2",
"why-is-node-running": "2.2.1"
"why-is-node-running": "2.2.1",
"npm-run-all": "4.1.5"
},
"scripts": {
"build": "napi build --platform --js false --dts binding.d.ts --config napirs.rc.json",
"build:debug": "napi build --platform --js false --dts binding.d.ts --config napirs.rc.json",
"build:release:all": "run-p build:release build:release:x64 build:release:linux",
"build:release": "napi build --release --platform --js false --dts binding.d.ts --config napirs.rc.json",
"build_linux:release": "napi build --release --platform --js false --dts binding.d.ts --config napirs.rc.json --zig --target x86_64-unknown-linux-gnu --zig-abi-suffix=2.17"
"build:release:x64": "napi build --release --platform --js false --dts binding.d.ts --config napirs.rc.json --target x86_64-apple-darwin",
"build:release:linux": "napi build --release --platform --js false --dts binding.d.ts --config napirs.rc.json --zig --target x86_64-unknown-linux-gnu --zig-abi-suffix=2.17"
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc