Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ jobs:
cache: yarn
- name: Install dependencies
run: yarn --frozen-lockfile --ignore-engines
if: matrix.node-version == '6.x' || matrix.node-version == '8.x' || matrix.node-version == '10.x' || matrix.node-version == '12.x' || matrix.node-version == '14.x' || matrix.node-version == '16.x'
if: matrix.node-version == '6.x' || matrix.node-version == '8.x' || matrix.node-version == '10.x' || matrix.node-version == '12.x' || matrix.node-version == '14.x' || matrix.node-version == '16.x' || matrix.node-version == '18.x'
- name: Install dependencies
run: yarn --frozen-lockfile
if: matrix.node-version != '6.x' && matrix.node-version != '8.x' && matrix.node-version != '10.x' && matrix.node-version != '12.x' && matrix.node-version != '14.x' && matrix.node-version != '16.x'
if: matrix.node-version != '6.x' && matrix.node-version != '8.x' && matrix.node-version != '10.x' && matrix.node-version != '12.x' && matrix.node-version != '14.x' && matrix.node-version != '16.x' && matrix.node-version != '18.x'
- name: Run tests with coverage
run: yarn test --ci --coverage
- uses: codecov/codecov-action@v5
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ The tapable package exposes many Hook classes, which can be used to create hooks

```javascript
const {
SyncHook,
SyncBailHook,
SyncWaterfallHook,
SyncLoopHook,
AsyncParallelHook,
AsyncParallelBailHook,
AsyncSeriesHook,
AsyncParallelHook,
AsyncSeriesBailHook,
AsyncSeriesWaterfallHook
AsyncSeriesHook,
AsyncSeriesWaterfallHook,
SyncBailHook,
SyncHook,
SyncLoopHook,
SyncWaterfallHook
} = require("tapable");
```

