Skip to content
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

fix(ts): correct entry point #4829

Merged
merged 1 commit into from
Aug 16, 2021
Merged

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Aug 13, 2021

The entry point used to be:

// this is wrong!!!
export { default } from './index.es';
export * from './connectors';
export * from './helpers';
export * from './types';
export * from './widgets';
export * from './lib/routers';

While really the entry point should be the same as index.es.ts, as otherwise the js bundle doesn't match the declaration.

This commit fixes that by no longer generating an entry point, and renaming index.es.d.ts to index.d.ts in the built files.

In the same commit I also move the declaration-related configuration files to the subfolder to make the root a little cleaner

The entry point used to be:

```ts
export { default } from './index.es';
export * from './connectors';
export * from './helpers';
export * from './types';
export * from './widgets';
export * from './lib/routers';
```

While really the entry point should be the same as index.es.ts, as otherwise the js bundle doesn't match the declaration.

This commit fixes that by no longer generating an entry point, and renaming index.es.d.ts to index.d.ts in the built files.

In the same commit I also move the declaration-related configuration files to the subfolder to make the root a little cleaner
@Haroenv Haroenv requested review from a team, eunjae-lee and tkrugg and removed request for a team August 13, 2021 15:20
@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit fa4c2c7:

Sandbox Source
InstantSearch.js Configuration

Copy link
Contributor

@eunjae-lee eunjae-lee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't get what you meant at first, but looking at the current build output, this PR looks good to me!

image
(↑ before this PR)

@Haroenv Haroenv merged commit 24a45f9 into master Aug 16, 2021
@Haroenv Haroenv deleted the refactor/ts-correct-declaration branch August 16, 2021 09:23
Haroenv added a commit that referenced this pull request Aug 17, 2021
This was changed in #4829, as i thought it was a mistake (like most of the other entries in that fake file), but /types is required
Haroenv added a commit that referenced this pull request Aug 17, 2021
This was changed in #4829, as i thought it was a mistake (like most of the other entries in that fake file), but /types is required
Haroenv added a commit that referenced this pull request Aug 17, 2021
This was changed in #4829, as i thought it was a mistake (like most of the other entries in that fake file), but /types is required
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants