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 root in package.json #274

Merged
merged 2 commits into from
Nov 5, 2024
Merged

Fix types root in package.json #274

merged 2 commits into from
Nov 5, 2024

Conversation

cmoesel
Copy link
Member

@cmoesel cmoesel commented Oct 29, 2024

Description: This sets the types root to dist/index.d.ts. Previously, the types root pointed to dist/app.d.ts, which prevented GoFSH from being imported property in other applications.

Testing Instructions:
Repro the problem:

  1. Download the attached simple TS project that imports GoFSH: ts-project.zip
  2. Unzip it and run npm install
  3. Run npm run build and observe compile errors

Test the solution:

  1. Check out the branch from this PR
  2. Run npm pack to create the module file gofsh-2.3.1.tgz
  3. Copy gofsh-2.3.1.tgz to the simple TS project you downloaded
  4. In that simple TS project, run npm install --save file:gofsh-2.3.1.tgz
  5. Run npm run build and observe that it builds cleanly

Related Issue: Discovered and discussed in FSH VS Code PR #97

The types root incorrrectly pointed to the app types instead of the index types. This prevented GoFSH from being imported property in other applications.
Copy link
Collaborator

@mint-thompson mint-thompson left a comment

Choose a reason for hiding this comment

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

Worked perfectly for me: compile errors without the change, no compile errors with the change. Thank you!

@cmoesel cmoesel merged commit 7011bfc into master Nov 5, 2024
14 checks passed
@cmoesel cmoesel deleted the fix-types-root branch November 5, 2024 19:08
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