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
21 changes: 10 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions test/__snapshots__/postcssOptions.test.js.snap
Original file line number Diff line number Diff line change
@@ -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`] = `
[
Expand Down Expand Up @@ -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`] = `[]`;
Expand Down
8 changes: 3 additions & 5 deletions test/__snapshots__/sourceMap.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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`] = `[]`;
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion test/__snapshots__/validate-options.test.js.snap
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
8 changes: 5 additions & 3 deletions test/sourceMap.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down