@modern-js/builder 2.25.0 → 2.25.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # @modern-js/builder
2
2
 
3
+ ## 2.25.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [63d8247]
8
+ - Updated dependencies [6651684]
9
+ - Updated dependencies [15a8276]
10
+ - Updated dependencies [272646c]
11
+ - Updated dependencies [358ed24]
12
+ - @modern-js/utils@2.25.2
13
+ - @modern-js/builder-shared@2.25.2
14
+
15
+ ## 2.25.1
16
+
17
+ ### Patch Changes
18
+
19
+ - b10045f: fix(builder): checkSyntax targets should get default browserlist when only set checkSyntax.exclude
20
+
21
+ fix(builder): 当只设置 checkSyntax.exclude 时,checkSyntax targets 应该使用默认的 broserlist 值
22
+
23
+ - Updated dependencies [b10045f]
24
+ - Updated dependencies [9f78d0c]
25
+ - @modern-js/builder-shared@2.25.1
26
+ - @modern-js/utils@2.25.1
27
+
3
28
  ## 2.25.0
4
29
 
5
30
  ### Patch Changes
@@ -51,9 +51,10 @@ function builderPluginCheckSyntax() {
51
51
  }
52
52
  exports.builderPluginCheckSyntax = builderPluginCheckSyntax;
53
53
  async function getCheckTargets(builderContext, builderConfig, builderTarget, checkSyntax) {
54
+ var _a, _b;
55
+ const browserslist = (_a = (await (0, builder_shared_1.getBrowserslistWithDefault)(builderContext.rootPath, builderConfig, builderTarget))) !== null && _a !== void 0 ? _a : builder_shared_1.DEFAULT_BROWSERSLIST[builderTarget];
54
56
  if (checkSyntax === true) {
55
- const browserslist = await (0, builder_shared_1.getBrowserslistWithDefault)(builderContext.rootPath, builderConfig, builderTarget);
56
- return browserslist || builder_shared_1.DEFAULT_BROWSERSLIST[builderTarget];
57
+ return browserslist;
57
58
  }
58
- return checkSyntax.targets;
59
+ return (_b = checkSyntax.targets) !== null && _b !== void 0 ? _b : browserslist;
59
60
  }
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "engines": {
19
19
  "node": ">=14.0.0"
20
20
  },
21
- "version": "2.25.0",
21
+ "version": "2.25.2",
22
22
  "jsnext:source": "./src/index.ts",
23
23
  "types": "./dist/index.d.ts",
24
24
  "main": "./dist/index.js",
@@ -31,14 +31,14 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@svgr/webpack": "8.0.1",
34
- "@modern-js/builder-shared": "2.25.0",
35
- "@modern-js/utils": "2.25.0"
34
+ "@modern-js/builder-shared": "2.25.2",
35
+ "@modern-js/utils": "2.25.2"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/babel__core": "^7.20.0",
39
39
  "@types/node": "^14",
40
40
  "typescript": "^5",
41
- "@scripts/vitest-config": "2.25.0"
41
+ "@scripts/vitest-config": "2.25.2"
42
42
  },
43
43
  "publishConfig": {
44
44
  "registry": "https://registry.npmjs.org/",