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: could not find a declaration file for module 'ansis' #14

Merged
merged 1 commit into from
Nov 14, 2023
Merged

fix: could not find a declaration file for module 'ansis' #14

merged 1 commit into from
Nov 14, 2023

Conversation

will-stone
Copy link
Contributor

@will-stone will-stone commented Nov 14, 2023

Types of changes

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • docs change
  • breaking change

Motivation / Use-Case

Fixes this TypeScript error:

CleanShot 2023-11-14 at 12 35 41@2x

Breaking Changes

None

Additional Info


Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have updated the CHANGELOG.md.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@will-stone will-stone marked this pull request as ready for review November 14, 2023 12:40
@will-stone
Copy link
Contributor Author

will-stone commented Nov 14, 2023

hang on! @webdiscus what's this file? https://github.com/webdiscus/ansis/blob/master/pkg/package.json why are there two package.json files?

@webdiscus
Copy link
Owner

webdiscus commented Nov 14, 2023

hang on! @webdiscus what's this file? https://github.com/webdiscus/ansis/blob/master/pkg/package.json why is there two package.json files?

Hello @will-stone,

can you please add the index.d.ts to the pkg/package.json too.

We have 2 package.json files:

  • ./package.json - the file for local development and contribution.
    The source code is written as ESM, therefore for local development is required the "type": "module" here.
    The main file is defined as source file: "main": "./src/index.js" for tests.
  • ./pkg/package.json - the clean & small file for NPM package, containing different fields.
    The NPM package contains "compiled" universal (ESM/CJS) code, therefore is required different file with other "main": "./index.js" and the type of the package is not module.

@webdiscus
Copy link
Owner

can you please change the "version": "2.0.2", field in both package.json and pkg/package.json files

@webdiscus webdiscus added the bug Something isn't working label Nov 14, 2023
@will-stone
Copy link
Contributor Author

Done and done 👍

@webdiscus webdiscus merged commit c2197fd into webdiscus:master Nov 14, 2023
2 checks passed
@will-stone will-stone deleted the patch-1 branch November 14, 2023 13:40
@webdiscus
Copy link
Owner

@will-stone the v2.0.2 is deployed.

Thank you!

@will-stone
Copy link
Contributor Author

Oh awesome! thanks for the quick turnaround 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants