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

Version Packages #412

Merged
merged 1 commit into from Sep 8, 2021
Merged

Version Packages #412

merged 1 commit into from Sep 8, 2021

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 8, 2021

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@preconstruct/cli@2.1.2

Patch Changes

  • ce31841 #411 Thanks @mitchellhamilton! - Fixed generating declaration maps with versions of TypeScript 4.3 and above.

    Errors are now also emitted when TypeScript fails to generate declarations because it needs to reference a type that isn't exported. Previously Preconstruct silently generated a broken declaration file when encountering inputs like the one shown below where TypeScript needs to be able to name the type X when generating the d.ts file for index.ts but it isn't exported, now it will emit an error instead. To fix the error, you need to export the type.

    // @filename: index.ts
    import { getX } from "./x";
    
    export const x = getX();
    
    // @filename: x.ts
    type X = {
      x?: X;
    };
    
    export const getX = (): X => ({});

    Note that Preconstruct still does not run TypeScript's type checking, you should still do that in addition to running Preconstruct, Preconstruct will only emit these specific errors.

@emmatown emmatown merged commit 9486484 into main Sep 8, 2021
@emmatown emmatown deleted the changeset-release/main branch September 8, 2021 00:51
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.

None yet

1 participant