@kezh/my-custom-js-converter 0.0.29 → 0.0.31

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.
Files changed (2) hide show
  1. package/core/encode.js +5 -1
  2. package/package.json +1 -1
package/core/encode.js CHANGED
@@ -95,8 +95,12 @@ function encoding$0(inPath, outPath) {
95
95
  * @returns
96
96
  */
97
97
  function getImportMethods(modPathByName, methodNamesByMod) {
98
+ const importModNames = [...modPathByName.entries()].map(([name]) => name);
99
+ if (!importModNames.length) {
100
+ return [];
101
+ }
102
+ console.log(`import => ${importModNames}`);
98
103
  return [...modPathByName.entries()].flatMap(([name, modPath]) => {
99
- console.log(`import => ${name}`);
100
104
  const mod = fs_1.default.readFileSync(modPath, { encoding: "utf-8" });
101
105
  const modAst = (0, parser_1.parse)(mod);
102
106
  const modMethods = getMethods(name, modAst);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kezh/my-custom-js-converter",
3
- "version": "0.0.29",
3
+ "version": "0.0.31",
4
4
  "description": "自定义代码转换器",
5
5
  "main": "index.js",
6
6
  "bin": {