New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@rspack/binding

Package Overview
Dependencies
Maintainers
2
Versions
1108
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-1bce45e7c0-20221109113710 to 0.0.0-27cf88308b-20221215061813

211

binding.d.ts

@@ -17,4 +17,15 @@ /* tslint:disable */

*/
presetEnv: Array<string>
presetEnv?: Array<string>
modules?: RawCssModulesConfig
}
export interface RawCssModulesConfig {
localsConvention?: string
localIdentName?: string
exportsOnly?: boolean
}
export interface RawDecoratorOptions {
legacy: boolean
emitMetadata: boolean
useDefineForClassFields: boolean
}
/**

@@ -70,2 +81,6 @@ * It seems napi not support enum well

}
export interface Minification {
passes?: number
enable?: boolean
}
export interface RawBuiltins {

@@ -75,3 +90,3 @@ html?: Array<RawHtmlPluginConfig>

postcss?: RawPostCssConfig
minify?: boolean
minify?: Minification
polyfill?: boolean

@@ -81,5 +96,28 @@ browserslist?: Array<string>

treeShaking?: boolean
sideEffects?: boolean
progress?: RawProgressPluginConfig
react?: RawReactOptions
decorator?: RawDecoratorOptions
}
export interface RawCacheOptions {
type: string
maxGenerations: number
maxAge: number
profile: boolean
buildDependencies: Array<string>
cacheDirectory: string
cacheLocation: string
name: string
version: string
}
export interface RawDevServer {
hot?: boolean
}
export interface RawEntryItem {
import: Array<string>
runtime?: string
}
export interface RawExperiments {
lazyCompilation: boolean
}
/**

@@ -102,8 +140,33 @@ * `loader` is for js side loader, `builtin_loader` is for rust side loader,

}
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
include?: Array<RawModuleRuleCondition>
exclude?: Array<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"

@@ -124,4 +187,8 @@ }

}
export interface RawNodeOption {
dirname?: string
}
export interface RawOptimizationOptions {
splitChunks?: RawSplitChunksOptions
moduleIds?: string
}

@@ -134,3 +201,6 @@ export interface RawOutputOptions {

chunkFilename?: string
cssFilename?: string
cssChunkFilename?: string
uniqueName?: string
library?: string
}

@@ -146,6 +216,16 @@ export interface RawResolveOptions {

symlinks?: boolean
tsconfig?: string
tsConfigPath?: string
}
export interface RawSnapshotStrategy {
hash: boolean
timestamp: boolean
}
export interface RawSnapshotOptions {
resolveBuildDependencies: RawSnapshotStrategy
buildDependencies: RawSnapshotStrategy
resolve: RawSnapshotStrategy
module: RawSnapshotStrategy
}
export interface RawSplitChunksOptions {
cacheGroups: Record<string, RawCacheGroupOptions>
cacheGroups?: Record<string, RawCacheGroupOptions>
/** What kind of chunks should be selected. */

@@ -164,3 +244,3 @@ chunks?: string

export interface RawOptions {
entry?: Record<string, string>
entry?: Record<string, RawEntryItem>
mode?: string

@@ -178,15 +258,12 @@ target?: string[]

stats?: RawStatsOptions
devServer?: RawDevServer
snapshot?: RawSnapshotOptions
cache?: RawCacheOptions
experiments?: RawExperiments
node?: RawNodeOption
}
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 {
/**

@@ -207,20 +284,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 {

@@ -234,24 +318,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

@@ -262,8 +333,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

@@ -277,3 +350,3 @@ moduleType: string

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

@@ -287,23 +360,37 @@ files: Array<string>

}
export interface StatsCompilation {
assets: Array<StatsAsset>
modules: Array<StatsModule>
chunks: Array<StatsChunk>
errors: Array<StatsError>
export interface JsStatsEntrypointAsset {
name: string
size: number
}
export interface JsStatsEntrypoint {
name: string
assets: Array<JsStatsEntrypointAsset>
chunks: Array<string>
assetsSize: number
}
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
getAssetSource(name: string): JsCompatSource | null
getAssetFilenames(): Array<string>
hasAsset(name: string): boolean
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)
/**

@@ -315,3 +402,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
/**

@@ -318,0 +405,0 @@ * Rebuild with the given option passed to the constructor

{
"name": "@rspack/binding",
"version": "0.0.0-1bce45e7c0-20221109113710",
"version": "0.0.0-27cf88308b-20221215061813",
"description": "Node binding for rspack",

@@ -20,8 +20,13 @@ "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:release": "napi build --release --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:debug:x64": "napi build --platform --js false --dts binding.d.ts --config napirs.rc.json --target x86_64-apple-darwin",
"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: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