Skip to content

Commit

Permalink
fix: test/include/exclude types (#379)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Feb 27, 2024
1 parent f5ab19a commit 4c9f6f4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ jobs:
- name: Security audit
run: npm run security

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

test:
name: Test - ${{ matrix.os }} - Node v${{ matrix.node-version }}, Webpack ${{ matrix.webpack-version }}
Expand Down
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ const schema = require("./options.json");
/**
* @template T
* @typedef {Object} BasePluginOptions
* @property {Rule} [test]
* @property {Rule} [include]
* @property {Rule} [exclude]
* @property {Rules} [test]
* @property {Rules} [include]
* @property {Rules} [exclude]
* @property {number} [threshold]
* @property {number} [minRatio]
* @property {DeleteOriginalAssets} [deleteOriginalAssets]
Expand Down
12 changes: 6 additions & 6 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ export = CompressionPlugin;
/**
* @template T
* @typedef {Object} BasePluginOptions
* @property {Rule} [test]
* @property {Rule} [include]
* @property {Rule} [exclude]
* @property {Rules} [test]
* @property {Rules} [include]
* @property {Rules} [exclude]
* @property {number} [threshold]
* @property {number} [minRatio]
* @property {DeleteOriginalAssets} [deleteOriginalAssets]
Expand Down Expand Up @@ -182,9 +182,9 @@ type PathData = {
type Filename = string | ((fileData: PathData) => string);
type DeleteOriginalAssets = boolean | "keep-source-map";
type BasePluginOptions<T> = {
test?: Rule | undefined;
include?: Rule | undefined;
exclude?: Rule | undefined;
test?: Rules | undefined;
include?: Rules | undefined;
exclude?: Rules | undefined;
threshold?: number | undefined;
minRatio?: number | undefined;
deleteOriginalAssets?: DeleteOriginalAssets | undefined;
Expand Down

0 comments on commit 4c9f6f4

Please sign in to comment.