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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump rollup typescript, remove unused micromatch #4219

Merged
merged 10 commits into from Sep 7, 2021

Conversation

dnalborczyk
Copy link
Contributor

@dnalborczyk dnalborczyk commented Sep 3, 2021

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:

Description

  • bumps rollup-plugin-typescript to latest @rollup/plugin-typescript. there appears to be a problem with the fsevents module and types under linux/windows, as those are optional deps and only installed on macOS. I had to use an any type to get around the typing problem. I'm not sure why and how it worked previously. 馃
  • bumps rollup-pluginutils to latest @rollup/pluginutils, fix imports
  • removes unused micromatch + types/micromatch
  • bump rollup to latest. on that note: wouldn't it be better to dogfood from the source directly?

@dnalborczyk dnalborczyk force-pushed the dn/bump-rollup-plugins branch 2 times, most recently from d8dcebd to 094753b Compare September 3, 2021 02:52
@codecov
Copy link

codecov bot commented Sep 3, 2021

Codecov Report

Merging #4219 (ec86116) into master (181f379) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4219   +/-   ##
=======================================
  Coverage   98.37%   98.37%           
=======================================
  Files         202      202           
  Lines        7259     7260    +1     
  Branches     2119     2119           
=======================================
+ Hits         7141     7142    +1     
  Misses         58       58           
  Partials       60       60           
Impacted Files Coverage 螖
src/Module.ts 100.00% <酶> (酶)
src/watch/watch.ts 99.06% <酶> (酶)
src/watch/fsevents-importer.ts 50.00% <100.00%> (+10.00%) 猬嗭笍

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update 181f379...ec86116. Read the comment docs.

@dnalborczyk dnalborczyk changed the title chore: bump rollup plugin deps chore: bump rollup + plugin deps Sep 3, 2021
@dnalborczyk dnalborczyk changed the title chore: bump rollup + plugin deps chore: bump rollup typescript, remove unused micromatch Sep 3, 2021
@dnalborczyk dnalborczyk marked this pull request as ready for review September 3, 2021 14:31
Copy link
Member

@lukastaegert lukastaegert left a comment

Choose a reason for hiding this comment

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

One reason I never updated the TypeScript plugin is because the old one actually allowed you to write invalid code to try out stuff 馃槣 I guess that is what previously "fixed" the fsevents types. But I agree that we should update, especially since performance seems to be pretty neat by now.

Do you know if there is a way to get rid of the CreatingProgramWith:: log when building? It seems to be something done by the TypeScript compiler.

src/watch/fsevents-importer.ts Outdated Show resolved Hide resolved
src/watch/fsevents-importer.ts Outdated Show resolved Hide resolved
src/watch/watch.ts Show resolved Hide resolved
@lukastaegert
Copy link
Member

wouldn't it be better to dogfood from the source directly?

Sounds like a plan, though this could have quite some impact on build times which again would have some impact on test execution times, but maybe there are solutions. At least on CI, I would hope that we run tests against the compiled version of Rollup just like an end user would do.
Locally, it might be an option not to do that. One issue is the markdown import for the CLI options file.

I guess if one were to make a PR for this, we can definitely talk about it. Depending on how it is done, one might also use TypeScripts watch mode (rather than ts-node) for local test executions, which might give a nice speed boost.

There is also a long-standing issue about this.

@dnalborczyk
Copy link
Contributor Author

dnalborczyk commented Sep 7, 2021

One reason I never updated the TypeScript plugin is because the old one actually allowed you to write invalid code to try out stuff 馃槣 I guess that is what previously "fixed" the fsevents types. But I agree that we should update, especially since performance seems to be pretty neat by now.

ah, I see, that would explain it 馃槃 . also just found this: https://github.com/rollup/plugins/tree/master/packages/typescript#faster-compiling that seems to bit unfortunate, I like to turn off type checking once in a while as well, as you can prototype faster. e.g. with the ts-node --transpile-only flag.

Do you know if there is a way to get rid of the CreatingProgramWith:: log when building? It seems to be something done by the TypeScript compiler.

I looked into the typescript code and that log is emitted with the diagnostics flag, which is also deprecated. I removed it for now. not sure what a good replacement for that flag would be, as I have never used it. 馃 https://www.typescriptlang.org/tsconfig#diagnostics

Copy link
Member

@lukastaegert lukastaegert left a comment

Choose a reason for hiding this comment

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

Looks perfect now 馃槈

@lukastaegert
Copy link
Member

I looked into the typescript code and that log is emitted with the diagnostics flag

Ah, good digging, thanks a lot. So it was our own fault, but we never noticed because before, the flag was ignored. Now it looks nice like it should.

@lukastaegert
Copy link
Member

BTW if you notice the license file having a lot of changes after you install something, the reason is that for some reason, the package files in node_modules look slightly differently depending on whether you last used npm install or npm ci. To fix it, just run npm ci after npm install (which is what I pushed to your branch, I hope you do not mind).

@lukastaegert lukastaegert merged commit bce7624 into rollup:master Sep 7, 2021
@dnalborczyk
Copy link
Contributor Author

BTW if you notice the license file having a lot of changes after you install something, the reason is that for some reason, the package files in node_modules look slightly differently depending on whether you last used npm install or npm ci. To fix it, just run npm ci after npm install (which is what I pushed to your branch, I hope you do not mind).

ah, thank you, good to know! that sounds like a bug with npm. 馃

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.

None yet

2 participants