@alloy-js/typescript 0.6.0 → 0.7.0
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 +13 -0
- package/dist/src/components/ArrayExpression.d.ts.map +1 -1
- package/dist/src/components/ArrayExpression.js +1 -1
- package/dist/src/components/ArrayExpression.js.map +1 -1
- package/dist/src/components/Declaration.d.ts +4 -0
- package/dist/src/components/Declaration.d.ts.map +1 -1
- package/dist/src/components/Declaration.js +3 -2
- package/dist/src/components/Declaration.js.map +1 -1
- package/dist/src/components/EnumDeclaration.d.ts.map +1 -1
- package/dist/src/components/EnumDeclaration.js +3 -2
- package/dist/src/components/EnumDeclaration.js.map +1 -1
- package/dist/src/components/ExportStatement.d.ts.map +1 -1
- package/dist/src/components/ExportStatement.js +3 -1
- package/dist/src/components/ExportStatement.js.map +1 -1
- package/dist/src/components/FunctionDeclaration.d.ts +2 -1
- package/dist/src/components/FunctionDeclaration.d.ts.map +1 -1
- package/dist/src/components/FunctionDeclaration.js +2 -1
- package/dist/src/components/FunctionDeclaration.js.map +1 -1
- package/dist/src/components/MemberChainExpression.d.ts +2 -2
- package/dist/src/components/MemberChainExpression.d.ts.map +1 -1
- package/dist/src/components/MemberChainExpression.js +43 -7
- package/dist/src/components/MemberChainExpression.js.map +1 -1
- package/dist/src/components/PackageDirectory.d.ts +1 -3
- package/dist/src/components/PackageDirectory.d.ts.map +1 -1
- package/dist/src/components/PackageDirectory.js +9 -16
- package/dist/src/components/PackageDirectory.js.map +1 -1
- package/dist/src/components/PackageJson.d.ts +39 -0
- package/dist/src/components/PackageJson.d.ts.map +1 -1
- package/dist/src/components/PackageJson.js +30 -12
- package/dist/src/components/PackageJson.js.map +1 -1
- package/dist/src/components/VarDeclaration.d.ts.map +1 -1
- package/dist/src/components/VarDeclaration.js +3 -2
- package/dist/src/components/VarDeclaration.js.map +1 -1
- package/dist/src/symbols/reference.d.ts.map +1 -1
- package/dist/src/symbols/reference.js +5 -2
- package/dist/src/symbols/reference.js.map +1 -1
- package/dist/src/symbols/ts-output-symbol.d.ts +2 -1
- package/dist/src/symbols/ts-output-symbol.d.ts.map +1 -1
- package/dist/src/symbols/ts-output-symbol.js +4 -1
- package/dist/src/symbols/ts-output-symbol.js.map +1 -1
- package/dist/src/symbols/ts-package-scope.d.ts +0 -15
- package/dist/src/symbols/ts-package-scope.d.ts.map +1 -1
- package/dist/src/symbols/ts-package-scope.js +0 -8
- package/dist/src/symbols/ts-package-scope.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/components/ArrayExpression.tsx +5 -1
- package/src/components/Declaration.tsx +7 -2
- package/src/components/EnumDeclaration.tsx +2 -2
- package/src/components/ExportStatement.tsx +3 -1
- package/src/components/FunctionDeclaration.tsx +4 -2
- package/src/components/MemberChainExpression.tsx +37 -5
- package/src/components/PackageDirectory.tsx +12 -22
- package/src/components/PackageJson.tsx +86 -27
- package/src/components/VarDeclaration.tsx +2 -2
- package/src/symbols/reference.ts +7 -4
- package/src/symbols/ts-output-symbol.ts +6 -2
- package/src/symbols/ts-package-scope.ts +0 -28
- package/temp/api.json +375 -304
- package/test/array.test.tsx +12 -0
- package/test/imports.test.tsx +25 -10
- package/test/interface.test.tsx +3 -3
- package/test/member-chain.test.tsx +77 -0
- package/test/package-external.test.tsx +98 -3
- package/test/package.test.tsx +56 -3
package/test/array.test.tsx
CHANGED
|
@@ -33,3 +33,15 @@ it("accepts children", () => {
|
|
|
33
33
|
[1, 2, 3, [4, 5, 6]]
|
|
34
34
|
`);
|
|
35
35
|
});
|
|
36
|
+
|
|
37
|
+
it("accepts only children", () => {
|
|
38
|
+
expect(
|
|
39
|
+
toSourceText(
|
|
40
|
+
<ArrayExpression>
|
|
41
|
+
<ArrayExpression jsValue={[4, 5, 6]} />
|
|
42
|
+
</ArrayExpression>,
|
|
43
|
+
),
|
|
44
|
+
).toBe(d`
|
|
45
|
+
[[4, 5, 6]]
|
|
46
|
+
`);
|
|
47
|
+
});
|
package/test/imports.test.tsx
CHANGED
|
@@ -46,7 +46,7 @@ it("works with named imports", () => {
|
|
|
46
46
|
const res = render(
|
|
47
47
|
<Output>
|
|
48
48
|
<ts.SourceFile path="test1.ts">
|
|
49
|
-
<ts.FunctionDeclaration export name="test" />
|
|
49
|
+
<ts.FunctionDeclaration export name="test" refkey={refkey("test")} />
|
|
50
50
|
</ts.SourceFile>
|
|
51
51
|
|
|
52
52
|
<ts.SourceFile path="test2.ts">
|
|
@@ -71,9 +71,14 @@ it("works with default and named imports", () => {
|
|
|
71
71
|
const res = render(
|
|
72
72
|
<Output>
|
|
73
73
|
<ts.SourceFile path="test1.ts">
|
|
74
|
-
<ts.FunctionDeclaration
|
|
74
|
+
<ts.FunctionDeclaration
|
|
75
|
+
export
|
|
76
|
+
default
|
|
77
|
+
name="test1"
|
|
78
|
+
refkey={refkey("test1")}
|
|
79
|
+
/>
|
|
75
80
|
<hbr />
|
|
76
|
-
<ts.FunctionDeclaration export name="test2" />
|
|
81
|
+
<ts.FunctionDeclaration export name="test2" refkey={refkey("test2")} />
|
|
77
82
|
</ts.SourceFile>
|
|
78
83
|
|
|
79
84
|
<ts.SourceFile path="test2.ts">
|
|
@@ -101,9 +106,14 @@ it("works with default and named imports and name conflicts", () => {
|
|
|
101
106
|
const res = render(
|
|
102
107
|
<Output nameConflictResolver={tsNameConflictResolver}>
|
|
103
108
|
<ts.SourceFile path="test1.ts">
|
|
104
|
-
<ts.FunctionDeclaration
|
|
109
|
+
<ts.FunctionDeclaration
|
|
110
|
+
export
|
|
111
|
+
default
|
|
112
|
+
name="test1"
|
|
113
|
+
refkey={refkey("test1")}
|
|
114
|
+
/>
|
|
105
115
|
<br />
|
|
106
|
-
<ts.FunctionDeclaration export name="test2" />
|
|
116
|
+
<ts.FunctionDeclaration export name="test2" refkey={refkey("test2")} />
|
|
107
117
|
</ts.SourceFile>
|
|
108
118
|
|
|
109
119
|
<ts.SourceFile path="test2.ts">
|
|
@@ -165,9 +175,14 @@ it("works with default and named imports and name conflicts and references in ne
|
|
|
165
175
|
const res = render(
|
|
166
176
|
<Output nameConflictResolver={tsNameConflictResolver}>
|
|
167
177
|
<ts.SourceFile path="test1.ts">
|
|
168
|
-
<ts.FunctionDeclaration
|
|
178
|
+
<ts.FunctionDeclaration
|
|
179
|
+
export
|
|
180
|
+
default
|
|
181
|
+
name="test1"
|
|
182
|
+
refkey={refkey("test1")}
|
|
183
|
+
/>
|
|
169
184
|
<hbr />
|
|
170
|
-
<ts.FunctionDeclaration export name="test2" />
|
|
185
|
+
<ts.FunctionDeclaration export name="test2" refkey={refkey("test2")} />
|
|
171
186
|
</ts.SourceFile>
|
|
172
187
|
|
|
173
188
|
<ts.SourceFile path="test2.ts">
|
|
@@ -237,7 +252,7 @@ it("works with imports from different directories", () => {
|
|
|
237
252
|
<Output>
|
|
238
253
|
<SourceDirectory path="src">
|
|
239
254
|
<ts.SourceFile path="test1.ts">
|
|
240
|
-
<ts.FunctionDeclaration export name="test" />
|
|
255
|
+
<ts.FunctionDeclaration export name="test" refkey={refkey("test")} />
|
|
241
256
|
<hbr />
|
|
242
257
|
const v = <Reference refkey={refkey("test2")} />;
|
|
243
258
|
</ts.SourceFile>
|
|
@@ -245,7 +260,7 @@ it("works with imports from different directories", () => {
|
|
|
245
260
|
|
|
246
261
|
<ts.SourceFile path="test2.ts">
|
|
247
262
|
const v = <Reference refkey={refkey("test")} />;<hbr />
|
|
248
|
-
<ts.FunctionDeclaration export name="test2" />
|
|
263
|
+
<ts.FunctionDeclaration export name="test2" refkey={refkey("test2")} />
|
|
249
264
|
</ts.SourceFile>
|
|
250
265
|
</Output>,
|
|
251
266
|
);
|
|
@@ -271,7 +286,7 @@ it("handles conflicts with local declarations", () => {
|
|
|
271
286
|
<Output nameConflictResolver={tsNameConflictResolver}>
|
|
272
287
|
<SourceDirectory path="src">
|
|
273
288
|
<ts.SourceFile path="test1.ts">
|
|
274
|
-
<ts.FunctionDeclaration export name="test" />
|
|
289
|
+
<ts.FunctionDeclaration export name="test" refkey={refkey("test")} />
|
|
275
290
|
<hbr />
|
|
276
291
|
const v = <Reference refkey={refkey("test2")} />;
|
|
277
292
|
</ts.SourceFile>
|
package/test/interface.test.tsx
CHANGED
|
@@ -35,7 +35,7 @@ it("creates extends", () => {
|
|
|
35
35
|
|
|
36
36
|
it("can create members", () => {
|
|
37
37
|
const res = toSourceText(
|
|
38
|
-
<ts.InterfaceDeclaration name="Foo">
|
|
38
|
+
<ts.InterfaceDeclaration name="Foo" refkey={refkey("Foo")}>
|
|
39
39
|
<StatementList>
|
|
40
40
|
<ts.InterfaceMember name="member" type="string" />
|
|
41
41
|
<ts.InterfaceMember
|
|
@@ -58,7 +58,7 @@ it("can create members", () => {
|
|
|
58
58
|
|
|
59
59
|
it("can create optional members", () => {
|
|
60
60
|
const res = toSourceText(
|
|
61
|
-
<ts.InterfaceDeclaration name="Foo">
|
|
61
|
+
<ts.InterfaceDeclaration name="Foo" refkey={refkey("Foo")}>
|
|
62
62
|
<StatementList>
|
|
63
63
|
<ts.InterfaceMember name="member" type="string" />
|
|
64
64
|
<ts.InterfaceMember
|
|
@@ -82,7 +82,7 @@ it("can create optional members", () => {
|
|
|
82
82
|
|
|
83
83
|
it("can create readonly members", () => {
|
|
84
84
|
const res = toSourceText(
|
|
85
|
-
<ts.InterfaceDeclaration name="Foo">
|
|
85
|
+
<ts.InterfaceDeclaration name="Foo" refkey={refkey("Foo")}>
|
|
86
86
|
<StatementList>
|
|
87
87
|
<ts.InterfaceMember readonly name="member" type="string" />
|
|
88
88
|
<ts.InterfaceMember
|
|
@@ -45,3 +45,80 @@ it("works with args which break", () => {
|
|
|
45
45
|
.array()
|
|
46
46
|
`);
|
|
47
47
|
});
|
|
48
|
+
|
|
49
|
+
it("works with args when it doesn't break", () => {
|
|
50
|
+
expect(
|
|
51
|
+
toSourceText(
|
|
52
|
+
<MemberChainExpression>
|
|
53
|
+
<>z</>
|
|
54
|
+
<FunctionCallExpression
|
|
55
|
+
target="object"
|
|
56
|
+
args={[<ValueExpression jsValue={{ a: 1, b: 2 }} />]}
|
|
57
|
+
/>
|
|
58
|
+
</MemberChainExpression>,
|
|
59
|
+
),
|
|
60
|
+
).toBe(d`
|
|
61
|
+
z.object({
|
|
62
|
+
a: 1,
|
|
63
|
+
b: 2,
|
|
64
|
+
})
|
|
65
|
+
`);
|
|
66
|
+
|
|
67
|
+
expect(
|
|
68
|
+
toSourceText(
|
|
69
|
+
<MemberChainExpression>
|
|
70
|
+
<>z</>
|
|
71
|
+
<>z2</>
|
|
72
|
+
<>z3</>
|
|
73
|
+
<FunctionCallExpression
|
|
74
|
+
target="object"
|
|
75
|
+
args={[<ValueExpression jsValue={{ a: 1, b: 2 }} />]}
|
|
76
|
+
/>
|
|
77
|
+
</MemberChainExpression>,
|
|
78
|
+
),
|
|
79
|
+
).toBe(d`
|
|
80
|
+
z.z2.z3.object({
|
|
81
|
+
a: 1,
|
|
82
|
+
b: 2,
|
|
83
|
+
})
|
|
84
|
+
`);
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it("works with nested call member chains", () => {
|
|
88
|
+
expect(
|
|
89
|
+
toSourceText(
|
|
90
|
+
<MemberChainExpression>
|
|
91
|
+
<>z</>
|
|
92
|
+
<FunctionCallExpression target="string" />
|
|
93
|
+
<FunctionCallExpression target="array" />
|
|
94
|
+
<MemberChainExpression>
|
|
95
|
+
<FunctionCallExpression target="min" args={[5]} />
|
|
96
|
+
<FunctionCallExpression target="max" args={[10]} />
|
|
97
|
+
</MemberChainExpression>
|
|
98
|
+
<FunctionCallExpression target="array" />
|
|
99
|
+
</MemberChainExpression>,
|
|
100
|
+
{ printWidth: 10 },
|
|
101
|
+
),
|
|
102
|
+
).toBe(d`
|
|
103
|
+
z.string()
|
|
104
|
+
.array()
|
|
105
|
+
.min(5)
|
|
106
|
+
.max(10)
|
|
107
|
+
.array()
|
|
108
|
+
`);
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
it("works without function call expressions", () => {
|
|
112
|
+
expect(
|
|
113
|
+
toSourceText(
|
|
114
|
+
<MemberChainExpression>
|
|
115
|
+
<>z</>
|
|
116
|
+
<>string</>
|
|
117
|
+
<>min</>
|
|
118
|
+
</MemberChainExpression>,
|
|
119
|
+
{ printWidth: 5 },
|
|
120
|
+
),
|
|
121
|
+
).toBe(d`
|
|
122
|
+
z.string.min
|
|
123
|
+
`);
|
|
124
|
+
});
|
|
@@ -13,13 +13,20 @@ it("imports external packages", () => {
|
|
|
13
13
|
version="1.0.0"
|
|
14
14
|
>
|
|
15
15
|
<ts.SourceFile path="greetings.ts">
|
|
16
|
-
<ts.FunctionDeclaration
|
|
16
|
+
<ts.FunctionDeclaration
|
|
17
|
+
name="getGreeting"
|
|
18
|
+
refkey={refkey("getGreeting")}
|
|
19
|
+
>
|
|
17
20
|
return "Hello world!";
|
|
18
21
|
</ts.FunctionDeclaration>
|
|
19
22
|
</ts.SourceFile>
|
|
20
23
|
|
|
21
24
|
<ts.SourceFile path="logGreetings.ts">
|
|
22
|
-
<ts.FunctionDeclaration
|
|
25
|
+
<ts.FunctionDeclaration
|
|
26
|
+
export
|
|
27
|
+
name="printGreeting"
|
|
28
|
+
refkey={refkey("printGreeting")}
|
|
29
|
+
>
|
|
23
30
|
console.log("Hello world!");
|
|
24
31
|
</ts.FunctionDeclaration>
|
|
25
32
|
</ts.SourceFile>
|
|
@@ -62,7 +69,95 @@ it("imports external packages", () => {
|
|
|
62
69
|
"name": "greeting-lib",
|
|
63
70
|
"version": "1.0.0",
|
|
64
71
|
"type": "module",
|
|
65
|
-
"
|
|
72
|
+
"devDependencies": {
|
|
73
|
+
"typescript": "^5.5.2"
|
|
74
|
+
},
|
|
75
|
+
"exports": {
|
|
76
|
+
".": "./dist/index.js"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
`);
|
|
80
|
+
|
|
81
|
+
expect(refFile.contents).toEqual(d`
|
|
82
|
+
import { getGreeting } from "greeting-lib";
|
|
83
|
+
|
|
84
|
+
getGreeting();
|
|
85
|
+
`);
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
it("combines explicit dependencies with referenced dependencies", () => {
|
|
89
|
+
const res = render(
|
|
90
|
+
<Output>
|
|
91
|
+
<ts.PackageDirectory
|
|
92
|
+
name="greeting-lib"
|
|
93
|
+
path="greeting-lib"
|
|
94
|
+
version="1.0.0"
|
|
95
|
+
>
|
|
96
|
+
<ts.SourceFile path="greetings.ts">
|
|
97
|
+
<ts.FunctionDeclaration
|
|
98
|
+
name="getGreeting"
|
|
99
|
+
refkey={refkey("getGreeting")}
|
|
100
|
+
>
|
|
101
|
+
return "Hello world!";
|
|
102
|
+
</ts.FunctionDeclaration>
|
|
103
|
+
</ts.SourceFile>
|
|
104
|
+
|
|
105
|
+
<ts.SourceFile path="logGreetings.ts">
|
|
106
|
+
<ts.FunctionDeclaration
|
|
107
|
+
export
|
|
108
|
+
name="printGreeting"
|
|
109
|
+
refkey={refkey("printGreeting")}
|
|
110
|
+
>
|
|
111
|
+
console.log("Hello world!");
|
|
112
|
+
</ts.FunctionDeclaration>
|
|
113
|
+
</ts.SourceFile>
|
|
114
|
+
|
|
115
|
+
<ts.BarrelFile export="." />
|
|
116
|
+
</ts.PackageDirectory>
|
|
117
|
+
|
|
118
|
+
<ts.PackageDirectory
|
|
119
|
+
name="consumer"
|
|
120
|
+
path="consumer"
|
|
121
|
+
version="1.0.0"
|
|
122
|
+
dependencies={{
|
|
123
|
+
foo: "bar",
|
|
124
|
+
}}
|
|
125
|
+
>
|
|
126
|
+
<ts.SourceFile export="." path="ref.ts">
|
|
127
|
+
<ts.Reference refkey={refkey("getGreeting")} />
|
|
128
|
+
();
|
|
129
|
+
</ts.SourceFile>
|
|
130
|
+
</ts.PackageDirectory>
|
|
131
|
+
</Output>,
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
const consumerPkgJson = findFile(res, "consumer/package.json")!;
|
|
135
|
+
const greetingPkgJson = findFile(res, "greeting-lib/package.json")!;
|
|
136
|
+
const refFile = findFile(res, "consumer/ref.ts")!;
|
|
137
|
+
|
|
138
|
+
expect(consumerPkgJson.contents).toEqual(d`
|
|
139
|
+
{
|
|
140
|
+
"name": "consumer",
|
|
141
|
+
"version": "1.0.0",
|
|
142
|
+
"type": "module",
|
|
143
|
+
"dependencies": {
|
|
144
|
+
"foo": "bar",
|
|
145
|
+
"greeting-lib": "1.0.0"
|
|
146
|
+
},
|
|
147
|
+
"devDependencies": {
|
|
148
|
+
"typescript": "^5.5.2"
|
|
149
|
+
},
|
|
150
|
+
"exports": {
|
|
151
|
+
".": "./dist/ref.js"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
`);
|
|
155
|
+
|
|
156
|
+
expect(greetingPkgJson.contents).toEqual(d`
|
|
157
|
+
{
|
|
158
|
+
"name": "greeting-lib",
|
|
159
|
+
"version": "1.0.0",
|
|
160
|
+
"type": "module",
|
|
66
161
|
"devDependencies": {
|
|
67
162
|
"typescript": "^5.5.2"
|
|
68
163
|
},
|
package/test/package.test.tsx
CHANGED
|
@@ -10,7 +10,10 @@ it("exports source files", () => {
|
|
|
10
10
|
<Output>
|
|
11
11
|
<PackageDirectory name="greeting-js" path="." version="1.0.0">
|
|
12
12
|
<ts.SourceFile path="greeting.ts">
|
|
13
|
-
<ts.FunctionDeclaration
|
|
13
|
+
<ts.FunctionDeclaration
|
|
14
|
+
name="getGreeting"
|
|
15
|
+
refkey={refkey("getGreeting")}
|
|
16
|
+
>
|
|
14
17
|
return "Hello world!";
|
|
15
18
|
</ts.FunctionDeclaration>
|
|
16
19
|
</ts.SourceFile>
|
|
@@ -20,7 +23,11 @@ it("exports source files", () => {
|
|
|
20
23
|
{refkey("getGreeting")}()
|
|
21
24
|
</ts.VarDeclaration>
|
|
22
25
|
;<hbr />
|
|
23
|
-
<ts.FunctionDeclaration
|
|
26
|
+
<ts.FunctionDeclaration
|
|
27
|
+
export
|
|
28
|
+
name="printGreeting"
|
|
29
|
+
refkey={refkey("printGreeting")}
|
|
30
|
+
>
|
|
24
31
|
console.log(greeting);
|
|
25
32
|
</ts.FunctionDeclaration>
|
|
26
33
|
</ts.SourceFile>
|
|
@@ -53,7 +60,6 @@ it("exports source files", () => {
|
|
|
53
60
|
"name": "greeting-js",
|
|
54
61
|
"version": "1.0.0",
|
|
55
62
|
"type": "module",
|
|
56
|
-
"dependencies": {},
|
|
57
63
|
"devDependencies": {
|
|
58
64
|
"typescript": "^5.5.2"
|
|
59
65
|
},
|
|
@@ -65,3 +71,50 @@ it("exports source files", () => {
|
|
|
65
71
|
`,
|
|
66
72
|
});
|
|
67
73
|
});
|
|
74
|
+
|
|
75
|
+
it("combines ref'd exports with explicit exports", () => {
|
|
76
|
+
const res = render(
|
|
77
|
+
<Output>
|
|
78
|
+
<PackageDirectory
|
|
79
|
+
name="greeting-js"
|
|
80
|
+
path="."
|
|
81
|
+
version="1.0.0"
|
|
82
|
+
exports={{
|
|
83
|
+
"./foo": "./foo/test.js",
|
|
84
|
+
}}
|
|
85
|
+
>
|
|
86
|
+
<ts.SourceFile export="." path="index.ts">
|
|
87
|
+
<ts.FunctionDeclaration
|
|
88
|
+
export
|
|
89
|
+
name="printGreeting"
|
|
90
|
+
refkey={refkey("printGreeting")}
|
|
91
|
+
>
|
|
92
|
+
console.log(greeting);
|
|
93
|
+
</ts.FunctionDeclaration>
|
|
94
|
+
</ts.SourceFile>
|
|
95
|
+
</PackageDirectory>
|
|
96
|
+
</Output>,
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
assertFileContents(res, {
|
|
100
|
+
"index.ts": `
|
|
101
|
+
export function printGreeting() {
|
|
102
|
+
console.log(greeting);
|
|
103
|
+
}
|
|
104
|
+
`,
|
|
105
|
+
"package.json": `
|
|
106
|
+
{
|
|
107
|
+
"name": "greeting-js",
|
|
108
|
+
"version": "1.0.0",
|
|
109
|
+
"type": "module",
|
|
110
|
+
"devDependencies": {
|
|
111
|
+
"typescript": "^5.5.2"
|
|
112
|
+
},
|
|
113
|
+
"exports": {
|
|
114
|
+
"./foo": "./foo/test.js",
|
|
115
|
+
".": "./dist/index.js"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
`,
|
|
119
|
+
});
|
|
120
|
+
});
|