-
-
Notifications
You must be signed in to change notification settings - Fork 124
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
Move to TypeScript #104
Move to TypeScript #104
Conversation
Make sure you look at and address all the feedback in the original PR. For example: #96 (comment) |
What changed that makes it require this? |
Allright, nevermind. This is also a typing issue. Because it does support strings. I will look at your comments later today. |
42d7b9b
to
40b8d89
Compare
All comments have been resolved. Tests seem to be fine, except for the |
I don't see #104 (comment) being handled. |
This is not done: #104 (comment) |
#104 (comment) is not resolved. |
I have had other priorities, I will pick this up in the week of the 20th of April |
Tests are not passing. Try removing |
I think it's ok now. The tests weren't working, implemented them like in https://github.com/sindresorhus/got/. The linter issues are fixed and I improved the typing for .get |
Can you add a type test to confirm #104 (comment) is working? |
Travis is still failing. |
Allright, looked at it again and fixed the problem. But there are still some issues.
|
|
Thanks for working on this! Looks great now 🙌🏻 |
Ah allright, glad I could help. I will be able to benefit from this as well in my app 🙂 |
"prepare": "npm run build", | ||
"build": "del dist && tsc", | ||
"prepublishOnly": "npm run build" |
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.
As far as I know prepare
is meant to replace prepublishOnly
so you don't need both.
However I've been using the more specific prepack
which feels like it's the exact moment when files should be built: right before the tar.gz is created.
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.
As far as I know prepare is meant to replace prepublishOnly so you don't need both.
Yes, but it's a mess since old npm version use prepare
, new ones use prepublishOnly
, and future ones will use prepare
but with it will work differently. I'm not sure why we use both here. Maybe look at the git commits/blame.
However I've been using the more specific prepack which feels like it's the exact moment when files should be built: right before the tar.gz is created.
Does that one also work when users install a Git commit hash directly? npm i sindresorhus/conf#ad32d2
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.
prepack: run BEFORE a tarball is packed (on npm pack, npm publish, and when installing git dependencies)
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.
Compared with:
prepare: Run both BEFORE the package is packed and published, on local npm install without any arguments, and when installing git dependencies (See below). This is run AFTER prepublish, but BEFORE prepublishOnly.
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.
Got everything sorted out as requested. I did not add dot paths yet because we should get a good base first. That should be a seperate PR.
Everything is nicely typed now. The only thing that break for now, and I want your opinion on this first, is the schema. The schema now requires the enum JSONSchemaType for defining the types. I feel like that might be annoying for users, they will need to fix all their schemas. WDYT?
Fixes #86
IssueHunt Summary
Referenced issues
This pull request has been submitted to:
IssueHunt has been backed by the following sponsors. Become a sponsor