@bubblelab/ts-scope-manager 0.1.1 → 0.1.4
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/index.mjs +63 -0
- package/package.json +7 -2
package/index.mjs
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// ESM wrapper for ts-scope-manager
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
import { dirname, join } from 'path';
|
|
4
|
+
|
|
5
|
+
const require = createRequire(import.meta.url);
|
|
6
|
+
const scope = require('@typescript-eslint/scope-manager');
|
|
7
|
+
|
|
8
|
+
// Re-export everything as named exports
|
|
9
|
+
export const {
|
|
10
|
+
analyze,
|
|
11
|
+
PatternVisitor,
|
|
12
|
+
Reference,
|
|
13
|
+
Visitor,
|
|
14
|
+
ScopeManager,
|
|
15
|
+
CatchClauseDefinition,
|
|
16
|
+
ClassNameDefinition,
|
|
17
|
+
DefinitionType,
|
|
18
|
+
FunctionNameDefinition,
|
|
19
|
+
ImplicitGlobalVariableDefinition,
|
|
20
|
+
ImportBindingDefinition,
|
|
21
|
+
ParameterDefinition,
|
|
22
|
+
TSEnumMemberDefinition,
|
|
23
|
+
TSEnumNameDefinition,
|
|
24
|
+
TSModuleNameDefinition,
|
|
25
|
+
TypeDefinition,
|
|
26
|
+
VariableDefinition,
|
|
27
|
+
DefinitionBase,
|
|
28
|
+
Scope,
|
|
29
|
+
ScopeType,
|
|
30
|
+
BlockScope,
|
|
31
|
+
CatchScope,
|
|
32
|
+
ClassFieldInitializerScope,
|
|
33
|
+
ClassScope,
|
|
34
|
+
ClassStaticBlockScope,
|
|
35
|
+
ConditionalTypeScope,
|
|
36
|
+
ForScope,
|
|
37
|
+
FunctionExpressionNameScope,
|
|
38
|
+
FunctionScope,
|
|
39
|
+
FunctionTypeScope,
|
|
40
|
+
GlobalScope,
|
|
41
|
+
MappedTypeScope,
|
|
42
|
+
ModuleScope,
|
|
43
|
+
SwitchScope,
|
|
44
|
+
TSEnumScope,
|
|
45
|
+
TSModuleScope,
|
|
46
|
+
TypeScope,
|
|
47
|
+
WithScope,
|
|
48
|
+
Variable
|
|
49
|
+
} = scope;
|
|
50
|
+
|
|
51
|
+
// Also export resetIds from internal ID module
|
|
52
|
+
let resetIds;
|
|
53
|
+
try {
|
|
54
|
+
const scopeManagerPath = require.resolve('@typescript-eslint/scope-manager');
|
|
55
|
+
const idPath = join(dirname(scopeManagerPath), 'ID.js');
|
|
56
|
+
const idModule = require(idPath);
|
|
57
|
+
resetIds = idModule.resetIds;
|
|
58
|
+
} catch (_e) {
|
|
59
|
+
// noop if upstream layout changes
|
|
60
|
+
resetIds = () => {};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export { resetIds };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bubblelab/ts-scope-manager",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -8,11 +8,16 @@
|
|
|
8
8
|
"types": "index.d.ts",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
|
-
"import": "./index.
|
|
11
|
+
"import": "./index.mjs",
|
|
12
12
|
"require": "./index.js",
|
|
13
13
|
"types": "./index.d.ts"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
|
+
"files": [
|
|
17
|
+
"index.js",
|
|
18
|
+
"index.mjs",
|
|
19
|
+
"index.d.ts"
|
|
20
|
+
],
|
|
16
21
|
"peerDependencies": {
|
|
17
22
|
"typescript": ">=4.8.4 <5.9.0"
|
|
18
23
|
},
|