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

Change typescript to depend on source instead of built files #2686

Closed
wants to merge 1 commit into from

Conversation

mfedderly
Copy link
Collaborator

@mfedderly mfedderly commented Aug 7, 2024

Minimal version of #2682

There's an issue where it doesn't leave the imports in the built code.

@@ -331,7 +331,7 @@ const turfTypescriptPath = path.join(__dirname, "..", "turf-*", "index.d.ts");

// Test Strings
const requireString = `import test from 'tape';
import * as turf from './dist/esm/index.js';
import * as turf from './index.ts';
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Jumping into the built output gets us away from the tsconfig paths settings, so we have to hit the index.ts instead.

@@ -10,6 +10,7 @@ packages/turf-directional-mean/test/in/bus_route_utm.json

# is actually output
packages/turf/turf.min.js
packages/turf/test.example.js
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think this will help with rerunnability locally

@mfedderly mfedderly closed this Aug 8, 2024
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.

1 participant