-
-
Notifications
You must be signed in to change notification settings - Fork 600
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
fix(typescript): utilize 'this.meta.watchMode' #449
Conversation
Thanks for opening a PR. Unfortunately it looks like you have a failure on our analysis CI step and both Node 10 and 12 are failing tests. We also have a strict policy on not accepting fixes without accompanying tests. To test this one you might have to simulate watching a rollup build. |
Maybe the tests are failing because the rollup version is not [!] (plugin typescript) Error: @rollup/plugin-typescript TS2339: Property 'watchMode' does not exist on type 'PluginContextMeta'.
src/index.ts (65:60)
65 if (process.env.ROLLUP_WATCH !== 'true' && this.meta.watchMode !== true) {
~~~~~~~~~
Error: @rollup/plugin-typescript TS2339: Property 'watchMode' does not exist on type 'PluginContextMeta'.
at error (/home/circleci/project/node_modules/.pnpm/registry.npmjs.org/rollup/2.2.0/node_modules/rollup/dist/shared/rollup.js:10120:30) |
@shellscape How can I ensure the tests are running against |
@dionysiusmarquis the same as you would any other package - you need to ensure that the right version is installed in devDeps. Because this will rely upon a particular patch version, the PR contains breaking changes, and that means it must be bumped to a new major version. The breaking change is that anyone using prior versions must now have a peerDep of rollup 2.14.0+ |
@shellscape I don't know if I understand you correctly. Actually this won‘t change or break anything if you use an older If you mean we have to ensure that the |
e13a87c
to
f76a94f
Compare
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're increasing the peer dependency, this needs to be marked as a breaking change.
f76a94f
to
ca69e91
Compare
* style(typescript): prettier index.js and watchProgram.js * fix(typescript): utilize 'this.meta.watchMode' * fix(typescript): set `rollup` peer dependency to version 2.14.0 or higher
Rollup Plugin Name:
typescript
This PR contains:
Are tests included?
Breaking Changes?
BREAKING CHANGES: Changed
rollup
peer dependency torollup@^2.14.0
List any relevant issue numbers:
rollup/rollup#3608
#418
Fix: #478
Description
I applied
prettier
and added the newthis.meta.watchMode
(see rollup/rollup#3616). Checkingprocess.env.ROLLUP_WATCH
will only work inrollup -w
context. Checking forthis.meta.watchMode
will also work inrollup.watch
context. In the future plugins should preferable utilizethis.meta.watchMode
.