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 types resolution #146

Merged
merged 2 commits into from
Apr 2, 2024
Merged

Conversation

kinday
Copy link
Contributor

@kinday kinday commented Mar 28, 2024

This PR fixes the issue occurring when TypeScript module resolution mode is set to Bundler mode. Using module in this mode yields following error:

error TS7016: Could not find a declaration file for module '@neo4j-cypher/editor-support'. '<redacted>/node_modules/.pnpm/@neo4j-cypher+editor-support@1.0.1/node_modules/@neo4j-cypher/editor-support/es/editor-support.js' implicitly has an 'any' type.
  There are types at '<redacted>/node_modules/@neo4j-cypher/editor-support/src/editor-support.d.ts', but this result could not be resolved when respecting package.json "exports". The '@neo4j-cypher/editor-support' library may need to update its package.json or typings.

Adding types entry to exports field resolves this issue as per local testing with patched package.json.

Generated changeset will result in patch as there are no code changes, just the update to the package metadata.

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests locally to make sure they pass before opening the PR.

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running npx changeset and following the instructions. Consult the maintainers if you're unsure what type of version bump the PR should generate.

Copy link

changeset-bot bot commented Mar 28, 2024

🦋 Changeset detected

Latest commit: bdae809

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 10 packages
Name Type
@neo4j-cypher/editor-support Patch
@neo4j-cypher/codemirror Patch
@neo4j-cypher/extract-statements Patch
@neo4j-cypher/react-codemirror Patch
@neo4j-cypher/svelte-codemirror Patch
demo-codemirror-6-vite-svelte Patch
demo-codemirror-6-webpack-react Patch
demo-codemirror-6-webpack-svelte Patch
demo-vitest Patch
svelte-ts Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@OskarDamkjaer OskarDamkjaer merged commit 5694d87 into neo4j:main Apr 2, 2024
1 check passed
@kinday kinday deleted the typescript-bundler-resolution branch April 3, 2024 11:36
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