@tego/devkit 1.6.24 → 1.6.26

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.
@@ -2,7 +2,7 @@
2
2
  import path from "path";
3
3
  import { pluginLess } from "@rsbuild/plugin-less";
4
4
  import { pluginReact } from "@rsbuild/plugin-react";
5
- import { build } from "@rslib/core";
5
+ import { createRslib } from "@rslib/core";
6
6
  import fg from "fast-glob";
7
7
  import { build as tsupBuild } from "tsup";
8
8
  import { globExcludeFiles } from "./constant.mjs";
@@ -21,55 +21,59 @@ async function buildClient(cwd, userConfig, sourcemap = false, log) {
21
21
  }
22
22
  async function buildClientEsm(cwd, userConfig, sourcemap, external, log) {
23
23
  const entry = fg.globSync(["src/**", ...globExcludeFiles, "!src/**/*.json"], { cwd, absolute: true });
24
- await build({
25
- source: {
26
- entry: {
27
- index: entry
28
- },
29
- define: {
30
- "process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV || "production"),
31
- "process.env.__TEST__": false,
32
- "process.env.__E2E__": process.env.__E2E__ ? true : false
33
- }
34
- },
35
- lib: [
36
- {
37
- bundle: false,
38
- dts: false,
39
- format: "esm",
40
- output: {
41
- distPath: {
42
- root: path.join(cwd, "es")
43
- }
24
+ const rslib = await createRslib({
25
+ cwd,
26
+ config: {
27
+ source: {
28
+ entry: {
29
+ index: entry
30
+ },
31
+ define: {
32
+ "process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV || "production"),
33
+ "process.env.__TEST__": false,
34
+ "process.env.__E2E__": process.env.__E2E__ ? true : false
44
35
  }
45
36
  },
46
- {
47
- output: {
48
- distPath: {
49
- root: path.join(cwd, "lib")
37
+ lib: [
38
+ {
39
+ bundle: false,
40
+ dts: false,
41
+ format: "esm",
42
+ output: {
43
+ distPath: {
44
+ root: path.join(cwd, "es")
45
+ }
50
46
  }
51
47
  },
52
- bundle: false,
53
- dts: false,
54
- format: "cjs"
55
- }
56
- ],
57
- output: {
58
- sourceMap: {
59
- css: sourcemap,
60
- js: sourcemap ? "source-map" : false
61
- },
62
- target: "web",
63
- overrideBrowserslist: ["chrome >= 69", "edge >= 79", "safari >= 12"],
64
- externals({ request }, callback) {
65
- if (external(request)) {
66
- return callback(null, request);
48
+ {
49
+ output: {
50
+ distPath: {
51
+ root: path.join(cwd, "lib")
52
+ }
53
+ },
54
+ bundle: false,
55
+ dts: false,
56
+ format: "cjs"
67
57
  }
68
- callback();
69
- }
70
- },
71
- plugins: [pluginReact(), pluginLess()]
58
+ ],
59
+ output: {
60
+ sourceMap: {
61
+ css: sourcemap,
62
+ js: sourcemap ? "source-map" : false
63
+ },
64
+ target: "web",
65
+ overrideBrowserslist: ["chrome >= 69", "edge >= 79", "safari >= 12"],
66
+ externals({ request }, callback) {
67
+ if (request && external(request)) {
68
+ return callback(null, request);
69
+ }
70
+ callback();
71
+ }
72
+ },
73
+ plugins: [pluginReact(), pluginLess()]
74
+ }
72
75
  });
76
+ await rslib.build();
73
77
  }
74
78
  function buildLocale(cwd, userConfig, log) {
75
79
  log("build client locale");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tego/devkit",
3
- "version": "1.6.24",
3
+ "version": "1.6.26",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/tegojs/tego#readme",
6
6
  "bugs": {
@@ -31,41 +31,41 @@
31
31
  "@inquirer/prompts": "^7.8.6",
32
32
  "@npmcli/arborist": "^9.1.4",
33
33
  "@pnpm/workspace.find-packages": "^1.1.12",
34
- "@rsbuild/core": "^1.5.10",
35
- "@rsbuild/plugin-less": "^1.5.0",
36
- "@rsbuild/plugin-react": "^1.3.5",
37
- "@rslib/core": "^0.13.2",
34
+ "@rsbuild/core": "^2.3.2",
35
+ "@rsbuild/plugin-less": "^2.0.1",
36
+ "@rsbuild/plugin-react": "^2.1.1",
37
+ "@rslib/core": "^1.0.7",
38
38
  "@types/fs-extra": "^11.0.4",
39
39
  "@types/terminal-kit": "^2.5.7",
40
- "@umijs/utils": "^4.5.3",
40
+ "@umijs/utils": "^4.7.36",
41
41
  "@vercel/ncc": "^0.38.3",
42
- "@vitejs/plugin-react": "^5.0.2",
42
+ "@vitejs/plugin-react": "^5.2.0",
43
43
  "chalk": "^5.5.0",
44
44
  "commander": "^12.1.0",
45
- "dotenv": "16.6.1",
45
+ "dotenv": "18.0.10",
46
46
  "execa": "^8.0.1",
47
47
  "fast-glob": "^3.3.3",
48
48
  "fs-extra": "^11.3.2",
49
49
  "lodash": "^4.17.21",
50
50
  "npm-packlist": "^10.0.2",
51
- "open": "^10.2.0",
51
+ "open": "^11.0.4",
52
52
  "p-all": "^3.0.0",
53
53
  "package-json": "^10.0.1",
54
54
  "portfinder": "^1.0.38",
55
- "rimraf": "^6.0.1",
56
- "semver": "^7.7.2",
55
+ "rimraf": "^6.1.4",
56
+ "semver": "^7.8.6",
57
57
  "simple-git": "^3.28.0",
58
- "tar": "^7.5.1",
58
+ "tar": "^7.5.23",
59
59
  "terminal-kit": "^3.1.2",
60
60
  "tree-kill": "^1.2.2",
61
61
  "tsconfig-paths": "^4.2.0",
62
62
  "tsup": "^8.5.0",
63
- "tsx": "^4.20.5",
63
+ "tsx": "^4.23.15",
64
64
  "typescript": "^5.9.2",
65
65
  "update-notifier": "^7.3.1",
66
66
  "vite": "^7.1.10",
67
- "vite-plugin-css-injected-by-js": "^3.5.2",
68
- "@tachybase/test": "1.6.24"
67
+ "vite-plugin-css-injected-by-js": "^5.0.3",
68
+ "@tachybase/test": "1.6.26"
69
69
  },
70
70
  "devDependencies": {
71
71
  "@types/fs-extra": "^11.0.4",
@@ -73,8 +73,8 @@
73
73
  "@types/node": "20.17.10",
74
74
  "@types/npm-packlist": "^7.0.3",
75
75
  "@types/npmcli__arborist": "^6.3.1",
76
- "@types/semver": "^7.7.1",
77
- "@types/tar": "^6.1.13",
76
+ "@types/semver": "^7.8.0",
77
+ "@types/tar": "^7.0.87",
78
78
  "@types/update-notifier": "^6.0.8",
79
79
  "esbuild-plugin-file-path-extensions": "^2.1.4"
80
80
  },