-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cli): treat package.json imports as optional dependencies (#7044)
There are too many edge cases that are causing issues atm. This should have been optional or opt-in from the start. This makes these imports "optional", so the feature is still enabled by default and users upgrading the cli will get this new feature, but it should no longer ever cause errors. We can maybe change it to error when opted-in in the future and maybe change the default if we are more certain it handles most of the edge cases. --- ### Changes are visible to end-users: yes - Searched for relevant documentation and updated as needed: yes - Breaking change (forces users to change their own code or config): yes - Suggested release notes appear below: yes Dependencies from package.json `main/types/exports` fields no longer cause errors when `aspect configure` can not resolve the referenced files. ### Test plan - New test cases added GitOrigin-RevId: 3199133ffd87902ab1906811d5383bb0de56b299
- Loading branch information
Showing
8 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# gazelle:generation_mode update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
load("@aspect_rules_ts//ts:defs.bzl", "ts_project") | ||
|
||
# gazelle:generation_mode update | ||
|
||
ts_project( | ||
name = "tsc", | ||
srcs = ["src/main.ts"], | ||
) |
10 changes: 10 additions & 0 deletions
10
gazelle/js/tests/npm_package_deps_lib/not-found/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "pkg-with-exports", | ||
"private": true, | ||
"main": "./not-found.js", | ||
"types": "./not-found.d.ts", | ||
"exports": { | ||
".": "./dist/main.js", | ||
"./foo": "./not-found.js" | ||
} | ||
} |
Empty file.