@rspack-canary/cli 1.6.1-canary-17ec8965-20251105023104 → 1.6.1-canary-72453ec6-20251216043959

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
@@ -259,9 +259,9 @@ var __webpack_exports__ = {};
259
259
  "use strict";
260
260
  __webpack_require__.r(__webpack_exports__);
261
261
  __webpack_require__.d(__webpack_exports__, {
262
+ defineConfig: ()=>defineConfig,
262
263
  definePlugin: ()=>definePlugin,
263
- RspackCLI: ()=>RspackCLI,
264
- defineConfig: ()=>defineConfig
264
+ RspackCLI: ()=>RspackCLI
265
265
  });
266
266
  var external_node_path_ = __webpack_require__("node:path");
267
267
  var external_node_path_default = /*#__PURE__*/ __webpack_require__.n(external_node_path_);
@@ -1067,11 +1067,11 @@ ${section.body}` : section.body).join("\n\n"));
1067
1067
  ".cts",
1068
1068
  ".mts"
1069
1069
  ];
1070
- const isTsFile = (configPath)=>{
1070
+ const isTsFile_isTsFile = (configPath)=>{
1071
1071
  const ext = external_node_path_default().extname(configPath);
1072
1072
  return TS_EXTENSION.includes(ext);
1073
1073
  };
1074
- const utils_isTsFile = isTsFile;
1074
+ const isTsFile = isTsFile_isTsFile;
1075
1075
  const injectInlineSourceMap = ({ code, map })=>{
1076
1076
  if (map) {
1077
1077
  const base64Map = Buffer.from(map, "utf8").toString("base64");
@@ -1104,8 +1104,8 @@ ${section.body}` : section.body).join("\n\n"));
1104
1104
  }
1105
1105
  const loadConfig_DEFAULT_CONFIG_NAME = "rspack.config";
