Skip to content

Commit 4c9f6f4

Browse files
fix: test/include/exclude types (#379)
1 parent f5ab19a commit 4c9f6f4

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

.github/workflows/nodejs.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ jobs:
5757
- name: Security audit
5858
run: npm run security
5959

60-
- name: Check commit message
61-
uses: wagoid/commitlint-github-action@v5
60+
- name: Validate PR commits with commitlint
61+
if: github.event_name == 'pull_request'
62+
run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
6263

6364
test:
6465
name: Test - ${{ matrix.os }} - Node v${{ matrix.node-version }}, Webpack ${{ matrix.webpack-version }}

src/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ const schema = require("./options.json");
6464
/**
6565
* @template T
6666
* @typedef {Object} BasePluginOptions
67-
* @property {Rule} [test]
68-
* @property {Rule} [include]
69-
* @property {Rule} [exclude]
67+
* @property {Rules} [test]
68+
* @property {Rules} [include]
69+
* @property {Rules} [exclude]
7070
* @property {number} [threshold]
7171
* @property {number} [minRatio]
7272
* @property {DeleteOriginalAssets} [deleteOriginalAssets]

types/index.d.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ export = CompressionPlugin;
4343
/**
4444
* @template T
4545
* @typedef {Object} BasePluginOptions
46-
* @property {Rule} [test]
47-
* @property {Rule} [include]
48-
* @property {Rule} [exclude]
46+
* @property {Rules} [test]
47+
* @property {Rules} [include]
48+
* @property {Rules} [exclude]
4949
* @property {number} [threshold]
5050
* @property {number} [minRatio]
5151
* @property {DeleteOriginalAssets} [deleteOriginalAssets]
@@ -182,9 +182,9 @@ type PathData = {
182182
type Filename = string | ((fileData: PathData) => string);
183183
type DeleteOriginalAssets = boolean | "keep-source-map";
184184
type BasePluginOptions<T> = {
185-
test?: Rule | undefined;
186-
include?: Rule | undefined;
187-
exclude?: Rule | undefined;
185+
test?: Rules | undefined;
186+
include?: Rules | undefined;
187+
exclude?: Rules | undefined;
188188
threshold?: number | undefined;
189189
minRatio?: number | undefined;
190190
deleteOriginalAssets?: DeleteOriginalAssets | undefined;

0 commit comments

Comments
 (0)