-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(typescript): convert to typescript #51
Open
xAndreiLi
wants to merge
1
commit into
americanexpress:main
Choose a base branch
from
xAndreiLi:feat/typescript
base: main
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.
+9,405
−8,147
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
Matthew-Mallimo
requested changes
Nov 8, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the tests not rely on the build output?
Also, since we now have a build step, its best not to include the build in the repo (add to .gitignore), and update the release workflow to have a build step.
zacowan
requested changes
Nov 8, 2024
xAndreiLi
force-pushed
the
feat/typescript
branch
4 times, most recently
from
November 8, 2024 19:46
00aec0e
to
6e48b3e
Compare
zacowan
reviewed
Nov 8, 2024
xAndreiLi
force-pushed
the
feat/typescript
branch
2 times, most recently
from
November 9, 2024 00:49
e661365
to
6b834c8
Compare
zacowan
reviewed
Nov 14, 2024
update tests to tsx match types version with dep versions generic type change to main/types to exports change build to dist change target to es6 update types/react to 18 to provide modern context type
xAndreiLi
force-pushed
the
feat/typescript
branch
from
December 3, 2024 16:17
6b834c8
to
f132a90
Compare
zacowan
approved these changes
Dec 3, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR aims to convert this package to Typescript, allowing for both Javascript and Typescript projects to use it with added types for type-checking and IntelliSense.
Typescript was added as a dev dependency
File structure was changed to include src and build directories
tsc is used to transpile ts to js because of the package's simple output
Jest was updated in dev dependencies due to the previous version causing type errors
ESLint was updated
Tests now use tsx and test index.ts in src
build directory is gitignored and release runs build script
@types now matches installed dep versions (except for react)
types/react is installed @^18 due to React.Context type signature changing between 16 and 18
uses "exports" in package.json instead of main to supply built js and types
changed build dir to dist dir
changed target to es6 from 5 to remain at a version supporting all modern browsers
uses generic type for createReactSharedContext (WIP)