@kezh/my-custom-js-converter 0.0.11 → 0.0.13

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 +8 -2
  2. package/package.json +1 -1
package/core/encode.js CHANGED
@@ -109,7 +109,9 @@ function getImportMethods(modPathByName, methodNamesByMod) {
109
109
  const mergeMethods = mergeMethodNames
110
110
  .map((name) => {
111
111
  return modMethods.find((m) => core_1.types.isIdentifier(m.key) && m.key.name === name);
112
- }).filter(m => m);
112
+ })
113
+ .filter((m) => m);
114
+ console.log(`inline methods size => ${inlineMethodNames.length}`);
113
115
  console.log(`import methods size => ${mergeMethods.length}`);
114
116
  return mergeMethods.map((m) => {
115
117
  m.body = core_1.types.addComment(m.body, "inner", "auto-generated: Please do not modify the.");
@@ -148,7 +150,10 @@ function getInlineThisMethodNames(modMethodNames, useMethodNames, modAst) {
148
150
  }
149
151
  }
150
152
  });
151
- return [...thisMethodNames];
153
+ return [
154
+ ...thisMethodNames,
155
+ ...getInlineThisMethodNames(modMethodNames, [...thisMethodNames])
156
+ ];
152
157
  }
153
158
  /**
154
159
  * 获取所有依赖第三方模块路径
@@ -228,6 +233,7 @@ function getSrcMethodNames(entry, srcAst) {
228
233
  }
229
234
  /**
230
235
  * 获取源码入口对象所有方法
236
+ * todo: 重复获取方法
231
237
  * @param entry - 入口对象
232
238
  * @param ast - AST
233
239
  * @returns
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kezh/my-custom-js-converter",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
4
4
  "description": "自定义代码转换器",
5
5
  "main": "index.js",
6
6
  "bin": {