fix: types weren't working for commonjs. Run tsc and lint to validate changes#397
fix: types weren't working for commonjs. Run tsc and lint to validate changes#397wdavidw merged 2 commits intoadaltas:masterfrom
Conversation
|
Thank you for your contribution. One requested change, the sed command did not work for me, instead I had to use |
|
Strange, why did you used |
|
Correct, in BSD the |
|
Strange because I am on macos and it didn't work with |
|
Could be the |
|
Exact, in my case it was installed by nix (nix-darwin to be exact). |
|
So you are running a nix version of sed, and I am running BSD. What do I need to do to get this change in for the types? |
|
Let merge it this way, thank you for your contribution |
* chore: latest dependencies * fix: uncaught errors with large stream chunks (fix adaltas#386) * chore(release): publish - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] * test(csv-stringify): fix legacy * chore(release): publish - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] * build: remove trailing slash in home url * chore: latest dependencies * fix(csv): fixed CJS types under modern `modernResolution` options (adaltas#388) * fix(csv): remove ts files in cjs dist * chore(release): publish - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] * docs: minor upercase modification * chore: latest dependencies * chore(release): publish - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] * feat: add unicode chars to formula escape (adaltas#387) * fix(csv-stringify): use switch in formula escaping * fix(csv-stringify): add unicode character equivalents in formula sanitization * chore: update tests * docs(csv-stringify): escape formulas references * chore(release): publish - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] * feat(csv-parse): add `columns` property in `Info` object type (adaltas#390) * fix(ts): Add `columns` property in `Info` object type * Add disabled options to columns type * build(csv-parse): build and write test after info ts definition * chore(release): publish - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] * docs: update build badge urls * docs(csv-generate): comment indentation in samples * refactor(csv-issues-cjs): code format * refactor(csv-issues-cjs): remove unused arguments * test(csv-issues-cjs): fix stdout maxBuffer length exceeded * test(csv-issues-esm): use spawn instead of exec * fix: commonjs types, run tsc and lint to validate changes (adaltas#397) * fix: types weren't working for commonjs. Run tsc and lint to validate changes * chore: needs to work on linux and BSD * chore: latest dependencies * chore(release): publish - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] * feat(csv-issues-cjs): 399 issue * fix(csv-demo-ts-cjs-node16): upgrade module definition after latest typescript * feat(csv-parse): new comment_no_infix option (fix adaltas#325) * test(csv-issues-esm): reproduce issue adaltas#391 * refactor(csv-stringify): rename variable in sample * test(csv-issues-cjs): reproduce issue 327 * chore(release): publish - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] * docs(csv-parse): comment_no_infix sample --------- Co-authored-by: David Worms <[email protected]> Co-authored-by: Petter <[email protected]> Co-authored-by: Mateusz Burzyński <[email protected]> Co-authored-by: Tom Emelko <[email protected]> Co-authored-by: Elia Maino <[email protected]> Co-authored-by: David Tanner <[email protected]>
When requiring the package, like
import { stringify } from 'csv-stringify';Typescript is complaining that./index.jscannot be found. Converting the import line in the.d.ctsfile to./index.cjsfixes the issue.To avoid future publishing issues around typescript, and to validate the change, I added a tsc command to run after linting, and run linting before tests.
I also fixed linting issues that were uncovered.