stylelint-webpack-plugin 5.0.0 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/linter.js CHANGED
@@ -132,6 +132,7 @@ function linter(key, options, compilation) {
132
132
  */
133
133
  const save = (name, content) => ( /** @type {Promise<void>} */
134
134
  new Promise((finish, bail) => {
135
+ if (!compiler.outputFileSystem) return;
135
136
  const {
136
137
  mkdir,
137
138
  writeFile
@@ -151,9 +152,7 @@ function linter(key, options, compilation) {
151
152
  if (!outputReport || !outputReport.filePath) {
152
153
  return;
153
154
  }
154
- const content = outputReport.formatter;
155
- (await loadFormatter(stylelint, outputReport.formatter))(results, returnValue);
156
- formatter(results, returnValue);
155
+ const content = outputReport.formatter ? (await loadFormatter(stylelint, outputReport.formatter))(results, returnValue) : formatter(results, returnValue);
157
156
  let {
158
157
  filePath
159
158
  } = outputReport;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stylelint-webpack-plugin",
3
- "version": "5.0.0",
3
+ "version": "5.0.1",
4
4
  "description": "A Stylelint plugin for webpack",
5
5
  "license": "MIT",
6
6
  "repository": "webpack-contrib/stylelint-webpack-plugin",
@@ -38,7 +38,7 @@
38
38
  "test:coverage": "npm run test:only -- --collectCoverageFrom=\"src/**/*.js\" --coverage",
39
39
  "pretest": "npm run lint",
40
40
  "test": "npm run test:coverage",
41
- "prepare": "husky install && npm run build",
41
+ "prepare": "husky && npm run build",
42
42
  "release": "standard-version"
43
43
  },
44
44
  "files": [
@@ -57,40 +57,40 @@
57
57
  "schema-utils": "^4.2.0"
58
58
  },
59
59
  "devDependencies": {
60
- "@babel/cli": "^7.23.4",
61
- "@babel/core": "^7.23.7",
62
- "@babel/preset-env": "^7.23.8",
63
- "@commitlint/cli": "^18.6.0",
64
- "@commitlint/config-conventional": "^18.6.0",
60
+ "@babel/cli": "^7.24.5",
61
+ "@babel/core": "^7.24.5",
62
+ "@babel/preset-env": "^7.24.5",
63
+ "@commitlint/cli": "^19.3.0",
64
+ "@commitlint/config-conventional": "^19.2.2",
65
65
  "@types/file-entry-cache": "^5.0.4",
66
66
  "@types/fs-extra": "^11.0.4",
67
- "@types/micromatch": "^4.0.6",
68
- "@types/node": "^20.11.6",
67
+ "@types/micromatch": "^4.0.7",
68
+ "@types/node": "^20.12.8",
69
69
  "@types/normalize-path": "^3.0.2",
70
70
  "@types/webpack": "^5.28.5",
71
71
  "@webpack-contrib/eslint-config-webpack": "^3.0.0",
72
72
  "babel-eslint": "^10.1.0",
73
73
  "babel-jest": "^29.7.0",
74
- "chokidar": "^3.5.3",
74
+ "chokidar": "^3.6.0",
75
75
  "cross-env": "^7.0.3",
76
- "cspell": "^8.3.2",
76
+ "cspell": "^8.8.0",
77
77
  "del": "^7.1.0",
78
78
  "del-cli": "^5.1.0",
79
- "eslint": "^8.56.0",
79
+ "eslint": "^8.57.0",
80
80
  "eslint-config-prettier": "^9.1.0",
81
81
  "eslint-plugin-import": "^2.29.1",
82
82
  "file-loader": "^6.2.0",
83
83
  "fs-extra": "^11.2.0",
84
- "husky": "^8.0.3",
84
+ "husky": "^9.0.11",
85
85
  "jest": "^29.7.0",
86
- "lint-staged": "^15.2.0",
86
+ "lint-staged": "^15.2.2",
87
87
  "npm-run-all": "^4.1.5",
88
88
  "postcss-scss": "^4.0.9",
89
- "prettier": "^3.2.4",
89
+ "prettier": "^3.2.5",
90
90
  "standard-version": "^9.5.0",
91
- "stylelint": "^16.2.0",
92
- "typescript": "^5.3.3",
93
- "webpack": "^5.90.0"
91
+ "stylelint": "^16.5.0",
92
+ "typescript": "^5.4.5",
93
+ "webpack": "^5.91.0"
94
94
  },
95
95
  "keywords": [
96
96
  "stylelint",
@@ -33,7 +33,7 @@ type Linter = {
33
33
  type Stylelint = {
34
34
  lint: (options: LinterOptions) => Promise<LinterResult>;
35
35
  formatters: {
36
- [k: string]: import('stylelint').Formatter;
36
+ [k: string]: Formatter;
37
37
  };
38
38
  };
39
39
  type LintResult = import('stylelint').LintResult;
package/types/linter.d.ts CHANGED
@@ -48,6 +48,6 @@ type Report = {
48
48
  generateReportAsset?: GenerateReport;
49
49
  };
50
50
  type LintResultMap = {
51
- [files: string]: import('stylelint').LintResult;
51
+ [files: string]: LintResult;
52
52
  };
53
53
  import StylelintError = require('./StylelintError');