This repository has been archived by the owner on Mar 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
Remove path aliases from tests #2243
Open
ecraig12345
wants to merge
6
commits into
master
Choose a base branch
from
chore/remove-aliases-test
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
e82e42b
to
614165c
Compare
Hmmmmm it also does the relative paths thing with just this part. |
Slight difference is for react-bindings it does |
I fixed the .d.ts issue by removing these settings from
And added to each package tsconfig:
|
1f182a9
to
b5b7f0d
Compare
19ec676
to
17ef5a6
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Splitting out #2233 for (slightly) easier reviewing.
Replace legacy path aliases with more standard imports. This change only modifies the imports in tests.
src
with@fluentui/react
in tests, and fix unnecessary deep importsI used paths underI used relative paths into@fluentui/react/src
src
with comments about why they're neededtest
with relative pathsreact
andaccessibility
import generated files which currently live underdocs
(componentInfo
,behaviorInfo
). These imports have to stay as path imports for now because having those packages depend on@fluentui/docs
would cause circular imports. So we need a better all-up solution for where these generated files and/or the tests that rely on them should live (or get rid of the generated files?).To fix the issue where .d.ts files were getting generated with relative path imports for inferred types, I removed these settings from
tsconfig.common.json
:And added to each package tsconfig:
And this to the root
tsconfig.json
(and update the places registeringtsconfig-paths
to use this config) to ensure that the build system and editors know where to find the packages:(Also temporarily have it inherit from tsconfig.docs until all the aliases are removed.)
It's likely that if we switched the
main
field inpackage.json
to point tosrc
locally (like it does in staging), and added a pre-publish step to correct it todist
or whatever, we could get rid of all these aliases. But that should be done separately.