1106
1106
  const registerLoader = (configPath)=>{
1107
- if (isEsmFile(configPath) && utils_isTsFile(configPath)) return;
1108
- if (!utils_isTsFile(configPath)) throw new Error(`config file "${configPath}" is not supported.`);
1107
+ if (isEsmFile(configPath) && isTsFile(configPath)) return;
1108
+ if (!isTsFile(configPath)) throw new Error(`config file "${configPath}" is not supported.`);
1109
1109
  (0, lib.addHook)((code, filename)=>{
1110
1110
  try {
1111
1111
  return compile(code, filename);
@@ -1168,7 +1168,7 @@ ${section.body}` : section.body).join("\n\n"));
1168
1168
  throw new Error(`Cannot find module '${extendPath}' to extend from.`);
1169
1169
  }
1170
1170
  if (!external_node_fs_default().existsSync(resolvedPath)) throw new Error(`Extended configuration file "${resolvedPath}" not found.`);
1171
- if (utils_isTsFile(resolvedPath) && "register" === options.configLoader) registerLoader(resolvedPath);
1171
+ if (isTsFile(resolvedPath) && "register" === options.configLoader) registerLoader(resolvedPath);
1172
1172
  let loadedConfig = await crossImport(resolvedPath);
1173
1173
  if ("function" == typeof loadedConfig) {
1174
1174
  loadedConfig = loadedConfig(options.env, options);
@@ -1197,7 +1197,7 @@ ${section.body}` : section.body).join("\n\n"));
1197
1197
  if (!defaultConfig) return null;
1198
1198
  configPath = defaultConfig;
1199
1199
  }
1200
- if (utils_isTsFile(configPath) && "register" === options.configLoader) registerLoader(configPath);
1200
+ if (isTsFile(configPath) && "register" === options.configLoader) registerLoader(configPath);
1201
1201
  const loadedConfig = await crossImport(configPath);
1202
1202
  return {
1203
1203
  loadedConfig,
@@ -1212,7 +1212,7 @@ ${section.body}` : section.body).join("\n\n"));
1212
1212
  this.colors = this.createColors();
1213
1213
  this.program = program;
1214
1214
  program.help();
1215
- program.version("1.6.1-canary-17ec8965-20251105023104");
1215
+ program.version("1.6.1-canary-72453ec6-20251216043959");
1216
1216
  }
1217
1217
  async createCompiler(options, rspackCommand, callback) {
1218
1218
  let { config, pathMap } = await this.loadConfig(options);
package/dist/index.mjs CHANGED
@@ -1030,11 +1030,11 @@ const TS_EXTENSION = [
1030
1030
  ".cts",
1031
1031
  ".mts"
1032
1032
  ];
1033
- const isTsFile = (configPath)=>{
1033
+ const isTsFile_isTsFile = (configPath)=>{
1034
1034
  const ext = external_node_path_["default"].extname(configPath);
1035
1035
  return TS_EXTENSION.includes(ext);
1036
1036
  };
1037
- const utils_isTsFile = isTsFile;
1037
+ const isTsFile = isTsFile_isTsFile;
1038
1038
  const injectInlineSourceMap = ({ code, map })=>{
1039
1039
  if (map) {
1040
1040
  const base64Map = Buffer.from(map, "utf8").toString("base64");
@@ -1067,8 +1067,8 @@ function compile(sourcecode, filename) {
1067
1067
  }
1068
1068
  const loadConfig_DEFAULT_CONFIG_NAME = "rspack.config";
1069
1069
  const registerLoader = (configPath)=>{
1070
- if (isEsmFile(configPath) && utils_isTsFile(configPath)) return;
1071
- if (!utils_isTsFile(configPath)) throw new Error(`config file "${configPath}" is not supported.`);
1070
+ if (isEsmFile(configPath) && isTsFile(configPath)) return;
1071
+ if (!isTsFile(configPath)) throw new Error(`config file "${configPath}" is not supported.`);
1072
1072
  (0, lib.addHook)((code, filename)=>{
1073
1073
  try {
1074
1074
  return compile(code, filename);
@@ -1131,7 +1131,7 @@ async function loadExtendedConfig(config, configPath, cwd, options) {
1131
1131
  throw new Error(`Cannot find module '${extendPath}' to extend from.`);
1132
1132
  }
1133
1133
  if (!external_node_fs_["default"].existsSync(resolvedPath)) throw new Error(`Extended configuration file "${resolvedPath}" not found.`);
1134
- if (utils_isTsFile(resolvedPath) && "register" === options.configLoader) registerLoader(resolvedPath);
1134
+ if (isTsFile(resolvedPath) && "register" === options.configLoader) registerLoader(resolvedPath);
1135
1135
  let loadedConfig = await crossImport(resolvedPath);
1136
1136
  if ("function" == typeof loadedConfig) {
1137
1137
  loadedConfig = loadedConfig(options.env, options);
@@ -1160,7 +1160,7 @@ async function loadRspackConfig(options, cwd = process.cwd()) {
1160
1160
  if (!defaultConfig) return null;
1161
1161
  configPath = defaultConfig;
1162
1162
  }
1163
- if (utils_isTsFile(configPath) && "register" === options.configLoader) registerLoader(configPath);
1163
+ if (isTsFile(configPath) && "register" === options.configLoader) registerLoader(configPath);
1164
1164
  const loadedConfig = await crossImport(configPath);
1165
1165
  return {
1166
1166
  loadedConfig,
@@ -1175,7 +1175,7 @@ class RspackCLI {
1175
1175
  this.colors = this.createColors();
1176
1176
  this.program = program;
1177
1177
  program.help();
1178
- program.version("1.6.1-canary-17ec8965-20251105023104");
1178
+ program.version("1.6.1-canary-72453ec6-20251216043959");
1179
1179
  }
1180
1180
  async createCompiler(options, rspackCommand, callback) {
1181
1181
  let { config, pathMap } = await this.loadConfig(options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack-canary/cli",
3
- "version": "1.6.1-canary-17ec8965-20251105023104",
3
+ "version": "1.6.1-canary-72453ec6-20251216043959",
4
4
  "description": "CLI for rspack",
5
5
  "homepage": "https://rspack.rs",
6
6
  "bugs": "https://github.com/web-infra-dev/rspack/issues",
@@ -34,7 +34,7 @@
34
34
  "webpack-bundle-analyzer": "4.10.2"
35
35
  },
36
36
  "devDependencies": {
37
- "@rslib/core": "0.17.0",
37
+ "@rslib/core": "0.16.1",
38
38
  "@types/webpack-bundle-analyzer": "^4.7.0",
39
39
  "cac": "^6.7.14",
40
40
  "concat-stream": "^2.0.0",
@@ -44,8 +44,8 @@
44
44
  "pirates": "^4.0.7",
45
45
  "ts-node": "^10.9.2",
46
46
  "typescript": "^5.9.3",
47
- "@rspack/core": "npm:@rspack-canary/core@1.6.1-canary-17ec8965-20251105023104",
48
- "@rspack/test-tools": "npm:@rspack-canary/test-tools@1.6.1-canary-17ec8965-20251105023104"
47
+ "@rspack/test-tools": "npm:@rspack-canary/test-tools@1.6.1-canary-72453ec6-20251216043959",
48
+ "@rspack/core": "npm:@rspack-canary/core@1.6.1-canary-72453ec6-20251216043959"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "@rspack/core": "^1.0.0-alpha || ^1.x"