From 1a46f436194ed825e96b6acc00ebe79c02fa1440 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 22:53:53 +0000 Subject: [PATCH 1/2] chore(deps): update dependency sass-loader to v14 --- packages/rspack/package.json | 2 +- pnpm-lock.yaml | 31 +++++++++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/packages/rspack/package.json b/packages/rspack/package.json index fd209991288..85f346c6618 100644 --- a/packages/rspack/package.json +++ b/packages/rspack/package.json @@ -62,7 +62,7 @@ "pug-loader": "^2.4.0", "react-relay": "^16.0.0", "sass": "1.56.2", - "sass-loader": "13.2.0", + "sass-loader": "14.2.1", "source-map": "^0.7.4", "source-map-loader": "^5.0.0", "styled-components": "^6.0.8", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2e104651293..90aaa032de9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -542,8 +542,8 @@ importers: specifier: 1.56.2 version: 1.56.2 sass-loader: - specifier: 13.2.0 - version: 13.2.0(sass@1.56.2)(webpack@5.90.1) + specifier: 14.2.1 + version: 14.2.1(@rspack/core@packages+rspack)(sass@1.56.2)(webpack@5.90.1) source-map: specifier: ^0.7.4 version: 0.7.4 @@ -14266,6 +14266,33 @@ packages: webpack: 5.90.1(webpack-cli@4.10.0) dev: true + /sass-loader@14.2.1(@rspack/core@packages+rspack)(sass@1.56.2)(webpack@5.90.1): + resolution: {integrity: sha512-G0VcnMYU18a4N7VoNDegg2OuMjYtxnqzQWARVWCIVSZwJeiL9kg8QMsuIZOplsJgTzZLF6jGxI3AClj8I9nRdQ==} + engines: {node: '>= 18.12.0'} + peerDependencies: + '@rspack/core': 0.x || 1.x + node-sass: ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 + sass: ^1.3.0 + sass-embedded: '*' + webpack: ^5.0.0 + peerDependenciesMeta: + '@rspack/core': + optional: true + node-sass: + optional: true + sass: + optional: true + sass-embedded: + optional: true + webpack: + optional: true + dependencies: + '@rspack/core': link:packages/rspack + neo-async: 2.6.2 + sass: 1.56.2 + webpack: 5.90.1(webpack-cli@4.10.0) + dev: true + /sass@1.56.2: resolution: {integrity: sha512-ciEJhnyCRwzlBCB+h5cCPM6ie/6f8HrhZMQOf5vlU60Y1bI1rx5Zb0vlDZvaycHsg/MqFfF1Eq2eokAa32iw8w==} engines: {node: '>=12.0.0'} From 62976322bd63f16960c5a00a3c6254c4995693af Mon Sep 17 00:00:00 2001 From: Hana Date: Wed, 15 May 2024 12:39:26 +0800 Subject: [PATCH 2/2] test: update --- .../configCases/loader/module-build-error/errors.js | 2 +- .../configCases/loader/module-build-error/index.js | 12 +----------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/packages/rspack-test-tools/tests/configCases/loader/module-build-error/errors.js b/packages/rspack-test-tools/tests/configCases/loader/module-build-error/errors.js index 3ed6a25ab09..a1862adb338 100644 --- a/packages/rspack-test-tools/tests/configCases/loader/module-build-error/errors.js +++ b/packages/rspack-test-tools/tests/configCases/loader/module-build-error/errors.js @@ -1 +1 @@ -module.exports = [/SassError: Undefined variable./]; +module.exports = [/Module build failed/]; diff --git a/packages/rspack-test-tools/tests/configCases/loader/module-build-error/index.js b/packages/rspack-test-tools/tests/configCases/loader/module-build-error/index.js index 63a6c39bb97..d705aded805 100644 --- a/packages/rspack-test-tools/tests/configCases/loader/module-build-error/index.js +++ b/packages/rspack-test-tools/tests/configCases/loader/module-build-error/index.js @@ -1,13 +1,3 @@ -const fs = require("fs"); -const path = require("path"); - it("build error module should have 'throw error'", () => { - expect(() => require("./index.scss")).toThrow("SassError"); - const output = fs.readFileSync( - path.resolve(__dirname, "bundle0.js"), - "utf-8" - ); - let scssCode = /throw new Error\("((?:\s|.)*?)"\)/.exec(output)[1]; - expect(scssCode).toContain("SassError"); - expect(scssCode).toContain("Module build failed"); + expect(() => require("./index.scss")).toThrow("Module build failed"); });