Skip to content

Commit

Permalink
Merge branch 'main' into feat/webpack/output-clean
Browse files Browse the repository at this point in the history
  • Loading branch information
ClSlaid authored Dec 3, 2024
2 parents 8bfe5b0 + 08ddcdd commit d2335fc
Show file tree
Hide file tree
Showing 18 changed files with 53 additions and 11 deletions.
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.1.4",
"version": "1.1.5",
"license": "MIT",
"description": "Node binding for rspack",
"main": "binding.js",
Expand Down
1 change: 1 addition & 0 deletions crates/rspack_binding_values/src/compilation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,7 @@ impl JsCompilation {
original_module.map(ModuleIdentifier::from),
)
.await;

let js_result = JsExecuteModuleResult {
cacheable: res.cacheable,
file_dependencies: res
Expand Down
2 changes: 1 addition & 1 deletion npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rspack/binding-darwin-arm64",
"version": "1.1.4",
"version": "1.1.5",
"license": "MIT",
"description": "Node binding for rspack",
"main": "rspack.darwin-arm64.node",
Expand Down
2 changes: 1 addition & 1 deletion npm/darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rspack/binding-darwin-x64",
"version": "1.1.4",
"version": "1.1.5",
"license": "MIT",
"description": "Node binding for rspack",
"main": "rspack.darwin-x64.node",
Expand Down
2 changes: 1 addition & 1 deletion npm/linux-x64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rspack/binding-linux-x64-gnu",
"version": "1.1.4",
"version": "1.1.5",
"license": "MIT",
"description": "Node binding for rspack",
"main": "rspack.linux-x64-gnu.node",
Expand Down
2 changes: 1 addition & 1 deletion npm/win32-x64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rspack/binding-win32-x64-msvc",
"version": "1.1.4",
"version": "1.1.5",
"license": "MIT",
"description": "Node binding for rspack",
"main": "rspack.win32-x64-msvc.node",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "monorepo",
"version": "1.1.4",
"version": "1.1.5",
"license": "MIT",
"description": "The fast Rust-based web bundler with webpack-compatible API",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/create-rspack/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-rspack",
"version": "1.1.4",
"version": "1.1.5",
"homepage": "https://rspack.dev",
"bugs": "https://github.com/web-infra-dev/rspack/issues",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/rspack-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rspack/cli",
"version": "1.1.4",
"version": "1.1.5",
"description": "CLI for rspack",
"homepage": "https://rspack.dev",
"bugs": "https://github.com/web-infra-dev/rspack/issues",
Expand Down
2 changes: 1 addition & 1 deletion packages/rspack-test-tools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rspack/test-tools",
"version": "1.1.4",
"version": "1.1.5",
"license": "MIT",
"description": "Test tools for rspack",
"main": "dist/index.js",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
it("should compile", (done) => {
done()
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/** @type {import("../../../../dist").PitchLoaderDefinitionFunction} */
module.exports = async function () {
try {
const result = await this.importModule("./syntax-error.js");

// here should be unreachable
expect(result).toBe(Symbol('unreachable'));
} catch (e) {
expect(e).toBeDefined()
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/** @type {import("@rspack/core").Configuration} */
module.exports = {
entry: "./index.js",
module: {
rules: [
{
test: /index\.js/,
loader: "./loader",
options: {}
}
]
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ERROR in ./index.js
× Module build failed:
╰─▶ × Final loader(<PROJECT_ROOT>/tests/diagnosticsCases/module-build-failed/loader-import-syntax-error/loader.js??ruleSet[1].rules[0].use[0]) didn't return a Buffer or String

ERROR in × Module parse failed:
╰─▶ × JavaScript parsing error: Unexpected eof
╭────
1 │ console.log(
╰────

help:
You may need an appropriate loader to handle this file type.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log(
2 changes: 1 addition & 1 deletion packages/rspack/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rspack/core",
"version": "1.1.4",
"version": "1.1.5",
"webpackVersion": "5.75.0",
"license": "MIT",
"description": "The fast Rust-based web bundler with webpack-compatible API",
Expand Down
1 change: 1 addition & 0 deletions packages/rspack/src/builtin-plugin/css-extract/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export const pitch: LoaderDefinition["pitch"] = function (request, _, data) {
const callback = this.async();
const filepath = this.resourcePath;
const parseMeta = this.__internal__parseMeta;
this.addDependency(filepath);

let { publicPath } = this._compilation!.outputOptions;

Expand Down
2 changes: 1 addition & 1 deletion packages/rspack/src/loader-runner/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ export async function runLoaders(
}

if (res.error) {
reject(new Error(err));
reject(new Error(res.error));
} else {
resolve(
compiler.__internal__getModuleExecutionResult(res.id)
Expand Down

0 comments on commit d2335fc

Please sign in to comment.