Skip to content

chore: bump rollup typescript, remove unused micromatch#4219

Merged
lukastaegert merged 10 commits into
rollup:masterfrom
dnalborczyk:dn/bump-rollup-plugins
Sep 7, 2021
Merged

chore: bump rollup typescript, remove unused micromatch#4219
lukastaegert merged 10 commits into
rollup:masterfrom
dnalborczyk:dn/bump-rollup-plugins

Conversation

@dnalborczyk

@dnalborczyk dnalborczyk commented Sep 3, 2021

Copy link
Copy Markdown
Contributor

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
@dnalborczyk dnalborczyk force-pushed the dn/bump-rollup-plugins branch from 094753b to 48a11b4 Compare September 3, 2021 02:58
@codecov

codecov Bot commented Sep 3, 2021

Copy link
Copy Markdown

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

@lukastaegert lukastaegert left a comment

Copy link
Copy Markdown
Member

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.

Comment thread src/watch/fsevents-importer.ts Outdated
Comment thread src/watch/fsevents-importer.ts Outdated
Comment thread src/watch/watch.ts
@lukastaegert

Copy link
Copy Markdown
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

dnalborczyk commented Sep 7, 2021

Copy link
Copy Markdown
Contributor Author

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

@dnalborczyk dnalborczyk force-pushed the dn/bump-rollup-plugins branch from 14eb48d to 88d6f35 Compare September 7, 2021 00:51
@dnalborczyk dnalborczyk force-pushed the dn/bump-rollup-plugins branch from a3def8a to 8f3a82c Compare September 7, 2021 01:35

@lukastaegert lukastaegert left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

2 participants