@marko/language-tools 2.5.45 → 2.5.47
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 +9 -2
- package/dist/index.mjs +9 -2
- package/marko.internal.d.ts +9 -4
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1386,8 +1386,15 @@ function getHoistSources(body) {
|
|
|
1386
1386
|
}
|
|
1387
1387
|
function isMutatedVar(node, name) {
|
|
1388
1388
|
var _a;
|
|
1389
|
-
|
|
1390
|
-
|
|
1389
|
+
let scope = Scopes.get(node.body);
|
|
1390
|
+
while (scope) {
|
|
1391
|
+
const binding = (_a = scope.bindings) == null ? void 0 : _a[name];
|
|
1392
|
+
if ((binding == null ? void 0 : binding.type) === 0 /* var */ && binding.mutated) {
|
|
1393
|
+
return true;
|
|
1394
|
+
}
|
|
1395
|
+
scope = scope.parent;
|
|
1396
|
+
}
|
|
1397
|
+
return false;
|
|
1391
1398
|
}
|
|
1392
1399
|
function hasHoists(node) {
|
|
1393
1400
|
return node.body ? Scopes.get(node.body).hoists : false;
|
package/dist/index.mjs
CHANGED
|
@@ -1346,8 +1346,15 @@ function getHoistSources(body) {
|
|
|
1346
1346
|
}
|
|
1347
1347
|
function isMutatedVar(node, name) {
|
|
1348
1348
|
var _a;
|
|
1349
|
-
|
|
1350
|
-
|
|
1349
|
+
let scope = Scopes.get(node.body);
|
|
1350
|
+
while (scope) {
|
|
1351
|
+
const binding = (_a = scope.bindings) == null ? void 0 : _a[name];
|
|
1352
|
+
if ((binding == null ? void 0 : binding.type) === 0 /* var */ && binding.mutated) {
|
|
1353
|
+
return true;
|
|
1354
|
+
}
|
|
1355
|
+
scope = scope.parent;
|
|
1356
|
+
}
|
|
1357
|
+
return false;
|
|
1351
1358
|
}
|
|
1352
1359
|
function hasHoists(node) {
|
|
1353
1360
|
return node.body ? Scopes.get(node.body).hoists : false;
|
package/marko.internal.d.ts
CHANGED
|
@@ -24,11 +24,16 @@ declare global {
|
|
|
24
24
|
override: Override,
|
|
25
25
|
): [0] extends [1 & Override] ? Marko.Global : Override;
|
|
26
26
|
|
|
27
|
-
export function hoist<T
|
|
27
|
+
export function hoist<T>(
|
|
28
28
|
value: () => T,
|
|
29
|
-
): T extends (
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
): T extends () => infer R ? T & Iterable<R> : never;
|
|
30
|
+
// TODO: hoist should really be the below implementation which accounts for hoisting from unknown
|
|
31
|
+
// sections causing the getter to return undefined. Right now the type says it always has a value.
|
|
32
|
+
// export function hoist<T, U = T>(
|
|
33
|
+
// value: () => T,
|
|
34
|
+
// ): T extends () => infer R
|
|
35
|
+
// ? (T | (U extends undefined ? () => undefined : never)) & Iterable<R>
|
|
36
|
+
// : never;
|
|
32
37
|
|
|
33
38
|
export function attrTagNames<Tag>(
|
|
34
39
|
tag: Tag,
|
package/package.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marko/language-tools",
|
|
3
3
|
"description": "Marko Language Tools",
|
|
4
|
-
"version": "2.5.
|
|
4
|
+
"version": "2.5.47",
|
|
5
5
|
"bugs": "https://github.com/marko-js/language-server/issues/new?template=Bug_report.md",
|
|
6
6
|
"peerDependencies": {
|
|
7
7
|
"@marko/compiler": "^5.28.4"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@babel/parser": "^7.28.
|
|
10
|
+
"@babel/parser": "^7.28.6",
|
|
11
11
|
"@luxass/strip-json-comments": "^1.4.0",
|
|
12
12
|
"htmljs-parser": "^5.7.4",
|
|
13
13
|
"relative-import-path": "^1.0.0"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@babel/code-frame": "^7.
|
|
17
|
-
"@marko/compiler": "^5.39.
|
|
18
|
-
"@types/babel__code-frame": "^7.0
|
|
16
|
+
"@babel/code-frame": "^7.28.6",
|
|
17
|
+
"@marko/compiler": "^5.39.49",
|
|
18
|
+
"@types/babel__code-frame": "^7.27.0",
|
|
19
19
|
"@typescript/vfs": "^1.6.2",
|
|
20
|
-
"marko": "^5.38.
|
|
20
|
+
"marko": "^5.38.18",
|
|
21
21
|
"mitata": "^1.0.34",
|
|
22
22
|
"tsx": "^4.21.0"
|
|
23
23
|
},
|