Skip to content

Commit

Permalink
Fix for gulp-load-plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
fasttime committed Aug 23, 2024
1 parent 3e24886 commit c4bdf0f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"files": [
"lib"
],
"main": "lib/gulp-eslint-new.js",
"directories": {
"example": "example",
"lib": "lib",
Expand Down Expand Up @@ -65,6 +66,7 @@
"globals": "^15.8.0",
"gulp": "^5.0.0",
"mocha": "^9.2.2",
"resolve": "^1.22.8",
"typescript": "~5.5.4",
"typescript_4.6": "npm:[email protected]",
"typescript_5": "npm:typescript@5",
Expand Down
18 changes: 17 additions & 1 deletion test/import.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
'use strict';

const { strict: assert } = require('assert');
const { strict: assert } = require('assert');
const { dirname } = require('path');
const { promisify } = require('util');

it
(
Expand All @@ -23,3 +25,17 @@ it
assert.deepEqual(actual, expected);
},
);

// gulp-load-plugins uses the `resolve` package.
it
(
'lookup with resolve',
async () =>
{
const { default: resolve } = await import('resolve');
const packageIterator = () => [dirname(__dirname)];
const actual = await promisify(resolve)('gulp-eslint-new', { packageIterator });
const expected = require.resolve('gulp-eslint-new');
assert.strictEqual(actual, expected);
},
);

0 comments on commit c4bdf0f

Please sign in to comment.