@next-core/cook 1.6.43 → 1.6.46
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/CHANGELOG.md +27 -0
- package/dist/cjs/cook.js +2 -6
- package/dist/cjs/cook.js.map +1 -1
- package/dist/esm/cook.js +2 -6
- package/dist/esm/cook.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.6.46](https://github.com/easyops-cn/next-core/compare/@next-core/cook@1.6.45...@next-core/cook@1.6.46) (2022-08-31)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* remove dead code ([61db875](https://github.com/easyops-cn/next-core/commit/61db8759d48e0de3a31c55bf2ced50cf8617a5a2))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [1.6.45](https://github.com/easyops-cn/next-core/compare/@next-core/cook@1.6.44...@next-core/cook@1.6.45) (2022-08-26)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @next-core/cook
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [1.6.44](https://github.com/easyops-cn/next-core/compare/@next-core/cook@1.6.43...@next-core/cook@1.6.44) (2022-08-25)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @next-core/cook
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
## [1.6.43](https://github.com/easyops-cn/next-core/compare/@next-core/cook@1.6.42...@next-core/cook@1.6.43) (2022-08-23)
|
|
7
34
|
|
|
8
35
|
**Note:** Version bump only for package @next-core/cook
|
package/dist/cjs/cook.js
CHANGED
|
@@ -1330,9 +1330,7 @@ function cook(rootAst, codeSource, {
|
|
|
1330
1330
|
const name = functionExpression.id.name;
|
|
1331
1331
|
const funcEnv = new _ExecutionContext.DeclarativeEnvironment(scope);
|
|
1332
1332
|
funcEnv.CreateImmutableBinding(name, false);
|
|
1333
|
-
const closure = OrdinaryFunctionCreate(functionExpression,
|
|
1334
|
-
// functionExpression.body,
|
|
1335
|
-
funcEnv, true);
|
|
1333
|
+
const closure = OrdinaryFunctionCreate(functionExpression, funcEnv, true);
|
|
1336
1334
|
funcEnv.InitializeBinding(name, closure);
|
|
1337
1335
|
return closure;
|
|
1338
1336
|
} else {
|
|
@@ -1349,9 +1347,7 @@ function cook(rootAst, codeSource, {
|
|
|
1349
1347
|
} // https://tc39.es/ecma262/#sec-ordinaryfunctioncreate
|
|
1350
1348
|
|
|
1351
1349
|
|
|
1352
|
-
function OrdinaryFunctionCreate(sourceNode,
|
|
1353
|
-
// body: BlockStatement | Expression,
|
|
1354
|
-
scope, isConstructor) {
|
|
1350
|
+
function OrdinaryFunctionCreate(sourceNode, scope, isConstructor) {
|
|
1355
1351
|
const F = function () {
|
|
1356
1352
|
// eslint-disable-next-line prefer-rest-params
|
|
1357
1353
|
return CallFunction(F, arguments);
|