Expand Down
3 changes: 1 addition & 2 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ export default defineConfig([
{
extends: [config],
rules: {
"no-new-func": "off",
"n/prefer-node-protocol": "off"
"no-new-func": "off"
}
},
{
Expand Down
4 changes: 2 additions & 2 deletions lib/__tests__/AsyncParallelHooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
*/
"use strict";

const HookTester = require("./HookTester");
const AsyncParallelHook = require("../AsyncParallelHook");
const AsyncParallelBailHook = require("../AsyncParallelBailHook");
const AsyncParallelHook = require("../AsyncParallelHook");
const HookTester = require("./HookTester");

describe("AsyncParallelHook", () => {
it("should have to correct behavior", async () => {
Expand Down
6 changes: 3 additions & 3 deletions lib/__tests__/AsyncSeriesHooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
*/
"use strict";

const HookTester = require("./HookTester");
const AsyncSeriesHook = require("../AsyncSeriesHook");
const AsyncSeriesBailHook = require("../AsyncSeriesBailHook");
const AsyncSeriesWaterfallHook = require("../AsyncSeriesWaterfallHook");
const AsyncSeriesHook = require("../AsyncSeriesHook");
const AsyncSeriesLoopHook = require("../AsyncSeriesLoopHook");
const AsyncSeriesWaterfallHook = require("../AsyncSeriesWaterfallHook");
const HookTester = require("./HookTester");

describe("AsyncSeriesHook", () => {
it("should not have call method", () => {
Expand Down
2 changes: 0 additions & 2 deletions lib/__tests__/HookCodeFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ describe("HookCodeFactory", () => {
}
};

// eslint-disable-next-line guard-for-in
for (const configurationName in factoryConfigurations) {
describe(`(${configurationName})`, () => {
let factory;
Expand Down Expand Up @@ -229,7 +228,6 @@ describe("HookCodeFactory", () => {
}
};

// eslint-disable-next-line guard-for-in
for (const configurationName in factoryConfigurations) {
describe(`(${configurationName})`, () => {
let factory;
Expand Down
1 change: 0 additions & 1 deletion lib/__tests__/HookTester.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ describe("HookTester", () => {
it("should run", () => {});
});

// eslint-disable-next-line no-console
process.on("unhandledRejection", (err) => console.error(err.stack));

class HookTester {
Expand Down
6 changes: 3 additions & 3 deletions lib/__tests__/SyncHooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
*/
"use strict";

const HookTester = require("./HookTester");
const SyncHook = require("../SyncHook");
const SyncBailHook = require("../SyncBailHook");
const SyncWaterfallHook = require("../SyncWaterfallHook");
const SyncHook = require("../SyncHook");
const SyncLoopHook = require("../SyncLoopHook");
const SyncWaterfallHook = require("../SyncWaterfallHook");
const HookTester = require("./HookTester");

describe("SyncHook", () => {
it("should have to correct behavior", async () => {
Expand Down
14 changes: 7 additions & 7 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
*/
"use strict";

module.exports.__esModule = true;
module.exports.SyncHook = require("./SyncHook");
module.exports.SyncBailHook = require("./SyncBailHook");
module.exports.SyncWaterfallHook = require("./SyncWaterfallHook");
module.exports.SyncLoopHook = require("./SyncLoopHook");
module.exports.AsyncParallelHook = require("./AsyncParallelHook");
module.exports.AsyncParallelBailHook = require("./AsyncParallelBailHook");
module.exports.AsyncSeriesHook = require("./AsyncSeriesHook");
module.exports.AsyncParallelHook = require("./AsyncParallelHook");
module.exports.AsyncSeriesBailHook = require("./AsyncSeriesBailHook");
module.exports.AsyncSeriesHook = require("./AsyncSeriesHook");
module.exports.AsyncSeriesLoopHook = require("./AsyncSeriesLoopHook");
module.exports.AsyncSeriesWaterfallHook = require("./AsyncSeriesWaterfallHook");
module.exports.HookMap = require("./HookMap");
module.exports.MultiHook = require("./MultiHook");
module.exports.SyncBailHook = require("./SyncBailHook");
module.exports.SyncHook = require("./SyncHook");
module.exports.SyncLoopHook = require("./SyncLoopHook");
module.exports.SyncWaterfallHook = require("./SyncWaterfallHook");
module.exports.__esModule = true;
56 changes: 30 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,24 @@
{
"name": "tapable",
"version": "2.2.2",
"author": "Tobias Koppers @sokra",
"description": "Just a little module for plugins.",
"license": "MIT",
"homepage": "https://github.com/webpack/tapable",
"repository": {
"type": "git",
"url": "http://github.com/webpack/tapable.git"
},
"devDependencies": {
"@babel/core": "^7.4.4",
"@babel/preset-env": "^7.4.4",
"@eslint/js": "^9.28.0",
"@eslint/markdown": "^6.5.0",
"@stylistic/eslint-plugin": "^4.4.1",
"babel-jest": "^24.8.0",
"globals": "^16.2.0",
"eslint": "^9.28.0",
"eslint-config-webpack": "^4.0.8",
"eslint-config-prettier": "^10.1.5",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jest": "^28.12.0",
"eslint-plugin-n": "^17.19.0",
"eslint-plugin-prettier": "^5.4.1",
"eslint-plugin-unicorn": "^59.0.1",
"jest": "^24.8.0",
"prettier": "^3.5.3",
"prettier-1": "npm:prettier@^1"
},
"engines": {
"node": ">=6"
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/webpack"
},
"files": ["lib", "!lib/__tests__", "tapable.d.ts"],
"license": "MIT",
"author": "Tobias Koppers @sokra",
"main": "lib/index.js",
"types": "./tapable.d.ts",
"browser": {
"util": "./lib/util-browser.js"
},
"types": "./tapable.d.ts",
"files": ["lib", "!lib/__tests__", "tapable.d.ts"],
"scripts": {
"lint": "yarn lint:code",
"lint:code": "eslint --cache .",
Expand All @@ -52,5 +33,28 @@
"transform": {
"__tests__[\\\\/].+\\.js$": "babel-jest"
}
},
"devDependencies": {
"@babel/core": "^7.4.4",
"@babel/preset-env": "^7.4.4",
"@eslint/js": "^9.28.0",
"@eslint/markdown": "^7.1.0",
"@stylistic/eslint-plugin": "^5.2.3",
"babel-jest": "^24.8.0",
"globals": "^16.2.0",
"eslint": "^9.28.0",
"eslint-config-webpack": "^4.6.3",
"eslint-config-prettier": "^10.1.5",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jest": "^29.0.1",
"eslint-plugin-n": "^17.19.0",
"eslint-plugin-prettier": "^5.4.1",
"eslint-plugin-unicorn": "^60.0.0",
"jest": "^24.8.0",
"prettier": "^3.5.3",
"prettier-1": "npm:prettier@^1"
},
"engines": {
"node": ">=6"
}
}
Loading
Loading