@rslib/core 0.12.4 → 0.13.1

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.js CHANGED
@@ -18,7 +18,6 @@ const DEFAULT_CONFIG_EXTENSIONS = [
18
18
  '.cts'
19
19
  ];
20
20
  const SWC_HELPERS = '@swc/helpers';
21
- const SHEBANG_PREFIX = '#!';
22
21
  const SHEBANG_REGEX = /#!.*[\s\n\r]*$/;
23
22
  const REACT_DIRECTIVE_REGEX = /^['"]use (client|server)['"](;?)[\s\n\r]*$/;
24
23
  const DTS_EXTENSIONS = [
@@ -395,7 +394,7 @@ class EntryChunkPlugin {
395
394
  const content = compiler.inputFileSystem.readFileSync(filename, {
396
395
  encoding: 'utf-8'
397
396
  });
398
- if (content.startsWith(SHEBANG_PREFIX)) {
397
+ if (content.startsWith("#!")) {
399
398
  const shebangMatch = matchFirstLine(content, SHEBANG_REGEX);
400
399
  if (shebangMatch) this.shebangEntries[name] = shebangMatch;
401
400
  }
@@ -2238,7 +2237,8 @@ const composeDtsConfig = async (libConfig, format, dtsExtension)=>{
2238
2237
  alias: dts?.alias,
2239
2238
  banner: banner?.dts,
2240
2239
  footer: footer?.dts,
2241
- redirect: redirect?.dts
2240
+ redirect: redirect?.dts,
2241
+ tsgo: dts?.tsgo
2242
2242
  })
2243
2243
  ]
2244
2244
  };
@@ -3061,7 +3061,7 @@ const applyCommonOptions = (cli)=>{
3061
3061
  function runCli() {
3062
3062
  const cli = dist('rslib');
3063
3063
  cli.help();
3064
- cli.version("0.12.4");
3064
+ cli.version("0.13.1");
3065
3065
  applyCommonOptions(cli);
3066
3066
  const buildCommand = cli.command('build', 'build the library for production');
3067
3067
  const inspectCommand = cli.command('inspect', 'inspect the Rsbuild / Rspack configs of Rslib projects');
@@ -3132,8 +3132,8 @@ function prepareCli() {
3132
3132
  initNodeEnv();
3133
3133
  const { npm_execpath } = process.env;
3134
3134
  if (!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) console.log();
3135
- logger.greet(` Rslib v0.12.4\n`);
3135
+ logger.greet(` Rslib v0.13.1\n`);
3136
3136
  }
3137
- const src_version = "0.12.4";
3137
+ const src_version = "0.13.1";
3138
3138
  var __webpack_exports__rspack = __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__.rspack;
3139
3139
  export { build, defineConfig, inspect, loadConfig, logger, prepareCli, __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__ as rsbuild, runCli, startMFDevServer, composeCreateRsbuildConfig as unstable_composeCreateRsbuildConfig, src_version as version, __webpack_exports__rspack as rspack };
@@ -58,6 +58,13 @@ export type Dts = {
58
58
  * @see {@link https://rslib.rs/config/lib/dts#dtsalias}
59
59
  */
60
60
  alias?: Record<string, string>;
61
+ /**
62
+ * Whether to generate declaration files with `tsgo`.
63
+ * @experimental
64
+ * @defaultValue `false`
65
+ * @see {@link https://rslib.rs/config/lib/dts#dtstsgo}
66
+ */
67
+ tsgo?: boolean;
61
68
  } | boolean;
62
69
  export type AutoExternal = boolean | {
63
70
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rslib/core",
3
- "version": "0.12.4",
3
+ "version": "0.13.1",
4
4
  "description": "The Rsbuild-based library development tool.",
5
5
  "homepage": "https://rslib.rs",
6
6
  "bugs": {
@@ -36,22 +36,22 @@
36
36
  "types.d.ts"
37
37
  ],
38
38
  "dependencies": {
39
- "@rsbuild/core": "~1.5.1",
40
- "tinyglobby": "^0.2.14",
41
- "rsbuild-plugin-dts": "0.12.4"
39
+ "@rsbuild/core": "~1.5.5",
40
+ "tinyglobby": "^0.2.15",
41
+ "rsbuild-plugin-dts": "0.13.1"
42
42
  },
43
43
  "devDependencies": {
44
- "@module-federation/rsbuild-plugin": "^0.18.3",
44
+ "@module-federation/rsbuild-plugin": "^0.18.4",
45
45
  "@types/fs-extra": "^11.0.4",
46
46
  "cac": "^6.7.14",
47
47
  "chokidar": "^4.0.3",
48
48
  "fs-extra": "^11.3.1",
49
- "memfs": "^4.38.2",
49
+ "memfs": "^4.38.3",
50
50
  "path-serializer": "0.5.1",
51
51
  "picocolors": "1.1.1",
52
- "prebundle": "1.4.1",
52
+ "prebundle": "1.4.2",
53
53
  "rsbuild-plugin-publint": "^0.3.3",
54
- "rslib": "npm:@rslib/core@0.12.3",
54
+ "rslib": "npm:@rslib/core@0.13.0",
55
55
  "rslog": "^1.2.11",
56
56
  "tsconfck": "3.1.6",
57
57
  "typescript": "^5.9.2",