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
chore(ts): init typescript conf + tsify tokenize-arg-string #272
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments, but this is looking solid.
@QmarkC this is looking pretty solid to me, happy to take the PR whenever you're ready. |
I've updated the PR based on the current feedback. Also should I rebase to merge all the commits for cleaner history? That's what I typically do after getting feedback on a PR. |
09062a3
to
7c24670
Compare
@QmarkC I would like to stick with the Looks like your rebased already, in general this is optional, as I squash and merge when I land 👍 I sometimes do so any ways on a large feature. |
@QmarkC I've been talking with @mleguen, I think we'll make the final TypeScript release of yargs a major release any ways... so, let's plan that this work on The problem with decamelize@3.x is the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot! Ready to merge once engines requirements in package.json
is in line with tsc output.
package.json
Outdated
"index.js" | ||
"index.js", | ||
"build", | ||
"lib/**/*.js" | ||
], | ||
"engines": { | ||
"node": ">=6" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we do want to continue supporting node 6 in yargs-parser
, then the target needs to be changed in tsconfig.json
(and in .eslintrc
too, I think), as node 6 supports only 17% of es2017 (see https://node.green/#ES2017).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But as I see we no longer do tests on node 6, I suggest upgrading the engines requirements to "node": ">=8"
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, but opening #278 does not change the issue here: tsconfig.json and .eslintc are still incoherent with package.json?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mleguen engines.node in package.json has been updated to >=10
, ESLint parserOptions.ecmaVersion
updated to 2018
, and updated tsconfig.json to remove es2017
so it will use es2018
from gts/tsconfig-google.json
.
@bcoe @mleguen this should be resolved now with the update to node I also created another branch, 265-tsify-yargs-parser, that has this first step, second step to tsify yargs-parser, and cleans up the commits. Let me know if you want to close this PR in favor of that branch. |
First step of #265, "Switch to typescript".
Add initial TypeScript configuration
Modeled after TypeScript configuration used in yargs/yargs.
Matched semantic versions used in yargs package.json for added devDependencies.
build
output folder..nycrc
configAdd lint configuration for
.ts
files.Modeled after yargs setup.
standard
tostandardx
.editorconfig
Convert
lib/tokenize-arg-string.js
andtest/tokenize-arg-string.js
to TypeScriptUpdate
index.js
to usetokenizeArgString
from build