@rsbuild/plugin-source-build 0.7.7 → 0.7.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -69,7 +69,7 @@ var init_utils = __esm({
69
69
  "use strict";
70
70
  import_node_path3 = __toESM(require("path"));
71
71
  import_shared2 = require("@rsbuild/shared");
72
- import_json5 = __toESM(require("@rsbuild/shared/json5"));
72
+ import_json5 = __toESM(require("json5"));
73
73
  init_constants();
74
74
  readPackageJson = async (pkgJsonFilePath) => {
75
75
  return readJson(pkgJsonFilePath);
@@ -7730,18 +7730,14 @@ function pluginSourceBuild(options) {
7730
7730
  rule.resolve.mainFields.merge(
7731
7731
  resolvePriority === "source" ? [sourceField, "..."] : ["...", sourceField]
7732
7732
  );
7733
- rule.resolve.merge({
7734
- // `conditionNames` is not affected by `resolvePriority`.
7735
- // The priority is controlled by the order of fields declared in `exports`.
7736
- conditionNames: ["...", sourceField]
7737
- });
7733
+ rule.resolve.conditionNames.add("...").add(sourceField);
7738
7734
  }
7739
7735
  }
7740
7736
  });
7741
7737
  const getReferences = async () => {
7742
7738
  const refers = projects.map((project) => import_node_path8.default.join(project.dir, "tsconfig.json")).filter((filePath) => import_node_fs2.default.existsSync(filePath));
7743
7739
  if (api.context.tsconfigPath) {
7744
- const { default: json52 } = await import("@rsbuild/shared/json5");
7740
+ const { default: json52 } = await import("json5");
7745
7741
  const { references } = json52.parse(
7746
7742
  import_node_fs2.default.readFileSync(api.context.tsconfigPath, "utf-8")
7747
7743
  );
package/dist/index.js CHANGED
@@ -52,11 +52,11 @@ var __privateMethod = (obj, member, method) => {
52
52
  return method;
53
53
  };
54
54
 
55
- // ../../node_modules/.pnpm/@modern-js+module-tools@2.52.0_eslint@9.4.0_typescript@5.4.5/node_modules/@modern-js/module-tools/shims/esm.js
55
+ // ../../node_modules/.pnpm/@modern-js+module-tools@2.52.0_eslint@9.5.0_typescript@5.4.5/node_modules/@modern-js/module-tools/shims/esm.js
56
56
  import { fileURLToPath } from "url";
57
57
  import path from "path";
58
58
  var init_esm = __esm({
59
- "../../node_modules/.pnpm/@modern-js+module-tools@2.52.0_eslint@9.4.0_typescript@5.4.5/node_modules/@modern-js/module-tools/shims/esm.js"() {
59
+ "../../node_modules/.pnpm/@modern-js+module-tools@2.52.0_eslint@9.5.0_typescript@5.4.5/node_modules/@modern-js/module-tools/shims/esm.js"() {
60
60
  "use strict";
61
61
  }
62
62
  });
@@ -76,7 +76,7 @@ var init_constants = __esm({
76
76
  // src/utils.ts
77
77
  import path4 from "path";
78
78
  import { fse as fse2 } from "@rsbuild/shared";
79
- import json5 from "@rsbuild/shared/json5";
79
+ import json5 from "json5";
80
80
  var readPackageJson, readRushJson, readJson;
81
81
  var init_utils = __esm({
82
82
  "src/utils.ts"() {
@@ -7820,18 +7820,14 @@ function pluginSourceBuild(options) {
7820
7820
  rule.resolve.mainFields.merge(
7821
7821
  resolvePriority === "source" ? [sourceField, "..."] : ["...", sourceField]
7822
7822
  );
7823
- rule.resolve.merge({
7824
- // `conditionNames` is not affected by `resolvePriority`.
7825
- // The priority is controlled by the order of fields declared in `exports`.
7826
- conditionNames: ["...", sourceField]
7827
- });
7823
+ rule.resolve.conditionNames.add("...").add(sourceField);
7828
7824
  }
7829
7825
  }
7830
7826
  });
7831
7827
  const getReferences = async () => {
7832
7828
  const refers = projects.map((project) => path9.join(project.dir, "tsconfig.json")).filter((filePath) => fs2.existsSync(filePath));
7833
7829
  if (api.context.tsconfigPath) {
7834
- const { default: json52 } = await import("@rsbuild/shared/json5");
7830
+ const { default: json52 } = await import("json5");
7835
7831
  const { references } = json52.parse(
7836
7832
  fs2.readFileSync(api.context.tsconfigPath, "utf-8")
7837
7833
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/plugin-source-build",
3
- "version": "0.7.7",
3
+ "version": "0.7.9",
4
4
  "description": "Source build plugin of Rsbuild",
5
5
  "homepage": "https://rsbuild.dev",
6
6
  "repository": {
@@ -24,17 +24,18 @@
24
24
  ],
25
25
  "dependencies": {
26
26
  "fast-glob": "^3.3.2",
27
- "@rsbuild/shared": "0.7.7"
27
+ "json5": "^2.2.3",
28
+ "@rsbuild/shared": "0.7.9"
28
29
  },
29
30
  "devDependencies": {
30
31
  "typescript": "^5.4.2",
31
32
  "yaml": "^2.4.5",
32
- "@rsbuild/core": "0.7.7",
33
- "@rsbuild/plugin-babel": "0.7.7",
34
- "@scripts/test-helper": "0.7.7"
33
+ "@rsbuild/core": "0.7.9",
34
+ "@rsbuild/plugin-babel": "0.7.9",
35
+ "@scripts/test-helper": "0.7.9"
35
36
  },
36
37
  "peerDependencies": {
37
- "@rsbuild/core": "^0.7.7"
38
+ "@rsbuild/core": "^0.7.9"
38
39
  },
39
40
  "publishConfig": {
40
41
  "access": "public",