-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
Update dependencies and move to ESM #267
Conversation
Thanks. Would you be willing to move to use |
@sindresorhus Thanks for the suggestion! I didn't know about this package. I'll update the PR again over the weekend. |
I migrated to I think it works as expected once nodejs/node#34314 has landed on Node 15. |
readme.md
Outdated
@@ -83,18 +83,18 @@ The hash of each rev'd file is stored at `file.revHash`. You can use this for cu | |||
### Asset manifest | |||
|
|||
```js | |||
const gulp = require('gulp'); | |||
const rev = require('gulp-rev'); | |||
import {src, dest} from 'gulp'; |
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.
I would prefer to keep gulp
a default import.
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.
➡️ 39e09fa
readme.md
Outdated
exports.default = () => ( | ||
gulp.src('src/*.js') | ||
exports.default = async () => { | ||
const {default: rev} = await import('gulp-rev'); |
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.
Why dynamic import?
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.
➡️ 1d6480d
My mistake, I thought that we couldn't import the other packages of the examples using ES import
if (path.extname(file.path) === '.map') { | ||
t.is(file.path, 'pastissada-d41d8cd98f.css.map'); | ||
} | ||
} |
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.
Do an assert for the correct file count too. Currently, if the stream never emits, it would not be caught and test would succeed.
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.
➡️ 553466b
I think we can just target Node.js 16. This is a dev tool anyway, not a reusable package. |
Nice work 👍 |
Thanks for releasing a new version of
vinyl-file
🙏 This time, I want to updategulp-rev
!What's new?
ava
tests usingp-event
xo
The tests are passing in my repo.
I also updated some examples in the readme but I am not too sure about the ones that mix ESM and CJS modules.