Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(language-service): ship /api entry-point
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.
  • Loading branch information
devversion committed Jan 9, 2023
commit 22b1dd22b13c44b7ce3e5098f8023a2917e9a32d
17 changes: 14 additions & 3 deletions packages/language-service/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,19 @@ esbuild(
deps = [":factory_lib"],
)

esbuild(
name = "api_bundle",
entry_point = ":api.ts",
format = "cjs",
deps = [":api"],
)

extract_types(
name = "factory_types",
deps = [":factory_lib"],
name = "types",
deps = [
":api",
":factory_lib",
],
)

pkg_npm(
Expand All @@ -55,8 +65,9 @@ pkg_npm(
"//integration:__subpackages__",
],
deps = [
":api_bundle",
":factory_bundle",
":factory_types",
":types",
"//packages/language-service/bundles:language-service.js",
],
)
10 changes: 10 additions & 0 deletions packages/language-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@
"engines": {
"node": "^14.20.0 || ^16.13.0 || >=18.10.0"
},
"exports": {
".": {
"types": "./index.d.ts",
"default": "./index.js"
},
"./api": {
"types": "./api.d.ts",
"default": "./api_bundle.js"
}
},
"repository": {
"type": "git",
"url": "https://github.com/angular/angular.git",
Expand Down