Skip to content

Commit e615b59

Browse files
devversionalxhub
authored andcommitted
fix(language-service): ship /api entry-point (#48670)
The `/api` entry-point was accidentally dropped when we switched the compilation in the repo to full ESM- thinking the entry-point is not needed externally. We re-add it because the VSCode repo extension relies on it for checking whether `ts.LanguageService` is an Angular one. PR Close #48670
1 parent 6ce7d76 commit e615b59

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

packages/language-service/BUILD.bazel

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,19 @@ esbuild(
3030
deps = [":factory_lib"],
3131
)
3232

33+
esbuild(
34+
name = "api_bundle",
35+
entry_point = ":api.ts",
36+
format = "cjs",
37+
deps = [":api"],
38+
)
39+
3340
extract_types(
34-
name = "factory_types",
35-
deps = [":factory_lib"],
41+
name = "types",
42+
deps = [
43+
":api",
44+
":factory_lib",
45+
],
3646
)
3747

3848
pkg_npm(
@@ -55,8 +65,9 @@ pkg_npm(
5565
"//integration:__subpackages__",
5666
],
5767
deps = [
68+
":api_bundle",
5869
":factory_bundle",
59-
":factory_types",
70+
":types",
6071
"//packages/language-service/bundles:language-service.js",
6172
],
6273
)

packages/language-service/package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@
99
"engines": {
1010
"node": "^14.20.0 || ^16.13.0 || >=18.10.0"
1111
},
12+
"exports": {
13+
".": {
14+
"types": "./index.d.ts",
15+
"default": "./index.js"
16+
},
17+
"./api": {
18+
"types": "./api.d.ts",
19+
"default": "./api_bundle.js"
20+
}
21+
},
1222
"repository": {
1323
"type": "git",
1424
"url": "https://github.com/angular/angular.git",

0 commit comments

Comments
 (0)