@rspack/core
Advanced tools
Comparing version 0.0.0-20221103123606 to 0.0.0-20221103151543
@@ -40,4 +40,4 @@ import * as binding from "@rspack/binding"; | ||
run(callback: any): void; | ||
unsafe_build(cb: Callback<Error, binding.StatsCompilation>): void; | ||
unsafe_rebuild(changedFiles: string[], cb: (error?: Error, stats?: { | ||
build(cb: Callback<Error, binding.StatsCompilation>): void; | ||
rebuild(changedFiles: string[], cb: (error?: Error, stats?: { | ||
diff: binding.DiffStat; | ||
@@ -44,0 +44,0 @@ stats: binding.StatsCompilation; |
@@ -165,3 +165,3 @@ "use strict"; | ||
} | ||
this.unsafe_build((err, rawStats) => { | ||
this.build((err, rawStats) => { | ||
if (err) { | ||
@@ -186,3 +186,3 @@ return finalCallback(err); | ||
// Safety: This method is only valid to call if the previous build task is finished, or there will be data races. | ||
unsafe_build(cb) { | ||
build(cb) { | ||
const compilation = __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_newCompilation).call(this); | ||
@@ -200,3 +200,3 @@ const build_cb = __classPrivateFieldGet(this, _Compiler_instances, "a", _Compiler_instance_get).unsafe_build.bind(__classPrivateFieldGet(this, _Compiler_instances, "a", _Compiler_instance_get)); | ||
// Safety: This method is only valid to call if the previous rebuild task is finished, or there will be data races. | ||
unsafe_rebuild(changedFiles, cb) { | ||
rebuild(changedFiles, cb) { | ||
const rebuild_cb = __classPrivateFieldGet(this, _Compiler_instances, "a", _Compiler_instance_get).unsafe_rebuild.bind(__classPrivateFieldGet(this, _Compiler_instances, "a", _Compiler_instance_get)); | ||
@@ -223,3 +223,3 @@ rebuild_cb(changedFiles, [], (err, stats) => { | ||
const begin = Date.now(); | ||
let rawStats = await util_1.default.promisify(this.unsafe_build.bind(this))(); | ||
let rawStats = await util_1.default.promisify(this.build.bind(this))(); | ||
let stats = new stats_1.Stats(rawStats); | ||
@@ -246,3 +246,3 @@ // TODO: log stats string should move to cli | ||
const begin = Date.now(); | ||
this.unsafe_rebuild(changedFilepath, (error, { diff, stats: rawStats }) => { | ||
this.rebuild(changedFilepath, (error, { diff, stats: rawStats }) => { | ||
let stats = new stats_1.Stats(rawStats); | ||
@@ -249,0 +249,0 @@ // TODO: log stats string should move to cli |
@@ -35,3 +35,3 @@ "use strict"; | ||
} | ||
static jsonToString(obj /* : binding.StatsCompilation */, useColors) { | ||
static jsonToString(obj, useColors) { | ||
var _a, _b, _c; | ||
@@ -38,0 +38,0 @@ const buf = []; |
{ | ||
"name": "@rspack/core", | ||
"version": "0.0.0-20221103123606", | ||
"version": "0.0.0-20221103151543", | ||
"main": "./dist/index.js", | ||
@@ -10,3 +10,3 @@ "types": "./dist/index.d.ts", | ||
"devDependencies": { | ||
"@rspack/core": "0.0.0-20221103123606", | ||
"@rspack/core": "0.0.0-20221103151543", | ||
"@swc/helpers": "^0.4.12", | ||
@@ -28,6 +28,6 @@ "@types/jest": "29.0.2", | ||
"dependencies": { | ||
"@rspack/binding": "0.0.0-20221103123606", | ||
"@rspack/dev-client": "0.0.0-20221103123606", | ||
"@rspack/plugin-less": "^0.0.0-20221103123606", | ||
"@rspack/plugin-postcss": "^0.0.0-20221103123606", | ||
"@rspack/binding": "0.0.0-20221103151543", | ||
"@rspack/dev-client": "0.0.0-20221103151543", | ||
"@rspack/plugin-less": "^0.0.0-20221103151543", | ||
"@rspack/plugin-postcss": "^0.0.0-20221103151543", | ||
"browserslist": "^4.21.3", | ||
@@ -34,0 +34,0 @@ "chokidar": "3.5.3", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
266532
+ Added@rspack/binding@0.0.0-20221103151543(transitive)
+ Added@rspack/dev-client@0.0.0-20221103151543(transitive)
- Removed@rspack/binding@0.0.0-20221103123606(transitive)
- Removed@rspack/dev-client@0.0.0-20221103123606(transitive)