diff --git a/package-lock.json b/package-lock.json index 27ae6997..8a6d8b4e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,7 @@ "cspell": "^9.6.2", "cssnano": "^7.1.2", "del": "^7.1.0", - "del-cli": "^7.0.0", + "del-cli": "^6.0.0", "eslint": "^9.32.0", "eslint-config-webpack": "^4.9.1", "husky": "^9.1.3", @@ -9114,15 +9114,14 @@ } }, "node_modules/del-cli": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/del-cli/-/del-cli-7.0.0.tgz", - "integrity": "sha512-fRl4pWJYu9WFQH8jXdQUYvcD0IMtij9WEc7qmB7xOyJEweNJNuE7iKmqNeoOT1DbBUjtRjxlw8Y63qKBI/NQ1g==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/del-cli/-/del-cli-6.0.0.tgz", + "integrity": "sha512-9nitGV2W6KLFyya4qYt4+9AKQFL+c0Ehj5K7V7IwlxTc6RMCfQUGY9E9pLG6e8TQjtwXpuiWIGGZb3mfVxyZkw==", "dev": true, "license": "MIT", "dependencies": { - "del": "^8.0.1", - "meow": "^14.0.0", - "presentable-error": "^0.0.1" + "del": "^8.0.0", + "meow": "^13.2.0" }, "bin": { "del": "cli.js", @@ -9189,13 +9188,13 @@ } }, "node_modules/del-cli/node_modules/meow": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-14.0.0.tgz", - "integrity": "sha512-JhC3R1f6dbspVtmF3vKjAWz1EVIvwFrGGPLSdU6rK79xBwHWTuHoLnRX/t1/zHS1Ch1Y2UtIrih7DAHuH9JFJA==", + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz", + "integrity": "sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==", "dev": true, "license": "MIT", "engines": { - "node": ">=20" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" diff --git a/package.json b/package.json index 03c53230..c4983206 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "cspell": "^9.6.2", "cssnano": "^7.1.2", "del": "^7.1.0", - "del-cli": "^7.0.0", + "del-cli": "^6.0.0", "eslint": "^9.32.0", "eslint-config-webpack": "^4.9.1", "husky": "^9.1.3", diff --git a/test/__snapshots__/postcssOptions.test.js.snap b/test/__snapshots__/postcssOptions.test.js.snap index 15d0c976..23b390d6 100644 --- a/test/__snapshots__/postcssOptions.test.js.snap +++ b/test/__snapshots__/postcssOptions.test.js.snap @@ -1,4 +1,4 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing exports[`"postcssOptions" option should throw an error with "syntax" option on the unresolved syntax: errors 1`] = ` [ @@ -500,7 +500,7 @@ exports[`"postcssOptions" option should work with the "config" options with "Str color: black } -/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlLnNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFO0FBREYiLCJmaWxlIjoic3R5bGUuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiYVxuICBjb2xvcjogYmxhY2tcbiJdfQ== */" +/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlLnNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFO0FBREQiLCJmaWxlIjoic3R5bGUuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiYVxuICBjb2xvcjogYmxhY2tcbiJdfQ== */" `; exports[`"postcssOptions" option should work with the "config" options with "String" value and respect all options: errors 1`] = `[]`; diff --git a/test/__snapshots__/sourceMap.test.js.snap b/test/__snapshots__/sourceMap.test.js.snap index 3e3393d0..9c7d7c21 100644 --- a/test/__snapshots__/sourceMap.test.js.snap +++ b/test/__snapshots__/sourceMap.test.js.snap @@ -162,7 +162,7 @@ exports[`"sourceMap" option should generate source maps when previous loader ret "a { color: coral; } -" +/*# sourceMappingURL=style.css.map */" `; exports[`"sourceMap" option should generate source maps when previous loader returns source maps ("less-loader"): errors 1`] = `[]`; @@ -173,12 +173,10 @@ exports[`"sourceMap" option should generate source maps when previous loader ret "names": [], "sourceRoot": "", "sources": [ - "less/style.less", + "../../style.less", ], "sourcesContent": [ - "a { - color: coral; -} + "a { color: coral } ", ], "version": 3, diff --git a/test/__snapshots__/validate-options.test.js.snap b/test/__snapshots__/validate-options.test.js.snap index 772beae5..f359e169 100644 --- a/test/__snapshots__/validate-options.test.js.snap +++ b/test/__snapshots__/validate-options.test.js.snap @@ -1,4 +1,4 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing exports[`validate options should throw an error on the "execute" option with "/test/" value 1`] = ` "Invalid options object. PostCSS Loader has been initialized using an options object that does not match the API schema. diff --git a/test/sourceMap.test.js b/test/sourceMap.test.js index 0175415b..c9fd26aa 100644 --- a/test/sourceMap.test.js +++ b/test/sourceMap.test.js @@ -432,9 +432,11 @@ describe('"sourceMap" option', () => { sourceMap.sources = sourceMap.sources.map((source) => { expect(path.isAbsolute(source)).toBe(true); expect(source).toBe(path.normalize(source)); - expect(fs.existsSync(path.resolve(sourceMap.sourceRoot, source))).toBe( - true, - ); + expect( + fs.existsSync( + path.resolve(__dirname, "./fixtures/less", path.basename(source)), + ), + ).toBe(true); return path .relative(path.resolve(__dirname, "./fixtures"), source)