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

chore: cleanup package and dependencies - change compile target to es6 #182

Merged
merged 11 commits into from
Nov 21, 2018

Conversation

SimonSchick
Copy link
Contributor

@SimonSchick SimonSchick commented Nov 13, 2018

Things done:

  • Apply strict null checks to make sure I don't break stuff :)
    • Some null assertions were used, see comments
  • Bump up build target to es6
    • This is fully supported by node v6
  • Replaces lodash with native methods
    • should work according to https://node.green/
    • please note that node v6 is not in the build matrix
  • Remove unused resolve dependency
  • Got rid of (presumably) accidentally packaged package tar file
  • Got rid of .npmignore as it is redundant since you use files in package.json
  • Update dependencies and apply libs to fix tests
    • they were failing from the start for me

@SimonSchick SimonSchick force-pushed the master branch 5 times, most recently from 6694c81 to e1a2611 Compare November 13, 2018 03:11
@johnnyreilly
Copy link
Member

Thanks for this @SimonSchick! I'm a little hesitant about the targeting ES6 purely because it requires that all consumers need to be on > node 6.4.

Mind you, for webpack 4 that ship sailed back in February so it's probably fine. And node 10 is now the LTS install. Yeah it's probably fine.

@piotr-oles do you have any thoughts?

@SimonSchick
Copy link
Contributor Author

@johnnyreilly The package does specify a minimum node version.

https://github.com/Realytics/fork-ts-checker-webpack-plugin/blob/97c86d66f1b870898414e32e8fc777e7253d9104/package.json#L40

or is that considered none binding?

In any case you can release it as 0.5 when it doubt.

@johnnyreilly
Copy link
Member

johnnyreilly commented Nov 13, 2018

I think it's probably fine - I've already done this myself here: https://github.com/johnnyreilly/fork-ts-checker-notifier-webpack-plugin/blob/master/tsconfig.json

I'd like to hear what @piotr-oles thinks about this but I think this looks generally fine. Could you address my comments please?

@johnnyreilly
Copy link
Member

Hi @SimonSchick,

Please could you address my review comments? Thanks

@SimonSchick
Copy link
Contributor Author

@johnnyreilly I don't see any review comments, are you sure you've submitted them?

src/VueProgram.ts Show resolved Hide resolved
src/formatter/codeframeFormatter.ts Outdated Show resolved Hide resolved
src/tsconfig.json Outdated Show resolved Hide resolved
@johnnyreilly
Copy link
Member

How about now?

@SimonSchick
Copy link
Contributor Author

I'd consider all comments addressed.

@SimonSchick
Copy link
Contributor Author

@johnnyreilly done

@johnnyreilly
Copy link
Member

Any reservations about the target: es2015 stuff @piotr-oles?

@SimonSchick
Copy link
Contributor Author

I'd also like to point out again that node v6 is not in the build matrix and I haven't tested my changes on node v6, I validated my changes again node.green however.
If you want to support v6 in the future I can ammend it to this PR, otherwise we might as well skip to the es2017 build target.

@SimonSchick
Copy link
Contributor Author

@johnnyreilly thoughts?

@johnnyreilly
Copy link
Member

I was hoping @piotr-oles would comment but I guess he's busy. I think I'm fine with this though. I'd like to release it as 0.5 just in case there's any old node users out there.

Do you want to update the package.json and the CHANGELOG.md please?

@SimonSchick
Copy link
Contributor Author

I bumped up dev deps and added ts-loader@5 to the test matrix as well.

Also do you have any plans to drop webpack 2-3 since v5 is around the corner?

@johnnyreilly
Copy link
Member

Also do you have any plans to drop webpack 2-3 since v5 is around the corner?

Not as long as supporting both remains straightforward (and so far it does).

Also, I'm not that comfortable with the dropping of support for node 6 without @piotr-oles commenting first I'm afraid.

@SimonSchick
Copy link
Contributor Author

All good, was just wondering if there were any plans :)

package.json Outdated Show resolved Hide resolved
src/IncrementalChecker.ts Show resolved Hide resolved
src/IncrementalChecker.ts Show resolved Hide resolved
@SimonSchick
Copy link
Contributor Author

@piotr-oles I went ahead and added public/private eveywhere and enabled the corresponding lint rule.

While doing so I also noticed that the properties of NormalizedMessage were accessed sometimes directly and indirectly (via getter), I marked all properties as public readonly instead, might even give a speed boost :)

@SimonSchick
Copy link
Contributor Author

Also please note, adding node v6 to the build matrix doubled the job count, adding v10 will triple it, you might want to consider dropping wp 2/3 in master and maintain them in a separate branch.

@piotr-oles
Copy link
Collaborator

Thank you @SimonSchick for your work. I'm aware that it will make builds a lot longer but it shouldn't be an issue in terms of development. You can still run your test locally on one node version and in 99% cases it will pass on all node versions :)

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
src/IncrementalChecker.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@piotr-oles piotr-oles left a comment

Choose a reason for hiding this comment

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

Ok, everything is fine - thank you :)

@SimonSchick
Copy link
Contributor Author

Let me just fix the build :)

@SimonSchick
Copy link
Contributor Author

So turns out es2015 !== es6 build target 😅

@SimonSchick
Copy link
Contributor Author

SimonSchick commented Nov 20, 2018

@piotr-oles you should look into porting tests to TS too, turns out tests don't work in node v6.

@SimonSchick
Copy link
Contributor Author

Sorry for the mess, I'm in the process of moving and haven't had a whole lot of time to work on this more than 5min in a block.

@johnnyreilly
Copy link
Member

This is why "squash and merge" was invented 😉

@SimonSchick
Copy link
Contributor Author

@johnnyreilly builds now~~ 🎉

@johnnyreilly
Copy link
Member

Great - I've put a few more comments around the package.json and changelog.md. if you could address these then I think we're good to go!

@SimonSchick
Copy link
Contributor Author

@johnnyreilly I don't see any new comments, did you forget to request the changes? Happens to me all the time 😛

Copy link
Member

@johnnyreilly johnnyreilly left a comment

Choose a reason for hiding this comment

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

How about now? 😄

.travis.yml Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@johnnyreilly
Copy link
Member

Now?

@SimonSchick
Copy link
Contributor Author

I think I got everything now, on a intercontinental flight atm, might not respond immediately.

@johnnyreilly johnnyreilly changed the title chore: cleanup package and dependencies chore: cleanup package and dependencies - change compile target to es2015 Nov 21, 2018
@johnnyreilly johnnyreilly changed the title chore: cleanup package and dependencies - change compile target to es2015 chore: cleanup package and dependencies - change compile target to es6 Nov 21, 2018
@johnnyreilly johnnyreilly merged commit 5f5d967 into TypeStrong:master Nov 21, 2018
@johnnyreilly
Copy link
Member

Happy landings! https://github.com/Realytics/fork-ts-checker-webpack-plugin/releases/tag/v0.5.0

Thanks for your help ❤️

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.

3 participants