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

Add a filename extension to from './index' #367

Closed
rauschma opened this issue Oct 26, 2022 · 1 comment
Closed

Add a filename extension to from './index' #367

rauschma opened this issue Oct 26, 2022 · 1 comment

Comments

@rauschma
Copy link

Describe the bug

With some module resolutions, TypeScript complains about csv-parse/dist/esm/sync.d.ts:

Relative import paths need explicit file extensions in EcmaScript imports
when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.js'?

To fix this issue, change https://github.com/adaltas/node-csv/blob/master/packages/csv-parse/lib/sync.d.ts

- import { Options } from './index';
+ import { Options } from './index.js';

  ···

  export {
    CastingContext, CastingFunction, CastingDateFunction,
    ColumnOption, Options, Info, CsvErrorCode, CsvError
- } from './index';
+ } from './index.js';
@LinusU
Copy link
Contributor

LinusU commented Nov 9, 2022

This was fixed in #368, released in:

  • csv-generate@4.2.1
  • csv-parse@5.3.2
  • csv-stringify@6.2.1
  • csv@6.2.2
  • stream-transform@3.2.1

@wdavidw wdavidw closed this as completed Mar 4, 2023
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

No branches or pull requests

3 participants